@hisptz/dhis2-analytics 2.0.0-alpha.0 → 2.0.0

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.
Files changed (726) hide show
  1. package/dist/components/ChartAnalytics/DHIS2Chart.js +11 -11
  2. package/dist/components/ChartAnalytics/DHIS2Chart.js.map +1 -1
  3. package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +2 -2
  4. package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.js.map +1 -1
  5. package/dist/components/ChartAnalytics/components/DownloadMenu/index.js +10 -10
  6. package/dist/components/ChartAnalytics/components/DownloadMenu/index.js.map +1 -1
  7. package/dist/components/ChartAnalytics/hooks/useChart.js +7 -7
  8. package/dist/components/ChartAnalytics/hooks/useChart.js.map +1 -1
  9. package/dist/components/ChartAnalytics/index.js +3 -3
  10. package/dist/components/ChartAnalytics/index.js.map +1 -1
  11. package/dist/components/ChartAnalytics/models/bar.js +2 -2
  12. package/dist/components/ChartAnalytics/models/bar.js.map +1 -1
  13. package/dist/components/ChartAnalytics/models/column.js +5 -5
  14. package/dist/components/ChartAnalytics/models/column.js.map +1 -1
  15. package/dist/components/ChartAnalytics/models/index.js +0 -3
  16. package/dist/components/ChartAnalytics/models/index.js.map +1 -1
  17. package/dist/components/ChartAnalytics/models/line.js +5 -5
  18. package/dist/components/ChartAnalytics/models/line.js.map +1 -1
  19. package/dist/components/ChartAnalytics/models/multi-series.js +22 -9
  20. package/dist/components/ChartAnalytics/models/multi-series.js.map +1 -1
  21. package/dist/components/ChartAnalytics/models/pie.js +5 -3
  22. package/dist/components/ChartAnalytics/models/pie.js.map +1 -1
  23. package/dist/components/ChartAnalytics/services/export.js +3 -3
  24. package/dist/components/ChartAnalytics/services/export.js.map +1 -1
  25. package/dist/components/ChartAnalytics/styles/custom-highchart.css +40 -0
  26. package/dist/components/ChartAnalytics/styles/custom-highchart.css.map +1 -0
  27. package/dist/components/ChartAnalytics/utils/chart.js +12 -12
  28. package/dist/components/ChartAnalytics/utils/chart.js.map +1 -1
  29. package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js +3 -3
  30. package/dist/components/CircularProgressDashboard/CircularProgressIndicator.js.map +1 -1
  31. package/dist/components/CircularProgressDashboard/index.js +6 -6
  32. package/dist/components/CircularProgressDashboard/index.js.map +1 -1
  33. package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js +10 -10
  34. package/dist/components/DHIS2PivotTable/DHIS2PivotTable.js.map +1 -1
  35. package/dist/components/DHIS2PivotTable/components/TableBody/index.js +8 -8
  36. package/dist/components/DHIS2PivotTable/components/TableBody/index.js.map +1 -1
  37. package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js +5 -5
  38. package/dist/components/DHIS2PivotTable/components/TableHeaders/index.js.map +1 -1
  39. package/dist/components/DHIS2PivotTable/index.js +6 -6
  40. package/dist/components/DHIS2PivotTable/index.js.map +1 -1
  41. package/dist/components/DHIS2PivotTable/services/engine.js +0 -6
  42. package/dist/components/DHIS2PivotTable/services/engine.js.map +1 -1
  43. package/dist/components/DHIS2PivotTable/state/engine.js.map +1 -1
  44. package/dist/components/Map/DHIS2Map.js +3 -3
  45. package/dist/components/Map/DHIS2Map.js.map +1 -1
  46. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js +2 -2
  47. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js.map +1 -1
  48. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js +10 -10
  49. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js.map +1 -1
  50. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js +2 -2
  51. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js.map +1 -1
  52. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js +11 -11
  53. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js.map +1 -1
  54. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js +2 -2
  55. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.js.map +1 -1
  56. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js +3 -3
  57. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js.map +1 -1
  58. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js +4 -4
  59. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js.map +1 -1
  60. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js +3 -3
  61. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js.map +1 -1
  62. package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js +8 -8
  63. package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js.map +1 -1
  64. package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js +6 -6
  65. package/dist/components/Map/components/EarthEngineLayerConfiguration/index.js.map +1 -1
  66. package/dist/components/Map/components/MapArea/index.js +42 -27
  67. package/dist/components/Map/components/MapArea/index.js.map +1 -1
  68. package/dist/components/Map/components/MapControls/index.js +16 -4
  69. package/dist/components/Map/components/MapControls/index.js.map +1 -1
  70. package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +2 -2
  71. package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js.map +1 -1
  72. package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js +5 -5
  73. package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.js.map +1 -1
  74. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +49 -14
  75. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js.map +1 -1
  76. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +26 -8
  77. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js.map +1 -1
  78. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +2 -2
  79. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js.map +1 -1
  80. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +8 -8
  81. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js.map +1 -1
  82. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +31468 -0
  83. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js.map +1 -0
  84. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +56 -34
  85. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js.map +1 -1
  86. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +33 -22
  87. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js.map +1 -1
  88. package/dist/components/Map/components/MapLayer/components/LegendArea/index.js +10 -10
  89. package/dist/components/Map/components/MapLayer/components/LegendArea/index.js.map +1 -1
  90. package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +22 -8
  91. package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js.map +1 -1
  92. package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +2 -2
  93. package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.js.map +1 -1
  94. package/dist/components/Map/components/MapLayer/components/PointLayer/index.js +5 -5
  95. package/dist/components/Map/components/MapLayer/components/PointLayer/index.js.map +1 -1
  96. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +34 -6
  97. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js.map +1 -1
  98. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +28 -9
  99. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js.map +1 -1
  100. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +2 -2
  101. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js.map +1 -1
  102. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +5 -5
  103. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js.map +1 -1
  104. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +18 -4
  105. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js.map +1 -1
  106. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +9 -6
  107. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js.map +1 -1
  108. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +2 -2
  109. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js.map +1 -1
  110. package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +2 -2
  111. package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js.map +1 -1
  112. package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js +3 -3
  113. package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.js.map +1 -1
  114. package/dist/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +56 -0
  115. package/dist/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css.map +1 -0
  116. package/dist/components/Map/components/MapLayer/index.js +5 -5
  117. package/dist/components/Map/components/MapLayer/index.js.map +1 -1
  118. package/dist/components/Map/components/MapLayer/interfaces/index.js +6 -1
  119. package/dist/components/Map/components/MapLayer/interfaces/index.js.map +1 -1
  120. package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +24 -24
  121. package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -1
  122. package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js +9 -9
  123. package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -1
  124. package/dist/components/Map/components/MapProvider/hooks/index.js +4 -4
  125. package/dist/components/Map/components/MapProvider/hooks/index.js.map +1 -1
  126. package/dist/components/Map/components/MapProvider/index.js +7 -7
  127. package/dist/components/Map/components/MapProvider/index.js.map +1 -1
  128. package/dist/components/Map/components/MapUpdater/index.js +2 -2
  129. package/dist/components/Map/components/MapUpdater/index.js.map +1 -1
  130. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js +2 -2
  131. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js.map +1 -1
  132. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js +12 -12
  133. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js.map +1 -1
  134. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +16 -4
  135. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js.map +1 -1
  136. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +6 -6
  137. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js.map +1 -1
  138. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +13 -5
  139. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js.map +1 -1
  140. package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +5 -5
  141. package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js.map +1 -1
  142. package/dist/components/Map/components/ThematicLayerConfiguration/index.js +9 -9
  143. package/dist/components/Map/components/ThematicLayerConfiguration/index.js.map +1 -1
  144. package/dist/components/Map/hooks/map.js +2 -2
  145. package/dist/components/Map/hooks/map.js.map +1 -1
  146. package/dist/components/Map/index.js +15 -15
  147. package/dist/components/Map/index.js.map +1 -1
  148. package/dist/components/Map/state/index.js.map +1 -1
  149. package/dist/components/Map/utils/colors.js +13 -5
  150. package/dist/components/Map/utils/colors.js.map +1 -1
  151. package/dist/components/Map/utils/map.js +18 -7
  152. package/dist/components/Map/utils/map.js.map +1 -1
  153. package/dist/components/SingleValueContainer/SingleValueVisualizer.js +4 -4
  154. package/dist/components/SingleValueContainer/SingleValueVisualizer.js.map +1 -1
  155. package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +1 -1
  156. package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js.map +1 -1
  157. package/dist/components/SingleValueContainer/index.js +13 -6
  158. package/dist/components/SingleValueContainer/index.js.map +1 -1
  159. package/dist/components/Visualization/components/AnalyticsDataProvider/index.js +39 -12
  160. package/dist/components/Visualization/components/AnalyticsDataProvider/index.js.map +1 -1
  161. package/dist/components/Visualization/components/LayoutProvider/index.js +5 -4
  162. package/dist/components/Visualization/components/LayoutProvider/index.js.map +1 -1
  163. package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js +6 -6
  164. package/dist/components/Visualization/components/VisualizationDimensionSelector/index.js.map +1 -1
  165. package/dist/components/Visualization/components/VisualizationProvider/index.js +12 -6
  166. package/dist/components/Visualization/components/VisualizationProvider/index.js.map +1 -1
  167. package/dist/components/Visualization/components/VisualizationSelector/index.js +17 -17
  168. package/dist/components/Visualization/components/VisualizationSelector/index.js.map +1 -1
  169. package/dist/components/Visualization/components/VisualizationTypeProvider/index.js +5 -1
  170. package/dist/components/Visualization/components/VisualizationTypeProvider/index.js.map +1 -1
  171. package/dist/components/Visualization/components/VisualizationTypeSelector/index.js +25 -9
  172. package/dist/components/Visualization/components/VisualizationTypeSelector/index.js.map +1 -1
  173. package/dist/components/Visualization/index.js +8 -8
  174. package/dist/components/Visualization/index.js.map +1 -1
  175. package/dist/{components/ChartAnalytics/ChartAnalytics.stories.mjs → esm/components/ChartAnalytics/ChartAnalytics.stories.js} +1 -1
  176. package/dist/esm/components/ChartAnalytics/ChartAnalytics.stories.js.map +1 -0
  177. package/dist/{components/ChartAnalytics/DHIS2Chart.mjs → esm/components/ChartAnalytics/DHIS2Chart.js} +5 -5
  178. package/dist/esm/components/ChartAnalytics/DHIS2Chart.js.map +1 -0
  179. package/dist/{components/ChartAnalytics/components/DownloadMenu/components/Menu.mjs → esm/components/ChartAnalytics/components/DownloadMenu/components/Menu.js} +2 -2
  180. package/dist/esm/components/ChartAnalytics/components/DownloadMenu/components/Menu.js.map +1 -0
  181. package/dist/{components/ChartAnalytics/components/DownloadMenu/constants/menu.mjs → esm/components/ChartAnalytics/components/DownloadMenu/constants/menu.js} +1 -1
  182. package/dist/esm/components/ChartAnalytics/components/DownloadMenu/constants/menu.js.map +1 -0
  183. package/dist/{components/ChartAnalytics/components/DownloadMenu/index.mjs → esm/components/ChartAnalytics/components/DownloadMenu/index.js} +3 -3
  184. package/dist/esm/components/ChartAnalytics/components/DownloadMenu/index.js.map +1 -0
  185. package/dist/{components/ChartAnalytics/components/DownloadMenu/interfaces/menu.mjs → esm/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js} +1 -1
  186. package/dist/{components/ChartAnalytics/hooks/useChart.mjs → esm/components/ChartAnalytics/hooks/useChart.js} +2 -2
  187. package/dist/esm/components/ChartAnalytics/hooks/useChart.js.map +1 -0
  188. package/dist/esm/components/ChartAnalytics/index.js +3 -0
  189. package/dist/esm/components/ChartAnalytics/index.js.map +1 -0
  190. package/dist/{components/ChartAnalytics/models/bar.mjs → esm/components/ChartAnalytics/models/bar.js} +2 -2
  191. package/dist/esm/components/ChartAnalytics/models/bar.js.map +1 -0
  192. package/dist/{components/ChartAnalytics/models/column.mjs → esm/components/ChartAnalytics/models/column.js} +3 -3
  193. package/dist/esm/components/ChartAnalytics/models/column.js.map +1 -0
  194. package/dist/{components/ChartAnalytics/models/index.mjs → esm/components/ChartAnalytics/models/index.js} +1 -4
  195. package/dist/esm/components/ChartAnalytics/models/index.js.map +1 -0
  196. package/dist/{components/ChartAnalytics/models/line.mjs → esm/components/ChartAnalytics/models/line.js} +3 -3
  197. package/dist/esm/components/ChartAnalytics/models/line.js.map +1 -0
  198. package/dist/{components/ChartAnalytics/models/multi-series.mjs → esm/components/ChartAnalytics/models/multi-series.js} +21 -8
  199. package/dist/esm/components/ChartAnalytics/models/multi-series.js.map +1 -0
  200. package/dist/{components/ChartAnalytics/models/pie.mjs → esm/components/ChartAnalytics/models/pie.js} +5 -3
  201. package/dist/esm/components/ChartAnalytics/models/pie.js.map +1 -0
  202. package/dist/{components/ChartAnalytics/services/export.mjs → esm/components/ChartAnalytics/services/export.js} +4 -4
  203. package/dist/esm/components/ChartAnalytics/services/export.js.map +1 -0
  204. package/dist/esm/components/ChartAnalytics/styles/custom-highchart.css +40 -0
  205. package/dist/esm/components/ChartAnalytics/styles/custom-highchart.css.map +1 -0
  206. package/dist/esm/components/ChartAnalytics/types/props.js +3 -0
  207. package/dist/{components/ChartAnalytics/utils/chart.mjs → esm/components/ChartAnalytics/utils/chart.js} +6 -6
  208. package/dist/esm/components/ChartAnalytics/utils/chart.js.map +1 -0
  209. package/dist/{components/CircularProgressDashboard/CircularProgressIndicator.mjs → esm/components/CircularProgressDashboard/CircularProgressIndicator.js} +2 -2
  210. package/dist/esm/components/CircularProgressDashboard/CircularProgressIndicator.js.map +1 -0
  211. package/dist/{components/CircularProgressDashboard/CircularProgressIndicator.stories.mjs → esm/components/CircularProgressDashboard/CircularProgressIndicator.stories.js} +1 -1
  212. package/dist/esm/components/CircularProgressDashboard/CircularProgressIndicator.stories.js.map +1 -0
  213. package/dist/esm/components/CircularProgressDashboard/index.js +4 -0
  214. package/dist/esm/components/CircularProgressDashboard/index.js.map +1 -0
  215. package/dist/esm/components/CircularProgressDashboard/types/props.js +3 -0
  216. package/dist/{components/DHIS2PivotTable/DHIS2PivotTable.mjs → esm/components/DHIS2PivotTable/DHIS2PivotTable.js} +6 -6
  217. package/dist/esm/components/DHIS2PivotTable/DHIS2PivotTable.js.map +1 -0
  218. package/dist/{components/DHIS2PivotTable/DHIS2PivotTable.stories.mjs → esm/components/DHIS2PivotTable/DHIS2PivotTable.stories.js} +1 -1
  219. package/dist/esm/components/DHIS2PivotTable/DHIS2PivotTable.stories.js.map +1 -0
  220. package/dist/{components/DHIS2PivotTable/components/Table/index.mjs → esm/components/DHIS2PivotTable/components/Table/index.js} +1 -1
  221. package/dist/esm/components/DHIS2PivotTable/components/Table/index.js.map +1 -0
  222. package/dist/esm/components/DHIS2PivotTable/components/TableBody/TableBody.module.css +11 -0
  223. package/dist/esm/components/DHIS2PivotTable/components/TableBody/TableBody.module.css.map +1 -0
  224. package/dist/{components/DHIS2PivotTable/components/TableBody/index.mjs → esm/components/DHIS2PivotTable/components/TableBody/index.js} +2 -2
  225. package/dist/esm/components/DHIS2PivotTable/components/TableBody/index.js.map +1 -0
  226. package/dist/esm/components/DHIS2PivotTable/components/TableHeaders/TableHeaders.module.css +10 -0
  227. package/dist/esm/components/DHIS2PivotTable/components/TableHeaders/TableHeaders.module.css.map +1 -0
  228. package/dist/{components/DHIS2PivotTable/components/TableHeaders/index.mjs → esm/components/DHIS2PivotTable/components/TableHeaders/index.js} +2 -2
  229. package/dist/esm/components/DHIS2PivotTable/components/TableHeaders/index.js.map +1 -0
  230. package/dist/esm/components/DHIS2PivotTable/index.js +4 -0
  231. package/dist/esm/components/DHIS2PivotTable/index.js.map +1 -0
  232. package/dist/esm/components/DHIS2PivotTable/interfaces/index.js +3 -0
  233. package/dist/{components/DHIS2PivotTable/services/engine.mjs → esm/components/DHIS2PivotTable/services/engine.js} +1 -7
  234. package/dist/esm/components/DHIS2PivotTable/services/engine.js.map +1 -0
  235. package/dist/{components/DHIS2PivotTable/state/engine.mjs → esm/components/DHIS2PivotTable/state/engine.js} +1 -1
  236. package/dist/esm/components/DHIS2PivotTable/state/engine.js.map +1 -0
  237. package/dist/{components/Map/DHIS2Map.mjs → esm/components/Map/DHIS2Map.js} +3 -3
  238. package/dist/esm/components/Map/DHIS2Map.js.map +1 -0
  239. package/dist/{components/Map/DHIS2Map.stories.mjs → esm/components/Map/DHIS2Map.stories.js} +1 -1
  240. package/dist/esm/components/Map/DHIS2Map.stories.js.map +1 -0
  241. package/dist/{components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js} +2 -2
  242. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.js.map +1 -0
  243. package/dist/{components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js} +1 -1
  244. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js.map +1 -0
  245. package/dist/{components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js} +6 -6
  246. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.js.map +1 -0
  247. package/dist/{components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js} +1 -1
  248. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js.map +1 -0
  249. package/dist/{components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js} +2 -2
  250. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.js.map +1 -0
  251. package/dist/{components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js} +3 -3
  252. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.js.map +1 -0
  253. package/dist/{components/Map/components/EarthEngineLayerConfiguration/components/Name.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/components/Name.js} +2 -2
  254. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/components/Name.js.map +1 -0
  255. package/dist/{components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js} +2 -2
  256. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.js.map +1 -0
  257. package/dist/{components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js} +3 -3
  258. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.js.map +1 -0
  259. package/dist/{components/Map/components/EarthEngineLayerConfiguration/components/TypeField.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js} +2 -2
  260. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.js.map +1 -0
  261. package/dist/{components/Map/components/EarthEngineLayerConfiguration/hooks/data.mjs → esm/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js} +4 -4
  262. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/hooks/data.js.map +1 -0
  263. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/index.js +4 -0
  264. package/dist/esm/components/Map/components/EarthEngineLayerConfiguration/index.js.map +1 -0
  265. package/dist/{components/Map/components/MapArea/index.mjs → esm/components/Map/components/MapArea/index.js} +41 -26
  266. package/dist/esm/components/Map/components/MapArea/index.js.map +1 -0
  267. package/dist/esm/components/Map/components/MapArea/interfaces/index.js +3 -0
  268. package/dist/{components/Map/components/MapControls/components/CustomControl/index.mjs → esm/components/Map/components/MapControls/components/CustomControl/index.js} +1 -1
  269. package/dist/esm/components/Map/components/MapControls/components/CustomControl/index.js.map +1 -0
  270. package/dist/{components/Map/components/MapControls/components/DownloadControl/index.mjs → esm/components/Map/components/MapControls/components/DownloadControl/index.js} +1 -1
  271. package/dist/esm/components/Map/components/MapControls/components/DownloadControl/index.js.map +1 -0
  272. package/dist/{components/Map/components/MapControls/components/FullscreenControl/index.mjs → esm/components/Map/components/MapControls/components/FullscreenControl/index.js} +1 -1
  273. package/dist/esm/components/Map/components/MapControls/components/FullscreenControl/index.js.map +1 -0
  274. package/dist/{components/Map/components/MapControls/index.mjs → esm/components/Map/components/MapControls/index.js} +17 -5
  275. package/dist/esm/components/Map/components/MapControls/index.js.map +1 -0
  276. package/dist/{components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.mjs → esm/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js} +2 -2
  277. package/dist/esm/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js.map +1 -0
  278. package/dist/{components/Map/components/MapLayer/components/BoundaryLayer/index.mjs → esm/components/Map/components/MapLayer/components/BoundaryLayer/index.js} +3 -3
  279. package/dist/esm/components/Map/components/MapLayer/components/BoundaryLayer/index.js.map +1 -0
  280. package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.mjs → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js} +50 -15
  281. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js.map +1 -0
  282. package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.mjs → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js} +27 -9
  283. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js.map +1 -0
  284. package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.mjs → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js} +2 -2
  285. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js.map +1 -0
  286. package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/index.mjs → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js} +5 -5
  287. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js.map +1 -0
  288. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +3 -0
  289. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +31466 -0
  290. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js.map +1 -0
  291. package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.mjs → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js} +29 -23
  292. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js.map +1 -0
  293. package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.mjs → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js} +34 -23
  294. package/dist/esm/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js.map +1 -0
  295. package/dist/esm/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css +10 -0
  296. package/dist/esm/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css.map +1 -0
  297. package/dist/{components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.mjs → esm/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js} +1 -1
  298. package/dist/esm/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js.map +1 -0
  299. package/dist/{components/Map/components/MapLayer/components/LegendArea/index.mjs → esm/components/Map/components/MapLayer/components/LegendArea/index.js} +8 -8
  300. package/dist/esm/components/Map/components/MapLayer/components/LegendArea/index.js.map +1 -0
  301. package/dist/{components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.mjs → esm/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js} +20 -6
  302. package/dist/esm/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js.map +1 -0
  303. package/dist/{components/Map/components/MapLayer/components/PointLayer/hooks/index.mjs → esm/components/Map/components/MapLayer/components/PointLayer/hooks/index.js} +2 -2
  304. package/dist/esm/components/Map/components/MapLayer/components/PointLayer/hooks/index.js.map +1 -0
  305. package/dist/{components/Map/components/MapLayer/components/PointLayer/index.mjs → esm/components/Map/components/MapLayer/components/PointLayer/index.js} +3 -3
  306. package/dist/esm/components/Map/components/MapLayer/components/PointLayer/index.js.map +1 -0
  307. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js} +33 -5
  308. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js.map +1 -0
  309. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js} +27 -8
  310. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js.map +1 -0
  311. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js} +3 -3
  312. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js.map +1 -0
  313. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js} +3 -3
  314. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js.map +1 -0
  315. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js} +19 -5
  316. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js.map +1 -0
  317. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js} +7 -4
  318. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js.map +1 -0
  319. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js} +2 -2
  320. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js.map +1 -0
  321. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js} +2 -2
  322. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js.map +1 -0
  323. package/dist/{components/Map/components/MapLayer/components/ThematicLayer/index.mjs → esm/components/Map/components/MapLayer/components/ThematicLayer/index.js} +4 -4
  324. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/index.js.map +1 -0
  325. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +56 -0
  326. package/dist/esm/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css.map +1 -0
  327. package/dist/{components/Map/components/MapLayer/index.mjs → esm/components/Map/components/MapLayer/index.js} +5 -5
  328. package/dist/esm/components/Map/components/MapLayer/index.js.map +1 -0
  329. package/dist/esm/components/Map/components/MapLayer/interfaces/index.js +10 -0
  330. package/dist/esm/components/Map/components/MapLayer/interfaces/index.js.map +1 -0
  331. package/dist/{components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.mjs → esm/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js} +8 -8
  332. package/dist/esm/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js.map +1 -0
  333. package/dist/{components/Map/components/MapProvider/components/MapLayerProvider/index.mjs → esm/components/Map/components/MapProvider/components/MapLayerProvider/index.js} +4 -4
  334. package/dist/esm/components/Map/components/MapProvider/components/MapLayerProvider/index.js.map +1 -0
  335. package/dist/{components/Map/components/MapProvider/hooks/index.mjs → esm/components/Map/components/MapProvider/hooks/index.js} +2 -2
  336. package/dist/esm/components/Map/components/MapProvider/hooks/index.js.map +1 -0
  337. package/dist/{components/Map/components/MapProvider/index.mjs → esm/components/Map/components/MapProvider/index.js} +3 -3
  338. package/dist/esm/components/Map/components/MapProvider/index.js.map +1 -0
  339. package/dist/{components/Map/components/MapUpdater/index.mjs → esm/components/Map/components/MapUpdater/index.js} +2 -2
  340. package/dist/esm/components/Map/components/MapUpdater/index.js.map +1 -0
  341. package/dist/{components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs → esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js} +2 -2
  342. package/dist/esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.js.map +1 -0
  343. package/dist/{components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.mjs → esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js} +1 -1
  344. package/dist/esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js.map +1 -0
  345. package/dist/{components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs → esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js} +7 -7
  346. package/dist/esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.js.map +1 -0
  347. package/dist/{components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.mjs → esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js} +1 -1
  348. package/dist/esm/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js.map +1 -0
  349. package/dist/{components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js} +16 -4
  350. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js.map +1 -0
  351. package/dist/{components/Map/constants/colors.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js} +1 -1
  352. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js.map +1 -0
  353. package/dist/{components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js} +3 -3
  354. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js.map +1 -0
  355. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css +15 -0
  356. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css.map +1 -0
  357. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css +12 -0
  358. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css.map +1 -0
  359. package/dist/{components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js} +13 -5
  360. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js.map +1 -0
  361. package/dist/{components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js} +3 -3
  362. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js.map +1 -0
  363. package/dist/{components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js} +1 -1
  364. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js.map +1 -0
  365. package/dist/{components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js} +1 -1
  366. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js.map +1 -0
  367. package/dist/{components/Map/components/ThematicLayerConfiguration/components/RadiusField.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/RadiusField.js} +1 -1
  368. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/RadiusField.js.map +1 -0
  369. package/dist/{components/Map/components/ThematicLayerConfiguration/components/TypeField.mjs → esm/components/Map/components/ThematicLayerConfiguration/components/TypeField.js} +1 -1
  370. package/dist/esm/components/Map/components/ThematicLayerConfiguration/components/TypeField.js.map +1 -0
  371. package/dist/esm/components/Map/components/ThematicLayerConfiguration/index.js +5 -0
  372. package/dist/esm/components/Map/components/ThematicLayerConfiguration/index.js.map +1 -0
  373. package/dist/esm/components/Map/components/ThematicLayerConfiguration/types/index.js +3 -0
  374. package/dist/{components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.mjs → esm/components/Map/constants/colors.js} +1 -1
  375. package/dist/esm/components/Map/constants/colors.js.map +1 -0
  376. package/dist/{components/Map/constants/legendSet.mjs → esm/components/Map/constants/legendSet.js} +1 -1
  377. package/dist/esm/components/Map/constants/legendSet.js.map +1 -0
  378. package/dist/{components/Map/hooks/map.mjs → esm/components/Map/hooks/map.js} +2 -2
  379. package/dist/esm/components/Map/hooks/map.js.map +1 -0
  380. package/dist/esm/components/Map/index.js +7 -0
  381. package/dist/esm/components/Map/index.js.map +1 -0
  382. package/dist/esm/components/Map/interfaces/index.js +3 -0
  383. package/dist/{components/Map/state/index.mjs → esm/components/Map/state/index.js} +1 -1
  384. package/dist/esm/components/Map/state/index.js.map +1 -0
  385. package/dist/{components/Map/utils/colors.mjs → esm/components/Map/utils/colors.js} +13 -5
  386. package/dist/esm/components/Map/utils/colors.js.map +1 -0
  387. package/dist/{components/Map/utils/helpers.mjs → esm/components/Map/utils/helpers.js} +1 -1
  388. package/dist/esm/components/Map/utils/helpers.js.map +1 -0
  389. package/dist/{components/Map/utils/map.mjs → esm/components/Map/utils/map.js} +16 -5
  390. package/dist/esm/components/Map/utils/map.js.map +1 -0
  391. package/dist/{components/SingleValueContainer/SingleValueContainer.stories.mjs → esm/components/SingleValueContainer/SingleValueContainer.stories.js} +1 -1
  392. package/dist/esm/components/SingleValueContainer/SingleValueContainer.stories.js.map +1 -0
  393. package/dist/{components/SingleValueContainer/SingleValueVisualizer.mjs → esm/components/SingleValueContainer/SingleValueVisualizer.js} +4 -4
  394. package/dist/esm/components/SingleValueContainer/SingleValueVisualizer.js.map +1 -0
  395. package/dist/{components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs → esm/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js} +2 -2
  396. package/dist/esm/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js.map +1 -0
  397. package/dist/{components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs → esm/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js} +1 -1
  398. package/dist/esm/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js.map +1 -0
  399. package/dist/esm/components/SingleValueContainer/index.js +5 -0
  400. package/dist/esm/components/SingleValueContainer/index.js.map +1 -0
  401. package/dist/esm/components/SingleValueContainer/styles/SingleValueContainer.module.css +32 -0
  402. package/dist/esm/components/SingleValueContainer/styles/SingleValueContainer.module.css.map +1 -0
  403. package/dist/esm/components/SingleValueContainer/types/props.js +3 -0
  404. package/dist/{components/Visualization/components/AnalyticsDataProvider/index.mjs → esm/components/Visualization/components/AnalyticsDataProvider/index.js} +38 -11
  405. package/dist/esm/components/Visualization/components/AnalyticsDataProvider/index.js.map +1 -0
  406. package/dist/{components/Visualization/components/DimensionsProvider/index.mjs → esm/components/Visualization/components/DimensionsProvider/index.js} +1 -1
  407. package/dist/esm/components/Visualization/components/DimensionsProvider/index.js.map +1 -0
  408. package/dist/{components/Visualization/components/LayoutProvider/index.mjs → esm/components/Visualization/components/LayoutProvider/index.js} +6 -5
  409. package/dist/esm/components/Visualization/components/LayoutProvider/index.js.map +1 -0
  410. package/dist/{components/Visualization/components/VisualizationDimensionSelector/index.mjs → esm/components/Visualization/components/VisualizationDimensionSelector/index.js} +4 -4
  411. package/dist/esm/components/Visualization/components/VisualizationDimensionSelector/index.js.map +1 -0
  412. package/dist/{components/Visualization/components/VisualizationProvider/index.mjs → esm/components/Visualization/components/VisualizationProvider/index.js} +12 -6
  413. package/dist/esm/components/Visualization/components/VisualizationProvider/index.js.map +1 -0
  414. package/dist/{components/Visualization/components/VisualizationSelector/index.mjs → esm/components/Visualization/components/VisualizationSelector/index.js} +8 -8
  415. package/dist/esm/components/Visualization/components/VisualizationSelector/index.js.map +1 -0
  416. package/dist/{components/Visualization/components/VisualizationTypeProvider/index.mjs → esm/components/Visualization/components/VisualizationTypeProvider/index.js} +6 -2
  417. package/dist/esm/components/Visualization/components/VisualizationTypeProvider/index.js.map +1 -0
  418. package/dist/{components/Visualization/components/VisualizationTypeSelector/index.mjs → esm/components/Visualization/components/VisualizationTypeSelector/index.js} +24 -8
  419. package/dist/esm/components/Visualization/components/VisualizationTypeSelector/index.js.map +1 -0
  420. package/dist/{components/Visualization/index.mjs → esm/components/Visualization/index.js} +5 -5
  421. package/dist/esm/components/Visualization/index.js.map +1 -0
  422. package/dist/esm/index.js +8 -0
  423. package/dist/esm/index.js.map +1 -0
  424. package/dist/index.js +18 -18
  425. package/dist/index.js.map +1 -1
  426. package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts +4 -4
  427. package/dist/types/components/ChartAnalytics/DHIS2Chart.d.ts.map +1 -1
  428. package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts +2 -2
  429. package/dist/types/components/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts.map +1 -1
  430. package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts +2 -2
  431. package/dist/types/components/ChartAnalytics/components/DownloadMenu/index.d.ts.map +1 -1
  432. package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts +1 -1
  433. package/dist/types/components/ChartAnalytics/hooks/useChart.d.ts.map +1 -1
  434. package/dist/types/components/ChartAnalytics/index.d.ts +1 -1
  435. package/dist/types/components/ChartAnalytics/index.d.ts.map +1 -1
  436. package/dist/types/components/ChartAnalytics/models/bar.d.ts +1 -1
  437. package/dist/types/components/ChartAnalytics/models/bar.d.ts.map +1 -1
  438. package/dist/types/components/ChartAnalytics/models/column.d.ts +1 -1
  439. package/dist/types/components/ChartAnalytics/models/column.d.ts.map +1 -1
  440. package/dist/types/components/ChartAnalytics/models/index.d.ts +1 -1
  441. package/dist/types/components/ChartAnalytics/models/index.d.ts.map +1 -1
  442. package/dist/types/components/ChartAnalytics/models/line.d.ts +1 -1
  443. package/dist/types/components/ChartAnalytics/models/line.d.ts.map +1 -1
  444. package/dist/types/components/ChartAnalytics/models/multi-series.d.ts +1 -1
  445. package/dist/types/components/ChartAnalytics/models/multi-series.d.ts.map +1 -1
  446. package/dist/types/components/ChartAnalytics/models/pie.d.ts +1 -1
  447. package/dist/types/components/ChartAnalytics/models/pie.d.ts.map +1 -1
  448. package/dist/types/components/ChartAnalytics/services/export.d.ts.map +1 -1
  449. package/dist/types/components/ChartAnalytics/utils/chart.d.ts +2 -2
  450. package/dist/types/components/ChartAnalytics/utils/chart.d.ts.map +1 -1
  451. package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts +2 -2
  452. package/dist/types/components/CircularProgressDashboard/CircularProgressIndicator.d.ts.map +1 -1
  453. package/dist/types/components/CircularProgressDashboard/index.d.ts +2 -2
  454. package/dist/types/components/CircularProgressDashboard/index.d.ts.map +1 -1
  455. package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts +2 -2
  456. package/dist/types/components/DHIS2PivotTable/DHIS2PivotTable.d.ts.map +1 -1
  457. package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts +1 -1
  458. package/dist/types/components/DHIS2PivotTable/components/TableHeaders/index.d.ts.map +1 -1
  459. package/dist/types/components/DHIS2PivotTable/index.d.ts +2 -2
  460. package/dist/types/components/DHIS2PivotTable/index.d.ts.map +1 -1
  461. package/dist/types/components/DHIS2PivotTable/services/engine.d.ts +1 -1
  462. package/dist/types/components/DHIS2PivotTable/services/engine.d.ts.map +1 -1
  463. package/dist/types/components/DHIS2PivotTable/state/engine.d.ts +2 -2
  464. package/dist/types/components/DHIS2PivotTable/state/engine.d.ts.map +1 -1
  465. package/dist/types/components/Map/DHIS2Map.d.ts +1 -1
  466. package/dist/types/components/Map/DHIS2Map.d.ts.map +1 -1
  467. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts +2 -2
  468. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.d.ts.map +1 -1
  469. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts +1 -1
  470. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.d.ts.map +1 -1
  471. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts +1 -1
  472. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.d.ts.map +1 -1
  473. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts +1 -1
  474. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/Name.d.ts.map +1 -1
  475. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts +1 -1
  476. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.d.ts.map +1 -1
  477. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts +1 -1
  478. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.d.ts.map +1 -1
  479. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts +1 -1
  480. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.d.ts.map +1 -1
  481. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts +1 -1
  482. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/hooks/data.d.ts.map +1 -1
  483. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts +2 -2
  484. package/dist/types/components/Map/components/EarthEngineLayerConfiguration/index.d.ts.map +1 -1
  485. package/dist/types/components/Map/components/MapArea/index.d.ts +1 -1
  486. package/dist/types/components/Map/components/MapArea/index.d.ts.map +1 -1
  487. package/dist/types/components/Map/components/MapControls/index.d.ts +2 -2
  488. package/dist/types/components/Map/components/MapControls/index.d.ts.map +1 -1
  489. package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts +1 -1
  490. package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts.map +1 -1
  491. package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts +2 -2
  492. package/dist/types/components/Map/components/MapLayer/components/BoundaryLayer/index.d.ts.map +1 -1
  493. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts +2 -2
  494. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts.map +1 -1
  495. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts +1 -1
  496. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts.map +1 -1
  497. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts +2 -2
  498. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts.map +1 -1
  499. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts +1 -1
  500. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts.map +1 -1
  501. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts +1 -1
  502. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts.map +1 -1
  503. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts +2 -2
  504. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts.map +1 -1
  505. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts +2 -2
  506. package/dist/types/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts.map +1 -1
  507. package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts +3 -3
  508. package/dist/types/components/Map/components/MapLayer/components/LegendArea/index.d.ts.map +1 -1
  509. package/dist/types/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.d.ts.map +1 -1
  510. package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts +1 -1
  511. package/dist/types/components/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts.map +1 -1
  512. package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts +1 -1
  513. package/dist/types/components/Map/components/MapLayer/components/PointLayer/index.d.ts.map +1 -1
  514. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts +1 -1
  515. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts.map +1 -1
  516. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts +2 -2
  517. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts.map +1 -1
  518. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts +1 -1
  519. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts.map +1 -1
  520. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts +2 -2
  521. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts.map +1 -1
  522. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts +1 -1
  523. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts.map +1 -1
  524. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts +4 -4
  525. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts.map +1 -1
  526. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts +2 -2
  527. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts.map +1 -1
  528. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts +1 -1
  529. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts.map +1 -1
  530. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts +1 -1
  531. package/dist/types/components/Map/components/MapLayer/components/ThematicLayer/index.d.ts.map +1 -1
  532. package/dist/types/components/Map/components/MapLayer/index.d.ts +2 -2
  533. package/dist/types/components/Map/components/MapLayer/index.d.ts.map +1 -1
  534. package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts +4 -4
  535. package/dist/types/components/Map/components/MapLayer/interfaces/index.d.ts.map +1 -1
  536. package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts +2 -2
  537. package/dist/types/components/Map/components/MapProvider/components/MapLayerProvider/index.d.ts.map +1 -1
  538. package/dist/types/components/Map/components/MapProvider/hooks/index.d.ts +3 -3
  539. package/dist/types/components/Map/components/MapProvider/index.d.ts +2 -2
  540. package/dist/types/components/Map/components/MapProvider/index.d.ts.map +1 -1
  541. package/dist/types/components/Map/components/MapUpdater/index.d.ts +1 -1
  542. package/dist/types/components/Map/components/MapUpdater/index.d.ts.map +1 -1
  543. package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts +2 -2
  544. package/dist/types/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.d.ts.map +1 -1
  545. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts +1 -1
  546. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts.map +1 -1
  547. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts +1 -1
  548. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts.map +1 -1
  549. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts +1 -1
  550. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts.map +1 -1
  551. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts +1 -1
  552. package/dist/types/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts.map +1 -1
  553. package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts +3 -3
  554. package/dist/types/components/Map/components/ThematicLayerConfiguration/index.d.ts.map +1 -1
  555. package/dist/types/components/Map/hooks/map.d.ts.map +1 -1
  556. package/dist/types/components/Map/index.d.ts +5 -5
  557. package/dist/types/components/Map/index.d.ts.map +1 -1
  558. package/dist/types/components/Map/interfaces/index.d.ts +2 -2
  559. package/dist/types/components/Map/interfaces/index.d.ts.map +1 -1
  560. package/dist/types/components/Map/state/index.d.ts +2 -2
  561. package/dist/types/components/Map/state/index.d.ts.map +1 -1
  562. package/dist/types/components/Map/utils/colors.d.ts +1 -1
  563. package/dist/types/components/Map/utils/colors.d.ts.map +1 -1
  564. package/dist/types/components/Map/utils/map.d.ts.map +1 -1
  565. package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts +3 -3
  566. package/dist/types/components/SingleValueContainer/SingleValueVisualizer.d.ts.map +1 -1
  567. package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts +1 -1
  568. package/dist/types/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts.map +1 -1
  569. package/dist/types/components/SingleValueContainer/index.d.ts +3 -2
  570. package/dist/types/components/SingleValueContainer/index.d.ts.map +1 -1
  571. package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts +1 -1
  572. package/dist/types/components/Visualization/components/AnalyticsDataProvider/index.d.ts.map +1 -1
  573. package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts +2 -2
  574. package/dist/types/components/Visualization/components/LayoutProvider/index.d.ts.map +1 -1
  575. package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts +1 -1
  576. package/dist/types/components/Visualization/components/VisualizationDimensionSelector/index.d.ts.map +1 -1
  577. package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts +4 -4
  578. package/dist/types/components/Visualization/components/VisualizationProvider/index.d.ts.map +1 -1
  579. package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts +10 -10
  580. package/dist/types/components/Visualization/components/VisualizationSelector/index.d.ts.map +1 -1
  581. package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts +2 -2
  582. package/dist/types/components/Visualization/components/VisualizationTypeProvider/index.d.ts.map +1 -1
  583. package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts +1 -1
  584. package/dist/types/components/Visualization/components/VisualizationTypeSelector/index.d.ts.map +1 -1
  585. package/dist/types/components/Visualization/index.d.ts +6 -6
  586. package/dist/types/components/Visualization/index.d.ts.map +1 -1
  587. package/dist/types/index.d.ts +6 -6
  588. package/dist/types/index.d.ts.map +1 -1
  589. package/package.json +5 -5
  590. package/dist/components/ChartAnalytics/ChartAnalytics.stories.mjs.map +0 -1
  591. package/dist/components/ChartAnalytics/DHIS2Chart.mjs.map +0 -1
  592. package/dist/components/ChartAnalytics/components/DownloadMenu/components/Menu.mjs.map +0 -1
  593. package/dist/components/ChartAnalytics/components/DownloadMenu/constants/menu.mjs.map +0 -1
  594. package/dist/components/ChartAnalytics/components/DownloadMenu/index.mjs.map +0 -1
  595. package/dist/components/ChartAnalytics/hooks/useChart.mjs.map +0 -1
  596. package/dist/components/ChartAnalytics/index.mjs +0 -3
  597. package/dist/components/ChartAnalytics/index.mjs.map +0 -1
  598. package/dist/components/ChartAnalytics/models/bar.mjs.map +0 -1
  599. package/dist/components/ChartAnalytics/models/column.mjs.map +0 -1
  600. package/dist/components/ChartAnalytics/models/index.mjs.map +0 -1
  601. package/dist/components/ChartAnalytics/models/line.mjs.map +0 -1
  602. package/dist/components/ChartAnalytics/models/multi-series.mjs.map +0 -1
  603. package/dist/components/ChartAnalytics/models/pie.mjs.map +0 -1
  604. package/dist/components/ChartAnalytics/services/export.mjs.map +0 -1
  605. package/dist/components/ChartAnalytics/types/props.mjs +0 -3
  606. package/dist/components/ChartAnalytics/utils/chart.mjs.map +0 -1
  607. package/dist/components/CircularProgressDashboard/CircularProgressIndicator.mjs.map +0 -1
  608. package/dist/components/CircularProgressDashboard/CircularProgressIndicator.stories.mjs.map +0 -1
  609. package/dist/components/CircularProgressDashboard/index.mjs +0 -4
  610. package/dist/components/CircularProgressDashboard/index.mjs.map +0 -1
  611. package/dist/components/CircularProgressDashboard/types/props.mjs +0 -3
  612. package/dist/components/DHIS2PivotTable/DHIS2PivotTable.mjs.map +0 -1
  613. package/dist/components/DHIS2PivotTable/DHIS2PivotTable.stories.mjs.map +0 -1
  614. package/dist/components/DHIS2PivotTable/components/Table/index.mjs.map +0 -1
  615. package/dist/components/DHIS2PivotTable/components/TableBody/index.mjs.map +0 -1
  616. package/dist/components/DHIS2PivotTable/components/TableHeaders/index.mjs.map +0 -1
  617. package/dist/components/DHIS2PivotTable/index.mjs +0 -4
  618. package/dist/components/DHIS2PivotTable/index.mjs.map +0 -1
  619. package/dist/components/DHIS2PivotTable/interfaces/index.mjs +0 -3
  620. package/dist/components/DHIS2PivotTable/services/engine.mjs.map +0 -1
  621. package/dist/components/DHIS2PivotTable/state/engine.mjs.map +0 -1
  622. package/dist/components/Map/DHIS2Map.mjs.map +0 -1
  623. package/dist/components/Map/DHIS2Map.stories.mjs.map +0 -1
  624. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.mjs.map +0 -1
  625. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.mjs.map +0 -1
  626. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.mjs.map +0 -1
  627. package/dist/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.mjs.map +0 -1
  628. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.mjs.map +0 -1
  629. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.mjs.map +0 -1
  630. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/Name.mjs.map +0 -1
  631. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.mjs.map +0 -1
  632. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.mjs.map +0 -1
  633. package/dist/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.mjs.map +0 -1
  634. package/dist/components/Map/components/EarthEngineLayerConfiguration/hooks/data.mjs.map +0 -1
  635. package/dist/components/Map/components/EarthEngineLayerConfiguration/index.mjs +0 -4
  636. package/dist/components/Map/components/EarthEngineLayerConfiguration/index.mjs.map +0 -1
  637. package/dist/components/Map/components/MapArea/index.mjs.map +0 -1
  638. package/dist/components/Map/components/MapArea/interfaces/index.mjs +0 -3
  639. package/dist/components/Map/components/MapControls/components/CustomControl/index.mjs.map +0 -1
  640. package/dist/components/Map/components/MapControls/components/DownloadControl/index.mjs.map +0 -1
  641. package/dist/components/Map/components/MapControls/components/FullscreenControl/index.mjs.map +0 -1
  642. package/dist/components/Map/components/MapControls/index.mjs.map +0 -1
  643. package/dist/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.mjs.map +0 -1
  644. package/dist/components/Map/components/MapLayer/components/BoundaryLayer/index.mjs.map +0 -1
  645. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.mjs.map +0 -1
  646. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.mjs.map +0 -1
  647. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.mjs.map +0 -1
  648. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/index.mjs.map +0 -1
  649. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.mjs +0 -3
  650. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.mjs.map +0 -1
  651. package/dist/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.mjs.map +0 -1
  652. package/dist/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.mjs.map +0 -1
  653. package/dist/components/Map/components/MapLayer/components/LegendArea/index.mjs.map +0 -1
  654. package/dist/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.mjs.map +0 -1
  655. package/dist/components/Map/components/MapLayer/components/PointLayer/hooks/index.mjs.map +0 -1
  656. package/dist/components/Map/components/MapLayer/components/PointLayer/index.mjs.map +0 -1
  657. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.mjs.map +0 -1
  658. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.mjs.map +0 -1
  659. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.mjs.map +0 -1
  660. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.mjs.map +0 -1
  661. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.mjs.map +0 -1
  662. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.mjs.map +0 -1
  663. package/dist/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.mjs.map +0 -1
  664. package/dist/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.mjs.map +0 -1
  665. package/dist/components/Map/components/MapLayer/components/ThematicLayer/index.mjs.map +0 -1
  666. package/dist/components/Map/components/MapLayer/index.mjs.map +0 -1
  667. package/dist/components/Map/components/MapLayer/interfaces/index.mjs +0 -5
  668. package/dist/components/Map/components/MapLayer/interfaces/index.mjs.map +0 -1
  669. package/dist/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.mjs.map +0 -1
  670. package/dist/components/Map/components/MapProvider/components/MapLayerProvider/index.mjs.map +0 -1
  671. package/dist/components/Map/components/MapProvider/hooks/index.mjs.map +0 -1
  672. package/dist/components/Map/components/MapProvider/index.mjs.map +0 -1
  673. package/dist/components/Map/components/MapUpdater/index.mjs.map +0 -1
  674. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.mjs.map +0 -1
  675. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.mjs.map +0 -1
  676. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.mjs.map +0 -1
  677. package/dist/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.mjs.map +0 -1
  678. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.mjs.map +0 -1
  679. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.mjs.map +0 -1
  680. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.mjs.map +0 -1
  681. package/dist/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.mjs.map +0 -1
  682. package/dist/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.mjs.map +0 -1
  683. package/dist/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.mjs.map +0 -1
  684. package/dist/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.mjs.map +0 -1
  685. package/dist/components/Map/components/ThematicLayerConfiguration/components/RadiusField.mjs.map +0 -1
  686. package/dist/components/Map/components/ThematicLayerConfiguration/components/TypeField.mjs.map +0 -1
  687. package/dist/components/Map/components/ThematicLayerConfiguration/index.mjs +0 -5
  688. package/dist/components/Map/components/ThematicLayerConfiguration/index.mjs.map +0 -1
  689. package/dist/components/Map/components/ThematicLayerConfiguration/types/index.mjs +0 -3
  690. package/dist/components/Map/constants/colors.mjs.map +0 -1
  691. package/dist/components/Map/constants/legendSet.mjs.map +0 -1
  692. package/dist/components/Map/hooks/map.mjs.map +0 -1
  693. package/dist/components/Map/index.mjs +0 -7
  694. package/dist/components/Map/index.mjs.map +0 -1
  695. package/dist/components/Map/interfaces/index.mjs +0 -3
  696. package/dist/components/Map/state/index.mjs.map +0 -1
  697. package/dist/components/Map/utils/colors.mjs.map +0 -1
  698. package/dist/components/Map/utils/helpers.mjs.map +0 -1
  699. package/dist/components/Map/utils/map.mjs.map +0 -1
  700. package/dist/components/SingleValueContainer/SingleValueContainer.stories.mjs.map +0 -1
  701. package/dist/components/SingleValueContainer/SingleValueVisualizer.mjs.map +0 -1
  702. package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.mjs.map +0 -1
  703. package/dist/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.mjs.map +0 -1
  704. package/dist/components/SingleValueContainer/index.mjs +0 -4
  705. package/dist/components/SingleValueContainer/index.mjs.map +0 -1
  706. package/dist/components/SingleValueContainer/types/props.mjs +0 -3
  707. package/dist/components/Visualization/components/AnalyticsDataProvider/index.mjs.map +0 -1
  708. package/dist/components/Visualization/components/DimensionsProvider/index.mjs.map +0 -1
  709. package/dist/components/Visualization/components/LayoutProvider/index.mjs.map +0 -1
  710. package/dist/components/Visualization/components/VisualizationDimensionSelector/index.mjs.map +0 -1
  711. package/dist/components/Visualization/components/VisualizationProvider/index.mjs.map +0 -1
  712. package/dist/components/Visualization/components/VisualizationSelector/index.mjs.map +0 -1
  713. package/dist/components/Visualization/components/VisualizationTypeProvider/index.mjs.map +0 -1
  714. package/dist/components/Visualization/components/VisualizationTypeSelector/index.mjs.map +0 -1
  715. package/dist/components/Visualization/index.mjs.map +0 -1
  716. package/dist/index.mjs +0 -8
  717. package/dist/index.mjs.map +0 -1
  718. /package/dist/{components/ChartAnalytics/components/DownloadMenu/interfaces/menu.mjs.map → esm/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js.map} +0 -0
  719. /package/dist/{components/ChartAnalytics/types/props.mjs.map → esm/components/ChartAnalytics/types/props.js.map} +0 -0
  720. /package/dist/{components/CircularProgressDashboard/types/props.mjs.map → esm/components/CircularProgressDashboard/types/props.js.map} +0 -0
  721. /package/dist/{components/DHIS2PivotTable/interfaces/index.mjs.map → esm/components/DHIS2PivotTable/interfaces/index.js.map} +0 -0
  722. /package/dist/{components/Map/components/MapArea/interfaces/index.mjs.map → esm/components/Map/components/MapArea/interfaces/index.js.map} +0 -0
  723. /package/dist/{components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.mjs.map → esm/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js.map} +0 -0
  724. /package/dist/{components/Map/components/ThematicLayerConfiguration/types/index.mjs.map → esm/components/Map/components/ThematicLayerConfiguration/types/index.js.map} +0 -0
  725. /package/dist/{components/Map/interfaces/index.mjs.map → esm/components/Map/interfaces/index.js.map} +0 -0
  726. /package/dist/{components/SingleValueContainer/types/props.mjs.map → esm/components/SingleValueContainer/types/props.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Visualization/index.tsx"],"names":[],"mappings":"AA2CE,SAgFG,UAnEF,KAbD;AAzCF,SAAS,6BAA6B;AAGtC,SAAS,iCAAiC;AAC1C,SAAS,sCAAsC;AAC/C,SAAS,6BAA6B;AAItC,SAAS,qBAAoC;AAC7C,OAAO,UAAU;AACjB,SAAS,QAAQ,QAAQ,mBAAmB;AAwB5C,SAAS,cAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AACD,GAAwC;AACvC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,OAAO;AAAA,QACP,WAAW;AAAA,QACX,QAAQ,UAAU;AAAA,QAClB,SAAS;AAAA,QACT,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,KAAK;AAAA,QACL,SAAS;AAAA,MACV;AAAA,MAEA;AAAA,4BAAC,eAAY;AAAA,QACb;AAAA,UAAC;AAAA;AAAA,YACA,OAAO;AAAA,cACN,OAAO,OAAO;AAAA,cACd,QAAQ;AAAA,YACT;AAAA,YAEC,eAAK,EAAE,8BAA8B;AAAA;AAAA,QACvC;AAAA,QACA,oBAAC,OAAE,OAAO,EAAE,QAAQ,EAAE,GAAI,gBAAM,SAAQ;AAAA,QACvC,sBACA,oBAAC,UAAO,SAAS,oBAAoB,OAAK,MACxC,eAAK,EAAE,WAAW,GACpB;AAAA;AAAA;AAAA,EAEF;AAEF;AAEO,SAAS,cAAc;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAuB;AACtB,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAW,CAAC,YAAY,QAAQ,0BAA0B,MAAM;AAAA,MAChE,gBAAgB,CAAC,UACf,oBAAC,iBAAc,QAAiB,GAAG,OAAO;AAAA,MAG5C;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACA,OAAO;AAAA,gBACN,SAAS;AAAA,gBACT,eAAe;AAAA,gBACf,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,KAAK;AAAA,cACN;AAAA,cAEC;AAAA,+BACA;AAAA,kBAAC;AAAA;AAAA,oBACA,OAAO;AAAA,sBACN,SAAS;AAAA,sBACT,eAAe;AAAA,sBACf,KAAK;AAAA,sBACL,gBAAgB;AAAA,oBACjB;AAAA,oBAEA;AAAA,0CAAC,6BAA0B;AAAA,sBAC3B;AAAA,wBAAC;AAAA;AAAA,0BACA;AAAA,0BACA;AAAA;AAAA,sBACD;AAAA;AAAA;AAAA,gBACD;AAAA,gBAED,gCACC,8BAAC,yBAAsB,QAAgB,GACxC;AAAA;AAAA;AAAA,UACD;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF","sourcesContent":["import React from \"react\";\nimport { AnalyticsDimension } from \"@hisptz/dhis2-utils\";\nimport { VisualizationProvider } from \"./components/VisualizationProvider\";\nimport { Layout } from \"./components/LayoutProvider\";\nimport { VisualizationType } from \"./components/VisualizationTypeProvider\";\nimport { VisualizationTypeSelector } from \"./components/VisualizationTypeSelector\";\nimport { VisualizationDimensionSelector } from \"./components/VisualizationDimensionSelector\";\nimport { VisualizationSelector } from \"./components/VisualizationSelector\";\nimport { DHIS2PivotTableOptions } from \"../DHIS2PivotTable\";\nimport { ChartConfig } from \"../ChartAnalytics\";\nimport { MapProps } from \"../Map\";\nimport { ErrorBoundary, FallbackProps } from \"react-error-boundary\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { Button, colors, IconError24 } from \"@dhis2/ui\";\n\nexport interface VisualizationConfig {\n\tpivotTable?: DHIS2PivotTableOptions;\n\tchart?: ChartConfig;\n\tmap?: Omit<MapProps, \"orgUnitSelection\" | \"periodSelection\">;\n}\n\nexport interface VisualizationProps {\n\tlayout: Layout;\n\tdefaultVisualizationType: VisualizationType;\n\tdimensions: AnalyticsDimension;\n\tconfig: VisualizationConfig;\n\theight?: number;\n\tshowToolbar?: boolean;\n\tshowPeriodSelector?: boolean;\n\tshowOrgUnitSelector?: boolean;\n}\n\n/**\n * An analytics component that allows visualization of `chart`, `map`, and `pivot table` by passing analytics object and the default layout and type\n *\n * */\n\nfunction ErrorFallback({\n\terror,\n\tresetErrorBoundary,\n\theight,\n}: FallbackProps & { height?: number }) {\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\twidth: \"100%\",\n\t\t\t\ttextAlign: \"center\",\n\t\t\t\theight: height ?? 500,\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\tflexDirection: \"column\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tjustifyContent: \"center\",\n\t\t\t\tgap: 16,\n\t\t\t\tpadding: 16,\n\t\t\t}}\n\t\t>\n\t\t\t<IconError24 />\n\t\t\t<h3\n\t\t\t\tstyle={{\n\t\t\t\t\tcolor: colors.grey800,\n\t\t\t\t\tmargin: 0,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{i18n.t(\"Could not load visualization\")}\n\t\t\t</h3>\n\t\t\t<p style={{ margin: 0 }}>{error.message}</p>\n\t\t\t{resetErrorBoundary && (\n\t\t\t\t<Button onClick={resetErrorBoundary} small>\n\t\t\t\t\t{i18n.t(\"Try again\")}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport function Visualization({\n\tdimensions,\n\tlayout,\n\tdefaultVisualizationType,\n\tconfig,\n\theight,\n\tshowToolbar,\n\tshowOrgUnitSelector,\n\tshowPeriodSelector,\n}: VisualizationProps) {\n\treturn (\n\t\t<ErrorBoundary\n\t\t\tresetKeys={[dimensions, layout, defaultVisualizationType, config]}\n\t\t\tfallbackRender={(props) =>\n\t\t\t\t(<ErrorFallback height={height} {...props} />) as any\n\t\t\t}\n\t\t>\n\t\t\t<VisualizationProvider\n\t\t\t\tconfig={config}\n\t\t\t\ttype={defaultVisualizationType}\n\t\t\t\tlayout={layout}\n\t\t\t\tdimensions={dimensions}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\tflexDirection: \"column\",\n\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\theight: \"100%\",\n\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{showToolbar && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\t\t\tflexDirection: \"row\",\n\t\t\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t\t\t\tjustifyContent: \"space-between\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VisualizationTypeSelector />\n\t\t\t\t\t\t\t<VisualizationDimensionSelector\n\t\t\t\t\t\t\t\tshowPeriodSelector={showPeriodSelector}\n\t\t\t\t\t\t\t\tshowOrgUnitSelector={showOrgUnitSelector}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VisualizationSelector config={config} />\n\t\t\t\t\t</>\n\t\t\t\t</div>\n\t\t\t</VisualizationProvider>\n\t\t</ErrorBoundary>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["../../../src/components/Visualization/index.tsx"],"names":[],"mappings":"AA2CE,SAgFG,UAnEF,KAbD;AAzCF,SAAS,6BAA6B;AAGtC,SAAS,iCAAiC;AAC1C,SAAS,sCAAsC;AAC/C,SAAS,6BAA6B;AAItC,SAAS,qBAAoC;AAC7C,OAAO,UAAU;AACjB,SAAS,QAAQ,QAAQ,mBAAmB;AAwB5C,SAAS,cAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AACD,GAAwC;AACvC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,OAAO;AAAA,QACP,WAAW;AAAA,QACX,QAAQ,UAAU;AAAA,QAClB,SAAS;AAAA,QACT,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,KAAK;AAAA,QACL,SAAS;AAAA,MACV;AAAA,MAEA;AAAA,4BAAC,eAAY;AAAA,QACb;AAAA,UAAC;AAAA;AAAA,YACA,OAAO;AAAA,cACN,OAAO,OAAO;AAAA,cACd,QAAQ;AAAA,YACT;AAAA,YAEC,eAAK,EAAE,8BAA8B;AAAA;AAAA,QACvC;AAAA,QACA,oBAAC,OAAE,OAAO,EAAE,QAAQ,EAAE,GAAI,gBAAM,SAAQ;AAAA,QACvC,sBACA,oBAAC,UAAO,SAAS,oBAAoB,OAAK,MACxC,eAAK,EAAE,WAAW,GACpB;AAAA;AAAA;AAAA,EAEF;AAEF;AAEO,SAAS,cAAc;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAuB;AACtB,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAW,CAAC,YAAY,QAAQ,0BAA0B,MAAM;AAAA,MAChE,gBAAgB,CAAC,UACf,oBAAC,iBAAc,QAAiB,GAAG,OAAO;AAAA,MAG5C;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA,MAAM;AAAA,UACN;AAAA,UACA;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACA,OAAO;AAAA,gBACN,SAAS;AAAA,gBACT,eAAe;AAAA,gBACf,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,KAAK;AAAA,cACN;AAAA,cAEC;AAAA,+BACA;AAAA,kBAAC;AAAA;AAAA,oBACA,OAAO;AAAA,sBACN,SAAS;AAAA,sBACT,eAAe;AAAA,sBACf,KAAK;AAAA,sBACL,gBAAgB;AAAA,oBACjB;AAAA,oBAEA;AAAA,0CAAC,6BAA0B;AAAA,sBAC3B;AAAA,wBAAC;AAAA;AAAA,0BACA;AAAA,0BACA;AAAA;AAAA,sBACD;AAAA;AAAA;AAAA,gBACD;AAAA,gBAED,gCACC,8BAAC,yBAAsB,QAAgB,GACxC;AAAA;AAAA;AAAA,UACD;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF","sourcesContent":["import React from \"react\";\nimport { AnalyticsDimension } from \"@hisptz/dhis2-utils\";\nimport { VisualizationProvider } from \"./components/VisualizationProvider/index.js\";\nimport { Layout } from \"./components/LayoutProvider/index.js\";\nimport { VisualizationType } from \"./components/VisualizationTypeProvider/index.js\";\nimport { VisualizationTypeSelector } from \"./components/VisualizationTypeSelector/index.js\";\nimport { VisualizationDimensionSelector } from \"./components/VisualizationDimensionSelector/index.js\";\nimport { VisualizationSelector } from \"./components/VisualizationSelector/index.js\";\nimport { DHIS2PivotTableOptions } from \"../DHIS2PivotTable/index.js\";\nimport { ChartConfig } from \"../ChartAnalytics/index.js\";\nimport { MapProps } from \"../Map/index.js\";\nimport { ErrorBoundary, FallbackProps } from \"react-error-boundary\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { Button, colors, IconError24 } from \"@dhis2/ui\";\n\nexport interface VisualizationConfig {\n\tpivotTable?: DHIS2PivotTableOptions;\n\tchart?: ChartConfig;\n\tmap?: Omit<MapProps, \"orgUnitSelection\" | \"periodSelection\">;\n}\n\nexport interface VisualizationProps {\n\tlayout: Layout;\n\tdefaultVisualizationType: VisualizationType;\n\tdimensions: AnalyticsDimension;\n\tconfig: VisualizationConfig;\n\theight?: number;\n\tshowToolbar?: boolean;\n\tshowPeriodSelector?: boolean;\n\tshowOrgUnitSelector?: boolean;\n}\n\n/**\n * An analytics component that allows visualization of `chart`, `map`, and `pivot table` by passing analytics object and the default layout and type\n *\n * */\n\nfunction ErrorFallback({\n\terror,\n\tresetErrorBoundary,\n\theight,\n}: FallbackProps & { height?: number }) {\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\twidth: \"100%\",\n\t\t\t\ttextAlign: \"center\",\n\t\t\t\theight: height ?? 500,\n\t\t\t\tdisplay: \"flex\",\n\t\t\t\tflexDirection: \"column\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tjustifyContent: \"center\",\n\t\t\t\tgap: 16,\n\t\t\t\tpadding: 16,\n\t\t\t}}\n\t\t>\n\t\t\t<IconError24 />\n\t\t\t<h3\n\t\t\t\tstyle={{\n\t\t\t\t\tcolor: colors.grey800,\n\t\t\t\t\tmargin: 0,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{i18n.t(\"Could not load visualization\")}\n\t\t\t</h3>\n\t\t\t<p style={{ margin: 0 }}>{error.message}</p>\n\t\t\t{resetErrorBoundary && (\n\t\t\t\t<Button onClick={resetErrorBoundary} small>\n\t\t\t\t\t{i18n.t(\"Try again\")}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport function Visualization({\n\tdimensions,\n\tlayout,\n\tdefaultVisualizationType,\n\tconfig,\n\theight,\n\tshowToolbar,\n\tshowOrgUnitSelector,\n\tshowPeriodSelector,\n}: VisualizationProps) {\n\treturn (\n\t\t<ErrorBoundary\n\t\t\tresetKeys={[dimensions, layout, defaultVisualizationType, config]}\n\t\t\tfallbackRender={(props) =>\n\t\t\t\t(<ErrorFallback height={height} {...props} />) as any\n\t\t\t}\n\t\t>\n\t\t\t<VisualizationProvider\n\t\t\t\tconfig={config}\n\t\t\t\ttype={defaultVisualizationType}\n\t\t\t\tlayout={layout}\n\t\t\t\tdimensions={dimensions}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\tflexDirection: \"column\",\n\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\theight: \"100%\",\n\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{showToolbar && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\t\t\tflexDirection: \"row\",\n\t\t\t\t\t\t\t\tgap: 16,\n\t\t\t\t\t\t\t\tjustifyContent: \"space-between\",\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VisualizationTypeSelector />\n\t\t\t\t\t\t\t<VisualizationDimensionSelector\n\t\t\t\t\t\t\t\tshowPeriodSelector={showPeriodSelector}\n\t\t\t\t\t\t\t\tshowOrgUnitSelector={showOrgUnitSelector}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VisualizationSelector config={config} />\n\t\t\t\t\t</>\n\t\t\t\t</div>\n\t\t\t</VisualizationProvider>\n\t\t</ErrorBoundary>\n\t);\n}\n"]}
@@ -251,4 +251,4 @@ const ComplexMultiSeries = {
251
251
 
252
252
  export { Bar, ComplexMultiSeries, Default, Line, MultiSeries, MultipleColumns, MultipleLines, PieChart, StackedBar, StackedColumn, ChartAnalytics_stories_default as default };
253
253
  //# sourceMappingURL=out.js.map
254
- //# sourceMappingURL=ChartAnalytics.stories.mjs.map
254
+ //# sourceMappingURL=ChartAnalytics.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ChartAnalytics/ChartAnalytics.stories.tsx"],"names":[],"mappings":"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","sourcesContent":["import { DHIS2Chart, setupHighchartsModules } from \".\";\nimport { Meta, StoryObj } from \"@storybook/react\";\nimport columnData from \"../../shared/resources/column-data.json\";\nimport multiSeriesData from \"../../shared/resources/multi-series-data.json\";\nimport stackedChartData from \"../../shared/resources/stacked-chart-data.json\";\nimport pieData from \"../../shared/resources/pie-data.json\";\nimport complexMultiSeriesData from \"../../shared/resources/complex-multi-series-data.json\";\nimport { Analytics } from \"@hisptz/dhis2-utils\";\nimport HighCharts from \"highcharts\";\n\nsetupHighchartsModules(HighCharts);\n\nconst meta: Meta<typeof DHIS2Chart> = {\n\tcomponent: DHIS2Chart,\n\ttitle: \"DHIS2 Chart\",\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof DHIS2Chart>;\n\nexport const Default: Story = {\n\tname: \"Column\",\n\targs: {\n\t\tanalytics: columnData as unknown as Analytics,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"dx\"],\n\t\t\t\tcategory: [\"ou\"],\n\t\t\t\tfilter: [\"pe\"],\n\t\t\t},\n\t\t\ttype: \"column\",\n\t\t},\n\t},\n};\n\nexport const Bar: Story = {\n\tname: \"Bar\",\n\targs: {\n\t\tanalytics: columnData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"dx\"],\n\t\t\t\tcategory: [\"ou\"],\n\t\t\t\tfilter: [\"pe\"],\n\t\t\t},\n\t\t\ttype: \"bar\",\n\t\t},\n\t},\n};\nexport const MultipleColumns: Story = {\n\tname: \"Multiple columns\",\n\targs: {\n\t\tanalytics: multiSeriesData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"ou\"],\n\t\t\t\tcategory: [\"pe\"],\n\t\t\t\tfilter: [\"dx\"],\n\t\t\t},\n\t\t\ttype: \"column\",\n\t\t},\n\t},\n};\n\nexport const StackedColumn: Story = {\n\tname: \"Stacked column\",\n\targs: {\n\t\tanalytics: stackedChartData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"ou\"],\n\t\t\t\tcategory: [\"pe\"],\n\t\t\t\tfilter: [\"dx\"],\n\t\t\t},\n\t\t\ttype: \"stacked-column\",\n\t\t},\n\t},\n};\nexport const StackedBar: Story = {\n\tname: \"Stacked bar\",\n\targs: {\n\t\tanalytics: stackedChartData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"ou\"],\n\t\t\t\tcategory: [\"pe\"],\n\t\t\t\tfilter: [\"dx\"],\n\t\t\t},\n\t\t\ttype: \"stacked-bar\",\n\t\t},\n\t},\n};\nexport const Line: Story = {\n\tname: \"Line chart\",\n\targs: {\n\t\tanalytics: columnData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"dx\"],\n\t\t\t\tcategory: [\"ou\"],\n\t\t\t\tfilter: [\"pe\"],\n\t\t\t},\n\t\t\ttype: \"line\",\n\t\t},\n\t},\n};\n\nexport const MultipleLines: Story = {\n\tname: \"Multi line\",\n\targs: {\n\t\tanalytics: multiSeriesData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"ou\"],\n\t\t\t\tcategory: [\"pe\"],\n\t\t\t\tfilter: [\"dx\"],\n\t\t\t},\n\t\t\ttype: \"line\",\n\t\t},\n\t},\n};\n\nexport const PieChart: Story = {\n\tname: \"Pie chart\",\n\targs: {\n\t\tanalytics: pieData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"dx\"],\n\t\t\t\tcategory: [],\n\t\t\t\tfilter: [\"dx\", \"pe\"],\n\t\t\t},\n\t\t\ttype: \"pie\",\n\t\t},\n\t},\n};\n\nexport const MultiSeries: Story = {\n\tname: \"Multi series\",\n\targs: {\n\t\tanalytics: multiSeriesData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"ou\"],\n\t\t\t\tcategory: [\"pe\"],\n\t\t\t\tfilter: [\"dx\"],\n\t\t\t},\n\t\t\ttype: \"multi-series\",\n\t\t\tmultiSeries: {\n\t\t\t\tseries: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"qhqAxPSTUXp\",\n\t\t\t\t\t\tas: \"column\",\n\t\t\t\t\t\tyAxis: 0,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"Vth0fbpFcsO\",\n\t\t\t\t\t\tas: \"line\",\n\t\t\t\t\t\tcumulative: true,\n\t\t\t\t\t\tyAxis: 1,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tyAxes: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"yAxis1\",\n\t\t\t\t\t\ttitle: {\n\t\t\t\t\t\t\ttext: \"Koinandugu\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tformat: \"{value}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"yAxis2\",\n\t\t\t\t\t\ttitle: {\n\t\t\t\t\t\t\ttext: \"Kono\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tformat: \"{value}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\topposite: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\ttarget: {\n\t\t\t\t\tid: \"\",\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\tcolor: \"blue\",\n\t\t\t\t\t},\n\t\t\t\t\tvalue: 45,\n\t\t\t\t\tlabel: {\n\t\t\t\t\t\ttext: \"Target\",\n\t\t\t\t\t\ttextAlign: \"center\",\n\t\t\t\t\t\tverticalAlign: \"middle\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n};\n\nexport const ComplexMultiSeries: Story = {\n\tname: \"Complex multi series\",\n\targs: {\n\t\tanalytics: complexMultiSeriesData as any,\n\t\tconfig: {\n\t\t\tlayout: {\n\t\t\t\tseries: [\"dx\"],\n\t\t\t\tcategory: [\"pe\"],\n\t\t\t\tfilter: [\"ou\"],\n\t\t\t},\n\t\t\ttype: \"multi-series\",\n\t\t\tmultiSeries: {\n\t\t\t\tseries: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"QQkOAJFukyY\",\n\t\t\t\t\t\tas: \"column\",\n\t\t\t\t\t\tyAxis: 0,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"QQkOAJFukyY\",\n\t\t\t\t\t\tas: \"line\",\n\t\t\t\t\t\tcumulative: true,\n\t\t\t\t\t\tyAxis: 1,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tyAxes: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"yAxis1\",\n\t\t\t\t\t\ttitle: {\n\t\t\t\t\t\t\ttext: \"Koinandugu\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tformat: \"{value}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"yAxis2\",\n\t\t\t\t\t\ttitle: {\n\t\t\t\t\t\t\ttext: \"Kono\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tformat: \"{value}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\topposite: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\ttarget: {\n\t\t\t\t\tid: \"\",\n\t\t\t\t\tstyles: {\n\t\t\t\t\t\tcolor: \"blue\",\n\t\t\t\t\t},\n\t\t\t\t\tvalue: 45,\n\t\t\t\t\tlabel: {\n\t\t\t\t\t\ttext: \"Target\",\n\t\t\t\t\t\ttextAlign: \"center\",\n\t\t\t\t\t\tverticalAlign: \"middle\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n};\n"]}
@@ -3,11 +3,11 @@ import { uid } from '@hisptz/dhis2-utils';
3
3
  import HighCharts from 'highcharts';
4
4
  import HighchartsReact from 'highcharts-react-official';
5
5
  import { forwardRef, useRef } from 'react';
6
- import { useChart } from './hooks/useChart';
6
+ import { useChart } from './hooks/useChart.js';
7
7
  import './styles/custom-highchart.css';
8
- export * from './services/export';
9
- export * from './types/props';
10
- export * from './components/DownloadMenu';
8
+ export * from './services/export.js';
9
+ export * from './types/props.js';
10
+ export * from './components/DownloadMenu/index.js';
11
11
 
12
12
  function ChartAnalyticsComponent({ analytics, config, containerProps }, ref) {
13
13
  const id = useRef(`${uid()}-chart-item`);
@@ -33,4 +33,4 @@ const ChartAnalytics = DHIS2Chart;
33
33
 
34
34
  export { ChartAnalytics, DHIS2Chart };
35
35
  //# sourceMappingURL=out.js.map
36
- //# sourceMappingURL=DHIS2Chart.mjs.map
36
+ //# sourceMappingURL=DHIS2Chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ChartAnalytics/DHIS2Chart.tsx"],"names":[],"mappings":"AAuBE;AAvBF,SAAS,WAAW;AACpB,OAAO,gBAAgB;AACvB,OAAO,qBAAqB;AAC5B,SAAgB,YAAY,cAAc;AAC1C,SAAS,gBAAgB;AACzB,OAAO;AAGP,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,wBACR,EAAE,WAAW,QAAQ,eAAe,GACpC,KACC;AACD,QAAM,KAAK,OAAO,GAAG,IAAI,CAAC,aAAa;AACvC,QAAM,EAAE,MAAM,IAAI,SAAS,EAAE,IAAI,GAAG,SAAS,WAAW,OAAO,CAAC;AAEhE,MAAI,CAAC,OAAO;AACX,WAAO;AAAA,EACR;AACA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAS;AAAA,MACT;AAAA,MACA,gBAAgB,EAAE,IAAI,GAAG,SAAS,GAAI,kBAAkB,CAAC,EAAG;AAAA,MAC5D,YAAY;AAAA,MACZ,SAAS,EAAE,GAAG,MAAM;AAAA;AAAA,EACrB;AAEF;AAgBO,MAAM,aAA4C;AAAA,EACxD;AACD;AAKO,MAAM,iBAAiB","sourcesContent":["import { uid } from \"@hisptz/dhis2-utils\";\nimport HighCharts from \"highcharts\";\nimport HighchartsReact from \"highcharts-react-official\";\nimport React, { forwardRef, useRef } from \"react\";\nimport { useChart } from \"./hooks/useChart.js\";\nimport \"./styles/custom-highchart.css\";\nimport { ChartAnalyticsProps } from \"./types/props.js\";\n\nexport * from \"./services/export.js\";\nexport * from \"./types/props.js\";\nexport * from \"./components/DownloadMenu/index.js\";\n\nfunction ChartAnalyticsComponent(\n\t{ analytics, config, containerProps }: ChartAnalyticsProps,\n\tref: React.ForwardedRef<HighchartsReact.RefObject>,\n) {\n\tconst id = useRef(`${uid()}-chart-item`);\n\tconst { chart } = useChart({ id: id.current, analytics, config });\n\n\tif (!chart) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<HighchartsReact\n\t\t\timmutable\n\t\t\tref={ref}\n\t\t\tcontainerProps={{ id: id.current, ...(containerProps ?? {}) }}\n\t\t\thighcharts={HighCharts}\n\t\t\toptions={{ ...chart }}\n\t\t/>\n\t);\n}\n\n/**\n * The `DHIS2Chart` component allows you to render a chart visualization from DHIS2 analytics data.\n * It accepts the DHIS2 analytics payload as well as configuration on how to visualize the data.\n *\n * @component\n *\n * @param {ChartAnalyticsProps} props\n * @param {Analytics} [props.analytics] - Analytics data from DHIS2\n * @param {ChartConfig} [props.config] - Visualization configuration. See stories for more information\n * @param {Record<string, any>} [props.containerProps] - Props that will be passed to the chart container\n * @param {forwardRef} forwardRef - A function that creates a higher order component that forwards the ref through the component tree.\n *\n * @returns {React.FC<ChartAnalyticsProps & { ref: React.Ref<unknown> }>} - The DHIS2 chart component with forward ref support.\n */\nexport const DHIS2Chart: React.FC<ChartAnalyticsProps> = forwardRef(\n\tChartAnalyticsComponent,\n);\n\n/**\n * @deprecated since `v2`. Use `DHIS2Chart` instead\n * */\nexport const ChartAnalytics = DHIS2Chart;\n"]}
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { Popover, FlyoutMenu, Menu, MenuItem, MenuDivider } from '@dhis2/ui';
3
3
  import { map, isEmpty } from 'lodash';
4
- import { chartMenuSections } from '../constants/menu';
4
+ import { chartMenuSections } from '../constants/menu.js';
5
5
 
6
6
  function ChartMenu({
7
7
  menuRef,
@@ -49,4 +49,4 @@ function ChartMenu({
49
49
 
50
50
  export { ChartMenu };
51
51
  //# sourceMappingURL=out.js.map
52
- //# sourceMappingURL=Menu.mjs.map
52
+ //# sourceMappingURL=Menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/components/ChartAnalytics/components/DownloadMenu/components/Menu.tsx"],"names":[],"mappings":"AA0CO,mBAGG,KAHH;AA1CP,SAAS,YAAY,MAAM,aAAa,UAAU,eAAe;AACjE,SAAS,SAAS,WAAW;AAE7B,SAAS,yBAAyB;AAG3B,SAAS,UAAU;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU,CAAC;AACZ,GAKG;AACF,QAAM,cAAc,CAAC,WAAmB,MAAM;AAC7C,YAAQ,MAAM;AACd,YAAQ;AAAA,EACT;AAEA,QAAM,eAAe,IAAI,mBAAmB,CAAC,YAAY;AACxD,WAAO;AAAA,MACN,GAAG;AAAA,MACH,WAAW,QAAQ,UAAU;AAAA,QAC5B,CAAC,SAAc,CAAC,QAAQ,SAAS,KAAK,IAAI;AAAA,MAC3C;AAAA,IACD;AAAA,EACD,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,QAAQ,QAAQ,SAAS,CAAC;AAElD,SACC;AAAA,IAAC;AAAA;AAAA,MACA,gBAAgB;AAAA,MAEhB;AAAA,MACA,WAAW;AAAA,MAEX,8BAAC,cACA,8BAAC,QACC,wBAAc,IAAI,CAAC,SAAS,UAAU;AACtC,eACC,iCACE;AAAA,kBAAQ,WAAW,IAAI,CAAC,EAAE,MAAM,MAAM,MAAM;AAC5C,mBACC;AAAA,cAAC;AAAA;AAAA,gBAEA,UAAU,YAAY,IAAI;AAAA,gBAC1B;AAAA,gBACA,SAAS,YAAY,IAAI;AAAA;AAAA,cAHpB,GAAG,IAAI;AAAA,YAIb;AAAA,UAEF,CAAC;AAAA,UACA,UAAU,aAAa,SAAS,KAChC,oBAAC,eAAY;AAAA,WAEf;AAAA,MAEF,CAAC,GACF,GACD;AAAA;AAAA,EACD;AAEF","sourcesContent":["import { FlyoutMenu, Menu, MenuDivider, MenuItem, Popover } from \"@dhis2/ui\";\nimport { isEmpty, map } from \"lodash\";\nimport React from \"react\";\nimport { chartMenuSections } from \"../constants/menu.js\";\nimport { ChartExportMenuItem } from \"../interfaces/menu.js\";\n\nexport function ChartMenu({\n\tmenuRef,\n\tonClick,\n\tonClose,\n\texclude = [],\n}: {\n\tmenuRef: HTMLDivElement;\n\tonClick: (action: string) => void;\n\tonClose: () => void;\n\texclude?: ChartExportMenuItem[];\n}) {\n\tconst onMenuClick = (action: string) => () => {\n\t\tonClick(action);\n\t\tonClose();\n\t};\n\n\tconst menuSections = map(chartMenuSections, (section) => {\n\t\treturn {\n\t\t\t...section,\n\t\t\tmenuItems: section.menuItems.filter(\n\t\t\t\t(item: any) => !exclude.includes(item.name),\n\t\t\t),\n\t\t};\n\t}).filter((section) => !isEmpty(section.menuItems));\n\n\treturn (\n\t\t<Popover\n\t\t\tonClickOutside={onClose} /*\n // @ts-ignore */\n\t\t\tonClose={onClose}\n\t\t\treference={menuRef}\n\t\t>\n\t\t\t<FlyoutMenu>\n\t\t\t\t<Menu>\n\t\t\t\t\t{menuSections?.map((section, index) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{section.menuItems?.map(({ name, label }) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\tkey={`${name}-menu-item`}\n\t\t\t\t\t\t\t\t\t\t\tdataTest={`download-${name}`}\n\t\t\t\t\t\t\t\t\t\t\tlabel={label}\n\t\t\t\t\t\t\t\t\t\t\tonClick={onMenuClick(name)}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t{index !== menuSections.length - 1 && (\n\t\t\t\t\t\t\t\t\t<MenuDivider />\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Menu>\n\t\t\t</FlyoutMenu>\n\t\t</Popover>\n\t);\n}\n"]}
@@ -39,4 +39,4 @@ const chartMenuSections = [
39
39
 
40
40
  export { chartMenuSections };
41
41
  //# sourceMappingURL=out.js.map
42
- //# sourceMappingURL=menu.mjs.map
42
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/components/ChartAnalytics/components/DownloadMenu/constants/menu.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU;AAEV,MAAM,oBAAoB;AAAA,EAC/B;AAAA,IACE,MAAM;AAAA,IACN,WAAW;AAAA,MACT;AAAA,QACE,MAAM;AAAA,QACN,OAAO,KAAK,EAAE,cAAc;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO,KAAK,EAAE,eAAe;AAAA,MAC/B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO,KAAK,EAAE,cAAc;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO,KAAK,EAAE,cAAc;AAAA,MAC9B;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,WAAW;AAAA,MACT;AAAA,QACE,MAAM;AAAA,QACN,OAAO,KAAK,EAAE,eAAe;AAAA,MAC/B;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO,KAAK,EAAE,kBAAkB;AAAA,MAClC;AAAA,IACF;AAAA,EACF;AACF","sourcesContent":["import i18n from \"@dhis2/d2-i18n\";\n\nexport const chartMenuSections = [\n {\n name: \"download\",\n menuItems: [\n {\n name: \"png\",\n label: i18n.t(\"Download PNG\"),\n },\n {\n name: \"jpeg\",\n label: i18n.t(\"Download JPEG\"),\n },\n {\n name: \"svg\",\n label: i18n.t(\"Download SVG\"),\n },\n {\n name: \"pdf\",\n label: i18n.t(\"Download PDF\"),\n },\n ],\n },\n {\n name: \"view\",\n menuItems: [\n {\n name: \"table\",\n label: i18n.t(\"View as table\"),\n },\n {\n name: \"full-screen\",\n label: i18n.t(\"View full screen\"),\n },\n ],\n },\n];\n"]}
@@ -1,8 +1,8 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { IconMore24 } from '@dhis2/ui';
3
3
  import { useRef, useState } from 'react';
4
- import { onFullScreenView, onViewAsTable, onPDFDownload, onCSVDownload, onImageDownload } from '../../services/export';
5
- import { ChartMenu } from './components/Menu';
4
+ import { onFullScreenView, onViewAsTable, onPDFDownload, onCSVDownload, onImageDownload } from '../../services/export.js';
5
+ import { ChartMenu } from './components/Menu.js';
6
6
 
7
7
  function ChartDownloadMenu({
8
8
  chartRef,
@@ -62,4 +62,4 @@ function ChartDownloadMenu({
62
62
 
63
63
  export { ChartDownloadMenu };
64
64
  //# sourceMappingURL=out.js.map
65
- //# sourceMappingURL=index.mjs.map
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/components/ChartAnalytics/components/DownloadMenu/index.tsx"],"names":[],"mappings":"AA+DE,mBAEW,KAFX;AA/DF,SAAS,kBAAkB;AAE3B,SAAgB,QAAQ,gBAAgB;AACxC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,iBAAiB;AAGnB,SAAS,kBAAkB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACD,GAIG;AACF,QAAM,gBAAgB,OAA8B,IAAI;AACxD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAgC,IAAI;AAClE,QAAM,aAAa,MAAM;AACxB,QAAI,YAAY,MAAM;AACrB,iBAAW,cAAc,OAAO;AAAA,IACjC,OAAO;AACN,iBAAW,IAAI;AAAA,IAChB;AAAA,EACD;AAEA,QAAM,QAAQ;AAEd,QAAM,cAAc,CAAC,WAAmB;AACvC,QAAI,OAAO;AACV,cAAQ,QAAQ;AAAA,QACf,KAAK;AACJ,0BAAgB,OAAO,KAAK;AAC5B;AAAA,QACD,KAAK;AACJ,0BAAgB,OAAO,MAAM;AAC7B;AAAA,QACD,KAAK;AACJ,0BAAgB,OAAO,SAAS;AAChC;AAAA,QACD,KAAK;AACJ,wBAAc,KAAK;AACnB;AAAA,QACD,KAAK;AACJ,wBAAc,KAAK;AACnB;AAAA,QACD,KAAK;AACJ,wBAAc,OAAO,IAAI;AACzB;AAAA,QACD,KAAK;AACJ,2BAAiB,KAAK;AACtB;AAAA,MACF;AAAA,IACD;AAAA,EACD;AAEA,SACC,iCACC;AAAA,wBAAC,SAAI,SAAS,YAAY,KAAK,eAC7B,kBAAQ,oBAAC,cAAW,GACtB;AAAA,IACC,WACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,SAAS;AAAA,QACT,SAAS;AAAA,QACT;AAAA;AAAA,IACD;AAAA,KAEF;AAEF","sourcesContent":["import { IconMore24 } from \"@dhis2/ui\";\nimport HighchartsReact from \"highcharts-react-official\";\nimport React, { useRef, useState } from \"react\";\nimport {\n\tonCSVDownload,\n\tonFullScreenView,\n\tonImageDownload,\n\tonPDFDownload,\n\tonViewAsTable,\n} from \"../../services/export.js\";\nimport { ChartMenu } from \"./components/Menu.js\";\nimport { ChartExportMenuItem } from \"./interfaces/menu.js\";\n\nexport function ChartDownloadMenu({\n\tchartRef,\n\texclude,\n\ticon,\n}: {\n\tchartRef: HighchartsReact.RefObject | null;\n\texclude?: ChartExportMenuItem[];\n\ticon?: React.ReactNode;\n}) {\n\tconst menuButtonRef = useRef<HTMLDivElement | null>(null);\n\tconst [menuRef, setMenuRef] = useState<HTMLDivElement | null>(null);\n\tconst toggleMenu = () => {\n\t\tif (menuRef === null) {\n\t\t\tsetMenuRef(menuButtonRef.current);\n\t\t} else {\n\t\t\tsetMenuRef(null);\n\t\t}\n\t};\n\n\tconst chart = chartRef;\n\n\tconst onMenuClick = (action: string) => {\n\t\tif (chart) {\n\t\t\tswitch (action) {\n\t\t\t\tcase \"png\":\n\t\t\t\t\tonImageDownload(chart, \"png\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"jpeg\":\n\t\t\t\t\tonImageDownload(chart, \"jpeg\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"svg\":\n\t\t\t\t\tonImageDownload(chart, \"svg+xml\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"csv\":\n\t\t\t\t\tonCSVDownload(chart);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pdf\":\n\t\t\t\t\tonPDFDownload(chart);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"table\":\n\t\t\t\t\tonViewAsTable(chart, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"full-screen\":\n\t\t\t\t\tonFullScreenView(chart);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div onClick={toggleMenu} ref={menuButtonRef}>\n\t\t\t\t{icon ?? <IconMore24 />}\n\t\t\t</div>\n\t\t\t{menuRef && (\n\t\t\t\t<ChartMenu\n\t\t\t\t\texclude={exclude}\n\t\t\t\t\tonClick={onMenuClick}\n\t\t\t\t\tonClose={toggleMenu}\n\t\t\t\t\tmenuRef={menuRef}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n}\n"]}
@@ -1,3 +1,3 @@
1
1
 
2
2
  //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=menu.mjs.map
3
+ //# sourceMappingURL=menu.js.map
@@ -1,5 +1,5 @@
1
1
  import { useState, useCallback, useEffect } from 'react';
2
- import { getChartInstance, updateLayout } from '../utils/chart';
2
+ import { getChartInstance, updateLayout } from '../utils/chart.js';
3
3
 
4
4
  function useChart({
5
5
  id,
@@ -40,4 +40,4 @@ function useChart({
40
40
 
41
41
  export { useChart };
42
42
  //# sourceMappingURL=out.js.map
43
- //# sourceMappingURL=useChart.mjs.map
43
+ //# sourceMappingURL=useChart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/hooks/useChart.ts"],"names":[],"mappings":"AAEA,SAAS,aAAa,WAAW,gBAAgB;AAGjD,SAAS,kBAAkB,oBAAoB;AAExC,SAAS,SAAS;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACD,GAOE;AACD,QAAM,CAAC,OAAO,QAAQ,IAAI;AAAA,IACzB,iBAAiB,IAAI,WAAW,MAAM,EAAE,WAAW;AAAA,EACpD;AAEA,QAAM,kBAAkB;AAAA,IACvB,CAAC,SAAoB;AACpB,YAAM,gBAAgB,aAAa,QAAQ,EAAE,KAAK,CAAC;AACnD,YAAM,gBAAgB,EAAE,GAAG,QAAQ,QAAQ,eAAe,KAAK;AAC/D,YAAM,gBAA4B;AAAA,QACjC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,eAAS,cAAc,WAAW,CAAC;AAAA,IACpC;AAAA,IACA,CAAC,QAAQ,IAAI,SAAS;AAAA,EACvB;AAEA,YAAU,MAAM;AACf,QAAI,aAAa,QAAQ;AACxB,YAAM,gBAA4B;AAAA,QACjC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,eAAS,cAAc,WAAW,CAAC;AAAA,IACpC;AAAA,EACD,GAAG,CAAC,WAAW,QAAQ,EAAE,CAAC;AAE1B,SAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AACD","sourcesContent":["import type { Analytics } from \"@hisptz/dhis2-utils\";\nimport HighCharts from \"highcharts\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { DHIS2Chart } from \"../models/index.js\";\nimport { ChartConfig, ChartType } from \"../types/props.js\";\nimport { getChartInstance, updateLayout } from \"../utils/chart.js\";\n\nexport function useChart({\n\tid,\n\tanalytics,\n\tconfig,\n}: {\n\tid: string;\n\tanalytics: Analytics;\n\tconfig: ChartConfig;\n}): {\n\tchart?: HighCharts.Options;\n\tchangeChartType: (type: ChartType) => void;\n} {\n\tconst [chart, setChart] = useState<HighCharts.Options | undefined>(\n\t\tgetChartInstance(id, analytics, config).getOptions(),\n\t);\n\n\tconst changeChartType = useCallback(\n\t\t(type: ChartType) => {\n\t\t\tconst updatedLayout = updateLayout(config, { type });\n\t\t\tconst updatedConfig = { ...config, layout: updatedLayout, type };\n\t\t\tconst chartInstance: DHIS2Chart = getChartInstance(\n\t\t\t\tid,\n\t\t\t\tanalytics,\n\t\t\t\tupdatedConfig,\n\t\t\t);\n\t\t\tsetChart(chartInstance.getOptions());\n\t\t},\n\t\t[config, id, analytics],\n\t);\n\n\tuseEffect(() => {\n\t\tif (analytics && config) {\n\t\t\tconst chartInstance: DHIS2Chart = getChartInstance(\n\t\t\t\tid,\n\t\t\t\tanalytics,\n\t\t\t\tconfig,\n\t\t\t);\n\t\t\tsetChart(chartInstance.getOptions());\n\t\t}\n\t}, [analytics, config, id]);\n\n\treturn {\n\t\tchart,\n\t\tchangeChartType,\n\t};\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './DHIS2Chart.js';
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/ChartAnalytics/index.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["export * from \"./DHIS2Chart.js\";\n"]}
@@ -1,4 +1,4 @@
1
- import { DHIS2ColumnChart } from './column';
1
+ import { DHIS2ColumnChart } from './column.js';
2
2
 
3
3
  class DHIS2BarChart extends DHIS2ColumnChart {
4
4
  getHighchartsType() {
@@ -18,4 +18,4 @@ class DHIS2StackedBarChart extends DHIS2BarChart {
18
18
 
19
19
  export { DHIS2BarChart, DHIS2StackedBarChart };
20
20
  //# sourceMappingURL=out.js.map
21
- //# sourceMappingURL=bar.mjs.map
21
+ //# sourceMappingURL=bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/models/bar.ts"],"names":[],"mappings":"AACA,SAAS,wBAAwB;AAE1B,MAAM,sBAAsB,iBAAiB;AAAA,EACnD,oBAA4B;AAC3B,WAAO;AAAA,EACR;AACD;AAEO,MAAM,6BAA6B,cAAc;AAAA,EACvD,iBAA8B;AAC7B,WAAO;AAAA,MACN,QAAQ;AAAA,QACP,UAAU;AAAA,QACV,GAAG,MAAM,eAAe,EAAE;AAAA,MAC3B;AAAA,IACD;AAAA,EACD;AACD","sourcesContent":["import { PlotOptions } from \"highcharts\";\nimport { DHIS2ColumnChart } from \"./column.js\";\n\nexport class DHIS2BarChart extends DHIS2ColumnChart {\n\tgetHighchartsType(): string {\n\t\treturn \"bar\";\n\t}\n}\n\nexport class DHIS2StackedBarChart extends DHIS2BarChart {\n\tgetPlotOptions(): PlotOptions {\n\t\treturn {\n\t\t\tcolumn: {\n\t\t\t\tstacking: \"normal\",\n\t\t\t\t...super.getPlotOptions().column,\n\t\t\t},\n\t\t};\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { getPointSeries, getAllCategories } from '../utils/chart';
2
- import { DHIS2Chart } from './index';
1
+ import { getPointSeries, getAllCategories } from '../utils/chart.js';
2
+ import { DHIS2Chart } from './index.js';
3
3
 
4
4
  class DHIS2ColumnChart extends DHIS2Chart {
5
5
  getCategories() {
@@ -45,4 +45,4 @@ class DHIS2StackedColumnChart extends DHIS2ColumnChart {
45
45
 
46
46
  export { DHIS2ColumnChart, DHIS2StackedColumnChart };
47
47
  //# sourceMappingURL=out.js.map
48
- //# sourceMappingURL=column.mjs.map
48
+ //# sourceMappingURL=column.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/models/column.ts"],"names":[],"mappings":"AACA,SAAS,kBAAkB,sBAAsB;AACjD,SAAS,kBAAkB;AAEpB,MAAM,yBAAyB,WAAW;AAAA,EAChD,gBAAmC;AAClC,WAAO;AAAA,EACR;AAAA,EAEA,oBAA4B;AAC3B,WAAO;AAAA,EACR;AAAA,EAEA,iBAA8B;AAC7B,WAAO;AAAA,MACN,QAAQ;AAAA,QACP,YAAY;AAAA,UACX,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,YAAiC;AAChC,WAAO,eAAe,KAAK,WAAW,KAAK,QAAQ,QAAQ;AAAA,EAC5D;AAAA,EAEA,WAAqC;AACpC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,YAAY,iBAAiB,KAAK,WAAW,KAAK,MAAM;AAAA,MACxD,WAAW;AAAA,MACX,QAAQ;AAAA,QACP,SAAS;AAAA,MACV;AAAA,MACA,OAAO,EAAE,MAAM,GAAG;AAAA,IACnB;AAAA,EACD;AACD;AAEO,MAAM,gCAAgC,iBAAiB;AAAA,EAC7D,iBAA8B;AAC7B,WAAO;AAAA,MACN,QAAQ;AAAA,QACP,UAAU;AAAA,QACV,GAAG,MAAM,eAAe,EAAE;AAAA,MAC3B;AAAA,IACD;AAAA,EACD;AACD","sourcesContent":["import { PlotOptions, SeriesOptionsType, XAxisOptions } from \"highcharts\";\nimport { getAllCategories, getPointSeries } from \"../utils/chart.js\";\nimport { DHIS2Chart } from \"./index.js\";\n\nexport class DHIS2ColumnChart extends DHIS2Chart {\n\tgetCategories(): any[] | undefined {\n\t\treturn undefined;\n\t}\n\n\tgetHighchartsType(): string {\n\t\treturn \"column\";\n\t}\n\n\tgetPlotOptions(): PlotOptions {\n\t\treturn {\n\t\t\tcolumn: {\n\t\t\t\tdataLabels: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tgetSeries(): SeriesOptionsType[] {\n\t\treturn getPointSeries(this.analytics, this.config, \"column\");\n\t}\n\n\tgetXAxis(): XAxisOptions | undefined {\n\t\treturn {\n\t\t\ttype: \"category\",\n\t\t\tcategories: getAllCategories(this.analytics, this.config),\n\t\t\tcrosshair: true,\n\t\t\tlabels: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t\ttitle: { text: \"\" },\n\t\t};\n\t}\n}\n\nexport class DHIS2StackedColumnChart extends DHIS2ColumnChart {\n\tgetPlotOptions(): PlotOptions {\n\t\treturn {\n\t\t\tcolumn: {\n\t\t\t\tstacking: \"normal\",\n\t\t\t\t...super.getPlotOptions().column,\n\t\t\t},\n\t\t};\n\t}\n}\n"]}
@@ -1,7 +1,4 @@
1
1
  class DHIS2Chart {
2
- id;
3
- analytics;
4
- config;
5
2
  constructor(id, analytics, config) {
6
3
  this.id = id;
7
4
  this.analytics = analytics;
@@ -114,4 +111,4 @@ class DHIS2Chart {
114
111
 
115
112
  export { DHIS2Chart };
116
113
  //# sourceMappingURL=out.js.map
117
- //# sourceMappingURL=index.mjs.map
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/models/index.ts"],"names":[],"mappings":"AAIO,MAAe,WAAW;AAAA,EAKhC,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.js\";\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,5 +1,5 @@
1
- import { getPointSeries, getAllCategories } from '../utils/chart';
2
- import { DHIS2Chart } from './index';
1
+ import { getPointSeries, getAllCategories } from '../utils/chart.js';
2
+ import { DHIS2Chart } from './index.js';
3
3
 
4
4
  class DHIS2LineChart extends DHIS2Chart {
5
5
  getHighchartsType() {
@@ -28,4 +28,4 @@ class DHIS2LineChart extends DHIS2Chart {
28
28
 
29
29
  export { DHIS2LineChart };
30
30
  //# sourceMappingURL=out.js.map
31
- //# sourceMappingURL=line.mjs.map
31
+ //# sourceMappingURL=line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/models/line.ts"],"names":[],"mappings":"AACA,SAAS,kBAAkB,sBAAsB;AACjD,SAAS,kBAAkB;AAEpB,MAAM,uBAAuB,WAAW;AAAA,EAC9C,oBAA4B;AAC3B,WAAO;AAAA,EACR;AAAA,EAEA,iBAA8B;AAC7B,WAAO;AAAA,MACN,MAAM,CAAC;AAAA,IACR;AAAA,EACD;AAAA,EAEA,YAAiC;AAChC,WAAO,eAAe,KAAK,WAAW,KAAK,QAAQ,MAAM;AAAA,EAC1D;AAAA,EAEA,WAAqC;AACpC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,YAAY,iBAAiB,KAAK,WAAW,KAAK,MAAM;AAAA,MACxD,WAAW;AAAA,MACX,QAAQ;AAAA,QACP,SAAS;AAAA,MACV;AAAA,MACA,OAAO,EAAE,MAAM,GAAG;AAAA,IACnB;AAAA,EACD;AACD","sourcesContent":["import { PlotOptions, SeriesOptionsType, XAxisOptions } from \"highcharts\";\nimport { getAllCategories, getPointSeries } from \"../utils/chart.js\";\nimport { DHIS2Chart } from \"./index.js\";\n\nexport class DHIS2LineChart extends DHIS2Chart {\n\tgetHighchartsType(): string {\n\t\treturn \"line\";\n\t}\n\n\tgetPlotOptions(): PlotOptions {\n\t\treturn {\n\t\t\tline: {},\n\t\t};\n\t}\n\n\tgetSeries(): SeriesOptionsType[] {\n\t\treturn getPointSeries(this.analytics, this.config, \"line\");\n\t}\n\n\tgetXAxis(): XAxisOptions | undefined {\n\t\treturn {\n\t\t\ttype: \"category\",\n\t\t\tcategories: getAllCategories(this.analytics, this.config),\n\t\t\tcrosshair: true,\n\t\t\tlabels: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t\ttitle: { text: \"\" },\n\t\t};\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { head, compact } from 'lodash';
2
- import { getDimensionHeaderIndex, getAllCategories } from '../utils/chart';
3
- import { DHIS2Chart } from './index';
2
+ import { getDimensionHeaderIndex, getAllCategories } from '../utils/chart.js';
3
+ import { DHIS2Chart } from './index.js';
4
4
 
5
5
  class DHIS2MultiSeriesChart extends DHIS2Chart {
6
6
  getHighchartsType() {
@@ -17,21 +17,34 @@ class DHIS2MultiSeriesChart extends DHIS2Chart {
17
17
  const config = this.config;
18
18
  const categoryDimension = head(config.layout.category);
19
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");
20
+ const categoryIndex = getDimensionHeaderIndex(
21
+ analytics.headers ?? [],
22
+ categoryDimension ?? ""
23
+ );
24
+ const seriesIndex = getDimensionHeaderIndex(
25
+ analytics.headers ?? [],
26
+ head(config.layout.series) ?? ""
27
+ );
28
+ const valueIndex = getDimensionHeaderIndex(
29
+ analytics.headers ?? [],
30
+ "value"
31
+ );
23
32
  if (!categoryDimension) {
24
33
  throw new Error("At least one category dimension is required");
25
34
  }
26
35
  if (!seriesConfig) {
27
- throw new Error("MultiSeries config is required for chart type multi-series");
36
+ throw new Error(
37
+ "MultiSeries config is required for chart type multi-series"
38
+ );
28
39
  }
29
40
  return compact(
30
41
  seriesConfig?.series?.map(({ id, as, cumulative, yAxis }) => {
31
42
  const dataItem = analytics.metaData?.items[id];
32
43
  const categoryItems = analytics.metaData?.dimensions[categoryDimension];
33
44
  const data = categoryItems?.map((item) => {
34
- const row = analytics.rows?.find((row2) => row2[categoryIndex] === item && row2[seriesIndex] === id);
45
+ const row = analytics.rows?.find(
46
+ (row2) => row2[categoryIndex] === item && row2[seriesIndex] === id
47
+ );
35
48
  return row?.[valueIndex] ? parseFloat(row?.[valueIndex]) : 0;
36
49
  });
37
50
  let cumulativeData = [];
@@ -96,4 +109,4 @@ class DHIS2MultiSeriesChart extends DHIS2Chart {
96
109
 
97
110
  export { DHIS2MultiSeriesChart };
98
111
  //# sourceMappingURL=out.js.map
99
- //# sourceMappingURL=multi-series.mjs.map
112
+ //# sourceMappingURL=multi-series.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/models/multi-series.ts"],"names":["row"],"mappings":"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","sourcesContent":["import {\n\tPlotOptions,\n\tSeriesOptionsType,\n\tXAxisOptions,\n\tYAxisOptions,\n} from \"highcharts\";\nimport { compact, head } from \"lodash\";\nimport { MultiSeriesConfig } from \"../types/props.js\";\nimport { getAllCategories, getDimensionHeaderIndex } from \"../utils/chart.js\";\nimport { DHIS2Chart } from \"./index.js\";\n\nexport class DHIS2MultiSeriesChart extends DHIS2Chart {\n\tgetHighchartsType(): string {\n\t\treturn \"\";\n\t}\n\n\tgetPlotOptions(): PlotOptions {\n\t\treturn {\n\t\t\tcolumn: {},\n\t\t\tline: {},\n\t\t};\n\t}\n\n\tgetSeries(): SeriesOptionsType[] {\n\t\tconst analytics = this.analytics;\n\t\tconst config = this.config;\n\n\t\tconst categoryDimension = head(config.layout.category);\n\t\tconst seriesConfig: MultiSeriesConfig | undefined =\n\t\t\tthis.config.multiSeries;\n\n\t\tconst categoryIndex = getDimensionHeaderIndex(\n\t\t\tanalytics.headers ?? [],\n\t\t\tcategoryDimension ?? \"\",\n\t\t);\n\t\tconst seriesIndex = getDimensionHeaderIndex(\n\t\t\tanalytics.headers ?? [],\n\t\t\thead(config.layout.series) ?? \"\",\n\t\t);\n\t\tconst valueIndex = getDimensionHeaderIndex(\n\t\t\tanalytics.headers ?? [],\n\t\t\t\"value\",\n\t\t);\n\n\t\tif (!categoryDimension) {\n\t\t\tthrow new Error(\"At least one category dimension is required\");\n\t\t}\n\n\t\tif (!seriesConfig) {\n\t\t\tthrow new Error(\n\t\t\t\t\"MultiSeries config is required for chart type multi-series\",\n\t\t\t);\n\t\t}\n\n\t\treturn compact(\n\t\t\tseriesConfig?.series?.map(({ id, as, cumulative, yAxis }) => {\n\t\t\t\tconst dataItem = analytics.metaData?.items[id as any];\n\t\t\t\tconst categoryItems =\n\t\t\t\t\tanalytics.metaData?.dimensions[\n\t\t\t\t\t\tcategoryDimension as \"dx\" | \"ou\" | \"pe\"\n\t\t\t\t\t];\n\n\t\t\t\tconst data = categoryItems?.map((item: string) => {\n\t\t\t\t\tconst row = analytics.rows?.find(\n\t\t\t\t\t\t(row: any) =>\n\t\t\t\t\t\t\trow[categoryIndex] === item &&\n\t\t\t\t\t\t\trow[seriesIndex] === id,\n\t\t\t\t\t);\n\t\t\t\t\treturn row?.[valueIndex]\n\t\t\t\t\t\t? parseFloat(row?.[valueIndex])\n\t\t\t\t\t\t: 0;\n\t\t\t\t});\n\n\t\t\t\tlet cumulativeData: number[] = [];\n\n\t\t\t\tif (cumulative) {\n\t\t\t\t\tcumulativeData =\n\t\t\t\t\t\tdata?.reduce((acc, curr, index) => {\n\t\t\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t\t\treturn [...acc, curr];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn [...acc, acc[index - 1] + curr];\n\t\t\t\t\t\t}, [] as number[]) ?? [];\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tname: dataItem?.name,\n\t\t\t\t\tdata: cumulative ? cumulativeData : data,\n\t\t\t\t\ttype: as,\n\t\t\t\t\tyAxis: yAxis ?? 0,\n\t\t\t\t};\n\t\t\t}),\n\t\t) as SeriesOptionsType[];\n\t}\n\n\tgetXAxis(): XAxisOptions | undefined {\n\t\treturn {\n\t\t\ttype: \"category\",\n\t\t\tcategories: getAllCategories(this.analytics, this.config),\n\t\t\tcrosshair: true,\n\t\t\tlabels: {\n\t\t\t\tenabled: true,\n\t\t\t},\n\t\t\ttitle: { text: \"\" },\n\t\t};\n\t}\n\n\tgetYAxis(): YAxisOptions[] {\n\t\tlet yAxes: YAxisOptions[] = [];\n\n\t\tif (this.config.multiSeries?.yAxes) {\n\t\t\tyAxes = this.config.multiSeries?.yAxes;\n\t\t} else {\n\t\t\tyAxes = super.getYAxis();\n\t\t}\n\n\t\tif (!this.config.multiSeries?.target) {\n\t\t\treturn yAxes;\n\t\t}\n\n\t\tconst { value, styles, label } = this.config.multiSeries?.target ?? {};\n\n\t\treturn [\n\t\t\t{\n\t\t\t\t...yAxes[0],\n\t\t\t\tplotLines: [\n\t\t\t\t\t...(yAxes[0].plotLines ?? []),\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor: styles?.color ?? \"#00FF00\",\n\t\t\t\t\t\tdashStyle: styles?.dashStyle ?? \"Solid\",\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\twidth: styles?.width ?? 2,\n\t\t\t\t\t\tzIndex: styles?.zIndex ?? 1000,\n\t\t\t\t\t\tlabel: label,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t...yAxes.slice(1),\n\t\t];\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { head } from 'lodash';
2
- import { DHIS2Chart } from './index';
2
+ import { DHIS2Chart } from './index.js';
3
3
 
4
4
  class DHIS2PieChart extends DHIS2Chart {
5
5
  getHighchartsType() {
@@ -32,7 +32,9 @@ class DHIS2PieChart extends DHIS2Chart {
32
32
  id: seriesDimension ?? "",
33
33
  name: analytics.metaData?.items?.[seriesDimension]?.name ?? "",
34
34
  data: seriesValues?.map((value) => {
35
- const row = analytics?.rows?.find((row2) => row2[seriesIndex] === value);
35
+ const row = analytics?.rows?.find(
36
+ (row2) => row2[seriesIndex] === value
37
+ );
36
38
  return {
37
39
  name: analytics.metaData?.items?.[value]?.name,
38
40
  y: row?.[valueIndex] ? parseFloat(row?.[valueIndex] ?? "") : 0
@@ -48,4 +50,4 @@ class DHIS2PieChart extends DHIS2Chart {
48
50
 
49
51
  export { DHIS2PieChart };
50
52
  //# sourceMappingURL=out.js.map
51
- //# sourceMappingURL=pie.mjs.map
53
+ //# sourceMappingURL=pie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/models/pie.ts"],"names":["row"],"mappings":"AACA,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAEpB,MAAM,sBAAsB,WAAW;AAAA,EAC7C,oBAA4B;AAC3B,WAAO;AAAA,EACR;AAAA,EAEA,iBAA8B;AAC7B,WAAO;AAAA,MACN,KAAK;AAAA,QACJ,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,YAAY;AAAA,UACX,SAAS;AAAA,UACT,QAAQ;AAAA,QACT;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,YAAiC;AAChC,UAAM,YAAY,KAAK;AACvB,UAAM,SAAS,KAAK;AACpB,UAAM,kBAAkB,KAAK,OAAO,OAAO,MAAM;AACjD,UAAM,cACL,WAAW,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,eAAe,KAC/D;AACD,UAAM,aACL,WAAW,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,KAAK;AAE7D,QAAI,CAAC,iBAAiB;AACrB,YAAM,IAAI,MAAM,wCAAwC;AAAA,IACzD;AACA,UAAM,eACL,UAAU,UAAU,aACnB,eACD;AAED,WAAO;AAAA,MACN;AAAA,QACC,IAAI,mBAAmB;AAAA,QACvB,MACC,UAAU,UAAU,QAAQ,eAAsB,GAAG,QACrD;AAAA,QACD,MAAM,cAAc,IAAI,CAAC,UAAkB;AAC1C,gBAAM,MAAM,WAAW,MAAM;AAAA,YAC5B,CAACA,SAAaA,KAAI,WAAW,MAAM;AAAA,UACpC;AAEA,iBAAO;AAAA,YACN,MAAM,UAAU,UAAU,QAAQ,KAAY,GAAG;AAAA,YACjD,GAAG,MAAM,UAAU,IAChB,WAAW,MAAM,UAAU,KAAK,EAAE,IAClC;AAAA,UACJ;AAAA,QACD,CAAC;AAAA,MACF;AAAA,IACD;AAAA,EACD;AAAA,EAEA,WAAqC;AACpC,WAAO;AAAA,EACR;AACD","sourcesContent":["import { PlotOptions, SeriesOptionsType, XAxisOptions } from \"highcharts\";\nimport { head } from \"lodash\";\nimport { DHIS2Chart } from \"./index.js\";\n\nexport class DHIS2PieChart extends DHIS2Chart {\n\tgetHighchartsType(): string {\n\t\treturn \"pie\";\n\t}\n\n\tgetPlotOptions(): PlotOptions {\n\t\treturn {\n\t\t\tpie: {\n\t\t\t\tallowPointSelect: true,\n\t\t\t\tcursor: \"pointer\",\n\t\t\t\tdataLabels: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tformat: \"<b>{point.name}</b>: {point.percentage:.1f} %\",\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tgetSeries(): SeriesOptionsType[] {\n\t\tconst analytics = this.analytics;\n\t\tconst config = this.config;\n\t\tconst seriesDimension = head(config.layout.series);\n\t\tconst seriesIndex =\n\t\t\tanalytics?.headers?.findIndex((h) => h.name === seriesDimension) ??\n\t\t\t-1;\n\t\tconst valueIndex =\n\t\t\tanalytics?.headers?.findIndex((h) => h.name === \"value\") ?? -1;\n\n\t\tif (!seriesDimension) {\n\t\t\tthrow new Error(\"Pie chart must have a series dimension\");\n\t\t}\n\t\tconst seriesValues =\n\t\t\tanalytics.metaData?.dimensions?.[\n\t\t\t\tseriesDimension as \"dx\" | \"ou\" | \"pe\"\n\t\t\t];\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tid: seriesDimension ?? \"\",\n\t\t\t\tname:\n\t\t\t\t\tanalytics.metaData?.items?.[seriesDimension as any]?.name ??\n\t\t\t\t\t\"\",\n\t\t\t\tdata: seriesValues?.map((value: string) => {\n\t\t\t\t\tconst row = analytics?.rows?.find(\n\t\t\t\t\t\t(row: any) => row[seriesIndex] === value,\n\t\t\t\t\t);\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: analytics.metaData?.items?.[value as any]?.name,\n\t\t\t\t\t\ty: row?.[valueIndex]\n\t\t\t\t\t\t\t? parseFloat(row?.[valueIndex] ?? \"\")\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t};\n\t\t\t\t}),\n\t\t\t} as SeriesOptionsType,\n\t\t];\n\t}\n\n\tgetXAxis(): XAxisOptions | undefined {\n\t\treturn undefined;\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
- import HighChartsExportCSV from 'highcharts/modules/export-data';
2
- import HighChartsExport from 'highcharts/modules/exporting';
3
- import HighChartsFullScreen from 'highcharts/modules/full-screen';
1
+ import HighChartsExportCSV from 'highcharts/modules/export-data.js';
2
+ import HighChartsExport from 'highcharts/modules/exporting.js';
3
+ import HighChartsFullScreen from 'highcharts/modules/full-screen.js';
4
4
 
5
5
  function setupHighchartsModules(highcharts) {
6
6
  HighChartsExport(highcharts);
@@ -32,4 +32,4 @@ const onViewAsTable = (chartRef, show) => {
32
32
 
33
33
  export { onCSVDownload, onFullScreenView, onImageDownload, onPDFDownload, onViewAsTable, setupHighchartsModules };
34
34
  //# sourceMappingURL=out.js.map
35
- //# sourceMappingURL=export.mjs.map
35
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
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,iBACf,UACA,SACC;AACD,YAAU,OAAO,WAAW,OAAO;AACpC;AAEO,SAAS,cACf,UACA,SACC;AACD,YAAU,MAAM,YAAY,EAAE,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC;AACvE;AAEO,SAAS,cACf,UACA,SACC;AACD,YAAU,MAAM,YAAY;AAC7B;AAEO,MAAM,kBAAkB,CAC9B,UACA,MACA,YACI;AACJ,YAAU,MAAM,YAAY,EAAE,MAAM,SAAS,IAAI,GAAG,GAAG,WAAW,CAAC,CAAC;AACrE;AAEO,MAAM,gBAAgB,CAC5B,UACA,SACI;AACJ,QAAM,UAAU,UAAU,MAAM;AAChC,YAAU,OAAO,OAAO;AAAA,IACvB,GAAG;AAAA,IACH,WAAW;AAAA,MACV,GAAG,SAAS;AAAA,MACZ,WAAW;AAAA,IACZ;AAAA,EACD,CAAC;AACF","sourcesContent":["import Highcharts from \"highcharts\";\nimport HighchartsReact from \"highcharts-react-official\";\nimport HighChartsExportCSV from \"highcharts/modules/export-data.js\";\nimport HighChartsExport from \"highcharts/modules/exporting.js\";\nimport HighChartsFullScreen from \"highcharts/modules/full-screen.js\";\n\nexport function setupHighchartsModules(highcharts: typeof Highcharts) {\n\tHighChartsExport(highcharts);\n\tHighChartsExportCSV(highcharts);\n\tHighChartsFullScreen(highcharts);\n}\n\nexport function onFullScreenView(\n\tchartRef: HighchartsReact.RefObject,\n\toptions?: Highcharts.Options,\n) {\n\tchartRef?.chart?.fullscreen.toggle();\n}\n\nexport function onPDFDownload(\n\tchartRef: HighchartsReact.RefObject,\n\toptions?: Highcharts.Options,\n) {\n\tchartRef?.chart.exportChart({ type: \"application/pdf\" }, options ?? {});\n}\n\nexport function onCSVDownload(\n\tchartRef: HighchartsReact.RefObject,\n\toptions?: Highcharts.Options,\n) {\n\tchartRef?.chart.downloadCSV();\n}\n\nexport const onImageDownload = (\n\tchartRef: HighchartsReact.RefObject,\n\ttype: \"png\" | \"svg+xml\" | \"jpeg\",\n\toptions?: Highcharts.Options,\n) => {\n\tchartRef?.chart.exportChart({ type: `image/${type}` }, options ?? {});\n};\n\nexport const onViewAsTable = (\n\tchartRef: HighchartsReact.RefObject,\n\tshow: boolean,\n) => {\n\tconst options = chartRef?.chart.options;\n\tchartRef?.chart?.update({\n\t\t...options,\n\t\texporting: {\n\t\t\t...options?.exporting,\n\t\t\tshowTable: show,\n\t\t},\n\t});\n};\n"]}
@@ -0,0 +1,40 @@
1
+ .highcharts-data-table table {
2
+ border: 1px solid rgb(232, 237, 242);
3
+ text-align: left;
4
+ min-width: 100%;
5
+ border-collapse: collapse;
6
+ vertical-align: top;
7
+ }
8
+ .highcharts-data-table td,
9
+ .highcharts-data-table th,
10
+ .highcharts-data-table caption {
11
+ font-size: 14px;
12
+ line-height: 16px;
13
+ padding: 8px 6px;
14
+ height: 32px;
15
+ border-bottom: 1px solid rgb(232, 237, 242);
16
+ }
17
+ .highcharts-data-table thead tr {
18
+ background: transparent;
19
+ }
20
+ .highcharts-data-table tr:nth-child(even) {
21
+ background: rgb(251, 252, 253);
22
+ }
23
+ .highcharts-data-table tr {
24
+ cursor: pointer;
25
+ }
26
+ .highcharts-data-table tr:hover {
27
+ background: rgb(251, 252, 253);
28
+ }
29
+ .highcharts-data-table caption {
30
+ border-bottom: none;
31
+ font-size: 1.1em;
32
+ font-weight: bold;
33
+ }
34
+ .highcharts-sort-ascending::after {
35
+ content: " \2193";
36
+ }
37
+ .highcharts-sort-descending::after {
38
+ content: " \2191";
39
+ }
40
+ /*# sourceMappingURL=custom-highchart.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ChartAnalytics/styles/custom-highchart.css"],"sourcesContent":["\n.highcharts-data-table table {\n border: 1px solid rgb(232, 237, 242);\n text-align: left;\n min-width: 100%;\n border-collapse: collapse;\n vertical-align: top;\n}\n\n.highcharts-data-table td,\n.highcharts-data-table th,\n.highcharts-data-table caption {\n font-size: 14px;\n line-height: 16px;\n padding: 8px 6px;\n height: 32px;\n border-bottom: 1px solid rgb(232, 237, 242);\n}\n\n.highcharts-data-table thead tr {\n background: transparent;\n}\n\n.highcharts-data-table tr:nth-child(even) {\n background: rgb(251, 252, 253);\n}\n\n.highcharts-data-table tr {\n cursor: pointer;\n}\n\n.highcharts-data-table tr:hover {\n background: rgb(251, 252, 253);\n}\n\n.highcharts-data-table caption {\n border-bottom: none;\n font-size: 1.1em;\n font-weight: bold;\n}\n\n.highcharts-sort-ascending::after {\n content: \" ↓\";\n}\n\n.highcharts-sort-descending::after {\n content: \" ↑\";\n}\n"],"mappings":"AACA,CAAC,sBAAsB;AACnB,UAAQ,IAAI,MAAM,IAAI,GAAG,EAAE,GAAG,EAAE;AAChC,cAAY;AACZ,aAAW;AACX,mBAAiB;AACjB,kBAAgB;AACpB;AAEA,CARC,sBAQsB;AACvB,CATC,sBASsB;AACvB,CAVC,sBAUsB;AACnB,aAAW;AACX,eAAa;AACb,WAAS,IAAI;AACb,UAAQ;AACR,iBAAe,IAAI,MAAM,IAAI,GAAG,EAAE,GAAG,EAAE;AAC3C;AAEA,CAlBC,sBAkBsB,MAAM;AACzB,cAAY;AAChB;AAEA,CAtBC,sBAsBsB,EAAE;AACrB,cAAY,IAAI,GAAG,EAAE,GAAG,EAAE;AAC9B;AAEA,CA1BC,sBA0BsB;AACnB,UAAQ;AACZ;AAEA,CA9BC,sBA8BsB,EAAE;AACrB,cAAY,IAAI,GAAG,EAAE,GAAG,EAAE;AAC9B;AAEA,CAlCC,sBAkCsB;AACnB,iBAAe;AACf,aAAW;AACX,eAAa;AACjB;AAEA,CAAC,yBAAyB;AACtB,WAAS;AACb;AAEA,CAAC,0BAA0B;AACvB,WAAS;AACb;","names":[]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=props.js.map
@@ -1,9 +1,9 @@
1
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';
2
+ import { DHIS2StackedColumnChart, DHIS2ColumnChart } from '../models/column.js';
3
+ import { DHIS2LineChart } from '../models/line.js';
4
+ import { DHIS2MultiSeriesChart } from '../models/multi-series.js';
5
+ import { DHIS2PieChart } from '../models/pie.js';
6
+ import { DHIS2StackedBarChart, DHIS2BarChart } from '../models/bar.js';
7
7
 
8
8
  function getDimensionHeaderIndex(headers, name) {
9
9
  return findIndex(headers, { name });
@@ -127,4 +127,4 @@ function getChartInstance(id, analytics, config) {
127
127
 
128
128
  export { getAllCategories, getChartInstance, getColumnSeries, getDimensionHeaderIndex, getPointSeries, updateLayout };
129
129
  //# sourceMappingURL=out.js.map
130
- //# sourceMappingURL=chart.mjs.map
130
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
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/index.js\";\nimport { DHIS2ColumnChart, DHIS2StackedColumnChart } from \"../models/column.js\";\nimport { DHIS2LineChart } from \"../models/line.js\";\nimport { DHIS2MultiSeriesChart } from \"../models/multi-series.js\";\nimport { DHIS2PieChart } from \"../models/pie.js\";\nimport { ChartConfig, ChartType } from \"../types/props.js\";\nimport { DHIS2BarChart, DHIS2StackedBarChart } from \"../models/bar.js\";\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"]}
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { colors } from '@dhis2/ui';
3
3
  import { useMemo } from 'react';
4
4
  import { CircularProgressbarWithChildren } from 'react-circular-progressbar';
5
- export * from './types/props';
5
+ export * from './types/props.js';
6
6
 
7
7
  function CircularProgressVisualizer({
8
8
  numerator,
@@ -63,4 +63,4 @@ const CircularProgressDashboard = CircularProgressVisualizer;
63
63
 
64
64
  export { CircularProgressDashboard, CircularProgressVisualizer };
65
65
  //# sourceMappingURL=out.js.map
66
- //# sourceMappingURL=CircularProgressIndicator.mjs.map
66
+ //# sourceMappingURL=CircularProgressIndicator.js.map
@@ -0,0 +1 @@
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.js\";\n\nexport * from \"./types/props.js\";\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"]}
@@ -39,4 +39,4 @@ WithTextStyling.args = {
39
39
 
40
40
  export { Default, WithStrokeStyling, WithTextStyling, CircularProgressIndicator_stories_default as default };
41
41
  //# sourceMappingURL=out.js.map
42
- //# sourceMappingURL=CircularProgressIndicator.stories.mjs.map
42
+ //# sourceMappingURL=CircularProgressIndicator.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/CircularProgressDashboard/CircularProgressIndicator.stories.tsx"],"names":[],"mappings":"AACA,SAAS,kCAAkC;AAE3C,MAAM,OAAgD;AAAA,EACrD,OAAO;AAAA,EACP,WAAW;AACZ;AACA,IAAO,4CAAQ;AAIR,MAAM,UAAiB,EAAE,MAAM,UAAU;AAChD,QAAQ,OAAO;AAAA,EACd,WAAW;AAAA,EACX,aAAa;AAAA,EACb,MAAM;AACP;AAEO,MAAM,oBAA2B;AAAA,EACvC,MAAM;AACP;AACA,kBAAkB,OAAO;AAAA,EACxB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,MAAM;AAAA,EACN,aAAa;AAAA,IACZ,OAAO;AAAA,IACP,OAAO;AAAA,EACR;AACD;AAEO,MAAM,kBAAyB;AAAA,EACrC,MAAM;AACP;AACA,gBAAgB,OAAO;AAAA,EACtB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,MAAM;AAAA,EACN,WAAW;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,UAAU;AAAA,EACX;AACD","sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport { CircularProgressVisualizer } from \"./CircularProgressIndicator\";\n\nconst meta: Meta<typeof CircularProgressVisualizer> = {\n\ttitle: \"Circular Progress Visualizer\",\n\tcomponent: CircularProgressVisualizer,\n};\nexport default meta;\n\ntype Story = StoryObj<typeof CircularProgressVisualizer>;\n\nexport const Default: Story = { name: \"Default\" };\nDefault.args = {\n\tnumerator: 7,\n\tdenominator: 10,\n\tsize: 500,\n};\n\nexport const WithStrokeStyling: Story = {\n\tname: \"With stroke styling\",\n};\nWithStrokeStyling.args = {\n\tnumerator: 7,\n\tdenominator: 10,\n\tsize: 500,\n\tstrokeStyle: {\n\t\twidth: \"10%\",\n\t\tcolor: \"red\",\n\t},\n};\n\nexport const WithTextStyling: Story = {\n\tname: \"With text styling\",\n};\nWithTextStyling.args = {\n\tnumerator: 7,\n\tdenominator: 10,\n\tsize: 500,\n\ttextStyle: {\n\t\tcolor: \"red\",\n\t\tfontWeight: \"bold\",\n\t\tfontSize: \"20vh\",\n\t},\n};\n"]}
@@ -0,0 +1,4 @@
1
+ export * from './CircularProgressIndicator.js';
2
+ export * from './types/props.js';
3
+ //# sourceMappingURL=out.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/CircularProgressDashboard/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc","sourcesContent":["export * from \"./CircularProgressIndicator.js\";\nexport * from \"./types/props.js\";\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=props.js.map
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { DHIS2PivotTableEngine } from './services/engine';
2
+ import { DHIS2PivotTableEngine } from './services/engine.js';
3
3
  import { useMemo } from 'react';
4
- import { DHIS2PivotTableEngineProvider } from './state/engine';
5
- import { PivotTable } from './components/Table';
6
- import { TableHeaders } from './components/TableHeaders';
7
- import { CustomPivotTableBody } from './components/TableBody';
4
+ import { DHIS2PivotTableEngineProvider } from './state/engine.js';
5
+ import { PivotTable } from './components/Table/index.js';
6
+ import { TableHeaders } from './components/TableHeaders/index.js';
7
+ import { CustomPivotTableBody } from './components/TableBody/index.js';
8
8
 
9
9
  function DHIS2PivotTable({
10
10
  analytics,
@@ -23,4 +23,4 @@ function DHIS2PivotTable({
23
23
 
24
24
  export { DHIS2PivotTable };
25
25
  //# sourceMappingURL=out.js.map
26
- //# sourceMappingURL=DHIS2PivotTable.mjs.map
26
+ //# sourceMappingURL=DHIS2PivotTable.js.map