@undp/data-viz 1.5.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.js +3 -2
- package/dist/AreaChart.js.map +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +1196 -1224
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +130 -142
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +41 -41
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +483 -487
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +99 -99
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +125 -125
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/DataCards.cjs +2 -2
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +6 -6
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.js +66 -68
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +3 -2
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +205 -205
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +78 -81
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +3 -2
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +64 -65
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/{GraphEl-4RUlclvW.cjs → GraphEl-BcYgMnN2.cjs} +2 -2
- package/dist/{GraphEl-4RUlclvW.cjs.map → GraphEl-BcYgMnN2.cjs.map} +1 -1
- package/dist/{GraphEl-ClIxlWa3.js → GraphEl-CMWeARJ3.js} +2 -2
- package/dist/{GraphEl-ClIxlWa3.js.map → GraphEl-CMWeARJ3.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +4 -4
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +83 -83
- package/dist/HeatMap.js.map +1 -1
- 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 +7 -6
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +2 -2
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +82 -91
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +3 -2
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +2 -2
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +124 -130
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +200 -200
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +149 -155
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +44 -43
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +4 -4
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +107 -113
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.js +3 -2
- package/dist/SparkLine.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +159 -159
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +3 -3
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +194 -200
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/ensureCompleteData-DkQYPeDa.cjs +2 -0
- package/dist/ensureCompleteData-DkQYPeDa.cjs.map +1 -0
- package/dist/{ensureCompleteData-BALdOrsS.js → ensureCompleteData-DlmibgaI.js} +28 -8
- package/dist/ensureCompleteData-DlmibgaI.js.map +1 -0
- package/dist/fetchAndParseData-Ba-_CgxS.cjs +16 -0
- package/dist/fetchAndParseData-Ba-_CgxS.cjs.map +1 -0
- package/dist/fetchAndParseData-sapWbnYk.js +583 -0
- package/dist/fetchAndParseData-sapWbnYk.js.map +1 -0
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/getJenks-BbngDoBQ.js +19 -0
- package/dist/getJenks-BbngDoBQ.js.map +1 -0
- package/dist/getJenks-GYmdwBqm.cjs +2 -0
- package/dist/getJenks-GYmdwBqm.cjs.map +1 -0
- package/dist/getSliderMarks-9cNoRkDx.js +1023 -0
- package/dist/getSliderMarks-9cNoRkDx.js.map +1 -0
- package/dist/getSliderMarks-CRIbTGYV.cjs +6 -0
- package/dist/getSliderMarks-CRIbTGYV.cjs.map +1 -0
- package/dist/getUniqValue-DiCh_MOD.js +13 -0
- package/dist/getUniqValue-DiCh_MOD.js.map +1 -0
- package/dist/getUniqValue-RViz8tTw.cjs +2 -0
- package/dist/getUniqValue-RViz8tTw.cjs.map +1 -0
- package/dist/{index-BMgDMxKJ.js → index-37q0ULNQ.js} +44 -50
- package/dist/index-37q0ULNQ.js.map +1 -0
- package/dist/index-CVlCtJbC.cjs +2 -0
- package/dist/index-CVlCtJbC.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/sort-DfK1b0F5.js +34 -0
- package/dist/sort-DfK1b0F5.js.map +1 -0
- package/dist/sort-O96oMZLb.cjs +2 -0
- package/dist/sort-O96oMZLb.cjs.map +1 -0
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +3 -3
- package/dist/transformDataForAggregation-KXGm6flX.cjs +2 -0
- package/dist/{transformDataForAggregation-BVxVu4yY.cjs.map → transformDataForAggregation-KXGm6flX.cjs.map} +1 -1
- package/dist/{transformDataForAggregation-1BYVFqvF.js → transformDataForAggregation-sBpdlX8n.js} +40 -44
- package/dist/{transformDataForAggregation-1BYVFqvF.js.map → transformDataForAggregation-sBpdlX8n.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js → transformDataForGraphFromFile-ComYvzuz.js} +3 -3
- package/dist/{transformDataForGraphFromFile-BC9Ha8hF.js.map → transformDataForGraphFromFile-ComYvzuz.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs → transformDataForGraphFromFile-DVZodTHd.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-b41aNQYY.cjs.map → transformDataForGraphFromFile-DVZodTHd.cjs.map} +1 -1
- package/dist/uniqBy-BHy4I8PK.js +8 -0
- package/dist/uniqBy-BHy4I8PK.js.map +1 -0
- package/dist/uniqBy-O05lp2S5.cjs +2 -0
- package/dist/uniqBy-O05lp2S5.cjs.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -7
- package/dist/ensureCompleteData-BALdOrsS.js.map +0 -1
- package/dist/ensureCompleteData-BU5Zlccy.cjs +0 -2
- package/dist/ensureCompleteData-BU5Zlccy.cjs.map +0 -1
- package/dist/fetchAndParseData-DBOl1Icl.js +0 -1196
- package/dist/fetchAndParseData-DBOl1Icl.js.map +0 -1
- package/dist/fetchAndParseData-Dcy7AS_0.cjs +0 -16
- package/dist/fetchAndParseData-Dcy7AS_0.cjs.map +0 -1
- package/dist/getJenks-DW96UYNE.js +0 -23
- package/dist/getJenks-DW96UYNE.js.map +0 -1
- package/dist/getJenks-vofIZmeb.cjs +0 -2
- package/dist/getJenks-vofIZmeb.cjs.map +0 -1
- package/dist/getSliderMarks-C0jptXeP.js +0 -1054
- package/dist/getSliderMarks-C0jptXeP.js.map +0 -1
- package/dist/getSliderMarks-CtsEXiLV.cjs +0 -6
- package/dist/getSliderMarks-CtsEXiLV.cjs.map +0 -1
- package/dist/getUniqValue-CfuE_l9c.cjs +0 -2
- package/dist/getUniqValue-CfuE_l9c.cjs.map +0 -1
- package/dist/getUniqValue-CttuU_wn.js +0 -20
- package/dist/getUniqValue-CttuU_wn.js.map +0 -1
- package/dist/index-AqnpA7_O.js +0 -631
- package/dist/index-AqnpA7_O.js.map +0 -1
- package/dist/index-BJOeaYTk.cjs +0 -2
- package/dist/index-BJOeaYTk.cjs.map +0 -1
- package/dist/index-BMgDMxKJ.js.map +0 -1
- package/dist/index-DYH8g9WA.cjs +0 -2
- package/dist/index-DYH8g9WA.cjs.map +0 -1
- package/dist/index-Da2GUKrr.cjs +0 -2
- package/dist/index-Da2GUKrr.cjs.map +0 -1
- package/dist/index-fwdktvAS.js +0 -707
- package/dist/index-fwdktvAS.js.map +0 -1
- package/dist/transformDataForAggregation-BVxVu4yY.cjs +0 -2
package/dist/DotDensityMap.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { j as r, m as
|
|
1
|
+
import { j as r, m as je } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
2
|
import { useState as g, useRef as Y, useEffect as pe } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { T as He } from "./Tooltip-CVCGWyzw.js";
|
|
3
|
+
import { p as ke, f as De } from "./parse-DlCRUFh_.js";
|
|
4
|
+
import { g as Ce, x as Ne } from "./getSliderMarks-9cNoRkDx.js";
|
|
5
|
+
import { y as $e } from "./Spinner-C85UF28E.js";
|
|
6
|
+
import { i as Me } from "./index-Bwrro8-q.js";
|
|
7
|
+
import { z as Oe, t as Se, g as Ee, a as Pe, b as Ie, c as Le, d as ze } from "./zoom-DAu91HKr.js";
|
|
8
|
+
import { X as Te } from "./Modal-DVVwpKhP.js";
|
|
9
|
+
import { u as Ve } from "./Typography-Ctgfl1J5.js";
|
|
10
|
+
import { t as We } from "./index-qfWCwobm.js";
|
|
11
|
+
import { T as Ae } from "./Tooltip-CVCGWyzw.js";
|
|
13
12
|
import { Colors as D } from "./Colors.js";
|
|
14
|
-
import { s as
|
|
15
|
-
import { X as
|
|
16
|
-
import { s as
|
|
13
|
+
import { s as Be } from "./string2HTML-oFCROsus.js";
|
|
14
|
+
import { X as He, P as Re, f as Xe } from "./index-BmCqpO1B.js";
|
|
15
|
+
import { s as _e } from "./pow-e8zx3AQJ.js";
|
|
17
16
|
import { s as ve } from "./select-DKy99ogv.js";
|
|
18
|
-
import { u as
|
|
19
|
-
import { m as
|
|
20
|
-
import { A as
|
|
21
|
-
import { GraphFooter as
|
|
22
|
-
import { GraphHeader as
|
|
23
|
-
import { f as
|
|
24
|
-
import { c as
|
|
17
|
+
import { u as Fe } from "./use-in-view-yS6jzJAp.js";
|
|
18
|
+
import { m as de } from "./proxy-CkpFesk1.js";
|
|
19
|
+
import { A as qe } from "./index-CNvov0eg.js";
|
|
20
|
+
import { GraphFooter as Ue } from "./GraphFooter.js";
|
|
21
|
+
import { GraphHeader as Ge } from "./GraphHeader.js";
|
|
22
|
+
import { f as Ye } from "./fetchAndParseData-sapWbnYk.js";
|
|
23
|
+
import { c as Ke } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
24
|
+
import { u as be } from "./uniqBy-BHy4I8PK.js";
|
|
25
|
+
import { s as Ze } from "./sort-DfK1b0F5.js";
|
|
25
26
|
import { c as Je } from "./init-BhZylTFx.js";
|
|
26
27
|
function Qe(ue) {
|
|
27
28
|
const {
|
|
@@ -31,7 +32,7 @@ function Qe(ue) {
|
|
|
31
32
|
colorLegendTitle: S,
|
|
32
33
|
colorDomain: v,
|
|
33
34
|
radius: b,
|
|
34
|
-
height:
|
|
35
|
+
height: d,
|
|
35
36
|
width: o,
|
|
36
37
|
scale: K,
|
|
37
38
|
centerPoint: E,
|
|
@@ -56,38 +57,38 @@ function Qe(ue) {
|
|
|
56
57
|
dimmedOpacity: ae,
|
|
57
58
|
customLayers: oe,
|
|
58
59
|
maxRadiusValue: ie
|
|
59
|
-
} = ue, [R, ne] = g(void 0), [X, h] = g(!(o < 680)), V = Y(null), [I, _] = g(void 0), [le, x] = g(void 0), [w, F] = g(void 0), [se, W] = g(void 0), L = Y(null), q =
|
|
60
|
+
} = ue, [R, ne] = g(void 0), [X, h] = g(!(o < 680)), V = Y(null), [I, _] = g(void 0), [le, x] = g(void 0), [w, F] = g(void 0), [se, W] = g(void 0), L = Y(null), q = Fe(L, {
|
|
60
61
|
once: y.once,
|
|
61
62
|
amount: y.amount
|
|
62
|
-
}), U = Y(null),
|
|
63
|
+
}), U = Y(null), m = l.filter((e) => e.radius === void 0 || e.radius === null).length !== l.length ? _e().domain([0, ie]).range([0.25, b]).nice() : void 0;
|
|
63
64
|
pe(() => {
|
|
64
65
|
const e = ve(U.current), u = ve(L.current), a = (i) => {
|
|
65
66
|
if (P === "noZoom") return !1;
|
|
66
67
|
if (P === "button") return !i.type.includes("wheel");
|
|
67
68
|
const t = i.type === "wheel", c = i.type.startsWith("touch"), k = i.type === "mousedown" || i.type === "mousemove";
|
|
68
69
|
return c ? !0 : t ? P === "scroll" ? !0 : i.ctrlKey : k && !i.button && !i.ctrlKey;
|
|
69
|
-
}, j =
|
|
70
|
+
}, j = Oe().scaleExtent(N).translateExtent(
|
|
70
71
|
fe || [
|
|
71
72
|
[-20, -20],
|
|
72
|
-
[o + 20,
|
|
73
|
+
[o + 20, d + 20]
|
|
73
74
|
]
|
|
74
75
|
).filter(a).on("zoom", ({ transform: i }) => {
|
|
75
76
|
e.attr("transform", i);
|
|
76
77
|
});
|
|
77
78
|
u.call(j), V.current = j;
|
|
78
|
-
}, [
|
|
79
|
-
const p =
|
|
79
|
+
}, [d, o, P]);
|
|
80
|
+
const p = Se(C), M = We(C), G = p[2] - p[0], ce = p[3] - p[1], z = o * 190 / 960 * 360 / G, xe = d * 190 / 678 * 180 / ce, n = K * Math.min(z, xe), O = T === "mercator" ? Ee().rotate([0, 0]).center(E || M.geometry.coordinates).translate([o / 2, d / 2]).scale(n) : T === "equalEarth" ? Pe().rotate([0, 0]).center(E || M.geometry.coordinates).translate([o / 2, d / 2]).scale(n) : T === "naturalEarth" ? Ie().rotate([0, 0]).center(E || M.geometry.coordinates).translate([o / 2, d / 2]).scale(n) : T === "orthographic" ? Le().rotate([0, 0]).center(E || M.geometry.coordinates).translate([o / 2, d / 2]).scale(n) : ze().rotate([0, 0]).center(E || M.geometry.coordinates).translate([o / 2, d / 2]).scale(n), A = (e) => {
|
|
80
81
|
if (!L.current || !V.current) return;
|
|
81
82
|
ve(L.current).call(V.current.scaleBy, e === "in" ? 1.2 : 1 / 1.2);
|
|
82
83
|
};
|
|
83
84
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
84
85
|
/* @__PURE__ */ r.jsxs("div", { className: "relative", children: [
|
|
85
86
|
/* @__PURE__ */ r.jsx(
|
|
86
|
-
|
|
87
|
+
de.svg,
|
|
87
88
|
{
|
|
88
89
|
width: `${o}px`,
|
|
89
|
-
height: `${
|
|
90
|
-
viewBox: `0 0 ${o} ${
|
|
90
|
+
height: `${d}px`,
|
|
91
|
+
viewBox: `0 0 ${o} ${d}`,
|
|
91
92
|
ref: L,
|
|
92
93
|
direction: "ltr",
|
|
93
94
|
children: /* @__PURE__ */ r.jsxs("g", { ref: U, children: [
|
|
@@ -99,9 +100,9 @@ function Qe(ue) {
|
|
|
99
100
|
let i = "";
|
|
100
101
|
return a.forEach((t) => {
|
|
101
102
|
let c = " M";
|
|
102
|
-
t.forEach((k,
|
|
103
|
-
const
|
|
104
|
-
|
|
103
|
+
t.forEach((k, we) => {
|
|
104
|
+
const me = O([k[0], k[1]]);
|
|
105
|
+
we !== t.length - 1 ? c = `${c}${me[0]} ${me[1]}L` : c = `${c}${me[0]} ${me[1]}`;
|
|
105
106
|
}), i += c;
|
|
106
107
|
}), /* @__PURE__ */ r.jsx(
|
|
107
108
|
"path",
|
|
@@ -137,10 +138,10 @@ function Qe(ue) {
|
|
|
137
138
|
);
|
|
138
139
|
})
|
|
139
140
|
) }, u)),
|
|
140
|
-
/* @__PURE__ */ r.jsx(
|
|
141
|
+
/* @__PURE__ */ r.jsx(qe, { children: l.map((e) => {
|
|
141
142
|
const u = l.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[v.indexOf(`${e.color}`)] : D.gray;
|
|
142
143
|
return /* @__PURE__ */ r.jsxs(
|
|
143
|
-
|
|
144
|
+
de.g,
|
|
144
145
|
{
|
|
145
146
|
variants: {
|
|
146
147
|
initial: { opacity: 0 },
|
|
@@ -162,12 +163,12 @@ function Qe(ue) {
|
|
|
162
163
|
x(void 0), F(void 0), W(void 0), ee?.(void 0);
|
|
163
164
|
},
|
|
164
165
|
onClick: () => {
|
|
165
|
-
(H || $) && (
|
|
166
|
+
(H || $) && (Me(I, e) && f ? (_(void 0), H?.(void 0)) : (_(e), H?.(e)));
|
|
166
167
|
},
|
|
167
168
|
transform: `translate(${O([e.long, e.lat])[0]},${O([e.long, e.lat])[1]})`,
|
|
168
169
|
children: [
|
|
169
170
|
/* @__PURE__ */ r.jsx(
|
|
170
|
-
|
|
171
|
+
de.circle,
|
|
171
172
|
{
|
|
172
173
|
cx: 0,
|
|
173
174
|
cy: 0,
|
|
@@ -178,7 +179,7 @@ function Qe(ue) {
|
|
|
178
179
|
stroke: l.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[v.indexOf(`${e.color}`)] : D.gray
|
|
179
180
|
},
|
|
180
181
|
whileInView: {
|
|
181
|
-
r:
|
|
182
|
+
r: m ? m(e.radius || 0) : b,
|
|
182
183
|
fill: l.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[v.indexOf(`${e.color}`)] : D.gray,
|
|
183
184
|
stroke: l.filter((a) => a.color).length === 0 ? s[0] : e.color ? s[v.indexOf(`${e.color}`)] : D.gray,
|
|
184
185
|
transition: { duration: y.duration }
|
|
@@ -193,16 +194,16 @@ function Qe(ue) {
|
|
|
193
194
|
}
|
|
194
195
|
),
|
|
195
196
|
he && e.label ? /* @__PURE__ */ r.jsx(
|
|
196
|
-
|
|
197
|
+
de.text,
|
|
197
198
|
{
|
|
198
199
|
variants: {
|
|
199
200
|
initial: {
|
|
200
201
|
opacity: 0,
|
|
201
|
-
x:
|
|
202
|
+
x: m ? m(e.radius || 0) : b
|
|
202
203
|
},
|
|
203
204
|
whileInView: {
|
|
204
205
|
opacity: 1,
|
|
205
|
-
x:
|
|
206
|
+
x: m ? m(e.radius || 0) : b,
|
|
206
207
|
transition: { duration: y.duration }
|
|
207
208
|
}
|
|
208
209
|
},
|
|
@@ -246,7 +247,7 @@ function Qe(ue) {
|
|
|
246
247
|
onClick: () => {
|
|
247
248
|
h(!1);
|
|
248
249
|
},
|
|
249
|
-
children: /* @__PURE__ */ r.jsx(
|
|
250
|
+
children: /* @__PURE__ */ r.jsx(He, {})
|
|
250
251
|
}
|
|
251
252
|
),
|
|
252
253
|
/* @__PURE__ */ r.jsxs("div", { className: "p-2", style: { backgroundColor: "rgba(240,240,240, 0.7)" }, children: [
|
|
@@ -280,7 +281,7 @@ function Qe(ue) {
|
|
|
280
281
|
style: { backgroundColor: s[u % s.length] }
|
|
281
282
|
}
|
|
282
283
|
),
|
|
283
|
-
/* @__PURE__ */ r.jsx(
|
|
284
|
+
/* @__PURE__ */ r.jsx(Ve, { size: "sm", marginBottom: "none", leading: "none", children: e })
|
|
284
285
|
]
|
|
285
286
|
},
|
|
286
287
|
u
|
|
@@ -317,7 +318,7 @@ function Qe(ue) {
|
|
|
317
318
|
] })
|
|
318
319
|
] }),
|
|
319
320
|
$ && I !== void 0 ? /* @__PURE__ */ r.jsx(
|
|
320
|
-
|
|
321
|
+
Te,
|
|
321
322
|
{
|
|
322
323
|
open: I !== void 0,
|
|
323
324
|
onClose: () => {
|
|
@@ -327,14 +328,14 @@ function Qe(ue) {
|
|
|
327
328
|
"div",
|
|
328
329
|
{
|
|
329
330
|
className: "graph-modal-content m-0",
|
|
330
|
-
dangerouslySetInnerHTML: typeof $ == "string" ? { __html:
|
|
331
|
+
dangerouslySetInnerHTML: typeof $ == "string" ? { __html: Be($, I) } : void 0,
|
|
331
332
|
children: typeof $ == "function" ? $(I) : null
|
|
332
333
|
}
|
|
333
334
|
)
|
|
334
335
|
}
|
|
335
336
|
) : null,
|
|
336
337
|
le && Z && w && se ? /* @__PURE__ */ r.jsx(
|
|
337
|
-
|
|
338
|
+
Ae,
|
|
338
339
|
{
|
|
339
340
|
data: le,
|
|
340
341
|
body: Z,
|
|
@@ -346,7 +347,7 @@ function Qe(ue) {
|
|
|
346
347
|
) : null
|
|
347
348
|
] });
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function Nt(ue) {
|
|
350
351
|
const {
|
|
351
352
|
data: l,
|
|
352
353
|
mapData: s = "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json",
|
|
@@ -354,7 +355,7 @@ function Ct(ue) {
|
|
|
354
355
|
colors: S,
|
|
355
356
|
sources: v,
|
|
356
357
|
graphDescription: b,
|
|
357
|
-
height:
|
|
358
|
+
height: d,
|
|
358
359
|
width: o,
|
|
359
360
|
footNote: K = "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.",
|
|
360
361
|
colorLegendTitle: E,
|
|
@@ -395,21 +396,20 @@ function Ct(ue) {
|
|
|
395
396
|
dimmedOpacity: L = 0.3,
|
|
396
397
|
customLayers: q = [],
|
|
397
398
|
maxRadiusValue: U,
|
|
398
|
-
timeline:
|
|
399
|
-
} = ue, [p, M] = g(0), [G, ce] = g(0), [z, xe] = g(
|
|
400
|
-
be(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
).map((t) => De(`${t.date}`, d.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()),
|
|
399
|
+
timeline: m = { enabled: !1, autoplay: !1, showOnlyActiveDate: !0 }
|
|
400
|
+
} = ue, [p, M] = g(0), [G, ce] = g(0), [z, xe] = g(m.autoplay), n = Ze(
|
|
401
|
+
be(l, "date", !0).map(
|
|
402
|
+
(t) => ke(`${t}`, m.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime()
|
|
403
|
+
),
|
|
404
404
|
(t, c) => Je(t, c)
|
|
405
|
-
), [O, A] = g(
|
|
405
|
+
), [O, A] = g(m.autoplay ? 0 : n.length - 1), [e, u] = g(void 0), a = Y(null), j = Y(null);
|
|
406
406
|
pe(() => {
|
|
407
407
|
const t = new ResizeObserver((c) => {
|
|
408
|
-
M(o || c[0].target.clientWidth || 760), ce(
|
|
408
|
+
M(o || c[0].target.clientWidth || 760), ce(d || c[0].target.clientHeight || 480);
|
|
409
409
|
});
|
|
410
410
|
return a.current && (ce(a.current.clientHeight || 480), M(a.current.clientWidth || 760), o || t.observe(a.current)), () => t.disconnect();
|
|
411
|
-
}, [o,
|
|
412
|
-
typeof s == "string" ?
|
|
411
|
+
}, [o, d]), pe(() => {
|
|
412
|
+
typeof s == "string" ? Ye(s).then((c) => {
|
|
413
413
|
u(c);
|
|
414
414
|
}) : u(s);
|
|
415
415
|
}, [s]), pe(() => {
|
|
@@ -417,15 +417,15 @@ function Ct(ue) {
|
|
|
417
417
|
() => {
|
|
418
418
|
A((c) => c < n.length - 1 ? c + 1 : 0);
|
|
419
419
|
},
|
|
420
|
-
(
|
|
420
|
+
(m.speed || 2) * 1e3
|
|
421
421
|
);
|
|
422
422
|
return z || clearInterval(t), () => clearInterval(t);
|
|
423
|
-
}, [n, z,
|
|
424
|
-
const i =
|
|
423
|
+
}, [n, z, m.speed]);
|
|
424
|
+
const i = Ce(
|
|
425
425
|
n,
|
|
426
426
|
O,
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
m.showOnlyActiveDate,
|
|
428
|
+
m.dateFormat || "yyyy"
|
|
429
429
|
);
|
|
430
430
|
return /* @__PURE__ */ r.jsx(
|
|
431
431
|
"div",
|
|
@@ -435,7 +435,7 @@ function Ct(ue) {
|
|
|
435
435
|
children: /* @__PURE__ */ r.jsx(
|
|
436
436
|
"div",
|
|
437
437
|
{
|
|
438
|
-
className:
|
|
438
|
+
className: je(
|
|
439
439
|
`${N ? N === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${X || "en"}`,
|
|
440
440
|
o ? "w-fit" : "w-full",
|
|
441
441
|
w?.graphContainer
|
|
@@ -454,7 +454,7 @@ function Ct(ue) {
|
|
|
454
454
|
style: { padding: N ? B || "1rem" : B || 0 },
|
|
455
455
|
children: /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
456
456
|
C || b || ie || R ? /* @__PURE__ */ r.jsx(
|
|
457
|
-
|
|
457
|
+
Ge,
|
|
458
458
|
{
|
|
459
459
|
styles: {
|
|
460
460
|
title: x?.title,
|
|
@@ -471,7 +471,7 @@ function Ct(ue) {
|
|
|
471
471
|
dataDownload: R ? l.map((t) => t.data).filter((t) => t !== void 0).length > 0 ? l.map((t) => t.data).filter((t) => t !== void 0) : l.filter((t) => t !== void 0) : null
|
|
472
472
|
}
|
|
473
473
|
) : null,
|
|
474
|
-
|
|
474
|
+
m.enabled && n.length > 0 && i ? /* @__PURE__ */ r.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
475
475
|
/* @__PURE__ */ r.jsx(
|
|
476
476
|
"button",
|
|
477
477
|
{
|
|
@@ -481,11 +481,11 @@ function Ct(ue) {
|
|
|
481
481
|
},
|
|
482
482
|
className: "p-0 border-0 cursor-pointer bg-transparent",
|
|
483
483
|
"aria-label": z ? "Click to pause animation" : "Click to play animation",
|
|
484
|
-
children: z ? /* @__PURE__ */ r.jsx(
|
|
484
|
+
children: z ? /* @__PURE__ */ r.jsx(Re, {}) : /* @__PURE__ */ r.jsx(Xe, {})
|
|
485
485
|
}
|
|
486
486
|
),
|
|
487
487
|
/* @__PURE__ */ r.jsx(
|
|
488
|
-
|
|
488
|
+
Ne,
|
|
489
489
|
{
|
|
490
490
|
min: n[0],
|
|
491
491
|
max: n[n.length - 1],
|
|
@@ -509,11 +509,11 @@ function Ct(ue) {
|
|
|
509
509
|
className: "flex flex-col grow justify-center leading-0",
|
|
510
510
|
ref: a,
|
|
511
511
|
"aria-label": "Map area",
|
|
512
|
-
children: (o || p) && (
|
|
512
|
+
children: (o || p) && (d || G) && e ? /* @__PURE__ */ r.jsx(
|
|
513
513
|
Qe,
|
|
514
514
|
{
|
|
515
515
|
data: l.filter(
|
|
516
|
-
(t) =>
|
|
516
|
+
(t) => m.enabled ? t.date === De(new Date(n[O]), m.dateFormat || "yyyy") : t
|
|
517
517
|
),
|
|
518
518
|
mapData: ne ? e : {
|
|
519
519
|
...e,
|
|
@@ -522,14 +522,11 @@ function Ct(ue) {
|
|
|
522
522
|
(t) => t.properties.NAME !== "Antarctica"
|
|
523
523
|
)
|
|
524
524
|
},
|
|
525
|
-
colorDomain: l.filter((t) => t.color).length === 0 ? [] : Z || be(
|
|
526
|
-
l.filter((t) => !we(t.color)),
|
|
527
|
-
"color"
|
|
528
|
-
).map((t) => `${t.color}`),
|
|
525
|
+
colorDomain: l.filter((t) => t.color).length === 0 ? [] : Z || be(l, "color", !0),
|
|
529
526
|
width: o || p,
|
|
530
527
|
height: Math.max(
|
|
531
528
|
h,
|
|
532
|
-
|
|
529
|
+
d || (f ? h ? (o || p) * f > h ? (o || p) * f : h : (o || p) * f : G)
|
|
533
530
|
),
|
|
534
531
|
scale: J,
|
|
535
532
|
centerPoint: Q,
|
|
@@ -557,7 +554,7 @@ function Ct(ue) {
|
|
|
557
554
|
animate: W === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : W || { duration: 0, once: !0, amount: 0 },
|
|
558
555
|
dimmedOpacity: L,
|
|
559
556
|
customLayers: q,
|
|
560
|
-
maxRadiusValue:
|
|
557
|
+
maxRadiusValue: Ke(U) ? Math.max(
|
|
561
558
|
...l.map((t) => t.radius).filter((t) => t != null)
|
|
562
559
|
) : U
|
|
563
560
|
}
|
|
@@ -567,17 +564,17 @@ function Ct(ue) {
|
|
|
567
564
|
style: {
|
|
568
565
|
height: `${Math.max(
|
|
569
566
|
h,
|
|
570
|
-
|
|
567
|
+
d || (f ? h ? (o || p) * f > h ? (o || p) * f : h : (o || p) * f : G)
|
|
571
568
|
)}px`
|
|
572
569
|
},
|
|
573
570
|
className: "flex items-center justify-center",
|
|
574
|
-
children: /* @__PURE__ */ r.jsx(
|
|
571
|
+
children: /* @__PURE__ */ r.jsx($e, { "aria-label": "Loading graph" })
|
|
575
572
|
}
|
|
576
573
|
)
|
|
577
574
|
}
|
|
578
575
|
),
|
|
579
576
|
v || K ? /* @__PURE__ */ r.jsx(
|
|
580
|
-
|
|
577
|
+
Ue,
|
|
581
578
|
{
|
|
582
579
|
styles: { footnote: x?.footnote, source: x?.source },
|
|
583
580
|
classNames: {
|
|
@@ -598,6 +595,6 @@ function Ct(ue) {
|
|
|
598
595
|
);
|
|
599
596
|
}
|
|
600
597
|
export {
|
|
601
|
-
|
|
598
|
+
Nt as DotDensityMap
|
|
602
599
|
};
|
|
603
600
|
//# sourceMappingURL=DotDensityMap.js.map
|