import * as domeleon from 'domeleon'; import { DataBindProps, VAttributes } from 'domeleon'; import { MaskitoOptions, MaskitoPlugin } from '@maskito/core'; import { MaskitoNumberParams } from '@maskito/kit'; /** * Defines functions to convert data between a component's model value (type T) * and the string representation used in an input element, suitable for * consumption by an input masking library. */ interface MaskValueConverter { /** * Converts the model value of type T to an initial string representation. * This string is intended as the base input for a masking library. */ format: (modelValue: T) => string; /** * Converts the string value from the (potentially masked) input element * back to the model type T. */ parse: (inputValue: string, currentModelValue?: T) => T; } type InputMaskProps = DataBindProps & { id?: string; attrs?: VAttributes; maskitoOptions: MaskitoOptions; converter: MaskValueConverter; }; declare function inputMask(props: InputMaskProps): domeleon.VElement; type InputNumberProps = DataBindProps & { attrs?: VAttributes; numberParams?: MaskitoNumberParams; plugins?: MaskitoPlugin[]; }; declare function inputNumber(props: InputNumberProps): domeleon.VElement; export { inputMask, inputNumber }; export type { InputMaskProps, InputNumberProps, MaskValueConverter as MaskStringConverter };