@devgateway/dvz-ui-react 1.5.4 → 1.6.1
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/common.css +1 -1
- package/dist/cjs/embeddable/chart/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/Line.js +1 -1
- package/dist/cjs/embeddable/chart/Pie.js +1 -1
- package/dist/cjs/embeddable/chart/colors/ManualColors.js +1 -1
- package/dist/cjs/embeddable/chart/data/Bar.js +1 -1
- package/dist/cjs/embeddable/chart/index.js +1 -1
- package/dist/cjs/embeddable/common/colors/ManualColors.js +1 -1
- package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
- package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
- package/dist/cjs/embeddable/filtered-posts/NoData.js +2 -2
- package/dist/cjs/embeddable/filtered-posts/index.js +1 -1
- package/dist/cjs/embeddable/filtered-posts/utils.js +1 -1
- package/dist/cjs/embeddable/posts-filter/CategoricalFilter.js +1 -0
- package/dist/cjs/embeddable/posts-filter/PostsFilterDropdown.js +1 -1
- package/dist/cjs/embeddable/posts-filter/YearFilter.js +1 -0
- package/dist/cjs/embeddable/posts-filter/index.js +1 -1
- package/dist/cjs/embeddable/posts-filters-reset-button/index.js +1 -1
- package/dist/cjs/embeddable/posts-pagination/index.js +1 -1
- package/dist/cjs/embeddable/reducers/data-api.js +1 -1
- package/dist/cjs/embeddable/reducers/data.js +1 -1
- package/dist/cjs/embeddable/reducers/embeddable-api.js +1 -1
- package/dist/cjs/embeddable/time-line/mobile.js +1 -1
- package/dist/cjs/embeddable/vertical-featuredtabs/index.js +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/layout/Layout.js +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/esm/common.css +1 -1
- package/dist/esm/embeddable/chart/Bar.js +253 -235
- package/dist/esm/embeddable/chart/Line.js +122 -121
- package/dist/esm/embeddable/chart/Pie.js +82 -81
- package/dist/esm/embeddable/chart/colors/ManualColors.js +33 -33
- package/dist/esm/embeddable/chart/data/Bar.js +18 -16
- package/dist/esm/embeddable/chart/index.js +298 -286
- package/dist/esm/embeddable/common/colors/ManualColors.js +22 -22
- package/dist/esm/embeddable/d3Map/BaseLayer.js +4 -1
- package/dist/esm/embeddable/d3Map/DataLayer.js +5 -1
- package/dist/esm/embeddable/filtered-posts/NoData.js +25 -18
- package/dist/esm/embeddable/filtered-posts/index.js +136 -92
- package/dist/esm/embeddable/filtered-posts/utils.js +3 -2
- package/dist/esm/embeddable/posts-filter/CategoricalFilter.js +72 -0
- package/dist/esm/embeddable/posts-filter/PostsFilterDropdown.js +106 -92
- package/dist/esm/embeddable/posts-filter/YearFilter.js +60 -0
- package/dist/esm/embeddable/posts-filter/index.js +160 -191
- package/dist/esm/embeddable/posts-filters-reset-button/index.js +21 -15
- package/dist/esm/embeddable/posts-pagination/index.js +36 -33
- package/dist/esm/embeddable/reducers/data-api.js +35 -35
- package/dist/esm/embeddable/reducers/data.js +116 -107
- package/dist/esm/embeddable/reducers/embeddable-api.js +8 -8
- package/dist/esm/embeddable/time-line/mobile.js +119 -118
- package/dist/esm/embeddable/vertical-featuredtabs/index.js +202 -131
- package/dist/esm/index.js +66 -64
- package/dist/esm/layout/Layout.js +8 -6
- package/dist/esm/styles.css +1 -1
- package/dist/types/dvz-ui/src/embeddable/chart/colors/ManualColors.d.ts +1 -1
- package/dist/types/dvz-ui/src/embeddable/filtered-posts/NoData.d.ts +1 -0
- package/dist/types/dvz-ui/src/embeddable/filtered-posts/index.d.ts +2 -1
- package/dist/types/dvz-ui/src/embeddable/filtered-posts/utils.d.ts +3 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/CategoricalFilter.d.ts +9 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/PostsFilterDropdown.d.ts +1 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/YearFilter.d.ts +12 -0
- package/dist/types/dvz-ui/src/embeddable/posts-filter/index.d.ts +2 -0
- package/dist/types/dvz-ui/src/embeddable/reducers/data-api.d.ts +3 -1
- package/dist/types/dvz-ui/src/embeddable/reducers/data.d.ts +5 -0
- package/dist/types/dvz-ui/src/embeddable/time-line/mobile.d.ts +2 -1
- package/dist/types/dvz-ui/src/translations/af.json.d.ts +1 -2
- package/dist/types/dvz-ui/src/translations/am.json.d.ts +35 -35
- package/dist/types/dvz-ui/src/translations/index.d.ts +2 -1
- package/dist/types/dvz-ui/src/utils/data.d.ts +2 -0
- package/package.json +3 -2
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
import { jsxs as v, jsx as a, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as $, useEffect as rt, Fragment as nt } from "react";
|
|
3
3
|
import { injectIntl as st } from "react-intl";
|
|
4
4
|
import { ResponsiveLine as lt } from "@nivo/line";
|
|
5
5
|
import it from "./Tooltip.js";
|
|
6
6
|
import { area as ct, line as ot } from "d3-shape";
|
|
7
|
-
import { useTheme as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].includes(
|
|
7
|
+
import { useTheme as mt } from "@nivo/theming";
|
|
8
|
+
import dt from "../../layout/FlexWrapDetector.js";
|
|
9
|
+
import V from "../../utils/deviceType.js";
|
|
10
|
+
const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].includes(V()), ye = V() === "mobile", be = ["tablet", "midTablet"].includes(V()), ut = (m, x) => {
|
|
11
11
|
const N = document.createElement("canvas").getContext("2d");
|
|
12
|
-
return N.font = x, N.measureText(
|
|
12
|
+
return N.font = x, N.measureText(m).width;
|
|
13
13
|
}, pt = ({
|
|
14
|
-
editing:
|
|
14
|
+
editing: m,
|
|
15
15
|
previewMode: x,
|
|
16
|
-
app:
|
|
16
|
+
app: Z,
|
|
17
17
|
legends: N,
|
|
18
|
-
tooltip:
|
|
19
|
-
tooltipEnabled:
|
|
20
|
-
options:
|
|
18
|
+
tooltip: k,
|
|
19
|
+
tooltipEnabled: ge,
|
|
20
|
+
options: d,
|
|
21
21
|
intl: I,
|
|
22
|
-
groupMode:
|
|
22
|
+
groupMode: q,
|
|
23
23
|
reverse: xt,
|
|
24
|
-
marginLeft:
|
|
25
|
-
lineLabelPosition:
|
|
26
|
-
marginTop:
|
|
27
|
-
marginRight:
|
|
28
|
-
marginBottom:
|
|
24
|
+
marginLeft: ve,
|
|
25
|
+
lineLabelPosition: Ne,
|
|
26
|
+
marginTop: Q,
|
|
27
|
+
marginRight: Ee,
|
|
28
|
+
marginBottom: X,
|
|
29
29
|
format: E,
|
|
30
30
|
colors: yt,
|
|
31
|
-
offsetY:
|
|
32
|
-
height:
|
|
33
|
-
showLegends:
|
|
34
|
-
legendPosition:
|
|
31
|
+
offsetY: Oe,
|
|
32
|
+
height: Te,
|
|
33
|
+
showLegends: P,
|
|
34
|
+
legendPosition: h,
|
|
35
35
|
tickRotation: y,
|
|
36
|
-
offsetText:
|
|
37
|
-
tickColor:
|
|
36
|
+
offsetText: j,
|
|
37
|
+
tickColor: w,
|
|
38
38
|
legendLabel: C,
|
|
39
39
|
xLabelColor: O,
|
|
40
40
|
colorGenerator: ee,
|
|
41
41
|
legendCheckBack: A,
|
|
42
|
-
legendLabelBack:
|
|
42
|
+
legendLabelBack: De,
|
|
43
43
|
legendLabelColor: te,
|
|
44
|
-
highlightXAxisLine:
|
|
44
|
+
highlightXAxisLine: Me,
|
|
45
45
|
showTickLine: S,
|
|
46
|
-
showRightAxis:
|
|
46
|
+
showRightAxis: $e,
|
|
47
47
|
valueScale: bt,
|
|
48
|
-
enableArea:
|
|
48
|
+
enableArea: ke,
|
|
49
49
|
areaShadingCriteria: ae,
|
|
50
50
|
areaLowerBound: re,
|
|
51
51
|
areaUpperBound: ne,
|
|
52
|
-
showPoints:
|
|
53
|
-
maxValue:
|
|
52
|
+
showPoints: Ie,
|
|
53
|
+
maxValue: Le,
|
|
54
54
|
fixedMinValue: H,
|
|
55
55
|
fixedMaxValue: R,
|
|
56
|
-
offsetBottom:
|
|
57
|
-
yAxisTickValues:
|
|
58
|
-
enableGridY:
|
|
59
|
-
enableGridX:
|
|
56
|
+
offsetBottom: Fe,
|
|
57
|
+
yAxisTickValues: We,
|
|
58
|
+
enableGridY: ze,
|
|
59
|
+
enableGridX: _e,
|
|
60
60
|
overrideTickColor: U,
|
|
61
|
-
offsetRight:
|
|
62
|
-
selectedMeasures:
|
|
63
|
-
tooltipEnableMarkdown:
|
|
64
|
-
minMaxClamp:
|
|
65
|
-
reverseLegend:
|
|
61
|
+
offsetRight: Be,
|
|
62
|
+
selectedMeasures: je,
|
|
63
|
+
tooltipEnableMarkdown: we,
|
|
64
|
+
minMaxClamp: Ae,
|
|
65
|
+
reverseLegend: Se,
|
|
66
66
|
customAxisFormat: L,
|
|
67
|
-
mobileCustomization:
|
|
68
|
-
lineCurve:
|
|
67
|
+
mobileCustomization: He,
|
|
68
|
+
lineCurve: Re,
|
|
69
69
|
customLabels: G
|
|
70
70
|
}) => {
|
|
71
|
-
var
|
|
72
|
-
const s = JSON.parse(decodeURIComponent(
|
|
71
|
+
var ue, pe, xe;
|
|
72
|
+
const s = JSON.parse(decodeURIComponent(He)), se = ft && ((s == null ? void 0 : s.showCustomization) ?? !1), F = se && x !== "Desktop", W = !m && se, [le, Ue] = $(50), [ie, Ge] = $(Q), [gt, ce] = $(0), [oe, Ye] = $(X), [T, Je] = $([]), z = d.data.map((e) => ({
|
|
73
73
|
id: e.id,
|
|
74
74
|
label: G && G[e.id] ? G[e.id] : e.label || e.id,
|
|
75
75
|
color: ee.getColor(e.id, e)
|
|
76
|
-
})),
|
|
76
|
+
})), me = () => (Se && z.reverse(), /* @__PURE__ */ a(J, { children: P && z.map((e, t) => /* @__PURE__ */ v("div", { className: "legend item", onClick: () => Ze(e.id), children: [
|
|
77
77
|
/* @__PURE__ */ a(
|
|
78
78
|
"input",
|
|
79
79
|
{
|
|
@@ -100,7 +100,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
100
100
|
"label",
|
|
101
101
|
{
|
|
102
102
|
style: {
|
|
103
|
-
backgroundColor:
|
|
103
|
+
backgroundColor: De === !0 ? e.color : "transparent",
|
|
104
104
|
color: te
|
|
105
105
|
},
|
|
106
106
|
children: e.label
|
|
@@ -110,16 +110,16 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
110
110
|
rt(() => {
|
|
111
111
|
(() => {
|
|
112
112
|
const r = 5 * Math.max(z.length - 5, 0);
|
|
113
|
-
|
|
113
|
+
Ue(r);
|
|
114
114
|
})();
|
|
115
115
|
}, [z]);
|
|
116
116
|
const Ke = {
|
|
117
117
|
bottom: `-${le}px`
|
|
118
|
-
},
|
|
118
|
+
}, Ve = {
|
|
119
119
|
bottom: `-${le}px`,
|
|
120
120
|
gap: "0px",
|
|
121
121
|
top: "0px"
|
|
122
|
-
}, _ = (e) => T.length ? e.filter((t) => T.indexOf(t.id) === -1) : e,
|
|
122
|
+
}, _ = (e) => T.length ? e.filter((t) => T.indexOf(t.id) === -1) : e, Ze = (e) => {
|
|
123
123
|
const t = T.slice();
|
|
124
124
|
if (t.indexOf(e) > -1) {
|
|
125
125
|
const r = t.indexOf(e);
|
|
@@ -127,30 +127,30 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
127
127
|
} else
|
|
128
128
|
t.push(e);
|
|
129
129
|
Je(t);
|
|
130
|
-
},
|
|
131
|
-
const t = Object.assign({}, e), r =
|
|
132
|
-
(F || W) &&
|
|
130
|
+
}, qe = (e) => {
|
|
131
|
+
const t = Object.assign({}, e), r = mt();
|
|
132
|
+
(F || W) && he.includes(String(t.value)) && (t.value = "");
|
|
133
133
|
let l = [], n = "";
|
|
134
134
|
if (F || W) {
|
|
135
135
|
const c = String(t.value).split(" ");
|
|
136
136
|
let o = 25;
|
|
137
|
-
|
|
137
|
+
m && x === "Mobile" || ye && !m ? o = (s == null ? void 0 : s.mobileMaxTickLength) ?? 25 : m && x === "Tablet" || be && !m ? o = (s == null ? void 0 : s.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !m && (o = 15), c.forEach((b) => {
|
|
138
138
|
n.length + String(b).length <= o ? n += (n ? " " : "") + b : (l.push(n), n = b);
|
|
139
139
|
}), n && l.push(n);
|
|
140
140
|
} else
|
|
141
141
|
l = [t.value];
|
|
142
142
|
let i = 12;
|
|
143
|
-
return
|
|
143
|
+
return m && x === "Mobile" || ye && !m ? i = (s == null ? void 0 : s.mobileYAxisLineHeight) ?? 12 : (m && x === "Tablet" || be && !m) && (i = (s == null ? void 0 : s.tabletYAxisLineHeight) ?? 12), ut(t.value, "12px Roboto") + 15, y > 0 && y < 180 ? /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
|
|
144
144
|
S && /* @__PURE__ */ a(
|
|
145
145
|
"line",
|
|
146
146
|
{
|
|
147
|
-
stroke: U ?
|
|
147
|
+
stroke: U ? w : K,
|
|
148
148
|
strokeWidth: 1.5,
|
|
149
149
|
y1: -32,
|
|
150
150
|
y2: -12
|
|
151
151
|
}
|
|
152
152
|
),
|
|
153
|
-
/* @__PURE__ */ a("g", { transform: `translate(0, ${e.y +
|
|
153
|
+
/* @__PURE__ */ a("g", { transform: `translate(0, ${e.y + j})`, children: l.map((c, o) => /* @__PURE__ */ a(
|
|
154
154
|
"text",
|
|
155
155
|
{
|
|
156
156
|
transform: `rotate(${y})`,
|
|
@@ -171,13 +171,13 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
171
171
|
S && /* @__PURE__ */ a(
|
|
172
172
|
"line",
|
|
173
173
|
{
|
|
174
|
-
stroke: U ?
|
|
174
|
+
stroke: U ? w : K,
|
|
175
175
|
strokeWidth: 1.5,
|
|
176
176
|
y1: -32,
|
|
177
177
|
y2: -12
|
|
178
178
|
}
|
|
179
179
|
),
|
|
180
|
-
/* @__PURE__ */ a("g", { transform: `translate(0, ${e.y +
|
|
180
|
+
/* @__PURE__ */ a("g", { transform: `translate(0, ${e.y + j})`, children: /* @__PURE__ */ a(
|
|
181
181
|
"text",
|
|
182
182
|
{
|
|
183
183
|
transform: `rotate(${y})`,
|
|
@@ -195,13 +195,13 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
195
195
|
S && /* @__PURE__ */ a(
|
|
196
196
|
"line",
|
|
197
197
|
{
|
|
198
|
-
stroke: U ?
|
|
198
|
+
stroke: U ? w : K,
|
|
199
199
|
strokeWidth: 1.5,
|
|
200
200
|
y1: -32,
|
|
201
201
|
y2: -12
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
|
-
/* @__PURE__ */ a("g", { transform: `translate(0, ${e.y +
|
|
204
|
+
/* @__PURE__ */ a("g", { transform: `translate(0, ${e.y + j})`, children: l.map((c, o) => /* @__PURE__ */ a(
|
|
205
205
|
"text",
|
|
206
206
|
{
|
|
207
207
|
transform: `rotate(${y})`,
|
|
@@ -219,16 +219,16 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
219
219
|
c
|
|
220
220
|
)) })
|
|
221
221
|
] });
|
|
222
|
-
},
|
|
222
|
+
}, Qe = ({ series: e, xScale: t, yScale: r, innerHeight: l }) => {
|
|
223
223
|
const n = e && e.length > 0 ? e[0].color : "#3daff7", i = [];
|
|
224
|
-
e[0] && e[0].data.forEach((
|
|
225
|
-
|
|
226
|
-
i.push({ measure: g, min:
|
|
227
|
-
}) :
|
|
228
|
-
i.push({ measure: g, min:
|
|
224
|
+
e[0] && e[0].data.forEach((p) => {
|
|
225
|
+
Z == "csv" ? d.keys.forEach((g) => {
|
|
226
|
+
i.push({ measure: g, min: p.data.variables[g] });
|
|
227
|
+
}) : je.forEach((g) => {
|
|
228
|
+
i.push({ measure: g, min: p.data.variables[g] });
|
|
229
229
|
});
|
|
230
230
|
});
|
|
231
|
-
const c = i.sort((
|
|
231
|
+
const c = i.sort((p, g) => p.min - g.min), o = ae == "CUSTOM_BETWEEN_TWO_LINES" && re ? re : c[0].measure, b = ae == "CUSTOM_BETWEEN_TWO_LINES" && ne ? ne : c[c.length - 1].measure, at = ct().x((p) => t(p.data.x)).y0((p) => r(p.data.variables[o])).y1((p) => r(p.data.variables[b]));
|
|
232
232
|
return /* @__PURE__ */ a(J, { children: e && e[0] && /* @__PURE__ */ a(
|
|
233
233
|
"path",
|
|
234
234
|
{
|
|
@@ -237,7 +237,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
237
237
|
fillOpacity: 0.4
|
|
238
238
|
}
|
|
239
239
|
) });
|
|
240
|
-
},
|
|
240
|
+
}, Xe = ({ series: e, xScale: t, yScale: r, innerHeight: l, innerWidth: n }) => {
|
|
241
241
|
const i = [0, n], c = ot().x((o, b) => b === 0 ? -10 : o).y((o) => r(0));
|
|
242
242
|
return /* @__PURE__ */ a(nt, { children: /* @__PURE__ */ a(
|
|
243
243
|
"path",
|
|
@@ -249,78 +249,78 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
249
249
|
}
|
|
250
250
|
) });
|
|
251
251
|
}, D = ["grid", "axes", "lines", "legends"];
|
|
252
|
-
|
|
252
|
+
ke && D.push(Qe), Ie && (D.push("points"), D.push("mesh")), Me && D.push(Xe);
|
|
253
253
|
let M = [];
|
|
254
|
-
_(
|
|
254
|
+
_(d.data).forEach((e) => {
|
|
255
255
|
e.data && (M = [...M, ...e.data.map((t) => t.y)]);
|
|
256
256
|
});
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
257
|
+
const Pe = () => {
|
|
258
|
+
if (q === "stacked") {
|
|
259
259
|
const e = [];
|
|
260
|
-
_(
|
|
260
|
+
_(d.data).forEach((l) => {
|
|
261
261
|
e.push(...l.data);
|
|
262
262
|
});
|
|
263
263
|
const r = [];
|
|
264
264
|
e.forEach((l) => {
|
|
265
265
|
r.indexOf(l.x) == -1 && r.push(l.x);
|
|
266
|
-
}),
|
|
266
|
+
}), u = Math.max(
|
|
267
267
|
...r.map((l) => e.filter((n) => n.x == l).map((n) => n.y).reduce((n, i) => Math.max(n + i, n + 0)))
|
|
268
|
-
),
|
|
268
|
+
), f = Math.min(
|
|
269
269
|
...r.map((l) => e.filter((n) => n.x == l).map((n) => n.y).reduce((n, i) => Math.min(n - i, i - n)))
|
|
270
270
|
);
|
|
271
271
|
} else
|
|
272
|
-
M.length > 0 && (
|
|
273
|
-
return
|
|
272
|
+
M.length > 0 && (u = Math.max(...M), f = Math.min(...M));
|
|
273
|
+
return u = u < 0 ? u * 0.9 : u * 1.1, f = f > 0 ? f * 0.9 : f * 1.1, { min: f, max: u };
|
|
274
274
|
};
|
|
275
|
-
let
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
top:
|
|
280
|
-
right:
|
|
281
|
-
bottom:
|
|
282
|
-
left:
|
|
275
|
+
let f = "auto", u = "auto";
|
|
276
|
+
const B = Pe();
|
|
277
|
+
Le == "fixed" ? (f = H != null && H != "" ? H : B.min, u = R != null && R != "" ? R : B.max) : (f = B.min, u = B.max);
|
|
278
|
+
const de = () => /* @__PURE__ */ a(J, { children: P && C && /* @__PURE__ */ a("div", { className: "legend item", children: /* @__PURE__ */ a("label", { className: "legend-title", children: C }) }) }), Ce = {
|
|
279
|
+
top: ie,
|
|
280
|
+
right: Ee,
|
|
281
|
+
bottom: oe,
|
|
282
|
+
left: ve
|
|
283
283
|
};
|
|
284
|
-
let Y = parseInt(
|
|
285
|
-
const et =
|
|
284
|
+
let Y = parseInt(We);
|
|
285
|
+
const et = d.data && ((pe = (ue = d.data) == null ? void 0 : ue.filter((e) => {
|
|
286
286
|
var t;
|
|
287
287
|
return ((t = e == null ? void 0 : e.data) == null ? void 0 : t.length) > 0;
|
|
288
|
-
})) == null ? void 0 :
|
|
288
|
+
})) == null ? void 0 : pe.length), he = [];
|
|
289
289
|
if (F || W) {
|
|
290
290
|
Y = Number.parseInt(s.yAxisTickValues);
|
|
291
|
-
const e = new Map(Object.entries(((
|
|
291
|
+
const e = new Map(Object.entries(((xe = s == null ? void 0 : s.labels) == null ? void 0 : xe.xAxis) ?? {}));
|
|
292
292
|
for (const [t, r] of e)
|
|
293
|
-
r ||
|
|
293
|
+
r || he.push(t);
|
|
294
294
|
}
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
let e = _(
|
|
298
|
-
return /* @__PURE__ */ v("div", { style: { height:
|
|
295
|
+
const fe = _(d.data), tt = ["grid", "axes", "legends"];
|
|
296
|
+
if (d != null && d.data && et > 0) {
|
|
297
|
+
let e = _(d.data);
|
|
298
|
+
return /* @__PURE__ */ v("div", { style: { height: Te }, children: [
|
|
299
299
|
/* @__PURE__ */ a(
|
|
300
300
|
lt,
|
|
301
301
|
{
|
|
302
|
-
curve:
|
|
303
|
-
data:
|
|
302
|
+
curve: Re,
|
|
303
|
+
data: fe,
|
|
304
304
|
margin: Ce,
|
|
305
305
|
xScale: { type: "point" },
|
|
306
306
|
yScale: {
|
|
307
307
|
type: "linear",
|
|
308
|
-
min:
|
|
309
|
-
max:
|
|
310
|
-
stacked:
|
|
308
|
+
min: f,
|
|
309
|
+
max: u,
|
|
310
|
+
stacked: q == "stacked",
|
|
311
311
|
reverse: !1,
|
|
312
|
-
clamp:
|
|
312
|
+
clamp: Ae
|
|
313
313
|
},
|
|
314
|
-
layers:
|
|
314
|
+
layers: fe.length === 0 ? tt : D,
|
|
315
315
|
axisTop: null,
|
|
316
|
-
axisRight:
|
|
316
|
+
axisRight: $e ? {
|
|
317
317
|
tickSize: 5,
|
|
318
318
|
tickValues: Y,
|
|
319
319
|
tickPadding: 5,
|
|
320
320
|
tickRotation: 0,
|
|
321
321
|
legend: N.right,
|
|
322
322
|
legendPosition: "middle",
|
|
323
|
-
legendOffset: parseInt(
|
|
323
|
+
legendOffset: parseInt(Be),
|
|
324
324
|
format: (t) => {
|
|
325
325
|
const r = L || E;
|
|
326
326
|
return I.formatNumber(
|
|
@@ -331,9 +331,9 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
333
|
} : null,
|
|
334
|
-
enableGridY:
|
|
335
|
-
enableGridX:
|
|
336
|
-
enablePointLabel:
|
|
334
|
+
enableGridY: ze,
|
|
335
|
+
enableGridX: _e,
|
|
336
|
+
enablePointLabel: Ne === "top",
|
|
337
337
|
pointLabel: (t) => I.formatNumber(
|
|
338
338
|
E.style === "percent" ? t.yFormatted / 100 : t.yFormatted,
|
|
339
339
|
E
|
|
@@ -341,10 +341,10 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
341
341
|
lineWidth: 3,
|
|
342
342
|
colors: (t) => ee.getColor(t.id, t),
|
|
343
343
|
axisBottom: (F || W) && (s == null ? void 0 : s.xAxisDisabled) === !0 ? null : {
|
|
344
|
-
renderTick:
|
|
344
|
+
renderTick: qe,
|
|
345
345
|
legend: N.bottom,
|
|
346
346
|
legendPosition: "middle",
|
|
347
|
-
legendOffset: Number.parseInt(
|
|
347
|
+
legendOffset: Number.parseInt(Fe)
|
|
348
348
|
},
|
|
349
349
|
axisLeft: {
|
|
350
350
|
tickSize: 5,
|
|
@@ -353,7 +353,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
353
353
|
tickRotation: 0,
|
|
354
354
|
legend: N.left,
|
|
355
355
|
legendPosition: "middle",
|
|
356
|
-
legendOffset: Number.parseInt(
|
|
356
|
+
legendOffset: Number.parseInt(Oe),
|
|
357
357
|
format: (t) => {
|
|
358
358
|
const r = L || E;
|
|
359
359
|
return I.formatNumber(
|
|
@@ -364,14 +364,14 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
364
364
|
);
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
|
-
tooltip: (t) =>
|
|
367
|
+
tooltip: (t) => ge && k && k.trim().length > 0 ? /* @__PURE__ */ a(
|
|
368
368
|
it,
|
|
369
369
|
{
|
|
370
370
|
intl: I,
|
|
371
371
|
format: E,
|
|
372
372
|
d: t,
|
|
373
|
-
tooltip:
|
|
374
|
-
tooltipEnableMarkdown:
|
|
373
|
+
tooltip: k,
|
|
374
|
+
tooltipEnableMarkdown: we
|
|
375
375
|
}
|
|
376
376
|
) : null,
|
|
377
377
|
pointSize: 10,
|
|
@@ -381,33 +381,34 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
|
|
|
381
381
|
},
|
|
382
382
|
/* @__PURE__ */ new Date()
|
|
383
383
|
),
|
|
384
|
-
(
|
|
384
|
+
(h === "top" || h === "bottom") && /* @__PURE__ */ a(
|
|
385
385
|
"div",
|
|
386
386
|
{
|
|
387
|
-
className: `legends container has-standard-12-font-size ${
|
|
387
|
+
className: `legends container has-standard-12-font-size ${h}`,
|
|
388
|
+
style: h === "top" ? { marginTop: `${ie}px` } : h === "bottom" ? { marginBottom: `${oe}px` } : {},
|
|
388
389
|
children: /* @__PURE__ */ v("div", { className: "legend-sections", children: [
|
|
389
|
-
/* @__PURE__ */ a("div", { className: "title-section", children:
|
|
390
|
+
/* @__PURE__ */ a("div", { className: "title-section", children: de() }),
|
|
390
391
|
/* @__PURE__ */ a(
|
|
391
|
-
|
|
392
|
+
dt,
|
|
392
393
|
{
|
|
393
394
|
onWrapChange: (t) => {
|
|
394
|
-
|
|
395
|
+
h === "top" ? (Ge(Q + t / 2 * 40), ce(t)) : (Ye(X + t / 2 * 25), ce(t));
|
|
395
396
|
},
|
|
396
397
|
className: "legends container has-standard-12-font-size items-section",
|
|
397
|
-
children:
|
|
398
|
+
children: me()
|
|
398
399
|
}
|
|
399
400
|
)
|
|
400
401
|
] })
|
|
401
402
|
}
|
|
402
403
|
),
|
|
403
|
-
(
|
|
404
|
+
(h === "right" || h === "left") && /* @__PURE__ */ v(
|
|
404
405
|
"div",
|
|
405
406
|
{
|
|
406
|
-
className: `legends container has-standard-12-font-size ${
|
|
407
|
-
style:
|
|
407
|
+
className: `legends container has-standard-12-font-size ${h}`,
|
|
408
|
+
style: h === "right" ? Ke : Ve,
|
|
408
409
|
children: [
|
|
409
|
-
|
|
410
|
-
|
|
410
|
+
de(),
|
|
411
|
+
me()
|
|
411
412
|
]
|
|
412
413
|
}
|
|
413
414
|
)
|