import * as Comlink from 'comlink'; import { EmbedRenderOptions, FilterType } from '../../types'; export interface IComlinkBaseControllerAction { eventTracer: () => void; updateInterfaceConfig: (state: any) => void; getDsl: () => Promise; getResultId: () => Promise; setFilters(vids: FilterType[]): Promise; getCurrentUrl: () => Promise; getTeaUrl: () => Promise; updateResultId: (resultId: string, source: string) => Promise; copyResultId: (resultId: string) => Promise; } export declare abstract class BaseAnalysisController { /** 基础状态值 */ protected abstract state: EmbedRenderOptions; /** 页面iframe */ protected iframe: HTMLIFrameElement | undefined; /** 页面交互控制器 */ protected comlinkController: Comlink.Remote | undefined; /** 埋点 */ protected abstract eventTrace(): void; /** 打开嵌出页面 */ openPage: (customeIframe?: HTMLIFrameElement) => Promise; /** 获取查询dsl,包含时间、事件 */ getDsl: () => any; /** 获取当前的resultId */ getResultId: () => Promise | Promise | undefined; /** 获取当前嵌出页的url */ getCurrentUrl: () => Promise | undefined; /** 获取当前嵌出页对应的tea页面url */ getTeaUrl: () => Promise | undefined; /** 更新resultId内容 */ updateResultId: (resultId: string, source: string) => Promise | undefined; /** 更新细分筛选内容 */ setFilters: (filters: FilterType[]) => Promise | undefined; /** 复制 resultId */ copyResultId: (resultId: string) => Promise | undefined; }