@hisptz/dhis2-analytics 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.js +20 -43
- package/dist/components/ChartAnalytics/DHIS2Chart.js +17 -43
- package/dist/components/ChartAnalytics/DHIS2Chart.js.map +1 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +14 -16
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js.map +1 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +8 -14
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.js +19 -21
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.js.map +1 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +0 -1
- package/dist/components/ChartAnalytics/hooks/useChart.js +11 -13
- package/dist/components/ChartAnalytics/hooks/useChart.js.map +1 -1
- package/dist/components/ChartAnalytics/index.js +1 -12
- package/dist/components/ChartAnalytics/index.js.map +1 -1
- package/dist/components/ChartAnalytics/models/bar.js +3 -6
- package/dist/components/ChartAnalytics/models/bar.js.map +1 -1
- package/dist/components/ChartAnalytics/models/column.js +6 -9
- package/dist/components/ChartAnalytics/models/column.js.map +1 -1
- package/dist/components/ChartAnalytics/models/index.js +1 -6
- package/dist/components/ChartAnalytics/models/index.js.map +1 -1
- package/dist/components/ChartAnalytics/models/line.js +6 -8
- package/dist/components/ChartAnalytics/models/line.js.map +1 -1
- package/dist/components/ChartAnalytics/models/multi-series.js +26 -15
- package/dist/components/ChartAnalytics/models/multi-series.js.map +1 -1
- package/dist/components/ChartAnalytics/models/pie.js +8 -8
- package/dist/components/ChartAnalytics/models/pie.js.map +1 -1
- package/dist/components/ChartAnalytics/services/export.js +7 -20
- package/dist/components/ChartAnalytics/services/export.js.map +1 -1
- package/dist/components/ChartAnalytics/styles/custom-highchart.css +40 -0
- package/dist/components/ChartAnalytics/styles/custom-highchart.css.map +1 -0
- package/dist/components/ChartAnalytics/types/props.js +0 -1
- package/dist/components/ChartAnalytics/utils/chart.js +24 -31
- package/dist/components/ChartAnalytics/utils/chart.js.map +1 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js +14 -23
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js.map +1 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +3 -10
- package/dist/components/CircularProgressDashboard/index.js +2 -19
- package/dist/components/CircularProgressDashboard/index.js.map +1 -1
- package/dist/components/CircularProgressDashboard/types/props.js +0 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js +13 -15
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js.map +1 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.js +5 -14
- package/dist/components/DHIS2PivotTable/components/Table/index.js +4 -6
- package/dist/components/DHIS2PivotTable/components/TableBody/index.js +30 -36
- package/dist/components/DHIS2PivotTable/components/TableBody/index.js.map +1 -1
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js +27 -33
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js.map +1 -1
- package/dist/components/DHIS2PivotTable/index.js +2 -19
- package/dist/components/DHIS2PivotTable/index.js.map +1 -1
- package/dist/components/DHIS2PivotTable/interfaces/index.js +0 -1
- package/dist/components/DHIS2PivotTable/services/engine.js +10 -18
- package/dist/components/DHIS2PivotTable/services/engine.js.map +1 -1
- package/dist/components/DHIS2PivotTable/state/engine.js +6 -9
- package/dist/components/DHIS2PivotTable/state/engine.js.map +1 -1
- package/dist/components/Map/DHIS2Map.js +13 -20
- package/dist/components/Map/DHIS2Map.js.map +1 -1
- package/dist/components/Map/DHIS2Map.stories.js +3 -17
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js +15 -21
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +10 -15
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js +16 -18
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +7 -12
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js +24 -30
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js +42 -49
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js +16 -22
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js +26 -32
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js +10 -16
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js +21 -27
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js +16 -19
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js +2 -19
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js.map +1 -1
- package/dist/components/Map/components/MapArea/index.js +60 -54
- package/dist/components/Map/components/MapArea/index.js.map +1 -1
- package/dist/components/Map/components/MapArea/interfaces/index.js +0 -1
- package/dist/components/Map/components/MapControls/components/CustomControl/index.js +3 -5
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.js +8 -14
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.js +7 -9
- package/dist/components/Map/components/MapControls/index.js +22 -17
- package/dist/components/Map/components/MapControls/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +3 -5
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js +21 -31
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +59 -34
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +99 -89
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +9 -14
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +62 -69
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +31466 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +43 -43
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +34 -31
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +6 -8
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.js +46 -57
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +38 -30
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +5 -7
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.js +21 -28
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +39 -13
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +40 -32
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +13 -20
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +17 -23
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +30 -25
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +17 -20
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +15 -21
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +6 -8
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js +16 -24
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +56 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css.map +1 -0
- package/dist/components/Map/components/MapLayer/index.js +10 -18
- package/dist/components/Map/components/MapLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/interfaces/index.js +7 -4
- package/dist/components/Map/components/MapLayer/interfaces/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +59 -63
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js +30 -36
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/hooks/index.js +6 -10
- package/dist/components/Map/components/MapProvider/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/index.js +25 -31
- package/dist/components/Map/components/MapProvider/index.js.map +1 -1
- package/dist/components/Map/components/MapUpdater/index.js +5 -7
- package/dist/components/Map/components/MapUpdater/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js +15 -21
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +5 -10
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js +53 -60
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +7 -12
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +21 -15
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js +1 -4
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +22 -30
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +18 -21
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +23 -30
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +16 -22
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +16 -22
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.js +16 -22
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.js +18 -24
- package/dist/components/Map/components/ThematicLayerConfiguration/index.js +3 -26
- package/dist/components/Map/components/ThematicLayerConfiguration/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.js +0 -1
- package/dist/components/Map/constants/colors.js +1 -4
- package/dist/components/Map/constants/legendSet.js +1 -3
- package/dist/components/Map/hooks/map.js +17 -21
- package/dist/components/Map/hooks/map.js.map +1 -1
- package/dist/components/Map/index.js +5 -40
- package/dist/components/Map/index.js.map +1 -1
- package/dist/components/Map/interfaces/index.js +0 -1
- package/dist/components/Map/state/index.js +5 -9
- package/dist/components/Map/state/index.js.map +1 -1
- package/dist/components/Map/utils/colors.js +18 -22
- package/dist/components/Map/utils/colors.js.map +1 -1
- package/dist/components/Map/utils/helpers.js +3 -11
- package/dist/components/Map/utils/map.js +25 -24
- package/dist/components/Map/utils/map.js.map +1 -1
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.js +3 -11
- package/dist/components/SingleValueContainer/SingleValueVisualizer.js +17 -35
- package/dist/components/SingleValueContainer/SingleValueVisualizer.js.map +1 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +14 -21
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js.map +1 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +7 -13
- package/dist/components/SingleValueContainer/index.js +3 -19
- package/dist/components/SingleValueContainer/index.js.map +1 -1
- package/dist/components/SingleValueContainer/types/props.js +0 -1
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.js +50 -26
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/DimensionsProvider/index.js +13 -18
- package/dist/components/Visualization/components/LayoutProvider/index.js +11 -14
- package/dist/components/Visualization/components/LayoutProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js +30 -36
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationProvider/index.js +14 -10
- package/dist/components/Visualization/components/VisualizationProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationSelector/index.js +46 -57
- package/dist/components/Visualization/components/VisualizationSelector/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.js +16 -19
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.js +37 -27
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.js.map +1 -1
- package/dist/components/Visualization/index.js +27 -33
- package/dist/components/Visualization/index.js.map +1 -1
- package/dist/index.js +6 -47
- package/dist/index.js.map +1 -1
- package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts +4 -4
- package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts +2 -2
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts +2 -2
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/index.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/index.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/bar.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/bar.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/column.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/column.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/index.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/index.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/line.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/line.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/multi-series.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/multi-series.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/pie.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/pie.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/services/export.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/utils/chart.d.ts +2 -2
- package/dist/types/components/ChartAnalytics/utils/chart.d.ts.map +1 -1
- package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts +2 -2
- package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts.map +1 -1
- package/dist/types/components/CircularProgressDashboard/index.d.ts +2 -2
- package/dist/types/components/CircularProgressDashboard/index.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts +2 -2
- package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts +1 -1
- package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/index.d.ts +2 -2
- package/dist/types/components/DHIS2PivotTable/index.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/services/engine.d.ts +1 -1
- package/dist/types/components/DHIS2PivotTable/services/engine.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/state/engine.d.ts +2 -2
- package/dist/types/components/DHIS2PivotTable/state/engine.d.ts.map +1 -1
- package/dist/types/components/Map/DHIS2Map.d.ts +1 -1
- package/dist/types/components/Map/DHIS2Map.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts +2 -2
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts +2 -2
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapArea/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapArea/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapControls/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapControls/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts +4 -4
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts +4 -4
- package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/hooks/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapProvider/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapProvider/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapUpdater/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapUpdater/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts +2 -2
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts +3 -3
- package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts.map +1 -1
- package/dist/types/components/Map/hooks/map.d.ts.map +1 -1
- package/dist/types/components/Map/index.d.ts +5 -5
- package/dist/types/components/Map/index.d.ts.map +1 -1
- package/dist/types/components/Map/interfaces/index.d.ts +2 -2
- package/dist/types/components/Map/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/state/index.d.ts +2 -2
- package/dist/types/components/Map/state/index.d.ts.map +1 -1
- package/dist/types/components/Map/utils/colors.d.ts +1 -1
- package/dist/types/components/Map/utils/colors.d.ts.map +1 -1
- package/dist/types/components/Map/utils/map.d.ts.map +1 -1
- package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts +3 -3
- package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts.map +1 -1
- package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts +1 -1
- package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts.map +1 -1
- package/dist/types/components/SingleValueContainer/index.d.ts +3 -2
- package/dist/types/components/SingleValueContainer/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts +1 -1
- package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts +2 -2
- package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts +1 -1
- package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts +4 -4
- package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts +10 -10
- package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts +2 -2
- package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts +1 -1
- package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/index.d.ts +6 -6
- package/dist/types/components/Visualization/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.mjs +0 -254
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.mjs.map +0 -1
- package/dist/components/ChartAnalytics/DHIS2Chart.mjs +0 -36
- package/dist/components/ChartAnalytics/DHIS2Chart.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.mjs +0 -52
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.mjs +0 -42
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.mjs +0 -65
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.mjs +0 -3
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.mjs.map +0 -1
- package/dist/components/ChartAnalytics/hooks/useChart.mjs +0 -43
- package/dist/components/ChartAnalytics/hooks/useChart.mjs.map +0 -1
- package/dist/components/ChartAnalytics/index.mjs +0 -3
- package/dist/components/ChartAnalytics/index.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/bar.mjs +0 -21
- package/dist/components/ChartAnalytics/models/bar.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/column.mjs +0 -48
- package/dist/components/ChartAnalytics/models/column.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/index.mjs +0 -117
- package/dist/components/ChartAnalytics/models/index.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/line.mjs +0 -31
- package/dist/components/ChartAnalytics/models/line.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/multi-series.mjs +0 -99
- package/dist/components/ChartAnalytics/models/multi-series.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/pie.mjs +0 -51
- package/dist/components/ChartAnalytics/models/pie.mjs.map +0 -1
- package/dist/components/ChartAnalytics/services/export.mjs +0 -35
- package/dist/components/ChartAnalytics/services/export.mjs.map +0 -1
- package/dist/components/ChartAnalytics/types/props.mjs +0 -3
- package/dist/components/ChartAnalytics/types/props.mjs.map +0 -1
- package/dist/components/ChartAnalytics/utils/chart.mjs +0 -130
- package/dist/components/ChartAnalytics/utils/chart.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.mjs +0 -66
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.mjs +0 -42
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/index.mjs +0 -4
- package/dist/components/CircularProgressDashboard/index.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/types/props.mjs +0 -3
- package/dist/components/CircularProgressDashboard/types/props.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.mjs +0 -26
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.mjs +0 -30
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/components/Table/index.mjs +0 -10
- package/dist/components/DHIS2PivotTable/components/Table/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/components/TableBody/index.mjs +0 -106
- package/dist/components/DHIS2PivotTable/components/TableBody/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.mjs +0 -94
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/index.mjs +0 -4
- package/dist/components/DHIS2PivotTable/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/interfaces/index.mjs +0 -3
- package/dist/components/DHIS2PivotTable/interfaces/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/services/engine.mjs +0 -93
- package/dist/components/DHIS2PivotTable/services/engine.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/state/engine.mjs +0 -17
- package/dist/components/DHIS2PivotTable/state/engine.mjs.map +0 -1
- package/dist/components/Map/DHIS2Map.mjs +0 -65
- package/dist/components/Map/DHIS2Map.mjs.map +0 -1
- package/dist/components/Map/DHIS2Map.stories.mjs +0 -366
- package/dist/components/Map/DHIS2Map.stories.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.mjs +0 -41
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.mjs +0 -34
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.mjs +0 -26
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.mjs +0 -21
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.mjs +0 -67
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.mjs +0 -134
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.mjs +0 -44
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.mjs +0 -67
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.mjs +0 -24
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.mjs +0 -67
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.mjs +0 -45
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.mjs +0 -4
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.mjs.map +0 -1
- package/dist/components/Map/components/MapArea/index.mjs +0 -85
- package/dist/components/Map/components/MapArea/index.mjs.map +0 -1
- package/dist/components/Map/components/MapArea/interfaces/index.mjs +0 -3
- package/dist/components/Map/components/MapArea/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/components/CustomControl/index.mjs +0 -16
- package/dist/components/Map/components/MapControls/components/CustomControl/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.mjs +0 -15
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.mjs +0 -13
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/index.mjs +0 -23
- package/dist/components/Map/components/MapControls/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.mjs +0 -10
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.mjs +0 -52
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.mjs +0 -65
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.mjs +0 -439
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.mjs +0 -32
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.mjs +0 -197
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.mjs +0 -3
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.mjs +0 -359
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.mjs +0 -82
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.mjs +0 -17
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.mjs +0 -179
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.mjs +0 -78
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.mjs +0 -11
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.mjs +0 -48
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.mjs +0 -36
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.mjs +0 -111
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.mjs +0 -41
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs +0 -50
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.mjs +0 -42
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.mjs +0 -37
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.mjs +0 -40
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs +0 -12
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.mjs +0 -55
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/index.mjs +0 -32
- package/dist/components/Map/components/MapLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/interfaces/index.mjs +0 -5
- package/dist/components/Map/components/MapLayer/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.mjs +0 -405
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.mjs +0 -115
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/hooks/index.mjs +0 -16
- package/dist/components/Map/components/MapProvider/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/index.mjs +0 -95
- package/dist/components/Map/components/MapProvider/index.mjs.map +0 -1
- package/dist/components/Map/components/MapUpdater/index.mjs +0 -11
- package/dist/components/Map/components/MapUpdater/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs +0 -41
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.mjs +0 -24
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs +0 -174
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.mjs +0 -21
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.mjs +0 -24
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.mjs +0 -436
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.mjs +0 -71
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.mjs +0 -74
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.mjs +0 -57
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.mjs +0 -44
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.mjs +0 -60
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.mjs +0 -54
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.mjs +0 -63
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/index.mjs +0 -5
- package/dist/components/Map/components/ThematicLayerConfiguration/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.mjs +0 -3
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.mjs.map +0 -1
- package/dist/components/Map/constants/colors.mjs +0 -436
- package/dist/components/Map/constants/colors.mjs.map +0 -1
- package/dist/components/Map/constants/legendSet.mjs +0 -23
- package/dist/components/Map/constants/legendSet.mjs.map +0 -1
- package/dist/components/Map/hooks/map.mjs +0 -44
- package/dist/components/Map/hooks/map.mjs.map +0 -1
- package/dist/components/Map/index.mjs +0 -7
- package/dist/components/Map/index.mjs.map +0 -1
- package/dist/components/Map/interfaces/index.mjs +0 -3
- package/dist/components/Map/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/state/index.mjs +0 -18
- package/dist/components/Map/state/index.mjs.map +0 -1
- package/dist/components/Map/utils/colors.mjs +0 -77
- package/dist/components/Map/utils/colors.mjs.map +0 -1
- package/dist/components/Map/utils/helpers.mjs +0 -18
- package/dist/components/Map/utils/helpers.mjs.map +0 -1
- package/dist/components/Map/utils/map.mjs +0 -127
- package/dist/components/Map/utils/map.mjs.map +0 -1
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.mjs +0 -145
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.mjs.map +0 -1
- package/dist/components/SingleValueContainer/SingleValueVisualizer.mjs +0 -44
- package/dist/components/SingleValueContainer/SingleValueVisualizer.mjs.map +0 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs +0 -49
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs.map +0 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs +0 -22
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs.map +0 -1
- package/dist/components/SingleValueContainer/index.mjs +0 -4
- package/dist/components/SingleValueContainer/index.mjs.map +0 -1
- package/dist/components/SingleValueContainer/types/props.mjs +0 -3
- package/dist/components/SingleValueContainer/types/props.mjs.map +0 -1
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.mjs +0 -67
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/DimensionsProvider/index.mjs +0 -35
- package/dist/components/Visualization/components/DimensionsProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/LayoutProvider/index.mjs +0 -17
- package/dist/components/Visualization/components/LayoutProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.mjs +0 -85
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationProvider/index.mjs +0 -13
- package/dist/components/Visualization/components/VisualizationProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationSelector/index.mjs +0 -167
- package/dist/components/Visualization/components/VisualizationSelector/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.mjs +0 -23
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.mjs +0 -39
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.mjs.map +0 -1
- package/dist/components/Visualization/index.mjs +0 -113
- package/dist/components/Visualization/index.mjs.map +0 -1
- package/dist/index.mjs +0 -8
- package/dist/index.mjs.map +0 -1
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import i18n from '@dhis2/d2-i18n';
|
|
3
|
-
import { scaleSqrt } from 'd3-scale';
|
|
4
|
-
import { reduce } from 'lodash';
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
import { getContrastColor } from '../../../../../../../../../utils/colors';
|
|
7
|
-
import { getLongestTextLength } from '../../../../../../../../../utils/helpers';
|
|
8
|
-
import Bubble from './Bubble';
|
|
9
|
-
|
|
10
|
-
const style = {
|
|
11
|
-
paddingTop: 10,
|
|
12
|
-
display: "flex",
|
|
13
|
-
alignItems: "center",
|
|
14
|
-
justifyContent: "center"
|
|
15
|
-
};
|
|
16
|
-
const legendWidth = 200;
|
|
17
|
-
const digitWidth = 6.8;
|
|
18
|
-
const guideLength = 16;
|
|
19
|
-
const textPadding = 4;
|
|
20
|
-
const Bubbles = ({ radiusLow, radiusHigh, color, classes }) => {
|
|
21
|
-
const height = radiusHigh * 2 + 4;
|
|
22
|
-
const scale = scaleSqrt().range([radiusLow, radiusHigh]);
|
|
23
|
-
const radiusMid = scale(0.5);
|
|
24
|
-
if (isNaN(radiusLow) || isNaN(radiusHigh)) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
let bubbles = [];
|
|
28
|
-
if (Array.isArray(classes) && classes.length) {
|
|
29
|
-
const startValue = classes[0].startValue;
|
|
30
|
-
const endValue = classes[classes.length - 1].endValue;
|
|
31
|
-
const itemScale = scale.domain([startValue, endValue]);
|
|
32
|
-
bubbles = [...classes].reverse().map((c) => ({
|
|
33
|
-
radius: itemScale(c.endValue),
|
|
34
|
-
maxRadius: radiusHigh,
|
|
35
|
-
color: c.color,
|
|
36
|
-
text: String(c.endValue)
|
|
37
|
-
}));
|
|
38
|
-
bubbles.push({
|
|
39
|
-
radius: itemScale(startValue),
|
|
40
|
-
maxRadius: radiusHigh,
|
|
41
|
-
text: String(startValue)
|
|
42
|
-
});
|
|
43
|
-
} else {
|
|
44
|
-
const stroke = color && getContrastColor(color);
|
|
45
|
-
bubbles = [
|
|
46
|
-
{
|
|
47
|
-
radius: radiusHigh,
|
|
48
|
-
maxRadius: radiusHigh,
|
|
49
|
-
color,
|
|
50
|
-
stroke,
|
|
51
|
-
text: i18n.t("Max")
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
radius: radiusMid,
|
|
55
|
-
maxRadius: radiusHigh,
|
|
56
|
-
color,
|
|
57
|
-
stroke,
|
|
58
|
-
text: i18n.t("Mid")
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
radius: radiusLow,
|
|
62
|
-
maxRadius: radiusHigh,
|
|
63
|
-
color,
|
|
64
|
-
stroke,
|
|
65
|
-
text: i18n.t("Min")
|
|
66
|
-
}
|
|
67
|
-
];
|
|
68
|
-
}
|
|
69
|
-
let textLength = Math.ceil(Math.max(getLongestTextLength(classes, "startValue"), getLongestTextLength(classes, "endValue")) * digitWidth);
|
|
70
|
-
const alternateLength = (radiusHigh + guideLength + textPadding + textLength) * 2;
|
|
71
|
-
let smallestGap = reduce(bubbles, (prev, curr, i) => {
|
|
72
|
-
const gap = prev.radius - curr.radius;
|
|
73
|
-
const smallestGap2 = prev.gap === void 0 || gap < prev.gap ? gap : prev.gap;
|
|
74
|
-
return i === bubbles.length - 1 ? Math.round(smallestGap2 * 2) : {
|
|
75
|
-
radius: curr.radius,
|
|
76
|
-
gap: smallestGap2
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
const alternateFit = alternateLength < legendWidth;
|
|
80
|
-
const alternate = alternateFit && smallestGap > 5 && smallestGap < 12;
|
|
81
|
-
if (!alternateFit) {
|
|
82
|
-
smallestGap = smallestGap / 2;
|
|
83
|
-
}
|
|
84
|
-
if (smallestGap < 4) {
|
|
85
|
-
const [maxBubble] = bubbles;
|
|
86
|
-
const minBubble = bubbles[bubbles.length - 1];
|
|
87
|
-
const gap = maxBubble.radius - minBubble.radius;
|
|
88
|
-
const showNumbers = [0];
|
|
89
|
-
if (gap > 4) {
|
|
90
|
-
showNumbers.push(bubbles.length - 1);
|
|
91
|
-
}
|
|
92
|
-
if (gap > 15) {
|
|
93
|
-
const midRadius = minBubble.radius + gap / 2;
|
|
94
|
-
const midBubble = bubbles.reduce((prev, curr) => curr.radius >= midRadius && curr.radius - midRadius < prev.radius - midRadius ? curr : prev);
|
|
95
|
-
showNumbers.push(bubbles.indexOf(midBubble));
|
|
96
|
-
}
|
|
97
|
-
bubbles.forEach((b, i) => {
|
|
98
|
-
if (!showNumbers.includes(i)) {
|
|
99
|
-
delete b.text;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
textLength = Math.ceil(getLongestTextLength(bubbles, "text") * digitWidth);
|
|
104
|
-
const offset = textLength + guideLength + textPadding;
|
|
105
|
-
return /* @__PURE__ */ jsx("div", { style, children: /* @__PURE__ */ jsx("svg", { width: legendWidth, height: height + 50, children: /* @__PURE__ */ jsx("g", { transform: `translate(${alternate ? offset : "16"} 24)`, children: bubbles.map((bubble, i) => /* @__PURE__ */ jsx(Bubble, { ...bubble, textAlign: alternate && i % 2 == 0 ? "left" : "right" }, i)) }) }) });
|
|
106
|
-
};
|
|
107
|
-
var Bubbles_default = memo(Bubbles);
|
|
108
|
-
|
|
109
|
-
export { Bubbles_default as default, guideLength, textPadding };
|
|
110
|
-
//# sourceMappingURL=out.js.map
|
|
111
|
-
//# sourceMappingURL=Bubbles.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.tsx"],"names":["smallestGap"],"mappings":"AA6IY;AA7IZ,OAAO,UAAU;AACjB,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAgB,YAAY;AAC5B,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AACrC,OAAO,YAA6B;AAEpC,MAAM,QAAQ;AAAA,EACb,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AACjB;AAEA,MAAM,cAAc;AACpB,MAAM,aAAa;AACZ,MAAM,cAAc;AACpB,MAAM,cAAc;AAE3B,MAAM,UAAU,CAAC,EAAE,WAAW,YAAY,OAAO,QAAQ,MAAsF;AAC7I,QAAM,SAAS,aAAa,IAAI;AAChC,QAAM,QAAQ,UAAU,EAAE,MAAM,CAAC,WAAW,UAAU,CAAC;AACvD,QAAM,YAAY,MAAM,GAAG;AAE3B,MAAI,MAAM,SAAS,KAAK,MAAM,UAAU,GAAG;AACzC,WAAO;AAAA,EACT;AAEA,MAAI,UAA8B,CAAC;AAGnC,MAAI,MAAM,QAAQ,OAAO,KAAK,QAAQ,QAAQ;AAC5C,UAAM,aAAa,QAAQ,CAAC,EAAE;AAC9B,UAAM,WAAW,QAAQ,QAAQ,SAAS,CAAC,EAAE;AAC7C,UAAM,YAAY,MAAM,OAAO,CAAC,YAAY,QAAQ,CAAC;AAErD,cAAU,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO;AAAA,MAC3C,QAAQ,UAAU,EAAE,QAAQ;AAAA,MAC5B,WAAW;AAAA,MACX,OAAO,EAAE;AAAA,MACT,MAAM,OAAO,EAAE,QAAQ;AAAA,IACzB,EAAE;AAGF,YAAQ,KAAK;AAAA,MACX,QAAQ,UAAU,UAAU;AAAA,MAC5B,WAAW;AAAA,MACX,MAAM,OAAO,UAAU;AAAA,IACzB,CAAC;AAAA,EACH,OAAO;AAEL,UAAM,SAAS,SAAS,iBAAiB,KAAK;AAE9C,cAAU;AAAA,MACR;AAAA,QACE,QAAQ;AAAA,QACR,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,MAAM,KAAK,EAAE,KAAK;AAAA,MACpB;AAAA,MACA;AAAA,QACE,QAAQ;AAAA,QACR,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,MAAM,KAAK,EAAE,KAAK;AAAA,MACpB;AAAA,MACA;AAAA,QACE,QAAQ;AAAA,QACR,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,MAAM,KAAK,EAAE,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AAGA,MAAI,aAAa,KAAK,KAAK,KAAK,IAAI,qBAAqB,SAAS,YAAY,GAAG,qBAAqB,SAAS,UAAU,CAAC,IAAI,UAAU;AAGxI,QAAM,mBAAmB,aAAa,cAAc,cAAc,cAAc;AAEhF,MAAI,cAAc,OAAO,SAAS,CAAC,MAAM,MAAW,MAAM;AACxD,UAAM,MAAM,KAAK,SAAS,KAAK;AAC/B,UAAMA,eAAc,KAAK,QAAQ,UAAa,MAAM,KAAK,MAAM,MAAM,KAAK;AAE1E,WAAO,MAAM,QAAQ,SAAS,IAC1B,KAAK,MAAMA,eAAc,CAAC,IAC1B;AAAA,MACE,QAAQ,KAAK;AAAA,MACb,KAAKA;AAAA,IACP;AAAA,EACN,CAAC;AAED,QAAM,eAAe,kBAAkB;AAEvC,QAAM,YAAY,gBAAgB,cAAc,KAAK,cAAc;AAEnE,MAAI,CAAC,cAAc;AACjB,kBAAc,cAAc;AAAA,EAC9B;AAGA,MAAI,cAAc,GAAG;AACnB,UAAM,CAAC,SAAS,IAAI;AACpB,UAAM,YAAY,QAAQ,QAAQ,SAAS,CAAC;AAC5C,UAAM,MAAM,UAAU,SAAS,UAAU;AACzC,UAAM,cAAc,CAAC,CAAC;AAEtB,QAAI,MAAM,GAAG;AACX,kBAAY,KAAK,QAAQ,SAAS,CAAC;AAAA,IACrC;AAEA,QAAI,MAAM,IAAI;AACZ,YAAM,YAAY,UAAU,SAAS,MAAM;AAG3C,YAAM,YAAY,QAAQ,OAAO,CAAC,MAAM,SAAU,KAAK,UAAU,aAAa,KAAK,SAAS,YAAY,KAAK,SAAS,YAAY,OAAO,IAAK;AAE9I,kBAAY,KAAK,QAAQ,QAAQ,SAAS,CAAC;AAAA,IAC7C;AAEA,YAAQ,QAAQ,CAAC,GAAG,MAAM;AACxB,UAAI,CAAC,YAAY,SAAS,CAAC,GAAG;AAC5B,eAAO,EAAE;AAAA,MACX;AAAA,IACF,CAAC;AAAA,EACH;AAEA,eAAa,KAAK,KAAK,qBAAqB,SAAS,MAAM,IAAI,UAAU;AAEzE,QAAM,SAAS,aAAa,cAAc;AAE1C,SACE,oBAAC,SAAI,OACH,8BAAC,SAAI,OAAO,aAAa,QAAQ,SAAS,IACxC,8BAAC,OAAE,WAAW,aAAa,YAAY,SAAS,IAAI,QACjD,kBAAQ,IAAI,CAAC,QAAQ,MACpB,oBAAC,UAAgB,GAAG,QAAQ,WAAW,aAAa,IAAI,KAAK,IAAI,SAAS,WAA7D,CAAsE,CACpF,GACH,GACF,GACF;AAEJ;AAEA,IAAO,kBAAQ,KAAK,OAAO","sourcesContent":["import i18n from \"@dhis2/d2-i18n\";\nimport { scaleSqrt } from \"d3-scale\";\nimport { reduce } from \"lodash\";\nimport React, { memo } from \"react\";\nimport { getContrastColor } from \"../../../../../../../../../utils/colors\";\nimport { getLongestTextLength } from \"../../../../../../../../../utils/helpers\";\nimport Bubble, { BubbleProps } from \"./Bubble\";\n\nconst style = {\n\tpaddingTop: 10,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n};\n\nconst legendWidth = 200;\nconst digitWidth = 6.8;\nexport const guideLength = 16;\nexport const textPadding = 4;\n\nconst Bubbles = ({ radiusLow, radiusHigh, color, classes }: { radiusLow: number; radiusHigh: number; color?: string; classes: Array<any> }) => {\n const height = radiusHigh * 2 + 4;\n const scale = scaleSqrt().range([radiusLow, radiusHigh]);\n const radiusMid = scale(0.5);\n\n if (isNaN(radiusLow) || isNaN(radiusHigh)) {\n return null;\n }\n\n let bubbles: Array<BubbleProps> = [];\n\n // If color legend\n if (Array.isArray(classes) && classes.length) {\n const startValue = classes[0].startValue;\n const endValue = classes[classes.length - 1].endValue;\n const itemScale = scale.domain([startValue, endValue]);\n\n bubbles = [...classes].reverse().map((c) => ({\n radius: itemScale(c.endValue),\n maxRadius: radiusHigh,\n color: c.color,\n text: String(c.endValue),\n }));\n\n // Add the smallest bubble for the lowest value\n bubbles.push({\n radius: itemScale(startValue),\n maxRadius: radiusHigh,\n text: String(startValue),\n });\n } else {\n // If single color\n const stroke = color && getContrastColor(color);\n\n bubbles = [\n {\n radius: radiusHigh,\n maxRadius: radiusHigh,\n color,\n stroke,\n text: i18n.t(\"Max\"),\n },\n {\n radius: radiusMid,\n maxRadius: radiusHigh,\n color,\n stroke,\n text: i18n.t(\"Mid\"),\n },\n {\n radius: radiusLow,\n maxRadius: radiusHigh,\n color,\n stroke,\n text: i18n.t(\"Min\"),\n },\n ];\n }\n\n // Calculate the pixel length of the longest number\n let textLength = Math.ceil(Math.max(getLongestTextLength(classes, \"startValue\"), getLongestTextLength(classes, \"endValue\")) * digitWidth);\n\n // Calculate the total length if numbers are alternate on each side\n const alternateLength = (radiusHigh + guideLength + textPadding + textLength) * 2;\n\n let smallestGap = reduce(bubbles, (prev, curr: any, i) => {\n const gap = prev.radius - curr.radius;\n const smallestGap = prev.gap === undefined || gap < prev.gap ? gap : prev.gap;\n\n return i === bubbles.length - 1\n ? Math.round(smallestGap * 2)\n : {\n radius: curr.radius,\n gap: smallestGap,\n };\n });\n\n const alternateFit = alternateLength < legendWidth;\n\n const alternate = alternateFit && smallestGap > 5 && smallestGap < 12;\n\n if (!alternateFit) {\n smallestGap = smallestGap / 2;\n }\n\n // Too cramped to show number for each bubble\n if (smallestGap < 4) {\n const [maxBubble] = bubbles;\n const minBubble = bubbles[bubbles.length - 1];\n const gap = maxBubble.radius - minBubble.radius;\n const showNumbers = [0]; // Always show the largest number\n\n if (gap > 4) {\n showNumbers.push(bubbles.length - 1);\n }\n\n if (gap > 15) {\n const midRadius = minBubble.radius + gap / 2;\n\n // Find the closest bubble above the mid-radius\n const midBubble = bubbles.reduce((prev, curr) => (curr.radius >= midRadius && curr.radius - midRadius < prev.radius - midRadius ? curr : prev));\n\n showNumbers.push(bubbles.indexOf(midBubble));\n }\n\n bubbles.forEach((b, i) => {\n if (!showNumbers.includes(i)) {\n delete b.text;\n }\n });\n }\n\n textLength = Math.ceil(getLongestTextLength(bubbles, \"text\") * digitWidth);\n\n const offset = textLength + guideLength + textPadding;\n\n return (\n <div style={style}>\n <svg width={legendWidth} height={height + 50}>\n <g transform={`translate(${alternate ? offset : \"16\"} 24)`}>\n {bubbles.map((bubble, i) => (\n <Bubble key={i} {...bubble} textAlign={alternate && i % 2 == 0 ? \"left\" : \"right\"} />\n ))}\n </g>\n </svg>\n </div>\n );\n};\n\nexport default memo(Bubbles);\n"]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Divider } from '@dhis2/ui';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
|
-
import LegendCardHeader from '../../../../../LegendArea/components/LegendCardHeader';
|
|
5
|
-
import Bubbles from './components/Bubbles';
|
|
6
|
-
|
|
7
|
-
function BubbleLegend({
|
|
8
|
-
radius,
|
|
9
|
-
dataItem,
|
|
10
|
-
data,
|
|
11
|
-
name,
|
|
12
|
-
collapsible,
|
|
13
|
-
onCollapse,
|
|
14
|
-
legends
|
|
15
|
-
}, ref) {
|
|
16
|
-
return /* @__PURE__ */ jsxs("div", { className: "legend-card", ref, children: [
|
|
17
|
-
/* @__PURE__ */ jsx(
|
|
18
|
-
LegendCardHeader,
|
|
19
|
-
{
|
|
20
|
-
title: dataItem.displayName,
|
|
21
|
-
onCollapse,
|
|
22
|
-
collapsible
|
|
23
|
-
}
|
|
24
|
-
),
|
|
25
|
-
/* @__PURE__ */ jsx(Divider, { margin: "0" }),
|
|
26
|
-
/* @__PURE__ */ jsx("div", { className: "legend-list pt-8", children: /* @__PURE__ */ jsx(
|
|
27
|
-
Bubbles,
|
|
28
|
-
{
|
|
29
|
-
classes: legends.reverse(),
|
|
30
|
-
radiusHigh: radius.max,
|
|
31
|
-
radiusLow: radius.min,
|
|
32
|
-
color: "#FF0000"
|
|
33
|
-
}
|
|
34
|
-
) })
|
|
35
|
-
] });
|
|
36
|
-
}
|
|
37
|
-
var BubbleLegend_default = forwardRef(BubbleLegend);
|
|
38
|
-
|
|
39
|
-
export { BubbleLegend_default as default };
|
|
40
|
-
//# sourceMappingURL=out.js.map
|
|
41
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.tsx"],"names":[],"mappings":"AA+BE,SACC,KADD;AA/BF,SAAS,eAAe;AAExB,SAAgB,kBAAkB;AAKlC,OAAO,sBAAsB;AAC7B,OAAO,aAAa;AAEpB,SAAS,aACR;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GASA,KACC;AACD,SACC,qBAAC,SAAI,WAAU,eAAc,KAC5B;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,OAAO,SAAS;AAAA,QAChB;AAAA,QACA;AAAA;AAAA,IACD;AAAA,IACA,oBAAC,WAAQ,QAAQ,KAAK;AAAA,IACtB,oBAAC,SAAI,WAAU,oBACd;AAAA,MAAC;AAAA;AAAA,QACA,SAAS,QAAQ,QAAQ;AAAA,QACzB,YAAY,OAAO;AAAA,QACnB,WAAW,OAAO;AAAA,QAClB,OAAO;AAAA;AAAA,IACR,GACD;AAAA,KACD;AAEF;AAEA,IAAO,uBAAQ,WAAW,YAAY","sourcesContent":["import { Divider } from \"@dhis2/ui\";\nimport type { Legend } from \"@hisptz/dhis2-utils\";\nimport React, { forwardRef } from \"react\";\nimport {\n\tThematicLayerData,\n\tThematicLayerDataItem,\n} from \"../../../../../../interfaces\";\nimport LegendCardHeader from \"../../../../../LegendArea/components/LegendCardHeader\";\nimport Bubbles from \"./components/Bubbles\";\n\nfunction BubbleLegend(\n\t{\n\t\tradius,\n\t\tdataItem,\n\t\tdata,\n\t\tname,\n\t\tcollapsible,\n\t\tonCollapse,\n\t\tlegends,\n\t}: {\n\t\tradius: { min: number; max: number };\n\t\tdataItem: ThematicLayerDataItem;\n\t\tdata: ThematicLayerData[];\n\t\tname?: string;\n\t\tcollapsible?: boolean;\n\t\tonCollapse?: () => void;\n\t\tlegends: Legend[];\n\t},\n\tref: React.LegacyRef<HTMLDivElement> | undefined,\n) {\n\treturn (\n\t\t<div className=\"legend-card\" ref={ref}>\n\t\t\t<LegendCardHeader\n\t\t\t\ttitle={dataItem.displayName}\n\t\t\t\tonCollapse={onCollapse}\n\t\t\t\tcollapsible={collapsible}\n\t\t\t/>\n\t\t\t<Divider margin={\"0\"} />\n\t\t\t<div className=\"legend-list pt-8\">\n\t\t\t\t<Bubbles\n\t\t\t\t\tclasses={legends.reverse()}\n\t\t\t\t\tradiusHigh={radius.max}\n\t\t\t\t\tradiusLow={radius.min}\n\t\t\t\t\tcolor={\"#FF0000\"}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef(BubbleLegend);\n"]}
|
package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { colors } from '@dhis2/ui';
|
|
3
|
-
import { geoJSON } from 'leaflet';
|
|
4
|
-
import { useMemo } from 'react';
|
|
5
|
-
import { CircleMarker } from 'react-leaflet';
|
|
6
|
-
import { highlightFeature, resetHighlight, getColorFromLegendSet } from '../../../../../../utils/map';
|
|
7
|
-
import CustomTooltip from '../CustomTooltip';
|
|
8
|
-
|
|
9
|
-
const defaultStyle = {
|
|
10
|
-
weight: 1
|
|
11
|
-
};
|
|
12
|
-
const highlightStyle = {
|
|
13
|
-
weight: 2
|
|
14
|
-
};
|
|
15
|
-
function Bubble({
|
|
16
|
-
data,
|
|
17
|
-
highestData,
|
|
18
|
-
legends,
|
|
19
|
-
radius
|
|
20
|
-
}) {
|
|
21
|
-
const { orgUnit, data: value } = data ?? {};
|
|
22
|
-
const geoJSONObject = orgUnit.geoJSON;
|
|
23
|
-
const center = geoJSON(geoJSONObject).getBounds().getCenter();
|
|
24
|
-
const circleRadius = useMemo(() => {
|
|
25
|
-
return (value ?? 0) * (radius?.max ?? 50) / highestData;
|
|
26
|
-
}, [radius, data, highestData]);
|
|
27
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
28
|
-
CircleMarker,
|
|
29
|
-
{
|
|
30
|
-
interactive: true,
|
|
31
|
-
eventHandlers: {
|
|
32
|
-
mouseover: (e) => highlightFeature(e, highlightStyle),
|
|
33
|
-
mouseout: (e) => resetHighlight(e, defaultStyle)
|
|
34
|
-
},
|
|
35
|
-
pathOptions: {
|
|
36
|
-
fillColor: getColorFromLegendSet(legends, data.data),
|
|
37
|
-
fillOpacity: 1,
|
|
38
|
-
color: colors.grey900,
|
|
39
|
-
weight: 1
|
|
40
|
-
},
|
|
41
|
-
radius: circleRadius,
|
|
42
|
-
center,
|
|
43
|
-
children: /* @__PURE__ */ jsx(CustomTooltip, { data })
|
|
44
|
-
}
|
|
45
|
-
) });
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { Bubble as default };
|
|
49
|
-
//# sourceMappingURL=out.js.map
|
|
50
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.tsx"],"names":[],"mappings":"AAyCI,mBAeI,WAfJ;AAzCJ,SAAS,cAAc;AAEvB,SAAS,eAAe;AACxB,SAAgB,eAAe;AAC/B,SAAS,oBAAoB;AAC7B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEP,OAAO,mBAAmB;AAE1B,MAAM,eAAe;AAAA,EACpB,QAAQ;AACT;AACA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AACV;AAEe,SAAR,OAAwB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,QAAM,EAAE,SAAS,MAAM,MAAM,IAAI,QAAQ,CAAC;AAE1C,QAAM,gBAAgB,QAAQ;AAC9B,QAAM,SAAS,QAAQ,aAAa,EAAE,UAAU,EAAE,UAAU;AAE5D,QAAM,eAAe,QAAQ,MAAM;AACjC,YAAS,SAAS,MAAM,QAAQ,OAAO,MAAO;AAAA,EAChD,GAAG,CAAC,QAAQ,MAAM,WAAW,CAAC;AAE9B,SACE,gCACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,eAAe;AAAA,QACb,WAAW,CAAC,MAAM,iBAAiB,GAAG,cAAc;AAAA,QACpD,UAAU,CAAC,MAAM,eAAe,GAAG,YAAY;AAAA,MACjD;AAAA,MACA,aAAa;AAAA,QACX,WAAW,sBAAsB,SAAS,KAAK,IAAI;AAAA,QACnD,aAAa;AAAA,QACb,OAAO,OAAO;AAAA,QACd,QAAQ;AAAA,MACV;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA,8BAAC,iBAAc,MAAY;AAAA;AAAA,EAC7B,GACF;AAEJ","sourcesContent":["import { colors } from \"@dhis2/ui\";\nimport type { Legend } from \"@hisptz/dhis2-utils\";\nimport { geoJSON } from \"leaflet\";\nimport React, { useMemo } from \"react\";\nimport { CircleMarker } from \"react-leaflet\";\nimport {\n\tgetColorFromLegendSet,\n\thighlightFeature,\n\tresetHighlight,\n} from \"../../../../../../utils/map\";\nimport { ThematicLayerData } from \"../../../../interfaces\";\nimport CustomTooltip from \"../CustomTooltip\";\n\nconst defaultStyle = {\n\tweight: 1,\n};\nconst highlightStyle = {\n weight: 2,\n};\n\nexport default function Bubble({\n data,\n highestData,\n legends,\n radius,\n}: {\n data: ThematicLayerData;\n highestData: number;\n legends: Legend[];\n radius?: { min: number; max: number };\n}) {\n const { orgUnit, data: value } = data ?? {};\n\n const geoJSONObject = orgUnit.geoJSON;\n const center = geoJSON(geoJSONObject).getBounds().getCenter();\n\n const circleRadius = useMemo(() => {\n return ((value ?? 0) * (radius?.max ?? 50)) / highestData;\n }, [radius, data, highestData]);\n\n return (\n <>\n <CircleMarker\n interactive\n eventHandlers={{\n mouseover: (e) => highlightFeature(e, highlightStyle),\n mouseout: (e) => resetHighlight(e, defaultStyle),\n }}\n pathOptions={{\n fillColor: getColorFromLegendSet(legends, data.data),\n fillOpacity: 1,\n color: colors.grey900,\n weight: 1,\n }}\n radius={circleRadius}\n center={center}>\n <CustomTooltip data={data} />\n </CircleMarker>\n </>\n );\n}\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import '../../../styles/legends.css';
|
|
3
|
-
import { Divider } from '@dhis2/ui';
|
|
4
|
-
import { forwardRef } from 'react';
|
|
5
|
-
import { getLegendCount } from '../../../../../../../utils/map';
|
|
6
|
-
import LegendCardHeader from '../../../../LegendArea/components/LegendCardHeader';
|
|
7
|
-
|
|
8
|
-
function LegendItem({
|
|
9
|
-
legend,
|
|
10
|
-
value
|
|
11
|
-
}) {
|
|
12
|
-
return /* @__PURE__ */ jsxs("div", { className: "legend-item", children: [
|
|
13
|
-
/* @__PURE__ */ jsx(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
className: "legend-item-color",
|
|
17
|
-
style: { backgroundColor: legend.color }
|
|
18
|
-
}
|
|
19
|
-
),
|
|
20
|
-
/* @__PURE__ */ jsx("div", { className: "legend-item-label", children: `${legend.startValue} - ${legend.endValue}` }),
|
|
21
|
-
/* @__PURE__ */ jsx("div", { className: "legend-item-value", children: `(${value})` })
|
|
22
|
-
] });
|
|
23
|
-
}
|
|
24
|
-
function ChoroplethLegend({
|
|
25
|
-
dataItem,
|
|
26
|
-
data,
|
|
27
|
-
name,
|
|
28
|
-
collapsible,
|
|
29
|
-
onCollapse,
|
|
30
|
-
legends
|
|
31
|
-
}, ref) {
|
|
32
|
-
return /* @__PURE__ */ jsxs("div", { className: "legend-card", ref, children: [
|
|
33
|
-
/* @__PURE__ */ jsx(LegendCardHeader, { title: dataItem.displayName, collapsible, onCollapse }),
|
|
34
|
-
/* @__PURE__ */ jsx(Divider, { margin: "0" }),
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: "legend-list pt-8", children: legends?.map((legend) => /* @__PURE__ */ jsx(LegendItem, { legend, value: getLegendCount(legend, data) }, `${legend?.color}-legend-list`)) })
|
|
36
|
-
] });
|
|
37
|
-
}
|
|
38
|
-
var ChoroplethLegend_default = forwardRef(ChoroplethLegend);
|
|
39
|
-
|
|
40
|
-
export { LegendItem, ChoroplethLegend_default as default };
|
|
41
|
-
//# sourceMappingURL=out.js.map
|
|
42
|
-
//# sourceMappingURL=ChoroplethLegend.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.tsx"],"names":[],"mappings":"AAmBE,SACC,KADD;AAnBF,OAAO;AACP,SAAS,eAAe;AAExB,SAAgB,kBAAkB;AAClC,SAAS,sBAAsB;AAK/B,OAAO,sBAAsB;AAEtB,SAAS,WAAW;AAAA,EAC1B;AAAA,EACA;AACD,GAGG;AACF,SACC,qBAAC,SAAI,WAAU,eACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,OAAO,EAAE,iBAAiB,OAAO,MAAM;AAAA;AAAA,IACxC;AAAA,IACA,oBAAC,SAAI,WAAU,qBAAqB,aAAG,OAAO,UAAU,MAAM,OAAO,QAAQ,IAAG;AAAA,IAChF,oBAAC,SAAI,WAAU,qBAAqB,cAAI,KAAK,KAAI;AAAA,KAClD;AAEF;AAEA,SAAS,iBACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACA,KACA;AACA,SACE,qBAAC,SAAI,WAAU,eAAc,KAC3B;AAAA,wBAAC,oBAAiB,OAAO,SAAS,aAAa,aAA0B,YAAwB;AAAA,IACjG,oBAAC,WAAQ,QAAQ,KAAK;AAAA,IACtB,oBAAC,SAAI,WAAU,oBACZ,mBAAS,IAAI,CAAC,WACb,oBAAC,cAAgD,QAAgB,OAAO,eAAe,QAAQ,IAAI,KAAlF,GAAG,QAAQ,KAAK,cAAqE,CACvG,GACH;AAAA,KACF;AAEJ;AAEA,IAAO,2BAAQ,WAAW,gBAAgB","sourcesContent":["import \"../../../styles/legends.css\";\nimport { Divider } from \"@dhis2/ui\";\nimport type { Legend } from \"@hisptz/dhis2-utils\";\nimport React, { forwardRef } from \"react\";\nimport { getLegendCount } from \"../../../../../../../utils/map\";\nimport {\n\tThematicLayerData,\n\tThematicLayerDataItem,\n} from \"../../../../../interfaces\";\nimport LegendCardHeader from \"../../../../LegendArea/components/LegendCardHeader\";\n\nexport function LegendItem({\n\tlegend,\n\tvalue,\n}: {\n\tlegend: { startValue: number; endValue: number; color: string };\n\tvalue: number;\n}) {\n\treturn (\n\t\t<div className=\"legend-item\">\n\t\t\t<div\n\t\t\t\tclassName=\"legend-item-color\"\n\t\t\t\tstyle={{ backgroundColor: legend.color }}\n\t\t\t/>\n\t\t\t<div className=\"legend-item-label\">{`${legend.startValue} - ${legend.endValue}`}</div>\n\t\t\t<div className=\"legend-item-value\">{`(${value})`}</div>\n\t\t</div>\n\t);\n}\n\nfunction ChoroplethLegend(\n {\n dataItem,\n data,\n name,\n collapsible,\n onCollapse,\n legends,\n }: { data: ThematicLayerData[]; dataItem: ThematicLayerDataItem; name?: string; collapsible?: boolean; onCollapse?: () => void; legends: Legend[] },\n ref: React.LegacyRef<HTMLDivElement> | undefined\n) {\n return (\n <div className=\"legend-card\" ref={ref}>\n <LegendCardHeader title={dataItem.displayName} collapsible={collapsible} onCollapse={onCollapse} />\n <Divider margin={\"0\"} />\n <div className=\"legend-list pt-8\">\n {legends?.map((legend: any) => (\n <LegendItem key={`${legend?.color}-legend-list`} legend={legend} value={getLegendCount(legend, data)} />\n ))}\n </div>\n </div>\n );\n}\n\nexport default forwardRef(ChoroplethLegend);\n"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { colors } from '@dhis2/ui';
|
|
3
|
-
import { GeoJSON } from 'react-leaflet';
|
|
4
|
-
import { highlightFeature, resetHighlight, getColorFromLegendSet } from '../../../../../../utils/map';
|
|
5
|
-
import CustomTooltip from '../CustomTooltip';
|
|
6
|
-
|
|
7
|
-
const defaultStyle = {
|
|
8
|
-
weight: 1
|
|
9
|
-
};
|
|
10
|
-
const highlightStyle = {
|
|
11
|
-
weight: 2
|
|
12
|
-
};
|
|
13
|
-
function Choropleth({ data, legends }) {
|
|
14
|
-
const { orgUnit } = data;
|
|
15
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
16
|
-
GeoJSON,
|
|
17
|
-
{
|
|
18
|
-
data: orgUnit.geoJSON,
|
|
19
|
-
eventHandlers: {
|
|
20
|
-
mouseover: (e) => highlightFeature(e, highlightStyle),
|
|
21
|
-
mouseout: (e) => resetHighlight(e, defaultStyle)
|
|
22
|
-
},
|
|
23
|
-
pathOptions: {
|
|
24
|
-
fillColor: getColorFromLegendSet(legends, data.data),
|
|
25
|
-
fillOpacity: 1,
|
|
26
|
-
color: colors.grey900,
|
|
27
|
-
weight: 1
|
|
28
|
-
},
|
|
29
|
-
children: /* @__PURE__ */ jsx(CustomTooltip, { data })
|
|
30
|
-
},
|
|
31
|
-
`${data.dataItem.id}-layer`
|
|
32
|
-
) });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { Choropleth as default };
|
|
36
|
-
//# sourceMappingURL=out.js.map
|
|
37
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.tsx"],"names":[],"mappings":"AAuBI,mBAcI,WAdJ;AAvBJ,SAAS,cAAc;AAGvB,SAAS,eAAe;AAExB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEP,OAAO,mBAAmB;AAE1B,MAAM,eAAe;AAAA,EACpB,QAAQ;AACT;AACA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AACV;AAEe,SAAR,WAA4B,EAAE,MAAM,QAAQ,GAAyG;AAC1J,QAAM,EAAE,QAAQ,IAAI;AACpB,SACE,gCACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ;AAAA,MACd,eAAe;AAAA,QACb,WAAW,CAAC,MAAM,iBAAiB,GAAG,cAAc;AAAA,QACpD,UAAU,CAAC,MAAM,eAAe,GAAG,YAAY;AAAA,MACjD;AAAA,MACA,aAAa;AAAA,QACX,WAAW,sBAAsB,SAAS,KAAK,IAAI;AAAA,QACnD,aAAa;AAAA,QACb,OAAO,OAAO;AAAA,QACd,QAAQ;AAAA,MACV;AAAA,MAEA,8BAAC,iBAAc,MAAY;AAAA;AAAA,IADtB,GAAG,KAAK,SAAS,EAAE;AAAA,EAE1B,GACF;AAEJ","sourcesContent":["import { colors } from \"@dhis2/ui\";\nimport type { Legend } from \"@hisptz/dhis2-utils\";\nimport React from \"react\";\nimport { GeoJSON } from \"react-leaflet\";\nimport { MapOrgUnit } from \"../../../../../../interfaces\";\nimport {\n\tgetColorFromLegendSet,\n\thighlightFeature,\n\tresetHighlight,\n} from \"../../../../../../utils/map\";\nimport { ThematicLayerDataItem } from \"../../../../interfaces\";\nimport CustomTooltip from \"../CustomTooltip\";\n\nconst defaultStyle = {\n\tweight: 1,\n};\nconst highlightStyle = {\n weight: 2,\n};\n\nexport default function Choropleth({ data, legends }: { data: { orgUnit: MapOrgUnit; data?: number; dataItem: ThematicLayerDataItem }; legends: Legend[] }) {\n const { orgUnit } = data;\n return (\n <>\n <GeoJSON\n data={orgUnit.geoJSON}\n eventHandlers={{\n mouseover: (e) => highlightFeature(e, highlightStyle),\n mouseout: (e) => resetHighlight(e, defaultStyle),\n }}\n pathOptions={{\n fillColor: getColorFromLegendSet(legends, data.data),\n fillOpacity: 1,\n color: colors.grey900,\n weight: 1,\n }}\n key={`${data.dataItem.id}-layer`}>\n <CustomTooltip data={data} />\n </GeoJSON>\n </>\n );\n}\n"]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import i18n from '@dhis2/d2-i18n';
|
|
3
|
-
import { Pane, Tooltip, Popup } from 'react-leaflet';
|
|
4
|
-
import { useMapPeriods } from '../../../../../MapProvider/hooks';
|
|
5
|
-
|
|
6
|
-
function CustomTooltip({
|
|
7
|
-
data: dataObject
|
|
8
|
-
}) {
|
|
9
|
-
const { dataItem, orgUnit, data } = dataObject ?? {};
|
|
10
|
-
const { periods } = useMapPeriods() ?? {};
|
|
11
|
-
return /* @__PURE__ */ jsxs(
|
|
12
|
-
Pane,
|
|
13
|
-
{
|
|
14
|
-
name: `${dataItem.displayName}-${orgUnit.id}-popup-pane`,
|
|
15
|
-
pane: "popupPane",
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
18
|
-
orgUnit?.name,
|
|
19
|
-
" (",
|
|
20
|
-
data,
|
|
21
|
-
")"
|
|
22
|
-
] }),
|
|
23
|
-
/* @__PURE__ */ jsxs(Popup, { minWidth: 80, children: [
|
|
24
|
-
/* @__PURE__ */ jsx("h3", { style: { margin: 0 }, children: orgUnit?.name }),
|
|
25
|
-
/* @__PURE__ */ jsx("div", { children: dataItem?.displayName }),
|
|
26
|
-
/* @__PURE__ */ jsx("div", { children: periods?.map((period) => period.name).join(",") }),
|
|
27
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
28
|
-
i18n.t("Value"),
|
|
29
|
-
": ",
|
|
30
|
-
data
|
|
31
|
-
] })
|
|
32
|
-
] })
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { CustomTooltip as default };
|
|
39
|
-
//# sourceMappingURL=out.js.map
|
|
40
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.tsx"],"names":[],"mappings":"AAmBG,SAIC,KAJD;AAnBH,OAAO,UAAU;AAEjB,SAAS,MAAM,OAAO,eAAe;AACrC,SAAS,qBAAqB;AAGf,SAAR,cAA+B;AAAA,EACrC,MAAM;AACP,GAEG;AACF,QAAM,EAAE,UAAU,SAAS,KAAK,IAAI,cAAc,CAAC;AACnD,QAAM,EAAE,QAAQ,IAAI,cAAc,KAAK,CAAC;AAExC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAM,GAAG,SAAS,WAAW,IAAI,QAAQ,EAAE;AAAA,MAC3C,MAAK;AAAA,MAEL;AAAA,6BAAC,WACC;AAAA,mBAAS;AAAA,UAAK;AAAA,UAAG;AAAA,UAAK;AAAA,WACxB;AAAA,QACA,qBAAC,SAAM,UAAU,IAChB;AAAA,8BAAC,QAAG,OAAO,EAAE,QAAQ,EAAE,GAAI,mBAAS,MAAK;AAAA,UACzC,oBAAC,SAAK,oBAAU,aAAY;AAAA,UAC5B,oBAAC,SAAK,mBAAS,IAAI,CAAC,WAAW,OAAO,IAAI,EAAE,KAAK,GAAG,GAAE;AAAA,UACtD,qBAAC,SACC;AAAA,iBAAK,EAAE,OAAO;AAAA,YAAE;AAAA,YAAG;AAAA,aACrB;AAAA,WACD;AAAA;AAAA;AAAA,EACD;AAEF","sourcesContent":["import i18n from \"@dhis2/d2-i18n\";\nimport React from \"react\";\nimport { Pane, Popup, Tooltip } from \"react-leaflet\";\nimport { useMapPeriods } from \"../../../../../MapProvider/hooks\";\nimport { ThematicLayerData } from \"../../../../interfaces\";\n\nexport default function CustomTooltip({\n\tdata: dataObject,\n}: {\n\tdata: ThematicLayerData;\n}) {\n\tconst { dataItem, orgUnit, data } = dataObject ?? {};\n\tconst { periods } = useMapPeriods() ?? {};\n\n\treturn (\n\t\t<Pane\n\t\t\tname={`${dataItem.displayName}-${orgUnit.id}-popup-pane`}\n\t\t\tpane=\"popupPane\"\n\t\t>\n\t\t\t<Tooltip>\n\t\t\t\t{orgUnit?.name} ({data})\n\t\t\t</Tooltip>\n\t\t\t<Popup minWidth={80}>\n\t\t\t\t<h3 style={{ margin: 0 }}>{orgUnit?.name}</h3>\n\t\t\t\t<div>{dataItem?.displayName}</div>\n\t\t\t\t<div>{periods?.map((period) => period.name).join(\",\")}</div>\n\t\t\t\t<div>\n\t\t\t\t\t{i18n.t(\"Value\")}: {data}\n\t\t\t\t</div>\n\t\t\t</Popup>\n\t\t</Pane>\n\t);\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { find } from 'lodash';
|
|
2
|
-
import { useContext } from 'react';
|
|
3
|
-
import { MapLayersContext } from '../../../../../state';
|
|
4
|
-
|
|
5
|
-
function useThematicLayer(layerId) {
|
|
6
|
-
const { layers } = useContext(MapLayersContext);
|
|
7
|
-
return find(layers, ["id", layerId]);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { useThematicLayer as default };
|
|
11
|
-
//# sourceMappingURL=out.js.map
|
|
12
|
-
//# sourceMappingURL=config.mjs.map
|
package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AAGlB,SAAR,iBACN,SACkC;AAClC,QAAM,EAAE,OAAO,IAAI,WAAW,gBAAgB;AAE9C,SAAO,KAAK,QAAiC,CAAC,MAAM,OAAO,CAAC;AAC7D","sourcesContent":["import { find } from \"lodash\";\nimport { useContext } from \"react\";\nimport { MapLayersContext } from \"../../../../../state\";\nimport { CustomThematicLayer } from \"../../../interfaces\";\n\nexport default function useThematicLayer(\n\tlayerId: string,\n): CustomThematicLayer | undefined {\n\tconst { layers } = useContext(MapLayersContext);\n\n\treturn find(layers as CustomThematicLayer[], [\"id\", layerId]);\n}\n"]}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { last } from 'lodash';
|
|
3
|
-
import { LayersControl, Pane, LayerGroup } from 'react-leaflet';
|
|
4
|
-
import Bubble from './components/Bubble';
|
|
5
|
-
import Choropleth from './components/Choropleth';
|
|
6
|
-
import useThematicLayer from './hooks/config';
|
|
7
|
-
|
|
8
|
-
function ThematicLayer({
|
|
9
|
-
layerId,
|
|
10
|
-
index
|
|
11
|
-
}) {
|
|
12
|
-
const layer = useThematicLayer(layerId);
|
|
13
|
-
if (!layer) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const { type, dataItem, name, data, enabled, legends } = layer ?? {};
|
|
17
|
-
const uniqueName = name ?? dataItem.displayName;
|
|
18
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(LayersControl.Overlay, { checked: enabled, name: uniqueName, children: /* @__PURE__ */ jsx(
|
|
19
|
-
Pane,
|
|
20
|
-
{
|
|
21
|
-
style: {
|
|
22
|
-
zIndex: type === "bubble" ? 500 : 500 - (index + 1)
|
|
23
|
-
},
|
|
24
|
-
name: uniqueName,
|
|
25
|
-
children: /* @__PURE__ */ jsxs(LayerGroup, { children: [
|
|
26
|
-
data?.map(
|
|
27
|
-
(datum) => type === "choropleth" ? /* @__PURE__ */ jsx(
|
|
28
|
-
Choropleth,
|
|
29
|
-
{
|
|
30
|
-
legends: legends ?? [],
|
|
31
|
-
data: datum
|
|
32
|
-
},
|
|
33
|
-
`${datum?.dataItem?.id}-${datum?.orgUnit?.id}-layer`
|
|
34
|
-
) : null
|
|
35
|
-
),
|
|
36
|
-
data?.map(
|
|
37
|
-
(datum) => type === "bubble" ? /* @__PURE__ */ jsx(
|
|
38
|
-
Bubble,
|
|
39
|
-
{
|
|
40
|
-
radius: layer?.radius,
|
|
41
|
-
legends: legends ?? [],
|
|
42
|
-
highestData: last(data)?.data ?? 1,
|
|
43
|
-
data: datum
|
|
44
|
-
},
|
|
45
|
-
`${datum?.dataItem?.id}-${datum?.orgUnit?.id}-layer`
|
|
46
|
-
) : null
|
|
47
|
-
)
|
|
48
|
-
] })
|
|
49
|
-
}
|
|
50
|
-
) }) });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { ThematicLayer as default };
|
|
54
|
-
//# sourceMappingURL=out.js.map
|
|
55
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/components/Map/components/MapLayer/components/ThematicLayer/index.tsx"],"names":[],"mappings":"AAwBE,mBAWM,KAHH,YARH;AAxBF,SAAS,YAAY;AAErB,SAAS,YAAY,eAAe,YAAY;AAEhD,OAAO,YAAY;AACnB,OAAO,gBAAgB;AACvB,OAAO,sBAAsB;AAEd,SAAR,cAA+B;AAAA,EACrC;AAAA,EACA;AACD,GAGG;AACF,QAAM,QAAQ,iBAAiB,OAAO;AAEtC,MAAI,CAAC,OAAO;AACX,WAAO;AAAA,EACR;AAEA,QAAM,EAAE,MAAM,UAAU,MAAM,MAAM,SAAS,QAAQ,IAAI,SAAS,CAAC;AACnE,QAAM,aAAa,QAAQ,SAAS;AACpC,SACC,gCACC,8BAAC,cAAc,SAAd,EAAsB,SAAS,SAAS,MAAM,YAC9C;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,QAAQ,SAAS,WAAW,MAAM,OAAO,QAAQ;AAAA,MAClD;AAAA,MACA,MAAM;AAAA,MAEN,+BAAC,cACC;AAAA,cAAM;AAAA,UAAI,CAAC,UACX,SAAS,eACR;AAAA,YAAC;AAAA;AAAA,cACA,SAAS,WAAW,CAAC;AAAA,cACrB,MAAM;AAAA;AAAA,YACD,GAAG,OAAO,UAAU,EAAE,IAAI,OAAO,SAAS,EAAE;AAAA,UAClD,IACG;AAAA,QACL;AAAA,QACC,MAAM;AAAA,UAAI,CAAC,UACX,SAAS,WACR;AAAA,YAAC;AAAA;AAAA,cACA,QACE,OAA6B;AAAA,cAE/B,SAAS,WAAW,CAAC;AAAA,cACrB,aAAa,KAAK,IAAI,GAAG,QAAQ;AAAA,cACjC,MAAM;AAAA;AAAA,YACD,GAAG,OAAO,UAAU,EAAE,IAAI,OAAO,SAAS,EAAE;AAAA,UAClD,IACG;AAAA,QACL;AAAA,SACD;AAAA;AAAA,EACD,GACD,GACD;AAEF","sourcesContent":["import { last } from \"lodash\";\nimport React from \"react\";\nimport { LayerGroup, LayersControl, Pane } from \"react-leaflet\";\nimport { CustomBubbleLayer } from \"../../interfaces\";\nimport Bubble from \"./components/Bubble\";\nimport Choropleth from \"./components/Choropleth\";\nimport useThematicLayer from \"./hooks/config\";\n\nexport default function ThematicLayer({\n\tlayerId,\n\tindex,\n}: {\n\tlayerId: string;\n\tindex: number;\n}) {\n\tconst layer = useThematicLayer(layerId);\n\n\tif (!layer) {\n\t\treturn null;\n\t}\n\n\tconst { type, dataItem, name, data, enabled, legends } = layer ?? {};\n\tconst uniqueName = name ?? dataItem.displayName;\n\treturn (\n\t\t<>\n\t\t\t<LayersControl.Overlay checked={enabled} name={uniqueName}>\n\t\t\t\t<Pane\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tzIndex: type === \"bubble\" ? 500 : 500 - (index + 1),\n\t\t\t\t\t}}\n\t\t\t\t\tname={uniqueName}\n\t\t\t\t>\n\t\t\t\t\t<LayerGroup>\n\t\t\t\t\t\t{data?.map((datum) =>\n\t\t\t\t\t\t\ttype === \"choropleth\" ? (\n\t\t\t\t\t\t\t\t<Choropleth\n\t\t\t\t\t\t\t\t\tlegends={legends ?? []}\n\t\t\t\t\t\t\t\t\tdata={datum}\n\t\t\t\t\t\t\t\t\tkey={`${datum?.dataItem?.id}-${datum?.orgUnit?.id}-layer`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{data?.map((datum) =>\n\t\t\t\t\t\t\ttype === \"bubble\" ? (\n\t\t\t\t\t\t\t\t<Bubble\n\t\t\t\t\t\t\t\t\tradius={\n\t\t\t\t\t\t\t\t\t\t(layer as CustomBubbleLayer)?.radius\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tlegends={legends ?? []}\n\t\t\t\t\t\t\t\t\thighestData={last(data)?.data ?? 1}\n\t\t\t\t\t\t\t\t\tdata={datum}\n\t\t\t\t\t\t\t\t\tkey={`${datum?.dataItem?.id}-${datum?.orgUnit?.id}-layer`}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</LayerGroup>\n\t\t\t\t</Pane>\n\t\t\t</LayersControl.Overlay>\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import BoundaryLayer from './components/BoundaryLayer';
|
|
3
|
-
import GoogleEngineLayer from './components/GoogleEngineLayer';
|
|
4
|
-
import { PointLayer } from './components/PointLayer';
|
|
5
|
-
import ThematicLayer from './components/ThematicLayer';
|
|
6
|
-
|
|
7
|
-
function MapLayer({
|
|
8
|
-
layer,
|
|
9
|
-
index
|
|
10
|
-
}) {
|
|
11
|
-
switch (layer.type) {
|
|
12
|
-
case "overlay":
|
|
13
|
-
case "basemap":
|
|
14
|
-
return /* @__PURE__ */ jsx(BoundaryLayer, { ...layer });
|
|
15
|
-
case "bubble":
|
|
16
|
-
case "choropleth":
|
|
17
|
-
return /* @__PURE__ */ jsx(ThematicLayer, { layerId: layer.id, index });
|
|
18
|
-
case "point":
|
|
19
|
-
return /* @__PURE__ */ jsx(PointLayer, {});
|
|
20
|
-
case "population":
|
|
21
|
-
case "elevation":
|
|
22
|
-
case "footprints":
|
|
23
|
-
case "landCover":
|
|
24
|
-
return /* @__PURE__ */ jsx(GoogleEngineLayer, { layerId: layer.id });
|
|
25
|
-
default:
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { MapLayer as default };
|
|
31
|
-
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/MapLayer/index.tsx"],"names":[],"mappings":"AA0BU;AAzBV,OAAO,mBAAmB;AAC1B,OAAO,uBAAuB;AAC9B,SAAS,kBAAkB;AAC3B,OAAO,mBAAmB;AAQX,SAAR,SAA0B;AAAA,EAChC;AAAA,EACA;AACD,GAOG;AACF,UAAQ,MAAM,MAAM;AAAA,IACnB,KAAK;AAAA,IACL,KAAK;AACJ,aAAO,oBAAC,iBAAe,GAAG,OAAO;AAAA,IAClC,KAAK;AAAA,IACL,KAAK;AACJ,aAAO,oBAAC,iBAAc,SAAS,MAAM,IAAI,OAAc;AAAA,IACxD,KAAK;AACJ,aAAO,oBAAC,cAAW;AAAA,IACpB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACJ,aAAO,oBAAC,qBAAkB,SAAS,MAAM,IAAI;AAAA,IAC9C;AACC,aAAO;AAAA,EACT;AACD","sourcesContent":["import React from \"react\";\nimport BoundaryLayer from \"./components/BoundaryLayer\";\nimport GoogleEngineLayer from \"./components/GoogleEngineLayer\";\nimport { PointLayer } from \"./components/PointLayer\";\nimport ThematicLayer from \"./components/ThematicLayer\";\nimport {\n\tCustomBoundaryLayer,\n\tCustomGoogleEngineLayer,\n\tCustomPointLayer,\n\tCustomThematicLayer,\n} from \"./interfaces\";\n\nexport default function MapLayer({\n\tlayer,\n\tindex,\n}: {\n\tlayer:\n\t\t| CustomThematicLayer\n\t\t| CustomBoundaryLayer\n\t\t| CustomPointLayer\n\t\t| CustomGoogleEngineLayer;\n\tindex: number;\n}) {\n\tswitch (layer.type) {\n\t\tcase \"overlay\":\n\t\tcase \"basemap\":\n\t\t\treturn <BoundaryLayer {...layer} />;\n\t\tcase \"bubble\":\n\t\tcase \"choropleth\":\n\t\t\treturn <ThematicLayer layerId={layer.id} index={index} />;\n\t\tcase \"point\":\n\t\t\treturn <PointLayer />;\n\t\tcase \"population\":\n\t\tcase \"elevation\":\n\t\tcase \"footprints\":\n\t\tcase \"landCover\":\n\t\t\treturn <GoogleEngineLayer layerId={layer.id} />;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/components/Map/components/MapLayer/interfaces/index.ts"],"names":[],"mappings":"AASO,MAAM,gCAAgC,CAAC,cAAc,cAAc,aAAa,WAAW","sourcesContent":["import type { Legend } from \"@hisptz/dhis2-utils\";\nimport { MapOrgUnit, PointOrgUnit } from \"../../../interfaces\";\nimport { LegendColorScale } from \"../../../utils/colors\";\nimport { EarthEngineOptions } from \"../components/GoogleEngineLayer/interfaces\";\nimport { EarthEngine } from \"../components/GoogleEngineLayer/services/engine\";\n\nexport type BoundaryLayerType = \"basemap\" | \"overlay\";\nexport type ThematicLayerType = \"choropleth\" | \"bubble\";\n\nexport const SUPPORTED_EARTH_ENGINE_LAYERS = [\"population\", \"footprints\", \"elevation\", \"landCover\"];\n\nexport type GoogleEngineLayerType = \"population\" | \"footprints\" | \"elevation\" | \"landCover\";\n\nexport interface CustomBoundaryLayer extends CustomMapLayer {\n id: string;\n type: BoundaryLayerType;\n enabled: boolean;\n}\n\nexport interface EarthEngineLayerConfig extends CustomMapLayer {\n type: GoogleEngineLayerType;\n aggregations?: string[];\n name?: string;\n filters?: {\n period: string;\n };\n params?: {\n min: number;\n max: number;\n palette?: string;\n };\n}\n\nexport interface CustomGoogleEngineLayer extends CustomMapLayer {\n type: GoogleEngineLayerType;\n options: EarthEngineOptions;\n aggregations?: string[];\n name: string;\n url: string;\n engine?: EarthEngine;\n}\n\nexport interface CustomPointLayer extends CustomMapLayer {\n id: string;\n type: \"point\";\n label?: string;\n level?: string | number;\n group?: string;\n style?: {\n icon?: string;\n groupSet?: string;\n orgUnitGroups?: Array<{ name: string; symbol: string }>;\n };\n points?: Array<PointOrgUnit>;\n}\n\nexport type DataItemType = \"dataElement\" | \"indicator\" | \"programIndicator\";\n\nexport interface ThematicLayerDataItem {\n id: string;\n displayName: string;\n type: DataItemType;\n legendSet?: string;\n legendConfig?: {\n colorClass: LegendColorScale;\n scale: number;\n };\n}\n\nexport interface ThematicLayerControl {\n position: \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\";\n enabled: boolean;\n}\n\nexport interface ThematicLayerData {\n orgUnit: MapOrgUnit;\n data?: number;\n dataItem: ThematicLayerDataItem;\n}\n\nexport interface ThematicLayerRawData {\n orgUnit: string;\n data?: number;\n dataItem: string;\n}\n\nexport interface CustomChoroplethLayer extends CustomMapLayer {\n enabled: boolean;\n name?: string;\n data: ThematicLayerData[];\n dataItem: ThematicLayerDataItem;\n type: \"choropleth\";\n control?: ThematicLayerControl;\n legends?: Legend[];\n}\n\nexport interface CustomBubbleLayer extends CustomMapLayer {\n enabled: boolean;\n name?: string;\n data: ThematicLayerData[];\n dataItem: ThematicLayerDataItem;\n type: \"bubble\";\n control?: ThematicLayerControl;\n legends?: Legend[];\n radius?: {\n min: number;\n max: number;\n };\n}\n\nexport type CustomThematicLayer = CustomBubbleLayer | CustomChoroplethLayer;\n\nexport interface ThematicLayerConfig {\n id: string;\n data?: ThematicLayerRawData[];\n enabled: boolean;\n name?: string;\n dataItem: ThematicLayerDataItem;\n type: ThematicLayerType;\n control?: ThematicLayerControl;\n radius?: {\n min: number;\n max: number;\n };\n}\n\nexport interface CustomMapLayer {\n id: string;\n type: string;\n enabled: boolean;\n}\n\nexport type MapLayer = CustomBoundaryLayer | ThematicLayerConfig | CustomPointLayer | CustomGoogleEngineLayer;\n\nexport interface MapLayerProps {\n enabled: boolean;\n type: \"boundary\" | \"thematic\" | \"external\" | \"point\" | \"earthEngine\";\n layer: MapLayer;\n}\n"]}
|