@undp/data-viz 2.2.2 → 2.3.0
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.js +1 -1
- package/dist/Axis-D56Gy0se.js +31 -0
- package/dist/Axis-D56Gy0se.js.map +1 -0
- package/dist/Axis-Jt_tmhxS.cjs +2 -0
- package/dist/Axis-Jt_tmhxS.cjs.map +1 -0
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +6 -0
- package/dist/BarGraph.js +1759 -1750
- package/dist/BarGraph.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +270 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +4 -0
- package/dist/BiVariateChoroplethMap.js +328 -401
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +544 -542
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +332 -330
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +4 -0
- package/dist/ChoroplethMap.js +341 -416
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/Data/01.json +4042 -0
- package/dist/Data/mapData.json +4543 -0
- package/dist/Data/testMap.json +361 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +4 -0
- package/dist/DotDensityMap.js +297 -311
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +537 -536
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{GraphEl-DcNr5JzH.js → GraphEl-L5hNe7wJ.js} +84 -67
- package/dist/GraphEl-L5hNe7wJ.js.map +1 -0
- package/dist/GraphEl-ic8C5Ksc.cjs +2 -0
- package/dist/GraphEl-ic8C5Ksc.cjs.map +1 -0
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +3 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +3 -0
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +50 -49
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +4 -0
- package/dist/HybridMap.js +368 -418
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +3 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +3 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +3 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +3 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +3 -0
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +1 -1
- package/dist/ScrollStory.d.ts +3 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +3 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +3 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +3 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +3 -0
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +3 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +3 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/Types.d.ts +3 -0
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +2 -0
- package/dist/WaterfallChart.js +263 -261
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/index-DLFt97gy.cjs +2 -0
- package/dist/index-DLFt97gy.cjs.map +1 -0
- package/dist/index-Dp_SfsUA.js +2344 -0
- package/dist/index-Dp_SfsUA.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/package.json +2 -1
- package/readme.md +0 -7
- package/dist/Axis-DoOqnt6g.js +0 -32
- package/dist/Axis-DoOqnt6g.js.map +0 -1
- package/dist/Axis-Dtjn-EgM.cjs +0 -2
- package/dist/Axis-Dtjn-EgM.cjs.map +0 -1
- package/dist/GraphEl-CAjJLOGk.cjs +0 -2
- package/dist/GraphEl-CAjJLOGk.cjs.map +0 -1
- package/dist/GraphEl-DcNr5JzH.js.map +0 -1
- package/dist/zoom-5AkJSuWO.js +0 -1864
- package/dist/zoom-5AkJSuWO.js.map +0 -1
- package/dist/zoom-ChcvXFIz.cjs +0 -2
- package/dist/zoom-ChcvXFIz.cjs.map +0 -1
|
@@ -1,279 +1,201 @@
|
|
|
1
|
-
import { j as o, m as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { g as
|
|
4
|
-
import { w as
|
|
5
|
-
import { f as
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
8
|
-
import { i as
|
|
9
|
-
import { j as
|
|
10
|
-
import { n as
|
|
11
|
-
import { T as
|
|
12
|
-
import { c as
|
|
13
|
-
import { X as
|
|
14
|
-
import { D as
|
|
15
|
-
import { s as
|
|
16
|
-
import { t as
|
|
17
|
-
import { m as
|
|
18
|
-
import { u as
|
|
19
|
-
import { A as
|
|
20
|
-
import { GraphHeader as
|
|
21
|
-
import { GraphFooter as
|
|
22
|
-
import { Colors as
|
|
23
|
-
import { f as
|
|
24
|
-
import { g as
|
|
25
|
-
import { a as
|
|
26
|
-
function
|
|
1
|
+
import { j as o, m as Oe, c as Me } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
|
+
import { useMemo as Ie, useState as j, useRef as At, useEffect as ee, useEffectEvent as ze } from "react";
|
|
3
|
+
import { g as Ee, N as Ae } from "./getSliderMarks-Cvg8zHBU.js";
|
|
4
|
+
import { w as Pe } from "./Spinner--r2RrJV8.js";
|
|
5
|
+
import { f as Be, p as Le } from "./parse-Dv4of-PN.js";
|
|
6
|
+
import { i as We } from "./index-Bwrro8-q.js";
|
|
7
|
+
import { i as _e, z as Fe, a as Te, g as $e, b as He, c as Re, d as Ge, e as Ve, f as Ue } from "./index-Dp_SfsUA.js";
|
|
8
|
+
import { i as Xe } from "./index-DCsFBfJ_.js";
|
|
9
|
+
import { j as ve } from "./Typography-hWfh3H0J.js";
|
|
10
|
+
import { n as be } from "./numberFormattingFunction-14YCbkN2.js";
|
|
11
|
+
import { T as Ye } from "./Tooltip-BRnAz2Gv.js";
|
|
12
|
+
import { c as ke } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
13
|
+
import { X as qe, P as Je, e as Ke } from "./index-BQYOuXdl.js";
|
|
14
|
+
import { D as Ze } from "./DetailsModal-BMCTgVsk.js";
|
|
15
|
+
import { s as ge } from "./select-DKy99ogv.js";
|
|
16
|
+
import { t as we } from "./threshold-DFfqcDMa.js";
|
|
17
|
+
import { m as te } from "./proxy-DRuSUlPL.js";
|
|
18
|
+
import { u as Qe } from "./use-in-view-Dl5L8LtP.js";
|
|
19
|
+
import { A as to } from "./index-CtMBjvtq.js";
|
|
20
|
+
import { GraphHeader as eo } from "./GraphHeader.js";
|
|
21
|
+
import { GraphFooter as oo } from "./GraphFooter.js";
|
|
22
|
+
import { Colors as ye } from "./Colors.js";
|
|
23
|
+
import { f as ro } from "./fetchAndParseData-BAXhgTDM.js";
|
|
24
|
+
import { g as Ce } from "./getJenks-DTCcQSDi.js";
|
|
25
|
+
import { a as ao, G as no } from "./GraphContainer-CF6ws3pd.js";
|
|
26
|
+
function io(n) {
|
|
27
27
|
const {
|
|
28
28
|
data: t,
|
|
29
|
-
xDomain:
|
|
30
|
-
mapData:
|
|
29
|
+
xDomain: d,
|
|
30
|
+
mapData: L,
|
|
31
31
|
xColorLegendTitle: Pt,
|
|
32
|
-
yDomain:
|
|
33
|
-
yColorLegendTitle:
|
|
34
|
-
width:
|
|
35
|
-
height:
|
|
36
|
-
colors:
|
|
37
|
-
scale:
|
|
38
|
-
centerPoint:
|
|
39
|
-
mapBorderWidth:
|
|
40
|
-
mapNoDataColor:
|
|
41
|
-
mapBorderColor:
|
|
42
|
-
tooltip:
|
|
43
|
-
onSeriesMouseOver:
|
|
44
|
-
zoomScaleExtend:
|
|
45
|
-
zoomTranslateExtend:
|
|
46
|
-
highlightedIds:
|
|
47
|
-
onSeriesMouseClick:
|
|
48
|
-
mapProperty:
|
|
49
|
-
resetSelectionOnDoubleClick:
|
|
50
|
-
detailsOnClick:
|
|
51
|
-
showColorScale:
|
|
52
|
-
styles:
|
|
53
|
-
classNames:
|
|
54
|
-
mapProjection:
|
|
55
|
-
zoomInteraction:
|
|
56
|
-
animate:
|
|
57
|
-
dimmedOpacity:
|
|
58
|
-
customLayers:
|
|
59
|
-
collapseColorScaleByDefault:
|
|
60
|
-
zoomAndCenterByHighlightedIds:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
32
|
+
yDomain: Y,
|
|
33
|
+
yColorLegendTitle: q,
|
|
34
|
+
width: u,
|
|
35
|
+
height: p,
|
|
36
|
+
colors: h,
|
|
37
|
+
scale: Bt,
|
|
38
|
+
centerPoint: k,
|
|
39
|
+
mapBorderWidth: W,
|
|
40
|
+
mapNoDataColor: J,
|
|
41
|
+
mapBorderColor: pt,
|
|
42
|
+
tooltip: K,
|
|
43
|
+
onSeriesMouseOver: ht,
|
|
44
|
+
zoomScaleExtend: ut,
|
|
45
|
+
zoomTranslateExtend: ft,
|
|
46
|
+
highlightedIds: w,
|
|
47
|
+
onSeriesMouseClick: Z,
|
|
48
|
+
mapProperty: N,
|
|
49
|
+
resetSelectionOnDoubleClick: Lt,
|
|
50
|
+
detailsOnClick: y,
|
|
51
|
+
showColorScale: gt,
|
|
52
|
+
styles: Wt,
|
|
53
|
+
classNames: _,
|
|
54
|
+
mapProjection: F,
|
|
55
|
+
zoomInteraction: S,
|
|
56
|
+
animate: O,
|
|
57
|
+
dimmedOpacity: M,
|
|
58
|
+
customLayers: Q,
|
|
59
|
+
collapseColorScaleByDefault: yt,
|
|
60
|
+
zoomAndCenterByHighlightedIds: xt,
|
|
61
|
+
projectionRotate: T,
|
|
62
|
+
rewindCoordinatesInMapData: vt
|
|
63
|
+
} = n, x = Ie(() => vt ? _e(L, {
|
|
64
|
+
reverse: !0
|
|
65
|
+
}) : L, [L, vt]), [_t, bt] = j(yt === void 0 ? !(u < 680) : !yt), [$, kt] = j(void 0), [G, l] = j(void 0), [s, tt] = j(void 0), [wt, et] = j(void 0), [Ct, H] = j(void 0), D = At(null), ot = Qe(D, {
|
|
66
|
+
once: O.once,
|
|
67
|
+
amount: O.amount
|
|
68
|
+
}), jt = At(null), R = At(null);
|
|
69
|
+
ee(() => {
|
|
70
|
+
const e = ge(jt.current), r = ge(D.current), f = (m) => {
|
|
71
|
+
if (S === "noZoom") return !1;
|
|
72
|
+
if (S === "button") return !m.type.includes("wheel");
|
|
73
|
+
const C = m.type === "wheel", v = m.type.startsWith("touch"), It = m.type === "mousedown" || m.type === "mousemove";
|
|
74
|
+
return v ? !0 : C ? S === "scroll" ? !0 : m.ctrlKey : It && !m.button && !m.ctrlKey;
|
|
75
|
+
}, b = Fe().scaleExtent(ut).translateExtent(ft || [[-20, -20], [u + 20, p + 20]]).filter(f).on("zoom", ({
|
|
76
|
+
transform: m
|
|
73
77
|
}) => {
|
|
74
|
-
e.attr("transform",
|
|
78
|
+
e.attr("transform", m);
|
|
75
79
|
});
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
const
|
|
79
|
-
...
|
|
80
|
-
features:
|
|
80
|
+
r.call(b), R.current = b;
|
|
81
|
+
}, [p, u, S]);
|
|
82
|
+
const V = Te({
|
|
83
|
+
...x,
|
|
84
|
+
features: xt ? x.features.filter(
|
|
81
85
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
-
(e) => (
|
|
83
|
-
) :
|
|
84
|
-
}),
|
|
85
|
-
...
|
|
86
|
-
features:
|
|
86
|
+
(e) => (w || []).length === 0 || w.indexOf(e.properties[N]) !== -1
|
|
87
|
+
) : x.features
|
|
88
|
+
}), g = Xe({
|
|
89
|
+
...x,
|
|
90
|
+
features: xt ? x.features.filter(
|
|
87
91
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
-
(e) => (
|
|
89
|
-
) :
|
|
90
|
-
}),
|
|
91
|
-
length:
|
|
92
|
-
}, (e,
|
|
93
|
-
length:
|
|
94
|
-
}, (e,
|
|
95
|
-
if (!
|
|
96
|
-
|
|
92
|
+
(e) => (w || []).length === 0 || w.indexOf(e.properties[N]) !== -1
|
|
93
|
+
) : x.features
|
|
94
|
+
}), I = V[2] - V[0], rt = V[3] - V[1], Dt = u * 190 / 960 * 360 / I, Nt = p * 190 / 678 * 180 / rt, z = Bt * Math.min(Dt, Nt), St = F === "mercator" ? $e().rotate(T).center(k || g.geometry.coordinates).translate([u / 2, p / 2]).scale(z) : F === "equalEarth" ? He().rotate(T).center(k || g.geometry.coordinates).translate([u / 2, p / 2]).scale(z) : F === "naturalEarth" ? Re().rotate(T).center(k || g.geometry.coordinates).translate([u / 2, p / 2]).scale(z) : F === "orthographic" ? Ge().rotate(T).center(k || g.geometry.coordinates).translate([u / 2, p / 2]).scale(z) : Ve().rotate(T).center(k || g.geometry.coordinates).translate([u / 2, p / 2]).scale(z), U = Ue().projection(St), Ot = Array.from({
|
|
95
|
+
length: d.length
|
|
96
|
+
}, (e, r) => r), Mt = Array.from({
|
|
97
|
+
length: Y.length
|
|
98
|
+
}, (e, r) => r), at = we().domain(d).range(Ot), nt = we().domain(Y).range(Mt), it = (e) => {
|
|
99
|
+
if (!D.current || !R.current) return;
|
|
100
|
+
ge(D.current).call(R.current.scaleBy, e === "in" ? 1.2 : 1 / 1.2);
|
|
97
101
|
};
|
|
98
102
|
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
99
103
|
/* @__PURE__ */ o.jsxs("div", { className: "relative", children: [
|
|
100
|
-
/* @__PURE__ */ o.jsx(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}), /* @__PURE__ */ o.jsx("path", { d: a, style: {
|
|
114
|
-
stroke: ft,
|
|
115
|
-
strokeWidth: M,
|
|
116
|
-
fill: F
|
|
117
|
-
} }, r);
|
|
118
|
-
})
|
|
119
|
-
) : (
|
|
120
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
121
|
-
e.geometry.coordinates.map((s, r) => {
|
|
122
|
-
let a = "M";
|
|
123
|
-
return s.forEach((l, i) => {
|
|
124
|
-
const f = E([l[0], l[1]]);
|
|
125
|
-
i !== s.length - 1 ? a = `${a}${f[0]} ${f[1]}L` : a = `${a}${f[0]} ${f[1]}`;
|
|
126
|
-
}), /* @__PURE__ */ o.jsx("path", { d: a, style: {
|
|
127
|
-
stroke: ft,
|
|
128
|
-
strokeWidth: M,
|
|
129
|
-
fill: F
|
|
130
|
-
} }, r);
|
|
131
|
-
})
|
|
132
|
-
) }, n)),
|
|
133
|
-
/* @__PURE__ */ o.jsx(Re, { children: t.map((e) => {
|
|
134
|
-
const n = b.features.findIndex(
|
|
104
|
+
/* @__PURE__ */ o.jsx(te.svg, { viewBox: `0 0 ${u} ${p}`, width: `${u}px`, height: `${p}px`, ref: D, direction: "ltr", children: /* @__PURE__ */ o.jsxs("g", { ref: jt, children: [
|
|
105
|
+
Q.filter((e) => e.position === "before").map((e) => e.layer),
|
|
106
|
+
x.features.map((e, r) => {
|
|
107
|
+
if (!e.properties?.[N]) return null;
|
|
108
|
+
const f = U(e);
|
|
109
|
+
return f ? /* @__PURE__ */ o.jsx(te.g, { opacity: $ ? M : w.length !== 0 ? w.indexOf(e.properties[N]) !== -1 ? 1 : M : 1, children: /* @__PURE__ */ o.jsx("path", { d: f, style: {
|
|
110
|
+
stroke: pt,
|
|
111
|
+
strokeWidth: W,
|
|
112
|
+
fill: J
|
|
113
|
+
} }) }, r) : null;
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ o.jsx(to, { children: t.map((e) => {
|
|
116
|
+
const r = x.features.findIndex(
|
|
135
117
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
136
|
-
(
|
|
137
|
-
)
|
|
138
|
-
|
|
118
|
+
(v) => e.id === v.properties[N]
|
|
119
|
+
);
|
|
120
|
+
if (r === -1) return null;
|
|
121
|
+
const f = U(x.features[r]);
|
|
122
|
+
if (!f) return null;
|
|
123
|
+
const b = ke(e.x) ? void 0 : at(e.x), m = ke(e.y) ? void 0 : nt(e.y), C = b !== void 0 && m !== void 0 ? h[m][b] : J;
|
|
124
|
+
return /* @__PURE__ */ o.jsx(te.g, { variants: {
|
|
139
125
|
initial: {
|
|
140
126
|
opacity: 0
|
|
141
127
|
},
|
|
142
128
|
whileInView: {
|
|
143
|
-
opacity:
|
|
129
|
+
opacity: $ ? $ === C ? 1 : M : w.length !== 0 ? w.indexOf(e.id) !== -1 ? 1 : M : 1,
|
|
144
130
|
transition: {
|
|
145
|
-
duration:
|
|
131
|
+
duration: O.duration
|
|
146
132
|
}
|
|
147
133
|
}
|
|
148
|
-
}, initial: "initial", animate:
|
|
134
|
+
}, initial: "initial", animate: ot ? "whileInView" : "initial", exit: {
|
|
149
135
|
opacity: 0,
|
|
150
136
|
transition: {
|
|
151
|
-
duration:
|
|
137
|
+
duration: O.duration
|
|
152
138
|
}
|
|
153
|
-
}, onMouseEnter: (
|
|
154
|
-
|
|
139
|
+
}, onMouseEnter: (v) => {
|
|
140
|
+
tt(e), H(v.clientY), et(v.clientX), ht?.(e);
|
|
155
141
|
}, onClick: () => {
|
|
156
|
-
(
|
|
157
|
-
}, onMouseMove: (
|
|
158
|
-
|
|
142
|
+
(Z || y) && (We(G, e) && Lt ? (l(void 0), Z?.(void 0)) : (l(e), Z?.(e)));
|
|
143
|
+
}, onMouseMove: (v) => {
|
|
144
|
+
tt(e), H(v.clientY), et(v.clientX);
|
|
159
145
|
}, onMouseLeave: () => {
|
|
160
|
-
|
|
161
|
-
}, children:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
initial: {
|
|
173
|
-
fill: r,
|
|
174
|
-
opacity: 0
|
|
175
|
-
},
|
|
176
|
-
whileInView: {
|
|
177
|
-
fill: r,
|
|
178
|
-
opacity: 1,
|
|
179
|
-
transition: {
|
|
180
|
-
duration: N.duration
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}, initial: "initial", animate: ct ? "whileInView" : "initial", exit: {
|
|
184
|
-
opacity: 0,
|
|
185
|
-
transition: {
|
|
186
|
-
duration: N.duration
|
|
187
|
-
}
|
|
188
|
-
}, d: i, className: `${r === F ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
|
|
189
|
-
strokeWidth: M
|
|
190
|
-
} }, `${e.id}-${l}`);
|
|
146
|
+
tt(void 0), et(void 0), H(void 0), ht?.(void 0);
|
|
147
|
+
}, children: /* @__PURE__ */ o.jsx(te.path, { d: f, variants: {
|
|
148
|
+
initial: {
|
|
149
|
+
fill: C,
|
|
150
|
+
opacity: 0
|
|
151
|
+
},
|
|
152
|
+
whileInView: {
|
|
153
|
+
fill: C,
|
|
154
|
+
opacity: 1,
|
|
155
|
+
transition: {
|
|
156
|
+
duration: O.duration
|
|
157
|
+
}
|
|
191
158
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
return a.forEach((f, v) => {
|
|
197
|
-
const m = E([f[0], f[1]]);
|
|
198
|
-
v !== a.length - 1 ? i = `${i}${m[0]} ${m[1]}L` : i = `${i}${m[0]} ${m[1]}`;
|
|
199
|
-
}), /* @__PURE__ */ o.jsx(zt.path, { d: i, variants: {
|
|
200
|
-
initial: {
|
|
201
|
-
fill: r,
|
|
202
|
-
opacity: 0
|
|
203
|
-
},
|
|
204
|
-
whileInView: {
|
|
205
|
-
fill: r,
|
|
206
|
-
opacity: 1,
|
|
207
|
-
transition: {
|
|
208
|
-
duration: N.duration
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}, initial: "initial", animate: ct ? "whileInView" : "initial", exit: {
|
|
212
|
-
opacity: 0,
|
|
213
|
-
transition: {
|
|
214
|
-
duration: N.duration
|
|
215
|
-
}
|
|
216
|
-
}, className: `${r === F ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
|
|
217
|
-
strokeWidth: M
|
|
218
|
-
} }, `${e.id}-${l}`);
|
|
159
|
+
}, initial: "initial", animate: ot ? "whileInView" : "initial", exit: {
|
|
160
|
+
opacity: 0,
|
|
161
|
+
transition: {
|
|
162
|
+
duration: O.duration
|
|
219
163
|
}
|
|
220
|
-
|
|
164
|
+
}, className: `${C === J ? "stroke-primary-gray-400 dark:stroke-primary-gray-500" : "stroke-primary-white dark:stroke-primary-gray-650"}`, style: {
|
|
165
|
+
stroke: pt,
|
|
166
|
+
strokeWidth: W
|
|
167
|
+
} }, `${e.id}`) }, e.id);
|
|
221
168
|
}) }),
|
|
222
|
-
|
|
169
|
+
s ? x.features.filter(
|
|
223
170
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
224
|
-
(e) => e.properties[
|
|
225
|
-
).map((e,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
a.forEach((i, f) => {
|
|
232
|
-
const v = E([i[0], i[1]]);
|
|
233
|
-
f !== a.length - 1 ? l = `${l}${v[0]} ${v[1]}L` : l = `${l}${v[0]} ${v[1]}`;
|
|
234
|
-
}), r += l;
|
|
235
|
-
}), /* @__PURE__ */ o.jsx("path", { d: r, className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
|
|
236
|
-
fill: "none",
|
|
237
|
-
fillOpacity: 0,
|
|
238
|
-
strokeWidth: "0.5"
|
|
239
|
-
} }, s);
|
|
240
|
-
})
|
|
241
|
-
) : (
|
|
242
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
243
|
-
e.geometry.coordinates.map((x, s) => {
|
|
244
|
-
let r = "M";
|
|
245
|
-
return x.forEach((a, l) => {
|
|
246
|
-
const i = E([a[0], a[1]]);
|
|
247
|
-
l !== x.length - 1 ? r = `${r}${i[0]} ${i[1]}L` : r = `${r}${i[0]} ${i[1]}`;
|
|
248
|
-
}), /* @__PURE__ */ o.jsx("path", { d: r, className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
|
|
249
|
-
fill: "none",
|
|
250
|
-
fillOpacity: 0,
|
|
251
|
-
strokeWidth: "0.5"
|
|
252
|
-
} }, s);
|
|
253
|
-
})
|
|
254
|
-
) }, n)) : null,
|
|
255
|
-
it.filter((e) => e.position === "after").map((e) => e.layer)
|
|
171
|
+
(e) => e.properties[N] === s.id
|
|
172
|
+
).map((e, r) => /* @__PURE__ */ o.jsx("path", { d: U(e) || "", className: "stroke-primary-gray-700 dark:stroke-primary-gray-300", style: {
|
|
173
|
+
fill: "none",
|
|
174
|
+
fillOpacity: 0,
|
|
175
|
+
strokeWidth: "0.5"
|
|
176
|
+
} }, r)) : null,
|
|
177
|
+
Q.filter((e) => e.position === "after").map((e) => e.layer)
|
|
256
178
|
] }) }),
|
|
257
|
-
|
|
179
|
+
gt === !1 ? null : /* @__PURE__ */ o.jsx("div", { className: Oe("absolute left-4 bottom-4 map-color-legend", _?.colorLegend), children: _t ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
258
180
|
/* @__PURE__ */ o.jsx("div", { className: "color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]", onClick: () => {
|
|
259
|
-
|
|
260
|
-
}, children: /* @__PURE__ */ o.jsx(
|
|
181
|
+
bt(!1);
|
|
182
|
+
}, children: /* @__PURE__ */ o.jsx(qe, {}) }),
|
|
261
183
|
/* @__PURE__ */ o.jsxs("div", { className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]", style: {
|
|
262
184
|
width: "175px"
|
|
263
185
|
}, children: [
|
|
264
186
|
/* @__PURE__ */ o.jsxs("div", { className: "flex gap-1 items-center", children: [
|
|
265
187
|
/* @__PURE__ */ o.jsx("svg", { width: "136px", viewBox: "0 0 136 136", className: "shrink-0", children: /* @__PURE__ */ o.jsxs("g", { children: [
|
|
266
|
-
|
|
188
|
+
h.map((e, r) => /* @__PURE__ */ o.jsx("g", { transform: `translate(0,${100 - r * 25})`, children: e.map((f, b) => /* @__PURE__ */ o.jsx("rect", { y: 1, x: b * 25 + 1, fill: f, width: 23, height: 23, strokeWidth: $ === f ? 2 : 0.25, style: {
|
|
267
189
|
cursor: "pointer"
|
|
268
190
|
}, onMouseOver: () => {
|
|
269
|
-
|
|
191
|
+
kt(f);
|
|
270
192
|
}, onMouseLeave: () => {
|
|
271
|
-
|
|
272
|
-
} },
|
|
273
|
-
/* @__PURE__ */ o.jsx("g", { transform: "translate(0,125)", children:
|
|
274
|
-
|
|
193
|
+
kt(void 0);
|
|
194
|
+
} }, b)) }, r)),
|
|
195
|
+
/* @__PURE__ */ o.jsx("g", { transform: "translate(0,125)", children: d.map((e, r) => /* @__PURE__ */ o.jsx("text", { y: 10, x: (r + 1) * 25, fontSize: 10, textAnchor: "middle", children: typeof e == "string" || e < 1 ? e : be(e, "NA") }, r)) }),
|
|
196
|
+
Y.map((e, r) => /* @__PURE__ */ o.jsx("g", { transform: `translate(${Math.max(Math.min(d.length + 1, 5), 4) * 25 + 10},${100 - r * 25})`, children: /* @__PURE__ */ o.jsx("text", { x: 0, transform: "rotate(-90)", y: 0, fontSize: 10, textAnchor: "middle", children: typeof e == "string" || e < 1 ? e : be(e, "NA") }) }, r))
|
|
275
197
|
] }) }),
|
|
276
|
-
/* @__PURE__ */ o.jsx(
|
|
198
|
+
/* @__PURE__ */ o.jsx(ve, { marginBottom: "none", size: "xs", className: "leading-normal text-center shrink-0", style: {
|
|
277
199
|
display: "-webkit-box",
|
|
278
200
|
WebkitLineClamp: "1",
|
|
279
201
|
WebkitBoxOrient: "vertical",
|
|
@@ -281,9 +203,9 @@ function Ke(d) {
|
|
|
281
203
|
writingMode: "vertical-rl",
|
|
282
204
|
height: "8.5rem",
|
|
283
205
|
transform: "rotate(180deg)"
|
|
284
|
-
}, children:
|
|
206
|
+
}, children: q })
|
|
285
207
|
] }),
|
|
286
|
-
/* @__PURE__ */ o.jsx(
|
|
208
|
+
/* @__PURE__ */ o.jsx(ve, { marginBottom: "none", size: "xs", className: "mt-1 leading-normal text-center", style: {
|
|
287
209
|
display: "-webkit-box",
|
|
288
210
|
WebkitLineClamp: "1",
|
|
289
211
|
width: "8.5rem",
|
|
@@ -292,151 +214,156 @@ function Ke(d) {
|
|
|
292
214
|
}, children: Pt })
|
|
293
215
|
] })
|
|
294
216
|
] }) : /* @__PURE__ */ o.jsx("button", { type: "button", className: "mb-0 border-0 bg-transparent p-0 self-start", onClick: () => {
|
|
295
|
-
|
|
217
|
+
bt(!0);
|
|
296
218
|
}, children: /* @__PURE__ */ o.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" }) }) }),
|
|
297
|
-
|
|
298
|
-
/* @__PURE__ */ o.jsx("button", { onClick: () =>
|
|
299
|
-
/* @__PURE__ */ o.jsx("button", { onClick: () =>
|
|
219
|
+
S === "button" && /* @__PURE__ */ o.jsxs("div", { className: "absolute left-4 top-4 flex flex-col zoom-buttons", children: [
|
|
220
|
+
/* @__PURE__ */ o.jsx("button", { onClick: () => it("in"), className: "leading-0 px-2 py-3.5 border text-primary-gray-700 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "+" }),
|
|
221
|
+
/* @__PURE__ */ o.jsx("button", { onClick: () => it("out"), className: "leading-0 px-2 py-3.5 border text-primary-gray-700 border-t-0 border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100", children: "–" })
|
|
300
222
|
] })
|
|
301
223
|
] }),
|
|
302
|
-
|
|
303
|
-
|
|
224
|
+
s && K && wt && Ct ? /* @__PURE__ */ o.jsx(Ye, { data: s, body: K, xPos: wt, yPos: Ct, backgroundStyle: Wt?.tooltip, className: _?.tooltip }) : null,
|
|
225
|
+
y && G !== void 0 ? /* @__PURE__ */ o.jsx(Ze, { body: y, data: G, setData: l, className: _?.modal }) : null
|
|
304
226
|
] });
|
|
305
227
|
}
|
|
306
|
-
function
|
|
307
|
-
const t =
|
|
308
|
-
data:
|
|
309
|
-
graphTitle:
|
|
228
|
+
function Ro(n) {
|
|
229
|
+
const t = Me.c(121), {
|
|
230
|
+
data: d,
|
|
231
|
+
graphTitle: L,
|
|
310
232
|
mapData: Pt,
|
|
311
|
-
colors:
|
|
312
|
-
sources:
|
|
313
|
-
graphDescription:
|
|
314
|
-
height:
|
|
315
|
-
width:
|
|
316
|
-
footNote:
|
|
317
|
-
xDomain:
|
|
318
|
-
yDomain:
|
|
319
|
-
xColorLegendTitle:
|
|
320
|
-
yColorLegendTitle:
|
|
321
|
-
tooltip:
|
|
322
|
-
scale:
|
|
323
|
-
centerPoint:
|
|
324
|
-
padding:
|
|
325
|
-
mapBorderWidth:
|
|
326
|
-
mapNoDataColor:
|
|
327
|
-
backgroundColor:
|
|
328
|
-
mapBorderColor:
|
|
329
|
-
relativeHeight:
|
|
330
|
-
onSeriesMouseOver:
|
|
331
|
-
isWorldMap:
|
|
332
|
-
zoomScaleExtend:
|
|
333
|
-
zoomTranslateExtend:
|
|
334
|
-
graphID:
|
|
335
|
-
showColorScale:
|
|
336
|
-
highlightedIds:
|
|
337
|
-
onSeriesMouseClick:
|
|
338
|
-
mapProperty:
|
|
339
|
-
graphDownload:
|
|
340
|
-
dataDownload:
|
|
341
|
-
showAntarctica:
|
|
342
|
-
language:
|
|
343
|
-
minHeight:
|
|
344
|
-
theme:
|
|
345
|
-
ariaLabel:
|
|
346
|
-
resetSelectionOnDoubleClick:
|
|
347
|
-
detailsOnClick:
|
|
348
|
-
styles:
|
|
349
|
-
classNames:
|
|
350
|
-
mapProjection:
|
|
351
|
-
zoomInteraction:
|
|
352
|
-
animate:
|
|
353
|
-
dimmedOpacity:
|
|
354
|
-
customLayers:
|
|
355
|
-
timeline:
|
|
356
|
-
collapseColorScaleByDefault:
|
|
357
|
-
zoomAndCenterByHighlightedIds:
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
233
|
+
colors: Y,
|
|
234
|
+
sources: q,
|
|
235
|
+
graphDescription: u,
|
|
236
|
+
height: p,
|
|
237
|
+
width: h,
|
|
238
|
+
footNote: Bt,
|
|
239
|
+
xDomain: k,
|
|
240
|
+
yDomain: W,
|
|
241
|
+
xColorLegendTitle: J,
|
|
242
|
+
yColorLegendTitle: pt,
|
|
243
|
+
tooltip: K,
|
|
244
|
+
scale: ht,
|
|
245
|
+
centerPoint: ut,
|
|
246
|
+
padding: ft,
|
|
247
|
+
mapBorderWidth: w,
|
|
248
|
+
mapNoDataColor: Z,
|
|
249
|
+
backgroundColor: N,
|
|
250
|
+
mapBorderColor: Lt,
|
|
251
|
+
relativeHeight: y,
|
|
252
|
+
onSeriesMouseOver: gt,
|
|
253
|
+
isWorldMap: Wt,
|
|
254
|
+
zoomScaleExtend: _,
|
|
255
|
+
zoomTranslateExtend: F,
|
|
256
|
+
graphID: S,
|
|
257
|
+
showColorScale: O,
|
|
258
|
+
highlightedIds: M,
|
|
259
|
+
onSeriesMouseClick: Q,
|
|
260
|
+
mapProperty: yt,
|
|
261
|
+
graphDownload: xt,
|
|
262
|
+
dataDownload: T,
|
|
263
|
+
showAntarctica: vt,
|
|
264
|
+
language: x,
|
|
265
|
+
minHeight: _t,
|
|
266
|
+
theme: bt,
|
|
267
|
+
ariaLabel: $,
|
|
268
|
+
resetSelectionOnDoubleClick: kt,
|
|
269
|
+
detailsOnClick: G,
|
|
270
|
+
styles: l,
|
|
271
|
+
classNames: s,
|
|
272
|
+
mapProjection: tt,
|
|
273
|
+
zoomInteraction: wt,
|
|
274
|
+
animate: et,
|
|
275
|
+
dimmedOpacity: Ct,
|
|
276
|
+
customLayers: H,
|
|
277
|
+
timeline: D,
|
|
278
|
+
collapseColorScaleByDefault: ot,
|
|
279
|
+
zoomAndCenterByHighlightedIds: jt,
|
|
280
|
+
projectionRotate: R,
|
|
281
|
+
rewindCoordinatesInMapData: V
|
|
282
|
+
} = n, g = Pt === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-v2.json" : Pt, I = Y === void 0 ? ye.light.bivariateColors.colors05x05 : Y, rt = Bt === 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." : Bt, Dt = J === void 0 ? "X Color key" : J, Nt = pt === void 0 ? "Y Color key" : pt, z = ht === void 0 ? 0.95 : ht, St = w === void 0 ? 0.5 : w, U = Z === void 0 ? ye.light.graphNoData : Z, Ot = N === void 0 ? !1 : N, Mt = Lt === void 0 ? ye.light.grays["gray-500"] : Lt, at = Wt === void 0 ? !0 : Wt;
|
|
283
|
+
let nt;
|
|
284
|
+
t[0] !== _ ? (nt = _ === void 0 ? [0.8, 6] : _, t[0] = _, t[1] = nt) : nt = t[1];
|
|
285
|
+
const it = nt, e = O === void 0 ? !0 : O;
|
|
286
|
+
let r;
|
|
287
|
+
t[2] !== M ? (r = M === void 0 ? [] : M, t[2] = M, t[3] = r) : r = t[3];
|
|
288
|
+
const f = r, b = yt === void 0 ? "ISO3" : yt, m = xt === void 0 ? !1 : xt, C = T === void 0 ? !1 : T, v = vt === void 0 ? !1 : vt, It = x === void 0 ? "en" : x, E = _t === void 0 ? 0 : _t, oe = bt === void 0 ? "light" : bt, re = kt === void 0 ? !0 : kt, ae = tt === void 0 ? "naturalEarth" : tt, ne = wt === void 0 ? "button" : wt, Ft = et === void 0 ? !1 : et, ie = Ct === void 0 ? 0.3 : Ct;
|
|
365
289
|
let Tt;
|
|
366
|
-
t[4] !==
|
|
367
|
-
const
|
|
368
|
-
let
|
|
369
|
-
t[6] !==
|
|
290
|
+
t[4] !== H ? (Tt = H === void 0 ? [] : H, t[4] = H, t[5] = Tt) : Tt = t[5];
|
|
291
|
+
const se = Tt;
|
|
292
|
+
let $t;
|
|
293
|
+
t[6] !== D ? ($t = D === void 0 ? {
|
|
370
294
|
enabled: !1,
|
|
371
295
|
autoplay: !1,
|
|
372
296
|
showOnlyActiveDate: !0
|
|
373
|
-
} :
|
|
374
|
-
const
|
|
375
|
-
let
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
297
|
+
} : D, t[6] = D, t[7] = $t) : $t = t[7];
|
|
298
|
+
const a = $t, le = jt === void 0 ? !1 : jt;
|
|
299
|
+
let Ht;
|
|
300
|
+
t[8] !== R ? (Ht = R === void 0 ? [0, 0] : R, t[8] = R, t[9] = Ht) : Ht = t[9];
|
|
301
|
+
const ce = Ht, de = V === void 0 ? !0 : V, [X, je] = j(0), [zt, De] = j(0), [A, Ne] = j(a.autoplay);
|
|
302
|
+
let Et;
|
|
303
|
+
if (t[10] !== d || t[11] !== a.dateFormat) {
|
|
304
|
+
let c;
|
|
305
|
+
t[13] !== a.dateFormat ? (c = (B) => Le(`${B.date}`, a.dateFormat || "yyyy", /* @__PURE__ */ new Date()).getTime(), t[13] = a.dateFormat, t[14] = c) : c = t[14], Et = [...new Set(d.filter(yo).map(c))], Et.sort(go), t[10] = d, t[11] = a.dateFormat, t[12] = Et;
|
|
379
306
|
} else
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
let
|
|
383
|
-
t[
|
|
384
|
-
const
|
|
385
|
-
|
|
307
|
+
Et = t[12];
|
|
308
|
+
const i = Et, [P, me] = j(a.autoplay ? 0 : i.length - 1), [st, Se] = j(void 0), pe = At(null), xe = At(null);
|
|
309
|
+
let Rt, Gt;
|
|
310
|
+
t[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Rt = () => {
|
|
311
|
+
const c = new ResizeObserver((B) => {
|
|
312
|
+
je(B[0].target.clientWidth || 620), De(B[0].target.clientHeight || 480);
|
|
386
313
|
});
|
|
387
|
-
return
|
|
388
|
-
}, Gt = [], t[
|
|
389
|
-
let
|
|
390
|
-
t[
|
|
391
|
-
|
|
392
|
-
}, t[
|
|
393
|
-
const Ut =
|
|
314
|
+
return pe.current && c.observe(pe.current), () => c.disconnect();
|
|
315
|
+
}, Gt = [], t[15] = Rt, t[16] = Gt) : (Rt = t[15], Gt = t[16]), ee(Rt, Gt);
|
|
316
|
+
let Vt;
|
|
317
|
+
t[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Vt = (c) => {
|
|
318
|
+
Se(c);
|
|
319
|
+
}, t[17] = Vt) : Vt = t[17];
|
|
320
|
+
const Ut = ze(Vt);
|
|
394
321
|
let Xt;
|
|
395
|
-
t[
|
|
396
|
-
typeof
|
|
397
|
-
Ut(
|
|
398
|
-
}) : Ut(
|
|
399
|
-
}, t[
|
|
322
|
+
t[18] !== g || t[19] !== Ut ? (Xt = () => {
|
|
323
|
+
typeof g == "string" ? ro(g).then((B) => {
|
|
324
|
+
Ut(B);
|
|
325
|
+
}) : Ut(g);
|
|
326
|
+
}, t[18] = g, t[19] = Ut, t[20] = Xt) : Xt = t[20];
|
|
400
327
|
let Yt;
|
|
401
|
-
t[
|
|
328
|
+
t[21] !== g ? (Yt = [g], t[21] = g, t[22] = Yt) : Yt = t[22], ee(Xt, Yt);
|
|
402
329
|
let qt, Jt;
|
|
403
|
-
t[
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
}, (
|
|
407
|
-
return
|
|
408
|
-
}, Jt = [
|
|
409
|
-
const
|
|
330
|
+
t[23] !== A || t[24] !== a.speed || t[25] !== i ? (qt = () => {
|
|
331
|
+
const c = setInterval(() => {
|
|
332
|
+
me((B) => B < i.length - 1 ? B + 1 : 0);
|
|
333
|
+
}, (a.speed || 2) * 1e3);
|
|
334
|
+
return A || clearInterval(c), () => clearInterval(c);
|
|
335
|
+
}, Jt = [i, A, a.speed], t[23] = A, t[24] = a.speed, t[25] = i, t[26] = qt, t[27] = Jt) : (qt = t[26], Jt = t[27]), ee(qt, Jt);
|
|
336
|
+
const he = a.dateFormat || "yyyy";
|
|
410
337
|
let Kt;
|
|
411
|
-
t[
|
|
338
|
+
t[28] !== P || t[29] !== he || t[30] !== a.showOnlyActiveDate || t[31] !== i ? (Kt = Ee(i, P, a.showOnlyActiveDate, he), t[28] = P, t[29] = he, t[30] = a.showOnlyActiveDate, t[31] = i, t[32] = Kt) : Kt = t[32];
|
|
412
339
|
const Zt = Kt;
|
|
413
|
-
if (
|
|
340
|
+
if (k && W && (k.length !== I[0].length - 1 || W.length !== I.length - 1))
|
|
414
341
|
return console.error("the xDomain and yDomain array length don't match to the color array length"), null;
|
|
415
|
-
const
|
|
416
|
-
let
|
|
417
|
-
t[
|
|
418
|
-
title:
|
|
419
|
-
description:
|
|
342
|
+
const ue = s?.graphContainer, fe = l?.graphContainer;
|
|
343
|
+
let lt;
|
|
344
|
+
t[33] !== s?.description || t[34] !== s?.title || t[35] !== d || t[36] !== C || t[37] !== u || t[38] !== m || t[39] !== L || t[40] !== l?.description || t[41] !== l?.title || t[42] !== h ? (lt = L || u || m || C ? /* @__PURE__ */ o.jsx(eo, { styles: {
|
|
345
|
+
title: l?.title,
|
|
346
|
+
description: l?.description
|
|
420
347
|
}, classNames: {
|
|
421
|
-
title:
|
|
422
|
-
description:
|
|
423
|
-
}, graphTitle:
|
|
424
|
-
let
|
|
425
|
-
t[
|
|
348
|
+
title: s?.title,
|
|
349
|
+
description: s?.description
|
|
350
|
+
}, graphTitle: L, graphDescription: u, width: h, graphDownload: m ? xe : void 0, dataDownload: C ? d.map(fo).filter(uo).length > 0 ? d.map(ho).filter(po) : d.filter(mo) : null }) : null, t[33] = s?.description, t[34] = s?.title, t[35] = d, t[36] = C, t[37] = u, t[38] = m, t[39] = L, t[40] = l?.description, t[41] = l?.title, t[42] = h, t[43] = lt) : lt = t[43];
|
|
351
|
+
let ct;
|
|
352
|
+
t[44] !== P || t[45] !== Zt || t[46] !== A || t[47] !== a.enabled || t[48] !== i ? (ct = a.enabled && i.length > 0 && Zt ? /* @__PURE__ */ o.jsxs("div", { className: "flex gap-6 items-center", dir: "ltr", children: [
|
|
426
353
|
/* @__PURE__ */ o.jsx("button", { type: "button", onClick: () => {
|
|
427
|
-
|
|
428
|
-
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label":
|
|
429
|
-
/* @__PURE__ */ o.jsx(
|
|
430
|
-
|
|
431
|
-
}, onChange: (
|
|
432
|
-
|
|
354
|
+
Ne(!A);
|
|
355
|
+
}, className: "p-0 border-0 cursor-pointer bg-transparent", "aria-label": A ? "Click to pause animation" : "Click to play animation", children: A ? /* @__PURE__ */ o.jsx(Je, {}) : /* @__PURE__ */ o.jsx(Ke, {}) }),
|
|
356
|
+
/* @__PURE__ */ o.jsx(Ae, { min: i[0], max: i[i.length - 1], marks: Zt, step: null, defaultValue: i[i.length - 1], value: i[P], onChangeComplete: (c) => {
|
|
357
|
+
me(i.indexOf(c));
|
|
358
|
+
}, onChange: (c) => {
|
|
359
|
+
me(i.indexOf(c));
|
|
433
360
|
}, "aria-label": "Time slider. Use arrow keys to adjust selected time period." })
|
|
434
|
-
] }) : null, t[
|
|
435
|
-
let
|
|
436
|
-
t[
|
|
437
|
-
...
|
|
438
|
-
features:
|
|
439
|
-
}, xDomain:
|
|
361
|
+
] }) : null, t[44] = P, t[45] = Zt, t[46] = A, t[47] = a.enabled, t[48] = i, t[49] = ct) : ct = t[49];
|
|
362
|
+
let dt;
|
|
363
|
+
t[50] !== Ft || t[51] !== ut || t[52] !== s || t[53] !== ot || t[54] !== I || t[55] !== se || t[56] !== d || t[57] !== G || t[58] !== ie || t[59] !== p || t[60] !== f || t[61] !== P || t[62] !== at || t[63] !== Mt || t[64] !== St || t[65] !== U || t[66] !== ae || t[67] !== b || t[68] !== st || t[69] !== E || t[70] !== Q || t[71] !== gt || t[72] !== ce || t[73] !== y || t[74] !== re || t[75] !== de || t[76] !== z || t[77] !== v || t[78] !== e || t[79] !== l || t[80] !== zt || t[81] !== X || t[82] !== a.dateFormat || t[83] !== a.enabled || t[84] !== K || t[85] !== i || t[86] !== h || t[87] !== Dt || t[88] !== k || t[89] !== Nt || t[90] !== W || t[91] !== le || t[92] !== ne || t[93] !== it || t[94] !== F ? (dt = /* @__PURE__ */ o.jsx(ao, { ref: pe, children: X && zt && st ? /* @__PURE__ */ o.jsx(io, { data: d.filter((c) => a.enabled ? c.date === Be(new Date(i[P]), a.dateFormat || "yyyy") : c), mapData: v ? st : {
|
|
364
|
+
...st,
|
|
365
|
+
features: st.features.filter(co)
|
|
366
|
+
}, xDomain: k || Ce(d.map(lo), I[0].length), yDomain: W || Ce(d.map(so), I.length), width: X, height: zt, scale: z, centerPoint: ut, colors: I, xColorLegendTitle: Dt, yColorLegendTitle: Nt, mapBorderWidth: St, mapNoDataColor: U, mapBorderColor: Mt, tooltip: K, onSeriesMouseOver: gt, isWorldMap: at, zoomScaleExtend: it, zoomTranslateExtend: F, onSeriesMouseClick: Q, mapProperty: b, highlightedIds: f, resetSelectionOnDoubleClick: re, styles: l, showColorScale: e, classNames: s, mapProjection: ae || (at ? "naturalEarth" : "mercator"), detailsOnClick: G, zoomInteraction: ne, animate: Ft === !0 ? {
|
|
440
367
|
duration: 0.5,
|
|
441
368
|
once: !0,
|
|
442
369
|
amount: 0.5
|
|
@@ -444,56 +371,56 @@ function Lo(d) {
|
|
|
444
371
|
duration: 0,
|
|
445
372
|
once: !0,
|
|
446
373
|
amount: 0
|
|
447
|
-
}, dimmedOpacity:
|
|
448
|
-
height: `${Math.max(
|
|
449
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(
|
|
450
|
-
let
|
|
451
|
-
t[
|
|
452
|
-
footnote:
|
|
453
|
-
source:
|
|
374
|
+
}, dimmedOpacity: ie, customLayers: se, collapseColorScaleByDefault: ot, zoomAndCenterByHighlightedIds: le, projectionRotate: ce, rewindCoordinatesInMapData: de }) : /* @__PURE__ */ o.jsx("div", { style: {
|
|
375
|
+
height: `${Math.max(E, p || (y ? E ? (h || X) * y > E ? (h || X) * y : E : (h || X) * y : zt))}px`
|
|
376
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ o.jsx(Pe, { "aria-label": "Loading graph" }) }) }), t[50] = Ft, t[51] = ut, t[52] = s, t[53] = ot, t[54] = I, t[55] = se, t[56] = d, t[57] = G, t[58] = ie, t[59] = p, t[60] = f, t[61] = P, t[62] = at, t[63] = Mt, t[64] = St, t[65] = U, t[66] = ae, t[67] = b, t[68] = st, t[69] = E, t[70] = Q, t[71] = gt, t[72] = ce, t[73] = y, t[74] = re, t[75] = de, t[76] = z, t[77] = v, t[78] = e, t[79] = l, t[80] = zt, t[81] = X, t[82] = a.dateFormat, t[83] = a.enabled, t[84] = K, t[85] = i, t[86] = h, t[87] = Dt, t[88] = k, t[89] = Nt, t[90] = W, t[91] = le, t[92] = ne, t[93] = it, t[94] = F, t[95] = dt) : dt = t[95];
|
|
377
|
+
let mt;
|
|
378
|
+
t[96] !== s?.footnote || t[97] !== s?.source || t[98] !== rt || t[99] !== q || t[100] !== l?.footnote || t[101] !== l?.source || t[102] !== h ? (mt = q || rt ? /* @__PURE__ */ o.jsx(oo, { styles: {
|
|
379
|
+
footnote: l?.footnote,
|
|
380
|
+
source: l?.source
|
|
454
381
|
}, classNames: {
|
|
455
|
-
footnote:
|
|
456
|
-
source:
|
|
457
|
-
}, sources:
|
|
382
|
+
footnote: s?.footnote,
|
|
383
|
+
source: s?.source
|
|
384
|
+
}, sources: q, footNote: rt, width: h }) : null, t[96] = s?.footnote, t[97] = s?.source, t[98] = rt, t[99] = q, t[100] = l?.footnote, t[101] = l?.source, t[102] = h, t[103] = mt) : mt = t[103];
|
|
458
385
|
let Qt;
|
|
459
|
-
return t[
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
] }), t[
|
|
386
|
+
return t[104] !== $ || t[105] !== Ot || t[106] !== S || t[107] !== p || t[108] !== It || t[109] !== E || t[110] !== ft || t[111] !== y || t[112] !== ue || t[113] !== fe || t[114] !== lt || t[115] !== ct || t[116] !== dt || t[117] !== mt || t[118] !== oe || t[119] !== h ? (Qt = /* @__PURE__ */ o.jsxs(no, { className: ue, style: fe, id: S, ref: xe, "aria-label": $, backgroundColor: Ot, theme: oe, language: It, minHeight: E, width: h, height: p, relativeHeight: y, padding: ft, children: [
|
|
387
|
+
lt,
|
|
388
|
+
ct,
|
|
389
|
+
dt,
|
|
390
|
+
mt
|
|
391
|
+
] }), t[104] = $, t[105] = Ot, t[106] = S, t[107] = p, t[108] = It, t[109] = E, t[110] = ft, t[111] = y, t[112] = ue, t[113] = fe, t[114] = lt, t[115] = ct, t[116] = dt, t[117] = mt, t[118] = oe, t[119] = h, t[120] = Qt) : Qt = t[120], Qt;
|
|
465
392
|
}
|
|
466
|
-
function
|
|
467
|
-
return
|
|
393
|
+
function so(n) {
|
|
394
|
+
return n.y;
|
|
468
395
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
396
|
+
function lo(n) {
|
|
397
|
+
return n.x;
|
|
471
398
|
}
|
|
472
|
-
function
|
|
473
|
-
return
|
|
399
|
+
function co(n) {
|
|
400
|
+
return n.properties.NAME !== "Antarctica";
|
|
474
401
|
}
|
|
475
|
-
function
|
|
476
|
-
return
|
|
402
|
+
function mo(n) {
|
|
403
|
+
return n !== void 0;
|
|
477
404
|
}
|
|
478
|
-
function
|
|
479
|
-
return
|
|
405
|
+
function po(n) {
|
|
406
|
+
return n !== void 0;
|
|
480
407
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
408
|
+
function ho(n) {
|
|
409
|
+
return n.data;
|
|
483
410
|
}
|
|
484
|
-
function
|
|
485
|
-
return
|
|
411
|
+
function uo(n) {
|
|
412
|
+
return n !== void 0;
|
|
486
413
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
414
|
+
function fo(n) {
|
|
415
|
+
return n.data;
|
|
489
416
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
417
|
+
function go(n, t) {
|
|
418
|
+
return n - t;
|
|
492
419
|
}
|
|
493
|
-
function
|
|
494
|
-
return
|
|
420
|
+
function yo(n) {
|
|
421
|
+
return n.date;
|
|
495
422
|
}
|
|
496
423
|
export {
|
|
497
|
-
|
|
424
|
+
Ro as BiVariateChoroplethMap
|
|
498
425
|
};
|
|
499
426
|
//# sourceMappingURL=BiVariateChoroplethMap.js.map
|