@undp/data-viz 2.0.8 → 2.0.9

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 (53) hide show
  1. package/dist/ChoroplethMap.cjs +1 -1
  2. package/dist/ChoroplethMap.js +1 -1
  3. package/dist/DataCards.cjs +1 -1
  4. package/dist/DataCards.js +1 -1
  5. package/dist/GriddedGraphs.cjs +1 -1
  6. package/dist/GriddedGraphs.cjs.map +1 -1
  7. package/dist/GriddedGraphs.d.ts +1 -0
  8. package/dist/GriddedGraphs.js +152 -140
  9. package/dist/GriddedGraphs.js.map +1 -1
  10. package/dist/GriddedGraphsFromConfig.d.ts +1 -0
  11. package/dist/HybridMap.cjs +1 -1
  12. package/dist/HybridMap.js +1 -1
  13. package/dist/MultiGraphDashboard.cjs +1 -1
  14. package/dist/MultiGraphDashboard.cjs.map +1 -1
  15. package/dist/MultiGraphDashboard.d.ts +1 -0
  16. package/dist/MultiGraphDashboard.js +88 -83
  17. package/dist/MultiGraphDashboard.js.map +1 -1
  18. package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
  19. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  20. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  21. package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
  22. package/dist/PerformanceIntensiveMultiGraphDashboard.js +74 -70
  23. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  24. package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
  25. package/dist/SingleGraphDashboard.cjs +1 -1
  26. package/dist/SingleGraphDashboard.cjs.map +1 -1
  27. package/dist/SingleGraphDashboard.d.ts +1 -0
  28. package/dist/SingleGraphDashboard.js +120 -117
  29. package/dist/SingleGraphDashboard.js.map +1 -1
  30. package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
  31. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  32. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  33. package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
  34. package/dist/SingleGraphDashboardThreeDGraphs.js +124 -120
  35. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  36. package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
  37. package/dist/ThreeDGlobe.cjs +1 -1
  38. package/dist/ThreeDGlobe.js +1 -1
  39. package/dist/Types.d.ts +1 -0
  40. package/dist/getUniqValue-DsqSii6M.js +11 -0
  41. package/dist/getUniqValue-DsqSii6M.js.map +1 -0
  42. package/dist/getUniqValue-NX8DgwND.cjs +2 -0
  43. package/dist/getUniqValue-NX8DgwND.cjs.map +1 -0
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +1 -1
  47. package/dist/utils.cjs +1 -1
  48. package/dist/utils.js +1 -1
  49. package/package.json +1 -1
  50. package/dist/getUniqValue-BKHCm3zE.js +0 -11
  51. package/dist/getUniqValue-BKHCm3zE.js.map +0 -1
  52. package/dist/getUniqValue-RViz8tTw.cjs +0 -2
  53. package/dist/getUniqValue-RViz8tTw.cjs.map +0 -1
@@ -1,50 +1,50 @@
1
- import { c as de, j as o } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useState as S, useRef as Z, useEffectEvent as E, useEffect as A } from "react";
3
- import { i as ce } from "./index-BuwmuDFJ.js";
1
+ import { c as ue, j as o } from "./index-CHPV5EwG-Curnpaqc.js";
2
+ import { useState as S, useRef as Q, useEffectEvent as E, useEffect as $ } from "react";
3
+ import { i as de } from "./index-BuwmuDFJ.js";
4
4
  import { f as z } from "./index-EArKRVKg.js";
5
- import { i as ue } from "./index-Bwrro8-q.js";
6
- import { j as $, D as L } from "./DropdownSelect-BbdPQa2k.js";
7
- import { g as he, b as M, y as J, h as K, c as ge, $ as Q, P as X } from "./checkIfMultiple-Y9iKaV_u.js";
5
+ import { i as ce } from "./index-Bwrro8-q.js";
6
+ import { j as k, D as L } from "./DropdownSelect-BbdPQa2k.js";
7
+ import { g as he, b as M, y as U, h as B, c as ge, $ as X, P as Y } from "./checkIfMultiple-Y9iKaV_u.js";
8
8
  import { w as pe } from "./Spinner-D7rnnwnA.js";
9
- import { j as Y } from "./Typography-PxtFcnJb.js";
10
- import { ThreeDGlobe as me } from "./ThreeDGlobe.js";
11
- import { f as fe, a as Ce, b as be, c as ve, t as xe } from "./fetchAndParseData-BpqkBPQL.js";
9
+ import { j as _ } from "./Typography-PxtFcnJb.js";
10
+ import { ThreeDGlobe as fe } from "./ThreeDGlobe.js";
11
+ import { f as me, a as Ce, b as be, c as ve, t as xe } from "./fetchAndParseData-BpqkBPQL.js";
12
12
  import { a as Ie, t as we } from "./transformDataForAggregation-DEU__LUl.js";
13
- import { g as _ } from "./getUniqValue-BKHCm3zE.js";
13
+ import { g as ee } from "./getUniqValue-DsqSii6M.js";
14
14
  import { GraphHeader as De } from "./GraphHeader.js";
15
- import { f as ee } from "./filterData-DsAiFzKY.js";
15
+ import { f as ae } from "./filterData-DsAiFzKY.js";
16
16
  import { g as ye } from "./getGraphList-Dxwo9TDb.js";
17
- import { t as ae } from "./transformDataForSelect-D8AuvYdf.js";
17
+ import { t as te } from "./transformDataForSelect-D8AuvYdf.js";
18
18
  import { G as Se } from "./GraphContainer-CRqzdKu2.js";
19
- function je(D) {
20
- const a = de.c(24), {
19
+ function Ve(D) {
20
+ const a = ue.c(24), {
21
21
  settings: t,
22
22
  graph: g,
23
- graphData: c,
23
+ graphData: d,
24
24
  debugMode: w,
25
25
  graphDataConfiguration: r,
26
- readableHeader: j,
26
+ readableHeader: V,
27
27
  updateFilters: I
28
28
  } = D;
29
- if (w && (console.log(`Graph: ${g}`), console.log("Transformed data:", c), console.log("Settings:", t)), typeof c == "string") {
30
- const f = `flex my-0 mx-auto grow flex-col justify-center ${t?.width ? "w-fit" : "w-full"}`;
29
+ if (w && (console.log(`Graph: ${g}`), console.log("Transformed data:", d), console.log("Settings:", t)), typeof d == "string") {
30
+ const m = `flex my-0 mx-auto grow flex-col justify-center ${t?.width ? "w-fit" : "w-full"}`;
31
31
  let p;
32
32
  a[0] === Symbol.for("react.memo_cache_sentinel") ? (p = {
33
33
  height: "inherit"
34
34
  }, a[0] = p) : p = a[0];
35
- let d;
36
- a[1] !== c ? (d = /* @__PURE__ */ o.jsx(Y, { size: "sm", marginBottom: "none", className: "p-2 text-center text-accent-dark-red dark:text-accent-red", children: c }), a[1] = c, a[2] = d) : d = a[2];
35
+ let u;
36
+ a[1] !== d ? (u = /* @__PURE__ */ o.jsx(_, { size: "sm", marginBottom: "none", className: "p-2 text-center text-accent-dark-red dark:text-accent-red", children: d }), a[1] = d, a[2] = u) : u = a[2];
37
37
  let x;
38
- return a[3] !== f || a[4] !== d ? (x = /* @__PURE__ */ o.jsx("div", { className: f, style: p, children: d }), a[3] = f, a[4] = d, a[5] = x) : x = a[5], x;
38
+ return a[3] !== m || a[4] !== u ? (x = /* @__PURE__ */ o.jsx("div", { className: m, style: p, children: u }), a[3] = m, a[4] = u, a[5] = x) : x = a[5], x;
39
39
  }
40
40
  let b;
41
41
  a[6] === Symbol.for("react.memo_cache_sentinel") ? (b = {
42
- threeDGlobe: me
42
+ threeDGlobe: fe
43
43
  }, a[6] = b) : b = a[6];
44
- const H = b;
45
- let V;
46
- a[7] !== c || a[8] !== r || a[9] !== j || a[10] !== t || a[11] !== I ? (V = (f) => {
47
- switch (f) {
44
+ const P = b;
45
+ let j;
46
+ a[7] !== d || a[8] !== r || a[9] !== V || a[10] !== t || a[11] !== I ? (j = (m) => {
47
+ switch (m) {
48
48
  case "threeDGlobe":
49
49
  return {
50
50
  globeOffset: t?.globeOffset,
@@ -63,9 +63,9 @@ function je(D) {
63
63
  sources: t?.sources,
64
64
  colorDomain: t?.colorDomain,
65
65
  colors: t?.colors,
66
- colorLegendTitle: Object.keys(t || {}).indexOf("colorLegendTitle") !== -1 ? t?.colorLegendTitle : he("x", r || [], j || []),
66
+ colorLegendTitle: Object.keys(t || {}).indexOf("colorLegendTitle") !== -1 ? t?.colorLegendTitle : he("x", r || [], V || []),
67
67
  scaleType: t?.scaleType,
68
- data: c,
68
+ data: d,
69
69
  centerPoint: t?.centerPoint,
70
70
  backgroundColor: t?.backgroundColor,
71
71
  mapNoDataColor: t?.mapNoDataColor,
@@ -100,26 +100,26 @@ function je(D) {
100
100
  default:
101
101
  return {};
102
102
  }
103
- }, a[7] = c, a[8] = r, a[9] = j, a[10] = t, a[11] = I, a[12] = V) : V = a[12];
104
- const u = V, T = H[g];
103
+ }, a[7] = d, a[8] = r, a[9] = V, a[10] = t, a[11] = I, a[12] = j) : j = a[12];
104
+ const c = j, T = P[g];
105
105
  let h;
106
- a[13] !== u || a[14] !== g ? (h = u(g), a[13] = u, a[14] = g, a[15] = h) : h = a[15];
107
- const m = h, N = `grow my-0 mx-auto flex flex-col w-full justify-center ${t?.theme || "light"}`;
106
+ a[13] !== c || a[14] !== g ? (h = c(g), a[13] = c, a[14] = g, a[15] = h) : h = a[15];
107
+ const f = h, N = `grow my-0 mx-auto flex flex-col w-full justify-center ${t?.theme || "light"}`;
108
108
  let y;
109
109
  a[16] === Symbol.for("react.memo_cache_sentinel") ? (y = {
110
110
  minHeight: "inherit"
111
111
  }, a[16] = y) : y = a[16];
112
112
  let s;
113
- a[17] !== T || a[18] !== g || a[19] !== m ? (s = T ? /* @__PURE__ */ o.jsx(T, { ...m }) : /* @__PURE__ */ o.jsx(Y, { size: "sm", marginBottom: "none", className: "p-2 text-center text-accent-dark-red dark:text-accent-red", children: `Invalid chart type: ${g}` }), a[17] = T, a[18] = g, a[19] = m, a[20] = s) : s = a[20];
113
+ a[17] !== T || a[18] !== g || a[19] !== f ? (s = T ? /* @__PURE__ */ o.jsx(T, { ...f }) : /* @__PURE__ */ o.jsx(_, { size: "sm", marginBottom: "none", className: "p-2 text-center text-accent-dark-red dark:text-accent-red", children: `Invalid chart type: ${g}` }), a[17] = T, a[18] = g, a[19] = f, a[20] = s) : s = a[20];
114
114
  let G;
115
115
  return a[21] !== N || a[22] !== s ? (G = /* @__PURE__ */ o.jsx("div", { className: N, style: y, children: s }), a[21] = N, a[22] = s, a[23] = G) : G = a[23], G;
116
116
  }
117
- const U = (D, a) => {
117
+ const W = (D, a) => {
118
118
  const t = a?.map((g) => {
119
- const c = D?.findIndex((r) => r.chartConfigId === g.chartConfigId);
120
- if (c === -1) return {};
121
- const w = D[c]?.allowedColumnIds?.findIndex((r) => r.value === g.columnId);
122
- return w === -1 ? {} : D[c].allowedColumnIds[w].graphSettings || {};
119
+ const d = D?.findIndex((r) => r.chartConfigId === g.chartConfigId);
120
+ if (d === -1) return {};
121
+ const w = D[d]?.allowedColumnIds?.findIndex((r) => r.value === g.columnId);
122
+ return w === -1 ? {} : D[d].allowedColumnIds[w].graphSettings || {};
123
123
  }) || [];
124
124
  return Object.assign({}, ...t);
125
125
  };
@@ -128,96 +128,98 @@ function We(D) {
128
128
  graphSettings: a,
129
129
  dataSettings: t,
130
130
  filters: g,
131
- graphType: c,
131
+ graphType: d,
132
132
  dataTransform: w,
133
133
  graphDataConfiguration: r,
134
- dataFilters: j,
134
+ dataFilters: V,
135
135
  debugMode: I,
136
136
  dataSelectionOptions: b,
137
- advancedDataSelectionOptions: H,
138
- readableHeader: V,
139
- noOfFiltersPerRow: u = 4,
137
+ advancedDataSelectionOptions: P,
138
+ readableHeader: j,
139
+ noOfFiltersPerRow: c = 4,
140
140
  updateFilters: T,
141
141
  uiMode: h = "normal",
142
- highlightDataPointSettings: m
143
- } = D, [N, y] = S(void 0), [s, G] = S(void 0), [f, p] = S(r), [d, x] = S({}), [k, te] = S(void 0), [le, oe] = S([]), B = Z(null), W = Z(r), [O, q] = S([]), P = {
142
+ highlightDataPointSettings: f
143
+ } = D, [N, y] = S(void 0), [s, G] = S(void 0), [m, p] = S(r), [u, x] = S({}), [O, le] = S(void 0), [ie, oe] = S([]), q = Q(null), Z = Q(r), [A, J] = S([]), R = {
144
144
  ignoreCase: !0,
145
145
  ignoreAccents: !0,
146
146
  trim: !0
147
- }, ie = E(() => {
147
+ }, K = E(() => {
148
148
  const e = (g || []).map((n) => ({
149
149
  filter: n.column,
150
150
  label: n.label || `Filter by ${n.column}`,
151
151
  singleSelect: n.singleSelect,
152
152
  clearable: n.clearable,
153
- defaultValue: ae(n.defaultValue),
154
- value: ae(n.defaultValue),
155
- availableValues: _(s, n.column).filter((l) => !n.excludeValues?.includes(`${l}`)).map((l) => ({
153
+ defaultValue: te(n.defaultValue),
154
+ value: te(n.defaultValue),
155
+ availableValues: ee(s, n.column).filter((l) => !n.excludeValues?.includes(`${l}`)).map((l) => ({
156
156
  value: l,
157
157
  label: l
158
158
  })),
159
159
  allowSelectAll: n.allowSelectAll,
160
160
  width: n.width
161
161
  }));
162
- q(e);
162
+ J(e);
163
163
  });
164
- A(() => {
164
+ $(() => {
165
165
  (async () => {
166
166
  try {
167
- const n = t.dataURL ? typeof t.dataURL == "string" ? t.fileType === "json" ? await fe(t.dataURL, t.columnsToArray, t.dataTransformation, I) : t.fileType === "api" ? await Ce(t.dataURL, t.apiHeaders, t.columnsToArray, t.dataTransformation, I) : await be(t.dataURL, t.dataTransformation, t.columnsToArray, I, t.delimiter, !0) : await ve(t.dataURL, t.idColumnTitle) : await xe(t.data, t.columnsToArray);
167
+ const n = t.dataURL ? typeof t.dataURL == "string" ? t.fileType === "json" ? await me(t.dataURL, t.columnsToArray, t.dataTransformation, I) : t.fileType === "api" ? await Ce(t.dataURL, t.apiHeaders, t.columnsToArray, t.dataTransformation, I) : await be(t.dataURL, t.dataTransformation, t.columnsToArray, I, t.delimiter, !0) : await ve(t.dataURL, t.idColumnTitle) : await xe(t.data, t.columnsToArray);
168
168
  G(n);
169
169
  } catch (n) {
170
170
  console.error("Data fetching error:", n);
171
171
  }
172
- })(), ie();
173
- }, [t, g, I]);
172
+ })(), K();
173
+ }, [t, I]), $(() => {
174
+ K();
175
+ }, [g, s]);
174
176
  const re = E(() => {
175
- if (!s || O.length === 0) y(s);
177
+ if (!s || A.length === 0) y(s);
176
178
  else {
177
- const e = s.filter((n) => O.every((l) => l.value && z([l.value]).length > 0 ? ce(z([n[l.filter]]), z([l.value]).map((i) => i.value)).length > 0 : !0));
179
+ const e = s.filter((n) => A.every((l) => l.value && z([l.value]).length > 0 ? de(z([n[l.filter]]), z([l.value]).map((i) => i.value)).length > 0 : !0));
178
180
  y(e);
179
181
  }
180
182
  });
181
- A(() => {
183
+ $(() => {
182
184
  re();
183
- }, [O, s]), A(() => {
184
- b && x(U(b, r));
185
+ }, [A, s]), $(() => {
186
+ b && x(W(b, r));
185
187
  }, [b, r]);
186
188
  const ne = E(() => {
187
- m?.column && N && oe(_(N, m.column).filter((e) => !m?.excludeValues?.includes(`${e}`)).map((e) => ({
189
+ f?.column && N && oe(ee(N, f.column).filter((e) => !f?.excludeValues?.includes(`${e}`)).map((e) => ({
188
190
  value: e,
189
191
  label: e
190
192
  })));
191
193
  });
192
- A(() => {
194
+ $(() => {
193
195
  ne();
194
- }, [m]), A(() => {
195
- ue(W.current, r) || (p(r), W.current = r);
196
+ }, [f]), $(() => {
197
+ ce(Z.current, r) || (p(r), Z.current = r);
196
198
  }, [r]);
197
- const R = (e, n) => {
198
- q((l) => l.map((i) => i.filter === e ? {
199
+ const H = (e, n) => {
200
+ J((l) => l.map((i) => i.filter === e ? {
199
201
  ...i,
200
202
  value: n
201
203
  } : i));
202
- }, se = s ? Ie(w ? we(ee(s, j || []), w.keyColumn, w.aggregationColumnsSetting) : ee(s, j || []), c, f) : void 0;
203
- return /* @__PURE__ */ o.jsx(Se, { className: a?.classNames?.graphContainer, style: a?.styles?.graphContainer, id: a?.graphID, ref: B, "aria-label": a?.ariaLabel, backgroundColor: a?.backgroundColor ?? !1, theme: a?.theme || "light", language: a?.language || "en", width: a?.width, height: a?.height, padding: a?.padding, minHeight: a?.minHeight, relativeHeight: a?.relativeHeight, children: s || ye.filter((e) => e.geoHubMapPresentation).map((e) => e.graphID).indexOf(c) !== -1 ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
204
- d?.graphTitle || d?.graphDescription || a?.graphTitle || a?.graphDescription || a?.graphDownload || a?.dataDownload ? /* @__PURE__ */ o.jsx(De, { styles: {
205
- title: d?.styles?.title || a?.styles?.title,
206
- description: d?.styles?.description || a?.styles?.description
204
+ }, se = s ? Ie(w ? we(ae(s, V || []), w.keyColumn, w.aggregationColumnsSetting) : ae(s, V || []), d, m) : void 0;
205
+ return /* @__PURE__ */ o.jsx(Se, { className: a?.classNames?.graphContainer, style: a?.styles?.graphContainer, id: a?.graphID, ref: q, "aria-label": a?.ariaLabel, backgroundColor: a?.backgroundColor ?? !1, theme: a?.theme || "light", language: a?.language || "en", width: a?.width, height: a?.height, padding: a?.padding, minHeight: a?.minHeight, relativeHeight: a?.relativeHeight, children: s || ye.filter((e) => e.geoHubMapPresentation).map((e) => e.graphID).indexOf(d) !== -1 ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
206
+ u?.graphTitle || u?.graphDescription || a?.graphTitle || a?.graphDescription || a?.graphDownload || a?.dataDownload ? /* @__PURE__ */ o.jsx(De, { styles: {
207
+ title: u?.styles?.title || a?.styles?.title,
208
+ description: u?.styles?.description || a?.styles?.description
207
209
  }, classNames: {
208
- title: d?.classNames?.title || a?.classNames?.title,
209
- description: d?.classNames?.description || a?.classNames?.description
210
- }, graphTitle: d?.graphTitle || a?.graphTitle, graphDescription: d?.graphDescription || a?.graphDescription, width: d?.width || a?.width, graphDownload: a?.graphDownload ? B : void 0, dataDownload: a?.dataDownload && s && s.length > 0 ? s : null }) : null,
211
- O.length !== 0 || (b || []).length !== 0 || (H || []).length !== 0 || m ? /* @__PURE__ */ o.jsxs("div", { className: "flex flex-wrap items-start gap-x-4 gap-y-0 w-full", children: [
212
- H?.map((e, n) => /* @__PURE__ */ o.jsxs("div", { style: {
213
- width: e.width || `calc(${100 / u}% - ${(u - 1) / u}rem)`,
210
+ title: u?.classNames?.title || a?.classNames?.title,
211
+ description: u?.classNames?.description || a?.classNames?.description
212
+ }, graphTitle: u?.graphTitle || a?.graphTitle, graphDescription: u?.graphDescription || a?.graphDescription, width: u?.width || a?.width, graphDownload: a?.graphDownload ? q : void 0, dataDownload: a?.dataDownload && s && s.length > 0 ? s : null }) : null,
213
+ A.length !== 0 || (b || []).length !== 0 || (P || []).length !== 0 || f ? /* @__PURE__ */ o.jsxs("div", { className: "flex flex-wrap items-start gap-x-4 gap-y-0 w-full", children: [
214
+ P?.map((e, n) => /* @__PURE__ */ o.jsxs("div", { style: {
215
+ width: e.width || `calc(${100 / c}% - ${(c - 1) / c}rem)`,
214
216
  flexGrow: 1,
215
217
  flexShrink: e.ui !== "radio" ? 0 : 1,
216
218
  minWidth: "240px"
217
219
  }, className: "pb-4", children: [
218
220
  /* @__PURE__ */ o.jsx(M, { className: "mb-2", children: e.label || "Graph by" }),
219
221
  e.ui !== "radio" ? /* @__PURE__ */ o.jsx(
220
- $,
222
+ k,
221
223
  {
222
224
  options: e.options.map((l) => ({
223
225
  ...l,
@@ -239,20 +241,20 @@ function We(D) {
239
241
  x(l?.graphSettings || {}), p(l?.dataConfiguration);
240
242
  }
241
243
  }
242
- ) : /* @__PURE__ */ o.jsx(J, { defaultValue: e.defaultValue?.label || e.options[0].label, variant: h, onValueChange: (l) => {
244
+ ) : /* @__PURE__ */ o.jsx(U, { defaultValue: e.defaultValue?.label || e.options[0].label, variant: h, onValueChange: (l) => {
243
245
  const i = e.options[e.options.findIndex((v) => v.label === l)];
244
246
  x(i.graphSettings || {}), p(i.dataConfiguration);
245
- }, children: e.options.map((l, i) => /* @__PURE__ */ o.jsx(K, { label: l.label, value: l.label }, i)) })
247
+ }, children: e.options.map((l, i) => /* @__PURE__ */ o.jsx(B, { label: l.label, value: l.label }, i)) })
246
248
  ] }, n)),
247
249
  b?.map((e, n) => /* @__PURE__ */ o.jsxs("div", { style: {
248
- width: e.width || `calc(${100 / u}% - ${(u - 1) / u}rem)`,
250
+ width: e.width || `calc(${100 / c}% - ${(c - 1) / c}rem)`,
249
251
  flexGrow: 1,
250
252
  flexShrink: e.ui !== "radio" ? 0 : 1,
251
253
  minWidth: "240px"
252
254
  }, className: "pb-4", children: [
253
255
  /* @__PURE__ */ o.jsx(M, { className: "mb-2", children: e.label || `Visualize ${e.chartConfigId} by` }),
254
- ge(e.chartConfigId, f || []) ? e.ui !== "radio" ? /* @__PURE__ */ o.jsx(
255
- $,
256
+ ge(e.chartConfigId, m || []) ? e.ui !== "radio" ? /* @__PURE__ */ o.jsx(
257
+ k,
256
258
  {
257
259
  options: e.allowedColumnIds,
258
260
  size: "sm",
@@ -261,7 +263,7 @@ function We(D) {
261
263
  variant: h,
262
264
  controlShouldRenderValue: !0,
263
265
  defaultValue: r ? r[r.findIndex((l) => l.chartConfigId === e.chartConfigId)].columnId.map((l) => e.allowedColumnIds[e.allowedColumnIds.findIndex((i) => i.value === l)]) : void 0,
264
- filterOption: L(P),
266
+ filterOption: L(R),
265
267
  onChange: (l) => {
266
268
  const i = {
267
269
  columnId: (l || []).map(
@@ -269,18 +271,18 @@ function We(D) {
269
271
  (C) => C.value
270
272
  ),
271
273
  chartConfigId: e.chartConfigId
272
- }, v = f?.map((C) => C.chartConfigId === i.chartConfigId ? i : C);
274
+ }, v = m?.map((C) => C.chartConfigId === i.chartConfigId ? i : C);
273
275
  p(v);
274
276
  }
275
277
  }
276
- ) : /* @__PURE__ */ o.jsx(Q, { variant: h, defaultValue: r ? r[r.findIndex((l) => l.chartConfigId === e.chartConfigId)].columnId.map((l) => e.allowedColumnIds[e.allowedColumnIds.findIndex((i) => i.value === l)]).map((l) => l.value) : [], onValueChange: (l) => {
278
+ ) : /* @__PURE__ */ o.jsx(X, { variant: h, defaultValue: r ? r[r.findIndex((l) => l.chartConfigId === e.chartConfigId)].columnId.map((l) => e.allowedColumnIds[e.allowedColumnIds.findIndex((i) => i.value === l)]).map((l) => l.value) : [], onValueChange: (l) => {
277
279
  const i = {
278
280
  columnId: l || [],
279
281
  chartConfigId: e.chartConfigId
280
- }, v = f?.map((C) => C.chartConfigId === i.chartConfigId ? i : C);
282
+ }, v = m?.map((C) => C.chartConfigId === i.chartConfigId ? i : C);
281
283
  p(v);
282
- }, children: e.allowedColumnIds.map((l, i) => /* @__PURE__ */ o.jsx(X, { label: l.label, value: l.label }, i)) }) : e.ui !== "radio" ? /* @__PURE__ */ o.jsx(
283
- $,
284
+ }, children: e.allowedColumnIds.map((l, i) => /* @__PURE__ */ o.jsx(Y, { label: l.label, value: l.label }, i)) }) : e.ui !== "radio" ? /* @__PURE__ */ o.jsx(
285
+ k,
284
286
  {
285
287
  options: e.allowedColumnIds,
286
288
  size: "sm",
@@ -293,64 +295,66 @@ function We(D) {
293
295
  const i = {
294
296
  columnId: l?.value,
295
297
  chartConfigId: e.chartConfigId
296
- }, v = f?.map((C) => C.chartConfigId === i.chartConfigId ? i : C);
297
- x(U(b, v)), p(v);
298
+ }, v = m?.map((C) => C.chartConfigId === i.chartConfigId ? i : C);
299
+ x(W(b, v)), p(v);
298
300
  }
299
301
  }
300
- ) : /* @__PURE__ */ o.jsx(J, { variant: h, defaultValue: r ? e.allowedColumnIds[e.allowedColumnIds.findIndex((l) => l.value === r[r.findIndex((i) => i.chartConfigId === e.chartConfigId)].columnId)].label : "", onValueChange: (l) => {
302
+ ) : /* @__PURE__ */ o.jsx(U, { variant: h, defaultValue: r ? e.allowedColumnIds[e.allowedColumnIds.findIndex((l) => l.value === r[r.findIndex((i) => i.chartConfigId === e.chartConfigId)].columnId)].label : "", onValueChange: (l) => {
301
303
  const v = {
302
304
  columnId: e.allowedColumnIds[e.allowedColumnIds.findIndex((F) => F.label === l)].value,
303
305
  chartConfigId: e.chartConfigId
304
- }, C = f?.map((F) => F.chartConfigId === v.chartConfigId ? v : F);
305
- x(U(b, C)), p(C);
306
- }, children: e.allowedColumnIds.map((l, i) => /* @__PURE__ */ o.jsx(K, { label: l.label, value: l.label }, i)) })
306
+ }, C = m?.map((F) => F.chartConfigId === v.chartConfigId ? v : F);
307
+ x(W(b, C)), p(C);
308
+ }, children: e.allowedColumnIds.map((l, i) => /* @__PURE__ */ o.jsx(B, { label: l.label, value: l.label }, i)) })
307
309
  ] }, n)),
308
- O?.map((e, n) => /* @__PURE__ */ o.jsxs("div", { style: {
309
- width: e.width || `calc(${100 / u}% - ${(u - 1) / u}rem)`,
310
+ A?.map((e, n) => /* @__PURE__ */ o.jsxs("div", { style: {
311
+ width: e.width || `calc(${100 / c}% - ${(c - 1) / c}rem)`,
310
312
  flexGrow: 1,
311
313
  flexShrink: 0,
312
314
  minWidth: "240px"
313
315
  }, className: "pb-4", children: [
314
316
  /* @__PURE__ */ o.jsx(M, { className: "mb-2", children: e.label }),
315
- e.singleSelect ? /* @__PURE__ */ o.jsx($, { options: e.availableValues, variant: h, isClearable: e.clearable === void 0 ? !0 : e.clearable, isSearchable: !0, controlShouldRenderValue: !0, filterOption: L(P), onChange: (l) => {
316
- R(e.filter, l);
317
- }, value: e.value, defaultValue: e.defaultValue }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
318
- e.ui !== "radio" ? /* @__PURE__ */ o.jsx($, { options: e.availableValues, variant: h, size: "sm", isMulti: !0, isClearable: e.clearable === void 0 ? !0 : e.clearable, isSearchable: !0, controlShouldRenderValue: !0, filterOption: L(P), onChange: (l) => {
319
- R(e.filter, l);
320
- }, value: e.value, defaultValue: e.defaultValue }) : /* @__PURE__ */ o.jsx(Q, { variant: h, defaultValue: e.defaultValue ? e.defaultValue.map((l) => `${l.value}`) : [], value: e.value ? e.value.map((l) => `${l.value}`) : void 0, onValueChange: (l) => {
321
- R(e.filter, e.availableValues.filter((i) => l.indexOf(`${i.value}`) !== -1));
322
- }, children: e.availableValues.map((l, i) => /* @__PURE__ */ o.jsx(X, { label: `${l.label}`, value: `${l.value}` }, i)) }),
317
+ e.singleSelect ? e.ui !== "radio" ? /* @__PURE__ */ o.jsx(k, { options: e.availableValues, variant: h, isClearable: e.clearable === void 0 ? !0 : e.clearable, isSearchable: !0, controlShouldRenderValue: !0, filterOption: L(R), onChange: (l) => {
318
+ H(e.filter, l);
319
+ }, value: e.value, defaultValue: e.defaultValue }) : /* @__PURE__ */ o.jsx(U, { variant: h, defaultValue: e.defaultValue.value, onValueChange: (l) => {
320
+ H(e.filter, e.availableValues.filter((i) => i.value === l));
321
+ }, children: e.availableValues.map((l, i) => /* @__PURE__ */ o.jsx(B, { label: `${l.label}`, value: `${l.value}` }, i)) }) : /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
322
+ e.ui !== "radio" ? /* @__PURE__ */ o.jsx(k, { options: e.availableValues, variant: h, size: "sm", isMulti: !0, isClearable: e.clearable === void 0 ? !0 : e.clearable, isSearchable: !0, controlShouldRenderValue: !0, filterOption: L(R), onChange: (l) => {
323
+ H(e.filter, l);
324
+ }, value: e.value, defaultValue: e.defaultValue }) : /* @__PURE__ */ o.jsx(X, { variant: h, defaultValue: e.defaultValue ? e.defaultValue.map((l) => `${l.value}`) : [], value: e.value ? e.value.map((l) => `${l.value}`) : void 0, onValueChange: (l) => {
325
+ H(e.filter, e.availableValues.filter((i) => l.indexOf(`${i.value}`) !== -1));
326
+ }, children: e.availableValues.map((l, i) => /* @__PURE__ */ o.jsx(Y, { label: `${l.label}`, value: `${l.value}` }, i)) }),
323
327
  e.allowSelectAll ? /* @__PURE__ */ o.jsx("button", { type: "button", className: "bg-transparent border-0 p-0 mt-2 cursor-pointer text-primary-blue-600 dark:text-primary-blue-400", onClick: () => {
324
- R(e.filter, e.availableValues);
328
+ H(e.filter, e.availableValues);
325
329
  }, children: "Select all options" }) : null
326
330
  ] })
327
331
  ] }, n)),
328
- m ? /* @__PURE__ */ o.jsxs("div", { style: {
329
- width: m.width || `calc(${100 / u}% - ${(u - 1) / u}rem)`,
332
+ f ? /* @__PURE__ */ o.jsxs("div", { style: {
333
+ width: f.width || `calc(${100 / c}% - ${(c - 1) / c}rem)`,
330
334
  flexGrow: 1,
331
335
  flexShrink: 0,
332
336
  minWidth: "240px"
333
337
  }, className: "pb-4", children: [
334
- /* @__PURE__ */ o.jsx(M, { className: "mb-2", children: m.label || "Highlight data" }),
338
+ /* @__PURE__ */ o.jsx(M, { className: "mb-2", children: f.label || "Highlight data" }),
335
339
  /* @__PURE__ */ o.jsx(
336
- $,
340
+ k,
337
341
  {
338
- options: le,
342
+ options: ie,
339
343
  variant: h,
340
344
  size: "sm",
341
345
  isMulti: !0,
342
346
  isClearable: !0,
343
347
  isSearchable: !0,
344
348
  controlShouldRenderValue: !0,
345
- filterOption: L(P),
349
+ filterOption: L(R),
346
350
  onChange: (e) => {
347
- te(e?.map((n) => n.value));
351
+ le(e?.map((n) => n.value));
348
352
  },
349
- value: k?.map((e) => ({
353
+ value: O?.map((e) => ({
350
354
  label: e,
351
355
  value: e
352
356
  })),
353
- defaultValue: m.defaultValues?.map((e) => ({
357
+ defaultValue: f.defaultValues?.map((e) => ({
354
358
  label: e,
355
359
  value: e
356
360
  }))
@@ -358,9 +362,9 @@ function We(D) {
358
362
  )
359
363
  ] }) : null
360
364
  ] }) : null,
361
- /* @__PURE__ */ o.jsx(je, { graph: c, graphData: se, graphDataConfiguration: f, debugMode: I, readableHeader: V || [], updateFilters: T, settings: {
365
+ /* @__PURE__ */ o.jsx(Ve, { graph: d, graphData: se, graphDataConfiguration: m, debugMode: I, readableHeader: j || [], updateFilters: T, settings: {
362
366
  ...a || {},
363
- ...d,
367
+ ...u,
364
368
  graphTitle: void 0,
365
369
  graphDescription: void 0,
366
370
  graphDownload: !1,
@@ -372,10 +376,10 @@ function We(D) {
372
376
  relativeHeight: void 0,
373
377
  minHeight: void 0,
374
378
  theme: a?.theme,
375
- ...k ? {
376
- highlightedDataPoints: k,
377
- highlightedIds: k?.map((e) => `${e}`),
378
- highlightedLines: k?.map((e) => e)
379
+ ...O ? {
380
+ highlightedDataPoints: O,
381
+ highlightedIds: O?.map((e) => `${e}`),
382
+ highlightedLines: O?.map((e) => e)
379
383
  } : {}
380
384
  } })
381
385
  ] }) : /* @__PURE__ */ o.jsx("div", { className: "w-full flex justify-center p-4", children: /* @__PURE__ */ o.jsx(pe, {}) }) });