vue-echarts 6.6.6 → 6.6.7

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 CHANGED
@@ -238,7 +238,7 @@ Drop `<script>` inside your HTML file and access the component via `window.VueEC
238
238
  ```html
239
239
  <script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script>
240
240
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
241
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.6"></script>
241
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.7"></script>
242
242
  ```
243
243
  <!-- vue3Scripts:end -->
244
244
 
@@ -258,7 +258,7 @@ app.component('v-chart', VueECharts)
258
258
  ```html
259
259
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script>
260
260
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
261
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.6"></script>
261
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.7"></script>
262
262
  ```
263
263
  <!-- vue2Scripts:end -->
264
264
 
package/README.zh-Hans.md CHANGED
@@ -238,7 +238,7 @@ import "echarts";
238
238
  ```html
239
239
  <script src="https://cdn.jsdelivr.net/npm/vue@3.3.7"></script>
240
240
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
241
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.6"></script>
241
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.7"></script>
242
242
  ```
243
243
  <!-- vue3Scripts:end -->
244
244
 
@@ -258,7 +258,7 @@ app.component('v-chart', VueECharts)
258
258
  ```html
259
259
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.15"></script>
260
260
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3"></script>
261
- <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.6"></script>
261
+ <script src="https://cdn.jsdelivr.net/npm/vue-echarts@6.6.7"></script>
262
262
  ```
263
263
  <!-- vue2Scripts:end -->
264
264
 
@@ -0,0 +1,141 @@
1
+ import { DefineComponent, Ref } from 'vue-demi';
2
+ import { init } from 'echarts/core';
3
+ import { SetOptionOpts, ECElementEvent, ElementEvent } from 'echarts';
4
+
5
+ type InitType = typeof init;
6
+ type InitParameters = Parameters<InitType>;
7
+ type InitOptions = NonNullable<InitParameters[2]>;
8
+
9
+ type UpdateOptions = SetOptionOpts;
10
+
11
+ type EChartsType = ReturnType<InitType>;
12
+
13
+ type SetOptionType = EChartsType["setOption"];
14
+ type Option = Parameters<SetOptionType>[0];
15
+
16
+ type MouseEventName =
17
+ | "click"
18
+ | "dblclick"
19
+ | "mouseout"
20
+ | "mouseover"
21
+ | "mouseup"
22
+ | "mousedown"
23
+ | "mousemove"
24
+ | "contextmenu"
25
+ | "globalout";
26
+
27
+ type ElementEventName =
28
+ | MouseEventName
29
+ | "mousewheel"
30
+ | "drag"
31
+ | "dragstart"
32
+ | "dragend"
33
+ | "dragenter"
34
+ | "dragleave"
35
+ | "dragover"
36
+ | "drop";
37
+
38
+ type ZRenderEventName = `zr:${ElementEventName}`;
39
+
40
+ type OtherEventName =
41
+ | "highlight"
42
+ | "downplay"
43
+ | "selectchanged"
44
+ | "legendselectchanged"
45
+ | "legendselected"
46
+ | "legendunselected"
47
+ | "legendselectall"
48
+ | "legendinverseselect"
49
+ | "legendscroll"
50
+ | "datazoom"
51
+ | "datarangeselected"
52
+ | "graphroam"
53
+ | "georoam"
54
+ | "treeroam"
55
+ | "timelinechanged"
56
+ | "timelineplaychanged"
57
+ | "restore"
58
+ | "dataviewchanged"
59
+ | "magictypechanged"
60
+ | "geoselectchanged"
61
+ | "geoselected"
62
+ | "geounselected"
63
+ | "axisareaselected"
64
+ | "brush"
65
+ | "brushEnd"
66
+ | "brushselected"
67
+ | "globalcursortaken";
68
+
69
+ type MouseEmits = {
70
+ [key in MouseEventName]: (params: ECElementEvent) => boolean;
71
+ };
72
+
73
+ type ZRenderEmits = {
74
+ [key in ZRenderEventName]: (params: ElementEvent) => boolean;
75
+ };
76
+
77
+ type OtherEmits = {
78
+ [key in OtherEventName]: null;
79
+ };
80
+
81
+ type Emits = MouseEmits &
82
+ OtherEmits & {
83
+ rendered: (params: { elapsedTime: number }) => boolean;
84
+ finished: () => boolean;
85
+ } & ZRenderEmits;
86
+
87
+ /* eslint-disable @typescript-eslint/ban-types */
88
+
89
+
90
+ declare const LOADING_OPTIONS_KEY = "ecLoadingOptions";
91
+ declare const THEME_KEY = "ecTheme";
92
+ declare const INIT_OPTIONS_KEY = "ecInitOptions";
93
+ declare const UPDATE_OPTIONS_KEY = "ecUpdateOptions";
94
+
95
+ declare type ChartProps = {
96
+ loading?: boolean;
97
+ loadingOptions?: Record<string, unknown>;
98
+ autoresize?: boolean;
99
+ option?: Option;
100
+ theme?: string | Record<string, unknown>;
101
+ initOptions?: InitOptions;
102
+ updateOptions?: UpdateOptions;
103
+ group?: string;
104
+ manualUpdate?: boolean;
105
+ };
106
+
107
+ type MethodNames =
108
+ | "getWidth"
109
+ | "getHeight"
110
+ | "getDom"
111
+ | "getOption"
112
+ | "resize"
113
+ | "dispatchAction"
114
+ | "convertToPixel"
115
+ | "convertFromPixel"
116
+ | "containPixel"
117
+ | "getDataURL"
118
+ | "getConnectedDataURL"
119
+ | "appendData"
120
+ | "clear"
121
+ | "isDisposed"
122
+ | "dispose"
123
+ | "setOption";
124
+
125
+ declare type ChartMethods = Pick<EChartsType, MethodNames>;
126
+
127
+ declare const Chart: DefineComponent<
128
+ ChartProps,
129
+ {
130
+ root: Ref<HTMLElement | undefined>;
131
+ chart: Ref<EChartsType | undefined>;
132
+ },
133
+ {},
134
+ {},
135
+ ChartMethods,
136
+ {},
137
+ {},
138
+ Emits
139
+ >;
140
+
141
+ export { INIT_OPTIONS_KEY, LOADING_OPTIONS_KEY, THEME_KEY, UPDATE_OPTIONS_KEY, Chart as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-echarts",
3
- "version": "6.6.6",
3
+ "version": "6.6.7",
4
4
  "description": "Vue.js component for Apache ECharts.",
5
5
  "author": "GU Yiling <justice360@gmail.com>",
6
6
  "main": "dist/index.cjs.min.js",