UNPKG

@smart-webcomponents-angular/numerictextbox

Version:

[![Price](https://img.shields.io/badge/price-COMMERCIAL-0098f7.svg)](https://jqwidgets.com/license/)

199 lines (198 loc) 13.7 kB
import { NumericTextBox } from './../index'; import { Animation, NumericTextBoxInputFormat, NumericTextBoxRadix, NumericTextBoxDisplayPosition, Validation, WordLength } from './../index'; import { AfterViewInit, ElementRef, OnInit, OnChanges, OnDestroy, SimpleChanges, EventEmitter } from '@angular/core'; import { BaseElement } from './smart.element'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; export { Animation, NumericTextBoxInputFormat, NumericTextBoxRadix, NumericTextBoxDisplayPosition, Validation, WordLength, ElementRenderMode } from './../index'; export { Smart } from './smart.element'; export { NumericTextBox } from './../index'; export declare class NumericTextBoxComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor { constructor(ref: ElementRef<NumericTextBox>); private eventHandlers; nativeElement: NumericTextBox; /** @description Creates the component on demand. * @param properties An optional object of properties, which will be added to the template binded ones. */ createComponent(properties?: {}): any; /** * @description * The registered callback function called when a change event occurs on the form elements. */ _onChange: (value: any) => void; /** * @description * The registered callback function called when a blur event occurs on the form elements. */ _onTouched: () => any; /** @description Sets or gets the animation mode. Animation is disabled when the property is set to 'none' */ get animation(): Animation | string; set animation(value: Animation | string); /** @description Sets or gets the char to use as the decimal separator in numeric values. */ get decimalSeparator(): string; set decimalSeparator(value: string); /** @description Enables or disables the jqxNumericTextBox. */ get disabled(): boolean; set disabled(value: boolean); /** @description Sets the parent container of the radix dropdown. */ get dropDownAppendTo(): any; set dropDownAppendTo(value: any); /** @description Determines if a dropdown will be displayed when the radix display button is clicked. The dropdown shows options for changing to the binary, octal, decimal, and hexadecimal numeral systems. */ get dropDownEnabled(): boolean; set dropDownEnabled(value: boolean); /** @description Enables or disables incrementing/decrementing the value using the mouse wheel in jqxNumericTextBox. */ get enableMouseWheelAction(): boolean; set enableMouseWheelAction(value: boolean); /** @description Sets additional helper text below the element. */ get hint(): string; set hint(value: string); /** @description Sets or gets the input format of the widget. Setting this property dynamically can lead to precision loss. */ get inputFormat(): NumericTextBoxInputFormat | string; set inputFormat(value: NumericTextBoxInputFormat | string); /** @description Sets a label above the element. */ get label(): string; set label(value: string); /** @description If this property is enabled, leading zeros are added (if necessary) to the binary and hexadecimal representations of a number based on wordLength. */ get leadingZeros(): boolean; set leadingZeros(value: boolean); /** @description Sets or gets the language. Used in conjunction with the property messages. */ get locale(): string; set locale(value: string); /** @description Callback, related to localization module. */ get localizeFormatFunction(): any; set localizeFormatFunction(value: any); /** @description Sets or gets the maximum value of the widget. */ get max(): number | string; set max(value: number | string); /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */ get messages(): any; set messages(value: any); /** @description Sets or gets the minimum value of the widget. */ get min(): number | string; set min(value: number | string); /** @description The name of the control. */ get name(): string; set name(value: string); /** @description Enables or disables the setting of the value property to null or empty string. */ get nullable(): boolean; set nullable(value: boolean); /** @description Sets or gets whether the radix dropdown is opened. Applicable only when dropDownEnabled is true. */ get opened(): boolean; set opened(value: boolean); /** @description Sets or gets the pattern which the input value is displayed in when the element is not focused. All formats available to the NumberRenderer class can be applied as outputFormatString. */ get outputFormatString(): string; set outputFormatString(value: string); /** @description Determines the widget's place holder displayed when the widget's input is empty. */ get placeholder(): string; set placeholder(value: string); /** @description Determines the number of digits after the decimal point. Applicable when inputFormat is either 'floatingPoint' or 'complex'. */ get precisionDigits(): number; set precisionDigits(value: number); /** @description Sets or gets the radix of the jqxNumericTextBox. The radix specifies the numeral system in which to display the widget's value. Applicable only when inputFormat is 'integer'. */ get radix(): NumericTextBoxRadix | string; set radix(value: NumericTextBoxRadix | string); /** @description Enables or disables the radix display button of the jqxNumericTextBox. Applicable only when inputFormat is 'integer'. */ get radixDisplay(): boolean; set radixDisplay(value: boolean); /** @description Sets or gets the position of the radix display button of the jqxNumericTextBox. */ get radixDisplayPosition(): NumericTextBoxDisplayPosition | string; set radixDisplayPosition(value: NumericTextBoxDisplayPosition | string); /** @description Sets or gets the readonly state of the jqxNumericTextBox. */ get readonly(): boolean; set readonly(value: boolean); /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */ get rightToLeft(): boolean; set rightToLeft(value: boolean); /** @description Enables or disables outputting the value in scientific notation. Applicable only when inputFormat is 'integer'. */ get scientificNotation(): boolean; set scientificNotation(value: boolean); /** @description Determines whether to show the current value represented in all four numeral systems in the drop down. */ get showDropDownValues(): boolean; set showDropDownValues(value: boolean); /** @description Enables or disables the visibility of the units. */ get showUnit(): boolean; set showUnit(value: boolean); /** @description Determining how many significant digits are in a number. Applicable when inputFormat is either 'floatingPoint' or 'complex'. */ get significantDigits(): number; set significantDigits(value: number); /** @description Enables or disables the visibility of the spin buttons. */ get spinButtons(): boolean; set spinButtons(value: boolean); /** @description Sets the delay between repeats of spin buttons in miliseconds. */ get spinButtonsDelay(): number; set spinButtonsDelay(value: number); /** @description Sets a delay before the first repeat iteration of spin buttons in miliseconds. */ get spinButtonsInitialDelay(): number; set spinButtonsInitialDelay(value: number); /** @description Sets or gets the position of the spin buttons of the jqxNumericTextBox. */ get spinButtonsPosition(): NumericTextBoxDisplayPosition | string; set spinButtonsPosition(value: NumericTextBoxDisplayPosition | string); /** @description Sets or gets the increase/decrease step. */ get spinButtonsStep(): number | string; set spinButtonsStep(value: number | string); /** @description Determines the theme. Theme defines the look of the element */ get theme(): string; set theme(value: string); /** @description If is set to true, the element cannot be focused. */ get unfocusable(): boolean; set unfocusable(value: boolean); /** @description Sets or gets the name of unit used in jqxNumericTextBox widget. */ get unit(): string; set unit(value: string); /** @description Sets the value's validation by min/max. If 'strict' is applied, the value is always validated by min and max. If 'interaction' is applied, programmatic value changes are not coerced to min/max and if min/max are changed, resulting in the current value being out of range, the value is not coerced, and no change event is fired. */ get validation(): Validation | string; set validation(value: Validation | string); /** @description Sets or gets the value of the jqxNumericTextBox widget. */ get value(): any; set value(value: any); /** @description Sets or gets the word length. Applicable only when inputFormat is 'integer'. If min and/or max are not set by default, they will be set automatically based on the specified word length. */ get wordLength(): WordLength | string; set wordLength(value: WordLength | string); /** @description This event is triggered when the value is changed. * @param event. The custom event. */ onChange: EventEmitter<CustomEvent>; /** @description This event is triggered when the value in the input is being changed via keypress or paste. * @param event. The custom event. */ onChanging: EventEmitter<CustomEvent>; /** @description This event is triggered when the dropdown is closed. * @param event. The custom event. */ onClose: EventEmitter<CustomEvent>; /** @description This event is triggered when the dropdown is about to be closed. The closing operation can be canceled by calling event.preventDefault() in the event handler function. * @param event. The custom event. */ onClosing: EventEmitter<CustomEvent>; /** @description This event is triggered when the dropdown is opened. * @param event. The custom event. */ onOpen: EventEmitter<CustomEvent>; /** @description This event is triggered when the dropdown is about to be opened. The opening operation can be canceled by calling event.preventDefault() in the event handler function. * @param event. The custom event. */ onOpening: EventEmitter<CustomEvent>; /** @description This event is triggered when the radix is changed. * @param event. The custom event. */ onRadixChange: EventEmitter<CustomEvent>; /** @description Focuses the NumericTextBox. */ focus(): void; /** @description Get/set the value of the NumericTextBox. * @param {string | number} value?. The value to be set. If no parameter is passed, returns the displayed value of the jqxNumericTextBox. * @param {boolean} suppressValidation?. If <em>true</em> is passed, the passed value will be set to the jqxNumericTextBox without validation. * @returns {string} */ val(value?: any, suppressValidation?: any): Promise<any>; get isRendered(): boolean; ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; _initialChange: boolean; get ngValue(): any; set ngValue(value: any); writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; ngOnChanges(changes: SimpleChanges): void; /** @description Add event listeners. */ private listen; /** @description Remove event listeners. */ private unlisten; static ɵfac: i0.ɵɵFactoryDeclaration<NumericTextBoxComponent, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<NumericTextBoxComponent, "smart-numeric-text-box, [smart-numeric-text-box]", ["smart-numeric-text-box"], { "animation": "animation"; "decimalSeparator": "decimalSeparator"; "disabled": "disabled"; "dropDownAppendTo": "dropDownAppendTo"; "dropDownEnabled": "dropDownEnabled"; "enableMouseWheelAction": "enableMouseWheelAction"; "hint": "hint"; "inputFormat": "inputFormat"; "label": "label"; "leadingZeros": "leadingZeros"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "max": "max"; "messages": "messages"; "min": "min"; "name": "name"; "nullable": "nullable"; "opened": "opened"; "outputFormatString": "outputFormatString"; "placeholder": "placeholder"; "precisionDigits": "precisionDigits"; "radix": "radix"; "radixDisplay": "radixDisplay"; "radixDisplayPosition": "radixDisplayPosition"; "readonly": "readonly"; "rightToLeft": "rightToLeft"; "scientificNotation": "scientificNotation"; "showDropDownValues": "showDropDownValues"; "showUnit": "showUnit"; "significantDigits": "significantDigits"; "spinButtons": "spinButtons"; "spinButtonsDelay": "spinButtonsDelay"; "spinButtonsInitialDelay": "spinButtonsInitialDelay"; "spinButtonsPosition": "spinButtonsPosition"; "spinButtonsStep": "spinButtonsStep"; "theme": "theme"; "unfocusable": "unfocusable"; "unit": "unit"; "validation": "validation"; "value": "value"; "wordLength": "wordLength"; }, { "onChange": "onChange"; "onChanging": "onChanging"; "onClose": "onClose"; "onClosing": "onClosing"; "onOpen": "onOpen"; "onOpening": "onOpening"; "onRadixChange": "onRadixChange"; }, never>; }