rfa
Version:
**React Form Architect** is an ultimate solution for creating and rendering forms in React. Its main focus is to provide users with a tool to define, render and share a form in a browser.
44 lines (43 loc) • 1.59 kB
TypeScript
import { AttributeSchema, AttributeValueType, FormElement, ValidationType, Validators } from '../model';
export declare type AttributeType = {
[key: string]: AttributeValueType;
};
export declare type FormStoredElementType = {
id: string;
name: string;
label: string;
attributeSchema: AttributeSchema[];
attributes: AttributeType;
validations: {
[key: string]: any;
};
validationType: ValidationType;
validators?: Validators[];
render: FormElement['render'];
groupPosition: number;
groupID: GroupType['id'];
isCustomRegistered?: FormElement['isCustomRegistered'];
isReadOnly?: boolean;
};
export declare type GroupType = {
name: string;
id: string;
};
export interface FormSchemaType {
elements: FormStoredElementType[];
grouping: {
groups: GroupType[];
activeGroup: string;
};
}
export declare const defaultGroupID: string;
export declare const initialState: FormSchemaType;
export declare const useStore: import("react-simple-hook-store").UseStoreReturn<FormSchemaType, {
formElementsActions: import("./form-element-actions").IActions;
groupingActions: import("./grouping-actions").GroupingActions;
storeActions: import("./storeActions").StoreGlobalActions;
}>, store: import("react-simple-hook-store").IStore<FormSchemaType, {
formElementsActions: import("./form-element-actions").IActions;
groupingActions: import("./grouping-actions").GroupingActions;
storeActions: import("./storeActions").StoreGlobalActions;
}>;