UNPKG

@altiore/form

Version:

Form helper for building powerful forms

21 lines (20 loc) 1.21 kB
import { MutableRefObject } from 'react'; import { FieldType, InputType } from './types'; export declare const getNodeByName: <T>(name: string, formRef?: MutableRefObject<HTMLFormElement>) => MutableRefObject<T>; export declare const getValueByNodeName: (name: string, formRef?: MutableRefObject<HTMLFormElement>) => any; export declare const parseValueByType: Map<FieldType, (a: any) => any>; export declare const inputTypeByType: Map<FieldType, InputType>; export declare const prepDefDefault: (v: any) => any; export declare const prepDefValue: Map<FieldType, (v: any) => string>; export declare const getInputTypeByFieldType: (fieldType: FieldType) => InputType; export declare const formatPhone: (phoneNumberString: string) => string | null; export declare const formatValueByType: Map<FieldType, (phoneNumberString: string) => string | null>; export declare const PassWarn: { minLength: string; lowerRequired: string; digitRequired: string; upperRequired: string; specRequired: string; }; export declare const warningsByType: Map<FieldType, (value: string) => string[]>; export declare const getValueByTypeAndTarget: (fieldType: FieldType, target: EventTarget | HTMLElement) => any;