UNPKG

@tomino/dynamic-form-semantic-ui

Version:

Semantic UI form renderer based on dynamic form generation

45 lines (44 loc) 2.48 kB
/// <reference types="react" /> import { JSONSchema, FormElement, PropMap } from '@tomino/dynamic-form'; import { JSONSchema7TypeName } from '@tomino/dynamic-form'; import { Processor } from '../layouts/drag_drop'; import { Prop } from '@tomino/dynamic-form'; import { EditorContextType } from './editor_context'; export { Theme } from './themes/common'; export declare function randomData(_editorState: DynamicForm.EditorContextType): {}; export declare function root(schema: DynamicForm.SchemaDataSet): import("./form_store").SchemaDataSet; export declare function propGroup(groupName: string, props: PropMap): PropMap; declare type PropDefintion = FormElement & JSONSchema & { label?: string; display?: 'inline' | 'fullWidth' | 'group'; }; export declare function tableProp(props: PropDefintion, text: string, extraColumns?: FormElement[]): Prop; export declare function gapProp(propDefinition: PropDefintion): Prop; export declare function boundProp(prop?: PropDefintion, bindingType?: 'ValueSourceHandler' | 'SourceHandler' | 'Handler', valueType?: JSONSchema7TypeName): { control: FormElement; schema: JSONSchema; }; export declare function handlerProp(prop?: PropDefintion): { control: FormElement; schema: JSONSchema; }; export declare function dataProp(prop?: PropDefintion): { control: FormElement; schema: JSONSchema; }; export declare function prop(prop?: PropDefintion): Prop; export declare function arrayProp(label: string, properties?: { [index: string]: any; }, itemType?: JSONSchema7TypeName): { control: FormElement; schema: JSONSchema; }; export declare function generateId(): string; export declare function generateUid(): string; export declare const processor: Processor<DynamicForm.FormDataSet>; export declare function calculatePosition(layout: string, e: React.DragEvent): "top" | "bottom" | "left" | "right"; export declare function calculateHorizontalPosition(e: React.DragEvent): "left" | "right"; export declare function calculateVerticalPosition(e: React.DragEvent): "top" | "bottom"; export declare function createPath(element: FormElement, context: EditorContextType): any; export declare function findSchema(element: FormElement, schema: DynamicForm.SchemaDataSet, context: EditorContextType): import("./form_store").SchemaDataSet; export declare function findParentSchema(element: FormElement, schema: DynamicForm.SchemaDataSet, context: EditorContextType): import("./form_store").SchemaDataSet;