@undp/data-viz 1.5.2 → 1.5.4
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 +484 -488
- 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 +66 -67
- 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/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +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/XAxesLabels-Drf7M3YK.cjs +2 -0
- package/dist/XAxesLabels-Drf7M3YK.cjs.map +1 -0
- package/dist/{XAxesLabels-CaV2q-6H.js → XAxesLabels-loO78vUO.js} +19 -19
- package/dist/XAxesLabels-loO78vUO.js.map +1 -0
- package/dist/YAxesLabels-CctDydGR.cjs +2 -0
- package/dist/YAxesLabels-CctDydGR.cjs.map +1 -0
- package/dist/{YAxesLabels-CPGZjmZJ.js → YAxesLabels-DSm6I5zG.js} +16 -17
- package/dist/YAxesLabels-DSm6I5zG.js.map +1 -0
- 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/XAxesLabels-CaV2q-6H.js.map +0 -1
- package/dist/XAxesLabels-OjBNl_lS.cjs +0 -2
- package/dist/XAxesLabels-OjBNl_lS.cjs.map +0 -1
- package/dist/YAxesLabels-CPGZjmZJ.js.map +0 -1
- package/dist/YAxesLabels-D8IydyZj.cjs +0 -2
- package/dist/YAxesLabels-D8IydyZj.cjs.map +0 -1
- 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/StripChart.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { j as l, m as ni } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
|
-
import {
|
|
3
|
-
import { useRef as si, useState as E, useEffect as ui } from "react";
|
|
2
|
+
import { useRef as si, useState as E, useEffect as fi } from "react";
|
|
4
3
|
import { i as pi } from "./index-Bwrro8-q.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { X as mi } from "./Modal-DVVwpKhP.js";
|
|
5
|
+
import { o as xi } from "./index-DvVprvy6.js";
|
|
7
6
|
import { T as yi } from "./Tooltip-CVCGWyzw.js";
|
|
8
7
|
import { c as J } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
9
|
-
import { n as
|
|
8
|
+
import { n as gi } from "./numberFormattingFunction-14YCbkN2.js";
|
|
10
9
|
import { Colors as c } from "./Colors.js";
|
|
11
10
|
import { s as vi } from "./string2HTML-oFCROsus.js";
|
|
12
11
|
import { a as wi } from "./linear-DUdu7l2G.js";
|
|
@@ -17,17 +16,18 @@ import { GraphFooter as Ci } from "./GraphFooter.js";
|
|
|
17
16
|
import { GraphHeader as ji } from "./GraphHeader.js";
|
|
18
17
|
import { ColorLegendWithMouseOver as Mi } from "./ColorLegendWithMouseOver.js";
|
|
19
18
|
import { E as Di } from "./EmptyState-DdTp-Mdn.js";
|
|
20
|
-
|
|
19
|
+
import { u as di } from "./uniqBy-BHy4I8PK.js";
|
|
20
|
+
function Ni(P, e) {
|
|
21
21
|
if (P < 2) return [];
|
|
22
|
-
const d =
|
|
23
|
-
return Array.from({ length: P }, (p,
|
|
22
|
+
const d = e / (P - 1);
|
|
23
|
+
return Array.from({ length: P }, (p, o) => o * d);
|
|
24
24
|
}
|
|
25
25
|
function Vi(P) {
|
|
26
26
|
const {
|
|
27
|
-
data:
|
|
27
|
+
data: e,
|
|
28
28
|
width: d,
|
|
29
29
|
height: p,
|
|
30
|
-
colors:
|
|
30
|
+
colors: o,
|
|
31
31
|
colorDomain: n,
|
|
32
32
|
radius: h,
|
|
33
33
|
leftMargin: s,
|
|
@@ -36,7 +36,7 @@ function Vi(P) {
|
|
|
36
36
|
bottomMargin: ii,
|
|
37
37
|
tooltip: F,
|
|
38
38
|
onSeriesMouseOver: k,
|
|
39
|
-
highlightedDataPoints:
|
|
39
|
+
highlightedDataPoints: r,
|
|
40
40
|
selectedColor: R,
|
|
41
41
|
minValue: G,
|
|
42
42
|
maxValue: _,
|
|
@@ -59,15 +59,21 @@ function Vi(P) {
|
|
|
59
59
|
} = P, q = si(null), D = Oi(q, {
|
|
60
60
|
once: m.once,
|
|
61
61
|
amount: m.amount
|
|
62
|
-
}), [H, x] = E(void 0), [
|
|
62
|
+
}), [H, x] = E(void 0), [u, A] = E(void 0), [U, L] = E(void 0), [f, g] = E(void 0), O = {
|
|
63
63
|
top: Y,
|
|
64
64
|
bottom: ii,
|
|
65
65
|
left: s,
|
|
66
66
|
right: X
|
|
67
|
-
}, V = d - O.left - O.right, W = p - O.top - O.bottom,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
}, V = d - O.left - O.right, W = p - O.top - O.bottom, ei = e.map((i, t) => ({ ...i, id: `${t}` })), oi = xi(
|
|
68
|
+
ei,
|
|
69
|
+
[
|
|
70
|
+
(i) => {
|
|
71
|
+
const t = (r || []).indexOf(i.label);
|
|
72
|
+
return t === -1 ? 1 / 0 : t;
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
["desc"]
|
|
76
|
+
), li = J(_) ? Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, li]).range([0, V]).nice(), ri = Ni(w, V);
|
|
71
77
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
72
78
|
/* @__PURE__ */ l.jsx(
|
|
73
79
|
ai.svg,
|
|
@@ -80,7 +86,7 @@ function Vi(P) {
|
|
|
80
86
|
children: /* @__PURE__ */ l.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
|
|
81
87
|
M.filter((i) => i.position === "before").map((i) => i.layer),
|
|
82
88
|
/* @__PURE__ */ l.jsxs(bi, { children: [
|
|
83
|
-
|
|
89
|
+
oi.map((i) => /* @__PURE__ */ l.jsxs(
|
|
84
90
|
ai.g,
|
|
85
91
|
{
|
|
86
92
|
className: "undp-viz-g-with-hover",
|
|
@@ -93,7 +99,7 @@ function Vi(P) {
|
|
|
93
99
|
whileInView: {
|
|
94
100
|
x: z(i.position),
|
|
95
101
|
y: W / 2,
|
|
96
|
-
opacity: R ? i.color &&
|
|
102
|
+
opacity: R ? i.color && o[n.indexOf(i.color)] === R ? 0.95 : T : r.length !== 0 ? r.indexOf(i.label) !== -1 ? 0.95 : T : v,
|
|
97
103
|
transition: { duration: m.duration }
|
|
98
104
|
}
|
|
99
105
|
},
|
|
@@ -104,7 +110,7 @@ function Vi(P) {
|
|
|
104
110
|
x(i), g(t.clientY), L(t.clientX), k?.(i);
|
|
105
111
|
},
|
|
106
112
|
onClick: () => {
|
|
107
|
-
(S || N) && (pi(
|
|
113
|
+
(S || N) && (pi(u, i) && ti ? (A(void 0), S?.(void 0)) : (A(i), S?.(i)));
|
|
108
114
|
},
|
|
109
115
|
onMouseMove: (t) => {
|
|
110
116
|
x(i), g(t.clientY), L(t.clientX);
|
|
@@ -120,10 +126,10 @@ function Vi(P) {
|
|
|
120
126
|
cx: 0,
|
|
121
127
|
variants: {
|
|
122
128
|
initial: {
|
|
123
|
-
fill: y &&
|
|
129
|
+
fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
|
|
124
130
|
},
|
|
125
131
|
whileInView: {
|
|
126
|
-
fill: y &&
|
|
132
|
+
fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
|
|
127
133
|
transition: { duration: m.duration }
|
|
128
134
|
}
|
|
129
135
|
},
|
|
@@ -141,10 +147,10 @@ function Vi(P) {
|
|
|
141
147
|
width: 2,
|
|
142
148
|
variants: {
|
|
143
149
|
initial: {
|
|
144
|
-
fill: y &&
|
|
150
|
+
fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
|
|
145
151
|
},
|
|
146
152
|
whileInView: {
|
|
147
|
-
fill: y &&
|
|
153
|
+
fill: y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
|
|
148
154
|
transition: { duration: m.duration }
|
|
149
155
|
}
|
|
150
156
|
},
|
|
@@ -153,7 +159,7 @@ function Vi(P) {
|
|
|
153
159
|
exit: { opacity: 0, transition: { duration: m.duration } }
|
|
154
160
|
}
|
|
155
161
|
),
|
|
156
|
-
|
|
162
|
+
r.length !== 0 && r.indexOf(i.label) !== -1 ? /* @__PURE__ */ l.jsx(
|
|
157
163
|
ai.text,
|
|
158
164
|
{
|
|
159
165
|
x: 0,
|
|
@@ -169,7 +175,7 @@ function Vi(P) {
|
|
|
169
175
|
animate: D ? "whileInView" : "initial",
|
|
170
176
|
exit: { opacity: 0, transition: { duration: m.duration } },
|
|
171
177
|
style: {
|
|
172
|
-
fill: I || (y &&
|
|
178
|
+
fill: I || (y && r ? r.indexOf(i.label) !== -1 ? y : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray),
|
|
173
179
|
textAnchor: "middle",
|
|
174
180
|
...j?.graphObjectValues || {}
|
|
175
181
|
},
|
|
@@ -177,7 +183,7 @@ function Vi(P) {
|
|
|
177
183
|
"graph-value text-sm font-bold",
|
|
178
184
|
$?.graphObjectValues
|
|
179
185
|
),
|
|
180
|
-
children:
|
|
186
|
+
children: gi(i.position, "NA", B, K, b)
|
|
181
187
|
}
|
|
182
188
|
) : null
|
|
183
189
|
]
|
|
@@ -198,7 +204,7 @@ function Vi(P) {
|
|
|
198
204
|
$?.xAxis?.labels
|
|
199
205
|
),
|
|
200
206
|
dy: "1em",
|
|
201
|
-
children:
|
|
207
|
+
children: gi(z.invert(i), "NA", B, K, b)
|
|
202
208
|
},
|
|
203
209
|
t
|
|
204
210
|
))
|
|
@@ -207,21 +213,21 @@ function Vi(P) {
|
|
|
207
213
|
] })
|
|
208
214
|
}
|
|
209
215
|
),
|
|
210
|
-
H && F && U &&
|
|
216
|
+
H && F && U && f ? /* @__PURE__ */ l.jsx(
|
|
211
217
|
yi,
|
|
212
218
|
{
|
|
213
219
|
data: H,
|
|
214
220
|
body: F,
|
|
215
221
|
xPos: U,
|
|
216
|
-
yPos:
|
|
222
|
+
yPos: f,
|
|
217
223
|
backgroundStyle: j?.tooltip,
|
|
218
224
|
className: $?.tooltip
|
|
219
225
|
}
|
|
220
226
|
) : null,
|
|
221
|
-
N &&
|
|
222
|
-
|
|
227
|
+
N && u !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
228
|
+
mi,
|
|
223
229
|
{
|
|
224
|
-
open:
|
|
230
|
+
open: u !== void 0,
|
|
225
231
|
onClose: () => {
|
|
226
232
|
A(void 0);
|
|
227
233
|
},
|
|
@@ -229,8 +235,8 @@ function Vi(P) {
|
|
|
229
235
|
"div",
|
|
230
236
|
{
|
|
231
237
|
className: "graph-modal-content m-0",
|
|
232
|
-
dangerouslySetInnerHTML: typeof N == "string" ? { __html: vi(N,
|
|
233
|
-
children: typeof N == "function" ? N(
|
|
238
|
+
dangerouslySetInnerHTML: typeof N == "string" ? { __html: vi(N, u) } : void 0,
|
|
239
|
+
children: typeof N == "function" ? N(u) : null
|
|
234
240
|
}
|
|
235
241
|
)
|
|
236
242
|
}
|
|
@@ -239,10 +245,10 @@ function Vi(P) {
|
|
|
239
245
|
}
|
|
240
246
|
function ki(P) {
|
|
241
247
|
const {
|
|
242
|
-
data:
|
|
248
|
+
data: e,
|
|
243
249
|
graphTitle: d,
|
|
244
250
|
colors: p,
|
|
245
|
-
sources:
|
|
251
|
+
sources: o,
|
|
246
252
|
graphDescription: n,
|
|
247
253
|
height: h,
|
|
248
254
|
width: s,
|
|
@@ -251,7 +257,7 @@ function ki(P) {
|
|
|
251
257
|
colorLegendTitle: ii,
|
|
252
258
|
radius: F = 5,
|
|
253
259
|
padding: k,
|
|
254
|
-
backgroundColor:
|
|
260
|
+
backgroundColor: r = !1,
|
|
255
261
|
leftMargin: R = 5,
|
|
256
262
|
rightMargin: G = 5,
|
|
257
263
|
topMargin: _ = 10,
|
|
@@ -275,40 +281,40 @@ function ki(P) {
|
|
|
275
281
|
dotOpacity: D = 0.3,
|
|
276
282
|
showNAColor: H = !0,
|
|
277
283
|
minHeight: x = 0,
|
|
278
|
-
theme:
|
|
284
|
+
theme: u = "light",
|
|
279
285
|
ariaLabel: A,
|
|
280
286
|
resetSelectionOnDoubleClick: U = !0,
|
|
281
287
|
detailsOnClick: L,
|
|
282
|
-
styles:
|
|
288
|
+
styles: f,
|
|
283
289
|
classNames: g,
|
|
284
290
|
valueColor: O,
|
|
285
291
|
animate: V = !1,
|
|
286
292
|
noOfTicks: W = 2,
|
|
287
|
-
dimmedOpacity:
|
|
288
|
-
precision:
|
|
293
|
+
dimmedOpacity: ei = 0.3,
|
|
294
|
+
precision: oi = 2,
|
|
289
295
|
customLayers: li = []
|
|
290
|
-
} = P, [C, z] = E(0), [ri, i] = E(0), [t,
|
|
291
|
-
return
|
|
292
|
-
const
|
|
296
|
+
} = P, [C, z] = E(0), [ri, i] = E(0), [t, ui] = E(void 0), Z = si(null), ci = si(null);
|
|
297
|
+
return fi(() => {
|
|
298
|
+
const a = new ResizeObserver((hi) => {
|
|
293
299
|
z(s || hi[0].target.clientWidth || 620), i(h || hi[0].target.clientHeight || 480);
|
|
294
300
|
});
|
|
295
|
-
return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s ||
|
|
301
|
+
return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || a.observe(Z.current)), () => a.disconnect();
|
|
296
302
|
}, [s, h]), /* @__PURE__ */ l.jsx(
|
|
297
303
|
"div",
|
|
298
304
|
{
|
|
299
|
-
className: `${
|
|
305
|
+
className: `${u || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
|
|
300
306
|
dir: M === "he" || M === "ar" ? "rtl" : void 0,
|
|
301
307
|
children: /* @__PURE__ */ l.jsx(
|
|
302
308
|
"div",
|
|
303
309
|
{
|
|
304
310
|
className: ni(
|
|
305
|
-
`${
|
|
311
|
+
`${r ? r === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${M || "en"}`,
|
|
306
312
|
s ? "w-fit" : "w-full",
|
|
307
313
|
g?.graphContainer
|
|
308
314
|
),
|
|
309
315
|
style: {
|
|
310
|
-
...
|
|
311
|
-
...
|
|
316
|
+
...f?.graphContainer || {},
|
|
317
|
+
...r && r !== !0 ? { backgroundColor: r } : {}
|
|
312
318
|
},
|
|
313
319
|
id: ti,
|
|
314
320
|
ref: ci,
|
|
@@ -317,14 +323,14 @@ function ki(P) {
|
|
|
317
323
|
"div",
|
|
318
324
|
{
|
|
319
325
|
className: "flex grow",
|
|
320
|
-
style: { padding:
|
|
326
|
+
style: { padding: r ? k || "1rem" : k || 0 },
|
|
321
327
|
children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
322
328
|
d || n || I || m ? /* @__PURE__ */ l.jsx(
|
|
323
329
|
ji,
|
|
324
330
|
{
|
|
325
331
|
styles: {
|
|
326
|
-
title:
|
|
327
|
-
description:
|
|
332
|
+
title: f?.title,
|
|
333
|
+
description: f?.description
|
|
328
334
|
},
|
|
329
335
|
classNames: {
|
|
330
336
|
title: g?.title,
|
|
@@ -334,21 +340,18 @@ function ki(P) {
|
|
|
334
340
|
graphDescription: n,
|
|
335
341
|
width: s,
|
|
336
342
|
graphDownload: I ? ci.current : void 0,
|
|
337
|
-
dataDownload: m ?
|
|
343
|
+
dataDownload: m ? e.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? e.map((a) => a.data).filter((a) => a !== void 0) : e.filter((a) => a !== void 0) : null
|
|
338
344
|
}
|
|
339
345
|
) : null,
|
|
340
|
-
/* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children:
|
|
341
|
-
y !== !1 &&
|
|
346
|
+
/* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: e.length === 0 ? /* @__PURE__ */ l.jsx(Di, {}) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
347
|
+
y !== !1 && e.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ l.jsx(
|
|
342
348
|
Mi,
|
|
343
349
|
{
|
|
344
350
|
width: s,
|
|
345
351
|
colorLegendTitle: ii,
|
|
346
|
-
colors: p || c[
|
|
347
|
-
colorDomain: Y ||
|
|
348
|
-
|
|
349
|
-
"color"
|
|
350
|
-
).map((r) => r.color),
|
|
351
|
-
setSelectedColor: fi,
|
|
352
|
+
colors: p || c[u].categoricalColors.colors,
|
|
353
|
+
colorDomain: Y || di(e, "color", !0),
|
|
354
|
+
setSelectedColor: ui,
|
|
352
355
|
showNAColor: H ?? !0
|
|
353
356
|
}
|
|
354
357
|
) : null,
|
|
@@ -361,17 +364,14 @@ function ki(P) {
|
|
|
361
364
|
children: (s || C) && (h || ri) ? /* @__PURE__ */ l.jsx(
|
|
362
365
|
Vi,
|
|
363
366
|
{
|
|
364
|
-
data:
|
|
367
|
+
data: e,
|
|
365
368
|
width: s || C,
|
|
366
369
|
height: Math.max(
|
|
367
370
|
x,
|
|
368
371
|
h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : ri)
|
|
369
372
|
),
|
|
370
|
-
colorDomain:
|
|
371
|
-
|
|
372
|
-
"color"
|
|
373
|
-
).map((r) => r.color),
|
|
374
|
-
colors: o.filter((r) => r.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[f].categoricalColors.colors,
|
|
373
|
+
colorDomain: e.filter((a) => a.color).length === 0 ? [] : Y || di(e, "color", !0),
|
|
374
|
+
colors: e.filter((a) => a.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[u].categoricalColors.colors,
|
|
375
375
|
selectedColor: t,
|
|
376
376
|
radius: F,
|
|
377
377
|
leftMargin: R,
|
|
@@ -391,28 +391,28 @@ function ki(P) {
|
|
|
391
391
|
dotOpacity: D,
|
|
392
392
|
resetSelectionOnDoubleClick: U,
|
|
393
393
|
detailsOnClick: L,
|
|
394
|
-
styles:
|
|
394
|
+
styles: f,
|
|
395
395
|
classNames: g,
|
|
396
396
|
valueColor: O,
|
|
397
397
|
animate: V === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : V || { duration: 0, once: !0, amount: 0 },
|
|
398
398
|
noOfTicks: W,
|
|
399
|
-
dimmedOpacity:
|
|
400
|
-
precision:
|
|
399
|
+
dimmedOpacity: ei,
|
|
400
|
+
precision: oi,
|
|
401
401
|
customLayers: li
|
|
402
402
|
}
|
|
403
403
|
) : null
|
|
404
404
|
}
|
|
405
405
|
)
|
|
406
406
|
] }) }),
|
|
407
|
-
|
|
407
|
+
o || X ? /* @__PURE__ */ l.jsx(
|
|
408
408
|
Ci,
|
|
409
409
|
{
|
|
410
|
-
styles: { footnote:
|
|
410
|
+
styles: { footnote: f?.footnote, source: f?.source },
|
|
411
411
|
classNames: {
|
|
412
412
|
footnote: g?.footnote,
|
|
413
413
|
source: g?.source
|
|
414
414
|
},
|
|
415
|
-
sources:
|
|
415
|
+
sources: o,
|
|
416
416
|
footNote: X,
|
|
417
417
|
width: s
|
|
418
418
|
}
|
|
@@ -427,10 +427,10 @@ function ki(P) {
|
|
|
427
427
|
}
|
|
428
428
|
function Si(P) {
|
|
429
429
|
const {
|
|
430
|
-
data:
|
|
430
|
+
data: e,
|
|
431
431
|
width: d,
|
|
432
432
|
height: p,
|
|
433
|
-
colors:
|
|
433
|
+
colors: o,
|
|
434
434
|
colorDomain: n,
|
|
435
435
|
radius: h,
|
|
436
436
|
leftMargin: s,
|
|
@@ -439,7 +439,7 @@ function Si(P) {
|
|
|
439
439
|
bottomMargin: ii,
|
|
440
440
|
tooltip: F,
|
|
441
441
|
onSeriesMouseOver: k,
|
|
442
|
-
highlightedDataPoints:
|
|
442
|
+
highlightedDataPoints: r,
|
|
443
443
|
selectedColor: R,
|
|
444
444
|
minValue: G,
|
|
445
445
|
maxValue: _,
|
|
@@ -462,15 +462,21 @@ function Si(P) {
|
|
|
462
462
|
} = P, q = si(null), D = Oi(q, {
|
|
463
463
|
once: w.once,
|
|
464
464
|
amount: w.amount
|
|
465
|
-
}), [H, x] = E(void 0), [
|
|
465
|
+
}), [H, x] = E(void 0), [u, A] = E(void 0), [U, L] = E(void 0), [f, g] = E(void 0), O = {
|
|
466
466
|
top: Y,
|
|
467
467
|
bottom: ii,
|
|
468
468
|
left: s,
|
|
469
469
|
right: X
|
|
470
|
-
}, V = d - O.left - O.right, W = p - O.top - O.bottom,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
470
|
+
}, V = d - O.left - O.right, W = p - O.top - O.bottom, ei = e.map((i, t) => ({ ...i, id: `${t}` })), oi = xi(
|
|
471
|
+
ei,
|
|
472
|
+
[
|
|
473
|
+
(i) => {
|
|
474
|
+
const t = (r || []).indexOf(i.label);
|
|
475
|
+
return t === -1 ? 1 / 0 : t;
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
["desc"]
|
|
479
|
+
), li = J(_) ? Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) < 0 ? 0 : Math.max(...e.filter((i) => !J(i.position)).map((i) => i.position)) : _, C = J(G) ? Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) >= 0 ? 0 : Math.min(...e.filter((i) => !J(i.position)).map((i) => i.position)) : G, z = wi().domain([C, li]).range([W, 0]).nice(), ri = Ni(K, W);
|
|
474
480
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
475
481
|
/* @__PURE__ */ l.jsx(
|
|
476
482
|
ai.svg,
|
|
@@ -483,7 +489,7 @@ function Si(P) {
|
|
|
483
489
|
children: /* @__PURE__ */ l.jsxs("g", { transform: `translate(${O.left},${O.top})`, children: [
|
|
484
490
|
M.filter((i) => i.position === "before").map((i) => i.layer),
|
|
485
491
|
/* @__PURE__ */ l.jsxs(bi, { children: [
|
|
486
|
-
|
|
492
|
+
oi.map((i) => /* @__PURE__ */ l.jsxs(
|
|
487
493
|
ai.g,
|
|
488
494
|
{
|
|
489
495
|
className: "undp-viz-g-with-hover",
|
|
@@ -496,7 +502,7 @@ function Si(P) {
|
|
|
496
502
|
whileInView: {
|
|
497
503
|
x: V / 2,
|
|
498
504
|
y: z(i.position),
|
|
499
|
-
opacity: R ? i.color &&
|
|
505
|
+
opacity: R ? i.color && o[n.indexOf(i.color)] === R ? 0.95 : T : r.length !== 0 ? r.indexOf(i.label) !== -1 ? 0.95 : T : ti,
|
|
500
506
|
transition: { duration: w.duration }
|
|
501
507
|
}
|
|
502
508
|
},
|
|
@@ -507,7 +513,7 @@ function Si(P) {
|
|
|
507
513
|
x(i), g(t.clientY), L(t.clientX), k?.(i);
|
|
508
514
|
},
|
|
509
515
|
onClick: () => {
|
|
510
|
-
(S || j) && (pi(
|
|
516
|
+
(S || j) && (pi(u, i) && N ? (A(void 0), S?.(void 0)) : (A(i), S?.(i)));
|
|
511
517
|
},
|
|
512
518
|
onMouseMove: (t) => {
|
|
513
519
|
x(i), g(t.clientY), L(t.clientX);
|
|
@@ -523,10 +529,10 @@ function Si(P) {
|
|
|
523
529
|
cx: 0,
|
|
524
530
|
variants: {
|
|
525
531
|
initial: {
|
|
526
|
-
fill: v &&
|
|
532
|
+
fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
|
|
527
533
|
},
|
|
528
534
|
whileInView: {
|
|
529
|
-
fill: v &&
|
|
535
|
+
fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
|
|
530
536
|
transition: { duration: w.duration }
|
|
531
537
|
}
|
|
532
538
|
},
|
|
@@ -544,10 +550,10 @@ function Si(P) {
|
|
|
544
550
|
height: 2,
|
|
545
551
|
variants: {
|
|
546
552
|
initial: {
|
|
547
|
-
fill: v &&
|
|
553
|
+
fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray
|
|
548
554
|
},
|
|
549
555
|
whileInView: {
|
|
550
|
-
fill: v &&
|
|
556
|
+
fill: v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray,
|
|
551
557
|
transition: { duration: w.duration }
|
|
552
558
|
}
|
|
553
559
|
},
|
|
@@ -556,7 +562,7 @@ function Si(P) {
|
|
|
556
562
|
exit: { opacity: 0, transition: { duration: w.duration } }
|
|
557
563
|
}
|
|
558
564
|
),
|
|
559
|
-
|
|
565
|
+
r.length !== 0 && r.indexOf(i.label) !== -1 ? /* @__PURE__ */ l.jsx(
|
|
560
566
|
ai.text,
|
|
561
567
|
{
|
|
562
568
|
y: 0,
|
|
@@ -573,7 +579,7 @@ function Si(P) {
|
|
|
573
579
|
animate: D ? "whileInView" : "initial",
|
|
574
580
|
exit: { opacity: 0, transition: { duration: w.duration } },
|
|
575
581
|
style: {
|
|
576
|
-
fill: m || (v &&
|
|
582
|
+
fill: m || (v && r ? r.indexOf(i.label) !== -1 ? v : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray : e.filter((t) => t.color).length === 0 ? o[0] : i.color ? o[n.indexOf(i.color)] : c.gray),
|
|
577
583
|
textAnchor: "start",
|
|
578
584
|
...$?.graphObjectValues || {}
|
|
579
585
|
},
|
|
@@ -581,7 +587,7 @@ function Si(P) {
|
|
|
581
587
|
"graph-value text-sm font-bold",
|
|
582
588
|
I?.graphObjectValues
|
|
583
589
|
),
|
|
584
|
-
children:
|
|
590
|
+
children: gi(i.position, "NA", B, b, Q)
|
|
585
591
|
}
|
|
586
592
|
) : null
|
|
587
593
|
]
|
|
@@ -601,7 +607,7 @@ function Si(P) {
|
|
|
601
607
|
"fill-primary-gray-550 dark:fill-primary-gray-500 text-xs",
|
|
602
608
|
I?.yAxis?.labels
|
|
603
609
|
),
|
|
604
|
-
children:
|
|
610
|
+
children: gi(z.invert(i), "NA", B, b, Q)
|
|
605
611
|
},
|
|
606
612
|
t
|
|
607
613
|
))
|
|
@@ -610,21 +616,21 @@ function Si(P) {
|
|
|
610
616
|
] })
|
|
611
617
|
}
|
|
612
618
|
),
|
|
613
|
-
H && F && U &&
|
|
619
|
+
H && F && U && f ? /* @__PURE__ */ l.jsx(
|
|
614
620
|
yi,
|
|
615
621
|
{
|
|
616
622
|
data: H,
|
|
617
623
|
body: F,
|
|
618
624
|
xPos: U,
|
|
619
|
-
yPos:
|
|
625
|
+
yPos: f,
|
|
620
626
|
backgroundStyle: $?.tooltip,
|
|
621
627
|
className: I?.tooltip
|
|
622
628
|
}
|
|
623
629
|
) : null,
|
|
624
|
-
j &&
|
|
625
|
-
|
|
630
|
+
j && u !== void 0 ? /* @__PURE__ */ l.jsx(
|
|
631
|
+
mi,
|
|
626
632
|
{
|
|
627
|
-
open:
|
|
633
|
+
open: u !== void 0,
|
|
628
634
|
onClose: () => {
|
|
629
635
|
A(void 0);
|
|
630
636
|
},
|
|
@@ -632,8 +638,8 @@ function Si(P) {
|
|
|
632
638
|
"div",
|
|
633
639
|
{
|
|
634
640
|
className: "graph-modal-content m-0",
|
|
635
|
-
dangerouslySetInnerHTML: typeof j == "string" ? { __html: vi(j,
|
|
636
|
-
children: typeof j == "function" ? j(
|
|
641
|
+
dangerouslySetInnerHTML: typeof j == "string" ? { __html: vi(j, u) } : void 0,
|
|
642
|
+
children: typeof j == "function" ? j(u) : null
|
|
637
643
|
}
|
|
638
644
|
)
|
|
639
645
|
}
|
|
@@ -642,10 +648,10 @@ function Si(P) {
|
|
|
642
648
|
}
|
|
643
649
|
function $i(P) {
|
|
644
650
|
const {
|
|
645
|
-
data:
|
|
651
|
+
data: e,
|
|
646
652
|
graphTitle: d,
|
|
647
653
|
colors: p,
|
|
648
|
-
sources:
|
|
654
|
+
sources: o,
|
|
649
655
|
graphDescription: n,
|
|
650
656
|
height: h,
|
|
651
657
|
width: s,
|
|
@@ -654,7 +660,7 @@ function $i(P) {
|
|
|
654
660
|
colorLegendTitle: ii,
|
|
655
661
|
radius: F = 5,
|
|
656
662
|
padding: k,
|
|
657
|
-
backgroundColor:
|
|
663
|
+
backgroundColor: r = !1,
|
|
658
664
|
leftMargin: R = 20,
|
|
659
665
|
rightMargin: G = 20,
|
|
660
666
|
topMargin: _ = 10,
|
|
@@ -678,40 +684,40 @@ function $i(P) {
|
|
|
678
684
|
dotOpacity: D = 0.3,
|
|
679
685
|
showNAColor: H = !0,
|
|
680
686
|
minHeight: x = 0,
|
|
681
|
-
theme:
|
|
687
|
+
theme: u = "light",
|
|
682
688
|
ariaLabel: A,
|
|
683
689
|
resetSelectionOnDoubleClick: U = !0,
|
|
684
690
|
detailsOnClick: L,
|
|
685
|
-
styles:
|
|
691
|
+
styles: f,
|
|
686
692
|
classNames: g,
|
|
687
693
|
valueColor: O,
|
|
688
694
|
animate: V = !1,
|
|
689
695
|
noOfTicks: W = 2,
|
|
690
|
-
dimmedOpacity:
|
|
691
|
-
precision:
|
|
696
|
+
dimmedOpacity: ei = 0.3,
|
|
697
|
+
precision: oi = 2,
|
|
692
698
|
customLayers: li = []
|
|
693
|
-
} = P, [C, z] = E(0), [ri, i] = E(0), [t,
|
|
694
|
-
return
|
|
695
|
-
const
|
|
699
|
+
} = P, [C, z] = E(0), [ri, i] = E(0), [t, ui] = E(void 0), Z = si(null), ci = si(null);
|
|
700
|
+
return fi(() => {
|
|
701
|
+
const a = new ResizeObserver((hi) => {
|
|
696
702
|
z(s || hi[0].target.clientWidth || 620), i(h || hi[0].target.clientHeight || 480);
|
|
697
703
|
});
|
|
698
|
-
return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s ||
|
|
704
|
+
return Z.current && (i(Z.current.clientHeight || 480), z(Z.current.clientWidth || 620), s || a.observe(Z.current)), () => a.disconnect();
|
|
699
705
|
}, [s, h]), /* @__PURE__ */ l.jsx(
|
|
700
706
|
"div",
|
|
701
707
|
{
|
|
702
|
-
className: `${
|
|
708
|
+
className: `${u || "light"} flex ${s ? "w-fit grow-0" : "w-full grow"}`,
|
|
703
709
|
dir: M === "he" || M === "ar" ? "rtl" : void 0,
|
|
704
710
|
children: /* @__PURE__ */ l.jsx(
|
|
705
711
|
"div",
|
|
706
712
|
{
|
|
707
713
|
className: ni(
|
|
708
|
-
`${
|
|
714
|
+
`${r ? r === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${M || "en"}`,
|
|
709
715
|
s ? "w-fit" : "w-full",
|
|
710
716
|
g?.graphContainer
|
|
711
717
|
),
|
|
712
718
|
style: {
|
|
713
|
-
...
|
|
714
|
-
...
|
|
719
|
+
...f?.graphContainer || {},
|
|
720
|
+
...r && r !== !0 ? { backgroundColor: r } : {}
|
|
715
721
|
},
|
|
716
722
|
id: ti,
|
|
717
723
|
ref: ci,
|
|
@@ -720,14 +726,14 @@ function $i(P) {
|
|
|
720
726
|
"div",
|
|
721
727
|
{
|
|
722
728
|
className: "flex grow",
|
|
723
|
-
style: { padding:
|
|
729
|
+
style: { padding: r ? k || "1rem" : k || 0 },
|
|
724
730
|
children: /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
725
731
|
d || n || I || m ? /* @__PURE__ */ l.jsx(
|
|
726
732
|
ji,
|
|
727
733
|
{
|
|
728
734
|
styles: {
|
|
729
|
-
title:
|
|
730
|
-
description:
|
|
735
|
+
title: f?.title,
|
|
736
|
+
description: f?.description
|
|
731
737
|
},
|
|
732
738
|
classNames: {
|
|
733
739
|
title: g?.title,
|
|
@@ -737,21 +743,18 @@ function $i(P) {
|
|
|
737
743
|
graphDescription: n,
|
|
738
744
|
width: s,
|
|
739
745
|
graphDownload: I ? ci.current : void 0,
|
|
740
|
-
dataDownload: m ?
|
|
746
|
+
dataDownload: m ? e.map((a) => a.data).filter((a) => a !== void 0).length > 0 ? e.map((a) => a.data).filter((a) => a !== void 0) : e.filter((a) => a !== void 0) : null
|
|
741
747
|
}
|
|
742
748
|
) : null,
|
|
743
|
-
/* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children:
|
|
744
|
-
y !== !1 &&
|
|
749
|
+
/* @__PURE__ */ l.jsx("div", { className: "grow flex flex-col justify-center gap-3 w-full", children: e.length === 0 ? /* @__PURE__ */ l.jsx(Di, {}) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
750
|
+
y !== !1 && e.filter((a) => a.color).length !== 0 ? /* @__PURE__ */ l.jsx(
|
|
745
751
|
Mi,
|
|
746
752
|
{
|
|
747
753
|
width: s,
|
|
748
754
|
colorLegendTitle: ii,
|
|
749
|
-
colors: p || c[
|
|
750
|
-
colorDomain: Y ||
|
|
751
|
-
|
|
752
|
-
"color"
|
|
753
|
-
).map((r) => r.color),
|
|
754
|
-
setSelectedColor: fi,
|
|
755
|
+
colors: p || c[u].categoricalColors.colors,
|
|
756
|
+
colorDomain: Y || di(e, "color", !0),
|
|
757
|
+
setSelectedColor: ui,
|
|
755
758
|
showNAColor: H
|
|
756
759
|
}
|
|
757
760
|
) : null,
|
|
@@ -763,17 +766,14 @@ function $i(P) {
|
|
|
763
766
|
children: (s || C) && (h || ri) ? /* @__PURE__ */ l.jsx(
|
|
764
767
|
Si,
|
|
765
768
|
{
|
|
766
|
-
data:
|
|
769
|
+
data: e,
|
|
767
770
|
width: s || C,
|
|
768
771
|
height: Math.max(
|
|
769
772
|
x,
|
|
770
773
|
h || (b ? x ? (s || C) * b > x ? (s || C) * b : x : (s || C) * b : ri)
|
|
771
774
|
),
|
|
772
|
-
colorDomain:
|
|
773
|
-
|
|
774
|
-
"color"
|
|
775
|
-
).map((r) => r.color),
|
|
776
|
-
colors: o.filter((r) => r.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[f].categoricalColors.colors,
|
|
775
|
+
colorDomain: e.filter((a) => a.color).length === 0 ? [] : Y || di(e, "color", !0),
|
|
776
|
+
colors: e.filter((a) => a.color).length === 0 ? p ? [p] : [c.primaryColors["blue-600"]] : p || c[u].categoricalColors.colors,
|
|
777
777
|
selectedColor: t,
|
|
778
778
|
radius: F,
|
|
779
779
|
leftMargin: R,
|
|
@@ -793,28 +793,28 @@ function $i(P) {
|
|
|
793
793
|
dotOpacity: D,
|
|
794
794
|
resetSelectionOnDoubleClick: U,
|
|
795
795
|
detailsOnClick: L,
|
|
796
|
-
styles:
|
|
796
|
+
styles: f,
|
|
797
797
|
classNames: g,
|
|
798
798
|
valueColor: O,
|
|
799
799
|
animate: V === !0 ? { duration: 0.5, once: !0, amount: 0.5 } : V || { duration: 0, once: !0, amount: 0 },
|
|
800
800
|
noOfTicks: W,
|
|
801
|
-
dimmedOpacity:
|
|
802
|
-
precision:
|
|
801
|
+
dimmedOpacity: ei,
|
|
802
|
+
precision: oi,
|
|
803
803
|
customLayers: li
|
|
804
804
|
}
|
|
805
805
|
) : null
|
|
806
806
|
}
|
|
807
807
|
)
|
|
808
808
|
] }) }),
|
|
809
|
-
|
|
809
|
+
o || X ? /* @__PURE__ */ l.jsx(
|
|
810
810
|
Ci,
|
|
811
811
|
{
|
|
812
|
-
styles: { footnote:
|
|
812
|
+
styles: { footnote: f?.footnote, source: f?.source },
|
|
813
813
|
classNames: {
|
|
814
814
|
footnote: g?.footnote,
|
|
815
815
|
source: g?.source
|
|
816
816
|
},
|
|
817
|
-
sources:
|
|
817
|
+
sources: o,
|
|
818
818
|
footNote: X,
|
|
819
819
|
width: s
|
|
820
820
|
}
|
|
@@ -829,10 +829,10 @@ function $i(P) {
|
|
|
829
829
|
}
|
|
830
830
|
function Ki(P) {
|
|
831
831
|
const {
|
|
832
|
-
data:
|
|
832
|
+
data: e,
|
|
833
833
|
graphTitle: d,
|
|
834
834
|
colors: p,
|
|
835
|
-
sources:
|
|
835
|
+
sources: o,
|
|
836
836
|
graphDescription: n,
|
|
837
837
|
height: h,
|
|
838
838
|
width: s,
|
|
@@ -841,7 +841,7 @@ function Ki(P) {
|
|
|
841
841
|
colorLegendTitle: ii,
|
|
842
842
|
radius: F,
|
|
843
843
|
padding: k,
|
|
844
|
-
backgroundColor:
|
|
844
|
+
backgroundColor: r,
|
|
845
845
|
leftMargin: R,
|
|
846
846
|
rightMargin: G,
|
|
847
847
|
topMargin: _,
|
|
@@ -865,27 +865,27 @@ function Ki(P) {
|
|
|
865
865
|
highlightColor: D,
|
|
866
866
|
dotOpacity: H,
|
|
867
867
|
showNAColor: x,
|
|
868
|
-
minHeight:
|
|
868
|
+
minHeight: u,
|
|
869
869
|
theme: A,
|
|
870
870
|
ariaLabel: U,
|
|
871
871
|
valueColor: L,
|
|
872
|
-
resetSelectionOnDoubleClick:
|
|
872
|
+
resetSelectionOnDoubleClick: f,
|
|
873
873
|
detailsOnClick: g,
|
|
874
874
|
orientation: O = "vertical",
|
|
875
875
|
styles: V,
|
|
876
876
|
classNames: W,
|
|
877
|
-
animate:
|
|
878
|
-
dimmedOpacity:
|
|
877
|
+
animate: ei,
|
|
878
|
+
dimmedOpacity: oi = 0.3,
|
|
879
879
|
precision: li,
|
|
880
880
|
customLayers: C
|
|
881
881
|
} = P;
|
|
882
882
|
return O === "vertical" ? /* @__PURE__ */ l.jsx(
|
|
883
883
|
$i,
|
|
884
884
|
{
|
|
885
|
-
data:
|
|
885
|
+
data: e,
|
|
886
886
|
graphTitle: d,
|
|
887
887
|
colors: p,
|
|
888
|
-
sources:
|
|
888
|
+
sources: o,
|
|
889
889
|
graphDescription: n,
|
|
890
890
|
height: h,
|
|
891
891
|
width: s,
|
|
@@ -894,7 +894,7 @@ function Ki(P) {
|
|
|
894
894
|
colorLegendTitle: ii,
|
|
895
895
|
radius: F,
|
|
896
896
|
padding: k,
|
|
897
|
-
backgroundColor:
|
|
897
|
+
backgroundColor: r,
|
|
898
898
|
leftMargin: R,
|
|
899
899
|
rightMargin: G,
|
|
900
900
|
topMargin: _,
|
|
@@ -918,26 +918,26 @@ function Ki(P) {
|
|
|
918
918
|
highlightColor: D,
|
|
919
919
|
dotOpacity: H,
|
|
920
920
|
showNAColor: x,
|
|
921
|
-
minHeight:
|
|
921
|
+
minHeight: u,
|
|
922
922
|
theme: A,
|
|
923
923
|
ariaLabel: U,
|
|
924
|
-
resetSelectionOnDoubleClick:
|
|
924
|
+
resetSelectionOnDoubleClick: f,
|
|
925
925
|
styles: V,
|
|
926
926
|
valueColor: L,
|
|
927
927
|
detailsOnClick: g,
|
|
928
928
|
classNames: W,
|
|
929
|
-
animate:
|
|
930
|
-
dimmedOpacity:
|
|
929
|
+
animate: ei,
|
|
930
|
+
dimmedOpacity: oi,
|
|
931
931
|
precision: li,
|
|
932
932
|
customLayers: C
|
|
933
933
|
}
|
|
934
934
|
) : /* @__PURE__ */ l.jsx(
|
|
935
935
|
ki,
|
|
936
936
|
{
|
|
937
|
-
data:
|
|
937
|
+
data: e,
|
|
938
938
|
graphTitle: d,
|
|
939
939
|
colors: p,
|
|
940
|
-
sources:
|
|
940
|
+
sources: o,
|
|
941
941
|
graphDescription: n,
|
|
942
942
|
height: h,
|
|
943
943
|
width: s,
|
|
@@ -946,7 +946,7 @@ function Ki(P) {
|
|
|
946
946
|
colorLegendTitle: ii,
|
|
947
947
|
radius: F,
|
|
948
948
|
padding: k,
|
|
949
|
-
backgroundColor:
|
|
949
|
+
backgroundColor: r,
|
|
950
950
|
leftMargin: R,
|
|
951
951
|
rightMargin: G,
|
|
952
952
|
topMargin: _,
|
|
@@ -970,16 +970,16 @@ function Ki(P) {
|
|
|
970
970
|
highlightColor: D,
|
|
971
971
|
dotOpacity: H,
|
|
972
972
|
showNAColor: x,
|
|
973
|
-
minHeight:
|
|
973
|
+
minHeight: u,
|
|
974
974
|
theme: A,
|
|
975
975
|
ariaLabel: U,
|
|
976
|
-
resetSelectionOnDoubleClick:
|
|
976
|
+
resetSelectionOnDoubleClick: f,
|
|
977
977
|
styles: V,
|
|
978
978
|
valueColor: L,
|
|
979
979
|
detailsOnClick: g,
|
|
980
980
|
classNames: W,
|
|
981
|
-
animate:
|
|
982
|
-
dimmedOpacity:
|
|
981
|
+
animate: ei,
|
|
982
|
+
dimmedOpacity: oi,
|
|
983
983
|
precision: li,
|
|
984
984
|
customLayers: C
|
|
985
985
|
}
|