@undp/data-viz 2.5.3 → 2.6.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.js +17 -16
- package/dist/AreaChart.js.map +1 -1
- package/dist/Axis-DY7jsk1Y.cjs +2 -0
- package/dist/{Axis-BTaS9oPQ.cjs.map → Axis-DY7jsk1Y.cjs.map} +1 -1
- package/dist/{Axis-CNZYWzH0.js → Axis-RRx-0Rlw.js} +9 -8
- package/dist/{Axis-CNZYWzH0.js.map → Axis-RRx-0Rlw.js.map} +1 -1
- package/dist/AxisTitle-B9F80_Z0.js +30 -0
- package/dist/AxisTitle-B9F80_Z0.js.map +1 -0
- package/dist/AxisTitle-CyFFbdNU.cjs +2 -0
- package/dist/{AxisTitle-DP_evhbe.cjs.map → AxisTitle-CyFFbdNU.cjs.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.js +203 -201
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.js +15 -14
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.js +60 -59
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.js +88 -86
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.js +88 -86
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.js +100 -98
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.js +266 -243
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +4 -4
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.cjs.map +1 -1
- package/dist/ColorLegend.js +17 -16
- package/dist/ColorLegend.js.map +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ColorLegendWithMouseOver.js +13 -12
- package/dist/ColorLegendWithMouseOver.js.map +1 -1
- package/dist/Colors.cjs +1 -1
- package/dist/Colors.cjs.map +1 -1
- package/dist/Colors.d.ts +16 -0
- package/dist/Colors.js +16 -0
- package/dist/Colors.js.map +1 -1
- package/dist/CopyTextButton.cjs +1 -1
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +37 -754
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +4 -4
- package/dist/CsvDownloadButton.cjs.map +1 -1
- package/dist/CsvDownloadButton.js +47 -45
- package/dist/CsvDownloadButton.js.map +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +213 -467
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.js +19 -19
- package/dist/DetailsModal-BmjtLqrZ.cjs +2 -0
- package/dist/{DetailsModal-Du8Fr1QD.cjs.map → DetailsModal-BmjtLqrZ.cjs.map} +1 -1
- package/dist/{DetailsModal-GqEbGHY2.js → DetailsModal-k-Me_U_T.js} +3 -3
- package/dist/{DetailsModal-GqEbGHY2.js.map → DetailsModal-k-Me_U_T.js.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.js +61 -60
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.js +47 -46
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +112 -110
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.js +13 -12
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.js +104 -102
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/EmptyState-BoaUUuo6.cjs +2 -0
- package/dist/{EmptyState-CFmiFPHz.cjs.map → EmptyState-BoaUUuo6.cjs.map} +1 -1
- package/dist/{EmptyState-CaxXCkiN.js → EmptyState-prZ8OnEs.js} +4 -4
- package/dist/{EmptyState-CaxXCkiN.js.map → EmptyState-prZ8OnEs.js.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +1 -1
- package/dist/ExcelDownloadButton.cjs.map +1 -1
- package/dist/ExcelDownloadButton.js +15 -13
- package/dist/ExcelDownloadButton.js.map +1 -1
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.cjs.map +1 -1
- package/dist/FootNote.js +10 -9
- package/dist/FootNote.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +14 -14
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.js +59 -59
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +50 -50
- package/dist/{GraphContainer-B8ZqOzKI.js → GraphContainer-DcOM2CI6.js} +28 -27
- package/dist/GraphContainer-DcOM2CI6.js.map +1 -0
- package/dist/GraphContainer-gaG9TSy4.cjs +2 -0
- package/dist/{GraphContainer-Cul9b74X.cjs.map → GraphContainer-gaG9TSy4.cjs.map} +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.cjs.map +1 -1
- package/dist/GraphDescription.js +14 -13
- package/dist/GraphDescription.js.map +1 -1
- package/dist/{GraphEl-Ch0uAeZw.js → GraphEl-C7KBBHvB.js} +9 -9
- package/dist/{GraphEl-Ch0uAeZw.js.map → GraphEl-C7KBBHvB.js.map} +1 -1
- package/dist/GraphEl-CGALp07K.cjs +2 -0
- package/dist/{GraphEl-BgkDbq50.cjs.map → GraphEl-CGALp07K.cjs.map} +1 -1
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.cjs.map +1 -1
- package/dist/GraphFooter.js +2 -2
- package/dist/GraphHeader.cjs +1 -1
- package/dist/GraphHeader.cjs.map +1 -1
- package/dist/GraphHeader.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.cjs.map +1 -1
- package/dist/GraphTitle.js +14 -13
- package/dist/GraphTitle.js.map +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.js +58 -55
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.cjs.map +1 -1
- package/dist/GriddedGraphsFromConfig.js +15 -15
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.js +17 -16
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.js +3 -3
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +409 -420
- package/dist/HybridMap.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.cjs.map +1 -1
- package/dist/ImageDownloadButton.js +16 -14
- package/dist/ImageDownloadButton.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.js +16 -15
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.cjs.map +1 -1
- package/dist/LinearColorLegend.js +5 -4
- package/dist/LinearColorLegend.js.map +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.js +62 -60
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +7 -7
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +21 -21
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +3 -3
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.js +16 -15
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.js +16 -15
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.js +14 -13
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +67 -65
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +8 -8
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -1
- package/dist/PerformanceIntensiveScrollStory.js +3 -3
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.js +11 -10
- package/dist/RadarChart.js.map +1 -1
- package/dist/ReferenceLine-CxITVT1K.cjs +2 -0
- package/dist/{ReferenceLine-CpU4G01Y.cjs.map → ReferenceLine-CxITVT1K.cjs.map} +1 -1
- package/dist/{ReferenceLine-D41VuUhE.js → ReferenceLine-NF4g3Reh.js} +26 -25
- package/dist/ReferenceLine-NF4g3Reh.js.map +1 -0
- package/dist/RegressionLine-BQ6h-NZP.js +88 -0
- package/dist/RegressionLine-BQ6h-NZP.js.map +1 -0
- package/dist/RegressionLine-BpcVBjL0.cjs +2 -0
- package/dist/{RegressionLine-BFoBiVJk.cjs.map → RegressionLine-BpcVBjL0.cjs.map} +1 -1
- package/dist/SVGDownloadButton.cjs +1 -1
- package/dist/SVGDownloadButton.cjs.map +1 -1
- package/dist/SVGDownloadButton.js +11 -9
- package/dist/SVGDownloadButton.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.js +63 -62
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.js +109 -107
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.cjs.map +1 -1
- package/dist/ScrollStory.js +3 -3
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.js +17 -16
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.js +59 -56
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +6 -6
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.js +12 -12
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +8 -8
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +59 -56
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +7 -7
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.js +60 -59
- package/dist/SlopeChart.js.map +1 -1
- package/dist/Source.cjs +1 -1
- package/dist/Source.cjs.map +1 -1
- package/dist/Source.js +38 -4
- package/dist/Source.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.js +11 -10
- package/dist/SparkLine.js.map +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.js +15 -14
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.js +11 -10
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.js +52 -51
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +17 -16
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/{Tooltip-3EYDVa3w.js → Tooltip-DO56mY4b.js} +11 -10
- package/dist/{Tooltip-3EYDVa3w.js.map → Tooltip-DO56mY4b.js.map} +1 -1
- package/dist/Tooltip-DwUFLDrj.cjs +2 -0
- package/dist/{Tooltip-C9F3uYG0.cjs.map → Tooltip-DwUFLDrj.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.js +34 -33
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.js +27 -27
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.js +21 -20
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/XAxesLabels-0ROJnigy.cjs +2 -0
- package/dist/{XAxesLabels-C03jHniq.cjs.map → XAxesLabels-0ROJnigy.cjs.map} +1 -1
- package/dist/{XAxesLabels-B9gkjUiC.js → XAxesLabels-CPZX3OJN.js} +12 -11
- package/dist/XAxesLabels-CPZX3OJN.js.map +1 -0
- package/dist/XTicksAndGridLines-BO6KJc8d.cjs +2 -0
- package/dist/{XTicksAndGridLines-B4UhDVyU.cjs.map → XTicksAndGridLines-BO6KJc8d.cjs.map} +1 -1
- package/dist/{XTicksAndGridLines-CkYwVshF.js → XTicksAndGridLines-obTK2e7G.js} +10 -9
- package/dist/{XTicksAndGridLines-CkYwVshF.js.map → XTicksAndGridLines-obTK2e7G.js.map} +1 -1
- package/dist/{YAxesLabels-hWEUCTvs.js → YAxesLabels-CwVnFG2a.js} +13 -12
- package/dist/YAxesLabels-CwVnFG2a.js.map +1 -0
- package/dist/YAxesLabels-DIa2cEXL.cjs +2 -0
- package/dist/{YAxesLabels-DeENFC2M.cjs.map → YAxesLabels-DIa2cEXL.cjs.map} +1 -1
- package/dist/YTicksAndGridLines-C7glLI5b.cjs +2 -0
- package/dist/{YTicksAndGridLines-sT3zdCs6.cjs.map → YTicksAndGridLines-C7glLI5b.cjs.map} +1 -1
- package/dist/{YTicksAndGridLines-BbujwxOB.js → YTicksAndGridLines-wtuAKNeT.js} +10 -9
- package/dist/{YTicksAndGridLines-BbujwxOB.js.map → YTicksAndGridLines-wtuAKNeT.js.map} +1 -1
- package/dist/checkIfMultiple-BIEQDuA3.cjs +2 -0
- package/dist/checkIfMultiple-BIEQDuA3.cjs.map +1 -0
- package/dist/checkIfMultiple-D2tgEnYM.js +11 -0
- package/dist/checkIfMultiple-D2tgEnYM.js.map +1 -0
- package/dist/compiler-runtime-oPPev21o.cjs +11 -0
- package/dist/compiler-runtime-oPPev21o.cjs.map +1 -0
- package/dist/compiler-runtime-qHgugrLy.js +297 -0
- package/dist/compiler-runtime-qHgugrLy.js.map +1 -0
- package/dist/customArea-BCGIYDQa.cjs +2 -0
- package/dist/{customArea-BAcQ3pBM.cjs.map → customArea-BCGIYDQa.cjs.map} +1 -1
- package/dist/{customArea-D89lETG0.js → customArea-Dixg0NtQ.js} +10 -9
- package/dist/{customArea-D89lETG0.js.map → customArea-Dixg0NtQ.js.map} +1 -1
- package/dist/{fetchAndParseData-BAXhgTDM.js → fetchAndParseData-CDjQZ1fL.js} +5 -5
- package/dist/{fetchAndParseData-BAXhgTDM.js.map → fetchAndParseData-CDjQZ1fL.js.map} +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/getSliderMarks-Bj_JJTtX.cjs +2 -0
- package/dist/getSliderMarks-Bj_JJTtX.cjs.map +1 -0
- package/dist/getSliderMarks-DSxFGb1f.js +21 -0
- package/dist/getSliderMarks-DSxFGb1f.js.map +1 -0
- package/dist/index-5BQWR1Z8.cjs +10 -0
- package/dist/{index-FXfr51ZM.cjs.map → index-5BQWR1Z8.cjs.map} +1 -1
- package/dist/index-BaXzoD4r.cjs +2 -0
- package/dist/{index-BuhBhuCq.cjs.map → index-BaXzoD4r.cjs.map} +1 -1
- package/dist/{index-Cv_5q6Rb.js → index-CNUlPiEL.js} +3 -3
- package/dist/{index-Cv_5q6Rb.js.map → index-CNUlPiEL.js.map} +1 -1
- package/dist/{index-DHVGV8Df.js → index-CmkqqFRG.js} +3 -3
- package/dist/{index-DHVGV8Df.js.map → index-CmkqqFRG.js.map} +1 -1
- package/dist/index-D_ls5oK8.js +142 -0
- package/dist/index-D_ls5oK8.js.map +1 -0
- package/dist/index-DbSnila_.cjs +2 -0
- package/dist/index-DbSnila_.cjs.map +1 -0
- package/dist/{index-BPyj_6hG.js → index-_w-CQAbR.js} +113 -112
- package/dist/{index-BPyj_6hG.js.map → index-_w-CQAbR.js.map} +1 -1
- package/dist/index-dN3wiQgD.cjs +2 -0
- package/dist/{index-DuLvdHo2.cjs.map → index-dN3wiQgD.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +181 -180
- package/dist/index.js.map +1 -1
- package/dist/{proxy-BsxtcZKa.js → proxy-D31SA_aE.js} +2 -2
- package/dist/{proxy-BsxtcZKa.js.map → proxy-D31SA_aE.js.map} +1 -1
- package/dist/proxy-QMeVVqam.cjs +2 -0
- package/dist/{proxy-CqH8m8IQ.cjs.map → proxy-QMeVVqam.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/transformData.js +2 -2
- package/dist/{transformDataForGraphFromFile-dt9sHTVy.js → transformDataForGraphFromFile-COZC6A0_.js} +4 -4
- package/dist/{transformDataForGraphFromFile-dt9sHTVy.js.map → transformDataForGraphFromFile-COZC6A0_.js.map} +1 -1
- package/dist/{use-in-view-KOXq5Kmc.js → use-in-view-Co5SmzfT.js} +2 -2
- package/dist/{use-in-view-KOXq5Kmc.js.map → use-in-view-Co5SmzfT.js.map} +1 -1
- package/dist/use-in-view-DjR_gqJP.cjs +2 -0
- package/dist/{use-in-view-dnRv_qqF.cjs.map → use-in-view-DjR_gqJP.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/Axis-BTaS9oPQ.cjs +0 -2
- package/dist/AxisTitle-CyLCqpW6.js +0 -29
- package/dist/AxisTitle-CyLCqpW6.js.map +0 -1
- package/dist/AxisTitle-DP_evhbe.cjs +0 -2
- package/dist/DetailsModal-Du8Fr1QD.cjs +0 -2
- package/dist/DropdownSelect-CX1yMemd.cjs +0 -5
- package/dist/DropdownSelect-CX1yMemd.cjs.map +0 -1
- package/dist/DropdownSelect-Dz7imdTB.js +0 -4191
- package/dist/DropdownSelect-Dz7imdTB.js.map +0 -1
- package/dist/EmptyState-CFmiFPHz.cjs +0 -2
- package/dist/GraphContainer-B8ZqOzKI.js.map +0 -1
- package/dist/GraphContainer-Cul9b74X.cjs +0 -2
- package/dist/GraphEl-BgkDbq50.cjs +0 -2
- package/dist/Modal-BIErPPKT.cjs +0 -46
- package/dist/Modal-BIErPPKT.cjs.map +0 -1
- package/dist/Modal-CrUYln5V.js +0 -1047
- package/dist/Modal-CrUYln5V.js.map +0 -1
- package/dist/ReferenceLine-CpU4G01Y.cjs +0 -2
- package/dist/ReferenceLine-D41VuUhE.js.map +0 -1
- package/dist/RegressionLine-BFoBiVJk.cjs +0 -2
- package/dist/RegressionLine-CuwB42I6.js +0 -87
- package/dist/RegressionLine-CuwB42I6.js.map +0 -1
- package/dist/Source-PKuwZOn3.cjs +0 -2
- package/dist/Source-PKuwZOn3.cjs.map +0 -1
- package/dist/Source-QGk8vhkS.js +0 -78
- package/dist/Source-QGk8vhkS.js.map +0 -1
- package/dist/Spinner-B2IIKg9r.js +0 -47
- package/dist/Spinner-B2IIKg9r.js.map +0 -1
- package/dist/Spinner-WHzzloYQ.cjs +0 -2
- package/dist/Spinner-WHzzloYQ.cjs.map +0 -1
- package/dist/Tooltip-C9F3uYG0.cjs +0 -2
- package/dist/Typography-BO0gQDIT.js +0 -270
- package/dist/Typography-BO0gQDIT.js.map +0 -1
- package/dist/Typography-BqmyF1gP.cjs +0 -2
- package/dist/Typography-BqmyF1gP.cjs.map +0 -1
- package/dist/XAxesLabels-B9gkjUiC.js.map +0 -1
- package/dist/XAxesLabels-C03jHniq.cjs +0 -2
- package/dist/XTicksAndGridLines-B4UhDVyU.cjs +0 -2
- package/dist/YAxesLabels-DeENFC2M.cjs +0 -2
- package/dist/YAxesLabels-hWEUCTvs.js.map +0 -1
- package/dist/YTicksAndGridLines-sT3zdCs6.cjs +0 -2
- package/dist/checkIfMultiple-CH5tqj4q.cjs +0 -2
- package/dist/checkIfMultiple-CH5tqj4q.cjs.map +0 -1
- package/dist/checkIfMultiple-Dpyy6BUP.js +0 -938
- package/dist/checkIfMultiple-Dpyy6BUP.js.map +0 -1
- package/dist/customArea-BAcQ3pBM.cjs +0 -2
- package/dist/getSliderMarks-BzrpHrHS.cjs +0 -2
- package/dist/getSliderMarks-BzrpHrHS.cjs.map +0 -1
- package/dist/getSliderMarks-X-_goqH9.js +0 -1027
- package/dist/getSliderMarks-X-_goqH9.js.map +0 -1
- package/dist/index-ApTBN0kp.js +0 -196
- package/dist/index-ApTBN0kp.js.map +0 -1
- package/dist/index-BhI7mBJx.cjs +0 -2
- package/dist/index-BhI7mBJx.cjs.map +0 -1
- package/dist/index-BuhBhuCq.cjs +0 -2
- package/dist/index-CHPV5EwG-BzibaIRc.js +0 -3360
- package/dist/index-CHPV5EwG-BzibaIRc.js.map +0 -1
- package/dist/index-CHPV5EwG-D4pAp7u0.cjs +0 -20
- package/dist/index-CHPV5EwG-D4pAp7u0.cjs.map +0 -1
- package/dist/index-DuLvdHo2.cjs +0 -2
- package/dist/index-FXfr51ZM.cjs +0 -10
- package/dist/index-Scxs_wcm-BAjU0Cob.js +0 -49
- package/dist/index-Scxs_wcm-BAjU0Cob.js.map +0 -1
- package/dist/index-Scxs_wcm-DUDU-Gll.cjs +0 -2
- package/dist/index-Scxs_wcm-DUDU-Gll.cjs.map +0 -1
- package/dist/index-w64Zl8io-DrMm5QSb.cjs +0 -2
- package/dist/index-w64Zl8io-DrMm5QSb.cjs.map +0 -1
- package/dist/index-w64Zl8io-ihagHOdP.js +0 -459
- package/dist/index-w64Zl8io-ihagHOdP.js.map +0 -1
- package/dist/proxy-CqH8m8IQ.cjs +0 -2
- package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs +0 -4
- package/dist/toConsumableArray-DiWOvh_d-DcLaZvDq.cjs.map +0 -1
- package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js +0 -145
- package/dist/toConsumableArray-DiWOvh_d-DlpOlgap.js.map +0 -1
- package/dist/use-in-view-dnRv_qqF.cjs +0 -2
- package/dist/x-BXShoIAM-BC2sxios.cjs +0 -2
- package/dist/x-BXShoIAM-BC2sxios.cjs.map +0 -1
- package/dist/x-BXShoIAM-D6VWO6z5.js +0 -74
- package/dist/x-BXShoIAM-D6VWO6z5.js.map +0 -1
package/dist/ThreeDGlobe.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreeDGlobe.cjs","sources":["../node_modules/hex-to-rgba/build/index.js","../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["\"use strict\";\n\nvar removeHash = function removeHash(hex) {\n return hex.charAt(0) === '#' ? hex.slice(1) : hex;\n};\n\nvar parseHex = function parseHex(nakedHex) {\n var isShort = nakedHex.length === 3 || nakedHex.length === 4;\n var twoDigitHexR = isShort ? \"\".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);\n var twoDigitHexG = isShort ? \"\".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);\n var twoDigitHexB = isShort ? \"\".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);\n var twoDigitHexA = (isShort ? \"\".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));\n\n return {\n r: twoDigitHexR,\n g: twoDigitHexG,\n b: twoDigitHexB,\n a: twoDigitHexA\n };\n};\n\nvar hexToDecimal = function hexToDecimal(hex) {\n return parseInt(hex, 16);\n};\n\nvar hexesToDecimals = function hexesToDecimals(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b,\n a = _ref.a;\n return {\n r: hexToDecimal(r),\n g: hexToDecimal(g),\n b: hexToDecimal(b),\n a: +(hexToDecimal(a) / 255).toFixed(2)\n };\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}; // eslint-disable-line no-restricted-globals, max-len\n\n\nvar formatRgb = function formatRgb(decimalObject, parameterA) {\n var r = decimalObject.r,\n g = decimalObject.g,\n b = decimalObject.b,\n parsedA = decimalObject.a;\n var a = isNumeric(parameterA) ? parameterA : parsedA;\n return \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(a, \")\");\n};\n/**\n * Turns an old-fashioned css hex color value into a rgb color value.\n *\n * If you specify an alpha value, you'll get a rgba() value instead.\n *\n * @param The hex value to convert. ('123456'. '#123456', ''123', '#123')\n * @param An alpha value to apply. (optional) ('0.5', '0.25')\n * @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')\n */\n\n\nvar hexToRgba = function hexToRgba(hex, a) {\n var hashlessHex = removeHash(hex);\n var hexObject = parseHex(hashlessHex);\n var decimalObject = hexesToDecimals(hexObject);\n return formatRgb(decimalObject, a);\n};\n\nmodule.exports = hexToRgba;","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport hexToRgba from 'hex-to-rgba';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n LightConfig,\r\n NumberFormatOptions,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { getCentroidCoordinates } from '@/Utils/getCentroidCoordinates';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: (number | string)[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.Material;\r\n lights: LightConfig[];\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds?: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n atmosphereAltitude: number;\r\n globeCurvatureResolution: number;\r\n fogSettings?: FogDataType;\r\n highlightedAltitude: number;\r\n selectedId?: string;\r\n collapseColorScaleByDefault?: boolean;\r\n dimmedOpacity: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n}\r\n\r\nfunction createLightFromConfig(config: LightConfig): THREE.Light {\r\n let light: THREE.Light;\r\n\r\n switch (config.type) {\r\n case 'ambient':\r\n light = new THREE.AmbientLight(config.color, config.intensity);\r\n break;\r\n case 'directional':\r\n light = new THREE.DirectionalLight(config.color, config.intensity);\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z === undefined ? -1 : config.target.z,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.DirectionalLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.DirectionalLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.DirectionalLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.DirectionalLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.DirectionalLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n case 'point':\r\n light = new THREE.PointLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n break;\r\n case 'spot':\r\n light = new THREE.SpotLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.angle || Math.PI / 3,\r\n config.penumbra || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z || 0,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.SpotLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.SpotLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.SpotLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.SpotLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.SpotLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error('Unknown light type');\r\n }\r\n\r\n return light;\r\n}\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n atmosphereAltitude,\r\n globeCurvatureResolution,\r\n fogSettings,\r\n lights,\r\n highlightedAltitude,\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n dimmedOpacity,\r\n numberDisplayOptions,\r\n } = props;\r\n const [globeReady, setGlobeReady] = useState(false);\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\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 if (globeEl.current) {\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n }\r\n }, [enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData || selectedId) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }\r\n }, [mouseOverData, selectedId, autoRotate]);\r\n useEffect(() => {\r\n if (globeEl.current && selectedId) {\r\n const selectedPolygon = polygonData.find(\r\n (d: any) => d.properties[mapProperty] === selectedId,\r\n );\r\n const [lng, lat] = getCentroidCoordinates(selectedPolygon);\r\n globeEl.current.pointOfView({ lat, lng, altitude: scale }, 1000);\r\n }\r\n }, [selectedId, scale, polygonData, mapProperty]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials =\r\n globeMaterial ||\r\n new THREE.MeshBasicMaterial({\r\n color: '#FFF',\r\n });\r\n const setupCustomLighting = useCallback(() => {\r\n if (!globeEl.current) return;\r\n\r\n const scene = globeEl.current.scene();\r\n const camera = globeEl.current.camera();\r\n\r\n let lightsAndObjToRemove: THREE.Object3D[] = [];\r\n scene.traverse(obj => {\r\n if (obj instanceof THREE.Light) {\r\n lightsAndObjToRemove.push(obj);\r\n }\r\n });\r\n lightsAndObjToRemove = [...lightsAndObjToRemove, ...camera.children];\r\n lightsAndObjToRemove.forEach(light => light.parent?.remove(light));\r\n\r\n const lightConfig = lights.map(config => createLightFromConfig(config));\r\n lightConfig.forEach((light, i) => {\r\n if (lights[i].type !== 'ambient' && lights[i].position === 'camera') {\r\n camera.add(light);\r\n if (lights[i].type !== 'point') {\r\n camera.add((light as THREE.DirectionalLight | THREE.SpotLight).target);\r\n }\r\n } else {\r\n scene.add(light);\r\n }\r\n });\r\n\r\n if (fogSettings) {\r\n scene.fog = new THREE.Fog(fogSettings.color, fogSettings.near, fogSettings.far);\r\n }\r\n }, [lights, fogSettings]);\r\n\r\n const handleGlobeReady = () => {\r\n setGlobeReady(true);\r\n setupCustomLighting();\r\n };\r\n useEffect(() => {\r\n if (globeReady) {\r\n setupCustomLighting();\r\n }\r\n }, [globeReady, setupCustomLighting]);\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n height={height}\r\n width={width}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds?.includes(polygon?.properties?.[mapProperty]) ||\r\n polygon?.properties?.[mapProperty] === selectedId\r\n ? highlightedAltitude\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id ||\r\n polygon?.properties?.[mapProperty] === mouseClickData?.id\r\n ? highlightedAltitude\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onGlobeClick={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerLat,\r\n lng: centerLng,\r\n });\r\n const scene = globeEl.current.scene();\r\n setTimeout(() => {\r\n const polygons = scene.children[3]?.children[0]?.children[4]?.children || [];\r\n polygons.forEach(d => {\r\n const line = d.children[1];\r\n line.renderOrder = 2;\r\n });\r\n }, 300);\r\n const camera = globeEl.current.camera();\r\n scene.add(camera);\r\n handleGlobeReady();\r\n }\r\n }}\r\n />\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 {colorLegendTitle && colorLegendTitle !== '' ? (\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 {colorLegendTitle}\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 key={i} className='cursor-pointer'>\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 style={{\r\n fill: colors[i],\r\n 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 numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\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 style={{\r\n fill: colors[colorDomain.length],\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 key={i} className='flex gap-2 items-center'>\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 {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\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 </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n Languages,\r\n LightConfig,\r\n NumberFormatOptions,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\r\n\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 /** Colors for the choropleth map. Make sure the the colors are in hex code, any other format can cause issues. */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.Material;\r\n /** Defines the lights for the 3D scene */\r\n lights?: LightConfig[];\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** The max altitude of the atmosphere, in terms of globe radius units. */\r\n atmosphereAltitude?: number;\r\n /** Resolution in angular degrees of the sphere curvature. The finer the resolution, the more the globe is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. */\r\n globeCurvatureResolution?: number;\r\n /** Defines fog settings for the scene. */\r\n fogSettings?: FogDataType;\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 /** Countries or regions to be highlighted */\r\n selectedId?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the altitude of the highlighted countries or the countries on mouseover. */\r\n highlightedAltitude?: number;\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\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\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.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 colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds,\r\n highlightedAltitude = 0.1,\r\n dimmedOpacity = 0.3,\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n globeCurvatureResolution = 4,\r\n atmosphereAltitude = 0.15,\r\n fogSettings,\r\n lights = [\r\n {\r\n type: 'ambient',\r\n color: 0x404040,\r\n intensity: 0.4,\r\n },\r\n {\r\n type: 'directional',\r\n color: 0xffffff,\r\n intensity: 1,\r\n position: { x: 5, y: 10, z: 5 },\r\n },\r\n ],\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n numberDisplayOptions,\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n onUpdateShape(features);\r\n } else onUpdateShape(d.features);\r\n });\r\n } else {\r\n onUpdateShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === '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 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 || 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={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 <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (scaleType === '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 mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light' ? Colors.light.grays['gray-700'] : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n fogSettings={fogSettings}\r\n lights={lights}\r\n highlightedAltitude={highlightedAltitude}\r\n selectedId={selectedId}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n dimmedOpacity={dimmedOpacity}\r\n numberDisplayOptions={numberDisplayOptions}\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":["removeHash","hex","parseHex","nakedHex","isShort","twoDigitHexR","twoDigitHexG","twoDigitHexB","twoDigitHexA","hexToDecimal","hexesToDecimals","_ref","r","g","b","a","isNumeric","n","formatRgb","decimalObject","parameterA","parsedA","hexToRgba","hashlessHex","hexObject","build","createLightFromConfig","config","light","type","THREE","AmbientLight","color","intensity","DirectionalLight","position","set","x","y","z","target","undefined","castShadow","shadow","mapSize","width","height","camera","near","far","PointLight","distance","decay","SpotLight","angle","Math","PI","penumbra","Error","Graph","props","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","atmosphereAltitude","globeCurvatureResolution","fogSettings","lights","highlightedAltitude","selectedId","collapseColorScaleByDefault","dimmedOpacity","numberDisplayOptions","globeReady","setGlobeReady","useState","globeEl","useRef","mouseClickData","setMouseClickData","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","current","controls","autoRotateSpeed","selectedPolygon","find","d","properties","lng","lat","getCentroidCoordinates","pointOfView","altitude","canvas","renderer","domElement","handleMouseMove","e","clientX","clientY","addEventListener","removeEventListener","materials","MeshBasicMaterial","setupCustomLighting","useCallback","scene","lightsAndObjToRemove","traverse","obj","Light","push","children","forEach","parent","remove","map","i","add","fog","Fog","handleGlobeReady","jsxs","jsx","Globe","polygon","includes","id","opacity","val","el","clickedData","isEqual","hoverData","setTimeout","line","renderOrder","cn","colorLegend","Fragment","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","length","fill","stroke","textAnchor","numberFormattingFunction","precision","locale","padZeros","ExpandIcon","Tooltip","DetailsModal","modal","ThreeDGlobe","$","_c","mapData","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","padding","t3","t4","t5","relativeHeight","graphID","t6","dataDownload","t7","language","t8","minHeight","t9","theme","t10","ariaLabel","t11","t12","centerPoint","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","Colors","graphNoData","grays","t25","t26","t27","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","t28","t29","Symbol","for","resizeObserver","ResizeObserver","entries","clientWidth","clientHeight","observe","disconnect","t30","shape","onUpdateShape","useEffectEvent","t31","fetchAndParseJSON","then","features","_temp","t32","t33","getUniqValue","getJenks","_temp2","t34","graphContainer","t35","t36","description","title","GraphHeader","_temp3","filter","_temp4","_temp5","_temp6","_temp7","t37","GraphArea","sequentialColors","max","Spinner","t38","footnote","source","GraphFooter","t39","GraphContainer","d_3","d_2","d_1","d_5","d_4","d_0","geometry","reversed","coordinates","reverse","coord","c","reversed_0","geometry_0"],"mappings":"2tCAEA,IAAIA,EAAa,SAAoBC,EAAK,CACxC,OAAOA,EAAI,OAAO,CAAC,IAAM,IAAMA,EAAI,MAAM,CAAC,EAAIA,CAChD,EAEIC,EAAW,SAAkBC,EAAU,CACzC,IAAIC,EAAUD,EAAS,SAAW,GAAKA,EAAS,SAAW,EACvDE,EAAeD,EAAU,GAAG,OAAOD,EAAS,MAAM,EAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,EAAG,CAAC,CAAC,EAAIA,EAAS,MAAM,EAAG,CAAC,EAC3GG,EAAeF,EAAU,GAAG,OAAOD,EAAS,MAAM,EAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,EAAG,CAAC,CAAC,EAAIA,EAAS,MAAM,EAAG,CAAC,EAC3GI,EAAeH,EAAU,GAAG,OAAOD,EAAS,MAAM,EAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,EAAG,CAAC,CAAC,EAAIA,EAAS,MAAM,EAAG,CAAC,EAC3GK,GAAgBJ,EAAU,GAAG,OAAOD,EAAS,MAAM,EAAG,CAAC,CAAC,EAAE,OAAOA,EAAS,MAAM,EAAG,CAAC,CAAC,EAAIA,EAAS,MAAM,EAAG,CAAC,IAAM,KAEtH,MAAO,CACL,EAAGE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4I,SAASE,YAAY,CAAA,CAAG,EAACC,QAAAA,EAChDH,EAAiB,CAAA,GAAK5I,EAAE4I,SAASE,YAAe,CAACD,CAAQ,CAAA,EAAI,MACtD,CAAA,GAAK7I,EAAE4I,SAAAA,CAAAA,CAAY,CAG5B,MAAAI,EAAmB,CAAA,EAEnBhJ,EAAE4I,SAASE,YAAY/J,QAASkK,GAAA,CAC9B,MAAAC,EAAiB,CAAA,GAAID,IAAI,EAACF,QAAAA,EAC1BC,EAAKnK,KAAM,CAACgK,CAAQ,CAAC,CAAC,CACvB,EACD,MAAAM,EAAiB,CAAA,GAAKnJ,EAAE4I,SAASE,YAAeE,CAAAA,EAAQ,MACjD,CAAA,GAAKhJ,EAAE4I,SAAEA,CAAAA,CAAU","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"ThreeDGlobe.cjs","sources":["../node_modules/hex-to-rgba/build/index.js","../src/Components/Graphs/Maps/ThreeDGlobe/Graph.tsx","../src/Components/Graphs/Maps/ThreeDGlobe/index.tsx"],"sourcesContent":["\"use strict\";\n\nvar removeHash = function removeHash(hex) {\n return hex.charAt(0) === '#' ? hex.slice(1) : hex;\n};\n\nvar parseHex = function parseHex(nakedHex) {\n var isShort = nakedHex.length === 3 || nakedHex.length === 4;\n var twoDigitHexR = isShort ? \"\".concat(nakedHex.slice(0, 1)).concat(nakedHex.slice(0, 1)) : nakedHex.slice(0, 2);\n var twoDigitHexG = isShort ? \"\".concat(nakedHex.slice(1, 2)).concat(nakedHex.slice(1, 2)) : nakedHex.slice(2, 4);\n var twoDigitHexB = isShort ? \"\".concat(nakedHex.slice(2, 3)).concat(nakedHex.slice(2, 3)) : nakedHex.slice(4, 6);\n var twoDigitHexA = (isShort ? \"\".concat(nakedHex.slice(3, 4)).concat(nakedHex.slice(3, 4)) : nakedHex.slice(6, 8)) || 'ff'; // const numericA = +((parseInt(a, 16) / 255).toFixed(2));\n\n return {\n r: twoDigitHexR,\n g: twoDigitHexG,\n b: twoDigitHexB,\n a: twoDigitHexA\n };\n};\n\nvar hexToDecimal = function hexToDecimal(hex) {\n return parseInt(hex, 16);\n};\n\nvar hexesToDecimals = function hexesToDecimals(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b,\n a = _ref.a;\n return {\n r: hexToDecimal(r),\n g: hexToDecimal(g),\n b: hexToDecimal(b),\n a: +(hexToDecimal(a) / 255).toFixed(2)\n };\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}; // eslint-disable-line no-restricted-globals, max-len\n\n\nvar formatRgb = function formatRgb(decimalObject, parameterA) {\n var r = decimalObject.r,\n g = decimalObject.g,\n b = decimalObject.b,\n parsedA = decimalObject.a;\n var a = isNumeric(parameterA) ? parameterA : parsedA;\n return \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(a, \")\");\n};\n/**\n * Turns an old-fashioned css hex color value into a rgb color value.\n *\n * If you specify an alpha value, you'll get a rgba() value instead.\n *\n * @param The hex value to convert. ('123456'. '#123456', ''123', '#123')\n * @param An alpha value to apply. (optional) ('0.5', '0.25')\n * @return An rgb or rgba value. ('rgb(11, 22, 33)'. 'rgba(11, 22, 33, 0.5)')\n */\n\n\nvar hexToRgba = function hexToRgba(hex, a) {\n var hashlessHex = removeHash(hex);\n var hexObject = parseHex(hashlessHex);\n var decimalObject = hexesToDecimals(hexObject);\n return formatRgb(decimalObject, a);\n};\n\nmodule.exports = hexToRgba;","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport Globe, { GlobeMethods } from 'react-globe.gl';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { useCallback, useEffect, useRef, useState } from 'react';\r\nimport { scaleOrdinal, scaleThreshold } from 'd3-scale';\r\nimport * as THREE from 'three';\r\nimport { P } from '@undp/design-system-react/Typography';\r\nimport { cn } from '@undp/design-system-react/cn';\r\nimport hexToRgba from 'hex-to-rgba';\r\n\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n LightConfig,\r\n NumberFormatOptions,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\nimport { ExpandIcon, X } from '@/Components/Icons';\r\nimport { getCentroidCoordinates } from '@/Utils/getCentroidCoordinates';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\n\r\ninterface Props {\r\n width: number;\r\n data: ChoroplethMapDataType[];\r\n autoRotate: number;\r\n enableZoom: boolean;\r\n categorical: boolean;\r\n colorDomain: (number | string)[];\r\n colors: string[];\r\n height: number;\r\n globeMaterial?: THREE.Material;\r\n lights: LightConfig[];\r\n polygonData: any;\r\n mapProperty: string;\r\n mapBorderColor: string;\r\n atmosphereColor: string;\r\n tooltip?: string | ((_d: any) => React.ReactNode);\r\n styles?: StyleObject;\r\n classNames?: ClassNameObject;\r\n onSeriesMouseOver?: (_d: any) => void;\r\n onSeriesMouseClick?: (_d: any) => void;\r\n mapNoDataColor: string;\r\n colorLegendTitle?: string;\r\n showColorScale: boolean;\r\n hoverStrokeColor: string;\r\n detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n resetSelectionOnDoubleClick: boolean;\r\n highlightedIds?: string[];\r\n scale: number;\r\n globeOffset: [number, number];\r\n polygonAltitude: number;\r\n centerLng: number;\r\n centerLat: number;\r\n atmosphereAltitude: number;\r\n globeCurvatureResolution: number;\r\n fogSettings?: FogDataType;\r\n highlightedAltitude: number;\r\n selectedId?: string;\r\n collapseColorScaleByDefault?: boolean;\r\n dimmedOpacity: number;\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n}\r\n\r\nfunction createLightFromConfig(config: LightConfig): THREE.Light {\r\n let light: THREE.Light;\r\n\r\n switch (config.type) {\r\n case 'ambient':\r\n light = new THREE.AmbientLight(config.color, config.intensity);\r\n break;\r\n case 'directional':\r\n light = new THREE.DirectionalLight(config.color, config.intensity);\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z === undefined ? -1 : config.target.z,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.DirectionalLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.DirectionalLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.DirectionalLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.DirectionalLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.DirectionalLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n case 'point':\r\n light = new THREE.PointLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n break;\r\n case 'spot':\r\n light = new THREE.SpotLight(\r\n config.color,\r\n config.intensity,\r\n config.distance || 0,\r\n config.angle || Math.PI / 3,\r\n config.penumbra || 0,\r\n config.decay || 2,\r\n );\r\n if (config.position) {\r\n if (config.position === 'camera') light.position.set(0, 0, 0);\r\n else light.position.set(config.position.x, config.position.y, config.position.z);\r\n }\r\n if (config.target || config.position === 'camera') {\r\n (light as THREE.SpotLight).target.position.set(\r\n config.target?.x || 0,\r\n config.target?.y || 0,\r\n config.target?.z || 0,\r\n );\r\n }\r\n if (config.castShadow) {\r\n (light as THREE.SpotLight).castShadow = true;\r\n if (config.shadow) {\r\n (light as THREE.SpotLight).shadow.mapSize.width = config.shadow.mapSize.width;\r\n (light as THREE.SpotLight).shadow.mapSize.height = config.shadow.mapSize.height;\r\n (light as THREE.SpotLight).shadow.camera.near = config.shadow.camera.near;\r\n (light as THREE.SpotLight).shadow.camera.far = config.shadow.camera.far;\r\n }\r\n }\r\n break;\r\n default:\r\n throw new Error('Unknown light type');\r\n }\r\n\r\n return light;\r\n}\r\nfunction Graph(props: Props) {\r\n const {\r\n width,\r\n autoRotate,\r\n data,\r\n enableZoom,\r\n categorical,\r\n colorDomain,\r\n colors,\r\n globeMaterial,\r\n height,\r\n polygonData,\r\n mapProperty,\r\n mapBorderColor,\r\n atmosphereColor,\r\n tooltip,\r\n styles,\r\n classNames,\r\n mapNoDataColor,\r\n colorLegendTitle,\r\n showColorScale,\r\n hoverStrokeColor,\r\n detailsOnClick,\r\n onSeriesMouseClick,\r\n onSeriesMouseOver,\r\n resetSelectionOnDoubleClick,\r\n highlightedIds,\r\n scale,\r\n globeOffset,\r\n polygonAltitude,\r\n centerLng,\r\n centerLat,\r\n atmosphereAltitude,\r\n globeCurvatureResolution,\r\n fogSettings,\r\n lights,\r\n highlightedAltitude,\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n dimmedOpacity,\r\n numberDisplayOptions,\r\n } = props;\r\n const [globeReady, setGlobeReady] = useState(false);\r\n const globeEl = useRef<GlobeMethods | undefined>(undefined);\r\n const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n\r\n const [showLegend, setShowLegend] = useState(\r\n collapseColorScaleByDefault === undefined ? !(width < 680) : !collapseColorScaleByDefault,\r\n );\r\n const [mousePos, setMousePos] = useState({ x: 0, y: 0 });\r\n const [mouseOverData, setMouseOverData] = useState<ChoroplethMapDataType | undefined>(undefined);\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 if (globeEl.current) {\r\n globeEl.current.controls().enableZoom = enableZoom;\r\n }\r\n }, [enableZoom]);\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n if (mouseOverData || selectedId) {\r\n globeEl.current.controls().autoRotate = false;\r\n } else {\r\n globeEl.current.controls().autoRotate = autoRotate === 0 ? false : true;\r\n globeEl.current.controls().autoRotateSpeed = autoRotate;\r\n }\r\n }\r\n }, [mouseOverData, selectedId, autoRotate]);\r\n useEffect(() => {\r\n if (globeEl.current && selectedId) {\r\n const selectedPolygon = polygonData.find(\r\n (d: any) => d.properties[mapProperty] === selectedId,\r\n );\r\n const [lng, lat] = getCentroidCoordinates(selectedPolygon);\r\n globeEl.current.pointOfView({ lat, lng, altitude: scale }, 1000);\r\n }\r\n }, [selectedId, scale, polygonData, mapProperty]);\r\n\r\n useEffect(() => {\r\n const canvas = globeEl.current?.renderer().domElement;\r\n if (!canvas) return;\r\n\r\n const handleMouseMove = (e: MouseEvent) => {\r\n setMousePos({ x: e.clientX, y: e.clientY });\r\n };\r\n\r\n canvas.addEventListener('mousemove', handleMouseMove);\r\n return () => canvas.removeEventListener('mousemove', handleMouseMove);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({ lat: centerLat, lng: centerLng, altitude: scale }, 1000);\r\n }\r\n }, [scale, centerLng, centerLat]);\r\n const materials =\r\n globeMaterial ||\r\n new THREE.MeshBasicMaterial({\r\n color: '#FFF',\r\n });\r\n const setupCustomLighting = useCallback(() => {\r\n if (!globeEl.current) return;\r\n\r\n const scene = globeEl.current.scene();\r\n const camera = globeEl.current.camera();\r\n\r\n let lightsAndObjToRemove: THREE.Object3D[] = [];\r\n scene.traverse(obj => {\r\n if (obj instanceof THREE.Light) {\r\n lightsAndObjToRemove.push(obj);\r\n }\r\n });\r\n lightsAndObjToRemove = [...lightsAndObjToRemove, ...camera.children];\r\n lightsAndObjToRemove.forEach(light => light.parent?.remove(light));\r\n\r\n const lightConfig = lights.map(config => createLightFromConfig(config));\r\n lightConfig.forEach((light, i) => {\r\n if (lights[i].type !== 'ambient' && lights[i].position === 'camera') {\r\n camera.add(light);\r\n if (lights[i].type !== 'point') {\r\n camera.add((light as THREE.DirectionalLight | THREE.SpotLight).target);\r\n }\r\n } else {\r\n scene.add(light);\r\n }\r\n });\r\n\r\n if (fogSettings) {\r\n scene.fog = new THREE.Fog(fogSettings.color, fogSettings.near, fogSettings.far);\r\n }\r\n }, [lights, fogSettings]);\r\n\r\n const handleGlobeReady = () => {\r\n setGlobeReady(true);\r\n setupCustomLighting();\r\n };\r\n useEffect(() => {\r\n if (globeReady) {\r\n setupCustomLighting();\r\n }\r\n }, [globeReady, setupCustomLighting]);\r\n return (\r\n <div className='relative'>\r\n <Globe\r\n ref={globeEl}\r\n height={height}\r\n width={width}\r\n globeOffset={globeOffset}\r\n lineHoverPrecision={0}\r\n polygonsData={polygonData}\r\n polygonAltitude={(polygon: any) =>\r\n highlightedIds?.includes(polygon?.properties?.[mapProperty]) ||\r\n polygon?.properties?.[mapProperty] === selectedId\r\n ? highlightedAltitude\r\n : polygon?.properties?.[mapProperty] === mouseOverData?.id ||\r\n polygon?.properties?.[mapProperty] === mouseClickData?.id\r\n ? highlightedAltitude\r\n : polygonAltitude\r\n }\r\n polygonCapColor={(polygon: any) => {\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonSideColor={(polygon: any) => {\r\n const id = polygon?.properties?.[mapProperty];\r\n const val = data.find(el => el.id === id)?.x;\r\n const opacity = selectedId\r\n ? polygon?.properties?.[mapProperty] === selectedId\r\n ? 1\r\n : dimmedOpacity\r\n : highlightedIds\r\n ? highlightedIds.includes(polygon?.properties?.[mapProperty])\r\n ? 1\r\n : dimmedOpacity\r\n : 1;\r\n const color = val !== undefined && val !== null ? colorScale(val as any) : mapNoDataColor;\r\n return hexToRgba(color, `${opacity}`);\r\n }}\r\n polygonStrokeColor={(polygon: any) =>\r\n polygon?.properties?.[mapProperty] === mouseOverData?.id\r\n ? hoverStrokeColor\r\n : mapBorderColor\r\n }\r\n onGlobeClick={() => {\r\n setMouseClickData(undefined);\r\n }}\r\n onPolygonClick={(polygon: any) => {\r\n const clickedData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n if (onSeriesMouseClick || detailsOnClick) {\r\n if (\r\n isEqual(mouseClickData, clickedData) &&\r\n resetSelectionOnDoubleClick &&\r\n clickedData\r\n ) {\r\n setMouseClickData(undefined);\r\n onSeriesMouseClick?.(undefined);\r\n } else {\r\n setMouseClickData(clickedData);\r\n onSeriesMouseClick?.(clickedData);\r\n }\r\n }\r\n }}\r\n onPolygonHover={(polygon: any) => {\r\n const hoverData = polygon?.properties?.[mapProperty]\r\n ? data.find(el => el.id === polygon?.properties?.[mapProperty])\r\n : undefined;\r\n setMouseOverData(hoverData);\r\n onSeriesMouseOver?.(hoverData);\r\n }}\r\n atmosphereColor={atmosphereColor}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n globeMaterial={materials}\r\n backgroundColor='rgba(0, 0, 0, 0)'\r\n polygonsTransitionDuration={100}\r\n onGlobeReady={() => {\r\n if (globeEl.current) {\r\n globeEl.current.pointOfView({\r\n lat: centerLat,\r\n lng: centerLng,\r\n });\r\n const scene = globeEl.current.scene();\r\n setTimeout(() => {\r\n const polygons = scene.children[3]?.children[0]?.children[4]?.children || [];\r\n polygons.forEach(d => {\r\n const line = d.children[1];\r\n line.renderOrder = 2;\r\n });\r\n }, 300);\r\n const camera = globeEl.current.camera();\r\n scene.add(camera);\r\n handleGlobeReady();\r\n }\r\n }}\r\n />\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 {colorLegendTitle && colorLegendTitle !== '' ? (\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 {colorLegendTitle}\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 key={i} className='cursor-pointer'>\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 style={{\r\n fill: colors[i],\r\n 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 numberDisplayOptions?.precision ?? 2,\r\n undefined,\r\n undefined,\r\n numberDisplayOptions?.locale || 'en',\r\n numberDisplayOptions?.padZeros || false,\r\n )}\r\n </text>\r\n </g>\r\n ))}\r\n <g>\r\n <rect\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 style={{\r\n fill: colors[colorDomain.length],\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 key={i} className='flex gap-2 items-center'>\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 {mouseOverData && tooltip ? (\r\n <Tooltip\r\n data={mouseOverData}\r\n body={tooltip}\r\n xPos={mousePos.x}\r\n yPos={mousePos.y}\r\n backgroundStyle={styles?.tooltip}\r\n className={classNames?.tooltip}\r\n />\r\n ) : null}\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 </div>\r\n );\r\n}\r\n\r\nexport default Graph;\r\n","import React, { useEffect, useEffectEvent, useRef, useState } from 'react';\r\nimport { Spinner } from '@undp/design-system-react/Spinner';\r\nimport * as THREE from 'three';\r\n\r\nimport Graph from './Graph';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ChoroplethMapDataType,\r\n ClassNameObject,\r\n FogDataType,\r\n Languages,\r\n LightConfig,\r\n NumberFormatOptions,\r\n ScaleDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { getUniqValue } from '@/Utils/getUniqValue';\r\nimport { getJenks } from '@/Utils/getJenks';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n // Data\r\n /** Array of data objects */\r\n data: ChoroplethMapDataType[];\r\n\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 /** Colors for the choropleth map. Make sure the the colors are in hex code, any other format can cause issues. */\r\n colors?: string[];\r\n /** Domain of colors for the graph */\r\n colorDomain?: number[] | string[];\r\n /** Title for the color legend */\r\n colorLegendTitle?: 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 /** Map data as an object in geoJson format or a url for geoJson */\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n mapData?: any;\r\n /** Stroke color of the regions in the map */\r\n mapBorderColor?: string;\r\n /** Center point of the map */\r\n centerPoint?: [number, number];\r\n /** Defines if the globe rotates automatically */\r\n autoRotate?: number | boolean;\r\n /** Defines the material property applied to the sphere of the globe */\r\n globeMaterial?: THREE.Material;\r\n /** Defines the lights for the 3D scene */\r\n lights?: LightConfig[];\r\n /** Defines the colo of the glow around the globe */\r\n atmosphereColor?: string;\r\n /** Defines if the globe can be zoomed when scrolled */\r\n enableZoom?: boolean;\r\n /** Position offset of the globe relative to the canvas center */\r\n globeOffset?: [number, number];\r\n /** Defines the camera distance from Earth. This helps in defining the default size of the globe. Smaller = closer camera therefore the globe is bigger) */\r\n scale?: number;\r\n /** Defines the spacing between the country shape polygon with the sphere */\r\n polygonAltitude?: number;\r\n /** Scale for the colors */\r\n scaleType?: Exclude<ScaleDataType, 'linear'>;\r\n /** Toggle visibility of color scale. */\r\n showColorScale?: boolean;\r\n /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n /** Toggle if color scale is collapsed by default. */\r\n collapseColorScaleByDefault?: boolean;\r\n /** The max altitude of the atmosphere, in terms of globe radius units. */\r\n atmosphereAltitude?: number;\r\n /** Resolution in angular degrees of the sphere curvature. The finer the resolution, the more the globe is fragmented into smaller faces to approximate the spheric surface, at the cost of performance. */\r\n globeCurvatureResolution?: number;\r\n /** Defines fog settings for the scene. */\r\n fogSettings?: FogDataType;\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 /** Countries or regions to be highlighted */\r\n selectedId?: string;\r\n /** Countries or regions to be highlighted */\r\n highlightedIds?: string[];\r\n /** Defines the altitude of the highlighted countries or the countries on mouseover. */\r\n highlightedAltitude?: number;\r\n /** Defines the opacity of the non-highlighted data */\r\n dimmedOpacity?: number;\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\n/** For using these maps you will have to install [`three`](https://threejs.org/manual/) and [react-globe.gl](https://www.npmjs.com/package/react-globe.gl) package to your project */\r\nexport function ThreeDGlobe(props: Props) {\r\n const {\r\n data,\r\n mapData = 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.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 colorDomain,\r\n colorLegendTitle,\r\n scaleType = 'threshold',\r\n padding,\r\n mapNoDataColor = Colors.light.graphNoData,\r\n backgroundColor = false,\r\n mapBorderColor = Colors.light.grays['gray-500'],\r\n relativeHeight,\r\n tooltip,\r\n graphID,\r\n mapProperty = 'ISO3',\r\n dataDownload = false,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n autoRotate = true,\r\n enableZoom = true,\r\n globeMaterial,\r\n centerPoint = [0, 0],\r\n atmosphereColor = '#999',\r\n showColorScale = true,\r\n resetSelectionOnDoubleClick = true,\r\n detailsOnClick,\r\n onSeriesMouseOver,\r\n onSeriesMouseClick,\r\n highlightedIds,\r\n highlightedAltitude = 0.1,\r\n dimmedOpacity = 0.3,\r\n scale = 1,\r\n globeOffset = [0, 0],\r\n polygonAltitude = 0.01,\r\n globeCurvatureResolution = 4,\r\n atmosphereAltitude = 0.15,\r\n fogSettings,\r\n lights = [\r\n {\r\n type: 'ambient',\r\n color: 0x404040,\r\n intensity: 0.4,\r\n },\r\n {\r\n type: 'directional',\r\n color: 0xffffff,\r\n intensity: 1,\r\n position: { x: 5, y: 10, z: 5 },\r\n },\r\n ],\r\n selectedId,\r\n collapseColorScaleByDefault,\r\n numberDisplayOptions,\r\n } = props;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const [mapShape, setMapShape] = useState<any>(undefined);\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(entries[0].target.clientWidth || 620);\r\n setSvgHeight(entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, []);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const onUpdateShape = useEffectEvent((shape: any) => {\r\n setMapShape(shape);\r\n });\r\n useEffect(() => {\r\n if (typeof mapData === 'string') {\r\n const fetchData = fetchAndParseJSON(mapData);\r\n fetchData.then(d => {\r\n if (\r\n mapData ===\r\n 'https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json'\r\n ) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const features = d.features.map((el: any) => {\r\n if (el.geometry.type === 'Polygon') {\r\n const reversed = [...el.geometry.coordinates[0]].reverse();\r\n const geometry = { ...el.geometry, coordinates: [reversed] };\r\n return { ...el, geometry };\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const coord: any = [];\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n el.geometry.coordinates.forEach((c: any) => {\r\n const reversed = [...c[0]].reverse();\r\n coord.push([reversed]);\r\n });\r\n const geometry = { ...el.geometry, coordinates: coord };\r\n return { ...el, geometry };\r\n });\r\n onUpdateShape(features);\r\n } else onUpdateShape(d.features);\r\n });\r\n } else {\r\n onUpdateShape(mapData.features);\r\n }\r\n }, [mapData]);\r\n\r\n const domain =\r\n colorDomain ||\r\n (scaleType === '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 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 || 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={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 <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight && mapShape ? (\r\n <Graph\r\n data={data}\r\n globeOffset={globeOffset}\r\n polygonData={mapShape}\r\n colorDomain={domain}\r\n width={svgWidth}\r\n height={svgHeight}\r\n colors={\r\n colors ||\r\n (scaleType === '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 mapNoDataColor={mapNoDataColor}\r\n categorical={scaleType === 'categorical'}\r\n mapBorderColor={mapBorderColor}\r\n tooltip={tooltip}\r\n mapProperty={mapProperty}\r\n styles={styles}\r\n classNames={classNames}\r\n autoRotate={autoRotate === true ? 1.5 : autoRotate === false ? 0 : autoRotate}\r\n enableZoom={enableZoom}\r\n globeMaterial={globeMaterial}\r\n atmosphereColor={atmosphereColor}\r\n colorLegendTitle={colorLegendTitle}\r\n showColorScale={showColorScale}\r\n hoverStrokeColor={\r\n theme === 'light' ? Colors.light.grays['gray-700'] : Colors.light.grays['gray-300']\r\n }\r\n highlightedIds={highlightedIds}\r\n resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n detailsOnClick={detailsOnClick}\r\n onSeriesMouseOver={onSeriesMouseOver}\r\n onSeriesMouseClick={onSeriesMouseClick}\r\n scale={scale}\r\n polygonAltitude={polygonAltitude}\r\n centerLat={centerPoint[0]}\r\n centerLng={centerPoint[1]}\r\n atmosphereAltitude={atmosphereAltitude}\r\n globeCurvatureResolution={globeCurvatureResolution}\r\n fogSettings={fogSettings}\r\n lights={lights}\r\n highlightedAltitude={highlightedAltitude}\r\n selectedId={selectedId}\r\n collapseColorScaleByDefault={collapseColorScaleByDefault}\r\n dimmedOpacity={dimmedOpacity}\r\n numberDisplayOptions={numberDisplayOptions}\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":["removeHash","hex","parseHex","nakedHex","isShort","twoDigitHexR","twoDigitHexG","twoDigitHexB","twoDigitHexA","hexToDecimal","hexesToDecimals","_ref","r","g","b","a","isNumeric","n","formatRgb","decimalObject","parameterA","parsedA","hexToRgba","hashlessHex","hexObject","build","createLightFromConfig","config","light","type","THREE","AmbientLight","color","intensity","DirectionalLight","position","set","x","y","z","target","undefined","castShadow","shadow","mapSize","width","height","camera","near","far","PointLight","distance","decay","SpotLight","angle","Math","PI","penumbra","Error","Graph","props","autoRotate","data","enableZoom","categorical","colorDomain","colors","globeMaterial","polygonData","mapProperty","mapBorderColor","atmosphereColor","tooltip","styles","classNames","mapNoDataColor","colorLegendTitle","showColorScale","hoverStrokeColor","detailsOnClick","onSeriesMouseClick","onSeriesMouseOver","resetSelectionOnDoubleClick","highlightedIds","scale","globeOffset","polygonAltitude","centerLng","centerLat","atmosphereAltitude","globeCurvatureResolution","fogSettings","lights","highlightedAltitude","selectedId","collapseColorScaleByDefault","dimmedOpacity","numberDisplayOptions","globeReady","setGlobeReady","useState","globeEl","useRef","mouseClickData","setMouseClickData","showLegend","setShowLegend","mousePos","setMousePos","mouseOverData","setMouseOverData","colorScale","scaleOrdinal","domain","range","scaleThreshold","useEffect","current","controls","autoRotateSpeed","selectedPolygon","find","d","properties","lng","lat","getCentroidCoordinates","pointOfView","altitude","canvas","renderer","domElement","handleMouseMove","e","clientX","clientY","addEventListener","removeEventListener","materials","MeshBasicMaterial","setupCustomLighting","useCallback","scene","lightsAndObjToRemove","traverse","obj","Light","push","children","forEach","parent","remove","map","i","add","fog","Fog","handleGlobeReady","jsxs","jsx","Globe","polygon","includes","id","opacity","val","el","clickedData","isEqual","hoverData","setTimeout","line","renderOrder","cn","colorLegend","Fragment","X","P","display","WebkitLineClamp","WebkitBoxOrient","backgroundColor","length","fill","stroke","textAnchor","numberFormattingFunction","precision","locale","padZeros","ExpandIcon","Tooltip","DetailsModal","modal","ThreeDGlobe","$","_c","mapData","t0","graphTitle","sources","graphDescription","footNote","t1","scaleType","t2","padding","t3","t4","t5","relativeHeight","graphID","t6","dataDownload","t7","language","t8","minHeight","t9","theme","t10","ariaLabel","t11","t12","centerPoint","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t24","Colors","graphNoData","grays","t25","t26","t27","mapShape","setMapShape","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphDiv","graphParentDiv","t28","t29","Symbol","for","resizeObserver","ResizeObserver","entries","clientWidth","clientHeight","observe","disconnect","t30","shape","onUpdateShape","useEffectEvent","t31","fetchAndParseJSON","then","features","_temp","t32","t33","getUniqValue","getJenks","_temp2","t34","graphContainer","t35","t36","description","title","GraphHeader","_temp3","filter","_temp4","_temp5","_temp6","_temp7","t37","GraphArea","sequentialColors","max","Spinner","t38","footnote","source","GraphFooter","t39","GraphContainer","d_3","d_2","d_1","d_5","d_4","d_0","geometry","reversed","coordinates","reverse","coord","c","reversed_0","geometry_0"],"mappings":"8xCAEA,IAAIA,EAAa,SAAoBC,EAAK,CACxC,OAAOA,EAAI,OAAO,CAAC,IAAM,IAAMA,EAAI,MAAM,CAAC,EAAIA,CAChD,EAEIC,EAAW,SAAkBC,EAAU,CACzC,IAAIC,EAAUD,EAAS,SAAW,GAAKA,EAAS,SAAW,EACvDE,EAAeD,EAAU,GAAG,OAAOD,EAAS,MAAM,EAAG,CAAC,CAAC,EAAE,OAAOA,EA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AAA,EA7HjBuG,EA6HiB,CA/Pd,SAAAV,GAAAY,EAAA,CAAA,OAmK4BlL,IAAMjF,MAAS,CAnK3C,SAAAsP,GAAAc,EAAA,CAAA,OAkK6CnL,IAAMjF,MAAS,CAlK5D,SAAAqP,GAAAgB,EAAA,CAAA,OAkKyBpL,EAAC5D,IAAK,CAlK/B,SAAA+N,GAAAkB,EAAA,CAAA,OAiK2CrL,IAAMjF,MAAS,CAjK1D,SAAAkP,GAAAqB,EAAA,CAAA,OAiKuBtL,EAAC5D,IAAK,CAjK7B,SAAAqN,GAAA8B,EAAA,CAAA,OA8HiBvL,EAACrF,CAA+B,CA9HjD,SAAAyO,GAAAxG,EAAA,CAkGK,GAAIA,EAAE4I,SAASrR,OAAU,UAAS,CAChC,MAAAsR,EAAiB,CAAA,GAAI7I,EAAE4I,SAASE,YAAY,CAAA,CAAG,EAACC,QAAAA,EAChDH,EAAiB,CAAA,GAAK5I,EAAE4I,SAASE,YAAe,CAACD,CAAQ,CAAA,EAAI,MACtD,CAAA,GAAK7I,EAAE4I,SAAAA,CAAAA,CAAY,CAG5B,MAAAI,EAAmB,CAAA,EAEnBhJ,EAAE4I,SAASE,YAAY/J,QAASkK,GAAA,CAC9B,MAAAC,EAAiB,CAAA,GAAID,IAAI,EAACF,QAAAA,EAC1BC,EAAKnK,KAAM,CAACgK,CAAQ,CAAC,CAAC,CACvB,EACD,MAAAM,EAAiB,CAAA,GAAKnJ,EAAE4I,SAASE,YAAeE,CAAAA,EAAQ,MACjD,CAAA,GAAKhJ,EAAE4I,SAAEA,CAAAA,CAAU","x_google_ignoreList":[0]}
|
package/dist/ThreeDGlobe.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { j as i,
|
|
2
|
-
import { useState as I, useRef as Ke, useEffect as G, useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { i as
|
|
1
|
+
import { j as i, c as nt } from "./compiler-runtime-qHgugrLy.js";
|
|
2
|
+
import { useState as I, useRef as Ke, useEffect as G, useCallback as lt, useEffectEvent as ct } from "react";
|
|
3
|
+
import { Spinner as dt } from "@undp/design-system-react/Spinner";
|
|
4
|
+
import pt from "react-globe.gl";
|
|
5
|
+
import { i as ht } from "./index-Bwrro8-q.js";
|
|
6
6
|
import * as $ from "three";
|
|
7
|
-
import {
|
|
7
|
+
import { P as Qe } from "@undp/design-system-react/Typography";
|
|
8
|
+
import { cn as mt } from "@undp/design-system-react/cn";
|
|
8
9
|
import { g as ut } from "./_commonjsHelpers-ByX85dGu.js";
|
|
9
|
-
import { T as gt } from "./Tooltip-
|
|
10
|
+
import { T as gt } from "./Tooltip-DO56mY4b.js";
|
|
10
11
|
import { n as ft } from "./numberFormattingFunction-BUUV_luR.js";
|
|
11
|
-
import { X as vt, E as yt } from "./index-
|
|
12
|
+
import { X as vt, E as yt } from "./index-D_ls5oK8.js";
|
|
12
13
|
import { g as bt } from "./getCentroidCoordinates-s0OOUjLF.js";
|
|
13
|
-
import { D as xt } from "./DetailsModal-
|
|
14
|
+
import { D as xt } from "./DetailsModal-k-Me_U_T.js";
|
|
14
15
|
import { o as wt } from "./ordinal-CHaxGJ_l.js";
|
|
15
16
|
import { t as Ct } from "./threshold-DFfqcDMa.js";
|
|
16
17
|
import { GraphHeader as Dt } from "./GraphHeader.js";
|
|
17
18
|
import { GraphFooter as St } from "./GraphFooter.js";
|
|
18
|
-
import {
|
|
19
|
+
import { b as jt } from "./fetchAndParseData-CDjQZ1fL.js";
|
|
19
20
|
import { Colors as ae } from "./Colors.js";
|
|
20
21
|
import { g as Nt } from "./getUniqValue-DsqSii6M.js";
|
|
21
22
|
import { g as Rt } from "./getJenks-DTCcQSDi.js";
|
|
22
|
-
import { a as kt, G as Ot } from "./GraphContainer-
|
|
23
|
+
import { a as kt, G as Ot } from "./GraphContainer-DcOM2CI6.js";
|
|
23
24
|
var Ye, et;
|
|
24
|
-
function
|
|
25
|
+
function Pt() {
|
|
25
26
|
if (et) return Ye;
|
|
26
27
|
et = 1;
|
|
27
28
|
var t = function(o) {
|
|
28
29
|
return o.charAt(0) === "#" ? o.slice(1) : o;
|
|
29
30
|
}, e = function(o) {
|
|
30
|
-
var n = o.length === 3 || o.length === 4, f = n ? "".concat(o.slice(0, 1)).concat(o.slice(0, 1)) : o.slice(0, 2), s = n ? "".concat(o.slice(1, 2)).concat(o.slice(1, 2)) : o.slice(2, 4), w = n ? "".concat(o.slice(2, 3)).concat(o.slice(2, 3)) : o.slice(4, 6),
|
|
31
|
+
var n = o.length === 3 || o.length === 4, f = n ? "".concat(o.slice(0, 1)).concat(o.slice(0, 1)) : o.slice(0, 2), s = n ? "".concat(o.slice(1, 2)).concat(o.slice(1, 2)) : o.slice(2, 4), w = n ? "".concat(o.slice(2, 3)).concat(o.slice(2, 3)) : o.slice(4, 6), P = (n ? "".concat(o.slice(3, 4)).concat(o.slice(3, 4)) : o.slice(6, 8)) || "ff";
|
|
31
32
|
return {
|
|
32
33
|
r: f,
|
|
33
34
|
g: s,
|
|
34
35
|
b: w,
|
|
35
|
-
a:
|
|
36
|
+
a: P
|
|
36
37
|
};
|
|
37
38
|
}, d = function(o) {
|
|
38
39
|
return parseInt(o, 16);
|
|
@@ -47,17 +48,17 @@ function Et() {
|
|
|
47
48
|
}, x = function(o) {
|
|
48
49
|
return !isNaN(parseFloat(o)) && isFinite(o);
|
|
49
50
|
}, D = function(o, n) {
|
|
50
|
-
var f = o.r, s = o.g, w = o.b,
|
|
51
|
-
return "rgba(".concat(f, ", ").concat(s, ", ").concat(w, ", ").concat(
|
|
51
|
+
var f = o.r, s = o.g, w = o.b, P = o.a, E = x(n) ? n : P;
|
|
52
|
+
return "rgba(".concat(f, ", ").concat(s, ", ").concat(w, ", ").concat(E, ")");
|
|
52
53
|
}, g = function(o, n) {
|
|
53
54
|
var f = t(o), s = e(f), w = b(s);
|
|
54
55
|
return D(w, n);
|
|
55
56
|
};
|
|
56
57
|
return Ye = g, Ye;
|
|
57
58
|
}
|
|
58
|
-
var
|
|
59
|
-
const tt = /* @__PURE__ */ ut(
|
|
60
|
-
function
|
|
59
|
+
var Et = Pt();
|
|
60
|
+
const tt = /* @__PURE__ */ ut(Et);
|
|
61
|
+
function Lt(t) {
|
|
61
62
|
let e;
|
|
62
63
|
switch (t.type) {
|
|
63
64
|
case "ambient":
|
|
@@ -91,8 +92,8 @@ function zt(t) {
|
|
|
91
92
|
polygonData: f,
|
|
92
93
|
mapProperty: s,
|
|
93
94
|
mapBorderColor: w,
|
|
94
|
-
atmosphereColor:
|
|
95
|
-
tooltip:
|
|
95
|
+
atmosphereColor: P,
|
|
96
|
+
tooltip: E,
|
|
96
97
|
styles: be,
|
|
97
98
|
classNames: W,
|
|
98
99
|
mapNoDataColor: ie,
|
|
@@ -103,7 +104,7 @@ function zt(t) {
|
|
|
103
104
|
onSeriesMouseClick: V,
|
|
104
105
|
onSeriesMouseOver: xe,
|
|
105
106
|
resetSelectionOnDoubleClick: we,
|
|
106
|
-
highlightedIds:
|
|
107
|
+
highlightedIds: L,
|
|
107
108
|
scale: z,
|
|
108
109
|
globeOffset: m,
|
|
109
110
|
polygonAltitude: u,
|
|
@@ -154,13 +155,13 @@ function zt(t) {
|
|
|
154
155
|
}, [z, _, J]);
|
|
155
156
|
const S = o || new $.MeshBasicMaterial({
|
|
156
157
|
color: "#FFF"
|
|
157
|
-
}), B =
|
|
158
|
+
}), B = lt(() => {
|
|
158
159
|
if (!p.current) return;
|
|
159
160
|
const r = p.current.scene(), a = p.current.camera();
|
|
160
161
|
let c = [];
|
|
161
162
|
r.traverse((h) => {
|
|
162
163
|
h instanceof $.Light && c.push(h);
|
|
163
|
-
}), c = [...c, ...a.children], c.forEach((h) => h.parent?.remove(h)), T.map((h) =>
|
|
164
|
+
}), c = [...c, ...a.children], c.forEach((h) => h.parent?.remove(h)), T.map((h) => Lt(h)).forEach((h, j) => {
|
|
164
165
|
T[j].type !== "ambient" && T[j].position === "camera" ? (a.add(h), T[j].type !== "point" && a.add(h.target)) : r.add(h);
|
|
165
166
|
}), M && (r.fog = new $.Fog(M.color, M.near, M.far));
|
|
166
167
|
}, [T, M]), k = () => {
|
|
@@ -169,21 +170,21 @@ function zt(t) {
|
|
|
169
170
|
return G(() => {
|
|
170
171
|
de && B();
|
|
171
172
|
}, [de, B]), /* @__PURE__ */ i.jsxs("div", { className: "relative", children: [
|
|
172
|
-
/* @__PURE__ */ i.jsx(
|
|
173
|
-
const a = v ? r?.properties?.[s] === v ? 1 : A :
|
|
173
|
+
/* @__PURE__ */ i.jsx(pt, { ref: p, height: n, width: e, globeOffset: m, lineHoverPrecision: 0, polygonsData: f, polygonAltitude: (r) => L?.includes(r?.properties?.[s]) || r?.properties?.[s] === v || r?.properties?.[s] === N?.id || r?.properties?.[s] === R?.id ? ce : u, polygonCapColor: (r) => {
|
|
174
|
+
const a = v ? r?.properties?.[s] === v ? 1 : A : L ? L.includes(r?.properties?.[s]) ? 1 : A : 1, c = r?.properties?.[s], y = b.find((j) => j.id === c)?.x, h = y != null ? ee(y) : ie;
|
|
174
175
|
return tt(h, `${a}`);
|
|
175
176
|
}, polygonSideColor: (r) => {
|
|
176
|
-
const a = r?.properties?.[s], c = b.find((j) => j.id === a)?.x, y = v ? r?.properties?.[s] === v ? 1 : A :
|
|
177
|
+
const a = r?.properties?.[s], c = b.find((j) => j.id === a)?.x, y = v ? r?.properties?.[s] === v ? 1 : A : L ? L.includes(r?.properties?.[s]) ? 1 : A : 1, h = c != null ? ee(c) : ie;
|
|
177
178
|
return tt(h, `${y}`);
|
|
178
179
|
}, polygonStrokeColor: (r) => r?.properties?.[s] === N?.id ? ne : w, onGlobeClick: () => {
|
|
179
180
|
q(void 0);
|
|
180
181
|
}, onPolygonClick: (r) => {
|
|
181
182
|
const a = r?.properties?.[s] ? b.find((c) => c.id === r?.properties?.[s]) : void 0;
|
|
182
|
-
(V || Z) && (
|
|
183
|
+
(V || Z) && (ht(R, a) && we && a ? (q(void 0), V?.(void 0)) : (q(a), V?.(a)));
|
|
183
184
|
}, onPolygonHover: (r) => {
|
|
184
185
|
const a = r?.properties?.[s] ? b.find((c) => c.id === r?.properties?.[s]) : void 0;
|
|
185
186
|
he(a), xe?.(a);
|
|
186
|
-
}, atmosphereColor:
|
|
187
|
+
}, atmosphereColor: P, atmosphereAltitude: le, globeCurvatureResolution: X, globeMaterial: S, backgroundColor: "rgba(0, 0, 0, 0)", polygonsTransitionDuration: 100, onGlobeReady: () => {
|
|
187
188
|
if (p.current) {
|
|
188
189
|
p.current.pointOfView({
|
|
189
190
|
lat: J,
|
|
@@ -200,7 +201,7 @@ function zt(t) {
|
|
|
200
201
|
r.add(a), k();
|
|
201
202
|
}
|
|
202
203
|
} }),
|
|
203
|
-
se === !1 ? null : /* @__PURE__ */ i.jsx("div", { className:
|
|
204
|
+
se === !1 ? null : /* @__PURE__ */ i.jsx("div", { className: mt("absolute left-4 bottom-4 map-color-legend", W?.colorLegend), children: De ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
204
205
|
/* @__PURE__ */ i.jsx("div", { className: "color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]", onClick: () => {
|
|
205
206
|
pe(!1);
|
|
206
207
|
}, children: /* @__PURE__ */ i.jsx(vt, {}) }),
|
|
@@ -236,12 +237,12 @@ function zt(t) {
|
|
|
236
237
|
] }) : /* @__PURE__ */ i.jsx("button", { type: "button", className: "p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button", onClick: () => {
|
|
237
238
|
pe(!0);
|
|
238
239
|
}, children: /* @__PURE__ */ i.jsx(yt, {}) }) }),
|
|
239
|
-
N &&
|
|
240
|
+
N && E ? /* @__PURE__ */ i.jsx(gt, { data: N, body: E, xPos: K.x, yPos: K.y, backgroundStyle: be?.tooltip, className: W?.tooltip }) : null,
|
|
240
241
|
Z && R !== void 0 ? /* @__PURE__ */ i.jsx(xt, { body: Z, data: R, setData: q, className: W?.modal }) : null
|
|
241
242
|
] });
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
-
const e =
|
|
244
|
+
function co(t) {
|
|
245
|
+
const e = nt.c(96), {
|
|
245
246
|
data: d,
|
|
246
247
|
mapData: b,
|
|
247
248
|
graphTitle: x,
|
|
@@ -253,8 +254,8 @@ function lo(t) {
|
|
|
253
254
|
footNote: f,
|
|
254
255
|
colorDomain: s,
|
|
255
256
|
colorLegendTitle: w,
|
|
256
|
-
scaleType:
|
|
257
|
-
padding:
|
|
257
|
+
scaleType: P,
|
|
258
|
+
padding: E,
|
|
258
259
|
mapNoDataColor: be,
|
|
259
260
|
backgroundColor: W,
|
|
260
261
|
mapBorderColor: ie,
|
|
@@ -265,7 +266,7 @@ function lo(t) {
|
|
|
265
266
|
dataDownload: V,
|
|
266
267
|
language: xe,
|
|
267
268
|
minHeight: we,
|
|
268
|
-
theme:
|
|
269
|
+
theme: L,
|
|
269
270
|
ariaLabel: z,
|
|
270
271
|
styles: m,
|
|
271
272
|
classNames: u,
|
|
@@ -292,7 +293,7 @@ function lo(t) {
|
|
|
292
293
|
selectedId: N,
|
|
293
294
|
collapseColorScaleByDefault: he,
|
|
294
295
|
numberDisplayOptions: ee
|
|
295
|
-
} = t, S = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, B = f === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : f, k =
|
|
296
|
+
} = t, S = b === void 0 ? "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json" : b, B = f === void 0 ? "The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries." : f, k = P === void 0 ? "threshold" : P, r = be === void 0 ? ae.light.graphNoData : be, a = W === void 0 ? !1 : W, c = ie === void 0 ? ae.light.grays["gray-500"] : ie, y = Z === void 0 ? "ISO3" : Z, h = V === void 0 ? !1 : V, j = xe === void 0 ? "en" : xe, O = we === void 0 ? 0 : we, F = L === void 0 ? "light" : L, me = _ === void 0 ? !0 : _, Ae = J === void 0 ? !0 : J;
|
|
296
297
|
let Se;
|
|
297
298
|
e[0] !== X ? (Se = X === void 0 ? [0, 0] : X, e[0] = X, e[1] = Se) : Se = e[1];
|
|
298
299
|
const je = Se, Be = M === void 0 ? "#999" : M, Fe = T === void 0 ? !0 : T, Ge = ce === void 0 ? !0 : ce, Ie = de === void 0 ? 0.1 : de, Ue = Ce === void 0 ? 0.3 : Ce, qe = p === void 0 ? 1 : p;
|
|
@@ -315,20 +316,20 @@ function lo(t) {
|
|
|
315
316
|
}
|
|
316
317
|
}] : Q, e[4] = Q, e[5] = Re) : Re = e[5];
|
|
317
318
|
const Ve = Re, [ke, ot] = I(void 0), [H, rt] = I(0), [ue, at] = I(0), _e = Ke(null), it = Ke(null);
|
|
318
|
-
let Oe,
|
|
319
|
+
let Oe, Pe;
|
|
319
320
|
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Oe = () => {
|
|
320
321
|
const ve = new ResizeObserver((ye) => {
|
|
321
322
|
rt(ye[0].target.clientWidth || 620), at(ye[0].target.clientHeight || 480);
|
|
322
323
|
});
|
|
323
324
|
return _e.current && ve.observe(_e.current), () => ve.disconnect();
|
|
324
|
-
},
|
|
325
|
-
let
|
|
326
|
-
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
325
|
+
}, Pe = [], e[6] = Oe, e[7] = Pe) : (Oe = e[6], Pe = e[7]), G(Oe, Pe);
|
|
326
|
+
let Ee;
|
|
327
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Ee = (ve) => {
|
|
327
328
|
ot(ve);
|
|
328
|
-
}, e[8] =
|
|
329
|
-
const ge =
|
|
330
|
-
let
|
|
331
|
-
e[9] !== S || e[10] !== ge ? (
|
|
329
|
+
}, e[8] = Ee) : Ee = e[8];
|
|
330
|
+
const ge = ct(Ee);
|
|
331
|
+
let Le;
|
|
332
|
+
e[9] !== S || e[10] !== ge ? (Le = () => {
|
|
332
333
|
typeof S == "string" ? jt(S).then((ye) => {
|
|
333
334
|
if (S === "https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json") {
|
|
334
335
|
const st = ye.features.map(It);
|
|
@@ -336,9 +337,9 @@ function lo(t) {
|
|
|
336
337
|
} else
|
|
337
338
|
ge(ye.features);
|
|
338
339
|
}) : ge(S.features);
|
|
339
|
-
}, e[9] = S, e[10] = ge, e[11] =
|
|
340
|
+
}, e[9] = S, e[10] = ge, e[11] = Le) : Le = e[11];
|
|
340
341
|
let ze;
|
|
341
|
-
e[12] !== S ? (ze = [S], e[12] = S, e[13] = ze) : ze = e[13], G(
|
|
342
|
+
e[12] !== S ? (ze = [S], e[12] = S, e[13] = ze) : ze = e[13], G(Le, ze);
|
|
342
343
|
let Me;
|
|
343
344
|
e[14] !== s || e[15] !== D?.length || e[16] !== d || e[17] !== k ? (Me = s || (k === "categorical" ? Nt(d, "x") : Rt(d.map(Gt), D?.length || 4)), e[14] = s, e[15] = D?.length, e[16] = d, e[17] = k, e[18] = Me) : Me = e[18];
|
|
344
345
|
const fe = Me, Je = u?.graphContainer, Xe = m?.graphContainer;
|
|
@@ -353,7 +354,7 @@ function lo(t) {
|
|
|
353
354
|
let oe;
|
|
354
355
|
e[29] !== Ze || e[30] !== Be || e[31] !== me || e[32] !== je || e[33] !== u || e[34] !== he || e[35] !== w || e[36] !== D || e[37] !== d || e[38] !== v || e[39] !== Ue || e[40] !== fe || e[41] !== Ae || e[42] !== K || e[43] !== We || e[44] !== le || e[45] !== He || e[46] !== o || e[47] !== Ie || e[48] !== U || e[49] !== Ve || e[50] !== c || e[51] !== r || e[52] !== y || e[53] !== ke || e[54] !== O || e[55] !== ee || e[56] !== A || e[57] !== Y || e[58] !== $e || e[59] !== C || e[60] !== Ge || e[61] !== qe || e[62] !== k || e[63] !== N || e[64] !== Fe || e[65] !== m || e[66] !== ue || e[67] !== H || e[68] !== F || e[69] !== se || e[70] !== n ? (oe = /* @__PURE__ */ i.jsx(kt, { ref: _e, children: H && ue && ke ? /* @__PURE__ */ i.jsx(zt, { data: d, globeOffset: He, polygonData: ke, colorDomain: fe, width: H, height: ue, colors: D || (k === "categorical" ? ae[F].sequentialColors[`neutralColorsx0${fe.length}`] : ae[F].sequentialColors[`neutralColorsx0${fe.length + 1}`]), mapNoDataColor: r, categorical: k === "categorical", mapBorderColor: c, tooltip: se, mapProperty: y, styles: m, classNames: u, autoRotate: me === !0 ? 1.5 : me === !1 ? 0 : me, enableZoom: Ae, globeMaterial: le, atmosphereColor: Be, colorLegendTitle: w, showColorScale: Fe, hoverStrokeColor: F === "light" ? ae.light.grays["gray-700"] : ae.light.grays["gray-300"], highlightedIds: U, resetSelectionOnDoubleClick: Ge, detailsOnClick: v, onSeriesMouseOver: Y, onSeriesMouseClick: A, scale: qe, polygonAltitude: $e, centerLat: je[0], centerLng: je[1], atmosphereAltitude: Ze, globeCurvatureResolution: We, fogSettings: K, lights: Ve, highlightedAltitude: Ie, selectedId: N, collapseColorScaleByDefault: he, dimmedOpacity: Ue, numberDisplayOptions: ee }) : /* @__PURE__ */ i.jsx("div", { style: {
|
|
355
356
|
height: `${Math.max(O, o || (C ? O ? (n || H) * C > O ? (n || H) * C : O : (n || H) * C : ue))}px`
|
|
356
|
-
}, className: "flex items-center justify-center", children: /* @__PURE__ */ i.jsx(
|
|
357
|
+
}, className: "flex items-center justify-center", children: /* @__PURE__ */ i.jsx(dt, { "aria-label": "Loading graph" }) }) }), e[29] = Ze, e[30] = Be, e[31] = me, e[32] = je, e[33] = u, e[34] = he, e[35] = w, e[36] = D, e[37] = d, e[38] = v, e[39] = Ue, e[40] = fe, e[41] = Ae, e[42] = K, e[43] = We, e[44] = le, e[45] = He, e[46] = o, e[47] = Ie, e[48] = U, e[49] = Ve, e[50] = c, e[51] = r, e[52] = y, e[53] = ke, e[54] = O, e[55] = ee, e[56] = A, e[57] = Y, e[58] = $e, e[59] = C, e[60] = Ge, e[61] = qe, e[62] = k, e[63] = N, e[64] = Fe, e[65] = m, e[66] = ue, e[67] = H, e[68] = F, e[69] = se, e[70] = n, e[71] = oe) : oe = e[71];
|
|
357
358
|
let re;
|
|
358
359
|
e[72] !== u?.footnote || e[73] !== u?.source || e[74] !== B || e[75] !== g || e[76] !== m?.footnote || e[77] !== m?.source || e[78] !== n ? (re = g || B ? /* @__PURE__ */ i.jsx(St, { styles: {
|
|
359
360
|
footnote: m?.footnote,
|
|
@@ -363,11 +364,11 @@ function lo(t) {
|
|
|
363
364
|
source: u?.source
|
|
364
365
|
}, sources: g, footNote: B, width: n }) : null, e[72] = u?.footnote, e[73] = u?.source, e[74] = B, e[75] = g, e[76] = m?.footnote, e[77] = m?.source, e[78] = n, e[79] = re) : re = e[79];
|
|
365
366
|
let Te;
|
|
366
|
-
return e[80] !== z || e[81] !== a || e[82] !== ne || e[83] !== o || e[84] !== j || e[85] !== O || e[86] !==
|
|
367
|
+
return e[80] !== z || e[81] !== a || e[82] !== ne || e[83] !== o || e[84] !== j || e[85] !== O || e[86] !== E || e[87] !== C || e[88] !== Je || e[89] !== Xe || e[90] !== te || e[91] !== oe || e[92] !== re || e[93] !== F || e[94] !== n ? (Te = /* @__PURE__ */ i.jsxs(Ot, { className: Je, style: Xe, id: ne, ref: it, "aria-label": z, backgroundColor: a, theme: F, language: j, minHeight: O, width: n, height: o, relativeHeight: C, padding: E, children: [
|
|
367
368
|
te,
|
|
368
369
|
oe,
|
|
369
370
|
re
|
|
370
|
-
] }), e[80] = z, e[81] = a, e[82] = ne, e[83] = o, e[84] = j, e[85] = O, e[86] =
|
|
371
|
+
] }), e[80] = z, e[81] = a, e[82] = ne, e[83] = o, e[84] = j, e[85] = O, e[86] = E, e[87] = C, e[88] = Je, e[89] = Xe, e[90] = te, e[91] = oe, e[92] = re, e[93] = F, e[94] = n, e[95] = Te) : Te = e[95], Te;
|
|
371
372
|
}
|
|
372
373
|
function Mt(t) {
|
|
373
374
|
return t !== void 0;
|
|
@@ -413,6 +414,6 @@ function It(t) {
|
|
|
413
414
|
};
|
|
414
415
|
}
|
|
415
416
|
export {
|
|
416
|
-
|
|
417
|
+
co as ThreeDGlobe
|
|
417
418
|
};
|
|
418
419
|
//# sourceMappingURL=ThreeDGlobe.js.map
|