import { ArrayTranslations, CellProps, ControlProps, JsonSchema, UISchemaElement } from '@jsonforms/core'; import { ReactNode, SyntheticEvent } from 'react'; type UISchemaOptions = NonNullable; export type MantineInputProps = ControlProps | CellProps; export type JsonFormsDataValue = ControlProps['data']; /** Argument `useContextProps` passes to a theme entry's `component` / `props` factory. */ export type ContextResolveArg = { componentProps: Record; jsonFormsProps: TJsonForms; }; /** A theme entry's custom component: a node, or a factory resolving to one. */ export type ContextComponentSource = ReactNode | ((arg: ContextResolveArg) => ReactNode); /** A theme entry's props bag: a record, or a factory resolving to one. */ export type ContextPropsSource = Record | ((arg: ContextResolveArg) => Record); /** A `MantineThemeProvider` `theme.components[*]` entry consumed by `useContextProps`. */ export interface ContextThemeEntry { component?: ContextComponentSource; props?: ContextPropsSource; } export interface CommonInputThemeOverrides { debounce?: boolean; debounceOptions?: { delay?: number; flushOnUnmount?: boolean; }; setNull?: boolean; } export interface IfElseSchema { /** The condition to evaluate against the data. */ if: JsonSchema; /** The properties to return if the condition is true. */ then?: { [channel: string]: UISchemaOptions; }; /** The properties to return if the condition is false. */ else?: { [channel: string]: UISchemaOptions; }; } export interface UseNavigationComponentProps { componentName: string; componentIdentifier: string; onUp: (event: SyntheticEvent) => void; onDown: (event: SyntheticEvent) => void; onDelete: (event: SyntheticEvent) => void; childPath: string; showSortButtons?: boolean; enableUp?: boolean; enableDown?: boolean; disableRemove?: boolean; translations?: ArrayTranslations; } export interface UseToolbarComponentProps { componentName: string; componentIdentifier: string; onAdd: () => void; errors?: string; label?: string; description?: string; path: string; translations?: ArrayTranslations; } export interface UseDatePropsResult { clearable: boolean; valueFormat?: string; value?: string | null; onChange?: (value: string | null) => void; placeholder?: string; rightSection?: ReactNode; } export {};