UNPKG

react-forminate

Version:

React.js + Typescript package that creates dynamic UI forms based on the JSON schema

17 lines (16 loc) 1.67 kB
import { SupportedTypes, FieldIdType, FormContextType } from '../types'; export declare const useFormValues: (formId?: string) => Record<string, SupportedTypes>; export declare const useFormValue: (fieldId: string, formId?: string) => SupportedTypes; export declare const useFormActions: (formId?: string) => Pick<FormContextType, "setValue" | "validateField" | "validateForm" | "setTouched" | "setBlurred" | "fetchDynamicOptions" | "getFieldSchema" | "shouldShowField" | "observer" | "resetForm">; export declare const useFormErrors: (formId?: string) => Record<string, string>; export declare const useFormError: (fieldId: string, formId?: string) => string; export declare const useFormMeta: (formId?: string) => Pick<FormContextType, "dynamicOptions" | "formSchema" | "formOptions" | "touched" | "blurred">; export declare const useForm: (formId?: string) => FormContextType; export declare const useFormTouched: (formId?: string) => Record<FieldIdType, boolean>; export declare const useFormBlurred: (formId?: string) => Record<FieldIdType, boolean>; export declare const useFormSchema: (formId?: string) => import('../types').FormDataCollectionType; export declare const useFormOptions: (formId?: string) => import('../types').FormOptions | undefined; export declare const useFormDynamicOptions: (formId?: string) => import('../types').FieldDynamicOptionsType; export declare const useFormObserver: (formId?: string) => import('../helpers').Observer; export declare const useFormFieldSchema: (fieldId: string, formId?: string) => import('../types').FormFieldType | null; export declare const useShouldShowField: (fieldId: string, formId?: string) => boolean;