@undp/data-viz 2.3.17 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.d.ts +2 -0
- package/dist/AreaChart.js +356 -354
- package/dist/AreaChart.js.map +1 -1
- package/dist/{Axis-Jt_tmhxS.cjs → Axis-BTaS9oPQ.cjs} +2 -2
- package/dist/{Axis-Jt_tmhxS.cjs.map → Axis-BTaS9oPQ.cjs.map} +1 -1
- package/dist/{Axis-RyGdzLrG.js → Axis-CNZYWzH0.js} +2 -2
- package/dist/{Axis-RyGdzLrG.js.map → Axis-CNZYWzH0.js.map} +1 -1
- package/dist/{AxisTitle-DGjX1_2v.js → AxisTitle-CyLCqpW6.js} +2 -2
- package/dist/{AxisTitle-DGjX1_2v.js.map → AxisTitle-CyLCqpW6.js.map} +1 -1
- package/dist/{AxisTitle-DV4n0RxE.cjs → AxisTitle-DP_evhbe.cjs} +2 -2
- package/dist/{AxisTitle-DV4n0RxE.cjs.map → AxisTitle-DP_evhbe.cjs.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +6 -0
- package/dist/BarGraph.js +1735 -1726
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BasicStatCard.js +46 -45
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +266 -266
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +300 -298
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +469 -469
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +330 -328
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +303 -301
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- 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 -1
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +7 -9
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +1 -1
- package/dist/CsvDownloadButton.js +2 -2
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +10 -12
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +2 -0
- package/dist/DataTable.js +103 -102
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-C3qlUyFK.js → DetailsModal-B2XBWR7w.js} +4 -4
- package/dist/{DetailsModal-C3qlUyFK.js.map → DetailsModal-B2XBWR7w.js.map} +1 -1
- package/dist/{DetailsModal-DIRTulvr.cjs → DetailsModal-jmmKRMRM.cjs} +2 -2
- package/dist/{DetailsModal-DIRTulvr.cjs.map → DetailsModal-jmmKRMRM.cjs.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +4 -0
- package/dist/DifferenceLineChart.js +441 -437
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +4 -0
- package/dist/DonutChart.js +146 -142
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +265 -268
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-NNpOs7DX.cjs → DropdownSelect-CX1yMemd.cjs} +2 -2
- package/dist/DropdownSelect-CX1yMemd.cjs.map +1 -0
- package/dist/{DropdownSelect-B2WTeedJ.js → DropdownSelect-Dz7imdTB.js} +6 -9
- package/dist/DropdownSelect-Dz7imdTB.js.map +1 -0
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +4 -0
- package/dist/DualAxisLineChart.js +336 -332
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +484 -484
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-B4c-CrXs.cjs → EmptyState-CFmiFPHz.cjs} +2 -2
- package/dist/{EmptyState-B4c-CrXs.cjs.map → EmptyState-CFmiFPHz.cjs.map} +1 -1
- package/dist/{EmptyState-B3fPoH6L.js → EmptyState-CaxXCkiN.js} +4 -4
- package/dist/{EmptyState-B3fPoH6L.js.map → EmptyState-CaxXCkiN.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.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +111 -111
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.js +71 -71
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +83 -83
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/{GraphContainer-DwMxWRCi.js → GraphContainer-B8ZqOzKI.js} +2 -2
- package/dist/{GraphContainer-DwMxWRCi.js.map → GraphContainer-B8ZqOzKI.js.map} +1 -1
- package/dist/{GraphContainer-B1EDxJ0S.cjs → GraphContainer-Cul9b74X.cjs} +2 -2
- package/dist/{GraphContainer-B1EDxJ0S.cjs.map → GraphContainer-Cul9b74X.cjs.map} +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +2 -2
- package/dist/{GraphEl-CnJf8b50.js → GraphEl-B73N4RIA.js} +48 -10
- package/dist/GraphEl-B73N4RIA.js.map +1 -0
- package/dist/GraphEl-Lt1og0C-.cjs +2 -0
- package/dist/GraphEl-Lt1og0C-.cjs.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 -0
- package/dist/GriddedGraphs.js +6 -6
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/GriddedGraphsFromConfig.js +2 -2
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +4 -0
- package/dist/HeatMap.js +158 -155
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +81 -80
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +314 -315
- package/dist/HybridMap.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.js +2 -2
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +367 -365
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.cjs.map +1 -1
- package/dist/LinearColorLegend.d.ts +1 -0
- package/dist/LinearColorLegend.js +38 -37
- package/dist/LinearColorLegend.js.map +1 -1
- package/dist/{Modal-ZX55hLH-.cjs → Modal-BIErPPKT.cjs} +5 -5
- package/dist/{Modal-ZX55hLH-.cjs.map → Modal-BIErPPKT.cjs.map} +1 -1
- package/dist/{Modal-BV4rkoLM.js → Modal-CrUYln5V.js} +4 -4
- package/dist/{Modal-BV4rkoLM.js.map → Modal-CrUYln5V.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +4 -4
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.js +2 -2
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +4 -4
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -2
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +419 -420
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +4 -0
- package/dist/MultiLineChart.js +410 -409
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +273 -271
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +4 -4
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +2 -2
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.js +3 -3
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +221 -219
- package/dist/RadarChart.js.map +1 -1
- package/dist/{ReferenceLine-M9aP3dj-.cjs → ReferenceLine-CpU4G01Y.cjs} +2 -2
- package/dist/{ReferenceLine-M9aP3dj-.cjs.map → ReferenceLine-CpU4G01Y.cjs.map} +1 -1
- package/dist/{ReferenceLine-CNEjAYvv.js → ReferenceLine-D41VuUhE.js} +3 -3
- package/dist/{ReferenceLine-CNEjAYvv.js.map → ReferenceLine-D41VuUhE.js.map} +1 -1
- package/dist/{RegressionLine-Ci-Dh0w0.cjs → RegressionLine-BFoBiVJk.cjs} +2 -2
- package/dist/{RegressionLine-Ci-Dh0w0.cjs.map → RegressionLine-BFoBiVJk.cjs.map} +1 -1
- package/dist/{RegressionLine-BDrndQxo.js → RegressionLine-CuwB42I6.js} +4 -4
- package/dist/{RegressionLine-BDrndQxo.js.map → RegressionLine-CuwB42I6.js.map} +1 -1
- 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.d.ts +2 -0
- package/dist/SankeyChart.js +404 -408
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +2 -0
- package/dist/ScatterPlot.js +444 -445
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/ScrollStory.js +3 -3
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +360 -358
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +6 -6
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardFromConfig.js +2 -2
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +3 -3
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +6 -6
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +2 -2
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +259 -262
- package/dist/SlopeChart.js.map +1 -1
- package/dist/{Source-BOSAl3UX.cjs → Source-PKuwZOn3.cjs} +2 -2
- package/dist/{Source-BOSAl3UX.cjs.map → Source-PKuwZOn3.cjs.map} +1 -1
- package/dist/{Source-Djkz-7jX.js → Source-QGk8vhkS.js} +3 -3
- package/dist/{Source-Djkz-7jX.js.map → Source-QGk8vhkS.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 +3 -3
- package/dist/{Spinner-CtJETd5V.js → Spinner-B2IIKg9r.js} +2 -2
- package/dist/{Spinner-CtJETd5V.js.map → Spinner-B2IIKg9r.js.map} +1 -1
- package/dist/{Spinner-jTMOLuw_.cjs → Spinner-WHzzloYQ.cjs} +2 -2
- package/dist/{Spinner-jTMOLuw_.cjs.map → Spinner-WHzzloYQ.cjs.map} +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +4 -0
- package/dist/StatCardFromData.js +97 -95
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +343 -343
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +198 -196
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.d.ts +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +50 -48
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/{Tooltip-CohiIbLZ.js → Tooltip-Bj-s__cI.js} +3 -3
- package/dist/{Tooltip-CohiIbLZ.js.map → Tooltip-Bj-s__cI.js.map} +1 -1
- package/dist/{Tooltip-BLa2EfMs.cjs → Tooltip-Hr46paWP.cjs} +2 -2
- package/dist/{Tooltip-BLa2EfMs.cjs.map → Tooltip-Hr46paWP.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +139 -140
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/{Typography-DMVW6JnV.js → Typography-BO0gQDIT.js} +2 -2
- package/dist/{Typography-DMVW6JnV.js.map → Typography-BO0gQDIT.js.map} +1 -1
- package/dist/{Typography-CZZxlj1W.cjs → Typography-BqmyF1gP.cjs} +2 -2
- package/dist/{Typography-CZZxlj1W.cjs.map → Typography-BqmyF1gP.cjs.map} +1 -1
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +4 -0
- package/dist/UnitChart.js +88 -86
- package/dist/UnitChart.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +2 -0
- package/dist/WaterfallChart.js +257 -258
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/{XAxesLabels-IwjMJkYS.js → XAxesLabels-B9gkjUiC.js} +3 -3
- package/dist/{XAxesLabels-IwjMJkYS.js.map → XAxesLabels-B9gkjUiC.js.map} +1 -1
- package/dist/{XAxesLabels-C6o9jJal.cjs → XAxesLabels-C03jHniq.cjs} +2 -2
- package/dist/{XAxesLabels-C6o9jJal.cjs.map → XAxesLabels-C03jHniq.cjs.map} +1 -1
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs +2 -0
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +1 -0
- package/dist/XTicksAndGridLines-gdbGX2rm.js +39 -0
- package/dist/XTicksAndGridLines-gdbGX2rm.js.map +1 -0
- package/dist/{YAxesLabels-BQ2aCazV.cjs → YAxesLabels-DeENFC2M.cjs} +2 -2
- package/dist/{YAxesLabels-BQ2aCazV.cjs.map → YAxesLabels-DeENFC2M.cjs.map} +1 -1
- package/dist/{YAxesLabels-DoGvgHdw.js → YAxesLabels-hWEUCTvs.js} +3 -3
- package/dist/{YAxesLabels-DoGvgHdw.js.map → YAxesLabels-hWEUCTvs.js.map} +1 -1
- package/dist/YTicksAndGridLines-CsNSq9W9.js +39 -0
- package/dist/YTicksAndGridLines-CsNSq9W9.js.map +1 -0
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs +2 -0
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +1 -0
- package/dist/{checkIfMultiple-TOaaUwS7.cjs → checkIfMultiple-CH5tqj4q.cjs} +2 -2
- package/dist/checkIfMultiple-CH5tqj4q.cjs.map +1 -0
- package/dist/{checkIfMultiple-B97uOUVq.js → checkIfMultiple-Dpyy6BUP.js} +6 -6
- package/dist/checkIfMultiple-Dpyy6BUP.js.map +1 -0
- package/dist/{customArea-B1LWQBmM.cjs → customArea-BAcQ3pBM.cjs} +2 -2
- package/dist/{customArea-B1LWQBmM.cjs.map → customArea-BAcQ3pBM.cjs.map} +1 -1
- package/dist/{customArea-Cc2whe6P.js → customArea-D89lETG0.js} +3 -3
- package/dist/{customArea-Cc2whe6P.js.map → customArea-D89lETG0.js.map} +1 -1
- package/dist/getSliderMarks-BzrpHrHS.cjs +2 -0
- package/dist/getSliderMarks-BzrpHrHS.cjs.map +1 -0
- package/dist/{getSliderMarks-vXsR8RrR.js → getSliderMarks-X-_goqH9.js} +3 -4
- package/dist/getSliderMarks-X-_goqH9.js.map +1 -0
- package/dist/{index-CZ0elhKR.js → index-ApTBN0kp.js} +20 -10
- package/dist/{index-CZ0elhKR.js.map → index-ApTBN0kp.js.map} +1 -1
- package/dist/index-B0Awa_de.js +377 -0
- package/dist/index-B0Awa_de.js.map +1 -0
- package/dist/{index-sbKVyHS2.cjs → index-BhI7mBJx.cjs} +2 -2
- package/dist/{index-sbKVyHS2.cjs.map → index-BhI7mBJx.cjs.map} +1 -1
- package/dist/{index-D69M6klB.cjs → index-BuhBhuCq.cjs} +2 -2
- package/dist/{index-D69M6klB.cjs.map → index-BuhBhuCq.cjs.map} +1 -1
- package/dist/{index-CHPV5EwG-BCLAYDCV.js → index-CHPV5EwG-BzibaIRc.js} +5 -9
- package/dist/index-CHPV5EwG-BzibaIRc.js.map +1 -0
- package/dist/{index-CHPV5EwG-6v2a2njQ.cjs → index-CHPV5EwG-D4pAp7u0.cjs} +3 -3
- package/dist/index-CHPV5EwG-D4pAp7u0.cjs.map +1 -0
- package/dist/index-CP8cmNzt.cjs +2 -0
- package/dist/index-CP8cmNzt.cjs.map +1 -0
- package/dist/{index-Co3YGYe1.js → index-Cv_5q6Rb.js} +3 -3
- package/dist/{index-Co3YGYe1.js.map → index-Cv_5q6Rb.js.map} +1 -1
- package/dist/{index-D_dtv_T9.js → index-DHVGV8Df.js} +3 -3
- package/dist/{index-D_dtv_T9.js.map → index-DHVGV8Df.js.map} +1 -1
- package/dist/{index-CoobIWNj.cjs → index-FXfr51ZM.cjs} +2 -2
- package/dist/{index-CoobIWNj.cjs.map → index-FXfr51ZM.cjs.map} +1 -1
- package/dist/{index-D6CYcVc7-BOa7Dpvf.js → index-Scxs_wcm-BAjU0Cob.js} +16 -16
- package/dist/index-Scxs_wcm-BAjU0Cob.js.map +1 -0
- package/dist/index-Scxs_wcm-DUDU-Gll.cjs +2 -0
- package/dist/index-Scxs_wcm-DUDU-Gll.cjs.map +1 -0
- package/dist/{index-DoS4bGNa-C3DbPpy3.cjs → index-w64Zl8io-DrMm5QSb.cjs} +2 -2
- package/dist/index-w64Zl8io-DrMm5QSb.cjs.map +1 -0
- package/dist/{index-DoS4bGNa-Bgab95kx.js → index-w64Zl8io-ihagHOdP.js} +2 -2
- package/dist/index-w64Zl8io-ihagHOdP.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +92 -17
- package/dist/index.js +3 -3
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs +2 -0
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +1 -0
- package/dist/numberFormattingFunction-DqMf_v1m.js +28 -0
- package/dist/numberFormattingFunction-DqMf_v1m.js.map +1 -0
- package/dist/{proxy--_f6k3NR.js → proxy-BsxtcZKa.js} +2 -2
- package/dist/{proxy--_f6k3NR.js.map → proxy-BsxtcZKa.js.map} +1 -1
- package/dist/{proxy-C4-uo6nS.cjs → proxy-CqH8m8IQ.cjs} +2 -2
- package/dist/{proxy-C4-uo6nS.cjs.map → proxy-CqH8m8IQ.cjs.map} +1 -1
- package/dist/{string2HTML-DUYZT1L9.js → string2HTML-BrFperRM.js} +2 -2
- package/dist/{string2HTML-DUYZT1L9.js.map → string2HTML-BrFperRM.js.map} +1 -1
- package/dist/{string2HTML-xx9MzTtY.cjs → string2HTML-ZoGd08P_.cjs} +2 -2
- package/dist/{string2HTML-xx9MzTtY.cjs.map → string2HTML-ZoGd08P_.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-in-view-DqvKAveg.js → use-in-view-KOXq5Kmc.js} +2 -2
- package/dist/{use-in-view-DqvKAveg.js.map → use-in-view-KOXq5Kmc.js.map} +1 -1
- package/dist/{use-in-view-C3o_ntMv.cjs → use-in-view-dnRv_qqF.cjs} +2 -2
- package/dist/{use-in-view-C3o_ntMv.cjs.map → use-in-view-dnRv_qqF.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +9 -18
- package/dist/utils.js +1 -1
- package/dist/x-BXShoIAM-BC2sxios.cjs +2 -0
- package/dist/x-BXShoIAM-BC2sxios.cjs.map +1 -0
- package/dist/{x-BBpi7a_7-BsvWCzYM.js → x-BXShoIAM-D6VWO6z5.js} +3 -5
- package/dist/x-BXShoIAM-D6VWO6z5.js.map +1 -0
- package/package.json +2 -2
- package/dist/DropdownSelect-B2WTeedJ.js.map +0 -1
- package/dist/DropdownSelect-NNpOs7DX.cjs.map +0 -1
- package/dist/GraphEl-CnJf8b50.js.map +0 -1
- package/dist/GraphEl-D_w0Qak4.cjs +0 -2
- package/dist/GraphEl-D_w0Qak4.cjs.map +0 -1
- package/dist/XTicksAndGridLines-BDmF9etl.js +0 -38
- package/dist/XTicksAndGridLines-BDmF9etl.js.map +0 -1
- package/dist/XTicksAndGridLines-CekrPykD.cjs +0 -2
- package/dist/XTicksAndGridLines-CekrPykD.cjs.map +0 -1
- package/dist/YTicksAndGridLines-C3GW1xFG.js +0 -38
- package/dist/YTicksAndGridLines-C3GW1xFG.js.map +0 -1
- package/dist/YTicksAndGridLines-UzVC5eBM.cjs +0 -2
- package/dist/YTicksAndGridLines-UzVC5eBM.cjs.map +0 -1
- package/dist/checkIfMultiple-B97uOUVq.js.map +0 -1
- package/dist/checkIfMultiple-TOaaUwS7.cjs.map +0 -1
- package/dist/getSliderMarks-CIuSoedo.cjs +0 -2
- package/dist/getSliderMarks-CIuSoedo.cjs.map +0 -1
- package/dist/getSliderMarks-vXsR8RrR.js.map +0 -1
- package/dist/index-C6VwVS8W.js +0 -378
- package/dist/index-C6VwVS8W.js.map +0 -1
- package/dist/index-CHPV5EwG-6v2a2njQ.cjs.map +0 -1
- package/dist/index-CHPV5EwG-BCLAYDCV.js.map +0 -1
- package/dist/index-D6CYcVc7-BOa7Dpvf.js.map +0 -1
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs +0 -2
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs.map +0 -1
- package/dist/index-DoS4bGNa-Bgab95kx.js.map +0 -1
- package/dist/index-DoS4bGNa-C3DbPpy3.cjs.map +0 -1
- package/dist/index-_TlgeI_i.cjs +0 -2
- package/dist/index-_TlgeI_i.cjs.map +0 -1
- package/dist/numberFormattingFunction-02t-wJta.cjs +0 -2
- package/dist/numberFormattingFunction-02t-wJta.cjs.map +0 -1
- package/dist/numberFormattingFunction-14YCbkN2.js +0 -13
- package/dist/numberFormattingFunction-14YCbkN2.js.map +0 -1
- package/dist/x-BBpi7a_7-BsvWCzYM.js.map +0 -1
- package/dist/x-BBpi7a_7-DXYIEFwN.cjs +0 -2
- package/dist/x-BBpi7a_7-DXYIEFwN.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, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\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\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\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 mapData: FeatureCollection;\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 projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\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 projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\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 const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\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 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 {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.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 <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.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 if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\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 className='undp-map-shapes'\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 <motion.path\r\n key={`${d.id}`}\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 vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\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 vectorEffect: 'non-scaling-stroke',\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:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!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: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 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\nimport { FeatureCollection } from 'geojson';\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 MapOverlayDataType,\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 mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\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 /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, 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-v2.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 = 'naturalEarth',\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 projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n mapOverlay,\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 const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\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\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(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 as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.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}` ===\r\n 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(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\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","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","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","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","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","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","t25","timeline","t26","t27","t28","t29","t30","t31","t32","mapOverlay","Colors","light","graphNoData","grays","t33","t34","t35","t36","enabled","autoplay","showOnlyActiveDate","primaryColors","t37","t38","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t39","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t40","t41","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t42","shape","onUpdateShape","useEffectEvent","t43","shape_0","onUpdateOverlayMapShape","t44","fetchAndParseJSON","then","d_2","t45","t46","d_3","t47","t48","t49","t50","speed","interval","setInterval","clearInterval","t51","t52","getSliderMarks","markObj","t53","graphContainer","t54","t55","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t56","Pause","Play","SliderUI","nextValue","nextValue_0","t57","GraphArea","d_9","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t58","footnote","source","GraphFooter","t59","GraphContainer","d_11","d_10","NAME","d_6","d_5","d_4","d_8","d_7","d_1","b"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA,KAAI,aAAaC,KAAI,cAAcC,KAAI,CAAC,cAAc,UAAU,GAAGC,KAAIC,GAAE,WAAW,CAACC,GAAGC,MAAM;AAChG,QAAM,EA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A;AAAA,SA2RqCtW,EAACW;AAAO;AA3R7C,SAAA8U,GAAA9L,GAAA;AAAA,SAuOsDA,EAAEX,YAAiBuN,SAAK;AAAY;AAvO1F,SAAAzB,GAAA0B,GAAA;AAAA,SAsL4BxW,MAAM0D;AAAS;AAtL3C,SAAAmR,GAAA4B,GAAA;AAAA,SAqL6CzW,MAAM0D;AAAS;AArL5D,SAAAkR,GAAA8B,GAAA;AAAA,SAqLyB1W,EAACM;AAAK;AArL/B,SAAAqU,GAAAgC,GAAA;AAAA,SAoL2C3W,MAAM0D;AAAS;AApL1D,SAAAgR,GAAAkC,GAAA;AAAA,SAoLuB5W,EAACM;AAAK;AApL7B,SAAAsR,GAAAiF,GAAA;AAAA,SAwFiB7W,EAACP;AAA+B;AAxFjD,SAAAwR,GAAA9R,GAAA2X,GAAA;AAAA,SA0EkB3X,IAAI2X;AAAC;AA1EvB,SAAA/F,GAAA/Q,GAAA;AAAA,SAsEgBA,EAAC2Q;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-tc70JA_2.js\";\nimport { c as N } from \"./compiler-runtime-BNHg76kC.js\";\nimport * as R from \"react\";\nimport g from \"react\";\nimport { P as x } from \"./index-DEx84bLj.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, useMemo, useRef, useState } from 'react';\r\nimport {\r\n geoAlbersUsa,\r\n geoEqualEarth,\r\n geoMercator,\r\n geoNaturalEarth1,\r\n geoOrthographic,\r\n geoPath,\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\nimport { FeatureCollection } from 'geojson';\r\nimport rewind from '@turf/rewind';\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 { ExpandIcon, 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 mapData: FeatureCollection;\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 projectionRotate: [number, number] | [number, number, number];\r\n rewindCoordinatesInMapData: boolean;\r\n overlayMapData?: FeatureCollection;\r\n overlayMapBorderColor?: string;\r\n overlayMapBorderWidth?: number;\r\n locale: 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 projectionRotate,\r\n rewindCoordinatesInMapData,\r\n overlayMapData,\r\n overlayMapBorderColor,\r\n overlayMapBorderWidth,\r\n locale,\r\n } = props;\r\n const formattedMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData) return mapData;\r\n\r\n return rewind(mapData, { reverse: true }) as FeatureCollection;\r\n }, [mapData, rewindCoordinatesInMapData]);\r\n const formattedOverlayMapData = useMemo(() => {\r\n if (!rewindCoordinatesInMapData || !overlayMapData) return overlayMapData;\r\n\r\n return rewind(overlayMapData, { reverse: true }) as FeatureCollection;\r\n }, [overlayMapData, rewindCoordinatesInMapData]);\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 const bounds = bbox(formattedMapData);\r\n\r\n const center = centerOfMass(formattedMapData);\r\n const lonDiff = (bounds[2] - bounds[0]) * 1.15;\r\n const latDiff = (bounds[3] - bounds[1]) * 1.15;\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\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(projectionRotate)\r\n .center(centerPoint || (center.geometry.coordinates as [number, number]))\r\n .translate([width / 2, height / 2])\r\n .scale(scaleVar);\r\n const pathGenerator = geoPath().projection(projection);\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 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 {formattedMapData.features.map((d, i: number) => {\r\n if (!d.properties?.[mapProperty]) return null;\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <motion.g\r\n key={i}\r\n opacity={\r\n selectedColor\r\n ? dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.indexOf(d.properties[mapProperty]) !== -1\r\n ? 1\r\n : dimmedOpacity\r\n : 1\r\n }\r\n >\r\n <path\r\n d={path}\r\n style={{\r\n stroke: mapBorderColor,\r\n strokeWidth: mapBorderWidth,\r\n fill: mapNoDataColor,\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n <AnimatePresence>\r\n {data\r\n .filter(d => d.id)\r\n .map(d => {\r\n const index = formattedMapData.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 if (index === -1) return null;\r\n const path = pathGenerator(formattedMapData.features[index]);\r\n if (!path) return null;\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 className='undp-map-shapes'\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\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 <motion.path\r\n key={`${d.id}`}\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 vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </motion.g>\r\n );\r\n })}\r\n {formattedOverlayMapData?.features.map((d, i: number) => {\r\n const path = pathGenerator(d);\r\n if (!path) return null;\r\n return (\r\n <g key={i}>\r\n <path\r\n d={path}\r\n style={{\r\n stroke: overlayMapBorderColor || mapBorderColor,\r\n strokeWidth: overlayMapBorderWidth || mapBorderWidth + 1,\r\n fill: 'none',\r\n pointerEvents: 'none',\r\n vectorEffect: 'non-scaling-stroke',\r\n }}\r\n />\r\n </g>\r\n );\r\n })}\r\n {data\r\n .filter(d => !checkIfNullOrUndefined(d.lat) && !checkIfNullOrUndefined(d.long))\r\n .map(d => {\r\n const labelPosMultiplier =\r\n (projection([d.long as number, d.lat as number]) as [number, number])[0] >\r\n 0.8 * width\r\n ? -1\r\n : 1;\r\n return (\r\n <motion.g\r\n className='undp-map-dots'\r\n key={d.label || `${d.lat}-${d.long}`}\r\n variants={{\r\n initial: { opacity: 0 },\r\n whileInView: {\r\n opacity: highlightedDataPoints\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 vectorEffect: 'non-scaling-stroke',\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:\r\n labelPosMultiplier *\r\n (!radiusScale ? radius : radiusScale(d.radius || 0)),\r\n },\r\n whileInView: {\r\n opacity: 1,\r\n x:\r\n labelPosMultiplier *\r\n (!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: labelPosMultiplier === -1 ? 'end' : 'start',\r\n fill: labelColor || '#000',\r\n vectorEffect: 'non-scaling-stroke',\r\n ...(styles?.graphObjectValues || {}),\r\n }}\r\n dx={labelPosMultiplier * 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(\r\n d as number,\r\n undefined,\r\n undefined,\r\n undefined,\r\n undefined,\r\n locale,\r\n )}\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='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\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\nimport { FeatureCollection } from 'geojson';\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 MapOverlayDataType,\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 mapData?: FeatureCollection | string;\r\n /** Detail if any other map needs to be overlayed over the main map */\r\n mapOverlay?: MapOverlayDataType;\r\n /** Defines if the coordinates in the map data should be rewinded or not. Try to change this is the visualization shows countries as holes instead of shapes. */\r\n rewindCoordinatesInMapData?: boolean;\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 /** Controls the rotation of the map projection, in degrees, applied before rendering. Useful for shifting the antimeridian to focus the map on different regions */\r\n projectionRotate?: [number, number] | [number, 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 /** Locale for number formatting. Must matches what `Intl.NumberFormat` expects. */\r\n locale?: string;\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-v2.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 = 'naturalEarth',\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 projectionRotate = [0, 0],\r\n rewindCoordinatesInMapData = true,\r\n locale = 'en',\r\n mapOverlay,\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 const [mapShape, setMapShape] = useState<FeatureCollection | undefined>(undefined);\r\n const [overlayMapShape, setOverlayMapShape] = useState<FeatureCollection | undefined>(undefined);\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\r\n const onUpdateShape = useEffectEvent((shape: FeatureCollection) => {\r\n setMapShape(shape);\r\n });\r\n\r\n const onUpdateOverlayMapShape = useEffectEvent((shape: FeatureCollection | undefined) => {\r\n setOverlayMapShape(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 as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateShape(mapData);\r\n }\r\n }, [mapData]);\r\n useEffect(() => {\r\n if (!mapOverlay?.mapData) onUpdateOverlayMapShape(undefined);\r\n if (typeof mapOverlay?.mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapOverlay?.mapData);\r\n fetchData.then(d => {\r\n onUpdateOverlayMapShape(d as FeatureCollection);\r\n });\r\n } else {\r\n onUpdateOverlayMapShape(mapOverlay?.mapData);\r\n }\r\n }, [mapOverlay?.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}` ===\r\n 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(el => el.properties?.NAME !== 'Antarctica'),\r\n }\r\n }\r\n overlayMapData={overlayMapShape}\r\n overlayMapBorderColor={mapOverlay?.mapBorderColor}\r\n overlayMapBorderWidth={mapOverlay?.mapBorderWidth}\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 projectionRotate={projectionRotate}\r\n rewindCoordinatesInMapData={rewindCoordinatesInMapData}\r\n locale={locale}\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","projectionRotate","rewindCoordinatesInMapData","overlayMapData","overlayMapBorderColor","overlayMapBorderWidth","locale","formattedMapData","useMemo","rewind","reverse","formattedOverlayMapData","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","pathGenerator","geoPath","handleZoom","direction","svg","scaleBy","jsxs","Fragment","jsx","motion","position","map","layer","features","properties","path","indexOf","stroke","strokeWidth","fill","vectorEffect","AnimatePresence","id","index","findIndex","el","color","checkIfNullOrUndefined","initial","opacity","whileInView","transition","duration","event","clientY","clientX","isEqual","pointerEvents","lat","long","labelPosMultiplier","label","fillOpacity","cn","graphObjectValues","textAnchor","colorLegend","X","backgroundColor","display","WebkitLineClamp","WebkitBoxOrient","Spacer","Separator","numberFormattingFunction","ExpandIcon","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","graphDownload","t13","dataDownload","t14","showAntarctica","t15","language","t16","minHeight","t17","theme","t18","ariaLabel","t19","t20","t21","t22","t23","t24","timeline","t25","t26","t27","t28","t29","t30","t31","t32","mapOverlay","Colors","light","graphNoData","grays","t33","t34","t35","enabled","autoplay","showOnlyActiveDate","primaryColors","t36","t37","svgWidth","setSvgWidth","svgHeight","setSvgHeight","play","setPlay","dates","dateFormat","t38","d_0","parse","date","Date","getTime","Set","_temp","sort","_temp2","uniqDatesSorted","setIndex","mapShape","setMapShape","overlayMapShape","setOverlayMapShape","graphDiv","graphParentDiv","getUniqValue","getJenks","_temp3","t39","t40","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","t41","shape","onUpdateShape","useEffectEvent","t42","shape_0","onUpdateOverlayMapShape","t43","fetchAndParseJSON","then","d_2","t44","t45","d_3","t46","t47","t48","t49","speed","interval","setInterval","clearInterval","t50","t51","getSliderMarks","markObj","t52","graphContainer","t53","t54","description","title","GraphHeader","_temp4","_temp5","_temp6","_temp7","_temp8","t55","Pause","Play","SliderUI","nextValue","nextValue_0","t56","GraphArea","d_9","format","_temp9","sequentialColors","max","_temp0","_temp1","Spinner","t57","footnote","source","GraphFooter","t58","GraphContainer","d_11","d_10","NAME","d_6","d_5","d_4","d_8","d_7","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,OAA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L6C1W,MAAM2D;AAAS;AAtL5D,SAAAkR,GAAA8B,GAAA;AAAA,SAsLyB3W,EAACM;AAAK;AAtL/B,SAAAsU,GAAAgC,GAAA;AAAA,SAqL2C5W,MAAM2D;AAAS;AArL1D,SAAAgR,GAAAkC,GAAA;AAAA,SAqLuB7W,EAACM;AAAK;AArL7B,SAAAuR,GAAAiF,GAAA;AAAA,SAyFiB9W,EAACR;AAA+B;AAzFjD,SAAA0R,GAAAhS,GAAA6X,GAAA;AAAA,SA2EkB7X,IAAI6X;AAAC;AA3EvB,SAAA/F,GAAAhR,GAAA;AAAA,SAuEgBA,EAAC4Q;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-D4pAp7u0.cjs"),g=require("./index-BhI7mBJx.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.u,{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,5 +1,5 @@
|
|
|
1
|
-
import { c as y, j as p } from "./index-CHPV5EwG-
|
|
2
|
-
import { I as b, u as x } from "./index-
|
|
1
|
+
import { c as y, j as p } from "./index-CHPV5EwG-BzibaIRc.js";
|
|
2
|
+
import { I as b, u as x } from "./index-ApTBN0kp.js";
|
|
3
3
|
import { i as u } from "./imageDownload-Diofs_vY.js";
|
|
4
4
|
function j(f) {
|
|
5
5
|
const e = y.c(10), {
|
|
@@ -1,2 +1,2 @@
|
|
|
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-Jt_tmhxS.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-B4c-CrXs.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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-D4pAp7u0.cjs"),C=require("react"),R=require("./parse-xYI9yrvL.cjs"),Ne=require("./simple-statistics-xm8c0LQQ.cjs"),$e=require("./index-Cno4Q0YE.cjs"),be=require("./numberFormattingFunction-Cn9R7CM9.cjs"),Fe=require("./Tooltip-Hr46paWP.cjs"),P=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),De=require("./customArea-BAcQ3pBM.cjs"),We=require("./AxisTitle-DP_evhbe.cjs"),He=require("./Axis-BTaS9oPQ.cjs"),Ge=require("./ReferenceLine-CpU4G01Y.cjs"),Pe=require("./RegressionLine-BFoBiVJk.cjs"),Ye=require("./YTicksAndGridLines-DFjm8RCc.cjs"),Ue=require("./index-BuhBhuCq.cjs"),Xe=require("./time-CkcKbhwe.cjs"),Be=require("./linear-CgUCbw9F.cjs"),Le=require("./line-DaEMhXmx.cjs"),ke=require("./step-BZ3C8QFW.cjs"),ze=require("./area-C1gxfNGD.cjs"),Je=require("./select-Bnfk0lJx.cjs"),k=require("./proxy-CqH8m8IQ.cjs"),Ke=require("./init-DU0ybBc_.cjs"),Qe=require("./pointer-Dkq5NV1q.cjs"),Ze=require("./use-in-view-dnRv_qqF.cjs"),_e=require("./GraphFooter.cjs"),ti=require("./GraphHeader.cjs"),Ae=require("./Colors.cjs"),ei=require("./ColorLegend.cjs"),ii=require("./EmptyState-CFmiFPHz.cjs"),qe=require("./GraphContainer-Cul9b74X.cjs"),ni=require("./getNoOfTicks-C_1CFXv_.cjs");function oi(n){const t=i.compilerRuntimeExports.c(103),{data:h,width:K,height:Gt,lineColor:A,suffix:q,prefix:M,dateFormat:l,highlightAreaSettings:f,showValues:Pt,noOfXTicks:fe,rightMargin:Yt,leftMargin:T,topMargin:Ut,bottomMargin:dt,tooltip:Q,onSeriesMouseOver:Xt,refValues:se,minValue:ae,maxValue:ht,animate:o,rtl:ft,strokeWidth:Z,showDots:re,annotations:le,customHighlightAreaSettings:yt,regressionLine:gt,showIntervalDots:ce,showIntervalValues:ye,intervalLineStrokeWidth:Bt,intervalLineColors:E,intervalAreaColor:zt,intervalAreaOpacity:Jt,yAxisTitle:vt,noOfYTicks:ge,minDate:ue,maxDate:xe,curveType:jt,styles:y,classNames:g,precision:$,customLayers:Y,locale:O}=n,wt=C.useRef(null);let Rt;t[0]!==o.amount||t[1]!==o.once?(Rt={once:o.once,amount:o.amount},t[0]=o.amount,t[1]=o.once,t[2]=Rt):Rt=t[2];const c=Ze.useInView(wt,Rt),[m,ve]=C.useState(!1);let _,tt;t[3]!==o.duration||t[4]!==m||t[5]!==c?(_=()=>{if(c&&!m){const e=setTimeout(()=>{ve(!0)},(o.duration+.5)*1e3);return()=>clearTimeout(e)}},tt=[c,m,o.duration],t[3]=o.duration,t[4]=m,t[5]=c,t[6]=_,t[7]=tt):(_=t[6],tt=t[7]),C.useEffect(_,tt);const et=jt==="linear"?Le.curveLinear:jt==="step"?ke.curveStep:jt==="stepAfter"?ke.stepAfter:jt==="stepBefore"?ke.stepBefore:ke.monotoneX,[b,Et]=C.useState(void 0),[Ct,p]=C.useState(void 0),[u,me]=C.useState(void 0),it=vt?T+30:T;let Mt;t[8]!==dt||t[9]!==Yt||t[10]!==it||t[11]!==Ut?(Mt={top:Ut,bottom:dt,left:it,right:Yt},t[8]=dt,t[9]=Yt,t[10]=it,t[11]=Ut,t[12]=Mt):Mt=t[12];const j=Mt,nt=C.useRef(null);let ot;t[13]!==l?(ot=e=>({date:R.parse(`${e.date}`,l,new Date),y:e.y,yMin:P.checkIfNullOrUndefined(e.yMin)?e.y:e.yMin,yMax:P.checkIfNullOrUndefined(e.yMax)?e.y:e.yMax,data:e.data}),t[13]=l,t[14]=ot):ot=t[14];const a=$e.orderBy(h.filter(gi).map(ot),["date"],["asc"]);let st;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],st=f.map(e),t[15]=l,t[16]=f,t[17]=st}else st=t[17];const Ot=st;let at;if(t[20]!==yt||t[21]!==l){let e;t[23]!==l?(e=d=>({...d,coordinates:d.coordinates.map((J,oe)=>oe%2===0?R.parse(`${J}`,l,new Date):J)}),t[23]=l,t[24]=e):e=t[24],at=yt.map(e),t[20]=yt,t[21]=l,t[22]=at}else at=t[22];const pe=at,x=K-j.left-j.right,v=Gt-j.top-j.bottom,Kt=ue?R.parse(`${ue}`,l,new Date):a[0].date,de=xe?R.parse(`${xe}`,l,new Date):a[a.length-1].date,w=P.checkIfNullOrUndefined(ae)?Math.min(...a.map(yi))?Math.min(...a.map(fi))>0?0:Math.min(...a.map(hi)):0:ae,U=Math.max(...a.map(di))?Math.max(...a.map(pi)):0,s=Xe.time().domain([Kt,de]).range([0,x]);let rt;t[25]!==U||t[26]!==ht?(rt=P.checkIfNullOrUndefined(ht)?U>0?U:0:ht,t[25]=U,t[26]=ht,t[27]=rt):rt=t[27];const r=Be.linear().domain([w,rt]).range([v,0]).nice(),Qt=Le.line().x(e=>s(e.date)).y(e=>r(e.y)).curve(et),bt=Le.line().x(e=>s(e.date)).y(e=>r(e.yMin)).curve(et),Zt=Le.line().x(e=>s(e.date)).y(e=>r(e.yMax)).curve(et),_t=ze.area().x(e=>s(e.date)).y0(e=>r(e.yMin)).y1(e=>r(e.yMax)).curve(et),te=r.ticks(ge),ee=s.ticks(fe);C.useEffect(()=>{const e=J=>{const oe=a[Ke.bisectCenter(a.map(mi),s.invert(Qe.pointer(J)[0]),0)];Et(oe||a[a.length-1]),Xt?.(oe||a[a.length-1]),me(J.clientY),p(J.clientX)},d=()=>{Et(void 0),p(void 0),me(void 0),Xt?.(void 0)};Je.select(nt.current).on("mousemove",e).on("mouseout",d)},[s,a,Xt]);const ie=Ne.linearRegression(a.filter(xi).map(e=>[s(e.date),r(e.y)])),Lt=Ne.linearRegressionLine(ie);let L;t[28]!==o||t[29]!==v||t[30]!==x||t[31]!==Ot||t[32]!==c||t[33]!==s?(L=i.jsxRuntimeExports.jsx(Ue.HighlightArea,{areaSettings:Ot,width:x,height:v,scale:s,animate:o,isInView:c}),t[28]=o,t[29]=v,t[30]=x,t[31]=Ot,t[32]=c,t[33]=s,t[34]=L):L=t[34];const kt=y?.yAxis?.gridLines,At=y?.yAxis?.labels;let lt;t[35]!==kt||t[36]!==At?(lt={gridLines:kt,labels:At},t[35]=kt,t[36]=At,t[37]=lt):lt=t[37];const ct=g?.yAxis?.gridLines,It=g?.yAxis?.labels;let X;t[38]!==ct||t[39]!==It?(X={gridLines:ct,labels:It},t[38]=ct,t[39]=It,t[40]=X):X=t[40];const Vt=r(w<0?0:w),St=r(w<0?0:w),Dt=0-T,Nt=x+j.right,qt=w<0?0:w;let I;t[41]!==O||t[42]!==$||t[43]!==M||t[44]!==q||t[45]!==qt?(I=be.numberFormattingFunction(qt,void 0,$,M,q,O),t[41]=O,t[42]=$,t[43]=M,t[44]=q,t[45]=qt,t[46]=I):I=t[46];const Tt=0-T,$t=r(w<0?0:w),B=U<0?"1em":-5;let ut;t[47]!==Tt||t[48]!==$t||t[49]!==B?(ut={x:Tt,y:$t,dx:0,dy:B},t[47]=Tt,t[48]=$t,t[49]=B,t[50]=ut):ut=t[50];const xt=g?.xAxis?.axis,he=g?.yAxis?.labels;let F;t[51]!==xt||t[52]!==he?(F={axis:xt,label:he},t[51]=xt,t[52]=he,t[53]=F):F=t[53];const ne=y?.xAxis?.axis,mt=y?.yAxis?.labels;let V;t[54]!==ne||t[55]!==mt?(V={axis:ne,label:mt},t[54]=ne,t[55]=mt,t[56]=V):V=t[56];let pt;t[57]!==Vt||t[58]!==St||t[59]!==Dt||t[60]!==Nt||t[61]!==I||t[62]!==ut||t[63]!==F||t[64]!==V?(pt=i.jsxRuntimeExports.jsx(He.Axis,{y1:Vt,y2:St,x1:Dt,x2:Nt,label:I,labelPos:ut,classNames:F,styles:V}),t[57]=Vt,t[58]=St,t[59]=Dt,t[60]=Nt,t[61]=I,t[62]=ut,t[63]=F,t[64]=V,t[65]=pt):pt=t[65];const Ft=0-T+15,W=v/2,H=y?.yAxis?.title,G=g?.yAxis?.title;let S;t[66]!==Ft||t[67]!==W||t[68]!==H||t[69]!==G||t[70]!==vt?(S=i.jsxRuntimeExports.jsx(We.AxisTitle,{x:Ft,y:W,style:H,className:G,text:vt,rotate90:!0}),t[66]=Ft,t[67]=W,t[68]=H,t[69]=G,t[70]=vt,t[71]=S):S=t[71];let D;t[72]!==Y?(D=Y.filter(li).map(ri),t[72]=Y,t[73]=D):D=t[73];let N;t[74]!==zt?(N={fill:zt},t[74]=zt,t[75]=N):N=t[75];let z;t[76]!==o.duration?(z={opacity:0,transition:{duration:o.duration}},t[76]=o.duration,t[77]=z):z=t[77];let Wt;t[78]!==A||t[79]!==Z?(Wt={stroke:A,fill:"none",strokeWidth:Z},t[78]=A,t[79]=Z,t[80]=Wt):Wt=t[80];let Ht;t[81]!==o.duration?(Ht={opacity:0,transition:{duration:o.duration}},t[81]=o.duration,t[82]=Ht):Ht=t[82];const Ie=a.map((e,d)=>i.jsxRuntimeExports.jsx(k.motion.g,{children:P.checkIfNullOrUndefined(e.y)?null:i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[re?i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/a.length<20?2:4,style:{fill:A},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{opacity:0,cx:s(e.date),cy:r(e.y)},whileInView:{opacity:1,transition:{duration:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.y)}},initial:"initial",animate:c?"whileInView":"initial"}):null,ce?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/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:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMin),fill:E[0]}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(k.motion.circle,{r:x/a.length<5?0:x/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:m?o.duration:.5,delay:m?0:o.duration},cx:s(e.date),cy:r(e.yMax)}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,Pt?i.jsxRuntimeExports.jsx(k.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:A,x:s(e.date),y:r(e.y)},whileInView:{opacity:1,x:s(e.date),fill:A,y:r(e.y),transition:{duration:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:be.numberFormattingFunction(e.y,void 0,$,M,q,O)}):null,ye?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.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:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:be.numberFormattingFunction(e.yMin,void 0,$,M,q,O)}),i.jsxRuntimeExports.jsx(k.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:m?o.duration:.5,delay:m?0:o.duration}}},initial:"initial",animate:c?"whileInView":"initial",children:be.numberFormattingFunction(e.yMax,void 0,$,M,q,O)})]}):null]})},d));let je;t[83]!==Ie?(je=i.jsxRuntimeExports.jsx("g",{children:Ie}),t[83]=Ie,t[84]=je):je=t[84];const Ve=le.map((e,d)=>{const J=De.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},P.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius),oe=e.showConnector?{y1:J.y,x1:J.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:P.checkIfNullOrUndefined(e.connectorRadius)?3.5:e.connectorRadius,strokeWidth:e.showConnector===!0?2:Math.min(e.showConnector||0,1)}:void 0,Te={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):x+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(De.Annotation,{color:e.color,connectorsSettings:oe,labelSettings:Te,text:e.text,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d)});let we;t[85]!==Ve?(we=i.jsxRuntimeExports.jsx("g",{children:Ve}),t[85]=Ve,t[86]=we):we=t[86];const Se=gt?i.jsxRuntimeExports.jsx(Pe.RegressionLine,{x1:0,x2:x,y1:Lt(0),y2:Lt(x),graphHeight:v,graphWidth:x,className:g?.regLine,style:y?.regLine,color:typeof gt=="string"?gt:void 0,animate:o,isInView:c}):null;let Re;t[87]!==Se?(Re=i.jsxRuntimeExports.jsx("g",{children:Se}),t[87]=Se,t[88]=Re):Re=t[88];let Ee;t[89]!==Y?(Ee=Y.filter(ai).map(si),t[89]=Y,t[90]=Ee):Ee=t[90];let Ce;t[91]===Symbol.for("react.memo_cache_sentinel")?(Ce={fill:"none",pointerEvents:"all"},t[91]=Ce):Ce=t[91];let Me;t[92]!==nt||t[93]!==v||t[94]!==x?(Me=i.jsxRuntimeExports.jsx("rect",{ref:nt,style:Ce,width:x,height:v}),t[92]=nt,t[93]=v,t[94]=x,t[95]=Me):Me=t[95];let Oe;return t[96]!==g?.tooltip||t[97]!==Ct||t[98]!==u||t[99]!==b||t[100]!==y?.tooltip||t[101]!==Q?(Oe=b&&Q&&Ct&&u?i.jsxRuntimeExports.jsx(Fe.Tooltip,{data:b,body:Q,xPos:Ct,yPos:u,backgroundStyle:y?.tooltip,className:g?.tooltip}):null,t[96]=g?.tooltip,t[97]=Ct,t[98]=u,t[99]=b,t[100]=y?.tooltip,t[101]=Q,t[102]=Oe):Oe=t[102],i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.svg,{width:`${K}px`,height:`${Gt}px`,viewBox:`0 0 ${K} ${Gt}`,direction:"ltr",ref:wt,children:i.jsxRuntimeExports.jsxs("g",{transform:`translate(${j.left},${j.top})`,children:[L,i.jsxRuntimeExports.jsx(De.CustomArea,{areaSettings:pe,scaleX:s,scaleY:r,animate:o,isInView:c}),i.jsxRuntimeExports.jsxs("g",{children:[i.jsxRuntimeExports.jsx(Ye.YTicksAndGridLines,{values:te.filter(ui),y:te.filter(ci).map(e=>r(e)),x1:0-T,x2:x+j.right,styles:lt,classNames:X,suffix:q,prefix:M,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:$,locale:O}),pt,S]}),i.jsxRuntimeExports.jsx("g",{children:ee.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))}),D,i.jsxRuntimeExports.jsx(k.motion.path,{style:N,exit:z,variants:{initial:{opacity:0,d:_t(a)||""},whileInView:{opacity:Jt,d:_t(a)||"",transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),Bt?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(k.motion.path,{style:{stroke:E[0],fill:"none",strokeWidth:Bt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:bt(a)||"",opacity:1},whileInView:{pathLength:1,d:bt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),i.jsxRuntimeExports.jsx(k.motion.path,{style:{stroke:E[1],fill:"none",strokeWidth:Bt},exit:{opacity:0,transition:{duration:o.duration}},variants:{initial:{pathLength:0,d:Zt(a)||"",opacity:1},whileInView:{pathLength:1,d:Zt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"})]}):null,i.jsxRuntimeExports.jsx(k.motion.path,{style:Wt,exit:Ht,variants:{initial:{pathLength:0,d:Qt(a)||"",opacity:1},whileInView:{pathLength:1,d:Qt(a)||"",opacity:1,transition:{duration:o.duration}}},initial:"initial",animate:c?"whileInView":"initial"}),b?i.jsxRuntimeExports.jsx("line",{y1:0,y2:v,x1:s(b.date),x2:s(b.date),className:i.mo("undp-tick-line stroke-primary-gray-700 dark:stroke-primary-gray-100",g?.mouseOverLine),style:y?.mouseOverLine}):null,je,se?i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:se.map((e,d)=>i.jsxRuntimeExports.jsx(Ge.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-T,x2:x+j.right,classNames:e.classNames,styles:e.styles,animate:o,isInView:c},d))}):null,we,Re,Ee,Me]})}),Oe]})}function si(n){return n.layer}function ai(n){return n.position==="after"}function ri(n){return n.layer}function li(n){return n.position==="before"}function ci(n){return n!==0}function ui(n){return n!==0}function xi(n){return!P.checkIfNullOrUndefined(n.date)&&!P.checkIfNullOrUndefined(n.y)}function mi(n){return n.date}function pi(n){return Math.max(n.y,n.yMax,n.yMin)}function di(n){return Math.max(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 Math.min(n.y,n.yMax,n.yMin)}function gi(n){return!P.checkIfNullOrUndefined(n.y)}function vi(n){const t=i.compilerRuntimeExports.c(105),{data:h,graphTitle:K,suffix:Gt,sources:A,prefix:q,graphDescription:M,height:l,width:f,footNote:Pt,noOfXTicks:fe,dateFormat:Yt,showValues:T,backgroundColor:Ut,padding:dt,lineColor:Q,leftMargin:Xt,rightMargin:se,topMargin:ae,bottomMargin:ht,tooltip:o,refValues:ft,highlightAreaSettings:Z,relativeHeight:re,onSeriesMouseOver:le,graphID:yt,minValue:gt,maxValue:ce,regressionLine:ye,showIntervalDots:Bt,showIntervalValues:E,intervalLineStrokeWidth:zt,intervalLineColors:Jt,intervalAreaColor:vt,intervalAreaOpacity:ge,graphDownload:ue,dataDownload:xe,animate:jt,language:y,minHeight:g,strokeWidth:$,showDots:Y,annotations:O,customHighlightAreaSettings:wt,theme:Rt,ariaLabel:c,yAxisTitle:m,noOfYTicks:ve,minDate:_,maxDate:tt,colorLegendTitle:et,colorLegendColors:b,colorLegendDomain:Et,curveType:Ct,styles:p,classNames:u,precision:me,customLayers:it,locale:Mt}=n,j=Gt===void 0?"":Gt,nt=q===void 0?"":q,ot=fe===void 0?10:fe,a=Yt===void 0?"yyyy":Yt,st=T===void 0?!1:T,Ot=Ut===void 0?!1:Ut,at=Xt===void 0?30:Xt,pe=se===void 0?30:se,x=ae===void 0?20:ae,v=ht===void 0?25:ht;let Kt;t[0]!==ft?(Kt=ft===void 0?[]:ft,t[0]=ft,t[1]=Kt):Kt=t[1];const de=Kt;let w;t[2]!==Z?(w=Z===void 0?[]:Z,t[2]=Z,t[3]=w):w=t[3];const U=w,s=ye===void 0?!1:ye,rt=Bt===void 0?!1:Bt,r=E===void 0?!1:E,Qt=zt===void 0?0:zt;let bt;t[4]!==Jt?(bt=Jt===void 0?[Ae.Colors.light.grays["gray-500"],Ae.Colors.light.grays["gray-500"]]:Jt,t[4]=Jt,t[5]=bt):bt=t[5];const Zt=bt,_t=vt===void 0?Ae.Colors.primaryColors["blue-100"]:vt,te=ge===void 0?.4:ge,ee=ue===void 0?!1:ue,ie=xe===void 0?!1:xe,Lt=jt===void 0?!1:jt,L=y===void 0?"en":y,kt=g===void 0?0:g,At=$===void 0?2:$,lt=Y===void 0?!0:Y;let ct;t[6]!==O?(ct=O===void 0?[]:O,t[6]=O,t[7]=ct):ct=t[7];const It=ct;let X;t[8]!==wt?(X=wt===void 0?[]:wt,t[8]=wt,t[9]=X):X=t[9];const Vt=X,St=Rt===void 0?"light":Rt,Dt=ve===void 0?5:ve,Nt=Ct===void 0?"curve":Ct,qt=me===void 0?2:me;let I;t[10]!==it?(I=it===void 0?[]:it,t[10]=it,t[11]=I):I=t[11];const Tt=I,$t=Mt===void 0?"en":Mt,[B,ut]=C.useState(0),[xt,he]=C.useState(0),F=C.useRef(null),ne=C.useRef(null);let mt,V;t[12]===Symbol.for("react.memo_cache_sentinel")?(mt=()=>{const Wt=new ResizeObserver(Ht=>{ut(Ht[0].target.clientWidth||620),he(Ht[0].target.clientHeight||480)});return F.current&&Wt.observe(F.current),()=>Wt.disconnect()},V=[],t[12]=mt,t[13]=V):(mt=t[12],V=t[13]),C.useEffect(mt,V);const pt=u?.graphContainer,Ft=p?.graphContainer;let W;t[14]!==u?.description||t[15]!==u?.title||t[16]!==h||t[17]!==ie||t[18]!==M||t[19]!==ee||t[20]!==K||t[21]!==p?.description||t[22]!==p?.title||t[23]!==f?(W=K||M||ee||ie?i.jsxRuntimeExports.jsx(ti.GraphHeader,{styles:{title:p?.title,description:p?.description},classNames:{title:u?.title,description:u?.description},graphTitle:K,graphDescription:M,width:f,graphDownload:ee?ne:void 0,dataDownload:ie?h.map(Ci).filter(Ei).length>0?h.map(Ri).filter(wi):h.filter(ji):null}):null,t[14]=u?.description,t[15]=u?.title,t[16]=h,t[17]=ie,t[18]=M,t[19]=ee,t[20]=K,t[21]=p?.description,t[22]=p?.title,t[23]=f,t[24]=W):W=t[24];let H;t[25]!==u?.colorLegend||t[26]!==b||t[27]!==Et||t[28]!==et||t[29]!==h.length||t[30]!==f?(H=b&&Et&&h.length>0?i.jsxRuntimeExports.jsx(ei.ColorLegend,{width:f,colorLegendTitle:et,colors:b,colorDomain:Et,showNAColor:!1,className:u?.colorLegend}):null,t[25]=u?.colorLegend,t[26]=b,t[27]=Et,t[28]=et,t[29]=h.length,t[30]=f,t[31]=H):H=t[31];let G;t[32]!==h.length?(G=h.length===0&&i.jsxRuntimeExports.jsx(ii.EmptyState,{}),t[32]=h.length,t[33]=G):G=t[33];let S;t[34]!==Lt||t[35]!==It||t[36]!==v||t[37]!==u||t[38]!==Nt||t[39]!==Vt||t[40]!==Tt||t[41]!==h||t[42]!==a||t[43]!==U||t[44]!==_t||t[45]!==te||t[46]!==Zt||t[47]!==Qt||t[48]!==L||t[49]!==at||t[50]!==Q||t[51]!==$t||t[52]!==tt||t[53]!==ce||t[54]!==_||t[55]!==gt||t[56]!==ot||t[57]!==Dt||t[58]!==le||t[59]!==qt||t[60]!==nt||t[61]!==de||t[62]!==s||t[63]!==pe||t[64]!==lt||t[65]!==rt||t[66]!==r||t[67]!==st||t[68]!==At||t[69]!==p||t[70]!==j||t[71]!==xt||t[72]!==B||t[73]!==o||t[74]!==x||t[75]!==m?(S=B&&xt&&h.length>0?i.jsxRuntimeExports.jsx(oi,{data:h,lineColor:Q||Ae.Colors.primaryColors["blue-600"],width:B,height:xt,suffix:j,prefix:nt,dateFormat:a,showValues:st,noOfXTicks:ot??ni.getNoOfTicks(B),leftMargin:at,rightMargin:pe,topMargin:x,bottomMargin:v,tooltip:o,highlightAreaSettings:U,onSeriesMouseOver:le,refValues:de,minValue:gt,maxValue:ce,animate:Lt===!0?{duration:.5,once:!0,amount:.5}:Lt||{duration:0,once:!0,amount:0},rtl:L==="he"||L==="ar",strokeWidth:At,showDots:lt,annotations:It,customHighlightAreaSettings:Vt,regressionLine:s,showIntervalDots:rt,showIntervalValues:r,intervalLineStrokeWidth:Qt,intervalLineColors:Zt,intervalAreaColor:_t,intervalAreaOpacity:te,yAxisTitle:m,noOfYTicks:Dt,minDate:_,maxDate:tt,curveType:Nt,styles:p,classNames:u,precision:qt,customLayers:Tt,locale:$t}):null,t[34]=Lt,t[35]=It,t[36]=v,t[37]=u,t[38]=Nt,t[39]=Vt,t[40]=Tt,t[41]=h,t[42]=a,t[43]=U,t[44]=_t,t[45]=te,t[46]=Zt,t[47]=Qt,t[48]=L,t[49]=at,t[50]=Q,t[51]=$t,t[52]=tt,t[53]=ce,t[54]=_,t[55]=gt,t[56]=ot,t[57]=Dt,t[58]=le,t[59]=qt,t[60]=nt,t[61]=de,t[62]=s,t[63]=pe,t[64]=lt,t[65]=rt,t[66]=r,t[67]=st,t[68]=At,t[69]=p,t[70]=j,t[71]=xt,t[72]=B,t[73]=o,t[74]=x,t[75]=m,t[76]=S):S=t[76];let D;t[77]!==G||t[78]!==S?(D=i.jsxRuntimeExports.jsxs(qe.GraphArea,{ref:F,children:[G,S]}),t[77]=G,t[78]=S,t[79]=D):D=t[79];let N;t[80]!==u?.footnote||t[81]!==u?.source||t[82]!==Pt||t[83]!==A||t[84]!==p?.footnote||t[85]!==p?.source||t[86]!==f?(N=A||Pt?i.jsxRuntimeExports.jsx(_e.GraphFooter,{styles:{footnote:p?.footnote,source:p?.source},classNames:{footnote:u?.footnote,source:u?.source},sources:A,footNote:Pt,width:f}):null,t[80]=u?.footnote,t[81]=u?.source,t[82]=Pt,t[83]=A,t[84]=p?.footnote,t[85]=p?.source,t[86]=f,t[87]=N):N=t[87];let z;return t[88]!==c||t[89]!==Ot||t[90]!==yt||t[91]!==l||t[92]!==L||t[93]!==kt||t[94]!==dt||t[95]!==re||t[96]!==pt||t[97]!==Ft||t[98]!==W||t[99]!==H||t[100]!==D||t[101]!==N||t[102]!==St||t[103]!==f?(z=i.jsxRuntimeExports.jsxs(qe.GraphContainer,{className:pt,style:Ft,id:yt,ref:ne,"aria-label":c,backgroundColor:Ot,theme:St,language:L,minHeight:kt,width:f,height:l,relativeHeight:re,padding:dt,children:[W,H,D,N]}),t[88]=c,t[89]=Ot,t[90]=yt,t[91]=l,t[92]=L,t[93]=kt,t[94]=dt,t[95]=re,t[96]=pt,t[97]=Ft,t[98]=W,t[99]=H,t[100]=D,t[101]=N,t[102]=St,t[103]=f,t[104]=z):z=t[104],z}function ji(n){return n!==void 0}function wi(n){return n!==void 0}function Ri(n){return n.data}function Ei(n){return n!==void 0}function Ci(n){return n.data}exports.LineChartWithConfidenceInterval=vi;
|
|
2
2
|
//# sourceMappingURL=LineChartWithConfidenceInterval.cjs.map
|