@devgateway/dvz-ui-react 1.9.1 → 1.9.2
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/dist/cjs/embeddable/big-number-trend/BigNumberTrendContainer.js +1 -1
- package/dist/cjs/embeddable/chart/Line.js +1 -1
- package/dist/cjs/embeddable/data-paragraph/index.js +1 -1
- package/dist/cjs/embeddable/filter/index.js +1 -1
- package/dist/cjs/embeddable/grouped-bars/GroupedBars.js +1 -1
- package/dist/cjs/embeddable/newsletter/index.js +1 -1
- package/dist/cjs/embeddable/sankeychart/index.js +1 -1
- package/dist/cjs/embeddable/showcase/index.js +1 -1
- package/dist/cjs/embeddable/tabbedposts/index.js +1 -1
- package/dist/cjs/embeddable/utils/parseUtils.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/tracker/InternalTrafficToggle.js +1 -1
- package/dist/cjs/tracker/InternalTrafficWatermark.js +1 -1
- package/dist/cjs/tracker/index.js +1 -1
- package/dist/cjs/tracker/internalTrafficUtils.js +1 -1
- package/dist/cjs/tracker/useInternalTrafficBypass.js +1 -1
- package/dist/esm/embeddable/big-number-trend/BigNumberTrendContainer.js +79 -79
- package/dist/esm/embeddable/chart/Line.js +209 -207
- package/dist/esm/embeddable/data-paragraph/index.js +119 -119
- package/dist/esm/embeddable/filter/index.js +113 -113
- package/dist/esm/embeddable/grouped-bars/GroupedBars.js +320 -316
- package/dist/esm/embeddable/newsletter/index.js +19 -19
- package/dist/esm/embeddable/sankeychart/index.js +145 -145
- package/dist/esm/embeddable/showcase/index.js +27 -27
- package/dist/esm/embeddable/tabbedposts/index.js +40 -39
- package/dist/esm/embeddable/utils/parseUtils.js +11 -3
- package/dist/esm/index.js +74 -73
- package/dist/esm/tracker/InternalTrafficToggle.js +30 -20
- package/dist/esm/tracker/InternalTrafficWatermark.js +42 -52
- package/dist/esm/tracker/index.js +9 -8
- package/dist/esm/tracker/internalTrafficUtils.js +18 -13
- package/dist/esm/tracker/useInternalTrafficBypass.js +13 -31
- package/dist/types/embeddable/chart/Line.d.ts +2 -0
- package/dist/types/tracker/InternalTrafficToggle.d.ts +1 -4
- package/dist/types/tracker/InternalTrafficWatermark.d.ts +0 -10
- package/dist/types/tracker/internalTrafficUtils.d.ts +1 -14
- package/dist/types/tracker/useInternalTrafficBypass.d.ts +4 -10
- package/package.json +1 -1
|
@@ -1,82 +1,83 @@
|
|
|
1
1
|
import { jsxs as v, jsx as s, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { useState as k, useEffect as
|
|
3
|
-
import { injectIntl as
|
|
4
|
-
import { ResponsiveLine as
|
|
5
|
-
import
|
|
6
|
-
import { area as
|
|
7
|
-
import { useTheme as
|
|
8
|
-
import
|
|
2
|
+
import { useState as k, useEffect as ct, Fragment as ot } from "react";
|
|
3
|
+
import { injectIntl as mt } from "react-intl";
|
|
4
|
+
import { ResponsiveLine as dt } from "@nivo/line";
|
|
5
|
+
import ht from "./Tooltip.js";
|
|
6
|
+
import { area as ft, line as ut } from "d3-shape";
|
|
7
|
+
import { useTheme as pt } from "@nivo/theming";
|
|
8
|
+
import xt from "../../layout/FlexWrapDetector.js";
|
|
9
9
|
import K from "../../utils/deviceType.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
},
|
|
14
|
-
editing:
|
|
15
|
-
previewMode:
|
|
10
|
+
const yt = "#66676d", J = "#f0f0f1", ve = ["mobile", "tablet", "midTablet"].includes(K()), Ne = K() === "mobile", Ee = ["tablet", "midTablet"].includes(K()), gt = (d, y) => {
|
|
11
|
+
const N = document.createElement("canvas").getContext("2d");
|
|
12
|
+
return N.font = y, N.measureText(d).width;
|
|
13
|
+
}, bt = ({
|
|
14
|
+
editing: d,
|
|
15
|
+
previewMode: y,
|
|
16
16
|
app: Z,
|
|
17
|
-
legends:
|
|
17
|
+
legends: N,
|
|
18
18
|
tooltip: $,
|
|
19
|
-
tooltipEnabled:
|
|
20
|
-
options:
|
|
19
|
+
tooltipEnabled: Oe,
|
|
20
|
+
options: h,
|
|
21
21
|
intl: I,
|
|
22
22
|
groupMode: q,
|
|
23
|
-
reverse:
|
|
24
|
-
marginLeft:
|
|
25
|
-
lineLabelPosition:
|
|
23
|
+
reverse: vt,
|
|
24
|
+
marginLeft: Te,
|
|
25
|
+
lineLabelPosition: Me,
|
|
26
26
|
marginTop: Q,
|
|
27
|
-
marginRight:
|
|
27
|
+
marginRight: De,
|
|
28
28
|
marginBottom: X,
|
|
29
|
-
format:
|
|
30
|
-
colors:
|
|
31
|
-
offsetY:
|
|
32
|
-
height:
|
|
29
|
+
format: E,
|
|
30
|
+
colors: Nt,
|
|
31
|
+
offsetY: ke,
|
|
32
|
+
height: C,
|
|
33
33
|
showLegends: P,
|
|
34
|
-
legendPosition:
|
|
35
|
-
tickRotation:
|
|
36
|
-
offsetText:
|
|
34
|
+
legendPosition: f,
|
|
35
|
+
tickRotation: g,
|
|
36
|
+
offsetText: _,
|
|
37
37
|
tickColor: B,
|
|
38
|
-
legendLabel:
|
|
38
|
+
legendLabel: ee,
|
|
39
39
|
xLabelColor: O,
|
|
40
|
-
colorGenerator:
|
|
40
|
+
colorGenerator: te,
|
|
41
41
|
legendCheckBack: j,
|
|
42
|
-
legendLabelBack:
|
|
43
|
-
legendLabelColor:
|
|
44
|
-
highlightXAxisLine:
|
|
42
|
+
legendLabelBack: $e,
|
|
43
|
+
legendLabelColor: ae,
|
|
44
|
+
highlightXAxisLine: Ie,
|
|
45
45
|
showTickLine: S,
|
|
46
|
-
showRightAxis:
|
|
46
|
+
showRightAxis: Le,
|
|
47
47
|
valueScale: Et,
|
|
48
|
-
enableArea:
|
|
49
|
-
areaShadingCriteria:
|
|
50
|
-
areaLowerBound:
|
|
51
|
-
areaUpperBound:
|
|
52
|
-
showPoints:
|
|
53
|
-
maxValue:
|
|
48
|
+
enableArea: Fe,
|
|
49
|
+
areaShadingCriteria: re,
|
|
50
|
+
areaLowerBound: ne,
|
|
51
|
+
areaUpperBound: se,
|
|
52
|
+
showPoints: We,
|
|
53
|
+
maxValue: we,
|
|
54
54
|
fixedMinValue: H,
|
|
55
55
|
fixedMaxValue: R,
|
|
56
|
-
offsetBottom:
|
|
57
|
-
yAxisTickValues:
|
|
56
|
+
offsetBottom: ze,
|
|
57
|
+
yAxisTickValues: Ae,
|
|
58
58
|
enableGridY: _e,
|
|
59
|
-
enableGridX:
|
|
59
|
+
enableGridX: Be,
|
|
60
60
|
overrideTickColor: U,
|
|
61
|
-
offsetRight:
|
|
62
|
-
selectedMeasures:
|
|
63
|
-
tooltipEnableMarkdown:
|
|
64
|
-
minMaxClamp:
|
|
65
|
-
reverseLegend:
|
|
61
|
+
offsetRight: je,
|
|
62
|
+
selectedMeasures: Se,
|
|
63
|
+
tooltipEnableMarkdown: He,
|
|
64
|
+
minMaxClamp: Re,
|
|
65
|
+
reverseLegend: Ue,
|
|
66
66
|
customAxisFormat: L,
|
|
67
|
-
mobileCustomization:
|
|
68
|
-
lineCurve:
|
|
67
|
+
mobileCustomization: Ge,
|
|
68
|
+
lineCurve: Ve,
|
|
69
69
|
customLabels: G,
|
|
70
|
-
lineXAxisTickMode:
|
|
71
|
-
lineXAxisTickCount:
|
|
72
|
-
lineXAxisTickEvery:
|
|
70
|
+
lineXAxisTickMode: le,
|
|
71
|
+
lineXAxisTickCount: Ye,
|
|
72
|
+
lineXAxisTickEvery: Je,
|
|
73
|
+
chartHeight: ie
|
|
73
74
|
}) => {
|
|
74
|
-
var
|
|
75
|
-
const
|
|
75
|
+
var ye, ge, be;
|
|
76
|
+
const c = JSON.parse(decodeURIComponent(Ge)), ce = ve && ((c == null ? void 0 : c.showCustomization) ?? !1), F = ce && y !== "Desktop", W = !d && ce, [oe, Ke] = k(50), [me, Ze] = k(Q), [Ot, de] = k(0), [he, qe] = k(X), [T, Qe] = k([]), w = h.data.map((e) => ({
|
|
76
77
|
id: e.id,
|
|
77
78
|
label: G && G[e.id] ? G[e.id] : e.label || e.id,
|
|
78
|
-
color:
|
|
79
|
-
})),
|
|
79
|
+
color: te.getColor(e.id, e)
|
|
80
|
+
})), fe = () => (Ue && w.reverse(), /* @__PURE__ */ s(Y, { children: P && w.map((e, a) => /* @__PURE__ */ v("div", { className: "legend item", onClick: () => Pe(e.id), children: [
|
|
80
81
|
/* @__PURE__ */ s(
|
|
81
82
|
"input",
|
|
82
83
|
{
|
|
@@ -86,7 +87,7 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
86
87
|
readOnly: !0,
|
|
87
88
|
style: {
|
|
88
89
|
backgroundColor: j === !0 ? e.color : "none",
|
|
89
|
-
color:
|
|
90
|
+
color: ae
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
),
|
|
@@ -103,47 +104,47 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
103
104
|
"label",
|
|
104
105
|
{
|
|
105
106
|
style: {
|
|
106
|
-
backgroundColor:
|
|
107
|
-
color:
|
|
107
|
+
backgroundColor: $e === !0 ? e.color : "transparent",
|
|
108
|
+
color: ae
|
|
108
109
|
},
|
|
109
110
|
children: e.label
|
|
110
111
|
}
|
|
111
112
|
)
|
|
112
113
|
] }, a)) }));
|
|
113
|
-
|
|
114
|
+
ct(() => {
|
|
114
115
|
(() => {
|
|
115
|
-
const
|
|
116
|
-
|
|
116
|
+
const i = 5 * Math.max(w.length - 5, 0);
|
|
117
|
+
Ke(i);
|
|
117
118
|
})();
|
|
118
119
|
}, [w]);
|
|
119
|
-
const
|
|
120
|
-
bottom: `-${
|
|
121
|
-
},
|
|
122
|
-
bottom: `-${
|
|
120
|
+
const Xe = {
|
|
121
|
+
bottom: `-${oe}px`
|
|
122
|
+
}, Ce = {
|
|
123
|
+
bottom: `-${oe}px`,
|
|
123
124
|
gap: "0px",
|
|
124
125
|
top: "0px"
|
|
125
126
|
}, z = (e) => T.length ? e.filter((a) => T.indexOf(a.id) === -1) : e, Pe = (e) => {
|
|
126
127
|
const a = T.slice();
|
|
127
128
|
if (a.indexOf(e) > -1) {
|
|
128
|
-
const
|
|
129
|
-
a.splice(
|
|
129
|
+
const i = a.indexOf(e);
|
|
130
|
+
a.splice(i, 1);
|
|
130
131
|
} else
|
|
131
132
|
a.push(e);
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
const a = Object.assign({}, e),
|
|
135
|
-
(F || W) &&
|
|
136
|
-
let
|
|
133
|
+
Qe(a);
|
|
134
|
+
}, et = (e) => {
|
|
135
|
+
const a = Object.assign({}, e), i = pt();
|
|
136
|
+
(F || W) && pe.includes(String(a.value)) && (a.value = "");
|
|
137
|
+
let o = [], n = "";
|
|
137
138
|
if (F || W) {
|
|
138
|
-
const
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}),
|
|
139
|
+
const r = String(a.value).split(" ");
|
|
140
|
+
let l = 25;
|
|
141
|
+
d && y === "Mobile" || Ne && !d ? l = (c == null ? void 0 : c.mobileMaxTickLength) ?? 25 : d && y === "Tablet" || Ee && !d ? l = (c == null ? void 0 : c.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !d && (l = 15), r.forEach((m) => {
|
|
142
|
+
n.length + String(m).length <= l ? n += (n ? " " : "") + m : (o.push(n), n = m);
|
|
143
|
+
}), n && o.push(n);
|
|
143
144
|
} else
|
|
144
|
-
|
|
145
|
-
let
|
|
146
|
-
return
|
|
145
|
+
o = [a.value];
|
|
146
|
+
let t = 12;
|
|
147
|
+
return d && y === "Mobile" || Ne && !d ? t = (c == null ? void 0 : c.mobileYAxisLineHeight) ?? 12 : (d && y === "Tablet" || Ee && !d) && (t = (c == null ? void 0 : c.tabletYAxisLineHeight) ?? 12), gt(a.value, "12px Roboto") + 15, g > 0 && g < 180 ? /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
|
|
147
148
|
S && /* @__PURE__ */ s(
|
|
148
149
|
"line",
|
|
149
150
|
{
|
|
@@ -153,24 +154,24 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
153
154
|
y2: -12
|
|
154
155
|
}
|
|
155
156
|
),
|
|
156
|
-
/* @__PURE__ */ s("g", { transform: `translate(0, ${e.y +
|
|
157
|
+
/* @__PURE__ */ s("g", { transform: `translate(0, ${e.y + _})`, children: o.map((r, l) => /* @__PURE__ */ s(
|
|
157
158
|
"text",
|
|
158
159
|
{
|
|
159
|
-
transform: `rotate(${
|
|
160
|
+
transform: `rotate(${g})`,
|
|
160
161
|
textAnchor: "start",
|
|
161
|
-
y: typeof e.value == "number" ? 0 :
|
|
162
|
+
y: typeof e.value == "number" ? 0 : l * t,
|
|
162
163
|
dominantBaseline: "middle",
|
|
163
164
|
style: {
|
|
164
|
-
...
|
|
165
|
+
...i.axis.ticks.text,
|
|
165
166
|
fill: O === "null" ? "black" : O,
|
|
166
167
|
fontSize: "12px",
|
|
167
168
|
fontFamily: "sans-serif"
|
|
168
169
|
},
|
|
169
|
-
children:
|
|
170
|
+
children: r
|
|
170
171
|
},
|
|
171
|
-
|
|
172
|
+
r
|
|
172
173
|
)) })
|
|
173
|
-
] }) :
|
|
174
|
+
] }) : g > 180 && g < 360 ? /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
|
|
174
175
|
S && /* @__PURE__ */ s(
|
|
175
176
|
"line",
|
|
176
177
|
{
|
|
@@ -180,14 +181,14 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
180
181
|
y2: -12
|
|
181
182
|
}
|
|
182
183
|
),
|
|
183
|
-
/* @__PURE__ */ s("g", { transform: `translate(0, ${e.y +
|
|
184
|
+
/* @__PURE__ */ s("g", { transform: `translate(0, ${e.y + _})`, children: /* @__PURE__ */ s(
|
|
184
185
|
"text",
|
|
185
186
|
{
|
|
186
|
-
transform: `rotate(${
|
|
187
|
+
transform: `rotate(${g})`,
|
|
187
188
|
textAnchor: "end",
|
|
188
189
|
dominantBaseline: "middle",
|
|
189
190
|
style: {
|
|
190
|
-
...
|
|
191
|
+
...i.axis.ticks.text,
|
|
191
192
|
fill: O,
|
|
192
193
|
fontSize: "12px"
|
|
193
194
|
},
|
|
@@ -204,156 +205,157 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
204
205
|
y2: -12
|
|
205
206
|
}
|
|
206
207
|
),
|
|
207
|
-
/* @__PURE__ */ s("g", { transform: `translate(0, ${e.y +
|
|
208
|
+
/* @__PURE__ */ s("g", { transform: `translate(0, ${e.y + _})`, children: o.map((r, l) => /* @__PURE__ */ s(
|
|
208
209
|
"text",
|
|
209
210
|
{
|
|
210
|
-
transform: `rotate(${
|
|
211
|
+
transform: `rotate(${g})`,
|
|
211
212
|
textAnchor: "middle",
|
|
212
|
-
y: typeof e.value == "number" ? 0 :
|
|
213
|
+
y: typeof e.value == "number" ? 0 : l * t,
|
|
213
214
|
dominantBaseline: "middle",
|
|
214
215
|
style: {
|
|
215
|
-
...
|
|
216
|
+
...i.axis.ticks.text,
|
|
216
217
|
fill: O === "null" ? "black" : O,
|
|
217
218
|
fontSize: "12px",
|
|
218
219
|
fontFamily: "sans-serif"
|
|
219
220
|
},
|
|
220
|
-
children:
|
|
221
|
+
children: r
|
|
221
222
|
},
|
|
222
|
-
|
|
223
|
+
r
|
|
223
224
|
)) })
|
|
224
225
|
] });
|
|
225
|
-
},
|
|
226
|
-
const
|
|
227
|
-
e[0] && e[0].data.forEach((
|
|
228
|
-
Z == "csv" ?
|
|
229
|
-
|
|
230
|
-
}) :
|
|
231
|
-
|
|
226
|
+
}, tt = ({ series: e, xScale: a, yScale: i, innerHeight: o }) => {
|
|
227
|
+
const n = e && e.length > 0 ? e[0].color : "#3daff7", t = [];
|
|
228
|
+
e[0] && e[0].data.forEach((x) => {
|
|
229
|
+
Z == "csv" ? h.keys.forEach((b) => {
|
|
230
|
+
t.push({ measure: b, min: x.data.variables[b] });
|
|
231
|
+
}) : Se.forEach((b) => {
|
|
232
|
+
t.push({ measure: b, min: x.data.variables[b] });
|
|
232
233
|
});
|
|
233
234
|
});
|
|
234
|
-
const
|
|
235
|
+
const r = t.sort((x, b) => x.min - b.min), l = re == "CUSTOM_BETWEEN_TWO_LINES" && ne ? ne : r[0].measure, m = re == "CUSTOM_BETWEEN_TWO_LINES" && se ? se : r[r.length - 1].measure, it = ft().x((x) => a(x.data.x)).y0((x) => i(x.data.variables[l])).y1((x) => i(x.data.variables[m]));
|
|
235
236
|
return /* @__PURE__ */ s(Y, { children: e && e[0] && /* @__PURE__ */ s(
|
|
236
237
|
"path",
|
|
237
238
|
{
|
|
238
|
-
d:
|
|
239
|
-
fill:
|
|
239
|
+
d: it(e[0].data),
|
|
240
|
+
fill: n,
|
|
240
241
|
fillOpacity: 0.4
|
|
241
242
|
}
|
|
242
243
|
) });
|
|
243
|
-
},
|
|
244
|
-
const
|
|
245
|
-
return /* @__PURE__ */ s(
|
|
244
|
+
}, at = ({ series: e, xScale: a, yScale: i, innerHeight: o, innerWidth: n }) => {
|
|
245
|
+
const t = [0, n], r = ut().x((l, m) => m === 0 ? -10 : l).y((l) => i(0));
|
|
246
|
+
return /* @__PURE__ */ s(ot, { children: /* @__PURE__ */ s(
|
|
246
247
|
"path",
|
|
247
248
|
{
|
|
248
|
-
d:
|
|
249
|
+
d: r(t),
|
|
249
250
|
fill: "none",
|
|
250
|
-
stroke:
|
|
251
|
+
stroke: yt,
|
|
251
252
|
style: { pointerEvents: "none", strokeDasharray: "4 4" }
|
|
252
253
|
}
|
|
253
254
|
) });
|
|
254
255
|
}, M = ["grid", "axes", "lines", "legends"];
|
|
255
|
-
|
|
256
|
+
Fe && M.push(tt), We && (M.push("points"), M.push("mesh")), Ie && M.push(at);
|
|
256
257
|
let D = [];
|
|
257
|
-
z(
|
|
258
|
+
z(h.data).forEach((e) => {
|
|
258
259
|
e.data && (D = [...D, ...e.data.map((a) => a.y)]);
|
|
259
260
|
});
|
|
260
|
-
const
|
|
261
|
+
const rt = () => {
|
|
261
262
|
if (q === "stacked") {
|
|
262
263
|
const e = [];
|
|
263
|
-
z(
|
|
264
|
-
e.push(...
|
|
264
|
+
z(h.data).forEach((o) => {
|
|
265
|
+
e.push(...o.data);
|
|
265
266
|
});
|
|
266
|
-
const
|
|
267
|
-
e.forEach((
|
|
268
|
-
|
|
269
|
-
}),
|
|
270
|
-
...
|
|
271
|
-
),
|
|
272
|
-
...
|
|
267
|
+
const i = [];
|
|
268
|
+
e.forEach((o) => {
|
|
269
|
+
i.indexOf(o.x) == -1 && i.push(o.x);
|
|
270
|
+
}), p = Math.max(
|
|
271
|
+
...i.map((o) => e.filter((n) => n.x == o).map((n) => n.y).reduce((n, t) => Math.max(n + t, n + 0)))
|
|
272
|
+
), u = Math.min(
|
|
273
|
+
...i.map((o) => e.filter((n) => n.x == o).map((n) => n.y).reduce((n, t) => Math.min(n - t, t - n)))
|
|
273
274
|
);
|
|
274
275
|
} else
|
|
275
|
-
D.length > 0 && (
|
|
276
|
-
return
|
|
276
|
+
D.length > 0 && (p = Math.max(...D), u = Math.min(...D));
|
|
277
|
+
return p = p < 0 ? p * 0.9 : p * 1.1, u = u > 0 ? u * 0.9 : u * 1.1, { min: u, max: p };
|
|
277
278
|
};
|
|
278
|
-
let
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
const
|
|
282
|
-
top:
|
|
283
|
-
right:
|
|
284
|
-
bottom:
|
|
285
|
-
left:
|
|
279
|
+
let u = "auto", p = "auto";
|
|
280
|
+
const A = rt();
|
|
281
|
+
we == "fixed" ? (u = H != null && H != "" ? H : A.min, p = R != null && R != "" ? R : A.max) : (u = A.min, p = A.max);
|
|
282
|
+
const ue = () => /* @__PURE__ */ s(Y, { children: P && ee && /* @__PURE__ */ s("div", { className: "legend item", children: /* @__PURE__ */ s("label", { className: "legend-title", children: ee }) }) }), nt = {
|
|
283
|
+
top: me,
|
|
284
|
+
right: De,
|
|
285
|
+
bottom: he,
|
|
286
|
+
left: Te
|
|
286
287
|
};
|
|
287
|
-
let V = parseInt(
|
|
288
|
-
const
|
|
288
|
+
let V = parseInt(Ae);
|
|
289
|
+
const st = h.data && ((ge = (ye = h.data) == null ? void 0 : ye.filter((e) => {
|
|
289
290
|
var a;
|
|
290
291
|
return ((a = e == null ? void 0 : e.data) == null ? void 0 : a.length) > 0;
|
|
291
|
-
})) == null ? void 0 :
|
|
292
|
+
})) == null ? void 0 : ge.length), pe = [];
|
|
292
293
|
if (F || W) {
|
|
293
|
-
V = Number.parseInt(
|
|
294
|
-
const e = new Map(Object.entries(((
|
|
295
|
-
for (const [a,
|
|
296
|
-
|
|
294
|
+
V = Number.parseInt(c.yAxisTickValues);
|
|
295
|
+
const e = new Map(Object.entries(((be = c == null ? void 0 : c.labels) == null ? void 0 : be.xAxis) ?? {}));
|
|
296
|
+
for (const [a, i] of e)
|
|
297
|
+
i || pe.push(a);
|
|
297
298
|
}
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
300
|
-
let e = z(
|
|
299
|
+
const xe = z(h.data), lt = ["grid", "axes", "legends"];
|
|
300
|
+
if (h != null && h.data && st > 0) {
|
|
301
|
+
let e = z(h.data);
|
|
301
302
|
const a = [];
|
|
302
303
|
e.forEach((t) => {
|
|
303
304
|
t && Array.isArray(t.data) && t.data.forEach((r) => {
|
|
304
|
-
const
|
|
305
|
-
|
|
305
|
+
const l = r && r.x;
|
|
306
|
+
l !== void 0 && a.indexOf(l) === -1 && a.push(l);
|
|
306
307
|
});
|
|
307
308
|
});
|
|
308
|
-
let
|
|
309
|
-
if (
|
|
310
|
-
const t = Math.max(1, parseInt(
|
|
309
|
+
let i;
|
|
310
|
+
if (le === "count") {
|
|
311
|
+
const t = Math.max(1, parseInt(Ye));
|
|
311
312
|
if (a.length > 0 && t > 0)
|
|
312
313
|
if (a.length <= t)
|
|
313
|
-
|
|
314
|
+
i = a.slice();
|
|
314
315
|
else {
|
|
315
|
-
const r = (a.length - 1) / (t - 1),
|
|
316
|
-
for (let
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
const r = (a.length - 1) / (t - 1), l = new Array(t);
|
|
317
|
+
for (let m = 0; m < t; m++)
|
|
318
|
+
l[m] = Math.floor(m * r);
|
|
319
|
+
l[t - 1] = a.length - 1, i = l.map((m) => a[m]);
|
|
319
320
|
}
|
|
320
|
-
} else if (
|
|
321
|
-
const t = Math.max(1, parseInt(
|
|
321
|
+
} else if (le === "every") {
|
|
322
|
+
const t = Math.max(1, parseInt(Je));
|
|
322
323
|
if (a.length > 0) {
|
|
323
324
|
const r = [];
|
|
324
|
-
for (let
|
|
325
|
-
|
|
326
|
-
r[r.length - 1] !== a[a.length - 1] && r.push(a[a.length - 1]),
|
|
325
|
+
for (let l = 0; l < a.length; l++)
|
|
326
|
+
l % t === 0 && r.push(a[l]);
|
|
327
|
+
r[r.length - 1] !== a[a.length - 1] && r.push(a[a.length - 1]), i = r;
|
|
327
328
|
}
|
|
328
329
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
const o = Number(ie) > 0, n = o ? Number(ie) : parseInt(C + "");
|
|
331
|
+
return /* @__PURE__ */ v("div", { style: o ? { display: "flex", flexDirection: "column" } : { height: C }, children: [
|
|
332
|
+
/* @__PURE__ */ s("div", { style: o ? { height: n, flexShrink: 0 } : { height: "100%" }, children: /* @__PURE__ */ s(
|
|
333
|
+
dt,
|
|
332
334
|
{
|
|
333
|
-
curve:
|
|
334
|
-
data:
|
|
335
|
-
margin:
|
|
335
|
+
curve: Ve,
|
|
336
|
+
data: xe,
|
|
337
|
+
margin: nt,
|
|
336
338
|
xScale: { type: "point" },
|
|
337
339
|
yScale: {
|
|
338
340
|
type: "linear",
|
|
339
|
-
min:
|
|
340
|
-
max:
|
|
341
|
+
min: u,
|
|
342
|
+
max: p,
|
|
341
343
|
stacked: q == "stacked",
|
|
342
344
|
reverse: !1,
|
|
343
|
-
clamp:
|
|
345
|
+
clamp: Re
|
|
344
346
|
},
|
|
345
|
-
layers:
|
|
347
|
+
layers: xe.length === 0 ? lt : M,
|
|
346
348
|
axisTop: null,
|
|
347
|
-
axisRight:
|
|
349
|
+
axisRight: Le ? {
|
|
348
350
|
tickSize: 5,
|
|
349
351
|
tickValues: V,
|
|
350
352
|
tickPadding: 5,
|
|
351
353
|
tickRotation: 0,
|
|
352
|
-
legend:
|
|
354
|
+
legend: N.right,
|
|
353
355
|
legendPosition: "middle",
|
|
354
|
-
legendOffset: parseInt(
|
|
356
|
+
legendOffset: parseInt(je),
|
|
355
357
|
format: (t) => {
|
|
356
|
-
const r = L ||
|
|
358
|
+
const r = L || E;
|
|
357
359
|
return I.formatNumber(
|
|
358
360
|
r.style === "percent" ? t / 100 : t,
|
|
359
361
|
{
|
|
@@ -363,31 +365,31 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
363
365
|
}
|
|
364
366
|
} : null,
|
|
365
367
|
enableGridY: _e,
|
|
366
|
-
enableGridX:
|
|
367
|
-
enablePointLabel:
|
|
368
|
+
enableGridX: Be,
|
|
369
|
+
enablePointLabel: Me === "top",
|
|
368
370
|
pointLabel: (t) => I.formatNumber(
|
|
369
|
-
|
|
370
|
-
|
|
371
|
+
E.style === "percent" ? t.data.yFormatted / 100 : t.data.yFormatted,
|
|
372
|
+
E
|
|
371
373
|
),
|
|
372
374
|
lineWidth: 3,
|
|
373
|
-
colors: (t) =>
|
|
374
|
-
axisBottom: (F || W) && (
|
|
375
|
-
...
|
|
376
|
-
renderTick:
|
|
377
|
-
legend:
|
|
375
|
+
colors: (t) => te.getColor(t.id, t),
|
|
376
|
+
axisBottom: (F || W) && (c == null ? void 0 : c.xAxisDisabled) === !0 ? null : {
|
|
377
|
+
...i ? { tickValues: i } : {},
|
|
378
|
+
renderTick: et,
|
|
379
|
+
legend: N.bottom,
|
|
378
380
|
legendPosition: "middle",
|
|
379
|
-
legendOffset: Number.parseInt(
|
|
381
|
+
legendOffset: Number.parseInt(ze)
|
|
380
382
|
},
|
|
381
383
|
axisLeft: {
|
|
382
384
|
tickSize: 5,
|
|
383
385
|
tickValues: V,
|
|
384
386
|
tickPadding: 5,
|
|
385
387
|
tickRotation: 0,
|
|
386
|
-
legend:
|
|
388
|
+
legend: N.left,
|
|
387
389
|
legendPosition: "middle",
|
|
388
|
-
legendOffset: Number.parseInt(
|
|
390
|
+
legendOffset: Number.parseInt(ke),
|
|
389
391
|
format: (t) => {
|
|
390
|
-
const r = L ||
|
|
392
|
+
const r = L || E;
|
|
391
393
|
return I.formatNumber(
|
|
392
394
|
r.style === "percent" ? t / 100 : t,
|
|
393
395
|
{
|
|
@@ -396,14 +398,14 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
396
398
|
);
|
|
397
399
|
}
|
|
398
400
|
},
|
|
399
|
-
tooltip: (t) =>
|
|
400
|
-
|
|
401
|
+
tooltip: (t) => Oe && $ && $.trim().length > 0 ? /* @__PURE__ */ s(
|
|
402
|
+
ht,
|
|
401
403
|
{
|
|
402
404
|
intl: I,
|
|
403
|
-
format:
|
|
405
|
+
format: E,
|
|
404
406
|
d: t,
|
|
405
407
|
tooltip: $,
|
|
406
|
-
tooltipEnableMarkdown:
|
|
408
|
+
tooltipEnableMarkdown: He
|
|
407
409
|
}
|
|
408
410
|
) : null,
|
|
409
411
|
pointSize: 10,
|
|
@@ -412,46 +414,46 @@ const xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].incl
|
|
|
412
414
|
useMesh: e.length > 0 && e[0].data.length > 0
|
|
413
415
|
},
|
|
414
416
|
/* @__PURE__ */ new Date()
|
|
415
|
-
),
|
|
416
|
-
(
|
|
417
|
+
) }),
|
|
418
|
+
(f === "top" || f === "bottom") && /* @__PURE__ */ s(
|
|
417
419
|
"div",
|
|
418
420
|
{
|
|
419
|
-
className: `legends container has-standard-12-font-size ${
|
|
420
|
-
style:
|
|
421
|
+
className: `legends container has-standard-12-font-size ${f}`,
|
|
422
|
+
style: f === "top" ? { marginTop: ve && `${me}px` } : f === "bottom" ? { marginBottom: `${he}px` } : {},
|
|
421
423
|
children: /* @__PURE__ */ v("div", { className: "legend-sections", children: [
|
|
422
|
-
/* @__PURE__ */ s("div", { className: "title-section", children:
|
|
424
|
+
/* @__PURE__ */ s("div", { className: "title-section", children: ue() }),
|
|
423
425
|
/* @__PURE__ */ s(
|
|
424
|
-
|
|
426
|
+
xt,
|
|
425
427
|
{
|
|
426
428
|
onWrapChange: (t) => {
|
|
427
|
-
if (
|
|
429
|
+
if (f === "top") {
|
|
428
430
|
const r = Q + t / 2 * 40;
|
|
429
|
-
|
|
431
|
+
Ze(r), de(t);
|
|
430
432
|
} else
|
|
431
|
-
|
|
433
|
+
qe(X + t / 2 * 25), de(t);
|
|
432
434
|
},
|
|
433
435
|
className: "legends container has-standard-12-font-size items-section",
|
|
434
|
-
children:
|
|
436
|
+
children: fe()
|
|
435
437
|
}
|
|
436
438
|
)
|
|
437
439
|
] })
|
|
438
440
|
}
|
|
439
441
|
),
|
|
440
|
-
(
|
|
442
|
+
(f === "right" || f === "left") && /* @__PURE__ */ v(
|
|
441
443
|
"div",
|
|
442
444
|
{
|
|
443
|
-
className: `legends container has-standard-12-font-size ${
|
|
444
|
-
style:
|
|
445
|
+
className: `legends container has-standard-12-font-size ${f}`,
|
|
446
|
+
style: f === "right" ? Xe : Ce,
|
|
445
447
|
children: [
|
|
446
|
-
|
|
447
|
-
|
|
448
|
+
ue(),
|
|
449
|
+
fe()
|
|
448
450
|
]
|
|
449
451
|
}
|
|
450
452
|
)
|
|
451
453
|
] });
|
|
452
454
|
}
|
|
453
455
|
return /* @__PURE__ */ s("div", {});
|
|
454
|
-
},
|
|
456
|
+
}, wt = mt(bt);
|
|
455
457
|
export {
|
|
456
|
-
|
|
458
|
+
wt as default
|
|
457
459
|
};
|