@undp/data-viz 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +959 -959
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.js +45 -47
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +76 -56
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +157 -157
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +2 -2
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +185 -185
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -4
- package/dist/CirclePackingGraph.js.map +1 -1
- package/dist/Data/barChart.json +70 -0
- package/dist/Data/basic.csv +20 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +224 -223
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +32 -24
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +156 -156
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +326 -325
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +2 -2
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +183 -183
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/{GraphEl-DzRon4cb.js → GraphEl-BZne2JIx.js} +3 -3
- package/dist/{GraphEl-DzRon4cb.js.map → GraphEl-BZne2JIx.js.map} +1 -1
- package/dist/{GraphEl-BkyLYXG5.cjs → GraphEl-D5MUfp45.cjs} +2 -2
- package/dist/{GraphEl-BkyLYXG5.cjs.map → GraphEl-D5MUfp45.cjs.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +2 -2
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +133 -132
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.js +52 -50
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +11 -9
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +149 -148
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +182 -181
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +14 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +123 -122
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.js +83 -79
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.js +49 -45
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +56 -52
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.js +44 -46
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +134 -134
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/{XAxesLabels-D5X8jngD.cjs → XAxesLabels-C1XSXoWG.cjs} +2 -2
- package/dist/XAxesLabels-C1XSXoWG.cjs.map +1 -0
- package/dist/{XAxesLabels-DNO0KmjL.js → XAxesLabels-Dmbk50u4.js} +18 -16
- package/dist/XAxesLabels-Dmbk50u4.js.map +1 -0
- package/dist/YAxesLabels-1XTb-D0_.js +72 -0
- package/dist/YAxesLabels-1XTb-D0_.js.map +1 -0
- package/dist/YAxesLabels-pjdsVwIM.cjs +2 -0
- package/dist/YAxesLabels-pjdsVwIM.cjs.map +1 -0
- package/dist/getNoOfTicks-C_1CFXv_.cjs +2 -0
- package/dist/getNoOfTicks-C_1CFXv_.cjs.map +1 -0
- package/dist/getNoOfTicks-CpmRjcRF.js +7 -0
- package/dist/getNoOfTicks-CpmRjcRF.js.map +1 -0
- package/dist/index-C6LorfZ-.cjs +2 -0
- package/dist/index-C6LorfZ-.cjs.map +1 -0
- package/dist/index-Ceppbd8C.js +342 -0
- package/dist/index-Ceppbd8C.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/XAxesLabels-D5X8jngD.cjs.map +0 -1
- package/dist/XAxesLabels-DNO0KmjL.js.map +0 -1
- package/dist/YAxesLabels-DcS85Beo.cjs +0 -2
- package/dist/YAxesLabels-DcS85Beo.cjs.map +0 -1
- package/dist/YAxesLabels-Dnnng49-.js +0 -70
- package/dist/YAxesLabels-Dnnng49-.js.map +0 -1
- package/dist/index-DoY3Ga3W.cjs +0 -2
- package/dist/index-DoY3Ga3W.cjs.map +0 -1
- package/dist/index-leTnKT2q.js +0 -329
- package/dist/index-leTnKT2q.js.map +0 -1
package/dist/ThreeDGlobe.js
CHANGED
|
@@ -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
|
|
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:
|
|
47
|
-
data:
|
|
48
|
-
enableZoom:
|
|
49
|
-
categorical:
|
|
50
|
-
colorDomain:
|
|
51
|
-
colors:
|
|
52
|
-
globeMaterial:
|
|
53
|
-
height:
|
|
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:
|
|
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:
|
|
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:
|
|
72
|
-
polygonAltitude:
|
|
71
|
+
globeOffset: p,
|
|
72
|
+
polygonAltitude: h,
|
|
73
73
|
centerLng: _,
|
|
74
74
|
centerLat: U,
|
|
75
75
|
atmosphereAltitude: se,
|
|
76
76
|
globeCurvatureResolution: W,
|
|
77
|
-
fogSettings:
|
|
78
|
-
lights:
|
|
77
|
+
fogSettings: M,
|
|
78
|
+
lights: P,
|
|
79
79
|
highlightedAltitude: ie,
|
|
80
|
-
selectedId:
|
|
80
|
+
selectedId: f,
|
|
81
81
|
collapseColorScaleByDefault: q
|
|
82
|
-
} = t, [V, Z] =
|
|
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
|
-
}), [
|
|
86
|
-
|
|
87
|
-
i.current && (i.current.controls().enableZoom =
|
|
88
|
-
}, [
|
|
89
|
-
i.current && (
|
|
90
|
-
}, [
|
|
91
|
-
if (i.current &&
|
|
92
|
-
const o = B.find((
|
|
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
|
-
}, [
|
|
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
|
-
}, []),
|
|
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
|
|
116
|
+
const w = L || new H.MeshBasicMaterial({
|
|
117
117
|
color: "#FFF"
|
|
118
|
-
}),
|
|
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((
|
|
123
|
-
|
|
124
|
-
}), s = [...s, ...r.children], s.forEach((
|
|
125
|
-
|
|
126
|
-
}),
|
|
127
|
-
}, [
|
|
128
|
-
Z(!0),
|
|
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
|
|
131
|
-
V &&
|
|
132
|
-
}, [V,
|
|
133
|
-
/* @__PURE__ */ a.jsx(lt, { ref: i, height:
|
|
134
|
-
const r = o?.properties?.[
|
|
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?.[
|
|
138
|
-
return ae.includes(o?.properties?.[
|
|
139
|
-
}, polygonStrokeColor: (o) => o?.properties?.[
|
|
140
|
-
|
|
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?.[
|
|
143
|
-
(I ||
|
|
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?.[
|
|
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:
|
|
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((
|
|
156
|
-
const
|
|
157
|
-
|
|
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),
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
183
|
-
/* @__PURE__ */ a.jsx("rect", { x: r * 320 /
|
|
184
|
-
fill:
|
|
185
|
-
stroke:
|
|
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 /
|
|
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:
|
|
192
|
-
fill:
|
|
193
|
-
stroke:
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}, children: /* @__PURE__ */ a.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof
|
|
204
|
-
__html: ut(
|
|
205
|
-
} : void 0, children: typeof
|
|
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:
|
|
211
|
-
mapData:
|
|
212
|
-
graphTitle:
|
|
213
|
-
colors:
|
|
214
|
-
sources:
|
|
215
|
-
graphDescription:
|
|
216
|
-
height:
|
|
217
|
-
width:
|
|
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:
|
|
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:
|
|
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:
|
|
236
|
-
classNames:
|
|
235
|
+
styles: p,
|
|
236
|
+
classNames: h,
|
|
237
237
|
autoRotate: _,
|
|
238
238
|
enableZoom: U,
|
|
239
239
|
globeMaterial: se,
|
|
240
240
|
centerPoint: W,
|
|
241
|
-
atmosphereColor:
|
|
242
|
-
showColorScale:
|
|
241
|
+
atmosphereColor: M,
|
|
242
|
+
showColorScale: P,
|
|
243
243
|
resetSelectionOnDoubleClick: ie,
|
|
244
|
-
detailsOnClick:
|
|
244
|
+
detailsOnClick: f,
|
|
245
245
|
onSeriesMouseOver: q,
|
|
246
246
|
onSeriesMouseClick: V,
|
|
247
247
|
highlightedIds: Z,
|
|
248
248
|
highlightedAltitude: i,
|
|
249
|
-
scale:
|
|
250
|
-
globeOffset:
|
|
249
|
+
scale: k,
|
|
250
|
+
globeOffset: D,
|
|
251
251
|
polygonAltitude: we,
|
|
252
252
|
globeCurvatureResolution: ne,
|
|
253
253
|
atmosphereAltitude: le,
|
|
254
254
|
fogSettings: ce,
|
|
255
|
-
lights:
|
|
255
|
+
lights: x,
|
|
256
256
|
selectedId: de,
|
|
257
257
|
collapseColorScaleByDefault: $
|
|
258
|
-
} = t,
|
|
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 =
|
|
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 =
|
|
264
|
+
const Be = ke, Fe = i === void 0 ? 0.1 : i, Ie = k === void 0 ? 1 : k;
|
|
265
265
|
let De;
|
|
266
|
-
e[4] !==
|
|
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] !==
|
|
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
|
-
}] :
|
|
283
|
-
const Ve = je, [Ne, Ke] =
|
|
284
|
-
let Le,
|
|
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
|
-
},
|
|
291
|
-
let
|
|
292
|
-
e[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
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] =
|
|
295
|
-
const me = it(
|
|
294
|
+
}, e[10] = Me) : Me = e[10];
|
|
295
|
+
const me = it(Me);
|
|
296
296
|
let Pe;
|
|
297
|
-
e[11] !==
|
|
298
|
-
typeof
|
|
299
|
-
if (
|
|
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(
|
|
305
|
-
}, e[11] =
|
|
304
|
+
}) : me(w.features);
|
|
305
|
+
}, e[11] = w, e[12] = me, e[13] = Pe) : Pe = e[13];
|
|
306
306
|
let ze;
|
|
307
|
-
e[14] !==
|
|
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] !==
|
|
310
|
-
const ue = Re, $e =
|
|
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] !==
|
|
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
|
-
},
|
|
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] !==
|
|
321
|
-
height: `${Math.max(
|
|
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] =
|
|
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] !==
|
|
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
|
-
},
|
|
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] !==
|
|
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] =
|
|
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
|
|
344
|
+
function Ot(t) {
|
|
345
345
|
return t.data;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
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
|
|
358
|
+
const v = [...t.geometry.coordinates[0]].reverse(), b = {
|
|
359
359
|
...t.geometry,
|
|
360
|
-
coordinates: [
|
|
360
|
+
coordinates: [v]
|
|
361
361
|
};
|
|
362
362
|
return {
|
|
363
363
|
...t,
|
|
364
|
-
geometry:
|
|
364
|
+
geometry: b
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
367
|
const e = [];
|
|
368
|
-
t.geometry.coordinates.forEach((
|
|
369
|
-
const
|
|
370
|
-
e.push([
|
|
368
|
+
t.geometry.coordinates.forEach((v) => {
|
|
369
|
+
const b = [...v[0]].reverse();
|
|
370
|
+
e.push([b]);
|
|
371
371
|
});
|
|
372
|
-
const
|
|
372
|
+
const c = {
|
|
373
373
|
...t.geometry,
|
|
374
374
|
coordinates: e
|
|
375
375
|
};
|
|
376
376
|
return {
|
|
377
377
|
...t,
|
|
378
|
-
geometry:
|
|
378
|
+
geometry: c
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
export {
|