import { Caret, InputMaskPassThrough } from "primeng/types/inputmask"; import * as i0 from "@angular/core"; import { ElementRef, Provider, TemplateRef } from "@angular/core"; import { BaseComponent } from "primeng/basecomponent"; import { BaseInput } from "primeng/baseinput"; import * as i1 from "primeng/bind"; import { Bind } from "primeng/bind"; import { Nullable } from "primeng/ts-helpers"; import { CSSProperties } from "primeng/types/shared"; import { BaseStyle } from "primeng/base"; import * as i2 from "primeng/api"; export * from "primeng/types/inputmask"; export declare class InputMaskStyle extends BaseStyle { name: string; style: string; classes: { root: ({ instance }: { instance: any; }) => (string | { 'p-variant-filled': boolean; })[]; clearIcon: string; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * * InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone. * * [Live Demo](https://www.primeng.org/inputmask/) * * @module inputmaskstyle * */ export declare enum InputMaskClasses { /** * Class name of the root element */ root = "p-inputmask", /** * Class name of the clear icon element */ clearIcon = "p-inputmask-clear-icon" } /** * InputMask directive is applied directly to input elements to enable masked input. * @group Components */ export declare class InputMaskDirective extends BaseComponent { $pcInputMaskDirective: InputMaskDirective | undefined; _componentStyle: InputMaskStyle; /** * Used to pass attributes to DOM elements inside the InputMask directive. * @defaultValue undefined * @group Props */ pInputMaskPT: import("@angular/core").InputSignal; /** * Indicates whether the component should be rendered without styles. * @defaultValue undefined * @group Props */ pInputMaskUnstyled: import("@angular/core").InputSignal; /** * Mask pattern. * @group Props */ pInputMask: import("@angular/core").InputSignal; /** * Placeholder character in mask, default is underscore. * @group Props */ slotChar: import("@angular/core").InputSignal; /** * Clears the incomplete value on blur. * @group Props */ autoClear: import("@angular/core").InputSignalWithTransform; /** * Regex pattern for alpha characters. * @group Props */ characterPattern: import("@angular/core").InputSignal; /** * When present, it specifies that whether to clean buffer value from model. * @group Props */ keepBuffer: import("@angular/core").InputSignalWithTransform; /** * When enabled, deleting a character does not shift the following characters across literal * separators (e.g. the "." in 99.99.9999), keeping each mask section independent. * @group Props */ keepCharPositions: import("@angular/core").InputSignalWithTransform; /** * Callback to invoke when the mask is completed. * @group Emits */ onCompleteEvent: import("@angular/core").OutputEmitterRef; /** * Callback to invoke when value changes, emits unmasked value. * @group Emits */ onUnmaskedChange: import("@angular/core").OutputEmitterRef; defs: Nullable<{ [key: string]: string; }>; tests: (RegExp | null)[]; partialPosition: Nullable; firstNonMaskPos: Nullable; lastRequiredNonMaskPos: Nullable; len: Nullable; oldVal: Nullable; buffer: string[]; defaultBuffer: Nullable; focusText: Nullable; caretTimeoutId: ReturnType | undefined; androidChrome: boolean; focused: Nullable; private _inputElement; private _listeners; private isInputVisible; private get inputElement(); constructor(); onAfterViewInit(): void; onDestroy(): void; initMask(): void; onInputFocus(event: Event): void; onInputBlur(e: Event): void; onInputKeydown(e: KeyboardEvent): void; onKeyPress(e: KeyboardEvent): void; onInputChange(event: Event): void; onPaste(event: Event): void; caret(first?: number, last?: number): Caret | undefined; isCompleted(): boolean; getPlaceholder(i: number): string; seekNext(pos: number): number; seekPrev(pos: number): number; shiftL(begin: number, end: number): void; crossesLiteralBoundary(i: number, j: number): boolean; shiftR(pos: number): void; handleAndroidInput(e: Event): void; handleInputChange(event: Event): void; clearBuffer(start: number, end: number): void; writeBuffer(): void; /** * Dispatches an input event on the host element. * This is needed to notify parent components of value changes * since programmatic value changes don't trigger native input events. */ dispatchInputEvent(): void; checkVal(allow?: boolean): number; getUnmaskedValue(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export declare const INPUTMASK_VALUE_ACCESSOR: Provider; /** * InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone. * @group Components */ export declare class InputMask extends BaseInput { componentName: string; _componentStyle: InputMaskStyle; $pcInputMask: InputMask | undefined; bindDirectiveInstance: Bind; ptmParams: import("@angular/core").Signal<{ context: { filled: boolean; }; }>; requiredAttr: import("@angular/core").Signal<"" | undefined>; readonlyAttr: import("@angular/core").Signal<"" | undefined>; disabledAttr: import("@angular/core").Signal<"" | undefined>; showClearIcon: import("@angular/core").Signal; /** * HTML5 input type. * @group Props */ type: import("@angular/core").InputSignal; /** * Placeholder character in mask, default is underscore. * @group Props */ slotChar: import("@angular/core").InputSignal; /** * Clears the incomplete value on blur. * @group Props */ autoClear: import("@angular/core").InputSignalWithTransform; /** * When enabled, a clear icon is displayed to clear the value. * @group Props */ showClear: import("@angular/core").InputSignalWithTransform; /** * Inline style of the input field. * @group Props */ style: import("@angular/core").InputSignal; /** * Identifier of the focus input to match a label defined for the component. * @group Props */ inputId: import("@angular/core").InputSignal; /** * Style class of the input field. * @group Props */ styleClass: import("@angular/core").InputSignal; /** * Advisory information to display on input. * @group Props */ placeholder: import("@angular/core").InputSignal; /** * Specifies tab order of the element. * @group Props */ tabindex: import("@angular/core").InputSignal; /** * Title text of the input text. * @group Props */ title: import("@angular/core").InputSignal; /** * Used to define a string that labels the input element. * @group Props */ ariaLabel: import("@angular/core").InputSignal; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. * @group Props */ ariaLabelledBy: import("@angular/core").InputSignal; /** * Used to indicate that user input is required on an element before a form can be submitted. * @group Props */ ariaRequired: import("@angular/core").InputSignalWithTransform; /** * When present, it specifies that an input field is read-only. * @group Props */ readonly: import("@angular/core").InputSignalWithTransform; /** * Defines if ngModel sets the raw unmasked value to bound value or the formatted mask value. * @group Props */ unmask: import("@angular/core").InputSignalWithTransform; /** * Regex pattern for alpha characters * @group Props */ characterPattern: import("@angular/core").InputSignal; /** * When present, the input gets a focus automatically on load. * @group Props */ autofocus: import("@angular/core").InputSignalWithTransform; /** * Used to define a string that autocomplete attribute the current element. * @group Props */ autocomplete: import("@angular/core").InputSignal; /** * When present, it specifies that whether to clean buffer value from model. * @group Props */ keepBuffer: import("@angular/core").InputSignalWithTransform; /** * When enabled, deleting a character does not shift the following characters across literal * separators (e.g. the "." in 99.99.9999), keeping each mask section independent. * @group Props */ keepCharPositions: import("@angular/core").InputSignalWithTransform; /** * Mask pattern. * @group Props */ mask: import("@angular/core").InputSignal; /** * Callback to invoke when the mask is completed. * @group Emits */ onComplete: import("@angular/core").OutputEmitterRef; /** * Callback to invoke when the component receives focus. * @param {Event} event - Browser event. * @group Emits */ onFocus: import("@angular/core").OutputEmitterRef; /** * Callback to invoke when the component loses focus. * @param {Event} event - Browser event. * @group Emits */ onBlur: import("@angular/core").OutputEmitterRef; /** * Callback to invoke on input. * @param {Event} event - Browser event. * @group Emits */ onInput: import("@angular/core").OutputEmitterRef; /** * Callback to invoke on input key press. * @param {Event} event - Browser event. * @group Emits */ onKeydown: import("@angular/core").OutputEmitterRef; /** * Callback to invoke when input field is cleared. * @group Emits */ onClear: import("@angular/core").OutputEmitterRef; /** * Custom clear icon template. * @group Templates */ clearIconTemplate: import("@angular/core").Signal | undefined>; inputViewChild: import("@angular/core").Signal>; value: import("@angular/core").WritableSignal>; defs: Nullable<{ [key: string]: string; }>; tests: (RegExp | null)[]; partialPosition: Nullable; firstNonMaskPos: Nullable; lastRequiredNonMaskPos: Nullable; len: Nullable; oldVal: Nullable; buffer: string[]; defaultBuffer: Nullable; focusText: Nullable; caretTimeoutId: ReturnType | undefined; androidChrome: boolean; focused: Nullable; constructor(); onAfterViewChecked(): void; onInit(): void; initMask(): void; caret(first?: number, last?: number): Caret | undefined; isCompleted(): boolean; getPlaceholder(i: number): string; seekNext(pos: number): number; seekPrev(pos: number): number; shiftL(begin: number, end: number): void; crossesLiteralBoundary(i: number, j: number): boolean; shiftR(pos: number): void; handleAndroidInput(e: Event): void; onInputBlur(e: Event): void; onInputKeydown(e: KeyboardEvent): void; onKeyPress(e: KeyboardEvent): void; clearBuffer(start: number, end: number): void; writeBuffer(): void; checkVal(allow?: boolean): number; onInputFocus(event: Event): void; onInputChange(event: Event): void; handleInputChange(event: Event): void; getUnmaskedValue(): string; updateModel(e: Event): void; focus(): void; clear(): void; /** * @override * * @see {@link BaseEditableHolder.writeControlValue} * Writes the value to the control. */ writeControlValue(val: any, setModelValue: (value: any) => void): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class InputMaskModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; }