import React, { FunctionComponent, ReactElement } from 'react'; /** * Public API Types * * These types are exported from the package and are part of the public API. * They can be imported by users of the library for type safety when creating * custom form inputs, mods, and integrating with the FormBuilder. */ type DataType = 'string' | 'number' | 'boolean' | 'integer' | 'array' | 'object' | 'null'; type JsonSchemaProperty = { type?: DataType; title?: string; description?: string; default?: string | number | boolean | null; enum?: (string | number)[]; enumNames?: string[]; format?: string; pattern?: string; minLength?: number; maxLength?: number; minimum?: number; maximum?: number; exclusiveMinimum?: number; exclusiveMaximum?: number; multipleOf?: number; minItems?: number; maxItems?: number; items?: JsonSchemaProperty | { [key: string]: unknown; }; properties?: { [key: string]: JsonSchemaProperty; }; required?: string[]; dependencies?: { [key: string]: { properties?: { [key: string]: JsonSchemaProperty; }; required?: string[]; oneOf?: Array<{ properties: { [key: string]: JsonSchemaProperty; }; required?: string[]; }>; }; }; $ref?: string; additionalProperties?: boolean | JsonSchemaProperty; $id?: string; $schema?: string; meta?: Record; }; type JsonSchema = JsonSchemaProperty & { type: 'object'; properties?: Record; definitions?: Record; }; type UiSchemaProperty = { 'ui:order'?: string[]; 'ui:widget'?: string; 'ui:field'?: string; 'ui:options'?: { [key: string]: unknown; }; 'ui:autofocus'?: boolean; 'ui:autocomplete'?: string; 'ui:placeholder'?: string; 'ui:column'?: string; items?: UiSchemaProperty | Record; definitions?: Record; [key: string]: unknown; }; type UiSchema = UiSchemaProperty & { 'ui:order'?: string[]; definitions?: Record; [key: string]: UiSchemaProperty | string[] | unknown; }; type Match = { types: Array; widget?: string; field?: string; format?: string; $ref?: boolean; enum?: boolean; }; type CardComponentProps = { name: string; required?: boolean; hideKey?: boolean; definitionData?: Record; definitionUi?: Record; neighborNames?: string[]; dependents?: { children: string[]; value?: unknown; }[]; dependent?: boolean; parent?: string; 'ui:options'?: Record; category?: string; schema?: Record; type?: string; 'ui:column'?: string; minLength?: number; maxLength?: number; pattern?: string; 'ui:autofocus'?: boolean; 'ui:placeholder'?: string; minItems?: number; maxItems?: number; title?: string; $ref?: string; format?: string; 'ui:autocomplete'?: string; default?: string | number | boolean; items?: Record; 'ui:*items'?: Record; multipleOf?: number | null; minimum?: number | null; exclusiveMinimum?: number | null; maximum?: number | null; exclusiveMaximum?: number | null; enum?: (number | string)[]; enumNames?: string[] | null; description?: string; }; type CardComponent = FunctionComponent<{ parameters: CardComponentProps; onChange: (newParams: CardComponentProps) => void; mods?: Mods; }>; /** @deprecated Use `CardComponentProps` instead */ type CardComponentPropsType = CardComponentProps; /** @deprecated Use `CardComponent` instead */ type CardComponentType = CardComponent; type FormInput = { displayName: string; matchIf: Array; possibleOptions?: Array; defaultDataSchema: JsonSchemaProperty | Record; defaultUiSchema: UiSchemaProperty | Record; type: DataType; cardBody: CardComponent; modalBody?: CardComponent; }; type ModLabels = { formNameLabel?: string; formDescriptionLabel?: string; objectNameLabel?: string; displayNameLabel?: string; descriptionLabel?: string; inputTypeLabel?: string; addElementLabel?: string; addSectionLabel?: string; }; type DataOptions = { title: string; type?: string; description?: string; $ref?: string; default?: string | number; }; type DefinitionData = { [key: string]: { 'ui:order'?: string[]; }; }; type AddFormObjectParameters = { schema: JsonSchema | Record; uischema: UiSchema | Record; mods?: Mods; onChange: (schema: JsonSchema | Record, uischema: UiSchema | Record) => unknown; definitionData: DefinitionData; definitionUi: Record; index?: number; categoryHash: Record; }; type Mods = { customFormInputs?: Record; components?: { add?: (properties?: AddFormObjectParameters) => ReactElement | ReactElement[] | []; }; tooltipDescriptions?: { add?: string; cardObjectName?: string; cardDisplayName?: string; cardDescription?: string; cardInputType?: string; cardSectionObjectName?: string; cardSectionDisplayName?: string; cardSectionDescription?: string; }; labels?: ModLabels; showFormHead?: boolean; deactivatedFormInputs?: Array; newElementDefaultDataOptions?: DataOptions; newElementDefaultUiSchema?: UiSchemaProperty | Record; }; type InitParameters = { categoryHash?: Record; }; declare function FormBuilder({ schema, uischema, onMount, onChange, mods, className, }: { schema: string; uischema: string; onMount?: (parameters: InitParameters) => any; onChange: (schema: string, uischema: string) => any; mods?: Mods; className?: string; }): ReactElement; declare const _default$1: React.MemoExoticComponent; declare function PredefinedGallery({ schema, uischema, onChange, mods, className, }: { schema: string; uischema: string; onChange: (schema: string, uischema: string) => any; mods?: Mods; className?: string; }): ReactElement; declare const _default: React.MemoExoticComponent; declare function addCardObj(parameters: AddFormObjectParameters): void; declare function addSectionObj(parameters: AddFormObjectParameters): void; export { type AddFormObjectParameters, type CardComponent, type CardComponentProps, type CardComponentPropsType, type CardComponentType, type DataOptions, type DataType, type DefinitionData, _default$1 as FormBuilder, type FormInput, type InitParameters, type JsonSchema, type JsonSchemaProperty, type Match, type ModLabels, type Mods, _default as PredefinedGallery, type UiSchema, type UiSchemaProperty, addCardObj, addSectionObj };