@univerjs-pro/boards-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.
- package/README.md +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +17 -128
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/common/BoardChartTypeOptions.d.ts +133 -8
- package/lib/types/components/BoardChartEditPanel.d.ts +86 -4
- package/lib/types/components/BoardChartInsertPanel.d.ts +4 -5
- package/lib/types/controllers/board-chart-element-float-menu.controller.d.ts +5 -3
- package/lib/types/controllers/board-chart-panel.controller.d.ts +3 -1
- package/lib/types/index.d.ts +3 -5
- package/lib/types/locale/en-US.d.ts +94 -228
- package/lib/types/services/board-chart-clipboard-adapter.d.ts +3 -3
- package/lib/types/services/board-chart-data-edit.service.d.ts +4 -4
- package/lib/types/services/board-chart-edit-session.service.d.ts +3 -0
- package/lib/types/services/board-chart-host.d.ts +2 -14
- package/lib/types/services/board-chart-render.service.d.ts +7 -12
- package/lib/types/services/board-chart-snapshot-render.service.d.ts +9 -53
- package/lib/types/services/board-chart-ui.service.d.ts +18 -122
- package/lib/types/services/chart-image-export-provider.d.ts +21 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +14 -14
- package/lib/types/hooks.d.ts +0 -3
- package/lib/types/services/board-chart-element-selection.d.ts +0 -7
|
@@ -1,128 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
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, IChartModelRuntime } from '@univerjs-pro/engine-chart';
|
|
5
3
|
import { BoardChartModelService, BoardChartResourceService } from '@univerjs-pro/boards-chart';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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<IChartModelRuntime, BoardChartUpdateConfigParams> {
|
|
108
15
|
private readonly _modelService;
|
|
109
16
|
private readonly _resourceService;
|
|
110
17
|
private readonly _commandService;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
get activeRuntimeModel(): IBoardChartRuntimeModel | null;
|
|
115
|
-
get activeRuntimeModel$(): Observable<IBoardChartRuntimeModel | null>;
|
|
18
|
+
constructor(_modelService: BoardChartModelService, _resourceService: BoardChartResourceService, _commandService: ICommandService, viewStates: ChartViewStateRegistry);
|
|
19
|
+
get activeRuntimeModel(): IChartModelRuntime | null;
|
|
20
|
+
get activeRuntimeModel$(): import("rxjs").Observable<IChartModelRuntime | null>;
|
|
116
21
|
get resourceService(): BoardChartResourceService;
|
|
117
|
-
|
|
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 {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IChartImageExportProvider, IChartImageExportTarget } from '@univerjs-pro/chart-ui';
|
|
2
|
+
import { ChartImageExportService } from '@univerjs-pro/chart-ui';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
import { BoardChartSnapshotRenderService } from './board-chart-snapshot-render.service';
|
|
5
|
+
interface IBoardChartImageExportTarget extends IChartImageExportTarget {
|
|
6
|
+
readonly unitId: string;
|
|
7
|
+
getElement(): object | null;
|
|
8
|
+
getInfo(): {
|
|
9
|
+
readonly size?: {
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare class BoardChartImageExportProvider extends Disposable implements IChartImageExportProvider {
|
|
16
|
+
private readonly _snapshotService;
|
|
17
|
+
constructor(imageExportService: ChartImageExportService, _snapshotService: BoardChartSnapshotRenderService);
|
|
18
|
+
supports(chart: IChartImageExportTarget): chart is IBoardChartImageExportTarget;
|
|
19
|
+
exportImage(chart: IChartImageExportTarget): Promise<string | undefined>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|