UNPKG

@tomino/dynamic-form-semantic-ui

Version:

Semantic UI form renderer based on dynamic form generation

46 lines (45 loc) 3.08 kB
import { FormComponentCatalogue, EditorComponentCatalogue, JSONSchema, FormElement, DataSet, FormComponentProps, Handlers } from '@tomino/dynamic-form'; import { BoundProp, CommonPropNames } from '@tomino/dynamic-form'; import { ContextType } from './context'; export declare function merge(...catalogues: EditorComponentCatalogue[]): EditorComponentCatalogue; export declare function merge(...catalogues: FormComponentCatalogue[]): FormComponentCatalogue; export declare function schemaDatasetToJS(schema: any, faker?: boolean): JSONSchema; export declare function formDatasetToJS(form: FormElement): any; export declare function simpleHandle<T>(props: FormComponentProps, handleName: string, context: T, args?: any): any; export declare function handle<T, U>(handlers: Handlers<DataSet<T>, U>, handle: string | number | symbol, owner: DataSet<T>, props: FormComponentProps<T>, formElement: FormElement<T>, context: U, args?: any): any; export declare function bindGetValue(props: FormComponentProps, context: ContextType): <C>(element: FormElement<C, any>, propName?: "label" | "css" | "className" | keyof C, defaultValue?: any) => any; export declare function getValues<C>(props: FormComponentProps<C>, ...propNames: (keyof C | CommonPropNames)[]): any[]; export declare function getValue<C>(props: FormComponentProps<C>, context: ContextType, propName?: keyof C | CommonPropNames, defaultValue?: any, path?: string): any; export declare function getPropValue<C>(props: FormComponentProps<C>, formElement: FormElement<C>, context: ContextType, propName?: keyof C | CommonPropNames, defaultValue?: any, path?: string): any; export declare function safeGetValue<C>(props: FormComponentProps<C>, context: any, propName?: keyof C, defaultValue?: any): any; export declare function setValue<C>(props: FormComponentProps<C>, context: any, value: any, propName?: keyof C, path?: string): void; export declare function setPropValue<C>(props: FormComponentProps<C>, owner: DataSet<C>, context: any, value: any, propName?: keyof C, path?: string): void; export declare function prop<C>(formElement: FormElement<C>, propName?: keyof C, type?: 'source' | 'value' | 'handler'): any; export declare function isNullOrEmpty(val: any): boolean; export declare function valueSource<C extends { value: BoundProp; }>(formElement: FormElement<C>): any; export declare function valueHandler<C extends { value: BoundProp; }>(formElement: FormElement<C>): any; export declare function value<C extends { value: BoundProp; }>(formElement: FormElement<C>): any; export declare function clone(dataset: DataSet): any; export declare function parseProps(props: FormComponentProps, context: ContextType): { value: any; label: any; error: string; disabled: boolean; }; export declare function processControl(props: FormComponentProps, createCallback?: boolean): { context: ContextType; owner: DataSet<any>; formElement: FormElement<any, any>; error: string; value: any; disabled: boolean; source: any; handleChange: any; controlProps: any; };