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