@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,95 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useDataQuery } from '@dhis2/app-runtime';
|
|
3
|
-
import i18n from '@dhis2/d2-i18n';
|
|
4
|
-
import { Center, CircularLoader } from '@dhis2/ui';
|
|
5
|
-
import { compact, isEmpty } from 'lodash';
|
|
6
|
-
import { useState, useEffect } from 'react';
|
|
7
|
-
import { MapOrgUnitContext, MapPeriodContext } from '../../state';
|
|
8
|
-
import { getOrgUnitsSelection, sanitizeOrgUnits, toGeoJson } from '../../utils/map';
|
|
9
|
-
import { PeriodUtility } from '@hisptz/dhis2-utils';
|
|
10
|
-
|
|
11
|
-
const boundaryQuery = {
|
|
12
|
-
boundaries: {
|
|
13
|
-
resource: "geoFeatures",
|
|
14
|
-
params: ({ orgUnitIds }) => ({
|
|
15
|
-
ou: `ou:${orgUnitIds?.join(";")}`
|
|
16
|
-
})
|
|
17
|
-
},
|
|
18
|
-
analytics: {
|
|
19
|
-
resource: "analytics",
|
|
20
|
-
params: ({ orgUnitIds }) => ({
|
|
21
|
-
dimension: [
|
|
22
|
-
`ou:${orgUnitIds.join(";")}`,
|
|
23
|
-
`pe:${(/* @__PURE__ */ new Date()).getFullYear()}`
|
|
24
|
-
],
|
|
25
|
-
skipData: true,
|
|
26
|
-
hierarchyMeta: true
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
function MapProvider({
|
|
31
|
-
children,
|
|
32
|
-
orgUnitSelection,
|
|
33
|
-
periodSelection
|
|
34
|
-
}) {
|
|
35
|
-
const [orgUnits, setOrgUnits] = useState([]);
|
|
36
|
-
const { refetch, loading, error } = useDataQuery(boundaryQuery, {
|
|
37
|
-
lazy: true
|
|
38
|
-
});
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
async function getOrgUnits() {
|
|
41
|
-
const rawOrgUnitIds = getOrgUnitsSelection(orgUnitSelection);
|
|
42
|
-
const data = await refetch({ orgUnitIds: rawOrgUnitIds });
|
|
43
|
-
const { analytics, boundaries } = data ?? {};
|
|
44
|
-
const rawOrgUnits = sanitizeOrgUnits(analytics?.metaData);
|
|
45
|
-
const geoJSONObjects = toGeoJson(
|
|
46
|
-
boundaries.filter((bound) => bound.co)
|
|
47
|
-
);
|
|
48
|
-
const orgUnits2 = compact(
|
|
49
|
-
rawOrgUnits.map((orgUnit) => {
|
|
50
|
-
const geoJSONObject = geoJSONObjects?.find(
|
|
51
|
-
(geoJSON) => geoJSON.properties.id === orgUnit.id
|
|
52
|
-
);
|
|
53
|
-
if (!geoJSONObject) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
...orgUnit,
|
|
58
|
-
geoJSON: geoJSONObject,
|
|
59
|
-
bounds: [],
|
|
60
|
-
level: geoJSONObject.properties.level
|
|
61
|
-
};
|
|
62
|
-
})
|
|
63
|
-
);
|
|
64
|
-
setOrgUnits(orgUnits2);
|
|
65
|
-
}
|
|
66
|
-
getOrgUnits().catch((error2) => console.log(error2));
|
|
67
|
-
}, [orgUnitSelection, refetch]);
|
|
68
|
-
if (loading) {
|
|
69
|
-
return /* @__PURE__ */ jsx("div", { style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsx(Center, { children: /* @__PURE__ */ jsx(CircularLoader, { small: true }) }) });
|
|
70
|
-
}
|
|
71
|
-
if (error) {
|
|
72
|
-
return /* @__PURE__ */ jsx("div", { style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsx(Center, { children: /* @__PURE__ */ jsxs("h4", { children: [
|
|
73
|
-
i18n.t("Error"),
|
|
74
|
-
": ",
|
|
75
|
-
error.message
|
|
76
|
-
] }) }) });
|
|
77
|
-
}
|
|
78
|
-
const periods = compact(
|
|
79
|
-
periodSelection?.periods?.map((pe) => PeriodUtility.getPeriodById(pe))
|
|
80
|
-
);
|
|
81
|
-
if (!isEmpty(orgUnits)) {
|
|
82
|
-
return /* @__PURE__ */ jsx(MapOrgUnitContext.Provider, { value: { orgUnitSelection, orgUnits }, children: /* @__PURE__ */ jsx(
|
|
83
|
-
MapPeriodContext.Provider,
|
|
84
|
-
{
|
|
85
|
-
value: { ...periodSelection, periods },
|
|
86
|
-
children
|
|
87
|
-
}
|
|
88
|
-
) });
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { MapProvider };
|
|
94
|
-
//# sourceMappingURL=out.js.map
|
|
95
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/MapProvider/index.tsx"],"names":["orgUnits","error"],"mappings":"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","sourcesContent":["import { useDataQuery } from \"@dhis2/app-runtime\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { Center, CircularLoader } from \"@dhis2/ui\";\nimport { compact, isEmpty } from \"lodash\";\nimport React, { useEffect, useState } from \"react\";\nimport { MapOrgUnit, MapProviderProps } from \"../../interfaces\";\nimport { MapOrgUnitContext, MapPeriodContext } from \"../../state\";\nimport {\n\tgetOrgUnitsSelection,\n\tsanitizeOrgUnits,\n\ttoGeoJson,\n} from \"../../utils/map\";\nimport { BasePeriod, PeriodUtility } from \"@hisptz/dhis2-utils\";\n\nconst boundaryQuery = {\n\tboundaries: {\n\t\tresource: \"geoFeatures\",\n\t\tparams: ({ orgUnitIds }: any) => ({\n\t\t\tou: `ou:${orgUnitIds?.join(\";\")}`,\n\t\t}),\n\t},\n\tanalytics: {\n\t\tresource: \"analytics\",\n\t\tparams: ({ orgUnitIds }: any) => ({\n\t\t\tdimension: [\n\t\t\t\t`ou:${orgUnitIds.join(\";\")}`,\n\t\t\t\t`pe:${new Date().getFullYear()}`,\n\t\t\t],\n\t\t\tskipData: true,\n\t\t\thierarchyMeta: true,\n\t\t}),\n\t},\n};\n\nexport function MapProvider({\n\tchildren,\n\torgUnitSelection,\n\tperiodSelection,\n}: MapProviderProps) {\n\tconst [orgUnits, setOrgUnits] = useState<MapOrgUnit[]>([]);\n\tconst { refetch, loading, error } = useDataQuery(boundaryQuery, {\n\t\tlazy: true,\n\t});\n\n\tuseEffect(() => {\n\t\tasync function getOrgUnits() {\n\t\t\tconst rawOrgUnitIds = getOrgUnitsSelection(orgUnitSelection);\n\t\t\tconst data = await refetch({ orgUnitIds: rawOrgUnitIds });\n\t\t\tconst { analytics, boundaries } = (data as any) ?? {};\n\t\t\tconst rawOrgUnits = sanitizeOrgUnits(analytics?.metaData);\n\t\t\tconst geoJSONObjects = toGeoJson(\n\t\t\t\tboundaries.filter((bound: any) => bound.co),\n\t\t\t);\n\t\t\tconst orgUnits: MapOrgUnit[] = compact(\n\t\t\t\trawOrgUnits.map((orgUnit: any) => {\n\t\t\t\t\tconst geoJSONObject: any = geoJSONObjects?.find(\n\t\t\t\t\t\t(geoJSON: any) => geoJSON.properties.id === orgUnit.id,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (!geoJSONObject) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...orgUnit,\n\t\t\t\t\t\tgeoJSON: geoJSONObject,\n\t\t\t\t\t\tbounds: [],\n\t\t\t\t\t\tlevel: geoJSONObject.properties.level,\n\t\t\t\t\t};\n\t\t\t\t}),\n\t\t\t);\n\t\t\tsetOrgUnits(orgUnits);\n\t\t}\n\n\t\tgetOrgUnits().catch((error) => console.log(error));\n\t}, [orgUnitSelection, refetch]);\n\n\tif (loading) {\n\t\treturn (\n\t\t\t<div style={{ height: \"100%\", width: \"100%\" }}>\n\t\t\t\t<Center>\n\t\t\t\t\t<CircularLoader small />\n\t\t\t\t</Center>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div style={{ height: \"100%\", width: \"100%\" }}>\n\t\t\t\t<Center>\n\t\t\t\t\t<h4>\n\t\t\t\t\t\t{i18n.t(\"Error\")}: {error.message}\n\t\t\t\t\t</h4>\n\t\t\t\t</Center>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst periods: BasePeriod[] = compact(\n\t\tperiodSelection?.periods?.map((pe) => PeriodUtility.getPeriodById(pe)),\n\t);\n\n\tif (!isEmpty(orgUnits)) {\n\t\treturn (\n\t\t\t<MapOrgUnitContext.Provider value={{ orgUnitSelection, orgUnits }}>\n\t\t\t\t<MapPeriodContext.Provider\n\t\t\t\t\tvalue={{ ...periodSelection, periods }}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</MapPeriodContext.Provider>\n\t\t\t</MapOrgUnitContext.Provider>\n\t\t);\n\t}\n\n\treturn null;\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useCenterMap } from '../../hooks/map';
|
|
3
|
-
|
|
4
|
-
function MapUpdater({ bounds }) {
|
|
5
|
-
const ref = useCenterMap({ bounds });
|
|
6
|
-
return /* @__PURE__ */ jsx("div", { style: { width: "100%", height: "100%" }, ref });
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { MapUpdater as default };
|
|
10
|
-
//# sourceMappingURL=out.js.map
|
|
11
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/MapUpdater/index.tsx"],"names":[],"mappings":"AAMQ;AANR,SAAS,oBAAoB;AAId,SAAR,WAA4B,EAAE,OAAO,GAA8B;AACzE,QAAM,MAAM,aAAa,EAAE,OAAO,CAAC;AACnC,SAAO,oBAAC,SAAI,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GAAG,KAAU;AACjE","sourcesContent":["import { useCenterMap } from \"../../hooks/map\";\nimport React from \"react\";\nimport { LatLngTuple } from \"leaflet\";\n\nexport default function MapUpdater({ bounds }: { bounds: LatLngTuple[] }) {\n\tconst ref = useCenterMap({ bounds });\n\treturn <div style={{ width: \"100%\", height: \"100%\" }} ref={ref}></div>;\n}\n"]}
|
package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useForm } from 'react-hook-form';
|
|
3
|
-
import { Modal, ModalTitle, ModalContent, ModalActions, ButtonStrip, Button } from '@dhis2/ui';
|
|
4
|
-
import i18n from '@dhis2/d2-i18n';
|
|
5
|
-
import { ThematicLayerConfiguration } from './ThematicLayerConfiguration';
|
|
6
|
-
|
|
7
|
-
function ThematicLayerConfigModal({
|
|
8
|
-
open,
|
|
9
|
-
exclude,
|
|
10
|
-
config,
|
|
11
|
-
onClose,
|
|
12
|
-
onChange,
|
|
13
|
-
...props
|
|
14
|
-
}) {
|
|
15
|
-
const form = useForm({
|
|
16
|
-
defaultValues: config
|
|
17
|
-
});
|
|
18
|
-
const onSubmitClick = (values) => {
|
|
19
|
-
onChange(values);
|
|
20
|
-
onClose();
|
|
21
|
-
};
|
|
22
|
-
return /* @__PURE__ */ jsxs(Modal, { ...props, hide: !open, onClose, children: [
|
|
23
|
-
/* @__PURE__ */ jsx(ModalTitle, { children: i18n.t("Configure Thematic Layer") }),
|
|
24
|
-
/* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsx(ThematicLayerConfiguration, { form, exclude }) }),
|
|
25
|
-
/* @__PURE__ */ jsx(ModalActions, { children: /* @__PURE__ */ jsxs(ButtonStrip, { children: [
|
|
26
|
-
/* @__PURE__ */ jsx(Button, { onClick: onClose, children: i18n.t("Cancel") }),
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
28
|
-
Button,
|
|
29
|
-
{
|
|
30
|
-
primary: true,
|
|
31
|
-
onClick: () => form.handleSubmit(onSubmitClick)(),
|
|
32
|
-
children: i18n.t("Save")
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
] }) })
|
|
36
|
-
] });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { ThematicLayerConfigModal };
|
|
40
|
-
//# sourceMappingURL=out.js.map
|
|
41
|
-
//# sourceMappingURL=ThematicLayerConfigModal.mjs.map
|
package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.tsx"],"names":[],"mappings":"AAkCG,cAKC,YALD;AAjCH,SAAS,eAAe;AAExB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,UAAU;AAEjB,SAAS,kCAAkC;AAEpC,SAAS,yBAAyB;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAkC;AACjC,QAAM,OAAO,QAA6B;AAAA,IACzC,eAAe;AAAA,EAChB,CAAC;AAED,QAAM,gBAAgB,CAAC,WAAgC;AACtD,aAAS,MAAM;AACf,YAAQ;AAAA,EACT;AAEA,SACC,qBAAC,SAAO,GAAG,OAAO,MAAM,CAAC,MAAM,SAC9B;AAAA,wBAAC,cAAY,eAAK,EAAE,0BAA0B,GAAE;AAAA,IAChD,oBAAC,gBACA,8BAAC,8BAA2B,MAAY,SAAkB,GAC3D;AAAA,IACA,oBAAC,gBACA,+BAAC,eACA;AAAA,0BAAC,UAAO,SAAS,SAAU,eAAK,EAAE,QAAQ,GAAE;AAAA,MAC5C;AAAA,QAAC;AAAA;AAAA,UACA,SAAO;AAAA,UACP,SAAS,MAAM,KAAK,aAAa,aAAa,EAAE;AAAA,UAE/C,eAAK,EAAE,MAAM;AAAA;AAAA,MACf;AAAA,OACD,GACD;AAAA,KACD;AAEF","sourcesContent":["import { ThematicLayerConfigModalProps } from \"./types\";\nimport { useForm } from \"react-hook-form\";\nimport { ThematicLayerConfig } from \"../MapLayer/interfaces\";\nimport {\n\tButton,\n\tButtonStrip,\n\tModal,\n\tModalActions,\n\tModalContent,\n\tModalTitle,\n} from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport React from \"react\";\nimport { ThematicLayerConfiguration } from \"./ThematicLayerConfiguration\";\n\nexport function ThematicLayerConfigModal({\n\topen,\n\texclude,\n\tconfig,\n\tonClose,\n\tonChange,\n\t...props\n}: ThematicLayerConfigModalProps) {\n\tconst form = useForm<ThematicLayerConfig>({\n\t\tdefaultValues: config,\n\t});\n\n\tconst onSubmitClick = (values: ThematicLayerConfig) => {\n\t\tonChange(values);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<Modal {...props} hide={!open} onClose={onClose}>\n\t\t\t<ModalTitle>{i18n.t(\"Configure Thematic Layer\")}</ModalTitle>\n\t\t\t<ModalContent>\n\t\t\t\t<ThematicLayerConfiguration form={form} exclude={exclude} />\n\t\t\t</ModalContent>\n\t\t\t<ModalActions>\n\t\t\t\t<ButtonStrip>\n\t\t\t\t\t<Button onClick={onClose}>{i18n.t(\"Cancel\")}</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tprimary\n\t\t\t\t\t\tonClick={() => form.handleSubmit(onSubmitClick)()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{i18n.t(\"Save\")}\n\t\t\t\t\t</Button>\n\t\t\t\t</ButtonStrip>\n\t\t\t</ModalActions>\n\t\t</Modal>\n\t);\n}\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { ThematicLayerConfigModal } from './ThematicLayerConfigModal';
|
|
3
|
-
|
|
4
|
-
const Default = {};
|
|
5
|
-
Default.args = {
|
|
6
|
-
onChange: console.info,
|
|
7
|
-
onClose: () => {
|
|
8
|
-
},
|
|
9
|
-
open: true
|
|
10
|
-
};
|
|
11
|
-
const meta = {
|
|
12
|
-
title: "DHIS2 Map/Thematic Layer Config Modal",
|
|
13
|
-
component: ThematicLayerConfigModal,
|
|
14
|
-
decorators: [
|
|
15
|
-
(MapStory) => {
|
|
16
|
-
return /* @__PURE__ */ jsx("div", { style: { width: "50%", height: "50%" }, children: /* @__PURE__ */ jsx(MapStory, {}) });
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
};
|
|
20
|
-
var ThematicLayerConfigModal_stories_default = meta;
|
|
21
|
-
|
|
22
|
-
export { Default, ThematicLayerConfigModal_stories_default as default };
|
|
23
|
-
//# sourceMappingURL=out.js.map
|
|
24
|
-
//# sourceMappingURL=ThematicLayerConfigModal.stories.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.tsx"],"names":[],"mappings":"AAmBK;AAlBL,SAAS,gCAAgC;AAIlC,MAAM,UAAiB,CAAC;AAC/B,QAAQ,OAAO;AAAA,EACd,UAAU,QAAQ;AAAA,EAClB,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,MAAM;AACP;AAEA,MAAM,OAA8C;AAAA,EACnD,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACX,CAAC,aAAkB;AAClB,aACC,oBAAC,SAAI,OAAO,EAAE,OAAO,OAAO,QAAQ,MAAM,GACzC,8BAAC,YAAS,GACX;AAAA,IAEF;AAAA,EACD;AACD;AAEA,IAAO,2CAAQ","sourcesContent":["import React from \"react\";\nimport { ThematicLayerConfigModal } from \"./ThematicLayerConfigModal\";\nimport { Meta, StoryObj } from \"@storybook/react\";\n\ntype Story = StoryObj<typeof ThematicLayerConfigModal>;\nexport const Default: Story = {};\nDefault.args = {\n\tonChange: console.info,\n\tonClose: () => {},\n\topen: true,\n};\n\nconst meta: Meta<typeof ThematicLayerConfigModal> = {\n\ttitle: \"DHIS2 Map/Thematic Layer Config Modal\",\n\tcomponent: ThematicLayerConfigModal,\n\tdecorators: [\n\t\t(MapStory: any) => {\n\t\t\treturn (\n\t\t\t\t<div style={{ width: \"50%\", height: \"50%\" }}>\n\t\t\t\t\t<MapStory />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t],\n};\n\nexport default meta;\n"]}
|
package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import i18n from '@dhis2/d2-i18n';
|
|
3
|
-
import { InputField, Button, Field, Radio } from '@dhis2/ui';
|
|
4
|
-
import { useWatch, FormProvider, Controller } from 'react-hook-form';
|
|
5
|
-
import { useState, useMemo } from 'react';
|
|
6
|
-
import { compact } from 'lodash';
|
|
7
|
-
import { defaultClasses, defaultColorScaleName } from '../../utils/colors';
|
|
8
|
-
import IndicatorSelectorModal from './components/IndicatorSelectorModal';
|
|
9
|
-
import { LegendSetSelector } from './components/LegendSetSelector';
|
|
10
|
-
import { CustomLegend } from './components/CustomLegend';
|
|
11
|
-
import { RadiusField } from './components/RadiusField';
|
|
12
|
-
import { TypeField } from './components/TypeField';
|
|
13
|
-
|
|
14
|
-
function ThematicLayerConfiguration({
|
|
15
|
-
exclude,
|
|
16
|
-
form
|
|
17
|
-
}) {
|
|
18
|
-
const [type, legendSet, dataItemId] = useWatch({
|
|
19
|
-
control: form.control,
|
|
20
|
-
name: ["type", "dataItem.legendSet", "dataItem.id"]
|
|
21
|
-
});
|
|
22
|
-
const [legendType, setLegendType] = useState(
|
|
23
|
-
legendSet ? "legendSet" : "custom"
|
|
24
|
-
);
|
|
25
|
-
const [dataSelectorOpen, setDataSelectorOpen] = useState(false);
|
|
26
|
-
const onLegendTypeChange = (type2) => ({ value }) => {
|
|
27
|
-
if (type2 === "custom") {
|
|
28
|
-
form.setValue("dataItem.legendSet", void 0);
|
|
29
|
-
form.setValue("dataItem.legendConfig.scale", defaultClasses);
|
|
30
|
-
form.setValue(
|
|
31
|
-
"dataItem.legendConfig.colorClass",
|
|
32
|
-
defaultColorScaleName
|
|
33
|
-
);
|
|
34
|
-
} else {
|
|
35
|
-
form.setValue("dataItem.legendConfig", void 0);
|
|
36
|
-
}
|
|
37
|
-
if (value) {
|
|
38
|
-
setLegendType(value);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const disabled = useMemo(
|
|
42
|
-
() => exclude?.filter((indicator) => indicator !== dataItemId) ?? [],
|
|
43
|
-
[dataItemId, exclude]
|
|
44
|
-
);
|
|
45
|
-
return /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsxs("div", { className: "column gap-16", children: [
|
|
46
|
-
/* @__PURE__ */ jsx(TypeField, {}),
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
48
|
-
Controller,
|
|
49
|
-
{
|
|
50
|
-
rules: {
|
|
51
|
-
validate: {
|
|
52
|
-
required: (value) => {
|
|
53
|
-
return Boolean(value?.id) || i18n.t("A data item is required");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
-
/* @__PURE__ */ jsxs(
|
|
59
|
-
"div",
|
|
60
|
-
{
|
|
61
|
-
style: { alignItems: "flex-end" },
|
|
62
|
-
className: "row w-100 gap-16 align-end",
|
|
63
|
-
children: [
|
|
64
|
-
/* @__PURE__ */ jsx(
|
|
65
|
-
"div",
|
|
66
|
-
{
|
|
67
|
-
onClick: () => setDataSelectorOpen(true),
|
|
68
|
-
style: { flex: 1 },
|
|
69
|
-
children: /* @__PURE__ */ jsx(
|
|
70
|
-
InputField,
|
|
71
|
-
{
|
|
72
|
-
required: true,
|
|
73
|
-
error: Boolean(fieldState.error),
|
|
74
|
-
validationText: fieldState.error?.message,
|
|
75
|
-
disabled: true,
|
|
76
|
-
inputWidth: "100%",
|
|
77
|
-
label: i18n.t("Data Item"),
|
|
78
|
-
value: field.value?.displayName
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsx(
|
|
84
|
-
Button,
|
|
85
|
-
{
|
|
86
|
-
onClick: () => setDataSelectorOpen(true),
|
|
87
|
-
children: field.value?.id ? i18n.t("Change") : i18n.t("Select")
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
dataSelectorOpen && /* @__PURE__ */ jsx(
|
|
94
|
-
IndicatorSelectorModal,
|
|
95
|
-
{
|
|
96
|
-
disabled,
|
|
97
|
-
onUpdate: (values) => {
|
|
98
|
-
const [indicator] = values ?? [];
|
|
99
|
-
field.onChange({
|
|
100
|
-
id: indicator.id,
|
|
101
|
-
displayName: indicator.displayName,
|
|
102
|
-
type: "indicator"
|
|
103
|
-
});
|
|
104
|
-
},
|
|
105
|
-
onClose: () => setDataSelectorOpen(false),
|
|
106
|
-
hide: !dataSelectorOpen,
|
|
107
|
-
selected: compact([
|
|
108
|
-
{
|
|
109
|
-
id: field.value?.id,
|
|
110
|
-
displayName: field.value?.displayName
|
|
111
|
-
}
|
|
112
|
-
])
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
] }),
|
|
116
|
-
name: "dataItem"
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
120
|
-
/* @__PURE__ */ jsx(Field, { label: i18n.t("Legend"), children: /* @__PURE__ */ jsxs("div", { className: "column gap-8", children: [
|
|
121
|
-
/* @__PURE__ */ jsxs("div", { className: "row gap-16", children: [
|
|
122
|
-
/* @__PURE__ */ jsx(
|
|
123
|
-
Radio,
|
|
124
|
-
{
|
|
125
|
-
checked: legendType === "legendSet",
|
|
126
|
-
label: i18n.t("Legend set"),
|
|
127
|
-
name: "legendSet",
|
|
128
|
-
value: "legendSet",
|
|
129
|
-
onChange: onLegendTypeChange("legendSet")
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
/* @__PURE__ */ jsx(
|
|
133
|
-
Radio,
|
|
134
|
-
{
|
|
135
|
-
checked: legendType === "custom",
|
|
136
|
-
label: i18n.t("Custom legend"),
|
|
137
|
-
name: "custom",
|
|
138
|
-
value: "custom",
|
|
139
|
-
onChange: onLegendTypeChange("custom")
|
|
140
|
-
}
|
|
141
|
-
)
|
|
142
|
-
] }),
|
|
143
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
144
|
-
legendType === "legendSet" && /* @__PURE__ */ jsx(
|
|
145
|
-
Controller,
|
|
146
|
-
{
|
|
147
|
-
rules: {
|
|
148
|
-
required: i18n.t(
|
|
149
|
-
"Legend set is required"
|
|
150
|
-
)
|
|
151
|
-
},
|
|
152
|
-
name: "dataItem.legendSet",
|
|
153
|
-
render: ({ field, fieldState }) => /* @__PURE__ */ jsx(
|
|
154
|
-
LegendSetSelector,
|
|
155
|
-
{
|
|
156
|
-
required: true,
|
|
157
|
-
selected: field.value,
|
|
158
|
-
...field,
|
|
159
|
-
...fieldState
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
}
|
|
163
|
-
),
|
|
164
|
-
legendType === "custom" && /* @__PURE__ */ jsx(CustomLegend, {})
|
|
165
|
-
] })
|
|
166
|
-
] }) }),
|
|
167
|
-
type === "bubble" && /* @__PURE__ */ jsx(Field, { label: i18n.t("Radius"), children: /* @__PURE__ */ jsx(RadiusField, {}) })
|
|
168
|
-
] })
|
|
169
|
-
] }) });
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export { ThematicLayerConfiguration };
|
|
173
|
-
//# sourceMappingURL=out.js.map
|
|
174
|
-
//# sourceMappingURL=ThematicLayerConfiguration.mjs.map
|
package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.tsx"],"names":["type"],"mappings":"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","sourcesContent":["import i18n from \"@dhis2/d2-i18n\";\nimport { Button, Field, InputField, Radio } from \"@dhis2/ui\";\nimport { Controller, FormProvider, useWatch } from \"react-hook-form\";\nimport React, { useMemo, useState } from \"react\";\nimport { compact } from \"lodash\";\nimport { defaultClasses, defaultColorScaleName } from \"../../utils/colors\";\nimport IndicatorSelectorModal from \"./components/IndicatorSelectorModal\";\nimport { LegendSetSelector } from \"./components/LegendSetSelector\";\nimport { CustomLegend } from \"./components/CustomLegend\";\nimport { ThematicLayerConfigurationProps } from \"./types\";\nimport { RadiusField } from \"./components/RadiusField\";\nimport { TypeField } from \"./components/TypeField\";\n\nexport function ThematicLayerConfiguration({\n\texclude,\n\tform,\n}: ThematicLayerConfigurationProps) {\n\tconst [type, legendSet, dataItemId] = useWatch({\n\t\tcontrol: form.control,\n\t\tname: [\"type\", \"dataItem.legendSet\", \"dataItem.id\"],\n\t});\n\tconst [legendType, setLegendType] = useState(\n\t\tlegendSet ? \"legendSet\" : \"custom\",\n\t);\n\tconst [dataSelectorOpen, setDataSelectorOpen] = useState(false);\n\n\tconst onLegendTypeChange =\n\t\t(type: string) =>\n\t\t({ value }: { value?: string }) => {\n\t\t\tif (type === \"custom\") {\n\t\t\t\tform.setValue(\"dataItem.legendSet\", undefined);\n\t\t\t\tform.setValue(\"dataItem.legendConfig.scale\", defaultClasses);\n\t\t\t\tform.setValue(\n\t\t\t\t\t\"dataItem.legendConfig.colorClass\",\n\t\t\t\t\tdefaultColorScaleName,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tform.setValue(\"dataItem.legendConfig\", undefined);\n\t\t\t}\n\t\t\tif (value) {\n\t\t\t\tsetLegendType(value);\n\t\t\t}\n\t\t};\n\tconst disabled = useMemo(\n\t\t() => exclude?.filter((indicator) => indicator !== dataItemId) ?? [],\n\t\t[dataItemId, exclude],\n\t);\n\treturn (\n\t\t<FormProvider {...form}>\n\t\t\t<div className=\"column gap-16\">\n\t\t\t\t<TypeField />\n\t\t\t\t<Controller\n\t\t\t\t\trules={{\n\t\t\t\t\t\tvalidate: {\n\t\t\t\t\t\t\trequired: (value: { id: string; name: string }) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\tBoolean(value?.id) ||\n\t\t\t\t\t\t\t\t\ti18n.t(\"A data item is required\")\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{ alignItems: \"flex-end\" }}\n\t\t\t\t\t\t\t\tclassName=\"row w-100 gap-16 align-end\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tonClick={() => setDataSelectorOpen(true)}\n\t\t\t\t\t\t\t\t\tstyle={{ flex: 1 }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<InputField\n\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\t\t\t\t\tvalidationText={\n\t\t\t\t\t\t\t\t\t\t\tfieldState.error?.message\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\t\t\t\tinputWidth=\"100%\"\n\t\t\t\t\t\t\t\t\t\tlabel={i18n.t(\"Data Item\")}\n\t\t\t\t\t\t\t\t\t\tvalue={field.value?.displayName}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={() => setDataSelectorOpen(true)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{field.value?.id\n\t\t\t\t\t\t\t\t\t\t? i18n.t(\"Change\")\n\t\t\t\t\t\t\t\t\t\t: i18n.t(\"Select\")}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{dataSelectorOpen && (\n\t\t\t\t\t\t\t\t<IndicatorSelectorModal\n\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\tonUpdate={(values: any[]) => {\n\t\t\t\t\t\t\t\t\t\tconst [indicator] = values ?? [];\n\t\t\t\t\t\t\t\t\t\tfield.onChange({\n\t\t\t\t\t\t\t\t\t\t\tid: indicator.id,\n\t\t\t\t\t\t\t\t\t\t\tdisplayName: indicator.displayName,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"indicator\",\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonClose={() => setDataSelectorOpen(false)}\n\t\t\t\t\t\t\t\t\thide={!dataSelectorOpen}\n\t\t\t\t\t\t\t\t\tselected={compact([\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tid: field.value?.id,\n\t\t\t\t\t\t\t\t\t\t\tdisplayName:\n\t\t\t\t\t\t\t\t\t\t\t\tfield.value?.displayName,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t])}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t\tname={\"dataItem\"}\n\t\t\t\t/>\n\t\t\t\t<div>\n\t\t\t\t\t<Field label={i18n.t(\"Legend\")}>\n\t\t\t\t\t\t<div className=\"column gap-8\">\n\t\t\t\t\t\t\t<div className=\"row gap-16\">\n\t\t\t\t\t\t\t\t<Radio\n\t\t\t\t\t\t\t\t\tchecked={legendType === \"legendSet\"}\n\t\t\t\t\t\t\t\t\tlabel={i18n.t(\"Legend set\")}\n\t\t\t\t\t\t\t\t\tname=\"legendSet\"\n\t\t\t\t\t\t\t\t\tvalue=\"legendSet\"\n\t\t\t\t\t\t\t\t\tonChange={onLegendTypeChange(\"legendSet\")}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Radio\n\t\t\t\t\t\t\t\t\tchecked={legendType === \"custom\"}\n\t\t\t\t\t\t\t\t\tlabel={i18n.t(\"Custom legend\")}\n\t\t\t\t\t\t\t\t\tname=\"custom\"\n\t\t\t\t\t\t\t\t\tvalue=\"custom\"\n\t\t\t\t\t\t\t\t\tonChange={onLegendTypeChange(\"custom\")}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t{legendType === \"legendSet\" && (\n\t\t\t\t\t\t\t\t\t<Controller\n\t\t\t\t\t\t\t\t\t\trules={{\n\t\t\t\t\t\t\t\t\t\t\trequired: i18n.t(\n\t\t\t\t\t\t\t\t\t\t\t\t\"Legend set is required\",\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tname=\"dataItem.legendSet\"\n\t\t\t\t\t\t\t\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t\t\t\t\t\t\t\t<LegendSetSelector\n\t\t\t\t\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t\t\t\t\tselected={field.value}\n\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t{...fieldState}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{legendType === \"custom\" && <CustomLegend />}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Field>\n\t\t\t\t\t{type === \"bubble\" && (\n\t\t\t\t\t\t<Field label={i18n.t(\"Radius\")}>\n\t\t\t\t\t\t\t<RadiusField />\n\t\t\t\t\t\t</Field>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</FormProvider>\n\t);\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { ThematicLayerConfiguration } from './ThematicLayerConfiguration';
|
|
3
|
-
import { useForm } from 'react-hook-form';
|
|
4
|
-
|
|
5
|
-
const Basic = {};
|
|
6
|
-
Basic.args = {};
|
|
7
|
-
const meta = {
|
|
8
|
-
title: "DHIS2 Map/Thematic Layer Configuration",
|
|
9
|
-
component: ThematicLayerConfiguration,
|
|
10
|
-
decorators: [
|
|
11
|
-
(MapStory) => {
|
|
12
|
-
const form = useForm();
|
|
13
|
-
return /* @__PURE__ */ jsx("div", { style: { width: "50%", height: "50%" }, children: /* @__PURE__ */ jsx(MapStory, { args: { form } }) });
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
};
|
|
17
|
-
var ThematicLayerConfiguration_stories_default = meta;
|
|
18
|
-
|
|
19
|
-
export { Basic, ThematicLayerConfiguration_stories_default as default };
|
|
20
|
-
//# sourceMappingURL=out.js.map
|
|
21
|
-
//# sourceMappingURL=ThematicLayerConfiguration.stories.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.tsx"],"names":[],"mappings":"AAiBK;AAhBL,SAAS,kCAAkC;AAC3C,SAAS,eAAe;AAIjB,MAAM,QAAe,CAAC;AAC7B,MAAM,OAAO,CAAC;AAEd,MAAM,OAAgD;AAAA,EACrD,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACX,CAAC,aAAa;AACb,YAAM,OAAO,QAA6B;AAC1C,aACC,oBAAC,SAAI,OAAO,EAAE,OAAO,OAAO,QAAQ,MAAM,GACzC,8BAAC,YAAS,MAAM,EAAE,KAAK,GAAG,GAC3B;AAAA,IAEF;AAAA,EACD;AACD;AAEA,IAAO,6CAAQ","sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport { ThematicLayerConfiguration } from \"./ThematicLayerConfiguration\";\nimport { useForm } from \"react-hook-form\";\nimport { ThematicLayerConfig } from \"../MapLayer/interfaces\";\n\ntype Story = StoryObj<typeof ThematicLayerConfiguration>;\nexport const Basic: Story = {};\nBasic.args = {};\n\nconst meta: Meta<typeof ThematicLayerConfiguration> = {\n\ttitle: \"DHIS2 Map/Thematic Layer Configuration\",\n\tcomponent: ThematicLayerConfiguration,\n\tdecorators: [\n\t\t(MapStory) => {\n\t\t\tconst form = useForm<ThematicLayerConfig>();\n\t\t\treturn (\n\t\t\t\t<div style={{ width: \"50%\", height: \"50%\" }}>\n\t\t\t\t\t<MapStory args={{ form }} />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t],\n};\n\nexport default meta;\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import styles from '../../styles/ColorScale.module.css';
|
|
3
|
-
import { COLOR_PALETTES } from '../../constants/colors';
|
|
4
|
-
|
|
5
|
-
const ColorScale = ({ scale, bins, width, onClick }) => {
|
|
6
|
-
const colors = COLOR_PALETTES?.[scale]?.[bins];
|
|
7
|
-
const itemWidth = width ? width / bins : 36;
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
"ul",
|
|
10
|
-
{
|
|
11
|
-
onClick: () => onClick(scale),
|
|
12
|
-
className: styles.colorScale,
|
|
13
|
-
style: {
|
|
14
|
-
...width && { width }
|
|
15
|
-
},
|
|
16
|
-
children: colors.map((color, index) => /* @__PURE__ */ jsx("li", { className: styles.item, style: { backgroundColor: color, width: itemWidth } }, index))
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
var ColorScale_default = ColorScale;
|
|
21
|
-
|
|
22
|
-
export { ColorScale_default as default };
|
|
23
|
-
//# sourceMappingURL=out.js.map
|
|
24
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../src/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.tsx"],"names":[],"mappings":"AAiBQ;AAhBR,OAAO,YAAY;AACnB,SAAS,sBAAsB;AAG/B,MAAM,aAAa,CAAC,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAwF;AACxI,QAAM,SAAU,iBAAyB,KAAK,IAAI,IAAI;AACtD,QAAM,YAAY,QAAQ,QAAQ,OAAO;AAEzC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,MAAM,QAAQ,KAAK;AAAA,MAC5B,WAAW,OAAO;AAAA,MAClB,OAAO;AAAA,QACL,GAAI,SAAS,EAAE,MAAM;AAAA,MACvB;AAAA,MACC,iBAAO,IAAI,CAAC,OAAe,UAC1B,oBAAC,QAAe,WAAW,OAAO,MAAM,OAAO,EAAE,iBAAiB,OAAO,OAAO,UAAU,KAAjF,KAAoF,CAC9F;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,qBAAQ","sourcesContent":["import React from \"react\";\nimport styles from \"../../styles/ColorScale.module.css\";\nimport { COLOR_PALETTES } from \"../../constants/colors\";\n\n// Returns one color scale based on a code and number of classes\nconst ColorScale = ({ scale, bins, width, onClick }: { scale: string; bins: number; width: number; onClick: (scale: string) => void }) => {\n const colors = (COLOR_PALETTES as any)?.[scale]?.[bins];\n const itemWidth = width ? width / bins : 36;\n\n return (\n <ul\n onClick={() => onClick(scale)}\n className={styles.colorScale}\n style={{\n ...(width && { width }),\n }}>\n {colors.map((color: string, index: number) => (\n <li key={index} className={styles.item} style={{ backgroundColor: color, width: itemWidth }} />\n ))}\n </ul>\n );\n};\n\nexport default ColorScale;\n"]}
|