import { ControlElement, Dispatch, Layout, JsonFormsSubStates, JsonSchema, UISchemaElement, CoreActions, JsonFormsState, OwnPropsOfMasterListItem, mapStateToArrayControlProps, mapDispatchToArrayControlProps, JsonFormsRendererRegistryEntry, JsonFormsCellRendererRegistryEntry, LabelElement, Scopable, Translator } from '@jsonforms/core'; import type Ajv from 'ajv'; import { PropType, ComputedRef } from 'vue'; /** * Constructs a props declaration for Vue components which can be used * for registered renderers and cells. These are typically used in combination * with one of the provided bindings, e.g. 'useJsonFormsControl'. * * Use the generic type parameter when using a specialized binding, e.g. * `rendererProps()` in combination with `useJsonFormsLayout` or * `rendererProps()` in combination with `useJsonFormsControl`. */ export declare const rendererProps: () => { schema: { required: true; type: PropType; }; uischema: { required: true; type: PropType; }; path: { required: true; type: StringConstructor; }; enabled: { required: false; type: BooleanConstructor; default: undefined; }; readonly: { required: false; type: BooleanConstructor; default: undefined; }; renderers: { required: boolean; type: PropType; default: undefined; }; cells: { required: boolean; type: PropType; default: undefined; }; config: { required: boolean; type: ObjectConstructor; default: undefined; }; }; /** * Constructs a props declaration for Vue components which shall be used as * master list items. */ export declare const masterListItemProps: () => { index: { required: true; type: NumberConstructor; }; selected: { required: true; type: BooleanConstructor; }; path: { required: true; type: StringConstructor; }; schema: { required: true; type: PropType; }; handleSelect: { required: false; type: PropType<(index: number) => void>; default: undefined; }; removeItem: { required: false; type: PropType<(path: string, value: number) => void>; default: undefined; }; }; export interface RendererProps { schema: JsonSchema; uischema: U; path: string; enabled?: boolean; readonly?: boolean; renderers?: JsonFormsRendererRegistryEntry[]; cells?: JsonFormsCellRendererRegistryEntry[]; config?: any; } export interface ControlProps extends RendererProps { uischema: ControlElement; } export type Required = T extends object ? { [P in keyof T]-?: NonNullable; } : T; export declare function useControl(props: P, stateMap: (state: JsonFormsState, props: P) => R): { control: ComputedRef>; }; export declare function useControl(props: P, stateMap: (state: JsonFormsState, props: P) => R, dispatchMap: (dispatch: Dispatch) => D): { control: ComputedRef>; } & D; /** * Provides generic bindings for 'Control' elements. * Should be used when no specialized bindings are appropriate. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable; id: string; visible: boolean; }>; } & import("@jsonforms/core").DispatchPropsOfControl; /** * Provides bindings for 'Control' elements which can provide a 'detail', * for example array and object renderers. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsControlWithDetail: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; uischemas: import("@jsonforms/core").JsonFormsUISchemaRegistryEntry[]; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable; id: string; visible: boolean; }>; } & import("@jsonforms/core").DispatchPropsOfControl; /** * Provides bindings for 'Control' elements which resolve to 'enum' schema elements. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsEnumControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable; id: string; visible: boolean; options: import("@jsonforms/core").EnumOption[]; }>; } & import("@jsonforms/core").DispatchPropsOfControl; /** * Provides bindings for 'Control' elements which resolve to manually constructed * 'oneOf' enums. These are used to enhance enums with label support. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsOneOfEnumControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable; id: string; visible: boolean; options: import("@jsonforms/core").EnumOption[]; }>; } & import("@jsonforms/core").DispatchPropsOfControl; type UseJsonFormsArrayControlReturnType = { control: ComputedRef>>; } & ReturnType; /** * Provides bindings for 'Control' elements which resolve to 'array' schema elements. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsArrayControl: (props: ControlProps) => UseJsonFormsArrayControlReturnType; /** * Provides bindings for 'Control' elements which resolve to 'allOf' schema elements. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsAllOfControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; rootSchema: NonNullable; id: string; indexOfFittingSchema: number; uischemas: import("@jsonforms/core").JsonFormsUISchemaRegistryEntry[]; data: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; visible: boolean; }>; } & import("@jsonforms/core").DispatchPropsOfControl; /** * Provides bindings for 'Control' elements which resolve to 'anyOf' schema elements. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsAnyOfControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; rootSchema: NonNullable; id: string; indexOfFittingSchema: number; uischemas: import("@jsonforms/core").JsonFormsUISchemaRegistryEntry[]; data: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; visible: boolean; }>; } & import("@jsonforms/core").DispatchPropsOfControl; /** * Provides bindings for 'Control' elements which resolve to 'oneOf' schema elements. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsOneOfControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; rootSchema: NonNullable; id: string; indexOfFittingSchema: number; uischemas: import("@jsonforms/core").JsonFormsUISchemaRegistryEntry[]; data: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; visible: boolean; }>; } & import("@jsonforms/core").DispatchPropsOfControl; /** * Provides bindings for 'Control' elements which resolve to multiple choice enums. * * Access bindings via the provided reactive `control` object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsMultiEnumControl: (props: ControlProps) => { control: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[] & { tester: import("@jsonforms/core").RankedTester; cell: any; }[]; config: any; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable; id: string; visible: boolean; options: import("@jsonforms/core").EnumOption[]; }>; } & import("@jsonforms/core").DispatchPropsOfMultiEnumControl; export interface LayoutProps extends RendererProps { uischema: Layout; } /** * Provides bindings for 'Layout' elements, e.g. VerticalLayout, HorizontalLayout, Group. * * Access bindings via the provided reactive 'layout' object. */ export declare const useJsonFormsLayout: (props: LayoutProps) => { layout: ComputedRef<{ uischema: NonNullable; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; direction: NonNullable<"row" | "column">; label: string; data: any; visible: boolean; }>; }; /** * Provides bindings for 'Control' elements which resolve to 'array' elements which * shall be rendered as a layout instead of a control. * * Access bindings via the provided reactive 'layout' object. */ export declare const useJsonFormsArrayLayout: (props: ControlProps) => { layout: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; data: number; arraySchema: NonNullable; minItems: number; disableRemove: NonNullable; disableAdd: NonNullable; uischemas: import("@jsonforms/core").JsonFormsUISchemaRegistryEntry[]; label: string; description: string; required: NonNullable; i18nKeyPrefix: string; errors: string; rootSchema: NonNullable; id: string; visible: boolean; }>; }; /** * Provides bindings for list elements of a master-list-detail control setup. * The element using this binding is not supposed to be registered as an own renderer * but used in a more specialized control. * * Access bindings via the provided reactive 'item' object. */ export declare const useJsonFormsMasterListItem: (props: OwnPropsOfMasterListItem) => { item: ComputedRef<{ index: number; selected: boolean; path: string; enabled: boolean; schema: NonNullable; uischema: NonNullable; childLabelProp: string; handleSelect: (index: number) => () => void; removeItem: (path: string, value: number) => () => void; translations: import("@jsonforms/core").ArrayTranslations; disableRemove: NonNullable; }>; }; /** * Provides specialized bindings which can be used for any renderer. * Useful for meta elements like dispatchers. * * Access bindings via the provided reactive 'renderer' object. */ export declare const useJsonFormsRenderer: (props: RendererProps) => { renderer: ComputedRef<{ config: any; uischema: NonNullable; schema: NonNullable; enabled: NonNullable; readonly: NonNullable; visible: NonNullable; path: string; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; uischemas: import("@jsonforms/core").JsonFormsUISchemaRegistryEntry[]; }>; rootSchema: ComputedRef>; }; /** * Provides bindings for 'Label' elements. * * Access bindings via the provided reactive `label` object. */ export declare const useJsonFormsLabel: (props: RendererProps) => { label: ComputedRef<{ schema: NonNullable; uischema: LabelElement; path: string; enabled: NonNullable; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; text: string; visible: boolean; }>; }; /** * Provides bindings for cell elements. Cells are meant to show simple inputs, * for example without error validation, within a larger structure like tables. * * Access bindings via the provided reactive 'cell' object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsCell: (props: ControlProps) => { handleChange(path: string, value: any): void; cell: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; isValid: boolean; rootSchema: NonNullable; errors: string; data: any; id: string; visible: boolean; }>; }; /** * Provides bindings for enum cell elements. Cells are meant to show simple inputs, * for example without error validation, within a larger structure like tables. * * Access bindings via the provided reactive 'cell' object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsEnumCell: (props: ControlProps) => { handleChange(path: string, value: any): void; cell: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; isValid: boolean; rootSchema: NonNullable; errors: string; data: any; id: string; visible: boolean; options: import("@jsonforms/core").EnumOption[]; }>; }; /** * Provides bindings for 'oneOf' enum cell elements. Cells are meant to show simple inputs, * for example without error validation, within a larger structure like tables. * * Access bindings via the provided reactive 'cell' object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsOneOfEnumCell: (props: ControlProps) => { handleChange(path: string, value: any): void; cell: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; isValid: boolean; rootSchema: NonNullable; errors: string; data: any; id: string; visible: boolean; options: import("@jsonforms/core").EnumOption[]; }>; }; /** * Provides bindings for a cell dispatcher. Cells are meant to show simple inputs, * for example without error validation, within a larger structure like tables. * * Access bindings via the provided reactive 'cell' object. * Dispatch changes via the provided `handleChange` method. */ export declare const useJsonFormsDispatchCell: (props: ControlProps) => { handleChange(path: string, value: any): void; cell: ComputedRef<{ uischema: ControlElement; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; isValid: boolean; rootSchema: NonNullable; errors: string; data: any; id: string; visible: boolean; }>; }; /** * Provides bindings for 'Categorization' elements. * * Access bindings via the provided `categories` array with reactive category objects. */ export declare const useJsonFormsCategorization: (props: LayoutProps) => { layout: ComputedRef<{ uischema: NonNullable; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; direction: NonNullable<"row" | "column">; label: string; data: any; visible: boolean; }>; categories: ComputedRef<{ uischema: NonNullable; schema: NonNullable; path: string; enabled: boolean; readonly: NonNullable; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; direction: NonNullable<"row" | "column">; label: string; data: any; visible: boolean; }>[]; }; /** * Provides access to the JsonForms sub state. * * @returns The JsonForms sub state. */ export declare function useJsonForms(): JsonFormsSubStates; export declare function useJsonForms(optional: true): JsonFormsSubStates | undefined; /** * Provides access to the JsonForms dispatch function. * * @returns The JsonForms dispatch function. */ export declare function useDispatch(): Dispatch; export declare function useDispatch(optional: true): Dispatch | undefined; /** * Provides access to the JsonForms translator function. * @returns The JsonForms translator function. */ export declare function useTranslator(): ComputedRef; export declare function useTranslator(optional: true): ComputedRef | undefined; /** * Extracts Ajv from JSON Forms */ export declare function useAjv(): Ajv; export declare function useAjv(optional: true): Ajv | undefined; export {};