import React, { ComponentType, Dispatch, ReducerAction } from 'react'; import { ControlElement, JsonFormsRendererRegistryEntry, JsonSchema, JsonFormsCellRendererRegistryEntry, JsonFormsUISchemaRegistryEntry } from '@json-forms/core'; interface OwnPropsOfExpandPanel { index: number; path: string; uischema: ControlElement; schema: JsonSchema; expanded: boolean; renderers?: JsonFormsRendererRegistryEntry[]; cells?: JsonFormsCellRendererRegistryEntry[]; uischemas?: JsonFormsUISchemaRegistryEntry[]; rootSchema: JsonSchema; enableMoveUp: boolean; enableMoveDown: boolean; config: any; childLabelProp?: string; handleExpansion(panel: string): (event: any, expanded: boolean) => void; } interface StatePropsOfExpandPanel extends OwnPropsOfExpandPanel { childLabel: string; childPath: string; enableMoveUp: boolean; enableMoveDown: boolean; } /** * Dispatch props of a table control */ export interface DispatchPropsOfExpandPanel { removeItems(path: string, toDelete: number[]): (event: any) => void; moveUp(path: string, toMove: number): (event: any) => void; moveDown(path: string, toMove: number): (event: any) => void; } export interface ExpandPanelProps extends StatePropsOfExpandPanel, DispatchPropsOfExpandPanel { } /** * Maps state to dispatch properties of an expand pandel control. * * @param dispatch the store's dispatch method * @returns {DispatchPropsOfArrayControl} dispatch props of an expand panel control */ export declare const ctxDispatchToExpandPanelProps: (dispatch: Dispatch>) => DispatchPropsOfExpandPanel; /** * Map state to control props. * @param state the JSON Forms state * @param ownProps any own props * @returns {StatePropsOfControl} state props for a control */ export declare const withContextToExpandPanelProps: (Component: ComponentType) => ComponentType; export declare const withJsonFormsExpandPanelProps: (Component: ComponentType) => ComponentType; declare const _default: React.ComponentType; export default _default;