2023-03-01 12:40:56 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* InputMask groups a collection of contents in tabs.
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/inputmask/)
|
|
|
|
*
|
|
|
|
* @module inputmask
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
|
2023-03-01 12:40:56 +00:00
|
|
|
/**
|
|
|
|
* Defines valid properties in InputMask component.
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface InputMaskProps {
|
|
|
|
/**
|
|
|
|
* Value of the component.
|
|
|
|
*/
|
|
|
|
modelValue?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Placeholder character in mask, default is underscore.
|
2023-03-01 12:40:56 +00:00
|
|
|
* @defaultValue _
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
slotChar?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Mask pattern.
|
|
|
|
*/
|
|
|
|
mask?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Clears the incomplete value on blur.
|
2023-03-01 12:40:56 +00:00
|
|
|
* @defaultValue true
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
autoClear?: boolean | undefined;
|
|
|
|
/**
|
|
|
|
* Defines if model sets the raw unmasked value to bound value or the formatted mask value.
|
2023-03-01 12:40:56 +00:00
|
|
|
* @defaultValue false
|
2022-09-06 12:03:37 +00:00
|
|
|
*/
|
|
|
|
unmask?: boolean | undefined;
|
2023-03-01 12:40:56 +00:00
|
|
|
/**
|
|
|
|
* Whether the items are clickable or not.
|
|
|
|
* @defaultValue false
|
|
|
|
*/
|
|
|
|
readonly?: boolean | undefined;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
export interface InputMaskSlots {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 12:40:56 +00:00
|
|
|
/**
|
|
|
|
* Defines valid emits in InputMask component.
|
|
|
|
*/
|
|
|
|
export interface InputMaskEmits {
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Emitted when the value changes.
|
|
|
|
* @param {string} value - New value.
|
|
|
|
*/
|
2023-03-01 12:40:56 +00:00
|
|
|
'update:modelValue'(value: string): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when the component receives focus.
|
|
|
|
*/
|
2023-03-01 12:40:56 +00:00
|
|
|
focus(event: Event): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when the component loses focus.
|
|
|
|
*/
|
2023-03-01 12:40:56 +00:00
|
|
|
blur(event: Event): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when a key is pressed.
|
|
|
|
*/
|
2023-03-01 12:40:56 +00:00
|
|
|
keydown(event: Event): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when a key that produces a character value is pressed down.
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
keypress: (event: Event) => void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when the user has initiated a 'paste' action through the browser's user interface.
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
paste: (event: Event) => void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Callback to invoke when the mask is completed.
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
complete: (event: Event) => void;
|
2023-03-01 12:40:56 +00:00
|
|
|
}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2023-03-01 12:40:56 +00:00
|
|
|
/**
|
|
|
|
* **PrimeVue - InputMask**
|
|
|
|
*
|
|
|
|
* _InputMask groups a collection of contents in tabs._
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/inputmask/)
|
|
|
|
* --- ---
|
|
|
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
|
|
|
|
*
|
|
|
|
* @group Component
|
|
|
|
*
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class InputMask extends ClassComponent<InputMaskProps, InputMaskSlots, InputMaskEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
InputMask: GlobalComponentConstructor<InputMask>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default InputMask;
|