@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,145 +0,0 @@
|
|
|
1
|
-
import { SingleValueVisualizer } from './SingleValueVisualizer';
|
|
2
|
-
|
|
3
|
-
const meta = {
|
|
4
|
-
title: "Single Value Visualizer",
|
|
5
|
-
component: SingleValueVisualizer
|
|
6
|
-
};
|
|
7
|
-
var SingleValueContainer_stories_default = meta;
|
|
8
|
-
const Default = {
|
|
9
|
-
name: "Default"
|
|
10
|
-
};
|
|
11
|
-
Default.args = {
|
|
12
|
-
title: "PRIORITY INDICATORS",
|
|
13
|
-
singleValueItems: [
|
|
14
|
-
{
|
|
15
|
-
label: "Total Bookings",
|
|
16
|
-
value: 136
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "At least one dose",
|
|
20
|
-
value: 45,
|
|
21
|
-
percentage: 23,
|
|
22
|
-
color: "#0D47A1"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: "Partially vaccinated",
|
|
26
|
-
value: 13,
|
|
27
|
-
percentage: 17,
|
|
28
|
-
color: "#0D47A1"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "Fully vaccinated",
|
|
32
|
-
value: 126,
|
|
33
|
-
percentage: 83,
|
|
34
|
-
color: "#0D47A1"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: "Number of AEFI",
|
|
38
|
-
value: 26
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
};
|
|
42
|
-
const AnimatedAllValues = {
|
|
43
|
-
name: "Animated all values"
|
|
44
|
-
};
|
|
45
|
-
AnimatedAllValues.args = {
|
|
46
|
-
title: "PRIORITY INDICATORS",
|
|
47
|
-
animationDuration: 1500,
|
|
48
|
-
animationDelay: 500,
|
|
49
|
-
singleValueItems: [
|
|
50
|
-
{
|
|
51
|
-
label: "Total Bookings",
|
|
52
|
-
value: 136344
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
label: "At least one dose",
|
|
56
|
-
value: 4423,
|
|
57
|
-
percentage: 23,
|
|
58
|
-
color: "#0D47A1"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: "Partially vaccinated",
|
|
62
|
-
value: 1394,
|
|
63
|
-
percentage: 17,
|
|
64
|
-
color: "#0D47A1"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: "Fully vaccinated",
|
|
68
|
-
value: 12432,
|
|
69
|
-
percentage: 83,
|
|
70
|
-
color: "#0D47A1"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: "Number of AEFI",
|
|
74
|
-
value: 26423
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
};
|
|
78
|
-
const AnimatedSingleValue = {
|
|
79
|
-
name: "Animated single value"
|
|
80
|
-
};
|
|
81
|
-
AnimatedSingleValue.args = {
|
|
82
|
-
title: "PRIORITY INDICATORS",
|
|
83
|
-
singleValueItems: [
|
|
84
|
-
{
|
|
85
|
-
label: "Total Bookings",
|
|
86
|
-
value: 13634244,
|
|
87
|
-
animationDuration: 1e3,
|
|
88
|
-
animationDelay: 100
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
label: "At least one dose",
|
|
92
|
-
value: 45423,
|
|
93
|
-
percentage: 23,
|
|
94
|
-
color: "#0D47A1",
|
|
95
|
-
animationDuration: 1e3,
|
|
96
|
-
animationDelay: 600
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
label: "Partially vaccinated",
|
|
100
|
-
value: 13434,
|
|
101
|
-
percentage: 17,
|
|
102
|
-
color: "#0D47A1",
|
|
103
|
-
animationDuration: 1e3,
|
|
104
|
-
animationDelay: 1100
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
label: "Fully vaccinated",
|
|
108
|
-
value: 126432,
|
|
109
|
-
percentage: 83,
|
|
110
|
-
color: "#0D47A1",
|
|
111
|
-
animationDuration: 1e3,
|
|
112
|
-
animationDelay: 1600
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: "Number of AEFI",
|
|
116
|
-
value: 268423,
|
|
117
|
-
animationDuration: 1e3,
|
|
118
|
-
animationDelay: 2e3
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
};
|
|
122
|
-
const SingleValuesWithDecimalPlaces = {
|
|
123
|
-
name: "Single value with decimal places"
|
|
124
|
-
};
|
|
125
|
-
SingleValuesWithDecimalPlaces.args = {
|
|
126
|
-
title: "ENROLLMENTS",
|
|
127
|
-
animationDuration: 1500,
|
|
128
|
-
animationDelay: 500,
|
|
129
|
-
singleValueItems: [
|
|
130
|
-
{
|
|
131
|
-
label: "Number of Enrolled Clients",
|
|
132
|
-
value: 268423,
|
|
133
|
-
decimalPlaces: 3
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
label: "Number of Served Clients",
|
|
137
|
-
value: 268423,
|
|
138
|
-
decimalPlaces: 1
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export { AnimatedAllValues, AnimatedSingleValue, Default, SingleValuesWithDecimalPlaces, SingleValueContainer_stories_default as default };
|
|
144
|
-
//# sourceMappingURL=out.js.map
|
|
145
|
-
//# sourceMappingURL=SingleValueContainer.stories.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SingleValueContainer/SingleValueContainer.stories.tsx"],"names":[],"mappings":"AACA,SAAS,6BAA6B;AAEtC,MAAM,OAA2C;AAAA,EAChD,OAAO;AAAA,EACP,WAAW;AACZ;AAEA,IAAO,uCAAQ;AAGR,MAAM,UAAiB;AAAA,EAC7B,MAAM;AACP;AACA,QAAQ,OAAO;AAAA,EACd,OAAO;AAAA,EACP,kBAAkB;AAAA,IACjB;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACD;AACD;AAEO,MAAM,oBAA2B;AAAA,EACvC,MAAM;AACP;AACA,kBAAkB,OAAO;AAAA,EACxB,OAAO;AAAA,EACP,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,IACjB;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,IACR;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,IACR;AAAA,EACD;AACD;AAEO,MAAM,sBAA6B;AAAA,EACzC,MAAM;AACP;AACA,oBAAoB,OAAO;AAAA,EAC1B,OAAO;AAAA,EACP,kBAAkB;AAAA,IACjB;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,IACjB;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,IACjB;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,IACjB;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,IACjB;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,mBAAmB;AAAA,MACnB,gBAAgB;AAAA,IACjB;AAAA,EACD;AACD;AAEO,MAAM,gCAAuC;AAAA,EACnD,MAAM;AACP;AACA,8BAA8B,OAAO;AAAA,EACpC,OAAO;AAAA,EACP,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,IACjB;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,eAAe;AAAA,IAChB;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,eAAe;AAAA,IAChB;AAAA,EACD;AACD","sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport { SingleValueVisualizer } from \"./SingleValueVisualizer\";\n\nconst meta: Meta<typeof SingleValueVisualizer> = {\n\ttitle: \"Single Value Visualizer\",\n\tcomponent: SingleValueVisualizer,\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof SingleValueVisualizer>;\nexport const Default: Story = {\n\tname: \"Default\",\n};\nDefault.args = {\n\ttitle: \"PRIORITY INDICATORS\",\n\tsingleValueItems: [\n\t\t{\n\t\t\tlabel: \"Total Bookings\",\n\t\t\tvalue: 136,\n\t\t},\n\t\t{\n\t\t\tlabel: \"At least one dose\",\n\t\t\tvalue: 45,\n\t\t\tpercentage: 23,\n\t\t\tcolor: \"#0D47A1\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"Partially vaccinated\",\n\t\t\tvalue: 13,\n\t\t\tpercentage: 17,\n\t\t\tcolor: \"#0D47A1\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"Fully vaccinated\",\n\t\t\tvalue: 126,\n\t\t\tpercentage: 83,\n\t\t\tcolor: \"#0D47A1\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"Number of AEFI\",\n\t\t\tvalue: 26,\n\t\t},\n\t],\n};\n\nexport const AnimatedAllValues: Story = {\n\tname: \"Animated all values\",\n};\nAnimatedAllValues.args = {\n\ttitle: \"PRIORITY INDICATORS\",\n\tanimationDuration: 1500,\n\tanimationDelay: 500,\n\tsingleValueItems: [\n\t\t{\n\t\t\tlabel: \"Total Bookings\",\n\t\t\tvalue: 136344,\n\t\t},\n\t\t{\n\t\t\tlabel: \"At least one dose\",\n\t\t\tvalue: 4423,\n\t\t\tpercentage: 23,\n\t\t\tcolor: \"#0D47A1\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"Partially vaccinated\",\n\t\t\tvalue: 1394,\n\t\t\tpercentage: 17,\n\t\t\tcolor: \"#0D47A1\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"Fully vaccinated\",\n\t\t\tvalue: 12432,\n\t\t\tpercentage: 83,\n\t\t\tcolor: \"#0D47A1\",\n\t\t},\n\t\t{\n\t\t\tlabel: \"Number of AEFI\",\n\t\t\tvalue: 26423,\n\t\t},\n\t],\n};\n\nexport const AnimatedSingleValue: Story = {\n\tname: \"Animated single value\",\n};\nAnimatedSingleValue.args = {\n\ttitle: \"PRIORITY INDICATORS\",\n\tsingleValueItems: [\n\t\t{\n\t\t\tlabel: \"Total Bookings\",\n\t\t\tvalue: 13634244,\n\t\t\tanimationDuration: 1000,\n\t\t\tanimationDelay: 100,\n\t\t},\n\t\t{\n\t\t\tlabel: \"At least one dose\",\n\t\t\tvalue: 45423,\n\t\t\tpercentage: 23,\n\t\t\tcolor: \"#0D47A1\",\n\t\t\tanimationDuration: 1000,\n\t\t\tanimationDelay: 600,\n\t\t},\n\t\t{\n\t\t\tlabel: \"Partially vaccinated\",\n\t\t\tvalue: 13434,\n\t\t\tpercentage: 17,\n\t\t\tcolor: \"#0D47A1\",\n\t\t\tanimationDuration: 1000,\n\t\t\tanimationDelay: 1100,\n\t\t},\n\t\t{\n\t\t\tlabel: \"Fully vaccinated\",\n\t\t\tvalue: 126432,\n\t\t\tpercentage: 83,\n\t\t\tcolor: \"#0D47A1\",\n\t\t\tanimationDuration: 1000,\n\t\t\tanimationDelay: 1600,\n\t\t},\n\t\t{\n\t\t\tlabel: \"Number of AEFI\",\n\t\t\tvalue: 268423,\n\t\t\tanimationDuration: 1000,\n\t\t\tanimationDelay: 2000,\n\t\t},\n\t],\n};\n\nexport const SingleValuesWithDecimalPlaces: Story = {\n\tname: \"Single value with decimal places\",\n};\nSingleValuesWithDecimalPlaces.args = {\n\ttitle: \"ENROLLMENTS\",\n\tanimationDuration: 1500,\n\tanimationDelay: 500,\n\tsingleValueItems: [\n\t\t{\n\t\t\tlabel: \"Number of Enrolled Clients\",\n\t\t\tvalue: 268423,\n\t\t\tdecimalPlaces: 3,\n\t\t},\n\t\t{\n\t\t\tlabel: \"Number of Served Clients\",\n\t\t\tvalue: 268423,\n\t\t\tdecimalPlaces: 1,\n\t\t},\n\t],\n};\n"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import i18n from '@dhis2/d2-i18n';
|
|
3
|
-
import { CssReset } from '@dhis2/ui';
|
|
4
|
-
import { Suspense } from 'react';
|
|
5
|
-
import SingleValueItem from './components/SingleValueItem/SingleValueItem';
|
|
6
|
-
export { default as SingleValueItem } from './components/SingleValueItem/SingleValueItem';
|
|
7
|
-
import styles from './styles/SingleValueContainer.module.css';
|
|
8
|
-
export * from './types/props';
|
|
9
|
-
|
|
10
|
-
function SingleValueVisualizer({
|
|
11
|
-
title,
|
|
12
|
-
singleValueItems,
|
|
13
|
-
animationDuration,
|
|
14
|
-
animationDelay
|
|
15
|
-
}) {
|
|
16
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-100 h-100", children: [
|
|
17
|
-
/* @__PURE__ */ jsx(CssReset, {}),
|
|
18
|
-
/* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx("div", { children: i18n.t("Loading ...") }), children: /* @__PURE__ */ jsxs("div", { children: [
|
|
19
|
-
/* @__PURE__ */ jsx(
|
|
20
|
-
"span",
|
|
21
|
-
{
|
|
22
|
-
className: `${styles["font-x-large"]} ${styles["font-bold"]}`,
|
|
23
|
-
children: title
|
|
24
|
-
}
|
|
25
|
-
),
|
|
26
|
-
/* @__PURE__ */ jsx("div", { className: styles["single-value-list"], children: singleValueItems.map(
|
|
27
|
-
(singleValueItem) => /* @__PURE__ */ jsx(
|
|
28
|
-
SingleValueItem,
|
|
29
|
-
{
|
|
30
|
-
...singleValueItem,
|
|
31
|
-
globalAnimationDuration: animationDuration,
|
|
32
|
-
globalAnimationDelay: animationDelay
|
|
33
|
-
},
|
|
34
|
-
`${singleValueItem.label}-${singleValueItem.value}`
|
|
35
|
-
)
|
|
36
|
-
) })
|
|
37
|
-
] }) })
|
|
38
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
const SingleValueContainer = SingleValueVisualizer;
|
|
41
|
-
|
|
42
|
-
export { SingleValueContainer, SingleValueVisualizer };
|
|
43
|
-
//# sourceMappingURL=out.js.map
|
|
44
|
-
//# sourceMappingURL=SingleValueVisualizer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SingleValueContainer/SingleValueVisualizer.tsx"],"names":[],"mappings":"AAiBG,cAEC,YAFD;AAjBH,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAgB,gBAAgB;AAChC,OAAO,qBAAqB;AAC5B,OAAO,YAAY;AAGnB,cAAc;AAEP,SAAS,sBAAsB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAmD;AAClD,SACC,qBAAC,SAAI,WAAU,eACd;AAAA,wBAAC,YAAS;AAAA,IACV,oBAAC,YAAS,UAAU,oBAAC,SAAK,eAAK,EAAE,aAAa,GAAE,GAC/C,+BAAC,SACA;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,WAAW,GAAG,OAAO,cAAc,CAAC,IAAI,OAAO,WAAW,CAAC;AAAA,UAE1D;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,SAAI,WAAW,OAAO,mBAAmB,GACxC,2BAAiB;AAAA,QACjB,CAAC,oBACA;AAAA,UAAC;AAAA;AAAA,YAEC,GAAG;AAAA,YACJ,yBAAyB;AAAA,YACzB,sBAAsB;AAAA;AAAA,UAHjB,GAAG,gBAAgB,KAAK,IAAI,gBAAgB,KAAK;AAAA,QAIvD;AAAA,MAEF,GACD;AAAA,OACD,GACD;AAAA,KACD;AAEF;AAKO,MAAM,uBAAuB","sourcesContent":["import i18n from \"@dhis2/d2-i18n\";\nimport { CssReset } from \"@dhis2/ui\";\nimport React, { Suspense } from \"react\";\nimport SingleValueItem from \"./components/SingleValueItem/SingleValueItem\";\nimport styles from \"./styles/SingleValueContainer.module.css\";\nimport { SingleValue, SingleValueVisualizerProps } from \"./types/props\";\n\nexport * from \"./types/props\";\n\nexport function SingleValueVisualizer({\n\ttitle,\n\tsingleValueItems,\n\tanimationDuration,\n\tanimationDelay,\n}: SingleValueVisualizerProps): React.ReactElement {\n\treturn (\n\t\t<div className=\"w-100 h-100\">\n\t\t\t<CssReset />\n\t\t\t<Suspense fallback={<div>{i18n.t(\"Loading ...\")}</div>}>\n\t\t\t\t<div>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={`${styles[\"font-x-large\"]} ${styles[\"font-bold\"]}`}\n\t\t\t\t\t>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div className={styles[\"single-value-list\"]}>\n\t\t\t\t\t\t{singleValueItems.map(\n\t\t\t\t\t\t\t(singleValueItem: SingleValue) => (\n\t\t\t\t\t\t\t\t<SingleValueItem\n\t\t\t\t\t\t\t\t\tkey={`${singleValueItem.label}-${singleValueItem.value}`}\n\t\t\t\t\t\t\t\t\t{...singleValueItem}\n\t\t\t\t\t\t\t\t\tglobalAnimationDuration={animationDuration}\n\t\t\t\t\t\t\t\t\tglobalAnimationDelay={animationDelay}\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</div>\n\t\t\t\t</div>\n\t\t\t</Suspense>\n\t\t</div>\n\t);\n}\n\n/**\n * @deprecated since `v2`. Use `SingleValueVisualizer` instead\n * */\nexport const SingleValueContainer = SingleValueVisualizer;\nexport { SingleValueItem };\n"]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Tooltip } from '@dhis2/ui';
|
|
3
|
-
import { capitalize } from 'lodash';
|
|
4
|
-
import { useSpring, animated } from 'react-spring';
|
|
5
|
-
import styles from '../../styles/SingleValueContainer.module.css';
|
|
6
|
-
import SingleValuePercentage from './SingleValuePercentage';
|
|
7
|
-
|
|
8
|
-
function SingleValueItem({
|
|
9
|
-
label,
|
|
10
|
-
value,
|
|
11
|
-
color,
|
|
12
|
-
percentage,
|
|
13
|
-
animationDuration,
|
|
14
|
-
animationDelay,
|
|
15
|
-
globalAnimationDelay,
|
|
16
|
-
decimalPlaces,
|
|
17
|
-
globalAnimationDuration
|
|
18
|
-
}) {
|
|
19
|
-
const numberFormatter = (value2) => Intl.NumberFormat("en-US", {
|
|
20
|
-
notation: "compact",
|
|
21
|
-
maximumFractionDigits: decimalPlaces ?? 1
|
|
22
|
-
}).format(value2);
|
|
23
|
-
const sanitizedValue = useSpring({
|
|
24
|
-
val: value,
|
|
25
|
-
from: { val: 0 },
|
|
26
|
-
config: {
|
|
27
|
-
duration: animationDuration ?? globalAnimationDuration ?? 1e3
|
|
28
|
-
},
|
|
29
|
-
delay: animationDelay ?? globalAnimationDelay ?? 10
|
|
30
|
-
});
|
|
31
|
-
const tooltipContent = `${label}: ${value}`;
|
|
32
|
-
return /* @__PURE__ */ jsxs("div", { className: `${styles["single-value-item"]} text-center`, children: [
|
|
33
|
-
/* @__PURE__ */ jsx("div", { className: styles["font-large"], children: label }),
|
|
34
|
-
/* @__PURE__ */ jsx(Tooltip, { content: capitalize(tooltipContent), children: /* @__PURE__ */ jsx(
|
|
35
|
-
animated.div,
|
|
36
|
-
{
|
|
37
|
-
className: `${styles["font-bold"]} ${styles["font-xx-large"]} ${styles["padding-top"]}`,
|
|
38
|
-
children: sanitizedValue.val.to(
|
|
39
|
-
(value2) => numberFormatter(Math.floor(value2))
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
) }),
|
|
43
|
-
percentage ? /* @__PURE__ */ jsx(SingleValuePercentage, { color, percentage }) : /* @__PURE__ */ jsx("span", {})
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { SingleValueItem as default };
|
|
48
|
-
//# sourceMappingURL=out.js.map
|
|
49
|
-
//# sourceMappingURL=SingleValueItem.mjs.map
|
package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.tsx"],"names":["value"],"mappings":"AAyCE,SACC,KADD;AAzCF,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAE3B,SAAS,UAAU,iBAAiB;AACpC,OAAO,YAAY;AAEnB,OAAO,2BAA2B;AAOnB,SAAR,gBAAiC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAyC;AACxC,QAAM,kBAAkB,CAACA,WACxB,KAAK,aAAa,SAAS;AAAA,IAC1B,UAAU;AAAA,IACV,uBAAuB,iBAAiB;AAAA,EACzC,CAAC,EAAE,OAAOA,MAAK;AAEhB,QAAM,iBAAiB,UAAU;AAAA,IAChC,KAAK;AAAA,IACL,MAAM,EAAE,KAAK,EAAE;AAAA,IACf,QAAQ;AAAA,MACP,UAAU,qBAAqB,2BAA2B;AAAA,IAC3D;AAAA,IACA,OAAO,kBAAkB,wBAAwB;AAAA,EAClD,CAAC;AAED,QAAM,iBAAiB,GAAG,KAAK,KAAK,KAAK;AACzC,SACC,qBAAC,SAAI,WAAW,GAAG,OAAO,mBAAmB,CAAC,gBAC7C;AAAA,wBAAC,SAAI,WAAW,OAAO,YAAY,GAAI,iBAAM;AAAA,IAC7C,oBAAC,WAAQ,SAAS,WAAW,cAAc,GAC1C;AAAA,MAAC,SAAS;AAAA,MAAT;AAAA,QACA,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,OAAO,eAAe,CAAC,IAAI,OAAO,aAAa,CAAC;AAAA,QAEpF,yBAAe,IAAI;AAAA,UAAG,CAACA,WACvB,gBAAgB,KAAK,MAAMA,MAAK,CAAC;AAAA,QAClC;AAAA;AAAA,IACD,GACD;AAAA,IACC,aACA,oBAAC,yBAAsB,OAAc,YAAwB,IAE7D,oBAAC,UAAK;AAAA,KAER;AAEF","sourcesContent":["import { Tooltip } from \"@dhis2/ui\";\nimport { capitalize } from \"lodash\";\nimport React from \"react\";\nimport { animated, useSpring } from \"react-spring\";\nimport styles from \"../../styles/SingleValueContainer.module.css\";\nimport { SingleValue } from \"../../types/props\";\nimport SingleValuePercentage from \"./SingleValuePercentage\";\n\ninterface SingleValueProps extends SingleValue {\n\tglobalAnimationDelay?: number;\n\tglobalAnimationDuration?: number;\n}\n\nexport default function SingleValueItem({\n\tlabel,\n\tvalue,\n\tcolor,\n\tpercentage,\n\tanimationDuration,\n\tanimationDelay,\n\tglobalAnimationDelay,\n\tdecimalPlaces,\n\tglobalAnimationDuration,\n}: SingleValueProps): React.ReactElement {\n\tconst numberFormatter = (value: number) =>\n\t\tIntl.NumberFormat(\"en-US\", {\n\t\t\tnotation: \"compact\",\n\t\t\tmaximumFractionDigits: decimalPlaces ?? 1,\n\t\t}).format(value);\n\n\tconst sanitizedValue = useSpring({\n\t\tval: value,\n\t\tfrom: { val: 0 },\n\t\tconfig: {\n\t\t\tduration: animationDuration ?? globalAnimationDuration ?? 1000,\n\t\t},\n\t\tdelay: animationDelay ?? globalAnimationDelay ?? 10,\n\t});\n\n\tconst tooltipContent = `${label}: ${value}`;\n\treturn (\n\t\t<div className={`${styles[\"single-value-item\"]} text-center`}>\n\t\t\t<div className={styles[\"font-large\"]}>{label}</div>\n\t\t\t<Tooltip content={capitalize(tooltipContent)}>\n\t\t\t\t<animated.div\n\t\t\t\t\tclassName={`${styles[\"font-bold\"]} ${styles[\"font-xx-large\"]} ${styles[\"padding-top\"]}`}\n\t\t\t\t>\n\t\t\t\t\t{sanitizedValue.val.to((value) =>\n\t\t\t\t\t\tnumberFormatter(Math.floor(value)),\n\t\t\t\t\t)}\n\t\t\t\t</animated.div>\n\t\t\t</Tooltip>\n\t\t\t{percentage ? (\n\t\t\t\t<SingleValuePercentage color={color} percentage={percentage} />\n\t\t\t) : (\n\t\t\t\t<span></span>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"]}
|
package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { LinearLoader } from '@dhis2/ui';
|
|
3
|
-
import styles from '../../styles/SingleValueContainer.module.css';
|
|
4
|
-
|
|
5
|
-
function SingleValuePercentage({
|
|
6
|
-
percentage,
|
|
7
|
-
color
|
|
8
|
-
}) {
|
|
9
|
-
const width = "100%";
|
|
10
|
-
return /* @__PURE__ */ jsx("div", { className: "w-100", children: /* @__PURE__ */ jsx(
|
|
11
|
-
LinearLoader,
|
|
12
|
-
{
|
|
13
|
-
className: styles["percent-value"],
|
|
14
|
-
width,
|
|
15
|
-
amount: percentage
|
|
16
|
-
}
|
|
17
|
-
) });
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { SingleValuePercentage as default };
|
|
21
|
-
//# sourceMappingURL=out.js.map
|
|
22
|
-
//# sourceMappingURL=SingleValuePercentage.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.tsx"],"names":[],"mappings":"AAWG;AAXH,SAAS,oBAAoB;AAE7B,OAAO,YAAY;AAEJ,SAAR,sBAAuC;AAAA,EAC7C;AAAA,EACA;AACD,GAA4B;AAC3B,QAAM,QAAQ;AACd,SACC,oBAAC,SAAI,WAAU,SACd;AAAA,IAAC;AAAA;AAAA,MACA,WAAW,OAAO,eAAe;AAAA,MACjC;AAAA,MACA,QAAQ;AAAA;AAAA,EACT,GACD;AAEF","sourcesContent":["import { LinearLoader } from \"@dhis2/ui\";\nimport React from \"react\";\nimport styles from \"../../styles/SingleValueContainer.module.css\";\n\nexport default function SingleValuePercentage({\n\tpercentage,\n\tcolor,\n}: any): React.ReactElement {\n\tconst width = \"100%\";\n\treturn (\n\t\t<div className=\"w-100\">\n\t\t\t<LinearLoader\n\t\t\t\tclassName={styles[\"percent-value\"]}\n\t\t\t\twidth={width}\n\t\t\t\tamount={percentage}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/SingleValueContainer/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc","sourcesContent":["export * from \"./SingleValueVisualizer\";\nexport * from \"./types/props\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useContext, useMemo, useEffect } from 'react';
|
|
3
|
-
import { useDimensions } from '../DimensionsProvider';
|
|
4
|
-
import { useDataQuery } from '@dhis2/app-runtime';
|
|
5
|
-
import { useLayout } from '../LayoutProvider';
|
|
6
|
-
import { forEach, set } from 'lodash';
|
|
7
|
-
|
|
8
|
-
const AnalyticsContext = createContext(void 0);
|
|
9
|
-
const analyticsQuery = {
|
|
10
|
-
analytics: {
|
|
11
|
-
resource: "analytics",
|
|
12
|
-
params: ({ dimensions, filters }) => {
|
|
13
|
-
return {
|
|
14
|
-
dimension: Object.keys(dimensions).map((dimension) => `${dimension}:${dimensions[dimension]?.join(";")}`),
|
|
15
|
-
filter: Object.keys(filters).map((dimension) => `${dimension}:${filters[dimension]?.join(";")}`),
|
|
16
|
-
includeMetadataDetails: true
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
function useAnalyticsData() {
|
|
22
|
-
return useContext(AnalyticsContext) ?? { analytics: {}, loading: false };
|
|
23
|
-
}
|
|
24
|
-
function AnalyticsDataProvider({ children }) {
|
|
25
|
-
const [analyticsDimensions] = useDimensions();
|
|
26
|
-
const [layout] = useLayout();
|
|
27
|
-
const { dimensions, filters } = useMemo(() => {
|
|
28
|
-
const dimensions2 = {};
|
|
29
|
-
const filters2 = {};
|
|
30
|
-
forEach([...layout?.columns ?? [], ...layout?.rows ?? []], (dimension) => {
|
|
31
|
-
set(dimensions2, [dimension], analyticsDimensions?.[dimension]);
|
|
32
|
-
});
|
|
33
|
-
forEach([...layout?.filters ?? []], (dimension) => {
|
|
34
|
-
set(filters2, [dimension], analyticsDimensions?.[dimension]);
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
dimensions: dimensions2,
|
|
38
|
-
filters: filters2
|
|
39
|
-
};
|
|
40
|
-
}, [layout, analyticsDimensions]);
|
|
41
|
-
console.log({
|
|
42
|
-
filters
|
|
43
|
-
});
|
|
44
|
-
const { data: analytics, error, loading, refetch, called } = useDataQuery(analyticsQuery, {
|
|
45
|
-
variables: {
|
|
46
|
-
dimensions,
|
|
47
|
-
filters
|
|
48
|
-
},
|
|
49
|
-
lazy: true
|
|
50
|
-
});
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
refetch({
|
|
53
|
-
dimensions,
|
|
54
|
-
filters
|
|
55
|
-
});
|
|
56
|
-
}, [dimensions, filters]);
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
if (error) {
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
}, [error]);
|
|
62
|
-
return /* @__PURE__ */ jsx(AnalyticsContext.Provider, { value: { analytics: analytics?.analytics, loading }, children });
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export { AnalyticsDataProvider, useAnalyticsData };
|
|
66
|
-
//# sourceMappingURL=out.js.map
|
|
67
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Visualization/components/AnalyticsDataProvider/index.tsx"],"names":["dimensions","filters"],"mappings":"AA8EI;AA9EJ,SAAgB,eAAe,YAAY,WAAW,eAAe;AAErE,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,WAAW;AAE7B,MAAM,mBAAmB,cAEvB,MAAS;AAEX,MAAM,iBAAiB;AAAA,EACrB,WAAW;AAAA,IACT,UAAU;AAAA,IACV,QAAQ,CAAC,EAAC,YAAY,QAAO,MAAW;AACtC,aAAO;AAAA,QACL,WAAW,OAAO,KAAK,UAAU,EAAE,IAAI,CAAC,cAAc,GAAG,SAAS,IAAI,WAAW,SAAS,GAAG,KAAK,GAAG,CAAC,EAAE;AAAA,QACxG,QAAQ,OAAO,KAAK,OAAO,EAAE,IAAI,CAAC,cAAc,GAAG,SAAS,IAAI,QAAQ,SAAS,GAAG,KAAK,GAAG,CAAC,EAAE;AAAA,QAC/F,wBAAwB;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AACF;AAMO,SAAS,mBAAmB;AACjC,SAAO,WAAW,gBAAgB,KAAK,EAAC,WAAW,CAAC,GAAG,SAAS,MAAK;AACvE;AAEO,SAAS,sBAAsB,EAAC,SAAQ,GAAsB;AACnE,QAAM,CAAC,mBAAmB,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,IAAI,UAAU;AAC3B,QAAM,EAAC,YAAY,QAAO,IAAI,QAAQ,MAAM;AAC1C,UAAMA,cAAa,CAAC;AACpB,UAAMC,WAAU,CAAC;AAEjB,YAAQ,CAAC,GAAI,QAAQ,WAAW,CAAC,GAAI,GAAI,QAAQ,QAAQ,CAAC,CAAE,GAAG,CAAC,cAAc;AAC5E,UAAID,aAAY,CAAC,SAAS,GAAI,sBAA6C,SAAS,CAAC;AAAA,IACvF,CAAC;AACD,YAAQ,CAAC,GAAI,QAAQ,WAAW,CAAC,CAAE,GAAG,CAAC,cAAc;AACnD,UAAIC,UAAS,CAAC,SAAS,GAAI,sBAA6C,SAAS,CAAC;AAAA,IACpF,CAAC;AAED,WAAO;AAAA,MACL,YAAAD;AAAA,MACA,SAAAC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,mBAAmB,CAAC;AAEhC,UAAQ,IAAI;AAAA,IACV;AAAA,EACF,CAAC;AAED,QAAM,EAAC,MAAM,WAAW,OAAO,SAAS,SAAS,OAAM,IAAI,aAAa,gBAAgB;AAAA,IACtF,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,EACR,CAAC;AAED,YAAU,MAAM;AACd,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,YAAY,OAAO,CAAC;AAExB,YAAU,MAAM;AACd,QAAI,OAAO;AACT,YAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SACE,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,EAAC,WAAW,WAAW,WAAwB,QAAO,GACrF,UACH;AAEJ","sourcesContent":["import React, { createContext, useContext, useEffect, useMemo } from \"react\";\nimport { Analytics, AnalyticsDimension } from \"@hisptz/dhis2-utils\";\nimport { useDimensions } from \"../DimensionsProvider\";\nimport { useDataQuery } from \"@dhis2/app-runtime\";\nimport { useLayout } from \"../LayoutProvider\";\nimport { forEach, set } from \"lodash\";\n\nconst AnalyticsContext = createContext<\n\t{ loading: boolean; analytics: Analytics } | undefined\n>(undefined);\n\nconst analyticsQuery = {\n\t\tanalytics: {\n\t\t\t\tresource: \"analytics\",\n\t\t\t\tparams: ({dimensions, filters}: any) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tdimension: Object.keys(dimensions).map((dimension) => `${dimension}:${dimensions[dimension]?.join(';')}`),\n\t\t\t\t\t\t\t\tfilter: Object.keys(filters).map((dimension) => `${dimension}:${filters[dimension]?.join(';')}`),\n\t\t\t\t\t\t\t\tincludeMetadataDetails: true\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\nexport interface DataProviderProps {\n\t\tchildren: React.ReactNode\n}\n\nexport function useAnalyticsData() {\n\t\treturn useContext(AnalyticsContext) ?? {analytics: {}, loading: false}\n}\n\nexport function AnalyticsDataProvider({children}: DataProviderProps) {\n\t\tconst [analyticsDimensions] = useDimensions();\n\t\tconst [layout] = useLayout();\n\t\tconst {dimensions, filters} = useMemo(() => {\n\t\t\t\tconst dimensions = {};\n\t\t\t\tconst filters = {};\n\n\t\t\t\tforEach([...(layout?.columns ?? []), ...(layout?.rows ?? [])], (dimension) => {\n\t\t\t\t\t\tset(dimensions, [dimension], (analyticsDimensions as AnalyticsDimension)?.[dimension])\n\t\t\t\t})\n\t\t\t\tforEach([...(layout?.filters ?? [])], (dimension) => {\n\t\t\t\t\t\tset(filters, [dimension], (analyticsDimensions as AnalyticsDimension)?.[dimension])\n\t\t\t\t})\n\n\t\t\t\treturn {\n\t\t\t\t\t\tdimensions,\n\t\t\t\t\t\tfilters\n\t\t\t\t}\n\t\t}, [layout, analyticsDimensions]);\n\n\t\tconsole.log({\n\t\t\t\tfilters\n\t\t})\n\n\t\tconst {data: analytics, error, loading, refetch, called} = useDataQuery(analyticsQuery, {\n\t\t\t\tvariables: {\n\t\t\t\t\t\tdimensions,\n\t\t\t\t\t\tfilters\n\t\t\t\t},\n\t\t\t\tlazy: true\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\t\trefetch({\n\t\t\t\t\t\tdimensions,\n\t\t\t\t\t\tfilters\n\t\t\t\t})\n\t\t}, [dimensions, filters]);\n\n\t\tuseEffect(() => {\n\t\t\t\tif (error) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t}, [error])\n\n\t\treturn (\n\t\t\t\t<AnalyticsContext.Provider value={{analytics: analytics?.analytics as Analytics, loading}}>\n\t\t\t\t\t\t{children}\n\t\t\t\t</AnalyticsContext.Provider>\n\t\t)\n}\n"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useContext, useReducer } from 'react';
|
|
3
|
-
import { set } from 'lodash';
|
|
4
|
-
import { useUpdateEffect } from 'usehooks-ts';
|
|
5
|
-
|
|
6
|
-
const DimensionState = createContext({
|
|
7
|
-
dx: [],
|
|
8
|
-
pe: [],
|
|
9
|
-
ou: []
|
|
10
|
-
});
|
|
11
|
-
const DimensionUpdateState = createContext(void 0);
|
|
12
|
-
function reducer(state, { dimension, value }) {
|
|
13
|
-
const updatedState = { ...state ?? {} };
|
|
14
|
-
set(updatedState, [dimension], value);
|
|
15
|
-
return updatedState;
|
|
16
|
-
}
|
|
17
|
-
function useDimensions() {
|
|
18
|
-
return [
|
|
19
|
-
useContext(DimensionState),
|
|
20
|
-
useContext(DimensionUpdateState)
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
function DimensionsProvider({ children, dimensions }) {
|
|
24
|
-
const [state, dispatch] = useReducer(reducer, dimensions);
|
|
25
|
-
useUpdateEffect(() => {
|
|
26
|
-
Object.keys(dimensions).forEach((dimension) => {
|
|
27
|
-
dispatch({ dimension, value: dimensions[dimension] ?? [] });
|
|
28
|
-
});
|
|
29
|
-
}, [dimensions]);
|
|
30
|
-
return /* @__PURE__ */ jsx(DimensionState.Provider, { value: state, children: /* @__PURE__ */ jsx(DimensionUpdateState.Provider, { value: dispatch, children }) });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { DimensionState, DimensionUpdateState, DimensionsProvider, useDimensions };
|
|
34
|
-
//# sourceMappingURL=out.js.map
|
|
35
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Visualization/components/DimensionsProvider/index.tsx"],"names":[],"mappings":"AA6CQ;AA7CR,SAAgB,eAAe,YAAY,kBAAkB;AAE7D,SAAS,WAAW;AACpB,SAAS,uBAAuB;AAKzB,MAAM,iBAAiB,cAAkC;AAAA,EAC5D,IAAI,CAAC;AAAA,EACL,IAAI,CAAC;AAAA,EACL,IAAI,CAAC;AACT,CAAC;AACM,MAAM,uBAAuB,cAA4C,MAAS;AAGzF,SAAS,QAAQ,OAA2B,EAAC,WAAW,MAAK,GAA8C;AACvG,QAAM,eAAe,EAAC,GAAI,SAAS,CAAC,EAAE;AACtC,MAAI,cAAc,CAAC,SAAS,GAAG,KAAK;AACpC,SAAO;AACX;AAOO,SAAS,gBAAgB;AAC5B,SAAO;AAAA,IACH,WAAW,cAAc;AAAA,IACzB,WAAW,oBAAoB;AAAA,EACnC;AACJ;AAEO,SAAS,mBAAmB,EAAC,UAAU,WAAU,GAA2B;AAC/E,QAAM,CAAC,OAAO,QAAQ,IAAI,WAAW,SAAS,UAAU;AAExD,kBAAgB,MAAM;AAClB,WAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,cAAsB;AACnD,eAAS,EAAC,WAAmC,OAAO,WAAW,SAAS,KAAK,CAAC,EAAC,CAAC;AAAA,IACpF,CAAC;AAAA,EACL,GAAG,CAAC,UAAU,CAAC;AAGf,SAAO,oBAAC,eAAe,UAAf,EAAwB,OAAO,OACnC,8BAAC,qBAAqB,UAArB,EAA8B,OAAO,UACjC,UACL,GACJ;AACJ","sourcesContent":["import React, { createContext, useContext, useReducer } from \"react\";\nimport { AnalyticsDimension } from \"@hisptz/dhis2-utils\";\nimport { set } from \"lodash\";\nimport { useUpdateEffect } from \"usehooks-ts\";\n\nexport type Dimension = \"ou\" | \"pe\" | \"dx\" | \"co\";\n\nexport type DimensionUpdater = (data: { dimension: Dimension; value: string[] }) => void\nexport const DimensionState = createContext<AnalyticsDimension>({\n dx: [],\n pe: [],\n ou: []\n})\nexport const DimensionUpdateState = createContext<DimensionUpdater | undefined>(undefined);\n\n\nfunction reducer(state: AnalyticsDimension, {dimension, value}: { dimension: Dimension, value: string[] }) {\n const updatedState = {...(state ?? {})};\n set(updatedState, [dimension], value);\n return updatedState\n}\n\nexport interface DimensionProviderProps {\n children: React.ReactNode,\n dimensions: AnalyticsDimension\n}\n\nexport function useDimensions() {\n return [\n useContext(DimensionState),\n useContext(DimensionUpdateState)\n ] as [AnalyticsDimension, DimensionUpdater]\n}\n\nexport function DimensionsProvider({children, dimensions}: DimensionProviderProps) {\n const [state, dispatch] = useReducer(reducer, dimensions);\n\n useUpdateEffect(() => {\n Object.keys(dimensions).forEach((dimension: string) => {\n dispatch({dimension: dimension as Dimension, value: dimensions[dimension] ?? []})\n })\n }, [dimensions]);\n\n\n return <DimensionState.Provider value={state}>\n <DimensionUpdateState.Provider value={dispatch}>\n {children}\n </DimensionUpdateState.Provider>\n </DimensionState.Provider>\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useContext, useState } from 'react';
|
|
3
|
-
|
|
4
|
-
const LayoutState = createContext(void 0);
|
|
5
|
-
function useLayout() {
|
|
6
|
-
return [
|
|
7
|
-
useContext(LayoutState) ?? { rows: [], filters: [], columns: [] }
|
|
8
|
-
];
|
|
9
|
-
}
|
|
10
|
-
function LayoutProvider({ defaultLayout, children }) {
|
|
11
|
-
const [layout, setLayout] = useState(defaultLayout);
|
|
12
|
-
return /* @__PURE__ */ jsx(LayoutState.Provider, { value: layout, children });
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { LayoutProvider, LayoutState, useLayout };
|
|
16
|
-
//# sourceMappingURL=out.js.map
|
|
17
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Visualization/components/LayoutProvider/index.tsx"],"names":[],"mappings":"AA4BQ;AA5BR,SAAgB,eAAe,YAAY,gBAAgB;AAcpD,MAAM,cAAc,cAAkC,MAAS;AAG/D,SAAS,YAAY;AAExB,SAAO;AAAA,IACH,WAAW,WAAW,KAAK,EAAC,MAAM,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC,EAAC;AAAA,EAClE;AACJ;AAEO,SAAS,eAAe,EAAC,eAAe,SAAQ,GAAwB;AAC3E,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,aAAa;AAElD,SACI,oBAAC,YAAY,UAAZ,EAAqB,OAAO,QACxB,UACL;AAER","sourcesContent":["import React, { createContext, useContext, useState } from \"react\";\nimport { Dimension } from \"../DimensionsProvider\";\n\nexport interface Layout {\n\trows: Dimension[];\n\tcolumns: Dimension[];\n\tfilters: Dimension[];\n}\n\nexport interface LayoutProviderProps {\n children: React.ReactNode;\n defaultLayout: Layout\n}\n\nexport const LayoutState = createContext<Layout | undefined>(undefined);\n\n\nexport function useLayout() {\n\n return [\n useContext(LayoutState) ?? {rows: [], filters: [], columns: []}\n ]\n}\n\nexport function LayoutProvider({defaultLayout, children}: LayoutProviderProps) {\n const [layout, setLayout] = useState(defaultLayout);\n\n return (\n <LayoutState.Provider value={layout}>\n {children}\n </LayoutState.Provider>\n )\n}\n"]}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo, useState, useCallback } from 'react';
|
|
3
|
-
import { Tooltip, Button, IconClock24, IconLocation24 } from '@dhis2/ui';
|
|
4
|
-
import i18n from '@dhis2/d2-i18n';
|
|
5
|
-
import { useDimensions } from '../DimensionsProvider';
|
|
6
|
-
import { PeriodSelectorModal, OrgUnitSelectorModal } from '@hisptz/dhis2-ui';
|
|
7
|
-
import { getOrgUnitSelectionFromIds } from '../VisualizationSelector';
|
|
8
|
-
import { getOrgUnitsSelection } from '../../../Map/utils/map';
|
|
9
|
-
|
|
10
|
-
function VisualizationDimensionSelector({
|
|
11
|
-
showPeriodSelector,
|
|
12
|
-
showOrgUnitSelector
|
|
13
|
-
}) {
|
|
14
|
-
const [dimensions, setDimensions] = useDimensions();
|
|
15
|
-
const periods = useMemo(() => dimensions.pe, [dimensions.pe]);
|
|
16
|
-
const orgUnitSelection = useMemo(
|
|
17
|
-
() => getOrgUnitSelectionFromIds(dimensions.ou ?? []),
|
|
18
|
-
[dimensions.ou]
|
|
19
|
-
);
|
|
20
|
-
const [openFilter, setOpenFilter] = useState();
|
|
21
|
-
const onFilterUpdate = useCallback(
|
|
22
|
-
(type) => (data) => {
|
|
23
|
-
setOpenFilter(void 0);
|
|
24
|
-
if (type === "ou") {
|
|
25
|
-
setDimensions({
|
|
26
|
-
dimension: "ou",
|
|
27
|
-
value: getOrgUnitsSelection(data)
|
|
28
|
-
});
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (type === "pe") {
|
|
32
|
-
setDimensions({ dimension: "pe", value: data });
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
[setDimensions]
|
|
37
|
-
);
|
|
38
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
39
|
-
showPeriodSelector && /* @__PURE__ */ jsx(Tooltip, { content: i18n.t("Period"), children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
41
|
-
PeriodSelectorModal,
|
|
42
|
-
{
|
|
43
|
-
position: "middle",
|
|
44
|
-
enablePeriodSelector: true,
|
|
45
|
-
selectedPeriods: periods,
|
|
46
|
-
onClose: () => setOpenFilter(void 0),
|
|
47
|
-
hide: openFilter !== "pe",
|
|
48
|
-
onUpdate: onFilterUpdate("pe")
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
52
|
-
Button,
|
|
53
|
-
{
|
|
54
|
-
onClick: () => setOpenFilter("pe"),
|
|
55
|
-
icon: /* @__PURE__ */ jsx(IconClock24, {})
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
] }) }),
|
|
59
|
-
showOrgUnitSelector && /* @__PURE__ */ jsx(Tooltip, { content: i18n.t("Location"), children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
OrgUnitSelectorModal,
|
|
62
|
-
{
|
|
63
|
-
showUserOptions: true,
|
|
64
|
-
searchable: true,
|
|
65
|
-
title: i18n.t("Select location(s)"),
|
|
66
|
-
value: orgUnitSelection,
|
|
67
|
-
onClose: () => setOpenFilter(void 0),
|
|
68
|
-
hide: openFilter !== "ou",
|
|
69
|
-
onUpdate: onFilterUpdate("ou")
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ jsx(
|
|
73
|
-
Button,
|
|
74
|
-
{
|
|
75
|
-
onClick: () => setOpenFilter("ou"),
|
|
76
|
-
icon: /* @__PURE__ */ jsx(IconLocation24, {})
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
] }) })
|
|
80
|
-
] }) });
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export { VisualizationDimensionSelector };
|
|
84
|
-
//# sourceMappingURL=out.js.map
|
|
85
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/components/Visualization/components/VisualizationDimensionSelector/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Visualization/components/VisualizationDimensionSelector/index.tsx"],"names":[],"mappings":"AA+CM,mBACC,KADD;AA/CN,SAAgB,aAAa,SAAS,gBAAgB;AACtD,SAAS,QAAQ,aAAa,gBAAgB,eAAe;AAC7D,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB,2BAA2B;AAE1D,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AAE9B,SAAS,+BAA+B;AAAA,EAC9C;AAAA,EACA;AACD,GAGG;AACF,QAAM,CAAC,YAAY,aAAa,IAAI,cAAc;AAClD,QAAM,UAAU,QAAQ,MAAM,WAAW,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5D,QAAM,mBAAmB;AAAA,IACxB,MAAM,2BAA2B,WAAW,MAAM,CAAC,CAAC;AAAA,IACpD,CAAC,WAAW,EAAE;AAAA,EACf;AACA,QAAM,CAAC,YAAY,aAAa,IAAI,SAAkC;AAEtE,QAAM,iBAAiB;AAAA,IACtB,CAAC,SAAsB,CAAC,SAAiC;AACxD,oBAAc,MAAS;AACvB,UAAI,SAAS,MAAM;AAClB,sBAAc;AAAA,UACb,WAAW;AAAA,UACX,OAAO,qBAAqB,IAAI;AAAA,QACjC,CAAC;AACD;AAAA,MACD;AACA,UAAI,SAAS,MAAM;AAClB,sBAAc,EAAE,WAAW,MAAM,OAAO,KAAK,CAAC;AAC9C;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAC,aAAa;AAAA,EACf;AAEA,SACC,gCACC,+BAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,KAAK,EAAE,GACpC;AAAA,0BACA,oBAAC,WAAQ,SAAS,KAAK,EAAE,QAAQ,GAChC,2CACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,UAAS;AAAA,UACT,sBAAoB;AAAA,UACpB,iBAAiB;AAAA,UACjB,SAAS,MAAM,cAAc,MAAS;AAAA,UACtC,MAAM,eAAe;AAAA,UACrB,UAAU,eAAe,IAAI;AAAA;AAAA,MAC9B;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACA,SAAS,MAAM,cAAc,IAAI;AAAA,UACjC,MAAM,oBAAC,eAAY;AAAA;AAAA,MACpB;AAAA,OACD,GACD;AAAA,IAEA,uBACA,oBAAC,WAAQ,SAAS,KAAK,EAAE,UAAU,GAClC,2CACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,iBAAe;AAAA,UACf,YAAU;AAAA,UACV,OAAO,KAAK,EAAE,oBAAoB;AAAA,UAClC,OAAO;AAAA,UACP,SAAS,MAAM,cAAc,MAAS;AAAA,UACtC,MAAM,eAAe;AAAA,UACrB,UAAU,eAAe,IAAI;AAAA;AAAA,MAC9B;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACA,SAAS,MAAM,cAAc,IAAI;AAAA,UACjC,MAAM,oBAAC,kBAAe;AAAA;AAAA,MACvB;AAAA,OACD,GACD;AAAA,KAEF,GACD;AAEF","sourcesContent":["import React, { useCallback, useMemo, useState } from \"react\";\nimport { Button, IconClock24, IconLocation24, Tooltip } from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { useDimensions } from \"../DimensionsProvider\";\nimport { OrgUnitSelectorModal, PeriodSelectorModal } from \"@hisptz/dhis2-ui\";\nimport { OrgUnitSelection } from \"@hisptz/dhis2-utils\";\nimport { getOrgUnitSelectionFromIds } from \"../VisualizationSelector\";\nimport { getOrgUnitsSelection } from \"../../../Map/utils/map\";\n\nexport function VisualizationDimensionSelector({\n\tshowPeriodSelector,\n\tshowOrgUnitSelector,\n}: {\n\tshowPeriodSelector?: boolean;\n\tshowOrgUnitSelector?: boolean;\n}) {\n\tconst [dimensions, setDimensions] = useDimensions();\n\tconst periods = useMemo(() => dimensions.pe, [dimensions.pe]);\n\tconst orgUnitSelection = useMemo(\n\t\t() => getOrgUnitSelectionFromIds(dimensions.ou ?? []),\n\t\t[dimensions.ou],\n\t);\n\tconst [openFilter, setOpenFilter] = useState<\"pe\" | \"ou\" | undefined>();\n\n\tconst onFilterUpdate = useCallback(\n\t\t(type: \"ou\" | \"pe\") => (data: OrgUnitSelection | any) => {\n\t\t\tsetOpenFilter(undefined);\n\t\t\tif (type === \"ou\") {\n\t\t\t\tsetDimensions({\n\t\t\t\t\tdimension: \"ou\",\n\t\t\t\t\tvalue: getOrgUnitsSelection(data),\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (type === \"pe\") {\n\t\t\t\tsetDimensions({ dimension: \"pe\", value: data });\n\t\t\t\treturn;\n\t\t\t}\n\t\t},\n\t\t[setDimensions],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<div style={{ display: \"flex\", gap: 8 }}>\n\t\t\t\t{showPeriodSelector && (\n\t\t\t\t\t<Tooltip content={i18n.t(\"Period\")}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PeriodSelectorModal\n\t\t\t\t\t\t\t\tposition=\"middle\"\n\t\t\t\t\t\t\t\tenablePeriodSelector\n\t\t\t\t\t\t\t\tselectedPeriods={periods}\n\t\t\t\t\t\t\t\tonClose={() => setOpenFilter(undefined)}\n\t\t\t\t\t\t\t\thide={openFilter !== \"pe\"}\n\t\t\t\t\t\t\t\tonUpdate={onFilterUpdate(\"pe\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={() => setOpenFilter(\"pe\")}\n\t\t\t\t\t\t\t\ticon={<IconClock24 />}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t)}\n\t\t\t\t{showOrgUnitSelector && (\n\t\t\t\t\t<Tooltip content={i18n.t(\"Location\")}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<OrgUnitSelectorModal\n\t\t\t\t\t\t\t\tshowUserOptions\n\t\t\t\t\t\t\t\tsearchable\n\t\t\t\t\t\t\t\ttitle={i18n.t(\"Select location(s)\")}\n\t\t\t\t\t\t\t\tvalue={orgUnitSelection}\n\t\t\t\t\t\t\t\tonClose={() => setOpenFilter(undefined)}\n\t\t\t\t\t\t\t\thide={openFilter !== \"ou\"}\n\t\t\t\t\t\t\t\tonUpdate={onFilterUpdate(\"ou\")}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={() => setOpenFilter(\"ou\")}\n\t\t\t\t\t\t\t\ticon={<IconLocation24 />}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { LayoutProvider } from '../LayoutProvider';
|
|
3
|
-
import { DimensionsProvider } from '../DimensionsProvider';
|
|
4
|
-
import { AnalyticsDataProvider } from '../AnalyticsDataProvider';
|
|
5
|
-
import { VisualizationTypeProvider } from '../VisualizationTypeProvider';
|
|
6
|
-
|
|
7
|
-
function VisualizationProvider({ layout, dimensions, children, type, config }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(DimensionsProvider, { dimensions, children: /* @__PURE__ */ jsx(VisualizationTypeProvider, { config, defaultType: type, children: /* @__PURE__ */ jsx(LayoutProvider, { defaultLayout: layout, children: /* @__PURE__ */ jsx(AnalyticsDataProvider, { children }) }) }) });
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { VisualizationProvider };
|
|
12
|
-
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Visualization/components/VisualizationProvider/index.tsx"],"names":[],"mappings":"AAyBoB;AAxBpB,SAAiB,sBAAsB;AAEvC,SAAS,0BAA0B;AACnC,SAAS,6BAA6B;AACtC;AAAA,EAEC;AAAA,OACM;AAWA,SAAS,sBAAsB,EAAC,QAAQ,YAAY,UAAU,MAAM,OAAM,GAA+B;AAE5G,SACI,oBAAC,sBAAmB,YAChB,8BAAC,6BAA0B,QAAgB,aAAa,MACpD,8BAAC,kBAAe,eAAe,QAC3B,8BAAC,yBACI,UACL,GACJ,GACJ,GACJ;AAER","sourcesContent":["import React from \"react\";\nimport { Layout, LayoutProvider } from \"../LayoutProvider\";\nimport { AnalyticsDimension } from \"@hisptz/dhis2-utils\";\nimport { DimensionsProvider } from \"../DimensionsProvider\";\nimport { AnalyticsDataProvider } from \"../AnalyticsDataProvider\";\nimport {\n\tVisualizationType,\n\tVisualizationTypeProvider,\n} from \"../VisualizationTypeProvider\";\nimport { VisualizationConfig } from \"../../index\";\n\nexport interface VisualizationProviderProps {\n\tchildren: React.ReactNode;\n\tlayout: Layout;\n\tdimensions: AnalyticsDimension;\n\ttype: VisualizationType;\n\tconfig: VisualizationConfig;\n}\n\nexport function VisualizationProvider({layout, dimensions, children, type, config}: VisualizationProviderProps) {\n\n return (\n <DimensionsProvider dimensions={dimensions}>\n <VisualizationTypeProvider config={config} defaultType={type}>\n <LayoutProvider defaultLayout={layout}>\n <AnalyticsDataProvider>\n {children}\n </AnalyticsDataProvider>\n </LayoutProvider>\n </VisualizationTypeProvider>\n </DimensionsProvider>\n )\n}\n"]}
|