import React from 'react'; import { ComponentPluginType } from '@ui-schema/ui-schema/PluginStack/Plugin'; import { StoreSchemaType } from '@ui-schema/ui-schema/CommonTypings'; import { WidgetType } from '@ui-schema/ui-schema/Widget'; import { WidgetRendererProps } from '@ui-schema/ui-schema/WidgetRenderer'; import { PluginSimple } from '@ui-schema/ui-schema/PluginSimpleStack/PluginSimple'; import { StoreKeys } from '@ui-schema/ui-schema/UIStore'; import { List } from 'immutable'; export interface GroupRendererProps { storeKeys: StoreKeys; schemaKeys?: StoreKeys; level: number; schema: StoreSchemaType; noGrid?: boolean; style?: {}; className?: string; spacing?: number; children?: React.ReactNode; } export interface ErrorFallbackProps { error: any | null; storeKeys: StoreKeys; type?: string | List; widget?: string; } export interface WidgetsBindingComponents { ErrorFallback?: React.ComponentType; /** * wraps the whole generator * @deprecated use the new `injectPluginStack` with a `GridContainer` [migration notes](https://ui-schema.bemit.codes/updates/v0.3.0-v0.4.0#deprecations) */ RootRenderer?: React.ComponentType; GroupRenderer: React.ComponentType; /** * final widget matching and rendering */ WidgetRenderer: React.ComponentType; pluginStack: ComponentPluginType[]; pluginSimpleStack: PluginSimple[]; } export interface WidgetsBindingWidgets { types: TW; custom: CW; } /** * widget binding * - `C` = own `UIMetaContext` definition * - `TW` = own type widgets definition * - `CW` = own custom widgets definition */ export type WidgetsBindingFactory = WidgetsBindingComponents & W & WidgetsBindingWidgets; export type WidgetsBindingLooseComponents = { [key: string]: WidgetType; };