@hisptz/dhis2-analytics 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.js +20 -43
- package/dist/components/ChartAnalytics/DHIS2Chart.js +17 -43
- package/dist/components/ChartAnalytics/DHIS2Chart.js.map +1 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +14 -16
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js.map +1 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +8 -14
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.js +19 -21
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.js.map +1 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +0 -1
- package/dist/components/ChartAnalytics/hooks/useChart.js +11 -13
- package/dist/components/ChartAnalytics/hooks/useChart.js.map +1 -1
- package/dist/components/ChartAnalytics/index.js +1 -12
- package/dist/components/ChartAnalytics/index.js.map +1 -1
- package/dist/components/ChartAnalytics/models/bar.js +3 -6
- package/dist/components/ChartAnalytics/models/bar.js.map +1 -1
- package/dist/components/ChartAnalytics/models/column.js +6 -9
- package/dist/components/ChartAnalytics/models/column.js.map +1 -1
- package/dist/components/ChartAnalytics/models/index.js +1 -6
- package/dist/components/ChartAnalytics/models/index.js.map +1 -1
- package/dist/components/ChartAnalytics/models/line.js +6 -8
- package/dist/components/ChartAnalytics/models/line.js.map +1 -1
- package/dist/components/ChartAnalytics/models/multi-series.js +26 -15
- package/dist/components/ChartAnalytics/models/multi-series.js.map +1 -1
- package/dist/components/ChartAnalytics/models/pie.js +8 -8
- package/dist/components/ChartAnalytics/models/pie.js.map +1 -1
- package/dist/components/ChartAnalytics/services/export.js +7 -20
- package/dist/components/ChartAnalytics/services/export.js.map +1 -1
- package/dist/components/ChartAnalytics/styles/custom-highchart.css +40 -0
- package/dist/components/ChartAnalytics/styles/custom-highchart.css.map +1 -0
- package/dist/components/ChartAnalytics/types/props.js +0 -1
- package/dist/components/ChartAnalytics/utils/chart.js +24 -31
- package/dist/components/ChartAnalytics/utils/chart.js.map +1 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js +14 -23
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js.map +1 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +3 -10
- package/dist/components/CircularProgressDashboard/index.js +2 -19
- package/dist/components/CircularProgressDashboard/index.js.map +1 -1
- package/dist/components/CircularProgressDashboard/types/props.js +0 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js +13 -15
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js.map +1 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.js +5 -14
- package/dist/components/DHIS2PivotTable/components/Table/index.js +4 -6
- package/dist/components/DHIS2PivotTable/components/TableBody/index.js +30 -36
- package/dist/components/DHIS2PivotTable/components/TableBody/index.js.map +1 -1
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js +27 -33
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js.map +1 -1
- package/dist/components/DHIS2PivotTable/index.js +2 -19
- package/dist/components/DHIS2PivotTable/index.js.map +1 -1
- package/dist/components/DHIS2PivotTable/interfaces/index.js +0 -1
- package/dist/components/DHIS2PivotTable/services/engine.js +10 -18
- package/dist/components/DHIS2PivotTable/services/engine.js.map +1 -1
- package/dist/components/DHIS2PivotTable/state/engine.js +6 -9
- package/dist/components/DHIS2PivotTable/state/engine.js.map +1 -1
- package/dist/components/Map/DHIS2Map.js +13 -20
- package/dist/components/Map/DHIS2Map.js.map +1 -1
- package/dist/components/Map/DHIS2Map.stories.js +3 -17
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js +15 -21
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +10 -15
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js +16 -18
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +7 -12
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js +24 -30
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js +42 -49
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js +16 -22
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js +26 -32
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js +10 -16
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js +21 -27
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js +16 -19
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js.map +1 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js +2 -19
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js.map +1 -1
- package/dist/components/Map/components/MapArea/index.js +60 -54
- package/dist/components/Map/components/MapArea/index.js.map +1 -1
- package/dist/components/Map/components/MapArea/interfaces/index.js +0 -1
- package/dist/components/Map/components/MapControls/components/CustomControl/index.js +3 -5
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.js +8 -14
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.js +7 -9
- package/dist/components/Map/components/MapControls/index.js +22 -17
- package/dist/components/Map/components/MapControls/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +3 -5
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js +21 -31
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +59 -34
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +99 -89
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +9 -14
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +62 -69
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +31466 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js.map +1 -0
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +43 -43
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +34 -31
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +6 -8
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.js +46 -57
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +38 -30
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +5 -7
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.js +21 -28
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +39 -13
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +40 -32
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +13 -20
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +17 -23
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +30 -25
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +17 -20
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +15 -21
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +6 -8
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js +16 -24
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +56 -0
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css.map +1 -0
- package/dist/components/Map/components/MapLayer/index.js +10 -18
- package/dist/components/Map/components/MapLayer/index.js.map +1 -1
- package/dist/components/Map/components/MapLayer/interfaces/index.js +7 -4
- package/dist/components/Map/components/MapLayer/interfaces/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +59 -63
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js +30 -36
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/hooks/index.js +6 -10
- package/dist/components/Map/components/MapProvider/hooks/index.js.map +1 -1
- package/dist/components/Map/components/MapProvider/index.js +25 -31
- package/dist/components/Map/components/MapProvider/index.js.map +1 -1
- package/dist/components/Map/components/MapUpdater/index.js +5 -7
- package/dist/components/Map/components/MapUpdater/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js +15 -21
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +5 -10
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js +53 -60
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +7 -12
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +21 -15
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js +1 -4
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +22 -30
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +18 -21
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +23 -30
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +16 -22
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +16 -22
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.js +16 -22
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.js +18 -24
- package/dist/components/Map/components/ThematicLayerConfiguration/index.js +3 -26
- package/dist/components/Map/components/ThematicLayerConfiguration/index.js.map +1 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.js +0 -1
- package/dist/components/Map/constants/colors.js +1 -4
- package/dist/components/Map/constants/legendSet.js +1 -3
- package/dist/components/Map/hooks/map.js +17 -21
- package/dist/components/Map/hooks/map.js.map +1 -1
- package/dist/components/Map/index.js +5 -40
- package/dist/components/Map/index.js.map +1 -1
- package/dist/components/Map/interfaces/index.js +0 -1
- package/dist/components/Map/state/index.js +5 -9
- package/dist/components/Map/state/index.js.map +1 -1
- package/dist/components/Map/utils/colors.js +18 -22
- package/dist/components/Map/utils/colors.js.map +1 -1
- package/dist/components/Map/utils/helpers.js +3 -11
- package/dist/components/Map/utils/map.js +25 -24
- package/dist/components/Map/utils/map.js.map +1 -1
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.js +3 -11
- package/dist/components/SingleValueContainer/SingleValueVisualizer.js +17 -35
- package/dist/components/SingleValueContainer/SingleValueVisualizer.js.map +1 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +14 -21
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js.map +1 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +7 -13
- package/dist/components/SingleValueContainer/index.js +3 -19
- package/dist/components/SingleValueContainer/index.js.map +1 -1
- package/dist/components/SingleValueContainer/types/props.js +0 -1
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.js +50 -26
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/DimensionsProvider/index.js +13 -18
- package/dist/components/Visualization/components/LayoutProvider/index.js +11 -14
- package/dist/components/Visualization/components/LayoutProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js +30 -36
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationProvider/index.js +14 -10
- package/dist/components/Visualization/components/VisualizationProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationSelector/index.js +46 -57
- package/dist/components/Visualization/components/VisualizationSelector/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.js +16 -19
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.js.map +1 -1
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.js +37 -27
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.js.map +1 -1
- package/dist/components/Visualization/index.js +27 -33
- package/dist/components/Visualization/index.js.map +1 -1
- package/dist/index.js +6 -47
- package/dist/index.js.map +1 -1
- package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts +4 -4
- package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts +2 -2
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts +2 -2
- package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/index.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/index.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/bar.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/bar.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/column.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/column.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/index.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/index.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/line.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/line.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/multi-series.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/multi-series.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/models/pie.d.ts +1 -1
- package/dist/types/components/ChartAnalytics/models/pie.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/services/export.d.ts.map +1 -1
- package/dist/types/components/ChartAnalytics/utils/chart.d.ts +2 -2
- package/dist/types/components/ChartAnalytics/utils/chart.d.ts.map +1 -1
- package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts +2 -2
- package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts.map +1 -1
- package/dist/types/components/CircularProgressDashboard/index.d.ts +2 -2
- package/dist/types/components/CircularProgressDashboard/index.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts +2 -2
- package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts +1 -1
- package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/index.d.ts +2 -2
- package/dist/types/components/DHIS2PivotTable/index.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/services/engine.d.ts +1 -1
- package/dist/types/components/DHIS2PivotTable/services/engine.d.ts.map +1 -1
- package/dist/types/components/DHIS2PivotTable/state/engine.d.ts +2 -2
- package/dist/types/components/DHIS2PivotTable/state/engine.d.ts.map +1 -1
- package/dist/types/components/Map/DHIS2Map.d.ts +1 -1
- package/dist/types/components/Map/DHIS2Map.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts +2 -2
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts.map +1 -1
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts +2 -2
- package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapArea/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapArea/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapControls/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapControls/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts +4 -4
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapLayer/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts +4 -4
- package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapProvider/hooks/index.d.ts +3 -3
- package/dist/types/components/Map/components/MapProvider/index.d.ts +2 -2
- package/dist/types/components/Map/components/MapProvider/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/MapUpdater/index.d.ts +1 -1
- package/dist/types/components/Map/components/MapUpdater/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts +2 -2
- package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts.map +1 -1
- package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts +3 -3
- package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts.map +1 -1
- package/dist/types/components/Map/hooks/map.d.ts.map +1 -1
- package/dist/types/components/Map/index.d.ts +5 -5
- package/dist/types/components/Map/index.d.ts.map +1 -1
- package/dist/types/components/Map/interfaces/index.d.ts +2 -2
- package/dist/types/components/Map/interfaces/index.d.ts.map +1 -1
- package/dist/types/components/Map/state/index.d.ts +2 -2
- package/dist/types/components/Map/state/index.d.ts.map +1 -1
- package/dist/types/components/Map/utils/colors.d.ts +1 -1
- package/dist/types/components/Map/utils/colors.d.ts.map +1 -1
- package/dist/types/components/Map/utils/map.d.ts.map +1 -1
- package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts +3 -3
- package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts.map +1 -1
- package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts +1 -1
- package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts.map +1 -1
- package/dist/types/components/SingleValueContainer/index.d.ts +3 -2
- package/dist/types/components/SingleValueContainer/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts +1 -1
- package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts +2 -2
- package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts +1 -1
- package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts +4 -4
- package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts +10 -10
- package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts +2 -2
- package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts +1 -1
- package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts.map +1 -1
- package/dist/types/components/Visualization/index.d.ts +6 -6
- package/dist/types/components/Visualization/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.mjs +0 -254
- package/dist/components/ChartAnalytics/ChartAnalytics.stories.mjs.map +0 -1
- package/dist/components/ChartAnalytics/DHIS2Chart.mjs +0 -36
- package/dist/components/ChartAnalytics/DHIS2Chart.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.mjs +0 -52
- package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.mjs +0 -42
- package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.mjs +0 -65
- package/dist/components/ChartAnalytics/components/DownloadMenu/index.mjs.map +0 -1
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.mjs +0 -3
- package/dist/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.mjs.map +0 -1
- package/dist/components/ChartAnalytics/hooks/useChart.mjs +0 -43
- package/dist/components/ChartAnalytics/hooks/useChart.mjs.map +0 -1
- package/dist/components/ChartAnalytics/index.mjs +0 -3
- package/dist/components/ChartAnalytics/index.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/bar.mjs +0 -21
- package/dist/components/ChartAnalytics/models/bar.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/column.mjs +0 -48
- package/dist/components/ChartAnalytics/models/column.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/index.mjs +0 -117
- package/dist/components/ChartAnalytics/models/index.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/line.mjs +0 -31
- package/dist/components/ChartAnalytics/models/line.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/multi-series.mjs +0 -99
- package/dist/components/ChartAnalytics/models/multi-series.mjs.map +0 -1
- package/dist/components/ChartAnalytics/models/pie.mjs +0 -51
- package/dist/components/ChartAnalytics/models/pie.mjs.map +0 -1
- package/dist/components/ChartAnalytics/services/export.mjs +0 -35
- package/dist/components/ChartAnalytics/services/export.mjs.map +0 -1
- package/dist/components/ChartAnalytics/types/props.mjs +0 -3
- package/dist/components/ChartAnalytics/types/props.mjs.map +0 -1
- package/dist/components/ChartAnalytics/utils/chart.mjs +0 -130
- package/dist/components/ChartAnalytics/utils/chart.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.mjs +0 -66
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.mjs +0 -42
- package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/index.mjs +0 -4
- package/dist/components/CircularProgressDashboard/index.mjs.map +0 -1
- package/dist/components/CircularProgressDashboard/types/props.mjs +0 -3
- package/dist/components/CircularProgressDashboard/types/props.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.mjs +0 -26
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.mjs +0 -30
- package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/components/Table/index.mjs +0 -10
- package/dist/components/DHIS2PivotTable/components/Table/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/components/TableBody/index.mjs +0 -106
- package/dist/components/DHIS2PivotTable/components/TableBody/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.mjs +0 -94
- package/dist/components/DHIS2PivotTable/components/TableHeaders/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/index.mjs +0 -4
- package/dist/components/DHIS2PivotTable/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/interfaces/index.mjs +0 -3
- package/dist/components/DHIS2PivotTable/interfaces/index.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/services/engine.mjs +0 -93
- package/dist/components/DHIS2PivotTable/services/engine.mjs.map +0 -1
- package/dist/components/DHIS2PivotTable/state/engine.mjs +0 -17
- package/dist/components/DHIS2PivotTable/state/engine.mjs.map +0 -1
- package/dist/components/Map/DHIS2Map.mjs +0 -65
- package/dist/components/Map/DHIS2Map.mjs.map +0 -1
- package/dist/components/Map/DHIS2Map.stories.mjs +0 -366
- package/dist/components/Map/DHIS2Map.stories.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.mjs +0 -41
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.mjs +0 -34
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.mjs +0 -26
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.mjs +0 -21
- package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.mjs +0 -67
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.mjs +0 -134
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.mjs +0 -44
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.mjs +0 -67
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.mjs +0 -24
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.mjs +0 -67
- package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.mjs +0 -45
- package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.mjs.map +0 -1
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.mjs +0 -4
- package/dist/components/Map/components/EarthEngineLayerConfiguration/index.mjs.map +0 -1
- package/dist/components/Map/components/MapArea/index.mjs +0 -85
- package/dist/components/Map/components/MapArea/index.mjs.map +0 -1
- package/dist/components/Map/components/MapArea/interfaces/index.mjs +0 -3
- package/dist/components/Map/components/MapArea/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/components/CustomControl/index.mjs +0 -16
- package/dist/components/Map/components/MapControls/components/CustomControl/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.mjs +0 -15
- package/dist/components/Map/components/MapControls/components/DownloadControl/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.mjs +0 -13
- package/dist/components/Map/components/MapControls/components/FullscreenControl/index.mjs.map +0 -1
- package/dist/components/Map/components/MapControls/index.mjs +0 -23
- package/dist/components/Map/components/MapControls/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.mjs +0 -10
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.mjs +0 -52
- package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.mjs +0 -65
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.mjs +0 -439
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.mjs +0 -32
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.mjs +0 -197
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.mjs +0 -3
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.mjs +0 -359
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.mjs +0 -82
- package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.mjs +0 -17
- package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.mjs +0 -179
- package/dist/components/Map/components/MapLayer/components/LegendArea/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.mjs +0 -78
- package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.mjs +0 -11
- package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.mjs +0 -48
- package/dist/components/Map/components/MapLayer/components/PointLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.mjs +0 -36
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.mjs +0 -111
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.mjs +0 -41
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs +0 -50
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.mjs +0 -42
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.mjs +0 -37
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.mjs +0 -40
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs +0 -12
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.mjs +0 -55
- package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/index.mjs +0 -32
- package/dist/components/Map/components/MapLayer/index.mjs.map +0 -1
- package/dist/components/Map/components/MapLayer/interfaces/index.mjs +0 -5
- package/dist/components/Map/components/MapLayer/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.mjs +0 -405
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.mjs +0 -115
- package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/hooks/index.mjs +0 -16
- package/dist/components/Map/components/MapProvider/hooks/index.mjs.map +0 -1
- package/dist/components/Map/components/MapProvider/index.mjs +0 -95
- package/dist/components/Map/components/MapProvider/index.mjs.map +0 -1
- package/dist/components/Map/components/MapUpdater/index.mjs +0 -11
- package/dist/components/Map/components/MapUpdater/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs +0 -41
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.mjs +0 -24
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs +0 -174
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.mjs +0 -21
- package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.mjs +0 -24
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.mjs +0 -436
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.mjs +0 -71
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.mjs +0 -74
- package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.mjs +0 -57
- package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.mjs +0 -44
- package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.mjs +0 -60
- package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.mjs +0 -54
- package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.mjs +0 -63
- package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/index.mjs +0 -5
- package/dist/components/Map/components/ThematicLayerConfiguration/index.mjs.map +0 -1
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.mjs +0 -3
- package/dist/components/Map/components/ThematicLayerConfiguration/types/index.mjs.map +0 -1
- package/dist/components/Map/constants/colors.mjs +0 -436
- package/dist/components/Map/constants/colors.mjs.map +0 -1
- package/dist/components/Map/constants/legendSet.mjs +0 -23
- package/dist/components/Map/constants/legendSet.mjs.map +0 -1
- package/dist/components/Map/hooks/map.mjs +0 -44
- package/dist/components/Map/hooks/map.mjs.map +0 -1
- package/dist/components/Map/index.mjs +0 -7
- package/dist/components/Map/index.mjs.map +0 -1
- package/dist/components/Map/interfaces/index.mjs +0 -3
- package/dist/components/Map/interfaces/index.mjs.map +0 -1
- package/dist/components/Map/state/index.mjs +0 -18
- package/dist/components/Map/state/index.mjs.map +0 -1
- package/dist/components/Map/utils/colors.mjs +0 -77
- package/dist/components/Map/utils/colors.mjs.map +0 -1
- package/dist/components/Map/utils/helpers.mjs +0 -18
- package/dist/components/Map/utils/helpers.mjs.map +0 -1
- package/dist/components/Map/utils/map.mjs +0 -127
- package/dist/components/Map/utils/map.mjs.map +0 -1
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.mjs +0 -145
- package/dist/components/SingleValueContainer/SingleValueContainer.stories.mjs.map +0 -1
- package/dist/components/SingleValueContainer/SingleValueVisualizer.mjs +0 -44
- package/dist/components/SingleValueContainer/SingleValueVisualizer.mjs.map +0 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs +0 -49
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs.map +0 -1
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs +0 -22
- package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs.map +0 -1
- package/dist/components/SingleValueContainer/index.mjs +0 -4
- package/dist/components/SingleValueContainer/index.mjs.map +0 -1
- package/dist/components/SingleValueContainer/types/props.mjs +0 -3
- package/dist/components/SingleValueContainer/types/props.mjs.map +0 -1
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.mjs +0 -67
- package/dist/components/Visualization/components/AnalyticsDataProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/DimensionsProvider/index.mjs +0 -35
- package/dist/components/Visualization/components/DimensionsProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/LayoutProvider/index.mjs +0 -17
- package/dist/components/Visualization/components/LayoutProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.mjs +0 -85
- package/dist/components/Visualization/components/VisualizationDimensionSelector/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationProvider/index.mjs +0 -13
- package/dist/components/Visualization/components/VisualizationProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationSelector/index.mjs +0 -167
- package/dist/components/Visualization/components/VisualizationSelector/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.mjs +0 -23
- package/dist/components/Visualization/components/VisualizationTypeProvider/index.mjs.map +0 -1
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.mjs +0 -39
- package/dist/components/Visualization/components/VisualizationTypeSelector/index.mjs.map +0 -1
- package/dist/components/Visualization/index.mjs +0 -113
- package/dist/components/Visualization/index.mjs.map +0 -1
- package/dist/index.mjs +0 -8
- package/dist/index.mjs.map +0 -1
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
class DHIS2Chart {
|
|
2
|
-
id;
|
|
3
|
-
analytics;
|
|
4
|
-
config;
|
|
5
|
-
constructor(id, analytics, config) {
|
|
6
|
-
this.id = id;
|
|
7
|
-
this.analytics = analytics;
|
|
8
|
-
this.config = config;
|
|
9
|
-
}
|
|
10
|
-
getChartConfig() {
|
|
11
|
-
return {
|
|
12
|
-
renderTo: this.id,
|
|
13
|
-
zoomType: "xy",
|
|
14
|
-
type: this.getHighchartsType(),
|
|
15
|
-
height: this.config?.height,
|
|
16
|
-
styledMode: false
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
getOptions() {
|
|
20
|
-
const options = {
|
|
21
|
-
yAxis: this.getYAxis(),
|
|
22
|
-
chart: this.getChartConfig(),
|
|
23
|
-
colors: this.config?.colors ?? [
|
|
24
|
-
"#a8bf24",
|
|
25
|
-
"#518cc3",
|
|
26
|
-
"#d74554",
|
|
27
|
-
"#ff9e21",
|
|
28
|
-
"#968f8f",
|
|
29
|
-
"#ba3ba1",
|
|
30
|
-
"#ffda54",
|
|
31
|
-
"#45beae",
|
|
32
|
-
"#b98037",
|
|
33
|
-
"#676767",
|
|
34
|
-
"#6b2dd4",
|
|
35
|
-
"#47792c",
|
|
36
|
-
"#fcbdbd",
|
|
37
|
-
"#830000",
|
|
38
|
-
"#a5ffc0",
|
|
39
|
-
"#000078",
|
|
40
|
-
"#817c00",
|
|
41
|
-
"#bdf023",
|
|
42
|
-
"#fffac4"
|
|
43
|
-
],
|
|
44
|
-
series: this.getSeries(),
|
|
45
|
-
plotOptions: this.getPlotOptions(),
|
|
46
|
-
title: { text: "" },
|
|
47
|
-
xAxis: this.getXAxis(),
|
|
48
|
-
exporting: this.getExporting(),
|
|
49
|
-
legend: { enabled: true },
|
|
50
|
-
credits: { enabled: false }
|
|
51
|
-
};
|
|
52
|
-
let overrides = {};
|
|
53
|
-
if (this.config?.highChartOverrides) {
|
|
54
|
-
overrides = {
|
|
55
|
-
...typeof this.config?.highChartOverrides === "object" ? this.config?.highChartOverrides ?? {} : this.config?.highChartOverrides(options)
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
...options,
|
|
60
|
-
...overrides
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
getYAxis() {
|
|
64
|
-
return [
|
|
65
|
-
{
|
|
66
|
-
title: {
|
|
67
|
-
text: "",
|
|
68
|
-
style: {
|
|
69
|
-
color: "#000000",
|
|
70
|
-
fontWeight: "normal",
|
|
71
|
-
fontSize: "14px"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
labels: {
|
|
75
|
-
enabled: true,
|
|
76
|
-
style: {
|
|
77
|
-
color: "#000000",
|
|
78
|
-
fontWeight: "normal",
|
|
79
|
-
fontSize: "14px"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
plotLines: [
|
|
83
|
-
{
|
|
84
|
-
color: "#000000",
|
|
85
|
-
dashStyle: "Solid",
|
|
86
|
-
width: 2,
|
|
87
|
-
zIndex: 1e3,
|
|
88
|
-
label: { text: "" }
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
color: "#bbbbbb",
|
|
92
|
-
dashStyle: "Solid",
|
|
93
|
-
zIndex: 1e3,
|
|
94
|
-
width: 2,
|
|
95
|
-
label: { text: "" }
|
|
96
|
-
}
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
];
|
|
100
|
-
}
|
|
101
|
-
getExporting() {
|
|
102
|
-
const name = this.config?.name ?? "chart";
|
|
103
|
-
return {
|
|
104
|
-
filename: `${name}`,
|
|
105
|
-
sourceWidth: 1200,
|
|
106
|
-
buttons: {
|
|
107
|
-
contextButton: {
|
|
108
|
-
enabled: false
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export { DHIS2Chart };
|
|
116
|
-
//# sourceMappingURL=out.js.map
|
|
117
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ChartAnalytics/models/index.ts"],"names":[],"mappings":"AAIO,MAAe,WAAW;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,IAAY,WAAsB,QAAqB;AAClE,SAAK,KAAK;AACV,SAAK,YAAY;AACjB,SAAK,SAAS;AAAA,EACf;AAAA,EAIA,iBAAgD;AAC/C,WAAO;AAAA,MACN,UAAU,KAAK;AAAA,MACf,UAAU;AAAA,MACV,MAAM,KAAK,kBAAkB;AAAA,MAC7B,QAAQ,KAAK,QAAQ;AAAA,MACrB,YAAY;AAAA,IACb;AAAA,EACD;AAAA,EAEA,aAAiC;AAChC,UAAM,UAAU;AAAA,MACf,OAAO,KAAK,SAAS;AAAA,MACrB,OAAO,KAAK,eAAe;AAAA,MAC3B,QAAQ,KAAK,QAAQ,UAAU;AAAA,QAC9B;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,QAAQ,KAAK,UAAU;AAAA,MACvB,aAAa,KAAK,eAAe;AAAA,MACjC,OAAO,EAAE,MAAM,GAAG;AAAA,MAClB,OAAO,KAAK,SAAS;AAAA,MACrB,WAAW,KAAK,aAAa;AAAA,MAC7B,QAAQ,EAAE,SAAS,KAAK;AAAA,MACxB,SAAS,EAAE,SAAS,MAAM;AAAA,IAC3B;AAEA,QAAI,YAAY,CAAC;AAEjB,QAAI,KAAK,QAAQ,oBAAoB;AACpC,kBAAY;AAAA,QACX,GAAI,OAAO,KAAK,QAAQ,uBAAuB,WAC5C,KAAK,QAAQ,sBAAsB,CAAC,IACpC,KAAK,QAAQ,mBAAmB,OAAO;AAAA,MAC3C;AAAA,IACD;AAEA,WAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,EACD;AAAA,EAQA,WAAsC;AACrC,WAAO;AAAA,MACN;AAAA,QACC,OAAO;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,YACN,OAAO;AAAA,YACP,YAAY;AAAA,YACZ,UAAU;AAAA,UACX;AAAA,QACD;AAAA,QACA,QAAQ;AAAA,UACP,SAAS;AAAA,UACT,OAAO;AAAA,YACN,OAAO;AAAA,YACP,YAAY;AAAA,YACZ,UAAU;AAAA,UACX;AAAA,QACD;AAAA,QACA,WAAW;AAAA,UACV;AAAA,YACC,OAAO;AAAA,YACP,WAAW;AAAA,YACX,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,OAAO,EAAE,MAAM,GAAG;AAAA,UACnB;AAAA,UACA;AAAA,YACC,OAAO;AAAA,YACP,WAAW;AAAA,YACX,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,OAAO,EAAE,MAAM,GAAG;AAAA,UACnB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,eAA4C;AAC3C,UAAM,OAAO,KAAK,QAAQ,QAAQ;AAClC,WAAO;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,aAAa;AAAA,MACb,SAAS;AAAA,QACR,eAAe;AAAA,UACd,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD","sourcesContent":["import type { Analytics } from \"@hisptz/dhis2-utils\";\nimport HighCharts from \"highcharts\";\nimport { ChartConfig } from \"../types/props\";\n\nexport abstract class DHIS2Chart {\n\tid: string;\n\tanalytics: Analytics;\n\tconfig: ChartConfig;\n\n\tconstructor(id: string, analytics: Analytics, config: ChartConfig) {\n\t\tthis.id = id;\n\t\tthis.analytics = analytics;\n\t\tthis.config = config;\n\t}\n\n\tabstract getHighchartsType(): string;\n\n\tgetChartConfig(): HighCharts.ChartOptions & any {\n\t\treturn {\n\t\t\trenderTo: this.id,\n\t\t\tzoomType: \"xy\",\n\t\t\ttype: this.getHighchartsType(),\n\t\t\theight: this.config?.height,\n\t\t\tstyledMode: false,\n\t\t};\n\t}\n\n\tgetOptions(): HighCharts.Options {\n\t\tconst options = {\n\t\t\tyAxis: this.getYAxis(),\n\t\t\tchart: this.getChartConfig(),\n\t\t\tcolors: this.config?.colors ?? [\n\t\t\t\t\"#a8bf24\",\n\t\t\t\t\"#518cc3\",\n\t\t\t\t\"#d74554\",\n\t\t\t\t\"#ff9e21\",\n\t\t\t\t\"#968f8f\",\n\t\t\t\t\"#ba3ba1\",\n\t\t\t\t\"#ffda54\",\n\t\t\t\t\"#45beae\",\n\t\t\t\t\"#b98037\",\n\t\t\t\t\"#676767\",\n\t\t\t\t\"#6b2dd4\",\n\t\t\t\t\"#47792c\",\n\t\t\t\t\"#fcbdbd\",\n\t\t\t\t\"#830000\",\n\t\t\t\t\"#a5ffc0\",\n\t\t\t\t\"#000078\",\n\t\t\t\t\"#817c00\",\n\t\t\t\t\"#bdf023\",\n\t\t\t\t\"#fffac4\",\n\t\t\t],\n\t\t\tseries: this.getSeries(),\n\t\t\tplotOptions: this.getPlotOptions(),\n\t\t\ttitle: { text: \"\" },\n\t\t\txAxis: this.getXAxis(),\n\t\t\texporting: this.getExporting(),\n\t\t\tlegend: { enabled: true },\n\t\t\tcredits: { enabled: false },\n\t\t};\n\n\t\tlet overrides = {};\n\n\t\tif (this.config?.highChartOverrides) {\n\t\t\toverrides = {\n\t\t\t\t...(typeof this.config?.highChartOverrides === \"object\"\n\t\t\t\t\t? this.config?.highChartOverrides ?? {}\n\t\t\t\t\t: this.config?.highChartOverrides(options)),\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\t...options,\n\t\t\t...overrides,\n\t\t};\n\t}\n\n\tabstract getSeries(): HighCharts.SeriesOptionsType[];\n\n\tabstract getPlotOptions(): HighCharts.PlotOptions;\n\n\tabstract getXAxis(): HighCharts.XAxisOptions | undefined;\n\n\tgetYAxis(): HighCharts.YAxisOptions[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: \"\",\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\tfontWeight: \"normal\",\n\t\t\t\t\t\tfontSize: \"14px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tlabels: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\tfontWeight: \"normal\",\n\t\t\t\t\t\tfontSize: \"14px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tplotLines: [\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\tdashStyle: \"Solid\",\n\t\t\t\t\t\twidth: 2,\n\t\t\t\t\t\tzIndex: 1000,\n\t\t\t\t\t\tlabel: { text: \"\" },\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor: \"#bbbbbb\",\n\t\t\t\t\t\tdashStyle: \"Solid\",\n\t\t\t\t\t\tzIndex: 1000,\n\t\t\t\t\t\twidth: 2,\n\t\t\t\t\t\tlabel: { text: \"\" },\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t];\n\t}\n\n\tgetExporting(): HighCharts.ExportingOptions {\n\t\tconst name = this.config?.name ?? \"chart\";\n\t\treturn {\n\t\t\tfilename: `${name}`,\n\t\t\tsourceWidth: 1200,\n\t\t\tbuttons: {\n\t\t\t\tcontextButton: {\n\t\t\t\t\tenabled: false,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n}\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { getPointSeries, getAllCategories } from '../utils/chart';
|
|
2
|
-
import { DHIS2Chart } from './index';
|
|
3
|
-
|
|
4
|
-
class DHIS2LineChart extends DHIS2Chart {
|
|
5
|
-
getHighchartsType() {
|
|
6
|
-
return "line";
|
|
7
|
-
}
|
|
8
|
-
getPlotOptions() {
|
|
9
|
-
return {
|
|
10
|
-
line: {}
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
getSeries() {
|
|
14
|
-
return getPointSeries(this.analytics, this.config, "line");
|
|
15
|
-
}
|
|
16
|
-
getXAxis() {
|
|
17
|
-
return {
|
|
18
|
-
type: "category",
|
|
19
|
-
categories: getAllCategories(this.analytics, this.config),
|
|
20
|
-
crosshair: true,
|
|
21
|
-
labels: {
|
|
22
|
-
enabled: true
|
|
23
|
-
},
|
|
24
|
-
title: { text: "" }
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { DHIS2LineChart };
|
|
30
|
-
//# sourceMappingURL=out.js.map
|
|
31
|
-
//# sourceMappingURL=line.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ChartAnalytics/models/line.ts"],"names":[],"mappings":"AACA,SAAQ,kBAAkB,sBAAqB;AAC/C,SAAQ,kBAAiB;AAElB,MAAM,uBAAuB,WAAW;AAAA,EAC7C,oBAA4B;AAC1B,WAAO;AAAA,EACT;AAAA,EAEA,iBAA8B;AAC5B,WAAO;AAAA,MACL,MAAM,CAAC;AAAA,IACT;AAAA,EACF;AAAA,EAEA,YAAiC;AAC/B,WAAO,eAAe,KAAK,WAAW,KAAK,QAAQ,MAAM;AAAA,EAC3D;AAAA,EAEA,WAAqC;AACnC,WAAO;AAAA,MACL,MAAM;AAAA,MACN,YAAY,iBAAiB,KAAK,WAAW,KAAK,MAAM;AAAA,MACxD,WAAW;AAAA,MACX,QAAQ;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,OAAO,EAAE,MAAM,GAAG;AAAA,IACpB;AAAA,EACF;AACF","sourcesContent":["import {PlotOptions, SeriesOptionsType, XAxisOptions} from \"highcharts\";\nimport {getAllCategories, getPointSeries} from \"../utils/chart\";\nimport {DHIS2Chart} from \"./index\";\n\nexport class DHIS2LineChart extends DHIS2Chart {\n getHighchartsType(): string {\n return \"line\";\n }\n\n getPlotOptions(): PlotOptions {\n return {\n line: {},\n };\n }\n\n getSeries(): SeriesOptionsType[] {\n return getPointSeries(this.analytics, this.config, \"line\");\n }\n\n getXAxis(): XAxisOptions | undefined {\n return {\n type: \"category\",\n categories: getAllCategories(this.analytics, this.config),\n crosshair: true,\n labels: {\n enabled: true,\n },\n title: { text: \"\" },\n };\n }\n}\n"]}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { head, compact } from 'lodash';
|
|
2
|
-
import { getDimensionHeaderIndex, getAllCategories } from '../utils/chart';
|
|
3
|
-
import { DHIS2Chart } from './index';
|
|
4
|
-
|
|
5
|
-
class DHIS2MultiSeriesChart extends DHIS2Chart {
|
|
6
|
-
getHighchartsType() {
|
|
7
|
-
return "";
|
|
8
|
-
}
|
|
9
|
-
getPlotOptions() {
|
|
10
|
-
return {
|
|
11
|
-
column: {},
|
|
12
|
-
line: {}
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
getSeries() {
|
|
16
|
-
const analytics = this.analytics;
|
|
17
|
-
const config = this.config;
|
|
18
|
-
const categoryDimension = head(config.layout.category);
|
|
19
|
-
const seriesConfig = this.config.multiSeries;
|
|
20
|
-
const categoryIndex = getDimensionHeaderIndex(analytics.headers ?? [], categoryDimension ?? "");
|
|
21
|
-
const seriesIndex = getDimensionHeaderIndex(analytics.headers ?? [], head(config.layout.series) ?? "");
|
|
22
|
-
const valueIndex = getDimensionHeaderIndex(analytics.headers ?? [], "value");
|
|
23
|
-
if (!categoryDimension) {
|
|
24
|
-
throw new Error("At least one category dimension is required");
|
|
25
|
-
}
|
|
26
|
-
if (!seriesConfig) {
|
|
27
|
-
throw new Error("MultiSeries config is required for chart type multi-series");
|
|
28
|
-
}
|
|
29
|
-
return compact(
|
|
30
|
-
seriesConfig?.series?.map(({ id, as, cumulative, yAxis }) => {
|
|
31
|
-
const dataItem = analytics.metaData?.items[id];
|
|
32
|
-
const categoryItems = analytics.metaData?.dimensions[categoryDimension];
|
|
33
|
-
const data = categoryItems?.map((item) => {
|
|
34
|
-
const row = analytics.rows?.find((row2) => row2[categoryIndex] === item && row2[seriesIndex] === id);
|
|
35
|
-
return row?.[valueIndex] ? parseFloat(row?.[valueIndex]) : 0;
|
|
36
|
-
});
|
|
37
|
-
let cumulativeData = [];
|
|
38
|
-
if (cumulative) {
|
|
39
|
-
cumulativeData = data?.reduce((acc, curr, index) => {
|
|
40
|
-
if (index === 0) {
|
|
41
|
-
return [...acc, curr];
|
|
42
|
-
}
|
|
43
|
-
return [...acc, acc[index - 1] + curr];
|
|
44
|
-
}, []) ?? [];
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
name: dataItem?.name,
|
|
48
|
-
data: cumulative ? cumulativeData : data,
|
|
49
|
-
type: as,
|
|
50
|
-
yAxis: yAxis ?? 0
|
|
51
|
-
};
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
getXAxis() {
|
|
56
|
-
return {
|
|
57
|
-
type: "category",
|
|
58
|
-
categories: getAllCategories(this.analytics, this.config),
|
|
59
|
-
crosshair: true,
|
|
60
|
-
labels: {
|
|
61
|
-
enabled: true
|
|
62
|
-
},
|
|
63
|
-
title: { text: "" }
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
getYAxis() {
|
|
67
|
-
let yAxes = [];
|
|
68
|
-
if (this.config.multiSeries?.yAxes) {
|
|
69
|
-
yAxes = this.config.multiSeries?.yAxes;
|
|
70
|
-
} else {
|
|
71
|
-
yAxes = super.getYAxis();
|
|
72
|
-
}
|
|
73
|
-
if (!this.config.multiSeries?.target) {
|
|
74
|
-
return yAxes;
|
|
75
|
-
}
|
|
76
|
-
const { value, styles, label } = this.config.multiSeries?.target ?? {};
|
|
77
|
-
return [
|
|
78
|
-
{
|
|
79
|
-
...yAxes[0],
|
|
80
|
-
plotLines: [
|
|
81
|
-
...yAxes[0].plotLines ?? [],
|
|
82
|
-
{
|
|
83
|
-
color: styles?.color ?? "#00FF00",
|
|
84
|
-
dashStyle: styles?.dashStyle ?? "Solid",
|
|
85
|
-
value,
|
|
86
|
-
width: styles?.width ?? 2,
|
|
87
|
-
zIndex: styles?.zIndex ?? 1e3,
|
|
88
|
-
label
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
...yAxes.slice(1)
|
|
93
|
-
];
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export { DHIS2MultiSeriesChart };
|
|
98
|
-
//# sourceMappingURL=out.js.map
|
|
99
|
-
//# sourceMappingURL=multi-series.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ChartAnalytics/models/multi-series.ts"],"names":["row"],"mappings":"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","sourcesContent":["import {PlotOptions, SeriesOptionsType, XAxisOptions, YAxisOptions} from \"highcharts\";\nimport {compact, head} from \"lodash\";\nimport {MultiSeriesConfig} from \"../types/props\";\nimport {getAllCategories, getDimensionHeaderIndex} from \"../utils/chart\";\nimport {DHIS2Chart} from \"./index\";\n\nexport class DHIS2MultiSeriesChart extends DHIS2Chart {\n getHighchartsType(): string {\n return \"\";\n }\n\n getPlotOptions(): PlotOptions {\n return {\n column: {},\n line: {},\n };\n }\n\n getSeries(): SeriesOptionsType[] {\n const analytics = this.analytics;\n const config = this.config;\n\n const categoryDimension = head(config.layout.category);\n const seriesConfig: MultiSeriesConfig | undefined = this.config.multiSeries;\n\n const categoryIndex = getDimensionHeaderIndex(analytics.headers ?? [], categoryDimension ?? \"\");\n const seriesIndex = getDimensionHeaderIndex(analytics.headers ?? [], head(config.layout.series) ?? \"\");\n const valueIndex = getDimensionHeaderIndex(analytics.headers ?? [], \"value\");\n\n if (!categoryDimension) {\n throw new Error(\"At least one category dimension is required\");\n }\n\n if (!seriesConfig) {\n throw new Error(\"MultiSeries config is required for chart type multi-series\");\n }\n\n return compact(\n seriesConfig?.series?.map(({ id, as, cumulative, yAxis }) => {\n const dataItem = analytics.metaData?.items[id as any];\n const categoryItems = analytics.metaData?.dimensions[categoryDimension as \"dx\" | \"ou\" | \"pe\"];\n\n const data = categoryItems?.map((item: string) => {\n const row = analytics.rows?.find((row: any) => row[categoryIndex] === item && row[seriesIndex] === id);\n return row?.[valueIndex] ? parseFloat(row?.[valueIndex]) : 0;\n });\n\n let cumulativeData: number[] = [];\n\n if (cumulative) {\n cumulativeData =\n data?.reduce((acc, curr, index) => {\n if (index === 0) {\n return [...acc, curr];\n }\n return [...acc, acc[index - 1] + curr];\n }, [] as number[]) ?? [];\n }\n\n return {\n name: dataItem?.name,\n data: cumulative ? cumulativeData : data,\n type: as,\n yAxis: yAxis ?? 0,\n };\n })\n ) as SeriesOptionsType[];\n }\n\n getXAxis(): XAxisOptions | undefined {\n return {\n type: \"category\",\n categories: getAllCategories(this.analytics, this.config),\n crosshair: true,\n labels: {\n enabled: true,\n },\n title: { text: \"\" },\n };\n }\n\n getYAxis(): YAxisOptions[] {\n let yAxes: YAxisOptions[] = [];\n\n if (this.config.multiSeries?.yAxes) {\n yAxes = this.config.multiSeries?.yAxes;\n } else {\n yAxes = super.getYAxis();\n }\n\n if (!this.config.multiSeries?.target) {\n return yAxes;\n }\n\n const { value, styles, label } = this.config.multiSeries?.target ?? {};\n\n return [\n {\n ...yAxes[0],\n plotLines: [\n ...(yAxes[0].plotLines ?? []),\n {\n color: styles?.color ?? \"#00FF00\",\n dashStyle: styles?.dashStyle ?? \"Solid\",\n value,\n width: styles?.width ?? 2,\n zIndex: styles?.zIndex ?? 1000,\n label: label,\n },\n ],\n },\n ...yAxes.slice(1),\n ];\n }\n}\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { head } from 'lodash';
|
|
2
|
-
import { DHIS2Chart } from './index';
|
|
3
|
-
|
|
4
|
-
class DHIS2PieChart extends DHIS2Chart {
|
|
5
|
-
getHighchartsType() {
|
|
6
|
-
return "pie";
|
|
7
|
-
}
|
|
8
|
-
getPlotOptions() {
|
|
9
|
-
return {
|
|
10
|
-
pie: {
|
|
11
|
-
allowPointSelect: true,
|
|
12
|
-
cursor: "pointer",
|
|
13
|
-
dataLabels: {
|
|
14
|
-
enabled: true,
|
|
15
|
-
format: "<b>{point.name}</b>: {point.percentage:.1f} %"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
getSeries() {
|
|
21
|
-
const analytics = this.analytics;
|
|
22
|
-
const config = this.config;
|
|
23
|
-
const seriesDimension = head(config.layout.series);
|
|
24
|
-
const seriesIndex = analytics?.headers?.findIndex((h) => h.name === seriesDimension) ?? -1;
|
|
25
|
-
const valueIndex = analytics?.headers?.findIndex((h) => h.name === "value") ?? -1;
|
|
26
|
-
if (!seriesDimension) {
|
|
27
|
-
throw new Error("Pie chart must have a series dimension");
|
|
28
|
-
}
|
|
29
|
-
const seriesValues = analytics.metaData?.dimensions?.[seriesDimension];
|
|
30
|
-
return [
|
|
31
|
-
{
|
|
32
|
-
id: seriesDimension ?? "",
|
|
33
|
-
name: analytics.metaData?.items?.[seriesDimension]?.name ?? "",
|
|
34
|
-
data: seriesValues?.map((value) => {
|
|
35
|
-
const row = analytics?.rows?.find((row2) => row2[seriesIndex] === value);
|
|
36
|
-
return {
|
|
37
|
-
name: analytics.metaData?.items?.[value]?.name,
|
|
38
|
-
y: row?.[valueIndex] ? parseFloat(row?.[valueIndex] ?? "") : 0
|
|
39
|
-
};
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
];
|
|
43
|
-
}
|
|
44
|
-
getXAxis() {
|
|
45
|
-
return void 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { DHIS2PieChart };
|
|
50
|
-
//# sourceMappingURL=out.js.map
|
|
51
|
-
//# sourceMappingURL=pie.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ChartAnalytics/models/pie.ts"],"names":["row"],"mappings":"AACA,SAAQ,YAAW;AACnB,SAAQ,kBAAiB;AAElB,MAAM,sBAAsB,WAAW;AAAA,EAC5C,oBAA4B;AAC1B,WAAO;AAAA,EACT;AAAA,EAEA,iBAA8B;AAC5B,WAAO;AAAA,MACL,KAAK;AAAA,QACH,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,YAAY;AAAA,UACV,SAAS;AAAA,UACT,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAiC;AAC/B,UAAM,YAAY,KAAK;AACvB,UAAM,SAAS,KAAK;AACpB,UAAM,kBAAkB,KAAK,OAAO,OAAO,MAAM;AACjD,UAAM,cAAc,WAAW,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,eAAe,KAAK;AACxF,UAAM,aAAa,WAAW,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,KAAK;AAE/E,QAAI,CAAC,iBAAiB;AACpB,YAAM,IAAI,MAAM,wCAAwC;AAAA,IAC1D;AACA,UAAM,eAAe,UAAU,UAAU,aAAa,eAAqC;AAE3F,WAAO;AAAA,MACL;AAAA,QACE,IAAI,mBAAmB;AAAA,QACvB,MAAM,UAAU,UAAU,QAAQ,eAAsB,GAAG,QAAQ;AAAA,QACnE,MAAM,cAAc,IAAI,CAAC,UAAkB;AACzC,gBAAM,MAAM,WAAW,MAAM,KAAK,CAACA,SAAaA,KAAI,WAAW,MAAM,KAAK;AAE1E,iBAAO;AAAA,YACL,MAAM,UAAU,UAAU,QAAQ,KAAY,GAAG;AAAA,YACjD,GAAG,MAAM,UAAU,IAAI,WAAW,MAAM,UAAU,KAAK,EAAE,IAAI;AAAA,UAC/D;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAqC;AACnC,WAAO;AAAA,EACT;AACF","sourcesContent":["import {PlotOptions, SeriesOptionsType, XAxisOptions} from \"highcharts\";\nimport {head} from \"lodash\";\nimport {DHIS2Chart} from \"./index\";\n\nexport class DHIS2PieChart extends DHIS2Chart {\n getHighchartsType(): string {\n return \"pie\";\n }\n\n getPlotOptions(): PlotOptions {\n return {\n pie: {\n allowPointSelect: true,\n cursor: \"pointer\",\n dataLabels: {\n enabled: true,\n format: \"<b>{point.name}</b>: {point.percentage:.1f} %\",\n },\n },\n };\n }\n\n getSeries(): SeriesOptionsType[] {\n const analytics = this.analytics;\n const config = this.config;\n const seriesDimension = head(config.layout.series);\n const seriesIndex = analytics?.headers?.findIndex((h) => h.name === seriesDimension) ?? -1;\n const valueIndex = analytics?.headers?.findIndex((h) => h.name === \"value\") ?? -1;\n\n if (!seriesDimension) {\n throw new Error(\"Pie chart must have a series dimension\");\n }\n const seriesValues = analytics.metaData?.dimensions?.[seriesDimension as \"dx\" | \"ou\" | \"pe\"];\n\n return [\n {\n id: seriesDimension ?? \"\",\n name: analytics.metaData?.items?.[seriesDimension as any]?.name ?? \"\",\n data: seriesValues?.map((value: string) => {\n const row = analytics?.rows?.find((row: any) => row[seriesIndex] === value);\n\n return {\n name: analytics.metaData?.items?.[value as any]?.name,\n y: row?.[valueIndex] ? parseFloat(row?.[valueIndex] ?? \"\") : 0,\n };\n }),\n } as SeriesOptionsType,\n ];\n }\n\n getXAxis(): XAxisOptions | undefined {\n return undefined;\n }\n}\n"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import HighChartsExportCSV from 'highcharts/modules/export-data';
|
|
2
|
-
import HighChartsExport from 'highcharts/modules/exporting';
|
|
3
|
-
import HighChartsFullScreen from 'highcharts/modules/full-screen';
|
|
4
|
-
|
|
5
|
-
function setupHighchartsModules(highcharts) {
|
|
6
|
-
HighChartsExport(highcharts);
|
|
7
|
-
HighChartsExportCSV(highcharts);
|
|
8
|
-
HighChartsFullScreen(highcharts);
|
|
9
|
-
}
|
|
10
|
-
function onFullScreenView(chartRef, options) {
|
|
11
|
-
chartRef?.chart?.fullscreen.toggle();
|
|
12
|
-
}
|
|
13
|
-
function onPDFDownload(chartRef, options) {
|
|
14
|
-
chartRef?.chart.exportChart({ type: "application/pdf" }, options ?? {});
|
|
15
|
-
}
|
|
16
|
-
function onCSVDownload(chartRef, options) {
|
|
17
|
-
chartRef?.chart.downloadCSV();
|
|
18
|
-
}
|
|
19
|
-
const onImageDownload = (chartRef, type, options) => {
|
|
20
|
-
chartRef?.chart.exportChart({ type: `image/${type}` }, options ?? {});
|
|
21
|
-
};
|
|
22
|
-
const onViewAsTable = (chartRef, show) => {
|
|
23
|
-
const options = chartRef?.chart.options;
|
|
24
|
-
chartRef?.chart?.update({
|
|
25
|
-
...options,
|
|
26
|
-
exporting: {
|
|
27
|
-
...options?.exporting,
|
|
28
|
-
showTable: show
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { onCSVDownload, onFullScreenView, onImageDownload, onPDFDownload, onViewAsTable, setupHighchartsModules };
|
|
34
|
-
//# sourceMappingURL=out.js.map
|
|
35
|
-
//# sourceMappingURL=export.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ChartAnalytics/services/export.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB;AAChC,OAAO,sBAAsB;AAC7B,OAAO,0BAA0B;AAE1B,SAAS,uBAAuB,YAA+B;AACrE,mBAAiB,UAAU;AAC3B,sBAAoB,UAAU;AAC9B,uBAAqB,UAAU;AAChC;AAEO,SAAS,iBAAiB,UAAqC,SAA8B;AAClG,YAAU,OAAO,WAAW,OAAO;AACrC;AAEO,SAAS,cAAc,UAAqC,SAA8B;AAC/F,YAAU,MAAM,YAAY,EAAE,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC;AACxE;AAEO,SAAS,cAAc,UAAqC,SAA8B;AAC/F,YAAU,MAAM,YAAY;AAC9B;AAEO,MAAM,kBAAkB,CAAC,UAAqC,MAAkC,YAAiC;AACtI,YAAU,MAAM,YAAY,EAAE,MAAM,SAAS,IAAI,GAAG,GAAG,WAAW,CAAC,CAAC;AACtE;AAEO,MAAM,gBAAgB,CAAC,UAAqC,SAAkB;AACnF,QAAM,UAAU,UAAU,MAAM;AAChC,YAAU,OAAO,OAAO;AAAA,IACtB,GAAG;AAAA,IACH,WAAW;AAAA,MACT,GAAG,SAAS;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,EACF,CAAC;AACH","sourcesContent":["import Highcharts from \"highcharts\";\nimport HighchartsReact from \"highcharts-react-official\";\nimport HighChartsExportCSV from \"highcharts/modules/export-data\";\nimport HighChartsExport from \"highcharts/modules/exporting\";\nimport HighChartsFullScreen from \"highcharts/modules/full-screen\";\n\nexport function setupHighchartsModules(highcharts: typeof Highcharts) {\n\tHighChartsExport(highcharts);\n\tHighChartsExportCSV(highcharts);\n\tHighChartsFullScreen(highcharts);\n}\n\nexport function onFullScreenView(chartRef: HighchartsReact.RefObject, options?: Highcharts.Options) {\n chartRef?.chart?.fullscreen.toggle();\n}\n\nexport function onPDFDownload(chartRef: HighchartsReact.RefObject, options?: Highcharts.Options) {\n chartRef?.chart.exportChart({ type: \"application/pdf\" }, options ?? {});\n}\n\nexport function onCSVDownload(chartRef: HighchartsReact.RefObject, options?: Highcharts.Options) {\n chartRef?.chart.downloadCSV();\n}\n\nexport const onImageDownload = (chartRef: HighchartsReact.RefObject, type: \"png\" | \"svg+xml\" | \"jpeg\", options?: Highcharts.Options) => {\n chartRef?.chart.exportChart({ type: `image/${type}` }, options ?? {});\n};\n\nexport const onViewAsTable = (chartRef: HighchartsReact.RefObject, show: boolean) => {\n const options = chartRef?.chart.options;\n chartRef?.chart?.update({\n ...options,\n exporting: {\n ...options?.exporting,\n showTable: show,\n },\n });\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { findIndex, head, find, compact, set, isEmpty } from 'lodash';
|
|
2
|
-
import { DHIS2StackedColumnChart, DHIS2ColumnChart } from '../models/column';
|
|
3
|
-
import { DHIS2LineChart } from '../models/line';
|
|
4
|
-
import { DHIS2MultiSeriesChart } from '../models/multi-series';
|
|
5
|
-
import { DHIS2PieChart } from '../models/pie';
|
|
6
|
-
import { DHIS2StackedBarChart, DHIS2BarChart } from '../models/bar';
|
|
7
|
-
|
|
8
|
-
function getDimensionHeaderIndex(headers, name) {
|
|
9
|
-
return findIndex(headers, { name });
|
|
10
|
-
}
|
|
11
|
-
function getPointSeries(analytics, config, highchartsType) {
|
|
12
|
-
const series = config.layout.series;
|
|
13
|
-
return series.map((seriesName) => {
|
|
14
|
-
const header = analytics?.headers?.find(
|
|
15
|
-
(header2) => header2.name === seriesName
|
|
16
|
-
);
|
|
17
|
-
if (!header) {
|
|
18
|
-
return void 0;
|
|
19
|
-
}
|
|
20
|
-
if (analytics?.metaData) {
|
|
21
|
-
return getColumnSeries(analytics, header, config, highchartsType);
|
|
22
|
-
}
|
|
23
|
-
})[0];
|
|
24
|
-
}
|
|
25
|
-
function getColumnSeries(analytics, header, config, highchartsType) {
|
|
26
|
-
const headerIndex = analytics?.headers?.findIndex(
|
|
27
|
-
(h) => header.name === h.name
|
|
28
|
-
);
|
|
29
|
-
const valueIndex = analytics?.headers?.findIndex(
|
|
30
|
-
(h) => h.name === "value"
|
|
31
|
-
);
|
|
32
|
-
const colors = config.colors ?? [];
|
|
33
|
-
const { items, dimensions } = analytics?.metaData ?? {};
|
|
34
|
-
const categoriesDimension = config.layout.category;
|
|
35
|
-
const seriesDimensionValues = dimensions?.[header.name] ?? [];
|
|
36
|
-
return head(
|
|
37
|
-
categoriesDimension?.map((categoryDimension) => {
|
|
38
|
-
const categories = dimensions?.[categoryDimension];
|
|
39
|
-
const categoryDimensionIndex = analytics?.headers?.findIndex(
|
|
40
|
-
(h) => h.name === categoryDimension
|
|
41
|
-
);
|
|
42
|
-
return seriesDimensionValues?.map(
|
|
43
|
-
(seriesDimensionValue, index) => {
|
|
44
|
-
const data = categories?.map((category) => {
|
|
45
|
-
const row = find(
|
|
46
|
-
analytics?.rows,
|
|
47
|
-
(row2) => row2[headerIndex ?? -1] === seriesDimensionValue && row2[categoryDimensionIndex ?? -1] === category
|
|
48
|
-
);
|
|
49
|
-
return row?.[valueIndex ?? -1] ? parseFloat(row?.[valueIndex ?? -1]) : 0;
|
|
50
|
-
});
|
|
51
|
-
return {
|
|
52
|
-
name: items?.[seriesDimensionValue]?.name,
|
|
53
|
-
data,
|
|
54
|
-
type: highchartsType,
|
|
55
|
-
color: colors[index % colors.length]
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
})
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
function getCategories({ name }, { items, dimensions }) {
|
|
63
|
-
const categories = dimensions?.[name];
|
|
64
|
-
return categories?.map((category) => {
|
|
65
|
-
return items[category]?.name ?? "";
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
function getAllCategories(analytics, config) {
|
|
69
|
-
const categories = config.layout.category;
|
|
70
|
-
return compact(
|
|
71
|
-
categories?.map((category) => {
|
|
72
|
-
const header = analytics?.headers?.find(
|
|
73
|
-
(header2) => header2.name === category
|
|
74
|
-
);
|
|
75
|
-
if (!header) {
|
|
76
|
-
return void 0;
|
|
77
|
-
}
|
|
78
|
-
if (analytics?.metaData) {
|
|
79
|
-
return getCategories(header, analytics?.metaData);
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
)[0];
|
|
83
|
-
}
|
|
84
|
-
function updateLayout(config, { type }) {
|
|
85
|
-
if (type === config.type) {
|
|
86
|
-
return config.layout;
|
|
87
|
-
}
|
|
88
|
-
const updatedLayout = { ...config.layout };
|
|
89
|
-
switch (type) {
|
|
90
|
-
case "pie":
|
|
91
|
-
set(updatedLayout, "category", []);
|
|
92
|
-
if (isEmpty(updatedLayout.series)) {
|
|
93
|
-
if (!isEmpty(config.layout.category)) {
|
|
94
|
-
set(updatedLayout, "series", [
|
|
95
|
-
head(config.layout.category)
|
|
96
|
-
]);
|
|
97
|
-
} else {
|
|
98
|
-
throw new Error("Invalid layout for pie chart");
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (updatedLayout.series.length > 1) {
|
|
102
|
-
set(updatedLayout, "series", [head(updatedLayout.series)]);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return updatedLayout;
|
|
106
|
-
}
|
|
107
|
-
function getChartInstance(id, analytics, config) {
|
|
108
|
-
switch (config.type) {
|
|
109
|
-
case "column":
|
|
110
|
-
return new DHIS2ColumnChart(id, analytics, config);
|
|
111
|
-
case "bar":
|
|
112
|
-
return new DHIS2BarChart(id, analytics, config);
|
|
113
|
-
case "stacked-bar":
|
|
114
|
-
return new DHIS2StackedBarChart(id, analytics, config);
|
|
115
|
-
case "stacked-column":
|
|
116
|
-
return new DHIS2StackedColumnChart(id, analytics, config);
|
|
117
|
-
case "pie":
|
|
118
|
-
return new DHIS2PieChart(id, analytics, config);
|
|
119
|
-
case "line":
|
|
120
|
-
return new DHIS2LineChart(id, analytics, config);
|
|
121
|
-
case "multi-series":
|
|
122
|
-
return new DHIS2MultiSeriesChart(id, analytics, config);
|
|
123
|
-
default:
|
|
124
|
-
throw new Error(`Unsupported chart type: ${config.type}`);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export { getAllCategories, getChartInstance, getColumnSeries, getDimensionHeaderIndex, getPointSeries, updateLayout };
|
|
129
|
-
//# sourceMappingURL=out.js.map
|
|
130
|
-
//# sourceMappingURL=chart.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ChartAnalytics/utils/chart.ts"],"names":["header","row"],"mappings":"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","sourcesContent":["import type {\n\tAnalytics,\n\tAnalyticsHeader,\n\tAnalyticsMetadata,\n} from \"@hisptz/dhis2-utils\";\nimport { compact, find, findIndex, head, isEmpty, set } from \"lodash\";\nimport { DHIS2Chart } from \"../models\";\nimport { DHIS2ColumnChart, DHIS2StackedColumnChart } from \"../models/column\";\nimport { DHIS2LineChart } from \"../models/line\";\nimport { DHIS2MultiSeriesChart } from \"../models/multi-series\";\nimport { DHIS2PieChart } from \"../models/pie\";\nimport { ChartConfig, ChartType } from \"../types/props\";\nimport { DHIS2BarChart, DHIS2StackedBarChart } from \"../models/bar\";\n\nexport function getDimensionHeaderIndex(\n\theaders: AnalyticsHeader[],\n\tname: string,\n): number {\n\treturn findIndex(headers, { name });\n}\n\nexport function getPointSeries(\n\tanalytics: Analytics,\n\tconfig: ChartConfig,\n\thighchartsType: string,\n) {\n\tconst series: string[] = config.layout.series;\n\n\treturn series.map((seriesName: string) => {\n\t\tconst header = analytics?.headers?.find(\n\t\t\t(header: any) => header.name === seriesName,\n\t\t);\n\t\tif (!header) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (analytics?.metaData) {\n\t\t\treturn getColumnSeries(analytics, header, config, highchartsType);\n\t\t}\n\t})[0];\n}\n\nexport function getColumnSeries(\n\tanalytics: Analytics,\n\theader: AnalyticsHeader,\n\tconfig: ChartConfig,\n\thighchartsType: string,\n): any {\n\tconst headerIndex = analytics?.headers?.findIndex(\n\t\t(h: { name: any }) => header.name === h.name,\n\t);\n\tconst valueIndex = analytics?.headers?.findIndex(\n\t\t(h: { name: string }) => h.name === \"value\",\n\t);\n\n\tconst colors = config.colors ?? [];\n\n\tconst { items, dimensions } = analytics?.metaData ?? {};\n\tconst categoriesDimension = config.layout.category;\n\n\tconst seriesDimensionValues: string[] =\n\t\tdimensions?.[header.name as \"dx\" | \"ou\" | \"pe\"] ?? [];\n\n\treturn head(\n\t\tcategoriesDimension?.map((categoryDimension: string) => {\n\t\t\tconst categories: string[] = dimensions?.[\n\t\t\t\tcategoryDimension as \"dx\" | \"ou\" | \"pe\"\n\t\t\t] as any;\n\t\t\tconst categoryDimensionIndex = analytics?.headers?.findIndex(\n\t\t\t\t(h: { name: string }) => h.name === categoryDimension,\n\t\t\t);\n\t\t\treturn seriesDimensionValues?.map(\n\t\t\t\t(seriesDimensionValue: string, index) => {\n\t\t\t\t\tconst data = categories?.map((category: string) => {\n\t\t\t\t\t\tconst row = find(\n\t\t\t\t\t\t\tanalytics?.rows,\n\t\t\t\t\t\t\t(row: any) =>\n\t\t\t\t\t\t\t\trow[headerIndex ?? -1] ===\n\t\t\t\t\t\t\t\t\tseriesDimensionValue &&\n\t\t\t\t\t\t\t\trow[categoryDimensionIndex ?? -1] === category,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn row?.[valueIndex ?? -1]\n\t\t\t\t\t\t\t? parseFloat(row?.[valueIndex ?? -1])\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t});\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: items?.[seriesDimensionValue as any]?.name,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\ttype: highchartsType,\n\t\t\t\t\t\tcolor: colors[index % colors.length],\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t}),\n\t);\n}\n\nfunction getCategories(\n\t{ name }: AnalyticsHeader,\n\t{ items, dimensions }: AnalyticsMetadata,\n): string[] {\n\tconst categories: string[] = dimensions?.[\n\t\tname as \"dx\" | \"ou\" | \"pe\"\n\t] as any;\n\n\treturn categories?.map((category: string) => {\n\t\treturn items[category as any]?.name ?? \"\";\n\t}) as unknown as string[];\n}\n\nexport function getAllCategories(\n\tanalytics: Analytics,\n\tconfig: ChartConfig,\n): string[] {\n\tconst categories = config.layout.category;\n\n\treturn compact(\n\t\tcategories?.map((category: string) => {\n\t\t\tconst header = analytics?.headers?.find(\n\t\t\t\t(header: any) => header.name === category,\n\t\t\t);\n\t\t\tif (!header) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tif (analytics?.metaData) {\n\t\t\t\treturn getCategories(header, analytics?.metaData);\n\t\t\t}\n\t\t}),\n\t)[0];\n}\n\nexport function updateLayout(\n\tconfig: ChartConfig,\n\t{ type }: { type: ChartType },\n) {\n\tif (type === config.type) {\n\t\treturn config.layout;\n\t}\n\n\tconst updatedLayout = { ...config.layout };\n\n\tswitch (type) {\n\t\tcase \"pie\":\n\t\t\tset(updatedLayout, \"category\", []);\n\t\t\tif (isEmpty(updatedLayout.series)) {\n\t\t\t\tif (!isEmpty(config.layout.category)) {\n\t\t\t\t\tset(updatedLayout, \"series\", [\n\t\t\t\t\t\thead(config.layout.category),\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Invalid layout for pie chart\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (updatedLayout.series.length > 1) {\n\t\t\t\tset(updatedLayout, \"series\", [head(updatedLayout.series)]);\n\t\t\t}\n\t}\n\n\treturn updatedLayout;\n}\n\nexport function getChartInstance(\n\tid: string,\n\tanalytics: Analytics,\n\tconfig: ChartConfig,\n): DHIS2Chart {\n\tswitch (config.type) {\n\t\tcase \"column\":\n\t\t\treturn new DHIS2ColumnChart(id, analytics, config);\n\t\tcase \"bar\":\n\t\t\treturn new DHIS2BarChart(id, analytics, config);\n\t\tcase \"stacked-bar\":\n\t\t\treturn new DHIS2StackedBarChart(id, analytics, config);\n\t\tcase \"stacked-column\":\n\t\t\treturn new DHIS2StackedColumnChart(id, analytics, config);\n\t\tcase \"pie\":\n\t\t\treturn new DHIS2PieChart(id, analytics, config);\n\t\tcase \"line\":\n\t\t\treturn new DHIS2LineChart(id, analytics, config);\n\t\tcase \"multi-series\":\n\t\t\treturn new DHIS2MultiSeriesChart(id, analytics, config);\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported chart type: ${config.type}`);\n\t}\n}\n"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { colors } from '@dhis2/ui';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
import { CircularProgressbarWithChildren } from 'react-circular-progressbar';
|
|
5
|
-
export * from './types/props';
|
|
6
|
-
|
|
7
|
-
function CircularProgressVisualizer({
|
|
8
|
-
numerator,
|
|
9
|
-
size,
|
|
10
|
-
denominator,
|
|
11
|
-
value,
|
|
12
|
-
textStyle,
|
|
13
|
-
strokeStyle
|
|
14
|
-
}) {
|
|
15
|
-
const filledSectionFieldsPercentage = useMemo(() => {
|
|
16
|
-
return value !== void 0 ? value : Math.floor((numerator ?? 0) / (denominator ?? 1) * 100);
|
|
17
|
-
}, [numerator, denominator, value]);
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
"div",
|
|
20
|
-
{
|
|
21
|
-
style: {
|
|
22
|
-
backgroundColor: "transparent",
|
|
23
|
-
width: size
|
|
24
|
-
},
|
|
25
|
-
children: /* @__PURE__ */ jsx(
|
|
26
|
-
CircularProgressbarWithChildren,
|
|
27
|
-
{
|
|
28
|
-
styles: {
|
|
29
|
-
path: {
|
|
30
|
-
stroke: strokeStyle?.color ?? colors.blue700
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
strokeWidth: 7,
|
|
34
|
-
value: filledSectionFieldsPercentage,
|
|
35
|
-
children: /* @__PURE__ */ jsx(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
style: {
|
|
39
|
-
...textStyle ?? {},
|
|
40
|
-
fontSize: textStyle?.fontSize ?? typeof size === "number" ? 0.3 * size : "100%",
|
|
41
|
-
marginTop: -11
|
|
42
|
-
},
|
|
43
|
-
children: /* @__PURE__ */ jsxs(
|
|
44
|
-
"strong",
|
|
45
|
-
{
|
|
46
|
-
style: {
|
|
47
|
-
color: textStyle?.color ?? strokeStyle?.color ?? colors.blue700
|
|
48
|
-
},
|
|
49
|
-
children: [
|
|
50
|
-
filledSectionFieldsPercentage,
|
|
51
|
-
"%"
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
const CircularProgressDashboard = CircularProgressVisualizer;
|
|
63
|
-
|
|
64
|
-
export { CircularProgressDashboard, CircularProgressVisualizer };
|
|
65
|
-
//# sourceMappingURL=out.js.map
|
|
66
|
-
//# sourceMappingURL=CircularProgressIndicator.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CircularProgressDashboard/CircularProgressIndicator.tsx"],"names":[],"mappings":"AAoCI,cAUC,YAVD;AApCJ,SAAS,cAAc;AACvB,SAAgB,eAAe;AAC/B,SAAS,uCAAuC;AAGhD,cAAc;AAEP,SAAS,2BAA2B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAA+C;AAC9C,QAAM,gCAAgC,QAAQ,MAAM;AACnD,WAAO,UAAU,SACd,QACA,KAAK,OAAQ,aAAa,MAAM,eAAe,KAAM,GAAG;AAAA,EAC5D,GAAG,CAAC,WAAW,aAAa,KAAK,CAAC;AAClC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACA,QAAQ;AAAA,YACP,MAAM;AAAA,cACL,QAAQ,aAAa,SAAS,OAAO;AAAA,YACtC;AAAA,UACD;AAAA,UACA,aAAa;AAAA,UACb,OAAO;AAAA,UAEP;AAAA,YAAC;AAAA;AAAA,cACA,OAAO;AAAA,gBACN,GAAI,aAAa,CAAC;AAAA,gBAClB,UACC,WAAW,YAAY,OAAO,SAAS,WACpC,MAAO,OACP;AAAA,gBACJ,WAAW;AAAA,cACZ;AAAA,cAEA;AAAA,gBAAC;AAAA;AAAA,kBACA,OAAO;AAAA,oBACN,OACC,WAAW,SACX,aAAa,SACb,OAAO;AAAA,kBACT;AAAA,kBAEC;AAAA;AAAA,oBAA8B;AAAA;AAAA;AAAA,cAChC;AAAA;AAAA,UACD;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;AAEO,MAAM,4BAA4B","sourcesContent":["import { colors } from \"@dhis2/ui\";\nimport React, { useMemo } from \"react\";\nimport { CircularProgressbarWithChildren } from \"react-circular-progressbar\";\nimport { CircularDashboardProps } from \"./types/props\";\n\nexport * from \"./types/props\";\n\nexport function CircularProgressVisualizer({\n\tnumerator,\n\tsize,\n\tdenominator,\n\tvalue,\n\ttextStyle,\n\tstrokeStyle,\n}: CircularDashboardProps): React.ReactElement {\n\tconst filledSectionFieldsPercentage = useMemo(() => {\n\t\treturn value !== undefined\n\t\t\t? value\n\t\t\t: Math.floor(((numerator ?? 0) / (denominator ?? 1)) * 100);\n\t}, [numerator, denominator, value]);\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\twidth: size,\n\t\t\t}}\n\t\t>\n\t\t\t<CircularProgressbarWithChildren\n\t\t\t\tstyles={{\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tstroke: strokeStyle?.color ?? colors.blue700,\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\tstrokeWidth={7}\n\t\t\t\tvalue={filledSectionFieldsPercentage}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t...(textStyle ?? {}),\n\t\t\t\t\t\tfontSize:\n\t\t\t\t\t\t\ttextStyle?.fontSize ?? typeof size === \"number\"\n\t\t\t\t\t\t\t\t? 0.3 * (size as number)\n\t\t\t\t\t\t\t\t: \"100%\",\n\t\t\t\t\t\tmarginTop: -11,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<strong\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\ttextStyle?.color ??\n\t\t\t\t\t\t\t\tstrokeStyle?.color ??\n\t\t\t\t\t\t\t\tcolors.blue700,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{filledSectionFieldsPercentage}%\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t</CircularProgressbarWithChildren>\n\t\t</div>\n\t);\n}\n\nexport const CircularProgressDashboard = CircularProgressVisualizer;\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { CircularProgressVisualizer } from './CircularProgressIndicator';
|
|
2
|
-
|
|
3
|
-
const meta = {
|
|
4
|
-
title: "Circular Progress Visualizer",
|
|
5
|
-
component: CircularProgressVisualizer
|
|
6
|
-
};
|
|
7
|
-
var CircularProgressIndicator_stories_default = meta;
|
|
8
|
-
const Default = { name: "Default" };
|
|
9
|
-
Default.args = {
|
|
10
|
-
numerator: 7,
|
|
11
|
-
denominator: 10,
|
|
12
|
-
size: 500
|
|
13
|
-
};
|
|
14
|
-
const WithStrokeStyling = {
|
|
15
|
-
name: "With stroke styling"
|
|
16
|
-
};
|
|
17
|
-
WithStrokeStyling.args = {
|
|
18
|
-
numerator: 7,
|
|
19
|
-
denominator: 10,
|
|
20
|
-
size: 500,
|
|
21
|
-
strokeStyle: {
|
|
22
|
-
width: "10%",
|
|
23
|
-
color: "red"
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const WithTextStyling = {
|
|
27
|
-
name: "With text styling"
|
|
28
|
-
};
|
|
29
|
-
WithTextStyling.args = {
|
|
30
|
-
numerator: 7,
|
|
31
|
-
denominator: 10,
|
|
32
|
-
size: 500,
|
|
33
|
-
textStyle: {
|
|
34
|
-
color: "red",
|
|
35
|
-
fontWeight: "bold",
|
|
36
|
-
fontSize: "20vh"
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export { Default, WithStrokeStyling, WithTextStyling, CircularProgressIndicator_stories_default as default };
|
|
41
|
-
//# sourceMappingURL=out.js.map
|
|
42
|
-
//# sourceMappingURL=CircularProgressIndicator.stories.mjs.map
|