packages/controls/src/inputs/MaskedInput/MaskedInput.js
function getConvertFunction(type) {
	if (isFunction(type)) return type;
	switch (type) {
		case 'number':
			return str => {
				if (!str || str === '') return 0;
				return parseInt(str, 10);
			};
		case 'string':
		default:
			return str => str;
	}
}
function getConvertFunction(type) {
	if (isFunction(type)) return type;
	switch (type) {
		case 'number':
			return str => {
				if (!str || str === '') return 0;
				return parseInt(str, 10);
			};
		case 'string':
		default:
			return str => str;
	}
}
function getConvertFunction ( type ) { if ( isFunction ( type ) ) return type ; switch ( type ) { case 'number' : return str => { if ( ! str || str === '' ) return 0 ; return parseInt ( str , 10 ) ; } ; case 'string' : default : return str => str ; } }
type Props = { value?: string, onChange?: (data: string) => {}, onBlur?: () => {}, mask?: { placeholder?: string, optionalmarker?: { start: string, end: string, }, quantifiermarker?: { start: string, end: string, }, groupmarker?: { start: string, end: string, }, alternatormarker?: string, escapeChar?: string, mask: string, repeat?: number, greedy?: boolean, autoUnmask?: boolean, removeMaskOnSubmit?: boolean, clearMaskOnLostFocus?: boolean, insertMode?: boolean, clearIncomplete?: boolean, alias?: string, onKeyDown?: (event: any, buffer: any, caretPos: number, opts?: Object) => {}, onBeforeMask?: (initialValue: string, opts?: Object) => string, onBeforePaste?: (pastedValue: string, opts?: Object) => string, onBeforeWrite?: (event: any, buffer: any, caretPos: number, opts?: Object) => Object, onUnMask?: (maskedValue: string, unmaskedValue: string) => string, showMaskOnFocus?: boolean, showMaskOnHover?: boolean, onKeyValidation?: (key: any, result: any) => {}, numericInput?: boolean, rightAlign?: boolean, undoOnEscape?: boolean, radixPoint?: string, groupSeparator?: string, keepStatic?: boolean, positionCaretOnTab?: boolean, tabThrough?: boolean, isComplete?: (buffer: any, opts?: Object) => boolean, canClearPosition?: (maskset: any, position: number, lastValidPosition: number, opts?: Object) => boolean, postValidation?: (buffer: any, currentResult: any, opts?: any) => boolean | Object, preValidation?: (buffer: any, pos: number, char: any, isSelection: boolean, opts?: Object) => boolean | Object, staticDefinitionSymbol?: string, nullable?: boolean, positionCaretOnClick?: string, casing?: string, inputmode?: string, colorMask?: string, } };
type Props = { value? : string onChange? : ( data : string ) = > {} onBlur? : () = > {} mask? : { placeholder? : string optionalmarker? : { start : string end : string } quantifiermarker? : { start : string end : string } groupmarker? : { start : string end : string } alternatormarker? : string escapeChar? : string mask : string repeat? : number greedy? : boolean autoUnmask? : boolean removeMaskOnSubmit? : boolean clearMaskOnLostFocus? : boolean insertMode? : boolean clearIncomplete? : boolean alias? : string onKeyDown? : ( event : any buffer : any caretPos : number opts? : Object ) = > {} onBeforeMask? : ( initialValue : string opts? : Object ) = > string onBeforePaste? : ( pastedValue : string opts? : Object ) = > string onBeforeWrite? : ( event : any buffer : any caretPos : number opts? : Object ) = > Object onUnMask? : ( maskedValue : string unmaskedValue : string ) = > string showMaskOnFocus? : boolean showMaskOnHover? : boolean onKeyValidation? : ( key : any result : any ) = > {} numericInput? : boolean rightAlign? : boolean undoOnEscape? : boolean radixPoint? : string groupSeparator? : string keepStatic? : boolean positionCaretOnTab? : boolean tabThrough? : boolean isComplete? : ( buffer : any opts? : Object ) = > boolean canClearPosition? : ( maskset : any position : number lastValidPosition : number opts? : Object ) = > boolean postValidation? : ( buffer : any currentResult : any opts? : any ) = > boolean | Object preValidation? : ( buffer : any pos : number char : any isSelection : boolean opts? : Object ) = > boolean | Object staticDefinitionSymbol? : string nullable? : boolean positionCaretOnClick? : string casing? : string inputmode? : string colorMask? : string } } ;