react-forminate
Version:
React.js + Typescript package that creates dynamic UI forms based on the JSON schema
11 lines (10 loc) • 1.09 kB
TypeScript
import { FieldPropFunctionReturnParams, FieldPropValue, FieldTypes, FormDataCollectionType, FormFieldType, SelectFieldType, SupportedTypes } from '../types';
export declare const fallbackValue: {
[key: string]: unknown;
};
export declare function isSelectField(field: FormFieldType): field is SelectFieldType;
export declare function getValidJSXProps<K extends keyof HTMLElementTagNameMap>(tagName: K, props: Record<string, any>, excludeKeys?: string[]): Partial<Record<string, any>>;
export declare const getPropValue: <P>(prop: FieldPropValue<P>, functionParams: FieldPropFunctionReturnParams, defaultValue?: P) => P;
export declare const findFieldById: (fieldId: string, fields?: FormFieldType[], values?: Record<string, SupportedTypes>, formSchema?: FormDataCollectionType) => FormFieldType | null;
export declare const findProcessedFieldById: (fieldId: string, fields?: FormFieldType[], values?: Record<string, SupportedTypes>, formSchema?: FormDataCollectionType) => FormFieldType | null;
export declare const extractFieldTypes: (formSchema: FormDataCollectionType) => FieldTypes[];