@devgateway/dvz-ui-react 1.9.1 → 1.9.3

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 (38) hide show
  1. package/dist/cjs/embeddable/big-number-trend/BigNumberTrendContainer.js +1 -1
  2. package/dist/cjs/embeddable/chart/Line.js +1 -1
  3. package/dist/cjs/embeddable/data-paragraph/index.js +1 -1
  4. package/dist/cjs/embeddable/filter/index.js +1 -1
  5. package/dist/cjs/embeddable/grouped-bars/GroupedBars.js +1 -1
  6. package/dist/cjs/embeddable/newsletter/index.js +1 -1
  7. package/dist/cjs/embeddable/sankeychart/index.js +1 -1
  8. package/dist/cjs/embeddable/showcase/index.js +1 -1
  9. package/dist/cjs/embeddable/tabbedposts/index.js +1 -1
  10. package/dist/cjs/embeddable/utils/parseUtils.js +1 -1
  11. package/dist/cjs/index.js +1 -1
  12. package/dist/cjs/tracker/InternalTrafficToggle.js +1 -1
  13. package/dist/cjs/tracker/InternalTrafficWatermark.js +1 -1
  14. package/dist/cjs/tracker/index.js +1 -1
  15. package/dist/cjs/tracker/internalTrafficUtils.js +1 -1
  16. package/dist/cjs/tracker/useInternalTrafficBypass.js +1 -1
  17. package/dist/esm/embeddable/big-number-trend/BigNumberTrendContainer.js +79 -79
  18. package/dist/esm/embeddable/chart/Line.js +209 -207
  19. package/dist/esm/embeddable/data-paragraph/index.js +119 -119
  20. package/dist/esm/embeddable/filter/index.js +113 -113
  21. package/dist/esm/embeddable/grouped-bars/GroupedBars.js +320 -316
  22. package/dist/esm/embeddable/newsletter/index.js +35 -38
  23. package/dist/esm/embeddable/sankeychart/index.js +145 -145
  24. package/dist/esm/embeddable/showcase/index.js +27 -27
  25. package/dist/esm/embeddable/tabbedposts/index.js +40 -39
  26. package/dist/esm/embeddable/utils/parseUtils.js +11 -3
  27. package/dist/esm/index.js +74 -73
  28. package/dist/esm/tracker/InternalTrafficToggle.js +30 -20
  29. package/dist/esm/tracker/InternalTrafficWatermark.js +42 -52
  30. package/dist/esm/tracker/index.js +9 -8
  31. package/dist/esm/tracker/internalTrafficUtils.js +18 -13
  32. package/dist/esm/tracker/useInternalTrafficBypass.js +13 -31
  33. package/dist/types/embeddable/chart/Line.d.ts +2 -0
  34. package/dist/types/tracker/InternalTrafficToggle.d.ts +1 -4
  35. package/dist/types/tracker/InternalTrafficWatermark.d.ts +0 -10
  36. package/dist/types/tracker/internalTrafficUtils.d.ts +1 -14
  37. package/dist/types/tracker/useInternalTrafficBypass.d.ts +4 -10
  38. 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 it, Fragment as ct } from "react";
3
- import { injectIntl as ot } from "react-intl";
4
- import { ResponsiveLine as mt } from "@nivo/line";
5
- import dt from "./Tooltip.js";
6
- import { area as ht, line as ft } from "d3-shape";
7
- import { useTheme as ut } from "@nivo/theming";
8
- import pt from "../../layout/FlexWrapDetector.js";
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 xt = "#66676d", J = "#f0f0f1", ge = ["mobile", "tablet", "midTablet"].includes(K()), be = K() === "mobile", ve = ["tablet", "midTablet"].includes(K()), yt = (m, x) => {
11
- const E = document.createElement("canvas").getContext("2d");
12
- return E.font = x, E.measureText(m).width;
13
- }, gt = ({
14
- editing: m,
15
- previewMode: x,
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: E,
17
+ legends: N,
18
18
  tooltip: $,
19
- tooltipEnabled: Ee,
20
- options: d,
19
+ tooltipEnabled: Oe,
20
+ options: h,
21
21
  intl: I,
22
22
  groupMode: q,
23
- reverse: bt,
24
- marginLeft: Ne,
25
- lineLabelPosition: Oe,
23
+ reverse: vt,
24
+ marginLeft: Te,
25
+ lineLabelPosition: Me,
26
26
  marginTop: Q,
27
- marginRight: Te,
27
+ marginRight: De,
28
28
  marginBottom: X,
29
- format: N,
30
- colors: vt,
31
- offsetY: Me,
32
- height: De,
29
+ format: E,
30
+ colors: Nt,
31
+ offsetY: ke,
32
+ height: C,
33
33
  showLegends: P,
34
- legendPosition: h,
35
- tickRotation: y,
36
- offsetText: A,
34
+ legendPosition: f,
35
+ tickRotation: g,
36
+ offsetText: _,
37
37
  tickColor: B,
38
- legendLabel: C,
38
+ legendLabel: ee,
39
39
  xLabelColor: O,
40
- colorGenerator: ee,
40
+ colorGenerator: te,
41
41
  legendCheckBack: j,
42
- legendLabelBack: ke,
43
- legendLabelColor: te,
44
- highlightXAxisLine: $e,
42
+ legendLabelBack: $e,
43
+ legendLabelColor: ae,
44
+ highlightXAxisLine: Ie,
45
45
  showTickLine: S,
46
- showRightAxis: Ie,
46
+ showRightAxis: Le,
47
47
  valueScale: Et,
48
- enableArea: Le,
49
- areaShadingCriteria: ae,
50
- areaLowerBound: re,
51
- areaUpperBound: ne,
52
- showPoints: Fe,
53
- maxValue: We,
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: we,
57
- yAxisTickValues: ze,
56
+ offsetBottom: ze,
57
+ yAxisTickValues: Ae,
58
58
  enableGridY: _e,
59
- enableGridX: Ae,
59
+ enableGridX: Be,
60
60
  overrideTickColor: U,
61
- offsetRight: Be,
62
- selectedMeasures: je,
63
- tooltipEnableMarkdown: Se,
64
- minMaxClamp: He,
65
- reverseLegend: Re,
61
+ offsetRight: je,
62
+ selectedMeasures: Se,
63
+ tooltipEnableMarkdown: He,
64
+ minMaxClamp: Re,
65
+ reverseLegend: Ue,
66
66
  customAxisFormat: L,
67
- mobileCustomization: Ue,
68
- lineCurve: Ge,
67
+ mobileCustomization: Ge,
68
+ lineCurve: Ve,
69
69
  customLabels: G,
70
- lineXAxisTickMode: se,
71
- lineXAxisTickCount: Ve,
72
- lineXAxisTickEvery: Ye
70
+ lineXAxisTickMode: le,
71
+ lineXAxisTickCount: Ye,
72
+ lineXAxisTickEvery: Je,
73
+ chartHeight: ie
73
74
  }) => {
74
- var pe, xe, ye;
75
- const i = JSON.parse(decodeURIComponent(Ue)), le = ge && ((i == null ? void 0 : i.showCustomization) ?? !1), F = le && x !== "Desktop", W = !m && le, [ie, Je] = k(50), [ce, Ke] = k(Q), [Nt, oe] = k(0), [me, Ze] = k(X), [T, qe] = k([]), w = d.data.map((e) => ({
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: ee.getColor(e.id, e)
79
- })), de = () => (Re && w.reverse(), /* @__PURE__ */ s(Y, { children: P && w.map((e, a) => /* @__PURE__ */ v("div", { className: "legend item", onClick: () => Pe(e.id), children: [
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: te
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: ke === !0 ? e.color : "transparent",
107
- color: te
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
- it(() => {
114
+ ct(() => {
114
115
  (() => {
115
- const l = 5 * Math.max(w.length - 5, 0);
116
- Je(l);
116
+ const i = 5 * Math.max(w.length - 5, 0);
117
+ Ke(i);
117
118
  })();
118
119
  }, [w]);
119
- const Qe = {
120
- bottom: `-${ie}px`
121
- }, Xe = {
122
- bottom: `-${ie}px`,
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 l = a.indexOf(e);
129
- a.splice(l, 1);
129
+ const i = a.indexOf(e);
130
+ a.splice(i, 1);
130
131
  } else
131
132
  a.push(e);
132
- qe(a);
133
- }, Ce = (e) => {
134
- const a = Object.assign({}, e), l = ut();
135
- (F || W) && fe.includes(String(a.value)) && (a.value = "");
136
- let t = [], r = "";
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 c = String(a.value).split(" ");
139
- let o = 25;
140
- m && x === "Mobile" || be && !m ? o = (i == null ? void 0 : i.mobileMaxTickLength) ?? 25 : m && x === "Tablet" || ve && !m ? o = (i == null ? void 0 : i.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !m && (o = 15), c.forEach((g) => {
141
- r.length + String(g).length <= o ? r += (r ? " " : "") + g : (t.push(r), r = g);
142
- }), r && t.push(r);
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
- t = [a.value];
145
- let n = 12;
146
- return m && x === "Mobile" || be && !m ? n = (i == null ? void 0 : i.mobileYAxisLineHeight) ?? 12 : (m && x === "Tablet" || ve && !m) && (n = (i == null ? void 0 : i.tabletYAxisLineHeight) ?? 12), yt(a.value, "12px Roboto") + 15, y > 0 && y < 180 ? /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
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 + A})`, children: t.map((c, o) => /* @__PURE__ */ s(
157
+ /* @__PURE__ */ s("g", { transform: `translate(0, ${e.y + _})`, children: o.map((r, l) => /* @__PURE__ */ s(
157
158
  "text",
158
159
  {
159
- transform: `rotate(${y})`,
160
+ transform: `rotate(${g})`,
160
161
  textAnchor: "start",
161
- y: typeof e.value == "number" ? 0 : o * n,
162
+ y: typeof e.value == "number" ? 0 : l * t,
162
163
  dominantBaseline: "middle",
163
164
  style: {
164
- ...l.axis.ticks.text,
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: c
170
+ children: r
170
171
  },
171
- c
172
+ r
172
173
  )) })
173
- ] }) : y > 180 && y < 360 ? /* @__PURE__ */ v("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
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 + A})`, children: /* @__PURE__ */ s(
184
+ /* @__PURE__ */ s("g", { transform: `translate(0, ${e.y + _})`, children: /* @__PURE__ */ s(
184
185
  "text",
185
186
  {
186
- transform: `rotate(${y})`,
187
+ transform: `rotate(${g})`,
187
188
  textAnchor: "end",
188
189
  dominantBaseline: "middle",
189
190
  style: {
190
- ...l.axis.ticks.text,
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 + A})`, children: t.map((c, o) => /* @__PURE__ */ s(
208
+ /* @__PURE__ */ s("g", { transform: `translate(0, ${e.y + _})`, children: o.map((r, l) => /* @__PURE__ */ s(
208
209
  "text",
209
210
  {
210
- transform: `rotate(${y})`,
211
+ transform: `rotate(${g})`,
211
212
  textAnchor: "middle",
212
- y: typeof e.value == "number" ? 0 : o * n,
213
+ y: typeof e.value == "number" ? 0 : l * t,
213
214
  dominantBaseline: "middle",
214
215
  style: {
215
- ...l.axis.ticks.text,
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: c
221
+ children: r
221
222
  },
222
- c
223
+ r
223
224
  )) })
224
225
  ] });
225
- }, et = ({ series: e, xScale: a, yScale: l, innerHeight: t }) => {
226
- const r = e && e.length > 0 ? e[0].color : "#3daff7", n = [];
227
- e[0] && e[0].data.forEach((p) => {
228
- Z == "csv" ? d.keys.forEach((b) => {
229
- n.push({ measure: b, min: p.data.variables[b] });
230
- }) : je.forEach((b) => {
231
- n.push({ measure: b, min: p.data.variables[b] });
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 c = n.sort((p, b) => p.min - b.min), o = ae == "CUSTOM_BETWEEN_TWO_LINES" && re ? re : c[0].measure, g = ae == "CUSTOM_BETWEEN_TWO_LINES" && ne ? ne : c[c.length - 1].measure, lt = ht().x((p) => a(p.data.x)).y0((p) => l(p.data.variables[o])).y1((p) => l(p.data.variables[g]));
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: lt(e[0].data),
239
- fill: r,
239
+ d: it(e[0].data),
240
+ fill: n,
240
241
  fillOpacity: 0.4
241
242
  }
242
243
  ) });
243
- }, tt = ({ series: e, xScale: a, yScale: l, innerHeight: t, innerWidth: r }) => {
244
- const n = [0, r], c = ft().x((o, g) => g === 0 ? -10 : o).y((o) => l(0));
245
- return /* @__PURE__ */ s(ct, { children: /* @__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: c(n),
249
+ d: r(t),
249
250
  fill: "none",
250
- stroke: xt,
251
+ stroke: yt,
251
252
  style: { pointerEvents: "none", strokeDasharray: "4 4" }
252
253
  }
253
254
  ) });
254
255
  }, M = ["grid", "axes", "lines", "legends"];
255
- Le && M.push(et), Fe && (M.push("points"), M.push("mesh")), $e && M.push(tt);
256
+ Fe && M.push(tt), We && (M.push("points"), M.push("mesh")), Ie && M.push(at);
256
257
  let D = [];
257
- z(d.data).forEach((e) => {
258
+ z(h.data).forEach((e) => {
258
259
  e.data && (D = [...D, ...e.data.map((a) => a.y)]);
259
260
  });
260
- const at = () => {
261
+ const rt = () => {
261
262
  if (q === "stacked") {
262
263
  const e = [];
263
- z(d.data).forEach((t) => {
264
- e.push(...t.data);
264
+ z(h.data).forEach((o) => {
265
+ e.push(...o.data);
265
266
  });
266
- const l = [];
267
- e.forEach((t) => {
268
- l.indexOf(t.x) == -1 && l.push(t.x);
269
- }), u = Math.max(
270
- ...l.map((t) => e.filter((r) => r.x == t).map((r) => r.y).reduce((r, n) => Math.max(r + n, r + 0)))
271
- ), f = Math.min(
272
- ...l.map((t) => e.filter((r) => r.x == t).map((r) => r.y).reduce((r, n) => Math.min(r - n, n - r)))
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 && (u = Math.max(...D), f = Math.min(...D));
276
- return u = u < 0 ? u * 0.9 : u * 1.1, f = f > 0 ? f * 0.9 : f * 1.1, { min: f, max: u };
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 f = "auto", u = "auto";
279
- const _ = at();
280
- We == "fixed" ? (f = H != null && H != "" ? H : _.min, u = R != null && R != "" ? R : _.max) : (f = _.min, u = _.max);
281
- const he = () => /* @__PURE__ */ s(Y, { children: P && C && /* @__PURE__ */ s("div", { className: "legend item", children: /* @__PURE__ */ s("label", { className: "legend-title", children: C }) }) }), rt = {
282
- top: ce,
283
- right: Te,
284
- bottom: me,
285
- left: Ne
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(ze);
288
- const nt = d.data && ((xe = (pe = d.data) == null ? void 0 : pe.filter((e) => {
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 : xe.length), fe = [];
292
+ })) == null ? void 0 : ge.length), pe = [];
292
293
  if (F || W) {
293
- V = Number.parseInt(i.yAxisTickValues);
294
- const e = new Map(Object.entries(((ye = i == null ? void 0 : i.labels) == null ? void 0 : ye.xAxis) ?? {}));
295
- for (const [a, l] of e)
296
- l || fe.push(a);
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 ue = z(d.data), st = ["grid", "axes", "legends"];
299
- if (d != null && d.data && nt > 0) {
300
- let e = z(d.data);
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 n = r && r.x;
305
- n !== void 0 && a.indexOf(n) === -1 && a.push(n);
305
+ const l = r && r.x;
306
+ l !== void 0 && a.indexOf(l) === -1 && a.push(l);
306
307
  });
307
308
  });
308
- let l;
309
- if (se === "count") {
310
- const t = Math.max(1, parseInt(Ve));
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
- l = a.slice();
314
+ i = a.slice();
314
315
  else {
315
- const r = (a.length - 1) / (t - 1), n = new Array(t);
316
- for (let c = 0; c < t; c++)
317
- n[c] = Math.floor(c * r);
318
- n[t - 1] = a.length - 1, l = n.map((c) => a[c]);
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 (se === "every") {
321
- const t = Math.max(1, parseInt(Ye));
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 n = 0; n < a.length; n++)
325
- n % t === 0 && r.push(a[n]);
326
- r[r.length - 1] !== a[a.length - 1] && r.push(a[a.length - 1]), l = r;
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
- return /* @__PURE__ */ v("div", { style: { height: De }, children: [
330
- /* @__PURE__ */ s(
331
- mt,
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: Ge,
334
- data: ue,
335
- margin: rt,
335
+ curve: Ve,
336
+ data: xe,
337
+ margin: nt,
336
338
  xScale: { type: "point" },
337
339
  yScale: {
338
340
  type: "linear",
339
- min: f,
340
- max: u,
341
+ min: u,
342
+ max: p,
341
343
  stacked: q == "stacked",
342
344
  reverse: !1,
343
- clamp: He
345
+ clamp: Re
344
346
  },
345
- layers: ue.length === 0 ? st : M,
347
+ layers: xe.length === 0 ? lt : M,
346
348
  axisTop: null,
347
- axisRight: Ie ? {
349
+ axisRight: Le ? {
348
350
  tickSize: 5,
349
351
  tickValues: V,
350
352
  tickPadding: 5,
351
353
  tickRotation: 0,
352
- legend: E.right,
354
+ legend: N.right,
353
355
  legendPosition: "middle",
354
- legendOffset: parseInt(Be),
356
+ legendOffset: parseInt(je),
355
357
  format: (t) => {
356
- const r = L || N;
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: Ae,
367
- enablePointLabel: Oe === "top",
368
+ enableGridX: Be,
369
+ enablePointLabel: Me === "top",
368
370
  pointLabel: (t) => I.formatNumber(
369
- N.style === "percent" ? t.data.yFormatted / 100 : t.data.yFormatted,
370
- N
371
+ E.style === "percent" ? t.data.yFormatted / 100 : t.data.yFormatted,
372
+ E
371
373
  ),
372
374
  lineWidth: 3,
373
- colors: (t) => ee.getColor(t.id, t),
374
- axisBottom: (F || W) && (i == null ? void 0 : i.xAxisDisabled) === !0 ? null : {
375
- ...l ? { tickValues: l } : {},
376
- renderTick: Ce,
377
- legend: E.bottom,
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(we)
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: E.left,
388
+ legend: N.left,
387
389
  legendPosition: "middle",
388
- legendOffset: Number.parseInt(Me),
390
+ legendOffset: Number.parseInt(ke),
389
391
  format: (t) => {
390
- const r = L || N;
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) => Ee && $ && $.trim().length > 0 ? /* @__PURE__ */ s(
400
- dt,
401
+ tooltip: (t) => Oe && $ && $.trim().length > 0 ? /* @__PURE__ */ s(
402
+ ht,
401
403
  {
402
404
  intl: I,
403
- format: N,
405
+ format: E,
404
406
  d: t,
405
407
  tooltip: $,
406
- tooltipEnableMarkdown: Se
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
- (h === "top" || h === "bottom") && /* @__PURE__ */ s(
417
+ ) }),
418
+ (f === "top" || f === "bottom") && /* @__PURE__ */ s(
417
419
  "div",
418
420
  {
419
- className: `legends container has-standard-12-font-size ${h}`,
420
- style: h === "top" ? { marginTop: ge && `${ce}px` } : h === "bottom" ? { marginBottom: `${me}px` } : {},
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: he() }),
424
+ /* @__PURE__ */ s("div", { className: "title-section", children: ue() }),
423
425
  /* @__PURE__ */ s(
424
- pt,
426
+ xt,
425
427
  {
426
428
  onWrapChange: (t) => {
427
- if (h === "top") {
429
+ if (f === "top") {
428
430
  const r = Q + t / 2 * 40;
429
- Ke(r), oe(t);
431
+ Ze(r), de(t);
430
432
  } else
431
- Ze(X + t / 2 * 25), oe(t);
433
+ qe(X + t / 2 * 25), de(t);
432
434
  },
433
435
  className: "legends container has-standard-12-font-size items-section",
434
- children: de()
436
+ children: fe()
435
437
  }
436
438
  )
437
439
  ] })
438
440
  }
439
441
  ),
440
- (h === "right" || h === "left") && /* @__PURE__ */ v(
442
+ (f === "right" || f === "left") && /* @__PURE__ */ v(
441
443
  "div",
442
444
  {
443
- className: `legends container has-standard-12-font-size ${h}`,
444
- style: h === "right" ? Qe : Xe,
445
+ className: `legends container has-standard-12-font-size ${f}`,
446
+ style: f === "right" ? Xe : Ce,
445
447
  children: [
446
- he(),
447
- de()
448
+ ue(),
449
+ fe()
448
450
  ]
449
451
  }
450
452
  )
451
453
  ] });
452
454
  }
453
455
  return /* @__PURE__ */ s("div", {});
454
- }, Wt = ot(gt);
456
+ }, wt = mt(bt);
455
457
  export {
456
- Wt as default
458
+ wt as default
457
459
  };