@hisptz/dhis2-analytics 1.0.11 → 1.0.13

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 (239) hide show
  1. package/build/cjs/components/CustomPivotTable/CustomPivotTable.stories.js +69 -0
  2. package/build/cjs/components/CustomPivotTable/components/Table/index.js +16 -0
  3. package/build/cjs/components/CustomPivotTable/components/TableBody/TableBody.module.css +12 -0
  4. package/build/cjs/components/CustomPivotTable/components/TableBody/index.js +109 -0
  5. package/build/cjs/components/CustomPivotTable/components/TableHeaders/TableHeaders.module.css +10 -0
  6. package/build/cjs/components/CustomPivotTable/components/TableHeaders/index.js +89 -0
  7. package/build/cjs/components/CustomPivotTable/index.js +30 -0
  8. package/build/cjs/components/{PivotTable → CustomPivotTable}/interfaces/index.js +0 -0
  9. package/build/cjs/components/CustomPivotTable/services/engine.js +89 -0
  10. package/build/cjs/components/{PivotTable/components/PivotTableEngineContext.js → CustomPivotTable/state/engine.js} +11 -13
  11. package/build/cjs/dataProviders/map.js +1 -1
  12. package/build/cjs/index.js +4 -4
  13. package/build/cjs/locales/en/translations.json +0 -33
  14. package/build/es/components/CustomPivotTable/CustomPivotTable.stories.js +59 -0
  15. package/build/es/components/CustomPivotTable/components/Table/index.js +9 -0
  16. package/build/es/components/CustomPivotTable/components/TableBody/TableBody.module.css +12 -0
  17. package/build/es/components/CustomPivotTable/components/TableBody/index.js +100 -0
  18. package/build/es/components/CustomPivotTable/components/TableHeaders/TableHeaders.module.css +10 -0
  19. package/build/es/components/CustomPivotTable/components/TableHeaders/index.js +82 -0
  20. package/build/es/components/CustomPivotTable/index.js +22 -0
  21. package/build/es/components/{PivotTable → CustomPivotTable}/interfaces/index.js +0 -0
  22. package/build/es/components/CustomPivotTable/services/engine.js +82 -0
  23. package/build/es/components/CustomPivotTable/state/engine.js +14 -0
  24. package/build/es/dataProviders/map.js +1 -1
  25. package/build/es/index.js +1 -1
  26. package/build/es/locales/en/translations.json +0 -33
  27. package/build/types/{components → src/components}/ChartAnalytics/components/DownloadMenu/components/Menu.d.ts +0 -0
  28. package/build/types/{components → src/components}/ChartAnalytics/components/DownloadMenu/constants/menu.d.ts +0 -0
  29. package/build/types/{components → src/components}/ChartAnalytics/components/DownloadMenu/index.d.ts +0 -0
  30. package/build/types/{components → src/components}/ChartAnalytics/components/DownloadMenu/interfaces/menu.d.ts +0 -0
  31. package/build/types/{components → src/components}/ChartAnalytics/hooks/useChart.d.ts +0 -0
  32. package/build/types/{components → src/components}/ChartAnalytics/index.d.ts +0 -0
  33. package/build/types/{components → src/components}/ChartAnalytics/models/column.d.ts +0 -0
  34. package/build/types/{components → src/components}/ChartAnalytics/models/index.d.ts +0 -0
  35. package/build/types/{components → src/components}/ChartAnalytics/models/line.d.ts +0 -0
  36. package/build/types/{components → src/components}/ChartAnalytics/models/multi-series.d.ts +0 -0
  37. package/build/types/{components → src/components}/ChartAnalytics/models/pie.d.ts +0 -0
  38. package/build/types/{components → src/components}/ChartAnalytics/services/export.d.ts +0 -0
  39. package/build/types/{components → src/components}/ChartAnalytics/types/props.d.ts +0 -0
  40. package/build/types/{components → src/components}/ChartAnalytics/utils/chart.d.ts +0 -0
  41. package/build/types/{components → src/components}/CircularProgressDashboard/index.d.ts +0 -0
  42. package/build/types/{components → src/components}/CircularProgressDashboard/types/props.d.ts +0 -0
  43. package/build/types/src/components/CustomPivotTable/components/Table/index.d.ts +11 -0
  44. package/build/types/src/components/CustomPivotTable/components/TableBody/index.d.ts +2 -0
  45. package/build/types/src/components/CustomPivotTable/components/TableHeaders/index.d.ts +2 -0
  46. package/build/types/{components/PivotTable → src/components/CustomPivotTable}/index.d.ts +19 -5
  47. package/build/types/src/components/CustomPivotTable/interfaces/index.d.ts +1 -0
  48. package/build/types/src/components/CustomPivotTable/services/engine.d.ts +58 -0
  49. package/build/types/src/components/CustomPivotTable/state/engine.d.ts +7 -0
  50. package/build/types/{components → src/components}/Map/components/EarthEngineLayerConfiguration/index.d.ts +0 -0
  51. package/build/types/{components → src/components}/Map/components/MapArea/index.d.ts +0 -0
  52. package/build/types/{components → src/components}/Map/components/MapArea/interfaces/index.d.ts +0 -0
  53. package/build/types/{components → src/components}/Map/components/MapControls/components/CustomControl/index.d.ts +0 -0
  54. package/build/types/{components → src/components}/Map/components/MapControls/components/DownloadControl/index.d.ts +0 -0
  55. package/build/types/{components → src/components}/Map/components/MapControls/components/FullscreenControl/index.d.ts +0 -0
  56. package/build/types/{components → src/components}/Map/components/MapControls/index.d.ts +0 -0
  57. package/build/types/{components → src/components}/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.d.ts +0 -0
  58. package/build/types/{components → src/components}/Map/components/MapLayer/components/BoundaryLayer/index.d.ts +0 -0
  59. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.d.ts +0 -0
  60. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.d.ts +0 -0
  61. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.d.ts +0 -0
  62. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/index.d.ts +0 -0
  63. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.d.ts +0 -0
  64. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/services/api.d.ts +0 -0
  65. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.d.ts +0 -0
  66. package/build/types/{components → src/components}/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.d.ts +0 -0
  67. package/build/types/{components → src/components}/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.d.ts +0 -0
  68. package/build/types/{components → src/components}/Map/components/MapLayer/components/LegendArea/index.d.ts +0 -0
  69. package/build/types/{components → src/components}/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.d.ts +0 -0
  70. package/build/types/{components → src/components}/Map/components/MapLayer/components/PointLayer/hooks/index.d.ts +0 -0
  71. package/build/types/{components → src/components}/Map/components/MapLayer/components/PointLayer/index.d.ts +0 -0
  72. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.d.ts +0 -0
  73. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.d.ts +0 -0
  74. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.d.ts +0 -0
  75. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.d.ts +0 -0
  76. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.d.ts +0 -0
  77. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.d.ts +0 -0
  78. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.d.ts +0 -0
  79. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/hooks/config.d.ts +0 -0
  80. package/build/types/{components → src/components}/Map/components/MapLayer/components/ThematicLayer/index.d.ts +0 -0
  81. package/build/types/{components → src/components}/Map/components/MapLayer/index.d.ts +0 -0
  82. package/build/types/{components → src/components}/Map/components/MapLayer/interfaces/index.d.ts +0 -0
  83. package/build/types/{components → src/components}/Map/components/MapProvider/components/MapLayerProvider/hooks/index.d.ts +0 -0
  84. package/build/types/{components → src/components}/Map/components/MapProvider/components/MapLayerProvider/index.d.ts +0 -0
  85. package/build/types/{components → src/components}/Map/components/MapProvider/hooks/index.d.ts +0 -0
  86. package/build/types/{components → src/components}/Map/components/MapProvider/index.d.ts +0 -0
  87. package/build/types/{components → src/components}/Map/components/MapUpdater/index.d.ts +0 -0
  88. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.d.ts +0 -0
  89. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.d.ts +0 -0
  90. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.d.ts +0 -0
  91. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.d.ts +0 -0
  92. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.d.ts +0 -0
  93. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.d.ts +0 -0
  94. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.d.ts +0 -0
  95. package/build/types/{components → src/components}/Map/components/ThematicLayerConfiguration/index.d.ts +0 -0
  96. package/build/types/{components → src/components}/Map/constants/colors.d.ts +0 -0
  97. package/build/types/{components → src/components}/Map/constants/legendSet.d.ts +0 -0
  98. package/build/types/{components → src/components}/Map/hooks/map.d.ts +0 -0
  99. package/build/types/{components → src/components}/Map/index.d.ts +0 -0
  100. package/build/types/{components → src/components}/Map/interfaces/index.d.ts +0 -0
  101. package/build/types/{components → src/components}/Map/state/index.d.ts +0 -0
  102. package/build/types/{components → src/components}/Map/utils/colors.d.ts +0 -0
  103. package/build/types/{components → src/components}/Map/utils/helpers.d.ts +0 -0
  104. package/build/types/{components → src/components}/Map/utils/map.d.ts +0 -0
  105. package/build/types/{components → src/components}/SingleValueContainer/components/SingleValueItem/SingleValueItem.d.ts +0 -0
  106. package/build/types/{components → src/components}/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.d.ts +0 -0
  107. package/build/types/{components → src/components}/SingleValueContainer/index.d.ts +0 -0
  108. package/build/types/{components → src/components}/SingleValueContainer/types/props.d.ts +0 -0
  109. package/build/types/{dataProviders → src/dataProviders}/map.d.ts +0 -0
  110. package/build/types/{index.d.ts → src/index.d.ts} +1 -1
  111. package/package.json +4 -4
  112. package/build/cjs/components/PivotTable/PivotTable.stories.js +0 -277
  113. package/build/cjs/components/PivotTable/components/AssignedCategoriesIcon/index.js +0 -32
  114. package/build/cjs/components/PivotTable/components/PivotTable.js +0 -60
  115. package/build/cjs/components/PivotTable/components/PivotTableBody.js +0 -41
  116. package/build/cjs/components/PivotTable/components/PivotTableCell.js +0 -40
  117. package/build/cjs/components/PivotTable/components/PivotTableClippedAxis.js +0 -26
  118. package/build/cjs/components/PivotTable/components/PivotTableColumnHeaderCell.js +0 -71
  119. package/build/cjs/components/PivotTable/components/PivotTableColumnHeaders.js +0 -60
  120. package/build/cjs/components/PivotTable/components/PivotTableContainer.js +0 -33
  121. package/build/cjs/components/PivotTable/components/PivotTableDimensionLabelCell.js +0 -77
  122. package/build/cjs/components/PivotTable/components/PivotTableEmptyCell.js +0 -22
  123. package/build/cjs/components/PivotTable/components/PivotTableEmptyRow.js +0 -33
  124. package/build/cjs/components/PivotTable/components/PivotTableHead.js +0 -35
  125. package/build/cjs/components/PivotTable/components/PivotTableHeaderCell.js +0 -37
  126. package/build/cjs/components/PivotTable/components/PivotTableRow.js +0 -65
  127. package/build/cjs/components/PivotTable/components/PivotTableRowHeaderCell.js +0 -49
  128. package/build/cjs/components/PivotTable/components/PivotTableTitleRow.js +0 -52
  129. package/build/cjs/components/PivotTable/components/PivotTableTitleRows.js +0 -46
  130. package/build/cjs/components/PivotTable/components/PivotTableValueCell.js +0 -69
  131. package/build/cjs/components/PivotTable/constants/dataTypes.js +0 -129
  132. package/build/cjs/components/PivotTable/constants/pivotTable.js +0 -64
  133. package/build/cjs/components/PivotTable/constants/predefinedDimensions.js +0 -62
  134. package/build/cjs/components/PivotTable/constants/valueTypes.js +0 -55
  135. package/build/cjs/components/PivotTable/data/column-data.json +0 -210
  136. package/build/cjs/components/PivotTable/hooks/useParentSize.js +0 -41
  137. package/build/cjs/components/PivotTable/hooks/useScrollPosition.js +0 -38
  138. package/build/cjs/components/PivotTable/hooks/useSortableColumns.js +0 -34
  139. package/build/cjs/components/PivotTable/hooks/useTableClipping.js +0 -53
  140. package/build/cjs/components/PivotTable/index.js +0 -47
  141. package/build/cjs/components/PivotTable/services/adaptiveClippingController.js +0 -197
  142. package/build/cjs/components/PivotTable/services/engine.js +0 -901
  143. package/build/cjs/components/PivotTable/utils/getOuLevelAndGroupText.js +0 -71
  144. package/build/cjs/components/PivotTable/utils/index.js +0 -322
  145. package/build/cjs/components/PivotTable/utils/isColorBright.js +0 -29
  146. package/build/cjs/components/PivotTable/utils/layout/dimension.js +0 -61
  147. package/build/cjs/components/PivotTable/utils/layout/dimensionGetId.js +0 -12
  148. package/build/cjs/components/PivotTable/utils/layout/dimensionGetItems.js +0 -12
  149. package/build/cjs/components/PivotTable/utils/layout/dimensionIs.js +0 -9
  150. package/build/cjs/components/PivotTable/utils/layout/dimensionIsEmpty.js +0 -9
  151. package/build/cjs/components/PivotTable/utils/layout/dimensionIsValid.js +0 -25
  152. package/build/cjs/components/PivotTable/utils/legend.js +0 -40
  153. package/build/cjs/components/PivotTable/utils/ouIdHelper/index.js +0 -27
  154. package/build/cjs/data/map.json +0 -5984
  155. package/build/es/components/PivotTable/PivotTable.stories.js +0 -268
  156. package/build/es/components/PivotTable/components/AssignedCategoriesIcon/index.js +0 -24
  157. package/build/es/components/PivotTable/components/PivotTable.js +0 -51
  158. package/build/es/components/PivotTable/components/PivotTableBody.js +0 -33
  159. package/build/es/components/PivotTable/components/PivotTableCell.js +0 -32
  160. package/build/es/components/PivotTable/components/PivotTableClippedAxis.js +0 -18
  161. package/build/es/components/PivotTable/components/PivotTableColumnHeaderCell.js +0 -62
  162. package/build/es/components/PivotTable/components/PivotTableColumnHeaders.js +0 -52
  163. package/build/es/components/PivotTable/components/PivotTableContainer.js +0 -25
  164. package/build/es/components/PivotTable/components/PivotTableDimensionLabelCell.js +0 -68
  165. package/build/es/components/PivotTable/components/PivotTableEmptyCell.js +0 -14
  166. package/build/es/components/PivotTable/components/PivotTableEmptyRow.js +0 -25
  167. package/build/es/components/PivotTable/components/PivotTableEngineContext.js +0 -14
  168. package/build/es/components/PivotTable/components/PivotTableHead.js +0 -27
  169. package/build/es/components/PivotTable/components/PivotTableHeaderCell.js +0 -29
  170. package/build/es/components/PivotTable/components/PivotTableRow.js +0 -57
  171. package/build/es/components/PivotTable/components/PivotTableRowHeaderCell.js +0 -41
  172. package/build/es/components/PivotTable/components/PivotTableTitleRow.js +0 -42
  173. package/build/es/components/PivotTable/components/PivotTableTitleRows.js +0 -37
  174. package/build/es/components/PivotTable/components/PivotTableValueCell.js +0 -60
  175. package/build/es/components/PivotTable/constants/dataTypes.js +0 -98
  176. package/build/es/components/PivotTable/constants/pivotTable.js +0 -29
  177. package/build/es/components/PivotTable/constants/predefinedDimensions.js +0 -44
  178. package/build/es/components/PivotTable/constants/valueTypes.js +0 -27
  179. package/build/es/components/PivotTable/data/column-data.json +0 -210
  180. package/build/es/components/PivotTable/hooks/useParentSize.js +0 -33
  181. package/build/es/components/PivotTable/hooks/useScrollPosition.js +0 -30
  182. package/build/es/components/PivotTable/hooks/useSortableColumns.js +0 -27
  183. package/build/es/components/PivotTable/hooks/useTableClipping.js +0 -46
  184. package/build/es/components/PivotTable/index.js +0 -26
  185. package/build/es/components/PivotTable/services/adaptiveClippingController.js +0 -191
  186. package/build/es/components/PivotTable/services/engine.js +0 -894
  187. package/build/es/components/PivotTable/utils/getOuLevelAndGroupText.js +0 -63
  188. package/build/es/components/PivotTable/utils/index.js +0 -309
  189. package/build/es/components/PivotTable/utils/isColorBright.js +0 -22
  190. package/build/es/components/PivotTable/utils/layout/dimension.js +0 -48
  191. package/build/es/components/PivotTable/utils/layout/dimensionGetId.js +0 -5
  192. package/build/es/components/PivotTable/utils/layout/dimensionGetItems.js +0 -5
  193. package/build/es/components/PivotTable/utils/layout/dimensionIs.js +0 -2
  194. package/build/es/components/PivotTable/utils/layout/dimensionIsEmpty.js +0 -2
  195. package/build/es/components/PivotTable/utils/layout/dimensionIsValid.js +0 -18
  196. package/build/es/components/PivotTable/utils/legend.js +0 -27
  197. package/build/es/components/PivotTable/utils/ouIdHelper/index.js +0 -17
  198. package/build/es/data/map.json +0 -5984
  199. package/build/types/components/PivotTable/components/AssignedCategoriesIcon/index.d.ts +0 -3
  200. package/build/types/components/PivotTable/components/PivotTable.d.ts +0 -12
  201. package/build/types/components/PivotTable/components/PivotTableBody.d.ts +0 -7
  202. package/build/types/components/PivotTable/components/PivotTableCell.d.ts +0 -17
  203. package/build/types/components/PivotTable/components/PivotTableClippedAxis.d.ts +0 -7
  204. package/build/types/components/PivotTable/components/PivotTableColumnHeaderCell.d.ts +0 -13
  205. package/build/types/components/PivotTable/components/PivotTableColumnHeaders.d.ts +0 -11
  206. package/build/types/components/PivotTable/components/PivotTableContainer.d.ts +0 -8
  207. package/build/types/components/PivotTable/components/PivotTableDimensionLabelCell.d.ts +0 -13
  208. package/build/types/components/PivotTable/components/PivotTableEmptyCell.d.ts +0 -7
  209. package/build/types/components/PivotTable/components/PivotTableEmptyRow.d.ts +0 -5
  210. package/build/types/components/PivotTable/components/PivotTableEngineContext.d.ts +0 -8
  211. package/build/types/components/PivotTable/components/PivotTableHead.d.ts +0 -21
  212. package/build/types/components/PivotTable/components/PivotTableHeaderCell.d.ts +0 -22
  213. package/build/types/components/PivotTable/components/PivotTableRow.d.ts +0 -19
  214. package/build/types/components/PivotTable/components/PivotTableRowHeaderCell.d.ts +0 -8
  215. package/build/types/components/PivotTable/components/PivotTableTitleRow.d.ts +0 -21
  216. package/build/types/components/PivotTable/components/PivotTableTitleRows.d.ts +0 -12
  217. package/build/types/components/PivotTable/components/PivotTableValueCell.d.ts +0 -8
  218. package/build/types/components/PivotTable/constants/dataTypes.d.ts +0 -90
  219. package/build/types/components/PivotTable/constants/pivotTable.d.ts +0 -29
  220. package/build/types/components/PivotTable/constants/predefinedDimensions.d.ts +0 -80
  221. package/build/types/components/PivotTable/constants/valueTypes.d.ts +0 -22
  222. package/build/types/components/PivotTable/hooks/useParentSize.d.ts +0 -8
  223. package/build/types/components/PivotTable/hooks/useScrollPosition.d.ts +0 -5
  224. package/build/types/components/PivotTable/hooks/useSortableColumns.d.ts +0 -8
  225. package/build/types/components/PivotTable/hooks/useTableClipping.d.ts +0 -24
  226. package/build/types/components/PivotTable/interfaces/index.d.ts +0 -72
  227. package/build/types/components/PivotTable/services/adaptiveClippingController.d.ts +0 -44
  228. package/build/types/components/PivotTable/services/engine.d.ts +0 -252
  229. package/build/types/components/PivotTable/utils/getOuLevelAndGroupText.d.ts +0 -1
  230. package/build/types/components/PivotTable/utils/index.d.ts +0 -38
  231. package/build/types/components/PivotTable/utils/isColorBright.d.ts +0 -1
  232. package/build/types/components/PivotTable/utils/layout/dimension.d.ts +0 -35
  233. package/build/types/components/PivotTable/utils/layout/dimensionGetId.d.ts +0 -3
  234. package/build/types/components/PivotTable/utils/layout/dimensionGetItems.d.ts +0 -3
  235. package/build/types/components/PivotTable/utils/layout/dimensionIs.d.ts +0 -1
  236. package/build/types/components/PivotTable/utils/layout/dimensionIsEmpty.d.ts +0 -3
  237. package/build/types/components/PivotTable/utils/layout/dimensionIsValid.d.ts +0 -5
  238. package/build/types/components/PivotTable/utils/legend.d.ts +0 -11
  239. package/build/types/components/PivotTable/utils/ouIdHelper/index.d.ts +0 -10
@@ -1,129 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.dataTypeMap = exports.TOTALS = exports.SUB_GROUP_METRIC = exports.SUB_GROUP_DETAIL = exports.DIMENSION_TYPE_PROGRAM_INDICATOR = exports.DIMENSION_TYPE_PROGRAM_DATA_ELEMENT = exports.DIMENSION_TYPE_PROGRAM_ATTRIBUTE = exports.DIMENSION_TYPE_PERIOD = exports.DIMENSION_TYPE_ORGANISATION_UNIT_GROUP_SET = exports.DIMENSION_TYPE_ORGANISATION_UNIT = exports.DIMENSION_TYPE_INDICATOR = exports.DIMENSION_TYPE_EVENT_DATA_ITEM = exports.DIMENSION_TYPE_DATA_SET = exports.DIMENSION_TYPE_DATA_ELEMENT_OPERAND = exports.DIMENSION_TYPE_DATA_ELEMENT_GROUP_SET = exports.DIMENSION_TYPE_DATA_ELEMENT = exports.DIMENSION_TYPE_DATA = exports.DIMENSION_TYPE_CATEGORY_OPTION_GROUP_SET = exports.DIMENSION_TYPE_CATEGORY = exports.DIMENSION_TYPE_ALL = exports.DETAIL = exports.DEFAULT_DATATYPE_ID = void 0;
7
- exports.defaultGroupDetail = defaultGroupDetail;
8
- exports.defaultGroupId = defaultGroupId;
9
- var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- // @ts-nocheck
12
-
13
- const DIMENSION_TYPE_ALL = 'ALL';
14
- exports.DIMENSION_TYPE_ALL = DIMENSION_TYPE_ALL;
15
- const DIMENSION_TYPE_INDICATOR = 'INDICATOR';
16
- exports.DIMENSION_TYPE_INDICATOR = DIMENSION_TYPE_INDICATOR;
17
- const DIMENSION_TYPE_DATA_ELEMENT = 'DATA_ELEMENT';
18
- exports.DIMENSION_TYPE_DATA_ELEMENT = DIMENSION_TYPE_DATA_ELEMENT;
19
- const DIMENSION_TYPE_DATA_SET = 'DATA_SET';
20
- exports.DIMENSION_TYPE_DATA_SET = DIMENSION_TYPE_DATA_SET;
21
- const DIMENSION_TYPE_EVENT_DATA_ITEM = 'EVENT_DATA_ITEM';
22
- exports.DIMENSION_TYPE_EVENT_DATA_ITEM = DIMENSION_TYPE_EVENT_DATA_ITEM;
23
- const DIMENSION_TYPE_PROGRAM_INDICATOR = 'PROGRAM_INDICATOR';
24
- exports.DIMENSION_TYPE_PROGRAM_INDICATOR = DIMENSION_TYPE_PROGRAM_INDICATOR;
25
- const DIMENSION_TYPE_PROGRAM_DATA_ELEMENT = 'PROGRAM_DATA_ELEMENT';
26
- exports.DIMENSION_TYPE_PROGRAM_DATA_ELEMENT = DIMENSION_TYPE_PROGRAM_DATA_ELEMENT;
27
- const DIMENSION_TYPE_PROGRAM_ATTRIBUTE = 'PROGRAM_ATTRIBUTE';
28
- exports.DIMENSION_TYPE_PROGRAM_ATTRIBUTE = DIMENSION_TYPE_PROGRAM_ATTRIBUTE;
29
- const DIMENSION_TYPE_DATA_ELEMENT_OPERAND = 'DATA_ELEMENT_OPERAND';
30
- exports.DIMENSION_TYPE_DATA_ELEMENT_OPERAND = DIMENSION_TYPE_DATA_ELEMENT_OPERAND;
31
- const DIMENSION_TYPE_CATEGORY = 'CATEGORY';
32
- exports.DIMENSION_TYPE_CATEGORY = DIMENSION_TYPE_CATEGORY;
33
- const DIMENSION_TYPE_CATEGORY_OPTION_GROUP_SET = 'CATEGORY_OPTION_GROUP_SET';
34
- exports.DIMENSION_TYPE_CATEGORY_OPTION_GROUP_SET = DIMENSION_TYPE_CATEGORY_OPTION_GROUP_SET;
35
- const DIMENSION_TYPE_DATA_ELEMENT_GROUP_SET = 'DATA_ELEMENT_GROUP_SET';
36
- exports.DIMENSION_TYPE_DATA_ELEMENT_GROUP_SET = DIMENSION_TYPE_DATA_ELEMENT_GROUP_SET;
37
- const DIMENSION_TYPE_DATA = 'DATA_X';
38
- exports.DIMENSION_TYPE_DATA = DIMENSION_TYPE_DATA;
39
- const DIMENSION_TYPE_PERIOD = 'PERIOD';
40
- exports.DIMENSION_TYPE_PERIOD = DIMENSION_TYPE_PERIOD;
41
- const DIMENSION_TYPE_ORGANISATION_UNIT = 'ORGANISATION_UNIT';
42
- exports.DIMENSION_TYPE_ORGANISATION_UNIT = DIMENSION_TYPE_ORGANISATION_UNIT;
43
- const DIMENSION_TYPE_ORGANISATION_UNIT_GROUP_SET = 'ORGANISATION_UNIT_GROUP_SET';
44
- exports.DIMENSION_TYPE_ORGANISATION_UNIT_GROUP_SET = DIMENSION_TYPE_ORGANISATION_UNIT_GROUP_SET;
45
- const TOTALS = 'totals';
46
- exports.TOTALS = TOTALS;
47
- const DETAIL = 'detail';
48
- exports.DETAIL = DETAIL;
49
- const SUB_GROUP_DETAIL = 'DETAIL';
50
- exports.SUB_GROUP_DETAIL = SUB_GROUP_DETAIL;
51
- const SUB_GROUP_METRIC = 'METRIC';
52
- exports.SUB_GROUP_METRIC = SUB_GROUP_METRIC;
53
- const getProgramText = () => _d2I18n.default.t('Program');
54
- const getSelectProgramText = () => _d2I18n.default.t('Select a program');
55
- const dataTypeMap = {
56
- [DIMENSION_TYPE_INDICATOR]: {
57
- id: DIMENSION_TYPE_INDICATOR,
58
- getName: () => _d2I18n.default.t('Indicators'),
59
- getGroupLabel: () => _d2I18n.default.t('Indicator group'),
60
- defaultGroup: {
61
- id: DIMENSION_TYPE_ALL,
62
- getName: () => _d2I18n.default.t('All groups')
63
- },
64
- getItemName: () => _d2I18n.default.t('Indicator'),
65
- getGroupEmptyLabel: () => _d2I18n.default.t('No indicator groups found'),
66
- getGroupLoadingLabel: () => _d2I18n.default.t('Loading indicator groups')
67
- },
68
- [DIMENSION_TYPE_DATA_ELEMENT]: {
69
- id: DIMENSION_TYPE_DATA_ELEMENT,
70
- getName: () => _d2I18n.default.t('Data elements'),
71
- getGroupLabel: () => _d2I18n.default.t('Data element group'),
72
- defaultGroup: {
73
- id: DIMENSION_TYPE_ALL,
74
- getName: () => _d2I18n.default.t('All groups')
75
- },
76
- subGroup: SUB_GROUP_DETAIL,
77
- getItemName: () => _d2I18n.default.t('Data element'),
78
- getGroupEmptyLabel: () => _d2I18n.default.t('No data element groups found'),
79
- getGroupLoadingLabel: () => _d2I18n.default.t('Loading data element groups')
80
- },
81
- [DIMENSION_TYPE_DATA_SET]: {
82
- id: DIMENSION_TYPE_DATA_SET,
83
- getName: () => _d2I18n.default.t('Data sets'),
84
- getGroupLabel: () => _d2I18n.default.t('Data set'),
85
- defaultGroup: {
86
- id: DIMENSION_TYPE_ALL,
87
- getName: () => _d2I18n.default.t('All data sets')
88
- },
89
- subGroup: SUB_GROUP_METRIC,
90
- getItemName: () => _d2I18n.default.t('Data set'),
91
- getGroupEmptyLabel: () => _d2I18n.default.t('No data sets found'),
92
- getGroupLoadingLabel: () => _d2I18n.default.t('Loading data sets')
93
- },
94
- [DIMENSION_TYPE_EVENT_DATA_ITEM]: {
95
- id: DIMENSION_TYPE_EVENT_DATA_ITEM,
96
- getName: () => _d2I18n.default.t('Event data items'),
97
- getGroupLabel: getProgramText,
98
- getPlaceholder: getSelectProgramText,
99
- defaultGroup: {
100
- id: DIMENSION_TYPE_ALL,
101
- getName: () => _d2I18n.default.t('All programs')
102
- },
103
- getItemName: () => _d2I18n.default.t('Event data item'),
104
- getGroupEmptyLabel: () => _d2I18n.default.t('No programs found'),
105
- getGroupLoadingLabel: () => _d2I18n.default.t('Loading programs')
106
- },
107
- [DIMENSION_TYPE_PROGRAM_INDICATOR]: {
108
- id: DIMENSION_TYPE_PROGRAM_INDICATOR,
109
- getName: () => _d2I18n.default.t('Program indicators'),
110
- getGroupLabel: getProgramText,
111
- getPlaceholder: getSelectProgramText,
112
- defaultGroup: {
113
- id: DIMENSION_TYPE_ALL,
114
- getName: () => _d2I18n.default.t('All programs')
115
- },
116
- getItemName: () => _d2I18n.default.t('Program indicator'),
117
- getGroupEmptyLabel: () => _d2I18n.default.t('No programs found'),
118
- getGroupLoadingLabel: () => _d2I18n.default.t('Loading programs')
119
- }
120
- };
121
- exports.dataTypeMap = dataTypeMap;
122
- function defaultGroupId(dataType) {
123
- return dataTypeMap[dataType].defaultGroup ? dataTypeMap[dataType].defaultGroup.id : '';
124
- }
125
- function defaultGroupDetail(dataType) {
126
- return dataTypeMap[dataType].groupDetail ? dataTypeMap[dataType].groupDetail.default : '';
127
- }
128
- const DEFAULT_DATATYPE_ID = DIMENSION_TYPE_INDICATOR;
129
- exports.DEFAULT_DATATYPE_ID = DEFAULT_DATATYPE_ID;
@@ -1,64 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.WRAPPED_TEXT_LINE_HEIGHT = exports.WRAPPED_TEXT_JUSTIFY_BUFFER = exports.SORT_ORDER_DESCENDING = exports.SORT_ORDER_ASCENDING = exports.NUMBER_TYPE_VALUE = exports.NUMBER_TYPE_ROW_PERCENTAGE = exports.NUMBER_TYPE_COLUMN_PERCENTAGE = exports.FONT_SIZE_SMALL = exports.FONT_SIZE_OPTION_SMALL = exports.FONT_SIZE_OPTION_NORMAL = exports.FONT_SIZE_OPTION_LARGE = exports.FONT_SIZE_NORMAL = exports.FONT_SIZE_LARGE = exports.DISPLAY_DENSITY_PADDING_NORMAL = exports.DISPLAY_DENSITY_PADDING_COMPACT = exports.DISPLAY_DENSITY_PADDING_COMFORTABLE = exports.DISPLAY_DENSITY_OPTION_NORMAL = exports.DISPLAY_DENSITY_OPTION_COMPACT = exports.DISPLAY_DENSITY_OPTION_COMFORTABLE = exports.CLIPPED_CELL_MIN_SIZE = exports.CLIPPED_CELL_MAX_SIZE = exports.CLIPPED_AXIS_PARTITION_SIZE_PX = exports.CELL_TYPE_VALUE = exports.CELL_TYPE_TOTAL = exports.CELL_TYPE_SUBTOTAL = exports.BORDER_COLOR = exports.AGGREGATE_TYPE_SUM = exports.AGGREGATE_TYPE_NA = exports.AGGREGATE_TYPE_AVERAGE = void 0;
7
- const SORT_ORDER_ASCENDING = 1;
8
- exports.SORT_ORDER_ASCENDING = SORT_ORDER_ASCENDING;
9
- const SORT_ORDER_DESCENDING = -1;
10
- exports.SORT_ORDER_DESCENDING = SORT_ORDER_DESCENDING;
11
- const CELL_TYPE_VALUE = 'value';
12
- exports.CELL_TYPE_VALUE = CELL_TYPE_VALUE;
13
- const CELL_TYPE_SUBTOTAL = 'subtotal';
14
- exports.CELL_TYPE_SUBTOTAL = CELL_TYPE_SUBTOTAL;
15
- const CELL_TYPE_TOTAL = 'total';
16
- exports.CELL_TYPE_TOTAL = CELL_TYPE_TOTAL;
17
- const AGGREGATE_TYPE_SUM = 'SUM';
18
- exports.AGGREGATE_TYPE_SUM = AGGREGATE_TYPE_SUM;
19
- const AGGREGATE_TYPE_AVERAGE = 'AVERAGE';
20
- exports.AGGREGATE_TYPE_AVERAGE = AGGREGATE_TYPE_AVERAGE;
21
- const AGGREGATE_TYPE_NA = 'N/A';
22
- exports.AGGREGATE_TYPE_NA = AGGREGATE_TYPE_NA;
23
- const NUMBER_TYPE_VALUE = 'VALUE';
24
- exports.NUMBER_TYPE_VALUE = NUMBER_TYPE_VALUE;
25
- const NUMBER_TYPE_ROW_PERCENTAGE = 'ROW_PERCENTAGE';
26
- exports.NUMBER_TYPE_ROW_PERCENTAGE = NUMBER_TYPE_ROW_PERCENTAGE;
27
- const NUMBER_TYPE_COLUMN_PERCENTAGE = 'COLUMN_PERCENTAGE';
28
- exports.NUMBER_TYPE_COLUMN_PERCENTAGE = NUMBER_TYPE_COLUMN_PERCENTAGE;
29
- const BORDER_COLOR = '#b2b2b2';
30
- exports.BORDER_COLOR = BORDER_COLOR;
31
- const FONT_SIZE_OPTION_SMALL = 'SMALL';
32
- exports.FONT_SIZE_OPTION_SMALL = FONT_SIZE_OPTION_SMALL;
33
- const FONT_SIZE_SMALL = 10;
34
- exports.FONT_SIZE_SMALL = FONT_SIZE_SMALL;
35
- const FONT_SIZE_OPTION_NORMAL = 'NORMAL';
36
- exports.FONT_SIZE_OPTION_NORMAL = FONT_SIZE_OPTION_NORMAL;
37
- const FONT_SIZE_NORMAL = 11;
38
- exports.FONT_SIZE_NORMAL = FONT_SIZE_NORMAL;
39
- const FONT_SIZE_OPTION_LARGE = 'LARGE';
40
- exports.FONT_SIZE_OPTION_LARGE = FONT_SIZE_OPTION_LARGE;
41
- const FONT_SIZE_LARGE = 13;
42
- exports.FONT_SIZE_LARGE = FONT_SIZE_LARGE;
43
- const DISPLAY_DENSITY_OPTION_COMPACT = 'COMPACT';
44
- exports.DISPLAY_DENSITY_OPTION_COMPACT = DISPLAY_DENSITY_OPTION_COMPACT;
45
- const DISPLAY_DENSITY_PADDING_COMPACT = 4;
46
- exports.DISPLAY_DENSITY_PADDING_COMPACT = DISPLAY_DENSITY_PADDING_COMPACT;
47
- const DISPLAY_DENSITY_OPTION_NORMAL = 'NORMAL';
48
- exports.DISPLAY_DENSITY_OPTION_NORMAL = DISPLAY_DENSITY_OPTION_NORMAL;
49
- const DISPLAY_DENSITY_PADDING_NORMAL = 5;
50
- exports.DISPLAY_DENSITY_PADDING_NORMAL = DISPLAY_DENSITY_PADDING_NORMAL;
51
- const DISPLAY_DENSITY_OPTION_COMFORTABLE = 'COMFORTABLE';
52
- exports.DISPLAY_DENSITY_OPTION_COMFORTABLE = DISPLAY_DENSITY_OPTION_COMFORTABLE;
53
- const DISPLAY_DENSITY_PADDING_COMFORTABLE = 7;
54
- exports.DISPLAY_DENSITY_PADDING_COMFORTABLE = DISPLAY_DENSITY_PADDING_COMFORTABLE;
55
- const CLIPPED_CELL_MAX_SIZE = 360;
56
- exports.CLIPPED_CELL_MAX_SIZE = CLIPPED_CELL_MAX_SIZE;
57
- const CLIPPED_CELL_MIN_SIZE = 36;
58
- exports.CLIPPED_CELL_MIN_SIZE = CLIPPED_CELL_MIN_SIZE;
59
- const WRAPPED_TEXT_JUSTIFY_BUFFER = 25;
60
- exports.WRAPPED_TEXT_JUSTIFY_BUFFER = WRAPPED_TEXT_JUSTIFY_BUFFER;
61
- const WRAPPED_TEXT_LINE_HEIGHT = 1.0;
62
- exports.WRAPPED_TEXT_LINE_HEIGHT = WRAPPED_TEXT_LINE_HEIGHT;
63
- const CLIPPED_AXIS_PARTITION_SIZE_PX = 1000;
64
- exports.CLIPPED_AXIS_PARTITION_SIZE_PX = CLIPPED_AXIS_PARTITION_SIZE_PX;
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getPredefinedDimensions = exports.getPredefinedDimensionProp = exports.getFixedDimensions = exports.getDynamicDimensions = exports.getDimensionById = exports.filterOutPredefinedDimensions = exports.DIMENSION_PROP_NO_ITEMS = exports.DIMENSION_ID_PERIOD = exports.DIMENSION_ID_ORGUNIT = exports.DIMENSION_ID_DATA = exports.DIMENSION_ID_ASSIGNED_CATEGORIES = void 0;
7
- var _ui = require("@dhis2/ui");
8
- var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
9
- var _AssignedCategoriesIcon = _interopRequireDefault(require("../components/AssignedCategoriesIcon"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- const DIMENSION_ID_DATA = 'dx';
12
- exports.DIMENSION_ID_DATA = DIMENSION_ID_DATA;
13
- const DIMENSION_ID_PERIOD = 'pe';
14
- exports.DIMENSION_ID_PERIOD = DIMENSION_ID_PERIOD;
15
- const DIMENSION_ID_ORGUNIT = 'ou';
16
- exports.DIMENSION_ID_ORGUNIT = DIMENSION_ID_ORGUNIT;
17
- const DIMENSION_ID_ASSIGNED_CATEGORIES = 'co';
18
- exports.DIMENSION_ID_ASSIGNED_CATEGORIES = DIMENSION_ID_ASSIGNED_CATEGORIES;
19
- const DIMENSION_PROP_NO_ITEMS = 'noItems';
20
- exports.DIMENSION_PROP_NO_ITEMS = DIMENSION_PROP_NO_ITEMS;
21
- const getFixedDimensions = () => ({
22
- [DIMENSION_ID_DATA]: {
23
- id: DIMENSION_ID_DATA,
24
- name: _d2I18n.default.t('Data'),
25
- iconName: 'DataIcon',
26
- icon: _ui.IconDimensionData16
27
- },
28
- [DIMENSION_ID_PERIOD]: {
29
- id: DIMENSION_ID_PERIOD,
30
- name: _d2I18n.default.t('Period'),
31
- iconName: 'PeriodIcon',
32
- icon: _ui.IconClock16
33
- },
34
- [DIMENSION_ID_ORGUNIT]: {
35
- id: DIMENSION_ID_ORGUNIT,
36
- name: _d2I18n.default.t('Organisation unit'),
37
- iconName: 'OrgUnitIcon',
38
- icon: _ui.IconDimensionOrgUnit16
39
- }
40
- });
41
- exports.getFixedDimensions = getFixedDimensions;
42
- const getDynamicDimensions = () => ({
43
- [DIMENSION_ID_ASSIGNED_CATEGORIES]: {
44
- id: DIMENSION_ID_ASSIGNED_CATEGORIES,
45
- name: _d2I18n.default.t('Assigned Categories'),
46
- iconName: 'AssignedCategoriesIcon',
47
- icon: _AssignedCategoriesIcon.default,
48
- [DIMENSION_PROP_NO_ITEMS]: true
49
- }
50
- });
51
- exports.getDynamicDimensions = getDynamicDimensions;
52
- const getPredefinedDimensions = () => ({
53
- ...getFixedDimensions(),
54
- ...getDynamicDimensions()
55
- });
56
- exports.getPredefinedDimensions = getPredefinedDimensions;
57
- const filterOutPredefinedDimensions = dimensionIds => dimensionIds.filter(dimensionId => !Object.keys(getPredefinedDimensions()).includes(dimensionId));
58
- exports.filterOutPredefinedDimensions = filterOutPredefinedDimensions;
59
- const getPredefinedDimensionProp = (dimensionId, propName) => (getPredefinedDimensions()[dimensionId] || {})[propName];
60
- exports.getPredefinedDimensionProp = getPredefinedDimensionProp;
61
- const getDimensionById = dimensionId => getPredefinedDimensions()[dimensionId];
62
- exports.getDimensionById = getDimensionById;
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.isNumericValueType = exports.VALUE_TYPE_USERNAME = exports.VALUE_TYPE_URL = exports.VALUE_TYPE_UNIT_INTERVAL = exports.VALUE_TYPE_TRUE_ONLY = exports.VALUE_TYPE_TIME = exports.VALUE_TYPE_TEXT = exports.VALUE_TYPE_PHONE_NUMBER = exports.VALUE_TYPE_PERCENTAGE = exports.VALUE_TYPE_ORGANISATION_UNIT = exports.VALUE_TYPE_NUMBER = exports.VALUE_TYPE_LONG_TEXT = exports.VALUE_TYPE_LETTER = exports.VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE = exports.VALUE_TYPE_INTEGER_POSITIVE = exports.VALUE_TYPE_INTEGER_NEGATIVE = exports.VALUE_TYPE_INTEGER = exports.VALUE_TYPE_EMAIL = exports.VALUE_TYPE_DATETIME = exports.VALUE_TYPE_DATE = exports.VALUE_TYPE_BOOLEAN = exports.VALUE_TYPE_AGE = void 0;
7
- /* These types match the types in the backend
8
- https://github.com/dhis2/dhis2-core/blob/master/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
9
- */
10
-
11
- const VALUE_TYPE_NUMBER = 'NUMBER';
12
- exports.VALUE_TYPE_NUMBER = VALUE_TYPE_NUMBER;
13
- const VALUE_TYPE_UNIT_INTERVAL = 'UNIT_INTERVAL';
14
- exports.VALUE_TYPE_UNIT_INTERVAL = VALUE_TYPE_UNIT_INTERVAL;
15
- const VALUE_TYPE_PERCENTAGE = 'PERCENTAGE';
16
- exports.VALUE_TYPE_PERCENTAGE = VALUE_TYPE_PERCENTAGE;
17
- const VALUE_TYPE_INTEGER = 'INTEGER';
18
- exports.VALUE_TYPE_INTEGER = VALUE_TYPE_INTEGER;
19
- const VALUE_TYPE_INTEGER_POSITIVE = 'INTEGER_POSITIVE';
20
- exports.VALUE_TYPE_INTEGER_POSITIVE = VALUE_TYPE_INTEGER_POSITIVE;
21
- const VALUE_TYPE_INTEGER_NEGATIVE = 'INTEGER_NEGATIVE';
22
- exports.VALUE_TYPE_INTEGER_NEGATIVE = VALUE_TYPE_INTEGER_NEGATIVE;
23
- const VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE = 'INTEGER_ZERO_OR_POSITIVE';
24
- exports.VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE = VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE;
25
- const VALUE_TYPE_TEXT = 'TEXT';
26
- exports.VALUE_TYPE_TEXT = VALUE_TYPE_TEXT;
27
- const VALUE_TYPE_LONG_TEXT = 'LONG_TEXT';
28
- exports.VALUE_TYPE_LONG_TEXT = VALUE_TYPE_LONG_TEXT;
29
- const VALUE_TYPE_LETTER = 'LETTER';
30
- exports.VALUE_TYPE_LETTER = VALUE_TYPE_LETTER;
31
- const VALUE_TYPE_PHONE_NUMBER = 'PHONE_NUMBER';
32
- exports.VALUE_TYPE_PHONE_NUMBER = VALUE_TYPE_PHONE_NUMBER;
33
- const VALUE_TYPE_EMAIL = 'EMAIL';
34
- exports.VALUE_TYPE_EMAIL = VALUE_TYPE_EMAIL;
35
- const VALUE_TYPE_USERNAME = 'USERNAME';
36
- exports.VALUE_TYPE_USERNAME = VALUE_TYPE_USERNAME;
37
- const VALUE_TYPE_URL = 'URL';
38
- exports.VALUE_TYPE_URL = VALUE_TYPE_URL;
39
- const VALUE_TYPE_BOOLEAN = 'BOOLEAN';
40
- exports.VALUE_TYPE_BOOLEAN = VALUE_TYPE_BOOLEAN;
41
- const VALUE_TYPE_TRUE_ONLY = 'TRUE_ONLY';
42
- exports.VALUE_TYPE_TRUE_ONLY = VALUE_TYPE_TRUE_ONLY;
43
- const VALUE_TYPE_DATE = 'DATE';
44
- exports.VALUE_TYPE_DATE = VALUE_TYPE_DATE;
45
- const VALUE_TYPE_TIME = 'TIME';
46
- exports.VALUE_TYPE_TIME = VALUE_TYPE_TIME;
47
- const VALUE_TYPE_DATETIME = 'DATETIME';
48
- exports.VALUE_TYPE_DATETIME = VALUE_TYPE_DATETIME;
49
- const VALUE_TYPE_ORGANISATION_UNIT = 'ORGANISATION_UNIT';
50
- exports.VALUE_TYPE_ORGANISATION_UNIT = VALUE_TYPE_ORGANISATION_UNIT;
51
- const VALUE_TYPE_AGE = 'AGE';
52
- exports.VALUE_TYPE_AGE = VALUE_TYPE_AGE;
53
- const NUMERIC_VALUE_TYPES = [VALUE_TYPE_NUMBER, VALUE_TYPE_UNIT_INTERVAL, VALUE_TYPE_PERCENTAGE, VALUE_TYPE_INTEGER, VALUE_TYPE_INTEGER_POSITIVE, VALUE_TYPE_INTEGER_NEGATIVE, VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE];
54
- const isNumericValueType = type => NUMERIC_VALUE_TYPES.includes(type);
55
- exports.isNumericValueType = isNumericValueType;
@@ -1,210 +0,0 @@
1
- {
2
- "headers": [
3
- {
4
- "name": "dx",
5
- "column": "Data",
6
- "valueType": "TEXT",
7
- "type": "java.lang.String",
8
- "hidden": false,
9
- "meta": true
10
- },
11
- {
12
- "name": "ou",
13
- "column": "Organisation unit",
14
- "valueType": "TEXT",
15
- "type": "java.lang.String",
16
- "hidden": false,
17
- "meta": true
18
- },
19
- {
20
- "name": "value",
21
- "column": "Value",
22
- "valueType": "NUMBER",
23
- "type": "java.lang.Double",
24
- "hidden": false,
25
- "meta": false
26
- }
27
- ],
28
- "metaData": {
29
- "items": {
30
- "2022": {
31
- "name": "2022"
32
- },
33
- "KctpIIucige": {
34
- "name": "Selenga"
35
- },
36
- "YmmeuGbqOwR": {
37
- "name": "Gbo"
38
- },
39
- "daJPPxtIrQn": {
40
- "name": "Jaiama Bongor"
41
- },
42
- "tTUf91fCytl": {
43
- "uid": "tTUf91fCytl",
44
- "name": "Chiefdom"
45
- },
46
- "ou": {
47
- "name": "Organisation unit"
48
- },
49
- "sxRd2XOzFbz": {
50
- "name": "Tikonko"
51
- },
52
- "THIS_YEAR": {
53
- "name": "This year"
54
- },
55
- "O6uvpzGd5pu": {
56
- "uid": "O6uvpzGd5pu",
57
- "code": "OU_264",
58
- "name": "Bo"
59
- },
60
- "U6Kr7Gtpidn": {
61
- "name": "Kakua"
62
- },
63
- "YuQRtpLP10I": {
64
- "name": "Badjia"
65
- },
66
- "zFDYIgyGmXG": {
67
- "name": "Bargbo"
68
- },
69
- "I4jWcnFmgEC": {
70
- "name": "Niawa Lenga"
71
- },
72
- "dx": {
73
- "name": "Data"
74
- },
75
- "BGGmAwx33dj": {
76
- "name": "Bumpe Ngao"
77
- },
78
- "pe": {
79
- "name": "Period"
80
- },
81
- "Uvn6LCg7dVU": {
82
- "name": "ANC 1 Coverage"
83
- },
84
- "ARZ4y5i4reU": {
85
- "name": "Wonde"
86
- },
87
- "JdhagCUEMbj": {
88
- "name": "Komboya"
89
- },
90
- "vWbkYPRmKyS": {
91
- "name": "Baoma"
92
- },
93
- "dGheVylzol6": {
94
- "name": "Bargbe"
95
- },
96
- "kU8vhUkAGaT": {
97
- "name": "Lugbu"
98
- },
99
- "npWGUj37qDe": {
100
- "name": "Valunia"
101
- }
102
- },
103
- "dimensions": {
104
- "dx": [
105
- "Uvn6LCg7dVU"
106
- ],
107
- "pe": [
108
- "2022"
109
- ],
110
- "ou": [
111
- "YuQRtpLP10I",
112
- "vWbkYPRmKyS",
113
- "dGheVylzol6",
114
- "zFDYIgyGmXG",
115
- "BGGmAwx33dj",
116
- "YmmeuGbqOwR",
117
- "daJPPxtIrQn",
118
- "U6Kr7Gtpidn",
119
- "JdhagCUEMbj",
120
- "kU8vhUkAGaT",
121
- "I4jWcnFmgEC",
122
- "KctpIIucige",
123
- "sxRd2XOzFbz",
124
- "npWGUj37qDe",
125
- "ARZ4y5i4reU"
126
- ],
127
- "co": []
128
- }
129
- },
130
- "rows": [
131
- [
132
- "Uvn6LCg7dVU",
133
- "YuQRtpLP10I",
134
- "304.1"
135
- ],
136
- [
137
- "Uvn6LCg7dVU",
138
- "vWbkYPRmKyS",
139
- "213.7"
140
- ],
141
- [
142
- "Uvn6LCg7dVU",
143
- "dGheVylzol6",
144
- "126.5"
145
- ],
146
- [
147
- "Uvn6LCg7dVU",
148
- "zFDYIgyGmXG",
149
- "206.4"
150
- ],
151
- [
152
- "Uvn6LCg7dVU",
153
- "BGGmAwx33dj",
154
- "120.9"
155
- ],
156
- [
157
- "Uvn6LCg7dVU",
158
- "YmmeuGbqOwR",
159
- "203.1"
160
- ],
161
- [
162
- "Uvn6LCg7dVU",
163
- "daJPPxtIrQn",
164
- "89.3"
165
- ],
166
- [
167
- "Uvn6LCg7dVU",
168
- "U6Kr7Gtpidn",
169
- "104.4"
170
- ],
171
- [
172
- "Uvn6LCg7dVU",
173
- "JdhagCUEMbj",
174
- "187.1"
175
- ],
176
- [
177
- "Uvn6LCg7dVU",
178
- "kU8vhUkAGaT",
179
- "96.1"
180
- ],
181
- [
182
- "Uvn6LCg7dVU",
183
- "I4jWcnFmgEC",
184
- "147.9"
185
- ],
186
- [
187
- "Uvn6LCg7dVU",
188
- "KctpIIucige",
189
- "91.1"
190
- ],
191
- [
192
- "Uvn6LCg7dVU",
193
- "sxRd2XOzFbz",
194
- "203.2"
195
- ],
196
- [
197
- "Uvn6LCg7dVU",
198
- "npWGUj37qDe",
199
- "95.7"
200
- ],
201
- [
202
- "Uvn6LCg7dVU",
203
- "ARZ4y5i4reU",
204
- "84.3"
205
- ]
206
- ],
207
- "height": 15,
208
- "width": 3,
209
- "headerWidth": 3
210
- }
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useParentSize = void 0;
7
- var _react = require("react");
8
- var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- const initialState = {
11
- width: 0,
12
- height: 0
13
- };
14
- const useParentSize = function (elementRef, renderCounter) {
15
- let initialSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : initialState;
16
- const [size, setSize] = (0, _react.useState)({
17
- width: initialSize.width || 0,
18
- height: initialSize.height || 0
19
- });
20
- (0, _react.useEffect)(() => {
21
- const el = elementRef.current && elementRef.current.parentElement;
22
- if (!el) {
23
- return;
24
- }
25
- const onResize = () => {
26
- setSize({
27
- width: el.clientWidth,
28
- height: el.clientHeight
29
- });
30
- };
31
- onResize();
32
- if (renderCounter) {
33
- setSize(initialState);
34
- }
35
- const observer = new _resizeObserverPolyfill.default(onResize);
36
- observer.observe(el);
37
- return () => observer.disconnect();
38
- }, [elementRef, renderCounter]);
39
- return size;
40
- };
41
- exports.useParentSize = useParentSize;
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useScrollPosition = void 0;
7
- var _debounce = _interopRequireDefault(require("lodash/debounce"));
8
- var _react = require("react");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- const useScrollPosition = function (containerRef) {
11
- let debounceWait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
12
- const [scrollPosition, setScrollPosition] = (0, _react.useState)({
13
- x: 0,
14
- y: 0
15
- });
16
- const onScroll = (0, _react.useCallback)((0, _debounce.default)(() => {
17
- if (!containerRef.current) {
18
- return;
19
- }
20
- const scroll = {
21
- x: containerRef.current.scrollLeft,
22
- y: containerRef.current.scrollTop
23
- };
24
- setScrollPosition(scroll);
25
- }, debounceWait), [containerRef, debounceWait]);
26
- (0, _react.useEffect)(() => {
27
- const currentRef = containerRef.current;
28
- if (!currentRef) {
29
- return;
30
- }
31
- currentRef.addEventListener('scroll', onScroll);
32
- return () => {
33
- currentRef.removeEventListener('scroll', onScroll);
34
- };
35
- }, [containerRef, onScroll]);
36
- return scrollPosition;
37
- };
38
- exports.useScrollPosition = useScrollPosition;
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useSortableColumns = void 0;
7
- var _react = require("react");
8
- var _pivotTable = require("../constants/pivotTable");
9
- const useSortableColumns = engine => {
10
- const [sortBy, setSortBy] = (0, _react.useState)(null);
11
- const onSortByColumn = column => {
12
- let order = _pivotTable.SORT_ORDER_ASCENDING;
13
- if (sortBy && sortBy.column === column) {
14
- if (sortBy.order === _pivotTable.SORT_ORDER_ASCENDING) {
15
- order = _pivotTable.SORT_ORDER_DESCENDING;
16
- } else if (sortBy.order === _pivotTable.SORT_ORDER_DESCENDING) {
17
- engine.clearSort();
18
- setSortBy(null);
19
- return;
20
- }
21
- }
22
- engine.sort(column, order);
23
- setSortBy({
24
- column,
25
- order
26
- }); // Force a re-render
27
- };
28
-
29
- return {
30
- sortBy,
31
- onSortByColumn
32
- };
33
- };
34
- exports.useSortableColumns = useSortableColumns;