UNPKG

react-forminate

Version:

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

11 lines (10 loc) 930 B
import { BaseField, FieldIdType, FieldPropFunction, FieldPropValue, FormDataCollectionType, FormFieldType, ProcessedFieldProps, SupportedTypes } from '../types'; export declare function flattenSchema(fields: FormFieldType[]): { fieldIds: FieldIdType[]; fields: FormFieldType[]; }; export declare const processFieldProps: <T extends BaseField>(fieldProps: FormFieldType & T, fieldId: FieldIdType, values: Record<string, SupportedTypes> | undefined, formSchema: FormDataCollectionType) => ProcessedFieldProps<T>; export declare const getLegacyDependencies: (prop: unknown) => string[]; export declare const getFieldDependencies: (field: FormFieldType) => FieldIdType[]; export declare const convertLegacyFieldToNew: <T>(prop: FieldPropFunction<T>) => FieldPropValue<T> | null; export declare const collectFieldDependencies: (formFields: FormFieldType[], parentMap?: Record<string, Set<string>>) => Record<string, string[]>;