smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
174 lines (173 loc) • 11 kB
TypeScript
import { MaskedTextBox } from './../index';
import { Animation, MaskedTextBoxCutCopyMaskFormat, EnterKeyBehavior, MaskedTextBoxTextMaskFormat } 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, MaskedTextBoxCutCopyMaskFormat, EnterKeyBehavior, MaskedTextBoxTextMaskFormat, ElementRenderMode } from './../index';
export { Smart } from './smart.element';
export { MaskedTextBox } from './../index';
export declare class MaskedTextBoxComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {
constructor(ref: ElementRef<MaskedTextBox>);
private eventHandlers;
nativeElement: MaskedTextBox;
/** @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 Determines whether promptChar can be entered as valid input by the user. */
get allowPromptAsInput(): boolean;
set allowPromptAsInput(value: boolean);
/** @description Determines whether the input accepts characters only from the ASCII character set. */
get asciiOnly(): boolean;
set asciiOnly(value: boolean);
/** @description Specifies whether the input should be focused when the page is loaded. */
get autoFocus(): boolean;
set autoFocus(value: boolean);
/** @description Determines whether the mask is shown/hidden on focus/blur even if placeholder is not set. */
get autoShowMask(): boolean;
set autoShowMask(value: boolean);
/** @description Determines whether literals and prompt characters are copied to the clipboard on cut/copy operations. */
get cutCopyMaskFormat(): MaskedTextBoxCutCopyMaskFormat | string;
set cutCopyMaskFormat(value: MaskedTextBoxCutCopyMaskFormat | string);
/** @description Enables or disables the element. */
get disabled(): boolean;
set disabled(value: boolean);
/** @description Specifies the behavior on "Enter" key press. Default mode is "submit". */
get enterKeyBehavior(): EnterKeyBehavior | string;
set enterKeyBehavior(value: EnterKeyBehavior | string);
/** @description Determines whether the prompt character in the input mask is hidden when the masked text box isn't focused anymore. */
get hidePromptOnLeave(): boolean;
set hidePromptOnLeave(value: boolean);
/** @description Sets additional helper text below the element. The hint is visible only when the element is focused. */
get hint(): string;
set hint(value: string);
/** @description Determines whether new user input overwrites the existing input value or not. */
get isOverwriteMode(): boolean;
set isOverwriteMode(value: boolean);
/** @description Sets label above the element. The label is always visible. */
get label(): string;
set label(value: string);
/** @description Sets or gets the license which unlocks the product. */
get license(): string;
set license(value: string);
/** @description Sets or gets the language. Used in conjunction with the property messages. */
get locale(): string;
set locale(value: string);
/** @description Callback used to customize the format of the messages that are returned from the Localization Module. */
get localizeFormatFunction(): any;
set localizeFormatFunction(value: any);
/** @description Defines the mask for the input. */
get mask(): string;
set mask(value: string);
/** @description Indicates whether all required fields of the mask have been populated or not. */
get maskCompleted(): boolean;
set maskCompleted(value: boolean);
/** @description Indicates whether all required and optional fields of the mask have been populated or not. */
get maskFull(): boolean;
set maskFull(value: boolean);
/** @description Determines the maximum number of characters that the user can enter. */
get maxLength(): number;
set maxLength(value: number);
/** @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 name attribute for the element. Name is used when submiting HTML forms. */
get name(): string;
set name(value: string);
/** @description A string that appears inside the input when there's no value and mask. */
get placeholder(): string;
set placeholder(value: string);
/** @description Determines the prompt char that is used for the mask of the element. */
get promptChar(): string;
set promptChar(value: string);
/** @description If the element is readonly, the users cannot iteract with the element. */
get readonly(): boolean;
set readonly(value: boolean);
/** @description Determines whether the parsing of user input should stop after the first invalid character or not. */
get rejectInputOnFirstFailure(): boolean;
set rejectInputOnFirstFailure(value: boolean);
/** @description Specifies that the input must be filled in before submitting a form */
get required(): boolean;
set required(value: boolean);
/** @description Determines whether an input character that matches the prompt character should reset the current selected value in the input or not. Applicable only when allowPromptAsInput is enabled. */
get resetOnPrompt(): boolean;
set resetOnPrompt(value: boolean);
/** @description Determines whether hitting space character resets the currently selected value from the input or not. */
get resetOnSpace(): boolean;
set resetOnSpace(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 Specifies whether the value of the input will be selected on focus or not. */
get selectAllOnFocus(): boolean;
set selectAllOnFocus(value: boolean);
/** @description Determines whether the value of the input should contain or not the prompt/literals of the mask. */
get textMaskFormat(): MaskedTextBoxTextMaskFormat | string;
set textMaskFormat(value: MaskedTextBoxTextMaskFormat | 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 value of the element. */
get value(): string;
set value(value: string);
/** @description Callback function that allows to set custom validation on the value. If the function returns false then the value of the input is treated as not valid. */
get validation(): any;
set validation(value: any);
/** @description This event is triggered when the value of the Text Box is changed.
* @param event. The custom event. Custom event was created with: event.detail( oldValue, value)
* oldValue - The previous value before it was changed.
* value - The new value.
*/
onChange: EventEmitter<CustomEvent>;
/** @description This event is triggered on each key up event of the MaskedTextBox, if the value is changed.
* @param event. The custom event. Custom event was created with: event.detail( oldValue, value)
* oldValue - The previous value before it was changed.
* value - The new value.
*/
onChanging: EventEmitter<CustomEvent>;
/** @description This event is triggered if the validation property is set. Indicates whether valiation has passed successfully or not.
* @param event. The custom event. Custom event was created with: event.detail( success)
* success - A flag inidicating whether the validation was successfull or not.
*/
onValidation: EventEmitter<CustomEvent>;
/** @description Focuses the element.
*/
focus(): void;
/** @description Blurs the element.
*/
blur(): void;
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<MaskedTextBoxComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MaskedTextBoxComponent, "smart-masked-text-box, [smart-masked-text-box]", ["smart-masked-text-box"], { "animation": "animation"; "allowPromptAsInput": "allowPromptAsInput"; "asciiOnly": "asciiOnly"; "autoFocus": "autoFocus"; "autoShowMask": "autoShowMask"; "cutCopyMaskFormat": "cutCopyMaskFormat"; "disabled": "disabled"; "enterKeyBehavior": "enterKeyBehavior"; "hidePromptOnLeave": "hidePromptOnLeave"; "hint": "hint"; "isOverwriteMode": "isOverwriteMode"; "label": "label"; "license": "license"; "locale": "locale"; "localizeFormatFunction": "localizeFormatFunction"; "mask": "mask"; "maskCompleted": "maskCompleted"; "maskFull": "maskFull"; "maxLength": "maxLength"; "messages": "messages"; "name": "name"; "placeholder": "placeholder"; "promptChar": "promptChar"; "readonly": "readonly"; "rejectInputOnFirstFailure": "rejectInputOnFirstFailure"; "required": "required"; "resetOnPrompt": "resetOnPrompt"; "resetOnSpace": "resetOnSpace"; "rightToLeft": "rightToLeft"; "selectAllOnFocus": "selectAllOnFocus"; "textMaskFormat": "textMaskFormat"; "theme": "theme"; "unfocusable": "unfocusable"; "value": "value"; "validation": "validation"; }, { "onChange": "onChange"; "onChanging": "onChanging"; "onValidation": "onValidation"; }, never>;
}