@devgateway/dvz-ui-react 1.1.1 → 1.2.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.
Files changed (34) hide show
  1. package/dist/cjs/embeddable/big-number/index.js +1 -1
  2. package/dist/cjs/embeddable/chart/Bar.js +1 -1
  3. package/dist/cjs/embeddable/chart/index.js +1 -1
  4. package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
  5. package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
  6. package/dist/cjs/embeddable/d3Map/FlowLayer.js +1 -1
  7. package/dist/cjs/embeddable/d3Map/ZoomControl.js +1 -1
  8. package/dist/cjs/embeddable/d3Map/index.js +1 -1
  9. package/dist/cjs/embeddable/posts-with-filters/DropDownFilter.js +1 -0
  10. package/dist/cjs/embeddable/posts-with-filters/Post.js +1 -1
  11. package/dist/cjs/embeddable/posts-with-filters/index.js +1 -1
  12. package/dist/cjs/embeddable/reducers/data-api.js +1 -1
  13. package/dist/cjs/layout/containers/SlugPostContainer.js +1 -1
  14. package/dist/cjs/styles.css +1 -1
  15. package/dist/esm/embeddable/big-number/index.js +92 -85
  16. package/dist/esm/embeddable/chart/Bar.js +128 -123
  17. package/dist/esm/embeddable/chart/index.js +229 -225
  18. package/dist/esm/embeddable/d3Map/BaseLayer.js +40 -27
  19. package/dist/esm/embeddable/d3Map/DataLayer.js +196 -204
  20. package/dist/esm/embeddable/d3Map/FlowLayer.js +104 -101
  21. package/dist/esm/embeddable/d3Map/ZoomControl.js +64 -54
  22. package/dist/esm/embeddable/d3Map/index.js +110 -99
  23. package/dist/esm/embeddable/posts-with-filters/DropDownFilter.js +25 -0
  24. package/dist/esm/embeddable/posts-with-filters/Post.js +49 -24
  25. package/dist/esm/embeddable/posts-with-filters/index.js +120 -119
  26. package/dist/esm/embeddable/reducers/data-api.js +13 -11
  27. package/dist/esm/layout/containers/SlugPostContainer.js +3 -3
  28. package/dist/esm/styles.css +1 -1
  29. package/dist/types/embeddable/chart/Bar.d.ts +2 -0
  30. package/dist/types/embeddable/d3Map/BaseLayer.d.ts +1 -0
  31. package/dist/types/embeddable/d3Map/ZoomControl.d.ts +2 -1
  32. package/dist/types/embeddable/posts-with-filters/DropDownFilter.d.ts +4 -0
  33. package/dist/types/embeddable/posts-with-filters/Post.d.ts +4 -2
  34. package/package.json +4 -2
@@ -1,47 +1,47 @@
1
1
  import { jsx as s, jsxs as p, Fragment as ye } from "react/jsx-runtime";
2
- import { useState as _, useEffect as Ht, Fragment as He } from "react";
3
- import Tt from "./Tooltip.js";
4
- import { ResponsiveBar as _t } from "@nivo/bar";
5
- import { injectIntl as At } from "react-intl";
6
- import { useTheme as St } from "@nivo/theming";
7
- import { line as Te } from "d3-shape";
8
- import _e from "./LineLayer.js";
9
- import Ae from "papaparse";
10
- import jt from "../../layout/FlexWrapDetector.js";
2
+ import { useState as _, useEffect as At, Fragment as Te } from "react";
3
+ import St from "./Tooltip.js";
4
+ import { ResponsiveBar as jt } from "@nivo/bar";
5
+ import { injectIntl as Rt } from "react-intl";
6
+ import { useTheme as Pt } from "@nivo/theming";
7
+ import { line as _e } from "d3-shape";
8
+ import Ae from "./LineLayer.js";
9
+ import Se from "papaparse";
10
+ import Yt from "../../layout/FlexWrapDetector.js";
11
11
  import xe from "../../utils/deviceType.js";
12
- const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q = "_Color", Kt = ({
12
+ const Kt = "middle", Xt = "top", q = "#66676d", je = "#dddddd", Zt = "none", Q = "_Color", Ct = ({
13
13
  editing: y,
14
14
  legends: Y,
15
- marginLeft: je,
15
+ marginLeft: Re,
16
16
  marginTop: pe,
17
- marginRight: Re,
17
+ marginRight: Pe,
18
18
  marginBottom: be,
19
19
  options: o,
20
20
  intl: g,
21
21
  format: b,
22
22
  colors: V,
23
23
  groupMode: M,
24
- height: Pe,
24
+ height: Ye,
25
25
  showLegends: G,
26
26
  legendPosition: w,
27
27
  tickRotation: B,
28
28
  offsetText: ee,
29
29
  tickColor: te,
30
30
  layout: f,
31
- reverse: W,
32
- offsetY: Ye,
31
+ reverse: H,
32
+ offsetY: Ke,
33
33
  csvLineLayerData: ge,
34
34
  tooltip: ae,
35
35
  lineLayerEnabled: ve,
36
36
  overlays: K,
37
37
  maxValue: A,
38
- valueScale: Ke,
38
+ valueScale: Xe,
39
39
  colorGenerator: v,
40
40
  legendLabel: Ne,
41
- overrideTickColor: Xe,
41
+ overrideTickColor: Ze,
42
42
  fixedMinValue: ne,
43
43
  fixedMaxValue: S,
44
- barPadding: Ze,
44
+ barPadding: Ce,
45
45
  barLabelPosition: Ie,
46
46
  barInnerPadding: Je,
47
47
  tooltipEnabled: Ue,
@@ -52,35 +52,37 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
52
52
  legendLabelColor: re,
53
53
  highlightXAxisLine: qe,
54
54
  showTickLine: j,
55
- showRightAxis: Ce,
56
- offsetRight: Qe,
55
+ showRightAxis: Qe,
56
+ offsetRight: Ge,
57
57
  offsetBottom: Le,
58
58
  confidenceIntervals: ie,
59
- showGroupTotal: Ge,
59
+ showGroupTotal: et,
60
60
  groupTotalLabel: ke,
61
61
  groupTotalFormat: we,
62
62
  groupTotalMeasure: De,
63
63
  groupTotalOffset: z,
64
64
  groupTotalFixedPosition: Z,
65
- tooltipEnableMarkdown: et,
66
- xAxisTickValues: tt,
67
- yAxisTickValues: at,
68
- mobileCustomization: nt,
69
- minMaxClamp: lt,
70
- reverseLegend: rt,
71
- enableGridY: it,
72
- enableGridX: st,
65
+ tooltipEnableMarkdown: tt,
66
+ xAxisTickValues: at,
67
+ yAxisTickValues: nt,
68
+ mobileCustomization: lt,
69
+ minMaxClamp: rt,
70
+ reverseLegend: it,
71
+ enableGridY: st,
72
+ enableGridX: ct,
73
73
  customAxisFormat: F,
74
- previewMode: $
74
+ previewMode: $,
75
+ showLegendsInColumns: dt = !1,
76
+ numberOfLegendColumns: ht = 4
75
77
  }) => {
76
78
  var We;
77
- const ct = ["mobile", "tablet", "midTablet"].includes(
79
+ const mt = ["mobile", "tablet", "midTablet"].includes(
78
80
  xe()
79
- ), J = ["tablet", "midTablet"].includes(xe()), U = xe() === "mobile", se = 30, ce = 15, h = JSON.parse(decodeURIComponent(nt)), Fe = ct && ((h == null ? void 0 : h.showCustomization) ?? !1), H = Fe && $ !== "Desktop", T = !y && Fe, de = () => X === "null" || X === null || !X ? "#000000" : X, [I, dt] = _([]), { colorBy: R } = V, Oe = {};
81
+ ), C = ["tablet", "midTablet"].includes(xe()), J = xe() === "mobile", se = 30, ce = 15, h = JSON.parse(decodeURIComponent(lt)), Fe = mt && ((h == null ? void 0 : h.showCustomization) ?? !1), W = Fe && $ !== "Desktop", T = !y && Fe, de = () => X === "null" || X === null || !X ? "#000000" : X, [I, ot] = _([]), { colorBy: R } = V, Oe = {};
80
82
  K.forEach((e, t) => {
81
83
  Oe[t] = !0;
82
84
  });
83
- const [L, ht] = _(Oe), [Me, mt] = _(50), [ot, ut] = _(pe), [Xt, Be] = _(0), [ft, yt] = _(be), P = ((e, t, c, n, r) => {
85
+ const [L, ut] = _(Oe), [Me, ft] = _(50), [yt, xt] = _(pe), [Jt, Be] = _(0), [ze, pt] = _(be), P = ((e, t, c, n, r) => {
84
86
  let i = [];
85
87
  return e.data && (i = t.colorBy === "index" ? e.data.map((l) => {
86
88
  let a, m = !0;
@@ -103,14 +105,14 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
103
105
  o,
104
106
  V,
105
107
  I,
106
- Yt,
108
+ Zt,
107
109
  v
108
- ), ze = () => (rt && P.reverse(), /* @__PURE__ */ p(ye, { children: [
110
+ ), $e = () => (it && P.reverse(), /* @__PURE__ */ p(ye, { children: [
109
111
  G && P.map((e) => /* @__PURE__ */ p(
110
112
  "div",
111
113
  {
112
114
  className: `legend item ${e.enabled ? "" : "ignore"}`,
113
- onClick: () => wt(e.id),
115
+ onClick: () => Ft(e.id),
114
116
  children: [
115
117
  N && /* @__PURE__ */ s(
116
118
  "input",
@@ -209,7 +211,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
209
211
  }
210
212
  ) })
211
213
  ] }),
212
- G && ve && K.map((e, t) => /* @__PURE__ */ p("div", { className: "legend item", onClick: () => Dt(t), children: [
214
+ G && ve && K.map((e, t) => /* @__PURE__ */ p("div", { className: "legend item", onClick: () => Ot(t), children: [
213
215
  /* @__PURE__ */ s(
214
216
  "input",
215
217
  {
@@ -244,24 +246,24 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
244
246
  )
245
247
  ] }))
246
248
  ] }));
247
- Ht(() => {
249
+ At(() => {
248
250
  (() => {
249
251
  const c = 5 * Math.max(P.length - 5, 0);
250
- mt(c);
252
+ ft(c);
251
253
  })();
252
254
  }, [P]);
253
- const xt = {
255
+ const bt = {
254
256
  bottom: `-${Me}px`
255
- }, pt = {
257
+ }, gt = {
256
258
  bottom: `-${Me}px`,
257
259
  gap: "0px"
258
260
  // top: "0px",
259
- }, bt = (e) => he(e, "1 0", Se, "Y"), gt = (e) => he(e, "4 4", C, "X"), vt = (e) => he(e, "1 0", Se, "X"), Nt = (e) => {
261
+ }, vt = (e) => he(e, "1 0", je, "Y"), Nt = (e) => he(e, "4 4", q, "X"), It = (e) => he(e, "1 0", je, "X"), Lt = (e) => {
260
262
  const t = P.find((c) => c.id === e.value);
261
263
  return t ? t.color : "#FFFFFF";
262
- }, It = (e) => {
264
+ }, kt = (e) => {
263
265
  const { yScale: t, bars: c } = e;
264
- return /* @__PURE__ */ s(He, { children: c.filter((n) => n.data.value != null).map((n) => {
266
+ return /* @__PURE__ */ s(Te, { children: c.filter((n) => n.data.value != null).map((n) => {
265
267
  let r = n.data.indexValue;
266
268
  o.dimensionsMetadata && o.dimensionsMetadata.size > 1 && (r = n.data.id);
267
269
  const i = ie.filter(
@@ -278,7 +280,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
278
280
  x1: n.x + n.width / 2,
279
281
  x2: n.x + n.width / 2,
280
282
  strokeWidth: 1,
281
- stroke: C
283
+ stroke: q
282
284
  }
283
285
  ),
284
286
  /* @__PURE__ */ s(
@@ -289,7 +291,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
289
291
  x1: n.x + n.width / 2 - 3,
290
292
  x2: n.x + n.width / 2 + 3,
291
293
  strokeWidth: 1,
292
- stroke: C
294
+ stroke: q
293
295
  }
294
296
  ),
295
297
  /* @__PURE__ */ s(
@@ -300,7 +302,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
300
302
  x1: n.x + n.width / 2 - 3,
301
303
  x2: n.x + n.width / 2 + 3,
302
304
  strokeWidth: 1,
303
- stroke: C
305
+ stroke: q
304
306
  }
305
307
  )
306
308
  ] });
@@ -309,7 +311,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
309
311
  }, he = (e, t, c, n) => {
310
312
  const { yScale: r, innerWidth: i, innerHeight: l } = e;
311
313
  let a, m;
312
- return n == "X" ? (a = [0, i], m = Te().x((u, E) => E === 0 ? -10 : u).y(() => r(0))) : (a = [0, l], m = Te().x(() => 0).y((u) => u)), /* @__PURE__ */ s(He, { children: /* @__PURE__ */ s(
314
+ return n == "X" ? (a = [0, i], m = _e().x((u, E) => E === 0 ? -10 : u).y(() => r(0))) : (a = [0, l], m = _e().x(() => 0).y((u) => u)), /* @__PURE__ */ s(Te, { children: /* @__PURE__ */ s(
313
315
  "path",
314
316
  {
315
317
  d: m(a),
@@ -318,24 +320,24 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
318
320
  style: { pointerEvents: "none", strokeDasharray: t }
319
321
  }
320
322
  ) });
321
- }, O = (e, t) => I ? (V.colorBy === "index" || V.colorBy === "id" || V.colorBy === "values") && !t ? e.filter((c) => I.indexOf(c[o.indexBy]) === -1) : e ? e.filter((c) => I.indexOf(c) === -1) : [] : e, Lt = (e) => {
322
- const t = St();
323
+ }, O = (e, t) => I ? (V.colorBy === "index" || V.colorBy === "id" || V.colorBy === "values") && !t ? e.filter((c) => I.indexOf(c[o.indexBy]) === -1) : e ? e.filter((c) => I.indexOf(c) === -1) : [] : e, wt = (e) => {
324
+ const t = Pt();
323
325
  if (!e.value) return "";
324
326
  const c = Object.assign({}, e);
325
- (T || H) && fe.includes(String(c.value)) && (c.value = "");
327
+ (T || W) && fe.includes(String(c.value)) && (c.value = "");
326
328
  let n;
327
- Xe ? n = te : n = Nt(e);
329
+ Ze ? n = te : n = Lt(e);
328
330
  let r = [], i = "";
329
- if (H || T) {
331
+ if (W || T) {
330
332
  const a = String(c.value).split(" ");
331
333
  let m = 25;
332
- y && $ === "Mobile" || U && !y ? m = (h == null ? void 0 : h.mobileMaxTickLength) ?? 25 : y && $ === "Tablet" || J && !y ? m = (h == null ? void 0 : h.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (m = 15), a.forEach((u) => {
334
+ y && $ === "Mobile" || J && !y ? m = (h == null ? void 0 : h.mobileMaxTickLength) ?? 25 : y && $ === "Tablet" || C && !y ? m = (h == null ? void 0 : h.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (m = 15), a.forEach((u) => {
333
335
  i.length + String(u).length <= m ? i += (i ? " " : "") + u : (r.push(i), i = u);
334
336
  }), i && r.push(i);
335
337
  } else
336
338
  r = [c.value];
337
339
  let l = 12;
338
- return U ? l = (h == null ? void 0 : h.mobileYAxisLineHeight) ?? 12 : J && (l = (h == null ? void 0 : h.tabletYAxisLineHeight) ?? 12), B > 0 && B < 180 ? /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
340
+ return J ? l = (h == null ? void 0 : h.mobileYAxisLineHeight) ?? 12 : C && (l = (h == null ? void 0 : h.tabletYAxisLineHeight) ?? 12), B > 0 && B < 180 ? /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
339
341
  j && /* @__PURE__ */ s(
340
342
  "line",
341
343
  {
@@ -417,8 +419,8 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
417
419
  m
418
420
  )) })
419
421
  ] });
420
- }, kt = (e) => {
421
- if (!e.value || (H || T) && fe.includes(String(e.value)))
422
+ }, Dt = (e) => {
423
+ if (!e.value || (W || T) && fe.includes(String(e.value)))
422
424
  return "";
423
425
  let t = e.value;
424
426
  if (f === "vertical") {
@@ -431,14 +433,14 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
431
433
  );
432
434
  }
433
435
  let c = 25;
434
- y && $ === "Mobile" || U && !y ? c = (h == null ? void 0 : h.mobileMaxTickLength) ?? 25 : y && $ === "Tablet" || J && !y ? c = (h == null ? void 0 : h.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (c = 15);
436
+ y && $ === "Mobile" || J && !y ? c = (h == null ? void 0 : h.mobileMaxTickLength) ?? 25 : y && $ === "Tablet" || C && !y ? c = (h == null ? void 0 : h.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (c = 15);
435
437
  const n = typeof t == "string" ? t.split(" ") : [t], r = [];
436
438
  let i = "";
437
439
  n.forEach((a) => {
438
440
  i.length + String(a).length <= c ? i += (i ? " " : "") + a : (r.push(i), i = a);
439
441
  }), i && r.push(i);
440
442
  let l = 12;
441
- return y && $ === "Mobile" || U && !y ? l = (h == null ? void 0 : h.mobileYAxisLineHeight) ?? 12 : (y && $ === "Tablet" || J && !y) && (l = (h == null ? void 0 : h.tabletYAxisLineHeight) ?? 12), /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y})`, children: [
443
+ return y && $ === "Mobile" || J && !y ? l = (h == null ? void 0 : h.mobileYAxisLineHeight) ?? 12 : (y && $ === "Tablet" || C && !y) && (l = (h == null ? void 0 : h.tabletYAxisLineHeight) ?? 12), /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y})`, children: [
442
444
  /* @__PURE__ */ s("line", { x1: -5, x2: 0, y1: 0, y2: 0, stroke: "#000", strokeWidth: 1 }),
443
445
  r.map((a, m) => /* @__PURE__ */ s(
444
446
  "text",
@@ -457,18 +459,18 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
457
459
  a
458
460
  ))
459
461
  ] });
460
- }, wt = (e) => {
462
+ }, Ft = (e) => {
461
463
  const t = I.slice();
462
464
  if (t.indexOf(e) > -1) {
463
465
  const c = t.indexOf(e);
464
466
  t.splice(c, 1);
465
467
  } else
466
468
  t.push(e);
467
- dt(t);
468
- }, Dt = (e) => {
469
+ ot(t);
470
+ }, Ot = (e) => {
469
471
  const t = Object.assign({}, L);
470
- t[e] = !t[e], ht(t);
471
- }, Ft = ({ bars: e }) => /* @__PURE__ */ s("g", { children: e.map((t) => {
472
+ t[e] = !t[e], ut(t);
473
+ }, Mt = ({ bars: e }) => /* @__PURE__ */ s("g", { children: e.map((t) => {
472
474
  const { width: c, height: n, y: r, x: i, data: l } = t;
473
475
  if (f === "horizontal" && n <= ce || f === "vertical" && c <= se)
474
476
  return;
@@ -487,19 +489,19 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
487
489
  children: `${a}`
488
490
  }
489
491
  );
490
- }) }), Ot = (e) => {
492
+ }) }), Bt = (e) => {
491
493
  const t = o.data.filter((n) => I.indexOf(n[o.indexBy]) == -1).map((n) => n[o.indexBy]), { bars: c } = e;
492
494
  return /* @__PURE__ */ s("g", { children: t.filter(
493
495
  (n) => c.filter((r) => r.data.indexValue == n).length > 0
494
496
  ).map((n) => {
495
- var q;
497
+ var U;
496
498
  const r = c.filter((d) => d.data.indexValue == n);
497
499
  let i = "right", l = 0, a = 0;
498
500
  if (f == "horizontal")
499
- M === "stacked" ? (Z ? l = e.innerWidth - 20 : (l = r.map((d) => d.width).reduce((d, x) => d + x), W && (l = e.innerWidth - l)), a = e.yScale(n) + r[0].height / 2) : (Z ? l = e.innerWidth : (l = r.map((d) => d.width).reduce((d, x) => d > x ? d : x), W && (l = e.innerWidth - l)), a = e.yScale(n) + r.map((d) => d.height).reduce((d, x) => d + x) / 2), l = l + parseInt(z) + 5;
501
+ M === "stacked" ? (Z ? l = e.innerWidth - 20 : (l = r.map((d) => d.width).reduce((d, x) => d + x), H && (l = e.innerWidth - l)), a = e.yScale(n) + r[0].height / 2) : (Z ? l = e.innerWidth : (l = r.map((d) => d.width).reduce((d, x) => d > x ? d : x), H && (l = e.innerWidth - l)), a = e.yScale(n) + r.map((d) => d.height).reduce((d, x) => d + x) / 2), l = l + parseInt(z) + 5;
500
502
  else if (i = "middle", M === "stacked")
501
- l = e.xScale(n) + r[0].width / 2, Z ? a = a - parseInt(z) : W ? a = parseInt(z) + r.map((d) => d.height).reduce((d, x) => d + x) + 14 : a = e.innerHeight - parseInt(z) - r.map((d) => d.height).reduce((d, x) => d + x) - 5;
502
- else if (l = e.xScale(n) + r.map((d) => d.width).reduce((d, x) => d + x) / 2, W && (a = e.innerHeight), Z)
503
+ l = e.xScale(n) + r[0].width / 2, Z ? a = a - parseInt(z) : H ? a = parseInt(z) + r.map((d) => d.height).reduce((d, x) => d + x) + 14 : a = e.innerHeight - parseInt(z) - r.map((d) => d.height).reduce((d, x) => d + x) - 5;
504
+ else if (l = e.xScale(n) + r.map((d) => d.width).reduce((d, x) => d + x) / 2, H && (a = e.innerHeight), Z)
503
505
  a = a - parseInt(z);
504
506
  else {
505
507
  if (r.length % 2 == 1) {
@@ -512,13 +514,13 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
512
514
  r[d - 1].height
513
515
  );
514
516
  }
515
- W ? a = a + 14 + parseInt(z) : a = e.innerHeight - a - parseInt(z) - 5;
517
+ H ? a = a + 14 + parseInt(z) : a = e.innerHeight - a - parseInt(z) - 5;
516
518
  }
517
519
  const m = o.data.filter(
518
520
  (d) => d[o.indexBy] === n
519
521
  )[0];
520
522
  let u = m.parent_variables ? m.parent_variables[De] : m[De];
521
- const E = R !== "index" ? (q = I == null ? void 0 : I.map((d) => m[d])) == null ? void 0 : q.reduce((d, x) => d + x, 0) : 0;
523
+ const E = R !== "index" ? (U = I == null ? void 0 : I.map((d) => m[d])) == null ? void 0 : U.reduce((d, x) => d + x, 0) : 0;
522
524
  return u -= E, /* @__PURE__ */ s("text", { y: a, x: l, style: { fill: de() }, children: /* @__PURE__ */ p("tspan", { textAnchor: i, children: [
523
525
  ke ? ke + " " : "",
524
526
  g.formatNumber(
@@ -527,18 +529,18 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
527
529
  )
528
530
  ] }) });
529
531
  }) });
530
- }, Mt = {
531
- top: ot,
532
- right: Re,
533
- bottom: ft,
534
- left: je
532
+ }, zt = {
533
+ top: yt,
534
+ right: Pe,
535
+ bottom: ze,
536
+ left: Re
535
537
  };
536
- let me, oe = 0, $e = 0;
537
- ge && (me = Ae.parse(ge, {
538
+ let me, oe = 0, Ee = 0;
539
+ ge && (me = Se.parse(ge, {
538
540
  header: !1,
539
541
  dynamicTyping: !0
540
- }), oe = Math.max(...me.data.map((e) => e[1])), $e = Math.min(...me.data.map((e) => e[1])));
541
- const Ee = (() => {
542
+ }), oe = Math.max(...me.data.map((e) => e[1])), Ee = Math.min(...me.data.map((e) => e[1])));
543
+ const Ve = (() => {
542
544
  const e = [];
543
545
  if (ie && (ie.forEach((t) => {
544
546
  t.low && e.push(parseFloat(t.low)), t.high && e.push(parseFloat(t.high));
@@ -551,7 +553,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
551
553
  });
552
554
  }
553
555
  return e;
554
- })(), Bt = Math.max(...Ee), zt = Math.min(...Ee), $t = () => {
556
+ })(), $t = Math.max(...Ve), Et = Math.min(...Ve), Vt = () => {
555
557
  const e = O(o.data, !1), t = O(o.keys, !0);
556
558
  if (M === "stacked" && A !== "fixed" || A === "fixed" && S === null || // @ts-ignore
557
559
  S === "") {
@@ -566,23 +568,23 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
566
568
  ) * 1.1;
567
569
  }
568
570
  return A === "fixed" && S !== null && // @ts-ignore
569
- S !== "" ? S : Math.max(oe, Bt) * 1.05;
570
- }, Et = () => {
571
- const e = Math.min($e, zt);
571
+ S !== "" ? S : Math.max(oe, $t) * 1.05;
572
+ }, Ht = () => {
573
+ const e = Math.min(Ee, Et);
572
574
  return A === "fixed" && ne !== null && // @ts-ignore
573
575
  ne !== "" ? ne : e > 0 ? e * 0.9 : e * 1.1;
574
- }, Vt = $t(), Wt = Et(), k = ["grid", "axes", "bars"];
575
- Ge && k.push(Ot), k.push(bt), k.push(vt), ve && K && K.forEach((e, t) => {
576
+ }, Wt = Vt(), Tt = Ht(), k = ["grid", "axes", "bars"];
577
+ et && k.push(Bt), k.push(vt), k.push(It), ve && K && K.forEach((e, t) => {
576
578
  if (L[t] == !0 || L[t] == null) {
577
579
  const { csvLineLayerData: c, lineColor: n, tooltip: r } = e;
578
580
  if (e.app == "csv") {
579
- const i = Ae.parse(c, {
581
+ const i = Se.parse(c, {
580
582
  header: !1,
581
583
  dynamicTyping: !0
582
584
  });
583
585
  if (i.data && i.data.filter((l) => l[1] !== null).length > 0) {
584
586
  i.data = i.data.filter((a) => a[1] !== null);
585
- const l = _e(
587
+ const l = Ae(
586
588
  i,
587
589
  n,
588
590
  f,
@@ -600,7 +602,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
600
602
  u.variables[e.measure[0]]
601
603
  ]), a = o.metadata.measures ? o.metadata.measures.filter((u) => u.value == e.measure[0]) : [];
602
604
  i.data = l;
603
- const m = _e(
605
+ const m = Ae(
604
606
  i,
605
607
  n,
606
608
  f,
@@ -613,46 +615,47 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
613
615
  k.push(m);
614
616
  }
615
617
  }
616
- }), Ie === Pt && k.push(Ft), qe && k.push(gt), k.push(It);
617
- let ue = parseInt(at);
618
- const Ve = () => /* @__PURE__ */ s(ye, { children: G && Ne && /* @__PURE__ */ s("div", { className: "legend item", children: /* @__PURE__ */ s("label", { className: "legend-title", children: Ne }) }) }), fe = [];
619
- if (T || H) {
618
+ }), Ie === Xt && k.push(Mt), qe && k.push(Nt), k.push(kt);
619
+ let ue = parseInt(nt);
620
+ const He = () => /* @__PURE__ */ s(ye, { children: G && Ne && /* @__PURE__ */ s("div", { className: "legend item", children: /* @__PURE__ */ s("label", { className: "legend-title", children: Ne }) }) }), fe = [];
621
+ if (T || W) {
620
622
  ue = Number.parseInt(h.yAxisTickValues);
621
623
  const e = new Map(Object.entries(((We = h == null ? void 0 : h.labels) == null ? void 0 : We.xAxis) ?? {}));
622
624
  for (const [t, c] of e)
623
625
  c || fe.push(t);
624
626
  }
625
- return /* @__PURE__ */ s("div", { style: { height: Pe }, children: (o == null ? void 0 : o.data) && o.data.length > 0 && /* @__PURE__ */ p(ye, { children: [
627
+ let _t = parseInt(Ye + "") - ze;
628
+ return /* @__PURE__ */ s("div", { style: { height: _t + "px" }, className: "bar-chart", children: (o == null ? void 0 : o.data) && o.data.length > 0 && /* @__PURE__ */ p(ye, { children: [
626
629
  /* @__PURE__ */ s(
627
- _t,
630
+ jt,
628
631
  {
629
632
  colorBy: V.colorBy,
630
633
  animate: !0,
631
- enableLabel: Ie == Rt,
634
+ enableLabel: Ie == Kt,
632
635
  ...o,
633
- maxValue: Vt,
634
- minValue: Wt,
636
+ maxValue: Wt,
637
+ minValue: Tt,
635
638
  keys: O(o.keys, !0),
636
639
  data: O(o.data, !1),
637
640
  groupMode: M || "grouped",
638
- margin: Mt,
641
+ margin: zt,
639
642
  innerPadding: Je,
640
643
  valueScale: {
641
- type: Ke,
642
- clamp: A === "fixed" && lt
644
+ type: Xe,
645
+ clamp: A === "fixed" && rt
643
646
  },
644
647
  colors: (e) => e && e.data[Q] ? e.data[Q] : v.getColor(e.id, e.data),
645
648
  borderColor: "#000",
646
- reverse: W,
649
+ reverse: H,
647
650
  axisTop: null,
648
- axisRight: Ce ? {
651
+ axisRight: Qe ? {
649
652
  tickSize: f == "horizontal" && j || f === "vertical" ? 5 : 0,
650
653
  tickPadding: 5,
651
654
  tickRotation: 0,
652
655
  tickValues: ue,
653
656
  legend: Y.right,
654
657
  legendPosition: "middle",
655
- legendOffset: parseInt(Qe),
658
+ legendOffset: parseInt(Ge),
656
659
  format: (e) => {
657
660
  if (!e) return "";
658
661
  if (f == "vertical") {
@@ -667,13 +670,13 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
667
670
  return e;
668
671
  }
669
672
  } : null,
670
- axisBottom: (H || T) && (h == null ? void 0 : h.xAxisDisabled) === !0 ? null : f === "horizontal" ? {
673
+ axisBottom: (W || T) && (h == null ? void 0 : h.xAxisDisabled) === !0 ? null : f === "horizontal" ? {
671
674
  legend: Y.bottom,
672
675
  legendPosition: "middle",
673
676
  legendOffset: parseInt(Le),
674
677
  tickPadding: 5,
675
678
  tickRotation: 0,
676
- tickValues: parseInt(tt),
679
+ tickValues: parseInt(at),
677
680
  format: (e) => {
678
681
  if (!e) return "";
679
682
  if (f == "horizontal") {
@@ -691,7 +694,7 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
691
694
  legend: Y.bottom,
692
695
  legendPosition: "middle",
693
696
  legendOffset: parseInt(Le),
694
- renderTick: Lt
697
+ renderTick: wt
695
698
  },
696
699
  axisLeft: {
697
700
  tickSize: f === "horizontal" && j || f === "vertical" ? 5 : 0,
@@ -700,8 +703,8 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
700
703
  tickValues: ue,
701
704
  legend: Y.left,
702
705
  legendPosition: "middle",
703
- legendOffset: Number.parseInt(Ye),
704
- ...H || T ? { renderTick: kt } : {
706
+ legendOffset: Number.parseInt(Ke),
707
+ ...W || T ? { renderTick: Dt } : {
705
708
  format: (e) => {
706
709
  if (!e) return "";
707
710
  if (f === "vertical") {
@@ -717,12 +720,12 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
717
720
  }
718
721
  }
719
722
  },
720
- enableGridY: it,
721
- enableGridX: st,
723
+ enableGridY: st,
724
+ enableGridX: ct,
722
725
  layout: f,
723
726
  labelSkipWidth: se,
724
727
  labelSkipHeight: ce,
725
- padding: Ze,
728
+ padding: Ce,
726
729
  labelTextColor: de(),
727
730
  label: (e) => g.formatNumber(
728
731
  b.style === "percent" && e.value ? e.value / 100 : e.value,
@@ -736,13 +739,13 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
736
739
  motionStiffness: 130,
737
740
  motionDamping: 15,
738
741
  tooltip: (e) => Ue && ae && ae.trim().length > 0 ? /* @__PURE__ */ s(
739
- Tt,
742
+ St,
740
743
  {
741
744
  intl: g,
742
745
  format: b,
743
746
  d: e,
744
747
  tooltip: ae,
745
- tooltipEnableMarkdown: et
748
+ tooltipEnableMarkdown: tt
746
749
  }
747
750
  ) : null,
748
751
  theme: {
@@ -767,15 +770,17 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
767
770
  {
768
771
  className: `legends container has-standard-12-font-size ${w}`,
769
772
  children: /* @__PURE__ */ p("div", { className: "legend-sections", children: [
770
- /* @__PURE__ */ s("div", { className: "title-section", children: Ve() }),
773
+ /* @__PURE__ */ s("div", { className: "title-section", children: He() }),
771
774
  /* @__PURE__ */ s(
772
- jt,
775
+ Yt,
773
776
  {
774
777
  onWrapChange: (e) => {
775
- w === "top" ? (ut(pe + e / 2 * 40), Be(e)) : (yt(be + e / 2 * 25), Be(e));
778
+ w === "top" ? (xt(pe + e / 2 * 40), Be(e)) : (pt(be + e / 2 * 25), Be(e));
776
779
  },
777
780
  className: "legends container has-standard-12-font-size items-section",
778
- children: ze()
781
+ useColumns: dt,
782
+ numberOfLegendColumns: ht,
783
+ children: $e()
779
784
  }
780
785
  )
781
786
  ] })
@@ -785,15 +790,15 @@ const Rt = "middle", Pt = "top", C = "#66676d", Se = "#dddddd", Yt = "none", Q =
785
790
  "div",
786
791
  {
787
792
  className: `legends container has-standard-12-font-size ${w}`,
788
- style: w === "right" ? xt : pt,
793
+ style: w === "right" ? bt : gt,
789
794
  children: [
790
- Ve(),
791
- ze()
795
+ He(),
796
+ $e()
792
797
  ]
793
798
  }
794
799
  )
795
800
  ] }) });
796
- }, ia = At(Kt);
801
+ }, da = Rt(Ct);
797
802
  export {
798
- ia as default
803
+ da as default
799
804
  };