@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,5 +1,5 @@
1
1
  import React from "react";
2
- import { VisualizationConfig } from "../../index";
2
+ import { VisualizationConfig } from "../../index.js";
3
3
  export type VisualizationType = "pivotTable" | "chart" | "map";
4
4
  export declare const VisualizationTypeContext: React.Context<VisualizationType>;
5
5
  export declare const VisualizationConfigContext: React.Context<VisualizationConfig | undefined>;
@@ -11,5 +11,5 @@ export interface VisualizationTypeProviderProps {
11
11
  }
12
12
  export declare function useVisualizationType(): [VisualizationType, React.Dispatch<React.SetStateAction<VisualizationType>>];
13
13
  export declare function useVisualizationConfig(): VisualizationConfig | undefined;
14
- export declare function VisualizationTypeProvider({ children, defaultType, config }: VisualizationTypeProviderProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function VisualizationTypeProvider({ children, defaultType, config, }: VisualizationTypeProviderProps): import("react/jsx-runtime.js").JSX.Element;
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Visualization/components/VisualizationTypeProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,OAAO,GAAG,KAAK,CAAC;AAG/D,eAAO,MAAM,wBAAwB,kCAAiD,CAAA;AACtF,eAAO,MAAM,0BAA0B,gDAA4D,CAAC;AACpG,eAAO,MAAM,uBAAuB,oFAAgG,CAAA;AAEpI,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,iBAAiB,CAAC;IAC/B,MAAM,EAAE,mBAAmB,CAAA;CAC9B;AAED,wBAAgB,oBAAoB,iFAKnC;AAED,wBAAgB,sBAAsB,oCAErC;AAED,wBAAgB,yBAAyB,CAAC,EAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAC,EAAE,8BAA8B,2CAYxG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Visualization/components/VisualizationTypeProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8C,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,OAAO,GAAG,KAAK,CAAC;AAE/D,eAAO,MAAM,wBAAwB,kCACU,CAAC;AAChD,eAAO,MAAM,0BAA0B,gDAE3B,CAAC;AACb,eAAO,MAAM,uBAAuB,oFAExB,CAAC;AAEb,MAAM,WAAW,8BAA8B;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,iBAAiB,CAAC;IAC/B,MAAM,EAAE,mBAAmB,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,iFAQnC;AAED,wBAAgB,sBAAsB,oCAErC;AAED,wBAAgB,yBAAyB,CAAC,EACzC,QAAQ,EACR,WAAW,EACX,MAAM,GACN,EAAE,8BAA8B,8CAYhC"}
@@ -1,2 +1,2 @@
1
- export declare function VisualizationTypeSelector(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function VisualizationTypeSelector(): import("react/jsx-runtime.js").JSX.Element;
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Visualization/components/VisualizationTypeSelector/index.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,yBAAyB,4CAuBxC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Visualization/components/VisualizationTypeSelector/index.tsx"],"names":[],"mappings":"AAiCA,wBAAgB,yBAAyB,+CAkCxC"}
@@ -1,9 +1,9 @@
1
1
  import { AnalyticsDimension } from "@hisptz/dhis2-utils";
2
- import { Layout } from "./components/LayoutProvider";
3
- import { VisualizationType } from "./components/VisualizationTypeProvider";
4
- import { DHIS2PivotTableOptions } from "../DHIS2PivotTable";
5
- import { ChartConfig } from "../ChartAnalytics";
6
- import { MapProps } from "../Map";
2
+ import { Layout } from "./components/LayoutProvider/index.js";
3
+ import { VisualizationType } from "./components/VisualizationTypeProvider/index.js";
4
+ import { DHIS2PivotTableOptions } from "../DHIS2PivotTable/index.js";
5
+ import { ChartConfig } from "../ChartAnalytics/index.js";
6
+ import { MapProps } from "../Map/index.js";
7
7
  export interface VisualizationConfig {
8
8
  pivotTable?: DHIS2PivotTableOptions;
9
9
  chart?: ChartConfig;
@@ -19,5 +19,5 @@ export interface VisualizationProps {
19
19
  showPeriodSelector?: boolean;
20
20
  showOrgUnitSelector?: boolean;
21
21
  }
22
- export declare function Visualization({ dimensions, layout, defaultVisualizationType, config, height, showToolbar, showOrgUnitSelector, showPeriodSelector, }: VisualizationProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Visualization({ dimensions, layout, defaultVisualizationType, config, height, showToolbar, showOrgUnitSelector, showPeriodSelector, }: VisualizationProps): import("react/jsx-runtime.js").JSX.Element;
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Visualization/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAI3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAKlC,MAAM,WAAW,mBAAmB;IACnC,UAAU,CAAC,EAAE,sBAAsB,CAAC;I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AM,CAAC;IACf,wBAAwB,EAAE,iBAAiB,CAAC;IAC5C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC9B;AA6CD,wBAAgB,aAAa,CAAC,EAC7B,UAAU,EACV,MAAM,EACN,wBAAwB,EACxB,MAAM,EACN,MAAM,EACN,WAAW,EACX,mBAAmB,EACnB,kBAAkB,GAClB,EAAE,kBAAkB,8CA8CpB"}
@@ -1,7 +1,7 @@
1
- export * from "./components/Map/DHIS2Map";
2
- export * from "./components/CircularProgressDashboard/CircularProgressIndicator";
3
- export * from "./components/ChartAnalytics/DHIS2Chart";
4
- export * from "./components/SingleValueContainer/SingleValueVisualizer";
5
- export * from "./components/DHIS2PivotTable/DHIS2PivotTable";
6
- export * from "./components/Visualization";
1
+ export * from "./components/Map/index.js";
2
+ export * from "./components/CircularProgressDashboard/index.js";
3
+ export * from "./components/ChartAnalytics/index.js";
4
+ export * from "./components/SingleValueContainer/index.js";
5
+ export * from "./components/DHIS2PivotTable/index.js";
6
+ export * from "./components/Visualization/index.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kEAAkE,CAAC;AACjF,cAAc,wCAAwC,CAAC;AACvD,cAAc,yDAAyD,CAAC;AACxE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iDAAiD,CAAC;AAChE,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@hisptz/dhis2-analytics",
3
- "version": "2.0.0-alpha.00",
3
+ "version": "2.0.0",
4
4
  "main": "./dist/index.js",
5
- "module": "./dist/index.mjs",
5
+ "module": "./dist/esm/index.js",
6
6
  "types": "./dist/types/index.d.ts",
7
7
  "typings": "./dist/types/index.d.ts",
8
8
  "sideEffects": false,
@@ -29,7 +29,7 @@
29
29
  "concurrently": "^8.2.2",
30
30
  "eslint": "^8.56.0",
31
31
  "lodash": "^4.17.21",
32
- "react": "^18.2.0",
32
+ "react": "^16.14.0",
33
33
  "react-error-boundary": "^4.0.12",
34
34
  "react-hook-form": "^7.43.9",
35
35
  "styled-jsx": "^5.1.2",
@@ -55,8 +55,8 @@
55
55
  "react-query": "^3.39.3",
56
56
  "react-spring": "^9.6.1",
57
57
  "screenfull": "^6.0.2",
58
- "@hisptz/dhis2-ui": "2.0.0-alpha.00",
59
- "@hisptz/dhis2-utils": "2.0.0-alpha.00"
58
+ "@hisptz/dhis2-ui": "2.0.0",
59
+ "@hisptz/dhis2-utils": "2.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@dhis2/app-runtime": "^3.10.2",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/ChartAnalytics/ChartAnalytics.stories.tsx"],"names":[],"mappings":"AAAA,SAAS,YAAY,8BAA8B;AAEnD,OAAO,gBAAgB;AACvB,OAAO,qBAAqB;AAC5B,OAAO,sBAAsB;AAC7B,OAAO,aAAa;AACpB,OAAO,4BAA4B;AAEnC,OAAO,gBAAgB;AAEvB,uBAAuB,UAAU;AAEjC,MAAM,OAAgC;AAAA,EACrC,WAAW;AAAA,EACX,OAAO;AACR;AAEA,IAAO,iCAAQ;AAIR,MAAM,UAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,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UACP,IAAI;AAAA,UACJ,QAAQ;AAAA,YACP,OAAO;AAAA,UACR;AAAA,UACA,OAAO;AAAA,UACP,OAAO;AAAA,YACN,MAAM;AAAA,YACN,WAAW;AAAA,YACX,eAAe;AAAA,UAChB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD","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"]}
@@ -1 +0,0 @@
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\";\nimport \"./styles/custom-highchart.css\";\nimport { ChartAnalyticsProps } from \"./types/props\";\n\nexport * from \"./services/export\";\nexport * from \"./types/props\";\nexport * from \"./components/DownloadMenu\";\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 +0,0 @@
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\";\nimport { ChartExportMenuItem } from \"../interfaces/menu\";\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"]}
@@ -1 +0,0 @@
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 +0,0 @@
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\";\nimport { ChartMenu } from \"./components/Menu\";\nimport { ChartExportMenuItem } from \"./interfaces/menu\";\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 +0,0 @@
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\";\nimport { ChartConfig, ChartType } from \"../types/props\";\nimport { getChartInstance, updateLayout } from \"../utils/chart\";\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"]}
@@ -1,3 +0,0 @@
1
- export * from './DHIS2Chart';
2
- //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/ChartAnalytics/index.ts"],"names":[],"mappings":"AAAA,cAAc","sourcesContent":["export * from \"./DHIS2Chart\";\n"]}
@@ -1 +0,0 @@
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,EACpD,iBAA8B;AAC1B,WAAO;AAAA,MACH,QAAQ;AAAA,QACJ,UAAU;AAAA,QACV,GAAG,MAAM,eAAe,EAAE;AAAA,MAC9B;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { PlotOptions } from \"highcharts\";\nimport { DHIS2ColumnChart } from \"./column\";\n\nexport class DHIS2BarChart extends DHIS2ColumnChart {\n\tgetHighchartsType(): string {\n\t\treturn \"bar\";\n\t}\n}\n\nexport class DHIS2StackedBarChart extends DHIS2BarChart {\n getPlotOptions(): PlotOptions {\n return {\n column: {\n stacking: \"normal\",\n ...super.getPlotOptions().column,\n },\n };\n }\n}\n"]}
@@ -1 +0,0 @@
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,EAC5D,iBAA8B;AAC5B,WAAO;AAAA,MACL,QAAQ;AAAA,QACN,UAAU;AAAA,QACV,GAAG,MAAM,eAAe,EAAE;AAAA,MAC5B;AAAA,IACF;AAAA,EACF;AACF","sourcesContent":["import { PlotOptions, SeriesOptionsType, XAxisOptions } from \"highcharts\";\nimport { getAllCategories, getPointSeries } from \"../utils/chart\";\nimport { DHIS2Chart } from \"./index\";\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 getPlotOptions(): PlotOptions {\n return {\n column: {\n stacking: \"normal\",\n ...super.getPlotOptions().column,\n },\n };\n }\n}\n\n\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/ChartAnalytics/models/index.ts"],"names":[],"mappings":"AAIO,MAAe,WAAW;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,IAAY,WAAsB,QAAqB;AAClE,SAAK,KAAK;AACV,SAAK,YAAY;AACjB,SAAK,SAAS;AAAA,EACf;AAAA,EAIA,iBAAgD;AAC/C,WAAO;AAAA,MACN,UAAU,KAAK;AAAA,MACf,UAAU;AAAA,MACV,MAAM,KAAK,kBAAkB;AAAA,MAC7B,QAAQ,KAAK,QAAQ;AAAA,MACrB,YAAY;AAAA,IACb;AAAA,EACD;AAAA,EAEA,aAAiC;AAChC,UAAM,UAAU;AAAA,MACf,OAAO,KAAK,SAAS;AAAA,MACrB,OAAO,KAAK,eAAe;AAAA,MAC3B,QAAQ,KAAK,QAAQ,UAAU;AAAA,QAC9B;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,QAAQ,KAAK,UAAU;AAAA,MACvB,aAAa,KAAK,eAAe;AAAA,MACjC,OAAO,EAAE,MAAM,GAAG;AAAA,MAClB,OAAO,KAAK,SAAS;AAAA,MACrB,WAAW,KAAK,aAAa;AAAA,MAC7B,QAAQ,EAAE,SAAS,KAAK;AAAA,MACxB,SAAS,EAAE,SAAS,MAAM;AAAA,IAC3B;AAEA,QAAI,YAAY,CAAC;AAEjB,QAAI,KAAK,QAAQ,oBAAoB;AACpC,kBAAY;AAAA,QACX,GAAI,OAAO,KAAK,QAAQ,uBAAuB,WAC5C,KAAK,QAAQ,sBAAsB,CAAC,IACpC,KAAK,QAAQ,mBAAmB,OAAO;AAAA,MAC3C;AAAA,IACD;AAEA,WAAO;AAAA,MACN,GAAG;AAAA,MACH,GAAG;AAAA,IACJ;AAAA,EACD;AAAA,EAQA,WAAsC;AACrC,WAAO;AAAA,MACN;AAAA,QACC,OAAO;AAAA,UACN,MAAM;AAAA,UACN,OAAO;AAAA,YACN,OAAO;AAAA,YACP,YAAY;AAAA,YACZ,UAAU;AAAA,UACX;AAAA,QACD;AAAA,QACA,QAAQ;AAAA,UACP,SAAS;AAAA,UACT,OAAO;AAAA,YACN,OAAO;AAAA,YACP,YAAY;AAAA,YACZ,UAAU;AAAA,UACX;AAAA,QACD;AAAA,QACA,WAAW;AAAA,UACV;AAAA,YACC,OAAO;AAAA,YACP,WAAW;AAAA,YACX,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,OAAO,EAAE,MAAM,GAAG;AAAA,UACnB;AAAA,UACA;AAAA,YACC,OAAO;AAAA,YACP,WAAW;AAAA,YACX,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,OAAO,EAAE,MAAM,GAAG;AAAA,UACnB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EAEA,eAA4C;AAC3C,UAAM,OAAO,KAAK,QAAQ,QAAQ;AAClC,WAAO;AAAA,MACN,UAAU,GAAG,IAAI;AAAA,MACjB,aAAa;AAAA,MACb,SAAS;AAAA,QACR,eAAe;AAAA,UACd,SAAS;AAAA,QACV;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD","sourcesContent":["import type { Analytics } from \"@hisptz/dhis2-utils\";\nimport HighCharts from \"highcharts\";\nimport { ChartConfig } from \"../types/props\";\n\nexport abstract class DHIS2Chart {\n\tid: string;\n\tanalytics: Analytics;\n\tconfig: ChartConfig;\n\n\tconstructor(id: string, analytics: Analytics, config: ChartConfig) {\n\t\tthis.id = id;\n\t\tthis.analytics = analytics;\n\t\tthis.config = config;\n\t}\n\n\tabstract getHighchartsType(): string;\n\n\tgetChartConfig(): HighCharts.ChartOptions & any {\n\t\treturn {\n\t\t\trenderTo: this.id,\n\t\t\tzoomType: \"xy\",\n\t\t\ttype: this.getHighchartsType(),\n\t\t\theight: this.config?.height,\n\t\t\tstyledMode: false,\n\t\t};\n\t}\n\n\tgetOptions(): HighCharts.Options {\n\t\tconst options = {\n\t\t\tyAxis: this.getYAxis(),\n\t\t\tchart: this.getChartConfig(),\n\t\t\tcolors: this.config?.colors ?? [\n\t\t\t\t\"#a8bf24\",\n\t\t\t\t\"#518cc3\",\n\t\t\t\t\"#d74554\",\n\t\t\t\t\"#ff9e21\",\n\t\t\t\t\"#968f8f\",\n\t\t\t\t\"#ba3ba1\",\n\t\t\t\t\"#ffda54\",\n\t\t\t\t\"#45beae\",\n\t\t\t\t\"#b98037\",\n\t\t\t\t\"#676767\",\n\t\t\t\t\"#6b2dd4\",\n\t\t\t\t\"#47792c\",\n\t\t\t\t\"#fcbdbd\",\n\t\t\t\t\"#830000\",\n\t\t\t\t\"#a5ffc0\",\n\t\t\t\t\"#000078\",\n\t\t\t\t\"#817c00\",\n\t\t\t\t\"#bdf023\",\n\t\t\t\t\"#fffac4\",\n\t\t\t],\n\t\t\tseries: this.getSeries(),\n\t\t\tplotOptions: this.getPlotOptions(),\n\t\t\ttitle: { text: \"\" },\n\t\t\txAxis: this.getXAxis(),\n\t\t\texporting: this.getExporting(),\n\t\t\tlegend: { enabled: true },\n\t\t\tcredits: { enabled: false },\n\t\t};\n\n\t\tlet overrides = {};\n\n\t\tif (this.config?.highChartOverrides) {\n\t\t\toverrides = {\n\t\t\t\t...(typeof this.config?.highChartOverrides === \"object\"\n\t\t\t\t\t? this.config?.highChartOverrides ?? {}\n\t\t\t\t\t: this.config?.highChartOverrides(options)),\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\t...options,\n\t\t\t...overrides,\n\t\t};\n\t}\n\n\tabstract getSeries(): HighCharts.SeriesOptionsType[];\n\n\tabstract getPlotOptions(): HighCharts.PlotOptions;\n\n\tabstract getXAxis(): HighCharts.XAxisOptions | undefined;\n\n\tgetYAxis(): HighCharts.YAxisOptions[] {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: {\n\t\t\t\t\ttext: \"\",\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\tfontWeight: \"normal\",\n\t\t\t\t\t\tfontSize: \"14px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tlabels: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\tfontWeight: \"normal\",\n\t\t\t\t\t\tfontSize: \"14px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tplotLines: [\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\tdashStyle: \"Solid\",\n\t\t\t\t\t\twidth: 2,\n\t\t\t\t\t\tzIndex: 1000,\n\t\t\t\t\t\tlabel: { text: \"\" },\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tcolor: \"#bbbbbb\",\n\t\t\t\t\t\tdashStyle: \"Solid\",\n\t\t\t\t\t\tzIndex: 1000,\n\t\t\t\t\t\twidth: 2,\n\t\t\t\t\t\tlabel: { text: \"\" },\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t];\n\t}\n\n\tgetExporting(): HighCharts.ExportingOptions {\n\t\tconst name = this.config?.name ?? \"chart\";\n\t\treturn {\n\t\t\tfilename: `${name}`,\n\t\t\tsourceWidth: 1200,\n\t\t\tbuttons: {\n\t\t\t\tcontextButton: {\n\t\t\t\t\tenabled: false,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/ChartAnalytics/models/line.ts"],"names":[],"mappings":"AACA,SAAQ,kBAAkB,sBAAqB;AAC/C,SAAQ,kBAAiB;AAElB,MAAM,uBAAuB,WAAW;AAAA,EAC7C,oBAA4B;AAC1B,WAAO;AAAA,EACT;AAAA,EAEA,iBAA8B;AAC5B,WAAO;AAAA,MACL,MAAM,CAAC;AAAA,IACT;AAAA,EACF;AAAA,EAEA,YAAiC;AAC/B,WAAO,eAAe,KAAK,WAAW,KAAK,QAAQ,MAAM;AAAA,EAC3D;AAAA,EAEA,WAAqC;AACnC,WAAO;AAAA,MACL,MAAM;AAAA,MACN,YAAY,iBAAiB,KAAK,WAAW,KAAK,MAAM;AAAA,MACxD,WAAW;AAAA,MACX,QAAQ;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,OAAO,EAAE,MAAM,GAAG;AAAA,IACpB;AAAA,EACF;AACF","sourcesContent":["import {PlotOptions, SeriesOptionsType, XAxisOptions} from \"highcharts\";\nimport {getAllCategories, getPointSeries} from \"../utils/chart\";\nimport {DHIS2Chart} from \"./index\";\n\nexport class DHIS2LineChart extends DHIS2Chart {\n getHighchartsType(): string {\n return \"line\";\n }\n\n getPlotOptions(): PlotOptions {\n return {\n line: {},\n };\n }\n\n getSeries(): SeriesOptionsType[] {\n return getPointSeries(this.analytics, this.config, \"line\");\n }\n\n getXAxis(): XAxisOptions | undefined {\n return {\n type: \"category\",\n categories: getAllCategories(this.analytics, this.config),\n crosshair: true,\n labels: {\n enabled: true,\n },\n title: { text: \"\" },\n };\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/ChartAnalytics/models/multi-series.ts"],"names":["row"],"mappings":"AACA,SAAQ,SAAS,YAAW;AAE5B,SAAQ,kBAAkB,+BAA8B;AACxD,SAAQ,kBAAiB;AAElB,MAAM,8BAA8B,WAAW;AAA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G,KAAK,IAAI,QAAQ,CAAC,IAAI,IAAI;AAAA,UACvC,GAAG,CAAC,CAAa,KAAK,CAAC;AAAA,QAC3B;AAEA,eAAO;AAAA,UACL,MAAM,UAAU;AAAA,UAChB,MAAM,aAAa,iBAAiB;AAAA,UACpC,MAAM;AAAA,UACN,OAAO,SAAS;AAAA,QAClB;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,WAAqC;AACnC,WAAO;AAAA,MACL,MAAM;AAAA,MACN,YAAY,iBAAiB,KAAK,WAAW,KAAK,MAAM;AAAA,MACxD,WAAW;AAAA,MACX,QAAQ;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,OAAO,EAAE,MAAM,GAAG;AAAA,IACpB;AAAA,EACF;AAAA,EAEA,WAA2B;AACzB,QAAI,QAAwB,CAAC;AAE7B,QAAI,KAAK,OAAO,aAAa,OAAO;AAClC,cAAQ,KAAK,OAAO,aAAa;AAAA,IACnC,OAAO;AACL,cAAQ,MAAM,SAAS;AAAA,IACzB;AAEA,QAAI,CAAC,KAAK,OAAO,aAAa,QAAQ;AACpC,aAAO;AAAA,IACT;AAEA,UAAM,EAAE,OAAO,QAAQ,MAAM,IAAI,KAAK,OAAO,aAAa,UAAU,CAAC;AAErE,WAAO;AAAA,MACL;AAAA,QACE,GAAG,MAAM,CAAC;AAAA,QACV,WAAW;AAAA,UACT,GAAI,MAAM,CAAC,EAAE,aAAa,CAAC;AAAA,UAC3B;AAAA,YACE,OAAO,QAAQ,SAAS;AAAA,YACxB,WAAW,QAAQ,aAAa;AAAA,YAChC;AAAA,YACA,OAAO,QAAQ,SAAS;AAAA,YACxB,QAAQ,QAAQ,UAAU;AAAA,YAC1B;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,MACA,GAAG,MAAM,MAAM,CAAC;AAAA,IAClB;AAAA,EACF;AACF","sourcesContent":["import {PlotOptions, SeriesOptionsType, XAxisOptions, YAxisOptions} from \"highcharts\";\nimport {compact, head} from \"lodash\";\nimport {MultiSeriesConfig} from \"../types/props\";\nimport {getAllCategories, getDimensionHeaderIndex} from \"../utils/chart\";\nimport {DHIS2Chart} from \"./index\";\n\nexport class DHIS2MultiSeriesChart extends DHIS2Chart {\n getHighchartsType(): string {\n return \"\";\n }\n\n getPlotOptions(): PlotOptions {\n return {\n column: {},\n line: {},\n };\n }\n\n getSeries(): SeriesOptionsType[] {\n const analytics = this.analytics;\n const config = this.config;\n\n const categoryDimension = head(config.layout.category);\n const seriesConfig: MultiSeriesConfig | undefined = this.config.multiSeries;\n\n const categoryIndex = getDimensionHeaderIndex(analytics.headers ?? [], categoryDimension ?? \"\");\n const seriesIndex = getDimensionHeaderIndex(analytics.headers ?? [], head(config.layout.series) ?? \"\");\n const valueIndex = getDimensionHeaderIndex(analytics.headers ?? [], \"value\");\n\n if (!categoryDimension) {\n throw new Error(\"At least one category dimension is required\");\n }\n\n if (!seriesConfig) {\n throw new Error(\"MultiSeries config is required for chart type multi-series\");\n }\n\n return compact(\n seriesConfig?.series?.map(({ id, as, cumulative, yAxis }) => {\n const dataItem = analytics.metaData?.items[id as any];\n const categoryItems = analytics.metaData?.dimensions[categoryDimension as \"dx\" | \"ou\" | \"pe\"];\n\n const data = categoryItems?.map((item: string) => {\n const row = analytics.rows?.find((row: any) => row[categoryIndex] === item && row[seriesIndex] === id);\n return row?.[valueIndex] ? parseFloat(row?.[valueIndex]) : 0;\n });\n\n let cumulativeData: number[] = [];\n\n if (cumulative) {\n cumulativeData =\n data?.reduce((acc, curr, index) => {\n if (index === 0) {\n return [...acc, curr];\n }\n return [...acc, acc[index - 1] + curr];\n }, [] as number[]) ?? [];\n }\n\n return {\n name: dataItem?.name,\n data: cumulative ? cumulativeData : data,\n type: as,\n yAxis: yAxis ?? 0,\n };\n })\n ) as SeriesOptionsType[];\n }\n\n getXAxis(): XAxisOptions | undefined {\n return {\n type: \"category\",\n categories: getAllCategories(this.analytics, this.config),\n crosshair: true,\n labels: {\n enabled: true,\n },\n title: { text: \"\" },\n };\n }\n\n getYAxis(): YAxisOptions[] {\n let yAxes: YAxisOptions[] = [];\n\n if (this.config.multiSeries?.yAxes) {\n yAxes = this.config.multiSeries?.yAxes;\n } else {\n yAxes = super.getYAxis();\n }\n\n if (!this.config.multiSeries?.target) {\n return yAxes;\n }\n\n const { value, styles, label } = this.config.multiSeries?.target ?? {};\n\n return [\n {\n ...yAxes[0],\n plotLines: [\n ...(yAxes[0].plotLines ?? []),\n {\n color: styles?.color ?? \"#00FF00\",\n dashStyle: styles?.dashStyle ?? \"Solid\",\n value,\n width: styles?.width ?? 2,\n zIndex: styles?.zIndex ?? 1000,\n label: label,\n },\n ],\n },\n ...yAxes.slice(1),\n ];\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/ChartAnalytics/models/pie.ts"],"names":["row"],"mappings":"AACA,SAAQ,YAAW;AACnB,SAAQ,kBAAiB;AAElB,MAAM,sBAAsB,WAAW;AAAA,EAC5C,oBAA4B;AAC1B,WAAO;AAAA,EACT;AAAA,EAEA,iBAA8B;AAC5B,WAAO;AAAA,MACL,KAAK;AAAA,QACH,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,YAAY;AAAA,UACV,SAAS;AAAA,UACT,QAAQ;AAAA,QACV;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAiC;AAC/B,UAAM,YAAY,KAAK;AACvB,UAAM,SAAS,KAAK;AACpB,UAAM,kBAAkB,KAAK,OAAO,OAAO,MAAM;AACjD,UAAM,cAAc,WAAW,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,eAAe,KAAK;AACxF,UAAM,aAAa,WAAW,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,OAAO,KAAK;AAE/E,QAAI,CAAC,iBAAiB;AACpB,YAAM,IAAI,MAAM,wCAAwC;AAAA,IAC1D;AACA,UAAM,eAAe,UAAU,UAAU,aAAa,eAAqC;AAE3F,WAAO;AAAA,MACL;AAAA,QACE,IAAI,mBAAmB;AAAA,QACvB,MAAM,UAAU,UAAU,QAAQ,eAAsB,GAAG,QAAQ;AAAA,QACnE,MAAM,cAAc,IAAI,CAAC,UAAkB;AACzC,gBAAM,MAAM,WAAW,MAAM,KAAK,CAACA,SAAaA,KAAI,WAAW,MAAM,KAAK;AAE1E,iBAAO;AAAA,YACL,MAAM,UAAU,UAAU,QAAQ,KAAY,GAAG;AAAA,YACjD,GAAG,MAAM,UAAU,IAAI,WAAW,MAAM,UAAU,KAAK,EAAE,IAAI;AAAA,UAC/D;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAqC;AACnC,WAAO;AAAA,EACT;AACF","sourcesContent":["import {PlotOptions, SeriesOptionsType, XAxisOptions} from \"highcharts\";\nimport {head} from \"lodash\";\nimport {DHIS2Chart} from \"./index\";\n\nexport class DHIS2PieChart extends DHIS2Chart {\n getHighchartsType(): string {\n return \"pie\";\n }\n\n getPlotOptions(): PlotOptions {\n return {\n pie: {\n allowPointSelect: true,\n cursor: \"pointer\",\n dataLabels: {\n enabled: true,\n format: \"<b>{point.name}</b>: {point.percentage:.1f} %\",\n },\n },\n };\n }\n\n getSeries(): SeriesOptionsType[] {\n const analytics = this.analytics;\n const config = this.config;\n const seriesDimension = head(config.layout.series);\n const seriesIndex = analytics?.headers?.findIndex((h) => h.name === seriesDimension) ?? -1;\n const valueIndex = analytics?.headers?.findIndex((h) => h.name === \"value\") ?? -1;\n\n if (!seriesDimension) {\n throw new Error(\"Pie chart must have a series dimension\");\n }\n const seriesValues = analytics.metaData?.dimensions?.[seriesDimension as \"dx\" | \"ou\" | \"pe\"];\n\n return [\n {\n id: seriesDimension ?? \"\",\n name: analytics.metaData?.items?.[seriesDimension as any]?.name ?? \"\",\n data: seriesValues?.map((value: string) => {\n const row = analytics?.rows?.find((row: any) => row[seriesIndex] === value);\n\n return {\n name: analytics.metaData?.items?.[value as any]?.name,\n y: row?.[valueIndex] ? parseFloat(row?.[valueIndex] ?? \"\") : 0,\n };\n }),\n } as SeriesOptionsType,\n ];\n }\n\n getXAxis(): XAxisOptions | undefined {\n return undefined;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/ChartAnalytics/services/export.ts"],"names":[],"mappings":"AAEA,OAAO,yBAAyB;AAChC,OAAO,sBAAsB;AAC7B,OAAO,0BAA0B;AAE1B,SAAS,uBAAuB,YAA+B;AACrE,mBAAiB,UAAU;AAC3B,sBAAoB,UAAU;AAC9B,uBAAqB,UAAU;AAChC;AAEO,SAAS,iBAAiB,UAAqC,SAA8B;AAClG,YAAU,OAAO,WAAW,OAAO;AACrC;AAEO,SAAS,cAAc,UAAqC,SAA8B;AAC/F,YAAU,MAAM,YAAY,EAAE,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC;AACxE;AAEO,SAAS,cAAc,UAAqC,SAA8B;AAC/F,YAAU,MAAM,YAAY;AAC9B;AAEO,MAAM,kBAAkB,CAAC,UAAqC,MAAkC,YAAiC;AACtI,YAAU,MAAM,YAAY,EAAE,MAAM,SAAS,IAAI,GAAG,GAAG,WAAW,CAAC,CAAC;AACtE;AAEO,MAAM,gBAAgB,CAAC,UAAqC,SAAkB;AACnF,QAAM,UAAU,UAAU,MAAM;AAChC,YAAU,OAAO,OAAO;AAAA,IACtB,GAAG;AAAA,IACH,WAAW;AAAA,MACT,GAAG,SAAS;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,EACF,CAAC;AACH","sourcesContent":["import Highcharts from \"highcharts\";\nimport HighchartsReact from \"highcharts-react-official\";\nimport HighChartsExportCSV from \"highcharts/modules/export-data\";\nimport HighChartsExport from \"highcharts/modules/exporting\";\nimport HighChartsFullScreen from \"highcharts/modules/full-screen\";\n\nexport function setupHighchartsModules(highcharts: typeof Highcharts) {\n\tHighChartsExport(highcharts);\n\tHighChartsExportCSV(highcharts);\n\tHighChartsFullScreen(highcharts);\n}\n\nexport function onFullScreenView(chartRef: HighchartsReact.RefObject, options?: Highcharts.Options) {\n chartRef?.chart?.fullscreen.toggle();\n}\n\nexport function onPDFDownload(chartRef: HighchartsReact.RefObject, options?: Highcharts.Options) {\n chartRef?.chart.exportChart({ type: \"application/pdf\" }, options ?? {});\n}\n\nexport function onCSVDownload(chartRef: HighchartsReact.RefObject, options?: Highcharts.Options) {\n chartRef?.chart.downloadCSV();\n}\n\nexport const onImageDownload = (chartRef: HighchartsReact.RefObject, type: \"png\" | \"svg+xml\" | \"jpeg\", options?: Highcharts.Options) => {\n chartRef?.chart.exportChart({ type: `image/${type}` }, options ?? {});\n};\n\nexport const onViewAsTable = (chartRef: HighchartsReact.RefObject, show: boolean) => {\n const options = chartRef?.chart.options;\n chartRef?.chart?.update({\n ...options,\n exporting: {\n ...options?.exporting,\n showTable: show,\n },\n });\n};\n"]}
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=props.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/ChartAnalytics/utils/chart.ts"],"names":["header","row"],"mappings":"AAKA,SAAS,SAAS,MAAM,WAAW,MAAM,SAAS,WAAW;AAE7D,SAAS,kBAAkB,+BAA+B;AAC1D,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAE9B,SAAS,eAAe,4BAA4B;AAE7C,SAAS,wBACf,SACA,MACS;AACT,SAAO,UAAU,SAAS,EAAE,KAAK,CAAC;AACnC;AAEO,SAAS,eACf,WACA,QACA,gBACC;AACD,QAAM,SAAmB,OAAO,OAAO;AAEvC,SAAO,OAAO,IAAI,CAAC,eAAuB;AACzC,UAAM,SAAS,WAAW,SAAS;AAAA,MAClC,CAACA,YAAgBA,QAAO,SAAS;AAAA,IAClC;AACA,QAAI,CAAC,QAAQ;AACZ,aAAO;AAAA,IACR;AACA,QAAI,WAAW,UAAU;AACxB,aAAO,gBAAgB,WAAW,QAAQ,QAAQ,cAAc;AAAA,IACjE;AAAA,EACD,C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,aAAO,IAAI,wBAAwB,IAAI,WAAW,MAAM;AAAA,IACzD,KAAK;AACJ,aAAO,IAAI,cAAc,IAAI,WAAW,MAAM;AAAA,IAC/C,KAAK;AACJ,aAAO,IAAI,eAAe,IAAI,WAAW,MAAM;AAAA,IAChD,KAAK;AACJ,aAAO,IAAI,sBAAsB,IAAI,WAAW,MAAM;AAAA,IACvD;AACC,YAAM,IAAI,MAAM,2BAA2B,OAAO,IAAI,EAAE;AAAA,EAC1D;AACD","sourcesContent":["import type {\n\tAnalytics,\n\tAnalyticsHeader,\n\tAnalyticsMetadata,\n} from \"@hisptz/dhis2-utils\";\nimport { compact, find, findIndex, head, isEmpty, set } from \"lodash\";\nimport { DHIS2Chart } from \"../models\";\nimport { DHIS2ColumnChart, DHIS2StackedColumnChart } from \"../models/column\";\nimport { DHIS2LineChart } from \"../models/line\";\nimport { DHIS2MultiSeriesChart } from \"../models/multi-series\";\nimport { DHIS2PieChart } from \"../models/pie\";\nimport { ChartConfig, ChartType } from \"../types/props\";\nimport { DHIS2BarChart, DHIS2StackedBarChart } from \"../models/bar\";\n\nexport function getDimensionHeaderIndex(\n\theaders: AnalyticsHeader[],\n\tname: string,\n): number {\n\treturn findIndex(headers, { name });\n}\n\nexport function getPointSeries(\n\tanalytics: Analytics,\n\tconfig: ChartConfig,\n\thighchartsType: string,\n) {\n\tconst series: string[] = config.layout.series;\n\n\treturn series.map((seriesName: string) => {\n\t\tconst header = analytics?.headers?.find(\n\t\t\t(header: any) => header.name === seriesName,\n\t\t);\n\t\tif (!header) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (analytics?.metaData) {\n\t\t\treturn getColumnSeries(analytics, header, config, highchartsType);\n\t\t}\n\t})[0];\n}\n\nexport function getColumnSeries(\n\tanalytics: Analytics,\n\theader: AnalyticsHeader,\n\tconfig: ChartConfig,\n\thighchartsType: string,\n): any {\n\tconst headerIndex = analytics?.headers?.findIndex(\n\t\t(h: { name: any }) => header.name === h.name,\n\t);\n\tconst valueIndex = analytics?.headers?.findIndex(\n\t\t(h: { name: string }) => h.name === \"value\",\n\t);\n\n\tconst colors = config.colors ?? [];\n\n\tconst { items, dimensions } = analytics?.metaData ?? {};\n\tconst categoriesDimension = config.layout.category;\n\n\tconst seriesDimensionValues: string[] =\n\t\tdimensions?.[header.name as \"dx\" | \"ou\" | \"pe\"] ?? [];\n\n\treturn head(\n\t\tcategoriesDimension?.map((categoryDimension: string) => {\n\t\t\tconst categories: string[] = dimensions?.[\n\t\t\t\tcategoryDimension as \"dx\" | \"ou\" | \"pe\"\n\t\t\t] as any;\n\t\t\tconst categoryDimensionIndex = analytics?.headers?.findIndex(\n\t\t\t\t(h: { name: string }) => h.name === categoryDimension,\n\t\t\t);\n\t\t\treturn seriesDimensionValues?.map(\n\t\t\t\t(seriesDimensionValue: string, index) => {\n\t\t\t\t\tconst data = categories?.map((category: string) => {\n\t\t\t\t\t\tconst row = find(\n\t\t\t\t\t\t\tanalytics?.rows,\n\t\t\t\t\t\t\t(row: any) =>\n\t\t\t\t\t\t\t\trow[headerIndex ?? -1] ===\n\t\t\t\t\t\t\t\t\tseriesDimensionValue &&\n\t\t\t\t\t\t\t\trow[categoryDimensionIndex ?? -1] === category,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn row?.[valueIndex ?? -1]\n\t\t\t\t\t\t\t? parseFloat(row?.[valueIndex ?? -1])\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t});\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: items?.[seriesDimensionValue as any]?.name,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\ttype: highchartsType,\n\t\t\t\t\t\tcolor: colors[index % colors.length],\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t);\n\t\t}),\n\t);\n}\n\nfunction getCategories(\n\t{ name }: AnalyticsHeader,\n\t{ items, dimensions }: AnalyticsMetadata,\n): string[] {\n\tconst categories: string[] = dimensions?.[\n\t\tname as \"dx\" | \"ou\" | \"pe\"\n\t] as any;\n\n\treturn categories?.map((category: string) => {\n\t\treturn items[category as any]?.name ?? \"\";\n\t}) as unknown as string[];\n}\n\nexport function getAllCategories(\n\tanalytics: Analytics,\n\tconfig: ChartConfig,\n): string[] {\n\tconst categories = config.layout.category;\n\n\treturn compact(\n\t\tcategories?.map((category: string) => {\n\t\t\tconst header = analytics?.headers?.find(\n\t\t\t\t(header: any) => header.name === category,\n\t\t\t);\n\t\t\tif (!header) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tif (analytics?.metaData) {\n\t\t\t\treturn getCategories(header, analytics?.metaData);\n\t\t\t}\n\t\t}),\n\t)[0];\n}\n\nexport function updateLayout(\n\tconfig: ChartConfig,\n\t{ type }: { type: ChartType },\n) {\n\tif (type === config.type) {\n\t\treturn config.layout;\n\t}\n\n\tconst updatedLayout = { ...config.layout };\n\n\tswitch (type) {\n\t\tcase \"pie\":\n\t\t\tset(updatedLayout, \"category\", []);\n\t\t\tif (isEmpty(updatedLayout.series)) {\n\t\t\t\tif (!isEmpty(config.layout.category)) {\n\t\t\t\t\tset(updatedLayout, \"series\", [\n\t\t\t\t\t\thead(config.layout.category),\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Invalid layout for pie chart\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (updatedLayout.series.length > 1) {\n\t\t\t\tset(updatedLayout, \"series\", [head(updatedLayout.series)]);\n\t\t\t}\n\t}\n\n\treturn updatedLayout;\n}\n\nexport function getChartInstance(\n\tid: string,\n\tanalytics: Analytics,\n\tconfig: ChartConfig,\n): DHIS2Chart {\n\tswitch (config.type) {\n\t\tcase \"column\":\n\t\t\treturn new DHIS2ColumnChart(id, analytics, config);\n\t\tcase \"bar\":\n\t\t\treturn new DHIS2BarChart(id, analytics, config);\n\t\tcase \"stacked-bar\":\n\t\t\treturn new DHIS2StackedBarChart(id, analytics, config);\n\t\tcase \"stacked-column\":\n\t\t\treturn new DHIS2StackedColumnChart(id, analytics, config);\n\t\tcase \"pie\":\n\t\t\treturn new DHIS2PieChart(id, analytics, config);\n\t\tcase \"line\":\n\t\t\treturn new DHIS2LineChart(id, analytics, config);\n\t\tcase \"multi-series\":\n\t\t\treturn new DHIS2MultiSeriesChart(id, analytics, config);\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported chart type: ${config.type}`);\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/CircularProgressDashboard/CircularProgressIndicator.tsx"],"names":[],"mappings":"AAoCI,cAUC,YAVD;AApCJ,SAAS,cAAc;AACvB,SAAgB,eAAe;AAC/B,SAAS,uCAAuC;AAGhD,cAAc;AAEP,SAAS,2BAA2B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAA+C;AAC9C,QAAM,gCAAgC,QAAQ,MAAM;AACnD,WAAO,UAAU,SACd,QACA,KAAK,OAAQ,aAAa,MAAM,eAAe,KAAM,GAAG;AAAA,EAC5D,GAAG,CAAC,WAAW,aAAa,KAAK,CAAC;AAClC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAO;AAAA,QACN,iBAAiB;AAAA,QACjB,OAAO;AAAA,MACR;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACA,QAAQ;AAAA,YACP,MAAM;AAAA,cACL,QAAQ,aAAa,SAAS,OAAO;AAAA,YACtC;AAAA,UACD;AAAA,UACA,aAAa;AAAA,UACb,OAAO;AAAA,UAEP;AAAA,YAAC;AAAA;AAAA,cACA,OAAO;AAAA,gBACN,GAAI,aAAa,CAAC;AAAA,gBAClB,UACC,WAAW,YAAY,OAAO,SAAS,WACpC,MAAO,OACP;AAAA,gBACJ,WAAW;AAAA,cACZ;AAAA,cAEA;AAAA,gBAAC;AAAA;AAAA,kBACA,OAAO;AAAA,oBACN,OACC,WAAW,SACX,aAAa,SACb,OAAO;AAAA,kBACT;AAAA,kBAEC;AAAA;AAAA,oBAA8B;AAAA;AAAA;AAAA,cAChC;AAAA;AAAA,UACD;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;AAEO,MAAM,4BAA4B","sourcesContent":["import { colors } from \"@dhis2/ui\";\nimport React, { useMemo } from \"react\";\nimport { CircularProgressbarWithChildren } from \"react-circular-progressbar\";\nimport { CircularDashboardProps } from \"./types/props\";\n\nexport * from \"./types/props\";\n\nexport function CircularProgressVisualizer({\n\tnumerator,\n\tsize,\n\tdenominator,\n\tvalue,\n\ttextStyle,\n\tstrokeStyle,\n}: CircularDashboardProps): React.ReactElement {\n\tconst filledSectionFieldsPercentage = useMemo(() => {\n\t\treturn value !== undefined\n\t\t\t? value\n\t\t\t: Math.floor(((numerator ?? 0) / (denominator ?? 1)) * 100);\n\t}, [numerator, denominator, value]);\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\twidth: size,\n\t\t\t}}\n\t\t>\n\t\t\t<CircularProgressbarWithChildren\n\t\t\t\tstyles={{\n\t\t\t\t\tpath: {\n\t\t\t\t\t\tstroke: strokeStyle?.color ?? colors.blue700,\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\tstrokeWidth={7}\n\t\t\t\tvalue={filledSectionFieldsPercentage}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t...(textStyle ?? {}),\n\t\t\t\t\t\tfontSize:\n\t\t\t\t\t\t\ttextStyle?.fontSize ?? typeof size === \"number\"\n\t\t\t\t\t\t\t\t? 0.3 * (size as number)\n\t\t\t\t\t\t\t\t: \"100%\",\n\t\t\t\t\t\tmarginTop: -11,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<strong\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\ttextStyle?.color ??\n\t\t\t\t\t\t\t\tstrokeStyle?.color ??\n\t\t\t\t\t\t\t\tcolors.blue700,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{filledSectionFieldsPercentage}%\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t</CircularProgressbarWithChildren>\n\t\t</div>\n\t);\n}\n\nexport const CircularProgressDashboard = CircularProgressVisualizer;\n"]}
@@ -1 +0,0 @@
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"]}
@@ -1,4 +0,0 @@
1
- export * from './CircularProgressIndicator';
2
- export * from './types/props';
3
- //# sourceMappingURL=out.js.map
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/CircularProgressDashboard/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc","sourcesContent":["export * from \"./CircularProgressIndicator\";\nexport * from \"./types/props\";\n"]}
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=props.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/DHIS2PivotTable/DHIS2PivotTable.tsx"],"names":[],"mappings":"AAwDG,SACC,KADD;AAvDH,SAAS,6BAA6B;AACtC,SAAgB,eAAe;AAC/B,SAAS,qCAAqC;AAC9C,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AAsC9B,SAAS,gBAAgB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AACD,GAAyB;AACxB,QAAM,SAAS;AAAA,IACd,MAAM,IAAI,sBAAsB,EAAE,WAAW,OAAO,CAAC;AAAA,IACrD,CAAC,WAAW,MAAM;AAAA,EACnB;AAEA,SACC,oBAAC,iCAA8B,QAC9B,+BAAC,cAAW,YACX;AAAA,wBAAC,gBAAa;AAAA,IACd,oBAAC,wBAAqB;AAAA,KACvB,GACD;AAEF","sourcesContent":["import { Analytics, LegendSet } from \"@hisptz/dhis2-utils\";\nimport { DHIS2PivotTableEngine } from \"./services/engine\";\nimport React, { useMemo } from \"react\";\nimport { DHIS2PivotTableEngineProvider } from \"./state/engine\";\nimport { PivotTable } from \"./components/Table\";\nimport { TableHeaders } from \"./components/TableHeaders\";\nimport { CustomPivotTableBody } from \"./components/TableBody\";\nimport { DHIS2Dimension } from \"./interfaces\";\nimport { DataTableProps } from \"@dhis2/ui\";\n\nexport interface DHIS2PivotTableOptions {\n\tlegendSets?: LegendSet[];\n\thideEmptyColumns?: boolean;\n\thideEmptyRows?: boolean;\n\tshowRowTotals?: boolean;\n\tshowColumnTotals?: boolean;\n\tshowRowSubtotals?: boolean;\n\tshowColumnSubtotals?: boolean;\n\tfixColumnHeaders?: boolean;\n\tfixRowHeaders?: boolean;\n}\n\nexport interface DHIS2PivotTableProps {\n\tanalytics: Analytics;\n\ttableProps?: DataTableProps;\n\tconfig: {\n\t\tlayout: {\n\t\t\tcolumns: {\n\t\t\t\tdimension: DHIS2Dimension;\n\t\t\t\tlabel?: string;\n\t\t\t}[];\n\t\t\trows: {\n\t\t\t\tdimension: DHIS2Dimension;\n\t\t\t\tlabel?: string;\n\t\t\t}[];\n\t\t\tfilter?: {\n\t\t\t\tdimension: DHIS2Dimension;\n\t\t\t\tlabel?: string;\n\t\t\t}[];\n\t\t};\n\t\toptions?: DHIS2PivotTableOptions;\n\t};\n}\n\nexport function DHIS2PivotTable({\n\tanalytics,\n\tconfig,\n\ttableProps,\n}: DHIS2PivotTableProps) {\n\tconst engine = useMemo(\n\t\t() => new DHIS2PivotTableEngine({ analytics, config }),\n\t\t[analytics, config],\n\t);\n\n\treturn (\n\t\t<DHIS2PivotTableEngineProvider engine={engine}>\n\t\t\t<PivotTable tableProps={tableProps}>\n\t\t\t\t<TableHeaders />\n\t\t\t\t<CustomPivotTableBody />\n\t\t\t</PivotTable>\n\t\t</DHIS2PivotTableEngineProvider>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/DHIS2PivotTable/DHIS2PivotTable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB;AAEvB,SAAS,uBAAuB;AAEhC,MAAM,OAAqC;AAAA,EAC1C,OAAO;AAAA,EACP,WAAW;AACZ;AAEA,IAAO,kCAAQ;AAGR,MAAM,UAAiB;AAAA,EAC7B,MAAM;AACP;AACA,QAAQ,OAAO;AAAA,EACd,WAAW;AAAA,EACX,QAAQ;AAAA,IACP,QAAQ;AAAA,MACP,SAAS;AAAA,QACR,EAAE,WAAW,KAAK;AAAA,QAClB,EAAE,WAAW,MAAM,OAAO,SAAS;AAAA,MACpC;AAAA,MACA,MAAM,CAAC,EAAE,WAAW,MAAM,OAAO,WAAW,CAAC;AAAA,MAC7C,QAAQ,CAAC;AAAA,IACV;AAAA,IACA,SAAS,CAAC;AAAA,EACX;AAAA,EACA,YAAY,CAAC;AACd","sourcesContent":["import simpleData from \"../../shared/resources/simple-data.json\";\nimport { Meta, StoryObj } from \"@storybook/react\";\nimport { DHIS2PivotTable } from \"./DHIS2PivotTable\";\n\nconst meta: Meta<typeof DHIS2PivotTable> = {\n\ttitle: \"DHIS2 Pivot Table\",\n\tcomponent: DHIS2PivotTable,\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof DHIS2PivotTable>;\nexport const Default: Story = {\n\tname: \"Default\",\n};\nDefault.args = {\n\tanalytics: simpleData as any,\n\tconfig: {\n\t\tlayout: {\n\t\t\tcolumns: [\n\t\t\t\t{ dimension: \"ou\" },\n\t\t\t\t{ dimension: \"pe\", label: \"Period\" },\n\t\t\t],\n\t\t\trows: [{ dimension: \"dx\", label: \"Services\" }],\n\t\t\tfilter: [],\n\t\t},\n\t\toptions: {},\n\t},\n\ttableProps: {},\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/DHIS2PivotTable/components/Table/index.tsx"],"names":[],"mappings":"AAWQ;AAVR,SAAS,iBAAiC;AASnC,SAAS,WAAW,EAAE,YAAY,SAAS,GAAoB;AACrE,SAAO,oBAAC,aAAW,GAAI,cAAc,CAAC,GAAK,UAAS;AACrD","sourcesContent":["import React from \"react\";\nimport { DataTable, DataTableProps } from \"@dhis2/ui\";\n\nexport type PivotTableLayoutProps = DataTableProps;\n\nexport interface PivotTableProps {\n\tchildren: React.ReactNode;\n\ttableProps?: DataTableProps;\n}\n\nexport function PivotTable({ tableProps, children }: PivotTableProps) {\n\treturn <DataTable {...(tableProps ?? {})}>{children}</DataTable>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/DHIS2PivotTable/components/TableBody/index.tsx"],"names":["Fragment","mapper"],"mappings":"AA4BE,mBAEE,KAwCE,YA1CJ;AA3BF,SAAS,SAAS,aAAa;AAC/B,SAAS,iCAAiC;AAC1C,SAAS,eAAe,cAAc,iBAAiB;AACvD,SAAgB,YAAAA,iBAA2B;AAE3C,OAAO,aAAa;AACpB,SAAS,sBAAsB;AAG/B,SAAS,gBAAgB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACD,GAIG;AACF,QAAM,SAAS,0BAA0B;AAEzC,QAAM,gBAAgB,QAAQ;AAC9B,QAAM,iBAAiB,eAAe,IAAI,CAAC,SAAS;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,IACH,CAAC,SAAS,GAAG,KAAK;AAAA,EACnB,EAAE;AACF,SACC,gCACE,0BAAgB,IAAI,CAACC,YACrB;AAAA,IAAC;AAAA;AAAA,MAEA,OAAM;AAAA,MACN,UAAQ;AAAA,MAEP,kBAAQ,SAASA,OAAM,KAAK;AAAA;AAAA,IAJxB,GAAG,OAAO,OAAOA,OAAM,EAAE,KAAK,GAAG,CAAC;AAAA,EAKxC,CACA,GACF;AAEF;AAEA,SAAS,YAAY;AAAA,EACpB;AAAA,EACA;AAAA,EACA,QAAQ,EAAE,MAAM,SAAS,QAAQ,WAAW,cAAc;AAC3D,GAU8B;AAC7B,QAAM,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,eAAe;AAE5C,QAAM,UAA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;AAAA,EACR;AAEA,SACC,oBAAC,aACA;AAAA,IAAC;AAAA;AAAA,MACA,KAAK,KAAK,CAAC;AAAA,MACX,OAAO;AAAA,MACP,QAAQ,EAAE,MAAM,SAAS,cAAc;AAAA;AAAA,EACxC,GACD;AAEF","sourcesContent":["import { Header } from \"../../services/engine\";\nimport { isEmpty, slice } from \"lodash\";\nimport { useCustomPivotTableEngine } from \"../../state/engine\";\nimport { DataTableCell, DataTableRow, TableBody } from \"@dhis2/ui\";\nimport React, { Fragment, ReactNode } from \"react\";\nimport { AnalyticsItem } from \"@hisptz/dhis2-utils\";\nimport classes from \"./TableBody.module.css\";\nimport { useElementSize } from \"usehooks-ts\";\nimport { DHIS2Dimension } from \"../../interfaces\";\n\nfunction DataRowRenderer({\n\tmapper,\n\titem,\n\tdimension,\n}: {\n\tmapper?: { [key: string]: any };\n\titem: AnalyticsItem;\n\tdimension: DHIS2Dimension;\n}) {\n\tconst engine = useCustomPivotTableEngine();\n\n\tconst columnMappers = engine?.columnMap;\n\tconst completeMapper = columnMappers?.map((map) => ({\n\t\t...map,\n\t\t...mapper,\n\t\t[dimension]: item.uid,\n\t}));\n\treturn (\n\t\t<>\n\t\t\t{completeMapper?.map((mapper) => (\n\t\t\t\t<DataTableCell\n\t\t\t\t\tkey={`${Object.values(mapper).join(\"-\")}-value`}\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tbordered\n\t\t\t\t>\n\t\t\t\t\t{engine?.getValue(mapper) ?? \"\"}\n\t\t\t\t</DataTableCell>\n\t\t\t))}\n\t\t</>\n\t);\n}\n\nfunction RowRenderer({\n\trow,\n\tindex,\n\tconfig: { rows, columns, mapper, prevWidth, fixRowHeaders },\n}: {\n\trow: Header;\n\tindex: number;\n\tconfig: {\n\t\trows: Header[];\n\t\tcolumns?: Header[];\n\t\tmapper?: { [key: string]: string | undefined };\n\t\tprevWidth?: number;\n\t\tfixRowHeaders?: boolean;\n\t};\n}): React.ReactElement | null {\n\tconst [cellRef, { width }] = useElementSize();\n\n\tconst rowSpan = slice(rows, index + 1).reduce((acc, column) => {\n\t\treturn acc * (column.items?.length ?? 1);\n\t}, 1);\n\tconst hasSubRows = !isEmpty(rows[index + 1]);\n\tconst nextRow = rows[index + 1];\n\n\treturn (\n\t\t<>\n\t\t\t{row?.items?.map((item) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Fragment key={`${item.name}-${row.dimension}-fragment`}>\n\t\t\t\t\t\t<DataTableRow key={`${item.name}-${row.dimension}-row`}>\n\t\t\t\t\t\t\t<DataTableCell\n\t\t\t\t\t\t\t\t/*\n // @ts-ignore */\n\t\t\t\t\t\t\t\tref={cellRef}\n\t\t\t\t\t\t\t\tfixed={fixRowHeaders}\n\t\t\t\t\t\t\t\tleft={`${prevWidth}px` as unknown as boolean}\n\t\t\t\t\t\t\t\tclassName={classes[\"header-cell\"]}\n\t\t\t\t\t\t\t\ttag=\"th\"\n\t\t\t\t\t\t\t\tbordered\n\t\t\t\t\t\t\t\trowSpan={(\n\t\t\t\t\t\t\t\t\trowSpan + (hasSubRows ? 1 : 0)\n\t\t\t\t\t\t\t\t).toString()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{item.name as unknown as string | ReactNode}\n\t\t\t\t\t\t\t</DataTableCell>\n\t\t\t\t\t\t\t{!hasSubRows ? (\n\t\t\t\t\t\t\t\t<DataRowRenderer\n\t\t\t\t\t\t\t\t\tdimension={row.dimension}\n\t\t\t\t\t\t\t\t\tmapper={mapper}\n\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</DataTableRow>\n\t\t\t\t\t\t{hasSubRows ? (\n\t\t\t\t\t\t\t<RowRenderer\n\t\t\t\t\t\t\t\trow={nextRow}\n\t\t\t\t\t\t\t\tindex={index + 1}\n\t\t\t\t\t\t\t\tconfig={{\n\t\t\t\t\t\t\t\t\trows,\n\t\t\t\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\t\t\t\tprevWidth: width,\n\t\t\t\t\t\t\t\t\tmapper: {\n\t\t\t\t\t\t\t\t\t\t...mapper,\n\t\t\t\t\t\t\t\t\t\t[row.dimension]:\n\t\t\t\t\t\t\t\t\t\t\titem.uid as unknown as string,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</Fragment>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n}\n\nexport function CustomPivotTableBody() {\n\tconst engine = useCustomPivotTableEngine();\n\tconst rows = engine?.rowHeaders;\n\tconst columns = engine?.columnHeaders;\n\tconst fixRowHeaders = engine?.fixRowHeaders;\n\n\tif (!rows || isEmpty(rows)) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<TableBody>\n\t\t\t<RowRenderer\n\t\t\t\trow={rows[0]}\n\t\t\t\tindex={0}\n\t\t\t\tconfig={{ rows, columns, fixRowHeaders }}\n\t\t\t/>\n\t\t</TableBody>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/DHIS2PivotTable/components/TableHeaders/index.tsx"],"names":["column"],"mappings":"AA0CE,mBAKK,KAJJ,YADD;AAzCF,SAAS,iCAAiC;AAC1C,SAAS,uBAAuB,cAAc,iBAAiB;AAC/D,SAAS,SAAS,OAAO,aAAa;AAEtC,OAAO,aAAa;AACpB,SAAS,sBAAsB;AAE/B,SAAS,eAAe;AAAA,EACvB;AAAA,EACA;AAAA,EACA,QAAQ,EAAE,kBAAkB,YAAY,aAAa,GAAG,QAAQ;AACjE,GAS8B;AAC7B,QAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAI,eAAe;AAErD,MAAI,CAAC,QAAQ;AACZ,WAAO;AAAA,EACR;AACA,QAAM,UAAU,MAAM,SAAS,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAKA,YAAW;AACjE,WAAO,OAAOA,QAAO,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AAM,UAAU,QAAQ;AACxB,QAAM,aAAa,QAAQ;AAC3B,QAAM,mBAAmB,QAAQ;AAEjC,MAAI,CAAC,WAAW,QAAQ,OAAO,GAAG;AACjC,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,aACA;AAAA,IAAC;AAAA;AAAA,MACA,QAAQ,QAAQ,CAAC;AAAA,MACjB,OAAO;AAAA,MACP,QAAQ,EAAE,YAAY,SAAS,iBAAiB;AAAA;AAAA,EACjD,GACD;AAEF","sourcesContent":["import React from \"react\";\nimport { useCustomPivotTableEngine } from \"../../state/engine\";\nimport { DataTableColumnHeader, DataTableRow, TableHead } from \"@dhis2/ui\";\nimport { isEmpty, slice, times } from \"lodash\";\nimport { Header } from \"../../services/engine\";\nimport classes from \"./TableHeaders.module.css\";\nimport { useElementSize } from \"usehooks-ts\";\n\nfunction ColumnRenderer({\n\tcolumn,\n\tindex,\n\tconfig: { fixColumnHeaders, rowHeaders, prevHeight = 0, columns },\n}: {\n\tcolumn: Header;\n\tindex: number;\n\tconfig: {\n\t\tcolumns: Header[];\n\t\trowHeaders?: Header[];\n\t\tprevHeight?: number;\n\t\tfixColumnHeaders?: boolean;\n\t};\n}): React.ReactElement | null {\n\tconst [columnHeaderRef, { height }] = useElementSize();\n\n\tif (!column) {\n\t\treturn null;\n\t}\n\tconst colSpan = slice(columns, index + 1).reduce((acc, column) => {\n\t\treturn acc * (column.items?.length ?? 1);\n\t}, 1);\n\n\tconst hasSubColumns = !isEmpty(columns[index + 1]);\n\tconst nextColumn = columns[index + 1];\n\n\tconst multiplicationFactor = slice(columns, 0, index).reduce(\n\t\t(acc, column) => {\n\t\t\treturn acc * (column.items?.length ?? 1);\n\t\t},\n\t\t1,\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<DataTableRow>\n\t\t\t\t{index === 0 &&\n\t\t\t\t\trowHeaders?.map((header) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<DataTableColumnHeader\n\t\t\t\t\t\t\t\tfixed={fixColumnHeaders}\n\t\t\t\t\t\t\t\t/*\n // @ts-ignore */\n\t\t\t\t\t\t\t\ttop={\"0\"}\n\t\t\t\t\t\t\t\tclassName={classes[\"table-header\"]}\n\t\t\t\t\t\t\t\trowSpan={columns.length.toString()}\n\t\t\t\t\t\t\t\tkey={`${header.dimension}-header-column`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{header.label ?? \"\"}\n\t\t\t\t\t\t\t</DataTableColumnHeader>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t{times(multiplicationFactor, (colNo) => {\n\t\t\t\t\treturn column.items?.map((item) => (\n\t\t\t\t\t\t<DataTableColumnHeader\n\t\t\t\t\t\t\tfixed={fixColumnHeaders}\n\t\t\t\t\t\t\t/*\n // @ts-ignore */\n\t\t\t\t\t\t\ttop={`${prevHeight.toString()}px`}\n\t\t\t\t\t\t\tref={index === 0 ? columnHeaderRef : undefined}\n\t\t\t\t\t\t\tclassName={classes[\"table-header\"]}\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tcolSpan={colSpan.toString()}\n\t\t\t\t\t\t\tkey={`${colNo}-${item.name}-column-header`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{item.name as unknown as string}\n\t\t\t\t\t\t</DataTableColumnHeader>\n\t\t\t\t\t));\n\t\t\t\t})}\n\t\t\t</DataTableRow>\n\t\t\t{hasSubColumns ? (\n\t\t\t\t<ColumnRenderer\n\t\t\t\t\tcolumn={nextColumn}\n\t\t\t\t\tindex={index + 1}\n\t\t\t\t\tconfig={{\n\t\t\t\t\t\tcolumns,\n\t\t\t\t\t\trowHeaders,\n\t\t\t\t\t\tprevHeight: height,\n\t\t\t\t\t\tfixColumnHeaders,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</>\n\t);\n}\n\nexport function TableHeaders() {\n\tconst engine = useCustomPivotTableEngine();\n\tconst columns = engine?.columnHeaders;\n\tconst rowHeaders = engine?.rowHeaders;\n\tconst fixColumnHeaders = engine?.fixColumnHeaders;\n\n\tif (!columns || isEmpty(columns)) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<TableHead>\n\t\t\t<ColumnRenderer\n\t\t\t\tcolumn={columns[0]}\n\t\t\t\tindex={0}\n\t\t\t\tconfig={{ rowHeaders, columns, fixColumnHeaders }}\n\t\t\t/>\n\t\t</TableHead>\n\t);\n}\n"]}
@@ -1,4 +0,0 @@
1
- export * from './DHIS2PivotTable';
2
- export * from './interfaces';
3
- //# sourceMappingURL=out.js.map
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/DHIS2PivotTable/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,cAAc","sourcesContent":["export * from \"./DHIS2PivotTable\";\nexport * from \"./interfaces\";\n"]}
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=out.js.map
3
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/DHIS2PivotTable/services/engine.ts"],"names":[],"mappings":"AACA,SAAS,SAAS,WAAW,cAAc,OAAO,WAAW;AA6BtD,MAAM,sBAAsB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EAEA,YAAY;AAAA,IACX;AAAA,IACA;AAAA,EACD,GAGG;AACF,SAAK,SAAS;AACd,SAAK,gBAAgB;AACrB,SAAK,aAAa,UAAU,KAAK,cAAc,SAAS;AAAA,MACvD;AAAA,MACA;AAAA,IACD,CAAC;AACD,SAAK,WAAW;AAChB,SAAK,aAAa;AAAA,EACnB;AAAA,EAEA,IAAI,mBAAmB;AACtB,WAAO,KAAK,OAAO,SAAS,oBAAoB;AAAA,EACjD;AAAA,EAEA,IAAI,gBAAgB;AACnB,WAAO,KAAK,OAAO,SAAS,iBAAiB;AAAA,EAC9C;AAAA,EAEA,kBAAkB,WAA2B;AAC5C,W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UAAU;AACpD,aAAO,OAAO,OAAO,UAAU;AAAA,IAChC,GAAG,CAAC;AACJ,UAAM,qBAAqB,iBAAiB,IAAI,CAAC,UAAU;AAAA,MAC1D,GAAG,MAAM,OAAO,MAAM,QAAQ,MAAM,KAAK,EAAE,KAAK;AAAA,IACjD,CAAC;AACD,SAAK,YAAY;AAAA,MAChB,IAAI,GAAG,kBAAkB,EAAE;AAAA,QAAI,CAAC,QAC/B,IAAI,OAAO,CAAC,KAAK,UAAU;AAC1B,iBAAO,EAAE,GAAG,KAAK,GAAG,MAAM;AAAA,QAC3B,CAAC;AAAA,MACF;AAAA,IACD;AAAA,EACD;AACD","sourcesContent":["import { Analytics, AnalyticsItem, LegendSet } from \"@hisptz/dhis2-utils\";\nimport { compact, findIndex, intersection, times, zip } from \"lodash\";\nimport { DHIS2Dimension } from \"../interfaces\";\n\nexport interface EngineConfig {\n\tlayout: {\n\t\tcolumns: { dimension: DHIS2Dimension; label?: string }[];\n\t\trows: { dimension: DHIS2Dimension; label?: string }[];\n\t\tfilter?: { dimension: DHIS2Dimension; label?: string }[];\n\t};\n\toptions?: {\n\t\tlegendSets?: LegendSet[];\n\t\thideEmptyColumns?: boolean;\n\t\thideEmptyRows?: boolean;\n\t\tshowRowTotals?: boolean;\n\t\tshowColumnTotals?: boolean;\n\t\tshowRowSubtotals?: boolean;\n\t\tshowColumnSubtotals?: boolean;\n\t\tfixColumnHeaders?: boolean;\n\t\tfixRowHeaders?: boolean;\n\t\t[key: string]: any;\n\t};\n}\n\nexport interface Header {\n\tdimension: DHIS2Dimension;\n\tlabel?: string;\n\titems?: AnalyticsItem[];\n}\n\nexport class DHIS2PivotTableEngine {\n\tanalyticsData: Analytics;\n\tvalueIndex: number;\n\tconfig: EngineConfig;\n\trowHeaders?: Header[];\n\tcolumnHeaders?: Header[];\n\n\tcolumnMap?: { [key: string]: any }[];\n\n\tconstructor({\n\t\tanalytics,\n\t\tconfig,\n\t}: {\n\t\tanalytics: Analytics;\n\t\tconfig: EngineConfig;\n\t}) {\n\t\tthis.config = config;\n\t\tthis.analyticsData = analytics;\n\t\tthis.valueIndex = findIndex(this.analyticsData.headers, [\n\t\t\t\"name\",\n\t\t\t\"value\",\n\t\t]);\n\t\tthis.getHeaders();\n\t\tthis.getColumnMap();\n\t}\n\n\tget fixColumnHeaders() {\n\t\treturn this.config.options?.fixColumnHeaders ?? true;\n\t}\n\n\tget fixRowHeaders() {\n\t\treturn this.config.options?.fixRowHeaders ?? true;\n\t}\n\n\tgetDimensionItems(dimension: DHIS2Dimension) {\n\t\treturn this.analyticsData.metaData?.dimensions[dimension] ?? [];\n\t}\n\n\tgetItem(id: string) {\n\t\treturn this.analyticsData.metaData?.items[id as any];\n\t}\n\n\tgetValue(mapper: { [key: string]: any }) {\n\t\tconst dimensions = Object.values(mapper);\n\t\tconst data = this.analyticsData.rows?.filter(\n\t\t\t(row) => intersection(row, dimensions).length >= dimensions.length,\n\t\t);\n\t\treturn data?.reduce((acc, row) => {\n\t\t\treturn acc + parseFloat(row[this.valueIndex]);\n\t\t}, 0);\n\t}\n\n\tgetHeaders() {\n\t\tthis.rowHeaders = this.config.layout.rows.map((rowConfig) => {\n\t\t\treturn {\n\t\t\t\t...rowConfig,\n\t\t\t\titems: compact(\n\t\t\t\t\tthis.getDimensionItems(rowConfig.dimension).map(\n\t\t\t\t\t\t(itemId: string) => this.getItem(itemId),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t\t});\n\t\tthis.columnHeaders = this.config.layout.columns.map((columnConfig) => {\n\t\t\treturn {\n\t\t\t\t...columnConfig,\n\t\t\t\titems: compact(\n\t\t\t\t\tthis.getDimensionItems(columnConfig.dimension).map(\n\t\t\t\t\t\t(itemId: string) => this.getItem(itemId),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t};\n\t\t});\n\t}\n\n\tgetColumnMap() {\n\t\tconst columns = this.columnHeaders;\n\t\tconst sanitizedColumns =\n\t\t\tcompact(\n\t\t\t\tcolumns?.map(\n\t\t\t\t\t(column) =>\n\t\t\t\t\t\tcolumn.items?.map((item) => ({\n\t\t\t\t\t\t\t[column.dimension]: item.uid,\n\t\t\t\t\t\t})),\n\t\t\t\t),\n\t\t\t) ?? [];\n\t\tconst size = sanitizedColumns.reduce((acc, items) => {\n\t\t\treturn acc * (items?.length ?? 1);\n\t\t}, 1);\n\t\tconst standardiseColumns = sanitizedColumns.map((items) => [\n\t\t\t...times(size / items.length, () => items).flat(),\n\t\t]);\n\t\tthis.columnMap = compact(\n\t\t\tzip(...standardiseColumns).map((arr) =>\n\t\t\t\tarr.reduce((obj, value) => {\n\t\t\t\t\treturn { ...obj, ...value };\n\t\t\t\t}),\n\t\t\t),\n\t\t);\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/DHIS2PivotTable/state/engine.tsx"],"names":[],"mappings":"AAkBE;AAlBF,SAAgB,eAA0B,kBAAkB;AAG5D,MAAM,+BACL,cAA4C,IAAI;AAE1C,SAAS,4BAA4B;AAC3C,SAAO,WAAW,4BAA4B;AAC/C;AAEO,SAAS,8BAA8B;AAAA,EAC7C;AAAA,EACA;AACD,GAGG;AACF,SACC,oBAAC,6BAA6B,UAA7B,EAAsC,OAAO,QAC5C,UACF;AAEF","sourcesContent":["import React, { createContext, ReactNode, useContext } from \"react\";\nimport { DHIS2PivotTableEngine } from \"../services/engine\";\n\nconst DHIS2PivotTableEngineContext =\n\tcreateContext<DHIS2PivotTableEngine | null>(null);\n\nexport function useCustomPivotTableEngine() {\n\treturn useContext(DHIS2PivotTableEngineContext);\n}\n\nexport function DHIS2PivotTableEngineProvider({\n\tchildren,\n\tengine,\n}: {\n\tchildren: ReactNode;\n\tengine: DHIS2PivotTableEngine;\n}) {\n\treturn (\n\t\t<DHIS2PivotTableEngineContext.Provider value={engine}>\n\t\t\t{children}\n\t\t</DHIS2PivotTableEngineContext.Provider>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Map/DHIS2Map.tsx"],"names":[],"mappings":"AAmDI;AAlDJ,SAAgB,kBAAkB;AAClC,OAAO,aAAa;AAKpB,SAAS,mBAAmB;AAE5B,OAAO;AACP,SAAS,aAAa,2BAA2B;AAEjD,MAAM,cAAc,IAAI,YAAY;AAEpC,MAAM,eAAe,CACpB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GACA,QACI;AACJ,QAAM,uBAA2C;AAAA,IAChD;AAAA,MACC,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,SAAS,YAAY,WAAW;AAAA,MAChC,GAAG;AAAA,IACJ;AAAA,EACD;AACA,QAAM,0BAAiD;AAAA,IACtD;AAAA,MACC,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,SAAS,eAAe,WAAW;AAAA,IACpC;AAAA,EACD;AAEA,SACC,oBAAC,uBAAoB,QAAQ,aAC5B;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACA,QAAQ;AAAA,YACP;AAAA,YACA;AAAA,YACA,gBAAgB;AAAA,YAChB,aAAa;AAAA,UACd;AAAA,UACA;AAAA,UACA;AAAA,UAEA;AAAA,UACA;AAAA;AAAA,QAFK;AAAA,MAGN;AAAA;AAAA,EACD,GACD;AAEF;AACO,MAAM,WAA+B,WAAW,YAAY;AAK5D,MAAM,MAAM","sourcesContent":["import { Map as LeafletMap } from \"leaflet\";\nimport React, { forwardRef } from \"react\";\nimport MapArea from \"./components/MapArea\";\nimport {\n\tCustomBoundaryLayer,\n\tCustomPointLayer,\n} from \"./components/MapLayer/interfaces\";\nimport { MapProvider } from \"./components/MapProvider\";\nimport { MapProps } from \"./interfaces\";\nimport \"leaflet/dist/leaflet.css\";\nimport { QueryClient, QueryClientProvider } from \"react-query\";\n\nconst queryClient = new QueryClient();\n\nconst MapComponent = (\n\t{\n\t\torgUnitSelection,\n\t\tpointLayer,\n\t\tboundaryLayer,\n\t\tthematicLayers,\n\t\tearthEngineLayers,\n\t\tperiodSelection,\n\t\tmapOptions,\n\t\tkey,\n\t\tcontrols,\n\t\tlegends,\n\t}: MapProps,\n\tref: React.Ref<LeafletMap> | undefined,\n) => {\n\tconst sanitizedPointLayers: CustomPointLayer[] = [\n\t\t{\n\t\t\ttype: \"point\",\n\t\t\tid: \"point\",\n\t\t\tenabled: pointLayer?.enabled ?? false,\n\t\t\t...pointLayer,\n\t\t},\n\t];\n\tconst sanitizedBoundaryLayers: CustomBoundaryLayer[] = [\n\t\t{\n\t\t\ttype: \"overlay\",\n\t\t\tid: \"boundary\",\n\t\t\tenabled: boundaryLayer?.enabled ?? false,\n\t\t},\n\t];\n\n\treturn (\n\t\t<QueryClientProvider client={queryClient}>\n\t\t\t<MapProvider\n\t\t\t\tperiodSelection={periodSelection}\n\t\t\t\torgUnitSelection={orgUnitSelection}\n\t\t\t>\n\t\t\t\t<MapArea\n\t\t\t\t\tlayers={{\n\t\t\t\t\t\tthematicLayers,\n\t\t\t\t\t\tearthEngineLayers,\n\t\t\t\t\t\tboundaryLayers: sanitizedBoundaryLayers,\n\t\t\t\t\t\tpointLayers: sanitizedPointLayers,\n\t\t\t\t\t}}\n\t\t\t\t\tlegends={legends}\n\t\t\t\t\tcontrols={controls}\n\t\t\t\t\tkey={key}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tmapOptions={mapOptions}\n\t\t\t\t/>\n\t\t\t</MapProvider>\n\t\t</QueryClientProvider>\n\t);\n};\nexport const DHIS2Map: React.FC<MapProps> = forwardRef(MapComponent);\n\n/**\n * @deprecated since `v2`. Use `DHIS2Map` instead\n * */\nexport const Map = DHIS2Map;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Map/DHIS2Map.stories.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAgB;AAEzB,MAAM,OAA8B;AAAA,EACnC,OAAO;AAAA,E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,CAAC;AAC/C,wBAAwB,OAAO;AAAA,EAC9B,kBAAkB;AAAA,IACjB,UAAU,CAAC;AAAA,IACX,aAAa;AAAA,IACb,aAAa;AAAA,IACb,eAAe;AAAA,EAChB;AAAA,EACA,gBAAgB,CAAC;AAAA,EACjB,iBAAiB;AAAA,IAChB,SAAS,CAAC,MAAM;AAAA,EACjB;AAAA,EACA,mBAAmB;AAAA,IAClB;AAAA,MACC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,QAAQ;AAAA,QACP,KAAK;AAAA,QACL,KAAK;AAAA,QACL,SACC;AAAA,MACF;AAAA,MACA,cAAc,CAAC,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,QACR,QAAQ;AAAA,MACT;AAAA,IACD;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,cAAc,CAAC,OAAO;AAAA,MACtB,SAAS;AAAA,IACV;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,cAAc,CAAC,YAAY;AAAA,IAC5B;AAAA,EACD;AAAA,EACA,YAAY;AAAA,IACX,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACD;AACD","sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport { DHIS2Map } from \"./DHIS2Map\";\n\nconst meta: Meta<typeof DHIS2Map> = {\n\ttitle: \"DHIS2 Map\",\n\tcomponent: DHIS2Map,\n};\nexport default meta;\n\ntype Story = StoryObj<typeof DHIS2Map>;\nexport const BaseMap: Story = {\n\tname: \"Base map\",\n};\nBaseMap.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: true,\n\t},\n};\n\nexport const Controls: Story = {\n\tname: \"Controls\",\n};\nControls.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: true,\n\t},\n\tcontrols: [\n\t\t{\n\t\t\ttype: \"print\",\n\t\t\tposition: \"topleft\",\n\t\t\toptions: {\n\t\t\t\thidden: false,\n\t\t\t\thideControlContainer: true,\n\t\t\t\tsizeModes: [\"A4Landscape\", \"A4Portrait\", \"Current\"],\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport const BoundaryLayer: Story = {\n\tname: \"Boundary layer\",\n};\nBoundaryLayer.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: true,\n\t},\n\tboundaryLayer: {\n\t\tenabled: true,\n\t},\n};\n\nexport const BoundaryLayerWithLevels: Story = {\n\tname: \"Boundary layer with levels\",\n};\nBoundaryLayerWithLevels.args = {\n\torgUnitSelection: {\n\t\torgUnits: [\n\t\t\t{\n\t\t\t\tid: \"ImspTQPwCqd\",\n\t\t\t\tdisplayName: \"Sierra Leone\",\n\t\t\t\tname: \"Sierra Leone\",\n\t\t\t\tpath: \"/ImspTQPwCqd\",\n\t\t\t\tchildren: [],\n\t\t\t},\n\t\t],\n\t\tlevels: [\"2\"],\n\t},\n\tboundaryLayer: {\n\t\tenabled: true,\n\t},\n};\n\nexport const ChoroplethThematicLayer: Story = {};\nChoroplethThematicLayer.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: false,\n\t},\n\tboundaryLayer: {\n\t\tenabled: true,\n\t},\n\tthematicLayers: [\n\t\t{\n\t\t\ttype: \"choropleth\",\n\t\t\tid: \"choropleth\",\n\t\t\tenabled: true,\n\t\t\tdataItem: {\n\t\t\t\tid: \"Uvn6LCg7dVU\",\n\t\t\t\tdisplayName: \"ANC 1 Coverage\",\n\t\t\t\ttype: \"indicator\",\n\t\t\t},\n\t\t\tcontrol: {\n\t\t\t\tenabled: true,\n\t\t\t\tposition: \"topright\",\n\t\t\t},\n\t\t},\n\t],\n\tperiodSelection: {\n\t\tperiods: [\"2022\"],\n\t},\n\tlegends: {\n\t\tenabled: true,\n\t\tposition: \"topright\",\n\t\tcollapsible: true,\n\t},\n};\n\nexport const BubbleThematicLayer: Story = {};\nBubbleThematicLayer.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: true,\n\t},\n\tboundaryLayer: {\n\t\tenabled: true,\n\t},\n\tthematicLayers: [\n\t\t{\n\t\t\ttype: \"bubble\",\n\t\t\tid: \"bubble\",\n\t\t\tenabled: true,\n\t\t\tdataItem: {\n\t\t\t\tid: \"Uvn6LCg7dVU\",\n\t\t\t\tdisplayName: \"ANC 1 Coverage\",\n\t\t\t\ttype: \"indicator\",\n\t\t\t},\n\t\t\tcontrol: {\n\t\t\t\tenabled: true,\n\t\t\t\tposition: \"topright\",\n\t\t\t},\n\t\t\tradius: {\n\t\t\t\tmin: 0,\n\t\t\t\tmax: 40,\n\t\t\t},\n\t\t},\n\t],\n\tlegends: {\n\t\tenabled: true,\n\t\tposition: \"topright\",\n\t\tcollapsible: true,\n\t},\n\tperiodSelection: {\n\t\tperiods: [\"2022\"],\n\t},\n\tcontrols: [\n\t\t{\n\t\t\ttype: \"fullscreen\",\n\t\t\tposition: \"topleft\",\n\t\t},\n\t],\n};\n\nexport const AllThematicLayers: Story = {};\nAllThematicLayers.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: true,\n\t},\n\tboundaryLayer: {\n\t\tenabled: true,\n\t},\n\tthematicLayers: [\n\t\t{\n\t\t\ttype: \"choropleth\",\n\t\t\tid: \"ReUHfIn0pTQ\",\n\t\t\tenabled: true,\n\t\t\tdataItem: {\n\t\t\t\tid: \"ReUHfIn0pTQ\",\n\t\t\t\tdisplayName: \"ANC 1-3 Dropout Rate\",\n\t\t\t\ttype: \"indicator\",\n\t\t\t\tlegendSet: \"fqs276KXCXi\",\n\t\t\t},\n\t\t\tcontrol: {\n\t\t\t\tenabled: true,\n\t\t\t\tposition: \"topright\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: \"choropleth\",\n\t\t\tid: \"Uvn6LCg7dVU\",\n\t\t\tenabled: true,\n\t\t\tdataItem: {\n\t\t\t\tid: \"Uvn6LCg7dVU\",\n\t\t\t\tdisplayName: \"ANC 1 Coverage\",\n\t\t\t\ttype: \"indicator\",\n\t\t\t},\n\t\t\tcontrol: {\n\t\t\t\tenabled: true,\n\t\t\t\tposition: \"topright\",\n\t\t\t},\n\t\t},\n\t],\n\tlegends: {\n\t\tenabled: true,\n\t\tposition: \"topright\",\n\t\tcollapsible: true,\n\t},\n\tperiodSelection: {\n\t\tperiods: [\"2022\"],\n\t},\n\tcontrols: [\n\t\t{\n\t\t\ttype: \"scale\",\n\t\t\tposition: \"bottomleft\",\n\t\t\toptions: {\n\t\t\t\timperial: false,\n\t\t\t\tmetric: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: \"fullscreen\",\n\t\t\tposition: \"bottomleft\",\n\t\t},\n\t],\n};\n\nexport const ChoroplethThematicLayerWithLevels: Story = {};\nChoroplethThematicLayerWithLevels.args = {\n\torgUnitSelection: {\n\t\torgUnits: [\n\t\t\t{\n\t\t\t\tid: \"ImspTQPwCqd\",\n\t\t\t\tdisplayName: \"Sierra Leone\",\n\t\t\t\tname: \"Sierra Leone\",\n\t\t\t\tpath: \"/ImspTQPwCqd\",\n\t\t\t\tchildren: [],\n\t\t\t},\n\t\t],\n\t\tlevels: [\"3\"],\n\t},\n\tboundaryLayer: {\n\t\tenabled: true,\n\t},\n\tthematicLayers: [\n\t\t{\n\t\t\ttype: \"choropleth\",\n\t\t\tid: \"choropleth\",\n\t\t\tenabled: true,\n\t\t\tdataItem: {\n\t\t\t\tid: \"Uvn6LCg7dVU\",\n\t\t\t\tdisplayName: \"ANC 1 Coverage\",\n\t\t\t\ttype: \"indicator\",\n\t\t\t},\n\t\t\tcontrol: {\n\t\t\t\tenabled: true,\n\t\t\t\tposition: \"topright\",\n\t\t\t},\n\t\t},\n\t],\n\tlegends: {\n\t\tenabled: true,\n\t\tposition: \"topright\",\n\t\tcollapsible: true,\n\t},\n\tperiodSelection: {\n\t\tperiods: [\"2022\"],\n\t},\n\tcontrols: [\n\t\t{\n\t\t\ttype: \"print\",\n\t\t\tposition: \"topleft\",\n\t\t\toptions: {\n\t\t\t\thidden: false,\n\t\t\t\thideControlContainer: true,\n\t\t\t\tsizeModes: [\"A4Landscape\", \"A4Portrait\", \"Current\"],\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport const PointLayer: Story = {};\nPointLayer.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: false,\n\t},\n\tthematicLayers: [\n\t\t{\n\t\t\ttype: \"choropleth\",\n\t\t\tid: \"choropleth\",\n\t\t\tenabled: true,\n\t\t\tdataItem: {\n\t\t\t\tid: \"Uvn6LCg7dVU\",\n\t\t\t\tdisplayName: \"ANC 1 Coverage\",\n\t\t\t\ttype: \"indicator\",\n\t\t\t},\n\t\t\tcontrol: {\n\t\t\t\tenabled: true,\n\t\t\t\tposition: \"topright\",\n\t\t\t},\n\t\t},\n\t],\n\tperiodSelection: {\n\t\tperiods: [\"2022\"],\n\t},\n\tpointLayer: {\n\t\tenabled: true,\n\t\tlabel: \"Facilities\",\n\t\tlevel: \"m9lBJogzE95\",\n\t\tstyle: {\n\t\t\tgroupSet: \"J5jldMd8OHv\",\n\t\t},\n\t},\n};\n\nexport const GoogleEarthEngineLayers: Story = {};\nGoogleEarthEngineLayers.args = {\n\torgUnitSelection: {\n\t\torgUnits: [],\n\t\tuserOrgUnit: true,\n\t\tuserSubUnit: true,\n\t\tuserSubX2Unit: false,\n\t},\n\tthematicLayers: [],\n\tperiodSelection: {\n\t\tperiods: [\"2022\"],\n\t},\n\tearthEngineLayers: [\n\t\t{\n\t\t\tname: \"Population\",\n\t\t\ttype: \"population\",\n\t\t\tid: \"population\",\n\t\t\tenabled: false,\n\t\t\tparams: {\n\t\t\t\tmin: 0,\n\t\t\t\tmax: 10,\n\t\t\t\tpalette:\n\t\t\t\t\t\"#f7fbff,#deebf7,#c6dbef,#9ecae1,#6baed6,#4292c6,#2171b5,#08519c,#08306b\",\n\t\t\t},\n\t\t\taggregations: [\"sum\", \"mean\"],\n\t\t\tfilters: {\n\t\t\t\tperiod: \"2020\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tname: \"Footprints\",\n\t\t\ttype: \"footprints\",\n\t\t\tid: \"footprints\",\n\t\t\taggregations: [\"count\"],\n\t\t\tenabled: false,\n\t\t},\n\t\t{\n\t\t\tname: \"Land Cover\",\n\t\t\ttype: \"landCover\",\n\t\t\tid: \"landCover\",\n\t\t\tenabled: true,\n\t\t\taggregations: [\"percentage\"],\n\t\t},\n\t],\n\tpointLayer: {\n\t\tenabled: false,\n\t\tlabel: \"Facilities\",\n\t\tlevel: \"m9lBJogzE95\",\n\t\tstyle: {\n\t\t\tgroupSet: \"J5jldMd8OHv\",\n\t\t},\n\t},\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.tsx"],"names":[],"mappings":"AAwCG,cAKC,YALD;AAxCH,SAAS,eAAe;AAExB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,UAAU;AAEjB,SAAS,qCAAqC;AAUvC,SAAS,4BAA4B;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAqC;AACpC,QAAM,OAAO,QAAgC;AAAA,IAC5C,eAAe,UAAU,CAAC;AAAA,EAC3B,CAAC;AACD,QAAM,gBAAgB,CAAC,WAAmC;AACzD,YAAQ;AACR,aAAS,MAAM;AAAA,EAChB;AAEA,SACC,qBAAC,SAAO,GAAG,OAAO,MAAM,CAAC,MAAM,SAC9B;AAAA,wBAAC,cAAY,eAAK,EAAE,8BAA8B,GAAE;AAAA,IACpD,oBAAC,gBACA,8BAAC,iCAA8B,MAAY,UAAU,SAAS,GAC/D;AAAA,IACA,oBAAC,gBACA,+BAAC,eACA;AAAA,0BAAC,UAAO,SAAS,SAAU,eAAK,EAAE,QAAQ,GAAE;AAAA,MAC5C;AAAA,QAAC;AAAA;AAAA,UACA,SAAO;AAAA,UACP,SAAS,MAAM,KAAK,aAAa,aAAa,EAAE;AAAA,UAE/C,eAAK,EAAE,MAAM;AAAA;AAAA,MACf;AAAA,OACD,GACD;AAAA,KACD;AAEF","sourcesContent":["import { useForm } from \"react-hook-form\";\nimport { EarthEngineLayerConfig } from \"../MapLayer/interfaces\";\nimport {\n\tButton,\n\tButtonStrip,\n\tModal,\n\tModalActions,\n\tModalContent,\n\tModalTitle,\n} from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport React from \"react\";\nimport { EarthEngineLayerConfiguration } from \"./EarthEngineLayerConfiguration\";\n\nexport interface EarthEngineLayerConfigModalProps {\n\topen: boolean;\n\tconfig?: EarthEngineLayerConfig;\n\texclude?: string[];\n\tonClose: () => void;\n\tonChange: (config: EarthEngineLayerConfig) => void;\n}\n\nexport function EarthEngineLayerConfigModal({\n\topen,\n\texclude,\n\tconfig,\n\tonClose,\n\tonChange,\n\t...props\n}: EarthEngineLayerConfigModalProps) {\n\tconst form = useForm<EarthEngineLayerConfig>({\n\t\tdefaultValues: config ?? {},\n\t});\n\tconst onSubmitClick = (values: EarthEngineLayerConfig) => {\n\t\tonClose();\n\t\tonChange(values);\n\t};\n\n\treturn (\n\t\t<Modal {...props} hide={!open} onClose={onClose}>\n\t\t\t<ModalTitle>{i18n.t(\"Configure Earth Engine Layer\")}</ModalTitle>\n\t\t\t<ModalContent>\n\t\t\t\t<EarthEngineLayerConfiguration form={form} excluded={exclude} />\n\t\t\t</ModalContent>\n\t\t\t<ModalActions>\n\t\t\t\t<ButtonStrip>\n\t\t\t\t\t<Button onClick={onClose}>{i18n.t(\"Cancel\")}</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tprimary\n\t\t\t\t\t\tonClick={() => form.handleSubmit(onSubmitClick)()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{i18n.t(\"Save\")}\n\t\t\t\t\t</Button>\n\t\t\t\t</ButtonStrip>\n\t\t\t</ModalActions>\n\t\t</Modal>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.tsx"],"names":[],"mappings":"AAiBI,SACC,KADD;AAhBJ,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,mCAAmC;AAE5C,MAAM,OAAiD;AAAA,EACtD,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,IACX,CAAC,UAAU;AACV,YAAM;AAAA,QACL,OAAO;AAAA,QACP,SAAS;AAAA,QACT,UAAU;AAAA,MACX,IAAI,WAAW,IAAI;AAEnB,aACC,qBAAC,SACA;AAAA,4BAAC,SAAM,MAAM,EAAE,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAkB;AAAA,QACzD,oBAAC,UAAO,SAAS,QAAQ,wBAAU;AAAA,SACpC;AAAA,IAEF;AAAA,EACD;AACD;AAEA,IAAO,8CAAQ;AAIR,MAAM,UAAiB,CAAC;AAC/B,QAAQ,OAAO;AAAA,EACd,SAAS,MAAM;AAAA,EAAC;AAAA,EAChB,UAAU,QAAQ;AAAA,EAClB,MAAM;AACP","sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport { Button } from \"@dhis2/ui\";\nimport { useBoolean } from \"usehooks-ts\";\nimport { EarthEngineLayerConfigModal } from \"./EarthEngineLayerConfigModal\";\n\nconst meta: Meta<typeof EarthEngineLayerConfigModal> = {\n\tcomponent: EarthEngineLayerConfigModal,\n\ttitle: \"DHIS2 Map/Earth Engine Layer Config Modal\",\n\tdecorators: [\n\t\t(Story) => {\n\t\t\tconst {\n\t\t\t\tvalue: hide,\n\t\t\t\tsetTrue: onClose,\n\t\t\t\tsetFalse: onOpen,\n\t\t\t} = useBoolean(true);\n\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\t<Story args={{ open: !hide, onClose }} onClose={onClose} />\n\t\t\t\t\t<Button onClick={onOpen}>Open modal</Button>\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t],\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof EarthEngineLayerConfigModal>;\n\nexport const Default: Story = {};\nDefault.args = {\n\tonClose: () => {},\n\tonChange: console.info,\n\topen: true,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.tsx"],"names":[],"mappings":"AAyBI,SACC,KADD;AAxBJ,SAAS,oBAAmC;AAE5C,SAAS,oBAAoB;AAC7B,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC,SAAS,sBAAsB;AAC/B,SAAS,aAAa,2BAA2B;AAEjD,MAAM,cAAc,IAAI,YAAY;AAQ7B,SAAS,8BAA8B;AAAA,EAC7C;AAAA,EACA;AACD,GAAuC;AACtC,SACC,oBAAC,uBAAoB,QAAQ,aAC5B,8BAAC,gBAAc,GAAG,MACjB,+BAAC,SAAI,WAAU,iBACd;AAAA,wBAAC,aAAU,UAAoB;AAAA,IAC/B,oBAAC,QAAK;AAAA,IACN,oBAAC,uBAAoB;AAAA,IACrB,oBAAC,kBAAe;AAAA,IAChB,oBAAC,gBAAa;AAAA,KACf,GACD,GACD;AAEF","sourcesContent":["import { EarthEngineLayerConfig } from \"../MapLayer/interfaces\";\nimport { FormProvider, UseFormReturn } from \"react-hook-form\";\nimport React from \"react\";\nimport { StylesConfig } from \"./components/StylesConfig\";\nimport { Name } from \"./components/Name\";\nimport { TypeField } from \"./components/TypeField\";\nimport { AggregationSelector } from \"./components/AggregationSelector\";\nimport { PeriodSelector } from \"./components/PeriodSelector\";\nimport { QueryClient, QueryClientProvider } from \"react-query\";\n\nconst queryClient = new QueryClient();\nexport interface EarthEngineLayerConfigurationProps {\n\tform: UseFormReturn<EarthEngineLayerConfig>;\n\texcluded?: string[];\n\n\t[key: string]: any;\n}\n\nexport function EarthEngineLayerConfiguration({\n\tform,\n\texcluded,\n}: EarthEngineLayerConfigurationProps) {\n\treturn (\n\t\t<QueryClientProvider client={queryClient}>\n\t\t\t<FormProvider {...form}>\n\t\t\t\t<div className=\"column gap-16\">\n\t\t\t\t\t<TypeField excluded={excluded} />\n\t\t\t\t\t<Name />\n\t\t\t\t\t<AggregationSelector />\n\t\t\t\t\t<PeriodSelector />\n\t\t\t\t\t<StylesConfig />\n\t\t\t\t</div>\n\t\t\t</FormProvider>\n\t\t</QueryClientProvider>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.tsx"],"names":[],"mappings":"AAmBK;AAlBL,SAAS,qCAAqC;AAE9C,SAAS,eAAe;AAKjB,MAAM,UAAiB,CAAC;AAC/B,QAAQ,OAAO,CAAC;AAEhB,MAAM,OAAmD;AAAA,EACxD,OAAO;AAAA,EACP,WAAW;AAAA,EACX,YAAY;AAAA,IACX,CAAC,aAAa;AACb,YAAM,OAAO,QAAgC;AAC7C,aACC,oBAAC,SAAI,OAAO,EAAE,OAAO,OAAO,QAAQ,MAAM,GACzC,8BAAC,YAAS,MAAM,EAAE,KAAK,GAAG,MAAY,GACvC;AAAA,IAEF;AAAA,EACD;AACD;AAEA,IAAO,gDAAQ","sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport { EarthEngineLayerConfiguration } from \"./EarthEngineLayerConfiguration\";\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { EarthEngineLayerConfig } from \"../MapLayer/interfaces\";\n\ntype Story = StoryObj<typeof EarthEngineLayerConfiguration>;\n\nexport const Default: Story = {};\nDefault.args = {};\n\nconst meta: Meta<typeof EarthEngineLayerConfiguration> = {\n\ttitle: \"DHIS2 Map/Earth Engine Configuration\",\n\tcomponent: EarthEngineLayerConfiguration,\n\tdecorators: [\n\t\t(MapStory) => {\n\t\t\tconst form = useForm<EarthEngineLayerConfig>();\n\t\t\treturn (\n\t\t\t\t<div style={{ width: \"50%\", height: \"50%\" }}>\n\t\t\t\t\t<MapStory args={{ form }} form={form} />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t],\n};\n\nexport default meta;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/components/Map/components/EarthEngineLayerConfiguration/components/AggregationSelector.tsx"],"names":[],"mappings":"AA4CO;AA5CP,SAAS,kBAAkB;AAC3B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,YAAY,YAAY;AACjC,OAAO,UAAU;AAEjB,SAAS,eAAe;AAEjB,SAAS,sBAAsB;AACrC,QAAM,SAAS,QAAQ;AAEvB,MAAI,CAAC,QAAQ,qBAAqB;AACjC,WAAO;AAAA,EACR;AAEA,QAAM,wBAAwB,QAAQ,uBAAuB,CAAC;AAE9D,QAAM,kBAAkB,QAAQ;AAEhC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,WAAW,MAAM;AAClC,eAAO,oBAAoB,IAC1B;AAAA,UAAC;AAAA;AAAA,YACA,WAAS;AAAA,YACT,OAAO,QAAQ,WAAW,KAAK;AAAA,YAC/B,gBAAgB,YAAY,OAAO;AAAA,YACnC,UACC,sBAAsB;AAAA,cACrB,KAAK,MAAM,KAAK,KAAK;AAAA,YACtB,IACG,KAAK,MAAM,KAAK,IAChB;AAAA,YAEJ,UAAU,CAAC,EAAE,SAAS,MACrB,MAAM,SAAS,CAAC,QAAQ,CAAC;AAAA,YAE1B,OAAO,KAAK,EAAE,aAAa;AAAA,YAE1B,gCAAsB,IAAI,CAAC,gBAC3B;AAAA,cAAC;AAAA;AAAA,gBAEA,OAAO,WAAW,WAAW;AAAA,gBAC7B,OAAO;AAAA;AAAA,cAFF,GAAG,WAAW;AAAA,YAGpB,CACA;AAAA;AAAA,QACF,IAEA;AAAA,UAAC;AAAA;AAAA,YACA,OAAO,QAAQ,WAAW,KAAK;AAAA,YAC/B,gBAAgB,YAAY,OAAO;AAAA,YACnC,UAAU,MAAM,OAAO;AAAA,cACtB,CAAC,UACA,uBAAuB,SAAS,KAAK;AAAA,YACvC;AAAA,YACA,UAAU,CAAC,EAAE,SAAS,MACrB,MAAM,SAAS,QAAQ;AAAA,YAExB,OAAO,KAAK,EAAE,cAAc;AAAA,YAE3B,gCAAsB,IAAI,CAAC,gBAC3B;AAAA,cAAC;AAAA;AAAA,gBAEA,OAAO,WAAW,WAAW;AAAA,gBAC7B,OAAO;AAAA;AAAA,cAFF,GAAG,WAAW;AAAA,YAGpB,CACA;AAAA;AAAA,QACF;AAAA,MAEF;AAAA,MACA,MAAM;AAAA;AAAA,EACP;AAEF","sourcesContent":["import { Controller } from \"react-hook-form\";\nimport {\n\tMultiSelectField,\n\tMultiSelectOption,\n\tSingleSelectField,\n\tSingleSelectOption,\n} from \"@dhis2/ui\";\nimport { capitalize, head } from \"lodash\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport React from \"react\";\nimport { useType } from \"../hooks/data\";\n\nexport function AggregationSelector() {\n\tconst config = useType();\n\n\tif (!config?.defaultAggregations) {\n\t\treturn null;\n\t}\n\n\tconst supportedAggregations = config?.defaultAggregations ?? [];\n\n\tconst maxAggregations = config?.maxAggregations;\n\n\treturn (\n\t\t<Controller\n\t\t\trender={({ field, fieldState }) => {\n\t\t\t\treturn maxAggregations === 1 ? (\n\t\t\t\t\t<SingleSelectField\n\t\t\t\t\t\tclearable\n\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\tvalidationText={fieldState?.error?.message}\n\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\tsupportedAggregations.includes(\n\t\t\t\t\t\t\t\thead(field.value) ?? \"\",\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t? head(field.value)\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={({ selected }: { selected: string }) =>\n\t\t\t\t\t\t\tfield.onChange([selected])\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={i18n.t(\"Aggregation\")}\n\t\t\t\t\t>\n\t\t\t\t\t\t{supportedAggregations.map((aggregation) => (\n\t\t\t\t\t\t\t<SingleSelectOption\n\t\t\t\t\t\t\t\tkey={`${aggregation}-option`}\n\t\t\t\t\t\t\t\tlabel={capitalize(aggregation)}\n\t\t\t\t\t\t\t\tvalue={aggregation}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SingleSelectField>\n\t\t\t\t) : (\n\t\t\t\t\t<MultiSelectField\n\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\tvalidationText={fieldState?.error?.message}\n\t\t\t\t\t\tselected={field.value?.filter(\n\t\t\t\t\t\t\t(value: string) =>\n\t\t\t\t\t\t\t\tsupportedAggregations?.includes(value),\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tonChange={({ selected }: { selected: string[] }) =>\n\t\t\t\t\t\t\tfield.onChange(selected)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={i18n.t(\"Aggregations\")}\n\t\t\t\t\t>\n\t\t\t\t\t\t{supportedAggregations.map((aggregation) => (\n\t\t\t\t\t\t\t<MultiSelectOption\n\t\t\t\t\t\t\t\tkey={`${aggregation}-option`}\n\t\t\t\t\t\t\t\tlabel={capitalize(aggregation)}\n\t\t\t\t\t\t\t\tvalue={aggregation}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</MultiSelectField>\n\t\t\t\t);\n\t\t\t}}\n\t\t\tname={\"aggregations\"}\n\t\t/>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/components/Map/components/EarthEngineLayerConfiguration/components/ColorConfig.tsx"],"names":["palette","colorClass"],"mappings":"AAqBG,SAGG,KAHH;AArBH,SAAS,kBAAkB;AAC3B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,UAAU;AACjB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,sBAAsB;AAGtB,SAAS,cAAc;AAC7B,SACC,qBAAC,SAAI,WAAU,iBACd;AAAA,yBAAC,SAAI,WAAU,aACd;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,QAAQ,CAAC,EAAE,OAAO,WAAW,MAC5B;AAAA,YAAC;AAAA;AAAA,cACC,GAAG;AAAA,cACJ,OAAO,QAAQ,WAAW,KAAK;AAAA,cAC/B,gBAAgB,WAAW,OAAO;AAAA,cAClC,OAAO,MAAM,OAAO,SAAS;AAAA,cAC7B,UAAU,CAAC,EAAE,MAAM,MAA0B;AAC5C,oBAAI,CAAC;AAAO;AACZ,sBAAM,SAAS,SAAS,KAAK,CAAC;AAAA,cAC/B;AAAA,cACA,OAAO,KAAK,EAAE,KAAK;AAAA,cACnB,MAAK;AAAA;AAAA,UACN;AAAA,UAED,MAAM;AAAA;AAAA,MACP;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACA,QAAQ,CAAC,EAAE,OAAO,WAAW,MAC5B;AAAA,YAAC;AAAA;AAAA,cACC,GAAG;AAAA,cACJ,OAA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AAQ,CAAC,EAAE,OAAO,WAAW,MAAM;AAClC,gBAAM,UAAU,MAAM;AACtB,gBAAM,QAAQ,gBAAgB,OAAO;AACrC,gBAAM,aAAa,cAAc,WAAW,EAAE;AAE9C,gBAAM,WAAW,CAACC,gBAAuB;AACxC,kBAAMD,WAAU;AAAA,cACfC;AAAA,cACA;AAAA,YACD,GAAG,KAAK,GAAG;AACX,kBAAM,SAASD,QAAO;AAAA,UACvB;AAEA,iBACC;AAAA,YAAC;AAAA;AAAA,cACA,OAAO,QAAQ,WAAW,KAAK;AAAA,cAC/B,gBAAgB,WAAW,OAAO;AAAA,cAClC,OAAO,KAAK,EAAE,QAAQ;AAAA,cAEtB;AAAA,gBAAC;AAAA;AAAA,kBACA,OAAO,SAAS;AAAA,kBAChB,YACC,cAAc;AAAA,kBAEf,OAAO;AAAA,kBACP;AAAA;AAAA,cACD;AAAA;AAAA,UACD;AAAA,QAEF;AAAA;AAAA,IACD,GACD;AAAA,KACD;AAEF","sourcesContent":["import { Controller } from \"react-hook-form\";\nimport {\n\tField,\n\tInputField,\n\tSingleSelectField,\n\tSingleSelectOption,\n} from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport {\n\tdefaultClasses,\n\tdefaultColorScaleName,\n\tgetColorClasses,\n\tgetColorPalette,\n\tgetColorScale,\n} from \"../../../utils/colors\";\nimport ColorScaleSelect from \"../../ThematicLayerConfiguration/components/ColorScaleSelect\";\nimport React from \"react\";\n\nexport function ColorConfig() {\n\treturn (\n\t\t<div className=\"column gap-16\">\n\t\t\t<div className=\"row gap-8\">\n\t\t\t\t<Controller\n\t\t\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t\t\t<InputField\n\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\t\t\tvalue={field.value?.toString()}\n\t\t\t\t\t\t\tonChange={({ value }: { value?: string }) => {\n\t\t\t\t\t\t\t\tif (!value) return;\n\t\t\t\t\t\t\t\tfield.onChange(parseInt(value));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tlabel={i18n.t(\"Min\")}\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\tname={\"params.min\"}\n\t\t\t\t/>\n\t\t\t\t<Controller\n\t\t\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t\t\t<InputField\n\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\t\t\tvalue={field.value?.toString()}\n\t\t\t\t\t\t\tonChange={({ value }: { value?: string }) => {\n\t\t\t\t\t\t\t\tif (!value) return;\n\t\t\t\t\t\t\t\tfield.onChange(parseInt(value));\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tlabel={i18n.t(\"Max\")}\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\tname={\"params.max\"}\n\t\t\t\t/>\n\t\t\t\t<Controller\n\t\t\t\t\tname=\"params.palette\"\n\t\t\t\t\trender={({ field, fieldState }) => {\n\t\t\t\t\t\tconst palette = field.value;\n\t\t\t\t\t\tconst scale = getColorClasses(palette);\n\t\t\t\t\t\tconst colorClass = getColorScale(palette ?? \"\");\n\n\t\t\t\t\t\tconst onChange = ({\n\t\t\t\t\t\t\tselected,\n\t\t\t\t\t\t}: {\n\t\t\t\t\t\t\tselected: string;\n\t\t\t\t\t\t}) => {\n\t\t\t\t\t\t\tconst palette = getColorPalette(\n\t\t\t\t\t\t\t\tcolorClass as string,\n\t\t\t\t\t\t\t\tparseInt(selected),\n\t\t\t\t\t\t\t)?.join(\",\");\n\t\t\t\t\t\t\tfield.onChange(palette);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<SingleSelectField\n\t\t\t\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\t\tscale?.toString() ??\n\t\t\t\t\t\t\t\t\tdefaultClasses.toString()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabel={i18n.t(\"Steps\")}\n\t\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{[3, 4, 5, 6, 7, 8, 9].map((value) => (\n\t\t\t\t\t\t\t\t\t<SingleSelectOption\n\t\t\t\t\t\t\t\t\t\tkey={`${value}-classes-option`}\n\t\t\t\t\t\t\t\t\t\tlabel={`${value}`}\n\t\t\t\t\t\t\t\t\t\tvalue={value?.toString()}\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</SingleSelectField>\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<Controller\n\t\t\t\t\tname=\"params.palette\"\n\t\t\t\t\trender={({ field, fieldState }) => {\n\t\t\t\t\t\tconst palette = field.value;\n\t\t\t\t\t\tconst scale = getColorClasses(palette);\n\t\t\t\t\t\tconst colorClass = getColorScale(palette ?? \"\");\n\n\t\t\t\t\t\tconst onChange = (colorClass: string) => {\n\t\t\t\t\t\t\tconst palette = getColorPalette(\n\t\t\t\t\t\t\t\tcolorClass,\n\t\t\t\t\t\t\t\tscale,\n\t\t\t\t\t\t\t)?.join(\",\");\n\t\t\t\t\t\t\tfield.onChange(palette);\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Field\n\t\t\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\t\t\t\tlabel={i18n.t(\"Colors\")}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ColorScaleSelect\n\t\t\t\t\t\t\t\t\tcount={scale ?? defaultClasses}\n\t\t\t\t\t\t\t\t\tcolorClass={\n\t\t\t\t\t\t\t\t\t\tcolorClass ?? defaultColorScaleName\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\twidth={300}\n\t\t\t\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Field>\n\t\t\t\t\t\t);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/components/Map/components/EarthEngineLayerConfiguration/components/Name.tsx"],"names":[],"mappings":"AAqBI;AArBJ,SAAS,YAAY,sBAAsB;AAC3C,SAAgB,iBAAiB;AACjC,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAEjB,SAAS,OAAO;AACtB,QAAM,SAAS,QAAQ;AACvB,QAAM,EAAE,SAAS,IAAI,eAAe;AACpC,YAAU,MAAM;AACf,aAAS,QAAQ,QAAQ,IAAI;AAC7B,aAAS,MAAM,QAAQ,EAAE;AAAA,EAC1B,GAAG,CAAC,MAAM,CAAC;AAEX,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,OAAO;AAAA,QACN,UAAU,KAAK,EAAE,kBAAkB;AAAA,MACpC;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,WAAW,MAC5B;AAAA,QAAC;AAAA;AAAA,UACA,OAAO,KAAK,EAAE,YAAY;AAAA,UAC1B,MAAK;AAAA,UACL,UAAQ;AAAA,UACR,OAAO,QAAQ,WAAW,KAAK;AAAA,UAC/B,gBAAgB,WAAW,OAAO;AAAA,UAClC,UAAU,CAAC,EAAE,MAAM,MAA0B;AAC5C,gBAAI,CAAC;AAAO;AACZ,kBAAM,SAAS,KAAK;AAAA,UACrB;AAAA,UACA,OAAO,MAAM;AAAA;AAAA,MACd;AAAA;AAAA,EAEF;AAEF","sourcesContent":["import { Controller, useFormContext } from \"react-hook-form\";\nimport React, { useEffect } from \"react\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { InputField } from \"@dhis2/ui\";\nimport { useType } from \"../hooks/data\";\n\nexport function Name() {\n\tconst config = useType();\n\tconst { setValue } = useFormContext();\n\tuseEffect(() => {\n\t\tsetValue(\"name\", config?.name);\n\t\tsetValue(\"id\", config?.id);\n\t}, [config]);\n\n\treturn (\n\t\t<Controller\n\t\t\tname=\"name\"\n\t\t\trules={{\n\t\t\t\trequired: i18n.t(\"Name is required\"),\n\t\t\t}}\n\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t<InputField\n\t\t\t\t\tlabel={i18n.t(\"Layer name\")}\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\trequired\n\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\tonChange={({ value }: { value?: string }) => {\n\t\t\t\t\t\tif (!value) return;\n\t\t\t\t\t\tfield.onChange(value);\n\t\t\t\t\t}}\n\t\t\t\t\tvalue={field.value}\n\t\t\t\t/>\n\t\t\t)}\n\t\t/>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/components/Map/components/EarthEngineLayerConfiguration/components/PeriodSelector.tsx"],"names":[],"mappings":"AAkCK,cAaD,YAbC;AAlCL,SAAS,YAAY,sBAAsB;AAC3C,SAAgB,iBAAiB;AACjC,SAAS,MAAM,eAAe;AAC9B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,UAAU;AACjB,SAAS,gBAAgB,eAAe;AAEjC,SAAS,iBAAiB;AAChC,QAAM,SAAS,QAAQ;AACvB,QAAM,EAAE,UAAU,UAAU,IAAI,eAAe;AAC/C,QAAM,UAAU,QAAQ,WAAW,CAAC;AACp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OAAO,OAAO,SAAS;AAAA;AAAA,cAFlB,GAAG,MAAM;AAAA,YAGf,CACA;AAAA;AAAA,QACF,GACD;AAAA,QACC,WAAW,oBAAC,kBAAe,YAAU,MAAC;AAAA,SACxC;AAAA;AAAA,EAEF;AAEF","sourcesContent":["import { Controller, useFormContext } from \"react-hook-form\";\nimport React, { useEffect } from \"react\";\nimport { head, isEmpty } from \"lodash\";\nimport {\n\tCenter,\n\tCircularLoader,\n\tSingleSelectField,\n\tSingleSelectOption,\n} from \"@dhis2/ui\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { useDatasetInfo, useType } from \"../hooks/data\";\n\nexport function PeriodSelector() {\n\tconst config = useType();\n\tconst { setValue, getValues } = useFormContext();\n\tconst filters = config?.filters ?? [];\n\tconst hasPeriodFilter = filters.includes(\"period\");\n\tconst { loading, error, periods } = useDatasetInfo(hasPeriodFilter, config);\n\tconst initialPeriod = getValues(\"filters.period\");\n\n\tuseEffect(() => {\n\t\tif (!isEmpty(periods) && !initialPeriod) {\n\t\t\tsetValue(\"filters.period\", head(periods));\n\t\t}\n\t}, [periods]);\n\n\tif (!hasPeriodFilter) {\n\t\treturn null;\n\t}\n\n\tif (error) {\n\t\treturn (\n\t\t\t<div style={{ minWidth: \"100%\", minHeight: 100 }}>\n\t\t\t\t<Center>\n\t\t\t\t\t<p>{error?.message ?? error?.toString()}</p>\n\t\t\t\t</Center>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Controller\n\t\t\tname=\"filters.period\"\n\t\t\trules={{\n\t\t\t\trequired: i18n.t(\"Period is required\"),\n\t\t\t}}\n\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t<div style={{ gap: 4 }} className=\"row align-items-center\">\n\t\t\t\t\t<div style={{ flex: 1 }}>\n\t\t\t\t\t\t<SingleSelectField\n\t\t\t\t\t\t\thelpText={i18n.t(\n\t\t\t\t\t\t\t\t\"Available periods are set by the source data\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tloading={loading}\n\t\t\t\t\t\t\tfilterable\n\t\t\t\t\t\t\tlabel={i18n.t(\"Period\")}\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\t\t\tonChange={({ selected }: { selected: string }) =>\n\t\t\t\t\t\t\t\tfield.onChange(parseInt(selected))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\tperiods?.includes(field.value)\n\t\t\t\t\t\t\t\t\t? field.value?.toString()\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{periods?.map((period: number) => (\n\t\t\t\t\t\t\t\t<SingleSelectOption\n\t\t\t\t\t\t\t\t\tkey={`${period}-option`}\n\t\t\t\t\t\t\t\t\tvalue={period.toString()}\n\t\t\t\t\t\t\t\t\tlabel={period.toString()}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</SingleSelectField>\n\t\t\t\t\t</div>\n\t\t\t\t\t{loading && <CircularLoader extrasmall />}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t/>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/components/Map/components/EarthEngineLayerConfiguration/components/StylesConfig.tsx"],"names":[],"mappings":"AAgBI,SAGA,KAHA;AAhBJ,OAAO,UAAU;AACjB,SAAS,mBAAmB;AAE5B,SAAS,eAAe;AAEjB,SAAS,eAAe;AAC9B,QAAM,SAAS,QAAQ;AACvB,QAAM,YAAY,QAAQ,QAAQ,MAAM;AAExC,MAAI,CAAC,WAAW;AACf,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,SAAI,OAAO,EAAE,UAAU,KAAK,WAAW,IAAI,GAAG,WAAU,cACxD,+BAAC,SAAI,WAAU,UACd;AAAA,yBAAC,OACC;AAAA,WAAK,EAAE,MAAM;AAAA,MAAE;AAAA,MAAG,QAAQ;AAAA,OAC5B;AAAA,IACA,oBAAC,eAAY;AAAA,KACd,GACD;AAEF","sourcesContent":["import i18n from \"@dhis2/d2-i18n\";\nimport { ColorConfig } from \"./ColorConfig\";\nimport React from \"react\";\nimport { useType } from \"../hooks/data\";\n\nexport function StylesConfig() {\n\tconst config = useType();\n\tconst hasParams = Boolean(config?.params);\n\n\tif (!hasParams) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div style={{ minWidth: 200, minHeight: 100 }} className=\"row gap-16\">\n\t\t\t<div className=\"column\">\n\t\t\t\t<p>\n\t\t\t\t\t{i18n.t(\"Unit\")}: {config?.unit}\n\t\t\t\t</p>\n\t\t\t\t<ColorConfig />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../../src/components/Map/components/EarthEngineLayerConfiguration/components/TypeField.tsx"],"names":[],"mappings":"AA6DM;AA7DN,SAAS,QAAQ,YAAY;AAC7B;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,SAAS,YAAY,sBAAsB;AAC3C,OAAO,UAAU;AACjB,SAAS,mBAAmB,0BAA0B;AAG/C,SAAS,UAAU,EAAE,SAAS,GAA4B;AAChE,QAAM,kBAAkB;AAAA,IACvB;AAAA,IACA,CAAC,EAAE,GAAG,MACL,8BAA8B,SAAS,EAAE,KACzC,EAAE,UAAU,SAAS,EAAE,KAAK;AAAA,EAC9B;AACA,QAAM,EAAE,SAAS,IAAI,eAAe;AACpC,QAAM,oBAAoB,CAAC,aAAqB;AAC/C,UAAM,SAAS,KAAK,iBAAiB,CAAC,MAAM,QAAQ,CAAC;AACrD,QAAI,CAAC;AAAQ;AAEb,QAAI,QAAQ,qBAAqB;AAChC,eAAS,gBAAgB,QAAQ,mBAAmB;AAAA,IACrD,OAAO;AACN,eAAS,gBAAgB,MAAS;AAAA,IACnC;AAEA,QAAI,QAAQ,QAAQ;AACnB,YAAM,EAAE,KAAK,KAAK,QAAQ,IAAI,OAAO;AACrC,eAAS,cAAc,GAAG;AAC1B,eAAS,cAAc,GAAG;AAC1B,eAAS,kBAAkB,OAAO;AAAA,IACnC,OAAO;AACN,eAAS,UAAU,MAAS;AAAA,IAC7B;AAAA,EACD;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,OAAO;AAAA,QACN,UAAU,KAAK,EAAE,kBAAkB;AAAA,MACpC;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,WAAW,MAC5B;AAAA,QAAC;AAAA;AAAA,UACA,OAAO,KAAK,EAAE,YAAY;AAAA,UAC1B,UAAQ;AAAA,UACR,OAAO,QAAQ,WAAW,KAAK;AAAA,UAC/B,gBAAgB,WAAW,OAAO;AAAA,UAClC,UAAU,CAAC,EAAE,SAAS,MAA4B;AACjD,8BAAkB,QAAQ;AAC1B,kBAAM,SAAS,QAAQ;AAAA,UACxB;AAAA,UACA,UACC,QAAQ,KAAK,iBAAiB,MAAM,MAAM,KAAK,CAAC,IAC7C,MAAM,QACN;AAAA,UAGH,2BAAiB,IAAI,CAAC,UACtB;AAAA,YAAC;AAAA;AAAA,cAEA,OAAO,MAAM;AAAA,cACb,OAAO,MAAM;AAAA;AAAA,YAFR,GAAG,MAAM,EAAE;AAAA,UAGjB,CACA;AAAA;AAAA,MACF;AAAA;AAAA,EAEF;AAEF","sourcesContent":["import { filter, find } from \"lodash\";\nimport {\n\tEARTH_ENGINE_LAYERS,\n\tSUPPORTED_EARTH_ENGINE_LAYERS,\n} from \"../../MapLayer/components/GoogleEngineLayer/constants\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport i18n from \"@dhis2/d2-i18n\";\nimport { SingleSelectField, SingleSelectOption } from \"@dhis2/ui\";\nimport React from \"react\";\n\nexport function TypeField({ excluded }: { excluded?: string[] }) {\n\tconst supportedLayers = filter(\n\t\tEARTH_ENGINE_LAYERS,\n\t\t({ id }) =>\n\t\t\tSUPPORTED_EARTH_ENGINE_LAYERS.includes(id) &&\n\t\t\t!(excluded?.includes(id) ?? false),\n\t);\n\tconst { setValue } = useFormContext();\n\tconst setConfigDefaults = (selected: string) => {\n\t\tconst config = find(supportedLayers, [\"id\", selected]);\n\t\tif (!config) return;\n\n\t\tif (config?.defaultAggregations) {\n\t\t\tsetValue(\"aggregations\", config?.defaultAggregations);\n\t\t} else {\n\t\t\tsetValue(\"aggregations\", undefined);\n\t\t}\n\n\t\tif (config?.params) {\n\t\t\tconst { max, min, palette } = config.params;\n\t\t\tsetValue(\"params.max\", max);\n\t\t\tsetValue(\"params.min\", min);\n\t\t\tsetValue(\"params.palette\", palette);\n\t\t} else {\n\t\t\tsetValue(\"params\", undefined);\n\t\t}\n\t};\n\n\treturn (\n\t\t<Controller\n\t\t\tname=\"type\"\n\t\t\trules={{\n\t\t\t\trequired: i18n.t(\"Type is required\"),\n\t\t\t}}\n\t\t\trender={({ field, fieldState }) => (\n\t\t\t\t<SingleSelectField\n\t\t\t\t\tlabel={i18n.t(\"Layer type\")}\n\t\t\t\t\trequired\n\t\t\t\t\terror={Boolean(fieldState.error)}\n\t\t\t\t\tvalidationText={fieldState.error?.message}\n\t\t\t\t\tonChange={({ selected }: { selected: string }) => {\n\t\t\t\t\t\tsetConfigDefaults(selected);\n\t\t\t\t\t\tfield.onChange(selected);\n\t\t\t\t\t}}\n\t\t\t\t\tselected={\n\t\t\t\t\t\tBoolean(find(supportedLayers, \"id\", field.value))\n\t\t\t\t\t\t\t? field.value\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{supportedLayers?.map((layer) => (\n\t\t\t\t\t\t<SingleSelectOption\n\t\t\t\t\t\t\tkey={`${layer.id}-option`}\n\t\t\t\t\t\t\tvalue={layer.id}\n\t\t\t\t\t\t\tlabel={layer.name}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</SingleSelectField>\n\t\t\t)}\n\t\t/>\n\t);\n}\n"]}