@hisptz/dhis2-analytics 1.0.4 → 1.0.6

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 (293) hide show
  1. package/build/cjs/components/ChartAnalytics/ChartAnalytics.stories.js +253 -0
  2. package/build/cjs/components/ChartAnalytics/ChartAnalytics.test.js +51 -0
  3. package/build/cjs/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +48 -0
  4. package/build/cjs/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +34 -0
  5. package/build/cjs/components/ChartAnalytics/components/DownloadMenu/index.js +67 -0
  6. package/build/cjs/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +1 -0
  7. package/{src → build/cjs}/components/ChartAnalytics/data/column-data.json +0 -0
  8. package/{src → build/cjs}/components/ChartAnalytics/data/complex-multi-series-data.json +0 -0
  9. package/{src → build/cjs}/components/ChartAnalytics/data/multi-series-data.json +0 -0
  10. package/{src → build/cjs}/components/ChartAnalytics/data/pie-data.json +0 -0
  11. package/{src → build/cjs}/components/ChartAnalytics/data/stacked-chart-data.json +0 -0
  12. package/build/cjs/components/ChartAnalytics/hooks/useChart.js +38 -0
  13. package/build/cjs/components/ChartAnalytics/index.js +69 -0
  14. package/build/cjs/components/ChartAnalytics/models/column.js +53 -0
  15. package/build/cjs/components/ChartAnalytics/models/index.js +102 -0
  16. package/build/cjs/components/ChartAnalytics/models/line.js +35 -0
  17. package/build/cjs/components/ChartAnalytics/models/multi-series.js +111 -0
  18. package/build/cjs/components/ChartAnalytics/models/pie.js +53 -0
  19. package/build/cjs/components/ChartAnalytics/services/export.js +50 -0
  20. package/{src → build/cjs}/components/ChartAnalytics/styles/custom-highchart.css +0 -0
  21. package/build/cjs/components/ChartAnalytics/types/props.js +1 -0
  22. package/build/cjs/components/ChartAnalytics/utils/chart.js +133 -0
  23. package/build/cjs/components/CircularProgressDashboard/CircularProgressIndicator.stories.js +45 -0
  24. package/build/cjs/components/CircularProgressDashboard/CircularProgressIndicator.test.js +13 -0
  25. package/build/cjs/components/CircularProgressDashboard/index.js +49 -0
  26. package/build/cjs/components/CircularProgressDashboard/types/props.js +1 -0
  27. package/build/cjs/components/Map/Map.stories.js +352 -0
  28. package/build/cjs/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +32 -0
  29. package/build/cjs/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +40 -0
  30. package/build/cjs/components/Map/components/EarthEngineLayerConfiguration/index.js +458 -0
  31. package/build/cjs/components/Map/components/MapArea/index.js +101 -0
  32. package/build/cjs/components/Map/components/MapArea/interfaces/index.js +1 -0
  33. package/build/cjs/components/Map/components/MapControls/components/CustomControl/index.js +32 -0
  34. package/build/cjs/components/Map/components/MapControls/components/DownloadControl/index.js +25 -0
  35. package/build/cjs/components/Map/components/MapControls/components/FullscreenControl/index.js +13 -0
  36. package/build/cjs/components/Map/components/MapControls/index.js +42 -0
  37. package/build/cjs/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +13 -0
  38. package/build/cjs/components/Map/components/MapLayer/components/BoundaryLayer/index.js +51 -0
  39. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +106 -0
  40. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +379 -0
  41. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +36 -0
  42. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +200 -0
  43. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +1 -0
  44. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +10 -0
  45. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +412 -0
  46. package/build/cjs/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +124 -0
  47. package/{src → build/cjs}/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css +0 -0
  48. package/build/cjs/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +26 -0
  49. package/build/cjs/components/Map/components/MapLayer/components/LegendArea/index.js +181 -0
  50. package/build/cjs/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +86 -0
  51. package/build/cjs/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +14 -0
  52. package/build/cjs/components/Map/components/MapLayer/components/PointLayer/index.js +46 -0
  53. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +57 -0
  54. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js +145 -0
  55. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +43 -0
  56. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +56 -0
  57. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +61 -0
  58. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +43 -0
  59. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +35 -0
  60. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +15 -0
  61. package/build/cjs/components/Map/components/MapLayer/components/ThematicLayer/index.js +57 -0
  62. package/{src → build/cjs}/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +0 -0
  63. package/build/cjs/components/Map/components/MapLayer/index.js +40 -0
  64. package/build/cjs/components/Map/components/MapLayer/interfaces/index.js +8 -0
  65. package/build/cjs/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +389 -0
  66. package/build/cjs/components/Map/components/MapProvider/components/MapLayerProvider/index.js +116 -0
  67. package/build/cjs/components/Map/components/MapProvider/hooks/index.js +19 -0
  68. package/build/cjs/components/Map/components/MapProvider/index.js +121 -0
  69. package/build/cjs/components/Map/components/MapUpdater/index.js +24 -0
  70. package/build/cjs/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +32 -0
  71. package/build/cjs/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +40 -0
  72. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +40 -0
  73. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js +428 -0
  74. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +63 -0
  75. package/{src → build/cjs}/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css +0 -0
  76. package/{src → build/cjs}/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css +0 -0
  77. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +72 -0
  78. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +71 -0
  79. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +47 -0
  80. package/build/cjs/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +79 -0
  81. package/build/cjs/components/Map/components/ThematicLayerConfiguration/index.js +265 -0
  82. package/build/cjs/components/Map/constants/colors.js +428 -0
  83. package/build/cjs/components/Map/constants/legendSet.js +22 -0
  84. package/build/cjs/components/Map/hooks/map.js +52 -0
  85. package/build/cjs/components/Map/index.js +108 -0
  86. package/build/cjs/components/Map/interfaces/index.js +1 -0
  87. package/build/cjs/components/Map/state/index.js +23 -0
  88. package/build/cjs/components/Map/utils/colors.js +78 -0
  89. package/build/cjs/components/Map/utils/helpers.js +25 -0
  90. package/build/cjs/components/Map/utils/map.js +161 -0
  91. package/build/cjs/components/SingleValueContainer/SingleValueContainer.stories.js +127 -0
  92. package/build/cjs/components/SingleValueContainer/SingleValueContainer.test.js +23 -0
  93. package/build/cjs/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +54 -0
  94. package/build/cjs/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +24 -0
  95. package/build/cjs/components/SingleValueContainer/index.js +43 -0
  96. package/{src → build/cjs}/components/SingleValueContainer/styles/SingleValueContainer.module.css +0 -0
  97. package/build/cjs/components/SingleValueContainer/types/props.js +1 -0
  98. package/{src → build/cjs}/data/map.json +0 -0
  99. package/build/cjs/dataProviders/map.js +31 -0
  100. package/build/cjs/index.js +49 -0
  101. package/build/cjs/index.test.js +7 -0
  102. package/build/cjs/locales/en/translations.json +128 -0
  103. package/build/cjs/locales/index.js +22 -0
  104. package/build/es/components/ChartAnalytics/ChartAnalytics.stories.js +235 -0
  105. package/build/es/components/ChartAnalytics/ChartAnalytics.test.js +46 -0
  106. package/build/es/components/ChartAnalytics/components/DownloadMenu/components/Menu.js +41 -0
  107. package/build/es/components/ChartAnalytics/components/DownloadMenu/constants/menu.js +26 -0
  108. package/build/es/components/ChartAnalytics/components/DownloadMenu/index.js +58 -0
  109. package/build/es/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.js +1 -0
  110. package/build/es/components/ChartAnalytics/data/column-data.json +210 -0
  111. package/build/es/components/ChartAnalytics/data/complex-multi-series-data.json +124 -0
  112. package/build/es/components/ChartAnalytics/data/multi-series-data.json +536 -0
  113. package/build/es/components/ChartAnalytics/data/pie-data.json +115 -0
  114. package/build/es/components/ChartAnalytics/data/stacked-chart-data.json +415 -0
  115. package/build/es/components/ChartAnalytics/hooks/useChart.js +32 -0
  116. package/build/es/components/ChartAnalytics/index.js +40 -0
  117. package/build/es/components/ChartAnalytics/models/column.js +45 -0
  118. package/build/es/components/ChartAnalytics/models/index.js +95 -0
  119. package/build/es/components/ChartAnalytics/models/line.js +28 -0
  120. package/build/es/components/ChartAnalytics/models/multi-series.js +104 -0
  121. package/build/es/components/ChartAnalytics/models/pie.js +46 -0
  122. package/build/es/components/ChartAnalytics/services/export.js +36 -0
  123. package/build/es/components/ChartAnalytics/styles/custom-highchart.css +48 -0
  124. package/build/es/components/ChartAnalytics/types/props.js +1 -0
  125. package/build/es/components/ChartAnalytics/utils/chart.js +122 -0
  126. package/{src/components/CircularProgressDashboard/CircularProgressIndicator.stories.tsx → build/es/components/CircularProgressDashboard/CircularProgressIndicator.stories.js} +9 -16
  127. package/build/es/components/CircularProgressDashboard/CircularProgressIndicator.test.js +10 -0
  128. package/build/es/components/CircularProgressDashboard/index.js +41 -0
  129. package/build/es/components/CircularProgressDashboard/types/props.js +1 -0
  130. package/build/es/components/Map/Map.stories.js +334 -0
  131. package/build/es/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.js +23 -0
  132. package/build/es/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.js +31 -0
  133. package/build/es/components/Map/components/EarthEngineLayerConfiguration/index.js +448 -0
  134. package/build/es/components/Map/components/MapArea/index.js +91 -0
  135. package/build/es/components/Map/components/MapArea/interfaces/index.js +1 -0
  136. package/build/es/components/Map/components/MapControls/components/CustomControl/index.js +25 -0
  137. package/build/es/components/Map/components/MapControls/components/DownloadControl/index.js +18 -0
  138. package/build/es/components/Map/components/MapControls/components/FullscreenControl/index.js +6 -0
  139. package/build/es/components/Map/components/MapControls/index.js +35 -0
  140. package/build/es/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.js +7 -0
  141. package/build/es/components/Map/components/MapLayer/components/BoundaryLayer/index.js +41 -0
  142. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.js +95 -0
  143. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.js +369 -0
  144. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.js +29 -0
  145. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/index.js +191 -0
  146. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.js +1 -0
  147. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +10 -0
  148. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.js +403 -0
  149. package/build/es/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.js +111 -0
  150. package/build/es/components/Map/components/MapLayer/components/LegendArea/LegendArea.module.css +12 -0
  151. package/build/es/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.js +19 -0
  152. package/build/es/components/Map/components/MapLayer/components/LegendArea/index.js +172 -0
  153. package/build/es/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.js +76 -0
  154. package/build/es/components/Map/components/MapLayer/components/PointLayer/hooks/index.js +8 -0
  155. package/build/es/components/Map/components/MapLayer/components/PointLayer/index.js +39 -0
  156. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.js +49 -0
  157. package/{src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.tsx → build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubbles.js} +57 -74
  158. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.js +33 -0
  159. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.js +47 -0
  160. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.js +50 -0
  161. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.js +36 -0
  162. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.js +28 -0
  163. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.js +9 -0
  164. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/index.js +50 -0
  165. package/build/es/components/Map/components/MapLayer/components/ThematicLayer/styles/legends.css +62 -0
  166. package/build/es/components/Map/components/MapLayer/index.js +33 -0
  167. package/build/es/components/Map/components/MapLayer/interfaces/index.js +1 -0
  168. package/build/es/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.js +381 -0
  169. package/build/es/components/Map/components/MapProvider/components/MapLayerProvider/index.js +107 -0
  170. package/{src/components/Map/components/MapProvider/hooks/index.ts → build/es/components/Map/components/MapProvider/hooks/index.js} +3 -6
  171. package/build/es/components/Map/components/MapProvider/index.js +112 -0
  172. package/build/es/components/Map/components/MapUpdater/index.js +17 -0
  173. package/build/es/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.js +23 -0
  174. package/build/es/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.js +31 -0
  175. package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.js +33 -0
  176. package/{src/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.ts → build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/constants/colors.js} +46 -59
  177. package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.js +53 -0
  178. package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScale.module.css +15 -0
  179. package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/styles/ColorScaleSelect.module.css +12 -0
  180. package/build/es/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.js +56 -0
  181. package/build/es/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.js +64 -0
  182. package/build/es/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.js +38 -0
  183. package/build/es/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.js +70 -0
  184. package/build/es/components/Map/components/ThematicLayerConfiguration/index.js +254 -0
  185. package/{src/components/Map/constants/colors.ts → build/es/components/Map/constants/colors.js} +46 -59
  186. package/build/es/components/Map/constants/legendSet.js +15 -0
  187. package/build/es/components/Map/hooks/map.js +44 -0
  188. package/build/es/components/Map/index.js +51 -0
  189. package/build/es/components/Map/interfaces/index.js +1 -0
  190. package/build/es/components/Map/state/index.js +14 -0
  191. package/build/es/components/Map/utils/colors.js +61 -0
  192. package/build/es/components/Map/utils/helpers.js +14 -0
  193. package/build/es/components/Map/utils/map.js +147 -0
  194. package/build/es/components/SingleValueContainer/SingleValueContainer.stories.js +115 -0
  195. package/build/es/components/SingleValueContainer/SingleValueContainer.test.js +20 -0
  196. package/build/es/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.js +47 -0
  197. package/build/es/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.js +17 -0
  198. package/build/es/components/SingleValueContainer/index.js +29 -0
  199. package/build/es/components/SingleValueContainer/styles/SingleValueContainer.module.css +39 -0
  200. package/build/es/components/SingleValueContainer/types/props.js +1 -0
  201. package/build/es/data/map.json +5984 -0
  202. package/build/es/dataProviders/map.js +24 -0
  203. package/{src/index.ts → build/es/index.js} +1 -0
  204. package/build/es/index.test.js +6 -0
  205. package/build/es/locales/en/translations.json +128 -0
  206. package/build/es/locales/index.js +13 -0
  207. package/package.json +21 -4
  208. package/d2.config.js +0 -8
  209. package/i18n/en.pot +0 -409
  210. package/src/components/ChartAnalytics/ChartAnalytics.stories.tsx +0 -250
  211. package/src/components/ChartAnalytics/ChartAnalytics.test.tsx +0 -51
  212. package/src/components/ChartAnalytics/components/DownloadMenu/components/Menu.tsx +0 -48
  213. package/src/components/ChartAnalytics/components/DownloadMenu/constants/menu.ts +0 -38
  214. package/src/components/ChartAnalytics/components/DownloadMenu/index.tsx +0 -67
  215. package/src/components/ChartAnalytics/components/DownloadMenu/interfaces/menu.ts +0 -1
  216. package/src/components/ChartAnalytics/hooks/useChart.ts +0 -35
  217. package/src/components/ChartAnalytics/index.tsx +0 -23
  218. package/src/components/ChartAnalytics/models/column.ts +0 -50
  219. package/src/components/ChartAnalytics/models/index.ts +0 -78
  220. package/src/components/ChartAnalytics/models/line.ts +0 -31
  221. package/src/components/ChartAnalytics/models/multi-series.ts +0 -115
  222. package/src/components/ChartAnalytics/models/pie.ts +0 -54
  223. package/src/components/ChartAnalytics/services/export.ts +0 -38
  224. package/src/components/ChartAnalytics/types/props.tsx +0 -48
  225. package/src/components/ChartAnalytics/utils/chart.ts +0 -123
  226. package/src/components/CircularProgressDashboard/CircularProgressIndicator.test.tsx +0 -9
  227. package/src/components/CircularProgressDashboard/index.tsx +0 -35
  228. package/src/components/CircularProgressDashboard/types/props.tsx +0 -17
  229. package/src/components/Map/Map.stories.tsx +0 -339
  230. package/src/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfigModal.stories.tsx +0 -28
  231. package/src/components/Map/components/EarthEngineLayerConfiguration/EarthEngineLayerConfiguration.stories.tsx +0 -34
  232. package/src/components/Map/components/EarthEngineLayerConfiguration/index.tsx +0 -412
  233. package/src/components/Map/components/MapArea/index.tsx +0 -83
  234. package/src/components/Map/components/MapArea/interfaces/index.ts +0 -39
  235. package/src/components/Map/components/MapControls/components/CustomControl/index.tsx +0 -24
  236. package/src/components/Map/components/MapControls/components/DownloadControl/index.tsx +0 -10
  237. package/src/components/Map/components/MapControls/components/FullscreenControl/index.tsx +0 -7
  238. package/src/components/Map/components/MapControls/index.tsx +0 -24
  239. package/src/components/Map/components/MapLayer/components/BoundaryLayer/hooks/useBoundaryData.ts +0 -7
  240. package/src/components/Map/components/MapLayer/components/BoundaryLayer/index.tsx +0 -55
  241. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/components/EarthEngineLegend.tsx +0 -76
  242. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/constants/index.ts +0 -430
  243. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/hooks/index.ts +0 -34
  244. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/index.tsx +0 -185
  245. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/interfaces/index.ts +0 -56
  246. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/services/api.js +0 -34233
  247. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/services/engine.ts +0 -423
  248. package/src/components/Map/components/MapLayer/components/GoogleEngineLayer/utils/index.ts +0 -105
  249. package/src/components/Map/components/MapLayer/components/LegendArea/components/LegendCardHeader/index.tsx +0 -17
  250. package/src/components/Map/components/MapLayer/components/LegendArea/index.tsx +0 -168
  251. package/src/components/Map/components/MapLayer/components/PointLayer/components/PointLegend/index.tsx +0 -44
  252. package/src/components/Map/components/MapLayer/components/PointLayer/hooks/index.ts +0 -8
  253. package/src/components/Map/components/MapLayer/components/PointLayer/index.tsx +0 -36
  254. package/src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/components/Bubble.tsx +0 -48
  255. package/src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/components/BubbleLegend/index.tsx +0 -39
  256. package/src/components/Map/components/MapLayer/components/ThematicLayer/components/Bubble/index.tsx +0 -57
  257. package/src/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/components/ChoroplethLegend.tsx +0 -43
  258. package/src/components/Map/components/MapLayer/components/ThematicLayer/components/Choropleth/index.tsx +0 -38
  259. package/src/components/Map/components/MapLayer/components/ThematicLayer/components/CustomTooltip/index.tsx +0 -26
  260. package/src/components/Map/components/MapLayer/components/ThematicLayer/hooks/config.ts +0 -10
  261. package/src/components/Map/components/MapLayer/components/ThematicLayer/index.tsx +0 -46
  262. package/src/components/Map/components/MapLayer/index.tsx +0 -32
  263. package/src/components/Map/components/MapLayer/interfaces/index.ts +0 -139
  264. package/src/components/Map/components/MapProvider/components/MapLayerProvider/hooks/index.tsx +0 -359
  265. package/src/components/Map/components/MapProvider/components/MapLayerProvider/index.tsx +0 -105
  266. package/src/components/Map/components/MapProvider/index.tsx +0 -93
  267. package/src/components/Map/components/MapUpdater/index.tsx +0 -8
  268. package/src/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfigModal.stories.tsx +0 -28
  269. package/src/components/Map/components/ThematicLayerConfiguration/ThematicLayerConfiguration.stories.tsx +0 -34
  270. package/src/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/components/ColorScale/index.tsx +0 -24
  271. package/src/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/index.tsx +0 -50
  272. package/src/components/Map/components/ThematicLayerConfiguration/components/ColorScaleSelect/utils/colors.ts +0 -91
  273. package/src/components/Map/components/ThematicLayerConfiguration/components/CustomLegend/index.tsx +0 -45
  274. package/src/components/Map/components/ThematicLayerConfiguration/components/IndicatorSelectorModal/index.tsx +0 -47
  275. package/src/components/Map/components/ThematicLayerConfiguration/components/LegendSetSelector/index.tsx +0 -57
  276. package/src/components/Map/components/ThematicLayerConfiguration/index.tsx +0 -248
  277. package/src/components/Map/constants/legendSet.ts +0 -19
  278. package/src/components/Map/hooks/map.ts +0 -47
  279. package/src/components/Map/index.tsx +0 -65
  280. package/src/components/Map/interfaces/index.ts +0 -57
  281. package/src/components/Map/state/index.tsx +0 -31
  282. package/src/components/Map/utils/colors.ts +0 -95
  283. package/src/components/Map/utils/helpers.ts +0 -15
  284. package/src/components/Map/utils/map.ts +0 -150
  285. package/src/components/SingleValueContainer/SingleValueContainer.stories.tsx +0 -146
  286. package/src/components/SingleValueContainer/SingleValueContainer.test.tsx +0 -24
  287. package/src/components/SingleValueContainer/components/SingleValueItem/SingleValueItem.tsx +0 -46
  288. package/src/components/SingleValueContainer/components/SingleValueItem/SingleValuePercentage.tsx +0 -12
  289. package/src/components/SingleValueContainer/index.tsx +0 -30
  290. package/src/components/SingleValueContainer/types/props.tsx +0 -16
  291. package/src/dataProviders/map.tsx +0 -24
  292. package/src/index.test.ts +0 -7
  293. package/tsconfig.json +0 -45
@@ -0,0 +1,403 @@
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ import { combineReducers, getFeatureCollectionProperties, getHistogramStatistics, getInfo, getScale, hasClasses } from "../utils";
5
+ import { find, head, isEmpty } from "lodash";
6
+ async function importEEModule() {
7
+ // @ts-ignore
8
+ if (import.meta.env.STORYBOOK_BUILD === "true") {
9
+ return await import("@google/earthengine");
10
+ }
11
+ return await import("./api");
12
+ }
13
+ const EE = await importEEModule();
14
+
15
+ // @ts-ignore
16
+ const ee = EE;
17
+ // @ts-ignore
18
+ window.ee = ee;
19
+ const FEATURE_STYLE = {
20
+ color: "FFA500",
21
+ strokeWidth: 2
22
+ };
23
+ const DEFAULT_TILE_SCALE = 1;
24
+ export class EarthEngine {
25
+ constructor(_ref) {
26
+ let {
27
+ options
28
+ } = _ref;
29
+ _defineProperty(this, "token", void 0);
30
+ _defineProperty(this, "options", void 0);
31
+ _defineProperty(this, "refresh", void 0);
32
+ _defineProperty(this, "orgUnits", void 0);
33
+ _defineProperty(this, "initialized", false);
34
+ _defineProperty(this, "period", void 0);
35
+ _defineProperty(this, "instance", void 0);
36
+ _defineProperty(this, "scale", void 0);
37
+ _defineProperty(this, "image", void 0);
38
+ _defineProperty(this, "aggregationData", void 0);
39
+ this.options = options;
40
+ this.initialized = true;
41
+ this.getInstance();
42
+ }
43
+ static async setToken(token, refresh) {
44
+ const tokenType = "Bearer";
45
+ function refreshToken(authArgs, callback) {
46
+ refresh().then(_ref2 => {
47
+ let {
48
+ token
49
+ } = _ref2;
50
+ callback({
51
+ ...token,
52
+ token_type: tokenType !== null && tokenType !== void 0 ? tokenType : "Bearer",
53
+ state: authArgs === null || authArgs === void 0 ? void 0 : authArgs.scope
54
+ });
55
+ });
56
+ }
57
+ await new Promise((resolve, reject) => {
58
+ if (ee.data.getAuthToken()) {
59
+ ee.initialize(null, null, resolve, reject);
60
+ }
61
+ if (token) {
62
+ const {
63
+ access_token,
64
+ client_id,
65
+ expires_in
66
+ } = token;
67
+ ee.data.setAuthToken(client_id, tokenType !== null && tokenType !== void 0 ? tokenType : "Bearer", access_token, expires_in, null, () => {
68
+ ee.initialize(null, null, resolve, reject);
69
+ }, false);
70
+ ee.data.setAuthTokenRefresher(refreshToken);
71
+ }
72
+ resolve("Token not found");
73
+ });
74
+ }
75
+ setOrgUnits(orgUnits) {
76
+ this.orgUnits = orgUnits;
77
+ return this;
78
+ }
79
+ setPeriod(period) {
80
+ this.period = period;
81
+ }
82
+ async getValue(geoJSON, type) {
83
+ return new Promise((resolve, reject) => {
84
+ const point = this.getGeometryByType(geoJSON);
85
+ const reducer = this.getReducerByType(type);
86
+ const image = this.getImage();
87
+ const reducedImage = image.reduceRegion(reducer, point, 1);
88
+ reducedImage.evaluate((data, error) => {
89
+ if (error) {
90
+ reject(error);
91
+ } else {
92
+ resolve(data);
93
+ }
94
+ });
95
+ });
96
+ }
97
+ async getPeriod() {
98
+ const {
99
+ type
100
+ } = this.options;
101
+ if (type !== "ImageCollection") {
102
+ return;
103
+ }
104
+ const imageCollection = this.instance.distinct("system:time_start").sort("system:time_start", false);
105
+ const featureCollection = ee.FeatureCollection(imageCollection).select(["system:time_start", "system:time_end"], null, false);
106
+ return getInfo(featureCollection);
107
+ }
108
+ async info() {
109
+ return new Promise(resolve => {
110
+ this.instance.getInfo(resolve);
111
+ });
112
+ }
113
+ async getScale() {
114
+ try {
115
+ const {
116
+ type
117
+ } = this.options;
118
+ switch (type) {
119
+ case "ImageCollection":
120
+ this.scale = await getScale(this.instance.first());
121
+ break;
122
+ default:
123
+ this.scale = await getScale(this.getImage());
124
+ }
125
+ } catch (e) {}
126
+ }
127
+ async getFeatureCollectionAggregation() {
128
+ const {
129
+ datasetId
130
+ } = this.options;
131
+ const dataset = ee.FeatureCollection(datasetId);
132
+ const collection = this.getFeatureCollection();
133
+ const aggFeatures = collection === null || collection === void 0 ? void 0 : collection.map(feature => {
134
+ feature = ee.Feature(feature);
135
+ const count = dataset.filterBounds(feature.geometry()).size();
136
+ return feature.set("count", count);
137
+ }).select(["count"], null, false);
138
+ return getInfo(aggFeatures).then(getFeatureCollectionProperties);
139
+ }
140
+ async getHistogramAggregations() {
141
+ try {
142
+ var _head, _this$options$legend, _this$options$tileSca;
143
+ const aggregation = (_head = head(this.options.aggregations)) !== null && _head !== void 0 ? _head : "";
144
+ const reducer = ee.Reducer.frequencyHistogram();
145
+ const collection = this.getFeatureCollection();
146
+ const legend = (_this$options$legend = this.options.legend) === null || _this$options$legend === void 0 ? void 0 : _this$options$legend.items;
147
+ const scale = this.scale;
148
+ const tileScale = (_this$options$tileSca = this.options.tileScale) !== null && _this$options$tileSca !== void 0 ? _this$options$tileSca : DEFAULT_TILE_SCALE;
149
+ const scaleValue = await getInfo(scale);
150
+ const image = this.getImage();
151
+ const features = Object.values(await getInfo(image.reduceRegions({
152
+ collection,
153
+ reducer,
154
+ scale,
155
+ tileScale
156
+ }).select(["histogram"], null, false)).then(data => getHistogramStatistics({
157
+ data,
158
+ scale: scaleValue,
159
+ aggregationType: aggregation,
160
+ legend
161
+ })));
162
+ return features.map((feature, index) => {
163
+ var _this$orgUnits;
164
+ return {
165
+ orgUnit: (_this$orgUnits = this.orgUnits) === null || _this$orgUnits === void 0 ? void 0 : _this$orgUnits[index],
166
+ data: feature
167
+ };
168
+ });
169
+ } catch (e) {
170
+ throw Error("Could not get histogram", {
171
+ cause: e
172
+ });
173
+ }
174
+ }
175
+ async getAggregations() {
176
+ var _head2, _this$options$tileSca2, _this$orgUnits2;
177
+ await this.getScale();
178
+ const {
179
+ type
180
+ } = this.options;
181
+ if (type === "FeatureCollection") {
182
+ this.aggregationData = await this.getFeatureCollectionAggregation();
183
+ return;
184
+ }
185
+ const aggregations = this.options.aggregations;
186
+ if (!aggregations) return;
187
+ if (hasClasses((_head2 = head(aggregations)) !== null && _head2 !== void 0 ? _head2 : "")) {
188
+ this.aggregationData = await this.getHistogramAggregations();
189
+ return;
190
+ }
191
+ const reducer = combineReducers(ee)(aggregations);
192
+ const collection = this.getFeatureCollection();
193
+ const image = this.getImage();
194
+ const scale = this.scale;
195
+ const tileScale = (_this$options$tileSca2 = this.options.tileScale) !== null && _this$options$tileSca2 !== void 0 ? _this$options$tileSca2 : DEFAULT_TILE_SCALE;
196
+ const aggregatedFeatures = image.reduceRegions({
197
+ collection,
198
+ reducer,
199
+ scale,
200
+ tileScale
201
+ }).select(aggregations, null, false);
202
+ const features = Object.values(getFeatureCollectionProperties(await getInfo(aggregatedFeatures)));
203
+ if (!isEmpty(features) && features.length === ((_this$orgUnits2 = this.orgUnits) === null || _this$orgUnits2 === void 0 ? void 0 : _this$orgUnits2.length)) {
204
+ //Mapping features to orgUnits using index.
205
+ this.aggregationData = features.map((feature, index) => {
206
+ var _this$orgUnits3;
207
+ return {
208
+ orgUnit: (_this$orgUnits3 = this.orgUnits) === null || _this$orgUnits3 === void 0 ? void 0 : _this$orgUnits3[index],
209
+ data: feature
210
+ };
211
+ });
212
+ }
213
+ }
214
+ getAggregation(orgUnit) {
215
+ if (isEmpty(this.aggregationData)) {
216
+ return;
217
+ }
218
+ return find(this.aggregationData, aggregation => aggregation.orgUnit.id === orgUnit.id);
219
+ }
220
+ async url() {
221
+ if (!this.initialized) throw "You need to call init() first";
222
+ return this.visualize(this.getImage());
223
+ }
224
+ applyPeriod(imageCollection) {
225
+ const period = this.period;
226
+ if (period) {
227
+ return imageCollection.filterDate(period);
228
+ }
229
+ }
230
+ applyMask(image) {
231
+ if (this.options.mask) {
232
+ return image.updateMask(image.gt(0));
233
+ } else {
234
+ return image;
235
+ }
236
+ }
237
+ applyBand(imageCollection) {
238
+ if (this.options.selectedBands) {
239
+ return imageCollection.select(this.options.selectedBands);
240
+ } else {
241
+ return imageCollection;
242
+ }
243
+ }
244
+ getReducerByType(type) {
245
+ return ee.Reducer[type].call();
246
+ }
247
+ getGeometryByType(geoJSON) {
248
+ return ee.Geometry(geoJSON === null || geoJSON === void 0 ? void 0 : geoJSON.geometry);
249
+ }
250
+ getFeatureByType(geoJSON) {
251
+ var _geoJSON$features;
252
+ const featureType = geoJSON.type;
253
+ const features = (_geoJSON$features = geoJSON.features) !== null && _geoJSON$features !== void 0 ? _geoJSON$features : [];
254
+ const geometry = this.getGeometryByType(geoJSON);
255
+ switch (featureType) {
256
+ case "Feature":
257
+ return ee.Feature(geometry);
258
+ case "FeatureCollection":
259
+ return ee.FeatureCollection([...features.map(feature => ee.Feature(this.getGeometryByType(feature)))]);
260
+ }
261
+ }
262
+ getFeatureCollection() {
263
+ if (this.orgUnits) {
264
+ return ee.FeatureCollection(this.orgUnits.map(orgUnit => this.getFeatureByType(orgUnit.geoJSON)));
265
+ } else {
266
+ throw "You need to set org units first";
267
+ }
268
+ }
269
+ getParamsFromLegend() {
270
+ if (!this.options.legend) return;
271
+ const legend = this.options.legend.items;
272
+ const keys = legend.map(l => l.id);
273
+ const min = Math.min(...keys);
274
+ const max = Math.max(...keys);
275
+ const palette = legend.map(l => l.color).join(",");
276
+ return {
277
+ min,
278
+ max,
279
+ palette
280
+ };
281
+ }
282
+ async visualize(image) {
283
+ var _ref3, _this$getParamsFromLe, _await$Promise;
284
+ const {
285
+ min,
286
+ max,
287
+ palette
288
+ } = (_ref3 = (_this$getParamsFromLe = this.getParamsFromLegend()) !== null && _this$getParamsFromLe !== void 0 ? _this$getParamsFromLe : this.options.params) !== null && _ref3 !== void 0 ? _ref3 : {
289
+ min: null,
290
+ max: null,
291
+ palette: null
292
+ };
293
+ return (_await$Promise = await new Promise((resolve, reject) => {
294
+ image.getMap({
295
+ min,
296
+ max,
297
+ palette
298
+ }, resolve);
299
+ })) === null || _await$Promise === void 0 ? void 0 : _await$Promise.urlFormat;
300
+ }
301
+ getImageCollectionInstance() {
302
+ const {
303
+ datasetId
304
+ } = this.options;
305
+ let imageCollection = ee.ImageCollection(datasetId);
306
+ if (this.period) {
307
+ imageCollection = this.applyPeriod(imageCollection);
308
+ }
309
+ imageCollection = this.applyBand(imageCollection);
310
+ return imageCollection;
311
+ }
312
+ getImageFromImageCollection() {
313
+ const {
314
+ mosaic
315
+ } = this.options;
316
+ const imageCollection = this.instance;
317
+ return mosaic ? imageCollection.mosaic().clipToCollection(this.getFeatureCollection()) : ee.Image(imageCollection.first()).clipToCollection(this.getFeatureCollection());
318
+ }
319
+ getImageInstance() {
320
+ const {
321
+ datasetId
322
+ } = this.options;
323
+ return ee.Image(datasetId).clipToCollection(this.getFeatureCollection());
324
+ }
325
+ getImageFromImage() {
326
+ return this.instance;
327
+ }
328
+ getFeatureInstance() {
329
+ const {
330
+ datasetId
331
+ } = this.options;
332
+ const feature = ee.Feature(datasetId);
333
+ this.instance = feature;
334
+ return feature;
335
+ }
336
+ getImageFromFeature() {
337
+ return this.instance;
338
+ }
339
+ getFeatureCollectionInstance() {
340
+ const {
341
+ datasetId
342
+ } = this.options;
343
+ let featureCollection = ee.FeatureCollection(datasetId);
344
+ if (this.period) {
345
+ featureCollection = this.applyPeriod(featureCollection);
346
+ }
347
+ return featureCollection;
348
+ }
349
+ getImageFromFeatureCollection() {
350
+ let featureCollection = this.instance;
351
+ return featureCollection.draw(FEATURE_STYLE).clipToCollection(this.getFeatureCollection());
352
+ }
353
+ getInstance() {
354
+ const {
355
+ type
356
+ } = this.options;
357
+ switch (type) {
358
+ case "Feature":
359
+ this.instance = this.getFeatureInstance();
360
+ break;
361
+ case "FeatureCollection":
362
+ this.instance = this.getFeatureCollectionInstance();
363
+ break;
364
+ case "Image":
365
+ this.instance = this.getImageInstance();
366
+ break;
367
+ case "ImageCollection":
368
+ this.instance = this.getImageCollectionInstance();
369
+ break;
370
+ default:
371
+ this.instance = this.getImageFromImage();
372
+ }
373
+ }
374
+ getImage() {
375
+ if (this.image) {
376
+ return this.image;
377
+ }
378
+ const {
379
+ type
380
+ } = this.options;
381
+ let image;
382
+ switch (type) {
383
+ case "Feature":
384
+ image = this.getImageFromFeature();
385
+ break;
386
+ case "FeatureCollection":
387
+ image = this.getImageFromFeatureCollection();
388
+ break;
389
+ case "Image":
390
+ image = this.getImageFromImage();
391
+ break;
392
+ case "ImageCollection":
393
+ image = this.getImageFromImageCollection();
394
+ break;
395
+ default:
396
+ image = this.getImageFromImage();
397
+ }
398
+ image = this.applyMask(image);
399
+ image = this.applyBand(image);
400
+ this.image = image;
401
+ return image;
402
+ }
403
+ }
@@ -0,0 +1,111 @@
1
+ export const combineReducers = ee => types => types.reduce((r, t, i) => i === 0 ? r[t]() : r.combine({
2
+ reducer2: ee.Reducer[t](),
3
+ sharedInputs: true
4
+ }), ee.Reducer);
5
+ export const getInfo = instance => new Promise((resolve, reject) => instance.evaluate((data, error) => {
6
+ if (error) {
7
+ reject(error);
8
+ } else {
9
+ resolve(data);
10
+ }
11
+ }));
12
+ export const getFeatureCollectionProperties = data => data.features.reduce((obj, f) => ({
13
+ ...obj,
14
+ [f.id]: f.properties
15
+ }), {});
16
+ export const getScale = async image => {
17
+ return image.select(0).projection().nominalScale();
18
+ };
19
+ const getParamsFromLegend = legend => {
20
+ const keys = legend.map(l => l.id);
21
+ const min = Math.min(...keys);
22
+ const max = Math.max(...keys);
23
+ const palette = legend.map(l => l.color).join(",");
24
+ return {
25
+ min,
26
+ max,
27
+ palette
28
+ };
29
+ };
30
+ export const getClassifiedImage = (eeImage, _ref) => {
31
+ var _legends$items;
32
+ let {
33
+ legend: legends,
34
+ params
35
+ } = _ref;
36
+ const legend = (_legends$items = legends === null || legends === void 0 ? void 0 : legends.items) !== null && _legends$items !== void 0 ? _legends$items : [];
37
+ if (!params) {
38
+ // Image has classes (e.g. landcover)
39
+ return {
40
+ eeImage,
41
+ params: getParamsFromLegend(legend)
42
+ };
43
+ }
44
+ const min = 0;
45
+ const max = legend.length - 1;
46
+ const {
47
+ palette
48
+ } = params;
49
+ let zones;
50
+ for (let i = min, item; i < max; i++) {
51
+ item = legend[i];
52
+ if (!zones) {
53
+ zones = eeImage.gt(item.to);
54
+ } else {
55
+ zones = zones.add(eeImage.gt(item.to));
56
+ }
57
+ }
58
+ return {
59
+ eeImage: zones,
60
+ params: {
61
+ min,
62
+ max,
63
+ palette
64
+ }
65
+ };
66
+ };
67
+ const squareMetersToHectares = value => value / 10000;
68
+ const squareMetersToAcres = value => value / 4046.8564224;
69
+ const classAggregation = ["percentage", "hectares", "acres"];
70
+ export const hasClasses = type => classAggregation.includes(type);
71
+ export const getHistogramStatistics = _ref2 => {
72
+ let {
73
+ data,
74
+ scale,
75
+ aggregationType,
76
+ legend
77
+ } = _ref2;
78
+ return data.features.reduce((obj, _ref3) => {
79
+ let {
80
+ id,
81
+ properties
82
+ } = _ref3;
83
+ const {
84
+ histogram
85
+ } = properties;
86
+ const sum = Object.values(histogram).reduce((a, b) => a + b, 0);
87
+ obj[id] = legend.reduce((values, _ref4) => {
88
+ let {
89
+ id
90
+ } = _ref4;
91
+ const count = histogram[id] || 0;
92
+ const sqMeters = count * (scale * scale);
93
+ let value;
94
+ switch (aggregationType) {
95
+ case "hectares":
96
+ value = Math.round(squareMetersToHectares(sqMeters));
97
+ break;
98
+ case "acres":
99
+ value = Math.round(squareMetersToAcres(sqMeters));
100
+ break;
101
+ default:
102
+ value = count / sum * 100;
103
+ // percentage
104
+ }
105
+
106
+ values[id] = value;
107
+ return values;
108
+ }, {});
109
+ return obj;
110
+ }, {});
111
+ };
@@ -0,0 +1,12 @@
1
+ .map-tooltip {
2
+ padding: 4px 6px;
3
+ border-radius: 3px;
4
+ font-size: 13px;
5
+ line-height: 17px;
6
+ z-index: 1000000 !important;
7
+ }
8
+
9
+ [data-test="dhi2-uicore-popper"] {
10
+
11
+ }
12
+
@@ -0,0 +1,19 @@
1
+ import { IconLaunch16 } from "@dhis2/ui";
2
+ import React from "react";
3
+ export default function LegendCardHeader(_ref) {
4
+ let {
5
+ title,
6
+ collapsible,
7
+ onCollapse
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("div", {
10
+ className: "row w-100 space-between align-items-center"
11
+ }, /*#__PURE__*/React.createElement("h4", {
12
+ style: {
13
+ margin: 0
14
+ },
15
+ className: "legend-header"
16
+ }, title), collapsible && /*#__PURE__*/React.createElement("div", {
17
+ onClick: onCollapse
18
+ }, /*#__PURE__*/React.createElement(IconLaunch16, null)));
19
+ }