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