import { EOperationType, ERenderFilterType } from "../core/enum"; import { BaseCollectorReducerAction, Diff, DiffAuthPage, DiffAuthRender, ISerializableAuthData, ISerializableStorageData, ISerializableStorageViewData, ISerializableUndoRedoStackViewData, ISerializableUndoStackId, ScenePath, Uid, ViewId, WorkId, DiffGlobalUndoRedoStack } from "./types"; import { BaseCollector } from "./base"; import type { _SetTrue, AppliancePluginLike } from "../plugin/types"; import { BaseApplianceManager } from "../plugin/baseApplianceManager"; import { IUndoStackItem } from "../undo"; import { EProxyArrayOperationType } from "../undo/proxyArray"; /** * 服务端事件/状态同步收集器 */ export declare class Collector extends BaseCollector { static namespace: string; static authSpace: string; static globalUndoRedoStackSpace: string; protected namespace: string; protected authSpace: string; protected globalUndoRedoStackSpace: string; static componentsLimits: number[]; serviceStorage: ISerializableStorageViewData; storage: ISerializableStorageViewData; authStorage: ISerializableAuthData; globalUndoRedoStackStorage: ISerializableUndoRedoStackViewData; private stateDisposer; private authDisposer; private asyncClockState; private limitNums; private syncInterval; constructor(control: BaseApplianceManager, plugin: AppliancePluginLike, syncInterval: number); hasId(viewId: string, scenePath: string, key: string): boolean; private getLimitNum; private getLimitNums; getViewIdBySecenPath(scenePath: string): string | undefined; getScenePathData(scenePath: string): ISerializableStorageData | undefined; hasTargetDataByViewId(viewId: string, key: string): true | undefined; getTargetDataByViewId(viewId: string, key: string): { data: BaseCollectorReducerAction | undefined; scenePath: string | undefined; }; getStorageData(viewId: string, scenePath: string): ISerializableStorageData | undefined; hasSelector(viewId: string, scenePath: string): boolean; hasIncludeSelector(targetKey: string, targetViewId?: string, targetScenePath?: string): boolean; addStorageStateListener(callBack: (diff: Diff) => void): void; removeStorageStateListener(): void; private diffFunByView; private diffFunByScenePath; private diffFunByKeys; transformKey(workId: number | string): string; isOwn(key: string): boolean; dispatch(action: BaseCollectorReducerAction): void; private checkOtherSelector; setState(state: ISerializableStorageData, options: { viewId: string; scenePath: string; isSync?: boolean; isAfterUpdate?: boolean; }): void; updateValue(key: string, value: any, options: { viewId: string; scenePath: string; isSync?: boolean; storage?: ISerializableStorageViewData; }): void; private runSyncService; private syncSerivice; private syncViewData; private syncScenePathData; private syncUpdataView; private syncStorageView; private syncUpdataScenePath; private syncStorageScenePath; private syncUpdataKey; private syncStorageKey; keyTransformWorkId(key: string): string; destroy(): void; private transformToSerializableUndoStackItemData; dispatchUndoTicker(action: { operation: EOperationType; syncType: EProxyArrayOperationType; viewId: ViewId; undoTickerId: ISerializableUndoStackId; data: IUndoStackItem; }): void; addGlobalUndoRedoStackListener(callBack: (diffGlobalUndoRedoStack: DiffGlobalUndoRedoStack) => void): void; private diffGlobalUndoRedoStackFun; dispatchPageAuth(action: { operation: EOperationType; viewId: ViewId; scenePath?: ScenePath; pageId?: Uid; pageData?: { render?: Uid; elementIds?: Set; elementId?: WorkId; }; }, isSync?: boolean): void; dispatchRenderAuth(action: { operation: ERenderFilterType; viewId: ViewId; uid?: Uid; isClear?: boolean; renderData?: { render?: _SetTrue; hide?: _SetTrue; clear?: _SetTrue; }; }, isSync?: boolean): void; addAuthStateListener(callBack: (diffAuthRender?: DiffAuthRender, diffAuthPage?: DiffAuthPage) => void): void; removeAuthStateListener(): void; private diffAuthFun; private diffAuthPageFun; private limitComponents; private clearLimitComponents; }