@nova-ui/bits
Version:
SolarWinds Nova Framework
89 lines (88 loc) • 3.54 kB
TypeScript
import { EventEmitter, OnChanges, SimpleChanges } from "@angular/core";
import { ControlValueAccessor, FormControl, ValidationErrors } from "@angular/forms";
import { NuiFormFieldControl } from "../../form-field/public-api";
import * as i0 from "@angular/core";
export declare class TextboxNumberComponent implements ControlValueAccessor, NuiFormFieldControl, OnChanges {
private static createRangeValidator;
/**
* Value that is exposed through ControlValueAccessor
*/
value: any;
/**
* Use to set a custom width for the input field.
*/
customBoxWidth: string;
/**
* The option to disable the textboxNumber.
*/
disabled: boolean;
/**
* Name of the element.
*/
name: string;
/**
* Value used as a placeholder for the text box.
*/
placeholder: string;
/**
* The option to make the textboxNumber read only.
*/
readonly: boolean;
/**
* Step by which the value are increased/decreased
* when clicking on up/down buttons
*/
step: number;
/**
* The decimal precision to use for rounding each step increase/decrease
* when clicking the up/down buttons
*/
stepPrecision: number;
/**
* Input to apply error state styles
*/
isInErrorState: boolean;
/**
* Input to set aria label text
*/
ariaLabel: string;
/**
* Minimum value of textBoxNumber component
*/
minValue: number;
/**
* Maximum value of textBoxNumber component
*/
maxValue: number;
/**
* Event fired when textBoxNumber is focused out.
*/
blurred: EventEmitter<any>;
valueChange: EventEmitter<number>;
private input;
formControl: FormControl;
isRepeatable: boolean;
private validatorFn;
ngOnChanges(changes: SimpleChanges): void;
onBlurEventEmit(): void;
addNumber(valueChange: number): void;
onValueChange(value: any): void;
onChange(value: any): void;
onTouched(): void;
writeValue(value: any): void;
registerOnChange(fn: (value: any) => void): void;
registerOnTouched(fn: () => void): void;
setDisabledState(isDisabled: boolean): void;
compareMin(): boolean;
compareMax(): boolean;
validate(c: FormControl): ValidationErrors | null;
hasError(): boolean;
private nativeValidator;
private clampToRange;
preventNonNumericalPaste(event: ClipboardEvent): void;
preventNonNumericalInput(event: KeyboardEvent): void;
private preventDefaultEventBehavior;
private isMetaKey;
static ɵfac: i0.ɵɵFactoryDeclaration<TextboxNumberComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TextboxNumberComponent, "nui-textbox-number", never, { "value": { "alias": "value"; "required": false; }; "customBoxWidth": { "alias": "customBoxWidth"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "step": { "alias": "step"; "required": false; }; "stepPrecision": { "alias": "stepPrecision"; "required": false; }; "isInErrorState": { "alias": "isInErrorState"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; }, { "blurred": "blurred"; "valueChange": "valueChange"; }, never, never, false, never>;
}