@univerjs-pro/docs-chart-ui 1.0.0-alpha.7 → 1.0.0-beta.0

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 (107) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ar-SA.js +1 -0
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -0
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +1 -0
  10. package/lib/cjs/locale/it-IT.js +1 -0
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +1 -0
  14. package/lib/cjs/locale/pt-BR.js +1 -0
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +1 -0
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +1 -1
  22. package/lib/es/locale/ar-SA.js +1 -0
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +1 -0
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +1 -0
  30. package/lib/es/locale/it-IT.js +1 -0
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +1 -0
  34. package/lib/es/locale/pt-BR.js +1 -0
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +1 -0
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.css +38 -64
  42. package/lib/index.js +1 -1
  43. package/lib/locale/ar-SA.js +1 -0
  44. package/lib/locale/ca-ES.js +1 -1
  45. package/lib/locale/de-DE.js +1 -0
  46. package/lib/locale/en-US.js +1 -1
  47. package/lib/locale/es-ES.js +1 -1
  48. package/lib/locale/fa-IR.js +1 -1
  49. package/lib/locale/fr-FR.js +1 -1
  50. package/lib/locale/id-ID.js +1 -0
  51. package/lib/locale/it-IT.js +1 -0
  52. package/lib/locale/ja-JP.js +1 -1
  53. package/lib/locale/ko-KR.js +1 -1
  54. package/lib/locale/pl-PL.js +1 -0
  55. package/lib/locale/pt-BR.js +1 -0
  56. package/lib/locale/ru-RU.js +1 -1
  57. package/lib/locale/sk-SK.js +1 -1
  58. package/lib/locale/vi-VN.js +1 -1
  59. package/lib/locale/zh-CN.js +1 -1
  60. package/lib/locale/zh-HK.js +1 -0
  61. package/lib/locale/zh-TW.js +1 -1
  62. package/lib/types/commands/operations/chart-dialog.operation.d.ts +2 -0
  63. package/lib/types/components/DocChartDataEditor.d.ts +4 -4
  64. package/lib/types/components/DocChartEditPanel.d.ts +88 -16
  65. package/lib/types/components/DocChartEditorDialog.d.ts +2 -0
  66. package/lib/types/components/DocChartPreview.d.ts +3 -4
  67. package/lib/types/controllers/components.controller.d.ts +2 -4
  68. package/lib/types/controllers/doc-chart-clipboard.controller.d.ts +2 -2
  69. package/lib/types/index.d.ts +5 -6
  70. package/lib/types/locale/ar-SA.d.ts +3 -0
  71. package/lib/types/locale/de-DE.d.ts +3 -0
  72. package/lib/types/locale/en-US.d.ts +116 -45
  73. package/lib/types/locale/id-ID.d.ts +3 -0
  74. package/lib/types/locale/it-IT.d.ts +3 -0
  75. package/lib/types/locale/pl-PL.d.ts +3 -0
  76. package/lib/types/locale/pt-BR.d.ts +3 -0
  77. package/lib/types/locale/zh-HK.d.ts +3 -0
  78. package/lib/types/menu/chart.menu.d.ts +4 -7
  79. package/lib/types/services/doc-chart-data-edit.service.d.ts +3 -8
  80. package/lib/types/services/doc-chart-host.d.ts +2 -14
  81. package/lib/types/services/doc-chart-insert.service.d.ts +4 -4
  82. package/lib/types/services/doc-chart-render.service.d.ts +6 -11
  83. package/lib/types/services/doc-chart-snapshot-render.service.d.ts +8 -51
  84. package/lib/types/services/doc-chart-ui.service.d.ts +21 -0
  85. package/lib/types/utils/ChartPanelOptions.d.ts +1 -9
  86. package/lib/umd/index.js +1 -1
  87. package/lib/umd/locale/ar-SA.js +1 -0
  88. package/lib/umd/locale/ca-ES.js +1 -1
  89. package/lib/umd/locale/de-DE.js +1 -0
  90. package/lib/umd/locale/en-US.js +1 -1
  91. package/lib/umd/locale/es-ES.js +1 -1
  92. package/lib/umd/locale/fa-IR.js +1 -1
  93. package/lib/umd/locale/fr-FR.js +1 -1
  94. package/lib/umd/locale/id-ID.js +1 -0
  95. package/lib/umd/locale/it-IT.js +1 -0
  96. package/lib/umd/locale/ja-JP.js +1 -1
  97. package/lib/umd/locale/ko-KR.js +1 -1
  98. package/lib/umd/locale/pl-PL.js +1 -0
  99. package/lib/umd/locale/pt-BR.js +1 -0
  100. package/lib/umd/locale/ru-RU.js +1 -1
  101. package/lib/umd/locale/sk-SK.js +1 -1
  102. package/lib/umd/locale/vi-VN.js +1 -1
  103. package/lib/umd/locale/zh-CN.js +1 -1
  104. package/lib/umd/locale/zh-HK.js +1 -0
  105. package/lib/umd/locale/zh-TW.js +1 -1
  106. package/package.json +17 -17
  107. package/lib/types/components/DocChartInlineTableEditor.d.ts +0 -11
@@ -1,61 +1,58 @@
1
1
  declare const locale: {
2
2
  'docs-chart-ui': {
3
- insertChart: string;
4
- editChart: string;
5
- chartType: string;
6
- inlineData: string;
7
- cancel: string;
8
- insert: string;
9
- save: string;
10
- apply: string;
11
- close: string;
12
- duplicate: string;
13
- delete: string;
14
- chartPreview: string;
15
3
  previewRenderFailed: string;
16
- setupChart: string;
17
- customizeChart: string;
18
- data: string;
19
- editData: string;
20
- rows: string;
21
- columns: string;
22
- sharedData: string;
23
- backgroundColor: string;
24
- chartStyle: string;
25
- chartAndAxisTitles: string;
26
- fill: string;
27
- border: string;
28
- title: string;
29
- subtitle: string;
30
- horizontalAxisTitle: string;
31
- verticalAxisTitle: string;
32
- series: string;
33
- showDataLabels: string;
34
- legend: string;
35
- horizontalAxis: string;
36
- verticalAxis: string;
37
- visible: string;
38
- showLabels: string;
39
- reverseAxis: string;
40
- gridlinesAndTicks: string;
41
- indicatorLine: string;
42
- useAbsoluteValue: string;
43
- tableDataEmpty: string;
44
- insertChartFailed: string;
45
4
  updateChartFailed: string;
46
5
  chartNotFound: string;
6
+ close: string;
7
+ common: {
8
+ horizontalAxis: string;
9
+ verticalAxis: string;
10
+ setup: string;
11
+ customize: string;
12
+ editChart: string;
13
+ data: string;
14
+ editData: string;
15
+ tableDataEmpty: string;
16
+ cancel: string;
17
+ duplicate: string;
18
+ apply: string;
19
+ insertChartFailed: string;
20
+ inlineData: string;
21
+ insert: string;
22
+ deleteChart: string;
23
+ insertChart: string;
24
+ chartAndAxisTitles: string;
25
+ chartStyle: string;
26
+ heatmap: string;
27
+ legend: string;
28
+ rightVerticalAxis: string;
29
+ series: string;
30
+ trendline: string;
31
+ category: string;
32
+ label: string;
33
+ value: string;
34
+ valueField: string;
35
+ chartType: string;
36
+ };
37
+ floatMenu: {
38
+ menuTitle: {
39
+ chart: string;
40
+ };
41
+ };
47
42
  chartTypes: {
48
43
  line: string;
49
- area: string;
50
- areaStacked: string;
51
- areaPercentStacked: string;
52
44
  column: string;
53
45
  bar: string;
54
46
  barStacked: string;
55
47
  barPercentStacked: string;
56
48
  pie: string;
57
- scatter: string;
49
+ pieOfPie: string;
50
+ barOfPie: string;
51
+ area: string;
52
+ areaStacked: string;
53
+ areaPercentStacked: string;
58
54
  radar: string;
55
+ scatter: string;
59
56
  combination: string;
60
57
  wordCloud: string;
61
58
  funnel: string;
@@ -66,6 +63,80 @@ declare const locale: {
66
63
  sankey: string;
67
64
  heatmap: string;
68
65
  boxplot: string;
66
+ candlestick: string;
67
+ histogram: string;
68
+ treemap: string;
69
+ sunburst: string;
70
+ gauge: string;
71
+ chord: string;
72
+ };
73
+ section: {
74
+ candlestick: string;
75
+ chord: string;
76
+ funnel: string;
77
+ gauge: string;
78
+ gridlinesAndTicks: string;
79
+ histogram: string;
80
+ indicatorLine: string;
81
+ lineAndArea: string;
82
+ paretoBar: string;
83
+ paretoLine: string;
84
+ pie: string;
85
+ radar: string;
86
+ relation: string;
87
+ sunburst: string;
88
+ treemap: string;
89
+ waterfall: string;
90
+ wordCloud: string;
91
+ };
92
+ candlestick: {
93
+ columnsError: string;
94
+ close: string;
95
+ high: string;
96
+ low: string;
97
+ open: string;
98
+ series: string;
99
+ };
100
+ chord: {
101
+ source: string;
102
+ target: string;
103
+ emptyDiagnostic: string;
104
+ mappingDiagnostic: string;
105
+ configDiagnostic: string;
106
+ count: string;
107
+ associatedValue: string;
108
+ };
109
+ sunburst: {
110
+ hierarchy: string;
111
+ ownValue: string;
112
+ children: string;
113
+ diagnostic: string;
114
+ };
115
+ histogram: {
116
+ frequency: string;
117
+ };
118
+ pie: {
119
+ aggregateOther: string;
120
+ aggregateMembers: string;
121
+ };
122
+ treemap: {
123
+ hierarchy: string;
124
+ ownValue: string;
125
+ children: string;
126
+ diagnostic: string;
127
+ };
128
+ gauge: {
129
+ emptyDiagnostic: string;
130
+ mappingDiagnostic: string;
131
+ configDiagnostic: string;
132
+ };
133
+ chartField: {
134
+ missingCategoryFields: string;
135
+ missingSeriesFields: string;
136
+ invalidFieldIndex: string;
137
+ invalidValueFieldType: string;
138
+ invalidDataStructure: string;
139
+ unsupportedChartType: string;
69
140
  };
70
141
  };
71
142
  };
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -1,12 +1,9 @@
1
1
  import type { IAccessor } from '@univerjs/core';
2
- import type { IMenuButtonItem, IMenuSelectorItem, IValueOption } from '@univerjs/ui';
3
- import type { LocaleKey } from '../locale/types';
4
- import { ChartTypeBits } from '@univerjs-pro/engine-chart';
2
+ import type { IMenuButtonItem } from '@univerjs/ui';
5
3
  import { Observable } from 'rxjs';
6
4
  export declare const DOC_CHART_INSERT_MENU_ID: string;
7
5
  export declare const DOC_CHART_INSERT_BELOW_MENU_ID: string;
8
- export declare const DOC_CHART_INSERT_MENU_OPTIONS: Array<IValueOption<LocaleKey, ChartTypeBits>>;
9
6
  export declare function getDocChartInsertDisabledObservable(accessor: IAccessor): Observable<boolean>;
10
- export declare function DocChartInsertRibbonMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, ChartTypeBits, ChartTypeBits>;
11
- export declare function DocChartInsertMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
12
- export declare function DocChartInsertBelowMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
7
+ export declare function DocChartInsertRibbonMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
8
+ export declare function DocChartInsertMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
9
+ export declare function DocChartInsertBelowMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
@@ -1,5 +1,4 @@
1
- import type { DocChartCellValue, IDocChartContext } from '@univerjs-pro/docs-chart';
2
- import type { ChartStyle, ChartTypeBits, IChartDataAggregation } from '@univerjs-pro/engine-chart';
1
+ import type { InlineChartCellValue } from '@univerjs-pro/engine-chart';
3
2
  import { DocChartResourceService } from '@univerjs-pro/docs-chart';
4
3
  import { ICommandService } from '@univerjs/core';
5
4
  import { DocChartDataEditorSubmitMode } from '../components/DocChartDataEditor';
@@ -7,7 +6,7 @@ export interface IDocChartDataEditorState {
7
6
  unitId: string;
8
7
  chartId: string;
9
8
  dataSourceId: string;
10
- values: DocChartCellValue[][];
9
+ values: InlineChartCellValue[][];
11
10
  sharingCount: number;
12
11
  }
13
12
  export declare class DocChartDataEditService {
@@ -15,10 +14,6 @@ export declare class DocChartDataEditService {
15
14
  private readonly _resourceService;
16
15
  constructor(_commandService: ICommandService, _resourceService: DocChartResourceService);
17
16
  getEditorState(unitId: string, chartId: string): IDocChartDataEditorState | null;
18
- updateChartType(unitId: string, chartId: string, chartType: ChartTypeBits): boolean;
19
- updateChartStyle(unitId: string, chartId: string, style: ChartStyle): boolean;
20
- updateChartContext(unitId: string, chartId: string, context: Partial<IDocChartContext>): boolean;
21
- updateDataAggregation(unitId: string, chartId: string, dataAggregation: Partial<IChartDataAggregation>): boolean;
22
17
  updateDataFromText(unitId: string, chartId: string, text: string, mode: DocChartDataEditorSubmitMode): boolean;
23
- updateData(unitId: string, chartId: string, values: DocChartCellValue[][], mode: DocChartDataEditorSubmitMode): boolean;
18
+ updateData(unitId: string, chartId: string, values: InlineChartCellValue[][], mode: DocChartDataEditorSubmitMode): boolean;
24
19
  }
@@ -1,18 +1,6 @@
1
- import type { ChartImageSource, IChartHostRect, IChartHostStyle, IDomChartHost } from '@univerjs-pro/engine-chart';
2
- import { ChartHostRenderMode, ImageChartHost } from '@univerjs-pro/engine-chart';
1
+ import type { IChartHostRect, IChartHostStyle, IDomChartHost } from '@univerjs-pro/engine-chart';
2
+ import { ChartHostRenderMode } from '@univerjs-pro/engine-chart';
3
3
  import { Disposable } from '@univerjs/core';
4
- export declare class DocImageChartHost extends ImageChartHost {
5
- private readonly _rect;
6
- private _dataUrl;
7
- constructor(chartId: string, _rect: IChartHostRect);
8
- getRect(): IChartHostRect;
9
- setStyle(_style: IChartHostStyle): void;
10
- nextVersion(): number;
11
- commitSnapshot(image: ChartImageSource, _version: number): boolean;
12
- requestPaint(): void;
13
- invalidateSnapshot(): void;
14
- getDataUrl(): string | undefined;
15
- }
16
4
  export declare class DocDomChartHost extends Disposable implements IDomChartHost {
17
5
  readonly chartId: string;
18
6
  private readonly _host;
@@ -1,10 +1,10 @@
1
- import type { DocChartCellValue, IDocChartContext, IInsertDocChartCommandResult } from '@univerjs-pro/docs-chart';
2
- import type { ChartStyle, ChartTypeBits, IChartDataAggregation } from '@univerjs-pro/engine-chart';
1
+ import type { IInsertDocChartCommandResult } from '@univerjs-pro/docs-chart';
2
+ import type { ChartStyle, ChartTypeBits, IChartDataAggregation, InlineChartCellValue, IStaticChartContext } from '@univerjs-pro/engine-chart';
3
3
  import type { ITextRangeParam } from '@univerjs/core';
4
4
  import { ICommandService, IUniverInstanceService } from '@univerjs/core';
5
5
  import { DocContentInsertService, DocSelectionManagerService } from '@univerjs/docs';
6
6
  export interface IDocChartInsertOptions {
7
- context?: IDocChartContext;
7
+ context?: IStaticChartContext;
8
8
  dataAggregation?: IChartDataAggregation;
9
9
  style?: ChartStyle;
10
10
  insertRange?: ITextRangeParam;
@@ -22,7 +22,7 @@ export declare class DocChartInsertService {
22
22
  private readonly _docContentInsertService;
23
23
  constructor(_instanceService: IUniverInstanceService, _commandService: ICommandService, _docSelectionManagerService: DocSelectionManagerService, _docContentInsertService: DocContentInsertService);
24
24
  insertChartFromText(text: string, chartType: ChartTypeBits, options?: IDocChartInsertOptions): IDocChartInsertResult | false;
25
- insertChart(values: DocChartCellValue[][], chartType: ChartTypeBits, options?: IDocChartInsertOptions): IDocChartInsertResult | false;
25
+ insertChart(values: InlineChartCellValue[][], chartType: ChartTypeBits, options?: IDocChartInsertOptions): IDocChartInsertResult | false;
26
26
  private _resolveInsertPosition;
27
27
  private _prepareStandaloneInsertLine;
28
28
  }
@@ -1,30 +1,25 @@
1
- import type { IDocChartRuntimeModel } from '@univerjs-pro/docs-chart';
2
- import type { ChartHostRenderMode, ChartStyle, IChartConfig, IChartHostRect, IChartHostStyle, IChartInstance, IChartRenderInstance, IChartRenderModel } from '@univerjs-pro/engine-chart';
1
+ import type { ChartHostRenderMode, ChartRuntimeStyle, ChartStyle, IChartConfig, IChartHostRect, IChartHostStyle, IChartInstance, IChartRenderInstance, IStaticChartModelRuntime } from '@univerjs-pro/engine-chart';
3
2
  import { ChartThemeService, IChartRenderModelManagerService } from '@univerjs-pro/engine-chart';
4
3
  import { Disposable, LocaleService } from '@univerjs/core';
5
4
  export interface IDocChartRenderSpecResult {
6
5
  spec: Record<string, unknown>;
7
6
  chartConfig: IChartConfig;
8
- chartStyle: ChartStyle;
7
+ chartStyle: ChartRuntimeStyle;
9
8
  hostStyle: IChartHostStyle;
10
9
  }
11
10
  export interface IDocChartRenderInput {
12
11
  chartConfig: IChartConfig;
13
- chartStyle: ChartStyle;
12
+ chartStyle: ChartRuntimeStyle;
14
13
  }
15
- export declare const IDocChartRenderModelService: import("@wendellhu/redi").IdentifierDecorator<IChartRenderModel<Record<string, any>>>;
16
14
  export declare class DocChartRenderService extends Disposable {
17
15
  private readonly _localeService;
18
16
  private readonly _chartThemeService;
19
17
  private readonly _renderModelManager;
20
- constructor(_localeService: LocaleService, _chartThemeService: ChartThemeService, renderModelManager: IChartRenderModelManagerService, renderModel?: IChartRenderModel);
21
- registerRenderModel(name: string, renderModel: IChartRenderModel): void;
22
- setRenderModel(name: string): void;
23
- getRenderModel(name?: string): IChartRenderModel | undefined;
18
+ constructor(_localeService: LocaleService, _chartThemeService: ChartThemeService, _renderModelManager: IChartRenderModelManagerService);
24
19
  createChartInstance(): IChartInstance;
25
20
  createChartInstance(mode: ChartHostRenderMode): IChartRenderInstance;
26
- createRenderInput(runtime: IDocChartRuntimeModel): IDocChartRenderInput;
27
- createRenderSpec(runtime: IDocChartRuntimeModel, rect: IChartHostRect, chartInstance?: IChartInstance): IDocChartRenderSpecResult;
21
+ createRenderInput(runtime: IStaticChartModelRuntime): IDocChartRenderInput;
22
+ createRenderSpec(runtime: IStaticChartModelRuntime, rect: IChartHostRect, chartInstance?: IChartInstance): IDocChartRenderSpecResult;
28
23
  getHostStyle(chartStyle: ChartStyle): IDocChartRenderSpecResult['hostStyle'];
29
24
  applyHostStyle(host: HTMLElement, hostStyle: IDocChartRenderSpecResult['hostStyle']): void;
30
25
  private _createChartRenderInstanceContext;
@@ -1,56 +1,13 @@
1
- import type { IDocChartRuntimeModel } from '@univerjs-pro/docs-chart';
1
+ import type { IChartSnapshotRenderer, IChartSnapshotRequest } from '@univerjs-pro/chart-ui';
2
+ import type { IStaticChartModelRuntime } from '@univerjs-pro/engine-chart';
3
+ import { ChartSnapshotQueue } from '@univerjs-pro/chart-ui';
2
4
  import { DocChartModelService } from '@univerjs-pro/docs-chart';
3
- import { Disposable, LocaleService } from '@univerjs/core';
4
- import { Subject } from 'rxjs';
5
+ import { LocaleService } from '@univerjs/core';
5
6
  import { DocChartRenderService } from './doc-chart-render.service';
6
- export interface IDocChartSnapshotRequest {
7
- unitId: string;
8
- chartId: string;
9
- width: number;
10
- height: number;
11
- dpr?: number;
7
+ export interface IDocChartSnapshotRequest extends IChartSnapshotRequest {
12
8
  mode?: 'main' | 'print' | 'export';
13
9
  }
14
- export interface IDocChartSnapshotEntry {
15
- key: string;
16
- status: 'pending' | 'ready' | 'error';
17
- dataUrl?: string;
18
- error?: unknown;
19
- }
20
- export interface IDocChartInvalidation {
21
- unitId: string;
22
- chartId: string;
23
- }
24
- export interface IDocChartInvalidationOptions {
25
- waitForConfig?: boolean;
26
- }
27
- export interface IDocChartSnapshotRenderer {
28
- render(request: IDocChartSnapshotRequest, runtime: IDocChartRuntimeModel): Promise<string>;
29
- }
30
- export declare const IDocChartSnapshotRendererService: import("@wendellhu/redi").IdentifierDecorator<IDocChartSnapshotRenderer>;
31
- export declare class DocChartSnapshotRenderService extends Disposable {
32
- private readonly _localeService;
33
- private readonly _modelService;
34
- readonly snapshotUpdated$: Subject<IDocChartSnapshotEntry>;
35
- readonly chartInvalidated$: Subject<IDocChartInvalidation>;
36
- private readonly _cache;
37
- private readonly _queue;
38
- private readonly _configWaitKeys;
39
- private _rendering;
40
- private _activeDrain;
41
- private readonly _renderer;
42
- constructor(_localeService: LocaleService, _modelService: DocChartModelService, renderService: DocChartRenderService, renderer?: IDocChartSnapshotRenderer);
43
- requestSnapshot(request: IDocChartSnapshotRequest): IDocChartSnapshotEntry;
44
- getSnapshot(request: IDocChartSnapshotRequest): IDocChartSnapshotEntry | undefined;
45
- invalidateChart(unitId: string, chartId: string, options?: IDocChartInvalidationOptions): void;
46
- getCacheKey(request: IDocChartSnapshotRequest): string;
47
- flushForTests(): Promise<void>;
48
- dispose(): void;
49
- private _drainQueue;
50
- private _invalidateSnapshotsForDirectionChange;
51
- private _runQueue;
52
- private _renderOne;
53
- private _waitForRuntimeConfig;
54
- private _getChartKey;
55
- private _getRuntimeModel;
10
+ export declare const IDocChartSnapshotRendererService: import("@wendellhu/redi").IdentifierDecorator<IChartSnapshotRenderer<IDocChartSnapshotRequest, IStaticChartModelRuntime>>;
11
+ export declare class DocChartSnapshotRenderService extends ChartSnapshotQueue<IDocChartSnapshotRequest> {
12
+ constructor(localeService: LocaleService, modelService: DocChartModelService, renderService: DocChartRenderService, renderer?: IChartSnapshotRenderer<IDocChartSnapshotRequest>);
56
13
  }
@@ -0,0 +1,21 @@
1
+ import type { IUpdateDocChartConfigCommandParams } from '@univerjs-pro/docs-chart';
2
+ import type { IChartContext, IChartDataAggregation, IStaticChartModelRuntime } from '@univerjs-pro/engine-chart';
3
+ import { ChartUIService, ChartViewStateRegistry } from '@univerjs-pro/chart-ui';
4
+ import { DocChartModelService } from '@univerjs-pro/docs-chart';
5
+ import { ICommandService } from '@univerjs/core';
6
+ type DocChartUpdateConfigParams = Omit<IUpdateDocChartConfigCommandParams, 'unitId' | 'chartId'> & {
7
+ unitId?: string;
8
+ chartId?: string;
9
+ context?: Partial<IChartContext>;
10
+ dataAggregation?: Partial<IChartDataAggregation>;
11
+ };
12
+ export type IDocChartUIService = DocChartUIService;
13
+ export declare const IDocChartUIService: import("@wendellhu/redi").IdentifierDecorator<DocChartUIService>;
14
+ export declare class DocChartUIService extends ChartUIService<IStaticChartModelRuntime, DocChartUpdateConfigParams> {
15
+ private readonly _modelService;
16
+ private readonly _commandService;
17
+ constructor(_modelService: DocChartModelService, _commandService: ICommandService, viewStates: ChartViewStateRegistry);
18
+ get activeRuntimeModel(): IStaticChartModelRuntime | null;
19
+ executeChartUpdateConfig(params: DocChartUpdateConfigParams): void;
20
+ }
21
+ export {};
@@ -1,9 +1 @@
1
- import type { IChartTypeOption } from '@univerjs-pro/chart-ui';
2
- import type { LocaleKey } from '../locale/types';
3
- import { ChartTypeBits } from '@univerjs-pro/engine-chart';
4
- export interface IDocChartTypeOption extends IChartTypeOption<LocaleKey> {
5
- label: LocaleKey;
6
- value: ChartTypeBits;
7
- }
8
- export declare const DOC_CHART_TYPE_OPTIONS: IDocChartTypeOption[];
9
- export declare const DOC_CHART_QUICK_TYPE_OPTIONS: IDocChartTypeOption[];
1
+ export declare const DOC_CHART_QUICK_TYPE_OPTIONS: import("@univerjs-pro/chart-ui").IStaticChartTypeCatalogEntry[];