import { I18nString, Keymap } from '@textbus/core'; import { Tool, ToolFactoryParams } from '../help'; import { ToolFactory } from '../help'; import { Commander } from '../commander'; import { Matcher } from '../matcher/_api'; export interface ActionConfig { /** 设置当前 action 的 value */ value?: any; /** 设置当前 action 显示的文字 */ label?: I18nString; /** 给当前 action 添加一组 css class */ classes?: string[]; /** 给当前 action 添加一组 icon css class */ iconClasses?: string[]; /** 给当前 action 添加一组 css class */ keymap?: Keymap; } /** * 动作表工具配置 */ export interface ActionSheetToolConfig { /** 当前控件可操作的选项 */ actions: ActionConfig[]; /** 当某一项被点击时调用的命令 */ commanderFactory(): Commander; /** 状态查询器 */ matcher?: Matcher; /** 设置控件显示的文字 */ label?: I18nString; /** 给当前控件添加一组 css class */ classes?: string[]; /** 给控件添加一组 icon css class 类 */ iconClasses?: string[]; /** 当鼠标放在控件上的提示文字 */ tooltip?: I18nString; } export declare class ActionSheetTool implements ToolFactory { private config; constructor(config: ActionSheetToolConfig); create(params: ToolFactoryParams, addTool: (tool: Tool) => void): HTMLElement; }