@devgateway/dvz-ui-react 1.6.0 → 1.6.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.
@@ -1,13 +1,13 @@
1
- import { jsxs as v, jsx as a, Fragment as J } from "react/jsx-runtime";
2
- import { useState as $, useEffect as rt, Fragment as nt } from "react";
3
- import { injectIntl as st } from "react-intl";
4
- import { ResponsiveLine as lt } from "@nivo/line";
5
- import it from "./Tooltip.js";
6
- import { area as ct, line as ot } from "d3-shape";
7
- import { useTheme as mt } from "@nivo/theming";
8
- import dt from "../../layout/FlexWrapDetector.js";
1
+ import { jsxs as v, jsx as r, Fragment as J } from "react/jsx-runtime";
2
+ import { useState as $, useEffect as nt, Fragment as st } from "react";
3
+ import { injectIntl as lt } from "react-intl";
4
+ import { ResponsiveLine as it } from "@nivo/line";
5
+ import ct from "./Tooltip.js";
6
+ import { area as ot, line as mt } from "d3-shape";
7
+ import { useTheme as dt } from "@nivo/theming";
8
+ import ht from "../../layout/FlexWrapDetector.js";
9
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) => {
10
+ const ft = "#66676d", K = "#f0f0f1", ye = ["mobile", "tablet", "midTablet"].includes(V()), be = V() === "mobile", ge = ["tablet", "midTablet"].includes(V()), ut = (m, x) => {
11
11
  const N = document.createElement("canvas").getContext("2d");
12
12
  return N.font = x, N.measureText(m).width;
13
13
  }, pt = ({
@@ -16,65 +16,65 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
16
16
  app: Z,
17
17
  legends: N,
18
18
  tooltip: k,
19
- tooltipEnabled: ge,
19
+ tooltipEnabled: ve,
20
20
  options: d,
21
21
  intl: I,
22
22
  groupMode: q,
23
23
  reverse: xt,
24
- marginLeft: ve,
25
- lineLabelPosition: Ne,
24
+ marginLeft: Ne,
25
+ lineLabelPosition: Ee,
26
26
  marginTop: Q,
27
- marginRight: Ee,
27
+ marginRight: Oe,
28
28
  marginBottom: X,
29
29
  format: E,
30
30
  colors: yt,
31
- offsetY: Oe,
32
- height: Te,
31
+ offsetY: Te,
32
+ height: Me,
33
33
  showLegends: P,
34
34
  legendPosition: h,
35
35
  tickRotation: y,
36
- offsetText: j,
37
- tickColor: w,
36
+ offsetText: B,
37
+ tickColor: j,
38
38
  legendLabel: C,
39
39
  xLabelColor: O,
40
40
  colorGenerator: ee,
41
41
  legendCheckBack: A,
42
42
  legendLabelBack: De,
43
43
  legendLabelColor: te,
44
- highlightXAxisLine: Me,
44
+ highlightXAxisLine: $e,
45
45
  showTickLine: S,
46
- showRightAxis: $e,
46
+ showRightAxis: ke,
47
47
  valueScale: bt,
48
- enableArea: ke,
48
+ enableArea: Ie,
49
49
  areaShadingCriteria: ae,
50
50
  areaLowerBound: re,
51
51
  areaUpperBound: ne,
52
- showPoints: Ie,
53
- maxValue: Le,
52
+ showPoints: Le,
53
+ maxValue: Fe,
54
54
  fixedMinValue: H,
55
55
  fixedMaxValue: R,
56
- offsetBottom: Fe,
57
- yAxisTickValues: We,
58
- enableGridY: ze,
59
- enableGridX: _e,
56
+ offsetBottom: We,
57
+ yAxisTickValues: ze,
58
+ enableGridY: _e,
59
+ enableGridX: we,
60
60
  overrideTickColor: U,
61
61
  offsetRight: Be,
62
62
  selectedMeasures: je,
63
- tooltipEnableMarkdown: we,
64
- minMaxClamp: Ae,
65
- reverseLegend: Se,
63
+ tooltipEnableMarkdown: Ae,
64
+ minMaxClamp: Se,
65
+ reverseLegend: He,
66
66
  customAxisFormat: L,
67
- mobileCustomization: He,
68
- lineCurve: Re,
67
+ mobileCustomization: Re,
68
+ lineCurve: Ue,
69
69
  customLabels: G
70
70
  }) => {
71
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) => ({
72
+ const s = JSON.parse(decodeURIComponent(Re)), se = ye && ((s == null ? void 0 : s.showCustomization) ?? !1), F = se && x !== "Desktop", W = !m && se, [le, Ge] = $(50), [ie, Ye] = $(Q), [gt, ce] = $(0), [oe, Je] = $(X), [T, Ke] = $([]), 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
- })), 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
- /* @__PURE__ */ a(
76
+ })), me = () => (He && z.reverse(), /* @__PURE__ */ r(J, { children: P && z.map((e, t) => /* @__PURE__ */ v("div", { className: "legend item", onClick: () => qe(e.id), children: [
77
+ /* @__PURE__ */ r(
78
78
  "input",
79
79
  {
80
80
  className: "ignore",
@@ -87,7 +87,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
87
87
  }
88
88
  }
89
89
  ),
90
- /* @__PURE__ */ a(
90
+ /* @__PURE__ */ r(
91
91
  "span",
92
92
  {
93
93
  className: A === !0 ? "checkmark-with-bg" : "checkmark",
@@ -96,7 +96,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
96
96
  }
97
97
  }
98
98
  ),
99
- /* @__PURE__ */ a(
99
+ /* @__PURE__ */ r(
100
100
  "label",
101
101
  {
102
102
  style: {
@@ -107,50 +107,50 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
107
107
  }
108
108
  )
109
109
  ] }, t)) }));
110
- rt(() => {
110
+ nt(() => {
111
111
  (() => {
112
- const r = 5 * Math.max(z.length - 5, 0);
113
- Ue(r);
112
+ const a = 5 * Math.max(z.length - 5, 0);
113
+ Ge(a);
114
114
  })();
115
115
  }, [z]);
116
- const Ke = {
116
+ const Ve = {
117
117
  bottom: `-${le}px`
118
- }, Ve = {
118
+ }, Ze = {
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, Ze = (e) => {
122
+ }, _ = (e) => T.length ? e.filter((t) => T.indexOf(t.id) === -1) : e, qe = (e) => {
123
123
  const t = T.slice();
124
124
  if (t.indexOf(e) > -1) {
125
- const r = t.indexOf(e);
126
- t.splice(r, 1);
125
+ const a = t.indexOf(e);
126
+ t.splice(a, 1);
127
127
  } else
128
128
  t.push(e);
129
- Je(t);
130
- }, qe = (e) => {
131
- const t = Object.assign({}, e), r = mt();
129
+ Ke(t);
130
+ }, Qe = (e) => {
131
+ const t = Object.assign({}, e), a = dt();
132
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
- 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) => {
137
+ m && x === "Mobile" || be && !m ? o = (s == null ? void 0 : s.mobileMaxTickLength) ?? 25 : m && x === "Tablet" || ge && !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 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
- S && /* @__PURE__ */ a(
143
+ return m && x === "Mobile" || be && !m ? i = (s == null ? void 0 : s.mobileYAxisLineHeight) ?? 12 : (m && x === "Tablet" || ge && !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
+ S && /* @__PURE__ */ r(
145
145
  "line",
146
146
  {
147
- stroke: U ? w : K,
147
+ stroke: U ? j : 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 + j})`, children: l.map((c, o) => /* @__PURE__ */ a(
153
+ /* @__PURE__ */ r("g", { transform: `translate(0, ${e.y + B})`, children: l.map((c, o) => /* @__PURE__ */ r(
154
154
  "text",
155
155
  {
156
156
  transform: `rotate(${y})`,
@@ -158,7 +158,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
158
158
  y: typeof e.value == "number" ? 0 : o * i,
159
159
  dominantBaseline: "middle",
160
160
  style: {
161
- ...r.axis.ticks.text,
161
+ ...a.axis.ticks.text,
162
162
  fill: O === "null" ? "black" : O,
163
163
  fontSize: "12px",
164
164
  fontFamily: "sans-serif"
@@ -168,23 +168,23 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
168
168
  c
169
169
  )) })
170
170
  ] }) : y > 180 && y < 360 ? /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
171
- S && /* @__PURE__ */ a(
171
+ S && /* @__PURE__ */ r(
172
172
  "line",
173
173
  {
174
- stroke: U ? w : K,
174
+ stroke: U ? j : 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 + j})`, children: /* @__PURE__ */ a(
180
+ /* @__PURE__ */ r("g", { transform: `translate(0, ${e.y + B})`, children: /* @__PURE__ */ r(
181
181
  "text",
182
182
  {
183
183
  transform: `rotate(${y})`,
184
184
  textAnchor: "end",
185
185
  dominantBaseline: "middle",
186
186
  style: {
187
- ...r.axis.ticks.text,
187
+ ...a.axis.ticks.text,
188
188
  fill: O,
189
189
  fontSize: "12px"
190
190
  },
@@ -192,16 +192,16 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
192
192
  }
193
193
  ) })
194
194
  ] }) : /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
195
- S && /* @__PURE__ */ a(
195
+ S && /* @__PURE__ */ r(
196
196
  "line",
197
197
  {
198
- stroke: U ? w : K,
198
+ stroke: U ? j : 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 + j})`, children: l.map((c, o) => /* @__PURE__ */ a(
204
+ /* @__PURE__ */ r("g", { transform: `translate(0, ${e.y + B})`, children: l.map((c, o) => /* @__PURE__ */ r(
205
205
  "text",
206
206
  {
207
207
  transform: `rotate(${y})`,
@@ -209,7 +209,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
209
209
  y: typeof e.value == "number" ? 0 : o * i,
210
210
  dominantBaseline: "middle",
211
211
  style: {
212
- ...r.axis.ticks.text,
212
+ ...a.axis.ticks.text,
213
213
  fill: O === "null" ? "black" : O,
214
214
  fontSize: "12px",
215
215
  fontFamily: "sans-serif"
@@ -219,7 +219,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
219
219
  c
220
220
  )) })
221
221
  ] });
222
- }, Qe = ({ series: e, xScale: t, yScale: r, innerHeight: l }) => {
222
+ }, Xe = ({ series: e, xScale: t, yScale: a, innerHeight: l }) => {
223
223
  const n = e && e.length > 0 ? e[0].color : "#3daff7", i = [];
224
224
  e[0] && e[0].data.forEach((p) => {
225
225
  Z == "csv" ? d.keys.forEach((g) => {
@@ -228,80 +228,80 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
228
228
  i.push({ measure: g, min: p.data.variables[g] });
229
229
  });
230
230
  });
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
- return /* @__PURE__ */ a(J, { children: e && e[0] && /* @__PURE__ */ a(
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, rt = ot().x((p) => t(p.data.x)).y0((p) => a(p.data.variables[o])).y1((p) => a(p.data.variables[b]));
232
+ return /* @__PURE__ */ r(J, { children: e && e[0] && /* @__PURE__ */ r(
233
233
  "path",
234
234
  {
235
- d: at(e[0].data),
235
+ d: rt(e[0].data),
236
236
  fill: n,
237
237
  fillOpacity: 0.4
238
238
  }
239
239
  ) });
240
- }, Xe = ({ series: e, xScale: t, yScale: r, innerHeight: l, innerWidth: n }) => {
241
- const i = [0, n], c = ot().x((o, b) => b === 0 ? -10 : o).y((o) => r(0));
242
- return /* @__PURE__ */ a(nt, { children: /* @__PURE__ */ a(
240
+ }, Pe = ({ series: e, xScale: t, yScale: a, innerHeight: l, innerWidth: n }) => {
241
+ const i = [0, n], c = mt().x((o, b) => b === 0 ? -10 : o).y((o) => a(0));
242
+ return /* @__PURE__ */ r(st, { children: /* @__PURE__ */ r(
243
243
  "path",
244
244
  {
245
245
  d: c(i),
246
246
  fill: "none",
247
- stroke: ht,
247
+ stroke: ft,
248
248
  style: { pointerEvents: "none", strokeDasharray: "4 4" }
249
249
  }
250
250
  ) });
251
- }, D = ["grid", "axes", "lines", "legends"];
252
- ke && D.push(Qe), Ie && (D.push("points"), D.push("mesh")), Me && D.push(Xe);
253
- let M = [];
251
+ }, M = ["grid", "axes", "lines", "legends"];
252
+ Ie && M.push(Xe), Le && (M.push("points"), M.push("mesh")), $e && M.push(Pe);
253
+ let D = [];
254
254
  _(d.data).forEach((e) => {
255
- e.data && (M = [...M, ...e.data.map((t) => t.y)]);
255
+ e.data && (D = [...D, ...e.data.map((t) => t.y)]);
256
256
  });
257
- const Pe = () => {
257
+ const Ce = () => {
258
258
  if (q === "stacked") {
259
259
  const e = [];
260
260
  _(d.data).forEach((l) => {
261
261
  e.push(...l.data);
262
262
  });
263
- const r = [];
263
+ const a = [];
264
264
  e.forEach((l) => {
265
- r.indexOf(l.x) == -1 && r.push(l.x);
265
+ a.indexOf(l.x) == -1 && a.push(l.x);
266
266
  }), u = Math.max(
267
- ...r.map((l) => e.filter((n) => n.x == l).map((n) => n.y).reduce((n, i) => Math.max(n + i, n + 0)))
267
+ ...a.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
- ...r.map((l) => e.filter((n) => n.x == l).map((n) => n.y).reduce((n, i) => Math.min(n - i, i - n)))
269
+ ...a.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 && (u = Math.max(...M), f = Math.min(...M));
272
+ D.length > 0 && (u = Math.max(...D), f = Math.min(...D));
273
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
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 = {
276
+ const w = Ce();
277
+ Fe == "fixed" ? (f = H != null && H != "" ? H : w.min, u = R != null && R != "" ? R : w.max) : (f = w.min, u = w.max);
278
+ const de = () => /* @__PURE__ */ r(J, { children: P && C && /* @__PURE__ */ r("div", { className: "legend item", children: /* @__PURE__ */ r("label", { className: "legend-title", children: C }) }) }), et = {
279
279
  top: ie,
280
- right: Ee,
280
+ right: Oe,
281
281
  bottom: oe,
282
- left: ve
282
+ left: Ne
283
283
  };
284
- let Y = parseInt(We);
285
- const et = d.data && ((pe = (ue = d.data) == null ? void 0 : ue.filter((e) => {
284
+ let Y = parseInt(ze);
285
+ const tt = 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
288
  })) == null ? void 0 : pe.length), he = [];
289
289
  if (F || W) {
290
290
  Y = Number.parseInt(s.yAxisTickValues);
291
291
  const e = new Map(Object.entries(((xe = s == null ? void 0 : s.labels) == null ? void 0 : xe.xAxis) ?? {}));
292
- for (const [t, r] of e)
293
- r || he.push(t);
292
+ for (const [t, a] of e)
293
+ a || he.push(t);
294
294
  }
295
- const fe = _(d.data), tt = ["grid", "axes", "legends"];
296
- if (d != null && d.data && et > 0) {
295
+ const fe = _(d.data), at = ["grid", "axes", "legends"];
296
+ if (d != null && d.data && tt > 0) {
297
297
  let e = _(d.data);
298
- return /* @__PURE__ */ v("div", { style: { height: Te }, children: [
299
- /* @__PURE__ */ a(
300
- lt,
298
+ return /* @__PURE__ */ v("div", { style: { height: Me }, children: [
299
+ /* @__PURE__ */ r(
300
+ it,
301
301
  {
302
- curve: Re,
302
+ curve: Ue,
303
303
  data: fe,
304
- margin: Ce,
304
+ margin: et,
305
305
  xScale: { type: "point" },
306
306
  yScale: {
307
307
  type: "linear",
@@ -309,11 +309,11 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
309
309
  max: u,
310
310
  stacked: q == "stacked",
311
311
  reverse: !1,
312
- clamp: Ae
312
+ clamp: Se
313
313
  },
314
- layers: fe.length === 0 ? tt : D,
314
+ layers: fe.length === 0 ? at : M,
315
315
  axisTop: null,
316
- axisRight: $e ? {
316
+ axisRight: ke ? {
317
317
  tickSize: 5,
318
318
  tickValues: Y,
319
319
  tickPadding: 5,
@@ -322,18 +322,18 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
322
322
  legendPosition: "middle",
323
323
  legendOffset: parseInt(Be),
324
324
  format: (t) => {
325
- const r = L || E;
325
+ const a = L || E;
326
326
  return I.formatNumber(
327
- r.style === "percent" ? t / 100 : t,
327
+ a.style === "percent" ? t / 100 : t,
328
328
  {
329
- ...r
329
+ ...a
330
330
  }
331
331
  );
332
332
  }
333
333
  } : null,
334
- enableGridY: ze,
335
- enableGridX: _e,
336
- enablePointLabel: Ne === "top",
334
+ enableGridY: _e,
335
+ enableGridX: we,
336
+ enablePointLabel: Ee === "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: qe,
344
+ renderTick: Qe,
345
345
  legend: N.bottom,
346
346
  legendPosition: "middle",
347
- legendOffset: Number.parseInt(Fe)
347
+ legendOffset: Number.parseInt(We)
348
348
  },
349
349
  axisLeft: {
350
350
  tickSize: 5,
@@ -353,25 +353,25 @@ 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(Oe),
356
+ legendOffset: Number.parseInt(Te),
357
357
  format: (t) => {
358
- const r = L || E;
358
+ const a = L || E;
359
359
  return I.formatNumber(
360
- r.style === "percent" ? t / 100 : t,
360
+ a.style === "percent" ? t / 100 : t,
361
361
  {
362
- ...r
362
+ ...a
363
363
  }
364
364
  );
365
365
  }
366
366
  },
367
- tooltip: (t) => ge && k && k.trim().length > 0 ? /* @__PURE__ */ a(
368
- it,
367
+ tooltip: (t) => ve && k && k.trim().length > 0 ? /* @__PURE__ */ r(
368
+ ct,
369
369
  {
370
370
  intl: I,
371
371
  format: E,
372
372
  d: t,
373
373
  tooltip: k,
374
- tooltipEnableMarkdown: we
374
+ tooltipEnableMarkdown: Ae
375
375
  }
376
376
  ) : null,
377
377
  pointSize: 10,
@@ -381,18 +381,22 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
381
381
  },
382
382
  /* @__PURE__ */ new Date()
383
383
  ),
384
- (h === "top" || h === "bottom") && /* @__PURE__ */ a(
384
+ (h === "top" || h === "bottom") && /* @__PURE__ */ r(
385
385
  "div",
386
386
  {
387
387
  className: `legends container has-standard-12-font-size ${h}`,
388
- style: h === "top" ? { marginTop: `${ie}px` } : h === "bottom" ? { marginBottom: `${oe}px` } : {},
388
+ style: h === "top" ? { marginTop: ye && `${ie}px` } : h === "bottom" ? { marginBottom: `${oe}px` } : {},
389
389
  children: /* @__PURE__ */ v("div", { className: "legend-sections", children: [
390
- /* @__PURE__ */ a("div", { className: "title-section", children: de() }),
391
- /* @__PURE__ */ a(
392
- dt,
390
+ /* @__PURE__ */ r("div", { className: "title-section", children: de() }),
391
+ /* @__PURE__ */ r(
392
+ ht,
393
393
  {
394
394
  onWrapChange: (t) => {
395
- h === "top" ? (Ge(Q + t / 2 * 40), ce(t)) : (Ye(X + t / 2 * 25), ce(t));
395
+ if (h === "top") {
396
+ const a = Q + t / 2 * 40;
397
+ Ye(a), ce(t);
398
+ } else
399
+ Je(X + t / 2 * 25), ce(t);
396
400
  },
397
401
  className: "legends container has-standard-12-font-size items-section",
398
402
  children: me()
@@ -405,7 +409,7 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
405
409
  "div",
406
410
  {
407
411
  className: `legends container has-standard-12-font-size ${h}`,
408
- style: h === "right" ? Ke : Ve,
412
+ style: h === "right" ? Ve : Ze,
409
413
  children: [
410
414
  de(),
411
415
  me()
@@ -414,8 +418,8 @@ const ht = "#66676d", K = "#f0f0f1", ft = ["mobile", "tablet", "midTablet"].incl
414
418
  )
415
419
  ] });
416
420
  }
417
- return /* @__PURE__ */ a("div", {});
418
- }, It = st(pt);
421
+ return /* @__PURE__ */ r("div", {});
422
+ }, It = lt(pt);
419
423
  export {
420
424
  It as default
421
425
  };