@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,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var i18n = require('@dhis2/d2-i18n');
|
|
6
|
-
var ui = require('@dhis2/ui');
|
|
7
|
-
|
|
8
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
var i18n__default = /*#__PURE__*/_interopDefault(i18n);
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import i18n from '@dhis2/d2-i18n';
|
|
4
|
+
import { SingleSelectField, SingleSelectOption } from '@dhis2/ui';
|
|
11
5
|
|
|
12
6
|
function TypeField() {
|
|
13
|
-
const { setValue } =
|
|
7
|
+
const { setValue } = useFormContext();
|
|
14
8
|
const resetFields = (type) => {
|
|
15
9
|
if (type === "bubble") {
|
|
16
10
|
setValue(`radius`, {
|
|
@@ -21,17 +15,17 @@ function TypeField() {
|
|
|
21
15
|
setValue(`radius`, void 0);
|
|
22
16
|
}
|
|
23
17
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
Controller,
|
|
26
20
|
{
|
|
27
21
|
rules: {
|
|
28
|
-
required:
|
|
22
|
+
required: i18n.t("Layer type is required")
|
|
29
23
|
},
|
|
30
24
|
render: ({ field, fieldState }) => {
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
25
|
+
return /* @__PURE__ */ jsxs(
|
|
26
|
+
SingleSelectField,
|
|
33
27
|
{
|
|
34
|
-
label:
|
|
28
|
+
label: i18n.t("Layer type"),
|
|
35
29
|
required: true,
|
|
36
30
|
error: Boolean(fieldState.error),
|
|
37
31
|
validationText: fieldState.error?.message,
|
|
@@ -41,18 +35,18 @@ function TypeField() {
|
|
|
41
35
|
},
|
|
42
36
|
selected: field.value,
|
|
43
37
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
SingleSelectOption,
|
|
46
40
|
{
|
|
47
41
|
value: "choropleth",
|
|
48
|
-
label:
|
|
42
|
+
label: i18n.t("Choropleth")
|
|
49
43
|
}
|
|
50
44
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
SingleSelectOption,
|
|
53
47
|
{
|
|
54
48
|
value: "bubble",
|
|
55
|
-
label:
|
|
49
|
+
label: i18n.t("Bubble")
|
|
56
50
|
}
|
|
57
51
|
)
|
|
58
52
|
]
|
|
@@ -64,6 +58,6 @@ function TypeField() {
|
|
|
64
58
|
);
|
|
65
59
|
}
|
|
66
60
|
|
|
67
|
-
|
|
61
|
+
export { TypeField };
|
|
68
62
|
//# sourceMappingURL=out.js.map
|
|
69
63
|
//# sourceMappingURL=TypeField.js.map
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var ThematicLayerConfiguration = require('./ThematicLayerConfiguration');
|
|
5
|
-
var types = require('./types');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.keys(ThematicLayerConfigModal).forEach(function (k) {
|
|
10
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return ThematicLayerConfigModal[k]; }
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
Object.keys(ThematicLayerConfiguration).forEach(function (k) {
|
|
16
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return ThematicLayerConfiguration[k]; }
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
Object.keys(types).forEach(function (k) {
|
|
22
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () { return types[k]; }
|
|
25
|
-
});
|
|
26
|
-
});
|
|
1
|
+
export * from './ThematicLayerConfigModal.js';
|
|
2
|
+
export * from './ThematicLayerConfiguration.js';
|
|
3
|
+
export * from './types/index.js';
|
|
27
4
|
//# sourceMappingURL=out.js.map
|
|
28
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/ThematicLayerConfiguration/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./ThematicLayerConfigModal\";\nexport * from \"./ThematicLayerConfiguration\";\nexport * from \"./types\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Map/components/ThematicLayerConfiguration/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./ThematicLayerConfigModal.js\";\nexport * from \"./ThematicLayerConfiguration.js\";\nexport * from \"./types/index.js\";\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const COLOR_PALETTES = {
|
|
4
2
|
YlGn: {
|
|
5
3
|
3: ["#f7fcb9", "#addd8e", "#31a354"],
|
|
@@ -433,7 +431,6 @@ const qualitativeColors = [
|
|
|
433
431
|
"#e31a1c"
|
|
434
432
|
];
|
|
435
433
|
|
|
436
|
-
|
|
437
|
-
exports.qualitativeColors = qualitativeColors;
|
|
434
|
+
export { COLOR_PALETTES, qualitativeColors };
|
|
438
435
|
//# sourceMappingURL=out.js.map
|
|
439
436
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
const defaultLegendSet = {
|
|
4
2
|
legends: [
|
|
5
3
|
{
|
|
@@ -20,6 +18,6 @@ const defaultLegendSet = {
|
|
|
20
18
|
]
|
|
21
19
|
};
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
export { defaultLegendSet };
|
|
24
22
|
//# sourceMappingURL=out.js.map
|
|
25
23
|
//# sourceMappingURL=legendSet.js.map
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var lodash = require('lodash');
|
|
8
|
-
var reactLeaflet = require('react-leaflet');
|
|
1
|
+
import { geoJSON } from 'leaflet';
|
|
2
|
+
import { useMemo, useEffect } from 'react';
|
|
3
|
+
import { useMapOrganisationUnit } from '../components/MapProvider/hooks/index.js';
|
|
4
|
+
import { useElementSize, useMediaQuery } from 'usehooks-ts';
|
|
5
|
+
import { isEmpty } from 'lodash';
|
|
6
|
+
import { useMap } from 'react-leaflet';
|
|
9
7
|
|
|
10
8
|
function useMapBounds() {
|
|
11
|
-
const { orgUnits } =
|
|
12
|
-
const geoJSONObject =
|
|
13
|
-
() =>
|
|
9
|
+
const { orgUnits } = useMapOrganisationUnit();
|
|
10
|
+
const geoJSONObject = useMemo(
|
|
11
|
+
() => geoJSON({
|
|
14
12
|
type: "FeatureCollection",
|
|
15
13
|
features: orgUnits?.map((orgUnit) => orgUnit.geoJSON)
|
|
16
14
|
}),
|
|
17
15
|
[orgUnits]
|
|
18
16
|
);
|
|
19
|
-
const center =
|
|
17
|
+
const center = useMemo(() => {
|
|
20
18
|
return geoJSONObject.getBounds().getCenter();
|
|
21
19
|
}, [orgUnits]);
|
|
22
|
-
const bounds =
|
|
20
|
+
const bounds = useMemo(() => {
|
|
23
21
|
return geoJSONObject.getBounds();
|
|
24
22
|
}, [orgUnits]);
|
|
25
23
|
return {
|
|
@@ -28,21 +26,19 @@ function useMapBounds() {
|
|
|
28
26
|
};
|
|
29
27
|
}
|
|
30
28
|
function useCenterMap({ bounds }) {
|
|
31
|
-
const map =
|
|
32
|
-
const [ref, { width, height }] =
|
|
33
|
-
|
|
34
|
-
if (!
|
|
29
|
+
const map = useMap();
|
|
30
|
+
const [ref, { width, height }] = useElementSize();
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!isEmpty(bounds)) {
|
|
35
33
|
map.fitBounds(bounds);
|
|
36
34
|
}
|
|
37
35
|
}, [width, height]);
|
|
38
36
|
return ref;
|
|
39
37
|
}
|
|
40
38
|
function usePrintMedia() {
|
|
41
|
-
return
|
|
39
|
+
return useMediaQuery("@media print");
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
exports.useMapBounds = useMapBounds;
|
|
46
|
-
exports.usePrintMedia = usePrintMedia;
|
|
42
|
+
export { useCenterMap, useMapBounds, usePrintMedia };
|
|
47
43
|
//# sourceMappingURL=out.js.map
|
|
48
44
|
//# sourceMappingURL=map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Map/hooks/map.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Map/hooks/map.ts"],"names":[],"mappings":"AAAA,SAAS,eAA4B;AACrC,SAAS,WAAW,eAAe;AACnC,SAAS,8BAA8B;AACvC,SAAS,gBAAgB,qBAAqB;AAC9C,SAAS,eAAe;AACxB,SAAS,cAAc;AAEhB,SAAS,eAAe;AAC9B,QAAM,EAAE,SAAS,IAAI,uBAAuB;AAC5C,QAAM,gBAAgB;AAAA,IACrB,MACC,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,UAAU,UAAU,IAAI,CAAC,YAAY,QAAQ,OAAO;AAAA,IACrD,CAAQ;AAAA,IACT,CAAC,QAAQ;AAAA,EACV;AAEA,QAAM,SAAS,QAAQ,MAAM;AAC5B,WAAO,cAAc,UAAU,EAAE,UAAU;AAAA,EAC5C,GAAG,CAAC,QAAQ,CAAC;AACb,QAAM,SAAc,QAAQ,MAAM;AACjC,WAAO,cAAc,UAAU;AAAA,EAChC,GAAG,CAAC,QAAQ,CAAC;AAEb,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD;AAEO,SAAS,aAAa,EAAE,OAAO,GAA8B;AACnE,QAAM,MAAM,OAAO;AACnB,QAAM,CAAC,KAAK,EAAE,OAAO,OAAO,CAAC,IAAI,eAAe;AAEhD,YAAU,MAAM;AACf,QAAI,CAAC,QAAQ,MAAM,GAAG;AACrB,UAAI,UAAU,MAAM;AAAA,IACrB;AAAA,EACD,GAAG,CAAC,OAAO,MAAM,CAAC;AAElB,SAAO;AACR;AAEO,SAAS,gBAAgB;AAC/B,SAAO,cAAc,cAAc;AACpC","sourcesContent":["import { geoJSON, LatLngTuple } from \"leaflet\";\nimport { useEffect, useMemo } from \"react\";\nimport { useMapOrganisationUnit } from \"../components/MapProvider/hooks/index.js\";\nimport { useElementSize, useMediaQuery } from \"usehooks-ts\";\nimport { isEmpty } from \"lodash\";\nimport { useMap } from \"react-leaflet\";\n\nexport function useMapBounds() {\n\tconst { orgUnits } = useMapOrganisationUnit();\n\tconst geoJSONObject = useMemo(\n\t\t() =>\n\t\t\tgeoJSON({\n\t\t\t\ttype: \"FeatureCollection\",\n\t\t\t\tfeatures: orgUnits?.map((orgUnit) => orgUnit.geoJSON),\n\t\t\t} as any),\n\t\t[orgUnits],\n\t);\n\n\tconst center = useMemo(() => {\n\t\treturn geoJSONObject.getBounds().getCenter();\n\t}, [orgUnits]);\n\tconst bounds: any = useMemo(() => {\n\t\treturn geoJSONObject.getBounds();\n\t}, [orgUnits]);\n\n\treturn {\n\t\tcenter,\n\t\tbounds,\n\t};\n}\n\nexport function useCenterMap({ bounds }: { bounds: LatLngTuple[] }) {\n\tconst map = useMap();\n\tconst [ref, { width, height }] = useElementSize();\n\n\tuseEffect(() => {\n\t\tif (!isEmpty(bounds)) {\n\t\t\tmap.fitBounds(bounds);\n\t\t}\n\t}, [width, height]);\n\n\treturn ref;\n}\n\nexport function usePrintMedia() {\n\treturn useMediaQuery(\"@media print\");\n}\n"]}
|
|
@@ -1,42 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var ThematicLayerConfiguration = require('./components/ThematicLayerConfiguration/ThematicLayerConfiguration');
|
|
7
|
-
var colors = require('./constants/colors');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.keys(DHIS2Map).forEach(function (k) {
|
|
12
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return DHIS2Map[k]; }
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
Object.keys(interfaces).forEach(function (k) {
|
|
18
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return interfaces[k]; }
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
Object.keys(EarthEngineLayerConfiguration).forEach(function (k) {
|
|
24
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () { return EarthEngineLayerConfiguration[k]; }
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
Object.keys(ThematicLayerConfiguration).forEach(function (k) {
|
|
30
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () { return ThematicLayerConfiguration[k]; }
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
Object.keys(colors).forEach(function (k) {
|
|
36
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () { return colors[k]; }
|
|
39
|
-
});
|
|
40
|
-
});
|
|
1
|
+
export * from './DHIS2Map.js';
|
|
2
|
+
export * from './interfaces/index.js';
|
|
3
|
+
export * from './components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js';
|
|
4
|
+
export * from './components/ThematicLayerConfiguration/ThematicLayerConfiguration.js';
|
|
5
|
+
export * from './constants/colors.js';
|
|
41
6
|
//# sourceMappingURL=out.js.map
|
|
42
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Map/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./DHIS2Map\";\nexport * from \"./interfaces\";\nexport * from \"./components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration\";\nexport * from \"./components/ThematicLayerConfiguration/ThematicLayerConfiguration\";\nexport * from \"./constants/colors\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Map/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./DHIS2Map.js\";\nexport * from \"./interfaces/index.js\";\nexport * from \"./components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js\";\nexport * from \"./components/ThematicLayerConfiguration/ThematicLayerConfiguration.js\";\nexport * from \"./constants/colors.js\";\n"]}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { createContext } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const MapOrgUnitContext = react.createContext({
|
|
3
|
+
const MapOrgUnitContext = createContext({
|
|
6
4
|
orgUnitSelection: { orgUnits: [] },
|
|
7
5
|
orgUnits: []
|
|
8
6
|
});
|
|
9
|
-
const MapPeriodContext =
|
|
7
|
+
const MapPeriodContext = createContext({
|
|
10
8
|
periods: []
|
|
11
9
|
});
|
|
12
|
-
const MapLayersContext =
|
|
10
|
+
const MapLayersContext = createContext({
|
|
13
11
|
layers: [],
|
|
14
12
|
updateLayer: () => {
|
|
15
13
|
}
|
|
16
14
|
});
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
exports.MapOrgUnitContext = MapOrgUnitContext;
|
|
20
|
-
exports.MapPeriodContext = MapPeriodContext;
|
|
16
|
+
export { MapLayersContext, MapOrgUnitContext, MapPeriodContext };
|
|
21
17
|
//# sourceMappingURL=out.js.map
|
|
22
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Map/state/index.tsx"],"names":[],"mappings":"AAEA,SAAS,qBAAqB;AAIvB,MAAM,oBAAoB,cAG9B;AAAA,EACF,kBAAkB,EAAE,UAAU,CAAC,EAAE;AAAA,EACjC,UAAU,CAAC;AACZ,CAAC;AAEM,MAAM,mBAAmB,cAM9B;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Map/state/index.tsx"],"names":[],"mappings":"AAEA,SAAS,qBAAqB;AAIvB,MAAM,oBAAoB,cAG9B;AAAA,EACF,kBAAkB,EAAE,UAAU,CAAC,EAAE;AAAA,EACjC,UAAU,CAAC;AACZ,CAAC;AAEM,MAAM,mBAAmB,cAM9B;AAAA,EACD,SAAS,CAAC;AACX,CAAC;AAEM,MAAM,mBAAmB,cAG7B;AAAA,EACF,QAAQ,CAAC;AAAA,EACT,aAAa,MAAM;AAAA,EAAC;AACrB,CAAC","sourcesContent":["import type { OrgUnitSelection } from \"@hisptz/dhis2-utils\";\nimport { BasePeriod } from \"@hisptz/dhis2-utils\";\nimport { createContext } from \"react\";\nimport { CustomMapLayer } from \"../components/MapLayer/interfaces/index.js\";\nimport { MapOrgUnit } from \"../interfaces/index.js\";\n\nexport const MapOrgUnitContext = createContext<{\n\torgUnitSelection: OrgUnitSelection;\n\torgUnits?: MapOrgUnit[];\n}>({\n\torgUnitSelection: { orgUnits: [] },\n\torgUnits: [],\n});\n\nexport const MapPeriodContext = createContext<\n\t| {\n\t\t\tperiods?: BasePeriod[];\n\t\t\trange?: { start: Date; end: Date };\n\t }\n\t| undefined\n>({\n\tperiods: [],\n});\n\nexport const MapLayersContext = createContext<{\n\tlayers: CustomMapLayer[];\n\tupdateLayer: (id: string, updatedLayer: CustomMapLayer) => void;\n}>({\n\tlayers: [],\n\tupdateLayer: () => {},\n});\n"]}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { hcl } from 'd3-color';
|
|
2
|
+
import { isString } from 'lodash';
|
|
3
|
+
import { COLOR_PALETTES } from '../constants/colors.js';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
var lodash = require('lodash');
|
|
5
|
-
var colors = require('../constants/colors');
|
|
6
|
-
|
|
7
|
-
const colorbrewer = colors.COLOR_PALETTES;
|
|
5
|
+
const colorbrewer = COLOR_PALETTES;
|
|
8
6
|
const getColorPalette = (scale, classes) => {
|
|
9
7
|
return colorbrewer?.[scale]?.[classes];
|
|
10
8
|
};
|
|
@@ -13,13 +11,18 @@ const getColorClasses = (palette) => {
|
|
|
13
11
|
};
|
|
14
12
|
const getColorScale = (palette) => {
|
|
15
13
|
const classes = palette.split(",").length;
|
|
16
|
-
return colorScales.find(
|
|
14
|
+
return colorScales.find(
|
|
15
|
+
(name) => colorbrewer[name][classes]?.join(",") === palette
|
|
16
|
+
);
|
|
17
17
|
};
|
|
18
18
|
const defaultColorScaleName = "YlOrBr";
|
|
19
19
|
const defaultClasses = 5;
|
|
20
|
-
const defaultColorScale = getColorPalette(
|
|
20
|
+
const defaultColorScale = getColorPalette(
|
|
21
|
+
defaultColorScaleName,
|
|
22
|
+
defaultClasses
|
|
23
|
+
);
|
|
21
24
|
const cssColor = (color) => {
|
|
22
|
-
if (!
|
|
25
|
+
if (!isString(color)) {
|
|
23
26
|
return color;
|
|
24
27
|
} else if (color === "##normal") {
|
|
25
28
|
return null;
|
|
@@ -29,7 +32,10 @@ const cssColor = (color) => {
|
|
|
29
32
|
const getUniqueColor = (defaultColors) => {
|
|
30
33
|
const colors = [...defaultColors];
|
|
31
34
|
function randomColor() {
|
|
32
|
-
const color = "#000000".replace(
|
|
35
|
+
const color = "#000000".replace(
|
|
36
|
+
/0/g,
|
|
37
|
+
() => (~~(Math.random() * 16)).toString(16)
|
|
38
|
+
);
|
|
33
39
|
if (colors.includes(color)) {
|
|
34
40
|
return randomColor();
|
|
35
41
|
}
|
|
@@ -38,7 +44,7 @@ const getUniqueColor = (defaultColors) => {
|
|
|
38
44
|
}
|
|
39
45
|
return (index) => colors[index] || randomColor();
|
|
40
46
|
};
|
|
41
|
-
const isDarkColor = (color) =>
|
|
47
|
+
const isDarkColor = (color) => hcl(color).l < 70;
|
|
42
48
|
const getContrastColor = (color) => isDarkColor(color) ? "#fff" : "#000";
|
|
43
49
|
const colorScales = [
|
|
44
50
|
"YlOrBr",
|
|
@@ -74,16 +80,6 @@ const colorScales = [
|
|
|
74
80
|
"Set3"
|
|
75
81
|
];
|
|
76
82
|
|
|
77
|
-
|
|
78
|
-
exports.cssColor = cssColor;
|
|
79
|
-
exports.defaultClasses = defaultClasses;
|
|
80
|
-
exports.defaultColorScale = defaultColorScale;
|
|
81
|
-
exports.defaultColorScaleName = defaultColorScaleName;
|
|
82
|
-
exports.getColorClasses = getColorClasses;
|
|
83
|
-
exports.getColorPalette = getColorPalette;
|
|
84
|
-
exports.getColorScale = getColorScale;
|
|
85
|
-
exports.getContrastColor = getContrastColor;
|
|
86
|
-
exports.getUniqueColor = getUniqueColor;
|
|
87
|
-
exports.isDarkColor = isDarkColor;
|
|
83
|
+
export { colorScales, cssColor, defaultClasses, defaultColorScale, defaultColorScaleName, getColorClasses, getColorPalette, getColorScale, getContrastColor, getUniqueColor, isDarkColor };
|
|
88
84
|
//# sourceMappingURL=out.js.map
|
|
89
85
|
//# sourceMappingURL=colors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Map/utils/colors.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,cAAmC;AAGlC,MAAM,kBAAkB,CAAC,OAAe,YAAoB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Map/utils/colors.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,MAAM,cAAmC;AAGlC,MAAM,kBAAkB,CAAC,OAAe,YAAoB;AAClE,SAAO,cAAc,KAAK,IAAI,OAAO;AACtC;AAEO,MAAM,kBAAkB,CAAC,YAAoB;AACnD,SAAO,SAAS,MAAM,GAAG,GAAG;AAC7B;AAGO,MAAM,gBAAgB,CAAC,YAAoB;AACjD,QAAM,UAAU,QAAQ,MAAM,GAAG,EAAE;AACnC,SAAO,YAAY;AAAA,IAClB,CAAC,SAAS,YAAY,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM;AAAA,EACrD;AACD;AAEO,MAAM,wBAAwB;AAC9B,MAAM,iBAAiB;AACvB,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AACD;AAGO,MAAM,WAAW,CAAC,UAAe;AACvC,MAAI,CAAC,SAAS,KAAK,GAAG;AACrB,WAAO;AAAA,EACR,WAAW,UAAU,YAAY;AAEhC,WAAO;AAAA,EACR;AACA,UAAQ,mCAAmC,KAAK,KAAK,IAAI,MAAM,MAAM;AACtE;AAGO,MAAM,iBAAiB,CAAC,kBAAuB;AACrD,QAAM,SAAS,CAAC,GAAG,aAAa;AAEhC,WAAS,cAAsB;AAC9B,UAAM,QAAQ,UAAU;AAAA,MAAQ;AAAA,MAAM,OACpC,CAAC,EAAE,KAAK,OAAO,IAAI,KAAK,SAAS,EAAE;AAAA,IACrC;AAGA,QAAI,OAAO,SAAS,KAAK,GAAG;AAC3B,aAAO,YAAY;AAAA,IACpB;AAEA,WAAO,KAAK,KAAK;AAEjB,WAAO;AAAA,EACR;AAEA,SAAO,CAAC,UAAkB,OAAO,KAAK,KAAK,YAAY;AACxD;AAGO,MAAM,cAAc,CAAC,UAAkB,IAAI,KAAK,EAAE,IAAI;AAGtD,MAAM,mBAAmB,CAAC,UAChC,YAAY,KAAK,IAAI,SAAS;AAExB,MAAM,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD","sourcesContent":["import { hcl } from \"d3-color\";\nimport { isString } from \"lodash\";\nimport { COLOR_PALETTES } from \"../constants/colors.js\";\n\nconst colorbrewer: Record<string, any> = COLOR_PALETTES;\n\n// Returns a color brewer scale for a number of classes\nexport const getColorPalette = (scale: string, classes: number) => {\n\treturn colorbrewer?.[scale]?.[classes];\n};\n\nexport const getColorClasses = (palette: string) => {\n\treturn palette?.split(\",\")?.length;\n};\n\n// Returns color scale name for a palette\nexport const getColorScale = (palette: string) => {\n\tconst classes = palette.split(\",\").length;\n\treturn colorScales.find(\n\t\t(name) => colorbrewer[name][classes]?.join(\",\") === palette,\n\t);\n};\n\nexport const defaultColorScaleName = \"YlOrBr\";\nexport const defaultClasses = 5;\nexport const defaultColorScale = getColorPalette(\n\tdefaultColorScaleName,\n\tdefaultClasses,\n);\n\n// Correct colors not adhering to the css standard (add missing #)\nexport const cssColor = (color: any) => {\n\tif (!isString(color)) {\n\t\treturn color;\n\t} else if (color === \"##normal\") {\n\t\t// ##normal is used in old map favorites\n\t\treturn null; // Will apply default color\n\t}\n\treturn (/(^[0-9A-F]{6}$)|(^[0-9A-F]{3}$)/i.test(color) ? \"#\" : \"\") + color;\n};\n\n// Returns an unique color (first from an array, then random but still unique)\nexport const getUniqueColor = (defaultColors: any) => {\n\tconst colors = [...defaultColors];\n\n\tfunction randomColor(): string {\n\t\tconst color = \"#000000\".replace(/0/g, () =>\n\t\t\t(~~(Math.random() * 16)).toString(16),\n\t\t);\n\n\t\t// Recursive until color is unique\n\t\tif (colors.includes(color)) {\n\t\t\treturn randomColor();\n\t\t}\n\n\t\tcolors.push(color);\n\n\t\treturn color;\n\t}\n\n\treturn (index: number) => colors[index] || randomColor();\n};\n\n// Returns true if a color is dark\nexport const isDarkColor = (color: string) => hcl(color).l < 70;\n\n// Returns constrasting color\nexport const getContrastColor = (color: string) =>\n\tisDarkColor(color) ? \"#fff\" : \"#000\";\nexport type LegendColorScale = (typeof colorScales)[number];\nexport const colorScales = [\n\t\"YlOrBr\",\n\t\"Reds\",\n\t\"YlGn\",\n\t\"Greens\",\n\t\"Blues\",\n\t\"BuPu\",\n\t\"RdPu\",\n\t\"PuRd\",\n\t\"Greys\",\n\t\"YlOrBr_reverse\",\n\t\"Reds_reverse\",\n\t\"YlGn_reverse\",\n\t\"Greens_reverse\",\n\t\"Blues_reverse\",\n\t\"BuPu_reverse\",\n\t\"RdPu_reverse\",\n\t\"PuRd_reverse\",\n\t\"Greys_reverse\",\n\t\"PuOr\",\n\t\"BrBG\",\n\t\"PRGn\",\n\t\"PiYG\",\n\t\"RdBu\",\n\t\"RdGy\",\n\t\"RdYlBu\",\n\t\"Spectral\",\n\t\"RdYlGn\",\n\t\"Paired\",\n\t\"Pastel1\",\n\t\"Set1\",\n\t\"Set3\",\n];\n"]}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var L = require('leaflet');
|
|
4
|
-
|
|
5
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
-
|
|
7
|
-
var L__default = /*#__PURE__*/_interopDefault(L);
|
|
1
|
+
import L from 'leaflet';
|
|
8
2
|
|
|
9
3
|
const getLongestTextLength = (array, key) => array.reduce(
|
|
10
4
|
(text, curr) => curr[key] && String(curr[key]).length > text.length ? String(curr[key]) : text,
|
|
@@ -14,13 +8,11 @@ function getIconUrl(icon, { baseUrl }) {
|
|
|
14
8
|
return `${baseUrl}/images/orgunitgroup/${icon ?? "01.png"}`;
|
|
15
9
|
}
|
|
16
10
|
function getIcon(url) {
|
|
17
|
-
return new
|
|
11
|
+
return new L.Icon({
|
|
18
12
|
iconUrl: url
|
|
19
13
|
});
|
|
20
14
|
}
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
exports.getIconUrl = getIconUrl;
|
|
24
|
-
exports.getLongestTextLength = getLongestTextLength;
|
|
16
|
+
export { getIcon, getIconUrl, getLongestTextLength };
|
|
25
17
|
//# sourceMappingURL=out.js.map
|
|
26
18
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var lodash = require('lodash');
|
|
4
|
-
var colors = require('./colors');
|
|
1
|
+
import { find, filter, isEmpty, forEach, sortBy, isString, compact } from 'lodash';
|
|
2
|
+
import { getColorPalette, defaultClasses, defaultColorScaleName } from './colors.js';
|
|
5
3
|
|
|
6
4
|
function highlightFeature(e, style) {
|
|
7
5
|
const layer = e.target;
|
|
@@ -15,12 +13,15 @@ function getColorFromLegendSet(legends, value) {
|
|
|
15
13
|
if (!value) {
|
|
16
14
|
return "";
|
|
17
15
|
}
|
|
18
|
-
const legend =
|
|
16
|
+
const legend = find(
|
|
17
|
+
legends ?? [],
|
|
18
|
+
(legend2) => legend2?.startValue <= value && legend2?.endValue >= value
|
|
19
|
+
) ?? {};
|
|
19
20
|
return legend.color ? legend.color : "transparent";
|
|
20
21
|
}
|
|
21
22
|
function getLegendCount(legend, data) {
|
|
22
23
|
const { startValue, endValue } = legend;
|
|
23
|
-
return
|
|
24
|
+
return filter(data, (d) => d.data >= startValue && d.data <= endValue).length;
|
|
24
25
|
}
|
|
25
26
|
function getOrgUnitsSelection(orgUnitSelection) {
|
|
26
27
|
const orgUnits = [];
|
|
@@ -33,10 +34,18 @@ function getOrgUnitsSelection(orgUnitSelection) {
|
|
|
33
34
|
if (orgUnitSelection.userSubX2Unit) {
|
|
34
35
|
orgUnits.push("USER_ORGUNIT_GRANDCHILDREN");
|
|
35
36
|
}
|
|
36
|
-
if (!
|
|
37
|
-
|
|
37
|
+
if (!isEmpty(orgUnitSelection.levels)) {
|
|
38
|
+
forEach(
|
|
39
|
+
orgUnitSelection.levels,
|
|
40
|
+
(level) => orgUnits.push(`LEVEL-${level}`)
|
|
41
|
+
);
|
|
38
42
|
}
|
|
39
|
-
return [
|
|
43
|
+
return [
|
|
44
|
+
...orgUnits,
|
|
45
|
+
...orgUnitSelection?.orgUnits?.map(
|
|
46
|
+
(ou) => `${ou.id}`
|
|
47
|
+
) ?? []
|
|
48
|
+
];
|
|
40
49
|
}
|
|
41
50
|
function sanitizeOrgUnits(metaData) {
|
|
42
51
|
if (metaData) {
|
|
@@ -49,7 +58,7 @@ function sanitizeOrgUnits(metaData) {
|
|
|
49
58
|
return [];
|
|
50
59
|
}
|
|
51
60
|
function toGeoJson(organisationUnits) {
|
|
52
|
-
return
|
|
61
|
+
return sortBy(organisationUnits, "le").map((ou) => {
|
|
53
62
|
try {
|
|
54
63
|
const coord = JSON.parse(ou.co);
|
|
55
64
|
let gpid = "";
|
|
@@ -61,8 +70,8 @@ function toGeoJson(organisationUnits) {
|
|
|
61
70
|
type = "MultiPolygon";
|
|
62
71
|
}
|
|
63
72
|
}
|
|
64
|
-
if (
|
|
65
|
-
const ids =
|
|
73
|
+
if (isString(ou.pg) && ou.pg.length) {
|
|
74
|
+
const ids = compact(ou.pg.split("/"));
|
|
66
75
|
if (ids.length >= 2) {
|
|
67
76
|
gpid = ids[ids.length - 2];
|
|
68
77
|
}
|
|
@@ -104,9 +113,9 @@ function sanitizeDate(startDate) {
|
|
|
104
113
|
return startDate;
|
|
105
114
|
}
|
|
106
115
|
function generateLegends(maxValue, minValue, { classesCount, colorClass }) {
|
|
107
|
-
const count = classesCount ??
|
|
108
|
-
const color = colorClass ??
|
|
109
|
-
const colorScale = [...
|
|
116
|
+
const count = classesCount ?? defaultClasses;
|
|
117
|
+
const color = colorClass ?? defaultColorScaleName;
|
|
118
|
+
const colorScale = [...getColorPalette(color, count)].reverse();
|
|
110
119
|
const maxLegendValue = 5 * Math.ceil(maxValue / 5);
|
|
111
120
|
const range = maxLegendValue / count;
|
|
112
121
|
const values = [];
|
|
@@ -124,14 +133,6 @@ function generateLegends(maxValue, minValue, { classesCount, colorClass }) {
|
|
|
124
133
|
return values.reverse();
|
|
125
134
|
}
|
|
126
135
|
|
|
127
|
-
|
|
128
|
-
exports.getColorFromLegendSet = getColorFromLegendSet;
|
|
129
|
-
exports.getLegendCount = getLegendCount;
|
|
130
|
-
exports.getOrgUnitsSelection = getOrgUnitsSelection;
|
|
131
|
-
exports.highlightFeature = highlightFeature;
|
|
132
|
-
exports.resetHighlight = resetHighlight;
|
|
133
|
-
exports.sanitizeDate = sanitizeDate;
|
|
134
|
-
exports.sanitizeOrgUnits = sanitizeOrgUnits;
|
|
135
|
-
exports.toGeoJson = toGeoJson;
|
|
136
|
+
export { generateLegends, getColorFromLegendSet, getLegendCount, getOrgUnitsSelection, highlightFeature, resetHighlight, sanitizeDate, sanitizeOrgUnits, toGeoJson };
|
|
136
137
|
//# sourceMappingURL=out.js.map
|
|
137
138
|
//# sourceMappingURL=map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Map/utils/map.ts"],"names":["legend"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Map/utils/map.ts"],"names":["legend"],"mappings":"AAMA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEA,SAAS,iBAAiB,GAAsB,OAAY;AAClE,QAAM,QAAQ,EAAE;AAChB,QAAM,SAAS,KAAK;AAErB;AAEO,SAAS,eAAe,GAAsB,cAAmB;AACvE,QAAM,QAAQ,EAAE;AAChB,QAAM,SAAS,YAAY;AAE5B;AAEO,SAAS,sBACf,SACA,OACS;AACT,MAAI,CAAC,OAAO;AACX,WAAO;AAAA,EACR;AACA,QAAM,SACL;AAAA,IACC,WAAW,CAAC;AAAA,IACZ,CAACA,YACAA,SAAQ,cAAc,SAASA,SAAQ,YAAY;AAAA,EACrD,KAAK,CAAC;AACP,SAAO,OAAO,QAAQ,OAAO,QAAQ;AACtC;AAEO,SAAS,eAAe,QAAa,MAAW;AACtD,QAAM,EAAE,YAAY,SAAS,IAAI;AACjC,SAAO,OAAO,MAAM,CAAC,MAAW,EAAE,QAAQ,cAAc,EAAE,QAAQ,QAAQ,EACxE;AACH;AAEO,SAAS,qBAAqB,kBAAoC;AACxE,QAAM,WAAW,CAAC;AAClB,MAAI,iBAAiB,aAAa;AACjC,aAAS,KAAK,cAAc;AAAA,EAC7B;AAEA,MAAI,iBAAiB,aAAa;AACjC,aAAS,KAAK,uBAAuB;AAAA,EACtC;AAEA,MAAI,iBAAiB,eAAe;AACnC,aAAS,KAAK,4BAA4B;AAAA,EAC3C;AACA,MAAI,CAAC,QAAQ,iBAAiB,MAAM,GAAG;AACtC;AAAA,MAAQ,iBAAiB;AAAA,MAAQ,CAAC,UACjC,SAAS,KAAK,SAAS,KAAK,EAAE;AAAA,IAC/B;AAAA,EACD;AAEA,SAAO;AAAA,IACN,GAAG;AAAA,IACH,GAAI,kBAAkB,UAAU;AAAA,MAC/B,CAAC,OAAyB,GAAG,GAAG,EAAE;AAAA,IACnC,KAAK,CAAC;AAAA,EACP;AACD;AAEO,SAAS,iBAAiB,UAAe;AAC/C,MAAI,UAAU;AACb,WAAO,UAAU,YAAY,IAAI,IAAI,CAAC,UAAkB;AAAA,MACvD,IAAI;AAAA,MACJ,MAAM,UAAU,MAAM,IAAI,GAAG;AAAA,MAC7B,MAAM,UAAU,cAAc,IAAI;AAAA,IACnC,EAAE;AAAA,EACH;AACA,SAAO,CAAC;AACT;AAEO,SAAS,UAAU,mBAAwB;AACjD,SAAO,OAAO,mBAAmB,IAAI,EAAE,IAAI,CAAC,OAAY;AACvD,QAAI;AACH,YAAM,QAAQ,KAAK,MAAM,GAAG,EAAE;AAC9B,UAAI,OAAO;AACX,UAAI,OAAO;AACX,UAAI,OAAO;AAEX,UAAI,GAAG,OAAO,GAAG;AAChB,eAAO;AACP,YAAI,GAAG,GAAG,UAAU,GAAG,CAAC,MAAM,QAAQ;AACrC,iBAAO;AAAA,QACR;AAAA,MACD;AAGA,UAAI,SAAS,GAAG,EAAE,KAAK,GAAG,GAAG,QAAQ;AACpC,cAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,GAAG,CAAC;AAGpC,YAAI,IAAI,UAAU,GAAG;AACpB,iBAAO,IAAI,IAAI,SAAS,CAAC;AAAA,QAC1B;AAGA,YAAI,IAAI,SAAS,GAAG;AACnB,iBAAO,MAAM,IAAI,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,KAAK,GAAG;AAAA,QACnD;AAAA,MACD;AAEA,aAAO;AAAA,QACN,MAAM;AAAA,QACN,IAAI,GAAG;AAAA,QACP,UAAU;AAAA,UACT;AAAA,UACA,aAAa;AAAA,QACd;AAAA,QACA,YAAY;AAAA,UACX;AAAA,UACA,IAAI,GAAG;AAAA,UACP,MAAM,GAAG;AAAA,UACT,oBAAoB,GAAG;AAAA,UACvB,kBAAkB,GAAG;AAAA,UACrB,OAAO,GAAG;AAAA,UACV,wBAAwB;AAAA,UACxB,eAAe;AAAA,UACf,aAAa,GAAG;AAAA,UAChB,UAAU,GAAG;AAAA,UACb,YAAY,GAAG;AAAA,UACf,YAAY,GAAG;AAAA,QAChB;AAAA,MACD;AAAA,IACD,SAAS,GAAG;AACX,aAAO,CAAC;AAAA,IACT;AAAA,EACD,CAAC;AACF;AAEO,SAAS,aAAa,WAA2B;AACvD,MAAI,WAAW,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG;AAC3C,WAAO,WAAW,MAAM,GAAG,GAAG,QAAQ,GAAG,KAAK,GAAG;AAAA,EAClD;AACA,SAAO;AACR;AAEO,SAAS,gBACf,UACA,UACA,EAAE,cAAc,WAAW,GACX;AAChB,QAAM,QAAgB,gBAAgB;AACtC,QAAM,QAAQ,cAAc;AAE5B,QAAM,aAAa,CAAC,GAAG,gBAAgB,OAAO,KAAK,CAAC,EAAE,QAAQ;AAE9D,QAAM,iBAAiB,IAAI,KAAK,KAAK,WAAW,CAAC;AACjD,QAAM,QAAQ,iBAAiB;AAE/B,QAAM,SAAS,CAAC;AAChB,MAAI,uBAAuB,WAAW,SAAS;AAC/C,WAAS,IAAI,GAAG,IAAI,gBAAgB,KAAK,OAAO;AAC/C,UAAM,KAAK,WAAW,oBAAoB;AAC1C,WAAO,KAAK;AAAA,MACX,YAAY,KAAK,MAAM,CAAC;AAAA,MACxB,UAAU,KAAK,MAAM,IAAI,KAAK;AAAA,MAC9B;AAAA,MACA,OAAO;AAAA,IACR,CAAC;AACD;AAAA,EACD;AAEA,SAAO,OAAO,QAAQ;AACvB","sourcesContent":["import type {\n\tLegend,\n\tOrganisationUnit,\n\tOrgUnitSelection,\n} from \"@hisptz/dhis2-utils\";\nimport { LeafletMouseEvent } from \"leaflet\";\nimport {\n\tcompact,\n\tfilter,\n\tfind,\n\tforEach,\n\tisEmpty,\n\tisString,\n\tsortBy,\n} from \"lodash\";\nimport {\n\tdefaultClasses,\n\tdefaultColorScaleName,\n\tgetColorPalette,\n} from \"./colors.js\";\n\nexport function highlightFeature(e: LeafletMouseEvent, style: any) {\n\tconst layer = e.target;\n\tlayer.setStyle(style);\n\t// layer.bringToFront();\n}\n\nexport function resetHighlight(e: LeafletMouseEvent, defaultStyle: any) {\n\tconst layer = e.target;\n\tlayer.setStyle(defaultStyle);\n\t// layer.bringToBack();\n}\n\nexport function getColorFromLegendSet(\n\tlegends: Legend[],\n\tvalue?: number,\n): string {\n\tif (!value) {\n\t\treturn \"\";\n\t}\n\tconst legend: any =\n\t\tfind(\n\t\t\tlegends ?? [],\n\t\t\t(legend: any) =>\n\t\t\t\tlegend?.startValue <= value && legend?.endValue >= value,\n\t\t) ?? {};\n\treturn legend.color ? legend.color : \"transparent\";\n}\n\nexport function getLegendCount(legend: any, data: any) {\n\tconst { startValue, endValue } = legend;\n\treturn filter(data, (d: any) => d.data >= startValue && d.data <= endValue)\n\t\t.length;\n}\n\nexport function getOrgUnitsSelection(orgUnitSelection: OrgUnitSelection) {\n\tconst orgUnits = [];\n\tif (orgUnitSelection.userOrgUnit) {\n\t\torgUnits.push(\"USER_ORGUNIT\");\n\t}\n\n\tif (orgUnitSelection.userSubUnit) {\n\t\torgUnits.push(\"USER_ORGUNIT_CHILDREN\");\n\t}\n\n\tif (orgUnitSelection.userSubX2Unit) {\n\t\torgUnits.push(\"USER_ORGUNIT_GRANDCHILDREN\");\n\t}\n\tif (!isEmpty(orgUnitSelection.levels)) {\n\t\tforEach(orgUnitSelection.levels, (level) =>\n\t\t\torgUnits.push(`LEVEL-${level}`),\n\t\t);\n\t}\n\n\treturn [\n\t\t...orgUnits,\n\t\t...(orgUnitSelection?.orgUnits?.map(\n\t\t\t(ou: OrganisationUnit) => `${ou.id}`,\n\t\t) ?? []),\n\t];\n}\n\nexport function sanitizeOrgUnits(metaData: any) {\n\tif (metaData) {\n\t\treturn metaData?.dimensions?.ou?.map((ouId: string) => ({\n\t\t\tid: ouId,\n\t\t\tname: metaData?.items[ouId]?.name,\n\t\t\tpath: metaData?.ouHierarchy?.[ouId],\n\t\t}));\n\t}\n\treturn [];\n}\n\nexport function toGeoJson(organisationUnits: any) {\n\treturn sortBy(organisationUnits, \"le\").map((ou: any) => {\n\t\ttry {\n\t\t\tconst coord = JSON.parse(ou.co);\n\t\t\tlet gpid = \"\";\n\t\t\tlet gppg = \"\";\n\t\t\tlet type = \"Point\";\n\n\t\t\tif (ou.ty === 2) {\n\t\t\t\ttype = \"Polygon\";\n\t\t\t\tif (ou.co.substring(0, 4) === \"[[[[\") {\n\t\t\t\t\ttype = \"MultiPolygon\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Grand parent\n\t\t\tif (isString(ou.pg) && ou.pg.length) {\n\t\t\t\tconst ids = compact(ou.pg.split(\"/\"));\n\n\t\t\t\t// Grand parent id\n\t\t\t\tif (ids.length >= 2) {\n\t\t\t\t\tgpid = ids[ids.length - 2] as string;\n\t\t\t\t}\n\n\t\t\t\t// Grand parent parent graph\n\t\t\t\tif (ids.length > 2) {\n\t\t\t\t\tgppg = \"/\" + ids.slice(0, ids.length - 2).join(\"/\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttype: \"Feature\",\n\t\t\t\tid: ou.id,\n\t\t\t\tgeometry: {\n\t\t\t\t\ttype,\n\t\t\t\t\tcoordinates: coord,\n\t\t\t\t},\n\t\t\t\tproperties: {\n\t\t\t\t\ttype,\n\t\t\t\t\tid: ou.id,\n\t\t\t\t\tname: ou.na,\n\t\t\t\t\thasCoordinatesDown: ou.hcd,\n\t\t\t\t\thasCoordinatesUp: ou.hcu,\n\t\t\t\t\tlevel: ou.le,\n\t\t\t\t\tgrandParentParentGraph: gppg,\n\t\t\t\t\tgrandParentId: gpid,\n\t\t\t\t\tparentGraph: ou.pg,\n\t\t\t\t\tparentId: ou.pi,\n\t\t\t\t\tparentName: ou.pn,\n\t\t\t\t\tdimensions: ou.dimensions,\n\t\t\t\t},\n\t\t\t};\n\t\t} catch (e) {\n\t\t\treturn {};\n\t\t}\n\t});\n}\n\nexport function sanitizeDate(startDate: string): string {\n\tif (startDate?.split(\"-\")?.[0]?.length < 4) {\n\t\treturn startDate?.split(\"-\")?.reverse()?.join(\"-\");\n\t}\n\treturn startDate;\n}\n\nexport function generateLegends(\n\tmaxValue: number,\n\tminValue: number,\n\t{ classesCount, colorClass }: { classesCount: number; colorClass: string },\n): Array<Legend> {\n\tconst count: number = classesCount ?? defaultClasses;\n\tconst color = colorClass ?? defaultColorScaleName;\n\n\tconst colorScale = [...getColorPalette(color, count)].reverse();\n\n\tconst maxLegendValue = 5 * Math.ceil(maxValue / 5);\n\tconst range = maxLegendValue / count;\n\n\tconst values = [];\n\tlet legendColorsIterator = colorScale.length - 1;\n\tfor (let i = 0; i < maxLegendValue; i += range) {\n\t\tconst id = colorScale[legendColorsIterator];\n\t\tvalues.push({\n\t\t\tstartValue: Math.floor(i),\n\t\t\tendValue: Math.floor(i + range),\n\t\t\tid,\n\t\t\tcolor: id,\n\t\t});\n\t\tlegendColorsIterator--;\n\t}\n\n\treturn values.reverse();\n}\n"]}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var SingleValueVisualizer = require('./SingleValueVisualizer');
|
|
1
|
+
import { SingleValueVisualizer } from './SingleValueVisualizer';
|
|
6
2
|
|
|
7
3
|
const meta = {
|
|
8
4
|
title: "Single Value Visualizer",
|
|
9
|
-
component: SingleValueVisualizer
|
|
5
|
+
component: SingleValueVisualizer
|
|
10
6
|
};
|
|
11
7
|
var SingleValueContainer_stories_default = meta;
|
|
12
8
|
const Default = {
|
|
@@ -144,10 +140,6 @@ SingleValuesWithDecimalPlaces.args = {
|
|
|
144
140
|
]
|
|
145
141
|
};
|
|
146
142
|
|
|
147
|
-
|
|
148
|
-
exports.AnimatedSingleValue = AnimatedSingleValue;
|
|
149
|
-
exports.Default = Default;
|
|
150
|
-
exports.SingleValuesWithDecimalPlaces = SingleValuesWithDecimalPlaces;
|
|
151
|
-
exports.default = SingleValueContainer_stories_default;
|
|
143
|
+
export { AnimatedAllValues, AnimatedSingleValue, Default, SingleValuesWithDecimalPlaces, SingleValueContainer_stories_default as default };
|
|
152
144
|
//# sourceMappingURL=out.js.map
|
|
153
145
|
//# sourceMappingURL=SingleValueContainer.stories.js.map
|