83208d0f5ffa3d931e9a18e786f9154d5e0a24656f05ec4d9c423f60914ccab697e09ac7eb3baf213ae695565d11b5057ee37b7f5edccca8b77816d8cc05f2 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import * as featureManager from './featureManager.js';
  2. import ComponentModel from '../../model/Component.js';
  3. import { ComponentOption, BoxLayoutOptionMixin, LayoutOrient, ZRColor, BorderOptionMixin, ItemStyleOption, LabelOption, CommonTooltipOption, Dictionary } from '../../util/types.js';
  4. export interface ToolboxTooltipFormatterParams {
  5. componentType: 'toolbox';
  6. name: string;
  7. title: string;
  8. $vars: ['name', 'title'];
  9. }
  10. export interface ToolboxOption extends ComponentOption, BoxLayoutOptionMixin, BorderOptionMixin {
  11. mainType?: 'toolbox';
  12. show?: boolean;
  13. orient?: LayoutOrient;
  14. backgroundColor?: ZRColor;
  15. borderRadius?: number | number[];
  16. padding?: number | number[];
  17. itemSize?: number;
  18. itemGap?: number;
  19. showTitle?: boolean;
  20. iconStyle?: ItemStyleOption;
  21. emphasis?: {
  22. iconStyle?: ItemStyleOption;
  23. };
  24. textStyle?: LabelOption;
  25. tooltip?: CommonTooltipOption<ToolboxTooltipFormatterParams>;
  26. /**
  27. * Write all supported features in the final export option.
  28. */
  29. feature?: Partial<Dictionary<featureManager.ToolboxFeatureOption>>;
  30. }
  31. declare class ToolboxModel extends ComponentModel<ToolboxOption> {
  32. static type: "toolbox";
  33. type: "toolbox";
  34. static layoutMode: {
  35. readonly type: "box";
  36. readonly ignoreSize: true;
  37. };
  38. optionUpdated(): void;
  39. static defaultOption: ToolboxOption;
  40. }
  41. export default ToolboxModel;