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.
- package/custom-elements.json +764 -3
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts +99 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.js +319 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts +2 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.d.ts.map +1 -0
- package/dist/components/reke-bar-chart/reke-bar-chart.styles.js +36 -0
- package/dist/components/reke-dialog/reke-dialog.d.ts +19 -0
- package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.js +40 -15
- package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.styles.js +110 -0
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts +52 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.js +181 -42
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.d.ts.map +1 -1
- package/dist/components/reke-pie-chart/reke-pie-chart.styles.js +47 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/dist/node_modules/echarts/lib/chart/bar/BarSeries.js +50 -0
- package/dist/node_modules/echarts/lib/chart/bar/BarView.js +431 -0
- package/dist/node_modules/echarts/lib/chart/bar/BaseBarSeries.js +65 -0
- package/dist/node_modules/echarts/lib/chart/bar/install.js +22 -0
- package/dist/node_modules/echarts/lib/chart/helper/Symbol.js +142 -0
- package/dist/node_modules/echarts/lib/chart/helper/SymbolDraw.js +99 -0
- package/dist/node_modules/echarts/lib/chart/helper/axisSnippets.js +19 -0
- package/dist/node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js +50 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesData.js +55 -0
- package/dist/node_modules/echarts/lib/chart/helper/createSeriesDataSimply.js +3 -3
- package/dist/node_modules/echarts/lib/chart/helper/labelHelper.js +24 -0
- package/dist/node_modules/echarts/lib/chart/line/LineSeries.js +60 -0
- package/dist/node_modules/echarts/lib/chart/line/LineView.js +471 -0
- package/dist/node_modules/echarts/lib/chart/line/helper.js +34 -0
- package/dist/node_modules/echarts/lib/chart/line/install.js +16 -0
- package/dist/node_modules/echarts/lib/chart/line/lineAnimationDiff.js +59 -0
- package/dist/node_modules/echarts/lib/chart/line/poly.js +135 -0
- package/dist/node_modules/echarts/lib/chart/pie/PieSeries.js +32 -32
- package/dist/node_modules/echarts/lib/chart/pie/PieView.js +69 -69
- package/dist/node_modules/echarts/lib/chart/pie/labelLayout.js +25 -25
- package/dist/node_modules/echarts/lib/chart/pie/pieLayout.js +16 -16
- package/dist/node_modules/echarts/lib/component/axis/AxisBuilder.js +153 -153
- package/dist/node_modules/echarts/lib/component/axis/AxisView.js +13 -13
- package/dist/node_modules/echarts/lib/component/axis/CartesianAxisView.js +106 -0
- package/dist/node_modules/echarts/lib/component/axis/axisSplitHelper.js +50 -0
- package/dist/node_modules/echarts/lib/component/axisPointer/BaseAxisPointer.js +20 -20
- package/dist/node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js +30 -30
- package/dist/node_modules/echarts/lib/component/axisPointer/viewHelper.js +13 -13
- package/dist/node_modules/echarts/lib/component/dataZoom/AxisProxy.js +114 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomModel.js +189 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/DataZoomView.js +15 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js +21 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/InsideZoomView.js +67 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js +75 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/SliderZoomView.js +465 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomAction.js +17 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js +55 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/helper.js +88 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installCommon.js +14 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomInside.js +10 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/installDataZoomSlider.js +9 -0
- package/dist/node_modules/echarts/lib/component/dataZoom/roams.js +132 -0
- package/dist/node_modules/echarts/lib/component/grid/install.js +9 -0
- package/dist/node_modules/echarts/lib/component/grid/installSimple.js +32 -0
- package/dist/node_modules/echarts/lib/component/helper/RoamController.js +172 -0
- package/dist/node_modules/echarts/lib/component/helper/cursorHelper.js +17 -0
- package/dist/node_modules/echarts/lib/component/helper/interactionMutex.js +15 -0
- package/dist/node_modules/echarts/lib/component/helper/sliderMove.js +29 -0
- package/dist/node_modules/echarts/lib/component/legend/LegendModel.js +31 -31
- package/dist/node_modules/echarts/lib/component/legend/LegendView.js +61 -61
- package/dist/node_modules/echarts/lib/component/legend/ScrollableLegendView.js +29 -29
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipRichContent.js +4 -4
- package/dist/node_modules/echarts/lib/component/tooltip/TooltipView.js +105 -105
- package/dist/node_modules/echarts/lib/coord/Axis.js +92 -0
- package/dist/node_modules/echarts/lib/coord/CoordinateSystem.js +6 -0
- package/dist/node_modules/echarts/lib/coord/axisAlignTicks.js +76 -0
- package/dist/node_modules/echarts/lib/coord/axisCommonTypes.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisDefault.js +124 -0
- package/dist/node_modules/echarts/lib/coord/axisHelper.js +123 -14
- package/dist/node_modules/echarts/lib/coord/axisModelCommonMixin.js +9 -0
- package/dist/node_modules/echarts/lib/coord/axisModelCreator.js +39 -0
- package/dist/node_modules/echarts/lib/coord/axisNiceTicks.js +64 -0
- package/dist/node_modules/echarts/lib/coord/axisStatistics.js +101 -22
- package/dist/node_modules/echarts/lib/coord/axisStatisticsMetricsImpl.js +43 -0
- package/dist/node_modules/echarts/lib/coord/axisTickLabelBuilder.js +151 -5
- package/dist/node_modules/echarts/lib/coord/cartesian/Axis2D.js +24 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/AxisModel.js +18 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian.js +23 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Cartesian2D.js +69 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/Grid.js +314 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/GridModel.js +40 -0
- package/dist/node_modules/echarts/lib/coord/cartesian/cartesianAxisHelper.js +43 -12
- package/dist/node_modules/echarts/lib/coord/scaleRawExtentInfo.js +175 -0
- package/dist/node_modules/echarts/lib/core/CoordinateSystem.js +39 -16
- package/dist/node_modules/echarts/lib/core/echarts.js +421 -421
- package/dist/node_modules/echarts/lib/data/OrdinalMeta.js +30 -0
- package/dist/node_modules/echarts/lib/data/SeriesData.js +18 -18
- package/dist/node_modules/echarts/lib/data/helper/createDimensions.js +6 -6
- package/dist/node_modules/echarts/lib/data/helper/dataStackHelper.js +59 -0
- package/dist/node_modules/echarts/lib/data/helper/dataValueHelper.js +13 -13
- package/dist/node_modules/echarts/lib/data/helper/dimensionHelper.js +7 -4
- package/dist/node_modules/echarts/lib/data/helper/sourceHelper.js +40 -8
- package/dist/node_modules/echarts/lib/data/helper/sourceManager.js +3 -3
- package/dist/node_modules/echarts/lib/data/helper/transform.js +8 -8
- package/dist/node_modules/echarts/lib/extension.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelGuideHelper.js +10 -10
- package/dist/node_modules/echarts/lib/label/labelStyle.js +34 -25
- package/dist/node_modules/echarts/lib/label/sectorLabel.js +83 -0
- package/dist/node_modules/echarts/lib/layout/barCommon.js +19 -0
- package/dist/node_modules/echarts/lib/layout/barGrid.js +165 -0
- package/dist/node_modules/echarts/lib/layout/points.js +37 -0
- package/dist/node_modules/echarts/lib/loading/default.js +6 -6
- package/dist/node_modules/echarts/lib/model/Component.js +39 -39
- package/dist/node_modules/echarts/lib/model/Global.js +122 -122
- package/dist/node_modules/echarts/lib/model/Series.js +78 -78
- package/dist/node_modules/echarts/lib/model/referHelper.js +58 -0
- package/dist/node_modules/echarts/lib/processor/dataSample.js +43 -0
- package/dist/node_modules/echarts/lib/scale/Interval.js +68 -0
- package/dist/node_modules/echarts/lib/scale/Log.js +100 -0
- package/dist/node_modules/echarts/lib/scale/Ordinal.js +92 -0
- package/dist/node_modules/echarts/lib/scale/Scale.js +13 -0
- package/dist/node_modules/echarts/lib/scale/Time.js +242 -0
- package/dist/node_modules/echarts/lib/scale/break.js +10 -2
- package/dist/node_modules/echarts/lib/scale/helper.js +61 -3
- package/dist/node_modules/echarts/lib/scale/minorTicks.js +22 -0
- package/dist/node_modules/echarts/lib/scale/scaleMapper.js +89 -7
- package/dist/node_modules/echarts/lib/util/clazz.js +35 -35
- package/dist/node_modules/echarts/lib/util/component.js +16 -16
- package/dist/node_modules/echarts/lib/util/cycleCache.js +4 -1
- package/dist/node_modules/echarts/lib/util/decal.js +11 -11
- package/dist/node_modules/echarts/lib/util/format.js +1 -1
- package/dist/node_modules/echarts/lib/util/graphic.js +170 -170
- package/dist/node_modules/echarts/lib/util/layout.js +23 -23
- package/dist/node_modules/echarts/lib/util/model.js +128 -68
- package/dist/node_modules/echarts/lib/util/number.js +55 -37
- package/dist/node_modules/echarts/lib/util/shape/sausage.js +25 -0
- package/dist/node_modules/echarts/lib/util/states.js +96 -82
- package/dist/node_modules/echarts/lib/util/styleCompat.js +10 -0
- package/dist/node_modules/echarts/lib/util/symbol.js +24 -21
- package/dist/node_modules/echarts/lib/util/time.js +154 -18
- package/dist/node_modules/echarts/lib/util/vendor.js +26 -0
- package/dist/node_modules/echarts/lib/view/Chart.js +19 -19
- package/dist/node_modules/echarts/lib/view/Component.js +7 -7
- package/dist/node_modules/echarts/lib/visual/style.js +5 -5
- package/dist/node_modules/zrender/lib/Element.js +35 -35
- package/dist/node_modules/zrender/lib/canvas/graphic.js +36 -36
- package/dist/node_modules/zrender/lib/core/PathProxy.js +25 -25
- package/dist/node_modules/zrender/lib/core/event.js +4 -1
- package/dist/node_modules/zrender/lib/core/util.js +69 -64
- package/dist/node_modules/zrender/lib/graphic/TSpan.js +7 -7
- package/dist/node_modules/zrender/lib/graphic/Text.js +37 -37
- package/dist/node_modules/zrender/lib/graphic/helper/parseText.js +59 -59
- package/dist/node_modules/zrender/lib/tool/color.js +60 -41
- package/dist/react.d.ts +10 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +85 -73
- package/dist/shared/tailwind.js +1 -1
- package/dist/tokens/reke-tokens.css +1 -0
- package/package.json +5 -1
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { createHashMap as t, curry as n, defaults as r, each as i, extend as a, isFunction as o, isString as s } from "../../../../zrender/lib/core/util.js";
|
|
3
3
|
import { parse as c, stringify as l } from "../../../../zrender/lib/tool/color.js";
|
|
4
|
-
import u from "../../../../zrender/lib/graphic/
|
|
5
|
-
import d from "../../../../zrender/lib/graphic/
|
|
6
|
-
import f from "
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
4
|
+
import u from "../../../../zrender/lib/graphic/shape/Rect.js";
|
|
5
|
+
import d from "../../../../zrender/lib/graphic/Text.js";
|
|
6
|
+
import { getECData as f } from "../../util/innerStore.js";
|
|
7
|
+
import { enableHoverEmphasis as p } from "../../util/states.js";
|
|
8
|
+
import m from "../../../../zrender/lib/graphic/Group.js";
|
|
9
|
+
import { setTooltipConfig as h } from "../../util/graphic.js";
|
|
10
10
|
import { createTextStyle as g, setLabelStyle as _ } from "../../label/labelStyle.js";
|
|
11
11
|
import { box as v, createBoxLayoutReference as y, getLayoutRect as b } from "../../util/layout.js";
|
|
12
12
|
import x from "../../visual/tokens.js";
|
|
13
|
-
import S from "../../
|
|
14
|
-
import
|
|
13
|
+
import { createSymbol as S } from "../../util/symbol.js";
|
|
14
|
+
import C from "../../view/Component.js";
|
|
15
15
|
import { createOrUpdatePatternFromDecal as w } from "../../util/decal.js";
|
|
16
16
|
import { makeBackground as T } from "../helper/listComponent.js";
|
|
17
17
|
//#region node_modules/echarts/lib/component/legend/LegendView.js
|
|
18
|
-
var E =
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
var e =
|
|
22
|
-
return e.type =
|
|
18
|
+
var E = n, D = i, O = m, k = function(n) {
|
|
19
|
+
e(i, n);
|
|
20
|
+
function i() {
|
|
21
|
+
var e = n !== null && n.apply(this, arguments) || this;
|
|
22
|
+
return e.type = i.type, e.newlineDisabled = !1, e;
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return i.prototype.init = function() {
|
|
25
25
|
this.group.add(this._contentGroup = new O()), this.group.add(this._selectorGroup = new O()), this._isFirstRender = !0;
|
|
26
|
-
},
|
|
26
|
+
}, i.prototype.getContentGroup = function() {
|
|
27
27
|
return this._contentGroup;
|
|
28
|
-
},
|
|
28
|
+
}, i.prototype.getSelectorGroup = function() {
|
|
29
29
|
return this._selectorGroup;
|
|
30
|
-
},
|
|
30
|
+
}, i.prototype.render = function(e, t, n) {
|
|
31
31
|
var i = this._isFirstRender;
|
|
32
32
|
if (this._isFirstRender = !1, this.resetInner(), e.get("show", !0)) {
|
|
33
33
|
var a = e.get("align"), o = e.get("orient");
|
|
34
34
|
(!a || a === "auto") && (a = e.get("left") === "right" && o === "vertical" ? "right" : "left");
|
|
35
35
|
var s = e.get("selector", !0), c = e.get("selectorPosition", !0);
|
|
36
|
-
s && (!c || c === "auto") && (c = o === "horizontal" ? "end" : "start"), this.renderInner(a, e, t,
|
|
37
|
-
var l = y(e,
|
|
36
|
+
s && (!c || c === "auto") && (c = o === "horizontal" ? "end" : "start"), this.renderInner(a, e, t, n, s, o, c);
|
|
37
|
+
var l = y(e, n).refContainer, u = e.getBoxLayoutParams(), d = e.get("padding"), f = b(u, l, d), p = this.layoutInner(e, a, f, i, s, c), m = b(r({
|
|
38
38
|
width: p.width,
|
|
39
39
|
height: p.height
|
|
40
40
|
}, u), l, d);
|
|
41
41
|
this.group.x = m.x - p.x, this.group.y = m.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = T(p, e));
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, i.prototype.resetInner = function() {
|
|
44
44
|
this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
|
|
45
|
-
},
|
|
46
|
-
var d = this.getContentGroup(),
|
|
45
|
+
}, i.prototype.renderInner = function(e, n, r, i, o, s, u) {
|
|
46
|
+
var d = this.getContentGroup(), p = t(), m = n.get("selectedMode"), h = n.get("triggerEvent"), g = [];
|
|
47
47
|
r.eachRawSeries(function(e) {
|
|
48
48
|
!e.get("legendHoverLink") && g.push(e.id);
|
|
49
|
-
}), D(n.getData(), function(
|
|
50
|
-
var s = this, u =
|
|
49
|
+
}), D(n.getData(), function(t, o) {
|
|
50
|
+
var s = this, u = t.get("name");
|
|
51
51
|
if (!this.newlineDisabled && (u === "" || u === "\n")) {
|
|
52
52
|
var _ = new O();
|
|
53
53
|
_.newline = !0, d.add(_);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
var v = r.getSeriesByName(u)[0];
|
|
57
|
-
if (!
|
|
57
|
+
if (!p.get(u)) {
|
|
58
58
|
if (v) {
|
|
59
|
-
var y = v.getData(), b = y.getVisual("legendLineStyle") || {}, x = y.getVisual("legendIcon"), S = y.getVisual("style"), C = this._createItem(v, u, o,
|
|
60
|
-
C.on("click", E(M, u, null,
|
|
61
|
-
var t =
|
|
59
|
+
var y = v.getData(), b = y.getVisual("legendLineStyle") || {}, x = y.getVisual("legendIcon"), S = y.getVisual("style"), C = this._createItem(v, u, o, t, n, e, b, S, x, m, i);
|
|
60
|
+
C.on("click", E(M, u, null, i, g)).on("mouseover", E(N, v.name, null, i, g)).on("mouseout", E(P, v.name, null, i, g)), r.ssr && C.eachChild(function(e) {
|
|
61
|
+
var t = f(e);
|
|
62
62
|
t.seriesIndex = v.seriesIndex, t.dataIndex = o, t.ssrType = "legend";
|
|
63
63
|
}), h && C.eachChild(function(e) {
|
|
64
64
|
s.packEventData(e, n, v, o, u);
|
|
65
|
-
}),
|
|
65
|
+
}), p.set(u, !0);
|
|
66
66
|
} else r.eachRawSeries(function(s) {
|
|
67
67
|
var d = this;
|
|
68
|
-
if (!
|
|
68
|
+
if (!p.get(u) && s.legendVisualProvider) {
|
|
69
69
|
var _ = s.legendVisualProvider;
|
|
70
70
|
if (!_.containName(u)) return;
|
|
71
71
|
var v = _.indexOfName(u), y = _.getItemVisual(v, "style"), b = _.getItemVisual(v, "legendIcon"), x = c(y.fill);
|
|
72
|
-
x && x[3] === 0 && (x[3] = .2, y =
|
|
73
|
-
var S = this._createItem(s, u, o,
|
|
74
|
-
S.on("click", E(M, null, u,
|
|
75
|
-
var t =
|
|
72
|
+
x && x[3] === 0 && (x[3] = .2, y = a(a({}, y), { fill: l(x, "rgba") }));
|
|
73
|
+
var S = this._createItem(s, u, o, t, n, e, {}, y, b, m, i);
|
|
74
|
+
S.on("click", E(M, null, u, i, g)).on("mouseover", E(N, null, u, i, g)).on("mouseout", E(P, null, u, i, g)), r.ssr && S.eachChild(function(e) {
|
|
75
|
+
var t = f(e);
|
|
76
76
|
t.seriesIndex = s.seriesIndex, t.dataIndex = o, t.ssrType = "legend";
|
|
77
77
|
}), h && S.eachChild(function(e) {
|
|
78
78
|
d.packEventData(e, n, s, o, u);
|
|
79
|
-
}),
|
|
79
|
+
}), p.set(u, !0);
|
|
80
80
|
}
|
|
81
81
|
}, this);
|
|
82
|
-
process.env.NODE_ENV !== "production" && (
|
|
82
|
+
process.env.NODE_ENV !== "production" && (p.get(u) || console.warn(u + " series not exists. Legend data should be same with series name or data name."));
|
|
83
83
|
}
|
|
84
|
-
}, this), o && this._createSelector(o, n,
|
|
85
|
-
},
|
|
84
|
+
}, this), o && this._createSelector(o, n, i, s, u);
|
|
85
|
+
}, i.prototype.packEventData = function(e, t, n, r, i) {
|
|
86
86
|
var a = {
|
|
87
87
|
componentType: "legend",
|
|
88
88
|
componentIndex: t.componentIndex,
|
|
@@ -90,11 +90,11 @@ var E = t, D = r, O = u, k = function(t) {
|
|
|
90
90
|
value: i,
|
|
91
91
|
seriesIndex: n.seriesIndex
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
},
|
|
93
|
+
f(e).eventData = a;
|
|
94
|
+
}, i.prototype._createSelector = function(e, t, n, r, i) {
|
|
95
95
|
var a = this.getSelectorGroup();
|
|
96
96
|
D(e, function(e) {
|
|
97
|
-
var r = e.type, i = new
|
|
97
|
+
var r = e.type, i = new d({
|
|
98
98
|
style: {
|
|
99
99
|
x: 0,
|
|
100
100
|
y: 0,
|
|
@@ -111,16 +111,16 @@ var E = t, D = r, O = u, k = function(t) {
|
|
|
111
111
|
a.add(i), _(i, {
|
|
112
112
|
normal: t.getModel("selectorLabel"),
|
|
113
113
|
emphasis: t.getModel(["emphasis", "selectorLabel"])
|
|
114
|
-
}, { defaultText: e.title }),
|
|
114
|
+
}, { defaultText: e.title }), p(i);
|
|
115
115
|
});
|
|
116
|
-
},
|
|
116
|
+
}, i.prototype._createItem = function(e, t, n, r, i, a, c, l, f, m, _) {
|
|
117
117
|
var v = e.visualDrawType, y = i.get("itemWidth"), b = i.get("itemHeight"), x = i.isSelected(t), S = r.get("symbolRotate"), C = r.get("symbolKeepAspect"), w = r.get("icon");
|
|
118
|
-
|
|
119
|
-
var T = A(
|
|
120
|
-
if (
|
|
118
|
+
f = w || f || "roundRect";
|
|
119
|
+
var T = A(f, r, c, l, v, x, _), E = new O(), D = r.getModel("textStyle");
|
|
120
|
+
if (o(e.getLegendIcon) && (!w || w === "inherit")) E.add(e.getLegendIcon({
|
|
121
121
|
itemWidth: y,
|
|
122
122
|
itemHeight: b,
|
|
123
|
-
icon:
|
|
123
|
+
icon: f,
|
|
124
124
|
iconRotate: S,
|
|
125
125
|
itemStyle: T.itemStyle,
|
|
126
126
|
lineStyle: T.lineStyle,
|
|
@@ -131,17 +131,17 @@ var E = t, D = r, O = u, k = function(t) {
|
|
|
131
131
|
E.add(j({
|
|
132
132
|
itemWidth: y,
|
|
133
133
|
itemHeight: b,
|
|
134
|
-
icon:
|
|
134
|
+
icon: f,
|
|
135
135
|
iconRotate: k,
|
|
136
136
|
itemStyle: T.itemStyle,
|
|
137
137
|
lineStyle: T.lineStyle,
|
|
138
138
|
symbolKeepAspect: C
|
|
139
139
|
}));
|
|
140
140
|
}
|
|
141
|
-
var M =
|
|
142
|
-
|
|
141
|
+
var M = a === "left" ? y + 5 : -5, N = a, P = i.get("formatter"), F = t;
|
|
142
|
+
s(P) && P ? F = P.replace("{name}", t ?? "") : o(P) && (F = P(t));
|
|
143
143
|
var I = x ? D.getTextColor() : r.get("inactiveColor");
|
|
144
|
-
E.add(new
|
|
144
|
+
E.add(new d({ style: g(D, {
|
|
145
145
|
text: F,
|
|
146
146
|
x: M,
|
|
147
147
|
y: b / 2,
|
|
@@ -149,19 +149,19 @@ var E = t, D = r, O = u, k = function(t) {
|
|
|
149
149
|
align: N,
|
|
150
150
|
verticalAlign: "middle"
|
|
151
151
|
}, { inheritColor: I }) }));
|
|
152
|
-
var L = new
|
|
152
|
+
var L = new u({
|
|
153
153
|
shape: E.getBoundingRect(),
|
|
154
154
|
style: { fill: "transparent" }
|
|
155
155
|
}), R = r.getModel("tooltip");
|
|
156
|
-
return R.get("show") &&
|
|
156
|
+
return R.get("show") && h({
|
|
157
157
|
el: L,
|
|
158
158
|
componentModel: i,
|
|
159
159
|
itemName: t,
|
|
160
160
|
itemTooltipOption: R.option
|
|
161
161
|
}), E.add(L), E.eachChild(function(e) {
|
|
162
162
|
e.silent = !0;
|
|
163
|
-
}), L.silent = !
|
|
164
|
-
},
|
|
163
|
+
}), L.silent = !m, this.getContentGroup().add(E), p(E), E.__legendDataIndex = n, E;
|
|
164
|
+
}, i.prototype.layoutInner = function(e, t, n, r, i, a) {
|
|
165
165
|
var o = this.getContentGroup(), s = this.getSelectorGroup();
|
|
166
166
|
v(e.get("orient"), o, e.get("itemGap"), n.width, n.height);
|
|
167
167
|
var c = o.getBoundingRect(), l = [-c.x, -c.y];
|
|
@@ -175,10 +175,10 @@ var E = t, D = r, O = u, k = function(t) {
|
|
|
175
175
|
};
|
|
176
176
|
return _[m] = c[m] + f + u[m], _[h] = Math.max(c[h], u[h]), _[g] = Math.min(0, u[g] + d[1 - p]), _;
|
|
177
177
|
} else return o.x = l[0], o.y = l[1], this.group.getBoundingRect();
|
|
178
|
-
},
|
|
178
|
+
}, i.prototype.remove = function() {
|
|
179
179
|
this.getContentGroup().removeAll(), this._isFirstRender = !0;
|
|
180
|
-
},
|
|
181
|
-
}(
|
|
180
|
+
}, i.type = "legend.plain", i;
|
|
181
|
+
}(C);
|
|
182
182
|
function A(e, t, n, r, i, a, o) {
|
|
183
183
|
function s(e, t) {
|
|
184
184
|
e.lineWidth === "auto" && (e.lineWidth = t.lineWidth > 0 ? 2 : 0), D(e, function(n, r) {
|
|
@@ -198,7 +198,7 @@ function A(e, t, n, r, i, a, o) {
|
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
function j(e) {
|
|
201
|
-
var t = e.icon || "roundRect", n =
|
|
201
|
+
var t = e.icon || "roundRect", n = S(t, 0, 0, e.itemWidth, e.itemHeight, e.itemStyle.fill, e.symbolKeepAspect);
|
|
202
202
|
return n.setStyle(e.itemStyle), n.rotation = (e.iconRotate || 0) * Math.PI / 180, n.setOrigin([e.itemWidth / 2, e.itemHeight / 2]), t.indexOf("empty") > -1 && (n.style.stroke = n.style.fill, n.style.fill = x.color.neutral00, n.style.lineWidth = 2), n;
|
|
203
203
|
}
|
|
204
204
|
function M(e, t, n, r) {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import s from "../../../../zrender/lib/graphic/
|
|
4
|
-
import c from "../../../../zrender/lib/graphic/
|
|
5
|
-
import l from "../../../../zrender/lib/graphic/
|
|
1
|
+
import { __extends as e } from "../../../node_modules/tslib/tslib.es6.js";
|
|
2
|
+
import { bind as t, clone as n, each as r, isArray as i, isString as a, retrieve2 as o } from "../../../../zrender/lib/core/util.js";
|
|
3
|
+
import s from "../../../../zrender/lib/graphic/shape/Rect.js";
|
|
4
|
+
import c from "../../../../zrender/lib/graphic/Text.js";
|
|
5
|
+
import l from "../../../../zrender/lib/graphic/Group.js";
|
|
6
6
|
import { updateProps as u } from "../../animation/basicTransition.js";
|
|
7
7
|
import { createIcon as d } from "../../util/graphic.js";
|
|
8
8
|
import { box as f } from "../../util/layout.js";
|
|
9
9
|
import p from "./LegendView.js";
|
|
10
10
|
//#region node_modules/echarts/lib/component/legend/ScrollableLegendView.js
|
|
11
|
-
var m =
|
|
12
|
-
|
|
11
|
+
var m = l, h = ["width", "height"], g = ["x", "y"], _ = function(l) {
|
|
12
|
+
e(p, l);
|
|
13
13
|
function p() {
|
|
14
|
-
var e =
|
|
14
|
+
var e = l !== null && l.apply(this, arguments) || this;
|
|
15
15
|
return e.type = p.type, e.newlineDisabled = !0, e._currentIndex = 0, e;
|
|
16
16
|
}
|
|
17
17
|
return p.prototype.init = function() {
|
|
18
|
-
|
|
18
|
+
l.prototype.init.call(this), this.group.add(this._containerGroup = new m()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new m());
|
|
19
19
|
}, p.prototype.resetInner = function() {
|
|
20
|
-
|
|
21
|
-
}, p.prototype.renderInner = function(
|
|
20
|
+
l.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
|
|
21
|
+
}, p.prototype.renderInner = function(e, n, r, a, o, s, u) {
|
|
22
22
|
var f = this;
|
|
23
|
-
|
|
24
|
-
var p = this._controllerGroup, m = n.get("pageIconSize", !0), h =
|
|
23
|
+
l.prototype.renderInner.call(this, e, n, r, a, o, s, u);
|
|
24
|
+
var p = this._controllerGroup, m = n.get("pageIconSize", !0), h = i(m) ? m : [m, m];
|
|
25
25
|
_("pagePrev", 0);
|
|
26
26
|
var g = n.getModel("pageTextStyle");
|
|
27
|
-
p.add(new
|
|
27
|
+
p.add(new c({
|
|
28
28
|
name: "pageText",
|
|
29
29
|
style: {
|
|
30
30
|
text: "xx/xx",
|
|
@@ -35,19 +35,19 @@ var m = s, h = ["width", "height"], g = ["x", "y"], _ = function(s) {
|
|
|
35
35
|
},
|
|
36
36
|
silent: !0
|
|
37
37
|
})), _("pageNext", 1);
|
|
38
|
-
function _(
|
|
39
|
-
var i =
|
|
38
|
+
function _(e, r) {
|
|
39
|
+
var i = e + "DataIndex", o = d(n.get("pageIcons", !0)[n.getOrient().name][r], { onclick: t(f._pageGo, f, i, n, a) }, {
|
|
40
40
|
x: -h[0] / 2,
|
|
41
41
|
y: -h[1] / 2,
|
|
42
42
|
width: h[0],
|
|
43
43
|
height: h[1]
|
|
44
44
|
});
|
|
45
|
-
o.name =
|
|
45
|
+
o.name = e, p.add(o);
|
|
46
46
|
}
|
|
47
|
-
}, p.prototype.layoutInner = function(e,
|
|
47
|
+
}, p.prototype.layoutInner = function(e, t, r, i, a, o) {
|
|
48
48
|
var s = this.getSelectorGroup(), c = e.getOrient().index, l = h[c], u = g[c], d = h[1 - c], p = g[1 - c];
|
|
49
49
|
a && f("horizontal", s, e.get("selectorItemGap", !0));
|
|
50
|
-
var m = e.get("selectorButtonGap", !0), _ = s.getBoundingRect(), v = [-_.x, -_.y], y =
|
|
50
|
+
var m = e.get("selectorButtonGap", !0), _ = s.getBoundingRect(), v = [-_.x, -_.y], y = n(r);
|
|
51
51
|
a && (y[l] = r[l] - _[l] - m);
|
|
52
52
|
var b = this._layoutContentAndController(e, i, y, c, l, d, p, u);
|
|
53
53
|
if (a) {
|
|
@@ -59,23 +59,23 @@ var m = s, h = ["width", "height"], g = ["x", "y"], _ = function(s) {
|
|
|
59
59
|
b[l] += _[l] + m, v[1 - c] += b[p] + b[d] / 2 - _[d] / 2, b[d] = Math.max(b[d], _[d]), b[p] = Math.min(b[p], _[p] + v[1 - c]), s.x = v[0], s.y = v[1], s.markRedraw();
|
|
60
60
|
}
|
|
61
61
|
return b;
|
|
62
|
-
}, p.prototype._layoutContentAndController = function(e, t, n, r, i,
|
|
62
|
+
}, p.prototype._layoutContentAndController = function(e, t, n, r, i, a, c, l) {
|
|
63
63
|
var d = this.getContentGroup(), p = this._containerGroup, m = this._controllerGroup;
|
|
64
64
|
f(e.get("orient"), d, e.get("itemGap"), r ? n.width : null, r ? null : n.height), f("horizontal", m, e.get("pageButtonItemGap", !0));
|
|
65
65
|
var h = d.getBoundingRect(), g = m.getBoundingRect(), _ = this._showController = h[i] > n[i], v = [-h.x, -h.y];
|
|
66
66
|
t || (v[r] = d[l]);
|
|
67
|
-
var y = [0, 0], b = [-g.x, -g.y], x =
|
|
68
|
-
_ && (e.get("pageButtonPosition", !0) === "end" ? b[r] += n[i] - g[i] : y[r] += g[i] + x), b[1 - r] += h[
|
|
67
|
+
var y = [0, 0], b = [-g.x, -g.y], x = o(e.get("pageButtonGap", !0), e.get("itemGap", !0));
|
|
68
|
+
_ && (e.get("pageButtonPosition", !0) === "end" ? b[r] += n[i] - g[i] : y[r] += g[i] + x), b[1 - r] += h[a] / 2 - g[a] / 2, d.setPosition(v), p.setPosition(y), m.setPosition(b);
|
|
69
69
|
var S = {
|
|
70
70
|
x: 0,
|
|
71
71
|
y: 0
|
|
72
72
|
};
|
|
73
|
-
if (S[i] = _ ? n[i] : h[i], S[
|
|
73
|
+
if (S[i] = _ ? n[i] : h[i], S[a] = Math.max(h[a], g[a]), S[c] = Math.min(0, g[c] + b[1 - r]), p.__rectSize = n[i], _) {
|
|
74
74
|
var C = {
|
|
75
75
|
x: 0,
|
|
76
76
|
y: 0
|
|
77
77
|
};
|
|
78
|
-
C[i] = Math.max(n[i] - g[i] - x, 0), C[
|
|
78
|
+
C[i] = Math.max(n[i] - g[i] - x, 0), C[a] = S[a], p.setClipPath(new s({ shape: C })), p.__rectSize = C[i];
|
|
79
79
|
} else m.eachChild(function(e) {
|
|
80
80
|
e.attr({
|
|
81
81
|
invisible: !0,
|
|
@@ -95,13 +95,13 @@ var m = s, h = ["width", "height"], g = ["x", "y"], _ = function(s) {
|
|
|
95
95
|
legendId: t.id
|
|
96
96
|
});
|
|
97
97
|
}, p.prototype._updatePageInfoView = function(e, t) {
|
|
98
|
-
var
|
|
99
|
-
|
|
100
|
-
var i = t[
|
|
98
|
+
var n = this._controllerGroup;
|
|
99
|
+
r(["pagePrev", "pageNext"], function(r) {
|
|
100
|
+
var i = t[r + "DataIndex"] != null, a = n.childOfName(r);
|
|
101
101
|
a && (a.setStyle("fill", i ? e.get("pageIconColor", !0) : e.get("pageIconInactiveColor", !0)), a.cursor = i ? "pointer" : "default");
|
|
102
102
|
});
|
|
103
|
-
var
|
|
104
|
-
|
|
103
|
+
var i = n.childOfName("pageText"), o = e.get("pageFormatter"), s = t.pageIndex, c = s == null ? 0 : s + 1, l = t.pageCount;
|
|
104
|
+
i && o && i.setStyle("text", a(o) ? o.replace("{current}", c == null ? "" : c + "").replace("{total}", l == null ? "" : l + "") : o({
|
|
105
105
|
current: c,
|
|
106
106
|
total: l
|
|
107
107
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { bind as e, each as t, isObject as n } from "../../../../zrender/lib/core/util.js";
|
|
2
|
-
import
|
|
3
|
-
import i from "
|
|
2
|
+
import r from "../../../../zrender/lib/graphic/Text.js";
|
|
3
|
+
import { throwError as i } from "../../util/log.js";
|
|
4
4
|
import { getPaddingFromTooltipModel as a } from "./tooltipMarkup.js";
|
|
5
5
|
//#region node_modules/echarts/lib/component/tooltip/TooltipRichContent.js
|
|
6
6
|
var o = function() {
|
|
@@ -19,9 +19,9 @@ var o = function() {
|
|
|
19
19
|
this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
|
|
20
20
|
}, o.prototype.setContent = function(e, o, s, c, l) {
|
|
21
21
|
var u = this;
|
|
22
|
-
n(e) &&
|
|
22
|
+
n(e) && i(process.env.NODE_ENV === "production" ? "" : "Passing DOM nodes as content is not supported in richText tooltip!"), this.el && this._zr.remove(this.el);
|
|
23
23
|
var d = s.getModel("textStyle");
|
|
24
|
-
this.el = new
|
|
24
|
+
this.el = new r({
|
|
25
25
|
style: {
|
|
26
26
|
rich: o.richTextStyles,
|
|
27
27
|
text: e,
|