104 lines
2.6 KiB
TypeScript
104 lines
2.6 KiB
TypeScript
|
/**
|
||
|
*
|
||
|
* InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone.
|
||
|
*
|
||
|
* [Live Demo](https://www.primevue.org/inputmask/)
|
||
|
*
|
||
|
* @module inputmask
|
||
|
*
|
||
|
*/
|
||
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||
|
|
||
|
/**
|
||
|
* Defines valid properties in InputMask component.
|
||
|
*/
|
||
|
export interface InputMaskProps {
|
||
|
/**
|
||
|
* Value of the component.
|
||
|
*/
|
||
|
modelValue?: string | undefined;
|
||
|
/**
|
||
|
* Placeholder character in mask, default is underscore.
|
||
|
* @defaultValue _
|
||
|
*/
|
||
|
slotChar?: string | undefined;
|
||
|
/**
|
||
|
* Mask pattern.
|
||
|
*/
|
||
|
mask?: string | undefined;
|
||
|
/**
|
||
|
* Clears the incomplete value on blur.
|
||
|
* @defaultValue true
|
||
|
*/
|
||
|
autoClear?: boolean | undefined;
|
||
|
/**
|
||
|
* Defines if model sets the raw unmasked value to bound value or the formatted mask value.
|
||
|
* @defaultValue false
|
||
|
*/
|
||
|
unmask?: boolean | undefined;
|
||
|
/**
|
||
|
* Whether the items are clickable or not.
|
||
|
* @defaultValue false
|
||
|
*/
|
||
|
readonly?: boolean | undefined;
|
||
|
}
|
||
|
|
||
|
export interface InputMaskSlots {}
|
||
|
|
||
|
/**
|
||
|
* Defines valid emits in InputMask component.
|
||
|
*/
|
||
|
export interface InputMaskEmits {
|
||
|
/**
|
||
|
* Emitted when the value changes.
|
||
|
* @param {string} value - New value.
|
||
|
*/
|
||
|
'update:modelValue'(value: string): void;
|
||
|
/**
|
||
|
* Callback to invoke when the component receives focus.
|
||
|
*/
|
||
|
focus(event: Event): void;
|
||
|
/**
|
||
|
* Callback to invoke when the component loses focus.
|
||
|
*/
|
||
|
blur(event: Event): void;
|
||
|
/**
|
||
|
* Callback to invoke when a key is pressed.
|
||
|
*/
|
||
|
keydown(event: Event): void;
|
||
|
/**
|
||
|
* Callback to invoke when a key that produces a character value is pressed down.
|
||
|
*/
|
||
|
keypress: (event: Event) => void;
|
||
|
/**
|
||
|
* Callback to invoke when the user has initiated a 'paste' action through the browser's user interface.
|
||
|
*/
|
||
|
paste: (event: Event) => void;
|
||
|
/**
|
||
|
* Callback to invoke when the mask is completed.
|
||
|
*/
|
||
|
complete: (event: Event) => void;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* **PrimeVue - InputMask**
|
||
|
*
|
||
|
* _InputMask component is used to enter input in a certain format such as numeric, date, currency, email and phone._
|
||
|
*
|
||
|
* [Live Demo](https://www.primevue.org/inputmask/)
|
||
|
* --- ---
|
||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
||
|
*
|
||
|
* @group Component
|
||
|
*
|
||
|
*/
|
||
|
declare class InputMask extends ClassComponent<InputMaskProps, InputMaskSlots, InputMaskEmits> {}
|
||
|
|
||
|
declare module '@vue/runtime-core' {
|
||
|
interface GlobalComponents {
|
||
|
InputMask: GlobalComponentConstructor<InputMask>;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default InputMask;
|