UNPKG

ngx-mask

Version:
42 lines (41 loc) 1.56 kB
import { ControlValueAccessor, FormControl, ValidationErrors } from '@angular/forms'; import { MaskService } from './mask.service'; import { IConfig } from './config'; export declare class MaskDirective implements ControlValueAccessor { private document; private _maskService; private _maskValue; private _inputValue; private _position; private _start; private _end; private _code; onChange: (_: any) => void; onTouch: () => void; constructor(document: any, _maskService: MaskService); maskExpression: string; specialCharacters: IConfig['specialCharacters']; patterns: IConfig['patterns']; prefix: IConfig['prefix']; sufix: IConfig['sufix']; dropSpecialCharacters: IConfig['dropSpecialCharacters']; hiddenInput: IConfig['hiddenInput']; showMaskTyped: IConfig['showMaskTyped']; shownMaskExpression: IConfig['shownMaskExpression']; showTemplate: IConfig['showTemplate']; clearIfNotMatch: IConfig['clearIfNotMatch']; validation: IConfig['validation']; validate({ value }: FormControl): ValidationErrors | null; onInput(e: KeyboardEvent): void; onBlur(): void; onFocus(e: MouseEvent | KeyboardEvent): void; a(e: KeyboardEvent): void; onPaste(): void; /** It writes the value in the input */ writeValue(inputValue: string): Promise<void>; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; /** It disables the input element */ setDisabledState(isDisabled: boolean): void; private _repeatPatternSymbols; }