@undp/data-viz 2.0.0 → 2.0.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 (112) hide show
  1. package/dist/BarGraph.cjs +1 -1
  2. package/dist/BarGraph.cjs.map +1 -1
  3. package/dist/BarGraph.js +957 -957
  4. package/dist/BarGraph.js.map +1 -1
  5. package/dist/BasicStatCard.cjs +1 -1
  6. package/dist/BasicStatCard.cjs.map +1 -1
  7. package/dist/BasicStatCard.js +45 -47
  8. package/dist/BasicStatCard.js.map +1 -1
  9. package/dist/BeeSwarmChart.cjs +1 -1
  10. package/dist/BeeSwarmChart.cjs.map +1 -1
  11. package/dist/BeeSwarmChart.js +76 -56
  12. package/dist/BeeSwarmChart.js.map +1 -1
  13. package/dist/BiVariateChoroplethMap.cjs +1 -1
  14. package/dist/BiVariateChoroplethMap.cjs.map +1 -1
  15. package/dist/BiVariateChoroplethMap.js +157 -157
  16. package/dist/BiVariateChoroplethMap.js.map +1 -1
  17. package/dist/ChoroplethMap.cjs +1 -1
  18. package/dist/ChoroplethMap.cjs.map +1 -1
  19. package/dist/ChoroplethMap.js +185 -185
  20. package/dist/ChoroplethMap.js.map +1 -1
  21. package/dist/CirclePackingGraph.cjs +1 -1
  22. package/dist/CirclePackingGraph.js +2 -4
  23. package/dist/CirclePackingGraph.js.map +1 -1
  24. package/dist/Data/barChart.json +70 -0
  25. package/dist/Data/basic.csv +20 -0
  26. package/dist/DifferenceLineChart.cjs +1 -1
  27. package/dist/DifferenceLineChart.cjs.map +1 -1
  28. package/dist/DifferenceLineChart.js +224 -223
  29. package/dist/DifferenceLineChart.js.map +1 -1
  30. package/dist/DotDensityMap.cjs +1 -1
  31. package/dist/DotDensityMap.cjs.map +1 -1
  32. package/dist/DotDensityMap.js +156 -156
  33. package/dist/DotDensityMap.js.map +1 -1
  34. package/dist/DualAxisLineChart.cjs +1 -1
  35. package/dist/DualAxisLineChart.cjs.map +1 -1
  36. package/dist/DualAxisLineChart.js +326 -325
  37. package/dist/DualAxisLineChart.js.map +1 -1
  38. package/dist/GeoHubCompareMaps.cjs +1 -1
  39. package/dist/GeoHubCompareMaps.cjs.map +1 -1
  40. package/dist/GeoHubCompareMaps.js +183 -183
  41. package/dist/GeoHubCompareMaps.js.map +1 -1
  42. package/dist/{GraphEl-DzRon4cb.js → GraphEl-BZne2JIx.js} +3 -3
  43. package/dist/{GraphEl-DzRon4cb.js.map → GraphEl-BZne2JIx.js.map} +1 -1
  44. package/dist/{GraphEl-BkyLYXG5.cjs → GraphEl-D5MUfp45.cjs} +2 -2
  45. package/dist/{GraphEl-BkyLYXG5.cjs.map → GraphEl-D5MUfp45.cjs.map} +1 -1
  46. package/dist/GriddedGraphs.cjs +1 -1
  47. package/dist/GriddedGraphs.js +1 -1
  48. package/dist/Histogram.cjs +1 -1
  49. package/dist/Histogram.js +1 -1
  50. package/dist/LineChartWithConfidenceInterval.cjs +1 -1
  51. package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
  52. package/dist/LineChartWithConfidenceInterval.js +133 -132
  53. package/dist/LineChartWithConfidenceInterval.js.map +1 -1
  54. package/dist/MultiGraphDashboard.cjs +1 -1
  55. package/dist/MultiGraphDashboard.cjs.map +1 -1
  56. package/dist/MultiGraphDashboard.js +52 -50
  57. package/dist/MultiGraphDashboard.js.map +1 -1
  58. package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
  59. package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
  60. package/dist/MultiGraphDashboardWideToLongFormat.js +11 -9
  61. package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
  62. package/dist/MultiLineAltChart.cjs +1 -1
  63. package/dist/MultiLineAltChart.cjs.map +1 -1
  64. package/dist/MultiLineAltChart.js +149 -148
  65. package/dist/MultiLineAltChart.js.map +1 -1
  66. package/dist/MultiLineChart.cjs +1 -1
  67. package/dist/MultiLineChart.cjs.map +1 -1
  68. package/dist/MultiLineChart.js +182 -181
  69. package/dist/MultiLineChart.js.map +1 -1
  70. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
  71. package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
  72. package/dist/PerformanceIntensiveMultiGraphDashboard.js +14 -12
  73. package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
  74. package/dist/SimpleLineChart.cjs +1 -1
  75. package/dist/SimpleLineChart.cjs.map +1 -1
  76. package/dist/SimpleLineChart.js +123 -122
  77. package/dist/SimpleLineChart.js.map +1 -1
  78. package/dist/SingleGraphDashboard.cjs +1 -1
  79. package/dist/SingleGraphDashboard.cjs.map +1 -1
  80. package/dist/SingleGraphDashboard.js +83 -79
  81. package/dist/SingleGraphDashboard.js.map +1 -1
  82. package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
  83. package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
  84. package/dist/SingleGraphDashboardGeoHubMaps.js +49 -45
  85. package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
  86. package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
  87. package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
  88. package/dist/SingleGraphDashboardThreeDGraphs.js +56 -52
  89. package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
  90. package/dist/StatCardFromData.cjs +1 -1
  91. package/dist/StatCardFromData.cjs.map +1 -1
  92. package/dist/StatCardFromData.js +44 -46
  93. package/dist/StatCardFromData.js.map +1 -1
  94. package/dist/ThreeDGlobe.cjs +1 -1
  95. package/dist/ThreeDGlobe.cjs.map +1 -1
  96. package/dist/ThreeDGlobe.js +134 -134
  97. package/dist/ThreeDGlobe.js.map +1 -1
  98. package/dist/getNoOfTicks-C_1CFXv_.cjs +2 -0
  99. package/dist/getNoOfTicks-C_1CFXv_.cjs.map +1 -0
  100. package/dist/getNoOfTicks-CpmRjcRF.js +7 -0
  101. package/dist/getNoOfTicks-CpmRjcRF.js.map +1 -0
  102. package/dist/index-C6LorfZ-.cjs +2 -0
  103. package/dist/index-C6LorfZ-.cjs.map +1 -0
  104. package/dist/index-Ceppbd8C.js +342 -0
  105. package/dist/index-Ceppbd8C.js.map +1 -0
  106. package/dist/index.cjs +1 -1
  107. package/dist/index.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/index-DoY3Ga3W.cjs +0 -2
  110. package/dist/index-DoY3Ga3W.cjs.map +0 -1
  111. package/dist/index-leTnKT2q.js +0 -329
  112. package/dist/index-leTnKT2q.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { j as a, m as rt, c as at } from "./index-CHPV5EwG-Curnpaqc.js";
2
- import { useState as T, useRef as Xe, useEffect as A, useCallback as st, useEffectEvent as it } from "react";
2
+ import { useState as A, useRef as Xe, useEffect as E, useCallback as st, useEffectEvent as it } from "react";
3
3
  import { w as nt } from "./Spinner-D7rnnwnA.js";
4
4
  import lt from "react-globe.gl";
5
5
  import { i as ct } from "./index-Bwrro8-q.js";
@@ -43,16 +43,16 @@ function Dt(t) {
43
43
  function jt(t) {
44
44
  const {
45
45
  width: e,
46
- autoRotate: d,
47
- data: b,
48
- enableZoom: x,
49
- categorical: S,
50
- colorDomain: f,
51
- colors: p,
52
- globeMaterial: D,
53
- height: n,
46
+ autoRotate: c,
47
+ data: v,
48
+ enableZoom: b,
49
+ categorical: C,
50
+ colorDomain: g,
51
+ colors: d,
52
+ globeMaterial: L,
53
+ height: m,
54
54
  polygonData: B,
55
- mapProperty: l,
55
+ mapProperty: n,
56
56
  mapBorderColor: Q,
57
57
  atmosphereColor: ye,
58
58
  tooltip: F,
@@ -62,41 +62,41 @@ function jt(t) {
62
62
  colorLegendTitle: u,
63
63
  showColorScale: oe,
64
64
  hoverStrokeColor: re,
65
- detailsOnClick: j,
65
+ detailsOnClick: S,
66
66
  onSeriesMouseClick: I,
67
67
  onSeriesMouseOver: be,
68
68
  resetSelectionOnDoubleClick: xe,
69
69
  highlightedIds: ae,
70
70
  scale: O,
71
- globeOffset: h,
72
- polygonAltitude: m,
71
+ globeOffset: p,
72
+ polygonAltitude: h,
73
73
  centerLng: _,
74
74
  centerLat: U,
75
75
  atmosphereAltitude: se,
76
76
  globeCurvatureResolution: W,
77
- fogSettings: P,
78
- lights: z,
77
+ fogSettings: M,
78
+ lights: P,
79
79
  highlightedAltitude: ie,
80
- selectedId: y,
80
+ selectedId: f,
81
81
  collapseColorScaleByDefault: q
82
- } = t, [V, Z] = T(!1), i = Xe(void 0), [N, L] = T(void 0), [we, ne] = T(q === void 0 ? !(e < 680) : !q), [le, ce] = T({
82
+ } = t, [V, Z] = A(!1), i = Xe(void 0), [k, D] = A(void 0), [we, ne] = A(q === void 0 ? !(e < 680) : !q), [le, ce] = A({
83
83
  x: 0,
84
84
  y: 0
85
- }), [w, de] = T(void 0), $ = S ? ft().domain(f).range(p) : yt().domain(f).range(p);
86
- A(() => {
87
- i.current && (i.current.controls().enableZoom = x);
88
- }, [x]), A(() => {
89
- i.current && (w || y ? i.current.controls().autoRotate = !1 : (i.current.controls().autoRotate = d !== 0, i.current.controls().autoRotateSpeed = d));
90
- }, [w, y, d]), A(() => {
91
- if (i.current && y) {
92
- const o = B.find((v) => v.properties[l] === y), [r, s] = gt(o);
85
+ }), [x, de] = A(void 0), $ = C ? ft().domain(g).range(d) : yt().domain(g).range(d);
86
+ E(() => {
87
+ i.current && (i.current.controls().enableZoom = b);
88
+ }, [b]), E(() => {
89
+ i.current && (x || f ? i.current.controls().autoRotate = !1 : (i.current.controls().autoRotate = c !== 0, i.current.controls().autoRotateSpeed = c));
90
+ }, [x, f, c]), E(() => {
91
+ if (i.current && f) {
92
+ const o = B.find((y) => y.properties[n] === f), [r, s] = gt(o);
93
93
  i.current.pointOfView({
94
94
  lat: s,
95
95
  lng: r,
96
96
  altitude: O
97
97
  }, 1e3);
98
98
  }
99
- }, [y, O, B, l]), A(() => {
99
+ }, [f, O, B, n]), E(() => {
100
100
  const o = i.current?.renderer().domElement;
101
101
  if (!o) return;
102
102
  const r = (s) => {
@@ -106,45 +106,45 @@ function jt(t) {
106
106
  });
107
107
  };
108
108
  return o.addEventListener("mousemove", r), () => o.removeEventListener("mousemove", r);
109
- }, []), A(() => {
109
+ }, []), E(() => {
110
110
  i.current && i.current.pointOfView({
111
111
  lat: U,
112
112
  lng: _,
113
113
  altitude: O
114
114
  }, 1e3);
115
115
  }, [O, _, U]);
116
- const C = D || new H.MeshBasicMaterial({
116
+ const w = L || new H.MeshBasicMaterial({
117
117
  color: "#FFF"
118
- }), R = st(() => {
118
+ }), z = st(() => {
119
119
  if (!i.current) return;
120
120
  const o = i.current.scene(), r = i.current.camera();
121
121
  let s = [];
122
- o.traverse((c) => {
123
- c instanceof H.Light && s.push(c);
124
- }), s = [...s, ...r.children], s.forEach((c) => c.parent?.remove(c)), z.map((c) => Dt(c)).forEach((c, G) => {
125
- z[G].type !== "ambient" && z[G].position === "camera" ? (r.add(c), z[G].type !== "point" && r.add(c.target)) : o.add(c);
126
- }), P && (o.fog = new H.Fog(P.color, P.near, P.far));
127
- }, [z, P]), M = () => {
128
- Z(!0), R();
122
+ o.traverse((l) => {
123
+ l instanceof H.Light && s.push(l);
124
+ }), s = [...s, ...r.children], s.forEach((l) => l.parent?.remove(l)), P.map((l) => Dt(l)).forEach((l, T) => {
125
+ P[T].type !== "ambient" && P[T].position === "camera" ? (r.add(l), P[T].type !== "point" && r.add(l.target)) : o.add(l);
126
+ }), M && (o.fog = new H.Fog(M.color, M.near, M.far));
127
+ }, [P, M]), j = () => {
128
+ Z(!0), z();
129
129
  };
130
- return A(() => {
131
- V && R();
132
- }, [V, R]), /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
133
- /* @__PURE__ */ a.jsx(lt, { ref: i, height: n, width: e, globeOffset: h, lineHoverPrecision: 0, polygonsData: B, polygonAltitude: (o) => ae.includes(o?.properties?.[l]) || o?.properties?.[l] === y ? ie * (o?.properties?.[l] === y ? 2 : 1) : o?.properties?.[l] === w?.id || o?.properties?.[l] === N?.id ? ie : m, polygonCapColor: (o) => {
134
- const r = o?.properties?.[l], s = b.find((v) => v.id === r)?.x;
130
+ return E(() => {
131
+ V && z();
132
+ }, [V, z]), /* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
133
+ /* @__PURE__ */ a.jsx(lt, { ref: i, height: m, width: e, globeOffset: p, lineHoverPrecision: 0, polygonsData: B, polygonAltitude: (o) => ae.includes(o?.properties?.[n]) || o?.properties?.[n] === f ? ie * (o?.properties?.[n] === f ? 2 : 1) : o?.properties?.[n] === x?.id || o?.properties?.[n] === k?.id ? ie : h, polygonCapColor: (o) => {
134
+ const r = o?.properties?.[n], s = v.find((y) => y.id === r)?.x;
135
135
  return s != null ? $(s) : te;
136
136
  }, polygonSideColor: (o) => {
137
- const r = o?.properties?.[l], s = b.find((c) => c.id === r)?.x, v = s != null ? $(s) : te;
138
- return ae.includes(o?.properties?.[l]) || o?.properties?.[l] === y ? v : "rgba(100,100,100,0)";
139
- }, polygonStrokeColor: (o) => o?.properties?.[l] === w?.id ? re : Q, onGlobeClick: () => {
140
- L(void 0);
137
+ const r = o?.properties?.[n], s = v.find((l) => l.id === r)?.x, y = s != null ? $(s) : te;
138
+ return ae.includes(o?.properties?.[n]) || o?.properties?.[n] === f ? y : "rgba(100,100,100,0)";
139
+ }, polygonStrokeColor: (o) => o?.properties?.[n] === x?.id ? re : Q, onGlobeClick: () => {
140
+ D(void 0);
141
141
  }, onPolygonClick: (o) => {
142
- const r = o?.properties?.[l] ? b.find((s) => s.id === o?.properties?.[l]) : void 0;
143
- (I || j) && (ct(N, r) && xe && r ? (L(void 0), I?.(void 0)) : (L(r), I?.(r)));
142
+ const r = o?.properties?.[n] ? v.find((s) => s.id === o?.properties?.[n]) : void 0;
143
+ (I || S) && (ct(k, r) && xe && r ? (D(void 0), I?.(void 0)) : (D(r), I?.(r)));
144
144
  }, onPolygonHover: (o) => {
145
- const r = o?.properties?.[l] ? b.find((s) => s.id === o?.properties?.[l]) : void 0;
145
+ const r = o?.properties?.[n] ? v.find((s) => s.id === o?.properties?.[n]) : void 0;
146
146
  de(r), be?.(r);
147
- }, atmosphereColor: ye, atmosphereAltitude: se, globeCurvatureResolution: W, globeMaterial: C, backgroundColor: "rgba(0, 0, 0, 0)", polygonsTransitionDuration: 100, onGlobeReady: () => {
147
+ }, atmosphereColor: ye, atmosphereAltitude: se, globeCurvatureResolution: W, globeMaterial: w, backgroundColor: "rgba(0, 0, 0, 0)", polygonsTransitionDuration: 100, onGlobeReady: () => {
148
148
  if (i.current) {
149
149
  i.current.pointOfView({
150
150
  lat: U,
@@ -152,13 +152,13 @@ function jt(t) {
152
152
  });
153
153
  const o = i.current.scene();
154
154
  setTimeout(() => {
155
- (o.children[3]?.children[0]?.children[4]?.children || []).forEach((v) => {
156
- const c = v.children[1];
157
- c.renderOrder = 2;
155
+ (o.children[3]?.children[0]?.children[4]?.children || []).forEach((y) => {
156
+ const l = y.children[1];
157
+ l.renderOrder = 2;
158
158
  });
159
159
  }, 300);
160
160
  const r = i.current.camera();
161
- o.add(r), M();
161
+ o.add(r), j();
162
162
  }
163
163
  } }),
164
164
  oe === !1 ? null : /* @__PURE__ */ a.jsx("div", { className: rt("absolute left-4 bottom-4 map-color-legend", ee?.colorLegend), children: we ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
@@ -166,57 +166,57 @@ function jt(t) {
166
166
  ne(!1);
167
167
  }, children: /* @__PURE__ */ a.jsx(mt, {}) }),
168
168
  /* @__PURE__ */ a.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
169
- width: S ? void 0 : "340px"
169
+ width: C ? void 0 : "340px"
170
170
  }, children: [
171
171
  u && u !== "" ? /* @__PURE__ */ a.jsx(Ye, { size: "xs", marginBottom: "xs", className: "p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300", style: {
172
172
  display: "-webkit-box",
173
173
  WebkitLineClamp: "1",
174
174
  WebkitBoxOrient: "vertical"
175
175
  }, children: u }) : null,
176
- S ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-3", children: f.map((o, r) => /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", children: [
176
+ C ? /* @__PURE__ */ a.jsx("div", { className: "flex flex-col gap-3", children: g.map((o, r) => /* @__PURE__ */ a.jsxs("div", { className: "flex gap-2 items-center", children: [
177
177
  /* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 rounded-full", style: {
178
- backgroundColor: p[r % p.length]
178
+ backgroundColor: d[r % d.length]
179
179
  } }),
180
180
  /* @__PURE__ */ a.jsx(Ye, { size: "sm", marginBottom: "none", leading: "none", children: o })
181
181
  ] }, r)) }) : /* @__PURE__ */ a.jsx("svg", { width: "100%", viewBox: "0 0 320 30", direction: "ltr", children: /* @__PURE__ */ a.jsxs("g", { children: [
182
- f.map((o, r) => /* @__PURE__ */ a.jsxs("g", { className: "cursor-pointer", children: [
183
- /* @__PURE__ */ a.jsx("rect", { x: r * 320 / p.length + 1, y: 1, width: 320 / p.length - 2, height: 8, style: {
184
- fill: p[r],
185
- stroke: p[r]
182
+ g.map((o, r) => /* @__PURE__ */ a.jsxs("g", { className: "cursor-pointer", children: [
183
+ /* @__PURE__ */ a.jsx("rect", { x: r * 320 / d.length + 1, y: 1, width: 320 / d.length - 2, height: 8, style: {
184
+ fill: d[r],
185
+ stroke: d[r]
186
186
  } }),
187
- /* @__PURE__ */ a.jsx("text", { x: (r + 1) * 320 / p.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
187
+ /* @__PURE__ */ a.jsx("text", { x: (r + 1) * 320 / d.length, y: 25, className: "fill-primary-gray-700 dark:fill-primary-gray-300 text-xs", style: {
188
188
  textAnchor: "middle"
189
189
  }, children: ht(o, "NA") })
190
190
  ] }, r)),
191
- /* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("rect", { x: f.length * 320 / p.length + 1, y: 1, width: 320 / p.length - 2, height: 8, style: {
192
- fill: p[f.length],
193
- stroke: p[f.length]
191
+ /* @__PURE__ */ a.jsx("g", { children: /* @__PURE__ */ a.jsx("rect", { x: g.length * 320 / d.length + 1, y: 1, width: 320 / d.length - 2, height: 8, style: {
192
+ fill: d[g.length],
193
+ stroke: d[g.length]
194
194
  } }) })
195
195
  ] }) })
196
196
  ] })
197
197
  ] }) : /* @__PURE__ */ a.jsx("button", { type: "button", className: "mb-0 border-0 bg-transparent p-0 self-start", onClick: () => {
198
198
  ne(!0);
199
199
  }, children: /* @__PURE__ */ a.jsx("div", { className: "show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500", children: "Show Legend" }) }) }),
200
- w && F ? /* @__PURE__ */ a.jsx(pt, { data: w, body: F, xPos: le.x, yPos: le.y, backgroundStyle: ve?.tooltip, className: ee?.tooltip }) : null,
201
- j && N !== void 0 ? /* @__PURE__ */ a.jsx(dt, { open: N !== void 0, onClose: () => {
202
- L(void 0);
203
- }, children: /* @__PURE__ */ a.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof j == "string" ? {
204
- __html: ut(j, N)
205
- } : void 0, children: typeof j == "function" ? j(N) : null }) }) : null
200
+ x && F ? /* @__PURE__ */ a.jsx(pt, { data: x, body: F, xPos: le.x, yPos: le.y, backgroundStyle: ve?.tooltip, className: ee?.tooltip }) : null,
201
+ S && k !== void 0 ? /* @__PURE__ */ a.jsx(dt, { open: k !== void 0, onClose: () => {
202
+ D(void 0);
203
+ }, children: /* @__PURE__ */ a.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof S == "string" ? {
204
+ __html: ut(S, k)
205
+ } : void 0, children: typeof S == "function" ? S(k) : null }) }) : null
206
206
  ] });
207
207
  }
208
208
  function to(t) {
209
209
  const e = at.c(96), {
210
- data: d,
211
- mapData: b,
212
- graphTitle: x,
213
- colors: S,
214
- sources: f,
215
- graphDescription: p,
216
- height: D,
217
- width: n,
210
+ data: c,
211
+ mapData: v,
212
+ graphTitle: b,
213
+ colors: C,
214
+ sources: g,
215
+ graphDescription: d,
216
+ height: L,
217
+ width: m,
218
218
  footNote: B,
219
- colorDomain: l,
219
+ colorDomain: n,
220
220
  colorLegendTitle: Q,
221
221
  scaleType: ye,
222
222
  padding: F,
@@ -226,47 +226,47 @@ function to(t) {
226
226
  relativeHeight: u,
227
227
  tooltip: oe,
228
228
  graphID: re,
229
- mapProperty: j,
229
+ mapProperty: S,
230
230
  dataDownload: I,
231
231
  language: be,
232
232
  minHeight: xe,
233
233
  theme: ae,
234
234
  ariaLabel: O,
235
- styles: h,
236
- classNames: m,
235
+ styles: p,
236
+ classNames: h,
237
237
  autoRotate: _,
238
238
  enableZoom: U,
239
239
  globeMaterial: se,
240
240
  centerPoint: W,
241
- atmosphereColor: P,
242
- showColorScale: z,
241
+ atmosphereColor: M,
242
+ showColorScale: P,
243
243
  resetSelectionOnDoubleClick: ie,
244
- detailsOnClick: y,
244
+ detailsOnClick: f,
245
245
  onSeriesMouseOver: q,
246
246
  onSeriesMouseClick: V,
247
247
  highlightedIds: Z,
248
248
  highlightedAltitude: i,
249
- scale: N,
250
- globeOffset: L,
249
+ scale: k,
250
+ globeOffset: D,
251
251
  polygonAltitude: we,
252
252
  globeCurvatureResolution: ne,
253
253
  atmosphereAltitude: le,
254
254
  fogSettings: ce,
255
- lights: w,
255
+ lights: x,
256
256
  selectedId: de,
257
257
  collapseColorScaleByDefault: $
258
- } = t, C = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, R = B === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : B, M = ye === void 0 ? "threshold" : ye, o = ve === void 0 ? K.light.graphNoData : ve, r = ee === void 0 ? !1 : ee, s = te === void 0 ? K.light.grays["gray-500"] : te, v = j === void 0 ? "ISO3" : j, c = I === void 0 ? !1 : I, G = be === void 0 ? "en" : be, g = xe === void 0 ? 0 : xe, E = ae === void 0 ? "light" : ae, pe = _ === void 0 ? !0 : _, Ae = U === void 0 ? !0 : U;
258
+ } = t, w = v === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : v, z = B === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : B, j = ye === void 0 ? "threshold" : ye, o = ve === void 0 ? K.light.graphNoData : ve, r = ee === void 0 ? !1 : ee, s = te === void 0 ? K.light.grays["gray-500"] : te, y = S === void 0 ? "ISO3" : S, l = I === void 0 ? !1 : I, T = be === void 0 ? "en" : be, N = xe === void 0 ? 0 : xe, R = ae === void 0 ? "light" : ae, pe = _ === void 0 ? !0 : _, Ae = U === void 0 ? !0 : U;
259
259
  let Ce;
260
260
  e[0] !== W ? (Ce = W === void 0 ? [0, 0] : W, e[0] = W, e[1] = Ce) : Ce = e[1];
261
- const Se = Ce, Te = P === void 0 ? "#999" : P, Ge = z === void 0 ? !0 : z, He = ie === void 0 ? !0 : ie;
261
+ const Se = Ce, Te = M === void 0 ? "#999" : M, Ge = P === void 0 ? !0 : P, He = ie === void 0 ? !0 : ie;
262
262
  let ke;
263
263
  e[2] !== Z ? (ke = Z === void 0 ? [] : Z, e[2] = Z, e[3] = ke) : ke = e[3];
264
- const Be = ke, Fe = i === void 0 ? 0.1 : i, Ie = N === void 0 ? 1 : N;
264
+ const Be = ke, Fe = i === void 0 ? 0.1 : i, Ie = k === void 0 ? 1 : k;
265
265
  let De;
266
- e[4] !== L ? (De = L === void 0 ? [0, 0] : L, e[4] = L, e[5] = De) : De = e[5];
266
+ e[4] !== D ? (De = D === void 0 ? [0, 0] : D, e[4] = D, e[5] = De) : De = e[5];
267
267
  const _e = De, Ue = we === void 0 ? 0.01 : we, We = ne === void 0 ? 4 : ne, qe = le === void 0 ? 0.15 : le;
268
268
  let je;
269
- e[6] !== w ? (je = w === void 0 ? [{
269
+ e[6] !== x ? (je = x === void 0 ? [{
270
270
  type: "ambient",
271
271
  color: 4210752,
272
272
  intensity: 0.4
@@ -279,61 +279,61 @@ function to(t) {
279
279
  y: 10,
280
280
  z: 5
281
281
  }
282
- }] : w, e[6] = w, e[7] = je) : je = e[7];
283
- const Ve = je, [Ne, Ke] = T(void 0), [k, Qe] = T(0), [he, et] = T(0), Ze = Xe(null), tt = Xe(null);
284
- let Le, Me;
282
+ }] : x, e[6] = x, e[7] = je) : je = e[7];
283
+ const Ve = je, [Ne, Ke] = A(void 0), [G, Qe] = A(0), [he, et] = A(0), Ze = Xe(null), tt = Xe(null);
284
+ let Le, Oe;
285
285
  e[8] === Symbol.for("react.memo_cache_sentinel") ? (Le = () => {
286
286
  const ge = new ResizeObserver((fe) => {
287
287
  Qe(fe[0].target.clientWidth || 620), et(fe[0].target.clientHeight || 480);
288
288
  });
289
289
  return Ze.current && ge.observe(Ze.current), () => ge.disconnect();
290
- }, Me = [], e[8] = Le, e[9] = Me) : (Le = e[8], Me = e[9]), A(Le, Me);
291
- let Oe;
292
- e[10] === Symbol.for("react.memo_cache_sentinel") ? (Oe = (ge) => {
290
+ }, Oe = [], e[8] = Le, e[9] = Oe) : (Le = e[8], Oe = e[9]), E(Le, Oe);
291
+ let Me;
292
+ e[10] === Symbol.for("react.memo_cache_sentinel") ? (Me = (ge) => {
293
293
  Ke(ge);
294
- }, e[10] = Oe) : Oe = e[10];
295
- const me = it(Oe);
294
+ }, e[10] = Me) : Me = e[10];
295
+ const me = it(Me);
296
296
  let Pe;
297
- e[11] !== C || e[12] !== me ? (Pe = () => {
298
- typeof C == "string" ? xt(C).then((fe) => {
299
- if (C === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
297
+ e[11] !== w || e[12] !== me ? (Pe = () => {
298
+ typeof w == "string" ? xt(w).then((fe) => {
299
+ if (w === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
300
300
  const ot = fe.features.map(Rt);
301
301
  me(ot);
302
302
  } else
303
303
  me(fe.features);
304
- }) : me(C.features);
305
- }, e[11] = C, e[12] = me, e[13] = Pe) : Pe = e[13];
304
+ }) : me(w.features);
305
+ }, e[11] = w, e[12] = me, e[13] = Pe) : Pe = e[13];
306
306
  let ze;
307
- e[14] !== C ? (ze = [C], e[14] = C, e[15] = ze) : ze = e[15], A(Pe, ze);
307
+ e[14] !== w ? (ze = [w], e[14] = w, e[15] = ze) : ze = e[15], E(Pe, ze);
308
308
  let Re;
309
- e[16] !== l || e[17] !== S?.length || e[18] !== d || e[19] !== M ? (Re = l || (M === "categorical" ? wt(d, "x") : Ct(d.map(zt), S?.length || 4)), e[16] = l, e[17] = S?.length, e[18] = d, e[19] = M, e[20] = Re) : Re = e[20];
310
- const ue = Re, $e = m?.graphContainer, Je = h?.graphContainer;
309
+ e[16] !== n || e[17] !== C?.length || e[18] !== c || e[19] !== j ? (Re = n || (j === "categorical" ? wt(c, "x") : Ct(c.map(zt), C?.length || 4)), e[16] = n, e[17] = C?.length, e[18] = c, e[19] = j, e[20] = Re) : Re = e[20];
310
+ const ue = Re, $e = h?.graphContainer, Je = p?.graphContainer;
311
311
  let J;
312
- e[21] !== m?.description || e[22] !== m?.title || e[23] !== d || e[24] !== c || e[25] !== p || e[26] !== x || e[27] !== h?.description || e[28] !== h?.title || e[29] !== n ? (J = x || p || c ? /* @__PURE__ */ a.jsx(vt, { styles: {
312
+ e[21] !== h?.description || e[22] !== h?.title || e[23] !== c || e[24] !== l || e[25] !== d || e[26] !== b || e[27] !== p?.description || e[28] !== p?.title || e[29] !== m ? (J = b || d || l ? /* @__PURE__ */ a.jsx(vt, { styles: {
313
+ title: p?.title,
314
+ description: p?.description
315
+ }, classNames: {
313
316
  title: h?.title,
314
317
  description: h?.description
315
- }, classNames: {
316
- title: m?.title,
317
- description: m?.description
318
- }, graphTitle: x, graphDescription: p, width: n, graphDownload: void 0, dataDownload: c ? d.map(Pt).filter(Ot).length > 0 ? d.map(Mt).filter(Lt) : d.filter(Nt) : null }) : null, e[21] = m?.description, e[22] = m?.title, e[23] = d, e[24] = c, e[25] = p, e[26] = x, e[27] = h?.description, e[28] = h?.title, e[29] = n, e[30] = J) : J = e[30];
318
+ }, graphTitle: b, graphDescription: d, width: m, graphDownload: void 0, dataDownload: l ? c.map(Pt).filter(Mt).length > 0 ? c.map(Ot).filter(Lt) : c.filter(Nt) : null }) : null, e[21] = h?.description, e[22] = h?.title, e[23] = c, e[24] = l, e[25] = d, e[26] = b, e[27] = p?.description, e[28] = p?.title, e[29] = m, e[30] = J) : J = e[30];
319
319
  let X;
320
- e[31] !== qe || e[32] !== Te || e[33] !== pe || e[34] !== Se || e[35] !== m || e[36] !== $ || e[37] !== Q || e[38] !== S || e[39] !== d || e[40] !== y || e[41] !== ue || e[42] !== Ae || e[43] !== ce || e[44] !== We || e[45] !== se || e[46] !== _e || e[47] !== D || e[48] !== Fe || e[49] !== Be || e[50] !== Ve || e[51] !== s || e[52] !== o || e[53] !== v || e[54] !== Ne || e[55] !== g || e[56] !== V || e[57] !== q || e[58] !== Ue || e[59] !== u || e[60] !== He || e[61] !== Ie || e[62] !== M || e[63] !== de || e[64] !== Ge || e[65] !== h || e[66] !== he || e[67] !== k || e[68] !== E || e[69] !== oe || e[70] !== n ? (X = /* @__PURE__ */ a.jsx(St, { ref: Ze, children: k && he && Ne ? /* @__PURE__ */ a.jsx(jt, { data: d, globeOffset: _e, polygonData: Ne, colorDomain: ue, width: n || k, height: Math.max(g, D || (u ? g ? (n || k) * u > g ? (n || k) * u : g : (n || k) * u : he)), colors: S || (M === "categorical" ? K[E].sequentialColors[`neutralColorsx0${ue.length}`] : K[E].sequentialColors[`neutralColorsx0${ue.length + 1}`]), mapNoDataColor: o, categorical: M === "categorical", mapBorderColor: s, tooltip: oe, mapProperty: v, styles: h, classNames: m, autoRotate: pe === !0 ? 1.5 : pe === !1 ? 0 : pe, enableZoom: Ae, globeMaterial: se, atmosphereColor: Te, colorLegendTitle: Q, showColorScale: Ge, hoverStrokeColor: E === "light" ? K.light.grays["gray-700"] : K.light.grays["gray-300"], highlightedIds: Be, resetSelectionOnDoubleClick: He, detailsOnClick: y, onSeriesMouseOver: q, onSeriesMouseClick: V, scale: Ie, polygonAltitude: Ue, centerLat: Se[0], centerLng: Se[1], atmosphereAltitude: qe, globeCurvatureResolution: We, fogSettings: ce, lights: Ve, highlightedAltitude: Fe, selectedId: de, collapseColorScaleByDefault: $ }) : /* @__PURE__ */ a.jsx("div", { style: {
321
- height: `${Math.max(g, D || (u ? g ? (n || k) * u > g ? (n || k) * u : g : (n || k) * u : he))}px`
322
- }, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(nt, { "aria-label": "Loading graph" }) }) }), e[31] = qe, e[32] = Te, e[33] = pe, e[34] = Se, e[35] = m, e[36] = $, e[37] = Q, e[38] = S, e[39] = d, e[40] = y, e[41] = ue, e[42] = Ae, e[43] = ce, e[44] = We, e[45] = se, e[46] = _e, e[47] = D, e[48] = Fe, e[49] = Be, e[50] = Ve, e[51] = s, e[52] = o, e[53] = v, e[54] = Ne, e[55] = g, e[56] = V, e[57] = q, e[58] = Ue, e[59] = u, e[60] = He, e[61] = Ie, e[62] = M, e[63] = de, e[64] = Ge, e[65] = h, e[66] = he, e[67] = k, e[68] = E, e[69] = oe, e[70] = n, e[71] = X) : X = e[71];
320
+ e[31] !== qe || e[32] !== Te || e[33] !== pe || e[34] !== Se || e[35] !== h || e[36] !== $ || e[37] !== Q || e[38] !== C || e[39] !== c || e[40] !== f || e[41] !== ue || e[42] !== Ae || e[43] !== ce || e[44] !== We || e[45] !== se || e[46] !== _e || e[47] !== L || e[48] !== Fe || e[49] !== Be || e[50] !== Ve || e[51] !== s || e[52] !== o || e[53] !== y || e[54] !== Ne || e[55] !== N || e[56] !== V || e[57] !== q || e[58] !== Ue || e[59] !== u || e[60] !== He || e[61] !== Ie || e[62] !== j || e[63] !== de || e[64] !== Ge || e[65] !== p || e[66] !== he || e[67] !== G || e[68] !== R || e[69] !== oe || e[70] !== m ? (X = /* @__PURE__ */ a.jsx(St, { ref: Ze, children: G && he && Ne ? /* @__PURE__ */ a.jsx(jt, { data: c, globeOffset: _e, polygonData: Ne, colorDomain: ue, width: G, height: he, colors: C || (j === "categorical" ? K[R].sequentialColors[`neutralColorsx0${ue.length}`] : K[R].sequentialColors[`neutralColorsx0${ue.length + 1}`]), mapNoDataColor: o, categorical: j === "categorical", mapBorderColor: s, tooltip: oe, mapProperty: y, styles: p, classNames: h, autoRotate: pe === !0 ? 1.5 : pe === !1 ? 0 : pe, enableZoom: Ae, globeMaterial: se, atmosphereColor: Te, colorLegendTitle: Q, showColorScale: Ge, hoverStrokeColor: R === "light" ? K.light.grays["gray-700"] : K.light.grays["gray-300"], highlightedIds: Be, resetSelectionOnDoubleClick: He, detailsOnClick: f, onSeriesMouseOver: q, onSeriesMouseClick: V, scale: Ie, polygonAltitude: Ue, centerLat: Se[0], centerLng: Se[1], atmosphereAltitude: qe, globeCurvatureResolution: We, fogSettings: ce, lights: Ve, highlightedAltitude: Fe, selectedId: de, collapseColorScaleByDefault: $ }) : /* @__PURE__ */ a.jsx("div", { style: {
321
+ height: `${Math.max(N, L || (u ? N ? (m || G) * u > N ? (m || G) * u : N : (m || G) * u : he))}px`
322
+ }, className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(nt, { "aria-label": "Loading graph" }) }) }), e[31] = qe, e[32] = Te, e[33] = pe, e[34] = Se, e[35] = h, e[36] = $, e[37] = Q, e[38] = C, e[39] = c, e[40] = f, e[41] = ue, e[42] = Ae, e[43] = ce, e[44] = We, e[45] = se, e[46] = _e, e[47] = L, e[48] = Fe, e[49] = Be, e[50] = Ve, e[51] = s, e[52] = o, e[53] = y, e[54] = Ne, e[55] = N, e[56] = V, e[57] = q, e[58] = Ue, e[59] = u, e[60] = He, e[61] = Ie, e[62] = j, e[63] = de, e[64] = Ge, e[65] = p, e[66] = he, e[67] = G, e[68] = R, e[69] = oe, e[70] = m, e[71] = X) : X = e[71];
323
323
  let Y;
324
- e[72] !== m?.footnote || e[73] !== m?.source || e[74] !== R || e[75] !== f || e[76] !== h?.footnote || e[77] !== h?.source || e[78] !== n ? (Y = f || R ? /* @__PURE__ */ a.jsx(bt, { styles: {
324
+ e[72] !== h?.footnote || e[73] !== h?.source || e[74] !== z || e[75] !== g || e[76] !== p?.footnote || e[77] !== p?.source || e[78] !== m ? (Y = g || z ? /* @__PURE__ */ a.jsx(bt, { styles: {
325
+ footnote: p?.footnote,
326
+ source: p?.source
327
+ }, classNames: {
325
328
  footnote: h?.footnote,
326
329
  source: h?.source
327
- }, classNames: {
328
- footnote: m?.footnote,
329
- source: m?.source
330
- }, sources: f, footNote: R, width: n }) : null, e[72] = m?.footnote, e[73] = m?.source, e[74] = R, e[75] = f, e[76] = h?.footnote, e[77] = h?.source, e[78] = n, e[79] = Y) : Y = e[79];
330
+ }, sources: g, footNote: z, width: m }) : null, e[72] = h?.footnote, e[73] = h?.source, e[74] = z, e[75] = g, e[76] = p?.footnote, e[77] = p?.source, e[78] = m, e[79] = Y) : Y = e[79];
331
331
  let Ee;
332
- return e[80] !== O || e[81] !== r || e[82] !== re || e[83] !== D || e[84] !== G || e[85] !== g || e[86] !== F || e[87] !== u || e[88] !== $e || e[89] !== Je || e[90] !== J || e[91] !== X || e[92] !== Y || e[93] !== E || e[94] !== n ? (Ee = /* @__PURE__ */ a.jsxs(kt, { className: $e, style: Je, id: re, ref: tt, "aria-label": O, backgroundColor: r, theme: E, language: G, minHeight: g, width: n, height: D, relativeHeight: u, padding: F, children: [
332
+ return e[80] !== O || e[81] !== r || e[82] !== re || e[83] !== L || e[84] !== T || e[85] !== N || e[86] !== F || e[87] !== u || e[88] !== $e || e[89] !== Je || e[90] !== J || e[91] !== X || e[92] !== Y || e[93] !== R || e[94] !== m ? (Ee = /* @__PURE__ */ a.jsxs(kt, { className: $e, style: Je, id: re, ref: tt, "aria-label": O, backgroundColor: r, theme: R, language: T, minHeight: N, width: m, height: L, relativeHeight: u, padding: F, children: [
333
333
  J,
334
334
  X,
335
335
  Y
336
- ] }), e[80] = O, e[81] = r, e[82] = re, e[83] = D, e[84] = G, e[85] = g, e[86] = F, e[87] = u, e[88] = $e, e[89] = Je, e[90] = J, e[91] = X, e[92] = Y, e[93] = E, e[94] = n, e[95] = Ee) : Ee = e[95], Ee;
336
+ ] }), e[80] = O, e[81] = r, e[82] = re, e[83] = L, e[84] = T, e[85] = N, e[86] = F, e[87] = u, e[88] = $e, e[89] = Je, e[90] = J, e[91] = X, e[92] = Y, e[93] = R, e[94] = m, e[95] = Ee) : Ee = e[95], Ee;
337
337
  }
338
338
  function Nt(t) {
339
339
  return t !== void 0;
@@ -341,10 +341,10 @@ function Nt(t) {
341
341
  function Lt(t) {
342
342
  return t !== void 0;
343
343
  }
344
- function Mt(t) {
344
+ function Ot(t) {
345
345
  return t.data;
346
346
  }
347
- function Ot(t) {
347
+ function Mt(t) {
348
348
  return t !== void 0;
349
349
  }
350
350
  function Pt(t) {
@@ -355,27 +355,27 @@ function zt(t) {
355
355
  }
356
356
  function Rt(t) {
357
357
  if (t.geometry.type === "Polygon") {
358
- const b = [...t.geometry.coordinates[0]].reverse(), x = {
358
+ const v = [...t.geometry.coordinates[0]].reverse(), b = {
359
359
  ...t.geometry,
360
- coordinates: [b]
360
+ coordinates: [v]
361
361
  };
362
362
  return {
363
363
  ...t,
364
- geometry: x
364
+ geometry: b
365
365
  };
366
366
  }
367
367
  const e = [];
368
- t.geometry.coordinates.forEach((b) => {
369
- const x = [...b[0]].reverse();
370
- e.push([x]);
368
+ t.geometry.coordinates.forEach((v) => {
369
+ const b = [...v[0]].reverse();
370
+ e.push([b]);
371
371
  });
372
- const d = {
372
+ const c = {
373
373
  ...t.geometry,
374
374
  coordinates: e
375
375
  };
376
376
  return {
377
377
  ...t,
378
- geometry: d
378
+ geometry: c
379
379
  };
380
380
  }
381
381
  export {