@univerjs-pro/chart-ui 1.0.0-insiders.20260707-70502d7
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 +40 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/index.js +1 -0
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/components/ColorPickerControl.d.ts +8 -0
- package/lib/types/components/DropdownSelector.d.ts +13 -0
- package/lib/types/components/FontFormatBar.d.ts +38 -0
- package/lib/types/components/index.d.ts +6 -0
- package/lib/types/float-menu/ChartElementFloatMenu.d.ts +7 -0
- package/lib/types/float-menu/chart-element-float-menu-adapter-registry.d.ts +10 -0
- package/lib/types/float-menu/constants.d.ts +197 -0
- package/lib/types/float-menu/index.d.ts +5 -0
- package/lib/types/float-menu/types.d.ts +92 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +91 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/types.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export interface IFontFormatStyle {
|
|
3
|
+
fontSize: number;
|
|
4
|
+
color: string;
|
|
5
|
+
bold: boolean;
|
|
6
|
+
italic: boolean;
|
|
7
|
+
underline: boolean;
|
|
8
|
+
strikethrough: boolean;
|
|
9
|
+
align?: string;
|
|
10
|
+
alignControl?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type PropertyChangeFunction<T, K extends keyof T = keyof T> = (name: K, value: T[K]) => void;
|
|
13
|
+
export interface IFontFormatBarProps extends Partial<IFontFormatStyle> {
|
|
14
|
+
className?: string;
|
|
15
|
+
onChange?: PropertyChangeFunction<Omit<IFontFormatStyle, 'controls'>>;
|
|
16
|
+
}
|
|
17
|
+
export interface IFontSizeSelectorProps {
|
|
18
|
+
value?: number;
|
|
19
|
+
onChange?: (fontSize: number) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function FontSizeSelector(props: IFontSizeSelectorProps): ReactElement;
|
|
22
|
+
export interface IFontColorSelectorProps {
|
|
23
|
+
color?: string;
|
|
24
|
+
onChange?: (color: string) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function FontColorSelector(props: IFontColorSelectorProps): ReactElement;
|
|
27
|
+
export interface IFontFormatToggleProps {
|
|
28
|
+
active?: boolean;
|
|
29
|
+
type: 'bold' | 'italic';
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function FontFormatToggle(props: IFontFormatToggleProps): ReactElement;
|
|
33
|
+
export interface IFontAlignSelectorProps {
|
|
34
|
+
value?: string;
|
|
35
|
+
onChange?: (align: string) => void;
|
|
36
|
+
}
|
|
37
|
+
export declare function FontAlignSelector(props: IFontAlignSelectorProps): ReactElement;
|
|
38
|
+
export declare function FontFormatBar(props: IFontFormatBarProps): ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ColorPickerControl } from './ColorPickerControl';
|
|
2
|
+
export type { IColorPickerControlProps } from './ColorPickerControl';
|
|
3
|
+
export { DropdownSelector } from './DropdownSelector';
|
|
4
|
+
export type { IDropdownSelectorOption, IDropdownSelectorProps } from './DropdownSelector';
|
|
5
|
+
export { FontAlignSelector, FontColorSelector, FontFormatBar, FontFormatToggle, FontSizeSelector } from './FontFormatBar';
|
|
6
|
+
export type { IFontAlignSelectorProps, IFontColorSelectorProps, IFontFormatBarProps, IFontFormatStyle, IFontFormatToggleProps, IFontSizeSelectorProps, PropertyChangeFunction, } from './FontFormatBar';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IChartElementFloatMenuAdapter, IChartElementFloatMenuAdapterRegistry } from './types';
|
|
2
|
+
import { Disposable } from '@univerjs/core';
|
|
3
|
+
export declare class ChartElementFloatMenuAdapterRegistry extends Disposable implements IChartElementFloatMenuAdapterRegistry {
|
|
4
|
+
private readonly _adapters;
|
|
5
|
+
register(adapterKey: string, adapter: IChartElementFloatMenuAdapter): {
|
|
6
|
+
dispose: () => void;
|
|
7
|
+
};
|
|
8
|
+
get(adapterKey: string): IChartElementFloatMenuAdapter | undefined;
|
|
9
|
+
dispose(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { AxisAlignEnum, LegendPositionEnum, PieLabelPosition, SelectModeEnum, TitlePositionEnum } from '@univerjs-pro/engine-chart';
|
|
2
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_COMPONENT = "chart.element.float-menu";
|
|
3
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_EMPTY_VALUE = "";
|
|
4
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_DEFAULT_LABEL_ROTATE_DEGREES = 0;
|
|
5
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_LABEL_ROTATE_DEGREES: readonly [0, 30, 45, 60, 90];
|
|
6
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_OPACITY_OPTIONS: readonly [1, 0.9, 0.7, 0.5, 0.3, 0.2, 0.1, 0];
|
|
7
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_VISUAL_MAP_TYPES: {
|
|
8
|
+
readonly CONTINUOUS: "continuous";
|
|
9
|
+
readonly PIECEWISE: "piecewise";
|
|
10
|
+
};
|
|
11
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_STATE_KEYS: {
|
|
12
|
+
readonly TITLES: "titles";
|
|
13
|
+
readonly TITLE_POSITION: "titlePosition";
|
|
14
|
+
readonly LEGEND_STYLE: "legendStyle";
|
|
15
|
+
readonly PIE_BORDER_COLOR: "pieBorderColor";
|
|
16
|
+
readonly PIE_LABEL_STYLE: "pieLabelStyle";
|
|
17
|
+
readonly SERIES_STYLE_MAP: "seriesStyleMap";
|
|
18
|
+
readonly PARETO_STYLE: "paretoStyle";
|
|
19
|
+
readonly VISUAL_MAP_TYPE: "visualMapType";
|
|
20
|
+
readonly USE_DATE_AXIS: "useDateAxis";
|
|
21
|
+
readonly X_AXIS_OPTIONS: "xAxisOptions";
|
|
22
|
+
readonly Y_AXIS_OPTIONS: "yAxisOptions";
|
|
23
|
+
readonly RIGHT_Y_AXIS_OPTIONS: "rightYAxisOptions";
|
|
24
|
+
readonly RUNTIME_AXES: "runtimeAxes";
|
|
25
|
+
};
|
|
26
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_CLASS_NAMES: {
|
|
27
|
+
readonly ROOT: "\n univer-inline-flex univer-h-fit univer-w-fit univer-max-w-[760px] univer-flex-col univer-items-start\n univer-gap-1.5 univer-rounded-md univer-bg-white univer-px-3 univer-py-2\n univer-text-sm univer-text-gray-900\n univer-shadow-md\n dark:!univer-bg-gray-900 dark:!univer-text-white\n ";
|
|
28
|
+
readonly TITLE: "\n univer-whitespace-nowrap univer-text-sm univer-font-medium univer-text-gray-900\n dark:!univer-text-gray-100\n ";
|
|
29
|
+
readonly BODY: "univer-inline-flex univer-w-max univer-flex-col univer-items-start univer-gap-1.5";
|
|
30
|
+
readonly ROW: "univer-flex univer-w-max univer-items-center univer-gap-2";
|
|
31
|
+
readonly ROW_FULL: "univer-w-full";
|
|
32
|
+
readonly CONTROL_WRAPPER: "univer-w-36 univer-shrink-0";
|
|
33
|
+
readonly MARK_COLOR_WRAPPER: "univer-w-8";
|
|
34
|
+
readonly INLINE_FONT_CONTROLS: "univer-inline-flex univer-w-max univer-items-center univer-gap-1.5";
|
|
35
|
+
readonly PANEL_SELECT: "!univer-h-8 univer-w-full univer-text-sm";
|
|
36
|
+
readonly MULTIPLE_SELECT_WRAPPER: "univer-w-52";
|
|
37
|
+
readonly TEXT_INPUT: "!univer-h-7 !univer-w-full";
|
|
38
|
+
readonly NUMBER_INPUT: "!univer-h-7 univer-w-20";
|
|
39
|
+
};
|
|
40
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_LOCALE_KEYS: {
|
|
41
|
+
readonly MENU_TITLE: {
|
|
42
|
+
readonly CHART: "chart-ui.floatMenu.menuTitle.chart";
|
|
43
|
+
readonly CHART_TITLE: "chart-ui.floatMenu.menuTitle.chartTitle";
|
|
44
|
+
readonly SUBTITLE: "chart-ui.floatMenu.menuTitle.subtitle";
|
|
45
|
+
readonly AXIS_TITLE: "chart-ui.floatMenu.menuTitle.axisTitle";
|
|
46
|
+
readonly LEGEND: "chart-ui.floatMenu.menuTitle.legend";
|
|
47
|
+
readonly HORIZONTAL_AXIS: "chart-ui.floatMenu.menuTitle.horizontalAxis";
|
|
48
|
+
readonly VERTICAL_AXIS: "chart-ui.floatMenu.menuTitle.verticalAxis";
|
|
49
|
+
readonly RIGHT_VERTICAL_AXIS: "chart-ui.floatMenu.menuTitle.rightVerticalAxis";
|
|
50
|
+
readonly GRIDLINE: "chart-ui.floatMenu.menuTitle.gridline";
|
|
51
|
+
readonly TICK: "chart-ui.floatMenu.menuTitle.tick";
|
|
52
|
+
readonly MARK: "chart-ui.floatMenu.menuTitle.mark";
|
|
53
|
+
readonly SERIES: "chart-ui.floatMenu.menuTitle.series";
|
|
54
|
+
readonly DATA_POINT: "chart-ui.floatMenu.menuTitle.dataPoint";
|
|
55
|
+
readonly DATA_LABEL: "chart-ui.floatMenu.menuTitle.dataLabel";
|
|
56
|
+
};
|
|
57
|
+
readonly FIELD: {
|
|
58
|
+
readonly TITLE: "chart-ui.floatMenu.field.title";
|
|
59
|
+
readonly SUBTITLE: "chart-ui.floatMenu.field.subtitle";
|
|
60
|
+
readonly POSITION: "chart-ui.floatMenu.field.position";
|
|
61
|
+
readonly SIZE: "chart-ui.floatMenu.field.size";
|
|
62
|
+
readonly ALIGN: "chart-ui.floatMenu.field.align";
|
|
63
|
+
readonly MODE: "chart-ui.floatMenu.field.mode";
|
|
64
|
+
readonly MAP: "chart-ui.floatMenu.field.map";
|
|
65
|
+
readonly ROTATE: "chart-ui.floatMenu.field.rotate";
|
|
66
|
+
readonly MIN: "chart-ui.floatMenu.field.min";
|
|
67
|
+
readonly MAX: "chart-ui.floatMenu.field.max";
|
|
68
|
+
readonly COLOR: "chart-ui.floatMenu.field.color";
|
|
69
|
+
readonly BORDER_COLOR: "chart-ui.floatMenu.field.borderColor";
|
|
70
|
+
readonly OPACITY: "chart-ui.floatMenu.field.opacity";
|
|
71
|
+
readonly LABEL_POSITION: "chart-ui.floatMenu.field.labelPosition";
|
|
72
|
+
readonly LABEL_TEXT: "chart-ui.floatMenu.field.labelText";
|
|
73
|
+
readonly TITLE_TEXT: "chart-ui.floatMenu.field.titleText";
|
|
74
|
+
};
|
|
75
|
+
readonly ACTION: {
|
|
76
|
+
readonly MORE: "chart-ui.floatMenu.action.more";
|
|
77
|
+
readonly BOLD: "chart-ui.floatMenu.action.bold";
|
|
78
|
+
readonly ITALIC: "chart-ui.floatMenu.action.italic";
|
|
79
|
+
};
|
|
80
|
+
readonly CONTROL: {
|
|
81
|
+
readonly LABELS: "chart-ui.floatMenu.control.labels";
|
|
82
|
+
readonly LINE: "chart-ui.floatMenu.control.line";
|
|
83
|
+
readonly REVERSE: "chart-ui.floatMenu.control.reverse";
|
|
84
|
+
readonly DATE: "chart-ui.floatMenu.control.date";
|
|
85
|
+
};
|
|
86
|
+
readonly OPTION: {
|
|
87
|
+
readonly TEXT_ALIGN: {
|
|
88
|
+
readonly LEFT: "chart-ui.floatMenu.option.textAlign.left";
|
|
89
|
+
readonly CENTER: "chart-ui.floatMenu.option.textAlign.center";
|
|
90
|
+
readonly RIGHT: "chart-ui.floatMenu.option.textAlign.right";
|
|
91
|
+
};
|
|
92
|
+
readonly POSITION: {
|
|
93
|
+
readonly TOP: "chart-ui.floatMenu.option.position.top";
|
|
94
|
+
readonly BOTTOM: "chart-ui.floatMenu.option.position.bottom";
|
|
95
|
+
readonly LEFT: "chart-ui.floatMenu.option.position.left";
|
|
96
|
+
readonly RIGHT: "chart-ui.floatMenu.option.position.right";
|
|
97
|
+
readonly HIDE: "chart-ui.floatMenu.option.position.hide";
|
|
98
|
+
readonly INSIDE: "chart-ui.floatMenu.option.position.inside";
|
|
99
|
+
readonly OUTSIDE: "chart-ui.floatMenu.option.position.outside";
|
|
100
|
+
};
|
|
101
|
+
readonly LABEL_TEXT: {
|
|
102
|
+
readonly CATEGORY: "chart-ui.floatMenu.option.labelText.category";
|
|
103
|
+
readonly VALUE: "chart-ui.floatMenu.option.labelText.value";
|
|
104
|
+
readonly PERCENTAGE: "chart-ui.floatMenu.option.labelText.percentage";
|
|
105
|
+
};
|
|
106
|
+
readonly AXIS_ALIGN: {
|
|
107
|
+
readonly START: "chart-ui.floatMenu.option.axisAlign.start";
|
|
108
|
+
readonly CENTER: "chart-ui.floatMenu.option.axisAlign.center";
|
|
109
|
+
readonly END: "chart-ui.floatMenu.option.axisAlign.end";
|
|
110
|
+
};
|
|
111
|
+
readonly LEGEND_SELECT_MODE: {
|
|
112
|
+
readonly SINGLE: "chart-ui.floatMenu.option.legendSelectMode.single";
|
|
113
|
+
readonly MULTIPLE: "chart-ui.floatMenu.option.legendSelectMode.multiple";
|
|
114
|
+
readonly CLOSE: "chart-ui.floatMenu.option.legendSelectMode.close";
|
|
115
|
+
};
|
|
116
|
+
readonly VISUAL_MAP_TYPE: {
|
|
117
|
+
readonly CONTINUOUS: "chart-ui.floatMenu.option.visualMapType.continuous";
|
|
118
|
+
readonly PIECEWISE: "chart-ui.floatMenu.option.visualMapType.piecewise";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_TITLE_POSITION_OPTION_DEFINITIONS: readonly [{
|
|
123
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.top";
|
|
124
|
+
readonly value: TitlePositionEnum.Top;
|
|
125
|
+
}, {
|
|
126
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.bottom";
|
|
127
|
+
readonly value: TitlePositionEnum.Bottom;
|
|
128
|
+
}, {
|
|
129
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.left";
|
|
130
|
+
readonly value: TitlePositionEnum.Left;
|
|
131
|
+
}, {
|
|
132
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.right";
|
|
133
|
+
readonly value: TitlePositionEnum.Right;
|
|
134
|
+
}, {
|
|
135
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.hide";
|
|
136
|
+
readonly value: TitlePositionEnum.Hide;
|
|
137
|
+
}];
|
|
138
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_PIE_LABEL_POSITION_OPTION_DEFINITIONS: readonly [{
|
|
139
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.inside";
|
|
140
|
+
readonly value: PieLabelPosition.Inside;
|
|
141
|
+
}, {
|
|
142
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.outside";
|
|
143
|
+
readonly value: PieLabelPosition.Outside;
|
|
144
|
+
}];
|
|
145
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_PIE_LABEL_TEXT_OPTION_DEFINITIONS: readonly [{
|
|
146
|
+
readonly labelKey: "chart-ui.floatMenu.option.labelText.category";
|
|
147
|
+
readonly value: string;
|
|
148
|
+
}, {
|
|
149
|
+
readonly labelKey: "chart-ui.floatMenu.option.labelText.value";
|
|
150
|
+
readonly value: string;
|
|
151
|
+
}, {
|
|
152
|
+
readonly labelKey: "chart-ui.floatMenu.option.labelText.percentage";
|
|
153
|
+
readonly value: string;
|
|
154
|
+
}];
|
|
155
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_AXIS_TITLE_ALIGN_OPTION_DEFINITIONS: readonly [{
|
|
156
|
+
readonly labelKey: "chart-ui.floatMenu.option.axisAlign.start";
|
|
157
|
+
readonly value: AxisAlignEnum.Start;
|
|
158
|
+
}, {
|
|
159
|
+
readonly labelKey: "chart-ui.floatMenu.option.axisAlign.center";
|
|
160
|
+
readonly value: AxisAlignEnum.Center;
|
|
161
|
+
}, {
|
|
162
|
+
readonly labelKey: "chart-ui.floatMenu.option.axisAlign.end";
|
|
163
|
+
readonly value: AxisAlignEnum.End;
|
|
164
|
+
}];
|
|
165
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_LEGEND_POSITION_OPTION_DEFINITIONS: readonly [{
|
|
166
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.top";
|
|
167
|
+
readonly value: LegendPositionEnum.Top;
|
|
168
|
+
}, {
|
|
169
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.bottom";
|
|
170
|
+
readonly value: LegendPositionEnum.Bottom;
|
|
171
|
+
}, {
|
|
172
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.left";
|
|
173
|
+
readonly value: LegendPositionEnum.Left;
|
|
174
|
+
}, {
|
|
175
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.right";
|
|
176
|
+
readonly value: LegendPositionEnum.Right;
|
|
177
|
+
}, {
|
|
178
|
+
readonly labelKey: "chart-ui.floatMenu.option.position.hide";
|
|
179
|
+
readonly value: LegendPositionEnum.Hide;
|
|
180
|
+
}];
|
|
181
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_LEGEND_SELECT_MODE_OPTION_DEFINITIONS: readonly [{
|
|
182
|
+
readonly labelKey: "chart-ui.floatMenu.option.legendSelectMode.single";
|
|
183
|
+
readonly value: SelectModeEnum.Single;
|
|
184
|
+
}, {
|
|
185
|
+
readonly labelKey: "chart-ui.floatMenu.option.legendSelectMode.multiple";
|
|
186
|
+
readonly value: SelectModeEnum.Multiple;
|
|
187
|
+
}, {
|
|
188
|
+
readonly labelKey: "chart-ui.floatMenu.option.legendSelectMode.close";
|
|
189
|
+
readonly value: SelectModeEnum.Close;
|
|
190
|
+
}];
|
|
191
|
+
export declare const CHART_ELEMENT_FLOAT_MENU_VISUAL_MAP_TYPE_OPTION_DEFINITIONS: readonly [{
|
|
192
|
+
readonly labelKey: "chart-ui.floatMenu.option.visualMapType.continuous";
|
|
193
|
+
readonly value: "continuous";
|
|
194
|
+
}, {
|
|
195
|
+
readonly labelKey: "chart-ui.floatMenu.option.visualMapType.piecewise";
|
|
196
|
+
readonly value: "piecewise";
|
|
197
|
+
}];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ChartElementFloatMenuAdapterRegistry } from './chart-element-float-menu-adapter-registry';
|
|
2
|
+
export { ChartElementFloatMenu } from './ChartElementFloatMenu';
|
|
3
|
+
export { CHART_ELEMENT_FLOAT_MENU_COMPONENT } from './constants';
|
|
4
|
+
export type { ChartElementConfigTarget, ChartElementFloatMenuStateKey, ChartMarkDirectEditTarget, ChartMarkPanelTarget, IChartElementFloatMenuAdapter, IChartElementFloatMenuAdapterRegistry, IChartElementFloatMenuContext, IChartElementFloatMenuExtraProps, } from './types';
|
|
5
|
+
export { resolveChartElementConfigTarget } from './types';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { IChartElementHit } from '@univerjs-pro/engine-chart';
|
|
2
|
+
import type { IDisposable } from '@univerjs/core';
|
|
3
|
+
import type { CHART_ELEMENT_FLOAT_MENU_STATE_KEYS } from './constants';
|
|
4
|
+
export type ChartMarkDirectEditTarget = {
|
|
5
|
+
kind: 'seriesStyle';
|
|
6
|
+
seriesId: string;
|
|
7
|
+
seriesIndex: number;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'pieStyle';
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'paretoStyle';
|
|
12
|
+
part: 'bar' | 'line';
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'waterfallStyle';
|
|
15
|
+
seriesId: string;
|
|
16
|
+
seriesIndex?: number;
|
|
17
|
+
part: 'positive' | 'negative' | 'subtotal';
|
|
18
|
+
};
|
|
19
|
+
export type ChartMarkPanelTarget = 'pieStyle' | 'paretoBarSeries' | 'paretoLineSeries' | 'waterfallSeries' | 'relation' | 'wordCloud' | 'data';
|
|
20
|
+
export type ChartElementConfigTarget = {
|
|
21
|
+
scope: 'chartArea';
|
|
22
|
+
} | {
|
|
23
|
+
scope: 'title';
|
|
24
|
+
titleKey: 'title' | 'subtitle';
|
|
25
|
+
} | {
|
|
26
|
+
scope: 'axisTitle';
|
|
27
|
+
axisId: 'xAxis' | 'yAxis' | 'rightYAxis';
|
|
28
|
+
titleKey: 'xAxisTitle' | 'yAxisTitle' | 'rightYAxisTitle';
|
|
29
|
+
} | {
|
|
30
|
+
scope: 'axis';
|
|
31
|
+
axisId: 'xAxis' | 'yAxis' | 'rightYAxis';
|
|
32
|
+
} | {
|
|
33
|
+
scope: 'gridLine';
|
|
34
|
+
axisId: 'xAxis' | 'yAxis' | 'rightYAxis';
|
|
35
|
+
} | {
|
|
36
|
+
scope: 'tick';
|
|
37
|
+
axisId: 'xAxis' | 'yAxis' | 'rightYAxis';
|
|
38
|
+
} | {
|
|
39
|
+
scope: 'legend';
|
|
40
|
+
legendIndex?: number;
|
|
41
|
+
legendName?: string;
|
|
42
|
+
} | {
|
|
43
|
+
scope: 'mark';
|
|
44
|
+
seriesId?: string;
|
|
45
|
+
seriesIndex?: number;
|
|
46
|
+
dataIndex?: number;
|
|
47
|
+
directEdit?: ChartMarkDirectEditTarget;
|
|
48
|
+
panel?: ChartMarkPanelTarget;
|
|
49
|
+
} | {
|
|
50
|
+
scope: 'series';
|
|
51
|
+
seriesId: string;
|
|
52
|
+
seriesIndex: number;
|
|
53
|
+
} | {
|
|
54
|
+
scope: 'dataPoint';
|
|
55
|
+
seriesId: string;
|
|
56
|
+
seriesIndex: number;
|
|
57
|
+
dataIndex: number;
|
|
58
|
+
} | {
|
|
59
|
+
scope: 'dataLabel';
|
|
60
|
+
seriesId?: string;
|
|
61
|
+
seriesIndex?: number;
|
|
62
|
+
dataIndex?: number;
|
|
63
|
+
};
|
|
64
|
+
export type ChartElementFloatMenuStateKey = typeof CHART_ELEMENT_FLOAT_MENU_STATE_KEYS[keyof typeof CHART_ELEMENT_FLOAT_MENU_STATE_KEYS];
|
|
65
|
+
export interface IChartElementFloatMenuExtraProps {
|
|
66
|
+
host: 'sheet' | 'slide';
|
|
67
|
+
unitId: string;
|
|
68
|
+
subUnitId?: string;
|
|
69
|
+
chartId: string;
|
|
70
|
+
drawingId?: string;
|
|
71
|
+
element: IChartElementHit;
|
|
72
|
+
target: ChartElementConfigTarget;
|
|
73
|
+
adapterKey: string;
|
|
74
|
+
}
|
|
75
|
+
export interface IChartElementFloatMenuContext extends IChartElementFloatMenuExtraProps {
|
|
76
|
+
}
|
|
77
|
+
export interface IChartElementFloatMenuObservable<T> {
|
|
78
|
+
subscribe(next: (value: T) => void): {
|
|
79
|
+
unsubscribe(): void;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export interface IChartElementFloatMenuAdapter {
|
|
83
|
+
getState<T>(context: IChartElementFloatMenuContext, key: ChartElementFloatMenuStateKey): IChartElementFloatMenuObservable<T | undefined> | undefined;
|
|
84
|
+
setState<T>(context: IChartElementFloatMenuContext, key: ChartElementFloatMenuStateKey, patch: T): void;
|
|
85
|
+
close?(): void;
|
|
86
|
+
openFullPanel?(context: IChartElementFloatMenuContext): void;
|
|
87
|
+
}
|
|
88
|
+
export interface IChartElementFloatMenuAdapterRegistry {
|
|
89
|
+
register(adapterKey: string, adapter: IChartElementFloatMenuAdapter): IDisposable;
|
|
90
|
+
get(adapterKey: string): IChartElementFloatMenuAdapter | undefined;
|
|
91
|
+
}
|
|
92
|
+
export declare function resolveChartElementConfigTarget(hit: IChartElementHit): ChartElementConfigTarget | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ColorPickerControl, DropdownSelector, FontAlignSelector, FontColorSelector, FontFormatBar, FontFormatToggle, FontSizeSelector, } from './components';
|
|
2
|
+
export type { IColorPickerControlProps, IDropdownSelectorOption, IDropdownSelectorProps, IFontAlignSelectorProps, IFontColorSelectorProps, IFontFormatBarProps, IFontFormatStyle, IFontFormatToggleProps, IFontSizeSelectorProps, PropertyChangeFunction, } from './components';
|
|
3
|
+
export { CHART_ELEMENT_FLOAT_MENU_COMPONENT, ChartElementFloatMenu, ChartElementFloatMenuAdapterRegistry, resolveChartElementConfigTarget, } from './float-menu';
|
|
4
|
+
export type { ChartElementConfigTarget, ChartElementFloatMenuStateKey, ChartMarkDirectEditTarget, ChartMarkPanelTarget, IChartElementFloatMenuAdapter, IChartElementFloatMenuAdapterRegistry, IChartElementFloatMenuContext, IChartElementFloatMenuExtraProps, } from './float-menu';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'chart-ui': {
|
|
3
|
+
common: {
|
|
4
|
+
default: string;
|
|
5
|
+
reset: string;
|
|
6
|
+
};
|
|
7
|
+
floatMenu: {
|
|
8
|
+
menuTitle: {
|
|
9
|
+
chart: string;
|
|
10
|
+
chartTitle: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
axisTitle: string;
|
|
13
|
+
legend: string;
|
|
14
|
+
horizontalAxis: string;
|
|
15
|
+
verticalAxis: string;
|
|
16
|
+
rightVerticalAxis: string;
|
|
17
|
+
gridline: string;
|
|
18
|
+
tick: string;
|
|
19
|
+
mark: string;
|
|
20
|
+
series: string;
|
|
21
|
+
dataPoint: string;
|
|
22
|
+
dataLabel: string;
|
|
23
|
+
};
|
|
24
|
+
field: {
|
|
25
|
+
title: string;
|
|
26
|
+
subtitle: string;
|
|
27
|
+
position: string;
|
|
28
|
+
size: string;
|
|
29
|
+
align: string;
|
|
30
|
+
mode: string;
|
|
31
|
+
map: string;
|
|
32
|
+
rotate: string;
|
|
33
|
+
min: string;
|
|
34
|
+
max: string;
|
|
35
|
+
color: string;
|
|
36
|
+
borderColor: string;
|
|
37
|
+
opacity: string;
|
|
38
|
+
labelPosition: string;
|
|
39
|
+
labelText: string;
|
|
40
|
+
titleText: string;
|
|
41
|
+
};
|
|
42
|
+
action: {
|
|
43
|
+
more: string;
|
|
44
|
+
bold: string;
|
|
45
|
+
italic: string;
|
|
46
|
+
};
|
|
47
|
+
control: {
|
|
48
|
+
labels: string;
|
|
49
|
+
line: string;
|
|
50
|
+
reverse: string;
|
|
51
|
+
date: string;
|
|
52
|
+
};
|
|
53
|
+
option: {
|
|
54
|
+
textAlign: {
|
|
55
|
+
left: string;
|
|
56
|
+
center: string;
|
|
57
|
+
right: string;
|
|
58
|
+
};
|
|
59
|
+
position: {
|
|
60
|
+
top: string;
|
|
61
|
+
bottom: string;
|
|
62
|
+
left: string;
|
|
63
|
+
right: string;
|
|
64
|
+
hide: string;
|
|
65
|
+
inside: string;
|
|
66
|
+
outside: string;
|
|
67
|
+
};
|
|
68
|
+
labelText: {
|
|
69
|
+
category: string;
|
|
70
|
+
value: string;
|
|
71
|
+
percentage: string;
|
|
72
|
+
};
|
|
73
|
+
axisAlign: {
|
|
74
|
+
start: string;
|
|
75
|
+
center: string;
|
|
76
|
+
end: string;
|
|
77
|
+
};
|
|
78
|
+
legendSelectMode: {
|
|
79
|
+
single: string;
|
|
80
|
+
multiple: string;
|
|
81
|
+
close: string;
|
|
82
|
+
};
|
|
83
|
+
visualMapType: {
|
|
84
|
+
continuous: string;
|
|
85
|
+
piecewise: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export default locale;
|