@univerjs-pro/chart-ui 1.0.4 → 1.1.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 (94) hide show
  1. package/lib/cjs/facade.js +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/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.css +12 -0
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/components/ChartTypeOptions.d.ts +47 -4
  66. package/lib/types/editor/components/ChartValueField.d.ts +2 -0
  67. package/lib/types/editor/hooks/use-chart-runtime-context.d.ts +2 -0
  68. package/lib/types/editor/sections/ChartThreeDSection.d.ts +3 -0
  69. package/lib/types/editor/sections/ChartTrendlineSection.d.ts +1 -1
  70. package/lib/types/index.d.ts +1 -0
  71. package/lib/types/locale/en-US.d.ts +28 -17
  72. package/lib/types/services/chart-view-state.d.ts +4 -0
  73. package/lib/umd/facade.js +1 -1
  74. package/lib/umd/index.js +1 -1
  75. package/lib/umd/locale/ar-SA.js +1 -1
  76. package/lib/umd/locale/ca-ES.js +1 -1
  77. package/lib/umd/locale/de-DE.js +1 -1
  78. package/lib/umd/locale/en-US.js +1 -1
  79. package/lib/umd/locale/es-ES.js +1 -1
  80. package/lib/umd/locale/fa-IR.js +1 -1
  81. package/lib/umd/locale/fr-FR.js +1 -1
  82. package/lib/umd/locale/id-ID.js +1 -1
  83. package/lib/umd/locale/it-IT.js +1 -1
  84. package/lib/umd/locale/ja-JP.js +1 -1
  85. package/lib/umd/locale/ko-KR.js +1 -1
  86. package/lib/umd/locale/pl-PL.js +1 -1
  87. package/lib/umd/locale/pt-BR.js +1 -1
  88. package/lib/umd/locale/ru-RU.js +1 -1
  89. package/lib/umd/locale/sk-SK.js +1 -1
  90. package/lib/umd/locale/vi-VN.js +1 -1
  91. package/lib/umd/locale/zh-CN.js +1 -1
  92. package/lib/umd/locale/zh-HK.js +1 -1
  93. package/lib/umd/locale/zh-TW.js +1 -1
  94. package/package.json +10 -10
@@ -1,17 +1,16 @@
1
- import type { PieSecondaryPlotType as PieSecondaryPlotTypeValue } from '@univerjs-pro/engine-chart';
2
1
  import type { ReactNode } from 'react';
3
- import { ChartTypeBits } from '@univerjs-pro/engine-chart';
2
+ import { ChartTypeBits, PieSecondaryPlotType } from '@univerjs-pro/engine-chart';
4
3
  export interface IChartTypeOption<TLabel = ReactNode> {
5
4
  icon?: ReactNode;
6
5
  id?: string;
7
6
  label: TLabel;
8
- pieSecondaryPlotType?: PieSecondaryPlotTypeValue;
7
+ pieSecondaryPlotType?: PieSecondaryPlotType;
9
8
  value: ChartTypeBits;
10
9
  }
11
10
  export interface IChartSelectOption {
12
11
  chartType?: ChartTypeBits;
13
12
  label: ReactNode;
14
- pieSecondaryPlotType?: PieSecondaryPlotTypeValue;
13
+ pieSecondaryPlotType?: PieSecondaryPlotType;
15
14
  value: string;
16
15
  }
17
16
  export declare const CompositePieChartTypeOptionId: {
@@ -22,6 +21,10 @@ export declare const CHART_TYPE_CATALOG: readonly [{
22
21
  readonly labelId: "line";
23
22
  readonly value: ChartTypeBits.Line;
24
23
  readonly iconName: "LineChartIcon";
24
+ }, {
25
+ readonly labelId: "line3D";
26
+ readonly value: ChartTypeBits.Line3D;
27
+ readonly iconName: "LineChartIcon";
25
28
  }, {
26
29
  readonly labelId: "column";
27
30
  readonly value: ChartTypeBits.Column;
@@ -34,6 +37,18 @@ export declare const CHART_TYPE_CATALOG: readonly [{
34
37
  readonly labelId: "columnPercentStacked";
35
38
  readonly value: ChartTypeBits.ColumnPercentStacked;
36
39
  readonly iconName: "ColumnChartIcon";
40
+ }, {
41
+ readonly labelId: "column3D";
42
+ readonly value: ChartTypeBits.Column3D;
43
+ readonly iconName: "ColumnChartIcon";
44
+ }, {
45
+ readonly labelId: "columnStacked3D";
46
+ readonly value: ChartTypeBits.ColumnStacked3D;
47
+ readonly iconName: "ColumnChartIcon";
48
+ }, {
49
+ readonly labelId: "columnPercentStacked3D";
50
+ readonly value: ChartTypeBits.ColumnPercentStacked3D;
51
+ readonly iconName: "ColumnChartIcon";
37
52
  }, {
38
53
  readonly labelId: "bar";
39
54
  readonly value: ChartTypeBits.Bar;
@@ -46,6 +61,18 @@ export declare const CHART_TYPE_CATALOG: readonly [{
46
61
  readonly labelId: "barPercentStacked";
47
62
  readonly value: ChartTypeBits.BarPercentStacked;
48
63
  readonly iconName: "BarChartIcon";
64
+ }, {
65
+ readonly labelId: "bar3D";
66
+ readonly value: ChartTypeBits.Bar3D;
67
+ readonly iconName: "BarChartIcon";
68
+ }, {
69
+ readonly labelId: "barStacked3D";
70
+ readonly value: ChartTypeBits.BarStacked3D;
71
+ readonly iconName: "BarChartIcon";
72
+ }, {
73
+ readonly labelId: "barPercentStacked3D";
74
+ readonly value: ChartTypeBits.BarPercentStacked3D;
75
+ readonly iconName: "BarChartIcon";
49
76
  }, {
50
77
  readonly labelId: "pie";
51
78
  readonly value: ChartTypeBits.Pie;
@@ -66,6 +93,10 @@ export declare const CHART_TYPE_CATALOG: readonly [{
66
93
  readonly value: ChartTypeBits.Pie;
67
94
  readonly pieSecondaryPlotType: "bar";
68
95
  readonly iconName: "PieChartIcon";
96
+ }, {
97
+ readonly labelId: "pie3D";
98
+ readonly value: ChartTypeBits.Pie3D;
99
+ readonly iconName: "PieChartIcon";
69
100
  }, {
70
101
  readonly labelId: "area";
71
102
  readonly value: ChartTypeBits.Area;
@@ -78,6 +109,18 @@ export declare const CHART_TYPE_CATALOG: readonly [{
78
109
  readonly labelId: "areaPercentStacked";
79
110
  readonly value: ChartTypeBits.AreaPercentStacked;
80
111
  readonly iconName: "AreaChartIcon";
112
+ }, {
113
+ readonly labelId: "area3D";
114
+ readonly value: ChartTypeBits.Area3D;
115
+ readonly iconName: "AreaChartIcon";
116
+ }, {
117
+ readonly labelId: "areaStacked3D";
118
+ readonly value: ChartTypeBits.AreaStacked3D;
119
+ readonly iconName: "AreaChartIcon";
120
+ }, {
121
+ readonly labelId: "areaPercentStacked3D";
122
+ readonly value: ChartTypeBits.AreaPercentStacked3D;
123
+ readonly iconName: "AreaChartIcon";
81
124
  }, {
82
125
  readonly labelId: "radar";
83
126
  readonly value: ChartTypeBits.Radar;
@@ -0,0 +1,2 @@
1
+ import type { IChartNumberFieldProps } from './ChartNumberField';
2
+ export declare function ChartValueField(props: Omit<IChartNumberFieldProps, 'allowEmpty' | 'precision' | 'step'>): import("react").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  export declare function useChartRuntimeContext(): {
2
2
  direction: "ltr" | "rtl";
3
+ threeDRightAngleAxes?: boolean;
4
+ axisScaleStates?: ReturnType<typeof import("@univerjs-pro/engine-chart/models/chart-render/axes/chart-axis-scale.js").analyzeChartAxisScales>;
3
5
  adaptiveSize?: import("@univerjs-pro/engine-chart").IChartRuntimeAdaptiveSize;
4
6
  enableAdaptiveSize?: boolean;
5
7
  themeColors?: string[];
@@ -0,0 +1,3 @@
1
+ export declare function ChartThreeDSection(props: {
2
+ section?: 'view' | 'depthAxis';
3
+ }): import("react").JSX.Element | null;
@@ -15,4 +15,4 @@ export interface IChartTrendlineDefaultValues {
15
15
  export declare const DEFAULT_CHART_TRENDLINE_VALUES: IChartTrendlineDefaultValues;
16
16
  export declare function ChartTrendlineSection(props: {
17
17
  defaultValues: IChartTrendlineDefaultValues;
18
- }): import("react").JSX.Element;
18
+ }): import("react").JSX.Element | null;
@@ -54,6 +54,7 @@ export { ChartGradientFillField, ChartStackField, ChartThemeField, ChartTypeFiel
54
54
  export type { IChartTypeFieldProps, IChartWaterfallSetupDefaultValues, IChartWaterfallSetupFieldsProps, } from './editor/sections/ChartSetupSections';
55
55
  export { ChartStyleSection, DEFAULT_CHART_STYLE_VALUES, } from './editor/sections/ChartStyleSection';
56
56
  export type { IChartStyleDefaultValues, IChartStyleSectionProps, } from './editor/sections/ChartStyleSection';
57
+ export { ChartThreeDSection } from './editor/sections/ChartThreeDSection';
57
58
  export { ChartAxisTitleFields, ChartMainTitleFields, ChartSubtitleFields, ChartTitleFontSizeFields, ChartTitlesSection, DEFAULT_CHART_TITLE_VALUES, } from './editor/sections/ChartTitleSections';
58
59
  export type { IChartTitleDefaultValues } from './editor/sections/ChartTitleSections';
59
60
  export { ChartTrendlineSection, DEFAULT_CHART_TRENDLINE_VALUES, } from './editor/sections/ChartTrendlineSection';
@@ -1,5 +1,20 @@
1
1
  declare const locale: {
2
2
  'chart-ui': {
3
+ threeD: {
4
+ title: string;
5
+ rotX: string;
6
+ rotY: string;
7
+ perspective: string;
8
+ rightAngleAxes: string;
9
+ depthPercent: string;
10
+ heightPercent: string;
11
+ gapDepth: string;
12
+ grouping: string;
13
+ standard: string;
14
+ clustered: string;
15
+ depthAxis: string;
16
+ explosion: string;
17
+ };
3
18
  dataSourceStatus: {
4
19
  loading: string;
5
20
  unavailable: string;
@@ -28,24 +43,7 @@ declare const locale: {
28
43
  area: string;
29
44
  areaStacked: string;
30
45
  areaPercentStacked: string;
31
- radar: string;
32
- scatter: string;
33
46
  combination: string;
34
- wordCloud: string;
35
- funnel: string;
36
- bubble: string;
37
- relation: string;
38
- waterfall: string;
39
- pareto: string;
40
- sankey: string;
41
- heatmap: string;
42
- boxplot: string;
43
- candlestick: string;
44
- histogram: string;
45
- treemap: string;
46
- sunburst: string;
47
- gauge: string;
48
- chord: string;
49
47
  };
50
48
  section: {
51
49
  waterfall: string;
@@ -86,6 +84,7 @@ declare const locale: {
86
84
  number: string;
87
85
  scientific: string;
88
86
  custom: string;
87
+ formatValue: string;
89
88
  preview: string;
90
89
  generalType: string;
91
90
  accountingType: string;
@@ -140,6 +139,18 @@ declare const locale: {
140
139
  zero: string;
141
140
  };
142
141
  axis: {
142
+ logUnsupported: string;
143
+ logOrphanBase: string;
144
+ invalidLogBounds: string;
145
+ scaleType: string;
146
+ linear: string;
147
+ log: string;
148
+ logBase: string;
149
+ invalidLogBase: string;
150
+ logSkipped: string;
151
+ logNoPositive: string;
152
+ logPercent: string;
153
+ logBoundsReset: string;
143
154
  target: string;
144
155
  useDateAxis: string;
145
156
  lineColor: string;
@@ -61,6 +61,8 @@ export declare enum ChartViewStateKey {
61
61
  SunburstStyle = "sunburstStyle",
62
62
  SunburstValueIndex = "sunburstValueIndex",
63
63
  Theme = "theme",
64
+ ThreeD = "threeD",
65
+ DepthAxis = "depthAxis",
64
66
  Title = "title",
65
67
  Treemap = "treemap",
66
68
  Trendlines = "trendlines",
@@ -105,6 +107,8 @@ export interface IChartViewStateMap {
105
107
  [ChartViewStateKey.SunburstStyle]: DeepNullish<IChartSunburstSpec> | undefined;
106
108
  [ChartViewStateKey.SunburstValueIndex]: number | undefined;
107
109
  [ChartViewStateKey.Theme]: ChartPendingConfig['theme'];
110
+ [ChartViewStateKey.ThreeD]: ChartPendingConfig['threeD'];
111
+ [ChartViewStateKey.DepthAxis]: ChartPendingConfig['depthAxis'];
108
112
  [ChartViewStateKey.Title]: ChartPendingConfig['title'];
109
113
  [ChartViewStateKey.Treemap]: ChartPendingConfig['treemap'];
110
114
  [ChartViewStateKey.Trendlines]: ChartPendingConfig['trendlines'];
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(_0x139767,_0x298002){var _0x2efb41=_0x217c,_0x3df0b4=_0x139767();while(!![]){try{var _0x37e26c=parseInt(_0x2efb41(0xe5))/0x1*(parseInt(_0x2efb41(0xe1))/0x2)+-parseInt(_0x2efb41(0xe8))/0x3*(parseInt(_0x2efb41(0xe4))/0x4)+-parseInt(_0x2efb41(0xdf))/0x5*(parseInt(_0x2efb41(0xe9))/0x6)+-parseInt(_0x2efb41(0xea))/0x7*(parseInt(_0x2efb41(0xde))/0x8)+parseInt(_0x2efb41(0xe6))/0x9+parseInt(_0x2efb41(0xdd))/0xa+parseInt(_0x2efb41(0xe3))/0xb;if(_0x37e26c===_0x298002)break;else _0x3df0b4['push'](_0x3df0b4['shift']());}catch(_0xe317b6){_0x3df0b4['push'](_0x3df0b4['shift']());}}}(_0x20ed,0x310dd),function(_0x751e05,_0x214a1b){var _0x612c5d=_0x217c;typeof exports==_0x612c5d(0xeb)&&typeof module<'u'?_0x214a1b(require('@univerjs-pro/chart-ui'),require('@univerjs-pro/engine-chart/facade')):typeof define==_0x612c5d(0xe7)&&define[_0x612c5d(0xe2)]?define([_0x612c5d(0xee),_0x612c5d(0xf0)],_0x214a1b):(_0x751e05=typeof globalThis<'u'?globalThis:_0x751e05||self,_0x214a1b(_0x751e05[_0x612c5d(0xed)],_0x751e05['UniverProEngineChartFacade']));}(this,function(_0x513294,_0x2563b8){var _0x1ef3bf=_0x217c,_0x296a9c=class extends _0x2563b8[_0x1ef3bf(0xe0)]{[_0x1ef3bf(0xec)](_0x2dafb1){var _0x2cbdf0=_0x1ef3bf;return this['_injector'][_0x2cbdf0(0xdc)](_0x513294['ChartImageExportService'])[_0x2cbdf0(0xec)](this,_0x2dafb1);}};_0x2563b8[_0x1ef3bf(0xe0)][_0x1ef3bf(0xef)](_0x296a9c);}));function _0x217c(_0x459476,_0x4aa898){_0x459476=_0x459476-0xdc;var _0x20edd8=_0x20ed();var _0x217cc8=_0x20edd8[_0x459476];return _0x217cc8;}function _0x20ed(){var _0x5a4524=['UniverProChartUi','@univerjs-pro/chart-ui','extend','@univerjs-pro/engine-chart/facade','get','550670mHPEMb','404072SGznYQ','45295hMmCxv','FChart','2edvZqa','amd','7276808WDNlXK','708FUkaxR','249967yofRBU','414576xpCaSU','function','5769yQGNRw','78uUMidX','49HPUvSp','object','exportImage'];_0x20ed=function(){return _0x5a4524;};return _0x20ed();}
1
+ (function(_0x13642e,_0x20f527){var _0x3309a6=_0x25a8,_0x3d7e29=_0x13642e();while(!![]){try{var _0x302a8a=parseInt(_0x3309a6(0x96))/0x1+-parseInt(_0x3309a6(0x8c))/0x2+-parseInt(_0x3309a6(0x99))/0x3*(parseInt(_0x3309a6(0x9a))/0x4)+-parseInt(_0x3309a6(0x87))/0x5+parseInt(_0x3309a6(0x8f))/0x6+parseInt(_0x3309a6(0x88))/0x7*(-parseInt(_0x3309a6(0x8e))/0x8)+parseInt(_0x3309a6(0x8a))/0x9*(parseInt(_0x3309a6(0x90))/0xa);if(_0x302a8a===_0x20f527)break;else _0x3d7e29['push'](_0x3d7e29['shift']());}catch(_0x533db2){_0x3d7e29['push'](_0x3d7e29['shift']());}}}(_0x5146,0x3743d),function(_0x15a900,_0x41947a){var _0x54deea=_0x25a8;typeof exports==_0x54deea(0x97)&&typeof module<'u'?_0x41947a(require('@univerjs-pro/chart-ui'),require('@univerjs-pro/engine-chart/facade')):typeof define==_0x54deea(0x8b)&&define[_0x54deea(0x91)]?define([_0x54deea(0x93),_0x54deea(0x8d)],_0x41947a):(_0x15a900=typeof globalThis<'u'?globalThis:_0x15a900||self,_0x41947a(_0x15a900[_0x54deea(0x92)],_0x15a900[_0x54deea(0x95)]));}(this,function(_0x1c77f8,_0x1d61ff){var _0x3b2f3=_0x25a8,_0x80cce0=class extends _0x1d61ff['FChart']{[_0x3b2f3(0x98)](_0x115e19){var _0xfcf320=_0x3b2f3;return this['_injector']['get'](_0x1c77f8[_0xfcf320(0x94)])[_0xfcf320(0x98)](this,_0x115e19);}};_0x1d61ff['FChart'][_0x3b2f3(0x89)](_0x80cce0);}));function _0x25a8(_0x221672,_0x37ee7c){_0x221672=_0x221672-0x87;var _0x5146c4=_0x5146();var _0x25a85f=_0x5146c4[_0x221672];return _0x25a85f;}function _0x5146(){var _0x4572fd=['346386SRSUwT','7730QxTSTR','amd','UniverProChartUi','@univerjs-pro/chart-ui','ChartImageExportService','UniverProEngineChartFacade','423788sNPCUv','object','exportImage','21fPjitb','117444uNrPCY','327820rEcpci','35mmmcGp','extend','7983UrNLYq','function','749338lBQjnf','@univerjs-pro/engine-chart/facade','472072BysvNC'];_0x5146=function(){return _0x4572fd;};return _0x5146();}