import React from 'react'; import { SyncWaterfallHook, Hook } from 'tapable'; import { Plugin } from '../plugins'; interface UI { Alert: any; Button: any; Form: any; Loading: any; Modal: any; Page: any; Table: any; Layout: any; Checkbox: any; Tabs: any; Panel: any; } export declare type UIType = UI | null; interface FilterMeta { filter: string; } interface RefDataMeta { ref: string; refData?: { [x: string]: { [x: string]: any; }[]; }; } interface DataMeta { data: { [x: string]: any; }[] | string; pageSize?: number; disablePagination?: boolean; } interface FetchMeta { url: string; method?: string; alias?: { [x: string]: string; }; } export interface ActionMeta { label?: string; modal?: string; link?: string; url?: string; href?: string; params?: { [x: string]: any; }; method?: string; confirm?: boolean; confirmLabel?: string; form?: string; rowAction?: string; componentKey?: string; show?: string | boolean; } interface LayoutMeta { direction?: string; width?: string | number; columnsCount?: number; rowColCounts?: number[]; labelPosition?: string; actionsShow?: boolean; disableGroupCol?: boolean; accessories?: PageSection[]; style?: { [x: string]: any; }; submitTitle?: string; clearTitle?: string; actionDirection?: string; clearButtonShow?: boolean; headerBgColor?: string; headerColor?: string; block?: boolean; offset?: number | string; } interface ItemMeta { format?: string; width?: string; size?: string; } export declare type Meta = FilterMeta | FetchMeta | ActionMeta | LayoutMeta | DataMeta | RefDataMeta; export interface TableAction { key: string; meta: ActionMeta; } export interface PageSectionItem { key: string; label: string; id?: boolean; type?: string; meta?: FetchMeta | ItemMeta | ActionMeta; actions?: TableAction[]; editable?: boolean; required?: boolean; reg?: { pattern: string; message: string; }; value?: string; disabled?: boolean; showTime?: boolean; width?: string; placeholder?: string; size?: string; } export interface PageSection { type: string; key: string; alias?: string; actionDisabled?: boolean; items?: (TabItem | PageSectionItem | PageSection)[]; meta?: Meta; } export interface TabItem { key: string; label: string; items: (PageSection)[]; meta?: ActionMeta; default?: boolean; } export interface MenuItem { key: string; label: string; pageJSON?: PageSection[]; index?: boolean; params?: string[]; subPages?: (MenuItem)[]; subs?: MenuItem[]; } export interface MenuGroup { key?: string; label: string; subs: MenuItem[]; } export declare function isMenuGroup(item: MenuItem | MenuGroup): item is MenuGroup; export interface ConfigType { appKey: string; appTitle?: string; menus?: (MenuGroup | MenuItem)[]; pageAPI?: string; loginUrl?: string; logoutBtnCallback?: Function; } export interface AppHooks { renderHeaderActions: Hook; renderSiderTopSection: Hook; renderCustomRoutes: Hook; beforeTablePaginationFinalization: Hook; afterPageLoaded: Hook; afterPageUnloaded: Hook; afterComponentLoaded: Hook; afterComponentUnloaded: Hook; beforeSelectDataFetched: Hook; afterSelectDataFetched: Hook; beforeTableDataSourceFetched: Hook; afterTableDataSourceFetched: Hook; beforeFormItemFinalization: Hook; beforeFormAllItemsFinalization: Hook; beforeTableColumnFinalization: Hook; beforeTableAllColumnsFinalization: Hook; beforeButtonClick: Hook; beforeFormSubmit: Hook; beforeCheckboxChange: Hook; afterTableCellChanged: Hook; onTabChange: Hook; beforeTableRender: Hook; beforePanelFetch: Hook; getNewIPaneltems: SyncWaterfallHook; } interface AppType { ui: UIType; config: ConfigType; hooks: AppHooks; } export declare const App: React.Context; interface IProps { ui: UIType; config: ConfigType; plugins: Plugin[]; debugHooks?: string[]; children: React.ReactNode; } export declare function AppProvider(props: IProps): JSX.Element; export {};