@undp/data-viz 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +21 -21
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +7 -7
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +5 -5
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +14 -14
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +9 -9
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +9 -9
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/CopyTextButton.cjs +7 -7
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +4 -4
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/DataCards.cjs +9 -9
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +93 -93
- package/dist/DataCards.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +18 -18
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +8 -8
- package/dist/{DropdownSelect-0I2QxaVy.cjs → DropdownSelect-BmE5JaeE.cjs} +6 -6
- package/dist/{DropdownSelect-0I2QxaVy.cjs.map → DropdownSelect-BmE5JaeE.cjs.map} +1 -1
- package/dist/{DropdownSelect-CDC9lEqU.js → DropdownSelect-CeHog_ih.js} +4 -4
- package/dist/{DropdownSelect-CDC9lEqU.js.map → DropdownSelect-CeHog_ih.js.map} +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +15 -15
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +13 -13
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.js +2 -2
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +2 -2
- package/dist/{GraphEl-B6SoGRFW.cjs → GraphEl-B5gAX1IQ.cjs} +2 -2
- package/dist/{GraphEl-B6SoGRFW.cjs.map → GraphEl-B5gAX1IQ.cjs.map} +1 -1
- package/dist/{GraphEl-Cw2tDUb3.js → GraphEl-BdIyscdt.js} +3 -3
- package/dist/{GraphEl-Cw2tDUb3.js.map → GraphEl-BdIyscdt.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.js +10 -10
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +21 -21
- package/dist/{Modal-CUU6ZK3U.js → Modal-DVVwpKhP.js} +2 -2
- package/dist/{Modal-CUU6ZK3U.js.map → Modal-DVVwpKhP.js.map} +1 -1
- package/dist/{Modal-C_dl0EtQ.cjs → Modal-tXZlLE5s.cjs} +4 -4
- package/dist/{Modal-C_dl0EtQ.cjs.map → Modal-tXZlLE5s.cjs.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +3 -3
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +3 -3
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +21 -21
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +19 -19
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +12 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +3 -3
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.js +2 -2
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +8 -8
- package/dist/{ReferenceLine-CuFMk0cI.cjs → ReferenceLine-CFVBBN__.cjs} +2 -2
- package/dist/{ReferenceLine-CuFMk0cI.cjs.map → ReferenceLine-CFVBBN__.cjs.map} +1 -1
- package/dist/{ReferenceLine-C1GpoG9d.js → ReferenceLine-CfAW3vKJ.js} +2 -2
- package/dist/{ReferenceLine-C1GpoG9d.js.map → ReferenceLine-CfAW3vKJ.js.map} +1 -1
- package/dist/{RegressionLine-BFwDCTUU.js → RegressionLine-mH7UKOPi.js} +3 -3
- package/dist/{RegressionLine-BFwDCTUU.js.map → RegressionLine-mH7UKOPi.js.map} +1 -1
- package/dist/{RegressionLine-7_rKTHN_.cjs → RegressionLine-xKdiJ8sw.cjs} +2 -2
- package/dist/{RegressionLine-7_rKTHN_.cjs.map → RegressionLine-xKdiJ8sw.cjs.map} +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +4 -4
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +13 -13
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.js +2 -2
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +20 -20
- 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.js +7 -7
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +9 -9
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +2 -2
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +4 -4
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +3 -3
- package/dist/{XAxesLabels-DQFo_z2R.js → XAxesLabels-CaV2q-6H.js} +2 -2
- package/dist/{XAxesLabels-DQFo_z2R.js.map → XAxesLabels-CaV2q-6H.js.map} +1 -1
- package/dist/{XAxesLabels-CJMQbfVy.cjs → XAxesLabels-OjBNl_lS.cjs} +2 -2
- package/dist/{XAxesLabels-CJMQbfVy.cjs.map → XAxesLabels-OjBNl_lS.cjs.map} +1 -1
- package/dist/{YAxesLabels-H5-002X5.js → YAxesLabels-CPGZjmZJ.js} +2 -2
- package/dist/{YAxesLabels-H5-002X5.js.map → YAxesLabels-CPGZjmZJ.js.map} +1 -1
- package/dist/{YAxesLabels-BXLTX7AI.cjs → YAxesLabels-D8IydyZj.cjs} +2 -2
- package/dist/{YAxesLabels-BXLTX7AI.cjs.map → YAxesLabels-D8IydyZj.cjs.map} +1 -1
- package/dist/{checkIfMultiple-Do4kADNr.cjs → checkIfMultiple-BXbHUCWM.cjs} +6 -6
- package/dist/{checkIfMultiple-Do4kADNr.cjs.map → checkIfMultiple-BXbHUCWM.cjs.map} +1 -1
- package/dist/{checkIfMultiple-CYp3vADF.js → checkIfMultiple-ChTJk2Tk.js} +5 -5
- package/dist/{checkIfMultiple-CYp3vADF.js.map → checkIfMultiple-ChTJk2Tk.js.map} +1 -1
- package/dist/{customArea-CaxScFmW.js → customArea-B-dWU0zZ.js} +2 -2
- package/dist/{customArea-CaxScFmW.js.map → customArea-B-dWU0zZ.js.map} +1 -1
- package/dist/{customArea-BYNyxAkm.cjs → customArea-CK768gCn.cjs} +2 -2
- package/dist/{customArea-BYNyxAkm.cjs.map → customArea-CK768gCn.cjs.map} +1 -1
- package/dist/{fetchAndParseData-Bcmr659B.js → fetchAndParseData-4gsYTy6_.js} +3 -3
- package/dist/fetchAndParseData-4gsYTy6_.js.map +1 -0
- package/dist/{fetchAndParseData-DmgQtB9n.cjs → fetchAndParseData-CQyVGCul.cjs} +6 -6
- package/dist/fetchAndParseData-CQyVGCul.cjs.map +1 -0
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/index-BW8iNx7E.cjs +10 -0
- package/dist/index-BW8iNx7E.cjs.map +1 -0
- package/dist/index-CNvov0eg.js +122 -0
- package/dist/index-CNvov0eg.js.map +1 -0
- package/dist/{index-D_n8aamX.cjs → index-CZLvTu6p.cjs} +2 -2
- package/dist/{index-D_n8aamX.cjs.map → index-CZLvTu6p.cjs.map} +1 -1
- package/dist/{index-n_RI8T0n.js → index-Cdcfp4nk.js} +2 -2
- package/dist/{index-n_RI8T0n.js.map → index-Cdcfp4nk.js.map} +1 -1
- package/dist/{index-BVnYktl4.js → index-DGAaLNu9.js} +2 -2
- package/dist/{index-BVnYktl4.js.map → index-DGAaLNu9.js.map} +1 -1
- package/dist/{index-CylX-pWB.cjs → index-DNj994Pv.cjs} +2 -2
- package/dist/{index-CylX-pWB.cjs.map → index-DNj994Pv.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/proxy-BHRoeZgd.cjs +2 -0
- package/dist/proxy-BHRoeZgd.cjs.map +1 -0
- package/dist/{proxy-DJxJg1kD.js → proxy-CkpFesk1.js} +4123 -4075
- package/dist/proxy-CkpFesk1.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +2 -2
- package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs → transformDataForGraphFromFile-B1A0AS-Z.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs.map → transformDataForGraphFromFile-B1A0AS-Z.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CA0rw80A.js → transformDataForGraphFromFile-BCjsizvb.js} +2 -2
- package/dist/{transformDataForGraphFromFile-CA0rw80A.js.map → transformDataForGraphFromFile-BCjsizvb.js.map} +1 -1
- package/dist/{use-in-view-BCmzDU2O.cjs → use-in-view-sQJZ_xDO.cjs} +2 -2
- package/dist/use-in-view-sQJZ_xDO.cjs.map +1 -0
- package/dist/{use-in-view-BAHrBy6b.js → use-in-view-yS6jzJAp.js} +2 -2
- package/dist/use-in-view-yS6jzJAp.js.map +1 -0
- package/dist/x-BBpi7a_7-Dz2vKSfu.cjs +27 -0
- package/dist/x-BBpi7a_7-Dz2vKSfu.cjs.map +1 -0
- package/dist/x-BBpi7a_7-WVdj1j6r.js +106 -0
- package/dist/x-BBpi7a_7-WVdj1j6r.js.map +1 -0
- package/package.json +50 -51
- package/dist/fetchAndParseData-Bcmr659B.js.map +0 -1
- package/dist/fetchAndParseData-DmgQtB9n.cjs.map +0 -1
- package/dist/index-BxAUvrua.js +0 -120
- package/dist/index-BxAUvrua.js.map +0 -1
- package/dist/index-DVOJ7vxH.cjs +0 -10
- package/dist/index-DVOJ7vxH.cjs.map +0 -1
- package/dist/proxy-DJxJg1kD.js.map +0 -1
- package/dist/proxy-PQd2AItT.cjs +0 -2
- package/dist/proxy-PQd2AItT.cjs.map +0 -1
- package/dist/use-in-view-BAHrBy6b.js.map +0 -1
- package/dist/use-in-view-BCmzDU2O.cjs.map +0 -1
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +0 -27
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +0 -1
- package/dist/x-CnsEH4Ox-DDvAJndW.js +0 -101
- package/dist/x-CnsEH4Ox-DDvAJndW.js.map +0 -1
package/dist/DataCards.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import $, { useState as w, useEffect as
|
|
1
|
+
import { a as l, m, b as ye, j as i } from "./index-CHPV5EwG-BPSP-7Jg.js";
|
|
2
|
+
import $, { useState as w, useEffect as I, useMemo as Q } from "react";
|
|
3
3
|
import { i as ge } from "./index-C1rRk_50.js";
|
|
4
4
|
import { f as L } from "./index-UV9hjG_S.js";
|
|
5
5
|
import { s as he } from "./index-DxagiOHo.js";
|
|
6
|
-
import { Z as W, H as Z } from "./DropdownSelect-
|
|
6
|
+
import { Z as W, H as Z } from "./DropdownSelect-CeHog_ih.js";
|
|
7
7
|
import { u as X } from "./Typography-Ctgfl1J5.js";
|
|
8
|
-
import {
|
|
8
|
+
import { k as P } from "./x-BBpi7a_7-WVdj1j6r.js";
|
|
9
9
|
import { d as xe, e as be } from "./index-BmCqpO1B.js";
|
|
10
|
-
import { X as ve } from "./Modal-
|
|
11
|
-
import { CsvDownloadButton as
|
|
10
|
+
import { X as ve } from "./Modal-DVVwpKhP.js";
|
|
11
|
+
import { CsvDownloadButton as je } from "./CsvDownloadButton.js";
|
|
12
12
|
import { s as J } from "./string2HTML-CWHGfz_d.js";
|
|
13
|
-
import { GraphFooter as
|
|
13
|
+
import { GraphFooter as Ne } from "./GraphFooter.js";
|
|
14
14
|
import { GraphHeader as we } from "./GraphHeader.js";
|
|
15
15
|
import { g as ke } from "./getUniqValue-BtUENB2H.js";
|
|
16
16
|
import { t as Y } from "./transformDataForSelect-D8AuvYdf.js";
|
|
17
17
|
/**
|
|
18
|
-
* @license lucide-react v0.
|
|
18
|
+
* @license lucide-react v0.542.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
23
|
const Ce = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Se = P("chevron-left", Ce);
|
|
24
24
|
/**
|
|
25
|
-
* @license lucide-react v0.
|
|
25
|
+
* @license lucide-react v0.542.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -33,14 +33,14 @@ const Ve = [
|
|
|
33
33
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
34
34
|
], $e = P("ellipsis", Ve);
|
|
35
35
|
/**
|
|
36
|
-
* @license lucide-react v0.
|
|
36
|
+
* @license lucide-react v0.542.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
const De = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]],
|
|
41
|
+
const De = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ie = P("chevron-right", De);
|
|
42
42
|
function re({ className: t, ...e }) {
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ l.jsx(
|
|
44
44
|
"nav",
|
|
45
45
|
{
|
|
46
46
|
...e,
|
|
@@ -52,29 +52,29 @@ function re({ className: t, ...e }) {
|
|
|
52
52
|
}
|
|
53
53
|
re.displayName = "PaginationUnit";
|
|
54
54
|
const te = $.forwardRef(
|
|
55
|
-
({ className: t, ...e },
|
|
55
|
+
({ className: t, ...e }, s) => /* @__PURE__ */ l.jsx(
|
|
56
56
|
"ul",
|
|
57
57
|
{
|
|
58
58
|
...e,
|
|
59
|
-
ref:
|
|
59
|
+
ref: s,
|
|
60
60
|
className: m("flex flex-row items-center gap-1 list-none", t)
|
|
61
61
|
}
|
|
62
62
|
)
|
|
63
63
|
);
|
|
64
64
|
te.displayName = "PaginationContent";
|
|
65
|
-
const
|
|
66
|
-
({ className: t, ...e },
|
|
65
|
+
const z = $.forwardRef(
|
|
66
|
+
({ className: t, ...e }, s) => /* @__PURE__ */ l.jsx("li", { ...e, ref: s, className: m("mr-2 last:mr-0", t) })
|
|
67
67
|
);
|
|
68
|
-
|
|
68
|
+
z.displayName = "PaginationItem";
|
|
69
69
|
function B({
|
|
70
70
|
className: t,
|
|
71
71
|
children: e,
|
|
72
|
-
...
|
|
72
|
+
...s
|
|
73
73
|
}) {
|
|
74
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ l.jsx(
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
|
-
...
|
|
77
|
+
...s,
|
|
78
78
|
type: "button",
|
|
79
79
|
className: m(
|
|
80
80
|
"p-4 text-base text-primary-black dark:text-primary-gray-100 dark:hover:bg-primary-gray-600",
|
|
@@ -85,8 +85,8 @@ function B({
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
B.displayName = "PaginationLink";
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
88
|
+
function le({ className: t, ...e }) {
|
|
89
|
+
return /* @__PURE__ */ l.jsx(
|
|
90
90
|
B,
|
|
91
91
|
{
|
|
92
92
|
...e,
|
|
@@ -95,13 +95,13 @@ function se({ className: t, ...e }) {
|
|
|
95
95
|
"p-2 bg-primary-gray-300 dark:bg-primary-gray-600 rtl:scale-x-[-1] rounded-full hover:bg-primary-gray-400 dark:hover:bg-primary-gray-550",
|
|
96
96
|
t
|
|
97
97
|
),
|
|
98
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ l.jsx(Se, { className: "h-6 w-6 stroke-primary-gray-700 dark:stroke-primary-gray-100" })
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
function
|
|
104
|
-
return /* @__PURE__ */
|
|
102
|
+
le.displayName = "PaginationPrevious";
|
|
103
|
+
function se({ className: t, ...e }) {
|
|
104
|
+
return /* @__PURE__ */ l.jsx(
|
|
105
105
|
B,
|
|
106
106
|
{
|
|
107
107
|
...e,
|
|
@@ -110,39 +110,39 @@ function le({ className: t, ...e }) {
|
|
|
110
110
|
"p-2 bg-primary-gray-300 dark:bg-primary-gray-600 rtl:scale-x-[-1] rounded-full hover:bg-primary-gray-400 dark:hover:bg-primary-gray-550",
|
|
111
111
|
t
|
|
112
112
|
),
|
|
113
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ l.jsx(Ie, { className: "h-6 w-6 stroke-primary-gray-700 dark:stroke-primary-gray-100" })
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
se.displayName = "PaginationNext";
|
|
118
118
|
function ie({ className: t, ...e }) {
|
|
119
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ l.jsxs(
|
|
120
120
|
"span",
|
|
121
121
|
{
|
|
122
122
|
...e,
|
|
123
123
|
"aria-hidden": !0,
|
|
124
124
|
className: m("flex h-9 w-9 items-center justify-center", t),
|
|
125
125
|
children: [
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ l.jsx($e, { className: "h-4 w-4 text-primary-gray-700 dark:text-primary-gray-100" }),
|
|
127
|
+
/* @__PURE__ */ l.jsx("span", { className: "sr-only", children: "More pages" })
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
ie.displayName = "PaginationEllipsis";
|
|
133
133
|
const ee = (t, e) => {
|
|
134
|
-
const
|
|
135
|
-
return e <= 7 ? Array.from({ length: e }, (n, c) => c + 1) : (
|
|
134
|
+
const s = [];
|
|
135
|
+
return e <= 7 ? Array.from({ length: e }, (n, c) => c + 1) : (s.push(1), t <= 3 ? s.push(2, 3, 4, "ellipsis") : t >= e - 2 ? s.push("ellipsis", e - 3, e - 2, e - 1) : s.push("ellipsis", t - 1, t, t + 1, "ellipsis"), s.push(e), s);
|
|
136
136
|
};
|
|
137
|
-
function
|
|
138
|
-
const { defaultPage: e = 1, total:
|
|
137
|
+
function ze(t) {
|
|
138
|
+
const { defaultPage: e = 1, total: s, pageSize: n, onChange: c, className: p } = t, u = Math.ceil(s / n), [d, o] = w(e), [h, f] = w(
|
|
139
139
|
ee(e, u)
|
|
140
140
|
);
|
|
141
|
-
return
|
|
141
|
+
return I(() => {
|
|
142
142
|
f(ee(d, u));
|
|
143
|
-
}, [d, u]), /* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
143
|
+
}, [d, u]), /* @__PURE__ */ l.jsx(re, { className: m("select-none", p), children: /* @__PURE__ */ l.jsxs(te, { children: [
|
|
144
|
+
/* @__PURE__ */ l.jsx(z, { children: /* @__PURE__ */ l.jsx(
|
|
145
|
+
le,
|
|
146
146
|
{
|
|
147
147
|
onClick: () => {
|
|
148
148
|
d > 1 && (c(d - 1), o(d - 1));
|
|
@@ -153,7 +153,7 @@ function Ie(t) {
|
|
|
153
153
|
)
|
|
154
154
|
}
|
|
155
155
|
) }),
|
|
156
|
-
h.map((g, v) => /* @__PURE__ */
|
|
156
|
+
h.map((g, v) => /* @__PURE__ */ l.jsx(z, { children: g === "ellipsis" ? /* @__PURE__ */ l.jsx(ie, {}) : /* @__PURE__ */ l.jsx(
|
|
157
157
|
B,
|
|
158
158
|
{
|
|
159
159
|
onClick: () => {
|
|
@@ -166,8 +166,8 @@ function Ie(t) {
|
|
|
166
166
|
children: g
|
|
167
167
|
}
|
|
168
168
|
) }, v)),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
169
|
+
/* @__PURE__ */ l.jsx(z, { children: /* @__PURE__ */ l.jsx(
|
|
170
|
+
se,
|
|
171
171
|
{
|
|
172
172
|
onClick: () => {
|
|
173
173
|
d < u && (c(d + 1), o(d + 1));
|
|
@@ -198,22 +198,22 @@ const Pe = ye(
|
|
|
198
198
|
variant: "normal"
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
), ne = $.forwardRef(({ className: t, inputSize: e, variant:
|
|
201
|
+
), ne = $.forwardRef(({ className: t, inputSize: e, variant: s, ...n }, c) => /* @__PURE__ */ l.jsx("input", { ...n, ref: c, className: m(Pe({ inputSize: e, variant: s }), t) }));
|
|
202
202
|
ne.displayName = "Input";
|
|
203
203
|
/**
|
|
204
|
-
* @license lucide-react v0.
|
|
204
|
+
* @license lucide-react v0.542.0 - ISC
|
|
205
205
|
*
|
|
206
206
|
* This source code is licensed under the ISC license.
|
|
207
207
|
* See the LICENSE file in the root directory of this source tree.
|
|
208
208
|
*/
|
|
209
209
|
const Be = [
|
|
210
|
-
["
|
|
211
|
-
["
|
|
210
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
211
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
212
212
|
], ae = P("search", Be), oe = $.forwardRef(
|
|
213
213
|
({
|
|
214
214
|
className: t,
|
|
215
215
|
inputClassName: e,
|
|
216
|
-
buttonClassName:
|
|
216
|
+
buttonClassName: s,
|
|
217
217
|
onSearch: n,
|
|
218
218
|
searchOnlyOnClick: c,
|
|
219
219
|
buttonVariant: p,
|
|
@@ -224,10 +224,10 @@ const Be = [
|
|
|
224
224
|
placeholder: f,
|
|
225
225
|
...g
|
|
226
226
|
}, v) => {
|
|
227
|
-
const [x, b] = $.useState(void 0), [
|
|
228
|
-
return /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
227
|
+
const [x, b] = $.useState(void 0), [j, a] = $.useState(!1);
|
|
228
|
+
return /* @__PURE__ */ l.jsxs("div", { className: m("flex gap-0", t), ref: v, children: [
|
|
229
|
+
/* @__PURE__ */ l.jsxs("div", { className: "relative w-full", children: [
|
|
230
|
+
/* @__PURE__ */ l.jsx(
|
|
231
231
|
ne,
|
|
232
232
|
{
|
|
233
233
|
...g,
|
|
@@ -245,38 +245,38 @@ const Be = [
|
|
|
245
245
|
onBlur: () => a(!1)
|
|
246
246
|
}
|
|
247
247
|
),
|
|
248
|
-
!
|
|
249
|
-
u ? null : /* @__PURE__ */
|
|
250
|
-
/* @__PURE__ */
|
|
248
|
+
!j && (x === "" || !x) && /* @__PURE__ */ l.jsxs("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: [
|
|
249
|
+
u ? null : /* @__PURE__ */ l.jsx(ae, { className: "h-4 w-4 text-primary-gray-500 dark:text-primary-gray-400 mr-2" }),
|
|
250
|
+
/* @__PURE__ */ l.jsx("span", { className: "text-primary-gray-500 dark:text-primary-gray-400", children: f || "Search..." })
|
|
251
251
|
] })
|
|
252
252
|
] }),
|
|
253
|
-
d === !1 ? null : /* @__PURE__ */
|
|
253
|
+
d === !1 ? null : /* @__PURE__ */ l.jsx(
|
|
254
254
|
xe,
|
|
255
255
|
{
|
|
256
256
|
variant: p || "icon",
|
|
257
|
-
className:
|
|
257
|
+
className: s,
|
|
258
258
|
padding: h,
|
|
259
259
|
onClick: () => {
|
|
260
260
|
n?.(x);
|
|
261
261
|
},
|
|
262
|
-
children: u || /* @__PURE__ */
|
|
262
|
+
children: u || /* @__PURE__ */ l.jsx(ae, { className: "stroke-2" })
|
|
263
263
|
}
|
|
264
264
|
)
|
|
265
265
|
] });
|
|
266
266
|
}
|
|
267
267
|
);
|
|
268
268
|
oe.displayName = "Search";
|
|
269
|
-
const Oe = (t) => t ? Object.entries(t).map(([
|
|
270
|
-
" ":
|
|
269
|
+
const Oe = (t) => t ? Object.entries(t).map(([s, n]) => Array.isArray(n) ? {
|
|
270
|
+
" ": s,
|
|
271
271
|
value: `"${n.join("; ")}"`
|
|
272
272
|
} : {
|
|
273
|
-
" ":
|
|
273
|
+
" ": s,
|
|
274
274
|
value: `"${n}"`
|
|
275
275
|
}) : {};
|
|
276
276
|
function Fe(t) {
|
|
277
277
|
const {
|
|
278
278
|
width: e,
|
|
279
|
-
height:
|
|
279
|
+
height: s,
|
|
280
280
|
data: n,
|
|
281
281
|
onSeriesMouseClick: c,
|
|
282
282
|
cardTemplate: p,
|
|
@@ -288,7 +288,7 @@ function Fe(t) {
|
|
|
288
288
|
classNames: g,
|
|
289
289
|
page: v,
|
|
290
290
|
allowDataDownloadOnDetail: x
|
|
291
|
-
} = t, [b,
|
|
291
|
+
} = t, [b, j] = w(void 0);
|
|
292
292
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
293
293
|
/* @__PURE__ */ i.jsx(
|
|
294
294
|
"div",
|
|
@@ -296,7 +296,7 @@ function Fe(t) {
|
|
|
296
296
|
className: "undp-scrollbar w-full my-0 mx-auto grid gap-4 undp-viz-data-cards-container",
|
|
297
297
|
style: {
|
|
298
298
|
width: e ? `${e}px` : "100%",
|
|
299
|
-
height:
|
|
299
|
+
height: s ? `${s}px` : "auto",
|
|
300
300
|
gridTemplateColumns: `repeat(auto-fill, minmax(${d}px, 1fr))`
|
|
301
301
|
},
|
|
302
302
|
children: n.filter(
|
|
@@ -310,7 +310,7 @@ function Fe(t) {
|
|
|
310
310
|
},
|
|
311
311
|
className: `w-full flex flex-col ${c || o ? "cursor-pointer" : "cursor-auto"}${u ? "" : "bg-primary-gray-200 dark:bg-primary-gray-600"} ${g?.dataCards || ""}`,
|
|
312
312
|
onClick: () => {
|
|
313
|
-
c?.(a),
|
|
313
|
+
c?.(a), j(a);
|
|
314
314
|
},
|
|
315
315
|
dangerouslySetInnerHTML: typeof p == "string" ? { __html: J(p, a) } : void 0,
|
|
316
316
|
children: typeof p == "function" ? p(a) : null
|
|
@@ -324,7 +324,7 @@ function Fe(t) {
|
|
|
324
324
|
{
|
|
325
325
|
open: b !== void 0,
|
|
326
326
|
onClose: () => {
|
|
327
|
-
|
|
327
|
+
j(void 0);
|
|
328
328
|
},
|
|
329
329
|
children: [
|
|
330
330
|
/* @__PURE__ */ i.jsx(
|
|
@@ -336,7 +336,7 @@ function Fe(t) {
|
|
|
336
336
|
}
|
|
337
337
|
),
|
|
338
338
|
x ? /* @__PURE__ */ i.jsx("div", { className: "flex", children: /* @__PURE__ */ i.jsx(
|
|
339
|
-
|
|
339
|
+
je,
|
|
340
340
|
{
|
|
341
341
|
csvData: Oe(b),
|
|
342
342
|
headers: [
|
|
@@ -360,13 +360,13 @@ function Fe(t) {
|
|
|
360
360
|
) : null
|
|
361
361
|
] });
|
|
362
362
|
}
|
|
363
|
-
const Me = (t, e,
|
|
364
|
-
(n) => e.some((c) => n[c]?.toLowerCase().includes(
|
|
363
|
+
const Me = (t, e, s) => e.length === 0 ? t : t.filter(
|
|
364
|
+
(n) => e.some((c) => n[c]?.toLowerCase().includes(s.toLowerCase()))
|
|
365
365
|
);
|
|
366
366
|
function Ye(t) {
|
|
367
367
|
const {
|
|
368
368
|
width: e,
|
|
369
|
-
height:
|
|
369
|
+
height: s,
|
|
370
370
|
graphTitle: n,
|
|
371
371
|
sources: c,
|
|
372
372
|
graphDescription: p,
|
|
@@ -379,7 +379,7 @@ function Ye(t) {
|
|
|
379
379
|
ariaLabel: v,
|
|
380
380
|
cardTemplate: x,
|
|
381
381
|
cardBackgroundColor: b,
|
|
382
|
-
cardFilters:
|
|
382
|
+
cardFilters: j,
|
|
383
383
|
cardSortingOptions: a,
|
|
384
384
|
cardSearchColumns: y,
|
|
385
385
|
cardMinWidth: ce = 320,
|
|
@@ -391,23 +391,23 @@ function Ye(t) {
|
|
|
391
391
|
uiMode: F = "normal",
|
|
392
392
|
styles: C,
|
|
393
393
|
classNames: S
|
|
394
|
-
} = t, [M, H] = w(o), [me,
|
|
395
|
-
() => (
|
|
394
|
+
} = t, [M, H] = w(o), [me, A] = w(1), [G, pe] = w(""), E = Q(
|
|
395
|
+
() => (j || []).map((r) => ({
|
|
396
396
|
filter: r.column,
|
|
397
397
|
label: r.label || `Filter by ${r.column}`,
|
|
398
398
|
singleSelect: !0,
|
|
399
399
|
clearable: !0,
|
|
400
400
|
defaultValue: Y(r.defaultValue),
|
|
401
|
-
availableValues: ke(o, r.column).filter((
|
|
401
|
+
availableValues: ke(o, r.column).filter((N) => !r.excludeValues?.includes(`${N}`)).map((N) => ({ value: N, label: N })),
|
|
402
402
|
width: r.width
|
|
403
403
|
})),
|
|
404
|
-
[
|
|
405
|
-
), [
|
|
406
|
-
(
|
|
404
|
+
[j, o]
|
|
405
|
+
), [U, fe] = w(
|
|
406
|
+
(j || []).map((r) => ({
|
|
407
407
|
filter: r.column,
|
|
408
408
|
value: Y(r.defaultValue)
|
|
409
409
|
}))
|
|
410
|
-
), [D,
|
|
410
|
+
), [D, q] = w(
|
|
411
411
|
a ? !a.defaultValue || a.options.findIndex((r) => r.label === a.defaultValue) === -1 ? a.options[0] : a.options[a.options.findIndex((r) => r.label === a.defaultValue)] : void 0
|
|
412
412
|
), K = Q(
|
|
413
413
|
() => ({
|
|
@@ -417,27 +417,27 @@ function Ye(t) {
|
|
|
417
417
|
}),
|
|
418
418
|
[]
|
|
419
419
|
);
|
|
420
|
-
return
|
|
421
|
-
|
|
420
|
+
return I(() => {
|
|
421
|
+
q(
|
|
422
422
|
a ? !a.defaultValue || a.options.findIndex(
|
|
423
423
|
(r) => r.label === a.defaultValue
|
|
424
424
|
) === -1 ? a.options[0] : a.options[a.options.findIndex(
|
|
425
425
|
(r) => r.label === a.defaultValue
|
|
426
426
|
)] : void 0
|
|
427
427
|
);
|
|
428
|
-
}, [a]),
|
|
429
|
-
const r = Me(o, y || [],
|
|
428
|
+
}, [a]), I(() => {
|
|
429
|
+
const r = Me(o, y || [], G).filter(
|
|
430
430
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
431
|
-
(
|
|
431
|
+
(N) => U.every(
|
|
432
432
|
(V) => V.value && L([V.value]).length > 0 ? ge(
|
|
433
|
-
L([
|
|
433
|
+
L([N[V.filter]]),
|
|
434
434
|
L([V.value]).map((T) => T.value)
|
|
435
435
|
).length > 0 : !0
|
|
436
436
|
)
|
|
437
437
|
);
|
|
438
438
|
H(D ? he(r, D?.value, D?.type) : r);
|
|
439
|
-
}, [o, y,
|
|
440
|
-
|
|
439
|
+
}, [o, y, G, U, D]), I(() => {
|
|
440
|
+
A(1);
|
|
441
441
|
}, [M]), /* @__PURE__ */ i.jsx(
|
|
442
442
|
"div",
|
|
443
443
|
{
|
|
@@ -478,7 +478,7 @@ function Ye(t) {
|
|
|
478
478
|
width: e
|
|
479
479
|
}
|
|
480
480
|
) : null,
|
|
481
|
-
a ||
|
|
481
|
+
a || E.length > 0 ? /* @__PURE__ */ i.jsxs("div", { className: "flex gap-4 flex-wrap items-start w-full", children: [
|
|
482
482
|
a ? /* @__PURE__ */ i.jsxs(
|
|
483
483
|
"div",
|
|
484
484
|
{
|
|
@@ -502,7 +502,7 @@ function Ye(t) {
|
|
|
502
502
|
isSearchable: !0,
|
|
503
503
|
filterOption: Z(K),
|
|
504
504
|
onChange: (r) => {
|
|
505
|
-
|
|
505
|
+
q(r || void 0);
|
|
506
506
|
},
|
|
507
507
|
variant: F,
|
|
508
508
|
size: "sm",
|
|
@@ -516,7 +516,7 @@ function Ye(t) {
|
|
|
516
516
|
]
|
|
517
517
|
}
|
|
518
518
|
) : null,
|
|
519
|
-
|
|
519
|
+
E?.map((r, N) => /* @__PURE__ */ i.jsxs(
|
|
520
520
|
"div",
|
|
521
521
|
{
|
|
522
522
|
className: "grow shrink-0 min-w-[240px]",
|
|
@@ -555,7 +555,7 @@ function Ye(t) {
|
|
|
555
555
|
)
|
|
556
556
|
]
|
|
557
557
|
},
|
|
558
|
-
|
|
558
|
+
N
|
|
559
559
|
))
|
|
560
560
|
] }) : null,
|
|
561
561
|
(y || []).length > 0 ? /* @__PURE__ */ i.jsx("div", { style: { paddingTop: "1px" }, children: /* @__PURE__ */ i.jsx(
|
|
@@ -576,7 +576,7 @@ function Ye(t) {
|
|
|
576
576
|
{
|
|
577
577
|
data: M,
|
|
578
578
|
width: e,
|
|
579
|
-
height:
|
|
579
|
+
height: s,
|
|
580
580
|
cardTemplate: x,
|
|
581
581
|
cardMinWidth: ce,
|
|
582
582
|
page: me,
|
|
@@ -590,16 +590,16 @@ function Ye(t) {
|
|
|
590
590
|
}
|
|
591
591
|
),
|
|
592
592
|
O ? /* @__PURE__ */ i.jsx(
|
|
593
|
-
|
|
593
|
+
ze,
|
|
594
594
|
{
|
|
595
595
|
total: M.length,
|
|
596
596
|
defaultPage: 0,
|
|
597
597
|
pageSize: O,
|
|
598
|
-
onChange:
|
|
598
|
+
onChange: A
|
|
599
599
|
}
|
|
600
600
|
) : null,
|
|
601
601
|
c || u ? /* @__PURE__ */ i.jsx(
|
|
602
|
-
|
|
602
|
+
Ne,
|
|
603
603
|
{
|
|
604
604
|
styles: { footnote: C?.footnote, source: C?.source },
|
|
605
605
|
classNames: {
|