UNPKG

@canard/schema-form

Version:

React-based component library that renders forms based on JSON Schema with plugin system support for validators and UI components

27 lines (26 loc) 1.39 kB
import type { ComponentType } from 'react'; import { type NormalizedFormTypeInputDefinition } from '../../helpers/formTypeInputDefinition'; import type { FormTypeInputDefinition, FormTypeRendererProps, FormatError } from '../../types'; import type { ValidatorPlugin } from './type'; interface RenderKit { FormGroup: ComponentType<FormTypeRendererProps>; FormLabel: ComponentType<FormTypeRendererProps>; FormInput: ComponentType<FormTypeRendererProps>; FormError: ComponentType<FormTypeRendererProps>; } export declare class PluginManager { #private; static get FormGroup(): ComponentType<FormTypeRendererProps>; static get FormLabel(): ComponentType<FormTypeRendererProps>; static get FormInput(): ComponentType<FormTypeRendererProps>; static get FormError(): ComponentType<FormTypeRendererProps>; static get formatError(): FormatError; static get formTypeInputDefinitions(): NormalizedFormTypeInputDefinition[]; static get validator(): ValidatorPlugin | undefined; static reset(): void; static appendRenderKit(renderKit: Partial<RenderKit> | undefined): void; static appendFormTypeInputDefinitions(formTypeInputDefinitions: FormTypeInputDefinition[] | undefined): void; static appendValidator(validator: ValidatorPlugin | undefined): void; static appendFormatError(formatError: FormatError | undefined): void; } export {};