@dhis2/analytics 23.8.5 → 23.8.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 (269) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/cjs/__demo__/FileMenu.stories.js +4 -2
  3. package/build/cjs/__demo__/Filter.stories.js +2 -2
  4. package/build/cjs/__demo__/FixedPeriodSelect.stories.js +2 -2
  5. package/build/cjs/__demo__/OpenFileDialog.stories.js +4 -2
  6. package/build/cjs/__demo__/OrgUnitDimension.stories.js +2 -2
  7. package/build/cjs/__demo__/PivotTable.stories.js +206 -153
  8. package/build/cjs/api/__tests__/dimensions.spec.js +2 -1
  9. package/build/cjs/api/analytics/Analytics.js +8 -7
  10. package/build/cjs/api/analytics/AnalyticsBase.js +58 -43
  11. package/build/cjs/api/analytics/AnalyticsRequest.js +2 -1
  12. package/build/cjs/api/analytics/AnalyticsRequestBase.js +22 -17
  13. package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
  14. package/build/cjs/api/analytics/AnalyticsResponseHeader.js +7 -5
  15. package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
  16. package/build/cjs/api/dimensions.js +150 -120
  17. package/build/cjs/api/organisationUnits.js +36 -24
  18. package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +19 -12
  19. package/build/cjs/components/CachedDataQueryProvider.js +8 -7
  20. package/build/cjs/components/DataDimension/DataDimension.js +8 -6
  21. package/build/cjs/components/DataDimension/DataTypeSelector.js +6 -5
  22. package/build/cjs/components/DataDimension/DetailSelector.js +6 -5
  23. package/build/cjs/components/DataDimension/GroupSelector.js +12 -11
  24. package/build/cjs/components/DataDimension/ItemSelector.js +87 -73
  25. package/build/cjs/components/DataDimension/MetricSelector.js +6 -5
  26. package/build/cjs/components/DimensionMenu.js +14 -13
  27. package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +4 -4
  28. package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +4 -4
  29. package/build/cjs/components/DimensionsPanel/List/DimensionLabel.js +4 -4
  30. package/build/cjs/components/DimensionsPanel/List/DimensionList.js +4 -4
  31. package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +10 -7
  32. package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
  33. package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -8
  34. package/build/cjs/components/DynamicDimension/ItemSelector.js +58 -44
  35. package/build/cjs/components/FileMenu/DeleteDialog.js +16 -12
  36. package/build/cjs/components/FileMenu/FileMenu.js +19 -18
  37. package/build/cjs/components/FileMenu/GetLinkDialog.js +6 -5
  38. package/build/cjs/components/FileMenu/RenameDialog.js +38 -25
  39. package/build/cjs/components/FileMenu/SaveAsDialog.js +21 -14
  40. package/build/cjs/components/FileMenu/utils.js +1 -1
  41. package/build/cjs/components/Filter/Filter.js +22 -19
  42. package/build/cjs/components/LegendKey/LegendKey.js +4 -3
  43. package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +26 -20
  44. package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +26 -23
  45. package/build/cjs/components/OpenFileDialog/DateField.js +4 -3
  46. package/build/cjs/components/OpenFileDialog/FileList.js +22 -19
  47. package/build/cjs/components/OpenFileDialog/NameFilter.js +21 -15
  48. package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +43 -35
  49. package/build/cjs/components/OpenFileDialog/PaginationControls.js +28 -22
  50. package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +37 -28
  51. package/build/cjs/components/OpenFileDialog/utils.js +1 -1
  52. package/build/cjs/components/Options/VisualizationOptions.js +46 -36
  53. package/build/cjs/components/Options/styles/VisualizationOptions.style.js +1 -1
  54. package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +50 -34
  55. package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +22 -15
  56. package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +19 -14
  57. package/build/cjs/components/PeriodDimension/PeriodDimension.js +8 -6
  58. package/build/cjs/components/PeriodDimension/PeriodTransfer.js +24 -19
  59. package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +30 -24
  60. package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +1 -1
  61. package/build/cjs/components/PeriodDimension/utils/index.js +6 -2
  62. package/build/cjs/components/PeriodDimension/utils/relativePeriods.js +1 -1
  63. package/build/cjs/components/PivotTable/PivotTable.js +10 -9
  64. package/build/cjs/components/PivotTable/PivotTableBody.js +29 -20
  65. package/build/cjs/components/PivotTable/PivotTableCell.js +9 -8
  66. package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +17 -14
  67. package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
  68. package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +29 -22
  69. package/build/cjs/components/PivotTable/PivotTableContainer.js +6 -5
  70. package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
  71. package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -2
  72. package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +5 -4
  73. package/build/cjs/components/PivotTable/PivotTableEngineContext.js +7 -6
  74. package/build/cjs/components/PivotTable/PivotTableHead.js +16 -13
  75. package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +9 -8
  76. package/build/cjs/components/PivotTable/PivotTableRow.js +27 -20
  77. package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
  78. package/build/cjs/components/PivotTable/PivotTableSortIcon.js +5 -4
  79. package/build/cjs/components/PivotTable/PivotTableTitleRow.js +9 -8
  80. package/build/cjs/components/PivotTable/PivotTableTitleRows.js +5 -4
  81. package/build/cjs/components/PivotTable/PivotTableValueCell.js +8 -7
  82. package/build/cjs/components/PivotTable/styles/PivotTable.style.js +1 -1
  83. package/build/cjs/components/TransferOption.js +15 -13
  84. package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
  85. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +25 -18
  86. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +9 -8
  87. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
  88. package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
  89. package/build/cjs/components/VisTypeIcon.js +6 -5
  90. package/build/cjs/index.js +464 -464
  91. package/build/cjs/locales/en/translations.json +1 -1
  92. package/build/cjs/locales/nl/translations.json +30 -30
  93. package/build/cjs/modules/axis.js +1 -1
  94. package/build/cjs/modules/dataSets.js +1 -1
  95. package/build/cjs/modules/dataTypes.js +2 -2
  96. package/build/cjs/modules/dimensionSelectorHelper.js +1 -1
  97. package/build/cjs/modules/fontStyle.js +1 -1
  98. package/build/cjs/modules/layout/axis.js +1 -1
  99. package/build/cjs/modules/layout/dimension.js +1 -1
  100. package/build/cjs/modules/layout/dimensionCreate.js +3 -1
  101. package/build/cjs/modules/layout/dimensionIsValid.js +5 -3
  102. package/build/cjs/modules/layout/item.js +1 -1
  103. package/build/cjs/modules/layout/testResources.js +1 -1
  104. package/build/cjs/modules/layoutTypes.js +1 -1
  105. package/build/cjs/modules/layoutUiRules/index.js +20 -20
  106. package/build/cjs/modules/layoutUiRules/rules.js +1 -1
  107. package/build/cjs/modules/layoutUiRules/rulesHelper.js +2 -1
  108. package/build/cjs/modules/layoutUiRules/rulesUtils.js +1 -1
  109. package/build/cjs/modules/legends.js +1 -1
  110. package/build/cjs/modules/outliers/index.js +4 -2
  111. package/build/cjs/modules/outliers/iqr.js +8 -5
  112. package/build/cjs/modules/outliers/modZScore.js +15 -7
  113. package/build/cjs/modules/outliers/zScore.js +5 -4
  114. package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +17 -12
  115. package/build/cjs/modules/pivotTable/PivotTableEngine.js +57 -44
  116. package/build/cjs/modules/pivotTable/clipAxis.js +8 -7
  117. package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +10 -9
  118. package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +9 -8
  119. package/build/cjs/modules/pivotTable/measureText.js +10 -7
  120. package/build/cjs/modules/pivotTable/pivotTableConstants.js +1 -1
  121. package/build/cjs/modules/pivotTable/useParentSize.js +2 -1
  122. package/build/cjs/modules/pivotTable/useScrollPosition.js +2 -1
  123. package/build/cjs/modules/pivotTable/useTableClipping.js +7 -6
  124. package/build/cjs/modules/predefinedDimensions.js +2 -2
  125. package/build/cjs/modules/relativeItems/index.js +4 -1
  126. package/build/cjs/modules/valueTypes.js +1 -1
  127. package/build/cjs/modules/visTypes.js +1 -1
  128. package/build/cjs/visualizations/config/adapters/dhis_dhis/index.js +7 -6
  129. package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +9 -4
  130. package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +5 -2
  131. package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +9 -5
  132. package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
  133. package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +11 -9
  134. package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
  135. package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +24 -20
  136. package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
  137. package/build/cjs/visualizations/config/adapters/dhis_highcharts/xAxis/index.js +1 -1
  138. package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
  139. package/build/cjs/visualizations/config/generators/dhis/singleValue.js +28 -24
  140. package/build/cjs/visualizations/config/generators/highcharts/index.js +5 -1
  141. package/build/cjs/visualizations/config/index.js +13 -11
  142. package/build/cjs/visualizations/config/validators/dhis/index.js +4 -3
  143. package/build/cjs/visualizations/index.js +6 -2
  144. package/build/cjs/visualizations/store/adapters/dhis_dhis/index.js +7 -6
  145. package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
  146. package/build/cjs/visualizations/store/index.js +18 -15
  147. package/build/cjs/visualizations/store/validators/dhis/index.js +7 -5
  148. package/build/cjs/visualizations/util/colors/colorSets.js +1 -1
  149. package/build/cjs/visualizations/util/colors/themes.js +1 -1
  150. package/build/cjs/visualizations/util/getFilterText.js +9 -6
  151. package/build/es/__demo__/FileMenu.stories.js +4 -2
  152. package/build/es/__demo__/OpenFileDialog.stories.js +4 -2
  153. package/build/es/__demo__/PivotTable.stories.js +204 -151
  154. package/build/es/api/__tests__/dimensions.spec.js +2 -1
  155. package/build/es/api/analytics/Analytics.js +8 -7
  156. package/build/es/api/analytics/AnalyticsBase.js +58 -43
  157. package/build/es/api/analytics/AnalyticsRequest.js +2 -1
  158. package/build/es/api/analytics/AnalyticsRequestBase.js +22 -17
  159. package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
  160. package/build/es/api/analytics/AnalyticsResponseHeader.js +7 -5
  161. package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
  162. package/build/es/api/dimensions.js +149 -119
  163. package/build/es/api/organisationUnits.js +35 -23
  164. package/build/es/components/AboutAOUnit/AboutAOUnit.js +17 -10
  165. package/build/es/components/CachedDataQueryProvider.js +6 -5
  166. package/build/es/components/DataDimension/DataDimension.js +8 -6
  167. package/build/es/components/DataDimension/DataTypeSelector.js +6 -5
  168. package/build/es/components/DataDimension/DetailSelector.js +6 -5
  169. package/build/es/components/DataDimension/GroupSelector.js +10 -9
  170. package/build/es/components/DataDimension/ItemSelector.js +85 -71
  171. package/build/es/components/DataDimension/MetricSelector.js +6 -5
  172. package/build/es/components/DimensionMenu.js +14 -13
  173. package/build/es/components/DimensionsPanel/DimensionsPanel.js +2 -2
  174. package/build/es/components/DimensionsPanel/List/DimensionItem.js +2 -2
  175. package/build/es/components/DimensionsPanel/List/DimensionLabel.js +2 -2
  176. package/build/es/components/DimensionsPanel/List/DimensionList.js +2 -2
  177. package/build/es/components/DimensionsPanel/List/OptionsButton.js +10 -7
  178. package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
  179. package/build/es/components/DynamicDimension/DynamicDimension.js +9 -8
  180. package/build/es/components/DynamicDimension/ItemSelector.js +56 -42
  181. package/build/es/components/FileMenu/DeleteDialog.js +14 -10
  182. package/build/es/components/FileMenu/FileMenu.js +17 -16
  183. package/build/es/components/FileMenu/GetLinkDialog.js +6 -5
  184. package/build/es/components/FileMenu/RenameDialog.js +36 -23
  185. package/build/es/components/FileMenu/SaveAsDialog.js +19 -12
  186. package/build/es/components/Filter/Filter.js +22 -19
  187. package/build/es/components/LegendKey/LegendKey.js +4 -3
  188. package/build/es/components/OpenFileDialog/CreatedByFilter.js +26 -20
  189. package/build/es/components/OpenFileDialog/CustomSelectOption.js +26 -23
  190. package/build/es/components/OpenFileDialog/DateField.js +4 -3
  191. package/build/es/components/OpenFileDialog/FileList.js +22 -19
  192. package/build/es/components/OpenFileDialog/NameFilter.js +21 -15
  193. package/build/es/components/OpenFileDialog/OpenFileDialog.js +41 -33
  194. package/build/es/components/OpenFileDialog/PaginationControls.js +28 -22
  195. package/build/es/components/OpenFileDialog/VisTypeFilter.js +37 -28
  196. package/build/es/components/Options/VisualizationOptions.js +43 -33
  197. package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +48 -32
  198. package/build/es/components/PeriodDimension/FixedPeriodFilter.js +22 -15
  199. package/build/es/components/PeriodDimension/FixedPeriodSelect.js +17 -12
  200. package/build/es/components/PeriodDimension/PeriodDimension.js +8 -6
  201. package/build/es/components/PeriodDimension/PeriodTransfer.js +22 -17
  202. package/build/es/components/PeriodDimension/RelativePeriodFilter.js +30 -24
  203. package/build/es/components/PeriodDimension/utils/index.js +5 -1
  204. package/build/es/components/PivotTable/PivotTable.js +8 -7
  205. package/build/es/components/PivotTable/PivotTableBody.js +29 -20
  206. package/build/es/components/PivotTable/PivotTableCell.js +9 -8
  207. package/build/es/components/PivotTable/PivotTableClippedAxis.js +17 -14
  208. package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
  209. package/build/es/components/PivotTable/PivotTableColumnHeaders.js +29 -22
  210. package/build/es/components/PivotTable/PivotTableContainer.js +6 -5
  211. package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
  212. package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -2
  213. package/build/es/components/PivotTable/PivotTableEmptyRow.js +5 -4
  214. package/build/es/components/PivotTable/PivotTableEngineContext.js +5 -4
  215. package/build/es/components/PivotTable/PivotTableHead.js +16 -13
  216. package/build/es/components/PivotTable/PivotTableHeaderCell.js +9 -8
  217. package/build/es/components/PivotTable/PivotTableRow.js +27 -20
  218. package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
  219. package/build/es/components/PivotTable/PivotTableSortIcon.js +5 -4
  220. package/build/es/components/PivotTable/PivotTableTitleRow.js +7 -6
  221. package/build/es/components/PivotTable/PivotTableTitleRows.js +5 -4
  222. package/build/es/components/PivotTable/PivotTableValueCell.js +6 -5
  223. package/build/es/components/TransferOption.js +15 -13
  224. package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
  225. package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +23 -16
  226. package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -6
  227. package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
  228. package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
  229. package/build/es/components/VisTypeIcon.js +6 -5
  230. package/build/es/locales/en/translations.json +1 -1
  231. package/build/es/locales/nl/translations.json +30 -30
  232. package/build/es/modules/layout/dimensionCreate.js +3 -1
  233. package/build/es/modules/layout/dimensionIsValid.js +5 -3
  234. package/build/es/modules/outliers/index.js +3 -1
  235. package/build/es/modules/outliers/iqr.js +7 -4
  236. package/build/es/modules/outliers/modZScore.js +14 -6
  237. package/build/es/modules/outliers/zScore.js +4 -3
  238. package/build/es/modules/pivotTable/AdaptiveClippingController.js +17 -12
  239. package/build/es/modules/pivotTable/PivotTableEngine.js +57 -44
  240. package/build/es/modules/pivotTable/clipAxis.js +8 -7
  241. package/build/es/modules/pivotTable/clipPartitionedAxis.js +10 -9
  242. package/build/es/modules/pivotTable/getHeaderForDisplay.js +9 -8
  243. package/build/es/modules/pivotTable/measureText.js +10 -7
  244. package/build/es/modules/pivotTable/useParentSize.js +2 -1
  245. package/build/es/modules/pivotTable/useScrollPosition.js +2 -1
  246. package/build/es/modules/pivotTable/useTableClipping.js +7 -6
  247. package/build/es/modules/predefinedDimensions.js +1 -1
  248. package/build/es/modules/relativeItems/index.js +4 -1
  249. package/build/es/visualizations/config/adapters/dhis_dhis/index.js +6 -5
  250. package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +8 -3
  251. package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +4 -1
  252. package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +6 -2
  253. package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
  254. package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +9 -7
  255. package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
  256. package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +23 -19
  257. package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
  258. package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
  259. package/build/es/visualizations/config/generators/dhis/singleValue.js +28 -24
  260. package/build/es/visualizations/config/generators/highcharts/index.js +5 -1
  261. package/build/es/visualizations/config/index.js +13 -11
  262. package/build/es/visualizations/config/validators/dhis/index.js +4 -3
  263. package/build/es/visualizations/index.js +5 -1
  264. package/build/es/visualizations/store/adapters/dhis_dhis/index.js +7 -6
  265. package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
  266. package/build/es/visualizations/store/index.js +18 -15
  267. package/build/es/visualizations/store/validators/dhis/index.js +7 -5
  268. package/build/es/visualizations/util/getFilterText.js +9 -6
  269. package/package.json +11 -11
@@ -48,11 +48,13 @@ function getLegend(fontStyle, dashboard, visType) {
48
48
  });
49
49
  }
50
50
 
51
- const getLegendSetByDisplayStrategy = ({
52
- displayStrategy,
53
- legendSets,
54
- legendSetId
55
- }) => {
51
+ const getLegendSetByDisplayStrategy = _ref => {
52
+ let {
53
+ displayStrategy,
54
+ legendSets,
55
+ legendSetId
56
+ } = _ref;
57
+
56
58
  if (displayStrategy === _legends.LEGEND_DISPLAY_STRATEGY_FIXED && legendSets.length) {
57
59
  return legendSets[0];
58
60
  } else if (displayStrategy === _legends.LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM) {
@@ -62,19 +64,20 @@ const getLegendSetByDisplayStrategy = ({
62
64
  }
63
65
  };
64
66
 
65
- const formatLabel = ({
66
- seriesId,
67
- seriesColor,
68
- seriesName,
69
- seriesType,
70
- metaData,
71
- displayStrategy,
72
- legendSets,
73
- fontStyle,
74
- visType
75
- }) => {
67
+ const formatLabel = _ref2 => {
76
68
  var _metaData$seriesId, _legendSet$legends;
77
69
 
70
+ let {
71
+ seriesId,
72
+ seriesColor,
73
+ seriesName,
74
+ seriesType,
75
+ metaData,
76
+ displayStrategy,
77
+ legendSets,
78
+ fontStyle,
79
+ visType
80
+ } = _ref2;
78
81
  const legendSet = getLegendSetByDisplayStrategy({
79
82
  displayStrategy,
80
83
  legendSets,
@@ -90,15 +93,15 @@ const formatLabel = ({
90
93
  result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
91
94
  } else if (legendSet !== null && legendSet !== void 0 && (_legendSet$legends = legendSet.legends) !== null && _legendSet$legends !== void 0 && _legendSet$legends.length && (0, _visTypes.isLegendSetType)(visType) && seriesType !== (0, _type.default)(_visTypes.VIS_TYPE_LINE).type) {
92
95
  // item with legend set
93
- legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" version=\"1.1\" style=\"margin-right:-5px; z-index: ").concat(legendSet.legends.length - index, "\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(legend.color, "\"></circle>\n </svg>")));
96
+ legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" style=\"margin-right:-5px; z-index: ").concat(legendSet.legends.length - index, "\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(legend.color, "\"></circle>\n </svg>")));
94
97
  result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
95
98
  } else {
96
99
  // regular item (not a trendline, no applied legend set)
97
100
  if ((seriesColor === null || seriesColor === void 0 ? void 0 : seriesColor.patternIndex) !== undefined) {
98
101
  const pattern = _colorSets.colorSets[_colorSets.COLOR_SET_PATTERNS].patterns[seriesColor.patternIndex];
99
- result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"height: ".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; width: ").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; display: inline-block; margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <defs>\n <pattern id=\"pattern").concat(seriesColor.patternIndex, "\" patternUnits=\"userSpaceOnUse\" width=\"").concat(pattern.width, "\" height=\"").concat(pattern.height, "\">\n <path stroke=\"").concat(pattern.color, "\" d=\"").concat(pattern.path, "\"/>\n </pattern>\n </defs>\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"url(#pattern").concat(seriesColor.patternIndex, ")\"/>\n </svg>"));
102
+ result.push("<svg style=\"height: ".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; width: ").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; display: inline-block; margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <defs>\n <pattern id=\"pattern").concat(seriesColor.patternIndex, "\" patternUnits=\"userSpaceOnUse\" width=\"").concat(pattern.width, "\" height=\"").concat(pattern.height, "\">\n <path stroke=\"").concat(pattern.color, "\" d=\"").concat(pattern.path, "\"/>\n </pattern>\n </defs>\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"url(#pattern").concat(seriesColor.patternIndex, ")\"/>\n </svg>"));
100
103
  } else {
101
- result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" version=\"1.1\" style=\"margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(seriesColor, "\"></circle>\n </svg>"));
104
+ result.push("<svg width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" style=\"margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(seriesColor, "\"></circle>\n </svg>"));
102
105
  }
103
106
 
104
107
  result.push("<span class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
@@ -108,15 +111,16 @@ const formatLabel = ({
108
111
  return result.join('');
109
112
  };
110
113
 
111
- function _default({
112
- isHidden,
113
- fontStyle,
114
- visType,
115
- dashboard,
116
- legendSets = [],
117
- metaData,
118
- displayStrategy
119
- }) {
114
+ function _default(_ref3) {
115
+ let {
116
+ isHidden,
117
+ fontStyle,
118
+ visType,
119
+ dashboard,
120
+ legendSets = [],
121
+ metaData,
122
+ displayStrategy
123
+ } = _ref3;
120
124
  const mergedFontStyle = (0, _fontStyle.mergeFontStyleWithDefault)(fontStyle, _fontStyle.FONT_STYLE_LEGEND);
121
125
  return isHidden || visType === _visTypes.VIS_TYPE_SCATTER ? {
122
126
  enabled: false
@@ -17,26 +17,30 @@ const OUT_OF_BOUNDS_COLOR = '#CCCCCC';
17
17
 
18
18
  const getLegend = (value, legendSet) => value && legendSet ? (0, _legends.getLegendByValueFromLegendSet)(legendSet, value) : {};
19
19
 
20
- const applyLegendSet = (seriesObj = {}, legendSet) => !seriesObj.type ? { ...seriesObj,
21
- data: seriesObj.data.map(value => {
22
- var _getLegend, _getLegend2, _getLegend3, _getLegend4;
23
-
24
- return (0, _isNumeric.default)(value) // Single category pass data as [value1, value2]
25
- ? {
26
- y: value,
27
- color: ((_getLegend = getLegend(value, legendSet)) === null || _getLegend === void 0 ? void 0 : _getLegend.color) || OUT_OF_BOUNDS_COLOR,
28
- legend: ((_getLegend2 = getLegend(value, legendSet)) === null || _getLegend2 === void 0 ? void 0 : _getLegend2.name) || '-',
29
- legendSet: legendSet.name
30
- } : Array.isArray(value) // Dual category pass data as [[position1, value1], [position2, value2]]
31
- ? {
32
- x: value[0],
33
- y: value[1],
34
- color: ((_getLegend3 = getLegend(value[1], legendSet)) === null || _getLegend3 === void 0 ? void 0 : _getLegend3.color) || OUT_OF_BOUNDS_COLOR,
35
- legend: ((_getLegend4 = getLegend(value[1], legendSet)) === null || _getLegend4 === void 0 ? void 0 : _getLegend4.name) || '-',
36
- legendSet: legendSet.name
37
- } : value;
38
- })
39
- } : { ...seriesObj
20
+ const applyLegendSet = function () {
21
+ let seriesObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
22
+ let legendSet = arguments.length > 1 ? arguments[1] : undefined;
23
+ return !seriesObj.type ? { ...seriesObj,
24
+ data: seriesObj.data.map(value => {
25
+ var _getLegend, _getLegend2, _getLegend3, _getLegend4;
26
+
27
+ return (0, _isNumeric.default)(value) // Single category pass data as [value1, value2]
28
+ ? {
29
+ y: value,
30
+ color: ((_getLegend = getLegend(value, legendSet)) === null || _getLegend === void 0 ? void 0 : _getLegend.color) || OUT_OF_BOUNDS_COLOR,
31
+ legend: ((_getLegend2 = getLegend(value, legendSet)) === null || _getLegend2 === void 0 ? void 0 : _getLegend2.name) || '-',
32
+ legendSet: legendSet.name
33
+ } : Array.isArray(value) // Dual category pass data as [[position1, value1], [position2, value2]]
34
+ ? {
35
+ x: value[0],
36
+ y: value[1],
37
+ color: ((_getLegend3 = getLegend(value[1], legendSet)) === null || _getLegend3 === void 0 ? void 0 : _getLegend3.color) || OUT_OF_BOUNDS_COLOR,
38
+ legend: ((_getLegend4 = getLegend(value[1], legendSet)) === null || _getLegend4 === void 0 ? void 0 : _getLegend4.name) || '-',
39
+ legendSet: legendSet.name
40
+ } : value;
41
+ })
42
+ } : { ...seriesObj
43
+ };
40
44
  };
41
45
 
42
46
  exports.applyLegendSet = applyLegendSet;
@@ -13,14 +13,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
 
14
14
  const MAX_LABELS = 10;
15
15
 
16
- var _default = ({
17
- visType,
18
- xAxisName,
19
- yAxisName,
20
- showLabels,
21
- tooltipData,
22
- onClick
23
- }) => {
16
+ var _default = _ref => {
17
+ let {
18
+ visType,
19
+ xAxisName,
20
+ yAxisName,
21
+ showLabels,
22
+ tooltipData,
23
+ onClick
24
+ } = _ref;
24
25
  const series = {
25
26
  dataLabels: {
26
27
  enabled: showLabels,
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = _default;
7
- exports.getDefault = exports.getLabels = void 0;
7
+ exports.getLabels = exports.getDefault = void 0;
8
8
 
9
9
  var _objectClean = _interopRequireDefault(require("d2-utilizr/lib/objectClean"));
10
10
 
@@ -48,9 +48,11 @@ const getLabelOffsetFromTextAlign = textAlign => {
48
48
  }
49
49
  };
50
50
 
51
- function getPlotLine(regressionLine = {}, defaultLabel) {
51
+ function getPlotLine() {
52
52
  var _regressionLine$title, _regressionLine$title2;
53
53
 
54
+ let regressionLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
55
+ let defaultLabel = arguments.length > 1 ? arguments[1] : undefined;
54
56
  const value = regressionLine.value;
55
57
 
56
58
  if (!(0, _isNumber.default)(value)) {
@@ -13,14 +13,15 @@ var _legends = require("../../../../modules/legends.js");
13
13
 
14
14
  const svgNS = 'http://www.w3.org/2000/svg';
15
15
 
16
- const generateValueSVG = ({
17
- value,
18
- formattedValue,
19
- subText,
20
- legendSet,
21
- noData,
22
- y
23
- }) => {
16
+ const generateValueSVG = _ref => {
17
+ let {
18
+ value,
19
+ formattedValue,
20
+ subText,
21
+ legendSet,
22
+ noData,
23
+ y
24
+ } = _ref;
24
25
  const textSize = 300;
25
26
  const svgValue = document.createElementNS(svgNS, 'svg');
26
27
  svgValue.setAttribute('xmlns', svgNS);
@@ -72,10 +73,11 @@ const generateValueSVG = ({
72
73
  return svgValue;
73
74
  };
74
75
 
75
- const generateDashboardItem = (config, {
76
- legendSet,
77
- noData
78
- }) => {
76
+ const generateDashboardItem = (config, _ref2) => {
77
+ let {
78
+ legendSet,
79
+ noData
80
+ } = _ref2;
79
81
  const container = document.createElement('div');
80
82
  container.setAttribute('style', 'display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%');
81
83
  const titleStyle = 'font-size: 12px; color: #666;';
@@ -134,12 +136,13 @@ const getXFromTextAlign = textAlign => {
134
136
  }
135
137
  };
136
138
 
137
- const generateDVItem = (config, {
138
- legendSet,
139
- parentEl,
140
- fontStyle,
141
- noData
142
- }) => {
139
+ const generateDVItem = (config, _ref3) => {
140
+ let {
141
+ legendSet,
142
+ parentEl,
143
+ fontStyle,
144
+ noData
145
+ } = _ref3;
143
146
  const parentElBBox = parentEl.getBoundingClientRect();
144
147
  const width = parentElBBox.width;
145
148
  const height = parentElBBox.height;
@@ -194,12 +197,13 @@ const generateDVItem = (config, {
194
197
  return svg;
195
198
  };
196
199
 
197
- function _default(config, parentEl, {
198
- dashboard,
199
- legendSets,
200
- fontStyle,
201
- noData
202
- }) {
200
+ function _default(config, parentEl, _ref4) {
201
+ let {
202
+ dashboard,
203
+ legendSets,
204
+ fontStyle,
205
+ noData
206
+ } = _ref4;
203
207
  const legendSet = legendSets[0];
204
208
  parentEl.style.overflow = 'hidden';
205
209
  parentEl.style.display = 'flex';
@@ -31,7 +31,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
31
31
 
32
32
  function _default(config, el) {
33
33
  if (config) {
34
- config.chart.renderTo = el || config.chart.renderTo;
34
+ config.chart.renderTo = el || config.chart.renderTo; // silence warning about accessibility
35
+
36
+ config.accessibility = {
37
+ enabled: false
38
+ };
35
39
 
36
40
  if (config.lang) {
37
41
  _highcharts.default.setOptions({
@@ -17,17 +17,19 @@ var _index5 = _interopRequireDefault(require("./validators/index.js"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- function _default({
21
- store,
22
- layout,
23
- el,
24
- inputFormat = 'dhis',
25
- outputFormat = 'highcharts',
26
- extraLayout,
27
- extraOptions,
28
- onError,
29
- onWarning
30
- }) {
20
+ function _default(_ref) {
21
+ let {
22
+ store,
23
+ layout,
24
+ el,
25
+ inputFormat = 'dhis',
26
+ outputFormat = 'highcharts',
27
+ extraLayout,
28
+ extraOptions,
29
+ onError,
30
+ onWarning
31
+ } = _ref;
32
+
31
33
  const _validator = _index5.default[inputFormat] || _index5.default.noValidation;
32
34
 
33
35
  const _adapter = _index3.default[inputFormat + '_' + outputFormat];
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = _default;
7
7
 
8
- function _default({
9
- layout
10
- }) {
8
+ function _default(_ref) {
9
+ let {
10
+ layout
11
+ } = _ref;
11
12
  return layout;
12
13
  }
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createVisualization = createVisualization;
7
6
  Object.defineProperty(exports, "Config", {
8
7
  enumerable: true,
9
8
  get: function () {
@@ -16,6 +15,7 @@ Object.defineProperty(exports, "Store", {
16
15
  return _index2.default;
17
16
  }
18
17
  });
18
+ exports.createVisualization = createVisualization;
19
19
  exports.default = void 0;
20
20
 
21
21
  var _isArray = _interopRequireDefault(require("d2-utilizr/lib/isArray"));
@@ -34,7 +34,11 @@ const defaultWarning = warning => {
34
34
  console.log(warning);
35
35
  };
36
36
 
37
- function createVisualization(data, layout, el, extraOptions, error = defaultError, warning = defaultWarning, outputFormat) {
37
+ function createVisualization(data, layout, el, extraOptions) {
38
+ let error = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultError;
39
+ let warning = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : defaultWarning;
40
+ let outputFormat = arguments.length > 6 ? arguments[6] : undefined;
41
+
38
42
  const _data = (0, _isArray.default)(data) ? data : [data];
39
43
 
40
44
  const store = new _index2.default({
@@ -66,12 +66,13 @@ function getValueFunction(type) {
66
66
  }
67
67
  }
68
68
 
69
- function _default({
70
- type,
71
- data,
72
- seriesId,
73
- categoryId
74
- }) {
69
+ function _default(_ref) {
70
+ let {
71
+ type,
72
+ data,
73
+ seriesId,
74
+ categoryId
75
+ } = _ref;
75
76
  const valueFunction = getValueFunction(type);
76
77
  return data.reduce((acc, res) => {
77
78
  const headers = res.headers;
@@ -99,13 +99,14 @@ function getSeriesFunction(type, categoryIds) {
99
99
  }
100
100
  }
101
101
 
102
- function _default({
103
- type,
104
- data,
105
- seriesId,
106
- categoryIds,
107
- extraOptions
108
- }) {
102
+ function _default(_ref) {
103
+ let {
104
+ type,
105
+ data,
106
+ seriesId,
107
+ categoryIds,
108
+ extraOptions
109
+ } = _ref;
109
110
  categoryIds = categoryIds || [];
110
111
  const seriesFunction = getSeriesFunction(type, categoryIds);
111
112
  return data.reduce((acc, res) => {
@@ -11,15 +11,17 @@ var _index2 = _interopRequireDefault(require("./validators/index.js"));
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- function _default({
15
- data,
16
- inputFormat = 'dhis',
17
- outputFormat = 'highcharts',
18
- seriesId: initialSeriesId,
19
- categoryId: initialCategoryId,
20
- error,
21
- warning
22
- }) {
14
+ function _default(_ref) {
15
+ let {
16
+ data,
17
+ inputFormat = 'dhis',
18
+ outputFormat = 'highcharts',
19
+ seriesId: initialSeriesId,
20
+ categoryId: initialCategoryId,
21
+ error,
22
+ warning
23
+ } = _ref;
24
+
23
25
  const _validator = _index2.default[inputFormat] || _index2.default.noValidation;
24
26
 
25
27
  const _adapter = _index.default[inputFormat + '_' + outputFormat];
@@ -34,12 +36,13 @@ function _default({
34
36
 
35
37
  this.data = data;
36
38
 
37
- this.generateData = ({
38
- type,
39
- seriesId = initialSeriesId,
40
- categoryIds = [initialCategoryId],
41
- extraOptions = {}
42
- }) => {
39
+ this.generateData = _ref2 => {
40
+ let {
41
+ type,
42
+ seriesId = initialSeriesId,
43
+ categoryIds = [initialCategoryId],
44
+ extraOptions = {}
45
+ } = _ref2;
43
46
  return _adapter({
44
47
  type,
45
48
  data: data.map(d => _validator({
@@ -49,11 +49,13 @@ function validateRow(row, headersLength, error) {
49
49
  row.forEach(rowValue => validateRowValue(rowValue, error));
50
50
  }
51
51
 
52
- function _default({
53
- data,
54
- error,
55
- warning
56
- }) {
52
+ function _default(_ref) {
53
+ let {
54
+ data,
55
+ error,
56
+ warning
57
+ } = _ref;
58
+
57
59
  if (!(0, _isObject.default)(data)) {
58
60
  error(getMessage('Data is not an object'));
59
61
  } // headers
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.colorSets = exports.COLOR_SET_PATTERNS = exports.COLOR_SET_COLOR_BLIND = exports.COLOR_SET_GRAY = exports.COLOR_SET_DARK = exports.COLOR_SET_BRIGHT = exports.COLOR_SET_DEFAULT = void 0;
6
+ exports.colorSets = exports.COLOR_SET_PATTERNS = exports.COLOR_SET_GRAY = exports.COLOR_SET_DEFAULT = exports.COLOR_SET_DARK = exports.COLOR_SET_COLOR_BLIND = exports.COLOR_SET_BRIGHT = void 0;
7
7
 
8
8
  var _highcharts = _interopRequireDefault(require("highcharts"));
9
9
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.defaultMultiAxisTheme1 = exports.theme1 = void 0;
6
+ exports.theme1 = exports.defaultMultiAxisTheme1 = void 0;
7
7
  const theme1 = '#a9be3b|#558cc0|#d34957|#ff9f3a|#968f8f|#b7409f|#ffda64|#4fbdae|#b78040|#676767|#6a33cf|#4a7833|#454545'.split('|');
8
8
  exports.theme1 = theme1;
9
9
  const defaultMultiAxisTheme1 = {
@@ -26,9 +26,12 @@ function _default(filters, metaData) {
26
26
  filters.forEach(filter => {
27
27
  const items = (0, _dimensionGetItems.dimensionGetItems)(filter);
28
28
 
29
- if ((0, _dimensionIs.dimensionIs)(filter, _predefinedDimensions.DIMENSION_ID_ORGUNIT) && items.some(({
30
- id
31
- }) => _index.ouIdHelper.hasGroupPrefix(id) || _index.ouIdHelper.hasLevelPrefix(id))) {
29
+ if ((0, _dimensionIs.dimensionIs)(filter, _predefinedDimensions.DIMENSION_ID_ORGUNIT) && items.some(_ref => {
30
+ let {
31
+ id
32
+ } = _ref;
33
+ return _index.ouIdHelper.hasGroupPrefix(id) || _index.ouIdHelper.hasLevelPrefix(id);
34
+ })) {
32
35
  titleFragments.push((0, _getOuLevelAndGroupText.getOuLevelAndGroupText)(filter, metaData));
33
36
  } else {
34
37
  const filterItems = metaData.dimensions[filter.dimension];
@@ -46,9 +49,9 @@ function _default(filters, metaData) {
46
49
  } // otherwise use the values directly
47
50
  // this is a temporary fix to avoid app crashing when using filters with data items in EV
48
51
  else {
49
- sectionParts.push(metaData.items[filter.dimension].name + ': ' + filterItems.join(', '));
50
- break;
51
- }
52
+ sectionParts.push(metaData.items[filter.dimension].name + ': ' + filterItems.join(', '));
53
+ break;
54
+ }
52
55
  }
53
56
 
54
57
  titleFragments.push(sectionParts.join(', '));
@@ -50,10 +50,12 @@ const visReadonlyObject = { ...visObject,
50
50
  manage: false
51
51
  }
52
52
  };
53
- storiesOf('FileMenu', module).add('Simple', () => /*#__PURE__*/React.createElement(FileMenu, {
53
+ storiesOf('FileMenu', module).add('Simple', () => /*#__PURE__*/React.createElement(Provider, {
54
+ config: configMock
55
+ }, /*#__PURE__*/React.createElement(FileMenu, {
54
56
  currentUser: user,
55
57
  fileType: "visualization"
56
- })).add('With AO', () => /*#__PURE__*/React.createElement(Provider, {
58
+ }))).add('With AO', () => /*#__PURE__*/React.createElement(Provider, {
57
59
  config: configMock
58
60
  }, /*#__PURE__*/React.createElement(FileMenu, {
59
61
  currentUser: user,
@@ -86,11 +86,13 @@ storiesOf('OpenFileDialog', module).add('List of visualizations with vis type fi
86
86
  open: true,
87
87
  currentUser: user
88
88
  })));
89
- storiesOf('OpenFileDialog', module).add('No connection', () => /*#__PURE__*/React.createElement(OpenFileDialog, {
89
+ storiesOf('OpenFileDialog', module).add('No connection', () => /*#__PURE__*/React.createElement(Provider, {
90
+ config: configMock
91
+ }, /*#__PURE__*/React.createElement(OpenFileDialog, {
90
92
  type: "map",
91
93
  onClose: Function.prototype,
92
94
  onFileSelect: onFileSelect,
93
95
  onNew: Function.prototype,
94
96
  open: true,
95
97
  currentUser: user
96
- }));
98
+ })));