@undp/data-viz 2.1.9 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +19 -19
- package/dist/AreaChart.js.map +1 -1
- package/dist/{Axis-CRyfcLjc.js → Axis-DoOqnt6g.js} +2 -2
- package/dist/{Axis-CRyfcLjc.js.map → Axis-DoOqnt6g.js.map} +1 -1
- package/dist/{Axis-DxRV2yMi.cjs → Axis-Dtjn-EgM.cjs} +2 -2
- package/dist/{Axis-DxRV2yMi.cjs.map → Axis-Dtjn-EgM.cjs.map} +1 -1
- package/dist/{AxisTitle-sS5bLLR7.cjs → AxisTitle-DV4n0RxE.cjs} +2 -2
- package/dist/{AxisTitle-sS5bLLR7.cjs.map → AxisTitle-DV4n0RxE.cjs.map} +1 -1
- package/dist/{AxisTitle-jeI7am8o.js → AxisTitle-VFq89Olw.js} +2 -2
- package/dist/{AxisTitle-jeI7am8o.js.map → AxisTitle-VFq89Olw.js.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +24 -24
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.js +2 -2
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +14 -14
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +48 -48
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +22 -22
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +19 -19
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +51 -51
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +4 -4
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.js +2 -2
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.js +2 -2
- package/dist/CopyTextButton.cjs +1 -16
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +13 -31
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +2 -20
- package/dist/CsvDownloadButton.cjs.map +1 -1
- package/dist/CsvDownloadButton.js +5 -26
- package/dist/CsvDownloadButton.js.map +1 -1
- package/dist/DataCards.cjs +1 -21
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +18 -42
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.js +6 -6
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-0Ry5nXiC.js → DetailsModal-BMCTgVsk.js} +4 -4
- package/dist/{DetailsModal-0Ry5nXiC.js.map → DetailsModal-BMCTgVsk.js.map} +1 -1
- package/dist/{DetailsModal-BN0HDFlV.cjs → DetailsModal-DHttOA80.cjs} +2 -2
- package/dist/{DetailsModal-BN0HDFlV.cjs.map → DetailsModal-DHttOA80.cjs.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +22 -22
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +10 -10
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +78 -78
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-BbdPQa2k.js → DropdownSelect-D8rFbygC.js} +5 -33
- package/dist/{DropdownSelect-BbdPQa2k.js.map → DropdownSelect-D8rFbygC.js.map} +1 -1
- package/dist/{DropdownSelect-Doz3mCrM.cjs → DropdownSelect-NNpOs7DX.cjs} +2 -26
- package/dist/{DropdownSelect-Doz3mCrM.cjs.map → DropdownSelect-NNpOs7DX.cjs.map} +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +15 -15
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +22 -22
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-gLDRXBHm.cjs → EmptyState-CGeBqbmR.cjs} +2 -2
- package/dist/{EmptyState-gLDRXBHm.cjs.map → EmptyState-CGeBqbmR.cjs.map} +1 -1
- package/dist/EmptyState-tZBErBKF.js +15 -0
- package/dist/{EmptyState-C7ZXkZWd.js.map → EmptyState-tZBErBKF.js.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +1 -1
- package/dist/ExcelDownloadButton.js +2 -2
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.js +2 -2
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.js +13 -13
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.js +8 -8
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +12 -12
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/{GraphContainer-d8A46BK2.cjs → GraphContainer-B1EDxJ0S.cjs} +2 -2
- package/dist/{GraphContainer-d8A46BK2.cjs.map → GraphContainer-B1EDxJ0S.cjs.map} +1 -1
- package/dist/{GraphContainer-CRqzdKu2.js → GraphContainer-CF6ws3pd.js} +2 -2
- package/dist/{GraphContainer-CRqzdKu2.js.map → GraphContainer-CF6ws3pd.js.map} +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +2 -2
- package/dist/GraphEl-CBZdcvb7.cjs +2 -0
- package/dist/GraphEl-CBZdcvb7.cjs.map +1 -0
- package/dist/{GraphEl-Dyu_EIQb.js → GraphEl-DKrjuQNB.js} +79 -18
- package/dist/GraphEl-DKrjuQNB.js.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.js +2 -2
- package/dist/GraphHeader.cjs +1 -1
- package/dist/GraphHeader.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.js +2 -2
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -1
- package/dist/GriddedGraphs.js +8 -8
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -1
- package/dist/GriddedGraphsFromConfig.js +4 -4
- package/dist/GriddedGraphsFromConfig.js.map +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +14 -14
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +5 -5
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +48 -48
- package/dist/HybridMap.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.js +3 -3
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +18 -18
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +2 -2
- package/dist/{Modal-JW_IExO3.cjs → Modal-CaYa_TLE.cjs} +2 -2
- package/dist/{Modal-JW_IExO3.cjs.map → Modal-CaYa_TLE.cjs.map} +1 -1
- package/dist/{Modal-bMQA6bL_.js → Modal-Ch9wvKxF.js} +4 -4
- package/dist/{Modal-bMQA6bL_.js.map → Modal-Ch9wvKxF.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -1
- package/dist/MultiGraphDashboard.js +5 -5
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +4 -4
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +5 -5
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +4 -4
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +17 -17
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +19 -19
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +15 -15
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +5 -5
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +4 -4
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -1
- package/dist/PerformanceIntensiveScrollStory.js +6 -6
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +9 -9
- package/dist/{ReferenceLine-2XCwHXQ4.js → ReferenceLine-DgtoRgw0.js} +5 -5
- package/dist/ReferenceLine-DgtoRgw0.js.map +1 -0
- package/dist/{ReferenceLine-BH0qdf4R.cjs → ReferenceLine-M9aP3dj-.cjs} +2 -2
- package/dist/{ReferenceLine-BH0qdf4R.cjs.map → ReferenceLine-M9aP3dj-.cjs.map} +1 -1
- package/dist/{RegressionLine-BOTTNSrr.cjs → RegressionLine-Ci-Dh0w0.cjs} +2 -2
- package/dist/{RegressionLine-BOTTNSrr.cjs.map → RegressionLine-Ci-Dh0w0.cjs.map} +1 -1
- package/dist/{RegressionLine-DAcY2DjT.js → RegressionLine-D2aqeBKp.js} +6 -6
- package/dist/RegressionLine-D2aqeBKp.js.map +1 -0
- package/dist/SVGDownloadButton.cjs +1 -1
- package/dist/SVGDownloadButton.js +2 -2
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +61 -67
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +23 -23
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.d.ts +1 -1
- package/dist/ScrollStory.js +4 -4
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +19 -19
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -1
- package/dist/SingleGraphDashboard.js +9 -9
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +4 -4
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.js +5 -5
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +4 -4
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +63 -70
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +4 -4
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +12 -12
- package/dist/SlopeChart.js.map +1 -1
- package/dist/{Source-DYMJRrsq.cjs → Source-B5AoSlsi.cjs} +2 -2
- package/dist/{Source-DYMJRrsq.cjs.map → Source-B5AoSlsi.cjs.map} +1 -1
- package/dist/{Source-DwTHB8fn.js → Source-F8EYCYkV.js} +4 -4
- package/dist/{Source-DwTHB8fn.js.map → Source-F8EYCYkV.js.map} +1 -1
- package/dist/Source.cjs +1 -1
- package/dist/Source.js +3 -3
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +8 -8
- package/dist/SparkLine.js.map +1 -1
- package/dist/{Spinner-DVBnY6Vg.js → Spinner--r2RrJV8.js} +2 -2
- package/dist/{Spinner-DVBnY6Vg.js.map → Spinner--r2RrJV8.js.map} +1 -1
- package/dist/{Spinner-CQZcjzwd.cjs → Spinner-jTMOLuw_.cjs} +2 -2
- package/dist/{Spinner-CQZcjzwd.cjs.map → Spinner-jTMOLuw_.cjs.map} +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.js +2 -2
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +10 -10
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +13 -13
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +3 -3
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/{Tooltip-uUdw6wJL.cjs → Tooltip-BLa2EfMs.cjs} +2 -2
- package/dist/{Tooltip-uUdw6wJL.cjs.map → Tooltip-BLa2EfMs.cjs.map} +1 -1
- package/dist/{Tooltip-Dj5eVppQ.js → Tooltip-BRnAz2Gv.js} +3 -3
- package/dist/{Tooltip-Dj5eVppQ.js.map → Tooltip-BRnAz2Gv.js.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +10 -10
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +8 -1
- package/dist/{Typography-PxtFcnJb.js → Typography-hWfh3H0J.js} +2 -2
- package/dist/{Typography-PxtFcnJb.js.map → Typography-hWfh3H0J.js.map} +1 -1
- package/dist/{Typography-DX7PlgQU.cjs → Typography-sa1UE0oF.cjs} +2 -2
- package/dist/{Typography-DX7PlgQU.cjs.map → Typography-sa1UE0oF.cjs.map} +1 -1
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +8 -8
- package/dist/WaterfallChart.cjs +2 -0
- package/dist/WaterfallChart.cjs.map +1 -0
- package/dist/WaterfallChart.d.ts +208 -0
- package/dist/WaterfallChart.js +427 -0
- package/dist/WaterfallChart.js.map +1 -0
- package/dist/{XAxesLabels-Bt5NZBmX.cjs → XAxesLabels-C6o9jJal.cjs} +2 -2
- package/dist/{XAxesLabels-Bt5NZBmX.cjs.map → XAxesLabels-C6o9jJal.cjs.map} +1 -1
- package/dist/{XAxesLabels-Dy8E1SEo.js → XAxesLabels-rhK7lRjO.js} +3 -3
- package/dist/{XAxesLabels-Dy8E1SEo.js.map → XAxesLabels-rhK7lRjO.js.map} +1 -1
- package/dist/{XTicksAndGridLines-CObVFSm4.js → XTicksAndGridLines-CVZkZkpS.js} +2 -2
- package/dist/{XTicksAndGridLines-CObVFSm4.js.map → XTicksAndGridLines-CVZkZkpS.js.map} +1 -1
- package/dist/{XTicksAndGridLines-B6CELS7q.cjs → XTicksAndGridLines-CekrPykD.cjs} +2 -2
- package/dist/{XTicksAndGridLines-B6CELS7q.cjs.map → XTicksAndGridLines-CekrPykD.cjs.map} +1 -1
- package/dist/{YAxesLabels-DesLesUP.cjs → YAxesLabels-BQ2aCazV.cjs} +2 -2
- package/dist/{YAxesLabels-DesLesUP.cjs.map → YAxesLabels-BQ2aCazV.cjs.map} +1 -1
- package/dist/{YAxesLabels-a57ZRv-0.js → YAxesLabels-QICWVsHf.js} +3 -3
- package/dist/{YAxesLabels-a57ZRv-0.js.map → YAxesLabels-QICWVsHf.js.map} +1 -1
- package/dist/{YTicksAndGridLines-Blepl7XF.js → YTicksAndGridLines-GnXnSRF2.js} +2 -2
- package/dist/{YTicksAndGridLines-Blepl7XF.js.map → YTicksAndGridLines-GnXnSRF2.js.map} +1 -1
- package/dist/{YTicksAndGridLines-4pxTRlRK.cjs → YTicksAndGridLines-UzVC5eBM.cjs} +2 -2
- package/dist/{YTicksAndGridLines-4pxTRlRK.cjs.map → YTicksAndGridLines-UzVC5eBM.cjs.map} +1 -1
- package/dist/{band-DHUZ2X7J.js → band-DYty33LD.js} +2 -2
- package/dist/{band-DHUZ2X7J.js.map → band-DYty33LD.js.map} +1 -1
- package/dist/{checkIfMultiple-CIRtG0KE.js → checkIfMultiple-D9fVkeOq.js} +7 -19
- package/dist/{checkIfMultiple-CIRtG0KE.js.map → checkIfMultiple-D9fVkeOq.js.map} +1 -1
- package/dist/checkIfMultiple-DxnGtm3t.cjs +2 -0
- package/dist/{checkIfMultiple-wg6hJLXy.cjs.map → checkIfMultiple-DxnGtm3t.cjs.map} +1 -1
- package/dist/{customArea-BUhPiPT6.js → customArea-ASDaSE4u.js} +5 -5
- package/dist/{customArea-BUhPiPT6.js.map → customArea-ASDaSE4u.js.map} +1 -1
- package/dist/{customArea-CMF5g-C3.cjs → customArea-B1LWQBmM.cjs} +2 -2
- package/dist/{customArea-CMF5g-C3.cjs.map → customArea-B1LWQBmM.cjs.map} +1 -1
- package/dist/defaultLocale-C4wbwF1n.cjs +2 -0
- package/dist/defaultLocale-C4wbwF1n.cjs.map +1 -0
- package/dist/defaultLocale-CPy_WVtp.js +172 -0
- package/dist/defaultLocale-CPy_WVtp.js.map +1 -0
- package/dist/{ensureCompleteData-DH5c52Ub.js → ensureCompleteData-CDIukSG6.js} +2 -2
- package/dist/{ensureCompleteData-DH5c52Ub.js.map → ensureCompleteData-CDIukSG6.js.map} +1 -1
- package/dist/{ensureCompleteData-pZ9QO6kB.cjs → ensureCompleteData-D9bQTiVS.cjs} +2 -2
- package/dist/{ensureCompleteData-pZ9QO6kB.cjs.map → ensureCompleteData-D9bQTiVS.cjs.map} +1 -1
- package/dist/{fetchAndParseData-BpqkBPQL.js → fetchAndParseData-BAXhgTDM.js} +12 -18
- package/dist/{fetchAndParseData-BpqkBPQL.js.map → fetchAndParseData-BAXhgTDM.js.map} +1 -1
- package/dist/{fetchAndParseData-l5HGMAEs.cjs → fetchAndParseData-QTF6tjij.cjs} +3 -8
- package/dist/{fetchAndParseData-l5HGMAEs.cjs.map → fetchAndParseData-QTF6tjij.cjs.map} +1 -1
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/getCentroidCoordinates-CtBGrNC8.cjs +2 -0
- package/dist/getCentroidCoordinates-CtBGrNC8.cjs.map +1 -0
- package/dist/{getCentroidCoordinates-D7r34N4w.js → getCentroidCoordinates-s0OOUjLF.js} +15 -15
- package/dist/getCentroidCoordinates-s0OOUjLF.js.map +1 -0
- package/dist/{getGraphList-Dxwo9TDb.js → getGraphList-Bpd3PVmF.js} +7 -1
- package/dist/getGraphList-Bpd3PVmF.js.map +1 -0
- package/dist/getGraphList-DQ24IzAn.cjs +2 -0
- package/dist/getGraphList-DQ24IzAn.cjs.map +1 -0
- package/dist/{getJenks-GYmdwBqm.cjs → getJenks-BzJvhy_H.cjs} +2 -2
- package/dist/{getJenks-GYmdwBqm.cjs.map → getJenks-BzJvhy_H.cjs.map} +1 -1
- package/dist/{getJenks-BbngDoBQ.js → getJenks-DTCcQSDi.js} +2 -2
- package/dist/{getJenks-BbngDoBQ.js.map → getJenks-DTCcQSDi.js.map} +1 -1
- package/dist/getSchema.cjs +1 -1
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.d.ts +3 -3
- package/dist/getSchema.js +24 -16
- package/dist/getSchema.js.map +1 -1
- package/dist/getSliderMarks-CIuSoedo.cjs +2 -0
- package/dist/{getSliderMarks-BmADcPQt.cjs.map → getSliderMarks-CIuSoedo.cjs.map} +1 -1
- package/dist/{getSliderMarks-HIDJ0_Cd.js → getSliderMarks-Cvg8zHBU.js} +4 -9
- package/dist/getSliderMarks-Cvg8zHBU.js.map +1 -0
- package/dist/{imageDownload-NYXbvKob.cjs → imageDownload-61q6jyJW.cjs} +3 -3
- package/dist/imageDownload-61q6jyJW.cjs.map +1 -0
- package/dist/{imageDownload-BU4qnxJP.js → imageDownload-Diofs_vY.js} +14 -15
- package/dist/imageDownload-Diofs_vY.js.map +1 -0
- package/dist/{index-D491FEn1.js → index-BQYOuXdl.js} +15 -15
- package/dist/{index-D491FEn1.js.map → index-BQYOuXdl.js.map} +1 -1
- package/dist/{index-DxXnJ8Ti.cjs → index-C5K--w8d.cjs} +2 -2
- package/dist/index-C5K--w8d.cjs.map +1 -0
- package/dist/{index-DRXx7m-C.cjs → index-C6er0ety.cjs} +2 -2
- package/dist/{index-DRXx7m-C.cjs.map → index-C6er0ety.cjs.map} +1 -1
- package/dist/{index-CHPV5EwG-CTPQjnHt.cjs → index-CHPV5EwG-6v2a2njQ.cjs} +5 -69
- package/dist/{index-CHPV5EwG-CTPQjnHt.cjs.map → index-CHPV5EwG-6v2a2njQ.cjs.map} +1 -1
- package/dist/{index-CHPV5EwG-Curnpaqc.js → index-CHPV5EwG-DecW7_qr.js} +5 -77
- package/dist/{index-CHPV5EwG-Curnpaqc.js.map → index-CHPV5EwG-DecW7_qr.js.map} +1 -1
- package/dist/{index-SKgJALZg.js → index-CSiFiXPj.js} +3 -3
- package/dist/{index-SKgJALZg.js.map → index-CSiFiXPj.js.map} +1 -1
- package/dist/index-CoobIWNj.cjs +10 -0
- package/dist/index-CoobIWNj.cjs.map +1 -0
- package/dist/index-CtMBjvtq.js +148 -0
- package/dist/index-CtMBjvtq.js.map +1 -0
- package/dist/{index-Cw8sCyo_-BrHiWiRF.cjs → index-Cw8sCyo_-CEcCMKUi.cjs} +2 -2
- package/dist/{index-Cw8sCyo_-BrHiWiRF.cjs.map → index-Cw8sCyo_-CEcCMKUi.cjs.map} +1 -1
- package/dist/{index-Cw8sCyo_-B2hEKjzG.js → index-Cw8sCyo_-n4AacHGk.js} +6 -4
- package/dist/{index-Cw8sCyo_-B2hEKjzG.js.map → index-Cw8sCyo_-n4AacHGk.js.map} +1 -1
- package/dist/{index-R1gTfap5.js → index-D5ihtaJJ.js} +12 -12
- package/dist/{index-R1gTfap5.js.map → index-D5ihtaJJ.js.map} +1 -1
- package/dist/{index-B_sAFsEV.cjs → index-D69M6klB.cjs} +2 -2
- package/dist/{index-B_sAFsEV.cjs.map → index-D69M6klB.cjs.map} +1 -1
- package/dist/{index-GEsywGxz.js → index-DCsFBfJ_.js} +160 -104
- package/dist/index-DCsFBfJ_.js.map +1 -0
- package/dist/{index-WML2dCZ0.cjs → index-Dgjq6aZ2.cjs} +2 -2
- package/dist/{index-WML2dCZ0.cjs.map → index-Dgjq6aZ2.cjs.map} +1 -1
- package/dist/{index-Dzc_aaI9-BmkfPMyc.cjs → index-Dzc_aaI9-C3DbPpy3.cjs} +2 -2
- package/dist/{index-Dzc_aaI9-BmkfPMyc.cjs.map → index-Dzc_aaI9-C3DbPpy3.cjs.map} +1 -1
- package/dist/{index-Dzc_aaI9-Bb7gobH_.js → index-Dzc_aaI9-CG2Ar7l1.js} +4 -4
- package/dist/{index-Dzc_aaI9-Bb7gobH_.js.map → index-Dzc_aaI9-CG2Ar7l1.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +208 -93
- package/dist/index.js +129 -127
- package/dist/index.js.map +1 -1
- package/dist/{linear-BqltdMeF.js → linear-CalFSAaO.js} +2 -2
- package/dist/{linear-BqltdMeF.js.map → linear-CalFSAaO.js.map} +1 -1
- package/dist/{linear-BwPAspcq.cjs → linear-CgUCbw9F.cjs} +2 -2
- package/dist/{linear-BwPAspcq.cjs.map → linear-CgUCbw9F.cjs.map} +1 -1
- package/dist/{ordinal-BJ6O_LC5.js → ordinal-CHaxGJ_l.js} +2 -2
- package/dist/{ordinal-BJ6O_LC5.js.map → ordinal-CHaxGJ_l.js.map} +1 -1
- package/dist/{parse-DlCRUFh_.js → parse-Dv4of-PN.js} +2 -67
- package/dist/{parse-DlCRUFh_.js.map → parse-Dv4of-PN.js.map} +1 -1
- package/dist/parse-xYI9yrvL.cjs +2 -0
- package/dist/{parse-hMnG_lRV.cjs.map → parse-xYI9yrvL.cjs.map} +1 -1
- package/dist/{pow-DgrUorRi.cjs → pow-BnyPO-NX.cjs} +2 -2
- package/dist/{pow-DgrUorRi.cjs.map → pow-BnyPO-NX.cjs.map} +1 -1
- package/dist/{pow-CM2aze4M.js → pow-CaIrlM4J.js} +2 -2
- package/dist/{pow-CM2aze4M.js.map → pow-CaIrlM4J.js.map} +1 -1
- package/dist/proxy-C4-uo6nS.cjs +2 -0
- package/dist/proxy-C4-uo6nS.cjs.map +1 -0
- package/dist/{proxy-BxkFHwUw.js → proxy-DRuSUlPL.js} +2828 -2717
- package/dist/proxy-DRuSUlPL.js.map +1 -0
- package/dist/{string2HTML-DhG75NqA.js → string2HTML-DUYZT1L9.js} +17 -17
- package/dist/{string2HTML-DhG75NqA.js.map → string2HTML-DUYZT1L9.js.map} +1 -1
- package/dist/{string2HTML-CPGr_I5E.cjs → string2HTML-xx9MzTtY.cjs} +3 -3
- package/dist/{string2HTML-CPGr_I5E.cjs.map → string2HTML-xx9MzTtY.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-BUL-dwnK.js → time-CAtex-RV.js} +2 -2
- package/dist/{time-BUL-dwnK.js.map → time-CAtex-RV.js.map} +1 -1
- package/dist/{time-CZd5YLSP.cjs → time-CkcKbhwe.cjs} +2 -2
- package/dist/{time-CZd5YLSP.cjs.map → time-CkcKbhwe.cjs.map} +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.d.ts +1 -1
- package/dist/transformData.js +3 -3
- package/dist/transformDataForAggregation-BFdha9Dx.cjs +2 -0
- package/dist/transformDataForAggregation-BFdha9Dx.cjs.map +1 -0
- package/dist/{transformDataForAggregation-j34UL73s.js → transformDataForAggregation-wdPf8bNt.js} +26 -11
- package/dist/transformDataForAggregation-wdPf8bNt.js.map +1 -0
- package/dist/{transformDataForGraphFromFile-CuXxR8uA.cjs → transformDataForGraphFromFile-DOhp1qrp.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-CuXxR8uA.cjs.map → transformDataForGraphFromFile-DOhp1qrp.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-DyP-83Nh.js → transformDataForGraphFromFile-dt9sHTVy.js} +3 -3
- package/dist/{transformDataForGraphFromFile-DyP-83Nh.js.map → transformDataForGraphFromFile-dt9sHTVy.js.map} +1 -1
- package/dist/{use-in-view-QcfiW0w3.cjs → use-in-view-C3o_ntMv.cjs} +2 -2
- package/dist/use-in-view-C3o_ntMv.cjs.map +1 -0
- package/dist/{use-in-view-Cxa7y1TH.js → use-in-view-Dl5L8LtP.js} +2 -2
- package/dist/use-in-view-Dl5L8LtP.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +4 -4
- package/dist/validateSchema.cjs +1 -1
- package/dist/validateSchema.d.ts +1 -1
- package/dist/validateSchema.js +1 -1
- package/dist/{x-BBpi7a_7-WVdj1j6r.js → x-BBpi7a_7-BsvWCzYM.js} +1 -31
- package/dist/{x-BBpi7a_7-WVdj1j6r.js.map → x-BBpi7a_7-BsvWCzYM.js.map} +1 -1
- package/dist/x-BBpi7a_7-DXYIEFwN.cjs +2 -0
- package/dist/{x-BBpi7a_7-mTo40uId.cjs.map → x-BBpi7a_7-DXYIEFwN.cjs.map} +1 -1
- package/dist/{zoom-C9MFjAaV.js → zoom-5AkJSuWO.js} +3 -3
- package/dist/zoom-5AkJSuWO.js.map +1 -0
- package/dist/{zoom-DPw8bba-.cjs → zoom-ChcvXFIz.cjs} +2 -2
- package/dist/zoom-ChcvXFIz.cjs.map +1 -0
- package/package.json +21 -1
- package/readme.md +33 -22
- package/dist/EmptyState-C7ZXkZWd.js +0 -15
- package/dist/GraphEl-BixTEyKW.cjs +0 -2
- package/dist/GraphEl-BixTEyKW.cjs.map +0 -1
- package/dist/GraphEl-Dyu_EIQb.js.map +0 -1
- package/dist/ReferenceLine-2XCwHXQ4.js.map +0 -1
- package/dist/RegressionLine-DAcY2DjT.js.map +0 -1
- package/dist/checkIfMultiple-wg6hJLXy.cjs +0 -12
- package/dist/defaultLocale-BEa-49Qz.js +0 -172
- package/dist/defaultLocale-BEa-49Qz.js.map +0 -1
- package/dist/defaultLocale-DIVzfLaQ.cjs +0 -2
- package/dist/defaultLocale-DIVzfLaQ.cjs.map +0 -1
- package/dist/getCentroidCoordinates-D7r34N4w.js.map +0 -1
- package/dist/getCentroidCoordinates-Dng1HVjO.cjs +0 -2
- package/dist/getCentroidCoordinates-Dng1HVjO.cjs.map +0 -1
- package/dist/getGraphList-CA17dvFB.cjs +0 -2
- package/dist/getGraphList-CA17dvFB.cjs.map +0 -1
- package/dist/getGraphList-Dxwo9TDb.js.map +0 -1
- package/dist/getSliderMarks-BmADcPQt.cjs +0 -6
- package/dist/getSliderMarks-HIDJ0_Cd.js.map +0 -1
- package/dist/imageDownload-BU4qnxJP.js.map +0 -1
- package/dist/imageDownload-NYXbvKob.cjs.map +0 -1
- package/dist/index-BqfRwk1n.js +0 -146
- package/dist/index-BqfRwk1n.js.map +0 -1
- package/dist/index-DG2bgAva.cjs +0 -10
- package/dist/index-DG2bgAva.cjs.map +0 -1
- package/dist/index-DxXnJ8Ti.cjs.map +0 -1
- package/dist/index-GEsywGxz.js.map +0 -1
- package/dist/parse-hMnG_lRV.cjs +0 -2
- package/dist/proxy-BxkFHwUw.js.map +0 -1
- package/dist/proxy-BxvUI_9l.cjs +0 -2
- package/dist/proxy-BxvUI_9l.cjs.map +0 -1
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs +0 -2
- package/dist/transformDataForAggregation-CYoB5Xsk.cjs.map +0 -1
- package/dist/transformDataForAggregation-j34UL73s.js.map +0 -1
- package/dist/use-in-view-Cxa7y1TH.js.map +0 -1
- package/dist/use-in-view-QcfiW0w3.cjs.map +0 -1
- package/dist/x-BBpi7a_7-mTo40uId.cjs +0 -27
- package/dist/zoom-C9MFjAaV.js.map +0 -1
- package/dist/zoom-DPw8bba-.cjs.map +0 -1
package/dist/HybridMap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity:\r\n highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n fill: labelColor || '#000',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_2","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_8","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,MAAM;AAChG,QAAM,EAAE,YAAYC,GAAG,aAAaC,IAAIP,IAAG,GAAGQ,EAAC,IAAKJ,GAAGK,IAAIC,GAAEH,CAAC,IAAIA,IAAIP,IAAGW,IAAIL,IAAI,EAAE,MAAM,OAAM,IAAK,EAAE,oBAAoBG,MAAM,aAAaA,IAAI,QAAQ,MAAM,YAAW;AAC1K,SAAuBG,gBAAAA,GAAE;AAAA,IACvBC,GAAE;AAAA,IACF;AAAA,MACE,oBAAoBJ;AAAA,MACpB,GAAGE;AAAA,MACH,GAAGH;AAAA,MACH,KAAKH;AAAA,IACX;AAAA,EACA;AACA,CAAC;AACDH,GAAE,cAAcH;AAChB,SAASW,GAAEN,GAAG;AACZ,SAAOH,GAAE,SAASG,CAAC;AACrB;AACA,IAAIU,KAAIZ;AACR,MAAMa,KAAIC,GAAE,WAAW,CAACZ,GAAGC,MAAM;AAC/B,QAAMC,IAAIW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C;AAvEvB,SAAAtF,GAAAjQ,GAAA;AAAA,SAmEgBA,EAAC6P;AAAK;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"HybridMap.js","sources":["../node_modules/@undp/design-system-react/dist/Separator.js","../src/Components/Graphs/Maps/HybridMap/Graph.tsx","../src/Components/Graphs/Maps/HybridMap/index.tsx"],"sourcesContent":["import { j as v } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as N } from \"./compiler-runtime-Cu50tn6L.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DE1ItLfl.js\";\nimport { c as O } from \"./utils-D_Pof5Gy.js\";\nvar h = \"Separator\", f = \"horizontal\", E = [\"horizontal\", \"vertical\"], y = R.forwardRef((i, s) => {\n const { decorative: r, orientation: a = f, ...o } = i, t = P(a) ? a : f, m = r ? { role: \"none\" } : { \"aria-orientation\": t === \"vertical\" ? t : void 0, role: \"separator\" };\n return /* @__PURE__ */ v.jsx(\n x.div,\n {\n \"data-orientation\": t,\n ...m,\n ...o,\n ref: s\n }\n );\n});\ny.displayName = h;\nfunction P(i) {\n return E.includes(i);\n}\nvar u = y;\nconst T = g.forwardRef((i, s) => {\n const r = N.c(14);\n let a, o, t, e;\n r[0] !== i ? ({\n className: a,\n variant: t,\n orientation: e,\n ...o\n } = i, r[0] = i, r[1] = a, r[2] = o, r[3] = t, r[4] = e) : (a = r[1], o = r[2], t = r[3], e = r[4]);\n const m = t === void 0 ? \"dark\" : t, l = e === void 0 ? \"horizontal\" : e, c = l === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\", d = m === \"dark\" ? \"bg-primary-gray-600 dark:bg-primary-gray-200\" : \"bg-primary-gray-400 dark:bg-primary-gray-550\";\n let n;\n r[5] !== a || r[6] !== c || r[7] !== d ? (n = O(c, d, a), r[5] = a, r[6] = c, r[7] = d, r[8] = n) : n = r[8];\n let p;\n return r[9] !== l || r[10] !== o || r[11] !== s || r[12] !== n ? (p = /* @__PURE__ */ v.jsx(u, { ...o, ref: s, orientation: l, className: n }), r[9] = l, r[10] = o, r[11] = s, r[12] = n, r[13] = p) : p = r[13], p;\n});\nT.displayName = u.displayName;\nexport {\n T as Separator\n};\n//# sourceMappingURL=Separator.js.map\n","import isEqual from 'fast-deep-equal';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n} from 'd3-geo';\r\nimport { D3ZoomEvent, zoom, ZoomBehavior } from 'd3-zoom';\r\nimport { select } from 'd3-selection';\r\nimport { scaleOrdinal, scaleSqrt, scaleThreshold } from 'd3-scale';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport bbox from '@turf/bbox';\r\nimport centerOfMass from '@turf/center-of-mass';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport { Spacer } from '@undp/design-system-react/Spacer';\r\nimport { Separator } from '@undp/design-system-react/Separator';\r\n\r\nimport {\r\n AnimateDataType,\r\n ClassNameObject,\r\n CustomLayerDataType,\r\n HybridMapDataType,\r\n MapProjectionTypes,\r\n StyleObject,\r\n ZoomInteractionTypes,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { X } from '@/Components/Icons';\r\nimport { checkIfNullOrUndefined, numberFormattingFunction } from '@/Utils';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n data: HybridMapDataType[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData: any;\r\n colorDomain: (string | number)[];\r\n width: number;\r\n height: number;\r\n scale: number;\r\n centerPoint?: [number, number];\r\n colors: string[];\r\n mapColorLegendTitle?: string;\r\n categorical: boolean;\r\n radius: number;\r\n mapBorderWidth: number;\r\n mapNoDataColor: string;\r\n showLabels: boolean;\r\n mapBorderColor: string;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n isWorldMap: boolean;\r\n showColorScale: boolean;\r\n zoomScaleExtend: [number, number];\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n highlightedDataPoints: (string | number)[];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n resetSelectionOnDoubleClick: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n zoomInteraction: ZoomInteractionTypes;\r\n mapProjection: MapProjectionTypes;\r\n animate: AnimateDataType;\r\n dimmedOpacity: number;\r\n customLayers: CustomLayerDataType[];\r\n maxRadiusValue: number;\r\n collapseColorScaleByDefault?: boolean;\r\n dotColor: string;\r\n highlightedIds: string[];\r\n mapProperty: string;\r\n dotLegendTitle?: string;\r\n dotBorderColor?: string;\r\n labelColor: string;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const {\r\n data,\r\n colors,\r\n mapData,\r\n mapColorLegendTitle,\r\n colorDomain,\r\n radius,\r\n height,\r\n width,\r\n scale,\r\n centerPoint,\r\n tooltip,\r\n showLabels,\r\n mapBorderWidth,\r\n mapBorderColor,\r\n mapNoDataColor,\r\n onSeriesMouseOver,\r\n showColorScale,\r\n zoomScaleExtend,\r\n zoomTranslateExtend,\r\n highlightedDataPoints,\r\n onSeriesMouseClick,\r\n resetSelectionOnDoubleClick,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction,\r\n animate,\r\n dimmedOpacity,\r\n customLayers,\r\n maxRadiusValue,\r\n categorical,\r\n dotColor,\r\n collapseColorScaleByDefault,\r\n highlightedIds,\r\n mapProperty,\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor,\r\n } = props;\r\n const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const zoomRef = useRef<ZoomBehavior<SVGSVGElement, unknown> | null>(null);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n const mapSvg = useRef<SVGSVGElement>(null);\r\n const isInView = useInView(mapSvg, {\r\n once: animate.once,\r\n amount: animate.amount,\r\n });\r\n const mapG = useRef<SVGGElement>(null);\r\n const radiusScale =\r\n data.filter(d => d.radius === undefined || d.radius === null).length !== data.length\r\n ? scaleSqrt().domain([0, maxRadiusValue]).range([0.25, radius]).nice()\r\n : undefined;\r\n\r\n const colorScale = categorical\r\n ? scaleOrdinal<number | string, string>().domain(colorDomain).range(colors)\r\n : scaleThreshold<number, string>()\r\n .domain(colorDomain as number[])\r\n .range(colors);\r\n useEffect(() => {\r\n const mapGSelect = select(mapG.current);\r\n const mapSvgSelect = select(mapSvg.current);\r\n const zoomFilter = (e: D3ZoomEvent<SVGSVGElement, unknown>['sourceEvent']) => {\r\n if (zoomInteraction === 'noZoom') return false;\r\n if (zoomInteraction === 'button') return !e.type.includes('wheel');\r\n const isWheel = e.type === 'wheel';\r\n const isTouch = e.type.startsWith('touch');\r\n const isDrag = e.type === 'mousedown' || e.type === 'mousemove';\r\n\r\n if (isTouch) return true;\r\n if (isWheel) {\r\n if (zoomInteraction === 'scroll') return true;\r\n return e.ctrlKey;\r\n }\r\n return isDrag && !e.button && !e.ctrlKey;\r\n };\r\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\r\n .scaleExtent(zoomScaleExtend)\r\n .translateExtent(\r\n zoomTranslateExtend || [\r\n [-20, -20],\r\n [width + 20, height + 20],\r\n ],\r\n )\r\n .filter(zoomFilter)\r\n .on('zoom', ({ transform }) => {\r\n mapGSelect.attr('transform', transform);\r\n });\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapSvgSelect.call(zoomBehavior as any);\r\n\r\n zoomRef.current = zoomBehavior;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [height, width, zoomInteraction]);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const bounds = bbox(mapData as any);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const center = centerOfMass(mapData as any);\r\n const lonDiff = bounds[2] - bounds[0];\r\n const latDiff = bounds[3] - bounds[1];\r\n const scaleX = (((width * 190) / 960) * 360) / lonDiff;\r\n const scaleY = (((height * 190) / 678) * 180) / latDiff;\r\n const scaleVar = scale * Math.min(scaleX, scaleY);\r\n\r\n const projection =\r\n mapProjection === 'mercator'\r\n ? geoMercator()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'equalEarth'\r\n ? geoEqualEarth()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'naturalEarth'\r\n ? geoNaturalEarth1()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : mapProjection === 'orthographic'\r\n ? geoOrthographic()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar)\r\n : geoAlbersUsa()\r\n .rotate([0, 0])\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n\r\n const handleZoom = (direction: 'in' | 'out') => {\r\n if (!mapSvg.current || !zoomRef.current) return;\r\n const svg = select(mapSvg.current);\r\n svg.call(zoomRef.current.scaleBy, direction === 'in' ? 1.2 : 1 / 1.2);\r\n };\r\n\r\n return (\r\n <>\r\n <div className='relative'>\r\n <motion.svg\r\n width={`${width}px`}\r\n height={`${height}px`}\r\n viewBox={`0 0 ${width} ${height}`}\r\n ref={mapSvg}\r\n direction='ltr'\r\n >\r\n <g ref={mapG}>\r\n {customLayers.filter(d => d.position === 'before').map(d => d.layer)}\r\n {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData.features.map((d: any, i: number) => {\r\n const index = data.findIndex(el => el.id === d.properties[mapProperty]);\r\n if (index !== -1) return null;\r\n return (\r\n <g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n {d.geometry.type === 'MultiPolygon'\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={masterPath}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })\r\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n d.geometry.coordinates.map((el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <path\r\n key={j}\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n }}\r\n />\r\n );\r\n })}\r\n </g>\r\n );\r\n })\r\n }\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = mapData.features.findIndex(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => d.id === el.properties[mapProperty],\r\n );\r\n const color = !checkIfNullOrUndefined(d.x)\r\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n colorScale(d.x as any)\r\n : mapNoDataColor;\r\n return (\r\n <motion.g\r\n key={d.id}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: selectedColor\r\n ? selectedColor === color\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds.length !== 0\r\n ? highlightedIds.indexOf(d.id as string) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n >\r\n {index === -1\r\n ? null\r\n : mapData.features[index].geometry.type === 'MultiPolygon'\r\n ? mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: any) => {\r\n let masterPath = '';\r\n el.forEach((geo: number[][]) => {\r\n let path = ' M';\r\n geo.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== geo.length - 1)\r\n path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n masterPath += path;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={masterPath}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )\r\n : mapData.features[index].geometry.coordinates.map(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any, j: number) => {\r\n let path = 'M';\r\n el.forEach((c: number[], k: number) => {\r\n const point = projection([c[0], c[1]]) as [number, number];\r\n if (k !== el.length - 1) path = `${path}${point[0]} ${point[1]}L`;\r\n else path = `${path}${point[0]} ${point[1]}`;\r\n });\r\n return (\r\n <motion.path\r\n key={`${d.id}-${j}`}\r\n d={path}\r\n variants={{\r\n initial: { fill: color, opacity: 0 },\r\n whileInView: {\r\n fill: color,\r\n opacity: 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{\r\n opacity: 0,\r\n transition: { duration: animate.duration },\r\n }}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n }}\r\n />\r\n );\r\n },\r\n )}\r\n </motion.g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n return (\r\n <motion.g\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity:\r\n highlightedDataPoints.length !== 0\r\n ? highlightedDataPoints.indexOf(d.label || '') !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n onMouseEnter={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n onSeriesMouseOver?.(d);\r\n }}\r\n onMouseMove={event => {\r\n setMouseOverData(d);\r\n setEventY(event.clientY);\r\n setEventX(event.clientX);\r\n }}\r\n onMouseLeave={() => {\r\n setMouseOverData(undefined);\r\n setEventX(undefined);\r\n setEventY(undefined);\r\n onSeriesMouseOver?.(undefined);\r\n }}\r\n onClick={() => {\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(d);\r\n onSeriesMouseClick?.(d);\r\n }\r\n }\r\n }}\r\n transform={`translate(${\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0]\r\n },${(projection([d.long as number, d.lat as number]) as [number, number])[1]})`}\r\n >\r\n <motion.circle\r\n cx={0}\r\n cy={0}\r\n variants={{\r\n initial: {\r\n r: 0,\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n },\r\n whileInView: {\r\n r: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n fill: dotColor,\r\n stroke: dotBorderColor || dotColor,\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ r: 0, transition: { duration: animate.duration } }}\r\n style={{\r\n fillOpacity: 0.8,\r\n }}\r\n />\r\n {showLabels && d.label ? (\r\n <motion.text\r\n variants={{\r\n initial: {\r\n opacity: 0,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x: !radiusScale ? radius : radiusScale(d.radius || 0),\r\n transition: { duration: animate.duration },\r\n },\r\n }}\r\n initial='initial'\r\n animate={isInView ? 'whileInView' : 'initial'}\r\n exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n y={0}\r\n className={cn('text-sm', classNames?.graphObjectValues)}\r\n style={{\r\n textAnchor: 'start',\r\n fill: labelColor || '#000',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={4}\r\n dy={5}\r\n >\r\n {d.label}\r\n </motion.text>\r\n ) : null}\r\n </motion.g>\r\n );\r\n })}\r\n </AnimatePresence>\r\n {customLayers.filter(d => d.position === 'after').map(d => d.layer)}\r\n </g>\r\n </motion.svg>\r\n {showColorScale === false ? null : (\r\n <div className={cn('absolute left-4 bottom-4 map-color-legend', classNames?.colorLegend)}>\r\n {showLegend ? (\r\n <>\r\n <div\r\n 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]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n style={{\r\n width: categorical ? undefined : '340px',\r\n }}\r\n >\r\n {dotLegendTitle && dotLegendTitle !== '' ? (\r\n <>\r\n <div className='flex items-center gap-2'>\r\n <div\r\n className='w-3 h-3 rounded-full'\r\n style={{ backgroundColor: dotColor }}\r\n />\r\n <P\r\n size='xs'\r\n marginBottom='none'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {dotLegendTitle}\r\n </P>\r\n </div>\r\n <Spacer size='xl' />\r\n <Separator />\r\n <Spacer size='xl' />\r\n </>\r\n ) : null}\r\n {mapColorLegendTitle && mapColorLegendTitle !== '' ? (\r\n <P\r\n size='xs'\r\n marginBottom='xs'\r\n className='p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300'\r\n style={{\r\n display: '-webkit-box',\r\n WebkitLineClamp: '1',\r\n WebkitBoxOrient: 'vertical',\r\n }}\r\n >\r\n {mapColorLegendTitle}\r\n </P>\r\n ) : null}\r\n {!categorical ? (\r\n <svg width='100%' viewBox='0 0 320 30' direction='ltr'>\r\n <g>\r\n {colorDomain.map((d, i) => (\r\n <g\r\n key={i}\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n className='cursor-pointer'\r\n >\r\n <rect\r\n x={(i * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={\r\n selectedColor === colors[i]\r\n ? 'stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }\r\n style={{\r\n fill: colors[i],\r\n ...(selectedColor === colors[i] ? {} : { stroke: colors[i] }),\r\n }}\r\n />\r\n <text\r\n x={((i + 1) * 320) / colors.length}\r\n y={25}\r\n className='fill-primary-gray-700 dark:fill-primary-gray-300 text-xs'\r\n style={{ textAnchor: 'middle' }}\r\n >\r\n {numberFormattingFunction(d as number, 'NA')}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\r\n onMouseOver={() => {\r\n setSelectedColor(colors[colorDomain.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n x={(colorDomain.length * 320) / colors.length + 1}\r\n y={1}\r\n width={320 / colors.length - 2}\r\n height={8}\r\n className={`cursor-pointer ${\r\n selectedColor === colors[colorDomain.length]\r\n ? 'stroke-1 stroke-primary-gray-700 dark:stroke-primary-gray-300'\r\n : ''\r\n }`}\r\n style={{\r\n fill: colors[colorDomain.length],\r\n ...(selectedColor === colors[colorDomain.length]\r\n ? {}\r\n : { stroke: colors[colorDomain.length] }),\r\n }}\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n ) : (\r\n <div className='flex flex-col gap-3'>\r\n {colorDomain.map((d, i) => (\r\n <div\r\n key={i}\r\n className='flex gap-2 items-center'\r\n onMouseOver={() => {\r\n setSelectedColor(colors[i % colors.length]);\r\n }}\r\n onMouseLeave={() => {\r\n setSelectedColor(undefined);\r\n }}\r\n >\r\n <div\r\n className='w-2 h-2 rounded-full'\r\n style={{ backgroundColor: colors[i % colors.length] }}\r\n />\r\n <P size='sm' marginBottom='none' leading='none'>\r\n {d}\r\n </P>\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n )}\r\n {zoomInteraction === 'button' && (\r\n <div className='absolute left-4 top-4 flex flex-col zoom-buttons'>\r\n <button\r\n onClick={() => handleZoom('in')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border border-primary-gray-400 bg-primary-gray-200 dark:border-primary-gray-550 dark:bg-primary-gray-600 dark:text-primary-gray-100'\r\n >\r\n +\r\n </button>\r\n <button\r\n onClick={() => handleZoom('out')}\r\n className='leading-0 px-2 py-3.5 text-primary-gray-700 border 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'\r\n >\r\n –\r\n </button>\r\n </div>\r\n )}\r\n </div>\r\n {detailsOnClick && mouseClickData !== undefined ? (\r\n <DetailsModal\r\n body={detailsOnClick}\r\n data={mouseClickData}\r\n setData={setMouseClickData}\r\n className={classNames?.modal}\r\n />\r\n ) : null}\r\n {mouseOverData && tooltip && eventX && eventY ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={eventX}\r\n yPos={eventY}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n","import { useState, useRef, useEffect, useEffectEvent, useMemo } from 'react';\r\nimport { format } from 'date-fns/format';\r\nimport { parse } from 'date-fns/parse';\r\nimport { SliderUI } from '@undp/design-system-react/SliderUI';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\n\r\nimport { Graph } from './Graph';\r\n\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport {\r\n HybridMapDataType,\r\n Languages,\r\n SourcesDataType,\r\n StyleObject,\r\n ClassNameObject,\r\n ZoomInteractionTypes,\r\n MapProjectionTypes,\r\n CustomLayerDataType,\r\n AnimateDataType,\r\n TimelineDataType,\r\n ScaleDataType,\r\n} from '@/Types';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { Pause, Play } from '@/Components/Icons';\r\nimport { getSliderMarks } from '@/Utils/getSliderMarks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { getJenks, getUniqValue } from '@/Utils';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects for dot density map*/\r\n data: HybridMapDataType[];\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Color or array of colors for the circle */\r\n colors?: string[];\r\n /** Domain of colors for the graph for the choropleth map */\r\n colorDomain?: number[] | string[];\r\n /** Title for the legend for the dot density scale */\r\n dotLegendTitle?: string;\r\n /** Title for the color legend for the color scale */\r\n mapColorLegendTitle?: string;\r\n /** Color for the areas where data is no available */\r\n mapNoDataColor?: string;\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** Maximum radius of the circle */\r\n radius?: number;\r\n /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Scaling factor for the map. Multiplies the scale number to scale. */\r\n scale?: number;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines the zoom mode for the map */\r\n zoomInteraction?: ZoomInteractionTypes;\r\n /** Stroke width of the regions in the map */\r\n mapBorderWidth?: number;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Color of the dots in the dot density map */\r\n dotColor?: string;\r\n /** Border color of the dots in the dot density map */\r\n dotBorderColor?: string;\r\n /** Color of the labels */\r\n labelColor?: string;\r\n /** Toggle if the map is a world map */\r\n isWorldMap?: boolean;\r\n /** Scale for the colors of the choropleth map */\r\n choroplethScaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Map projection type */\r\n mapProjection?: MapProjectionTypes;\r\n /** Extend of the allowed zoom in the map */\r\n zoomScaleExtend?: [number, number];\r\n /** Extend of the allowed panning in the map */\r\n zoomTranslateExtend?: [[number, number], [number, number]];\r\n /** Toggle visibility of labels */\r\n showLabels?: boolean;\r\n /** Maximum value mapped to the radius chart */\r\n maxRadiusValue?: number;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Data points to highlight. Use the label value from data to highlight the data point */\r\n highlightedDataPoints?: (string | number)[];\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\r\n /** Toggles if the graph animates in when loaded. */\r\n animate?: boolean | AnimateDataType;\r\n /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n showColorScale?: boolean;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** Toggles the visibility of Antarctica in the default map. Only applicable for the default map. */\r\n showAntarctica?: boolean;\r\n /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n customLayers?: CustomLayerDataType[];\r\n /** Property in the property object in mapData geoJson object is used to match to the id in the data object */\r\n mapProperty?: string;\r\n /** Configures playback and slider controls for animating the chart over time. The data must have a key date for it to work properly. */\r\n timeline?: TimelineDataType;\r\n /** Enable graph download option as png */\r\n graphDownload?: boolean;\r\n /** Enable data download option as a csv */\r\n dataDownload?: boolean;\r\n /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n resetSelectionOnDoubleClick?: boolean;\r\n\r\n // Interactions and Callbacks\r\n /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n /** Callback for mouse over event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseOver?: (_d: any) => void;\r\n /** Callback for mouse click event */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onSeriesMouseClick?: (_d: any) => void;\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\nexport function HybridMap(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap.json',\r\n graphTitle,\r\n colors,\r\n sources,\r\n graphDescription,\r\n height,\r\n width,\r\n footNote = '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.',\r\n mapColorLegendTitle,\r\n colorDomain,\r\n choroplethScaleType = 'threshold',\r\n radius = 5,\r\n scale = 0.95,\r\n centerPoint,\r\n padding,\r\n mapBorderWidth = 0.5,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n showLabels = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n tooltip,\r\n relativeHeight,\r\n onSeriesMouseOver,\r\n isWorldMap = true,\r\n showColorScale = true,\r\n zoomScaleExtend = [0.8, 6],\r\n zoomTranslateExtend,\r\n graphID,\r\n highlightedDataPoints = [],\r\n onSeriesMouseClick,\r\n graphDownload = false,\r\n dataDownload = false,\r\n showAntarctica = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n styles,\r\n classNames,\r\n mapProjection,\r\n zoomInteraction = 'button',\r\n animate = false,\r\n dimmedOpacity = 0.3,\r\n customLayers = [],\r\n maxRadiusValue,\r\n timeline = { enabled: false, autoplay: false, showOnlyActiveDate: true },\r\n collapseColorScaleByDefault,\r\n dotColor = Colors.primaryColors['blue-600'],\r\n highlightedIds = [],\r\n mapProperty = 'ISO3',\r\n dotLegendTitle,\r\n dotBorderColor,\r\n labelColor = Colors.primaryColors['blue-600'],\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [play, setPlay] = useState(timeline.autoplay);\r\n const uniqDatesSorted = useMemo(() => {\r\n const dates = [\r\n ...new Set(\r\n data\r\n .filter(d => d.date)\r\n .map(d => parse(`${d.date}`, timeline.dateFormat || 'yyyy', new Date()).getTime()),\r\n ),\r\n ];\r\n dates.sort((a, b) => a - b);\r\n return dates;\r\n }, [data, timeline.dateFormat]);\r\n const [index, setIndex] = useState(timeline.autoplay ? 0 : uniqDatesSorted.length - 1);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n const domain =\r\n colorDomain ||\r\n (choroplethScaleType === 'categorical'\r\n ? getUniqValue(data, 'x')\r\n : getJenks(\r\n data.map(d => d.x as number | null | undefined),\r\n colors?.length || 4,\r\n ));\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n onUpdateShape(d);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(\r\n () => {\r\n setIndex(i => (i < uniqDatesSorted.length - 1 ? i + 1 : 0));\r\n },\r\n (timeline.speed || 2) * 1000,\r\n );\r\n if (!play) clearInterval(interval);\r\n return () => clearInterval(interval);\r\n }, [uniqDatesSorted, play, timeline.speed]);\r\n\r\n const markObj = getSliderMarks(\r\n uniqDatesSorted,\r\n index,\r\n timeline.showOnlyActiveDate,\r\n timeline.dateFormat || 'yyyy',\r\n );\r\n return (\r\n <GraphContainer\r\n className={classNames?.graphContainer}\r\n style={styles?.graphContainer}\r\n id={graphID}\r\n ref={graphParentDiv}\r\n aria-label={ariaLabel}\r\n backgroundColor={backgroundColor}\r\n theme={theme}\r\n language={language}\r\n minHeight={minHeight}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n padding={padding}\r\n >\r\n {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n graphDownload={graphDownload ? graphParentDiv : undefined}\r\n dataDownload={\r\n dataDownload\r\n ? data.map(d => d.data).filter(d => d !== undefined).length > 0\r\n ? data.map(d => d.data).filter(d => d !== undefined)\r\n : data.filter(d => d !== undefined)\r\n : null\r\n }\r\n />\r\n ) : null}\r\n {timeline.enabled && uniqDatesSorted.length > 0 && markObj ? (\r\n <div className='flex gap-6 items-center' dir='ltr'>\r\n <button\r\n type='button'\r\n onClick={() => {\r\n setPlay(!play);\r\n }}\r\n className='p-0 border-0 cursor-pointer bg-transparent'\r\n aria-label={play ? 'Click to pause animation' : 'Click to play animation'}\r\n >\r\n {play ? <Pause /> : <Play />}\r\n </button>\r\n <SliderUI\r\n min={uniqDatesSorted[0]}\r\n max={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n marks={markObj}\r\n step={null}\r\n defaultValue={uniqDatesSorted[uniqDatesSorted.length - 1]}\r\n value={uniqDatesSorted[index]}\r\n onChangeComplete={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n onChange={nextValue => {\r\n setIndex(uniqDatesSorted.indexOf(nextValue as number));\r\n }}\r\n aria-label='Time slider. Use arrow keys to adjust selected time period.'\r\n />\r\n </div>\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n dotColor={dotColor}\r\n data={data.filter(d =>\r\n timeline.enabled\r\n ? d.date === format(new Date(uniqDatesSorted[index]), timeline.dateFormat || 'yyyy')\r\n : d,\r\n )}\r\n mapData={\r\n showAntarctica\r\n ? mapShape\r\n : {\r\n ...mapShape,\r\n features: mapShape.features.filter(\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n (el: any) => el.properties.NAME !== 'Antarctica',\r\n ),\r\n }\r\n }\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n scale={scale}\r\n centerPoint={centerPoint}\r\n colors={\r\n colors ||\r\n (choroplethScaleType === 'categorical'\r\n ? Colors[theme].sequentialColors[\r\n `neutralColorsx0${domain.length as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ]\r\n : Colors[theme].sequentialColors[\r\n `neutralColorsx0${(domain.length + 1) as 4 | 5 | 6 | 7 | 8 | 9}`\r\n ])\r\n }\r\n mapColorLegendTitle={mapColorLegendTitle}\r\n radius={radius}\r\n categorical={choroplethScaleType === 'categorical'}\r\n mapBorderWidth={mapBorderWidth}\r\n mapNoDataColor={mapNoDataColor}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n showLabels={showLabels}\r\n isWorldMap={isWorldMap}\r\n showColorScale={showColorScale}\r\n zoomScaleExtend={zoomScaleExtend}\r\n zoomTranslateExtend={zoomTranslateExtend}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n highlightedDataPoints={highlightedDataPoints}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n styles={styles}\r\n classNames={classNames}\r\n zoomInteraction={zoomInteraction}\r\n detailsOnClick={detailsOnClick}\r\n mapProjection={mapProjection || (isWorldMap ? 'naturalEarth' : 'mercator')}\r\n animate={\r\n animate === true\r\n ? { duration: 0.5, once: true, amount: 0.5 }\r\n : animate || { duration: 0, once: true, amount: 0 }\r\n }\r\n dimmedOpacity={dimmedOpacity}\r\n customLayers={customLayers}\r\n maxRadiusValue={\r\n !checkIfNullOrUndefined(maxRadiusValue)\r\n ? (maxRadiusValue as number)\r\n : Math.max(...data.map(d => d.radius).filter(d => d !== undefined && d !== null))\r\n }\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n highlightedIds={highlightedIds}\r\n mapProperty={mapProperty}\r\n dotLegendTitle={dotLegendTitle}\r\n dotBorderColor={dotBorderColor}\r\n labelColor={labelColor}\r\n />\r\n ) : (\r\n <div\r\n style={{\r\n height: `${Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n )}px`,\r\n }}\r\n className='flex items-center justify-center'\r\n >\r\n <Spinner aria-label='Loading graph' />\r\n </div>\r\n )}\r\n </GraphArea>\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </GraphContainer>\r\n );\r\n}\r\n"],"names":["h","f","E","y","R","i","s","r","a","o","t","P","m","v","x","u","T","g","N","e","l","c","d","n","O","p","Graph","props","data","colors","mapData","mapColorLegendTitle","colorDomain","radius","height","width","scale","centerPoint","tooltip","showLabels","mapBorderWidth","mapBorderColor","mapNoDataColor","onSeriesMouseOver","showColorScale","zoomScaleExtend","zoomTranslateExtend","highlightedDataPoints","onSeriesMouseClick","resetSelectionOnDoubleClick","detailsOnClick","styles","classNames","mapProjection","zoomInteraction","animate","dimmedOpacity","customLayers","maxRadiusValue","categorical","dotColor","collapseColorScaleByDefault","highlightedIds","mapProperty","dotLegendTitle","dotBorderColor","labelColor","selectedColor","setSelectedColor","useState","undefined","showLegend","setShowLegend","zoomRef","useRef","mouseClickData","setMouseClickData","mouseOverData","setMouseOverData","eventX","setEventX","eventY","setEventY","mapSvg","isInView","useInView","once","amount","mapG","radiusScale","filter","length","scaleSqrt","domain","range","nice","colorScale","scaleOrdinal","scaleThreshold","useEffect","mapGSelect","select","current","mapSvgSelect","zoomFilter","type","includes","isWheel","isTouch","startsWith","isDrag","ctrlKey","button","zoomBehavior","zoom","scaleExtent","translateExtent","on","transform","attr","call","bounds","bbox","center","centerOfMass","lonDiff","latDiff","scaleX","scaleY","scaleVar","Math","min","projection","geoMercator","rotate","geometry","coordinates","translate","geoEqualEarth","geoNaturalEarth1","geoOrthographic","geoAlbersUsa","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","findIndex","el","id","properties","indexOf","j","masterPath","forEach","geo","path","k","point","stroke","strokeWidth","fill","AnimatePresence","index","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","lat","long","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","DetailsModal","modal","Tooltip","HybridMap","$","_c","t0","graphTitle","sources","graphDescription","footNote","t1","choroplethScaleType","t2","t3","t4","padding","t5","t6","t7","t8","t9","relativeHeight","isWorldMap","t10","t11","t12","graphID","t13","graphDownload","t14","dataDownload","t15","showAntarctica","t16","language","t17","minHeight","t18","theme","t19","ariaLabel","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","Colors","light","graphNoData","grays","t30","t31","t32","t33","enabled","autoplay","showOnlyActiveDate","primaryColors","t34","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t35","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t36","t37","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t38","shape","onUpdateShape","useEffectEvent","t39","fetchAndParseJSON","then","d_2","t40","t41","t42","speed","interval","setInterval","clearInterval","t43","t44","getSliderMarks","markObj","t45","graphContainer","t46","t47","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t48","Pause","Play","SliderUI","nextValue","nextValue_0","t49","GraphArea","d_8","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t50","footnote","source","GraphFooter","t51","GraphContainer","d_10","d_9","NAME","d_5","d_4","d_3","d_7","d_6","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,M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SAAAqU,GAAAU,GAAA;AAAA,SAyQqC/U,EAACW;AAAO;AAzQ7C,SAAAuT,GAAA7L,GAAA;AAAA,SAuN4BA,EAAEE,WAAWyM,SAAU;AAAY;AAvN/D,SAAAzB,GAAA0B,GAAA;AAAA,SAqK4BjV,MAAMgD;AAAS;AArK3C,SAAAsQ,GAAA4B,GAAA;AAAA,SAoK6ClV,MAAMgD;AAAS;AApK5D,SAAAqQ,GAAA8B,GAAA;AAAA,SAoKyBnV,EAACM;AAAK;AApK/B,SAAA8S,GAAAgC,GAAA;AAAA,SAmK2CpV,MAAMgD;AAAS;AAnK1D,SAAAmQ,GAAAkC,GAAA;AAAA,SAmKuBrV,EAACM;AAAK;AAnK7B,SAAAsQ,GAAA0E,GAAA;AAAA,SAsFiBtV,EAACR;AAA+B;AAtFjD,SAAA2Q,GAAAjR,GAAAqW,GAAA;AAAA,SAuEkBrW,IAAIqW;AAAC;AAvEvB,SAAAtF,GAAAjQ,GAAA;AAAA,SAmEgBA,EAAC6P;AAAK;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CHPV5EwG-6v2a2njQ.cjs"),g=require("./index-C6er0ety.cjs"),p=require("./imageDownload-61q6jyJW.cjs");function f(y){const e=d.compilerRuntimeExports.c(10),{nodeID:t,filename:m,buttonContent:i,buttonType:c,buttonSmall:b,className:u}=y,a=m===void 0?"image":m,l=c===void 0?"tertiary":c,s=`undp-viz-download-button ${b?"p-2":"py-4 px-6"} ${u===void 0?"":u} border border-primary-gray-400 dark:border-primary-gray-550`;let o;e[0]!==a||e[1]!==t?(o=()=>{typeof t=="string"?document.getElementById(t)?p.imageDownload(document.getElementById(t),a):console.error("Cannot find the html element"):p.imageDownload(t.current,a)},e[0]=a,e[1]=t,e[2]=o):o=e[2];let n;e[3]!==i?(n=i||d.jsxRuntimeExports.jsx(g.ImageDown,{}),e[3]=i,e[4]=n):n=e[4];let r;return e[5]!==l||e[6]!==s||e[7]!==o||e[8]!==n?(r=d.jsxRuntimeExports.jsx(g.x,{variant:l,className:s,onClick:o,"aria-label":"Click to download the graph as image",children:n}),e[5]=l,e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}exports.ImageDownloadButton=f;
|
|
2
2
|
//# sourceMappingURL=ImageDownloadButton.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as y, j as p } from "./index-CHPV5EwG-
|
|
2
|
-
import { I as b, x } from "./index-
|
|
3
|
-
import { i as u } from "./imageDownload-
|
|
1
|
+
import { c as y, j as p } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
|
+
import { I as b, x } from "./index-BQYOuXdl.js";
|
|
3
|
+
import { i as u } from "./imageDownload-Diofs_vY.js";
|
|
4
4
|
function j(f) {
|
|
5
5
|
const e = y.c(10), {
|
|
6
6
|
nodeID: t,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-CTPQjnHt.cjs"),C=require("react"),R=require("./parse-hMnG_lRV.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-uUdw6wJL.cjs"),G=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-CMF5g-C3.cjs"),Fe=require("./AxisTitle-sS5bLLR7.cjs"),We=require("./Axis-DxRV2yMi.cjs"),He=require("./ReferenceLine-BH0qdf4R.cjs"),Ge=require("./RegressionLine-BOTTNSrr.cjs"),Pe=require("./YTicksAndGridLines-4pxTRlRK.cjs"),Ye=require("./index-B_sAFsEV.cjs"),Ue=require("./time-CZd5YLSP.cjs"),Xe=require("./linear-BwPAspcq.cjs"),Ae=require("./line-DaEMhXmx.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-C1gxfNGD.cjs"),ze=require("./select-Bnfk0lJx.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-QcfiW0w3.cjs"),A=require("./proxy-BxvUI_9l.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),Le=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-gLDRXBHm.cjs"),De=require("./GraphContainer-d8A46BK2.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:h,width:_,height:Ft,lineColor:b,suffix:S,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Wt,noOfXTicks:he,rightMargin:Ht,leftMargin:D,topMargin:Gt,bottomMargin:dt,tooltip:tt,onSeriesMouseOver:Pt,refValues:ie,minValue:ne,maxValue:ht,animate:o,rtl:ft,strokeWidth:et,showDots:oe,annotations:se,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ae,showIntervalValues:fe,intervalLineStrokeWidth:Yt,intervalLineColors:E,intervalAreaColor:Ut,intervalAreaOpacity:Xt,yAxisTitle:vt,noOfYTicks:ye,minDate:re,maxDate:le,curveType:jt,styles:y,classNames:g,precision:q,customLayers:P}=n,wt=C.useRef(null);let Y;t[0]!==o.amount||t[1]!==o.once?(Y={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Y):Y=t[2];const c=Qe.useInView(wt,Y),[p,ce]=C.useState(!1);let Rt,it;t[3]!==o.duration||t[4]!==p||t[5]!==c?(Rt=()=>{if(c&&!p){const e=setTimeout(()=>{ce(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},it=[c,p,o.duration],t[3]=o.duration,t[4]=p,t[5]=c,t[6]=Rt,t[7]=it):(Rt=t[6],it=t[7]),C.useEffect(Rt,it);const nt=jt==="linear"?Ae.curveLinear:jt==="step"?be.curveStep:jt==="stepAfter"?be.stepAfter:jt==="stepBefore"?be.stepBefore:be.monotoneX,[L,Et]=C.useState(void 0),[U,ue]=C.useState(void 0),[m,x]=C.useState(void 0),Bt=vt?D+30:D;let X;t[8]!==dt||t[9]!==Ht||t[10]!==Bt||t[11]!==Gt?(X={top:Gt,bottom:dt,left:Bt,right:Ht},t[8]=dt,t[9]=Ht,t[10]=Bt,t[11]=Gt,t[12]=X):X=t[12];const j=X,ot=C.useRef(null);let st;t[13]!==l?(st=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:G.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:G.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=st):st=t[14];const a=Te.orderBy(h.filter(yi).map(st),["date"],["asc"]);let at;if(t[15]!==l||t[16]!==f){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:R.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:R.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],at=f.map(e),t[15]=l,t[16]=f,t[17]=at}else at=t[17];const Ct=at;let rt;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((Z,ee)=>ee%2===0?R.parse(`${Z}`,l,new Date):Z)}),t[23]=l,t[24]=e):e=t[24],rt=yt.map(e),t[20]=yt,t[21]=l,t[22]=rt}else rt=t[22];const xe=rt,u=_-j.left-j.right,v=Ft-j.top-j.bottom,zt=re?R.parse(`${re}`,l,new Date):a[0].date,me=le?R.parse(`${le}`,l,new Date):a[a.length-1].date,w=G.checkIfNullOrUndefined(ne)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:ne,B=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([zt,me]).range([0,u]);let lt;t[25]!==B||t[26]!==ht?(lt=G.checkIfNullOrUndefined(ht)?B>0?B:0:ht,t[25]=B,t[26]=ht,t[27]=lt):lt=t[27];const r=Xe.linear().domain([w,lt]).range([v,0]).nice(),Jt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(nt),Mt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(nt),Kt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(nt),Qt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(nt),Zt=r.ticks(ye),_t=s.ticks(he);C.useEffect(()=>{const e=Z=>{const ee=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(Z)[0]),0)];Et(ee||a[a.length-1]),Pt?.(ee||a[a.length-1]),x(Z.clientY),ue(Z.clientX)},d=()=>{Et(void 0),ue(void 0),x(void 0),Pt?.(void 0)};ze.select(ot.current).on("mousemove",e).on("mouseout",d)},[s,a,Pt]);const te=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Ot=Se.linearRegressionLine(te);let O;t[28]!==o||t[29]!==v||t[30]!==u||t[31]!==Ct||t[32]!==c||t[33]!==s?(O=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:Ct,width:u,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=u,t[31]=Ct,t[32]=c,t[33]=s,t[34]=O):O=t[34];const At=y?.yAxis?.gridLines,bt=y?.yAxis?.labels;let ct;t[35]!==At||t[36]!==bt?(ct={gridLines:At,labels:bt},t[35]=At,t[36]=bt,t[37]=ct):ct=t[37];const ut=g?.yAxis?.gridLines,Lt=g?.yAxis?.labels;let z;t[38]!==ut||t[39]!==Lt?(z={gridLines:ut,labels:Lt},t[38]=ut,t[39]=Lt,t[40]=z):z=t[40];const kt=r(w<0?0:w),It=r(w<0?0:w),Vt=0-D,Nt=u+j.right,St=w<0?0:w;let k;t[41]!==q||t[42]!==M||t[43]!==S||t[44]!==St?(k=Oe.numberFormattingFunction(St,"NA",q,M,S),t[41]=q,t[42]=M,t[43]=S,t[44]=St,t[45]=k):k=t[45];const Dt=0-D,J=r(w<0?0:w),pe=B<0?"1em":-5;let I;t[46]!==Dt||t[47]!==J||t[48]!==pe?(I={x:Dt,y:J,dx:0,dy:pe},t[46]=Dt,t[47]=J,t[48]=pe,t[49]=I):I=t[49];const de=g?.xAxis?.axis,qt=g?.yAxis?.labels;let K;t[50]!==de||t[51]!==qt?(K={axis:de,label:qt},t[50]=de,t[51]=qt,t[52]=K):K=t[52];const xt=y?.xAxis?.axis,mt=y?.yAxis?.labels;let T;t[53]!==xt||t[54]!==mt?(T={axis:xt,label:mt},t[53]=xt,t[54]=mt,t[55]=T):T=t[55];let pt;t[56]!==kt||t[57]!==It||t[58]!==Vt||t[59]!==Nt||t[60]!==k||t[61]!==I||t[62]!==K||t[63]!==T?(pt=i.jsxRuntimeExports.jsx(We.Axis,{y1:kt,y2:It,x1:Vt,x2:Nt,label:k,labelPos:I,classNames:K,styles:T}),t[56]=kt,t[57]=It,t[58]=Vt,t[59]=Nt,t[60]=k,t[61]=I,t[62]=K,t[63]=T,t[64]=pt):pt=t[64];const $=0-D+15,F=v/2,W=y?.yAxis?.title,H=g?.yAxis?.title;let V;t[65]!==$||t[66]!==F||t[67]!==W||t[68]!==H||t[69]!==vt?(V=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:$,y:F,style:W,className:H,text:vt,rotate90:!0}),t[65]=$,t[66]=F,t[67]=W,t[68]=H,t[69]=vt,t[70]=V):V=t[70];let N;t[71]!==P?(N=P.filter(ri).map(ai),t[71]=P,t[72]=N):N=t[72];let Q;t[73]!==Ut?(Q={fill:Ut},t[73]=Ut,t[74]=Q):Q=t[74];let Tt;t[75]!==o.duration?(Tt={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=Tt):Tt=t[76];let $t;t[77]!==b||t[78]!==et?($t={stroke:b,fill:"none",strokeWidth:et},t[77]=b,t[78]=et,t[79]=$t):$t=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const ke=a.map((e,d)=>i.jsxRuntimeExports.jsx(A.motion.g,{children:G.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe?i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ae?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:E[1],transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Wt?i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",q,M,S)}):null,fe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.text,{dy:"1em",style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:E[0],transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",q,M,S)}),i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:E[1],x:s(e.date),y:r(e.yMax),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",q,M,S)})]}):null]})},d));let ve;t[82]!==ke?(ve=i.jsxRuntimeExports.jsx("g",{children:ke}),t[82]=ke,t[83]=ve):ve=t[83];const Ie=se.map((e,d)=>{const Z=Ne.getLineEndPoint({x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ee=e.showConnector?{y1:Z.y,x1:Z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:ft?0:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:ft?e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+j.right-(e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:ee,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=gt?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Ot(0),y2:Ot(u),graphHeight:v,graphWidth:u,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==P?(Re=P.filter(si).map(oi),t[88]=P,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==ot||t[92]!==v||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:ot,style:Ee,width:u,height:v}),t[91]=ot,t[92]=v,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==g?.tooltip||t[96]!==U||t[97]!==m||t[98]!==L||t[99]!==y?.tooltip||t[100]!==tt?(Me=L&&tt&&U&&m?i.jsxRuntimeExports.jsx($e.Tooltip,{data:L,body:tt,xPos:U,yPos:m,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[95]=g?.tooltip,t[96]=U,t[97]=m,t[98]=L,t[99]=y?.tooltip,t[100]=tt,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.svg,{width:`${_}px`,height:`${Ft}px`,viewBox:`0 0 ${_} ${Ft}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[O,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:xe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Zt.filter(ci),y:Zt.filter(li).map(e=>r(e)),x1:0-D,x2:u+j.right,styles:ct,classNames:z,suffix:S,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:q}),pt,V]}),i.jsxRuntimeExports.jsx("g",{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:v,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:R.format(e,l)})},d))}),N,i.jsxRuntimeExports.jsx(A.motion.path,{style:Q,exit:Tt,variants:{initial:{opacity:0,d:Qt(a)||""},whileInView:{opacity:Xt,d:Qt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Yt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Kt(a)||"",opacity:1},whileInView:{pathLength:1,d:Kt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(A.motion.path,{style:$t,exit:ge,variants:{initial:{pathLength:0,d:Jt(a)||"",opacity:1},whileInView:{pathLength:1,d:Jt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),L?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(L.date),x2:s(L.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,ve,ie?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:ie.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-D,x2:u+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!G.checkIfNullOrUndefined(n.date)&&!G.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!G.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(104),{data:h,graphTitle:_,suffix:Ft,sources:b,prefix:S,graphDescription:M,height:l,width:f,footNote:Wt,noOfXTicks:he,dateFormat:Ht,showValues:D,backgroundColor:Gt,padding:dt,lineColor:tt,leftMargin:Pt,rightMargin:ie,topMargin:ne,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:et,relativeHeight:oe,onSeriesMouseOver:se,graphID:yt,minValue:gt,maxValue:ae,regressionLine:fe,showIntervalDots:Yt,showIntervalValues:E,intervalLineStrokeWidth:Ut,intervalLineColors:Xt,intervalAreaColor:vt,intervalAreaOpacity:ye,graphDownload:re,dataDownload:le,animate:jt,language:y,minHeight:g,strokeWidth:q,showDots:P,annotations:wt,customHighlightAreaSettings:Y,theme:c,ariaLabel:p,yAxisTitle:ce,noOfYTicks:Rt,minDate:it,maxDate:nt,colorLegendTitle:L,colorLegendColors:Et,colorLegendDomain:U,curveType:ue,styles:m,classNames:x,precision:Bt,customLayers:X}=n,j=Ft===void 0?"":Ft,ot=S===void 0?"":S,st=he===void 0?10:he,a=Ht===void 0?"yyyy":Ht,at=D===void 0?!1:D,Ct=Gt===void 0?!1:Gt,rt=Pt===void 0?30:Pt,xe=ie===void 0?30:ie,u=ne===void 0?20:ne,v=ht===void 0?25:ht;let zt;t[0]!==ft?(zt=ft===void 0?[]:ft,t[0]=ft,t[1]=zt):zt=t[1];const me=zt;let w;t[2]!==et?(w=et===void 0?[]:et,t[2]=et,t[3]=w):w=t[3];const B=w,s=fe===void 0?!1:fe,lt=Yt===void 0?!1:Yt,r=E===void 0?!1:E,Jt=Ut===void 0?0:Ut;let Mt;t[4]!==Xt?(Mt=Xt===void 0?[Le.Colors.light.grays["gray-500"],Le.Colors.light.grays["gray-500"]]:Xt,t[4]=Xt,t[5]=Mt):Mt=t[5];const Kt=Mt,Qt=vt===void 0?Le.Colors.primaryColors["blue-100"]:vt,Zt=ye===void 0?.4:ye,_t=re===void 0?!1:re,te=le===void 0?!1:le,Ot=jt===void 0?!1:jt,O=y===void 0?"en":y,At=g===void 0?0:g,bt=q===void 0?2:q,ct=P===void 0?!0:P;let ut;t[6]!==wt?(ut=wt===void 0?[]:wt,t[6]=wt,t[7]=ut):ut=t[7];const Lt=ut;let z;t[8]!==Y?(z=Y===void 0?[]:Y,t[8]=Y,t[9]=z):z=t[9];const kt=z,It=c===void 0?"light":c,Vt=Rt===void 0?5:Rt,Nt=ue===void 0?"curve":ue,St=Bt===void 0?2:Bt;let k;t[10]!==X?(k=X===void 0?[]:X,t[10]=X,t[11]=k):k=t[11];const Dt=k,[J,pe]=C.useState(0),[I,de]=C.useState(0),qt=C.useRef(null),K=C.useRef(null);let xt,mt;t[12]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{const Tt=new ResizeObserver($t=>{pe($t[0].target.clientWidth||620),de($t[0].target.clientHeight||480)});return qt.current&&Tt.observe(qt.current),()=>Tt.disconnect()},mt=[],t[12]=xt,t[13]=mt):(xt=t[12],mt=t[13]),C.useEffect(xt,mt);const T=x?.graphContainer,pt=m?.graphContainer;let $;t[14]!==x?.description||t[15]!==x?.title||t[16]!==h||t[17]!==te||t[18]!==M||t[19]!==_t||t[20]!==_||t[21]!==m?.description||t[22]!==m?.title||t[23]!==f?($=_||M||_t||te?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:x?.title,description:x?.description},graphTitle:_,graphDescription:M,width:f,graphDownload:_t?K:void 0,dataDownload:te?h.map(Ei).filter(Ri).length>0?h.map(wi).filter(ji):h.filter(vi):null}):null,t[14]=x?.description,t[15]=x?.title,t[16]=h,t[17]=te,t[18]=M,t[19]=_t,t[20]=_,t[21]=m?.description,t[22]=m?.title,t[23]=f,t[24]=$):$=t[24];let F;t[25]!==x?.colorLegend||t[26]!==Et||t[27]!==U||t[28]!==L||t[29]!==h.length||t[30]!==f?(F=Et&&U&&h.length>0?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:f,colorLegendTitle:L,colors:Et,colorDomain:U,showNAColor:!1,className:x?.colorLegend}):null,t[25]=x?.colorLegend,t[26]=Et,t[27]=U,t[28]=L,t[29]=h.length,t[30]=f,t[31]=F):F=t[31];let W;t[32]!==h.length?(W=h.length===0&&i.jsxRuntimeExports.jsx(ei.EmptyState,{}),t[32]=h.length,t[33]=W):W=t[33];let H;t[34]!==Ot||t[35]!==Lt||t[36]!==v||t[37]!==x||t[38]!==Nt||t[39]!==kt||t[40]!==Dt||t[41]!==h||t[42]!==a||t[43]!==B||t[44]!==Qt||t[45]!==Zt||t[46]!==Kt||t[47]!==Jt||t[48]!==O||t[49]!==rt||t[50]!==tt||t[51]!==nt||t[52]!==ae||t[53]!==it||t[54]!==gt||t[55]!==st||t[56]!==Vt||t[57]!==se||t[58]!==St||t[59]!==ot||t[60]!==me||t[61]!==s||t[62]!==xe||t[63]!==ct||t[64]!==lt||t[65]!==r||t[66]!==at||t[67]!==bt||t[68]!==m||t[69]!==j||t[70]!==I||t[71]!==J||t[72]!==o||t[73]!==u||t[74]!==ce?(H=J&&I&&h.length>0?i.jsxRuntimeExports.jsx(ni,{data:h,lineColor:tt||Le.Colors.primaryColors["blue-600"],width:J,height:I,suffix:j,prefix:ot,dateFormat:a,showValues:at,noOfXTicks:st??ii.getNoOfTicks(J),leftMargin:rt,rightMargin:xe,topMargin:u,bottomMargin:v,tooltip:o,highlightAreaSettings:B,onSeriesMouseOver:se,refValues:me,minValue:gt,maxValue:ae,animate:Ot===!0?{duration:.5,once:!0,amount:.5}:Ot||{duration:0,once:!0,amount:0},rtl:O==="he"||O==="ar",strokeWidth:bt,showDots:ct,annotations:Lt,customHighlightAreaSettings:kt,regressionLine:s,showIntervalDots:lt,showIntervalValues:r,intervalLineStrokeWidth:Jt,intervalLineColors:Kt,intervalAreaColor:Qt,intervalAreaOpacity:Zt,yAxisTitle:ce,noOfYTicks:Vt,minDate:it,maxDate:nt,curveType:Nt,styles:m,classNames:x,precision:St,customLayers:Dt}):null,t[34]=Ot,t[35]=Lt,t[36]=v,t[37]=x,t[38]=Nt,t[39]=kt,t[40]=Dt,t[41]=h,t[42]=a,t[43]=B,t[44]=Qt,t[45]=Zt,t[46]=Kt,t[47]=Jt,t[48]=O,t[49]=rt,t[50]=tt,t[51]=nt,t[52]=ae,t[53]=it,t[54]=gt,t[55]=st,t[56]=Vt,t[57]=se,t[58]=St,t[59]=ot,t[60]=me,t[61]=s,t[62]=xe,t[63]=ct,t[64]=lt,t[65]=r,t[66]=at,t[67]=bt,t[68]=m,t[69]=j,t[70]=I,t[71]=J,t[72]=o,t[73]=u,t[74]=ce,t[75]=H):H=t[75];let V;t[76]!==W||t[77]!==H?(V=i.jsxRuntimeExports.jsxs(De.GraphArea,{ref:qt,children:[W,H]}),t[76]=W,t[77]=H,t[78]=V):V=t[78];let N;t[79]!==x?.footnote||t[80]!==x?.source||t[81]!==Wt||t[82]!==b||t[83]!==m?.footnote||t[84]!==m?.source||t[85]!==f?(N=b||Wt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:b,footNote:Wt,width:f}):null,t[79]=x?.footnote,t[80]=x?.source,t[81]=Wt,t[82]=b,t[83]=m?.footnote,t[84]=m?.source,t[85]=f,t[86]=N):N=t[86];let Q;return t[87]!==p||t[88]!==Ct||t[89]!==yt||t[90]!==l||t[91]!==O||t[92]!==At||t[93]!==dt||t[94]!==oe||t[95]!==T||t[96]!==pt||t[97]!==$||t[98]!==F||t[99]!==V||t[100]!==N||t[101]!==It||t[102]!==f?(Q=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:T,style:pt,id:yt,ref:K,"aria-label":p,backgroundColor:Ct,theme:It,language:O,minHeight:At,width:f,height:l,relativeHeight:oe,padding:dt,children:[$,F,V,N]}),t[87]=p,t[88]=Ct,t[89]=yt,t[90]=l,t[91]=O,t[92]=At,t[93]=dt,t[94]=oe,t[95]=T,t[96]=pt,t[97]=$,t[98]=F,t[99]=V,t[100]=N,t[101]=It,t[102]=f,t[103]=Q):Q=t[103],Q}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),C=require("react"),R=require("./parse-xYI9yrvL.cjs"),Se=require("./simple-statistics-xm8c0LQQ.cjs"),Te=require("./index-Cno4Q0YE.cjs"),Oe=require("./numberFormattingFunction-02t-wJta.cjs"),$e=require("./Tooltip-BLa2EfMs.cjs"),G=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),Ne=require("./customArea-B1LWQBmM.cjs"),Fe=require("./AxisTitle-DV4n0RxE.cjs"),We=require("./Axis-Dtjn-EgM.cjs"),He=require("./ReferenceLine-M9aP3dj-.cjs"),Ge=require("./RegressionLine-Ci-Dh0w0.cjs"),Pe=require("./YTicksAndGridLines-UzVC5eBM.cjs"),Ye=require("./index-D69M6klB.cjs"),Ue=require("./time-CkcKbhwe.cjs"),Xe=require("./linear-CgUCbw9F.cjs"),Ae=require("./line-DaEMhXmx.cjs"),be=require("./step-BZ3C8QFW.cjs"),Be=require("./area-C1gxfNGD.cjs"),ze=require("./select-Bnfk0lJx.cjs"),A=require("./proxy-C4-uo6nS.cjs"),Je=require("./init-DU0ybBc_.cjs"),Ke=require("./pointer-Dkq5NV1q.cjs"),Qe=require("./use-in-view-C3o_ntMv.cjs"),Ze=require("./GraphFooter.cjs"),_e=require("./GraphHeader.cjs"),Le=require("./Colors.cjs"),ti=require("./ColorLegend.cjs"),ei=require("./EmptyState-CGeBqbmR.cjs"),De=require("./GraphContainer-B1EDxJ0S.cjs"),ii=require("./getNoOfTicks-C_1CFXv_.cjs");function ni(n){const t=i.compilerRuntimeExports.c(102),{data:h,width:_,height:Ft,lineColor:b,suffix:S,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Wt,noOfXTicks:he,rightMargin:Ht,leftMargin:D,topMargin:Gt,bottomMargin:dt,tooltip:tt,onSeriesMouseOver:Pt,refValues:ie,minValue:ne,maxValue:ht,animate:o,rtl:ft,strokeWidth:et,showDots:oe,annotations:se,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ae,showIntervalValues:fe,intervalLineStrokeWidth:Yt,intervalLineColors:E,intervalAreaColor:Ut,intervalAreaOpacity:Xt,yAxisTitle:vt,noOfYTicks:ye,minDate:re,maxDate:le,curveType:jt,styles:y,classNames:g,precision:q,customLayers:P}=n,wt=C.useRef(null);let Y;t[0]!==o.amount||t[1]!==o.once?(Y={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Y):Y=t[2];const c=Qe.useInView(wt,Y),[p,ce]=C.useState(!1);let Rt,it;t[3]!==o.duration||t[4]!==p||t[5]!==c?(Rt=()=>{if(c&&!p){const e=setTimeout(()=>{ce(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},it=[c,p,o.duration],t[3]=o.duration,t[4]=p,t[5]=c,t[6]=Rt,t[7]=it):(Rt=t[6],it=t[7]),C.useEffect(Rt,it);const nt=jt==="linear"?Ae.curveLinear:jt==="step"?be.curveStep:jt==="stepAfter"?be.stepAfter:jt==="stepBefore"?be.stepBefore:be.monotoneX,[L,Et]=C.useState(void 0),[U,ue]=C.useState(void 0),[m,x]=C.useState(void 0),Bt=vt?D+30:D;let X;t[8]!==dt||t[9]!==Ht||t[10]!==Bt||t[11]!==Gt?(X={top:Gt,bottom:dt,left:Bt,right:Ht},t[8]=dt,t[9]=Ht,t[10]=Bt,t[11]=Gt,t[12]=X):X=t[12];const j=X,ot=C.useRef(null);let st;t[13]!==l?(st=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:G.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:G.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=st):st=t[14];const a=Te.orderBy(h.filter(yi).map(st),["date"],["asc"]);let at;if(t[15]!==l||t[16]!==f){let e;t[18]!==l?(e=d=>({...d,coordinates:[d.coordinates[0]===null?null:R.parse(`${d.coordinates[0]}`,l,new Date),d.coordinates[1]===null?null:R.parse(`${d.coordinates[1]}`,l,new Date)]}),t[18]=l,t[19]=e):e=t[19],at=f.map(e),t[15]=l,t[16]=f,t[17]=at}else at=t[17];const Ct=at;let rt;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((Z,ee)=>ee%2===0?R.parse(`${Z}`,l,new Date):Z)}),t[23]=l,t[24]=e):e=t[24],rt=yt.map(e),t[20]=yt,t[21]=l,t[22]=rt}else rt=t[22];const xe=rt,u=_-j.left-j.right,v=Ft-j.top-j.bottom,zt=re?R.parse(`${re}`,l,new Date):a[0].date,me=le?R.parse(`${le}`,l,new Date):a[a.length-1].date,w=G.checkIfNullOrUndefined(ne)?Math.min(...a.map(fi))?Math.min(...a.map(hi))>0?0:Math.min(...a.map(di)):0:ne,B=Math.max(...a.map(pi))?Math.max(...a.map(mi)):0,s=Ue.time().domain([zt,me]).range([0,u]);let lt;t[25]!==B||t[26]!==ht?(lt=G.checkIfNullOrUndefined(ht)?B>0?B:0:ht,t[25]=B,t[26]=ht,t[27]=lt):lt=t[27];const r=Xe.linear().domain([w,lt]).range([v,0]).nice(),Jt=Ae.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(nt),Mt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(nt),Kt=Ae.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(nt),Qt=Be.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(nt),Zt=r.ticks(ye),_t=s.ticks(he);C.useEffect(()=>{const e=Z=>{const ee=a[Je.bisectCenter(a.map(xi),s.invert(Ke.pointer(Z)[0]),0)];Et(ee||a[a.length-1]),Pt?.(ee||a[a.length-1]),x(Z.clientY),ue(Z.clientX)},d=()=>{Et(void 0),ue(void 0),x(void 0),Pt?.(void 0)};ze.select(ot.current).on("mousemove",e).on("mouseout",d)},[s,a,Pt]);const te=Se.linearRegression(a.filter(ui).map(e=>[s(e.date),r(e.y)])),Ot=Se.linearRegressionLine(te);let O;t[28]!==o||t[29]!==v||t[30]!==u||t[31]!==Ct||t[32]!==c||t[33]!==s?(O=i.jsxRuntimeExports.jsx(Ye.HighlightArea,{areaSettings:Ct,width:u,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=u,t[31]=Ct,t[32]=c,t[33]=s,t[34]=O):O=t[34];const At=y?.yAxis?.gridLines,bt=y?.yAxis?.labels;let ct;t[35]!==At||t[36]!==bt?(ct={gridLines:At,labels:bt},t[35]=At,t[36]=bt,t[37]=ct):ct=t[37];const ut=g?.yAxis?.gridLines,Lt=g?.yAxis?.labels;let z;t[38]!==ut||t[39]!==Lt?(z={gridLines:ut,labels:Lt},t[38]=ut,t[39]=Lt,t[40]=z):z=t[40];const kt=r(w<0?0:w),It=r(w<0?0:w),Vt=0-D,Nt=u+j.right,St=w<0?0:w;let k;t[41]!==q||t[42]!==M||t[43]!==S||t[44]!==St?(k=Oe.numberFormattingFunction(St,"NA",q,M,S),t[41]=q,t[42]=M,t[43]=S,t[44]=St,t[45]=k):k=t[45];const Dt=0-D,J=r(w<0?0:w),pe=B<0?"1em":-5;let I;t[46]!==Dt||t[47]!==J||t[48]!==pe?(I={x:Dt,y:J,dx:0,dy:pe},t[46]=Dt,t[47]=J,t[48]=pe,t[49]=I):I=t[49];const de=g?.xAxis?.axis,qt=g?.yAxis?.labels;let K;t[50]!==de||t[51]!==qt?(K={axis:de,label:qt},t[50]=de,t[51]=qt,t[52]=K):K=t[52];const xt=y?.xAxis?.axis,mt=y?.yAxis?.labels;let T;t[53]!==xt||t[54]!==mt?(T={axis:xt,label:mt},t[53]=xt,t[54]=mt,t[55]=T):T=t[55];let pt;t[56]!==kt||t[57]!==It||t[58]!==Vt||t[59]!==Nt||t[60]!==k||t[61]!==I||t[62]!==K||t[63]!==T?(pt=i.jsxRuntimeExports.jsx(We.Axis,{y1:kt,y2:It,x1:Vt,x2:Nt,label:k,labelPos:I,classNames:K,styles:T}),t[56]=kt,t[57]=It,t[58]=Vt,t[59]=Nt,t[60]=k,t[61]=I,t[62]=K,t[63]=T,t[64]=pt):pt=t[64];const $=0-D+15,F=v/2,W=y?.yAxis?.title,H=g?.yAxis?.title;let V;t[65]!==$||t[66]!==F||t[67]!==W||t[68]!==H||t[69]!==vt?(V=i.jsxRuntimeExports.jsx(Fe.AxisTitle,{x:$,y:F,style:W,className:H,text:vt,rotate90:!0}),t[65]=$,t[66]=F,t[67]=W,t[68]=H,t[69]=vt,t[70]=V):V=t[70];let N;t[71]!==P?(N=P.filter(ri).map(ai),t[71]=P,t[72]=N):N=t[72];let Q;t[73]!==Ut?(Q={fill:Ut},t[73]=Ut,t[74]=Q):Q=t[74];let Tt;t[75]!==o.duration?(Tt={opacity:0,transition:{duration:o.duration}},t[75]=o.duration,t[76]=Tt):Tt=t[76];let $t;t[77]!==b||t[78]!==et?($t={stroke:b,fill:"none",strokeWidth:et},t[77]=b,t[78]=et,t[79]=$t):$t=t[79];let ge;t[80]!==o.duration?(ge={opacity:0,transition:{duration:o.duration}},t[80]=o.duration,t[81]=ge):ge=t[81];const ke=a.map((e,d)=>i.jsxRuntimeExports.jsx(A.motion.g,{children:G.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[oe?i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,style:{fill:b},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ae?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],cx:s(e.date),cy:r(e.yMin)},whileInView:{opacity:1,transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.circle,{r:u/a.length<5?0:u/a.length<20?2:4,exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],cx:s(e.date),cy:r(e.yMax)},whileInView:{opacity:1,fill:E[1],transition:{duration:p?o.duration:.5,delay:p?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Wt?i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("graph-value text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:b,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:b,y:r(e.y),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.y,"NA",q,M,S)}):null,fe?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.text,{dy:"1em",style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[0],x:s(e.date),y:r(e.yMin)},whileInView:{opacity:1,x:s(e.date),y:r(e.yMin),fill:E[0],transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMin,"NA",q,M,S)}),i.jsxRuntimeExports.jsx(A.motion.text,{dy:-8,style:{textAnchor:"middle",...y?.graphObjectValues||{}},className:i.mo("text-xs font-bold",g?.graphObjectValues),exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,fill:E[1],x:s(e.date),y:r(e.yMax)},whileInView:{opacity:1,fill:E[1],x:s(e.date),y:r(e.yMax),transition:{duration:p?o.duration:.5,delay:p?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:Oe.numberFormattingFunction(e.yMax,"NA",q,M,S)})]}):null]})},d));let ve;t[82]!==ke?(ve=i.jsxRuntimeExports.jsx("g",{children:ke}),t[82]=ke,t[83]=ve):ve=t[83];const Ie=se.map((e,d)=>{const Z=Ne.getLineEndPoint({x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8},{x:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,y:e.yCoordinate?r(e.yCoordinate):0},G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),ee=e.showConnector?{y1:Z.y,x1:Z.x,y2:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0):0+(e.yOffset||0),x2:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),cy:e.yCoordinate?r(e.yCoordinate):0,cx:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date)):0,circleRadius:G.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,qe={y:e.yCoordinate?r(e.yCoordinate)+(e.yOffset||0)-8:0+(e.yOffset||0)-8,x:ft?0:e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0),width:ft?e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0):u+j.right-(e.xCoordinate?s(R.parse(`${e.xCoordinate}`,l,new Date))+(e.xOffset||0):0+(e.xOffset||0)),maxWidth:e.maxWidth,fontWeight:e.fontWeight,align:e.align};return i.jsxRuntimeExports.jsx(Ne.Annotation,{color:e.color,connectorsSettings:ee,labelSettings:qe,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let je;t[84]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[84]=Ie,t[85]=je):je=t[85];const Ve=gt?i.jsxRuntimeExports.jsx(Ge.RegressionLine,{x1:0,x2:u,y1:Ot(0),y2:Ot(u),graphHeight:v,graphWidth:u,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let we;t[86]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[86]=Ve,t[87]=we):we=t[87];let Re;t[88]!==P?(Re=P.filter(si).map(oi),t[88]=P,t[89]=Re):Re=t[89];let Ee;t[90]===Symbol.for("react.memo_cache_sentinel")?(Ee={fill:"none",pointerEvents:"all"},t[90]=Ee):Ee=t[90];let Ce;t[91]!==ot||t[92]!==v||t[93]!==u?(Ce=i.jsxRuntimeExports.jsx("rect",{ref:ot,style:Ee,width:u,height:v}),t[91]=ot,t[92]=v,t[93]=u,t[94]=Ce):Ce=t[94];let Me;return t[95]!==g?.tooltip||t[96]!==U||t[97]!==m||t[98]!==L||t[99]!==y?.tooltip||t[100]!==tt?(Me=L&&tt&&U&&m?i.jsxRuntimeExports.jsx($e.Tooltip,{data:L,body:tt,xPos:U,yPos:m,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[95]=g?.tooltip,t[96]=U,t[97]=m,t[98]=L,t[99]=y?.tooltip,t[100]=tt,t[101]=Me):Me=t[101],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.svg,{width:`${_}px`,height:`${Ft}px`,viewBox:`0 0 ${_} ${Ft}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[O,i.jsxRuntimeExports.jsx(Ne.CustomArea,{areaSettings:xe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Pe.YTicksAndGridLines,{values:Zt.filter(ci),y:Zt.filter(li).map(e=>r(e)),x1:0-D,x2:u+j.right,styles:ct,classNames:z,suffix:S,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:q}),pt,V]}),i.jsxRuntimeExports.jsx("g",{children:_t.map((e,d)=>i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("text",{y:v,x:s(e),style:{textAnchor:"middle"},className:"fill-primary-gray-700 dark:fill-primary-gray-300 xs:max-[360px]:hidden text-[9px] md:text-[10px] lg:text-xs",dy:15,children:R.format(e,l)})},d))}),N,i.jsxRuntimeExports.jsx(A.motion.path,{style:Q,exit:Tt,variants:{initial:{opacity:0,d:Qt(a)||""},whileInView:{opacity:Xt,d:Qt(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Yt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Mt(a)||"",opacity:1},whileInView:{pathLength:1,d:Mt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(A.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Yt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Kt(a)||"",opacity:1},whileInView:{pathLength:1,d:Kt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(A.motion.path,{style:$t,exit:ge,variants:{initial:{pathLength:0,d:Jt(a)||"",opacity:1},whileInView:{pathLength:1,d:Jt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),L?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(L.date),x2:s(L.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,ve,ie?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:ie.map((e,d)=>i.jsxRuntimeExports.jsx(He.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-D,x2:u+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,je,we,Re,Ce]})}),Me]})}function oi(n){return n.layer}function si(n){return n.position==="after"}function ai(n){return n.layer}function ri(n){return n.position==="before"}function li(n){return n!==0}function ci(n){return n!==0}function ui(n){return!G.checkIfNullOrUndefined(n.date)&&!G.checkIfNullOrUndefined(n.y)}function xi(n){return n.date}function mi(n){return Math.max(n.y,n.yMax,n.yMin)}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.min(n.y,n.yMax,n.yMin)}function hi(n){return Math.min(n.y,n.yMax,n.yMin)}function fi(n){return Math.min(n.y,n.yMax,n.yMin)}function yi(n){return!G.checkIfNullOrUndefined(n.y)}function gi(n){const t=i.compilerRuntimeExports.c(104),{data:h,graphTitle:_,suffix:Ft,sources:b,prefix:S,graphDescription:M,height:l,width:f,footNote:Wt,noOfXTicks:he,dateFormat:Ht,showValues:D,backgroundColor:Gt,padding:dt,lineColor:tt,leftMargin:Pt,rightMargin:ie,topMargin:ne,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:et,relativeHeight:oe,onSeriesMouseOver:se,graphID:yt,minValue:gt,maxValue:ae,regressionLine:fe,showIntervalDots:Yt,showIntervalValues:E,intervalLineStrokeWidth:Ut,intervalLineColors:Xt,intervalAreaColor:vt,intervalAreaOpacity:ye,graphDownload:re,dataDownload:le,animate:jt,language:y,minHeight:g,strokeWidth:q,showDots:P,annotations:wt,customHighlightAreaSettings:Y,theme:c,ariaLabel:p,yAxisTitle:ce,noOfYTicks:Rt,minDate:it,maxDate:nt,colorLegendTitle:L,colorLegendColors:Et,colorLegendDomain:U,curveType:ue,styles:m,classNames:x,precision:Bt,customLayers:X}=n,j=Ft===void 0?"":Ft,ot=S===void 0?"":S,st=he===void 0?10:he,a=Ht===void 0?"yyyy":Ht,at=D===void 0?!1:D,Ct=Gt===void 0?!1:Gt,rt=Pt===void 0?30:Pt,xe=ie===void 0?30:ie,u=ne===void 0?20:ne,v=ht===void 0?25:ht;let zt;t[0]!==ft?(zt=ft===void 0?[]:ft,t[0]=ft,t[1]=zt):zt=t[1];const me=zt;let w;t[2]!==et?(w=et===void 0?[]:et,t[2]=et,t[3]=w):w=t[3];const B=w,s=fe===void 0?!1:fe,lt=Yt===void 0?!1:Yt,r=E===void 0?!1:E,Jt=Ut===void 0?0:Ut;let Mt;t[4]!==Xt?(Mt=Xt===void 0?[Le.Colors.light.grays["gray-500"],Le.Colors.light.grays["gray-500"]]:Xt,t[4]=Xt,t[5]=Mt):Mt=t[5];const Kt=Mt,Qt=vt===void 0?Le.Colors.primaryColors["blue-100"]:vt,Zt=ye===void 0?.4:ye,_t=re===void 0?!1:re,te=le===void 0?!1:le,Ot=jt===void 0?!1:jt,O=y===void 0?"en":y,At=g===void 0?0:g,bt=q===void 0?2:q,ct=P===void 0?!0:P;let ut;t[6]!==wt?(ut=wt===void 0?[]:wt,t[6]=wt,t[7]=ut):ut=t[7];const Lt=ut;let z;t[8]!==Y?(z=Y===void 0?[]:Y,t[8]=Y,t[9]=z):z=t[9];const kt=z,It=c===void 0?"light":c,Vt=Rt===void 0?5:Rt,Nt=ue===void 0?"curve":ue,St=Bt===void 0?2:Bt;let k;t[10]!==X?(k=X===void 0?[]:X,t[10]=X,t[11]=k):k=t[11];const Dt=k,[J,pe]=C.useState(0),[I,de]=C.useState(0),qt=C.useRef(null),K=C.useRef(null);let xt,mt;t[12]===Symbol.for("react.memo_cache_sentinel")?(xt=()=>{const Tt=new ResizeObserver($t=>{pe($t[0].target.clientWidth||620),de($t[0].target.clientHeight||480)});return qt.current&&Tt.observe(qt.current),()=>Tt.disconnect()},mt=[],t[12]=xt,t[13]=mt):(xt=t[12],mt=t[13]),C.useEffect(xt,mt);const T=x?.graphContainer,pt=m?.graphContainer;let $;t[14]!==x?.description||t[15]!==x?.title||t[16]!==h||t[17]!==te||t[18]!==M||t[19]!==_t||t[20]!==_||t[21]!==m?.description||t[22]!==m?.title||t[23]!==f?($=_||M||_t||te?i.jsxRuntimeExports.jsx(_e.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:x?.title,description:x?.description},graphTitle:_,graphDescription:M,width:f,graphDownload:_t?K:void 0,dataDownload:te?h.map(Ei).filter(Ri).length>0?h.map(wi).filter(ji):h.filter(vi):null}):null,t[14]=x?.description,t[15]=x?.title,t[16]=h,t[17]=te,t[18]=M,t[19]=_t,t[20]=_,t[21]=m?.description,t[22]=m?.title,t[23]=f,t[24]=$):$=t[24];let F;t[25]!==x?.colorLegend||t[26]!==Et||t[27]!==U||t[28]!==L||t[29]!==h.length||t[30]!==f?(F=Et&&U&&h.length>0?i.jsxRuntimeExports.jsx(ti.ColorLegend,{width:f,colorLegendTitle:L,colors:Et,colorDomain:U,showNAColor:!1,className:x?.colorLegend}):null,t[25]=x?.colorLegend,t[26]=Et,t[27]=U,t[28]=L,t[29]=h.length,t[30]=f,t[31]=F):F=t[31];let W;t[32]!==h.length?(W=h.length===0&&i.jsxRuntimeExports.jsx(ei.EmptyState,{}),t[32]=h.length,t[33]=W):W=t[33];let H;t[34]!==Ot||t[35]!==Lt||t[36]!==v||t[37]!==x||t[38]!==Nt||t[39]!==kt||t[40]!==Dt||t[41]!==h||t[42]!==a||t[43]!==B||t[44]!==Qt||t[45]!==Zt||t[46]!==Kt||t[47]!==Jt||t[48]!==O||t[49]!==rt||t[50]!==tt||t[51]!==nt||t[52]!==ae||t[53]!==it||t[54]!==gt||t[55]!==st||t[56]!==Vt||t[57]!==se||t[58]!==St||t[59]!==ot||t[60]!==me||t[61]!==s||t[62]!==xe||t[63]!==ct||t[64]!==lt||t[65]!==r||t[66]!==at||t[67]!==bt||t[68]!==m||t[69]!==j||t[70]!==I||t[71]!==J||t[72]!==o||t[73]!==u||t[74]!==ce?(H=J&&I&&h.length>0?i.jsxRuntimeExports.jsx(ni,{data:h,lineColor:tt||Le.Colors.primaryColors["blue-600"],width:J,height:I,suffix:j,prefix:ot,dateFormat:a,showValues:at,noOfXTicks:st??ii.getNoOfTicks(J),leftMargin:rt,rightMargin:xe,topMargin:u,bottomMargin:v,tooltip:o,highlightAreaSettings:B,onSeriesMouseOver:se,refValues:me,minValue:gt,maxValue:ae,animate:Ot===!0?{duration:.5,once:!0,amount:.5}:Ot||{duration:0,once:!0,amount:0},rtl:O==="he"||O==="ar",strokeWidth:bt,showDots:ct,annotations:Lt,customHighlightAreaSettings:kt,regressionLine:s,showIntervalDots:lt,showIntervalValues:r,intervalLineStrokeWidth:Jt,intervalLineColors:Kt,intervalAreaColor:Qt,intervalAreaOpacity:Zt,yAxisTitle:ce,noOfYTicks:Vt,minDate:it,maxDate:nt,curveType:Nt,styles:m,classNames:x,precision:St,customLayers:Dt}):null,t[34]=Ot,t[35]=Lt,t[36]=v,t[37]=x,t[38]=Nt,t[39]=kt,t[40]=Dt,t[41]=h,t[42]=a,t[43]=B,t[44]=Qt,t[45]=Zt,t[46]=Kt,t[47]=Jt,t[48]=O,t[49]=rt,t[50]=tt,t[51]=nt,t[52]=ae,t[53]=it,t[54]=gt,t[55]=st,t[56]=Vt,t[57]=se,t[58]=St,t[59]=ot,t[60]=me,t[61]=s,t[62]=xe,t[63]=ct,t[64]=lt,t[65]=r,t[66]=at,t[67]=bt,t[68]=m,t[69]=j,t[70]=I,t[71]=J,t[72]=o,t[73]=u,t[74]=ce,t[75]=H):H=t[75];let V;t[76]!==W||t[77]!==H?(V=i.jsxRuntimeExports.jsxs(De.GraphArea,{ref:qt,children:[W,H]}),t[76]=W,t[77]=H,t[78]=V):V=t[78];let N;t[79]!==x?.footnote||t[80]!==x?.source||t[81]!==Wt||t[82]!==b||t[83]!==m?.footnote||t[84]!==m?.source||t[85]!==f?(N=b||Wt?i.jsxRuntimeExports.jsx(Ze.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:x?.footnote,source:x?.source},sources:b,footNote:Wt,width:f}):null,t[79]=x?.footnote,t[80]=x?.source,t[81]=Wt,t[82]=b,t[83]=m?.footnote,t[84]=m?.source,t[85]=f,t[86]=N):N=t[86];let Q;return t[87]!==p||t[88]!==Ct||t[89]!==yt||t[90]!==l||t[91]!==O||t[92]!==At||t[93]!==dt||t[94]!==oe||t[95]!==T||t[96]!==pt||t[97]!==$||t[98]!==F||t[99]!==V||t[100]!==N||t[101]!==It||t[102]!==f?(Q=i.jsxRuntimeExports.jsxs(De.GraphContainer,{className:T,style:pt,id:yt,ref:K,"aria-label":p,backgroundColor:Ct,theme:It,language:O,minHeight:At,width:f,height:l,relativeHeight:oe,padding:dt,children:[$,F,V,N]}),t[87]=p,t[88]=Ct,t[89]=yt,t[90]=l,t[91]=O,t[92]=At,t[93]=dt,t[94]=oe,t[95]=T,t[96]=pt,t[97]=$,t[98]=F,t[99]=V,t[100]=N,t[101]=It,t[102]=f,t[103]=Q):Q=t[103],Q}function vi(n){return n!==void 0}function ji(n){return n!==void 0}function wi(n){return n.data}function Ri(n){return n!==void 0}function Ei(n){return n.data}exports.LineChartWithConfidenceInterval=gi;
|
|
2
2
|
//# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map
|