import { IBlockType, IStoreData } from '../core/store/storetype'; import { ReactNode } from 'react'; import { ComponentItemFactory } from '../core/components/abstract'; import { CommanderItem } from '../core/command/commanderType'; import { LeftRegistComponentMapItem } from '../core/crossDrag'; import { FunctionCenterType } from '../core/functionCenter'; import { EventCenter } from '../core/eventCenter'; import { DataCenter } from '../core/dataCenter'; import { CommanderItemFactory } from '../core/command/abstract'; /** * * @urlFn 组件异步加载函数 * @component 组件默认导出 * @export * @interface CacheComponentValueType */ export interface CacheComponentValueType { urlFn?: () => Promise; component?: ComponentItemFactory; } export declare type CacheComponentType = Record | {}; export declare type AsyncCacheComponentType = Record Promise>; /** * * * @export 左侧的图标 custom 自定义渲染 * @interface LeftMapRenderListPropsItemCategory */ export interface LeftMapRenderListPropsItemCategory { type: string; icon: ReactNode; custom?: boolean; customRender?: ReactNode; displayName?: string; } /** * * * @export 右侧的图标配置 * @interface RightMapRenderListPropsItemCategory */ export interface RightMapRenderListPropsItemCategory { type: string; icon: ReactNode; custom?: boolean; customRender?: (type: string, current: IBlockType) => ReactNode; } export interface InitConfig { /** * 初始化store * @type {IStoreData[]} * @memberof InitConfig */ initStoreData: IStoreData[]; /** * 左边tab页组件渲染包括异步路径 { type: 'basic', component: 'button', img: 'http://xxxx/1.jpg' ,url:'' }, * @memberof InitConfig */ leftAllRegistMap: LeftRegistComponentMapItem[]; /** * 左边tab页图标配置 * type icon custom customRender * @memberof InitConfig */ leftRenderListCategory: LeftMapRenderListPropsItemCategory[]; /** * 右边tab页图标配置 * type icon custom customRender * @memberof InitConfig */ rightRenderListCategory: RightMapRenderListPropsItemCategory[]; /** * * 右侧全局自定义 * @type {ReactNode} * @memberof InitConfig */ rightGlobalCustom: ReactNode; /** * 组件加载缓存判定,用来设置不异步加载的组件 * @memberof InitConfig */ initComponentCache: CacheComponentType; /** * * 内置函数配置 * @memberof InitConfig */ initFunctionMap: FunctionCenterType; /** * * 内置数据中心配置数据 * @memberof InitConfig */ initDataCenterMap: Record; /** * * commander 指令集合 * @type {Array} * @memberof InitConfig */ initCommandModule: Array; } export declare const defaultStore: IStoreData; export declare const defaultConfig: InitConfig; /** * * 部分无法合并属性如果b传了会以b为准 * initstore不合并 * leftallregistmap合并 * leftRenderListCategory合并 * rightRenderListCategory合并 * rightGlobalCustom 不合并 * initComponentCache合并 * initFunctionMap合并 * initDataCenterMap合并 * initCommandModule合并 * * @export InitConfig */ export declare function userConfigMerge(a: Partial, b?: Partial): InitConfig; /** * * * @export 用户配置项 * @class UserConfig */ export declare class UserConfig { initConfig: InitConfig; store: import("../core/store").default; componentRegister: import("../core/components").default; componentCache: {}; asyncComponentUrlMap: Record Promise>; marklineConfig: import("../core/markline/marklineConfig").MarklineConfigType; commanderRegister: import("../core/command").default; contextMenuState: import("../core/contextMenu").ContextMenuStateProps; formRegister: import("../core/components/formComponentRegister").FormComponentRegister; storeChanger: import("../core/storeChanger").StoreChanger; eventCenter: EventCenter; dataCenter: DataCenter; scaleState: { value: number; maxValue: number; minValue: number; }; constructor(initConfig?: Partial); toRegist(): void; init(): void; getStoreJSON(): string; parseStoreJson(json: string): any; resetData(data: IStoreData[]): void; getScaleState(): { value: number; maxValue: number; minValue: number; }; getDataCenter(): DataCenter; getEventCenter(): EventCenter; getStoreChanger(): import("../core/storeChanger").StoreChanger; getConfig(): InitConfig; getStore(): import("../core/store").default; getComponentRegister(): import("../core/components").default; getContextMenuState(): import("../core/contextMenu").ContextMenuStateProps; getFormRegister(): import("../core/components/formComponentRegister").FormComponentRegister; getCommanderRegister(): import("../core/command").default; /** * * 以默认设置重置配置项 * @param {Partial} v * @memberof UserConfig */ resetConfig(v: Partial): void; /** * 会重置配置,请修改配置后增加 * 异步增加左侧tab页 * @memberof UserConfig */ addLeftCategory(v: LeftMapRenderListPropsItemCategory[]): void; /** * 会重置配置,请修改配置后增加 * 异步增加右侧tab页 * @memberof UserConfig */ addRightCategory(v: RightMapRenderListPropsItemCategory[]): void; /** * 会重置配置,请修改配置后增加 * 异步增加组件map * @memberof UserConfig */ addCoRegistMap(v: LeftRegistComponentMapItem): void; /** *会重置配置,请修改配置后增加 * 异步修改config 重置store * @memberof UserConfig */ setConfig(v: Partial): void; /** * * 同步注册指令 * @param {CommanderItem} command * @memberof UserConfig */ registCommander(command: CommanderItem): void; /** * * 用于修改markline配置 * @returns * @memberof UserConfig */ getMarklineConfig(): import("../core/markline/marklineConfig").MarklineConfigType; getComponentCache(): {}; /** * * 同步注册组件,不会检测缓存是否存在 * @param {ComponentItemFactory} item * @memberof UserConfig */ registComponent(item: ComponentItemFactory): void; /** * * 异步注册组件,会判定缓存是否存在 * @param {string} name * @memberof UserConfig */ asyncRegistComponent(name: string): Promise; } export default UserConfig;