@univerjs-pro/boards-chart-ui 1.0.0-alpha.8 → 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 (99) hide show
  1. package/README.md +1 -1
  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 +9 -85
  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/common/BoardChartTypeOptions.d.ts +133 -8
  64. package/lib/types/components/BoardChartEditPanel.d.ts +86 -4
  65. package/lib/types/components/BoardChartInsertPanel.d.ts +3 -4
  66. package/lib/types/controllers/board-chart-element-float-menu.controller.d.ts +5 -3
  67. package/lib/types/controllers/board-chart-panel.controller.d.ts +3 -1
  68. package/lib/types/index.d.ts +3 -5
  69. package/lib/types/locale/en-US.d.ts +94 -228
  70. package/lib/types/services/board-chart-clipboard-adapter.d.ts +3 -3
  71. package/lib/types/services/board-chart-data-edit.service.d.ts +3 -4
  72. package/lib/types/services/board-chart-edit-session.service.d.ts +3 -0
  73. package/lib/types/services/board-chart-host.d.ts +2 -14
  74. package/lib/types/services/board-chart-render.service.d.ts +7 -12
  75. package/lib/types/services/board-chart-snapshot-render.service.d.ts +9 -53
  76. package/lib/types/services/board-chart-ui.service.d.ts +18 -122
  77. package/lib/umd/index.js +1 -1
  78. package/lib/umd/locale/ar-SA.js +1 -1
  79. package/lib/umd/locale/ca-ES.js +1 -1
  80. package/lib/umd/locale/de-DE.js +1 -1
  81. package/lib/umd/locale/en-US.js +1 -1
  82. package/lib/umd/locale/es-ES.js +1 -1
  83. package/lib/umd/locale/fa-IR.js +1 -1
  84. package/lib/umd/locale/fr-FR.js +1 -1
  85. package/lib/umd/locale/id-ID.js +1 -1
  86. package/lib/umd/locale/it-IT.js +1 -1
  87. package/lib/umd/locale/ja-JP.js +1 -1
  88. package/lib/umd/locale/ko-KR.js +1 -1
  89. package/lib/umd/locale/pl-PL.js +1 -1
  90. package/lib/umd/locale/pt-BR.js +1 -1
  91. package/lib/umd/locale/ru-RU.js +1 -1
  92. package/lib/umd/locale/sk-SK.js +1 -1
  93. package/lib/umd/locale/vi-VN.js +1 -1
  94. package/lib/umd/locale/zh-CN.js +1 -1
  95. package/lib/umd/locale/zh-HK.js +1 -1
  96. package/lib/umd/locale/zh-TW.js +1 -1
  97. package/package.json +14 -14
  98. package/lib/types/hooks.d.ts +0 -3
  99. package/lib/types/services/board-chart-element-selection.d.ts +0 -7
@@ -1,128 +1,24 @@
1
- import type { IBoardChartRuntimeModel, IUpdateBoardChartConfigCommandParams } from '@univerjs-pro/boards-chart';
2
- import type { AreaLineStyle, ChartStyle, DeepPartial, IAllSeriesStyle, IChartCandlestickMappingSpec, IChartContext, IChartDataAggregation, InvalidValueType, IPieLabelStyle, IRelationForceOptions, IRuntimeAxis, ITrendLine, LinePointShape, RadarShape, RelationChartLayoutEnum, TitlePositionEnum, WaterfallStackTypeEnum, WordCloudShapeEnum } from '@univerjs-pro/engine-chart';
3
- import type { Nullable } from '@univerjs/core';
4
- import type { Observable } from 'rxjs';
1
+ import type { IUpdateBoardChartConfigCommandParams } from '@univerjs-pro/boards-chart';
2
+ import type { IChartContext, IChartDataAggregation, IStaticChartModelRuntime } from '@univerjs-pro/engine-chart';
5
3
  import { BoardChartModelService, BoardChartResourceService } from '@univerjs-pro/boards-chart';
6
- import { ChartTypeBits, DataOrientation, StackType } from '@univerjs-pro/engine-chart';
7
- import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
8
- export interface IBoardChartOption {
9
- label: string;
10
- value: string;
11
- }
12
- export interface IBoardChartConfigStateMap {
13
- allSeriesStyle: IBoardChartConfigState<DeepPartial<IAllSeriesStyle> | undefined, DeepPartial<IAllSeriesStyle>>;
14
- areaLineStyle: IBoardChartConfigState<AreaLineStyle | undefined, AreaLineStyle | undefined>;
15
- backgroundColor: IBoardChartConfigState<string | undefined, string | undefined>;
16
- borderColor: IBoardChartConfigState<Nullable<string>, Nullable<string>>;
17
- bubbleCategoryList: IBoardChartConfigState<IBoardChartOption[]>;
18
- bubbleSeriesIndex: IBoardChartConfigState<number | undefined, number | undefined>;
19
- bubbleSizeIndex: IBoardChartConfigState<number | undefined, number | undefined>;
20
- scatterLabelIndex: IBoardChartConfigState<number | undefined, number | undefined>;
21
- scatterXIndex: IBoardChartConfigState<number | undefined, number | undefined>;
22
- scatterYIndex: IBoardChartConfigState<number | undefined, number | undefined>;
23
- categoryIndex: IBoardChartConfigState<number | undefined, number>;
24
- candlestickMapping: IBoardChartConfigState<IChartCandlestickMappingSpec | undefined, IChartCandlestickMappingSpec>;
25
- categoryList: IBoardChartConfigState<IBoardChartOption[]>;
26
- chartThemeColorType: IBoardChartConfigState<string | undefined, string | undefined>;
27
- chartType: IBoardChartConfigState<ChartTypeBits>;
28
- dataPointsOptions: IBoardChartConfigState<IBoardChartOption[]>;
29
- dataRange: IBoardChartConfigState<string>;
30
- digitalFixed: IBoardChartConfigState<number | undefined, number>;
31
- doughnutHole: IBoardChartConfigState<Nullable<number>, number | null>;
32
- fontSize: IBoardChartConfigState<number | undefined, number | undefined>;
33
- forceOption: IBoardChartConfigState<IRelationForceOptions | undefined, IRelationForceOptions | undefined>;
34
- funnelGap: IBoardChartConfigState<number | undefined, number | undefined>;
35
- funnelUseAbsValue: IBoardChartConfigState<boolean | undefined, boolean | undefined>;
36
- gradientFill: IBoardChartConfigState<boolean | undefined, boolean | undefined>;
37
- heatmapMax: IBoardChartConfigState<number | undefined, number | undefined>;
38
- heatmapMin: IBoardChartConfigState<number | undefined, number | undefined>;
39
- hierarchyIndexes: IBoardChartConfigState<number[]>;
40
- indicator: IBoardChartConfigState<ChartStyle['tooltip'] | undefined, ChartStyle['tooltip']>;
41
- invalidValueType: IBoardChartConfigState<InvalidValueType | undefined, InvalidValueType | undefined>;
42
- isHalfPie: IBoardChartConfigState<boolean | undefined, boolean>;
43
- isRosePie: IBoardChartConfigState<boolean | undefined, boolean>;
44
- legendStyle: IBoardChartConfigState<ChartStyle['legend'] | undefined, ChartStyle['legend']>;
45
- orient: IBoardChartConfigState<DataOrientation | undefined, DataOrientation>;
46
- padAngleStyle: IBoardChartConfigState<boolean | undefined, boolean>;
47
- paretoDataPointsOptions: IBoardChartConfigState<IBoardChartOption[]>;
48
- paretoStyle: IBoardChartConfigState<ChartStyle['pareto'] | undefined, ChartStyle['pareto']>;
49
- pieBorderColor: IBoardChartConfigState<string | undefined, string>;
50
- pieLabelStyle: IBoardChartConfigState<DeepPartial<IPieLabelStyle> | undefined, DeepPartial<IPieLabelStyle>>;
51
- radarFill: IBoardChartConfigState<boolean | undefined, boolean>;
52
- radarShape: IBoardChartConfigState<RadarShape | undefined, RadarShape>;
53
- relationLayout: IBoardChartConfigState<RelationChartLayoutEnum | undefined, RelationChartLayoutEnum>;
54
- relationNodeShape: IBoardChartConfigState<LinePointShape | undefined, LinePointShape>;
55
- rightYAxisOptions: IBoardChartConfigState<ChartStyle['rightYAxis'] | undefined, ChartStyle['rightYAxis']>;
56
- rotateLabel: IBoardChartConfigState<boolean | undefined, boolean>;
57
- runtimeAxes: Observable<IRuntimeAxis[]>;
58
- seriesResourceList: IBoardChartConfigState<IBoardChartOption[]>;
59
- seriesList: IBoardChartConfigState<IBoardChartOption[]>;
60
- seriesStyleMap: IBoardChartConfigState<ChartStyle['seriesStyleMap'] | undefined, ChartStyle['seriesStyleMap']>;
61
- seriesValues: IBoardChartConfigState<number[]>;
62
- showLabelLine: IBoardChartConfigState<boolean | undefined, boolean>;
63
- stackType: IBoardChartConfigState<StackType | undefined, StackType | ''>;
64
- title: IBoardChartConfigState<string | undefined, string>;
65
- titleFontSize: IBoardChartConfigState<number | undefined, number | undefined>;
66
- titles: IBoardChartConfigState<ChartStyle['titles'] | undefined, ChartStyle['titles']>;
67
- titlePosition: IBoardChartConfigState<TitlePositionEnum | undefined, TitlePositionEnum | undefined>;
68
- trendlineValues: IBoardChartConfigState<ITrendLine[] | undefined, ITrendLine[] | undefined>;
69
- useDateAxis: IBoardChartConfigState<boolean | undefined, boolean>;
70
- useEmphasis: IBoardChartConfigState<boolean | undefined, boolean>;
71
- useSubtotal: IBoardChartConfigState<boolean | undefined, boolean>;
72
- useValueAsSymbolSize: IBoardChartConfigState<boolean | undefined, boolean>;
73
- valueScale: IBoardChartConfigState<number | undefined, number>;
74
- valueSuffix: IBoardChartConfigState<string | undefined, string>;
75
- visualMapType: IBoardChartConfigState<'continuous' | 'piecewise' | undefined, 'continuous' | 'piecewise' | undefined>;
76
- waterfallStack: IBoardChartConfigState<WaterfallStackTypeEnum | undefined, WaterfallStackTypeEnum>;
77
- wordCloudMask: IBoardChartConfigState<string | undefined, string | undefined>;
78
- wordCloudRepeat: IBoardChartConfigState<boolean | undefined, boolean>;
79
- wordCloudShape: IBoardChartConfigState<WordCloudShapeEnum | undefined, WordCloudShapeEnum | undefined>;
80
- xAxisOptions: IBoardChartConfigState<ChartStyle['xAxis'] | undefined, ChartStyle['xAxis']>;
81
- yAxisOptions: IBoardChartConfigState<ChartStyle['yAxis'] | undefined, ChartStyle['yAxis']>;
82
- }
83
- export type BoardChartConfigStateKey = keyof IBoardChartConfigStateMap;
84
- export type BoardChartConfigStateValue = InferBoardChartConfigStateValue<BoardChartConfigStateKey>;
85
- export type InferBoardChartConfigStateValue<T extends BoardChartConfigStateKey, M = IBoardChartConfigStateMap[T]> = M extends IBoardChartConfigState<infer V> ? V : never;
86
- export type IBoardChartConfigState<GetValue, SetValue = GetValue> = {
87
- set?(value: SetValue): void;
88
- get(): Observable<GetValue> | undefined;
89
- } | Observable<GetValue>;
90
- export interface IBoardChartUIService {
91
- readonly activeRuntimeModel: IBoardChartRuntimeModel | null;
92
- readonly activeRuntimeModel$: Observable<IBoardChartRuntimeModel | null>;
93
- readonly localeService: LocaleService;
94
- readonly resourceService: BoardChartResourceService;
95
- registerViewState<T extends BoardChartConfigStateKey = BoardChartConfigStateKey>(id: T, state: (runtime: IBoardChartRuntimeModel) => IBoardChartConfigStateMap[T]): void;
96
- getViewState<V extends BoardChartConfigStateValue = BoardChartConfigStateValue>(id: BoardChartConfigStateKey, runtime?: IBoardChartRuntimeModel | null): IBoardChartConfigState<V> | undefined;
97
- executeChartUpdateConfig(params: Omit<IUpdateBoardChartConfigCommandParams, 'unitId' | 'chartId'> & {
98
- unitId?: string;
99
- chartId?: string;
100
- context?: Partial<IChartContext>;
101
- dataAggregation?: Partial<IChartDataAggregation>;
102
- }): void;
103
- switchChartType(runtime: IBoardChartRuntimeModel, type: ChartTypeBits, style: ChartStyle): Promise<void>;
104
- getDataRangeLabel(runtime: IBoardChartRuntimeModel): string;
105
- }
106
- export declare const IBoardChartUIService: import("@wendellhu/redi").IdentifierDecorator<IBoardChartUIService>;
107
- export declare class BoardChartUIService extends Disposable implements IBoardChartUIService {
4
+ import { ChartUIService, ChartViewStateRegistry } from '@univerjs-pro/chart-ui';
5
+ import { ICommandService } from '@univerjs/core';
6
+ type BoardChartUpdateConfigParams = Omit<IUpdateBoardChartConfigCommandParams, 'unitId' | 'chartId'> & {
7
+ unitId?: string;
8
+ chartId?: string;
9
+ context?: Partial<IChartContext>;
10
+ dataAggregation?: Partial<IChartDataAggregation>;
11
+ };
12
+ export type IBoardChartUIService = BoardChartUIService;
13
+ export declare const IBoardChartUIService: import("@wendellhu/redi").IdentifierDecorator<BoardChartUIService>;
14
+ export declare class BoardChartUIService extends ChartUIService<IStaticChartModelRuntime, BoardChartUpdateConfigParams> {
108
15
  private readonly _modelService;
109
16
  private readonly _resourceService;
110
17
  private readonly _commandService;
111
- readonly localeService: LocaleService;
112
- private readonly _viewState;
113
- constructor(_modelService: BoardChartModelService, _resourceService: BoardChartResourceService, _commandService: ICommandService, localeService: LocaleService);
114
- get activeRuntimeModel(): IBoardChartRuntimeModel | null;
115
- get activeRuntimeModel$(): Observable<IBoardChartRuntimeModel | null>;
18
+ constructor(_modelService: BoardChartModelService, _resourceService: BoardChartResourceService, _commandService: ICommandService, viewStates: ChartViewStateRegistry);
19
+ get activeRuntimeModel(): IStaticChartModelRuntime | null;
20
+ get activeRuntimeModel$(): import("rxjs").Observable<IStaticChartModelRuntime | null>;
116
21
  get resourceService(): BoardChartResourceService;
117
- registerViewState<T extends BoardChartConfigStateKey = BoardChartConfigStateKey>(id: T, state: (runtime: IBoardChartRuntimeModel) => IBoardChartConfigStateMap[T]): void;
118
- getViewState<V extends BoardChartConfigStateValue = BoardChartConfigStateValue>(id: BoardChartConfigStateKey, runtime?: IBoardChartRuntimeModel | null): IBoardChartConfigState<V> | undefined;
119
- executeChartUpdateConfig(params: Omit<IUpdateBoardChartConfigCommandParams, 'unitId' | 'chartId'> & {
120
- unitId?: string;
121
- chartId?: string;
122
- context?: Partial<IChartContext>;
123
- dataAggregation?: Partial<IChartDataAggregation>;
124
- }): void;
125
- switchChartType(runtime: IBoardChartRuntimeModel, type: ChartTypeBits, style: ChartStyle): Promise<void>;
126
- getDataRangeLabel(runtime: IBoardChartRuntimeModel): string;
127
- dispose(): void;
22
+ executeChartUpdateConfig(params: BoardChartUpdateConfigParams): void;
128
23
  }
24
+ export {};