@undp/data-viz 2.3.17 → 2.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.cjs.map +1 -1
- package/dist/AreaChart.d.ts +2 -0
- package/dist/AreaChart.js +356 -354
- package/dist/AreaChart.js.map +1 -1
- package/dist/{Axis-Jt_tmhxS.cjs → Axis-BTaS9oPQ.cjs} +2 -2
- package/dist/{Axis-Jt_tmhxS.cjs.map → Axis-BTaS9oPQ.cjs.map} +1 -1
- package/dist/{Axis-RyGdzLrG.js → Axis-CNZYWzH0.js} +2 -2
- package/dist/{Axis-RyGdzLrG.js.map → Axis-CNZYWzH0.js.map} +1 -1
- package/dist/{AxisTitle-DGjX1_2v.js → AxisTitle-CyLCqpW6.js} +2 -2
- package/dist/{AxisTitle-DGjX1_2v.js.map → AxisTitle-CyLCqpW6.js.map} +1 -1
- package/dist/{AxisTitle-DV4n0RxE.cjs → AxisTitle-DP_evhbe.cjs} +2 -2
- package/dist/{AxisTitle-DV4n0RxE.cjs.map → AxisTitle-DP_evhbe.cjs.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +6 -0
- package/dist/BarGraph.js +1687 -1675
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.cjs.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BasicStatCard.js +46 -45
- package/dist/BasicStatCard.js.map +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +268 -265
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +300 -298
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +526 -523
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +330 -328
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +303 -301
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +4 -4
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.js +2 -2
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.js +2 -2
- package/dist/CopyTextButton.cjs +1 -1
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +7 -9
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +1 -1
- package/dist/CsvDownloadButton.js +2 -2
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +10 -12
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.cjs.map +1 -1
- package/dist/DataTable.d.ts +2 -0
- package/dist/DataTable.js +103 -102
- package/dist/DataTable.js.map +1 -1
- package/dist/{DetailsModal-C3qlUyFK.js → DetailsModal-B2XBWR7w.js} +4 -4
- package/dist/{DetailsModal-C3qlUyFK.js.map → DetailsModal-B2XBWR7w.js.map} +1 -1
- package/dist/{DetailsModal-DIRTulvr.cjs → DetailsModal-jmmKRMRM.cjs} +2 -2
- package/dist/{DetailsModal-DIRTulvr.cjs.map → DetailsModal-jmmKRMRM.cjs.map} +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.cjs.map +1 -1
- package/dist/DifferenceLineChart.d.ts +4 -0
- package/dist/DifferenceLineChart.js +441 -437
- package/dist/DifferenceLineChart.js.map +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +4 -0
- package/dist/DonutChart.js +146 -142
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.js +146 -146
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-NNpOs7DX.cjs → DropdownSelect-CX1yMemd.cjs} +2 -2
- package/dist/DropdownSelect-CX1yMemd.cjs.map +1 -0
- package/dist/{DropdownSelect-B2WTeedJ.js → DropdownSelect-Dz7imdTB.js} +6 -9
- package/dist/DropdownSelect-Dz7imdTB.js.map +1 -0
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.cjs.map +1 -1
- package/dist/DualAxisLineChart.d.ts +4 -0
- package/dist/DualAxisLineChart.js +336 -332
- package/dist/DualAxisLineChart.js.map +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +547 -544
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/{EmptyState-B4c-CrXs.cjs → EmptyState-CFmiFPHz.cjs} +2 -2
- package/dist/{EmptyState-B4c-CrXs.cjs.map → EmptyState-CFmiFPHz.cjs.map} +1 -1
- package/dist/{EmptyState-B3fPoH6L.js → EmptyState-CaxXCkiN.js} +4 -4
- package/dist/{EmptyState-B3fPoH6L.js.map → EmptyState-CaxXCkiN.js.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +1 -1
- package/dist/ExcelDownloadButton.js +2 -2
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.js +2 -2
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +111 -111
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.js +71 -71
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +83 -83
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/{GraphContainer-DwMxWRCi.js → GraphContainer-B8ZqOzKI.js} +2 -2
- package/dist/{GraphContainer-DwMxWRCi.js.map → GraphContainer-B8ZqOzKI.js.map} +1 -1
- package/dist/{GraphContainer-B1EDxJ0S.cjs → GraphContainer-Cul9b74X.cjs} +2 -2
- package/dist/{GraphContainer-B1EDxJ0S.cjs.map → GraphContainer-Cul9b74X.cjs.map} +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +2 -2
- package/dist/GraphEl-D8WRC8-j.cjs +2 -0
- package/dist/GraphEl-D8WRC8-j.cjs.map +1 -0
- package/dist/{GraphEl-CnJf8b50.js → GraphEl-Dorm_qQE.js} +48 -10
- package/dist/GraphEl-Dorm_qQE.js.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.js +2 -2
- package/dist/GraphHeader.cjs +1 -1
- package/dist/GraphHeader.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.js +2 -2
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +6 -6
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/GriddedGraphsFromConfig.js +2 -2
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +4 -0
- package/dist/HeatMap.js +158 -155
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.cjs.map +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +81 -80
- package/dist/Histogram.js.map +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +283 -281
- package/dist/HybridMap.js.map +1 -1
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.js +2 -2
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs.map +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +367 -365
- package/dist/LineChartWithConfidenceInterval.js.map +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.cjs.map +1 -1
- package/dist/LinearColorLegend.d.ts +1 -0
- package/dist/LinearColorLegend.js +38 -37
- package/dist/LinearColorLegend.js.map +1 -1
- package/dist/{Modal-ZX55hLH-.cjs → Modal-BIErPPKT.cjs} +5 -5
- package/dist/{Modal-ZX55hLH-.cjs.map → Modal-BIErPPKT.cjs.map} +1 -1
- package/dist/{Modal-BV4rkoLM.js → Modal-CrUYln5V.js} +4 -4
- package/dist/{Modal-BV4rkoLM.js.map → Modal-CrUYln5V.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +4 -4
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.js +2 -2
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +4 -4
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -2
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +434 -432
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.cjs.map +1 -1
- package/dist/MultiLineChart.d.ts +4 -0
- package/dist/MultiLineChart.js +398 -394
- package/dist/MultiLineChart.js.map +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +273 -271
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +4 -4
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +2 -2
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.js +3 -3
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +220 -218
- package/dist/RadarChart.js.map +1 -1
- package/dist/{ReferenceLine-M9aP3dj-.cjs → ReferenceLine-CpU4G01Y.cjs} +2 -2
- package/dist/{ReferenceLine-M9aP3dj-.cjs.map → ReferenceLine-CpU4G01Y.cjs.map} +1 -1
- package/dist/{ReferenceLine-CNEjAYvv.js → ReferenceLine-D41VuUhE.js} +3 -3
- package/dist/{ReferenceLine-CNEjAYvv.js.map → ReferenceLine-D41VuUhE.js.map} +1 -1
- package/dist/{RegressionLine-Ci-Dh0w0.cjs → RegressionLine-BFoBiVJk.cjs} +2 -2
- package/dist/{RegressionLine-Ci-Dh0w0.cjs.map → RegressionLine-BFoBiVJk.cjs.map} +1 -1
- package/dist/{RegressionLine-BDrndQxo.js → RegressionLine-CuwB42I6.js} +4 -4
- package/dist/{RegressionLine-BDrndQxo.js.map → RegressionLine-CuwB42I6.js.map} +1 -1
- package/dist/SVGDownloadButton.cjs +1 -1
- package/dist/SVGDownloadButton.js +2 -2
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +2 -0
- package/dist/SankeyChart.js +439 -437
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +2 -0
- package/dist/ScatterPlot.js +425 -423
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/ScrollStory.js +3 -3
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.cjs.map +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +360 -358
- package/dist/SimpleLineChart.js.map +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +6 -6
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardFromConfig.js +2 -2
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +3 -3
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +6 -6
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +2 -2
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +10 -10
- package/dist/{Source-BOSAl3UX.cjs → Source-PKuwZOn3.cjs} +2 -2
- package/dist/{Source-BOSAl3UX.cjs.map → Source-PKuwZOn3.cjs.map} +1 -1
- package/dist/{Source-Djkz-7jX.js → Source-QGk8vhkS.js} +3 -3
- package/dist/{Source-Djkz-7jX.js.map → Source-QGk8vhkS.js.map} +1 -1
- package/dist/Source.cjs +1 -1
- package/dist/Source.js +3 -3
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +3 -3
- package/dist/{Spinner-CtJETd5V.js → Spinner-B2IIKg9r.js} +2 -2
- package/dist/{Spinner-CtJETd5V.js.map → Spinner-B2IIKg9r.js.map} +1 -1
- package/dist/{Spinner-jTMOLuw_.cjs → Spinner-WHzzloYQ.cjs} +2 -2
- package/dist/{Spinner-jTMOLuw_.cjs.map → Spinner-WHzzloYQ.cjs.map} +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.cjs.map +1 -1
- package/dist/StatCardFromData.d.ts +4 -0
- package/dist/StatCardFromData.js +97 -95
- package/dist/StatCardFromData.js.map +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +360 -357
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +198 -196
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.d.ts +2 -0
- package/dist/ThresholdColorLegendWithMouseOver.js +50 -48
- package/dist/ThresholdColorLegendWithMouseOver.js.map +1 -1
- package/dist/{Tooltip-CohiIbLZ.js → Tooltip-Bj-s__cI.js} +3 -3
- package/dist/{Tooltip-CohiIbLZ.js.map → Tooltip-Bj-s__cI.js.map} +1 -1
- package/dist/{Tooltip-BLa2EfMs.cjs → Tooltip-Hr46paWP.cjs} +2 -2
- package/dist/{Tooltip-BLa2EfMs.cjs.map → Tooltip-Hr46paWP.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +219 -217
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +1 -0
- package/dist/{Typography-DMVW6JnV.js → Typography-BO0gQDIT.js} +2 -2
- package/dist/{Typography-DMVW6JnV.js.map → Typography-BO0gQDIT.js.map} +1 -1
- package/dist/{Typography-CZZxlj1W.cjs → Typography-BqmyF1gP.cjs} +2 -2
- package/dist/{Typography-CZZxlj1W.cjs.map → Typography-BqmyF1gP.cjs.map} +1 -1
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.cjs.map +1 -1
- package/dist/UnitChart.d.ts +4 -0
- package/dist/UnitChart.js +88 -86
- package/dist/UnitChart.js.map +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.cjs.map +1 -1
- package/dist/WaterfallChart.d.ts +2 -0
- package/dist/WaterfallChart.js +243 -241
- package/dist/WaterfallChart.js.map +1 -1
- package/dist/{XAxesLabels-IwjMJkYS.js → XAxesLabels-B9gkjUiC.js} +3 -3
- package/dist/{XAxesLabels-IwjMJkYS.js.map → XAxesLabels-B9gkjUiC.js.map} +1 -1
- package/dist/{XAxesLabels-C6o9jJal.cjs → XAxesLabels-C03jHniq.cjs} +2 -2
- package/dist/{XAxesLabels-C6o9jJal.cjs.map → XAxesLabels-C03jHniq.cjs.map} +1 -1
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs +2 -0
- package/dist/XTicksAndGridLines-C5DuC5oY.cjs.map +1 -0
- package/dist/XTicksAndGridLines-gdbGX2rm.js +39 -0
- package/dist/XTicksAndGridLines-gdbGX2rm.js.map +1 -0
- package/dist/{YAxesLabels-BQ2aCazV.cjs → YAxesLabels-DeENFC2M.cjs} +2 -2
- package/dist/{YAxesLabels-BQ2aCazV.cjs.map → YAxesLabels-DeENFC2M.cjs.map} +1 -1
- package/dist/{YAxesLabels-DoGvgHdw.js → YAxesLabels-hWEUCTvs.js} +3 -3
- package/dist/{YAxesLabels-DoGvgHdw.js.map → YAxesLabels-hWEUCTvs.js.map} +1 -1
- package/dist/YTicksAndGridLines-CsNSq9W9.js +39 -0
- package/dist/YTicksAndGridLines-CsNSq9W9.js.map +1 -0
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs +2 -0
- package/dist/YTicksAndGridLines-DFjm8RCc.cjs.map +1 -0
- package/dist/{checkIfMultiple-TOaaUwS7.cjs → checkIfMultiple-CH5tqj4q.cjs} +2 -2
- package/dist/checkIfMultiple-CH5tqj4q.cjs.map +1 -0
- package/dist/{checkIfMultiple-B97uOUVq.js → checkIfMultiple-Dpyy6BUP.js} +6 -6
- package/dist/checkIfMultiple-Dpyy6BUP.js.map +1 -0
- package/dist/{customArea-B1LWQBmM.cjs → customArea-BAcQ3pBM.cjs} +2 -2
- package/dist/{customArea-B1LWQBmM.cjs.map → customArea-BAcQ3pBM.cjs.map} +1 -1
- package/dist/{customArea-Cc2whe6P.js → customArea-D89lETG0.js} +3 -3
- package/dist/{customArea-Cc2whe6P.js.map → customArea-D89lETG0.js.map} +1 -1
- package/dist/getSliderMarks-BzrpHrHS.cjs +2 -0
- package/dist/getSliderMarks-BzrpHrHS.cjs.map +1 -0
- package/dist/{getSliderMarks-vXsR8RrR.js → getSliderMarks-X-_goqH9.js} +3 -4
- package/dist/getSliderMarks-X-_goqH9.js.map +1 -0
- package/dist/{index-CZ0elhKR.js → index-ApTBN0kp.js} +20 -10
- package/dist/{index-CZ0elhKR.js.map → index-ApTBN0kp.js.map} +1 -1
- package/dist/index-Bdo_HXb_.cjs +2 -0
- package/dist/index-Bdo_HXb_.cjs.map +1 -0
- package/dist/{index-sbKVyHS2.cjs → index-BhI7mBJx.cjs} +2 -2
- package/dist/{index-sbKVyHS2.cjs.map → index-BhI7mBJx.cjs.map} +1 -1
- package/dist/{index-D69M6klB.cjs → index-BuhBhuCq.cjs} +2 -2
- package/dist/{index-D69M6klB.cjs.map → index-BuhBhuCq.cjs.map} +1 -1
- package/dist/index-CGrBpeUa.js +380 -0
- package/dist/index-CGrBpeUa.js.map +1 -0
- package/dist/{index-CHPV5EwG-BCLAYDCV.js → index-CHPV5EwG-BzibaIRc.js} +5 -9
- package/dist/index-CHPV5EwG-BzibaIRc.js.map +1 -0
- package/dist/{index-CHPV5EwG-6v2a2njQ.cjs → index-CHPV5EwG-D4pAp7u0.cjs} +3 -3
- package/dist/index-CHPV5EwG-D4pAp7u0.cjs.map +1 -0
- package/dist/{index-Co3YGYe1.js → index-Cv_5q6Rb.js} +3 -3
- package/dist/{index-Co3YGYe1.js.map → index-Cv_5q6Rb.js.map} +1 -1
- package/dist/{index-D_dtv_T9.js → index-DHVGV8Df.js} +3 -3
- package/dist/{index-D_dtv_T9.js.map → index-DHVGV8Df.js.map} +1 -1
- package/dist/{index-CoobIWNj.cjs → index-FXfr51ZM.cjs} +2 -2
- package/dist/{index-CoobIWNj.cjs.map → index-FXfr51ZM.cjs.map} +1 -1
- package/dist/{index-D6CYcVc7-BOa7Dpvf.js → index-Scxs_wcm-BAjU0Cob.js} +16 -16
- package/dist/index-Scxs_wcm-BAjU0Cob.js.map +1 -0
- package/dist/index-Scxs_wcm-DUDU-Gll.cjs +2 -0
- package/dist/index-Scxs_wcm-DUDU-Gll.cjs.map +1 -0
- package/dist/{index-DoS4bGNa-C3DbPpy3.cjs → index-w64Zl8io-DrMm5QSb.cjs} +2 -2
- package/dist/index-w64Zl8io-DrMm5QSb.cjs.map +1 -0
- package/dist/{index-DoS4bGNa-Bgab95kx.js → index-w64Zl8io-ihagHOdP.js} +2 -2
- package/dist/index-w64Zl8io-ihagHOdP.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +92 -17
- package/dist/index.js +3 -3
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs +2 -0
- package/dist/numberFormattingFunction-Cn9R7CM9.cjs.map +1 -0
- package/dist/numberFormattingFunction-DqMf_v1m.js +28 -0
- package/dist/numberFormattingFunction-DqMf_v1m.js.map +1 -0
- package/dist/{proxy--_f6k3NR.js → proxy-BsxtcZKa.js} +2 -2
- package/dist/{proxy--_f6k3NR.js.map → proxy-BsxtcZKa.js.map} +1 -1
- package/dist/{proxy-C4-uo6nS.cjs → proxy-CqH8m8IQ.cjs} +2 -2
- package/dist/{proxy-C4-uo6nS.cjs.map → proxy-CqH8m8IQ.cjs.map} +1 -1
- package/dist/{string2HTML-DUYZT1L9.js → string2HTML-BrFperRM.js} +2 -2
- package/dist/{string2HTML-DUYZT1L9.js.map → string2HTML-BrFperRM.js.map} +1 -1
- package/dist/{string2HTML-xx9MzTtY.cjs → string2HTML-ZoGd08P_.cjs} +2 -2
- package/dist/{string2HTML-xx9MzTtY.cjs.map → string2HTML-ZoGd08P_.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-in-view-DqvKAveg.js → use-in-view-KOXq5Kmc.js} +2 -2
- package/dist/{use-in-view-DqvKAveg.js.map → use-in-view-KOXq5Kmc.js.map} +1 -1
- package/dist/{use-in-view-C3o_ntMv.cjs → use-in-view-dnRv_qqF.cjs} +2 -2
- package/dist/{use-in-view-C3o_ntMv.cjs.map → use-in-view-dnRv_qqF.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +9 -18
- package/dist/utils.js +1 -1
- package/dist/x-BXShoIAM-BC2sxios.cjs +2 -0
- package/dist/x-BXShoIAM-BC2sxios.cjs.map +1 -0
- package/dist/{x-BBpi7a_7-BsvWCzYM.js → x-BXShoIAM-D6VWO6z5.js} +3 -5
- package/dist/x-BXShoIAM-D6VWO6z5.js.map +1 -0
- package/package.json +2 -2
- package/dist/DropdownSelect-B2WTeedJ.js.map +0 -1
- package/dist/DropdownSelect-NNpOs7DX.cjs.map +0 -1
- package/dist/GraphEl-CnJf8b50.js.map +0 -1
- package/dist/GraphEl-D_w0Qak4.cjs +0 -2
- package/dist/GraphEl-D_w0Qak4.cjs.map +0 -1
- package/dist/XTicksAndGridLines-BDmF9etl.js +0 -38
- package/dist/XTicksAndGridLines-BDmF9etl.js.map +0 -1
- package/dist/XTicksAndGridLines-CekrPykD.cjs +0 -2
- package/dist/XTicksAndGridLines-CekrPykD.cjs.map +0 -1
- package/dist/YTicksAndGridLines-C3GW1xFG.js +0 -38
- package/dist/YTicksAndGridLines-C3GW1xFG.js.map +0 -1
- package/dist/YTicksAndGridLines-UzVC5eBM.cjs +0 -2
- package/dist/YTicksAndGridLines-UzVC5eBM.cjs.map +0 -1
- package/dist/checkIfMultiple-B97uOUVq.js.map +0 -1
- package/dist/checkIfMultiple-TOaaUwS7.cjs.map +0 -1
- package/dist/getSliderMarks-CIuSoedo.cjs +0 -2
- package/dist/getSliderMarks-CIuSoedo.cjs.map +0 -1
- package/dist/getSliderMarks-vXsR8RrR.js.map +0 -1
- package/dist/index-C6VwVS8W.js +0 -378
- package/dist/index-C6VwVS8W.js.map +0 -1
- package/dist/index-CHPV5EwG-6v2a2njQ.cjs.map +0 -1
- package/dist/index-CHPV5EwG-BCLAYDCV.js.map +0 -1
- package/dist/index-D6CYcVc7-BOa7Dpvf.js.map +0 -1
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs +0 -2
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs.map +0 -1
- package/dist/index-DoS4bGNa-Bgab95kx.js.map +0 -1
- package/dist/index-DoS4bGNa-C3DbPpy3.cjs.map +0 -1
- package/dist/index-_TlgeI_i.cjs +0 -2
- package/dist/index-_TlgeI_i.cjs.map +0 -1
- package/dist/numberFormattingFunction-02t-wJta.cjs +0 -2
- package/dist/numberFormattingFunction-02t-wJta.cjs.map +0 -1
- package/dist/numberFormattingFunction-14YCbkN2.js +0 -13
- package/dist/numberFormattingFunction-14YCbkN2.js.map +0 -1
- package/dist/x-BBpi7a_7-BsvWCzYM.js.map +0 -1
- package/dist/x-BBpi7a_7-DXYIEFwN.cjs +0 -2
- package/dist/x-BBpi7a_7-DXYIEFwN.cjs.map +0 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import ie, { useState as Q, useRef as z, useEffect as
|
|
1
|
+
import { c as le, j as t } from "./index-CHPV5EwG-BzibaIRc.js";
|
|
2
|
+
import ie, { useState as Q, useRef as z, useEffect as se } from "react";
|
|
3
3
|
import * as I from "maplibre-gl";
|
|
4
4
|
import * as ae from "pmtiles";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { useSensors as ce, useSensor as
|
|
6
|
+
import { useSensors as ce, useSensor as fe, PointerSensor as me, DndContext as de, useDraggable as ue } from "@dnd-kit/core";
|
|
7
7
|
import { restrictToHorizontalAxis as pe } from "@dnd-kit/modifiers";
|
|
8
|
-
import { X as he,
|
|
9
|
-
import { s as
|
|
10
|
-
import { s as
|
|
11
|
-
import { GraphHeader as
|
|
8
|
+
import { X as he, E as ge, C as be } from "./index-ApTBN0kp.js";
|
|
9
|
+
import { s as ve } from "./string2HTML-BrFperRM.js";
|
|
10
|
+
import { s as ne } from "./select-DKy99ogv.js";
|
|
11
|
+
import { GraphHeader as xe } from "./GraphHeader.js";
|
|
12
12
|
import { GraphFooter as ye } from "./GraphFooter.js";
|
|
13
|
-
import { a as
|
|
14
|
-
function
|
|
13
|
+
import { a as we, G as je } from "./GraphContainer-B8ZqOzKI.js";
|
|
14
|
+
function Ce(j, e) {
|
|
15
15
|
let i = !1;
|
|
16
|
-
function
|
|
16
|
+
function n(o, f) {
|
|
17
17
|
if (!i) {
|
|
18
18
|
i = !0;
|
|
19
|
-
const c = o.getCenter(),
|
|
20
|
-
|
|
19
|
+
const c = o.getCenter(), l = o.getZoom(), r = o.getBearing(), m = o.getPitch();
|
|
20
|
+
f.jumpTo({
|
|
21
21
|
center: c,
|
|
22
|
-
zoom:
|
|
22
|
+
zoom: l,
|
|
23
23
|
bearing: r,
|
|
24
|
-
pitch:
|
|
24
|
+
pitch: m
|
|
25
25
|
}), i = !1;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
j.on("move", () => {
|
|
29
|
-
|
|
29
|
+
n(j, e);
|
|
30
30
|
}), e.on("move", () => {
|
|
31
|
-
|
|
31
|
+
n(e, j);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const e =
|
|
34
|
+
function Se(j) {
|
|
35
|
+
const e = le.c(47), {
|
|
36
36
|
height: i,
|
|
37
|
-
width:
|
|
37
|
+
width: n,
|
|
38
38
|
mapStyles: o,
|
|
39
|
-
center:
|
|
39
|
+
center: f,
|
|
40
40
|
zoomLevel: c,
|
|
41
|
-
mapLegend:
|
|
42
|
-
} = j, [r,
|
|
43
|
-
let
|
|
44
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
41
|
+
mapLegend: l
|
|
42
|
+
} = j, [r, m] = Q(50), [h, g] = Q(!1), v = z(null), [P, Z] = Q(!0), F = z(50), T = z(0);
|
|
43
|
+
let E;
|
|
44
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = {
|
|
45
45
|
activationConstraint: {
|
|
46
46
|
distance: 0
|
|
47
47
|
}
|
|
48
|
-
}, e[0] =
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
e[1] !== r ? (
|
|
48
|
+
}, e[0] = E) : E = e[0];
|
|
49
|
+
const G = ce(fe(me, E));
|
|
50
|
+
let s;
|
|
51
|
+
e[1] !== r ? (s = () => {
|
|
52
52
|
g(!0), F.current = r, v.current && (T.current = v.current.getBoundingClientRect().width);
|
|
53
|
-
}, e[1] = r, e[2] =
|
|
54
|
-
const a =
|
|
55
|
-
let
|
|
56
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
53
|
+
}, e[1] = r, e[2] = s) : s = e[2];
|
|
54
|
+
const a = s;
|
|
55
|
+
let k;
|
|
56
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = (Y) => {
|
|
57
57
|
if (!v.current || T.current === 0)
|
|
58
58
|
return;
|
|
59
59
|
const K = Y.delta.x / T.current * 100, ee = Math.max(0, Math.min(100, F.current + K));
|
|
60
|
-
|
|
61
|
-
}, e[3] =
|
|
62
|
-
const O =
|
|
60
|
+
m(ee);
|
|
61
|
+
}, e[3] = k) : k = e[3];
|
|
62
|
+
const O = k;
|
|
63
63
|
let C;
|
|
64
64
|
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = () => {
|
|
65
65
|
g(!1);
|
|
@@ -70,24 +70,24 @@ function Ce(j) {
|
|
|
70
70
|
if (h || !v.current)
|
|
71
71
|
return;
|
|
72
72
|
const K = v.current.getBoundingClientRect(), te = (Y.clientX - K.left) / K.width * 100;
|
|
73
|
-
|
|
73
|
+
m(Math.max(0, Math.min(100, te)));
|
|
74
74
|
}, e[5] = h, e[6] = R) : R = e[6];
|
|
75
|
-
const
|
|
75
|
+
const $ = R, q = z(null), H = z(null), S = z(null), J = z(null);
|
|
76
76
|
let _, X;
|
|
77
|
-
e[7] !==
|
|
78
|
-
if (J.current && H.current && S.current &&
|
|
79
|
-
|
|
77
|
+
e[7] !== f || e[8] !== o || e[9] !== n || e[10] !== c ? (_ = () => {
|
|
78
|
+
if (J.current && H.current && S.current && n) {
|
|
79
|
+
ne(J.current).selectAll(".maplibregl-compare").remove(), ne(H.current).selectAll("div").remove(), ne(S.current).selectAll("div").remove();
|
|
80
80
|
const te = new ae.Protocol();
|
|
81
81
|
I.addProtocol("pmtiles", te.tile);
|
|
82
82
|
const oe = new I.Map({
|
|
83
83
|
container: H.current,
|
|
84
84
|
style: o[0],
|
|
85
|
-
center:
|
|
85
|
+
center: f || [0, 0],
|
|
86
86
|
zoom: c || 4
|
|
87
87
|
}), re = new I.Map({
|
|
88
88
|
container: S.current,
|
|
89
89
|
style: o[1],
|
|
90
|
-
center:
|
|
90
|
+
center: f || [0, 0],
|
|
91
91
|
zoom: c || 4
|
|
92
92
|
});
|
|
93
93
|
re.addControl(new I.NavigationControl({
|
|
@@ -98,14 +98,14 @@ function Ce(j) {
|
|
|
98
98
|
visualizePitch: !0,
|
|
99
99
|
showZoom: !0,
|
|
100
100
|
showCompass: !0
|
|
101
|
-
}), "bottom-right"), re.addControl(new I.ScaleControl(), "bottom-left"),
|
|
101
|
+
}), "bottom-right"), re.addControl(new I.ScaleControl(), "bottom-left"), Ce(oe, re);
|
|
102
102
|
}
|
|
103
|
-
}, X = [
|
|
104
|
-
let
|
|
105
|
-
e[13] !== i || e[14] !==
|
|
106
|
-
width:
|
|
103
|
+
}, X = [n, o, f, c], e[7] = f, e[8] = o, e[9] = n, e[10] = c, e[11] = _, e[12] = X) : (_ = e[11], X = e[12]), se(_, X);
|
|
104
|
+
let x;
|
|
105
|
+
e[13] !== i || e[14] !== n ? (x = {
|
|
106
|
+
width: n,
|
|
107
107
|
height: i
|
|
108
|
-
}, e[13] = i, e[14] =
|
|
108
|
+
}, e[13] = i, e[14] = n, e[15] = x) : x = e[15];
|
|
109
109
|
let W;
|
|
110
110
|
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = {
|
|
111
111
|
inset: 0
|
|
@@ -113,23 +113,23 @@ function Ce(j) {
|
|
|
113
113
|
let D;
|
|
114
114
|
e[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = [pe], e[17] = D) : D = e[17];
|
|
115
115
|
const L = h ? "grabbing" : "col-resize";
|
|
116
|
-
let
|
|
117
|
-
e[18] !== i || e[19] !== L || e[20] !==
|
|
116
|
+
let y;
|
|
117
|
+
e[18] !== i || e[19] !== L || e[20] !== n ? (y = {
|
|
118
118
|
position: "relative",
|
|
119
|
-
width:
|
|
119
|
+
width: n,
|
|
120
120
|
height: i,
|
|
121
121
|
overflow: "hidden",
|
|
122
122
|
cursor: L,
|
|
123
123
|
userSelect: "none"
|
|
124
|
-
}, e[18] = i, e[19] = L, e[20] =
|
|
125
|
-
const
|
|
124
|
+
}, e[18] = i, e[19] = L, e[20] = n, e[21] = y) : y = e[21];
|
|
125
|
+
const A = `polygon(${r}% 0%, ${r}% 100%, 100% 100%, 100% 0%)`;
|
|
126
126
|
let d;
|
|
127
|
-
e[22] !==
|
|
127
|
+
e[22] !== A ? (d = /* @__PURE__ */ t.jsx("div", { ref: S, className: "absolute h-full rightMap w-full", style: {
|
|
128
128
|
position: "absolute",
|
|
129
129
|
top: 0,
|
|
130
130
|
left: 0,
|
|
131
|
-
clipPath:
|
|
132
|
-
} }), e[22] =
|
|
131
|
+
clipPath: A
|
|
132
|
+
} }), e[22] = A, e[23] = d) : d = e[23];
|
|
133
133
|
const w = `polygon(0% 0%, ${r}% 0%, ${r}% 100%, 0% 100%)`;
|
|
134
134
|
let u;
|
|
135
135
|
e[24] !== w ? (u = /* @__PURE__ */ t.jsx("div", { ref: H, className: "absolute h-full leftMap w-full", style: {
|
|
@@ -140,51 +140,51 @@ function Ce(j) {
|
|
|
140
140
|
clipPath: w
|
|
141
141
|
} }), e[24] = w, e[25] = u) : u = e[25];
|
|
142
142
|
let p;
|
|
143
|
-
e[26] !== r ? (p = /* @__PURE__ */ t.jsx(
|
|
143
|
+
e[26] !== r ? (p = /* @__PURE__ */ t.jsx(_e, { position: r }), e[26] = r, e[27] = p) : p = e[27];
|
|
144
144
|
let b;
|
|
145
|
-
e[28] !==
|
|
145
|
+
e[28] !== $ || e[29] !== y || e[30] !== d || e[31] !== u || e[32] !== p ? (b = /* @__PURE__ */ t.jsxs("div", { ref: v, style: y, onClick: $, children: [
|
|
146
146
|
d,
|
|
147
147
|
u,
|
|
148
148
|
p
|
|
149
|
-
] }), e[28] =
|
|
149
|
+
] }), e[28] = $, e[29] = y, e[30] = d, e[31] = u, e[32] = p, e[33] = b) : b = e[33];
|
|
150
150
|
let M;
|
|
151
|
-
e[34] !== a || e[35] !==
|
|
151
|
+
e[34] !== a || e[35] !== G || e[36] !== b ? (M = /* @__PURE__ */ t.jsx("div", { ref: J, className: "map maplibre-show-control relative w-full h-full", style: W, children: /* @__PURE__ */ t.jsx(de, { sensors: G, modifiers: D, onDragStart: a, onDragMove: O, onDragEnd: V, children: b }) }), e[34] = a, e[35] = G, e[36] = b, e[37] = M) : M = e[37];
|
|
152
152
|
let N;
|
|
153
|
-
e[38] !== M || e[39] !==
|
|
153
|
+
e[38] !== M || e[39] !== x ? (N = /* @__PURE__ */ t.jsx("div", { style: x, children: M }), e[38] = M, e[39] = x, e[40] = N) : N = e[40];
|
|
154
154
|
let B;
|
|
155
|
-
e[41] !==
|
|
155
|
+
e[41] !== l || e[42] !== P ? (B = l ? /* @__PURE__ */ t.jsx("div", { className: "absolute left-[22px] bottom-13", children: P ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
156
156
|
/* @__PURE__ */ t.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: () => {
|
|
157
157
|
Z(!1);
|
|
158
158
|
}, children: /* @__PURE__ */ t.jsx(he, {}) }),
|
|
159
|
-
/* @__PURE__ */ t.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
|
|
160
|
-
__html:
|
|
161
|
-
} : void 0, children: ie.isValidElement(
|
|
162
|
-
] }) : /* @__PURE__ */ t.jsx("button", { type: "button", className: "
|
|
159
|
+
/* @__PURE__ */ t.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 l == "string" ? {
|
|
160
|
+
__html: ve(l)
|
|
161
|
+
} : void 0, children: ie.isValidElement(l) ? l : null })
|
|
162
|
+
] }) : /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button", onClick: () => {
|
|
163
163
|
Z(!0);
|
|
164
|
-
}, children: /* @__PURE__ */ t.jsx(
|
|
164
|
+
}, children: /* @__PURE__ */ t.jsx(ge, {}) }) }) : null, e[41] = l, e[42] = P, e[43] = B) : B = e[43];
|
|
165
165
|
let U;
|
|
166
166
|
return e[44] !== N || e[45] !== B ? (U = /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col grow justify-center leading-0", ref: q, "aria-label": "Map area", children: [
|
|
167
167
|
N,
|
|
168
168
|
B
|
|
169
169
|
] }), e[44] = N, e[45] = B, e[46] = U) : U = e[46], U;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
const e =
|
|
171
|
+
function _e(j) {
|
|
172
|
+
const e = le.c(10), {
|
|
173
173
|
position: i
|
|
174
174
|
} = j;
|
|
175
|
-
let
|
|
176
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
175
|
+
let n;
|
|
176
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = {
|
|
177
177
|
id: "slider-handle"
|
|
178
|
-
}, e[0] =
|
|
178
|
+
}, e[0] = n) : n = e[0];
|
|
179
179
|
const {
|
|
180
180
|
attributes: o,
|
|
181
|
-
listeners:
|
|
181
|
+
listeners: f,
|
|
182
182
|
setNodeRef: c
|
|
183
|
-
} = ue(
|
|
183
|
+
} = ue(n), l = `${i}%`;
|
|
184
184
|
let r;
|
|
185
|
-
e[1] !==
|
|
185
|
+
e[1] !== l ? (r = {
|
|
186
186
|
position: "absolute",
|
|
187
|
-
left:
|
|
187
|
+
left: l,
|
|
188
188
|
top: 0,
|
|
189
189
|
bottom: 0,
|
|
190
190
|
width: "40px",
|
|
@@ -195,11 +195,11 @@ function Se(j) {
|
|
|
195
195
|
alignItems: "center",
|
|
196
196
|
zIndex: 10,
|
|
197
197
|
touchAction: "none"
|
|
198
|
-
}, e[1] =
|
|
199
|
-
let
|
|
200
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
198
|
+
}, e[1] = l, e[2] = r) : r = e[2];
|
|
199
|
+
let m;
|
|
200
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ t.jsx("div", { className: "h-full bg-primary-blue-600 dark:bg-primary-blue-400", style: {
|
|
201
201
|
width: "2px"
|
|
202
|
-
} }), e[3] =
|
|
202
|
+
} }), e[3] = m) : m = e[3];
|
|
203
203
|
let h;
|
|
204
204
|
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ t.jsx("div", { className: "flex bg-primary-blue-600 dark:bg-primary-blue-400 rounded-full absolute items-center justify-center text-primary-white font-primary-white", style: {
|
|
205
205
|
boxShadow: "inset 0 0 0 1px #fff",
|
|
@@ -208,73 +208,73 @@ function Se(j) {
|
|
|
208
208
|
top: "calc(50% - 21px)",
|
|
209
209
|
left: "0",
|
|
210
210
|
cursor: "col-resize"
|
|
211
|
-
}, children: /* @__PURE__ */ t.jsx(
|
|
211
|
+
}, children: /* @__PURE__ */ t.jsx(be, {}) }), e[4] = h) : h = e[4];
|
|
212
212
|
let g;
|
|
213
|
-
return e[5] !== o || e[6] !==
|
|
214
|
-
|
|
213
|
+
return e[5] !== o || e[6] !== f || e[7] !== c || e[8] !== r ? (g = /* @__PURE__ */ t.jsxs("div", { ref: c, style: r, ...f, ...o, children: [
|
|
214
|
+
m,
|
|
215
215
|
h
|
|
216
|
-
] }), e[5] = o, e[6] =
|
|
216
|
+
] }), e[5] = o, e[6] = f, e[7] = c, e[8] = r, e[9] = g) : g = e[9], g;
|
|
217
217
|
}
|
|
218
218
|
function $e(j) {
|
|
219
|
-
const e =
|
|
219
|
+
const e = le.c(45), {
|
|
220
220
|
graphTitle: i,
|
|
221
|
-
height:
|
|
221
|
+
height: n,
|
|
222
222
|
width: o,
|
|
223
|
-
relativeHeight:
|
|
223
|
+
relativeHeight: f,
|
|
224
224
|
sources: c,
|
|
225
|
-
graphDescription:
|
|
225
|
+
graphDescription: l,
|
|
226
226
|
footNote: r,
|
|
227
|
-
padding:
|
|
227
|
+
padding: m,
|
|
228
228
|
backgroundColor: h,
|
|
229
229
|
graphID: g,
|
|
230
230
|
mapStyles: v,
|
|
231
|
-
center:
|
|
231
|
+
center: P,
|
|
232
232
|
zoomLevel: Z,
|
|
233
233
|
language: F,
|
|
234
234
|
minHeight: T,
|
|
235
|
-
theme:
|
|
236
|
-
ariaLabel:
|
|
237
|
-
styles:
|
|
235
|
+
theme: E,
|
|
236
|
+
ariaLabel: G,
|
|
237
|
+
styles: s,
|
|
238
238
|
classNames: a,
|
|
239
|
-
mapLegend:
|
|
239
|
+
mapLegend: k
|
|
240
240
|
} = j, O = h === void 0 ? !1 : h;
|
|
241
241
|
let C;
|
|
242
|
-
e[0] !==
|
|
243
|
-
const V = C, R = Z === void 0 ? 3 : Z,
|
|
242
|
+
e[0] !== P ? (C = P === void 0 ? [0, 0] : P, e[0] = P, e[1] = C) : C = e[1];
|
|
243
|
+
const V = C, R = Z === void 0 ? 3 : Z, $ = F === void 0 ? "en" : F, q = T === void 0 ? 0 : T, H = E === void 0 ? "light" : E, [S, J] = Q(0), [_, X] = Q(0), x = z(null), W = z(null);
|
|
244
244
|
let D, L;
|
|
245
245
|
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = () => {
|
|
246
246
|
const M = new ResizeObserver((N) => {
|
|
247
247
|
J(N[0].target.clientWidth || 620), X(N[0].target.clientHeight || 480);
|
|
248
248
|
});
|
|
249
|
-
return
|
|
250
|
-
}, L = [], e[2] = D, e[3] = L) : (D = e[2], L = e[3]),
|
|
251
|
-
const
|
|
249
|
+
return x.current && M.observe(x.current), () => M.disconnect();
|
|
250
|
+
}, L = [], e[2] = D, e[3] = L) : (D = e[2], L = e[3]), se(D, L);
|
|
251
|
+
const y = a?.graphContainer, A = s?.graphContainer;
|
|
252
252
|
let d;
|
|
253
|
-
e[4] !== a?.description || e[5] !== a?.title || e[6] !==
|
|
254
|
-
title:
|
|
255
|
-
description:
|
|
253
|
+
e[4] !== a?.description || e[5] !== a?.title || e[6] !== l || e[7] !== i || e[8] !== s?.description || e[9] !== s?.title || e[10] !== o ? (d = i || l ? /* @__PURE__ */ t.jsx(xe, { styles: {
|
|
254
|
+
title: s?.title,
|
|
255
|
+
description: s?.description
|
|
256
256
|
}, classNames: {
|
|
257
257
|
title: a?.title,
|
|
258
258
|
description: a?.description
|
|
259
|
-
}, graphTitle: i, graphDescription:
|
|
259
|
+
}, graphTitle: i, graphDescription: l, width: o }) : null, e[4] = a?.description, e[5] = a?.title, e[6] = l, e[7] = i, e[8] = s?.description, e[9] = s?.title, e[10] = o, e[11] = d) : d = e[11];
|
|
260
260
|
let w;
|
|
261
|
-
e[12] !== V || e[13] !==
|
|
261
|
+
e[12] !== V || e[13] !== k || e[14] !== v || e[15] !== _ || e[16] !== S || e[17] !== R ? (w = S && _ ? /* @__PURE__ */ t.jsx(Se, { width: S, height: _, mapStyles: v, center: V, zoomLevel: R, mapLegend: k }) : null, e[12] = V, e[13] = k, e[14] = v, e[15] = _, e[16] = S, e[17] = R, e[18] = w) : w = e[18];
|
|
262
262
|
let u;
|
|
263
|
-
e[19] !== w ? (u = /* @__PURE__ */ t.jsx(
|
|
263
|
+
e[19] !== w ? (u = /* @__PURE__ */ t.jsx(we, { ref: x, children: w }), e[19] = w, e[20] = u) : u = e[20];
|
|
264
264
|
let p;
|
|
265
|
-
e[21] !== a?.footnote || e[22] !== a?.source || e[23] !== r || e[24] !== c || e[25] !==
|
|
266
|
-
footnote:
|
|
267
|
-
source:
|
|
265
|
+
e[21] !== a?.footnote || e[22] !== a?.source || e[23] !== r || e[24] !== c || e[25] !== s?.footnote || e[26] !== s?.source || e[27] !== o ? (p = c || r ? /* @__PURE__ */ t.jsx(ye, { styles: {
|
|
266
|
+
footnote: s?.footnote,
|
|
267
|
+
source: s?.source
|
|
268
268
|
}, classNames: {
|
|
269
269
|
footnote: a?.footnote,
|
|
270
270
|
source: a?.source
|
|
271
|
-
}, sources: c, footNote: r, width: o }) : null, e[21] = a?.footnote, e[22] = a?.source, e[23] = r, e[24] = c, e[25] =
|
|
271
|
+
}, sources: c, footNote: r, width: o }) : null, e[21] = a?.footnote, e[22] = a?.source, e[23] = r, e[24] = c, e[25] = s?.footnote, e[26] = s?.source, e[27] = o, e[28] = p) : p = e[28];
|
|
272
272
|
let b;
|
|
273
|
-
return e[29] !==
|
|
273
|
+
return e[29] !== G || e[30] !== O || e[31] !== g || e[32] !== n || e[33] !== $ || e[34] !== q || e[35] !== m || e[36] !== f || e[37] !== A || e[38] !== d || e[39] !== u || e[40] !== p || e[41] !== y || e[42] !== H || e[43] !== o ? (b = /* @__PURE__ */ t.jsxs(je, { className: y, style: A, id: g, ref: W, "aria-label": G, backgroundColor: O, theme: H, language: $, minHeight: q, width: o, height: n, relativeHeight: f, padding: m, children: [
|
|
274
274
|
d,
|
|
275
275
|
u,
|
|
276
276
|
p
|
|
277
|
-
] }), e[29] =
|
|
277
|
+
] }), e[29] = G, e[30] = O, e[31] = g, e[32] = n, e[33] = $, e[34] = q, e[35] = m, e[36] = f, e[37] = A, e[38] = d, e[39] = u, e[40] = p, e[41] = y, e[42] = H, e[43] = o, e[44] = b) : b = e[44], b;
|
|
278
278
|
}
|
|
279
279
|
export {
|
|
280
280
|
$e as GeoHubCompareMaps
|
|
@@ -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\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,QACf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A,EAAA,MAAAoF,KAAApF,EAAA,EAAA,MAAAyF,KAAAzF,EAAA,EAAA,MAAA4F,KAAA5F,EAAA,EAAA,MAAAiF,KAAAjF,EAAA,EAAA,MAAAwI,KAAAxI,EAAA,EAAA,MAAAG,KArDV0F,2BAACoE,IAAA,EACY,WAAAhF,GACJ,OAAAE,GACHkD,IAAAA,GACCW,KAAAA,GACOP,cAAAA,GACKL,iBAAAA,GACVI,OAAAA,GACGF,UAAAA,GACCC,WAAAA,GACJpI,OAAAA,GACCD,QAAAA,GACQ6H,gBAAAA,GACPI,SAAAA,GAER/C,UAAAA;AAAAA,IAAAA;AAAAA,IAeDK;AAAAA,IAYCG;AAAAA,EAAAA,GAYH,GAAiB5F,QAAAyI,GAAAzI,QAAAoI,GAAApI,QAAAqI,GAAArI,QAAAE,GAAAF,QAAAsI,GAAAtI,QAAAuI,GAAAvI,QAAAmI,GAAAnI,QAAA+H,GAAA/H,QAAAmF,GAAAnF,QAAAoF,GAAApF,QAAAyF,GAAAzF,QAAA4F,GAAA5F,QAAAiF,GAAAjF,QAAAwI,GAAAxI,QAAAG,GAAAH,QAAA6F,KAAAA,IAAA7F,EAAA,EAAA,GAtDjB6F;AAsDiB;"}
|
|
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, ExpandIcon, 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='p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <ExpandIcon />\r\n </button>\r\n )}\r\n </div>\r\n ) : 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","ExpandIcon","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":";;;;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AAA,IAAA5F,EAAA,EAAA;AAAA,MAAA6F;AAAA,SAAA7F,EAAA,EAAA,MAAA0I,KAAA1I,EAAA,EAAA,MAAAqI,KAAArI,EAAA,EAAA,MAAAsI,KAAAtI,EAAA,EAAA,MAAAE,KAAAF,EAAA,EAAA,MAAAuI,KAAAvI,EAAA,EAAA,MAAAwI,KAAAxI,EAAA,EAAA,MAAAoI,KAAApI,UAAAgI,KAAAhI,EAAA,EAAA,MAAAmF,KAAAnF,EAAA,EAAA,MAAAoF,KAAApF,EAAA,EAAA,MAAAyF,KAAAzF,EAAA,EAAA,MAAA4F,KAAA5F,EAAA,EAAA,MAAAiF,KAAAjF,EAAA,EAAA,MAAAyI,KAAAzI,EAAA,EAAA,MAAAG,KArDV0F,2BAACqE,IAAA,EACY,WAAAjF,GACJ,OAAAE,GACHmD,IAAAA,GACCW,KAAAA,GACOP,cAAAA,GACKL,iBAAAA,GACVI,OAAAA,GACGF,UAAAA,GACCC,WAAAA,GACJrI,OAAAA,GACCD,QAAAA,GACQ8H,gBAAAA,GACPI,SAAAA,GAERhD,UAAAA;AAAAA,IAAAA;AAAAA,IAeDK;AAAAA,IAYCG;AAAAA,EAAAA,GAYH,GAAiB5F,QAAA0I,GAAA1I,QAAAqI,GAAArI,QAAAsI,GAAAtI,QAAAE,GAAAF,QAAAuI,GAAAvI,QAAAwI,GAAAxI,QAAAoI,GAAApI,QAAAgI,GAAAhI,QAAAmF,GAAAnF,QAAAoF,GAAApF,QAAAyF,GAAAzF,QAAA4F,GAAA5F,QAAAiF,GAAAjF,QAAAyI,GAAAzI,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 s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),c=require("react"),ce=require("./DropdownSelect-NNpOs7DX.cjs"),H=require("maplibre-gl"),fe=require("pmtiles");;/* empty css */const le=require("./fetchAndParseData-QTF6tjij.cjs"),ie=require("./filterData-T5DQBE9b.cjs"),ue=require("./index-sbKVyHS2.cjs"),de=require("./string2HTML-xx9MzTtY.cjs"),ae=require("./GraphContainer-B1EDxJ0S.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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-CHPV5EwG-D4pAp7u0.cjs"),c=require("react"),ue=require("./DropdownSelect-CX1yMemd.cjs"),N=require("maplibre-gl"),xe=require("pmtiles");;/* empty css */const ie=require("./fetchAndParseData-QTF6tjij.cjs"),ae=require("./filterData-T5DQBE9b.cjs"),se=require("./index-BhI7mBJx.cjs"),de=require("./string2HTML-ZoGd08P_.cjs"),ce=require("./GraphContainer-Cul9b74X.cjs"),pe=require("./select-Bnfk0lJx.cjs"),fe=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(xe);function je(g){const e=o.compilerRuntimeExports.c(22),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,O]=c.useState(0),[j,w]=c.useState(!0),S=c.useRef(null),v=c.useRef(null),h=c.useRef(null);let R,x;e[0]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{const d=new ResizeObserver(b=>{L(b[0].target.clientWidth||620),O(b[0].target.clientHeight||480)});return S.current&&d.observe(S.current),()=>d.disconnect()},x=[],e[0]=R,e[1]=x):(R=e[0],x=e[1]),c.useEffect(R,x);let f,m;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(f=()=>{v.current&&l&&!h.current&&ie.fetchAndParseJSON(t).then(d=>{pe.select(v.current).selectAll("div").remove();const Q=new me.Protocol;N.addProtocol("pmtiles",Q.tile);const M={container:v.current,style:n.length===0&&u.length===0?d:{...d,layers:ae.filterData(d.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(M.center=i),p&&(M.zoom=p),h.current=new N.Map(M),h.current.addControl(new N.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),h.current.addControl(new N.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]=f,e[9]=m):(f=e[8],m=e[9]),c.useEffect(f,m);let E,r;e[10]!==u||e[11]!==n||e[12]!==t?(E=()=>{h.current&&ie.fetchAndParseJSON(t).then(d=>{const b={...d,layers:ae.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]=E,e[14]=r):(E=e[13],r=e[14]),c.useEffect(E,r);let s;e[15]!==a||e[16]!==j||e[17]!==y||e[18]!==l?(s=l&&y?o.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[o.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?o.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.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:()=>{w(!1)},children:o.jsxRuntimeExports.jsx(se.X,{})}),o.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})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{w(!0)},children:o.jsxRuntimeExports.jsx(se.ExpandIcon,{})})}):null]}):null,e[15]=a,e[16]=j,e[17]=y,e[18]=l,e[19]=s):s=e[19];let C;return e[20]!==s?(C=o.jsxRuntimeExports.jsx(ce.GraphArea,{ref:S,children:s}),e[20]=s,e[21]=C):C=e[21],C}function ve(g){const e=o.compilerRuntimeExports.c(17),{mapStyle:t,center:i,zoomLevel:p,includeLayers:n,excludeLayers:u,mapLegend:a}=g,[l,L]=c.useState(0),[y,O]=c.useState(0),[j,w]=c.useState(!0),S=c.useRef(null),v=c.useRef(null);let h,R;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const r=new ResizeObserver(s=>{L(s[0].target.clientWidth||620),O(s[0].target.clientHeight||480)});return S.current&&r.observe(S.current),()=>r.disconnect()},R=[],e[0]=h,e[1]=R):(h=e[0],R=e[1]),c.useEffect(h,R);let x,f;e[2]!==i||e[3]!==u||e[4]!==n||e[5]!==t||e[6]!==l||e[7]!==p?(x=()=>{v.current&&l&&ie.fetchAndParseJSON(t).then(r=>{pe.select(v.current).selectAll("div").remove();const C=new me.Protocol;N.addProtocol("pmtiles",C.tile);const d={container:v.current,style:n.length===0&&u.length===0?r:{...r,layers:ae.filterData(r.layers,[{column:"id",includeValues:n,excludeValues:u}])},attributionControl:!0};i&&(d.center=i),p&&(d.zoom=p);const b=new N.Map(d);b.addControl(new N.NavigationControl({visualizePitch:!0,showZoom:!0,showCompass:!0}),"bottom-right"),b.addControl(new N.ScaleControl,"bottom-left")})},f=[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]=x,e[9]=f):(x=e[8],f=e[9]),c.useEffect(x,f);let m;e[10]!==a||e[11]!==j||e[12]!==y||e[13]!==l?(m=l&&y?o.jsxRuntimeExports.jsxs("div",{style:{width:l,height:y},children:[o.jsxRuntimeExports.jsx("div",{ref:v,className:"map maplibre-show-control",style:{width:"100%",height:"100%"}}),a?o.jsxRuntimeExports.jsx("div",{className:"absolute left-[22px] bottom-13",children:j?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.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:()=>{w(!1)},children:o.jsxRuntimeExports.jsx(se.X,{})}),o.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})]}):o.jsxRuntimeExports.jsx("button",{type:"button",className:"p-1 border-0 rounded-[2px] text-primary-gray-700 bg-primary-gray-300 dark:bg-primary-gray-500 map-legend-button",onClick:()=>{w(!0)},children:o.jsxRuntimeExports.jsx(se.ExpandIcon,{})})}):null]}):null,e[10]=a,e[11]=j,e[12]=y,e[13]=l,e[14]=m):m=e[14];let E;return e[15]!==m?(E=o.jsxRuntimeExports.jsx(ce.GraphArea,{ref:S,children:m}),e[15]=m,e[16]=E):E=e[16],E}function Re(g){const e=o.compilerRuntimeExports.c(85),{mapStyle:t,graphTitle:i,height:p,width:n,relativeHeight:u,sources:a,graphDescription:l,footNote:L,padding:y,backgroundColor:O,center:j,zoomLevel:w,graphID:S,language:v,minHeight:h,theme:R,includeLayers:x,excludeLayers:f,ariaLabel:m,uiMode:E,styles:r,classNames:s,mapLegend:C}=g,d=O===void 0?!1:O,b=v===void 0?"en":v,Q=h===void 0?0:h,M=R===void 0?"light":R;let U;e[0]!==x?(U=x===void 0?[]:x,e[0]=x,e[1]=U):U=e[1];const Y=U;let ee;e[2]!==f?(ee=f===void 0?[]:f,e[2]=f,e[3]=ee):ee=e[3];const te=ee,ne=E===void 0?"normal":E,[re,ge]=c.useState(void 0),he=c.useRef(null),D=typeof t=="string"?t:t[0].style;let z,P,k,q,G,V,_,A,T,W,I,F,J,H,$,X;if(e[4]!==m||e[5]!==d||e[6]!==s?.description||e[7]!==s?.graphContainer||e[8]!==s?.title||e[9]!==D||e[10]!==l||e[11]!==S||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]!==M||e[23]!==ne||e[24]!==n){const le={ignoreCase:!0,ignoreAccents:!0,trim:!0};z=ce.GraphContainer,X=s?.graphContainer,P=r?.graphContainer,k=S,q=he,G=m,V=d,_=M,A=b,T=Q,W=n,I=p,F=u,J=y,e[41]!==s?.description||e[42]!==s?.title||e[43]!==l||e[44]!==i||e[45]!==r?.description||e[46]!==r?.title||e[47]!==n?(H=i||l?o.jsxRuntimeExports.jsx(fe.GraphHeader,{styles:{title:r?.title,description:r?.description},classNames:{title:s?.title,description:s?.description},graphTitle:i,graphDescription:l,width:n}):null,e[41]=s?.description,e[42]=s?.title,e[43]=l,e[44]=i,e[45]=r?.description,e[46]=r?.title,e[47]=n,e[48]=H):H=e[48],$=typeof t=="string"?null:o.jsxRuntimeExports.jsx(ue.ja,{options:t.map(Ee),isClearable:!1,size:"sm",variant:ne,isRtl:b==="he"||b==="ar",isSearchable:!0,filterOption:ue.Du(le),defaultValue:t.find(K=>K.style===D),controlShouldRenderValue:!0,onChange:K=>{K&&ge(K.value)}}),e[4]=m,e[5]=d,e[6]=s?.description,e[7]=s?.graphContainer,e[8]=s?.title,e[9]=D,e[10]=l,e[11]=S,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]=M,e[23]=ne,e[24]=n,e[25]=z,e[26]=P,e[27]=k,e[28]=q,e[29]=G,e[30]=V,e[31]=_,e[32]=A,e[33]=T,e[34]=W,e[35]=I,e[36]=F,e[37]=J,e[38]=H,e[39]=$,e[40]=X}else z=e[25],P=e[26],k=e[27],q=e[28],G=e[29],V=e[30],_=e[31],A=e[32],T=e[33],W=e[34],I=e[35],F=e[36],J=e[37],H=e[38],$=e[39],X=e[40];let Z;e[49]!==j||e[50]!==D||e[51]!==te||e[52]!==Y||e[53]!==C||e[54]!==t||e[55]!==re||e[56]!==w?(Z=typeof t=="string"?o.jsxRuntimeExports.jsx(ve,{mapStyle:t,center:j,zoomLevel:w,includeLayers:Y,excludeLayers:te,mapLegend:C}):o.jsxRuntimeExports.jsx(je,{mapStyle:re||D,center:j,zoomLevel:w,includeLayers:Y,excludeLayers:te,mapLegend:(C||[]).find(le=>le.mapStyleName===t.find(K=>K.style===(re||D))?.name)?.legend}),e[49]=j,e[50]=D,e[51]=te,e[52]=Y,e[53]=C,e[54]=t,e[55]=re,e[56]=w,e[57]=Z):Z=e[57];let B;e[58]!==s?.footnote||e[59]!==s?.source||e[60]!==L||e[61]!==a||e[62]!==r?.footnote||e[63]!==r?.source||e[64]!==n?(B=a||L?o.jsxRuntimeExports.jsx(be.GraphFooter,{styles:{footnote:r?.footnote,source:r?.source},classNames:{footnote:s?.footnote,source:s?.source},sources:a,footNote:L,width:n}):null,e[58]=s?.footnote,e[59]=s?.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 oe;return e[66]!==z||e[67]!==P||e[68]!==k||e[69]!==q||e[70]!==G||e[71]!==V||e[72]!==_||e[73]!==A||e[74]!==T||e[75]!==W||e[76]!==I||e[77]!==F||e[78]!==J||e[79]!==H||e[80]!==$||e[81]!==Z||e[82]!==B||e[83]!==X?(oe=o.jsxRuntimeExports.jsxs(z,{className:X,style:P,id:k,ref:q,"aria-label":G,backgroundColor:V,theme:_,language:A,minHeight:T,width:W,height:I,relativeHeight:F,padding:J,children:[H,$,Z,B]}),e[66]=z,e[67]=P,e[68]=k,e[69]=q,e[70]=G,e[71]=V,e[72]=_,e[73]=A,e[74]=T,e[75]=W,e[76]=I,e[77]=F,e[78]=J,e[79]=H,e[80]=$,e[81]=Z,e[82]=B,e[83]=X,e[84]=oe):oe=e[84],oe}function Ee(g){return{label:g.name,value:g.style}}exports.GeoHubMap=Re;
|
|
2
2
|
//# sourceMappingURL=GeoHubMap.cjs.map
|