@univerjs-pro/sheets-chart-ui 1.0.0-alpha.8 → 1.0.0-beta.1

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 (138) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ar-SA.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -1
  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 -1
  10. package/lib/cjs/locale/it-IT.js +1 -1
  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 -1
  14. package/lib/cjs/locale/pt-BR.js +1 -1
  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 -1
  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 -1
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +1 -1
  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 -1
  30. package/lib/es/locale/it-IT.js +1 -1
  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 -1
  34. package/lib/es/locale/pt-BR.js +1 -1
  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 -1
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.css +16 -404
  42. package/lib/index.js +1 -1
  43. package/lib/locale/ar-SA.js +1 -1
  44. package/lib/locale/ca-ES.js +1 -1
  45. package/lib/locale/de-DE.js +1 -1
  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 -1
  51. package/lib/locale/it-IT.js +1 -1
  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 -1
  55. package/lib/locale/pt-BR.js +1 -1
  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 -1
  61. package/lib/locale/zh-TW.js +1 -1
  62. package/lib/types/commands/commands/focused-chart.command.d.ts +1 -1
  63. package/lib/types/commands/commands/sheet-chart-menu.command.d.ts +4 -1
  64. package/lib/types/commands/operations/open-chart-panel-operation.d.ts +1 -1
  65. package/lib/types/config/config.d.ts +1 -1
  66. package/lib/types/controllers/chart-element-float-menu.controller.d.ts +4 -3
  67. package/lib/types/controllers/chart-render.controller.d.ts +3 -1
  68. package/lib/types/controllers/ui.controller.d.ts +6 -8
  69. package/lib/types/index.d.ts +0 -2
  70. package/lib/types/locale/en-US.d.ts +51 -351
  71. package/lib/types/menu/chart-context-menu.d.ts +0 -1
  72. package/lib/types/services/chart-element-selection.d.ts +4 -6
  73. package/lib/types/services/chart-image-export-provider.d.ts +15 -0
  74. package/lib/types/services/chart-render.service.d.ts +10 -10
  75. package/lib/types/services/sheet-chart-host.d.ts +3 -0
  76. package/lib/types/services/sheets-chart-ui.service.d.ts +25 -151
  77. package/lib/types/util.d.ts +7 -4
  78. package/lib/types/views/chart-edit-panel/ChartEditPanel.d.ts +1 -1
  79. package/lib/types/views/chart-edit-panel/chart-editor-default-values.d.ts +79 -0
  80. package/lib/types/views/chart-edit-panel/data-tab-panel/DataTabPanel.d.ts +4 -1
  81. package/lib/types/views/chart-edit-panel/style-tab-panel/StyleTabPanel.d.ts +4 -5
  82. package/lib/umd/index.js +1 -1
  83. package/lib/umd/locale/ar-SA.js +1 -1
  84. package/lib/umd/locale/ca-ES.js +1 -1
  85. package/lib/umd/locale/de-DE.js +1 -1
  86. package/lib/umd/locale/en-US.js +1 -1
  87. package/lib/umd/locale/es-ES.js +1 -1
  88. package/lib/umd/locale/fa-IR.js +1 -1
  89. package/lib/umd/locale/fr-FR.js +1 -1
  90. package/lib/umd/locale/id-ID.js +1 -1
  91. package/lib/umd/locale/it-IT.js +1 -1
  92. package/lib/umd/locale/ja-JP.js +1 -1
  93. package/lib/umd/locale/ko-KR.js +1 -1
  94. package/lib/umd/locale/pl-PL.js +1 -1
  95. package/lib/umd/locale/pt-BR.js +1 -1
  96. package/lib/umd/locale/ru-RU.js +1 -1
  97. package/lib/umd/locale/sk-SK.js +1 -1
  98. package/lib/umd/locale/vi-VN.js +1 -1
  99. package/lib/umd/locale/zh-CN.js +1 -1
  100. package/lib/umd/locale/zh-HK.js +1 -1
  101. package/lib/umd/locale/zh-TW.js +1 -1
  102. package/package.json +20 -20
  103. package/lib/types/hooks.d.ts +0 -3
  104. package/lib/types/services/chart-panel-route.d.ts +0 -20
  105. package/lib/types/views/chart-edit-panel/Options.d.ts +0 -163
  106. package/lib/types/views/chart-edit-panel/RadarChartOptionsEdit.d.ts +0 -3
  107. package/lib/types/views/chart-edit-panel/button-switch/ButtonSwitch.d.ts +0 -8
  108. package/lib/types/views/chart-edit-panel/button-switch/index.d.ts +0 -1
  109. package/lib/types/views/chart-edit-panel/data-tab-panel/BubbleDataEdit.d.ts +0 -6
  110. package/lib/types/views/chart-edit-panel/data-tab-panel/CandlestickDataEdit.d.ts +0 -7
  111. package/lib/types/views/chart-edit-panel/data-tab-panel/HistogramDataEdit.d.ts +0 -1
  112. package/lib/types/views/chart-edit-panel/data-tab-panel/TreemapDataEdit.d.ts +0 -12
  113. package/lib/types/views/chart-edit-panel/data-tab-panel/index.d.ts +0 -1
  114. package/lib/types/views/chart-edit-panel/index.d.ts +0 -1
  115. package/lib/types/views/chart-edit-panel/style-tab-panel/AxisOptionsEdit.d.ts +0 -9
  116. package/lib/types/views/chart-edit-panel/style-tab-panel/CandlestickStyleEdit.d.ts +0 -3
  117. package/lib/types/views/chart-edit-panel/style-tab-panel/ChartNumfmtDialog.d.ts +0 -6
  118. package/lib/types/views/chart-edit-panel/style-tab-panel/DataLabelOptions.d.ts +0 -25
  119. package/lib/types/views/chart-edit-panel/style-tab-panel/HistogramStyleEdit.d.ts +0 -1
  120. package/lib/types/views/chart-edit-panel/style-tab-panel/IndicatorLine.d.ts +0 -16
  121. package/lib/types/views/chart-edit-panel/style-tab-panel/ParetoLine.d.ts +0 -5
  122. package/lib/types/views/chart-edit-panel/style-tab-panel/PieChartStyleEdit.d.ts +0 -6
  123. package/lib/types/views/chart-edit-panel/style-tab-panel/RelationEdit.d.ts +0 -1
  124. package/lib/types/views/chart-edit-panel/style-tab-panel/TreemapStyleEdit.d.ts +0 -6
  125. package/lib/types/views/chart-edit-panel/style-tab-panel/TrendLineEdit.d.ts +0 -1
  126. package/lib/types/views/chart-edit-panel/style-tab-panel/WaterfallSeriesEdit.d.ts +0 -1
  127. package/lib/types/views/chart-edit-panel/style-tab-panel/WordCloudShapeSelector.d.ts +0 -1
  128. package/lib/types/views/chart-edit-panel/style-tab-panel/grid-line-and-tick-options/GridLineAndTickOptions.d.ts +0 -7
  129. package/lib/types/views/chart-edit-panel/style-tab-panel/grid-line-and-tick-options/index.d.ts +0 -1
  130. package/lib/types/views/chart-edit-panel/style-tab-panel/index.d.ts +0 -1
  131. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/CombinationChartTypeSelect.d.ts +0 -4
  132. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/DataPointsEdit.d.ts +0 -11
  133. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/RadarPoints.d.ts +0 -7
  134. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/SeriesStyleEdit.d.ts +0 -7
  135. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/Widgets.d.ts +0 -33
  136. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/const.d.ts +0 -2
  137. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/index.d.ts +0 -1
  138. package/lib/types/views/chart-edit-panel/style-tab-panel/series-style-edit/use-series-chart-type.d.ts +0 -3
@@ -1,169 +1,43 @@
1
- import type { AreaLineStyle, ChartModel, ChartPendingConfig, ChartStyle, DeepPartial, IAllSeriesStyle, IAxisOptions, IChartCandlestickMappingSpec, IChartCandlestickSpec, IChartConfigOperation, IChartContext, IChartHistogramDataSpec, IChartHistogramStyleSpec, IChartStyle, IChartTreemapSpec, ILegendStyle, InvalidValueType, IPieLabelStyle, IRelationForceOptions, IRuntimeAxis, ITrendLine, IUniverDataSet, LinePointShape, RadarShape, RelationChartLayoutEnum, RightYAxisOptions, TitlePositionEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from '@univerjs-pro/engine-chart';
2
- import type { IChartSourceMultiRangeItem, IChartUpdateConfigCommandParams, IChartUpdateSourceCommandParams, ISheetChartSourceSingleRange, SheetChartModel } from '@univerjs-pro/sheets-chart';
3
- import type { Nullable } from '@univerjs/core';
4
- import type { Observable } from 'rxjs';
5
- import type { IChartEditPanelRoute, IChartPanelRouteState, IChartSelectedElementState } from './chart-panel-route';
6
- import { CategoryType, ChartTypeBits, DataOrientation } from '@univerjs-pro/engine-chart';
1
+ import type { IChartEditPanelRoute, IChartPanelRouteState, IChartSelectedElementState } from '@univerjs-pro/chart-ui';
2
+ import type { ChartModel } from '@univerjs-pro/engine-chart';
3
+ import type { IChartSourceMultiRangeItem, IChartUpdateConfigCommandParams, ISheetChartDataSource, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
4
+ import { ChartUIService, ChartViewStateRegistry } from '@univerjs-pro/chart-ui';
5
+ import { DataOrientation } from '@univerjs-pro/engine-chart';
7
6
  import { ChartModelService, SheetsChartService } from '@univerjs-pro/sheets-chart';
8
- import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
9
- import { IChartHostProviderService } from './sheets-chart-host-provider.service';
10
- export declare function registryChartConfigState(service: ISheetsChartUIService): void;
11
- export interface IChartOptionType {
12
- label: string;
13
- value: string;
14
- }
15
- export declare function getChartDataResourceOptions(dataSet: IUniverDataSet, headers: string[] | undefined, getFallback: (index: number) => string): IChartOptionType[];
16
- export interface IChartConfigStateMap {
17
- headers: IChartConfigState<IChartContext['headers']>;
18
- dataResourceList: IChartConfigState<IChartOptionType[]>;
19
- orient: IChartConfigState<Nullable<DataOrientation>>;
20
- aggregate: IChartConfigState<boolean>;
21
- gradientFill: IChartConfigState<Nullable<boolean>>;
22
- indicator: IChartConfigState<Nullable<ChartStyle['tooltip']>>;
23
- chartType: IChartConfigState<ChartTypeBits>;
24
- dataRange: IChartConfigState<Nullable<ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]>>;
25
- /** Series & Category */
26
- categoryIndex: IChartConfigState<Nullable<number>>;
27
- categoryType: IChartConfigState<Nullable<CategoryType>>;
28
- candlestickMapping: IChartConfigState<IChartCandlestickMappingSpec | undefined, IChartCandlestickMappingSpec>;
29
- candlestickStyle: IChartConfigState<IChartCandlestickSpec | undefined, Exclude<ChartPendingConfig['candlestick'], null | undefined>>;
30
- histogramData: IChartConfigState<IChartHistogramDataSpec | undefined, IChartHistogramDataSpec | undefined>;
31
- histogramStyle: IChartConfigState<IChartHistogramStyleSpec | undefined, IChartHistogramStyleSpec | undefined>;
32
- treemapHierarchyIndexes: IChartConfigState<number[]>;
33
- treemapValueIndex: IChartConfigState<number | undefined, number | undefined>;
34
- treemapStyle: IChartConfigState<IChartTreemapSpec | undefined, IChartTreemapSpec | undefined>;
35
- categoryList: IChartConfigState<IChartOptionType[]>;
36
- bubbleCategoryList: IChartConfigState<IChartOptionType[]>;
37
- seriesValues: IChartConfigState<number[]>;
38
- trendlineValues: IChartConfigState<ITrendLine[] | undefined>;
39
- seriesList: IChartConfigState<IChartOptionType[]>;
40
- seriesResourceList: IChartConfigState<IChartOptionType[]>;
41
- asCategory: IChartConfigState<boolean>;
42
- backgroundColor: IChartConfigState<Nullable<string>>;
43
- borderColor: IChartConfigState<Nullable<string>>;
44
- fontSize: IChartConfigState<number | undefined, number>;
45
- titleFontSize: IChartConfigState<number | undefined, number>;
46
- titles: IChartConfigState<Nullable<DeepPartial<IChartStyle['titles']>>, DeepPartial<IChartStyle['titles']>>;
47
- allSeriesStyle: IChartConfigState<Nullable<DeepPartial<IAllSeriesStyle>>, IAllSeriesStyle>;
48
- seriesStyleMap: IChartConfigState<ChartStyle['seriesStyleMap']>;
49
- legendStyle: IChartConfigState<Nullable<DeepPartial<ILegendStyle>>, Partial<ILegendStyle>>;
50
- /** Axes */
51
- xAxisOptions: IChartConfigState<Nullable<DeepPartial<IAxisOptions>>, Partial<IAxisOptions>>;
52
- yAxisOptions: IChartConfigState<Nullable<DeepPartial<IAxisOptions>>, Partial<IAxisOptions>>;
53
- rightYAxisOptions: IChartConfigState<Nullable<DeepPartial<RightYAxisOptions>>, Partial<RightYAxisOptions>>;
54
- runtimeAxes: IChartConfigState<Nullable<IRuntimeAxis[]>>;
55
- areaLineStyle: IChartConfigState<Nullable<AreaLineStyle>>;
56
- pieLabelStyle: IChartConfigState<Nullable<DeepPartial<IPieLabelStyle>>>;
57
- wordCloudShape: IChartConfigState<Nullable<WordCloudShapeEnum>> | undefined;
58
- wordCloudMask: IChartConfigState<Nullable<string>> | undefined;
59
- wordCloudRepeat: IChartConfigState<Nullable<boolean>> | undefined;
60
- funnelGap: IChartConfigState<Nullable<number>>;
61
- funnelUseAbsValue: IChartConfigState<Nullable<boolean>>;
62
- padAngleStyle: IChartConfigState<Nullable<boolean>, boolean>;
63
- isHalfPie: IChartConfigState<Nullable<boolean>, boolean>;
64
- isRosePie: IChartConfigState<Nullable<boolean>, boolean>;
65
- showLabelLine: IChartConfigState<Nullable<boolean>, boolean>;
66
- doughnutHole: IChartConfigState<Nullable<number>, number>;
67
- pieBorderColor: IChartConfigState<Nullable<string>, string>;
68
- radarShape: IChartConfigState<Nullable<RadarShape>, RadarShape>;
69
- radarFill: IChartConfigState<Nullable<boolean>, boolean>;
70
- invalidValueType: IChartConfigState<Nullable<InvalidValueType>, InvalidValueType>;
71
- dataPointsOptions: IChartConfigState<Nullable<IChartOptionType[]>>;
72
- chartThemeColorType: IChartConfigState<Nullable<string>>;
73
- titlePosition: IChartConfigState<Nullable<TitlePositionEnum>, TitlePositionEnum>;
74
- bubbleSizeIndex: IChartConfigState<Nullable<number>, number | undefined>;
75
- scatterXIndex: IChartConfigState<Nullable<number>, number>;
76
- scatterYIndex: IChartConfigState<Nullable<number>, number>;
77
- scatterLabelIndex: IChartConfigState<Nullable<number>, number>;
78
- bubbleSeriesIndex: IChartConfigState<Nullable<number>, number>;
79
- relationLayout: IChartConfigState<Nullable<RelationChartLayoutEnum>, RelationChartLayoutEnum>;
80
- useValueAsSymbolSize: IChartConfigState<Nullable<boolean>, boolean>;
81
- forceOption: IChartConfigState<Nullable<IRelationForceOptions>, IRelationForceOptions | undefined>;
82
- rotateLabel: IChartConfigState<Nullable<boolean>, boolean>;
83
- useEmphasis: IChartConfigState<Nullable<boolean>, boolean>;
84
- relationNodeShape: IChartConfigState<Nullable<LinePointShape>, LinePointShape>;
85
- useDateAxis: IChartConfigState<Nullable<boolean>, boolean>;
86
- waterfallStack: IChartConfigState<Nullable<WaterfallStackTypeEnum>, WaterfallStackTypeEnum>;
87
- useSubtotal: IChartConfigState<Nullable<boolean>, boolean>;
88
- paretoStyle: IChartConfigState<Nullable<ChartStyle['pareto']>, ChartStyle['pareto']>;
89
- paretoDataPointsOptions: IChartConfigState<Nullable<IChartOptionType[]>>;
90
- visualMapType: IChartConfigState<Nullable<'continuous' | 'piecewise'>, 'continuous' | 'piecewise'>;
91
- heatmapMax: IChartConfigState<Nullable<number>, number>;
92
- heatmapMin: IChartConfigState<Nullable<number>, number>;
93
- valueSuffix: IChartConfigState<Nullable<string>, string>;
94
- valueScale: IChartConfigState<Nullable<number>, number>;
95
- digitalFixed: IChartConfigState<Nullable<number>, number>;
96
- }
97
- export type ChartConfigStateKey = keyof IChartConfigStateMap;
98
- export type ChartConfigStateValue = InferChartConfigStateValue<ChartConfigStateKey>;
99
- export type InferChartConfigStateValue<T extends ChartConfigStateKey, M = IChartConfigStateMap[T]> = M extends {
100
- get(): Observable<infer V> | undefined;
101
- } ? V : M extends Observable<infer V> ? V : never;
102
- export type IChartConfigState<GetValue, SetValue = GetValue> = {
103
- set?(value: SetValue): void;
104
- get(): Observable<GetValue> | undefined;
105
- } | Observable<GetValue>;
106
- export interface ISheetsChartUIService {
107
- readonly activeChartModel: Nullable<SheetChartModel>;
108
- readonly activeChartModel$: Observable<Nullable<SheetChartModel>>;
109
- readonly activeEditChart: string | null;
110
- readonly activeEditChart$: Observable<string | null>;
111
- readonly direction$: LocaleService['direction$'];
112
- readonly panelRoute$: Observable<IChartPanelRouteState | null>;
113
- readonly rangeSelectMode: boolean;
114
- readonly selectedElement$: Observable<IChartSelectedElementState | null>;
115
- setActiveEditChart(chartId: string | null): void;
116
- setRangeSelectMode(on: boolean): void;
117
- isElementEditModeActive(chartId: string): boolean;
118
- setSelectedElement(state: IChartSelectedElementState | null): void;
119
- setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
120
- clearPanelRoute(): void;
121
- getDataSource(id: string): ReturnType<SheetsChartService['getChartDataSource']>;
122
- registerViewState<T extends ChartConfigStateKey = ChartConfigStateKey>(id: T, state: (chartModel: ChartModel) => IChartConfigStateMap[T]): void;
123
- getViewState<V extends ChartConfigStateValue = ChartConfigStateValue>(id: ChartConfigStateKey, activeChartModel?: Nullable<SheetChartModel>): IChartConfigState<V> | undefined;
124
- applyChartConfigOperation(operation: IChartConfigOperation): void;
125
- executeChartUpdateConfig(params: Omit<IChartUpdateConfigCommandParams, 'unitId'>): void;
126
- executeChartUpdateSourceConfig(params: Omit<IChartUpdateSourceCommandParams, 'unitId'>): void;
127
- removeViewState(id: ChartConfigStateKey): void;
128
- setBorder(id: string, color: string): void;
129
- t(...args: Parameters<LocaleService['t']>): string;
130
- }
131
- export declare const ISheetsChartUIService: import("@wendellhu/redi").IdentifierDecorator<ISheetsChartUIService>;
132
- export declare class SheetsChartUIService extends Disposable implements ISheetsChartUIService {
7
+ import { ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
8
+ type SheetsChartUpdateConfigParams = Omit<IChartUpdateConfigCommandParams, 'unitId'>;
9
+ export type ISheetsChartUIService = SheetsChartUIService;
10
+ export declare const ISheetsChartUIService: import("@wendellhu/redi").IdentifierDecorator<SheetsChartUIService>;
11
+ export declare class SheetsChartUIService extends ChartUIService<ChartModel<ISheetChartDataSource>, SheetsChartUpdateConfigParams> {
133
12
  private readonly _chartModelService;
134
13
  private readonly _sheetsChartService;
135
14
  private readonly _commandService;
136
15
  private readonly _localeService;
137
- private readonly _chartHostProviderService;
138
- private _univerInstanceService;
139
- private _viewState;
16
+ private readonly _univerInstanceService;
140
17
  private _rangeSelectMode;
141
18
  private readonly _activeEditChart$;
142
19
  private readonly _selectedElement$;
143
20
  private readonly _panelRoute$;
144
- readonly activeEditChart$: Observable<string | null>;
145
- readonly selectedElement$: Observable<IChartSelectedElementState | null>;
146
- readonly panelRoute$: Observable<IChartPanelRouteState | null>;
147
- constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _localeService: LocaleService, _chartHostProviderService: IChartHostProviderService, _univerInstanceService: IUniverInstanceService);
148
- get activeChartModel(): Nullable<SheetChartModel>;
149
- get activeChartModel$(): Observable<Nullable<SheetChartModel>>;
150
- get rangeSelectMode(): boolean;
21
+ readonly activeEditChart$: import("rxjs").Observable<string | null>;
22
+ readonly selectedElement$: import("rxjs").Observable<IChartSelectedElementState | null>;
23
+ readonly panelRoute$: import("rxjs").Observable<IChartPanelRouteState | null>;
24
+ constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _localeService: LocaleService, _univerInstanceService: IUniverInstanceService, viewStates: ChartViewStateRegistry);
25
+ get activeRuntimeModel(): ChartModel<ISheetChartDataSource> | null;
26
+ get activeChartModel(): import("@univerjs/core").Nullable<ChartModel<ISheetChartDataSource>>;
27
+ get activeChartModel$(): import("rxjs").Observable<import("@univerjs/core").Nullable<ChartModel<ISheetChartDataSource>>>;
151
28
  get activeEditChart(): string | null;
152
- get direction$(): Observable<"ltr" | "rtl">;
29
+ get direction$(): import("rxjs").Observable<"ltr" | "rtl">;
30
+ get rangeSelectMode(): boolean;
153
31
  setRangeSelectMode(on: boolean): void;
154
32
  setActiveEditChart(chartId: string | null): void;
155
33
  isElementEditModeActive(chartId: string): boolean;
156
34
  setSelectedElement(state: IChartSelectedElementState | null): void;
157
35
  setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
158
36
  clearPanelRoute(): void;
159
- getDataSource(id: string): import("@univerjs-pro/sheets-chart").ISheetChartDataSource | undefined;
160
- registerViewState<T extends ChartConfigStateKey = ChartConfigStateKey>(id: T, state: (chartModel: ChartModel) => IChartConfigStateMap[T]): void;
161
- getViewState<V extends ChartConfigStateValue = ChartConfigStateValue>(id: ChartConfigStateKey, activeChartModel?: Nullable<SheetChartModel>): IChartConfigState<V> | undefined;
162
- applyChartConfigOperation(operation: IChartConfigOperation): void;
163
- executeChartUpdateConfig(params: Omit<IChartUpdateConfigCommandParams, 'unitId'>): void;
164
- executeChartUpdateSourceConfig(params: Omit<IChartUpdateSourceCommandParams, 'unitId'>): void;
165
- removeViewState(id: ChartConfigStateKey): void;
166
- setBorder(id: string, color: string): void;
167
- t(...args: Parameters<LocaleService['t']>): string;
37
+ setDataRange(range: ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]): void;
38
+ setOrientation(orientation: DataOrientation): void;
39
+ executeChartUpdateConfig(params: SheetsChartUpdateConfigParams): void;
40
+ private _executeChartUpdateSourceConfig;
168
41
  dispose(): void;
169
42
  }
43
+ export {};
@@ -1,13 +1,16 @@
1
+ import type { ChartTypeBits, PieSecondaryPlotType } from '@univerjs-pro/engine-chart';
1
2
  import type { IChartSourceMultiRangeItem, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
2
3
  import type { IUniverInstanceService, Nullable } from '@univerjs/core';
3
- import type { LocaleKey } from './locale/types';
4
- import { ChartTypeBits } from '@univerjs-pro/engine-chart';
4
+ import type { IValueOption } from '@univerjs/ui';
5
+ import { CHART_TYPE_CATALOG } from '@univerjs-pro/chart-ui';
5
6
  export declare function serializeChartDataRange(rangeInfo: Nullable<ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]>, univerInstanceService: IUniverInstanceService): string;
6
7
  export interface IChartTypeOption {
7
- label: LocaleKey;
8
+ id?: string;
9
+ labelId: Exclude<typeof CHART_TYPE_CATALOG[number]['labelId'], 'columnStacked' | 'columnPercentStacked'>;
10
+ pieSecondaryPlotType?: PieSecondaryPlotType;
8
11
  value: ChartTypeBits;
9
12
  icon: string;
10
13
  }
11
14
  export declare const chartTypeOptions: IChartTypeOption[];
12
- export declare function getChartMenuSelection(): IChartTypeOption[];
15
+ export declare function getChartMenuSelection(options?: readonly IChartTypeOption[]): Array<IValueOption<string>>;
13
16
  export declare const getOptionsList: (optionsList: IChartTypeOption[], allowTypes: ChartTypeBits[] | [string]) => IChartTypeOption[];
@@ -1,4 +1,4 @@
1
1
  export declare function ChartEditPanel(props: {
2
2
  className?: string;
3
- }): import("react").JSX.Element;
3
+ }): import("react").JSX.Element | null;
4
4
  export declare const CHART_EDIT_PANEL_KEY = "sheet.chart.edit.panel";
@@ -0,0 +1,79 @@
1
+ export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
2
+ readonly axis: {
3
+ readonly primaryGridLineVisible: false;
4
+ readonly secondaryGridLineVisible: true;
5
+ readonly color: string;
6
+ readonly dateAxisRotation: number;
7
+ readonly gridlineWidth: number;
8
+ readonly labelFontSize: number;
9
+ readonly labelRotation: number;
10
+ readonly labelVisible: boolean;
11
+ readonly reverse: boolean;
12
+ readonly tickLength: string;
13
+ readonly tickPosition: import("@univerjs-pro/engine-chart").ChartAxisTickPosition;
14
+ readonly tickVisible: boolean;
15
+ readonly tickWidth: string;
16
+ };
17
+ readonly funnel: import("@univerjs-pro/chart-ui").IChartFunnelDefaultValues;
18
+ readonly heatmap: import("@univerjs-pro/chart-ui").IChartHeatmapDefaultValues;
19
+ readonly indicatorLine: import("@univerjs-pro/chart-ui").IChartIndicatorLineDefaultValues;
20
+ readonly legend: import("@univerjs-pro/chart-ui").IChartLegendDefaultValues;
21
+ readonly lineAndArea: import("@univerjs-pro/chart-ui").IChartLineAndAreaDefaultValues;
22
+ readonly pareto: import("@univerjs-pro/chart-ui").IChartParetoDefaultValues;
23
+ readonly pie: {
24
+ readonly doughnutHole: 0.5;
25
+ readonly pieHole: 0;
26
+ readonly borderColor: string;
27
+ readonly hasPaddingAngle: boolean;
28
+ readonly isHalfPie: boolean;
29
+ readonly labelContentType: import("@univerjs-pro/engine-chart").LabelContentType;
30
+ readonly labelPosition: import("@univerjs-pro/engine-chart").PieLabelPosition;
31
+ readonly labelVisible: boolean;
32
+ readonly rosePie: boolean;
33
+ readonly showLabelLine: boolean;
34
+ readonly textColor: string;
35
+ readonly valueScale: number;
36
+ };
37
+ readonly relation: {
38
+ readonly useValueAsSymbolSize: true;
39
+ readonly circularLabelRotation: boolean;
40
+ readonly emphasisEnabled: boolean;
41
+ readonly force: {
42
+ gravity: number;
43
+ repulsion: number;
44
+ };
45
+ readonly layout: import("@univerjs-pro/engine-chart").RelationChartLayoutEnum;
46
+ readonly nodeShape: import("@univerjs-pro/engine-chart").LinePointShape;
47
+ };
48
+ readonly radar: import("@univerjs-pro/chart-ui").IChartRadarDefaultValues;
49
+ readonly series: {
50
+ readonly radarFillOpacity: 0.2;
51
+ readonly rightAxis: {
52
+ readonly ltr: false;
53
+ readonly rtl: boolean;
54
+ };
55
+ readonly borderDashType: import("@univerjs-pro/engine-chart").ChartBorderDashType;
56
+ readonly borderOpacity: number;
57
+ readonly borderWidth: number;
58
+ readonly color: string;
59
+ readonly labelContentType: import("@univerjs-pro/engine-chart").LabelContentType;
60
+ readonly labelFontSize: number;
61
+ readonly labelPosition: import("@univerjs-pro/engine-chart").SeriesLabelPosition;
62
+ readonly labelVisible: boolean;
63
+ readonly lineOrAreaBorderWidth: number;
64
+ readonly pointShape: import("@univerjs-pro/engine-chart").LinePointShape;
65
+ readonly pointSize: number;
66
+ readonly radarBorderWidth: number;
67
+ readonly scatterPointSize: number;
68
+ readonly seriesFillOpacity: number;
69
+ };
70
+ readonly style: import("@univerjs-pro/chart-ui").IChartStyleDefaultValues;
71
+ readonly titles: import("@univerjs-pro/chart-ui").IChartTitleDefaultValues;
72
+ readonly trendline: import("@univerjs-pro/chart-ui").IChartTrendlineDefaultValues;
73
+ readonly waterfall: {
74
+ readonly useSubtotal: true;
75
+ readonly stackType: import("@univerjs-pro/engine-chart").WaterfallStackTypeEnum;
76
+ };
77
+ readonly waterfallStyle: import("@univerjs-pro/chart-ui").IChartWaterfallStyleDefaultValues;
78
+ readonly wordCloud: import("@univerjs-pro/chart-ui").IChartWordCloudDefaultValues;
79
+ };
@@ -1 +1,4 @@
1
- export declare const DataTabPanel: () => import("react").JSX.Element;
1
+ import type { SHEET_CHART_EDITOR_DEFAULT_VALUES } from '../chart-editor-default-values';
2
+ export declare const DataTabPanel: (props: {
3
+ defaultValues: typeof SHEET_CHART_EDITOR_DEFAULT_VALUES;
4
+ }) => import("react").JSX.Element;
@@ -1,5 +1,4 @@
1
- import type { IRuntimeAxis } from '@univerjs-pro/engine-chart';
2
- import type { Nullable } from '@univerjs/core';
3
- export declare function getPrimaryVerticalAxis(runtimeAxes: Nullable<IRuntimeAxis[]> | undefined): IRuntimeAxis | undefined;
4
- /** The vertical axis panel edits the persisted primary vertical axis bucket (`style.yAxis`). */
5
- export declare const StyleTabPanel: () => import("react").JSX.Element;
1
+ import type { SHEET_CHART_EDITOR_DEFAULT_VALUES } from '../chart-editor-default-values';
2
+ export declare const StyleTabPanel: (props: {
3
+ defaultValues: typeof SHEET_CHART_EDITOR_DEFAULT_VALUES;
4
+ }) => import("react").JSX.Element;