UNPKG

@tomino/dynamic-form-semantic-ui

Version:

Semantic UI form renderer based on dynamic form generation

63 lines (62 loc) 2.63 kB
/// <reference types="react" /> import { DataSet, FormElement, FormComponentProps } from '@tomino/dynamic-form'; import { BoundProp } from '@tomino/dynamic-form'; import { ContextType } from './context'; export { css } from 'emotion'; export { Theme } from './editor/themes/common'; export { default as names } from 'classnames'; export { Context } from './context'; export { handle, getValue, isNullOrEmpty, prop, processControl, valueSource } from './helpers'; export { DynamicComponent as DynamicControl, paintProps } from './wrapper'; export declare const select: string; export declare const fieldSet: string; export declare const breakingLabel: string; export declare const nonBreakingLabel: string; export declare const fullWidth: string; export declare const noPadding: string; export declare const marginLess: string; export declare const pointer: string; export declare type SignatureType = { comment: string; signature: string; verifiedState: 'Pending' | 'Verified' | 'Rejected'; rejected?: boolean; uid: string; name: string; date: Date; setValue?(name: string, value: any): any; }; export declare type SignatureHandlers = { validateForm(): boolean; verifySignature(owner: any, args: { uid: string; signature: string; }): Promise<string>; sign(owner: DataSet, args: { source: string; reject: boolean; password: string; reason: string; submit: boolean; }): Promise<SignatureType>; signatureFont(): string; }; export declare type FormEditorProps = { formElement: DynamicForm.FormDataSet; formData: DataSet; handlers?: { [index: string]: any; }; readOnly: boolean; }; export declare function parseFromOwner(str: string, owner: DataSet): any; export declare function sourceValue(prop: BoundProp): string; export declare function handlerValue(prop: BoundProp): string; export declare function root(formElement: FormElement): FormElement<any, any>; export declare function cleanProps(props: any): any; export declare function tryInterpolate(text: string, owner: DataSet): any; export declare function useMergeState<T>(initialState: T): [T, (t: Partial<T>) => void]; export declare function createComponents(props: FormComponentProps, className?: string): JSX.Element[]; export declare function createComponent1(props: FormComponentProps, formElement: FormElement, context: ContextType, className?: string, extraProps?: any): JSX.Element; export declare function toJS<T>(obj: T): T; export declare function addProviders(mainForm: FormElement, form: FormElement): FormElement<any, any>;