@undp/data-viz 1.5.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.d.ts +1 -0
- package/dist/AreaChart.js +420 -520
- package/dist/AreaChart.js.map +1 -1
- package/dist/Axis-CRyfcLjc.js +32 -0
- package/dist/Axis-CRyfcLjc.js.map +1 -0
- package/dist/Axis-DxRV2yMi.cjs +2 -0
- package/dist/Axis-DxRV2yMi.cjs.map +1 -0
- package/dist/AxisTitle-jeI7am8o.js +29 -0
- package/dist/AxisTitle-jeI7am8o.js.map +1 -0
- package/dist/AxisTitle-sS5bLLR7.cjs +2 -0
- package/dist/AxisTitle-sS5bLLR7.cjs.map +1 -0
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +1 -0
- package/dist/BarGraph.js +2185 -4042
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +1 -0
- package/dist/BasicStatCard.js +118 -186
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +5 -0
- package/dist/BeeSwarmChart.js +518 -1016
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +1 -0
- package/dist/BiVariateChoroplethMap.js +456 -697
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +1 -0
- package/dist/BulletChart.js +863 -1414
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +1 -0
- package/dist/ButterflyChart.js +474 -684
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +1 -0
- package/dist/ChoroplethMap.js +468 -722
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +1 -0
- package/dist/CirclePackingGraph.js +5 -6
- package/dist/CirclePackingGraph.js.map +1 -1
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.cjs.map +1 -1
- package/dist/ColorLegend.js +57 -44
- package/dist/ColorLegend.js.map +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ColorLegendWithMouseOver.js +60 -65
- package/dist/ColorLegendWithMouseOver.js.map +1 -1
- package/dist/Colors.cjs.map +1 -1
- package/dist/Colors.js +44 -430
- package/dist/Colors.js.map +1 -1
- package/dist/CopyTextButton.cjs +3 -3
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +537 -455
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +7 -7
- package/dist/CsvDownloadButton.cjs.map +1 -1
- package/dist/CsvDownloadButton.js +442 -447
- package/dist/CsvDownloadButton.js.map +1 -1
- package/dist/Data/barChart.json +70 -0
- package/dist/Data/basic.csv +20 -0
- package/dist/DataCards.cjs +5 -5
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.d.ts +1 -0
- package/dist/DataCards.js +488 -581
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +1 -0
- package/dist/DataTable.js +183 -326
- package/dist/DataTable.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +1 -0
- package/dist/DifferenceLineChart.js +731 -795
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +1 -4
- package/dist/DonutChart.js +260 -444
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +1 -0
- package/dist/DotDensityMap.js +387 -574
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-6kjXM6oW.js → DropdownSelect-BbdPQa2k.js} +1401 -1374
- package/dist/DropdownSelect-BbdPQa2k.js.map +1 -0
- package/dist/DropdownSelect-Doz3mCrM.cjs +29 -0
- package/dist/DropdownSelect-Doz3mCrM.cjs.map +1 -0
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +1 -0
- package/dist/DualAxisLineChart.js +620 -714
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +1 -0
- package/dist/DumbbellChart.js +789 -1499
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/EmptyState-BZo1BbAn.js +15 -0
- package/dist/{EmptyState-36lXXyui.js.map → EmptyState-BZo1BbAn.js.map} +1 -1
- package/dist/EmptyState-sAEZ_5rU.cjs +2 -0
- package/dist/{EmptyState-B8IpKGcL.cjs.map → EmptyState-sAEZ_5rU.cjs.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +1 -1
- package/dist/ExcelDownloadButton.cjs.map +1 -1
- package/dist/ExcelDownloadButton.js +20 -24
- package/dist/ExcelDownloadButton.js.map +1 -1
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.cjs.map +1 -1
- package/dist/FootNote.js +26 -17
- package/dist/FootNote.js.map +1 -1
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +1 -0
- package/dist/GeoHubCompareMaps.js +267 -342
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.d.ts +1 -0
- package/dist/GeoHubMap.js +214 -379
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.d.ts +1 -0
- package/dist/GeoHubMapWithLayerSelection.js +192 -278
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/GraphContainer-CRqzdKu2.js +78 -0
- package/dist/GraphContainer-CRqzdKu2.js.map +1 -0
- package/dist/GraphContainer-d8A46BK2.cjs +2 -0
- package/dist/GraphContainer-d8A46BK2.cjs.map +1 -0
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.cjs.map +1 -1
- package/dist/GraphDescription.js +23 -17
- package/dist/GraphDescription.js.map +1 -1
- package/dist/{GraphEl-2IiUDxjR.js → GraphEl-BZne2JIx.js} +181 -202
- package/dist/GraphEl-BZne2JIx.js.map +1 -0
- package/dist/GraphEl-D5MUfp45.cjs +2 -0
- package/dist/GraphEl-D5MUfp45.cjs.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.cjs.map +1 -1
- package/dist/GraphFooter.js +28 -18
- package/dist/GraphFooter.js.map +1 -1
- package/dist/GraphHeader.cjs +1 -1
- package/dist/GraphHeader.cjs.map +1 -1
- package/dist/GraphHeader.d.ts +2 -1
- package/dist/GraphHeader.js +45 -59
- package/dist/GraphHeader.js.map +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.cjs.map +1 -1
- package/dist/GraphTitle.js +29 -24
- package/dist/GraphTitle.js.map +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +216 -450
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.cjs.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/GriddedGraphsFromConfig.js +22 -36
- package/dist/GriddedGraphsFromConfig.js.map +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +1 -0
- package/dist/HeatMap.js +278 -446
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +1 -0
- package/dist/Histogram.js +154 -264
- package/dist/Histogram.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.cjs.map +1 -1
- package/dist/ImageDownloadButton.d.ts +2 -1
- package/dist/ImageDownloadButton.js +21 -25
- package/dist/ImageDownloadButton.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +1 -0
- package/dist/LineChartWithConfidenceInterval.js +677 -827
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.cjs.map +1 -1
- package/dist/LinearColorLegend.js +49 -30
- package/dist/LinearColorLegend.js.map +1 -1
- package/dist/Modal-DGcuAHyK.js +1047 -0
- package/dist/Modal-DGcuAHyK.js.map +1 -0
- package/dist/Modal-JW_IExO3.cjs +46 -0
- package/dist/Modal-JW_IExO3.cjs.map +1 -0
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +126 -292
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.js +22 -31
- package/dist/MultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +1 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +139 -223
- package/dist/MultiGraphDashboardWideToLongFormat.js.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs.map +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +25 -27
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js.map +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +1 -0
- package/dist/MultiLineAltChart.js +582 -659
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +1 -0
- package/dist/MultiLineChart.js +617 -724
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +1 -0
- package/dist/ParetoChart.js +531 -635
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +148 -337
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +22 -31
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js.map +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs.map +1 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.js +93 -114
- package/dist/PerformanceIntensiveScrollStory.js.map +1 -1
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +1 -0
- package/dist/RadarChart.js +426 -575
- package/dist/RadarChart.js.map +1 -1
- package/dist/ReferenceLine-2XCwHXQ4.js +162 -0
- package/dist/ReferenceLine-2XCwHXQ4.js.map +1 -0
- package/dist/ReferenceLine-BH0qdf4R.cjs +2 -0
- package/dist/ReferenceLine-BH0qdf4R.cjs.map +1 -0
- package/dist/RegressionLine-BOTTNSrr.cjs +2 -0
- package/dist/RegressionLine-BOTTNSrr.cjs.map +1 -0
- package/dist/RegressionLine-DAcY2DjT.js +87 -0
- package/dist/RegressionLine-DAcY2DjT.js.map +1 -0
- package/dist/SVGDownloadButton.cjs +1 -1
- package/dist/SVGDownloadButton.cjs.map +1 -1
- package/dist/SVGDownloadButton.js +21 -25
- package/dist/SVGDownloadButton.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +1 -0
- package/dist/SankeyChart.js +665 -854
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +1 -0
- package/dist/ScatterPlot.js +675 -815
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.cjs.map +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/ScrollStory.js +85 -97
- package/dist/ScrollStory.js.map +1 -1
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +1 -0
- package/dist/SimpleLineChart.js +505 -613
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -1
- package/dist/SingleGraphDashboard.js +284 -508
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -1
- package/dist/SingleGraphDashboardFromConfig.js +25 -31
- package/dist/SingleGraphDashboardFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +150 -168
- package/dist/SingleGraphDashboardGeoHubMaps.js.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +25 -21
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +363 -593
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +25 -31
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js.map +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +1 -0
- package/dist/SlopeChart.js +539 -573
- package/dist/SlopeChart.js.map +1 -1
- package/dist/Source-DYMJRrsq.cjs +2 -0
- package/dist/Source-DYMJRrsq.cjs.map +1 -0
- package/dist/Source-DwTHB8fn.js +78 -0
- package/dist/Source-DwTHB8fn.js.map +1 -0
- package/dist/Source.cjs +1 -1
- package/dist/Source.cjs.map +1 -1
- package/dist/Source.js +4 -38
- package/dist/Source.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.cjs.map +1 -1
- package/dist/SparkLine.d.ts +1 -0
- package/dist/SparkLine.js +286 -314
- package/dist/SparkLine.js.map +1 -1
- package/dist/Spinner-D7rnnwnA.js +47 -0
- package/dist/Spinner-D7rnnwnA.js.map +1 -0
- package/dist/Spinner-DRMBUsX7.cjs +2 -0
- package/dist/Spinner-DRMBUsX7.cjs.map +1 -0
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +1 -0
- package/dist/StatCardFromData.js +161 -243
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +1 -0
- package/dist/StripChart.js +665 -983
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +1 -0
- package/dist/ThreeDGlobe.js +356 -519
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +96 -126
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/Tooltip-4dJo4_AF.cjs +2 -0
- package/dist/Tooltip-4dJo4_AF.cjs.map +1 -0
- package/dist/Tooltip-CwWUegPB.js +43 -0
- package/dist/Tooltip-CwWUegPB.js.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +1 -0
- package/dist/TreeMapGraph.js +479 -617
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/Typography-DX7PlgQU.cjs +2 -0
- package/dist/Typography-DX7PlgQU.cjs.map +1 -0
- package/dist/Typography-PxtFcnJb.js +142 -0
- package/dist/Typography-PxtFcnJb.js.map +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +1 -0
- package/dist/UnitChart.js +160 -212
- package/dist/UnitChart.js.map +1 -1
- package/dist/XAxesLabels-D5X8jngD.cjs +2 -0
- package/dist/XAxesLabels-D5X8jngD.cjs.map +1 -0
- package/dist/XAxesLabels-DNO0KmjL.js +73 -0
- package/dist/XAxesLabels-DNO0KmjL.js.map +1 -0
- package/dist/XTicksAndGridLines-B6CELS7q.cjs +2 -0
- package/dist/XTicksAndGridLines-B6CELS7q.cjs.map +1 -0
- package/dist/XTicksAndGridLines-CObVFSm4.js +38 -0
- package/dist/XTicksAndGridLines-CObVFSm4.js.map +1 -0
- package/dist/YAxesLabels-DcS85Beo.cjs +2 -0
- package/dist/YAxesLabels-DcS85Beo.cjs.map +1 -0
- package/dist/YAxesLabels-Dnnng49-.js +70 -0
- package/dist/YAxesLabels-Dnnng49-.js.map +1 -0
- package/dist/YTicksAndGridLines-4pxTRlRK.cjs +2 -0
- package/dist/YTicksAndGridLines-4pxTRlRK.cjs.map +1 -0
- package/dist/YTicksAndGridLines-Blepl7XF.js +38 -0
- package/dist/YTicksAndGridLines-Blepl7XF.js.map +1 -0
- package/dist/{band-BEjh2CHI.js → band-CyHaVft5.js} +3 -3
- package/dist/{band-BEjh2CHI.js.map → band-CyHaVft5.js.map} +1 -1
- package/dist/{band-CAApY4Pd.cjs → band-VYfcZeJ2.cjs} +2 -2
- package/dist/{band-CAApY4Pd.cjs.map → band-VYfcZeJ2.cjs.map} +1 -1
- package/dist/checkIfMultiple-Y9iKaV_u.js +950 -0
- package/dist/checkIfMultiple-Y9iKaV_u.js.map +1 -0
- package/dist/checkIfMultiple-wg6hJLXy.cjs +12 -0
- package/dist/checkIfMultiple-wg6hJLXy.cjs.map +1 -0
- package/dist/customArea-BUhPiPT6.js +163 -0
- package/dist/{customArea-x4L4xwLl.js.map → customArea-BUhPiPT6.js.map} +1 -1
- package/dist/customArea-CMF5g-C3.cjs +2 -0
- package/dist/{customArea-1G1S78s_.cjs.map → customArea-CMF5g-C3.cjs.map} +1 -1
- package/dist/delaunay-C1uAf38t.js.map +1 -1
- package/dist/delaunay-rcy0HhZi.cjs.map +1 -1
- package/dist/{ensureCompleteData-DlmibgaI.js → ensureCompleteData-DNKEGRiP.js} +12 -32
- package/dist/{ensureCompleteData-DlmibgaI.js.map → ensureCompleteData-DNKEGRiP.js.map} +1 -1
- package/dist/{ensureCompleteData-DkQYPeDa.cjs → ensureCompleteData-I6nYmT8E.cjs} +2 -2
- package/dist/{ensureCompleteData-DkQYPeDa.cjs.map → ensureCompleteData-I6nYmT8E.cjs.map} +1 -1
- package/dist/{excelDownload-BOA-lskf.js → excelDownload-BEC1AyQW.js} +12 -2
- package/dist/{excelDownload-BOA-lskf.js.map → excelDownload-BEC1AyQW.js.map} +1 -1
- package/dist/excelDownload-BQpsCa62.cjs.map +1 -1
- package/dist/{fetchAndParseData-sapWbnYk.js → fetchAndParseData-BpqkBPQL.js} +15 -28
- package/dist/{fetchAndParseData-sapWbnYk.js.map → fetchAndParseData-BpqkBPQL.js.map} +1 -1
- package/dist/fetchAndParseData-l5HGMAEs.cjs +16 -0
- package/dist/{fetchAndParseData-Ba-_CgxS.cjs.map → fetchAndParseData-l5HGMAEs.cjs.map} +1 -1
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/{filterData-9nEcQ-Jp.js → filterData-DsAiFzKY.js} +3 -5
- package/dist/{filterData-9nEcQ-Jp.js.map → filterData-DsAiFzKY.js.map} +1 -1
- package/dist/{filterData-BoYadk0l.cjs → filterData-T5DQBE9b.cjs} +2 -2
- package/dist/{filterData-BoYadk0l.cjs.map → filterData-T5DQBE9b.cjs.map} +1 -1
- package/dist/generateRandomString-B5zBiJzS.cjs.map +1 -1
- package/dist/generateRandomString-za3IQGfQ.js.map +1 -1
- package/dist/{getCentroidCoordinates-Dfk6IqEG.js → getCentroidCoordinates-D7r34N4w.js} +2 -2
- package/dist/{getCentroidCoordinates-Dfk6IqEG.js.map → getCentroidCoordinates-D7r34N4w.js.map} +1 -1
- package/dist/{getCentroidCoordinates-DxTBqzp2.cjs → getCentroidCoordinates-Dng1HVjO.cjs} +2 -2
- package/dist/{getCentroidCoordinates-DxTBqzp2.cjs.map → getCentroidCoordinates-Dng1HVjO.cjs.map} +1 -1
- package/dist/getGraphList-BpEWn1Tk.js +227 -0
- package/dist/{getGraphList-DuColTJM.js.map → getGraphList-BpEWn1Tk.js.map} +1 -1
- package/dist/getGraphList-gf02xgT2.cjs.map +1 -1
- package/dist/getJenks-BbngDoBQ.js.map +1 -1
- package/dist/getJenks-GYmdwBqm.cjs.map +1 -1
- package/dist/getNoOfTicks-C_1CFXv_.cjs +2 -0
- package/dist/getNoOfTicks-C_1CFXv_.cjs.map +1 -0
- package/dist/getNoOfTicks-CpmRjcRF.js +7 -0
- package/dist/getNoOfTicks-CpmRjcRF.js.map +1 -0
- package/dist/getSchema.cjs.map +1 -1
- package/dist/getSchema.js +445 -231
- package/dist/getSchema.js.map +1 -1
- package/dist/getSliderMarks-BmADcPQt.cjs +6 -0
- package/dist/getSliderMarks-BmADcPQt.cjs.map +1 -0
- package/dist/getSliderMarks-HIDJ0_Cd.js +1033 -0
- package/dist/getSliderMarks-HIDJ0_Cd.js.map +1 -0
- package/dist/{getTextColorBasedOnBgColor-B6Nk2WBf.js → getTextColorBasedOnBgColor-CDY808zi.js} +11 -3
- package/dist/{getTextColorBasedOnBgColor-B6Nk2WBf.js.map → getTextColorBasedOnBgColor-CDY808zi.js.map} +1 -1
- package/dist/getTextColorBasedOnBgColor-nqY-bsM_.cjs.map +1 -1
- package/dist/{getUniqValue-DiCh_MOD.js → getUniqValue-BKHCm3zE.js} +2 -4
- package/dist/{getUniqValue-DiCh_MOD.js.map → getUniqValue-BKHCm3zE.js.map} +1 -1
- package/dist/getUniqValue-RViz8tTw.cjs.map +1 -1
- package/dist/{imageDownload-Dcci2LEy.js → imageDownload-BX6SILNZ.js} +4 -2
- package/dist/{imageDownload-Dcci2LEy.js.map → imageDownload-BX6SILNZ.js.map} +1 -1
- package/dist/imageDownload-CgDcm1Sj.cjs.map +1 -1
- package/dist/{index-DvVprvy6.js → index-BZQYSqar.js} +7 -7
- package/dist/{index-DvVprvy6.js.map → index-BZQYSqar.js.map} +1 -1
- package/dist/index-B_sAFsEV.cjs +2 -0
- package/dist/{index-BHe3wsWF.cjs.map → index-B_sAFsEV.cjs.map} +1 -1
- package/dist/index-BqfRwk1n.js +146 -0
- package/dist/index-BqfRwk1n.js.map +1 -0
- package/dist/{index-V_JXij1_.js → index-BuwmuDFJ.js} +3 -3
- package/dist/{index-V_JXij1_.js.map → index-BuwmuDFJ.js.map} +1 -1
- package/dist/index-C6LorfZ-.cjs +2 -0
- package/dist/index-C6LorfZ-.cjs.map +1 -0
- package/dist/index-CHPV5EwG-CTPQjnHt.cjs +84 -0
- package/dist/index-CHPV5EwG-CTPQjnHt.cjs.map +1 -0
- package/dist/{index-CHPV5EwG-DBWUSD9b.js → index-CHPV5EwG-Curnpaqc.js} +724 -625
- package/dist/index-CHPV5EwG-Curnpaqc.js.map +1 -0
- package/dist/index-Ceppbd8C.js +342 -0
- package/dist/index-Ceppbd8C.js.map +1 -0
- package/dist/index-Cno4Q0YE.cjs +2 -0
- package/dist/{index-CQ3e6Ewi.cjs.map → index-Cno4Q0YE.cjs.map} +1 -1
- package/dist/{index-Cw8sCyo_-BuI_jX5Z.js → index-Cw8sCyo_-B2hEKjzG.js} +16 -16
- package/dist/{index-Cw8sCyo_-BuI_jX5Z.js.map → index-Cw8sCyo_-B2hEKjzG.js.map} +1 -1
- package/dist/{index-Cw8sCyo_-gxT8ADyn.cjs → index-Cw8sCyo_-BrHiWiRF.cjs} +2 -2
- package/dist/{index-Cw8sCyo_-gxT8ADyn.cjs.map → index-Cw8sCyo_-BrHiWiRF.cjs.map} +1 -1
- package/dist/index-CyZ1lmi_.cjs +2 -0
- package/dist/{index-D72cOtq7.cjs.map → index-CyZ1lmi_.cjs.map} +1 -1
- package/dist/index-D491FEn1.js +184 -0
- package/dist/index-D491FEn1.js.map +1 -0
- package/dist/index-DG2bgAva.cjs +10 -0
- package/dist/index-DG2bgAva.cjs.map +1 -0
- package/dist/index-DRXx7m-C.cjs +2 -0
- package/dist/index-DRXx7m-C.cjs.map +1 -0
- package/dist/index-DxXnJ8Ti.cjs +2 -0
- package/dist/index-DxXnJ8Ti.cjs.map +1 -0
- package/dist/{index-Dzc_aaI9-BKklH89r.js → index-Dzc_aaI9-Bb7gobH_.js} +2 -2
- package/dist/{index-Dzc_aaI9-BKklH89r.js.map → index-Dzc_aaI9-Bb7gobH_.js.map} +1 -1
- package/dist/{index-Dzc_aaI9-RIk2GRHD.cjs → index-Dzc_aaI9-BmkfPMyc.cjs} +2 -2
- package/dist/{index-Dzc_aaI9-RIk2GRHD.cjs.map → index-Dzc_aaI9-BmkfPMyc.cjs.map} +1 -1
- package/dist/{index-9tDEUqOZ.js → index-GEsywGxz.js} +9 -9
- package/dist/index-GEsywGxz.js.map +1 -0
- package/dist/index-SKgJALZg.js +99 -0
- package/dist/{index-Bw_eHBVN.js.map → index-SKgJALZg.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.js +13 -13
- package/dist/{init-BhZylTFx.js → init-BJFW6EwE.js} +3 -3
- package/dist/{init-BhZylTFx.js.map → init-BJFW6EwE.js.map} +1 -1
- package/dist/{linear-BVckp9RD.cjs → linear-BwPAspcq.cjs} +2 -2
- package/dist/{linear-BVckp9RD.cjs.map → linear-BwPAspcq.cjs.map} +1 -1
- package/dist/{linear-DUdu7l2G.js → linear-BwnDd9KF.js} +3 -3
- package/dist/{linear-DUdu7l2G.js.map → linear-BwnDd9KF.js.map} +1 -1
- package/dist/numberFormattingFunction-02t-wJta.cjs.map +1 -1
- package/dist/numberFormattingFunction-14YCbkN2.js.map +1 -1
- package/dist/{ordinal-BOeNbyae.cjs → ordinal-CrsysVE-.cjs} +2 -2
- package/dist/ordinal-CrsysVE-.cjs.map +1 -0
- package/dist/{ordinal-w9Lu4Stb.js → ordinal-P77xw8aL.js} +24 -24
- package/dist/ordinal-P77xw8aL.js.map +1 -0
- package/dist/{pow-e8zx3AQJ.js → pow-DE4c7dbW.js} +3 -3
- package/dist/{pow-e8zx3AQJ.js.map → pow-DE4c7dbW.js.map} +1 -1
- package/dist/{pow-B5-jkdHU.cjs → pow-DgrUorRi.cjs} +2 -2
- package/dist/{pow-B5-jkdHU.cjs.map → pow-DgrUorRi.cjs.map} +1 -1
- package/dist/{proxy-BYIC9BuT.js → proxy-BxkFHwUw.js} +144 -134
- package/dist/proxy-BxkFHwUw.js.map +1 -0
- package/dist/proxy-BxvUI_9l.cjs +2 -0
- package/dist/proxy-BxvUI_9l.cjs.map +1 -0
- package/dist/{removeOutliers-DR48e-18.js → removeOutliers-BqW0sPqj.js} +2 -5
- package/dist/{removeOutliers-DR48e-18.js.map → removeOutliers-BqW0sPqj.js.map} +1 -1
- package/dist/removeOutliers-WELHHqiI.cjs.map +1 -1
- package/dist/{sort-DfK1b0F5.js → sort-BIvMlUH1.js} +5 -5
- package/dist/{sort-DfK1b0F5.js.map → sort-BIvMlUH1.js.map} +1 -1
- package/dist/{string-CRoCZCYa.cjs → string-C-kRh1bQ.cjs} +2 -2
- package/dist/{string-CRoCZCYa.cjs.map → string-C-kRh1bQ.cjs.map} +1 -1
- package/dist/{string-B8KlVSPX.js → string-C_xJ4Wg4.js} +3 -3
- package/dist/{string-B8KlVSPX.js.map → string-C_xJ4Wg4.js.map} +1 -1
- package/dist/string2HTML-CPGr_I5E.cjs +3 -0
- package/dist/{string2HTML-z7CwHXcx.cjs.map → string2HTML-CPGr_I5E.cjs.map} +1 -1
- package/dist/{string2HTML-oFCROsus.js → string2HTML-DhG75NqA.js} +15 -9
- package/dist/{string2HTML-oFCROsus.js.map → string2HTML-DhG75NqA.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{svgDownload-C2-E3yf2.js → svgDownload-BAoarWNt.js} +4 -2
- package/dist/{svgDownload-C2-E3yf2.js.map → svgDownload-BAoarWNt.js.map} +1 -1
- package/dist/svgDownload-D9zEGjTF.cjs.map +1 -1
- package/dist/{threshold-DFfqcDMa.js → threshold-Bgr20hik.js} +2 -2
- package/dist/{threshold-DFfqcDMa.js.map → threshold-Bgr20hik.js.map} +1 -1
- package/dist/{time-Byw_jYQ7.cjs → time-CZd5YLSP.cjs} +2 -2
- package/dist/{time-Byw_jYQ7.cjs.map → time-CZd5YLSP.cjs.map} +1 -1
- package/dist/{time-BzJP5SPC.js → time-DCCfQk3V.js} +3 -3
- package/dist/{time-BzJP5SPC.js.map → time-DCCfQk3V.js.map} +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +3 -3
- package/dist/transformDataForAggregation-CE3bAlHU.js +585 -0
- package/dist/{transformDataForAggregation-sBpdlX8n.js.map → transformDataForAggregation-CE3bAlHU.js.map} +1 -1
- package/dist/transformDataForAggregation-KXGm6flX.cjs.map +1 -1
- package/dist/transformDataForGraphFromFile-BExxcITV.js +14 -0
- package/dist/{transformDataForGraphFromFile-ComYvzuz.js.map → transformDataForGraphFromFile-BExxcITV.js.map} +1 -1
- package/dist/{transformDataForGraphFromFile-DVZodTHd.cjs → transformDataForGraphFromFile-DaJHQCsL.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-DVZodTHd.cjs.map → transformDataForGraphFromFile-DaJHQCsL.cjs.map} +1 -1
- package/dist/transformDataForSelect-D8AuvYdf.js.map +1 -1
- package/dist/transformDataForSelect-YmStusCI.cjs.map +1 -1
- package/dist/uniqBy-BHy4I8PK.js.map +1 -1
- package/dist/uniqBy-O05lp2S5.cjs.map +1 -1
- package/dist/{use-in-view-DR-UTB96.js → use-in-view-Cxa7y1TH.js} +2 -2
- package/dist/use-in-view-Cxa7y1TH.js.map +1 -0
- package/dist/use-in-view-QcfiW0w3.cjs +2 -0
- package/dist/use-in-view-QcfiW0w3.cjs.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +8 -8
- package/dist/validateSchema.cjs.map +1 -1
- package/dist/validateSchema.js +33 -29
- package/dist/validateSchema.js.map +1 -1
- package/dist/{x-BBpi7a_7-Dz2vKSfu.cjs → x-BBpi7a_7-mTo40uId.cjs} +2 -2
- package/dist/{x-BBpi7a_7-Dz2vKSfu.cjs.map → x-BBpi7a_7-mTo40uId.cjs.map} +1 -1
- package/dist/{y-D0sAaVii.js → y-BqfogMAB.js} +3 -3
- package/dist/{y-D0sAaVii.js.map → y-BqfogMAB.js.map} +1 -1
- package/dist/{zoom-QipiAl5W.js → zoom-C9MFjAaV.js} +5 -5
- package/dist/{zoom-QipiAl5W.js.map → zoom-C9MFjAaV.js.map} +1 -1
- package/dist/zoom-DPw8bba-.cjs +2 -0
- package/dist/{zoom-BiMNsz72.cjs.map → zoom-DPw8bba-.cjs.map} +1 -1
- package/package.json +7 -6
- package/dist/Axis-4gUOL8B7.js +0 -43
- package/dist/Axis-4gUOL8B7.js.map +0 -1
- package/dist/Axis-CkNn1wit.cjs +0 -2
- package/dist/Axis-CkNn1wit.cjs.map +0 -1
- package/dist/AxisTitle-Wkz-xeQL.cjs +0 -2
- package/dist/AxisTitle-Wkz-xeQL.cjs.map +0 -1
- package/dist/AxisTitle-v6_xcXZ-.js +0 -20
- package/dist/AxisTitle-v6_xcXZ-.js.map +0 -1
- package/dist/DropdownSelect-6kjXM6oW.js.map +0 -1
- package/dist/DropdownSelect-vt8yiB-g.cjs +0 -29
- package/dist/DropdownSelect-vt8yiB-g.cjs.map +0 -1
- package/dist/EmptyState-36lXXyui.js +0 -22
- package/dist/EmptyState-B8IpKGcL.cjs +0 -2
- package/dist/GraphEl-2IiUDxjR.js.map +0 -1
- package/dist/GraphEl-qrlfGPe3.cjs +0 -2
- package/dist/GraphEl-qrlfGPe3.cjs.map +0 -1
- package/dist/Modal-Cg8daIlV.js +0 -1030
- package/dist/Modal-Cg8daIlV.js.map +0 -1
- package/dist/Modal-CuuJdWkD.cjs +0 -46
- package/dist/Modal-CuuJdWkD.cjs.map +0 -1
- package/dist/ReferenceLine-CPMaAX0r.js +0 -128
- package/dist/ReferenceLine-CPMaAX0r.js.map +0 -1
- package/dist/ReferenceLine-D04j-zeV.cjs +0 -2
- package/dist/ReferenceLine-D04j-zeV.cjs.map +0 -1
- package/dist/RegressionLine-CW7iViH2.js +0 -49
- package/dist/RegressionLine-CW7iViH2.js.map +0 -1
- package/dist/RegressionLine-D-49RaHa.cjs +0 -2
- package/dist/RegressionLine-D-49RaHa.cjs.map +0 -1
- package/dist/Spinner-Bpz70q_g.js +0 -30
- package/dist/Spinner-Bpz70q_g.js.map +0 -1
- package/dist/Spinner-C6wLp85s.cjs +0 -2
- package/dist/Spinner-C6wLp85s.cjs.map +0 -1
- package/dist/Tooltip-6LIdPQGC.js +0 -46
- package/dist/Tooltip-6LIdPQGC.js.map +0 -1
- package/dist/Tooltip-Cpv0QohJ.cjs +0 -2
- package/dist/Tooltip-Cpv0QohJ.cjs.map +0 -1
- package/dist/Typography-BDULiwlF.cjs +0 -2
- package/dist/Typography-BDULiwlF.cjs.map +0 -1
- package/dist/Typography-LmZ9LEpe.js +0 -140
- package/dist/Typography-LmZ9LEpe.js.map +0 -1
- package/dist/XAxesLabels-CLZnBgSr.cjs +0 -2
- package/dist/XAxesLabels-CLZnBgSr.cjs.map +0 -1
- package/dist/XAxesLabels-SOSmso5J.js +0 -57
- package/dist/XAxesLabels-SOSmso5J.js.map +0 -1
- package/dist/XTicksAndGridLines-DuydSnZ_.js +0 -56
- package/dist/XTicksAndGridLines-DuydSnZ_.js.map +0 -1
- package/dist/XTicksAndGridLines-RKy7BVCO.cjs +0 -2
- package/dist/XTicksAndGridLines-RKy7BVCO.cjs.map +0 -1
- package/dist/YAxesLabels-DlDyLvhi.js +0 -52
- package/dist/YAxesLabels-DlDyLvhi.js.map +0 -1
- package/dist/YAxesLabels-Dqd259-t.cjs +0 -2
- package/dist/YAxesLabels-Dqd259-t.cjs.map +0 -1
- package/dist/YTicksAndGridLines-7t4MKtGw.js +0 -56
- package/dist/YTicksAndGridLines-7t4MKtGw.js.map +0 -1
- package/dist/YTicksAndGridLines-qGpRo_t1.cjs +0 -2
- package/dist/YTicksAndGridLines-qGpRo_t1.cjs.map +0 -1
- package/dist/checkIfMultiple-Dko_cBvE.cjs +0 -12
- package/dist/checkIfMultiple-Dko_cBvE.cjs.map +0 -1
- package/dist/checkIfMultiple-u2SmbiCf.js +0 -912
- package/dist/checkIfMultiple-u2SmbiCf.js.map +0 -1
- package/dist/customArea-1G1S78s_.cjs +0 -2
- package/dist/customArea-x4L4xwLl.js +0 -175
- package/dist/fetchAndParseData-Ba-_CgxS.cjs +0 -16
- package/dist/getGraphList-DuColTJM.js +0 -265
- package/dist/getSliderMarks-CUxPy36E.cjs +0 -6
- package/dist/getSliderMarks-CUxPy36E.cjs.map +0 -1
- package/dist/getSliderMarks-_pYOWEtO.js +0 -1023
- package/dist/getSliderMarks-_pYOWEtO.js.map +0 -1
- package/dist/index-9tDEUqOZ.js.map +0 -1
- package/dist/index-BHe3wsWF.cjs +0 -2
- package/dist/index-Bw_eHBVN.js +0 -77
- package/dist/index-C0bpbS4F.cjs +0 -2
- package/dist/index-C0bpbS4F.cjs.map +0 -1
- package/dist/index-CE9pmfxt.js +0 -430
- package/dist/index-CE9pmfxt.js.map +0 -1
- package/dist/index-CEJwW3lL.cjs +0 -2
- package/dist/index-CEJwW3lL.cjs.map +0 -1
- package/dist/index-CHPV5EwG-DBWUSD9b.js.map +0 -1
- package/dist/index-CHPV5EwG-DjM48pIC.cjs +0 -44
- package/dist/index-CHPV5EwG-DjM48pIC.cjs.map +0 -1
- package/dist/index-CQ3e6Ewi.cjs +0 -2
- package/dist/index-Cm8NIdOO.cjs +0 -10
- package/dist/index-Cm8NIdOO.cjs.map +0 -1
- package/dist/index-CoZbeNM9.cjs +0 -2
- package/dist/index-CoZbeNM9.cjs.map +0 -1
- package/dist/index-Cwgh7i7X.js +0 -122
- package/dist/index-Cwgh7i7X.js.map +0 -1
- package/dist/index-D72cOtq7.cjs +0 -2
- package/dist/index-zZjQEHlm.js +0 -342
- package/dist/index-zZjQEHlm.js.map +0 -1
- package/dist/ordinal-BOeNbyae.cjs.map +0 -1
- package/dist/ordinal-w9Lu4Stb.js.map +0 -1
- package/dist/proxy-BYIC9BuT.js.map +0 -1
- package/dist/proxy-CKadx4lC.cjs +0 -2
- package/dist/proxy-CKadx4lC.cjs.map +0 -1
- package/dist/string2HTML-z7CwHXcx.cjs +0 -3
- package/dist/transformDataForAggregation-sBpdlX8n.js +0 -755
- package/dist/transformDataForGraphFromFile-ComYvzuz.js +0 -24
- package/dist/use-in-view-CEwlc_dd.cjs +0 -2
- package/dist/use-in-view-CEwlc_dd.cjs.map +0 -1
- package/dist/use-in-view-DR-UTB96.js.map +0 -1
- package/dist/zoom-BiMNsz72.cjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoHubCompareMaps.js","sources":["../src/Components/Graphs/Maps/GeoHubMaps/CompareMaps/Graph.tsx","../src/Components/Graphs/Maps/GeoHubMaps/CompareMaps/index.tsx"],"sourcesContent":["import { useRef, useEffect, useState } from 'react';\r\nimport * as maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport {\r\n DndContext,\r\n useDraggable,\r\n useSensor,\r\n useSensors,\r\n PointerSensor,\r\n DragMoveEvent,\r\n} from '@dnd-kit/core';\r\nimport { restrictToHorizontalAxis } from '@dnd-kit/modifiers';\r\nimport React from 'react';\r\n\r\nimport { ChevronLeftRight, X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n width: number;\r\n height: number;\r\n mapStyles: [string, string];\r\n center: [number, number];\r\n mapLegend?: string | React.ReactNode;\r\n zoomLevel: number;\r\n}\r\n\r\nfunction synchronizeMap(map1: maplibreGl.Map, map2: maplibreGl.Map) {\r\n let isSyncing = false;\r\n function syncMap(sourceMap: maplibreGl.Map, targetMap: maplibreGl.Map) {\r\n if (!isSyncing) {\r\n isSyncing = true;\r\n const center = sourceMap.getCenter();\r\n const zoom = sourceMap.getZoom();\r\n const bearing = sourceMap.getBearing();\r\n const pitch = sourceMap.getPitch();\r\n targetMap.jumpTo({\r\n center,\r\n zoom,\r\n bearing,\r\n pitch,\r\n });\r\n isSyncing = false;\r\n }\r\n }\r\n\r\n // Event listeners for map1\r\n map1.on('move', () => {\r\n syncMap(map1, map2);\r\n });\r\n\r\n // Event listeners for map2\r\n map2.on('move', () => {\r\n syncMap(map2, map1);\r\n });\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const { height, width, mapStyles, center, zoomLevel, mapLegend } = props;\r\n const [position, setPosition] = useState(50);\r\n const [isDragging, setIsDragging] = useState(false);\r\n const containerRef = useRef<HTMLDivElement>(null);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const dragStartPositionRef = useRef(50);\r\n const sliderWidthRef = useRef(0);\r\n\r\n const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 0 } }));\r\n\r\n const handleDragStart = () => {\r\n setIsDragging(true);\r\n dragStartPositionRef.current = position;\r\n\r\n if (containerRef.current) {\r\n sliderWidthRef.current = containerRef.current.getBoundingClientRect().width;\r\n }\r\n };\r\n\r\n const handleDragMove = (event: DragMoveEvent) => {\r\n if (!containerRef.current || sliderWidthRef.current === 0) return;\r\n\r\n // Calculate position change as percentage of width\r\n const deltaPercentage = (event.delta.x / sliderWidthRef.current) * 100;\r\n const newPosition = Math.max(0, Math.min(100, dragStartPositionRef.current + deltaPercentage));\r\n\r\n setPosition(newPosition);\r\n };\r\n\r\n const handleDragEnd = () => {\r\n setIsDragging(false);\r\n };\r\n\r\n const handleClick = (e: React.MouseEvent) => {\r\n if (isDragging || !containerRef.current) return;\r\n\r\n const rect = containerRef.current.getBoundingClientRect();\r\n const clickX = e.clientX - rect.left;\r\n const newPosition = (clickX / rect.width) * 100;\r\n\r\n setPosition(Math.max(0, Math.min(100, newPosition)));\r\n };\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const leftMapRef = useRef<HTMLDivElement>(null);\r\n const rightMapRef = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n if (mapContainer.current && leftMapRef.current && rightMapRef.current && width) {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('.maplibregl-compare').remove();\r\n const leftMapDiv = select(leftMapRef.current);\r\n leftMapDiv.selectAll('div').remove();\r\n const rightMapDiv = select(rightMapRef.current);\r\n rightMapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n const leftMap = new maplibreGl.Map({\r\n container: leftMapRef.current,\r\n style: mapStyles[0],\r\n center: center || [0, 0],\r\n zoom: zoomLevel || 4,\r\n });\r\n\r\n const rightMap = new maplibreGl.Map({\r\n container: rightMapRef.current,\r\n style: mapStyles[1],\r\n center: center || [0, 0],\r\n zoom: zoomLevel || 4,\r\n });\r\n rightMap.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n leftMap.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n leftMap.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n rightMap.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n synchronizeMap(leftMap, rightMap);\r\n }\r\n }, [width, mapStyles, center, zoomLevel]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n <div\r\n style={{\r\n width,\r\n height,\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control relative w-full h-full'\r\n style={{ inset: 0 }}\r\n >\r\n <DndContext\r\n sensors={sensors}\r\n modifiers={[restrictToHorizontalAxis]}\r\n onDragStart={handleDragStart}\r\n onDragMove={handleDragMove}\r\n onDragEnd={handleDragEnd}\r\n >\r\n <div\r\n ref={containerRef}\r\n style={{\r\n position: 'relative',\r\n width,\r\n height,\r\n overflow: 'hidden',\r\n cursor: isDragging ? 'grabbing' : 'col-resize',\r\n userSelect: 'none', // Prevent text selection during drag\r\n }}\r\n onClick={handleClick}\r\n >\r\n <div\r\n ref={rightMapRef}\r\n className='absolute h-full rightMap w-full'\r\n style={{\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n clipPath: `polygon(${position}% 0%, ${position}% 100%, 100% 100%, 100% 0%)`,\r\n }}\r\n />\r\n <div\r\n ref={leftMapRef}\r\n className='absolute h-full leftMap w-full'\r\n style={{\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n inset: 0,\r\n clipPath: `polygon(0% 0%, ${position}% 0%, ${position}% 100%, 0% 100%)`,\r\n }}\r\n />\r\n\r\n <SliderHandle position={position} />\r\n </div>\r\n </DndContext>\r\n </div>\r\n </div>\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\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 dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n\r\ninterface HandleProps {\r\n position: number;\r\n}\r\n\r\nfunction SliderHandle(props: HandleProps) {\r\n const { position } = props;\r\n const { attributes, listeners, setNodeRef } = useDraggable({ id: 'slider-handle' });\r\n\r\n return (\r\n <div\r\n ref={setNodeRef}\r\n style={{\r\n position: 'absolute',\r\n left: `${position}%`,\r\n top: 0,\r\n bottom: 0,\r\n width: '40px',\r\n transform: 'translateX(-50%)',\r\n cursor: 'col-resize',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n zIndex: 10,\r\n touchAction: 'none',\r\n }}\r\n {...listeners}\r\n {...attributes}\r\n >\r\n <div\r\n className='h-full bg-primary-blue-600 dark:bg-primary-blue-400'\r\n style={{ width: '2px' }}\r\n />\r\n <div\r\n className='flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white'\r\n style={{\r\n boxShadow: 'inset 0 0 0 1px #fff',\r\n width: '42px',\r\n height: '42px',\r\n top: 'calc(50% - 21px)',\r\n left: '0',\r\n cursor: 'col-resize',\r\n }}\r\n >\r\n <ChevronLeftRight />\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { useRef, useEffect, useState } from 'react';\r\nimport { cn } from '@undp/design-system-react/cn';\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 { ClassNameObject, Languages, SourcesDataType, StyleObject } from '@/Types';\r\n\r\ninterface Props {\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 /** 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 /** URLs for mapStyles JSON user wants to compare */\r\n mapStyles: [string, string];\r\n /** Defines the legend for the map. mapLegend with type string is show as innerHTML. */\r\n mapLegend?: string | React.ReactNode;\r\n /** Starting center point of the map */\r\n center?: [number, number];\r\n /** Starting zoom level of the map */\r\n zoomLevel?: number;\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 [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm), [pmtiles](https://www.npmjs.com/package/pmtiles), [dnd-kit/core](https://www.npmjs.com/package/@dnd-kit/core), and [dnd-kit/modifier](https://www.npmjs.com/package/@dnd-kit/modifiers) package to your project */\r\nexport function GeoHubCompareMaps(props: Props) {\r\n const {\r\n graphTitle,\r\n height,\r\n width,\r\n relativeHeight,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n graphID,\r\n mapStyles,\r\n center = [0, 0],\r\n zoomLevel = 3,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n mapLegend,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n width ? 'w-fit' : 'w-full',\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a comparison between two maps.${graphDescription ? ` ${graphDescription}` : ''}`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription ? (\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 />\r\n ) : null}\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <Graph\r\n width={width || svgWidth}\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 )}\r\n mapStyles={mapStyles}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n mapLegend={mapLegend}\r\n />\r\n ) : null}\r\n </div>\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["synchronizeMap","map1","map2","isSyncing","syncMap","sourceMap","targetMap","center","zoom","bearing","pitch","Graph","props","height","width","mapStyles","zoomLevel","mapLegend","position","setPosition","useState","isDragging","setIsDragging","containerRef","useRef","showLegend","setShowLegend","dragStartPositionRef","sliderWidthRef","sensors","useSensors","useSensor","PointerSensor","handleDragStart","handleDragMove","event","deltaPercentage","newPosition","handleDragEnd","handleClick","e","rect","graphDiv","leftMapRef","rightMapRef","mapContainer","useEffect","select","protocol","pmtiles","maplibreGl","leftMap","rightMap","jsxs","jsx","DndContext","restrictToHorizontalAxis","SliderHandle","Fragment","X","string2HTML","React","attributes","listeners","setNodeRef","useDraggable","ChevronLeftRight","GeoHubCompareMaps","graphTitle","relativeHeight","sources","graphDescription","footNote","padding","backgroundColor","graphID","language","minHeight","theme","ariaLabel","styles","classNames","svgWidth","setSvgWidth","svgHeight","setSvgHeight","resizeObserver","entries","cn","GraphHeader","GraphFooter"],"mappings":";;;;;;;;;;;;AA4BA,SAASA,EAAeC,GAAsBC,GAAsB;AAClE,MAAIC,IAAY;AAChB,WAASC,EAAQC,GAA2BC,GAA2B;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JwC,gBAAAA,EAAAA;AAAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,KAAKZ;AAAA,oBACL,cAAW;AAAA,oBAET,WAAA5B,KAASoE,OAAcrE,KAAUuE,KACjC9B,gBAAAA,EAAAA;AAAAA,sBAAC3C;AAAA,sBAAA;AAAA,wBACC,OAAOG,KAASoE;AAAA,wBAChB,QAAQ,KAAK;AAAA,0BACXL;AAAA,0BACAhE,MACGwD,IACGQ,KACG/D,KAASoE,KAAYb,IAAiBQ,KACpC/D,KAASoE,KAAYb,IACtBQ,KACD/D,KAASoE,KAAYb,IACxBe;AAAA,wBAAA;AAAA,wBAER,WAAArE;AAAA,wBACA,QAAAR;AAAA,wBACA,WAAAS;AAAA,wBACA,WAAAC;AAAA,sBAAA;AAAA,oBAAA,IAEA;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAELqD,KAAWE,IACVlB,gBAAAA,EAAAA;AAAAA,kBAACoC;AAAA,kBAAA;AAAA,oBACC,QAAQ,EAAE,UAAUV,GAAQ,UAAU,QAAQA,GAAQ,OAAA;AAAA,oBACtD,YAAY;AAAA,sBACV,UAAUC,GAAY;AAAA,sBACtB,QAAQA,GAAY;AAAA,oBAAA;AAAA,oBAEtB,SAAAX;AAAA,oBACA,UAAAE;AAAA,oBACA,OAAA1D;AAAA,kBAAA;AAAA,gBAAA,IAEA;AAAA,cAAA,EAAA,CACN;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"GeoHubCompareMaps.js","sources":["../src/Components/Graphs/Maps/GeoHubMaps/CompareMaps/Graph.tsx","../src/Components/Graphs/Maps/GeoHubMaps/CompareMaps/index.tsx"],"sourcesContent":["import { useRef, useEffect, useState } from 'react';\r\nimport * as maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport {\r\n DndContext,\r\n useDraggable,\r\n useSensor,\r\n useSensors,\r\n PointerSensor,\r\n DragMoveEvent,\r\n} from '@dnd-kit/core';\r\nimport { restrictToHorizontalAxis } from '@dnd-kit/modifiers';\r\nimport React from 'react';\r\n\r\nimport { ChevronLeftRight, X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n width: number;\r\n height: number;\r\n mapStyles: [string, string];\r\n center: [number, number];\r\n mapLegend?: string | React.ReactNode;\r\n zoomLevel: number;\r\n}\r\n\r\nfunction synchronizeMap(map1: maplibreGl.Map, map2: maplibreGl.Map) {\r\n let isSyncing = false;\r\n function syncMap(sourceMap: maplibreGl.Map, targetMap: maplibreGl.Map) {\r\n if (!isSyncing) {\r\n isSyncing = true;\r\n const center = sourceMap.getCenter();\r\n const zoom = sourceMap.getZoom();\r\n const bearing = sourceMap.getBearing();\r\n const pitch = sourceMap.getPitch();\r\n targetMap.jumpTo({\r\n center,\r\n zoom,\r\n bearing,\r\n pitch,\r\n });\r\n isSyncing = false;\r\n }\r\n }\r\n\r\n // Event listeners for map1\r\n map1.on('move', () => {\r\n syncMap(map1, map2);\r\n });\r\n\r\n // Event listeners for map2\r\n map2.on('move', () => {\r\n syncMap(map2, map1);\r\n });\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n const { height, width, mapStyles, center, zoomLevel, mapLegend } = props;\r\n const [position, setPosition] = useState(50);\r\n const [isDragging, setIsDragging] = useState(false);\r\n const containerRef = useRef<HTMLDivElement>(null);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const dragStartPositionRef = useRef(50);\r\n const sliderWidthRef = useRef(0);\r\n\r\n const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 0 } }));\r\n\r\n const handleDragStart = () => {\r\n setIsDragging(true);\r\n dragStartPositionRef.current = position;\r\n\r\n if (containerRef.current) {\r\n sliderWidthRef.current = containerRef.current.getBoundingClientRect().width;\r\n }\r\n };\r\n\r\n const handleDragMove = (event: DragMoveEvent) => {\r\n if (!containerRef.current || sliderWidthRef.current === 0) return;\r\n\r\n // Calculate position change as percentage of width\r\n const deltaPercentage = (event.delta.x / sliderWidthRef.current) * 100;\r\n const newPosition = Math.max(0, Math.min(100, dragStartPositionRef.current + deltaPercentage));\r\n\r\n setPosition(newPosition);\r\n };\r\n\r\n const handleDragEnd = () => {\r\n setIsDragging(false);\r\n };\r\n\r\n const handleClick = (e: React.MouseEvent) => {\r\n if (isDragging || !containerRef.current) return;\r\n\r\n const rect = containerRef.current.getBoundingClientRect();\r\n const clickX = e.clientX - rect.left;\r\n const newPosition = (clickX / rect.width) * 100;\r\n\r\n setPosition(Math.max(0, Math.min(100, newPosition)));\r\n };\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const leftMapRef = useRef<HTMLDivElement>(null);\r\n const rightMapRef = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n if (mapContainer.current && leftMapRef.current && rightMapRef.current && width) {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('.maplibregl-compare').remove();\r\n const leftMapDiv = select(leftMapRef.current);\r\n leftMapDiv.selectAll('div').remove();\r\n const rightMapDiv = select(rightMapRef.current);\r\n rightMapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n const leftMap = new maplibreGl.Map({\r\n container: leftMapRef.current,\r\n style: mapStyles[0],\r\n center: center || [0, 0],\r\n zoom: zoomLevel || 4,\r\n });\r\n\r\n const rightMap = new maplibreGl.Map({\r\n container: rightMapRef.current,\r\n style: mapStyles[1],\r\n center: center || [0, 0],\r\n zoom: zoomLevel || 4,\r\n });\r\n rightMap.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n leftMap.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n leftMap.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n rightMap.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n synchronizeMap(leftMap, rightMap);\r\n }\r\n }, [width, mapStyles, center, zoomLevel]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n <div\r\n style={{\r\n width,\r\n height,\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control relative w-full h-full'\r\n style={{ inset: 0 }}\r\n >\r\n <DndContext\r\n sensors={sensors}\r\n modifiers={[restrictToHorizontalAxis]}\r\n onDragStart={handleDragStart}\r\n onDragMove={handleDragMove}\r\n onDragEnd={handleDragEnd}\r\n >\r\n <div\r\n ref={containerRef}\r\n style={{\r\n position: 'relative',\r\n width,\r\n height,\r\n overflow: 'hidden',\r\n cursor: isDragging ? 'grabbing' : 'col-resize',\r\n userSelect: 'none', // Prevent text selection during drag\r\n }}\r\n onClick={handleClick}\r\n >\r\n <div\r\n ref={rightMapRef}\r\n className='absolute h-full rightMap w-full'\r\n style={{\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n clipPath: `polygon(${position}% 0%, ${position}% 100%, 100% 100%, 100% 0%)`,\r\n }}\r\n />\r\n <div\r\n ref={leftMapRef}\r\n className='absolute h-full leftMap w-full'\r\n style={{\r\n position: 'absolute',\r\n top: 0,\r\n left: 0,\r\n inset: 0,\r\n clipPath: `polygon(0% 0%, ${position}% 0%, ${position}% 100%, 0% 100%)`,\r\n }}\r\n />\r\n\r\n <SliderHandle position={position} />\r\n </div>\r\n </DndContext>\r\n </div>\r\n </div>\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\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 dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n\r\ninterface HandleProps {\r\n position: number;\r\n}\r\n\r\nfunction SliderHandle(props: HandleProps) {\r\n const { position } = props;\r\n const { attributes, listeners, setNodeRef } = useDraggable({ id: 'slider-handle' });\r\n\r\n return (\r\n <div\r\n ref={setNodeRef}\r\n style={{\r\n position: 'absolute',\r\n left: `${position}%`,\r\n top: 0,\r\n bottom: 0,\r\n width: '40px',\r\n transform: 'translateX(-50%)',\r\n cursor: 'col-resize',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n zIndex: 10,\r\n touchAction: 'none',\r\n }}\r\n {...listeners}\r\n {...attributes}\r\n >\r\n <div\r\n className='h-full bg-primary-blue-600 dark:bg-primary-blue-400'\r\n style={{ width: '2px' }}\r\n />\r\n <div\r\n className='flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white'\r\n style={{\r\n boxShadow: 'inset 0 0 0 1px #fff',\r\n width: '42px',\r\n height: '42px',\r\n top: 'calc(50% - 21px)',\r\n left: '0',\r\n cursor: 'col-resize',\r\n }}\r\n >\r\n <ChevronLeftRight />\r\n </div>\r\n </div>\r\n );\r\n}\r\n","import { useRef, useEffect, useState } from 'react';\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 { ClassNameObject, Languages, SourcesDataType, StyleObject } from '@/Types';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\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 /** 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 /** URLs for mapStyles JSON user wants to compare */\r\n mapStyles: [string, string];\r\n /** Defines the legend for the map. mapLegend with type string is show as innerHTML. */\r\n mapLegend?: string | React.ReactNode;\r\n /** Starting center point of the map */\r\n center?: [number, number];\r\n /** Starting zoom level of the map */\r\n zoomLevel?: number;\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 [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm), [pmtiles](https://www.npmjs.com/package/pmtiles), [dnd-kit/core](https://www.npmjs.com/package/@dnd-kit/core), and [dnd-kit/modifier](https://www.npmjs.com/package/@dnd-kit/modifiers) package to your project */\r\nexport function GeoHubCompareMaps(props: Props) {\r\n const {\r\n graphTitle,\r\n height,\r\n width,\r\n relativeHeight,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n graphID,\r\n mapStyles,\r\n center = [0, 0],\r\n zoomLevel = 3,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n ariaLabel,\r\n styles,\r\n classNames,\r\n mapLegend,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\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 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 ? (\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 />\r\n ) : null}\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <Graph\r\n width={svgWidth}\r\n height={svgHeight}\r\n mapStyles={mapStyles}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n mapLegend={mapLegend}\r\n />\r\n ) : null}\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":["synchronizeMap","map1","map2","isSyncing","syncMap","sourceMap","targetMap","center","getCenter","zoom","getZoom","bearing","getBearing","pitch","getPitch","jumpTo","on","Graph","props","$","_c","height","width","mapStyles","zoomLevel","mapLegend","position","setPosition","useState","isDragging","setIsDragging","containerRef","useRef","showLegend","setShowLegend","dragStartPositionRef","sliderWidthRef","t0","Symbol","for","activationConstraint","distance","sensors","useSensors","useSensor","PointerSensor","t1","current","getBoundingClientRect","handleDragStart","t2","event","deltaPercentage","delta","x","newPosition","Math","max","min","handleDragMove","t3","handleDragEnd","t4","e","rect","newPosition_0","clientX","left","handleClick","graphDiv","leftMapRef","rightMapRef","mapContainer","t5","t6","mapDiv","select","selectAll","remove","protocol","pmtiles","Protocol","maplibreGl","addProtocol","tile","leftMap","Map","container","style","rightMap","addControl","NavigationControl","visualizePitch","showZoom","showCompass","ScaleControl","useEffect","t7","t8","inset","t9","restrictToHorizontalAxis","t10","t11","overflow","cursor","userSelect","t12","t13","top","clipPath","t14","t15","t16","SliderHandle","t17","t18","jsx","DndContext","t19","t20","jsxs","Fragment","X","__html","string2HTML","undefined","React","isValidElement","t21","id","attributes","listeners","setNodeRef","useDraggable","bottom","transform","display","justifyContent","alignItems","zIndex","touchAction","boxShadow","ChevronLeftRight","GeoHubCompareMaps","graphTitle","relativeHeight","sources","graphDescription","footNote","padding","backgroundColor","graphID","language","minHeight","theme","ariaLabel","styles","classNames","svgWidth","setSvgWidth","svgHeight","setSvgHeight","graphParentDiv","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","observe","disconnect","graphContainer","description","title","GraphHeader","GraphArea","footnote","source","GraphFooter","GraphContainer"],"mappings":";;;;;;;;;;;;;AA4BA,SAASA,GAAeC,GAAsBC,GAAsB;AAClE,MAAIC,IAAY;AAChB,WAASC,EAAQC,GAA2BC,GAA2B;AACrE,QAAI,CAACH,GAAW;AACdA,MAAAA,IAAY;AACZ,YAAMI,IAASF,EAAUG,UAAAA,GACnBC,IAAOJ,EAAUK,QAAAA,GACjBC,IAAUN,EAAUO,WAAAA,GACpBC,IAAQR,EAAUS,SAAAA;AACxBR,MAAAA,EAAUS,OAAO;AAAA,QACfR,QAAAA;AAAAA,QACAE,MAAAA;AAAAA,QACAE,SAAAA;AAAAA,QACAE,OAAAA;AAAAA,MAAAA,CACD,GACDV,IAAY;AAAA,IACd;AAAA,EACF;AAGAF,EAAAA,EAAKe,GAAG,QAAQ,MAAM;AACpBZ,IAAAA,EAAQH,GAAMC,CAAI;AAAA,EACpB,CAAC,GAGDA,EAAKc,GAAG,QAAQ,MAAM;AACpBZ,IAAAA,EAAQF,GAAMD,CAAI;AAAA,EACpB,CAAC;AACH;AAEO,SAAAgB,GAAAC,GAAA;AAAA,QAAAC,IAAAC,GAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,QAAAA;AAAAA,IAAAC,OAAAA;AAAAA,IAAAC,WAAAA;AAAAA,IAAAhB,QAAAA;AAAAA,IAAAiB,WAAAA;AAAAA,IAAAC,WAAAA;AAAAA,EAAAA,IAAmEP,GACnE,CAAAQ,GAAAC,CAAA,IAAgCC,EAAS,EAAE,GAC3C,CAAAC,GAAAC,CAAA,IAAoCF,EAAS,EAAK,GAClDG,IA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AAAjF,QAAAwI,GAAAxI,QAAAG,GAAAH,QAAA6F,KAAAA,IAAA7F,EAAA,EAAA,GAtDjB6F;AAsDiB;"}
|
package/dist/GeoHubMap.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CHPV5EwG-DjM48pIC.cjs"),s=require("react"),O=require("./DropdownSelect-vt8yiB-g.cjs"),R=require("maplibre-gl"),T=require("pmtiles");;/* empty css */const C=require("./fetchAndParseData-Ba-_CgxS.cjs"),L=require("./filterData-BoYadk0l.cjs"),D=require("./index-C0bpbS4F.cjs"),z=require("./string2HTML-z7CwHXcx.cjs"),P=require("./select-Bnfk0lJx.cjs"),W=require("./GraphHeader.cjs"),$=require("./GraphFooter.cjs");function A(x){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(x){for(const n in x)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(x,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>x[n]})}}return t.default=x,Object.freeze(t)}const q=A(T);function _(x){const{mapStyle:t,height:n,width:r,relativeHeight:l,center:y,zoomLevel:j,minHeight:u,includeLayers:p,excludeLayers:g,mapLegend:o}=x,[i,w]=s.useState(0),[E,f]=s.useState(0),[H,S]=s.useState(!0),d=s.useRef(null),h=s.useRef(null),a=s.useRef(null);return s.useEffect(()=>{const c=new ResizeObserver(m=>{w(r||m[0].target.clientWidth||620),f(n||m[0].target.clientHeight||480)});return d.current&&(f(d.current.clientHeight||480),w(d.current.clientWidth||620),r||c.observe(d.current)),()=>c.disconnect()},[r,n]),s.useEffect(()=>{h.current&&i&&!a.current&&C.fetchAndParseJSON(t).then(c=>{P.select(h.current).selectAll("div").remove();const b=new q.Protocol;R.addProtocol("pmtiles",b.tile);const v={container:h.current,style:p.length===0&&g.length===0?c:{...c,layers:L.filterData(c.layers,[{column:"id",includeValues:p,excludeValues:g}])},attributionControl:!0};y&&(v.center=y),j&&(v.zoom=j),a.current=new R.Map(v),a.current.addControl(new R.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),a.current.addControl(new R.ScaleControl,"bottom-left")})},[i,y,j,p,g,t]),s.useEffect(()=>{a.current&&C.fetchAndParseJSON(t).then(c=>{const m={...c,layers:L.filterData(c.layers,[{column:"id",includeValues:p,excludeValues:g}])};a.current.setStyle(m)})},[g,p,t]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:d,"aria-label":"Map area",children:(r||i)&&(n||E)?e.jsxRuntimeExports.jsxs("div",{style:{width:r||i,height:Math.max(u,n||(l?u?(r||i)*l>u?(r||i)*l:u:(r||i)*l:E))},children:[e.jsxRuntimeExports.jsx("div",{ref:h,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),o?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:H?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.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:()=>{S(!1)},children:e.jsxRuntimeExports.jsx(D.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof o=="string"?{__html:z.string2HTML(o)}:void 0,children:s.isValidElement(o)?o:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{S(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function F(x){const{mapStyle:t,height:n,width:r,relativeHeight:l,center:y,zoomLevel:j,minHeight:u,includeLayers:p,excludeLayers:g,mapLegend:o}=x,[i,w]=s.useState(0),[E,f]=s.useState(0),[H,S]=s.useState(!0),d=s.useRef(null),h=s.useRef(null);return s.useEffect(()=>{const a=new ResizeObserver(c=>{w(r||c[0].target.clientWidth||620),f(n||c[0].target.clientHeight||480)});return d.current&&(f(d.current.clientHeight||480),w(d.current.clientWidth||620),r||a.observe(d.current)),()=>a.disconnect()},[r,n]),s.useEffect(()=>{h.current&&i&&C.fetchAndParseJSON(t).then(a=>{P.select(h.current).selectAll("div").remove();const m=new q.Protocol;R.addProtocol("pmtiles",m.tile);const b={container:h.current,style:p.length===0&&g.length===0?a:{...a,layers:L.filterData(a.layers,[{column:"id",includeValues:p,excludeValues:g}])},attributionControl:!0};y&&(b.center=y),j&&(b.zoom=j);const v=new R.Map(b);v.addControl(new R.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),v.addControl(new R.ScaleControl,"bottom-left")})},[i,t,y,j,p,g]),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col grow justify-center leading-0",ref:d,"aria-label":"Map area",children:(r||i)&&(n||E)?e.jsxRuntimeExports.jsxs("div",{style:{width:r||i,height:Math.max(u,n||(l?u?(r||i)*l>u?(r||i)*l:u:(r||i)*l:E))},children:[e.jsxRuntimeExports.jsx("div",{ref:h,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),o?e.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:H?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.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:()=>{S(!1)},children:e.jsxRuntimeExports.jsx(D.X,{})}),e.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof o=="string"?{__html:z.string2HTML(o)}:void 0,children:s.isValidElement(o)?o:null})]}):e.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{S(!0)},children:e.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null})}function I(x){const{mapStyle:t,graphTitle:n,height:r,width:l,relativeHeight:y,sources:j,graphDescription:u,footNote:p,padding:g,backgroundColor:o=!1,center:i,zoomLevel:w,graphID:E,language:f="en",minHeight:H=0,theme:S="light",includeLayers:d=[],excludeLayers:h=[],ariaLabel:a,uiMode:c="normal",styles:m,classNames:b,mapLegend:v}=x,[M,k]=s.useState(typeof t=="string"?t:t[0].style);s.useEffect(()=>{k(typeof t=="string"?t:t[0].style)},[t]);const V=s.useMemo(()=>({ignoreCase:!0,ignoreAccents:!0,trim:!0}),[]);return e.jsxRuntimeExports.jsx("div",{className:`${S||"light"} flex ${l?"w-fit grow-0":"w-full grow"}`,dir:f==="he"||f==="ar"?"rtl":void 0,children:e.jsxRuntimeExports.jsx("div",{className:e.mo(`${o?o===!0?"bg-primary-gray-200 dark:bg-primary-gray-650 ":"":"bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${f||"en"}`,l?"w-fit":"w-full",b?.graphContainer),style:{...m?.graphContainer||{},...o&&o!==!0?{backgroundColor:o}:{}},id:E,"aria-label":a||`${n?`The graph shows ${n}. `:""}This is a map.${u?` ${u}`:""}`,children:e.jsxRuntimeExports.jsx("div",{className:"flex grow",style:{padding:o?g||"1rem":g||0},children:e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4 grow justify-between",children:[n||u?e.jsxRuntimeExports.jsx(W.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:b?.title,description:b?.description},graphTitle:n,graphDescription:u,width:l}):null,typeof t=="string"?null:e.jsxRuntimeExports.jsx(O.Za,{options:t.map(N=>({label:N.name,value:N.style})),isClearable:!1,size:"sm",variant:c,isRtl:f==="he"||f==="ar",isSearchable:!0,filterOption:O.Hu(V),defaultValue:{label:t[0].name,value:t[0].style},controlShouldRenderValue:!0,onChange:N=>{N&&k(N.value)}}),typeof t=="string"?e.jsxRuntimeExports.jsx(F,{mapStyle:t,center:i,zoomLevel:w,width:l,height:r,relativeHeight:y,minHeight:H,includeLayers:d,excludeLayers:h,mapLegend:v}):e.jsxRuntimeExports.jsx(_,{mapStyle:M,center:i,zoomLevel:w,width:l,height:r,relativeHeight:y,minHeight:H,includeLayers:d,excludeLayers:h,mapLegend:(v||[]).find(N=>N.mapStyleName===t.find(G=>G.style===M)?.name)?.legend}),j||p?e.jsxRuntimeExports.jsx($.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:b?.footnote,source:b?.source},sources:j,footNote:p,width:l}):null]})})})})}exports.GeoHubMap=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-CTPQjnHt.cjs"),c=require("react"),ce=require("./DropdownSelect-Doz3mCrM.cjs"),H=require("maplibre-gl"),fe=require("pmtiles");;/* empty css */const le=require("./fetchAndParseData-l5HGMAEs.cjs"),ie=require("./filterData-T5DQBE9b.cjs"),ue=require("./index-DRXx7m-C.cjs"),de=require("./string2HTML-CPGr_I5E.cjs"),ae=require("./GraphContainer-d8A46BK2.cjs"),pe=require("./select-Bnfk0lJx.cjs"),xe=require("./GraphHeader.cjs"),be=require("./GraphFooter.cjs");function ye(g){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(g){for(const t in g)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(g,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>g[t]})}}return e.default=g,Object.freeze(e)}const me=ye(fe);function je(g){const e=s.compilerRuntimeExports.c(22),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,D]=c.useState(0),[j,C]=c.useState(!0),E=c.useRef(null),v=c.useRef(null),h=c.useRef(null);let S,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{const d=new ResizeObserver(b=>{L(b[0].target.clientWidth||620),D(b[0].target.clientHeight||480)});return E.current&&d.observe(E.current),()=>d.disconnect()},f=[],e[0]=S,e[1]=f):(S=e[0],f=e[1]),c.useEffect(S,f);let x,m;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(x=()=>{v.current&&l&&!h.current&&le.fetchAndParseJSON(t).then(d=>{pe.select(v.current).selectAll("div").remove();const Q=new me.Protocol;H.addProtocol("pmtiles",Q.tile);const k={container:v.current,style:n.length===0&&u.length===0?d:{...d,layers:ie.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(k.center=i),p&&(k.zoom=p),h.current=new H.Map(k),h.current.addControl(new H.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),h.current.addControl(new H.ScaleControl,"bottom-left")})},m=[l,i,p,n,u,t],e[2]=i,e[3]=u,e[4]=n,e[5]=t,e[6]=l,e[7]=p,e[8]=x,e[9]=m):(x=e[8],m=e[9]),c.useEffect(x,m);let R,r;e[10]!==u||e[11]!==n||e[12]!==t?(R=()=>{h.current&&le.fetchAndParseJSON(t).then(d=>{const b={...d,layers:ie.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])};h.current.setStyle(b)})},r=[u,n,t],e[10]=u,e[11]=n,e[12]=t,e[13]=R,e[14]=r):(R=e[13],r=e[14]),c.useEffect(R,r);let o;e[15]!==a||e[16]!==j||e[17]!==y||e[18]!==l?(o=l&&y?s.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[s.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.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:()=>{C(!1)},children:s.jsxRuntimeExports.jsx(ue.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof a=="string"?{__html:de.string2HTML(a)}:void 0,children:c.isValidElement(a)?a:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{C(!0)},children:s.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null,e[15]=a,e[16]=j,e[17]=y,e[18]=l,e[19]=o):o=e[19];let w;return e[20]!==o?(w=s.jsxRuntimeExports.jsx(ae.GraphArea,{ref:E,children:o}),e[20]=o,e[21]=w):w=e[21],w}function ve(g){const e=s.compilerRuntimeExports.c(17),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,D]=c.useState(0),[j,C]=c.useState(!0),E=c.useRef(null),v=c.useRef(null);let h,S;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const r=new ResizeObserver(o=>{L(o[0].target.clientWidth||620),D(o[0].target.clientHeight||480)});return E.current&&r.observe(E.current),()=>r.disconnect()},S=[],e[0]=h,e[1]=S):(h=e[0],S=e[1]),c.useEffect(h,S);let f,x;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(f=()=>{v.current&&l&&le.fetchAndParseJSON(t).then(r=>{pe.select(v.current).selectAll("div").remove();const w=new me.Protocol;H.addProtocol("pmtiles",w.tile);const d={container:v.current,style:n.length===0&&u.length===0?r:{...r,layers:ie.filterData(r.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(d.center=i),p&&(d.zoom=p);const b=new H.Map(d);b.addControl(new H.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),b.addControl(new H.ScaleControl,"bottom-left")})},x=[l,t,i,p,n,u],e[2]=i,e[3]=u,e[4]=n,e[5]=t,e[6]=l,e[7]=p,e[8]=f,e[9]=x):(f=e[8],x=e[9]),c.useEffect(f,x);let m;e[10]!==a||e[11]!==j||e[12]!==y||e[13]!==l?(m=l&&y?s.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[s.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?s.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.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:()=>{C(!1)},children:s.jsxRuntimeExports.jsx(ue.X,{})}),s.jsxRuntimeExports.jsx("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",dangerouslySetInnerHTML:typeof a=="string"?{__html:de.string2HTML(a)}:void 0,children:c.isValidElement(a)?a:null})]}):s.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{C(!0)},children:s.jsxRuntimeExports.jsx("div",{className:"show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500",children:"Show Legend"})})}):null]}):null,e[10]=a,e[11]=j,e[12]=y,e[13]=l,e[14]=m):m=e[14];let R;return e[15]!==m?(R=s.jsxRuntimeExports.jsx(ae.GraphArea,{ref:E,children:m}),e[15]=m,e[16]=R):R=e[16],R}function Se(g){const e=s.compilerRuntimeExports.c(85),{mapStyle:t,graphTitle:i,height:p,width:n,relativeHeight:u,sources:a,graphDescription:l,footNote:L,padding:y,backgroundColor:D,center:j,zoomLevel:C,graphID:E,language:v,minHeight:h,theme:S,includeLayers:f,excludeLayers:x,ariaLabel:m,uiMode:R,styles:r,classNames:o,mapLegend:w}=g,d=D===void 0?!1:D,b=v===void 0?"en":v,Q=h===void 0?0:h,k=S===void 0?"light":S;let U;e[0]!==f?(U=f===void 0?[]:f,e[0]=f,e[1]=U):U=e[1];const Y=U;let ee;e[2]!==x?(ee=x===void 0?[]:x,e[2]=x,e[3]=ee):ee=e[3];const te=ee,oe=R===void 0?"normal":R,[re,ge]=c.useState(void 0),he=c.useRef(null),M=typeof t=="string"?t:t[0].style;let O,z,P,q,G,V,_,A,T,W,F,I,J,N,$,X;if(e[4]!==m||e[5]!==d||e[6]!==o?.description||e[7]!==o?.graphContainer||e[8]!==o?.title||e[9]!==M||e[10]!==l||e[11]!==E||e[12]!==i||e[13]!==p||e[14]!==b||e[15]!==t||e[16]!==Q||e[17]!==y||e[18]!==u||e[19]!==r?.description||e[20]!==r?.graphContainer||e[21]!==r?.title||e[22]!==k||e[23]!==oe||e[24]!==n){const ne={ignoreCase:!0,ignoreAccents:!0,trim:!0};O=ae.GraphContainer,X=o?.graphContainer,z=r?.graphContainer,P=E,q=he,G=m,V=d,_=k,A=b,T=Q,W=n,F=p,I=u,J=y,e[41]!==o?.description||e[42]!==o?.title||e[43]!==l||e[44]!==i||e[45]!==r?.description||e[46]!==r?.title||e[47]!==n?(N=i||l?s.jsxRuntimeExports.jsx(xe.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:o?.title,description:o?.description},graphTitle:i,graphDescription:l,width:n}):null,e[41]=o?.description,e[42]=o?.title,e[43]=l,e[44]=i,e[45]=r?.description,e[46]=r?.title,e[47]=n,e[48]=N):N=e[48],$=typeof t=="string"?null:s.jsxRuntimeExports.jsx(ce.ja,{options:t.map(Re),isClearable:!1,size:"sm",variant:oe,isRtl:b==="he"||b==="ar",isSearchable:!0,filterOption:ce.Du(ne),defaultValue:t.find(K=>K.style===M),controlShouldRenderValue:!0,onChange:K=>{K&&ge(K.value)}}),e[4]=m,e[5]=d,e[6]=o?.description,e[7]=o?.graphContainer,e[8]=o?.title,e[9]=M,e[10]=l,e[11]=E,e[12]=i,e[13]=p,e[14]=b,e[15]=t,e[16]=Q,e[17]=y,e[18]=u,e[19]=r?.description,e[20]=r?.graphContainer,e[21]=r?.title,e[22]=k,e[23]=oe,e[24]=n,e[25]=O,e[26]=z,e[27]=P,e[28]=q,e[29]=G,e[30]=V,e[31]=_,e[32]=A,e[33]=T,e[34]=W,e[35]=F,e[36]=I,e[37]=J,e[38]=N,e[39]=$,e[40]=X}else O=e[25],z=e[26],P=e[27],q=e[28],G=e[29],V=e[30],_=e[31],A=e[32],T=e[33],W=e[34],F=e[35],I=e[36],J=e[37],N=e[38],$=e[39],X=e[40];let Z;e[49]!==j||e[50]!==M||e[51]!==te||e[52]!==Y||e[53]!==w||e[54]!==t||e[55]!==re||e[56]!==C?(Z=typeof t=="string"?s.jsxRuntimeExports.jsx(ve,{mapStyle:t,center:j,zoomLevel:C,includeLayers:Y,excludeLayers:te,mapLegend:w}):s.jsxRuntimeExports.jsx(je,{mapStyle:re||M,center:j,zoomLevel:C,includeLayers:Y,excludeLayers:te,mapLegend:(w||[]).find(ne=>ne.mapStyleName===t.find(K=>K.style===(re||M))?.name)?.legend}),e[49]=j,e[50]=M,e[51]=te,e[52]=Y,e[53]=w,e[54]=t,e[55]=re,e[56]=C,e[57]=Z):Z=e[57];let B;e[58]!==o?.footnote||e[59]!==o?.source||e[60]!==L||e[61]!==a||e[62]!==r?.footnote||e[63]!==r?.source||e[64]!==n?(B=a||L?s.jsxRuntimeExports.jsx(be.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:o?.footnote,source:o?.source},sources:a,footNote:L,width:n}):null,e[58]=o?.footnote,e[59]=o?.source,e[60]=L,e[61]=a,e[62]=r?.footnote,e[63]=r?.source,e[64]=n,e[65]=B):B=e[65];let se;return e[66]!==O||e[67]!==z||e[68]!==P||e[69]!==q||e[70]!==G||e[71]!==V||e[72]!==_||e[73]!==A||e[74]!==T||e[75]!==W||e[76]!==F||e[77]!==I||e[78]!==J||e[79]!==N||e[80]!==$||e[81]!==Z||e[82]!==B||e[83]!==X?(se=s.jsxRuntimeExports.jsxs(O,{className:X,style:z,id:P,ref:q,"aria-label":G,backgroundColor:V,theme:_,language:A,minHeight:T,width:W,height:F,relativeHeight:I,padding:J,children:[N,$,Z,B]}),e[66]=O,e[67]=z,e[68]=P,e[69]=q,e[70]=G,e[71]=V,e[72]=_,e[73]=A,e[74]=T,e[75]=W,e[76]=F,e[77]=I,e[78]=J,e[79]=N,e[80]=$,e[81]=Z,e[82]=B,e[83]=X,e[84]=se):se=e[84],se}function Re(g){return{label:g.name,value:g.style}}exports.GeoHubMap=Se;
|
|
2
2
|
//# sourceMappingURL=GeoHubMap.cjs.map
|
package/dist/GeoHubMap.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoHubMap.cjs","sources":["../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubMultipleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubSingleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/index.tsx"],"sourcesContent":["import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n width?: number;\r\n height?: number;\r\n relativeHeight?: number;\r\n minHeight: number;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n mapLegend?: string | React.ReactNode;\r\n}\r\n\r\nexport function GeoHubMultipleMap(props: Props) {\r\n const {\r\n mapStyle,\r\n height,\r\n width,\r\n relativeHeight,\r\n center,\r\n zoomLevel,\r\n minHeight,\r\n includeLayers,\r\n excludeLayers,\r\n mapLegend,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapRef = useRef<any>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (mapContainer.current && svgWidth && !mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n mapRef.current = new maplibreGl.Map(mapObj);\r\n mapRef.current.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n mapRef.current.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, center, zoomLevel, includeLayers, excludeLayers, mapStyle]);\r\n useEffect(() => {\r\n if (mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapStyleObj: any = {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n };\r\n mapRef.current.setStyle(mapStyleObj);\r\n });\r\n }\r\n }, [excludeLayers, includeLayers, mapStyle]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <div\r\n style={{\r\n width: width || svgWidth,\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 ),\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\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 dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n","import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n width?: number;\r\n height?: number;\r\n relativeHeight?: number;\r\n minHeight: number;\r\n mapLegend?: string | React.ReactNode;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n}\r\n\r\nexport function GeoHubSingleMap(props: Props) {\r\n const {\r\n mapStyle,\r\n height,\r\n width,\r\n relativeHeight,\r\n center,\r\n zoomLevel,\r\n minHeight,\r\n includeLayers,\r\n excludeLayers,\r\n mapLegend,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (mapContainer.current && svgWidth) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n const map = new maplibreGl.Map(mapObj);\r\n map.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n map.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, mapStyle, center, zoomLevel, includeLayers, excludeLayers]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <div\r\n style={{\r\n width: width || svgWidth,\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 ),\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\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 dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n","import React, { useEffect, useMemo, useState } from 'react';\r\nimport { DropdownSelect, createFilter } from '@undp/design-system-react/DropdownSelect';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { GeoHubMultipleMap } from './GeoHubMultipleMap';\r\nimport { GeoHubSingleMap } from './GeoHubSingleMap';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ClassNameObject,\r\n Languages,\r\n MapLegendDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\n\r\ninterface Props {\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 /** 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 /** URL for mapStyle JSON. If the type is string, otherwise it creates and dropdown and provide end user to select the map style they would like to */\r\n mapStyle: string | { style: string; name: string }[];\r\n /** Defines the legend for the map. If the mapStyle is string, mapLegend can be string or ReactNode. mapLegend with type string is show as innerHTML. If the mapStyle is not string, mapLegend is of type { mapStyleName: string; legend: string | React.ReactNode }[] where mapStyleName corresponds to the each name in the mapStyle. */\r\n mapLegend?: string | React.ReactNode | MapLegendDataType[];\r\n /** Starting center point of the map */\r\n center?: [number, number];\r\n /** Starting zoom level of the map */\r\n zoomLevel?: number;\r\n /** List of layer IDs to be included in the visualization. If this is present only these layers are included. */\r\n includeLayers?: string[];\r\n /** List of layer IDs to be excluded from the visualization */\r\n excludeLayers?: string[];\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 /** Theme for the UI elements */\r\n uiMode?: 'light' | 'normal';\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 [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm) and [pmtiles](https://www.npmjs.com/package/pmtiles) package to your project */\r\nexport function GeoHubMap(props: Props) {\r\n const {\r\n mapStyle,\r\n graphTitle,\r\n height,\r\n width,\r\n relativeHeight,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n center,\r\n zoomLevel,\r\n graphID,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n includeLayers = [],\r\n excludeLayers = [],\r\n ariaLabel,\r\n uiMode = 'normal',\r\n styles,\r\n classNames,\r\n mapLegend,\r\n } = props;\r\n\r\n const [selectedMapStyle, setSelectedMapStyle] = useState(\r\n typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style,\r\n );\r\n\r\n useEffect(() => {\r\n setSelectedMapStyle(typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style);\r\n }, [mapStyle]);\r\n\r\n const filterConfig = useMemo(\r\n () => ({\r\n ignoreCase: true,\r\n ignoreAccents: true,\r\n trim: true,\r\n }),\r\n [],\r\n );\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n width ? 'w-fit' : 'w-full',\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a map.${graphDescription ? ` ${graphDescription}` : ''}`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription ? (\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 />\r\n ) : null}\r\n {typeof mapStyle === 'string' ? null : (\r\n <DropdownSelect\r\n options={mapStyle.map(d => ({ label: d.name, value: d.style }))}\r\n isClearable={false}\r\n size='sm'\r\n variant={uiMode}\r\n isRtl={language === 'he' || language === 'ar'}\r\n isSearchable\r\n filterOption={createFilter(filterConfig)}\r\n defaultValue={{\r\n label: mapStyle[0].name,\r\n value: mapStyle[0].style,\r\n }}\r\n controlShouldRenderValue\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onChange={(el: any) => {\r\n if (el) setSelectedMapStyle(el.value);\r\n }}\r\n />\r\n )}\r\n {typeof mapStyle === 'string' ? (\r\n <GeoHubSingleMap\r\n mapStyle={mapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n minHeight={minHeight}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={mapLegend as string | React.ReactNode | undefined}\r\n />\r\n ) : (\r\n <GeoHubMultipleMap\r\n mapStyle={selectedMapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n minHeight={minHeight}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={\r\n ((mapLegend || []) as MapLegendDataType[]).find(\r\n d =>\r\n d.mapStyleName === mapStyle.find(el => el.style === selectedMapStyle)?.name,\r\n )?.legend\r\n }\r\n />\r\n )}\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 </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["GeoHubMultipleMap","props","mapStyle","height","width","relativeHeight","center","zoomLevel","minHeight","includeLayers","excludeLayers","mapLegend","svgWidth","setSvgWidth","useState","svgHeight","setSvgHeight","showLegend","setShowLegend","graphDiv","useRef","mapContainer","mapRef","useEffect","resizeObserver","entries","fetchAndParseJSON","d","select","protocol","pmtiles","maplibreGl","mapObj","filterData","mapStyleObj","jsx","jsxs","Fragment","X","string2HTML","React","GeoHubSingleMap","map","GeoHubMap","graphTitle","sources","graphDescription","footNote","padding","backgroundColor","graphID","language","theme","ariaLabel","uiMode","styles","classNames","selectedMapStyle","setSelectedMapStyle","filterConfig","useMemo","cn","GraphHeader","DropdownSelect","createFilter","el","GraphFooter"],"mappings":"mzBAyBO,SAASA,EAAkBC,EAAc,CAC9C,KAAM,CACJ,SAAAC,EACA,OAAAC,EACA,MAAAC,EACA,eAAAC,EACA,OAAAC,EACA,UAAAC,EACA,UAAAC,EACA,cAAAC,EACA,cAAAC,EACA,UAAAC,CAAA,EACEV,EAEE,CAACW,EAAUC,CAAW,EAAIC,EAAAA,SAAS,CAAC,EACpC,CAACC,EAAWC,CAAY,EAAIF,EAAAA,SAAS,CAAC,EACtC,CAACG,EAAYC,CAAa,EAAIJ,EAAAA,SAAS,EAAI,EAC3CK,EAAWC,EAAAA,OAAuB,IAAI,EACtCC,EAAeD,EAAAA,OAAuB,IAAI,EAE1CE,EAASF,EAAAA,OAAY,IAAI,EAC/BG,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAiB,IAAI,eAAeC,GAAW,CACnDZ,EAAYT,GAASqB,EAAQ,CAAC,EAAE,OAAO,aAAe,GAAG,EACzDT,EAAab,GAAUsB,EAAQ,CAAC,EAAE,OAAO,cAAgB,GAAG,CAC9D,CAAC,EACD,OAAIN,EAAS,UACXH,EAAaG,EAAS,QAAQ,cAAgB,GAAG,EACjDN,EAAYM,EAAS,QAAQ,aAAe,GAAG,EAC1Cf,GAAOoB,EAAe,QAAQL,EAAS,OAAO,GAE9C,IAAMK,EAAe,WAAA,CAC9B,EAAG,CAACpB,EAAOD,CAAM,CAAC,EAClBoB,EAAAA,UAAU,IAAM,CACVF,EAAa,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AA,EAGFwB,EAAAA,kBAAAA,IAACnC,EAAA,CACC,SAAUyD,EACV,OAAAnD,EACA,UAAAC,EACA,MAAAH,EACA,OAAAD,EACA,eAAAE,EACA,UAAAG,EACA,cAAAC,EACA,cAAAC,EACA,WACIC,GAAa,CAAA,GAA4B,KACzCgB,GACEA,EAAE,eAAiBzB,EAAS,KAAK+D,GAAMA,EAAG,QAAUR,CAAgB,GAAG,IAAA,GACxE,MAAA,CAAA,EAIRZ,GAAWE,EACVZ,EAAAA,kBAAAA,IAAC+B,EAAAA,YAAA,CACC,OAAQ,CAAE,SAAUX,GAAQ,SAAU,OAAQA,GAAQ,MAAA,EACtD,WAAY,CACV,SAAUC,GAAY,SACtB,OAAQA,GAAY,MAAA,EAEtB,QAAAX,EACA,SAAAE,EACA,MAAA3C,CAAA,CAAA,EAEA,IAAA,CAAA,CACN,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAGN"}
|
|
1
|
+
{"version":3,"file":"GeoHubMap.cjs","sources":["../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubMultipleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubSingleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/index.tsx"],"sourcesContent":["import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { GraphArea } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n mapLegend?: string | React.ReactNode;\r\n}\r\n\r\nexport function GeoHubMultipleMap(props: Props) {\r\n const { mapStyle, center, zoomLevel, includeLayers, excludeLayers, mapLegend } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapRef = useRef<any>(null);\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 useEffect(() => {\r\n if (mapContainer.current && svgWidth && !mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n mapRef.current = new maplibreGl.Map(mapObj);\r\n mapRef.current.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n mapRef.current.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, center, zoomLevel, includeLayers, excludeLayers, mapStyle]);\r\n useEffect(() => {\r\n if (mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapStyleObj: any = {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n };\r\n mapRef.current.setStyle(mapStyleObj);\r\n });\r\n }\r\n }, [excludeLayers, includeLayers, mapStyle]);\r\n return (\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <div\r\n style={{\r\n width: svgWidth,\r\n height: svgHeight,\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\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 dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </GraphArea>\r\n );\r\n}\r\n","import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\nimport { GraphArea } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n mapLegend?: string | React.ReactNode;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n}\r\n\r\nexport function GeoHubSingleMap(props: Props) {\r\n const { mapStyle, center, zoomLevel, includeLayers, excludeLayers, mapLegend } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\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 useEffect(() => {\r\n if (mapContainer.current && svgWidth) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n const map = new maplibreGl.Map(mapObj);\r\n map.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n map.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, mapStyle, center, zoomLevel, includeLayers, excludeLayers]);\r\n return (\r\n <GraphArea ref={graphDiv}>\r\n {svgWidth && svgHeight ? (\r\n <div\r\n style={{\r\n width: svgWidth,\r\n height: svgHeight,\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\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 dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </GraphArea>\r\n );\r\n}\r\n","import React, { useRef, useState } from 'react';\r\nimport { DropdownSelect, createFilter } from '@undp/design-system-react/DropdownSelect';\r\n\r\nimport { GeoHubMultipleMap } from './GeoHubMultipleMap';\r\nimport { GeoHubSingleMap } from './GeoHubSingleMap';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ClassNameObject,\r\n Languages,\r\n MapLegendDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\nimport { GraphContainer } from '@/Components/Elements/GraphContainer';\r\n\r\ninterface Props {\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 /** 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 /** URL for mapStyle JSON. If the type is string, otherwise it creates and dropdown and provide end user to select the map style they would like to */\r\n mapStyle: string | { style: string; name: string }[];\r\n /** Defines the legend for the map. If the mapStyle is string, mapLegend can be string or ReactNode. mapLegend with type string is show as innerHTML. If the mapStyle is not string, mapLegend is of type { mapStyleName: string; legend: string | React.ReactNode }[] where mapStyleName corresponds to the each name in the mapStyle. */\r\n mapLegend?: string | React.ReactNode | MapLegendDataType[];\r\n /** Starting center point of the map */\r\n center?: [number, number];\r\n /** Starting zoom level of the map */\r\n zoomLevel?: number;\r\n /** List of layer IDs to be included in the visualization. If this is present only these layers are included. */\r\n includeLayers?: string[];\r\n /** List of layer IDs to be excluded from the visualization */\r\n excludeLayers?: string[];\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 /** Theme for the UI elements */\r\n uiMode?: 'light' | 'normal';\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 [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm) and [pmtiles](https://www.npmjs.com/package/pmtiles) package to your project */\r\nexport function GeoHubMap(props: Props) {\r\n const {\r\n mapStyle,\r\n graphTitle,\r\n height,\r\n width,\r\n relativeHeight,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n center,\r\n zoomLevel,\r\n graphID,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n includeLayers = [],\r\n excludeLayers = [],\r\n ariaLabel,\r\n uiMode = 'normal',\r\n styles,\r\n classNames,\r\n mapLegend,\r\n } = props;\r\n\r\n const [selectedMapStyle, setSelectedMapStyle] = useState<string | undefined>(undefined);\r\n const graphParentDiv = useRef<HTMLDivElement>(null);\r\n\r\n const defaultMapStyleValue = typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style;\r\n\r\n const filterConfig = {\r\n ignoreCase: true,\r\n ignoreAccents: true,\r\n trim: true,\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 ? (\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 />\r\n ) : null}\r\n {typeof mapStyle === 'string' ? null : (\r\n <DropdownSelect\r\n options={mapStyle.map(d => ({ label: d.name, value: d.style }))}\r\n isClearable={false}\r\n size='sm'\r\n variant={uiMode}\r\n isRtl={language === 'he' || language === 'ar'}\r\n isSearchable\r\n filterOption={createFilter(filterConfig)}\r\n defaultValue={mapStyle.find(d => d.style === defaultMapStyleValue)}\r\n controlShouldRenderValue\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onChange={(el: any) => {\r\n if (el) setSelectedMapStyle(el.value);\r\n }}\r\n />\r\n )}\r\n {typeof mapStyle === 'string' ? (\r\n <GeoHubSingleMap\r\n mapStyle={mapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={mapLegend as string | React.ReactNode | undefined}\r\n />\r\n ) : (\r\n <GeoHubMultipleMap\r\n mapStyle={selectedMapStyle || defaultMapStyleValue}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={\r\n ((mapLegend || []) as MapLegendDataType[]).find(\r\n d =>\r\n d.mapStyleName ===\r\n mapStyle.find(el => el.style === (selectedMapStyle || defaultMapStyleValue))?.name,\r\n )?.legend\r\n }\r\n />\r\n )}\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":["GeoHubMultipleMap","props","$","_c","mapStyle","center","zoomLevel","includeLayers","excludeLayers","mapLegend","svgWidth","setSvgWidth","useState","svgHeight","setSvgHeight","showLegend","setShowLegend","graphDiv","useRef","mapContainer","mapRef","t0","t1","Symbol","for","resizeObserver","ResizeObserver","entries","target","clientWidth","clientHeight","current","observe","disconnect","useEffect","t2","t3","fetchAndParseJSON","then","d","select","selectAll","remove","protocol","pmtiles","Protocol","maplibreGl","addProtocol","tile","mapObj","container","style","length","layers","filterData","column","includeValues","excludeValues","attributionControl","zoom","Map","addControl","NavigationControl","visualizePitch","showZoom","showCompass","ScaleControl","t4","t5","d_0","mapStyleObj","setStyle","t6","jsxs","width","height","jsx","Fragment","X","__html","string2HTML","undefined","React","isValidElement","t7","GraphArea","GeoHubSingleMap","map","GeoHubMap","graphTitle","relativeHeight","sources","graphDescription","footNote","padding","backgroundColor","graphID","language","minHeight","theme","ariaLabel","uiMode","styles","classNames","t8","selectedMapStyle","setSelectedMapStyle","graphParentDiv","defaultMapStyleValue","T0","t10","t11","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","t23","t9","description","graphContainer","title","filterConfig","ignoreCase","ignoreAccents","trim","GraphContainer","GraphHeader","DropdownSelect","_temp","createFilter","find","el","value","t24","d_1","mapStyleName","el_0","name","legend","t25","footnote","source","GraphFooter","t26","label"],"mappings":"42B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;
|
|
31
31
|
regLine?: string;
|
|
32
32
|
dataCards?: string;
|
|
33
|
+
colorLegend?: string;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
/** For using these maps you will have to install [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm) and [pmtiles](https://www.npmjs.com/package/pmtiles) package to your project */
|