import React from 'react'; import { CompScenePanelType } from '../shell/type'; import { ComponentGroup } from '../interfaces/types'; import { DSLQuery } from '@lingxiteam/dsl'; import { usePluginHooksReturnType } from '../shell/usePluginHooks'; interface WorkFlowEditorType { key: 'MovableLayout'; title: string; } interface WorkFlowComponentProps { DSLCore: DSLQuery; isMobile: boolean; plugins: usePluginHooksReturnType; onManualSave?: (opts: any) => void; [key: string]: any; } /** * 工作流组件面板定义, 友好提示 * @param fn * @returns */ export declare const IPublicWorkFlowComponent: (fn: (props: WorkFlowComponentProps) => React.FunctionComponent) => (props: WorkFlowComponentProps) => React.FunctionComponent; interface WorkFlowType { key: string; title: string; panel: { props?: Record; ComponentElement: React.FunctionComponent | React.ComponentClass; }; } interface SideLeftPanelType { key: string; title: string; panel: { props?: Record; ComponentElement: React.FunctionComponent | React.ComponentClass; }; icon: { props(opts: { active: boolean; }): Record; ComponentElement: React.FunctionComponent | React.ComponentClass; }; } export interface SceneTempConfig { /** * 平台类型 */ platform: 'h5' | 'pc'; /** * 组件列表 */ compList?: ComponentGroup[]; /** * 工作流程 */ workflow: (WorkFlowType | WorkFlowEditorType)[]; /** * 是否展示默认面板 * @default true */ showEditorPanel?: boolean; /** * 左侧Tabs配置 */ sideLeftPanels?: SideLeftPanelType[]; /** * 左侧默认展示的面板 */ defaultLeftSideKey?: string; /** * 流程开启前的触发组件,可自行触发组件场景流程启动。 可选。 只支持弹窗类组件 */ InjectComponent?: React.ComponentClass<{ next: (e?: Record) => void; destroy: () => void; }> | React.FunctionComponent<{ next: (e?: Record) => void; destroy: () => void; }>; } /** * 场景流程配置表定义 * 增加代码提示, 提升开发体验。 * @param config * @returns */ export declare const defineSceneFlowConfig: (config: SceneTempConfig) => SceneTempConfig; export interface CompSceneConfigType { /** * 场景标题 */ title: string | ((nextProps?: Record) => string); /** * 场景列表 */ panelList: CompScenePanelType[] | ((nextProps?: Record) => CompScenePanelType[]); /** * 平台类型 */ platform: 'h5' | 'pc'; /** * 组件名称 */ compName: string; /** * 流程开启前的触发组件, 相当于拦截器,可自行触发组件场景流程启动。 可选 */ InterceptComponent?: React.ComponentClass<{ next: (e?: Record) => void; destroy: () => void; wrapRef?: React.RefObject; }> | React.FunctionComponent<{ next: (e?: Record) => void; destroy: () => void; wrapRef?: React.RefObject; }>; /** * 弹窗属性 */ modalProps?: { width?: string; }; } /** * 组件场景化流程 * @param config * @returns */ export declare const defindCompSceneConfig: (config: CompSceneConfigType) => CompSceneConfigType; export {};