import { DSLQuery } from '@lingxiteam/dsl'; import { CompCreatorType } from '@lingxiteam/editor-types'; import { FC } from 'react'; import { ActionType, ChangeItem, CompMenuList, CompType, CustomEventMenuList, CustomEventType, DataSourceMenuList, DataSourceType } from './interface'; import DiffUtils from './utils/DiffUtils'; import { EditorPluginClass } from '../utils/plugin/EditorPlugin'; export interface BaseProps { /** * 是否为手机端 */ isMobile: boolean; /** * 源版本时间 */ sourceTime: string; /** * 基线版本时间 */ baseTime: string; /** * 目标版本时间 */ targetTime: string; /** * 差异数据 */ diffList: { sourceChangedListVsBase: ChangeItem[]; targetVsBaseChangedListVsBase: ChangeItem[]; }; /** * 操作只读 */ onlyRead: boolean; /** * 控件能力 */ edEngineApis: any; /** * 页面列表 */ pages: any; /** * 插件实例 */ editorPluginInst: EditorPluginClass; } /** * props */ export interface PageVersDiffProviderProps extends BaseProps { /** * 基础分支 */ baseData: any; /** * 源分支dsl数据 */ sourceData: any; /** * 更新分支dsl数据 */ targetData: any; /** * 控件列表 */ compList: any[]; } /** * 上下文 */ export interface PageVersDiffContextType extends BaseProps { baseDSLCore: DSLQuery; /** * 源dslCore */ sourceDSLCore: DSLQuery; /** * 更新分支 dslCore */ targetDSLCore: DSLQuery; /** * 是否移动端 */ isMobile: boolean; /** * 构建构造器 * @returns */ compCreators: () => CompCreatorType; /** * 控件列表 */ compList: any[]; /** * 差异工具 */ diffUtils: DiffUtils; /** * 数据源目录列表 */ dataSourceMenuList: DataSourceMenuList[]; /** * 自定义事件列表 */ customEventMenuList: CustomEventMenuList[]; /** * 控件列表树 */ compMenuList: CompMenuList[]; /** * 合并操作类型 */ mergeType: { 'PAGE_DS': Record; 'CUSTOM_FUNCTION': Record; 'PAGE_COMPONENT': Record; }; /** * 原分支数据 */ sourceData: any; /** * 目标分支数据 */ targetData: any; /** * 面板选中数据id */ selectedId: { 'PAGE_DS': string | undefined; 'CUSTOM_FUNCTION': string | undefined; 'PAGE_COMPONENT': string | undefined; }; } declare const PageVersDiffProvider: FC; declare const usePageVersDiffContext: () => PageVersDiffContextType; export { usePageVersDiffContext }; export default PageVersDiffProvider;