@univerjs-pro/sheets-chart-ui 1.0.0-alpha.2 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +5 -3
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/index.js +1 -1
  23. package/lib/es/locale/ar-SA.js +1 -1
  24. package/lib/es/locale/ca-ES.js +1 -1
  25. package/lib/es/locale/de-DE.js +1 -1
  26. package/lib/es/locale/en-US.js +1 -1
  27. package/lib/es/locale/es-ES.js +1 -1
  28. package/lib/es/locale/fa-IR.js +1 -1
  29. package/lib/es/locale/fr-FR.js +1 -1
  30. package/lib/es/locale/id-ID.js +1 -1
  31. package/lib/es/locale/it-IT.js +1 -1
  32. package/lib/es/locale/ja-JP.js +1 -1
  33. package/lib/es/locale/ko-KR.js +1 -1
  34. package/lib/es/locale/pl-PL.js +1 -1
  35. package/lib/es/locale/pt-BR.js +1 -1
  36. package/lib/es/locale/ru-RU.js +1 -1
  37. package/lib/es/locale/sk-SK.js +1 -1
  38. package/lib/es/locale/vi-VN.js +1 -1
  39. package/lib/es/locale/zh-CN.js +1 -1
  40. package/lib/es/locale/zh-HK.js +1 -1
  41. package/lib/es/locale/zh-TW.js +1 -1
  42. package/lib/index.css +3 -127
  43. package/lib/index.js +1 -1
  44. package/lib/locale/ar-SA.js +1 -1
  45. package/lib/locale/ca-ES.js +1 -1
  46. package/lib/locale/de-DE.js +1 -1
  47. package/lib/locale/en-US.js +1 -1
  48. package/lib/locale/es-ES.js +1 -1
  49. package/lib/locale/fa-IR.js +1 -1
  50. package/lib/locale/fr-FR.js +1 -1
  51. package/lib/locale/id-ID.js +1 -1
  52. package/lib/locale/it-IT.js +1 -1
  53. package/lib/locale/ja-JP.js +1 -1
  54. package/lib/locale/ko-KR.js +1 -1
  55. package/lib/locale/pl-PL.js +1 -1
  56. package/lib/locale/pt-BR.js +1 -1
  57. package/lib/locale/ru-RU.js +1 -1
  58. package/lib/locale/sk-SK.js +1 -1
  59. package/lib/locale/vi-VN.js +1 -1
  60. package/lib/locale/zh-CN.js +1 -1
  61. package/lib/locale/zh-HK.js +1 -1
  62. package/lib/locale/zh-TW.js +1 -1
  63. package/lib/types/commands/commands/focused-chart.command.d.ts +9 -0
  64. package/lib/types/commands/operations/open-chart-panel-operation.d.ts +2 -0
  65. package/lib/types/config/config.d.ts +1 -0
  66. package/lib/types/controllers/chart-element-float-menu.controller.d.ts +30 -0
  67. package/lib/types/controllers/chart-render.controller.d.ts +4 -1
  68. package/lib/types/controllers/ui.controller.d.ts +14 -3
  69. package/lib/types/hooks.d.ts +2 -4
  70. package/lib/types/index.d.ts +4 -1
  71. package/lib/types/locale/en-US.d.ts +2 -0
  72. package/lib/types/menu/chart-context-menu.d.ts +7 -0
  73. package/lib/types/plugin.d.ts +1 -0
  74. package/lib/types/services/chart-content-layout.d.ts +1 -2
  75. package/lib/types/services/chart-element-popup-anchor.d.ts +10 -0
  76. package/lib/types/services/chart-element-selection.d.ts +9 -0
  77. package/lib/types/services/chart-image-rect.d.ts +4 -1
  78. package/lib/types/services/chart-panel-route.d.ts +20 -0
  79. package/lib/types/services/chart-render.service.d.ts +21 -9
  80. package/lib/types/services/sheet-chart-host.d.ts +6 -1
  81. package/lib/types/services/sheet-image-chart-host.d.ts +2 -2
  82. package/lib/types/services/sheets-chart-host-provider.service.d.ts +8 -8
  83. package/lib/types/services/sheets-chart-ui.service.d.ts +50 -11
  84. package/lib/types/views/chart-edit-panel/Options.d.ts +26 -85
  85. package/lib/types/views/chart-edit-panel/RadarChartOptionsEdit.d.ts +0 -2
  86. package/lib/types/views/chart-edit-panel/data-tab-panel/BubbleDataEdit.d.ts +1 -6
  87. package/lib/types/views/chart-edit-panel/data-tab-panel/DataTabPanel.d.ts +0 -3
  88. package/lib/types/views/chart-edit-panel/style-tab-panel/AxisOptionsEdit.d.ts +0 -2
  89. package/lib/types/views/chart-edit-panel/style-tab-panel/DataLabelOptions.d.ts +1 -1
  90. package/lib/types/views/chart-edit-panel/style-tab-panel/ParetoLine.d.ts +0 -2
  91. package/lib/types/views/chart-edit-panel/style-tab-panel/PieChartStyleEdit.d.ts +0 -2
  92. package/lib/types/views/chart-edit-panel/style-tab-panel/RelationEdit.d.ts +1 -6
  93. package/lib/types/views/chart-edit-panel/style-tab-panel/TrendLineEdit.d.ts +1 -6
  94. package/lib/types/views/chart-edit-panel/style-tab-panel/WaterfallSeriesEdit.d.ts +1 -6
  95. package/lib/types/views/chart-edit-panel/style-tab-panel/WordCloudShapeSelector.d.ts +1 -6
  96. package/lib/types/views/chart-edit-panel/style-tab-panel/grid-line-and-tick-options/GridLineAndTickOptions.d.ts +0 -2
  97. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/CombinationChartTypeSelect.d.ts +0 -2
  98. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/SeriesStyleEdit.d.ts +1 -2
  99. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/use-series-chart-type.d.ts +2 -8
  100. package/lib/umd/index.js +1 -1
  101. package/lib/umd/locale/ar-SA.js +1 -1
  102. package/lib/umd/locale/ca-ES.js +1 -1
  103. package/lib/umd/locale/de-DE.js +1 -1
  104. package/lib/umd/locale/en-US.js +1 -1
  105. package/lib/umd/locale/es-ES.js +1 -1
  106. package/lib/umd/locale/fa-IR.js +1 -1
  107. package/lib/umd/locale/fr-FR.js +1 -1
  108. package/lib/umd/locale/id-ID.js +1 -1
  109. package/lib/umd/locale/it-IT.js +1 -1
  110. package/lib/umd/locale/ja-JP.js +1 -1
  111. package/lib/umd/locale/ko-KR.js +1 -1
  112. package/lib/umd/locale/pl-PL.js +1 -1
  113. package/lib/umd/locale/pt-BR.js +1 -1
  114. package/lib/umd/locale/ru-RU.js +1 -1
  115. package/lib/umd/locale/sk-SK.js +1 -1
  116. package/lib/umd/locale/vi-VN.js +1 -1
  117. package/lib/umd/locale/zh-CN.js +1 -1
  118. package/lib/umd/locale/zh-HK.js +1 -1
  119. package/lib/umd/locale/zh-TW.js +1 -1
  120. package/package.json +21 -18
  121. package/lib/types/views/chart-edit-panel/color-picker-control/index.d.ts +0 -6
  122. package/lib/types/views/chart-edit-panel/dropdown-menu/index.d.ts +0 -9
  123. package/lib/types/views/chart-edit-panel/font-format-bar/FontFormatBar.d.ts +0 -16
  124. package/lib/types/views/chart-edit-panel/font-format-bar/index.d.ts +0 -1
  125. package/lib/types/views/chart-edit-panel/use-translated-options.d.ts +0 -6
  126. package/lib/types/views/print-chart/index.d.ts +0 -10
@@ -1,4 +1,3 @@
1
- export declare const CHART_CONTENT_PADDING = 8;
2
1
  export interface IChartOuterRect {
3
2
  width: number;
4
3
  height: number;
@@ -32,5 +31,5 @@ export interface IChartOffset {
32
31
  }
33
32
  export declare function getChartContentRect(rect: IChartOuterRect, minSize?: number): IChartOuterRect;
34
33
  export declare function getChartHostPlacement(rect: IChartOuterRect, scale?: IChartScale, floatDomLayout?: IChartFloatDomLayout): IChartHostPlacement;
35
- export declare function getChartCanvasContentOffset(rect: IChartOuterRect, scale: Required<IChartScale>): IChartOffset;
34
+ export declare function getChartContentOffset(_scale?: IChartScale): IChartOffset;
36
35
  export declare function getChartFloatDomInnerOffset(layout?: IChartFloatDomLayout): IChartOffset;
@@ -0,0 +1,10 @@
1
+ import type { IChartElementEvent } from '@univerjs-pro/engine-chart';
2
+ import type { IDisposable } from '@univerjs/core';
3
+ import type { IBoundRectNoAngle } from '@univerjs/engine-render';
4
+ import type { Observable } from 'rxjs';
5
+ export interface IChartElementPopupAnchorObserver extends IDisposable {
6
+ initialRect: IBoundRectNoAngle;
7
+ anchorRect$: Observable<IBoundRectNoAngle>;
8
+ visible: boolean;
9
+ }
10
+ export declare function createChartElementPopupAnchorObserver(event: IChartElementEvent, update$: Observable<unknown> | undefined, onHidden: () => void): IChartElementPopupAnchorObserver;
@@ -0,0 +1,9 @@
1
+ import type { ChartElementConfigTarget } from '@univerjs-pro/chart-ui';
2
+ import type { ChartModel, IChartElementHit } from '@univerjs-pro/engine-chart';
3
+ import type { IChartEditPanelRoute } from './chart-panel-route';
4
+ export interface ISheetsChartElementSelection {
5
+ target: ChartElementConfigTarget;
6
+ route: IChartEditPanelRoute;
7
+ showFloatMenu: boolean;
8
+ }
9
+ export declare function resolveSheetsChartElementSelection(chartModel: ChartModel, hit: IChartElementHit): ISheetsChartElementSelection | undefined;
@@ -4,11 +4,14 @@ import { Rect } from '@univerjs/engine-render';
4
4
  export declare class ChartImageRect extends Rect {
5
5
  private readonly _getImage;
6
6
  private readonly _shouldSuppressSnapshot;
7
+ private readonly _disposeImage;
7
8
  private _urlImage;
8
9
  private _url;
9
- constructor(key: string, config: IRectProps, _getImage: () => ChartImageSource | undefined, _shouldSuppressSnapshot?: () => boolean);
10
+ constructor(key: string, config: IRectProps, _getImage: () => ChartImageSource | undefined, _shouldSuppressSnapshot?: () => boolean, _disposeImage?: () => void);
11
+ dispose(): void;
10
12
  render(mainCtx: UniverRenderingContext, bounds?: IViewportInfo): this;
11
13
  protected _draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
14
+ private _drawChartFrame;
12
15
  isHit(coord: Vector2): boolean;
13
16
  private _drawChartImage;
14
17
  private _getDrawable;
@@ -0,0 +1,20 @@
1
+ import type { ChartElementConfigTarget } from '@univerjs-pro/chart-ui';
2
+ import type { IChartElementHit } from '@univerjs-pro/engine-chart';
3
+ export interface IChartEditPanelRoute {
4
+ tab: 'style' | 'data';
5
+ section?: 'chartStyle' | 'chartAndAxisTitles' | 'legend' | 'horizontalAxis' | 'verticalAxis' | 'rightVerticalAxis' | 'series' | 'pieStyle' | 'paretoBarSeries' | 'paretoLineSeries' | 'waterfallSeries' | 'relation' | 'wordCloud';
6
+ titleKey?: 'title' | 'subtitle' | 'xAxisTitle' | 'yAxisTitle' | 'rightYAxisTitle';
7
+ axisId?: 'xAxis' | 'yAxis' | 'rightYAxis';
8
+ seriesId?: string;
9
+ }
10
+ export interface IChartSelectedElementState {
11
+ chartId: string;
12
+ element: IChartElementHit;
13
+ target: ChartElementConfigTarget;
14
+ route: IChartEditPanelRoute;
15
+ }
16
+ export interface IChartPanelRouteState {
17
+ chartId: string;
18
+ route: IChartEditPanelRoute | null;
19
+ }
20
+ export declare function resolveChartEditPanelRoute(target: ChartElementConfigTarget): IChartEditPanelRoute | undefined;
@@ -1,5 +1,7 @@
1
- import type { ChartDirection, ChartImageSource, ChartStyle, IChartConfig, IChartRenderModel } from '@univerjs-pro/engine-chart';
2
- import { ChartThemeService } from '@univerjs-pro/engine-chart';
1
+ import type { ChartDirection, ChartElementEventHandler, ChartElementEventType, ChartImageSource, ChartStyle, IChartConfig, IChartRenderModel } from '@univerjs-pro/engine-chart';
2
+ import type { IDisposable } from '@univerjs/core';
3
+ import type { Scene } from '@univerjs/engine-render';
4
+ import { ChartThemeService, IChartRenderModelManagerService } from '@univerjs-pro/engine-chart';
3
5
  import { ChartModelService } from '@univerjs-pro/sheets-chart';
4
6
  import { Disposable, IConfigService, Injector, IUniverInstanceService, LocaleService, ThemeService } from '@univerjs/core';
5
7
  import { IDrawingManagerService } from '@univerjs/drawing';
@@ -27,16 +29,19 @@ export declare class ChartRenderService extends Disposable {
27
29
  private readonly _themeService;
28
30
  private readonly _configService;
29
31
  private readonly _chartSnapshotStoreService;
30
- private _renderModelMap;
31
32
  private _chartInstanceMap;
32
- private _currentModel;
33
+ private _chartEventHandlers;
34
+ private _chartEventSubscriptions;
35
+ private _chartElementEditMode;
36
+ private readonly _renderModelManager;
37
+ private readonly _ownsRenderModelManager;
33
38
  private _renderDebounceMap;
34
39
  private _debounceHandleMap;
35
40
  private readonly _chartRenderMode;
36
41
  private readonly _lastRenderInputMap;
37
42
  private _activeChartId;
38
43
  private _lastActiveSheet;
39
- constructor(_chartHostProvider: IChartHostProviderService, _sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _chartModelService: ChartModelService, _drawingManagerService: IDrawingManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _localeService: LocaleService, _injector: Injector, _chartThemeService: ChartThemeService, _themeService: ThemeService, _configService: IConfigService, _chartSnapshotStoreService: ChartSnapshotStoreService);
44
+ constructor(_chartHostProvider: IChartHostProviderService, _sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _chartModelService: ChartModelService, _drawingManagerService: IDrawingManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _localeService: LocaleService, _injector: Injector, _chartThemeService: ChartThemeService, _themeService: ThemeService, _configService: IConfigService, _chartSnapshotStoreService: ChartSnapshotStoreService, renderModelManager?: IChartRenderModelManagerService);
40
45
  private _getWatermark;
41
46
  registerRenderModel(name: string, renderModel: IChartRenderModel): void;
42
47
  setRenderModel(name: string): void;
@@ -63,16 +68,23 @@ export declare class ChartRenderService extends Disposable {
63
68
  }): void;
64
69
  private _debounceHandle;
65
70
  handleActiveSubUnitChange(): void;
71
+ setElementEditMode(chartId: string, enabled: boolean): void;
72
+ exportImage(chartId: string): Promise<string | undefined>;
73
+ on(chartId: string, type: ChartElementEventType, handler: ChartElementEventHandler): IDisposable;
74
+ private _getCurrentSnapshotImage;
75
+ private _bindChartEventHandlers;
76
+ private _bindChartEventHandler;
77
+ private _disposeChartEventSubscription;
78
+ private _disposeChartEventSubscriptions;
66
79
  getRenderModel(name: string): IChartRenderModel<Record<string, any>> | undefined;
67
80
  checkChartCanRender(id: string): boolean;
68
81
  private _getChartRenderSkipReason;
69
82
  render(id: string, config: IChartConfig, style: ChartStyle): Promise<void>;
83
+ /** Render static chart snapshots into the print scene so drawing z-order is preserved. */
84
+ renderChartsForPrinting(unitId: string, subUnitId: string, scene: Scene): Promise<void>;
85
+ private _createPrintingChartObject;
70
86
  private _getOrCreateChartRenderInstance;
71
87
  private _createChartRenderInstanceContext;
72
- printChart(id: string, chartHost: HTMLDivElement, rect: {
73
- width: number;
74
- height: number;
75
- }): Promise<void>;
76
88
  private _cancelDebouncedCallbacks;
77
89
  dispose(): void;
78
90
  }
@@ -1,5 +1,6 @@
1
1
  import type { IChartHostRect, IChartHostStyle, IDomChartHost } from '@univerjs-pro/engine-chart';
2
2
  import type { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
3
+ import { ChartHostRenderMode } from '@univerjs-pro/engine-chart';
3
4
  import { Disposable } from '@univerjs/core';
4
5
  export interface IChartHostHandle {
5
6
  mountNode: HTMLElement;
@@ -24,12 +25,15 @@ export declare class SheetChartHost extends Disposable implements IDomChartHost
24
25
  private readonly _isProviderDisposed;
25
26
  private readonly _markReady;
26
27
  private readonly _markNotReady;
27
- readonly mode: "dom";
28
+ readonly mode = ChartHostRenderMode.Dom;
29
+ private _frameNode;
28
30
  private _mountNode;
31
+ private _borderNode;
29
32
  private _managed;
30
33
  private _pendingToken;
31
34
  private _pendingHost;
32
35
  private _waiter;
36
+ private _hostStyle;
33
37
  private _savedWrapperStyle;
34
38
  constructor(chartId: string, _getFloatDomInfo: () => ReturnType<SheetCanvasFloatDomManagerService['getFloatDomInfo']>, _getPlacement: () => SheetChartHostPlacement | null, _setHostStyle: (style: IChartHostStyle) => void, _isProviderDisposed: () => boolean, _markReady: () => void, _markNotReady: () => void);
35
39
  isManaged(): boolean;
@@ -46,6 +50,7 @@ export declare class SheetChartHost extends Disposable implements IDomChartHost
46
50
  private _createHost;
47
51
  private _cancelHostWait;
48
52
  private _applyHostPlacement;
53
+ private _applyHostStyle;
49
54
  private _activateHostWrapper;
50
55
  private _restoreHostWrapper;
51
56
  }
@@ -1,5 +1,5 @@
1
1
  import type { ChartImageSource, IChartHostRect, IChartHostStyle } from '@univerjs-pro/engine-chart';
2
- import type { Rect } from '@univerjs/engine-render';
2
+ import type { IChartOuterRect } from './chart-content-layout';
3
3
  import type { ChartSnapshotStoreService } from './chart-snapshot-store.service';
4
4
  import { ImageChartHost } from '@univerjs-pro/engine-chart';
5
5
  interface ChartSnapshotKey {
@@ -13,7 +13,7 @@ export declare class SheetImageChartHost extends ImageChartHost {
13
13
  private readonly _snapshotKey;
14
14
  private readonly _snapshotStore;
15
15
  private readonly _requestPaint;
16
- constructor(chartId: string, _getOuterRect: () => Rect | null, _setHostStyle: (style: IChartHostStyle) => void, _snapshotKey: ChartSnapshotKey, _snapshotStore: ChartSnapshotStoreService, _requestPaint: () => void);
16
+ constructor(chartId: string, _getOuterRect: () => IChartOuterRect | null, _setHostStyle: (style: IChartHostStyle) => void, _snapshotKey: ChartSnapshotKey, _snapshotStore: ChartSnapshotStoreService, _requestPaint: () => void);
17
17
  getRect(): IChartHostRect | null;
18
18
  setStyle(style: IChartHostStyle): void;
19
19
  nextVersion(): number;
@@ -1,12 +1,12 @@
1
- import type { ChartHostRenderMode, IDomChartHost, IImageChartHost } from '@univerjs-pro/engine-chart';
2
- import type { Rect } from '@univerjs/engine-render';
1
+ import type { IDomChartHost, IImageChartHost } from '@univerjs-pro/engine-chart';
3
2
  import type { Observable } from 'rxjs';
3
+ import type { IChartOuterRect } from './chart-content-layout';
4
4
  import type { ChartHostHandle } from './sheet-chart-host';
5
+ import { ChartHostRenderMode } from '@univerjs-pro/engine-chart';
5
6
  import { Disposable } from '@univerjs/core';
6
7
  import { IRenderManagerService } from '@univerjs/engine-render';
7
8
  import { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
8
9
  import { ChartSnapshotStoreService } from './chart-snapshot-store.service';
9
- export { createHostElement } from './sheet-chart-host';
10
10
  export interface IChartHostProviderService {
11
11
  ensureHost(chartId: string, mode: 'image'): Promise<IImageChartHost | null>;
12
12
  ensureHost(chartId: string, mode: 'dom'): Promise<IDomChartHost | null>;
@@ -16,7 +16,7 @@ export interface IChartHostProviderService {
16
16
  dispose: () => void;
17
17
  }>;
18
18
  setHostStyle: (chartId: string, style: Record<string, any>) => void;
19
- getHostSize: (chartId: string) => Rect | null;
19
+ getHostSize: (chartId: string) => IChartOuterRect | null;
20
20
  removeHost$: Observable<string>;
21
21
  removeHost: (chartId: string) => void;
22
22
  checkHost: (chartId: string) => boolean;
@@ -37,14 +37,14 @@ export declare class SheetsChartHostProviderService extends Disposable implement
37
37
  private _getSceneAndTransformerByDrawingSearch;
38
38
  setBorder(id: string, color: string): void;
39
39
  setHostStyle(id: string, style: Record<string, any>): void;
40
- getHostSize(id: string): Rect | null;
40
+ getHostSize(id: string): IChartOuterRect | null;
41
41
  checkHost(id: string): boolean;
42
42
  syncHostLayout(id: string): void;
43
43
  removeHost(id: string): void;
44
44
  ensureHost(id: string): Promise<ChartHostHandle>;
45
- ensureHost(id: string, mode: 'image'): Promise<IImageChartHost | null>;
46
- ensureHost(id: string, mode: 'dom'): Promise<IDomChartHost | null>;
47
- ensureHost(id: string, mode: ChartHostRenderMode): Promise<IImageChartHost | IDomChartHost | null>;
45
+ ensureHost(id: string, mode: ChartHostRenderMode.Image | 'image'): Promise<IImageChartHost | null>;
46
+ ensureHost(id: string, mode: ChartHostRenderMode.Dom | 'dom'): Promise<IDomChartHost | null>;
47
+ ensureHost(id: string, mode: ChartHostRenderMode | 'image' | 'dom'): Promise<IImageChartHost | IDomChartHost | null>;
48
48
  isDomReady(id: string): boolean;
49
49
  markHostNotReady(id: string): void;
50
50
  invalidateSnapshot(id: string): void;
@@ -1,12 +1,13 @@
1
1
  import type { AreaLineStyle, ChartModel, ChartStyle, DeepPartial, IAllSeriesStyle, IAxisOptions, IChartContext, IChartStyle, ILegendStyle, InvalidValueType, IPieLabelStyle, IRelationForceOptions, IRuntimeAxis, ITrendLine, LinePointShape, RadarShape, RelationChartLayoutEnum, RightYAxisOptions, TitlePositionEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from '@univerjs-pro/engine-chart';
2
- import type { IChartSourceMultiRangeItem, IChartUpdateConfigCommandParams, IChartUpdateSourceCommandParams, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
2
+ import type { IChartSourceMultiRangeItem, IChartUpdateConfigCommandParams, IChartUpdateSourceCommandParams, ISheetChartSourceSingleRange, SheetChartModel } from '@univerjs-pro/sheets-chart';
3
3
  import type { Nullable } from '@univerjs/core';
4
4
  import type { Observable } from 'rxjs';
5
+ import type { IChartEditPanelRoute, IChartPanelRouteState, IChartSelectedElementState } from './chart-panel-route';
5
6
  import { CategoryType, ChartTypeBits, DataOrientation } from '@univerjs-pro/engine-chart';
6
7
  import { ChartModelService, SheetsChartService } from '@univerjs-pro/sheets-chart';
7
8
  import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
8
9
  import { IChartHostProviderService } from './sheets-chart-host-provider.service';
9
- export declare function registryChartConfigState(service: SheetsChartUIService): void;
10
+ export declare function registryChartConfigState(service: ISheetsChartUIService): void;
10
11
  export interface IChartOptionType {
11
12
  label: string;
12
13
  value: string;
@@ -61,11 +62,11 @@ export interface IChartConfigStateMap {
61
62
  dataPointsOptions: IChartConfigState<Nullable<IChartOptionType[]>>;
62
63
  chartThemeColorType: IChartConfigState<Nullable<string>>;
63
64
  titlePosition: IChartConfigState<Nullable<TitlePositionEnum>, TitlePositionEnum>;
64
- bubbleSizeSeriesId: IChartConfigState<Nullable<number>, number | undefined>;
65
- bubbleXAxis: IChartConfigState<Nullable<number>, number>;
66
- bubbleYAxis: IChartConfigState<Nullable<number>, number>;
67
- bubbleLabel: IChartConfigState<Nullable<number>, number>;
68
- bubbleSeries: IChartConfigState<Nullable<number>, number>;
65
+ bubbleSizeIndex: IChartConfigState<Nullable<number>, number | undefined>;
66
+ scatterXIndex: IChartConfigState<Nullable<number>, number>;
67
+ scatterYIndex: IChartConfigState<Nullable<number>, number>;
68
+ scatterLabelIndex: IChartConfigState<Nullable<number>, number>;
69
+ bubbleSeriesIndex: IChartConfigState<Nullable<number>, number>;
69
70
  relationLayout: IChartConfigState<Nullable<RelationChartLayoutEnum>, RelationChartLayoutEnum>;
70
71
  useValueAsSymbolSize: IChartConfigState<Nullable<boolean>, boolean>;
71
72
  forceOption: IChartConfigState<Nullable<IRelationForceOptions>, IRelationForceOptions | undefined>;
@@ -91,7 +92,32 @@ export type IChartConfigState<GetValue, SetValue = GetValue> = {
91
92
  set?(value: SetValue): void;
92
93
  get(): Observable<GetValue> | undefined;
93
94
  } | Observable<GetValue>;
94
- export declare class SheetsChartUIService extends Disposable {
95
+ export interface ISheetsChartUIService {
96
+ readonly activeChartModel: Nullable<SheetChartModel>;
97
+ readonly activeChartModel$: Observable<Nullable<SheetChartModel>>;
98
+ readonly activeEditChart: string | null;
99
+ readonly activeEditChart$: Observable<string | null>;
100
+ readonly direction$: LocaleService['direction$'];
101
+ readonly panelRoute$: Observable<IChartPanelRouteState | null>;
102
+ readonly rangeSelectMode: boolean;
103
+ readonly selectedElement$: Observable<IChartSelectedElementState | null>;
104
+ setActiveEditChart(chartId: string | null): void;
105
+ setRangeSelectMode(on: boolean): void;
106
+ isElementEditModeActive(chartId: string): boolean;
107
+ setSelectedElement(state: IChartSelectedElementState | null): void;
108
+ setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
109
+ clearPanelRoute(): void;
110
+ getDataSource(id: string): ReturnType<SheetsChartService['getChartDataSource']>;
111
+ registerViewState<T extends ChartConfigStateKey = ChartConfigStateKey>(id: T, state: (chartModel: ChartModel) => IChartConfigStateMap[T]): void;
112
+ getViewState<V extends ChartConfigStateValue = ChartConfigStateValue>(id: ChartConfigStateKey, activeChartModel?: Nullable<SheetChartModel>): IChartConfigState<V> | undefined;
113
+ executeChartUpdateConfig(params: Omit<IChartUpdateConfigCommandParams, 'unitId'>): void;
114
+ executeChartUpdateSourceConfig(params: Omit<IChartUpdateSourceCommandParams, 'unitId'>): void;
115
+ removeViewState(id: ChartConfigStateKey): void;
116
+ setBorder(id: string, color: string): void;
117
+ t(...args: Parameters<LocaleService['t']>): string;
118
+ }
119
+ export declare const ISheetsChartUIService: import("@wendellhu/redi").IdentifierDecorator<ISheetsChartUIService>;
120
+ export declare class SheetsChartUIService extends Disposable implements ISheetsChartUIService {
95
121
  private readonly _chartModelService;
96
122
  private readonly _sheetsChartService;
97
123
  private readonly _commandService;
@@ -100,14 +126,27 @@ export declare class SheetsChartUIService extends Disposable {
100
126
  private _univerInstanceService;
101
127
  private _viewState;
102
128
  private _rangeSelectMode;
129
+ private readonly _activeEditChart$;
130
+ private readonly _selectedElement$;
131
+ private readonly _panelRoute$;
132
+ readonly activeEditChart$: Observable<string | null>;
133
+ readonly selectedElement$: Observable<IChartSelectedElementState | null>;
134
+ readonly panelRoute$: Observable<IChartPanelRouteState | null>;
103
135
  constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _localeService: LocaleService, _chartHostProviderService: IChartHostProviderService, _univerInstanceService: IUniverInstanceService);
104
- get activeChartModel(): Nullable<import("@univerjs-pro/sheets-chart").SheetChartModel>;
136
+ get activeChartModel(): Nullable<SheetChartModel>;
137
+ get activeChartModel$(): Observable<Nullable<SheetChartModel>>;
105
138
  get rangeSelectMode(): boolean;
139
+ get activeEditChart(): string | null;
106
140
  get direction$(): Observable<"ltr" | "rtl">;
107
- set rangeSelectMode(on: boolean);
141
+ setRangeSelectMode(on: boolean): void;
142
+ setActiveEditChart(chartId: string | null): void;
143
+ isElementEditModeActive(chartId: string): boolean;
144
+ setSelectedElement(state: IChartSelectedElementState | null): void;
145
+ setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
146
+ clearPanelRoute(): void;
108
147
  getDataSource(id: string): import("@univerjs-pro/sheets-chart/models/types.js").ISheetChartDataSource | undefined;
109
148
  registerViewState<T extends ChartConfigStateKey = ChartConfigStateKey>(id: T, state: (chartModel: ChartModel) => IChartConfigStateMap[T]): void;
110
- getViewState<V extends ChartConfigStateValue = ChartConfigStateValue>(id: ChartConfigStateKey): IChartConfigState<V> | undefined;
149
+ getViewState<V extends ChartConfigStateValue = ChartConfigStateValue>(id: ChartConfigStateKey, activeChartModel?: Nullable<SheetChartModel>): IChartConfigState<V> | undefined;
111
150
  executeChartUpdateConfig(params: Omit<IChartUpdateConfigCommandParams, 'unitId'>): void;
112
151
  executeChartUpdateSourceConfig(params: Omit<IChartUpdateSourceCommandParams, 'unitId'>): void;
113
152
  removeViewState(id: ChartConfigStateKey): void;
@@ -3,15 +3,13 @@ import type { LocaleKey } from '../../locale/types';
3
3
  import type { IChartOptionType } from '../../services/sheets-chart-ui.service';
4
4
  import { AreaLineStyle, AxisAlignEnum, ChartBorderDashType, ChartTrendlineType, InvalidValueType, LabelContentType, LegendPositionEnum, LinePointShape, PieLabelPosition, RadarShape, SelectModeEnum, SeriesLabelPosition, TextAlign, TextVerticalAlign, TitlePositionEnum, WaterfallStackTypeEnum } from '@univerjs-pro/engine-chart';
5
5
  export type OptionType = IChartOptionType;
6
- export declare const defaultOption: {
7
- label: string;
8
- value: string;
9
- };
6
+ export interface ILocaleOption<T = string> {
7
+ label: LocaleKey;
8
+ value: T;
9
+ }
10
+ export declare const defaultOption: ILocaleOption<string>;
10
11
  export declare const chartTypeToIcon: Record<string, ReactNode>;
11
- export declare const seriesChartTypeOptions: {
12
- label: "sheets-chart-ui.categoryDefaultName" | "sheets-chart-ui.seriesDefaultName" | "sheets-chart-ui.theIndexItem" | "sheets-chart-ui.none" | "sheets-chart-ui.line" | "sheets-chart-ui.stack" | "sheets-chart-ui.fill" | "sheets-chart-ui.value" | "sheets-chart-ui.default" | "sheets-chart-ui.category" | "sheets-chart-ui.series" | "sheets-chart-ui.color" | "sheets-chart-ui.min" | "sheets-chart-ui.max" | "sheets-chart-ui.border" | "sheets-chart-ui.point" | "sheets-chart-ui.chartType" | "sheets-chart-ui.legend" | "sheets-chart-ui.gradientFill" | "sheets-chart-ui.backgroundColor" | "sheets-chart-ui.position" | "sheets-chart-ui.reset" | "sheets-chart-ui.aggregate" | "sheets-chart-ui.doughnutHole" | "sheets-chart-ui.indicatorLineType" | "sheets-chart-ui.indicatorLineColor" | "sheets-chart-ui.blank" | "sheets-chart-ui.chartStyle" | "sheets-chart-ui.cloud.word" | "sheets-chart-ui.cloud.frequency" | "sheets-chart-ui.waterfall.positive" | "sheets-chart-ui.waterfall.negative" | "sheets-chart-ui.waterfall.subtotal" | "sheets-chart-ui.boxplot.min" | "sheets-chart-ui.boxplot.max" | "sheets-chart-ui.boxplot.q1" | "sheets-chart-ui.boxplot.median" | "sheets-chart-ui.boxplot.q3" | "sheets-chart-ui.bubble.emptyTips" | "sheets-chart-ui.relation.emptyTips" | "sheets-chart-ui.pareto.lineName" | "sheets-chart-ui.msg.emptyTips" | "sheets-chart-ui.msg.sankeyCircularTips" | "sheets-chart-ui.align.left" | "sheets-chart-ui.align.right" | "sheets-chart-ui.align.center" | "sheets-chart-ui.dataRange" | "sheets-chart-ui.insertChart" | "sheets-chart-ui.editChart" | "sheets-chart-ui.openChartPanel" | "sheets-chart-ui.deleteChart" | "sheets-chart-ui.hideChartPanel" | "sheets-chart-ui.setupChart" | "sheets-chart-ui.customChart" | "sheets-chart-ui.themes" | "sheets-chart-ui.allSeries" | "sheets-chart-ui.addSeries" | "sheets-chart-ui.moreSettings" | "sheets-chart-ui.chartBorderColor" | "sheets-chart-ui.chartAndAxisTitles" | "sheets-chart-ui.legendSelectMode" | "sheets-chart-ui.dataLabels" | "sheets-chart-ui.gridlinesAndTicks" | "sheets-chart-ui.indicatorLine" | "sheets-chart-ui.indicatorLabel" | "sheets-chart-ui.indicatorValue" | "sheets-chart-ui.withOpacity" | "sheets-chart-ui.withColor" | "sheets-chart-ui.withThickness" | "sheets-chart-ui.withType" | "sheets-chart-ui.withSize" | "sheets-chart-ui.withShape" | "sheets-chart-ui.withFormat" | "sheets-chart-ui.dataPoint" | "sheets-chart-ui.dataNodeShape" | "sheets-chart-ui.addDataPoint" | "sheets-chart-ui.percentage" | "sheets-chart-ui.lineDashType" | "sheets-chart-ui.visualMapScope" | "sheets-chart-ui.cloud.title" | "sheets-chart-ui.shape.polygon" | "sheets-chart-ui.shape.circle" | "sheets-chart-ui.shape.square" | "sheets-chart-ui.shape.triangle" | "sheets-chart-ui.shape.diamond" | "sheets-chart-ui.shape.rect" | "sheets-chart-ui.shape.roundRect" | "sheets-chart-ui.shape.pin" | "sheets-chart-ui.shape.arrow" | "sheets-chart-ui.shape.none" | "sheets-chart-ui.shape.emptyCircle" | "sheets-chart-ui.shape.emptySquare" | "sheets-chart-ui.shape.emptyTriangle" | "sheets-chart-ui.shape.emptyDiamond" | "sheets-chart-ui.shape.emptyRect" | "sheets-chart-ui.shape.emptyRoundRect" | "sheets-chart-ui.shape.emptyPin" | "sheets-chart-ui.shape.emptyArrow" | "sheets-chart-ui.waterfall.arrangement" | "sheets-chart-ui.waterfall.stacked" | "sheets-chart-ui.waterfall.stackType" | "sheets-chart-ui.waterfall.showSubtotal" | "sheets-chart-ui.waterfall.positiveStyle" | "sheets-chart-ui.waterfall.negativeStyle" | "sheets-chart-ui.waterfall.subtotalStyle" | "sheets-chart-ui.waterfall.positiveLegendText" | "sheets-chart-ui.waterfall.negativeLegendText" | "sheets-chart-ui.waterfall.subtotalLegendText" | "sheets-chart-ui.radar.fill" | "sheets-chart-ui.bubble.size" | "sheets-chart-ui.bubble.label" | "sheets-chart-ui.bubble.xAxis" | "sheets-chart-ui.bubble.yAxis" | "sheets-chart-ui.dialog.setFormat" | "sheets-chart-ui.dialog.numfmt.date" | "sheets-chart-ui.dialog.numfmt.currency" | "sheets-chart-ui.dialog.numfmt.cancel" | "sheets-chart-ui.dialog.numfmt.general" | "sheets-chart-ui.dialog.numfmt.confirm" | "sheets-chart-ui.dialog.numfmt.accounting" | "sheets-chart-ui.dialog.numfmt.thousandthPercentile" | "sheets-chart-ui.dialog.numfmt.fieldSetting" | "sheets-chart-ui.dialog.numfmt.formatTypes" | "sheets-chart-ui.dialog.numfmt.generalDesc" | "sheets-chart-ui.dialog.numfmt.accountingDesc" | "sheets-chart-ui.dialog.numfmt.currencyDesc" | "sheets-chart-ui.dialog.numfmt.dateDesc" | "sheets-chart-ui.dialog.numfmt.thousandthPercentileDesc" | "sheets-chart-ui.dialog.numfmt.decimalPlaces" | "sheets-chart-ui.dialog.numfmt.currencyTypes" | "sheets-chart-ui.dialog.numfmt.negativeNumberTypes" | "sheets-chart-ui.dialog.numfmt.dateTypes" | "sheets-chart-ui.titles.title" | "sheets-chart-ui.titles.xAxisTitle" | "sheets-chart-ui.titles.yAxisTitle" | "sheets-chart-ui.titles.rightYAxisTitle" | "sheets-chart-ui.titles.titlePosition" | "sheets-chart-ui.titles.subTitle" | "sheets-chart-ui.titles.mainTitle" | "sheets-chart-ui.titles.titleFormat" | "sheets-chart-ui.titles.titleText" | "sheets-chart-ui.titles.titleAlign" | "sheets-chart-ui.relation.auto" | "sheets-chart-ui.relation.circular" | "sheets-chart-ui.relation.force" | "sheets-chart-ui.relation.title" | "sheets-chart-ui.relation.emphasis" | "sheets-chart-ui.relation.layoutType" | "sheets-chart-ui.relation.useValueAsSymbolSize" | "sheets-chart-ui.relation.repulsion" | "sheets-chart-ui.relation.edgeLength" | "sheets-chart-ui.relation.gravity" | "sheets-chart-ui.relation.rotateLabel" | "sheets-chart-ui.relation.forceOptions" | "sheets-chart-ui.pareto.lineSeries" | "sheets-chart-ui.pareto.barSeries" | "sheets-chart-ui.lineType.line" | "sheets-chart-ui.lineType.smooth" | "sheets-chart-ui.lineType.step" | "sheets-chart-ui.dashType.solid" | "sheets-chart-ui.dashType.dot" | "sheets-chart-ui.dashType.dash" | "sheets-chart-ui.axes.axis" | "sheets-chart-ui.axes.axisOptions" | "sheets-chart-ui.axes.horizontalAxis" | "sheets-chart-ui.axes.verticalAxis" | "sheets-chart-ui.axes.rightVerticalAxis" | "sheets-chart-ui.axes.leftAxis" | "sheets-chart-ui.axes.rightAxis" | "sheets-chart-ui.axes.useRightAxis" | "sheets-chart-ui.stackType.stack" | "sheets-chart-ui.stackType.percent" | "sheets-chart-ui.permission.editErr" | "sheets-chart-ui.msg.invalidSource" | "sheets-chart-ui.invalidType.zero" | "sheets-chart-ui.invalidType.gaps" | "sheets-chart-ui.invalidType.connectDataPointsWithStraightLines" | "sheets-chart-ui.seriesBlock.format" | "sheets-chart-ui.seriesBlock.dataPointStyle" | "sheets-chart-ui.axisPositionType.center" | "sheets-chart-ui.axisPositionType.start" | "sheets-chart-ui.axisPositionType.end" | "sheets-chart-ui.settingsLabels.switchToRowOrColumn" | "sheets-chart-ui.settingsLabels.useAsCategoryLabels" | "sheets-chart-ui.settingsLabels.showEmptyCellsAs" | "sheets-chart-ui.positionType.left" | "sheets-chart-ui.positionType.right" | "sheets-chart-ui.positionType.bottom" | "sheets-chart-ui.positionType.top" | "sheets-chart-ui.positionType.hide" | "sheets-chart-ui.positionType.auto" | "sheets-chart-ui.positionType.inside" | "sheets-chart-ui.positionType.outside" | "sheets-chart-ui.alignY.bottom" | "sheets-chart-ui.alignY.top" | "sheets-chart-ui.alignY.middle" | "sheets-chart-ui.legendSelectModeType.single" | "sheets-chart-ui.legendSelectModeType.multiple" | "sheets-chart-ui.legendSelectModeType.close" | "sheets-chart-ui.legendVisualMapType.continuous" | "sheets-chart-ui.legendVisualMapType.piecewise" | "sheets-chart-ui.gridlines.text" | "sheets-chart-ui.gridlines.majorGridlines" | "sheets-chart-ui.ticks.majorTick" | "sheets-chart-ui.ticks.tickPosition" | "sheets-chart-ui.ticks.tickLength" | "sheets-chart-ui.styleEditPanel.padAngle" | "sheets-chart-ui.styleEditPanel.useDateAxis" | "sheets-chart-ui.styleEditPanel.rosePie" | "sheets-chart-ui.styleEditPanel.showLabelLine" | "sheets-chart-ui.styleEditPanel.gap" | "sheets-chart-ui.styleEditPanel.useAbsValue" | "sheets-chart-ui.styleEditPanel.wordCloudShape" | "sheets-chart-ui.styleEditPanel.showLabels" | "sheets-chart-ui.styleEditPanel.showDataLabels" | "sheets-chart-ui.styleEditPanel.halfPie" | "sheets-chart-ui.styleEditPanel.pieValScale" | "sheets-chart-ui.styleEditPanel.pieValSuffix" | "sheets-chart-ui.styleEditPanel.pieDigitalFixed" | "sheets-chart-ui.styleEditPanel.reverseAxisOrder" | "sheets-chart-ui.styleEditPanel.showAxisLine" | "sheets-chart-ui.styleEditPanel.labelPosition" | "sheets-chart-ui.styleEditPanel.labelText" | "sheets-chart-ui.styleEditPanel.repeatWordCould" | "sheets-chart-ui.styleEditPanel.labelRotate" | "sheets-chart-ui.styleEditPanel.dateAxisTips" | "sheets-chart-ui.trendline.exp" | "sheets-chart-ui.trendline.linear" | "sheets-chart-ui.trendline.log" | "sheets-chart-ui.trendline.movingAvg" | "sheets-chart-ui.trendline.poly" | "sheets-chart-ui.trendline.pow" | "sheets-chart-ui.trendline.name" | "sheets-chart-ui.trendline.formula" | "sheets-chart-ui.trendline.displayName" | "sheets-chart-ui.trendline.order" | "sheets-chart-ui.trendline.period" | "sheets-chart-ui.trendline.showFormula" | "sheets-chart-ui.trendline.showR2" | "sheets-chart-ui.trendline.addTrendLine" | "sheets-chart-ui.trendline.trendlineType" | "sheets-chart-ui.trendline.trendlineName" | "sheets-chart-ui.trendline.trendlineColor" | "sheets-chart-ui.trendline.trendlineThickness" | "sheets-chart-ui.trendline.trendlineDashType" | "sheets-chart-ui.trendline.r2" | "sheets-chart-ui.chartTypes.line" | "sheets-chart-ui.chartTypes.column" | "sheets-chart-ui.chartTypes.wordCloud" | "sheets-chart-ui.chartTypes.waterfall" | "sheets-chart-ui.chartTypes.bar" | "sheets-chart-ui.chartTypes.scatter" | "sheets-chart-ui.chartTypes.pie" | "sheets-chart-ui.chartTypes.radar" | "sheets-chart-ui.chartTypes.funnel" | "sheets-chart-ui.chartTypes.sankey" | "sheets-chart-ui.chartTypes.boxplot" | "sheets-chart-ui.chartTypes.heatmap" | "sheets-chart-ui.chartTypes.bubble" | "sheets-chart-ui.chartTypes.combination" | "sheets-chart-ui.chartTypes.area" | "sheets-chart-ui.chartTypes.relation" | "sheets-chart-ui.chartTypes.pareto" | "sheets-chart-ui.chartTypes.areaStacked" | "sheets-chart-ui.chartTypes.areaPercentStacked" | "sheets-chart-ui.chartTypes.barStacked" | "sheets-chart-ui.chartTypes.barPercentStacked" | "sheets-chart-ui.chartTypes.donut" | "sheets-chart-ui.chartTypes.stock";
13
- value: string;
14
- }[];
12
+ export declare const seriesChartTypeOptions: Array<ILocaleOption<string>>;
15
13
  export declare const titleOptions: readonly [{
16
14
  readonly label: "sheets-chart-ui.titles.mainTitle";
17
15
  readonly value: "title";
@@ -65,26 +63,14 @@ export declare const textAlignOptions: readonly [{
65
63
  readonly value: "right";
66
64
  }];
67
65
  export type TextAlignOptionValue = typeof textAlignOptions[number]['value'];
68
- export declare function getAllSeriesOption(): {
69
- label: string;
70
- value: string;
71
- };
66
+ export declare function getAllSeriesOption(): ILocaleOption<string>;
72
67
  export declare const lineOpacityOptions: {
73
68
  label: string;
74
69
  value: string;
75
70
  }[];
76
- export declare const axisPositionOptions: {
77
- label: string;
78
- value: string;
79
- }[];
80
- export declare const borderDashTypeOptions: {
81
- label: string;
82
- value: ChartBorderDashType;
83
- }[];
84
- export declare const linePointShapeOptions: {
85
- label: string;
86
- value: LinePointShape;
87
- }[];
71
+ export declare const axisPositionOptions: Array<ILocaleOption<string>>;
72
+ export declare const borderDashTypeOptions: Array<ILocaleOption<ChartBorderDashType>>;
73
+ export declare const linePointShapeOptions: Array<ILocaleOption<LinePointShape>>;
88
74
  export declare const linePointSizeOptions: {
89
75
  label: string;
90
76
  value: string;
@@ -106,34 +92,13 @@ export declare const trendlineOrderOptions: {
106
92
  label: string;
107
93
  value: string;
108
94
  }[];
109
- export declare const dataLabelPositionOptions: {
110
- label: string;
111
- value: SeriesLabelPosition;
112
- }[];
113
- export declare const pieDataLabelPositionOptions: {
114
- label: string;
115
- value: PieLabelPosition;
116
- }[];
117
- export declare const legendLabelPositionOptions: {
118
- label: string;
119
- value: LegendPositionEnum;
120
- }[];
121
- export declare const legendSelectModeOptions: {
122
- label: string;
123
- value: SelectModeEnum;
124
- }[];
125
- export declare const legendVisualMapTypeOptions: {
126
- label: string;
127
- value: string;
128
- }[];
129
- export declare const titlePositionOptions: {
130
- label: string;
131
- value: TitlePositionEnum;
132
- }[];
133
- export declare const axisTitlePositionOptions: {
134
- label: string;
135
- value: AxisAlignEnum;
136
- }[];
95
+ export declare const dataLabelPositionOptions: Array<ILocaleOption<SeriesLabelPosition>>;
96
+ export declare const pieDataLabelPositionOptions: Array<ILocaleOption<PieLabelPosition>>;
97
+ export declare const legendLabelPositionOptions: Array<ILocaleOption<LegendPositionEnum>>;
98
+ export declare const legendSelectModeOptions: Array<ILocaleOption<SelectModeEnum>>;
99
+ export declare const legendVisualMapTypeOptions: Array<ILocaleOption<string>>;
100
+ export declare const titlePositionOptions: Array<ILocaleOption<TitlePositionEnum>>;
101
+ export declare const axisTitlePositionOptions: Array<ILocaleOption<AxisAlignEnum>>;
137
102
  /**
138
103
  * chart title position options X
139
104
  */
@@ -148,40 +113,22 @@ export declare const titlePositionYOptions: {
148
113
  label: string;
149
114
  value: TextVerticalAlign;
150
115
  }[];
151
- export declare const axisListOptions: {
152
- value: string;
153
- label: string;
154
- }[];
116
+ export declare const axisListOptions: Array<ILocaleOption<string>>;
155
117
  export declare const tickThicknessOptions: {
156
118
  label: string;
157
119
  value: string;
158
120
  }[];
159
- export declare const stackTypeOptions: OptionType[];
160
- export declare const areaLineTypeOptions: {
161
- label: string;
162
- value: AreaLineStyle;
163
- }[];
121
+ export declare const stackTypeOptions: Array<ILocaleOption<string>>;
122
+ export declare const areaLineTypeOptions: Array<ILocaleOption<AreaLineStyle>>;
164
123
  export declare const pieDonutHoleOptions: {
165
124
  label: string;
166
125
  value: string;
167
126
  }[];
168
- export declare const radarShapeOptions: {
169
- label: string;
170
- value: RadarShape;
171
- }[];
172
- export declare const invalidValueOptions: {
173
- label: string;
174
- value: InvalidValueType;
175
- }[];
127
+ export declare const radarShapeOptions: Array<ILocaleOption<RadarShape>>;
128
+ export declare const invalidValueOptions: Array<ILocaleOption<InvalidValueType>>;
176
129
  export declare const labelContentTypeList: LabelContentType[];
177
- export declare const labelContentOptions: {
178
- value: string;
179
- label: LocaleKey;
180
- }[];
181
- export declare const pieLabelContentOptions: {
182
- value: string;
183
- label: LocaleKey;
184
- }[];
130
+ export declare const labelContentOptions: Array<ILocaleOption<string>>;
131
+ export declare const pieLabelContentOptions: ILocaleOption<string>[];
185
132
  export declare const tickLengthOptions: {
186
133
  label: string;
187
134
  value: string;
@@ -190,10 +137,7 @@ export declare const tickWidthOptions: {
190
137
  label: string;
191
138
  value: string;
192
139
  }[];
193
- export declare const RelationLayoutOptions: {
194
- label: string;
195
- value: string;
196
- }[];
140
+ export declare const RelationLayoutOptions: Array<ILocaleOption<string>>;
197
141
  export declare const DateFormatList: {
198
142
  label: string;
199
143
  suffix: string;
@@ -218,7 +162,4 @@ export declare const CurrencyFormatList: ({
218
162
  })[];
219
163
  export declare const UNIVER_SHEET_CHART_FORMAT_DIALOG_ID = "univer-sheet-chart-format-dialog-id";
220
164
  export declare const UNIVER_SHEET_CHART_FORMAT_DIALOG = "univer-sheet-chart-format-dialog";
221
- export declare const waterfallStackTypeOptions: {
222
- label: string;
223
- value: WaterfallStackTypeEnum;
224
- }[];
165
+ export declare const waterfallStackTypeOptions: Array<ILocaleOption<WaterfallStackTypeEnum>>;
@@ -1,5 +1,3 @@
1
- import type { SheetsChartUIService } from '../../services/sheets-chart-ui.service';
2
1
  export declare const RadarChartOptionsEdit: (props: {
3
- service: SheetsChartUIService;
4
2
  className?: string;
5
3
  }) => import("react").JSX.Element;
@@ -1,11 +1,6 @@
1
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
2
- interface IBubbleDataEditProps {
3
- service: SheetsChartUIService;
4
- }
5
1
  export interface IBubbleSeriesOption {
6
2
  label: string;
7
3
  value: string;
8
4
  isCategoryList: boolean;
9
5
  }
10
- export declare const BubbleDataEdit: (props: IBubbleDataEditProps) => import("react").JSX.Element;
11
- export {};
6
+ export declare const BubbleDataEdit: () => import("react").JSX.Element;
@@ -1,4 +1 @@
1
- export declare const ChartEditBlockTitle: ({ title }: {
2
- title: string;
3
- }) => import("react").JSX.Element;
4
1
  export declare const DataTabPanel: () => import("react").JSX.Element;
@@ -1,11 +1,9 @@
1
1
  import type { DeepPartial, IAxisOptions } from '@univerjs-pro/engine-chart';
2
2
  import type { Nullable } from '@univerjs/core';
3
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
4
3
  export interface IAxisOptionsEditProps {
5
4
  valueAxis: boolean;
6
5
  canUseDateAxis: boolean;
7
6
  axisOptions: Nullable<DeepPartial<IAxisOptions>>;
8
7
  onChange?: (axisOptions: DeepPartial<IAxisOptions>) => void;
9
- sheetsChartUIService: SheetsChartUIService;
10
8
  }
11
9
  export declare const AxisOptionsEdit: (props: IAxisOptionsEditProps) => import("react").JSX.Element;
@@ -1,6 +1,6 @@
1
+ import type { PropertyChangeFunction } from '@univerjs-pro/chart-ui';
1
2
  import type { ChartTypeBits, IPieLabelStyle, ISeriesLabelStyle } from '@univerjs-pro/engine-chart';
2
3
  import type { Nullable } from '@univerjs/core';
3
- import type { PropertyChangeFunction } from '../font-format-bar';
4
4
  import type { OptionType } from '../Options';
5
5
  type UnionLabelStyle = ISeriesLabelStyle | IPieLabelStyle;
6
6
  export interface IDataLabelOptionsProps {
@@ -1,6 +1,4 @@
1
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
2
1
  interface ITrendLineStyleEditProps {
3
- service: SheetsChartUIService;
4
2
  isLineSeries: boolean;
5
3
  }
6
4
  export declare const ParetoStyleEdit: (props: ITrendLineStyleEditProps) => import("react").JSX.Element;
@@ -1,8 +1,6 @@
1
1
  import type { Nullable } from '@univerjs/core';
2
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
3
2
  import { ChartTypeBits } from '@univerjs-pro/engine-chart';
4
3
  export declare const PieChartStyleEdit: (props: {
5
4
  chartType: Nullable<ChartTypeBits>;
6
- service: SheetsChartUIService;
7
5
  onChartTypeChange?: (chartType: ChartTypeBits) => void;
8
6
  }) => import("react").JSX.Element;
@@ -1,6 +1 @@
1
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
2
- interface IRelationEditProps {
3
- service: SheetsChartUIService;
4
- }
5
- export declare function RelationEdit(props: IRelationEditProps): import("react").JSX.Element;
6
- export {};
1
+ export declare function RelationEdit(): import("react").JSX.Element;
@@ -1,6 +1 @@
1
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
2
- interface ITrendLineStyleEditProps {
3
- uiService: SheetsChartUIService;
4
- }
5
- export declare const TrendLineStyleEdit: (props: ITrendLineStyleEditProps) => import("react").JSX.Element | null;
6
- export {};
1
+ export declare const TrendLineStyleEdit: () => import("react").JSX.Element | null;
@@ -1,6 +1 @@
1
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
2
- interface IWaterfallSeriesEditProps {
3
- service: SheetsChartUIService;
4
- }
5
- export declare const WaterfallSeriesEdit: (props: IWaterfallSeriesEditProps) => import("react").JSX.Element;
6
- export {};
1
+ export declare const WaterfallSeriesEdit: () => import("react").JSX.Element;
@@ -1,6 +1 @@
1
- import type { SheetsChartUIService } from '../../../services/sheets-chart-ui.service';
2
- interface IWordCloudShapeSelectorProps {
3
- service: SheetsChartUIService;
4
- }
5
- export declare function WordCloudShapeSelector(props: IWordCloudShapeSelectorProps): import("react").JSX.Element;
6
- export {};
1
+ export declare function WordCloudShapeSelector(): import("react").JSX.Element;
@@ -1,9 +1,7 @@
1
1
  import type { IRuntimeAxis } from '@univerjs-pro/engine-chart';
2
2
  import type { Nullable } from '@univerjs/core';
3
- import type { SheetsChartUIService } from '../../../../services/sheets-chart-ui.service';
4
3
  export interface IGridLineAndTickOptionsProps {
5
4
  className?: string;
6
- service: SheetsChartUIService;
7
5
  runtimeAxes: Nullable<IRuntimeAxis[]>;
8
6
  }
9
7
  export declare const GridLineAndTickOptions: (props: IGridLineAndTickOptionsProps) => import("react").JSX.Element;