reke-ui 0.5.2 → 0.5.4

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 (159) hide show
  1. package/custom-elements.json +764 -3
  2. package/dist/components/reke-bar-chart/reke-bar-chart.d.ts +99 -0
  3. package/dist/components/reke-bar-chart/reke-bar-chart.d.ts.map +1 -0
  4. package/dist/components/reke-bar-chart/reke-bar-chart.js +319 -0
  5. package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts +2 -0
  6. package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts.map +1 -0
  7. package/dist/components/reke-bar-chart/reke-bar-chart.styles.js +36 -0
  8. package/dist/components/reke-dialog/reke-dialog.d.ts +19 -0
  9. package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
  10. package/dist/components/reke-dialog/reke-dialog.js +40 -15
  11. package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
  12. package/dist/components/reke-dialog/reke-dialog.styles.js +110 -0
  13. package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +52 -1
  14. package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -1
  15. package/dist/components/reke-pie-chart/reke-pie-chart.js +181 -42
  16. package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -1
  17. package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +47 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +21 -20
  21. package/dist/node_modules/echarts/lib/chart/bar/BarSeries.js +50 -0
  22. package/dist/node_modules/echarts/lib/chart/bar/BarView.js +431 -0
  23. package/dist/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +65 -0
  24. package/dist/node_modules/echarts/lib/chart/bar/install.js +22 -0
  25. package/dist/node_modules/echarts/lib/chart/helper/Symbol.js +142 -0
  26. package/dist/node_modules/echarts/lib/chart/helper/SymbolDraw.js +99 -0
  27. package/dist/node_modules/echarts/lib/chart/helper/axisSnippets.js +19 -0
  28. package/dist/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +50 -0
  29. package/dist/node_modules/echarts/lib/chart/helper/createSeriesData.js +55 -0
  30. package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +3 -3
  31. package/dist/node_modules/echarts/lib/chart/helper/labelHelper.js +24 -0
  32. package/dist/node_modules/echarts/lib/chart/line/LineSeries.js +60 -0
  33. package/dist/node_modules/echarts/lib/chart/line/LineView.js +471 -0
  34. package/dist/node_modules/echarts/lib/chart/line/helper.js +34 -0
  35. package/dist/node_modules/echarts/lib/chart/line/install.js +16 -0
  36. package/dist/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +59 -0
  37. package/dist/node_modules/echarts/lib/chart/line/poly.js +135 -0
  38. package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +32 -32
  39. package/dist/node_modules/echarts/lib/chart/pie/PieView.js +69 -69
  40. package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +25 -25
  41. package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +16 -16
  42. package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +153 -153
  43. package/dist/node_modules/echarts/lib/component/axis/AxisView.js +13 -13
  44. package/dist/node_modules/echarts/lib/component/axis/CartesianAxisView.js +106 -0
  45. package/dist/node_modules/echarts/lib/component/axis/axisSplitHelper.js +50 -0
  46. package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +20 -20
  47. package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +30 -30
  48. package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +13 -13
  49. package/dist/node_modules/echarts/lib/component/dataZoom/AxisProxy.js +114 -0
  50. package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js +189 -0
  51. package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomView.js +15 -0
  52. package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js +21 -0
  53. package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js +67 -0
  54. package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js +75 -0
  55. package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js +465 -0
  56. package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js +17 -0
  57. package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js +55 -0
  58. package/dist/node_modules/echarts/lib/component/dataZoom/helper.js +88 -0
  59. package/dist/node_modules/echarts/lib/component/dataZoom/installCommon.js +14 -0
  60. package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js +10 -0
  61. package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js +9 -0
  62. package/dist/node_modules/echarts/lib/component/dataZoom/roams.js +132 -0
  63. package/dist/node_modules/echarts/lib/component/grid/install.js +9 -0
  64. package/dist/node_modules/echarts/lib/component/grid/installSimple.js +32 -0
  65. package/dist/node_modules/echarts/lib/component/helper/RoamController.js +172 -0
  66. package/dist/node_modules/echarts/lib/component/helper/cursorHelper.js +17 -0
  67. package/dist/node_modules/echarts/lib/component/helper/interactionMutex.js +15 -0
  68. package/dist/node_modules/echarts/lib/component/helper/sliderMove.js +29 -0
  69. package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +31 -31
  70. package/dist/node_modules/echarts/lib/component/legend/LegendView.js +61 -61
  71. package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +29 -29
  72. package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +4 -4
  73. package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +105 -105
  74. package/dist/node_modules/echarts/lib/coord/Axis.js +92 -0
  75. package/dist/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
  76. package/dist/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
  77. package/dist/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
  78. package/dist/node_modules/echarts/lib/coord/axisDefault.js +124 -0
  79. package/dist/node_modules/echarts/lib/coord/axisHelper.js +123 -14
  80. package/dist/node_modules/echarts/lib/coord/axisModelCommonMixin.js +9 -0
  81. package/dist/node_modules/echarts/lib/coord/axisModelCreator.js +39 -0
  82. package/dist/node_modules/echarts/lib/coord/axisNiceTicks.js +64 -0
  83. package/dist/node_modules/echarts/lib/coord/axisStatistics.js +101 -22
  84. package/dist/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js +43 -0
  85. package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +151 -5
  86. package/dist/node_modules/echarts/lib/coord/cartesian/Axis2D.js +24 -0
  87. package/dist/node_modules/echarts/lib/coord/cartesian/AxisModel.js +18 -0
  88. package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian.js +23 -0
  89. package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +69 -0
  90. package/dist/node_modules/echarts/lib/coord/cartesian/Grid.js +314 -0
  91. package/dist/node_modules/echarts/lib/coord/cartesian/GridModel.js +40 -0
  92. package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +43 -12
  93. package/dist/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +175 -0
  94. package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +39 -16
  95. package/dist/node_modules/echarts/lib/core/echarts.js +421 -421
  96. package/dist/node_modules/echarts/lib/data/OrdinalMeta.js +30 -0
  97. package/dist/node_modules/echarts/lib/data/SeriesData.js +18 -18
  98. package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +6 -6
  99. package/dist/node_modules/echarts/lib/data/helper/dataStackHelper.js +59 -0
  100. package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +13 -13
  101. package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +7 -4
  102. package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +40 -8
  103. package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +3 -3
  104. package/dist/node_modules/echarts/lib/data/helper/transform.js +8 -8
  105. package/dist/node_modules/echarts/lib/extension.js +10 -10
  106. package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +10 -10
  107. package/dist/node_modules/echarts/lib/label/labelStyle.js +34 -25
  108. package/dist/node_modules/echarts/lib/label/sectorLabel.js +83 -0
  109. package/dist/node_modules/echarts/lib/layout/barCommon.js +19 -0
  110. package/dist/node_modules/echarts/lib/layout/barGrid.js +165 -0
  111. package/dist/node_modules/echarts/lib/layout/points.js +37 -0
  112. package/dist/node_modules/echarts/lib/loading/default.js +6 -6
  113. package/dist/node_modules/echarts/lib/model/Component.js +39 -39
  114. package/dist/node_modules/echarts/lib/model/Global.js +122 -122
  115. package/dist/node_modules/echarts/lib/model/Series.js +78 -78
  116. package/dist/node_modules/echarts/lib/model/referHelper.js +58 -0
  117. package/dist/node_modules/echarts/lib/processor/dataSample.js +43 -0
  118. package/dist/node_modules/echarts/lib/scale/Interval.js +68 -0
  119. package/dist/node_modules/echarts/lib/scale/Log.js +100 -0
  120. package/dist/node_modules/echarts/lib/scale/Ordinal.js +92 -0
  121. package/dist/node_modules/echarts/lib/scale/Scale.js +13 -0
  122. package/dist/node_modules/echarts/lib/scale/Time.js +242 -0
  123. package/dist/node_modules/echarts/lib/scale/break.js +10 -2
  124. package/dist/node_modules/echarts/lib/scale/helper.js +61 -3
  125. package/dist/node_modules/echarts/lib/scale/minorTicks.js +22 -0
  126. package/dist/node_modules/echarts/lib/scale/scaleMapper.js +89 -7
  127. package/dist/node_modules/echarts/lib/util/clazz.js +35 -35
  128. package/dist/node_modules/echarts/lib/util/component.js +16 -16
  129. package/dist/node_modules/echarts/lib/util/cycleCache.js +4 -1
  130. package/dist/node_modules/echarts/lib/util/decal.js +11 -11
  131. package/dist/node_modules/echarts/lib/util/format.js +1 -1
  132. package/dist/node_modules/echarts/lib/util/graphic.js +170 -170
  133. package/dist/node_modules/echarts/lib/util/layout.js +23 -23
  134. package/dist/node_modules/echarts/lib/util/model.js +128 -68
  135. package/dist/node_modules/echarts/lib/util/number.js +55 -37
  136. package/dist/node_modules/echarts/lib/util/shape/sausage.js +25 -0
  137. package/dist/node_modules/echarts/lib/util/states.js +96 -82
  138. package/dist/node_modules/echarts/lib/util/styleCompat.js +10 -0
  139. package/dist/node_modules/echarts/lib/util/symbol.js +24 -21
  140. package/dist/node_modules/echarts/lib/util/time.js +154 -18
  141. package/dist/node_modules/echarts/lib/util/vendor.js +26 -0
  142. package/dist/node_modules/echarts/lib/view/Chart.js +19 -19
  143. package/dist/node_modules/echarts/lib/view/Component.js +7 -7
  144. package/dist/node_modules/echarts/lib/visual/style.js +5 -5
  145. package/dist/node_modules/zrender/lib/Element.js +35 -35
  146. package/dist/node_modules/zrender/lib/canvas/graphic.js +36 -36
  147. package/dist/node_modules/zrender/lib/core/PathProxy.js +25 -25
  148. package/dist/node_modules/zrender/lib/core/event.js +4 -1
  149. package/dist/node_modules/zrender/lib/core/util.js +69 -64
  150. package/dist/node_modules/zrender/lib/graphic/TSpan.js +7 -7
  151. package/dist/node_modules/zrender/lib/graphic/Text.js +37 -37
  152. package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +59 -59
  153. package/dist/node_modules/zrender/lib/tool/color.js +60 -41
  154. package/dist/react.d.ts +10 -0
  155. package/dist/react.d.ts.map +1 -1
  156. package/dist/react.js +85 -73
  157. package/dist/shared/tailwind.js +1 -1
  158. package/dist/tokens/reke-tokens.css +1 -0
  159. package/package.json +5 -1
@@ -0,0 +1,471 @@
1
+ import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
2
+ import { bind as t, defaults as n, each as r, isFunction as i, isNumber as a, map as o } from "../../../../zrender/lib/core/util.js";
3
+ import { lerp as s } from "../../../../zrender/lib/tool/color.js";
4
+ import c from "../../../../zrender/lib/graphic/Text.js";
5
+ import { initExtentForUnion as l, interpolateRawValues as u, queryDataIndex as d, unionExtentFromNumber as f } from "../../util/model.js";
6
+ import { getECData as p } from "../../util/innerStore.js";
7
+ import { SPECIAL_STATES as m, setStatesFlag as h, setStatesStylesFromModel as g, toggleHoverEmphasis as _ } from "../../util/states.js";
8
+ import v from "../../../../zrender/lib/graphic/Group.js";
9
+ import y from "../../../../zrender/lib/graphic/LinearGradient.js";
10
+ import { initProps as b, updateProps as x } from "../../animation/basicTransition.js";
11
+ import { getLabelStatesModels as S, labelInner as C, setLabelStyle as w } from "../../label/labelStyle.js";
12
+ import { convertToColorString as T } from "../../util/format.js";
13
+ import { getDefaultInterpolatedLabel as E, getDefaultLabel as D } from "../helper/labelHelper.js";
14
+ import O from "../helper/Symbol.js";
15
+ import k from "../helper/SymbolDraw.js";
16
+ import { getStackedOnPoint as A, isPointIllegal as j, prepareDataCoordInfo as M } from "./helper.js";
17
+ import { createFloat32Array as N } from "../../util/vendor.js";
18
+ import P from "./lineAnimationDiff.js";
19
+ import { ECPolygon as F, ECPolyline as I } from "./poly.js";
20
+ import L from "../../view/Chart.js";
21
+ import { createGridClipPath as R, createPolarClipPath as z } from "../helper/createClipPathFromCoordSys.js";
22
+ import { isCoordinateSystemType as B } from "../../coord/CoordinateSystem.js";
23
+ import { warnDeprecated as ee } from "../../util/styleCompat.js";
24
+ import { getTickValueOutermost as V } from "../../coord/axisHelper.js";
25
+ //#region node_modules/echarts/lib/chart/line/LineView.js
26
+ function H(e, t) {
27
+ if (e.length === t.length) {
28
+ for (var n = 0; n < e.length; n++) if (e[n] !== t[n]) return;
29
+ return !0;
30
+ }
31
+ }
32
+ function U(e) {
33
+ for (var t = l(), n = l(), r = 0; r < e.length;) {
34
+ var i = e[r++], a = e[r++];
35
+ j(i, a) || (f(t, i), f(n, a));
36
+ }
37
+ return [t, n];
38
+ }
39
+ function W(e, t) {
40
+ var n = U(e), r = n[0], i = n[1], a = U(t), o = a[0], s = a[1];
41
+ return Math.max(Math.abs(r[0] - o[0]), Math.abs(i[0] - s[0]), Math.abs(r[1] - o[1]), Math.abs(i[1] - s[1]));
42
+ }
43
+ function G(e) {
44
+ return a(e) ? e : e ? .5 : 0;
45
+ }
46
+ function te(e, t, n) {
47
+ if (n.valueDim == null) return [];
48
+ for (var r = t.count(), i = N(r * 2), a = 0; a < r; a++) {
49
+ var o = A(n, e, t, a);
50
+ i[a * 2] = o[0], i[a * 2 + 1] = o[1];
51
+ }
52
+ return i;
53
+ }
54
+ function K(e, t, n, r, i) {
55
+ var a = n.getBaseAxis(), o = a.dim === "x" || a.dim === "radius" ? 0 : 1, s = [], c = 0, l = [], u = [], d = [], f = [];
56
+ if (i) {
57
+ for (c = 0; c < e.length; c += 2) {
58
+ var p = t || e;
59
+ j(p[c], p[c + 1]) || f.push(e[c], e[c + 1]);
60
+ }
61
+ e = f;
62
+ }
63
+ for (c = 0; c < e.length - 2; c += 2) switch (d[0] = e[c + 2], d[1] = e[c + 3], u[0] = e[c], u[1] = e[c + 1], s.push(u[0], u[1]), r) {
64
+ case "end":
65
+ l[o] = d[o], l[1 - o] = u[1 - o], s.push(l[0], l[1]);
66
+ break;
67
+ case "middle":
68
+ var m = (u[o] + d[o]) / 2, h = [];
69
+ l[o] = h[o] = m, l[1 - o] = u[1 - o], h[1 - o] = d[1 - o], s.push(l[0], l[1]), s.push(h[0], h[1]);
70
+ break;
71
+ default: l[o] = u[o], l[1 - o] = d[1 - o], s.push(l[0], l[1]);
72
+ }
73
+ return s.push(e[c++], e[c++]), s;
74
+ }
75
+ function q(e, t) {
76
+ var n = [], r = e.length, i, a;
77
+ function o(e, t, n) {
78
+ var r = e.coord;
79
+ return {
80
+ coord: n,
81
+ color: s((n - r) / (t.coord - r), [e.color, t.color])
82
+ };
83
+ }
84
+ for (var c = 0; c < r; c++) {
85
+ var l = e[c], u = l.coord;
86
+ if (u < 0) i = l;
87
+ else if (u > t) {
88
+ a ? n.push(o(a, l, t)) : i && n.push(o(i, l, 0), o(i, l, t));
89
+ break;
90
+ } else i &&= (n.push(o(i, l, 0)), null), n.push(l), a = l;
91
+ }
92
+ return n;
93
+ }
94
+ function ne(e, t, n) {
95
+ var i = e.getVisual("visualMeta");
96
+ if (!(!i || !i.length || !e.count())) {
97
+ if (t.type !== "cartesian2d") {
98
+ process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
99
+ return;
100
+ }
101
+ for (var a, s, c = i.length - 1; c >= 0; c--) {
102
+ var l = e.getDimensionInfo(i[c].dimension);
103
+ if (a = l && l.coordDim, a === "x" || a === "y") {
104
+ s = i[c];
105
+ break;
106
+ }
107
+ }
108
+ if (!s) {
109
+ process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
110
+ return;
111
+ }
112
+ var u = t.getAxis(a), d = o(s.stops, function(e) {
113
+ return {
114
+ coord: u.toGlobalCoord(u.dataToCoord(e.value)),
115
+ color: e.color
116
+ };
117
+ }), f = d.length, p = s.outerColors.slice();
118
+ f && d[0].coord > d[f - 1].coord && (d.reverse(), p.reverse());
119
+ var m = q(d, a === "x" ? n.getWidth() : n.getHeight()), h = m.length;
120
+ if (!h && f) return d[0].coord < 0 ? p[1] ? p[1] : d[f - 1].color : p[0] ? p[0] : d[0].color;
121
+ var g = 10, _ = m[0].coord - g, v = m[h - 1].coord + g, b = v - _;
122
+ if (b < .001) return "transparent";
123
+ r(m, function(e) {
124
+ e.offset = (e.coord - _) / b;
125
+ }), m.push({
126
+ offset: h ? m[h - 1].offset : .5,
127
+ color: p[1] || "transparent"
128
+ }), m.unshift({
129
+ offset: h ? m[0].offset : .5,
130
+ color: p[0] || "transparent"
131
+ });
132
+ var x = new y(0, 0, 0, 0, m, !0);
133
+ return x[a] = _, x[a + "2"] = v, x;
134
+ }
135
+ }
136
+ function re(e, t, n) {
137
+ var i = e.get("showAllSymbol"), a = i === "auto";
138
+ if (!(i && !a)) {
139
+ var o = n.getAxesByScale("ordinal")[0];
140
+ if (o && !(a && J(o, t))) {
141
+ var s = t.mapDimension(o.dim), c = {};
142
+ return r(o.getViewLabels(), function(e) {
143
+ e.tick.offInterval || (c[V(o.scale, e.tick)] = 1);
144
+ }), function(e) {
145
+ return !c.hasOwnProperty(t.get(s, e));
146
+ };
147
+ }
148
+ }
149
+ }
150
+ function J(e, t) {
151
+ var n = e.getExtent(), r = Math.abs(n[1] - n[0]) / e.scale.count();
152
+ isNaN(r) && (r = 0);
153
+ for (var i = t.count(), a = Math.max(1, Math.round(i / 5)), o = 0; o < i; o += a) if (O.getSymbolSize(t, o)[+!!e.isHorizontal()] * 1.5 > r) return !1;
154
+ return !0;
155
+ }
156
+ function Y(e) {
157
+ for (var t = e.length / 2; t > 0 && j(e[t * 2 - 2], e[t * 2 - 1]); t--);
158
+ return t - 1;
159
+ }
160
+ function X(e, t) {
161
+ return [e[t * 2], e[t * 2 + 1]];
162
+ }
163
+ function Z(e, t, n) {
164
+ for (var r = e.length / 2, i = n === "x" ? 0 : 1, a, o, s = 0, c = -1, l = 0; l < r; l++) if (o = e[l * 2 + i], !j(o, e[l * 2 + 1 - i])) {
165
+ if (l === 0) {
166
+ a = o;
167
+ continue;
168
+ }
169
+ if (a <= t && o >= t || a >= t && o <= t) {
170
+ c = l;
171
+ break;
172
+ }
173
+ s = l, a = o;
174
+ }
175
+ return {
176
+ range: [s, c],
177
+ t: (t - a) / (o - a)
178
+ };
179
+ }
180
+ function Q(e) {
181
+ if (e.get(["endLabel", "show"])) return !0;
182
+ for (var t = 0; t < m.length; t++) if (e.get([
183
+ m[t],
184
+ "endLabel",
185
+ "show"
186
+ ])) return !0;
187
+ return !1;
188
+ }
189
+ function $(e, t, n, r) {
190
+ if (B(t, "cartesian2d")) {
191
+ var i = r.getModel("endLabel"), a = i.get("valueAnimation"), o = r.getData(), s = { lastFrameIndex: 0 }, c = Q(r) ? function(n, r) {
192
+ e._endLabelOnDuring(n, r, o, s, a, i, t);
193
+ } : null, l = t.getBaseAxis().isHorizontal(), u = R(t, n, r, function() {
194
+ var t = e._endLabel;
195
+ t && n && s.originalX != null && t.attr({
196
+ x: s.originalX,
197
+ y: s.originalY
198
+ });
199
+ }, c);
200
+ if (!r.get("clip", !0)) {
201
+ var d = u.shape, f = Math.max(d.width, d.height);
202
+ l ? (d.y -= f, d.height += f * 2) : (d.x -= f, d.width += f * 2);
203
+ }
204
+ return c && c(1, u), u;
205
+ } else return process.env.NODE_ENV !== "production" && r.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), z(t, n, r);
206
+ }
207
+ function ie(e, t) {
208
+ var n = t.getBaseAxis(), r = n.isHorizontal(), i = n.inverse, a = r ? i ? "right" : "left" : "center", o = r ? "middle" : i ? "top" : "bottom";
209
+ return { normal: {
210
+ align: e.get("align") || a,
211
+ verticalAlign: e.get("verticalAlign") || o
212
+ } };
213
+ }
214
+ var ae = function(r) {
215
+ e(a, r);
216
+ function a() {
217
+ return r !== null && r.apply(this, arguments) || this;
218
+ }
219
+ return a.prototype.init = function() {
220
+ var e = new v(), n = new k();
221
+ this.group.add(n.group), this._symbolDraw = n, this._lineGroup = e, this._changePolyState = t(this._changePolyState, this);
222
+ }, a.prototype.render = function(e, t, r) {
223
+ var i = e.coordinateSystem, a = this.group, o = e.getData(), s = e.getModel("lineStyle"), c = e.getModel("areaStyle"), l = o.getLayout("points") || [], u = i.type === "polar", d = this._coordSys, f = this._symbolDraw, m = this._polyline, h = this._polygon, v = this._lineGroup, y = !t.ssr && e.get("animation"), x = !c.isEmpty(), S = c.get("origin"), C = M(i, o, S), w = x && te(i, o, C), E = e.get("showSymbol"), D = e.get("connectNulls"), O = E && !u && re(e, o, i), k = this._data;
224
+ k && k.eachItemGraphicEl(function(e, t) {
225
+ e.__temp && (a.remove(e), k.setItemGraphicEl(t, null));
226
+ }), E || f.remove(), a.add(v);
227
+ var A = u ? !1 : e.get("step"), j;
228
+ i && i.getArea && e.get("clip", !0) && (j = i.getArea(), j.width == null ? j.r0 && (j.r0 -= .5, j.r += .5) : (j.x -= .1, j.y -= .1, j.width += .2, j.height += .2)), this._clipShapeForSymbol = j;
229
+ var N = ne(o, i, r) || o.getVisual("style")[o.getVisual("drawType")];
230
+ if (!(m && d.type === i.type && A === this._step)) E && f.updateData(o, {
231
+ isIgnore: O,
232
+ clipShape: j,
233
+ disableAnimation: !0,
234
+ getSymbolPoint: function(e) {
235
+ return [l[e * 2], l[e * 2 + 1]];
236
+ }
237
+ }), y && this._initSymbolLabelAnimation(o, i, j), A && (w &&= K(w, l, i, A, D), l = K(l, null, i, A, D)), m = this._newPolyline(l), x ? h = this._newPolygon(l, w) : h &&= (v.remove(h), this._polygon = null), u || this._initOrUpdateEndLabel(e, i, T(N)), v.setClipPath($(this, i, !0, e));
238
+ else {
239
+ x && !h ? h = this._newPolygon(l, w) : h && !x && (v.remove(h), h = this._polygon = null), u || this._initOrUpdateEndLabel(e, i, T(N));
240
+ var P = v.getClipPath();
241
+ P ? b(P, { shape: $(this, i, !1, e).shape }, e) : v.setClipPath($(this, i, !0, e)), E && f.updateData(o, {
242
+ isIgnore: O,
243
+ clipShape: j,
244
+ disableAnimation: !0,
245
+ getSymbolPoint: function(e) {
246
+ return [l[e * 2], l[e * 2 + 1]];
247
+ }
248
+ }), (!H(this._stackedOnPoints, w) || !H(this._points, l)) && (y ? this._doUpdateAnimation(o, w, i, r, A, S, D) : (A && (w &&= K(w, l, i, A, D), l = K(l, null, i, A, D)), m.setShape({ points: l }), h && h.setShape({
249
+ points: l,
250
+ stackedOnPoints: w
251
+ })));
252
+ }
253
+ var F = e.getModel("emphasis"), I = F.get("focus"), L = F.get("blurScope"), R = F.get("disabled");
254
+ if (m.useStyle(n(s.getLineStyle(), {
255
+ fill: "none",
256
+ stroke: N,
257
+ lineJoin: "bevel"
258
+ })), g(m, e, "lineStyle"), m.style.lineWidth > 0 && e.get([
259
+ "emphasis",
260
+ "lineStyle",
261
+ "width"
262
+ ]) === "bolder") {
263
+ var z = m.getState("emphasis").style;
264
+ z.lineWidth = +m.style.lineWidth + 1;
265
+ }
266
+ p(m).seriesIndex = e.seriesIndex, _(m, I, L, R);
267
+ var B = G(e.get("smooth")), V = e.get("smoothMonotone");
268
+ if (m.setShape({
269
+ smooth: B,
270
+ smoothMonotone: V,
271
+ connectNulls: D
272
+ }), h) {
273
+ var U = o.getCalculationInfo("stackedOnSeries"), W = 0;
274
+ h.useStyle(n(c.getAreaStyle(), {
275
+ fill: N,
276
+ opacity: .7,
277
+ lineJoin: "bevel",
278
+ decal: o.getVisual("style").decal
279
+ })), U && (W = G(U.get("smooth"))), h.setShape({
280
+ smooth: B,
281
+ stackedOnSmooth: W,
282
+ smoothMonotone: V,
283
+ connectNulls: D
284
+ }), g(h, e, "areaStyle"), p(h).seriesIndex = e.seriesIndex, _(h, I, L, R);
285
+ }
286
+ var q = this._changePolyState;
287
+ o.eachItemGraphicEl(function(e) {
288
+ e && (e.onHoverStateChange = q);
289
+ }), this._polyline.onHoverStateChange = q, this._data = o, this._coordSys = i, this._stackedOnPoints = w, this._points = l, this._step = A, this._valueOrigin = S;
290
+ var J = e.get("triggerEvent"), Y = e.get("triggerLineEvent");
291
+ process.env.NODE_ENV !== "production" && Y && ee("triggerLineEvent", "Use the `triggerEvent` option instead.");
292
+ var X = Y === !0 || J === !0 || J === "line", Z = Y === !0 || J === !0 || J === "area";
293
+ this.packEventData(e, m, X), h && this.packEventData(e, h, Z);
294
+ }, a.prototype.packEventData = function(e, t, n) {
295
+ p(t).eventData = n ? {
296
+ componentType: "series",
297
+ componentSubType: "line",
298
+ componentIndex: e.componentIndex,
299
+ seriesIndex: e.seriesIndex,
300
+ seriesName: e.name,
301
+ seriesType: "line",
302
+ selfType: t === this._polygon ? "area" : "line"
303
+ } : null;
304
+ }, a.prototype.highlight = function(e, t, n, r) {
305
+ var i = e.getData(), a = d(i, r);
306
+ if (this._changePolyState("emphasis"), !(a instanceof Array) && a != null && a >= 0) {
307
+ var o = i.getLayout("points"), s = i.getItemGraphicEl(a);
308
+ if (!s) {
309
+ var c = o[a * 2], l = o[a * 2 + 1];
310
+ if (j(c, l) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(c, l)) return;
311
+ var u = e.get("zlevel") || 0, f = e.get("z") || 0;
312
+ s = new O(i, a), s.x = c, s.y = l, s.setZ(u, f);
313
+ var p = s.getSymbolPath().getTextContent();
314
+ p && (p.zlevel = u, p.z = f, p.z2 = this._polyline.z2 + 1), s.__temp = !0, i.setItemGraphicEl(a, s), s.stopSymbolAnimation(!0), this.group.add(s);
315
+ }
316
+ s.highlight();
317
+ } else L.prototype.highlight.call(this, e, t, n, r);
318
+ }, a.prototype.downplay = function(e, t, n, r) {
319
+ var i = e.getData(), a = d(i, r);
320
+ if (this._changePolyState("normal"), a != null && a >= 0) {
321
+ var o = i.getItemGraphicEl(a);
322
+ o && (o.__temp ? (i.setItemGraphicEl(a, null), this.group.remove(o)) : o.downplay());
323
+ } else L.prototype.downplay.call(this, e, t, n, r);
324
+ }, a.prototype._changePolyState = function(e) {
325
+ var t = this._polygon;
326
+ h(this._polyline, e), t && h(t, e);
327
+ }, a.prototype._newPolyline = function(e) {
328
+ var t = this._polyline;
329
+ return t && this._lineGroup.remove(t), t = new I({
330
+ shape: { points: e },
331
+ segmentIgnoreThreshold: 2,
332
+ z2: 10
333
+ }), this._lineGroup.add(t), this._polyline = t, t;
334
+ }, a.prototype._newPolygon = function(e, t) {
335
+ var n = this._polygon;
336
+ return n && this._lineGroup.remove(n), n = new F({
337
+ shape: {
338
+ points: e,
339
+ stackedOnPoints: t
340
+ },
341
+ segmentIgnoreThreshold: 2
342
+ }), this._lineGroup.add(n), this._polygon = n, n;
343
+ }, a.prototype._initSymbolLabelAnimation = function(e, t, n) {
344
+ var r, a, o = t.getBaseAxis(), s = o.inverse;
345
+ t.type === "cartesian2d" ? (r = o.isHorizontal(), a = !1) : t.type === "polar" && (r = o.dim === "angle", a = !0);
346
+ var c = e.hostModel, l = c.get("animationDuration");
347
+ i(l) && (l = l(null));
348
+ var u = c.get("animationDelay") || 0, d = i(u) ? u(null) : u;
349
+ e.eachItemGraphicEl(function(e, o) {
350
+ var c = e;
351
+ if (c) {
352
+ var f = [e.x, e.y], p = void 0, m = void 0, h = void 0;
353
+ if (n) if (a) {
354
+ var g = n, _ = t.pointToCoord(f);
355
+ r ? (p = g.startAngle, m = g.endAngle, h = -_[1] / 180 * Math.PI) : (p = g.r0, m = g.r, h = _[0]);
356
+ } else {
357
+ var v = n;
358
+ r ? (p = v.x, m = v.x + v.width, h = e.x) : (p = v.y + v.height, m = v.y, h = e.y);
359
+ }
360
+ var y = m === p ? 0 : (h - p) / (m - p);
361
+ s && (y = 1 - y);
362
+ var b = i(u) ? u(o) : l * y + d, x = c.getSymbolPath(), S = x.getTextContent();
363
+ c.attr({
364
+ scaleX: 0,
365
+ scaleY: 0
366
+ }), c.animateTo({
367
+ scaleX: 1,
368
+ scaleY: 1
369
+ }, {
370
+ duration: 200,
371
+ setToFinal: !0,
372
+ delay: b
373
+ }), S && S.animateFrom({ style: { opacity: 0 } }, {
374
+ duration: 300,
375
+ delay: b
376
+ }), x.disableLabelAnimation = !0;
377
+ }
378
+ });
379
+ }, a.prototype._initOrUpdateEndLabel = function(e, t, n) {
380
+ var r = e.getModel("endLabel");
381
+ if (Q(e)) {
382
+ var i = e.getData(), a = this._polyline, o = i.getLayout("points");
383
+ if (!o) {
384
+ a.removeTextContent(), this._endLabel = null;
385
+ return;
386
+ }
387
+ var s = this._endLabel;
388
+ s || (s = this._endLabel = new c({ z2: 200 }), s.ignoreClip = !0, a.setTextContent(this._endLabel), a.disableLabelAnimation = !0);
389
+ var l = Y(o);
390
+ l >= 0 && (w(a, S(e, "endLabel"), {
391
+ inheritColor: n,
392
+ labelFetcher: e,
393
+ labelDataIndex: l,
394
+ defaultText: function(e, t, n) {
395
+ return n == null ? D(i, e) : E(i, n);
396
+ },
397
+ enableTextSetter: !0
398
+ }, ie(r, t)), a.textConfig.position = null);
399
+ } else this._endLabel &&= (this._polyline.removeTextContent(), null);
400
+ }, a.prototype._endLabelOnDuring = function(e, t, n, r, i, a, o) {
401
+ var s = this._endLabel, c = this._polyline;
402
+ if (s) {
403
+ e < 1 && r.originalX == null && (r.originalX = s.x, r.originalY = s.y);
404
+ var l = n.getLayout("points"), d = n.hostModel, f = d.get("connectNulls"), p = a.get("precision"), m = a.get("distance") || 0, h = o.getBaseAxis(), g = h.isHorizontal(), _ = h.inverse, v = t.shape, y = _ ? g ? v.x : v.y + v.height : g ? v.x + v.width : v.y, b = (g ? m : 0) * (_ ? -1 : 1), x = (g ? 0 : -m) * (_ ? -1 : 1), S = g ? "x" : "y", w = Z(l, y, S), T = w.range, E = T[1] - T[0], D = void 0;
405
+ if (E >= 1) {
406
+ if (E > 1 && !f) {
407
+ var O = X(l, T[0]);
408
+ s.attr({
409
+ x: O[0] + b,
410
+ y: O[1] + x
411
+ }), i && (D = d.getRawValue(T[0]));
412
+ } else {
413
+ var O = c.getPointOn(y, S);
414
+ O && s.attr({
415
+ x: O[0] + b,
416
+ y: O[1] + x
417
+ });
418
+ var k = d.getRawValue(T[0]), A = d.getRawValue(T[1]);
419
+ i && (D = u(n, p, k, A, w.t));
420
+ }
421
+ r.lastFrameIndex = T[0];
422
+ } else {
423
+ var j = e === 1 || r.lastFrameIndex > 0 ? T[0] : 0, O = X(l, j);
424
+ i && (D = d.getRawValue(j)), s.attr({
425
+ x: O[0] + b,
426
+ y: O[1] + x
427
+ });
428
+ }
429
+ if (i) {
430
+ var M = C(s);
431
+ typeof M.setLabelText == "function" && M.setLabelText(D);
432
+ }
433
+ }
434
+ }, a.prototype._doUpdateAnimation = function(e, t, n, r, i, a, o) {
435
+ var s = this._polyline, c = this._polygon, l = e.hostModel, u = P(this._data, e, this._stackedOnPoints, t, this._coordSys, n, this._valueOrigin, a), d = u.current, f = u.stackedOnCurrent, p = u.next, m = u.stackedOnNext;
436
+ if (i && (f = K(u.stackedOnCurrent, u.current, n, i, o), d = K(u.current, null, n, i, o), m = K(u.stackedOnNext, u.next, n, i, o), p = K(u.next, null, n, i, o)), W(d, p) > 3e3 || c && W(f, m) > 3e3) {
437
+ s.stopAnimation(), s.setShape({ points: p }), c && (c.stopAnimation(), c.setShape({
438
+ points: p,
439
+ stackedOnPoints: m
440
+ }));
441
+ return;
442
+ }
443
+ s.shape.__points = u.current, s.shape.points = d;
444
+ var h = { shape: { points: p } };
445
+ u.current !== d && (h.shape.__points = u.next), s.stopAnimation(), x(s, h, l), c && (c.setShape({
446
+ points: d,
447
+ stackedOnPoints: f
448
+ }), c.stopAnimation(), x(c, { shape: { stackedOnPoints: m } }, l), s.shape.points !== c.shape.points && (c.shape.points = s.shape.points));
449
+ for (var g = [], _ = u.status, v = 0; v < _.length; v++) if (_[v].cmd === "=") {
450
+ var y = e.getItemGraphicEl(_[v].idx1);
451
+ y && g.push({
452
+ el: y,
453
+ ptIdx: v
454
+ });
455
+ }
456
+ s.animators && s.animators.length && s.animators[0].during(function() {
457
+ c && c.dirtyShape();
458
+ for (var e = s.shape.__points, t = 0; t < g.length; t++) {
459
+ var n = g[t].el, r = g[t].ptIdx * 2;
460
+ n.x = e[r], n.y = e[r + 1], n.markRedraw();
461
+ }
462
+ });
463
+ }, a.prototype.remove = function(e) {
464
+ var t = this.group, n = this._data;
465
+ this._lineGroup.removeAll(), this._symbolDraw.remove(!0), n && n.eachItemGraphicEl(function(e, r) {
466
+ e.__temp && (t.remove(e), n.setItemGraphicEl(r, null));
467
+ }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
468
+ }, a.type = "line", a;
469
+ }(L);
470
+ //#endregion
471
+ export { ae as default };
@@ -0,0 +1,34 @@
1
+ import { isNumber as e, map as t } from "../../../../zrender/lib/core/util.js";
2
+ import { isDimensionStacked as n } from "../../data/helper/dataStackHelper.js";
3
+ //#region node_modules/echarts/lib/chart/line/helper.js
4
+ function r(e, r, a) {
5
+ var o = e.getBaseAxis(), s = e.getOtherAxis(o), c = i(s, a), l = o.dim, u = s.dim, d = r.mapDimension(u), f = r.mapDimension(l), p = +(u === "x" || u === "radius"), m = t(e.dimensions, function(e) {
6
+ return r.mapDimension(e);
7
+ }), h = !1, g = r.getCalculationInfo("stackResultDimension");
8
+ return n(r, m[0]) && (h = !0, m[0] = g), n(r, m[1]) && (h = !0, m[1] = g), {
9
+ dataDimsForPoint: m,
10
+ valueStart: c,
11
+ valueAxisDim: u,
12
+ baseAxisDim: l,
13
+ stacked: !!h,
14
+ valueDim: d,
15
+ baseDim: f,
16
+ baseDataOffset: p,
17
+ stackedOverDimension: r.getCalculationInfo("stackedOverDimension")
18
+ };
19
+ }
20
+ function i(t, n) {
21
+ var r = 0, i = t.scale.getExtent();
22
+ return n === "start" ? r = i[0] : n === "end" ? r = i[1] : e(n) && !isNaN(n) ? r = n : i[0] > 0 ? r = i[0] : i[1] < 0 && (r = i[1]), r;
23
+ }
24
+ function a(e, t, n, r) {
25
+ var i = NaN;
26
+ e.stacked && (i = n.get(n.getCalculationInfo("stackedOverDimension"), r)), isNaN(i) && (i = e.valueStart);
27
+ var a = e.baseDataOffset, o = [];
28
+ return o[a] = n.get(e.baseDim, r), o[1 - a] = i, t.dataToPoint(o);
29
+ }
30
+ function o(e, t) {
31
+ return !isFinite(e) || !isFinite(t);
32
+ }
33
+ //#endregion
34
+ export { a as getStackedOnPoint, o as isPointIllegal, r as prepareDataCoordInfo };
@@ -0,0 +1,16 @@
1
+ import e from "./LineSeries.js";
2
+ import t from "./LineView.js";
3
+ import n from "../../layout/points.js";
4
+ import r from "../../processor/dataSample.js";
5
+ //#region node_modules/echarts/lib/chart/line/install.js
6
+ function i(i) {
7
+ i.registerChartView(t), i.registerSeriesModel(e), i.registerLayout(n("line", !0)), i.registerVisual({
8
+ seriesType: "line",
9
+ reset: function(e) {
10
+ var t = e.getData(), n = e.getModel("lineStyle").getLineStyle();
11
+ n && !n.stroke && (n.stroke = t.getVisual("style").fill), t.setVisual("legendLineStyle", n);
12
+ }
13
+ }), i.registerProcessor(i.PRIORITY.PROCESSOR.STATISTIC, r("line"));
14
+ }
15
+ //#endregion
16
+ export { i as install };
@@ -0,0 +1,59 @@
1
+ import { getStackedOnPoint as e, prepareDataCoordInfo as t } from "./helper.js";
2
+ import { createFloat32Array as n } from "../../util/vendor.js";
3
+ //#region node_modules/echarts/lib/chart/line/lineAnimationDiff.js
4
+ function r(e, t) {
5
+ var n = [];
6
+ return t.diff(e).add(function(e) {
7
+ n.push({
8
+ cmd: "+",
9
+ idx: e
10
+ });
11
+ }).update(function(e, t) {
12
+ n.push({
13
+ cmd: "=",
14
+ idx: t,
15
+ idx1: e
16
+ });
17
+ }).remove(function(e) {
18
+ n.push({
19
+ cmd: "-",
20
+ idx: e
21
+ });
22
+ }).execute(), n;
23
+ }
24
+ function i(i, a, o, s, c, l, u, d) {
25
+ for (var f = r(i, a), p = [], m = [], h = [], g = [], _ = [], v = [], y = [], b = t(c, a, u), x = i.getLayout("points") || [], S = a.getLayout("points") || [], C = 0; C < f.length; C++) {
26
+ var w = f[C], T = !0, E = void 0, D = void 0;
27
+ switch (w.cmd) {
28
+ case "=":
29
+ E = w.idx * 2, D = w.idx1 * 2;
30
+ var O = x[E], k = x[E + 1], A = S[D], j = S[D + 1];
31
+ (isNaN(O) || isNaN(k)) && (O = A, k = j), p.push(O, k), m.push(A, j), h.push(o[E], o[E + 1]), g.push(s[D], s[D + 1]), y.push(a.getRawIndex(w.idx1));
32
+ break;
33
+ case "+":
34
+ var M = w.idx, N = b.dataDimsForPoint, P = c.dataToPoint([a.get(N[0], M), a.get(N[1], M)]);
35
+ D = M * 2, p.push(P[0], P[1]), m.push(S[D], S[D + 1]);
36
+ var F = e(b, c, a, M);
37
+ h.push(F[0], F[1]), g.push(s[D], s[D + 1]), y.push(a.getRawIndex(M));
38
+ break;
39
+ case "-": T = !1;
40
+ }
41
+ T && (_.push(w), v.push(v.length));
42
+ }
43
+ v.sort(function(e, t) {
44
+ return y[e] - y[t];
45
+ });
46
+ for (var I = p.length, L = n(I), R = n(I), z = n(I), B = n(I), V = [], C = 0; C < v.length; C++) {
47
+ var H = v[C], U = C * 2, W = H * 2;
48
+ L[U] = p[W], L[U + 1] = p[W + 1], R[U] = m[W], R[U + 1] = m[W + 1], z[U] = h[W], z[U + 1] = h[W + 1], B[U] = g[W], B[U + 1] = g[W + 1], V[C] = _[H];
49
+ }
50
+ return {
51
+ current: L,
52
+ next: R,
53
+ stackedOnCurrent: z,
54
+ stackedOnNext: B,
55
+ status: V
56
+ };
57
+ }
58
+ //#endregion
59
+ export { i as default };