import type { NodeAttributeType, SetEventItemParamsType } from '@lingxiteam/dsl'; import React from 'react'; import type { onOpenDataSourcePanelType } from '../../Editor/hooks/useDataSource'; import type { LcdpEditorContextValue } from '../../utils/EditContext'; import { CompEventProps } from '../interfaces/types'; import ActionLimitUtils from '../../utils/ActionLimitUtils'; import { MutableRefObject } from 'react'; import { HandleQueueType } from '../hooks/useHandleQueue'; export interface CompEventContextType extends LcdpEditorContextValue { selectedComp?: (NodeAttributeType & { id?: string; }) | null; selectedPage: (NodeAttributeType & { id?: string; }) | Record; eventVisible?: boolean; hideEvent: () => void; canReactEventStk: boolean; initSelEventVal: any; setCanReactEventStk: (value: boolean) => void; setInitSelEventVal: (value: any) => void; customEventCodes?: any[]; selectedCustomEvent?: Record; isEditCustomEvent?: boolean; currData: any; setCurrData: (data: any) => void; errData: any; setErrData: (data: any) => void; eventData: any[]; setEventData: (data: any) => void; targetName: string; oldEventData: any; setOldEventData: (data: any) => void; operType: '1' | '2'; setOperType: (type: '1' | '2') => void; showChangeRecord: boolean; setShowChangeRecord: (show: boolean) => void; fixedPanel: boolean; setFixedPanel: (flag: boolean) => void; showPanel: boolean; setShowPanel: (flag: boolean) => void; showShortcutKey: boolean; setShowShortcutKey: (flag: boolean) => void; showShielding: boolean; setShowShielding: (flag: boolean) => void; tabs: any[]; setTabs: (tabs: any[]) => void; tabKeyAct: string; setTabKeyAct: (tabKey: string) => void; changeRecordNotice: any; setChangeRecordNotice: (notice: any) => void; changeRecordList: any[]; setChangeRecordList: (list: any[]) => void; todoEvents: any[]; visibleEvents: any[]; setEvents: any[]; todoObjects: SetEventItemParamsType[]; todoObjectMap: Record; eventDataMap: any; apiReqServices: any[]; mulData: any; setMulData: (ml: any) => void; mulDataId: Set; setMulDataId: (ml: any) => void; recordChangeRef: { current: boolean; }; igActionModalVisible: boolean; setIgActionModalVisible: (visible: boolean) => void; defaultSelectedIgAction: any; setDefaultSelectedIgAction: (action: any) => void; compEventNameMap: Record; eventNameMap: Record; eventDataCollection: Record; onChangeEventDataCollection: (data: Record) => void; curCloseKeys: number[]; setCurCloseKeys: React.Dispatch>; busiCompEvents: any[]; setBusiCompEvents: (data: any) => void; formCompRelation: any; initSelActionDataId?: string; setRecommendVisible?: any; recommendVisible?: any; setMergeVisible?: any; mergeVisible?: any; setMergeCancel?: any; mergeCancel?: any; onOpenDataSourcePanel: onOpenDataSourcePanelType; customType?: string; canUndo: boolean; canRedo: boolean; moveOperatorStatus: any; hasCustom: boolean; setHasCustom: (is: boolean) => void; useCompEventResult: any; closeAllKeys: (list: any[], closeKeys: any, isIncludeEventId?: boolean) => any; getCurEventTree: (defaultEventData?: any[]) => any[]; getEventNodeLength: (list?: any[], length?: number) => number; eventNodeLength: number; setEventNodeLength: (length: number) => void; onClickEventFold: () => void; showSearchModal: boolean; setShowSearchModal: (isShow: boolean) => void; eventRedirect: (compId: string, eventValue: string, dataId?: string) => void; setShowRelMenuNode: (is: boolean) => void; showRelMenuNode: boolean; actionPanelRef?: any; getEventItem: (compName: any, value: string) => any; scrollFlag: boolean; setScrollFlag(flag: boolean): void; getLastDsl: () => any; showRightPanel?: any; rightShow?: boolean; eventTreeRef: React.MutableRefObject; anchorTo: (number: string) => void; inputNumberRef: React.MutableRefObject; anchorByDataId: (dataId: string | number) => void; getActionItemByDataId: (dataId: string | number) => null | { index: number; dataName: string; dataId: number; value: string; options: Record; path: string[]; actionObjId: string; actionObjName: string; children: any[]; elseIfs: any[]; }; actionConfigDisabled: boolean; setActionConfigDisabled(status: boolean): void; getEventDataMap(arr?: any[]): [Record, any[]]; initApiRequestServiceDetails(eventList?: any[]): void; actionLimitCount?: MutableRefObject; /** * 事件更新标志 */ eventUpdateFlag: number; /** * 初始事件树更新 * @returns */ triggerEventUpdate: () => void; /** * 回调线hober效果 */ callbackLineManager: { collectLineMap: (dataId: string, ref: HTMLDivElement) => void; onHoverAction: (dataId: string) => void; clearHoverEffect: () => void; }; /** * 动作行数信息 */ totalEventInfoRef: { /** * 动作行数-总 */ totalEventInfo: Record; /** * 差异项 */ diffTotalEventInfo: Record; }; /** * 历史记录队列 */ historyQueueHandle: HandleQueueType; } export interface CompEventProviderType { eventVisible?: boolean; hideEvent: () => void; isEditCustomEvent?: boolean; customEventCodes?: any[]; selectedCustomEvent?: Record; initSelEventVal?: string; initSelActionDataId?: string; onOpenDataSourcePanel: onOpenDataSourcePanelType; customType?: string; useGetServiceDetails?: CompEventProps['useGetServiceDetails']; } declare const CompEventProvider: React.FC; declare const useEventContext: () => CompEventContextType; export { CompEventProvider, useEventContext };