@hisptz/dhis2-analytics 1.0.66 → 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 +254 -0
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.js.map +1 -0
- package/dist/components/ChartAnalytics/DHIS2Chart.js +36 -0
- package/dist/components/ChartAnalytics/DHIS2Chart.js.map +1 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +52 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js.map +1 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +42 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.js.map +1 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.js +65 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.js.map +1 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +3 -0
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js.map +1 -0
- package/dist/components/ChartAnalytics/hooks/useChart.js +43 -0
- package/dist/components/ChartAnalytics/hooks/useChart.js.map +1 -0
- package/dist/components/ChartAnalytics/index.js +3 -0
- package/dist/components/ChartAnalytics/index.js.map +1 -0
- package/dist/components/ChartAnalytics/models/bar.js +21 -0
- package/dist/components/ChartAnalytics/models/bar.js.map +1 -0
- package/{build/es → dist}/components/ChartAnalytics/models/column.js +12 -9
- package/dist/components/ChartAnalytics/models/column.js.map +1 -0
- package/dist/components/ChartAnalytics/models/index.js +114 -0
- package/dist/components/ChartAnalytics/models/index.js.map +1 -0
- package/{build/es → dist}/components/ChartAnalytics/models/line.js +10 -7
- package/dist/components/ChartAnalytics/models/line.js.map +1 -0
- package/dist/components/ChartAnalytics/models/multi-series.js +112 -0
- package/dist/components/ChartAnalytics/models/multi-series.js.map +1 -0
- package/dist/components/ChartAnalytics/models/pie.js +53 -0
- package/dist/components/ChartAnalytics/models/pie.js.map +1 -0
- package/dist/components/ChartAnalytics/services/export.js +35 -0
- package/dist/components/ChartAnalytics/services/export.js.map +1 -0
- 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 +3 -0
- package/dist/components/ChartAnalytics/types/props.js.map +1 -0
- package/dist/components/ChartAnalytics/utils/chart.js +130 -0
- package/dist/components/ChartAnalytics/utils/chart.js.map +1 -0
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js +66 -0
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js.map +1 -0
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +42 -0
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.js.map +1 -0
- package/dist/components/CircularProgressDashboard/index.js +4 -0
- package/dist/components/CircularProgressDashboard/index.js.map +1 -0
- package/dist/components/CircularProgressDashboard/types/props.js +3 -0
- package/dist/components/CircularProgressDashboard/types/props.js.map +1 -0
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js +26 -0
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js.map +1 -0
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.js +30 -0
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.js.map +1 -0
- package/dist/components/DHIS2PivotTable/components/Table/index.js +10 -0
- package/dist/components/DHIS2PivotTable/components/Table/index.js.map +1 -0
- package/dist/components/DHIS2PivotTable/components/TableBody/TableBody.module.css +11 -0
- package/dist/components/DHIS2PivotTable/components/TableBody/TableBody.module.css.map +1 -0
- package/dist/components/DHIS2PivotTable/components/TableBody/index.js +106 -0
- package/dist/components/DHIS2PivotTable/components/TableBody/index.js.map +1 -0
- package/dist/components/DHIS2PivotTable/components/TableHeaders/TableHeaders.module.css +10 -0
- package/dist/components/DHIS2PivotTable/components/TableHeaders/TableHeaders.module.css.map +1 -0
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js +94 -0
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js.map +1 -0
- package/dist/components/DHIS2PivotTable/index.js +4 -0
- package/dist/components/DHIS2PivotTable/index.js.map +1 -0
- package/dist/components/DHIS2PivotTable/interfaces/index.js +3 -0
- package/dist/components/DHIS2PivotTable/interfaces/index.js.map +1 -0
- package/dist/components/DHIS2PivotTable/services/engine.js +87 -0
- package/dist/components/DHIS2PivotTable/services/engine.js.map +1 -0
- package/dist/components/DHIS2PivotTable/state/engine.js +17 -0
- package/dist/components/DHIS2PivotTable/state/engine.js.map +1 -0
- package/dist/components/Map/DHIS2Map.js +65 -0
- package/dist/components/Map/DHIS2Map.js.map +1 -0
- package/dist/components/Map/DHIS2Map.stories.js +366 -0
- package/dist/components/Map/DHIS2Map.stories.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js +41 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +34 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js +26 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +21 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js +67 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js +134 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js +44 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js +67 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js +24 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js +67 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js +45 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js.map +1 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js +4 -0
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js.map +1 -0
- package/dist/components/Map/components/MapArea/index.js +100 -0
- package/dist/components/Map/components/MapArea/index.js.map +1 -0
- package/dist/components/Map/components/MapArea/interfaces/index.js +3 -0
- package/dist/components/Map/components/MapArea/interfaces/index.js.map +1 -0
- package/dist/components/Map/components/MapControls/components/CustomControl/index.js +16 -0
- package/dist/components/Map/components/MapControls/components/CustomControl/index.js.map +1 -0
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.js +15 -0
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.js.map +1 -0
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.js +13 -0
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.js.map +1 -0
- package/dist/components/Map/components/MapControls/index.js +35 -0
- package/dist/components/Map/components/MapControls/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +10 -0
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js +52 -0
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +100 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +457 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +32 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +197 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +3 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js.map +1 -0
- 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/{build/es → dist}/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +106 -146
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +93 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css +10 -0
- package/dist/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css.map +1 -0
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +17 -0
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.js +179 -0
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +92 -0
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +11 -0
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.js +48 -0
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +64 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +130 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +41 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +50 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +56 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +40 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +40 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +12 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js +55 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js.map +1 -0
- 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 +32 -0
- package/dist/components/Map/components/MapLayer/index.js.map +1 -0
- package/dist/components/Map/components/MapLayer/interfaces/index.js +10 -0
- package/dist/components/Map/components/MapLayer/interfaces/index.js.map +1 -0
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +405 -0
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -0
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js +115 -0
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -0
- package/dist/components/Map/components/MapProvider/hooks/index.js +16 -0
- package/dist/components/Map/components/MapProvider/hooks/index.js.map +1 -0
- package/dist/components/Map/components/MapProvider/index.js +95 -0
- package/dist/components/Map/components/MapProvider/index.js.map +1 -0
- package/dist/components/Map/components/MapUpdater/index.js +11 -0
- package/dist/components/Map/components/MapUpdater/index.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js +41 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +24 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js +174 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +21 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +36 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js.map +1 -0
- package/{build/es/components/Map → dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect}/constants/colors.js +18 -3
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +71 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css +15 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css +12 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +82 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +57 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +44 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +60 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.js +54 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.js +63 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/index.js +5 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/index.js.map +1 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.js +3 -0
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.js.map +1 -0
- package/{build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect → dist/components/Map}/constants/colors.js +19 -3
- package/dist/components/Map/constants/colors.js.map +1 -0
- package/dist/components/Map/constants/legendSet.js +23 -0
- package/dist/components/Map/constants/legendSet.js.map +1 -0
- package/dist/components/Map/hooks/map.js +44 -0
- package/dist/components/Map/hooks/map.js.map +1 -0
- package/dist/components/Map/index.js +7 -0
- package/dist/components/Map/index.js.map +1 -0
- package/dist/components/Map/interfaces/index.js +3 -0
- package/dist/components/Map/interfaces/index.js.map +1 -0
- package/dist/components/Map/state/index.js +18 -0
- package/dist/components/Map/state/index.js.map +1 -0
- package/dist/components/Map/utils/colors.js +85 -0
- package/dist/components/Map/utils/colors.js.map +1 -0
- package/dist/components/Map/utils/helpers.js +18 -0
- package/dist/components/Map/utils/helpers.js.map +1 -0
- package/dist/components/Map/utils/map.js +138 -0
- package/dist/components/Map/utils/map.js.map +1 -0
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.js +145 -0
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.js.map +1 -0
- package/dist/components/SingleValueContainer/SingleValueVisualizer.js +44 -0
- package/dist/components/SingleValueContainer/SingleValueVisualizer.js.map +1 -0
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +49 -0
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js.map +1 -0
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +22 -0
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js.map +1 -0
- package/dist/components/SingleValueContainer/index.js +5 -0
- package/dist/components/SingleValueContainer/index.js.map +1 -0
- package/dist/components/SingleValueContainer/styles/SingleValueContainer.module.css +32 -0
- package/dist/components/SingleValueContainer/styles/SingleValueContainer.module.css.map +1 -0
- package/dist/components/SingleValueContainer/types/props.js +3 -0
- package/dist/components/SingleValueContainer/types/props.js.map +1 -0
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.js +94 -0
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.js.map +1 -0
- package/dist/components/Visualization/components/DimensionsProvider/index.js +35 -0
- package/dist/components/Visualization/components/DimensionsProvider/index.js.map +1 -0
- package/dist/components/Visualization/components/LayoutProvider/index.js +18 -0
- package/dist/components/Visualization/components/LayoutProvider/index.js.map +1 -0
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js +85 -0
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js.map +1 -0
- package/dist/components/Visualization/components/VisualizationProvider/index.js +19 -0
- package/dist/components/Visualization/components/VisualizationProvider/index.js.map +1 -0
- package/dist/components/Visualization/components/VisualizationSelector/index.js +167 -0
- package/dist/components/Visualization/components/VisualizationSelector/index.js.map +1 -0
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.js +27 -0
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.js.map +1 -0
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.js +55 -0
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.js.map +1 -0
- package/dist/components/Visualization/index.js +113 -0
- package/dist/components/Visualization/index.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts +26 -0
- package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts +3 -3
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/components/DownloadMenu/constants/menu.d.ts +1 -0
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/constants/menu.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts +3 -2
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.d.ts +1 -0
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/hooks/useChart.d.ts +3 -2
- package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts.map +1 -0
- package/dist/types/components/ChartAnalytics/index.d.ts +2 -0
- package/dist/types/components/ChartAnalytics/index.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/models/bar.d.ts +2 -1
- package/dist/types/components/ChartAnalytics/models/bar.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/models/column.d.ts +2 -1
- package/dist/types/components/ChartAnalytics/models/column.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/models/index.d.ts +2 -1
- package/dist/types/components/ChartAnalytics/models/index.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/models/line.d.ts +2 -1
- package/dist/types/components/ChartAnalytics/models/line.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/models/multi-series.d.ts +2 -1
- package/dist/types/components/ChartAnalytics/models/multi-series.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/models/pie.d.ts +2 -1
- package/dist/types/components/ChartAnalytics/models/pie.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/services/export.d.ts +1 -0
- package/dist/types/components/ChartAnalytics/services/export.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/types/props.d.ts +1 -0
- package/dist/types/components/ChartAnalytics/types/props.d.ts.map +1 -0
- package/{build → dist}/types/components/ChartAnalytics/utils/chart.d.ts +3 -2
- package/dist/types/components/ChartAnalytics/utils/chart.d.ts.map +1 -0
- package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts +6 -0
- package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts.map +1 -0
- package/dist/types/components/CircularProgressDashboard/index.d.ts +3 -0
- package/dist/types/components/CircularProgressDashboard/index.d.ts.map +1 -0
- package/{build → dist}/types/components/CircularProgressDashboard/types/props.d.ts +1 -0
- package/dist/types/components/CircularProgressDashboard/types/props.d.ts.map +1 -0
- package/{build/types/components/CustomPivotTable/index.d.ts → dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts} +8 -12
- package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts.map +1 -0
- package/dist/types/components/DHIS2PivotTable/components/Table/index.d.ts +9 -0
- package/dist/types/components/DHIS2PivotTable/components/Table/index.d.ts.map +1 -0
- package/dist/types/components/DHIS2PivotTable/components/TableBody/index.d.ts +2 -0
- package/dist/types/components/DHIS2PivotTable/components/TableBody/index.d.ts.map +1 -0
- package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts +2 -0
- package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts.map +1 -0
- package/dist/types/components/DHIS2PivotTable/index.d.ts +3 -0
- package/dist/types/components/DHIS2PivotTable/index.d.ts.map +1 -0
- package/{build/types/components/CustomPivotTable → dist/types/components/DHIS2PivotTable}/interfaces/index.d.ts +1 -0
- package/dist/types/components/DHIS2PivotTable/interfaces/index.d.ts.map +1 -0
- package/{build/types/components/CustomPivotTable → dist/types/components/DHIS2PivotTable}/services/engine.d.ts +4 -3
- package/dist/types/components/DHIS2PivotTable/services/engine.d.ts.map +1 -0
- package/dist/types/components/DHIS2PivotTable/state/engine.d.ts +8 -0
- package/dist/types/components/DHIS2PivotTable/state/engine.d.ts.map +1 -0
- package/dist/types/components/Map/DHIS2Map.d.ts +9 -0
- package/dist/types/components/Map/DHIS2Map.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts +10 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.d.ts +9 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts +2 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts +2 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts +2 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts +2 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts +2 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts +4 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts +8 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts.map +1 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts +3 -0
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapArea/index.d.ts +2 -1
- package/dist/types/components/Map/components/MapArea/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapArea/interfaces/index.d.ts +1 -0
- package/dist/types/components/Map/components/MapArea/interfaces/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapControls/components/CustomControl/index.d.ts +2 -1
- package/dist/types/components/Map/components/MapControls/components/CustomControl/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapControls/components/DownloadControl/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapControls/components/DownloadControl/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapControls/components/FullscreenControl/index.d.ts +1 -0
- package/dist/types/components/Map/components/MapControls/components/FullscreenControl/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapControls/index.d.ts +6 -0
- package/dist/types/components/Map/components/MapControls/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts +2 -0
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts +6 -6
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts +4 -3
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts +2 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts +3 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts +4 -0
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts +2 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts +3 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts +3 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts +4 -4
- package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.d.ts +1 -0
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts +3 -0
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts +2 -0
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts +3 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts +2 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts +4 -3
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts +12 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts +5 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts +3 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts +5 -0
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapLayer/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapLayer/interfaces/index.d.ts +5 -4
- package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.d.ts +1 -0
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts +7 -0
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapProvider/hooks/index.d.ts +4 -3
- package/dist/types/components/Map/components/MapProvider/hooks/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/MapProvider/index.d.ts +3 -0
- package/dist/types/components/Map/components/MapProvider/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/MapUpdater/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapUpdater/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.d.ts +3 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts +3 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts +8 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.d.ts +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts +2 -2
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts +2 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts +2 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.d.ts +2 -2
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.d.ts +2 -2
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/RadiusField.d.ts +2 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/RadiusField.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/TypeField.d.ts +2 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/TypeField.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts +4 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts.map +1 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/types/index.d.ts +15 -0
- package/dist/types/components/Map/components/ThematicLayerConfiguration/types/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/constants/colors.d.ts +1 -0
- package/dist/types/components/Map/constants/colors.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/constants/legendSet.d.ts +1 -0
- package/dist/types/components/Map/constants/legendSet.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/hooks/map.d.ts +1 -0
- package/dist/types/components/Map/hooks/map.d.ts.map +1 -0
- package/dist/types/components/Map/index.d.ts +6 -0
- package/dist/types/components/Map/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/interfaces/index.d.ts +3 -2
- package/dist/types/components/Map/interfaces/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/state/index.d.ts +3 -2
- package/dist/types/components/Map/state/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/utils/colors.d.ts +2 -1
- package/dist/types/components/Map/utils/colors.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/utils/helpers.d.ts +1 -0
- package/dist/types/components/Map/utils/helpers.d.ts.map +1 -0
- package/{build → dist}/types/components/Map/utils/map.d.ts +1 -0
- package/dist/types/components/Map/utils/map.d.ts.map +1 -0
- package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts +11 -0
- package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts.map +1 -0
- package/{build → dist}/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts +2 -1
- package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts.map +1 -0
- package/{build → dist}/types/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.d.ts +2 -1
- package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.d.ts.map +1 -0
- package/dist/types/components/SingleValueContainer/index.d.ts +4 -0
- package/dist/types/components/SingleValueContainer/index.d.ts.map +1 -0
- package/{build → dist}/types/components/SingleValueContainer/types/props.d.ts +3 -1
- package/dist/types/components/SingleValueContainer/types/props.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts +2 -1
- package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/components/DimensionsProvider/index.d.ts +2 -1
- package/dist/types/components/Visualization/components/DimensionsProvider/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/components/LayoutProvider/index.d.ts +3 -2
- package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts +3 -3
- package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/components/VisualizationProvider/index.d.ts +5 -4
- package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts.map +1 -0
- package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts +23 -0
- package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts +3 -2
- package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts.map +1 -0
- package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts +2 -0
- package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts.map +1 -0
- package/{build → dist}/types/components/Visualization/index.d.ts +8 -8
- package/dist/types/components/Visualization/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +59 -63
- package/README.md +0 -45
- package/build/cjs/components/ChartAnalytics/ChartAnalytics.test.js +0 -51
- package/build/cjs/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +0 -48
- package/build/cjs/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +0 -34
- package/build/cjs/components/ChartAnalytics/components/DownloadMenu/index.js +0 -65
- package/build/cjs/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +0 -1
- package/build/cjs/components/ChartAnalytics/hooks/useChart.js +0 -38
- package/build/cjs/components/ChartAnalytics/index.js +0 -86
- package/build/cjs/components/ChartAnalytics/models/bar.js +0 -24
- package/build/cjs/components/ChartAnalytics/models/column.js +0 -53
- package/build/cjs/components/ChartAnalytics/models/index.js +0 -112
- package/build/cjs/components/ChartAnalytics/models/line.js +0 -35
- package/build/cjs/components/ChartAnalytics/models/multi-series.js +0 -111
- package/build/cjs/components/ChartAnalytics/models/pie.js +0 -53
- package/build/cjs/components/ChartAnalytics/services/export.js +0 -50
- package/build/cjs/components/ChartAnalytics/styles/custom-highchart.css +0 -48
- package/build/cjs/components/ChartAnalytics/types/props.js +0 -1
- package/build/cjs/components/ChartAnalytics/utils/chart.js +0 -138
- package/build/cjs/components/CircularProgressDashboard/CircularProgressIndicator.test.js +0 -13
- package/build/cjs/components/CircularProgressDashboard/index.js +0 -64
- package/build/cjs/components/CircularProgressDashboard/types/props.js +0 -1
- package/build/cjs/components/CustomPivotTable/components/Table/index.js +0 -16
- package/build/cjs/components/CustomPivotTable/components/TableBody/TableBody.module.css +0 -12
- package/build/cjs/components/CustomPivotTable/components/TableBody/index.js +0 -109
- package/build/cjs/components/CustomPivotTable/components/TableHeaders/TableHeaders.module.css +0 -10
- package/build/cjs/components/CustomPivotTable/components/TableHeaders/index.js +0 -89
- package/build/cjs/components/CustomPivotTable/index.js +0 -30
- package/build/cjs/components/CustomPivotTable/interfaces/index.js +0 -1
- package/build/cjs/components/CustomPivotTable/services/engine.js +0 -89
- package/build/cjs/components/CustomPivotTable/state/engine.js +0 -23
- package/build/cjs/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +0 -32
- package/build/cjs/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +0 -40
- package/build/cjs/components/Map/components/EarthEngineLayerConfiguration/index.js +0 -458
- package/build/cjs/components/Map/components/MapArea/index.js +0 -101
- package/build/cjs/components/Map/components/MapArea/interfaces/index.js +0 -1
- package/build/cjs/components/Map/components/MapControls/components/CustomControl/index.js +0 -32
- package/build/cjs/components/Map/components/MapControls/components/DownloadControl/index.js +0 -25
- package/build/cjs/components/Map/components/MapControls/components/FullscreenControl/index.js +0 -13
- package/build/cjs/components/Map/components/MapControls/index.js +0 -42
- package/build/cjs/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +0 -13
- package/build/cjs/components/Map/components/MapLayer/components/BoundaryLayer/index.js +0 -51
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +0 -104
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +0 -379
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +0 -36
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +0 -200
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +0 -1
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +0 -15
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +0 -403
- package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +0 -124
- package/build/cjs/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css +0 -12
- package/build/cjs/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +0 -26
- package/build/cjs/components/Map/components/MapLayer/components/LegendArea/index.js +0 -180
- package/build/cjs/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +0 -86
- package/build/cjs/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +0 -14
- package/build/cjs/components/Map/components/MapLayer/components/PointLayer/index.js +0 -46
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +0 -57
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +0 -145
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +0 -43
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +0 -56
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +0 -61
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +0 -43
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +0 -35
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +0 -15
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/index.js +0 -57
- package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +0 -62
- package/build/cjs/components/Map/components/MapLayer/index.js +0 -40
- package/build/cjs/components/Map/components/MapLayer/interfaces/index.js +0 -8
- package/build/cjs/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +0 -399
- package/build/cjs/components/Map/components/MapProvider/components/MapLayerProvider/index.js +0 -116
- package/build/cjs/components/Map/components/MapProvider/hooks/index.js +0 -19
- package/build/cjs/components/Map/components/MapProvider/index.js +0 -121
- package/build/cjs/components/Map/components/MapUpdater/index.js +0 -24
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +0 -32
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +0 -40
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +0 -40
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js +0 -428
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +0 -63
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css +0 -15
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css +0 -12
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +0 -72
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +0 -71
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +0 -47
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +0 -79
- package/build/cjs/components/Map/components/ThematicLayerConfiguration/index.js +0 -265
- package/build/cjs/components/Map/constants/colors.js +0 -429
- package/build/cjs/components/Map/constants/legendSet.js +0 -22
- package/build/cjs/components/Map/hooks/map.js +0 -52
- package/build/cjs/components/Map/index.js +0 -108
- package/build/cjs/components/Map/interfaces/index.js +0 -1
- package/build/cjs/components/Map/state/index.js +0 -23
- package/build/cjs/components/Map/utils/colors.js +0 -78
- package/build/cjs/components/Map/utils/helpers.js +0 -25
- package/build/cjs/components/Map/utils/map.js +0 -161
- package/build/cjs/components/SingleValueContainer/SingleValueContainer.test.js +0 -23
- package/build/cjs/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +0 -54
- package/build/cjs/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +0 -24
- package/build/cjs/components/SingleValueContainer/index.js +0 -59
- package/build/cjs/components/SingleValueContainer/styles/SingleValueContainer.module.css +0 -39
- package/build/cjs/components/SingleValueContainer/types/props.js +0 -1
- package/build/cjs/components/Visualization/components/AnalyticsDataProvider/index.js +0 -102
- package/build/cjs/components/Visualization/components/DimensionsProvider/index.js +0 -56
- package/build/cjs/components/Visualization/components/LayoutProvider/index.js +0 -31
- package/build/cjs/components/Visualization/components/VisualizationDimensionSelector/index.js +0 -77
- package/build/cjs/components/Visualization/components/VisualizationProvider/index.js +0 -29
- package/build/cjs/components/Visualization/components/VisualizationSelector/index.js +0 -180
- package/build/cjs/components/Visualization/components/VisualizationTypeProvider/index.js +0 -40
- package/build/cjs/components/Visualization/components/VisualizationTypeSelector/index.js +0 -54
- package/build/cjs/components/Visualization/index.js +0 -96
- package/build/cjs/index.js +0 -71
- package/build/cjs/locales/en/translations.json +0 -138
- package/build/cjs/locales/index.js +0 -22
- package/build/es/components/ChartAnalytics/ChartAnalytics.test.js +0 -46
- package/build/es/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +0 -41
- package/build/es/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +0 -26
- package/build/es/components/ChartAnalytics/components/DownloadMenu/index.js +0 -57
- package/build/es/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +0 -1
- package/build/es/components/ChartAnalytics/hooks/useChart.js +0 -32
- package/build/es/components/ChartAnalytics/index.js +0 -40
- package/build/es/components/ChartAnalytics/models/bar.js +0 -16
- package/build/es/components/ChartAnalytics/models/index.js +0 -105
- package/build/es/components/ChartAnalytics/models/multi-series.js +0 -104
- package/build/es/components/ChartAnalytics/models/pie.js +0 -46
- package/build/es/components/ChartAnalytics/services/export.js +0 -36
- package/build/es/components/ChartAnalytics/styles/custom-highchart.css +0 -48
- package/build/es/components/ChartAnalytics/types/props.js +0 -1
- package/build/es/components/ChartAnalytics/utils/chart.js +0 -127
- package/build/es/components/CircularProgressDashboard/CircularProgressIndicator.test.js +0 -10
- package/build/es/components/CircularProgressDashboard/index.js +0 -42
- package/build/es/components/CircularProgressDashboard/types/props.js +0 -1
- package/build/es/components/CustomPivotTable/components/Table/index.js +0 -9
- package/build/es/components/CustomPivotTable/components/TableBody/TableBody.module.css +0 -12
- package/build/es/components/CustomPivotTable/components/TableBody/index.js +0 -100
- package/build/es/components/CustomPivotTable/components/TableHeaders/TableHeaders.module.css +0 -10
- package/build/es/components/CustomPivotTable/components/TableHeaders/index.js +0 -82
- package/build/es/components/CustomPivotTable/index.js +0 -22
- package/build/es/components/CustomPivotTable/interfaces/index.js +0 -1
- package/build/es/components/CustomPivotTable/services/engine.js +0 -82
- package/build/es/components/CustomPivotTable/state/engine.js +0 -14
- package/build/es/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +0 -23
- package/build/es/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +0 -31
- package/build/es/components/Map/components/EarthEngineLayerConfiguration/index.js +0 -448
- package/build/es/components/Map/components/MapArea/index.js +0 -91
- package/build/es/components/Map/components/MapArea/interfaces/index.js +0 -1
- package/build/es/components/Map/components/MapControls/components/CustomControl/index.js +0 -25
- package/build/es/components/Map/components/MapControls/components/DownloadControl/index.js +0 -18
- package/build/es/components/Map/components/MapControls/components/FullscreenControl/index.js +0 -6
- package/build/es/components/Map/components/MapControls/index.js +0 -35
- package/build/es/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +0 -7
- package/build/es/components/Map/components/MapLayer/components/BoundaryLayer/index.js +0 -41
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +0 -93
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +0 -369
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +0 -29
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +0 -191
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +0 -1
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +0 -15
- package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +0 -111
- package/build/es/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css +0 -12
- package/build/es/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +0 -19
- package/build/es/components/Map/components/MapLayer/components/LegendArea/index.js +0 -171
- package/build/es/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +0 -76
- package/build/es/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +0 -8
- package/build/es/components/Map/components/MapLayer/components/PointLayer/index.js +0 -39
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +0 -49
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +0 -133
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +0 -33
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +0 -47
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +0 -50
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +0 -36
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +0 -28
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +0 -9
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/index.js +0 -50
- package/build/es/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +0 -62
- package/build/es/components/Map/components/MapLayer/index.js +0 -33
- package/build/es/components/Map/components/MapLayer/interfaces/index.js +0 -1
- package/build/es/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +0 -391
- package/build/es/components/Map/components/MapProvider/components/MapLayerProvider/index.js +0 -107
- package/build/es/components/Map/components/MapProvider/hooks/index.js +0 -11
- package/build/es/components/Map/components/MapProvider/index.js +0 -112
- package/build/es/components/Map/components/MapUpdater/index.js +0 -17
- package/build/es/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +0 -23
- package/build/es/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +0 -31
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +0 -33
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +0 -53
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css +0 -15
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css +0 -12
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +0 -56
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +0 -64
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +0 -38
- package/build/es/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +0 -70
- package/build/es/components/Map/components/ThematicLayerConfiguration/index.js +0 -254
- package/build/es/components/Map/constants/legendSet.js +0 -15
- package/build/es/components/Map/hooks/map.js +0 -44
- package/build/es/components/Map/index.js +0 -51
- package/build/es/components/Map/interfaces/index.js +0 -1
- package/build/es/components/Map/state/index.js +0 -14
- package/build/es/components/Map/utils/colors.js +0 -61
- package/build/es/components/Map/utils/helpers.js +0 -14
- package/build/es/components/Map/utils/map.js +0 -147
- package/build/es/components/SingleValueContainer/SingleValueContainer.test.js +0 -20
- package/build/es/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +0 -47
- package/build/es/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +0 -17
- package/build/es/components/SingleValueContainer/index.js +0 -30
- package/build/es/components/SingleValueContainer/styles/SingleValueContainer.module.css +0 -39
- package/build/es/components/SingleValueContainer/types/props.js +0 -1
- package/build/es/components/Visualization/components/AnalyticsDataProvider/index.js +0 -93
- package/build/es/components/Visualization/components/DimensionsProvider/index.js +0 -44
- package/build/es/components/Visualization/components/LayoutProvider/index.js +0 -20
- package/build/es/components/Visualization/components/VisualizationDimensionSelector/index.js +0 -68
- package/build/es/components/Visualization/components/VisualizationProvider/index.js +0 -22
- package/build/es/components/Visualization/components/VisualizationSelector/index.js +0 -166
- package/build/es/components/Visualization/components/VisualizationTypeProvider/index.js +0 -25
- package/build/es/components/Visualization/components/VisualizationTypeSelector/index.js +0 -45
- package/build/es/components/Visualization/index.js +0 -89
- package/build/es/index.js +0 -7
- package/build/es/locales/en/translations.json +0 -138
- package/build/es/locales/index.js +0 -13
- package/build/types/components/ChartAnalytics/index.d.ts +0 -7
- package/build/types/components/CircularProgressDashboard/index.d.ts +0 -4
- package/build/types/components/CustomPivotTable/components/Table/index.d.ts +0 -12
- package/build/types/components/CustomPivotTable/components/TableBody/index.d.ts +0 -2
- package/build/types/components/CustomPivotTable/components/TableHeaders/index.d.ts +0 -2
- package/build/types/components/CustomPivotTable/state/engine.d.ts +0 -7
- package/build/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts +0 -17
- package/build/types/components/Map/components/MapControls/index.d.ts +0 -6
- package/build/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts +0 -1
- package/build/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts +0 -4
- package/build/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts +0 -2
- package/build/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts +0 -2
- package/build/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts +0 -12
- package/build/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts +0 -5
- package/build/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts +0 -2
- package/build/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts +0 -5
- package/build/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts +0 -6
- package/build/types/components/Map/components/MapProvider/index.d.ts +0 -3
- package/build/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts +0 -8
- package/build/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts +0 -2
- package/build/types/components/Map/components/ThematicLayerConfiguration/index.d.ts +0 -18
- package/build/types/components/Map/index.d.ts +0 -8
- package/build/types/components/SingleValueContainer/index.d.ts +0 -6
- package/build/types/components/Visualization/components/VisualizationSelector/index.d.ts +0 -23
- package/build/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts +0 -2
- package/build/types/index.d.ts +0 -6
- /package/{LICENSE → LICENCE} +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { find, filter, isEmpty, forEach, sortBy, isString, compact } from 'lodash';
|
|
2
|
+
import { getColorPalette, defaultClasses, defaultColorScaleName } from './colors.js';
|
|
3
|
+
|
|
4
|
+
function highlightFeature(e, style) {
|
|
5
|
+
const layer = e.target;
|
|
6
|
+
layer.setStyle(style);
|
|
7
|
+
}
|
|
8
|
+
function resetHighlight(e, defaultStyle) {
|
|
9
|
+
const layer = e.target;
|
|
10
|
+
layer.setStyle(defaultStyle);
|
|
11
|
+
}
|
|
12
|
+
function getColorFromLegendSet(legends, value) {
|
|
13
|
+
if (!value) {
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
const legend = find(
|
|
17
|
+
legends ?? [],
|
|
18
|
+
(legend2) => legend2?.startValue <= value && legend2?.endValue >= value
|
|
19
|
+
) ?? {};
|
|
20
|
+
return legend.color ? legend.color : "transparent";
|
|
21
|
+
}
|
|
22
|
+
function getLegendCount(legend, data) {
|
|
23
|
+
const { startValue, endValue } = legend;
|
|
24
|
+
return filter(data, (d) => d.data >= startValue && d.data <= endValue).length;
|
|
25
|
+
}
|
|
26
|
+
function getOrgUnitsSelection(orgUnitSelection) {
|
|
27
|
+
const orgUnits = [];
|
|
28
|
+
if (orgUnitSelection.userOrgUnit) {
|
|
29
|
+
orgUnits.push("USER_ORGUNIT");
|
|
30
|
+
}
|
|
31
|
+
if (orgUnitSelection.userSubUnit) {
|
|
32
|
+
orgUnits.push("USER_ORGUNIT_CHILDREN");
|
|
33
|
+
}
|
|
34
|
+
if (orgUnitSelection.userSubX2Unit) {
|
|
35
|
+
orgUnits.push("USER_ORGUNIT_GRANDCHILDREN");
|
|
36
|
+
}
|
|
37
|
+
if (!isEmpty(orgUnitSelection.levels)) {
|
|
38
|
+
forEach(
|
|
39
|
+
orgUnitSelection.levels,
|
|
40
|
+
(level) => orgUnits.push(`LEVEL-${level}`)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return [
|
|
44
|
+
...orgUnits,
|
|
45
|
+
...orgUnitSelection?.orgUnits?.map(
|
|
46
|
+
(ou) => `${ou.id}`
|
|
47
|
+
) ?? []
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
function sanitizeOrgUnits(metaData) {
|
|
51
|
+
if (metaData) {
|
|
52
|
+
return metaData?.dimensions?.ou?.map((ouId) => ({
|
|
53
|
+
id: ouId,
|
|
54
|
+
name: metaData?.items[ouId]?.name,
|
|
55
|
+
path: metaData?.ouHierarchy?.[ouId]
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
function toGeoJson(organisationUnits) {
|
|
61
|
+
return sortBy(organisationUnits, "le").map((ou) => {
|
|
62
|
+
try {
|
|
63
|
+
const coord = JSON.parse(ou.co);
|
|
64
|
+
let gpid = "";
|
|
65
|
+
let gppg = "";
|
|
66
|
+
let type = "Point";
|
|
67
|
+
if (ou.ty === 2) {
|
|
68
|
+
type = "Polygon";
|
|
69
|
+
if (ou.co.substring(0, 4) === "[[[[") {
|
|
70
|
+
type = "MultiPolygon";
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (isString(ou.pg) && ou.pg.length) {
|
|
74
|
+
const ids = compact(ou.pg.split("/"));
|
|
75
|
+
if (ids.length >= 2) {
|
|
76
|
+
gpid = ids[ids.length - 2];
|
|
77
|
+
}
|
|
78
|
+
if (ids.length > 2) {
|
|
79
|
+
gppg = "/" + ids.slice(0, ids.length - 2).join("/");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
type: "Feature",
|
|
84
|
+
id: ou.id,
|
|
85
|
+
geometry: {
|
|
86
|
+
type,
|
|
87
|
+
coordinates: coord
|
|
88
|
+
},
|
|
89
|
+
properties: {
|
|
90
|
+
type,
|
|
91
|
+
id: ou.id,
|
|
92
|
+
name: ou.na,
|
|
93
|
+
hasCoordinatesDown: ou.hcd,
|
|
94
|
+
hasCoordinatesUp: ou.hcu,
|
|
95
|
+
level: ou.le,
|
|
96
|
+
grandParentParentGraph: gppg,
|
|
97
|
+
grandParentId: gpid,
|
|
98
|
+
parentGraph: ou.pg,
|
|
99
|
+
parentId: ou.pi,
|
|
100
|
+
parentName: ou.pn,
|
|
101
|
+
dimensions: ou.dimensions
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
} catch (e) {
|
|
105
|
+
return {};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function sanitizeDate(startDate) {
|
|
110
|
+
if (startDate?.split("-")?.[0]?.length < 4) {
|
|
111
|
+
return startDate?.split("-")?.reverse()?.join("-");
|
|
112
|
+
}
|
|
113
|
+
return startDate;
|
|
114
|
+
}
|
|
115
|
+
function generateLegends(maxValue, minValue, { classesCount, colorClass }) {
|
|
116
|
+
const count = classesCount ?? defaultClasses;
|
|
117
|
+
const color = colorClass ?? defaultColorScaleName;
|
|
118
|
+
const colorScale = [...getColorPalette(color, count)].reverse();
|
|
119
|
+
const maxLegendValue = 5 * Math.ceil(maxValue / 5);
|
|
120
|
+
const range = maxLegendValue / count;
|
|
121
|
+
const values = [];
|
|
122
|
+
let legendColorsIterator = colorScale.length - 1;
|
|
123
|
+
for (let i = 0; i < maxLegendValue; i += range) {
|
|
124
|
+
const id = colorScale[legendColorsIterator];
|
|
125
|
+
values.push({
|
|
126
|
+
startValue: Math.floor(i),
|
|
127
|
+
endValue: Math.floor(i + range),
|
|
128
|
+
id,
|
|
129
|
+
color: id
|
|
130
|
+
});
|
|
131
|
+
legendColorsIterator--;
|
|
132
|
+
}
|
|
133
|
+
return values.reverse();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export { generateLegends, getColorFromLegendSet, getLegendCount, getOrgUnitsSelection, highlightFeature, resetHighlight, sanitizeDate, sanitizeOrgUnits, toGeoJson };
|
|
137
|
+
//# sourceMappingURL=out.js.map
|
|
138
|
+
//# sourceMappingURL=map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Map/utils/map.ts"],"names":["legend"],"mappings":"AAMA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEA,SAAS,iBAAiB,GAAsB,OAAY;AAClE,QAAM,QAAQ,EAAE;AAChB,QAAM,SAAS,KAAK;AAErB;AAEO,SAAS,eAAe,GAAsB,cAAmB;AACvE,QAAM,QAAQ,EAAE;AAChB,QAAM,SAAS,YAAY;AAE5B;AAEO,SAAS,sBACf,SACA,OACS;AACT,MAAI,CAAC,OAAO;AACX,WAAO;AAAA,EACR;AACA,QAAM,SACL;AAAA,IACC,WAAW,CAAC;AAAA,IACZ,CAACA,YACAA,SAAQ,cAAc,SAASA,SAAQ,YAAY;AAAA,EACrD,KAAK,CAAC;AACP,SAAO,OAAO,QAAQ,OAAO,QAAQ;AACtC;AAEO,SAAS,eAAe,QAAa,MAAW;AACtD,QAAM,EAAE,YAAY,SAAS,IAAI;AACjC,SAAO,OAAO,MAAM,CAAC,MAAW,EAAE,QAAQ,cAAc,EAAE,QAAQ,QAAQ,EACxE;AACH;AAEO,SAAS,qBAAqB,kBAAoC;AACxE,QAAM,WAAW,CAAC;AAClB,MAAI,iBAAiB,aAAa;AACjC,aAAS,KAAK,cAAc;AAAA,EAC7B;AAEA,MAAI,iBAAiB,aAAa;AACjC,aAAS,KAAK,uBAAuB;AAAA,EACtC;AAEA,MAAI,iBAAiB,eAAe;AACnC,aAAS,KAAK,4BAA4B;AAAA,EAC3C;AACA,MAAI,CAAC,QAAQ,iBAAiB,MAAM,GAAG;AACtC;AAAA,MAAQ,iBAAiB;AAAA,MAAQ,CAAC,UACjC,SAAS,KAAK,SAAS,KAAK,EAAE;AAAA,IAC/B;AAAA,EACD;AAEA,SAAO;AAAA,IACN,GAAG;AAAA,IACH,GAAI,kBAAkB,UAAU;AAAA,MAC/B,CAAC,OAAyB,GAAG,GAAG,EAAE;AAAA,IACnC,KAAK,CAAC;AAAA,EACP;AACD;AAEO,SAAS,iBAAiB,UAAe;AAC/C,MAAI,UAAU;AACb,WAAO,UAAU,YAAY,IAAI,IAAI,CAAC,UAAkB;AAAA,MACvD,IAAI;AAAA,MACJ,MAAM,UAAU,MAAM,IAAI,GAAG;AAAA,MAC7B,MAAM,UAAU,cAAc,IAAI;AAAA,IACnC,EAAE;AAAA,EACH;AACA,SAAO,CAAC;AACT;AAEO,SAAS,UAAU,mBAAwB;AACjD,SAAO,OAAO,mBAAmB,IAAI,EAAE,IAAI,CAAC,OAAY;AACvD,QAAI;AACH,YAAM,QAAQ,KAAK,MAAM,GAAG,EAAE;AAC9B,UAAI,OAAO;AACX,UAAI,OAAO;AACX,UAAI,OAAO;AAEX,UAAI,GAAG,OAAO,GAAG;AAChB,eAAO;AACP,YAAI,GAAG,GAAG,UAAU,GAAG,CAAC,MAAM,QAAQ;AACrC,iBAAO;AAAA,QACR;AAAA,MACD;AAGA,UAAI,SAAS,GAAG,EAAE,KAAK,GAAG,GAAG,QAAQ;AACpC,cAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,GAAG,CAAC;AAGpC,YAAI,IAAI,UAAU,GAAG;AACpB,iBAAO,IAAI,IAAI,SAAS,CAAC;AAAA,QAC1B;AAGA,YAAI,IAAI,SAAS,GAAG;AACnB,iBAAO,MAAM,IAAI,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,KAAK,GAAG;AAAA,QACnD;AAAA,MACD;AAEA,aAAO;AAAA,QACN,MAAM;AAAA,QACN,IAAI,GAAG;AAAA,QACP,UAAU;AAAA,UACT;AAAA,UACA,aAAa;AAAA,QACd;AAAA,QACA,YAAY;AAAA,UACX;AAAA,UACA,IAAI,GAAG;AAAA,UACP,MAAM,GAAG;AAAA,UACT,oBAAoB,GAAG;AAAA,UACvB,kBAAkB,GAAG;AAAA,UACrB,OAAO,GAAG;AAAA,UACV,wBAAwB;AAAA,UACxB,eAAe;AAAA,UACf,aAAa,GAAG;AAAA,UAChB,UAAU,GAAG;AAAA,UACb,YAAY,GAAG;AAAA,UACf,YAAY,GAAG;AAAA,QAChB;AAAA,MACD;AAAA,IACD,SAAS,GAAG;AACX,aAAO,CAAC;AAAA,IACT;AAAA,EACD,CAAC;AACF;AAEO,SAAS,aAAa,WAA2B;AACvD,MAAI,WAAW,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG;AAC3C,WAAO,WAAW,MAAM,GAAG,GAAG,QAAQ,GAAG,KAAK,GAAG;AAAA,EAClD;AACA,SAAO;AACR;AAEO,SAAS,gBACf,UACA,UACA,EAAE,cAAc,WAAW,GACX;AAChB,QAAM,QAAgB,gBAAgB;AACtC,QAAM,QAAQ,cAAc;AAE5B,QAAM,aAAa,CAAC,GAAG,gBAAgB,OAAO,KAAK,CAAC,EAAE,QAAQ;AAE9D,QAAM,iBAAiB,IAAI,KAAK,KAAK,WAAW,CAAC;AACjD,QAAM,QAAQ,iBAAiB;AAE/B,QAAM,SAAS,CAAC;AAChB,MAAI,uBAAuB,WAAW,SAAS;AAC/C,WAAS,IAAI,GAAG,IAAI,gBAAgB,KAAK,OAAO;AAC/C,UAAM,KAAK,WAAW,oBAAoB;AAC1C,WAAO,KAAK;AAAA,MACX,YAAY,KAAK,MAAM,CAAC;AAAA,MACxB,UAAU,KAAK,MAAM,IAAI,KAAK;AAAA,MAC9B;AAAA,MACA,OAAO;AAAA,IACR,CAAC;AACD;AAAA,EACD;AAEA,SAAO,OAAO,QAAQ;AACvB","sourcesContent":["import type {\n\tLegend,\n\tOrganisationUnit,\n\tOrgUnitSelection,\n} from \"@hisptz/dhis2-utils\";\nimport { LeafletMouseEvent } from \"leaflet\";\nimport {\n\tcompact,\n\tfilter,\n\tfind,\n\tforEach,\n\tisEmpty,\n\tisString,\n\tsortBy,\n} from \"lodash\";\nimport {\n\tdefaultClasses,\n\tdefaultColorScaleName,\n\tgetColorPalette,\n} from \"./colors.js\";\n\nexport function highlightFeature(e: LeafletMouseEvent, style: any) {\n\tconst layer = e.target;\n\tlayer.setStyle(style);\n\t// layer.bringToFront();\n}\n\nexport function resetHighlight(e: LeafletMouseEvent, defaultStyle: any) {\n\tconst layer = e.target;\n\tlayer.setStyle(defaultStyle);\n\t// layer.bringToBack();\n}\n\nexport function getColorFromLegendSet(\n\tlegends: Legend[],\n\tvalue?: number,\n): string {\n\tif (!value) {\n\t\treturn \"\";\n\t}\n\tconst legend: any =\n\t\tfind(\n\t\t\tlegends ?? [],\n\t\t\t(legend: any) =>\n\t\t\t\tlegend?.startValue <= value && legend?.endValue >= value,\n\t\t) ?? {};\n\treturn legend.color ? legend.color : \"transparent\";\n}\n\nexport function getLegendCount(legend: any, data: any) {\n\tconst { startValue, endValue } = legend;\n\treturn filter(data, (d: any) => d.data >= startValue && d.data <= endValue)\n\t\t.length;\n}\n\nexport function getOrgUnitsSelection(orgUnitSelection: OrgUnitSelection) {\n\tconst orgUnits = [];\n\tif (orgUnitSelection.userOrgUnit) {\n\t\torgUnits.push(\"USER_ORGUNIT\");\n\t}\n\n\tif (orgUnitSelection.userSubUnit) {\n\t\torgUnits.push(\"USER_ORGUNIT_CHILDREN\");\n\t}\n\n\tif (orgUnitSelection.userSubX2Unit) {\n\t\torgUnits.push(\"USER_ORGUNIT_GRANDCHILDREN\");\n\t}\n\tif (!isEmpty(orgUnitSelection.levels)) {\n\t\tforEach(orgUnitSelection.levels, (level) =>\n\t\t\torgUnits.push(`LEVEL-${level}`),\n\t\t);\n\t}\n\n\treturn [\n\t\t...orgUnits,\n\t\t...(orgUnitSelection?.orgUnits?.map(\n\t\t\t(ou: OrganisationUnit) => `${ou.id}`,\n\t\t) ?? []),\n\t];\n}\n\nexport function sanitizeOrgUnits(metaData: any) {\n\tif (metaData) {\n\t\treturn metaData?.dimensions?.ou?.map((ouId: string) => ({\n\t\t\tid: ouId,\n\t\t\tname: metaData?.items[ouId]?.name,\n\t\t\tpath: metaData?.ouHierarchy?.[ouId],\n\t\t}));\n\t}\n\treturn [];\n}\n\nexport function toGeoJson(organisationUnits: any) {\n\treturn sortBy(organisationUnits, \"le\").map((ou: any) => {\n\t\ttry {\n\t\t\tconst coord = JSON.parse(ou.co);\n\t\t\tlet gpid = \"\";\n\t\t\tlet gppg = \"\";\n\t\t\tlet type = \"Point\";\n\n\t\t\tif (ou.ty === 2) {\n\t\t\t\ttype = \"Polygon\";\n\t\t\t\tif (ou.co.substring(0, 4) === \"[[[[\") {\n\t\t\t\t\ttype = \"MultiPolygon\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Grand parent\n\t\t\tif (isString(ou.pg) && ou.pg.length) {\n\t\t\t\tconst ids = compact(ou.pg.split(\"/\"));\n\n\t\t\t\t// Grand parent id\n\t\t\t\tif (ids.length >= 2) {\n\t\t\t\t\tgpid = ids[ids.length - 2] as string;\n\t\t\t\t}\n\n\t\t\t\t// Grand parent parent graph\n\t\t\t\tif (ids.length > 2) {\n\t\t\t\t\tgppg = \"/\" + ids.slice(0, ids.length - 2).join(\"/\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttype: \"Feature\",\n\t\t\t\tid: ou.id,\n\t\t\t\tgeometry: {\n\t\t\t\t\ttype,\n\t\t\t\t\tcoordinates: coord,\n\t\t\t\t},\n\t\t\t\tproperties: {\n\t\t\t\t\ttype,\n\t\t\t\t\tid: ou.id,\n\t\t\t\t\tname: ou.na,\n\t\t\t\t\thasCoordinatesDown: ou.hcd,\n\t\t\t\t\thasCoordinatesUp: ou.hcu,\n\t\t\t\t\tlevel: ou.le,\n\t\t\t\t\tgrandParentParentGraph: gppg,\n\t\t\t\t\tgrandParentId: gpid,\n\t\t\t\t\tparentGraph: ou.pg,\n\t\t\t\t\tparentId: ou.pi,\n\t\t\t\t\tparentName: ou.pn,\n\t\t\t\t\tdimensions: ou.dimensions,\n\t\t\t\t},\n\t\t\t};\n\t\t} catch (e) {\n\t\t\treturn {};\n\t\t}\n\t});\n}\n\nexport function sanitizeDate(startDate: string): string {\n\tif (startDate?.split(\"-\")?.[0]?.length < 4) {\n\t\treturn startDate?.split(\"-\")?.reverse()?.join(\"-\");\n\t}\n\treturn startDate;\n}\n\nexport function generateLegends(\n\tmaxValue: number,\n\tminValue: number,\n\t{ classesCount, colorClass }: { classesCount: number; colorClass: string },\n): Array<Legend> {\n\tconst count: number = classesCount ?? defaultClasses;\n\tconst color = colorClass ?? defaultColorScaleName;\n\n\tconst colorScale = [...getColorPalette(color, count)].reverse();\n\n\tconst maxLegendValue = 5 * Math.ceil(maxValue / 5);\n\tconst range = maxLegendValue / count;\n\n\tconst values = [];\n\tlet legendColorsIterator = colorScale.length - 1;\n\tfor (let i = 0; i < maxLegendValue; i += range) {\n\t\tconst id = colorScale[legendColorsIterator];\n\t\tvalues.push({\n\t\t\tstartValue: Math.floor(i),\n\t\t\tendValue: Math.floor(i + range),\n\t\t\tid,\n\t\t\tcolor: id,\n\t\t});\n\t\tlegendColorsIterator--;\n\t}\n\n\treturn values.reverse();\n}\n"]}
|
|
@@ -0,0 +1,145 @@
|
|
|
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.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.js';
|
|
6
|
+
export { default as SingleValueItem } from './components/SingleValueItem/SingleValueItem.js';
|
|
7
|
+
import styles from './styles/SingleValueContainer.module.css';
|
|
8
|
+
export * from './types/props.js';
|
|
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.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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.js\";\nimport styles from \"./styles/SingleValueContainer.module.css\";\nimport { SingleValue, SingleValueVisualizerProps } from \"./types/props.js\";\n\nexport * from \"./types/props.js\";\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"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.js';
|
|
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.js.map
|
package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
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.js\";\nimport SingleValuePercentage from \"./SingleValuePercentage.js\";\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.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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.js.map
|
package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SingleValueContainer/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc","sourcesContent":["export * from \"./SingleValueVisualizer.js\";\nexport * from \"./components/SingleValueItem/SingleValuePercentage.js\";\nexport * from \"./types/props.js\";\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.single-value-list {
|
|
2
|
+
padding: 10px 2px;
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
justify-content: space-around;
|
|
7
|
+
}
|
|
8
|
+
.padding-top {
|
|
9
|
+
padding-top: 12px;
|
|
10
|
+
}
|
|
11
|
+
.percent-value {
|
|
12
|
+
border-radius: 1rem;
|
|
13
|
+
}
|
|
14
|
+
.percent-value div {
|
|
15
|
+
height: .5rem !important;
|
|
16
|
+
}
|
|
17
|
+
.font-large {
|
|
18
|
+
font-size: 1rem;
|
|
19
|
+
}
|
|
20
|
+
.font-x-large {
|
|
21
|
+
font-size: 1.5rem;
|
|
22
|
+
}
|
|
23
|
+
.font-xx-large {
|
|
24
|
+
font-size: 3rem;
|
|
25
|
+
}
|
|
26
|
+
.font-bold {
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
}
|
|
29
|
+
.single-value-item {
|
|
30
|
+
margin: 0 1vw;
|
|
31
|
+
}
|
|
32
|
+
/*# sourceMappingURL=SingleValueContainer.module.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SingleValueContainer/styles/SingleValueContainer.module.css"],"sourcesContent":[".single-value-list {\n padding: 10px 2px;\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n}\n\n.padding-top {\n padding-top: 12px;\n}\n\n.percent-value {\n border-radius: 1rem;\n}\n\n.percent-value div {\n height: .5rem !important;\n}\n\n.font-large {\n font-size: 1rem;\n}\n\n.font-x-large {\n font-size: 1.5rem;\n}\n\n.font-xx-large {\n font-size: 3rem;\n}\n\n.font-bold {\n font-weight: bold;\n}\n\n.single-value-item {\n margin: 0 1vw;\n}"],"mappings":"AAAA,CAAC;AACG,WAAS,KAAK;AACd,SAAO;AACP,WAAS;AACT,aAAW;AACX,mBAAiB;AACrB;AAEA,CAAC;AACG,eAAa;AACjB;AAEA,CAAC;AACG,iBAAe;AACnB;AAEA,CAJC,cAIc;AACX,UAAQ;AACZ;AAEA,CAAC;AACG,aAAW;AACf;AAEA,CAAC;AACG,aAAW;AACf;AAEA,CAAC;AACG,aAAW;AACf;AAEA,CAAC;AACG,eAAa;AACjB;AAEA,CAAC;AACG,UAAQ,EAAE;AACd;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { createContext, useContext, useMemo, useEffect } from 'react';
|
|
3
|
+
import { useDimensions } from '../DimensionsProvider/index.js';
|
|
4
|
+
import { useDataQuery } from '@dhis2/app-runtime';
|
|
5
|
+
import { useLayout } from '../LayoutProvider/index.js';
|
|
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(
|
|
15
|
+
(dimension) => `${dimension}:${dimensions[dimension]?.join(";")}`
|
|
16
|
+
),
|
|
17
|
+
filter: Object.keys(filters).map(
|
|
18
|
+
(dimension) => `${dimension}:${filters[dimension]?.join(";")}`
|
|
19
|
+
),
|
|
20
|
+
includeMetadataDetails: true
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function useAnalyticsData() {
|
|
26
|
+
return useContext(AnalyticsContext) ?? { analytics: {}, loading: false };
|
|
27
|
+
}
|
|
28
|
+
function AnalyticsDataProvider({ children }) {
|
|
29
|
+
const [analyticsDimensions] = useDimensions();
|
|
30
|
+
const [layout] = useLayout();
|
|
31
|
+
const { dimensions, filters } = useMemo(() => {
|
|
32
|
+
const dimensions2 = {};
|
|
33
|
+
const filters2 = {};
|
|
34
|
+
forEach(
|
|
35
|
+
[...layout?.columns ?? [], ...layout?.rows ?? []],
|
|
36
|
+
(dimension) => {
|
|
37
|
+
set(
|
|
38
|
+
dimensions2,
|
|
39
|
+
[dimension],
|
|
40
|
+
analyticsDimensions?.[dimension]
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
forEach([...layout?.filters ?? []], (dimension) => {
|
|
45
|
+
set(
|
|
46
|
+
filters2,
|
|
47
|
+
[dimension],
|
|
48
|
+
analyticsDimensions?.[dimension]
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
dimensions: dimensions2,
|
|
53
|
+
filters: filters2
|
|
54
|
+
};
|
|
55
|
+
}, [layout, analyticsDimensions]);
|
|
56
|
+
console.log({
|
|
57
|
+
filters
|
|
58
|
+
});
|
|
59
|
+
const {
|
|
60
|
+
data: analytics,
|
|
61
|
+
error,
|
|
62
|
+
loading,
|
|
63
|
+
refetch,
|
|
64
|
+
called
|
|
65
|
+
} = useDataQuery(analyticsQuery, {
|
|
66
|
+
variables: {
|
|
67
|
+
dimensions,
|
|
68
|
+
filters
|
|
69
|
+
},
|
|
70
|
+
lazy: true
|
|
71
|
+
});
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
refetch({
|
|
74
|
+
dimensions,
|
|
75
|
+
filters
|
|
76
|
+
});
|
|
77
|
+
}, [dimensions, filters]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
if (error) {
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}, [error]);
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
AnalyticsContext.Provider,
|
|
85
|
+
{
|
|
86
|
+
value: { analytics: analytics?.analytics, loading },
|
|
87
|
+
children
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { AnalyticsDataProvider, useAnalyticsData };
|
|
93
|
+
//# sourceMappingURL=out.js.map
|
|
94
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Visualization/components/AnalyticsDataProvider/index.tsx"],"names":["dimensions","filters"],"mappings":"AAqGE;AArGF,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,EACtB,WAAW;AAAA,IACV,UAAU;AAAA,IACV,QAAQ,CAAC,EAAE,YAAY,QAAQ,MAAW;AACzC,aAAO;AAAA,QACN,WAAW,OAAO,KAAK,UAAU,EAAE;AAAA,UAClC,CAAC,cACA,GAAG,SAAS,IAAI,WAAW,SAAS,GAAG,KAAK,GAAG,CAAC;AAAA,QAClD;AAAA,QACA,QAAQ,OAAO,KAAK,OAAO,EAAE;AAAA,UAC5B,CAAC,cACA,GAAG,SAAS,IAAI,QAAQ,SAAS,GAAG,KAAK,GAAG,CAAC;AAAA,QAC/C;AAAA,QACA,wBAAwB;AAAA,MACzB;AAAA,IACD;AAAA,EACD;AACD;AAMO,SAAS,mBAAmB;AAClC,SAAO,WAAW,gBAAgB,KAAK,EAAE,WAAW,CAAC,GAAG,SAAS,MAAM;AACxE;AAEO,SAAS,sBAAsB,EAAE,SAAS,GAAsB;AACtE,QAAM,CAAC,mBAAmB,IAAI,cAAc;AAC5C,QAAM,CAAC,MAAM,IAAI,UAAU;AAC3B,QAAM,EAAE,YAAY,QAAQ,IAAI,QAAQ,MAAM;AAC7C,UAAMA,cAAa,CAAC;AACpB,UAAMC,WAAU,CAAC;AAEjB;AAAA,MACC,CAAC,GAAI,QAAQ,WAAW,CAAC,GAAI,GAAI,QAAQ,QAAQ,CAAC,CAAE;AAAA,MACpD,CAAC,cAAc;AACd;AAAA,UACCD;AAAA,UACA,CAAC,SAAS;AAAA,UACT,sBAA6C,SAAS;AAAA,QACxD;AAAA,MACD;AAAA,IACD;AACA,YAAQ,CAAC,GAAI,QAAQ,WAAW,CAAC,CAAE,GAAG,CAAC,cAAc;AACpD;AAAA,QACCC;AAAA,QACA,CAAC,SAAS;AAAA,QACT,sBAA6C,SAAS;AAAA,MACxD;AAAA,IACD,CAAC;AAED,WAAO;AAAA,MACN,YAAAD;AAAA,MACA,SAAAC;AAAA,IACD;AAAA,EACD,GAAG,CAAC,QAAQ,mBAAmB,CAAC;AAEhC,UAAQ,IAAI;AAAA,IACX;AAAA,EACD,CAAC;AAED,QAAM;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI,aAAa,gBAAgB;AAAA,IAChC,WAAW;AAAA,MACV;AAAA,MACA;AAAA,IACD;AAAA,IACA,MAAM;AAAA,EACP,CAAC;AAED,YAAU,MAAM;AACf,YAAQ;AAAA,MACP;AAAA,MACA;AAAA,IACD,CAAC;AAAA,EACF,GAAG,CAAC,YAAY,OAAO,CAAC;AAExB,YAAU,MAAM;AACf,QAAI,OAAO;AACV,YAAM;AAAA,IACP;AAAA,EACD,GAAG,CAAC,KAAK,CAAC;AAEV,SACC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACA,OAAO,EAAE,WAAW,WAAW,WAAwB,QAAQ;AAAA,MAE9D;AAAA;AAAA,EACF;AAEF","sourcesContent":["import React, { createContext, useContext, useEffect, useMemo } from \"react\";\nimport { Analytics, AnalyticsDimension } from \"@hisptz/dhis2-utils\";\nimport { useDimensions } from \"../DimensionsProvider/index.js\";\nimport { useDataQuery } from \"@dhis2/app-runtime\";\nimport { useLayout } from \"../LayoutProvider/index.js\";\nimport { forEach, set } from \"lodash\";\n\nconst AnalyticsContext = createContext<\n\t{ loading: boolean; analytics: Analytics } | undefined\n>(undefined);\n\nconst analyticsQuery = {\n\tanalytics: {\n\t\tresource: \"analytics\",\n\t\tparams: ({ dimensions, filters }: any) => {\n\t\t\treturn {\n\t\t\t\tdimension: Object.keys(dimensions).map(\n\t\t\t\t\t(dimension) =>\n\t\t\t\t\t\t`${dimension}:${dimensions[dimension]?.join(\";\")}`,\n\t\t\t\t),\n\t\t\t\tfilter: Object.keys(filters).map(\n\t\t\t\t\t(dimension) =>\n\t\t\t\t\t\t`${dimension}:${filters[dimension]?.join(\";\")}`,\n\t\t\t\t),\n\t\t\t\tincludeMetadataDetails: true,\n\t\t\t};\n\t\t},\n\t},\n};\n\nexport interface DataProviderProps {\n\tchildren: React.ReactNode;\n}\n\nexport function useAnalyticsData() {\n\treturn useContext(AnalyticsContext) ?? { analytics: {}, loading: false };\n}\n\nexport function AnalyticsDataProvider({ children }: DataProviderProps) {\n\tconst [analyticsDimensions] = useDimensions();\n\tconst [layout] = useLayout();\n\tconst { dimensions, filters } = useMemo(() => {\n\t\tconst dimensions = {};\n\t\tconst filters = {};\n\n\t\tforEach(\n\t\t\t[...(layout?.columns ?? []), ...(layout?.rows ?? [])],\n\t\t\t(dimension) => {\n\t\t\t\tset(\n\t\t\t\t\tdimensions,\n\t\t\t\t\t[dimension],\n\t\t\t\t\t(analyticsDimensions as AnalyticsDimension)?.[dimension],\n\t\t\t\t);\n\t\t\t},\n\t\t);\n\t\tforEach([...(layout?.filters ?? [])], (dimension) => {\n\t\t\tset(\n\t\t\t\tfilters,\n\t\t\t\t[dimension],\n\t\t\t\t(analyticsDimensions as AnalyticsDimension)?.[dimension],\n\t\t\t);\n\t\t});\n\n\t\treturn {\n\t\t\tdimensions,\n\t\t\tfilters,\n\t\t};\n\t}, [layout, analyticsDimensions]);\n\n\tconsole.log({\n\t\tfilters,\n\t});\n\n\tconst {\n\t\tdata: analytics,\n\t\terror,\n\t\tloading,\n\t\trefetch,\n\t\tcalled,\n\t} = useDataQuery(analyticsQuery, {\n\t\tvariables: {\n\t\t\tdimensions,\n\t\t\tfilters,\n\t\t},\n\t\tlazy: true,\n\t});\n\n\tuseEffect(() => {\n\t\trefetch({\n\t\t\tdimensions,\n\t\t\tfilters,\n\t\t});\n\t}, [dimensions, filters]);\n\n\tuseEffect(() => {\n\t\tif (error) {\n\t\t\tthrow error;\n\t\t}\n\t}, [error]);\n\n\treturn (\n\t\t<AnalyticsContext.Provider\n\t\t\tvalue={{ analytics: analytics?.analytics as Analytics, loading }}\n\t\t>\n\t\t\t{children}\n\t\t</AnalyticsContext.Provider>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|