@dhis2/analytics 28.0.2 → 28.0.4

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 (452) hide show
  1. package/build/cjs/__demo__/DataDimension.stories.js +3 -4
  2. package/build/cjs/__demo__/Filter.stories.js +1 -2
  3. package/build/cjs/__demo__/FixedPeriodSelect.stories.js +1 -2
  4. package/build/cjs/__demo__/OpenFileDialog.stories.js +2 -2
  5. package/build/cjs/__demo__/OrgUnitDimension.stories.js +3 -4
  6. package/build/cjs/__demo__/PeriodDimension.stories.js +2 -2
  7. package/build/cjs/__demo__/PivotTable.stories.js +166 -224
  8. package/build/cjs/__demo__/ScatterPlotPdfExport.stories.js +1 -2
  9. package/build/cjs/__demo__/SingleValue.stories.js +1 -2
  10. package/build/cjs/__demo__/Toolbar.stories.js +1 -2
  11. package/build/cjs/api/__tests__/dimensions.spec.js +1 -2
  12. package/build/cjs/api/analytics/Analytics.js +8 -9
  13. package/build/cjs/api/analytics/AnalyticsBase.js +58 -77
  14. package/build/cjs/api/analytics/AnalyticsRequest.js +1 -2
  15. package/build/cjs/api/analytics/AnalyticsRequestBase.js +18 -21
  16. package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
  17. package/build/cjs/api/analytics/AnalyticsResponseHeader.js +5 -7
  18. package/build/cjs/api/analytics/__tests__/AnalyticsBase.spec.js +9 -12
  19. package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
  20. package/build/cjs/api/analytics/utils.js +11 -17
  21. package/build/cjs/api/dimensions.js +119 -148
  22. package/build/cjs/api/expression.js +39 -60
  23. package/build/cjs/api/organisationUnits.js +23 -35
  24. package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +12 -20
  25. package/build/cjs/components/CachedDataQueryProvider.js +7 -9
  26. package/build/cjs/components/DashboardPluginWrapper/DashboardPluginWrapper.js +18 -22
  27. package/build/cjs/components/DataDimension/Calculation/CalculationModal.js +44 -61
  28. package/build/cjs/components/DataDimension/Calculation/DataElementOption.js +5 -6
  29. package/build/cjs/components/DataDimension/Calculation/DataElementSelector.js +29 -38
  30. package/build/cjs/components/DataDimension/Calculation/DndContext.js +29 -37
  31. package/build/cjs/components/DataDimension/Calculation/DraggingItem.js +5 -6
  32. package/build/cjs/components/DataDimension/Calculation/DropZone.js +4 -5
  33. package/build/cjs/components/DataDimension/Calculation/FormulaField.js +29 -32
  34. package/build/cjs/components/DataDimension/Calculation/FormulaItem.js +14 -16
  35. package/build/cjs/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
  36. package/build/cjs/components/DataDimension/Calculation/Operator.js +6 -7
  37. package/build/cjs/components/DataDimension/DataDimension.js +20 -32
  38. package/build/cjs/components/DataDimension/Info/CalculationInfo.js +14 -22
  39. package/build/cjs/components/DataDimension/Info/DataElementInfo.js +23 -36
  40. package/build/cjs/components/DataDimension/Info/DataElementOperandInfo.js +30 -44
  41. package/build/cjs/components/DataDimension/Info/DataSetInfo.js +26 -39
  42. package/build/cjs/components/DataDimension/Info/EventDataItemInfo.js +21 -34
  43. package/build/cjs/components/DataDimension/Info/IndicatorInfo.js +21 -32
  44. package/build/cjs/components/DataDimension/Info/InfoPopover.js +6 -7
  45. package/build/cjs/components/DataDimension/Info/InfoTable.js +39 -52
  46. package/build/cjs/components/DataDimension/Info/OptionInfo.js +13 -20
  47. package/build/cjs/components/DataDimension/Info/ProgramIndicatorInfo.js +46 -58
  48. package/build/cjs/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +22 -32
  49. package/build/cjs/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
  50. package/build/cjs/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
  51. package/build/cjs/components/DataDimension/ItemSelector/GroupSelector.js +10 -12
  52. package/build/cjs/components/DataDimension/ItemSelector/ItemSelector.js +86 -104
  53. package/build/cjs/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
  54. package/build/cjs/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
  55. package/build/cjs/components/DataDimension/TransferOption.js +35 -39
  56. package/build/cjs/components/DimensionMenu.js +13 -14
  57. package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +8 -9
  58. package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +12 -13
  59. package/build/cjs/components/DimensionsPanel/List/DimensionList.js +9 -10
  60. package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +8 -11
  61. package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
  62. package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -13
  63. package/build/cjs/components/DynamicDimension/ItemSelector.js +25 -38
  64. package/build/cjs/components/FileMenu/DeleteDialog.js +11 -16
  65. package/build/cjs/components/FileMenu/FileMenu.js +19 -30
  66. package/build/cjs/components/FileMenu/GetLinkDialog.js +7 -7
  67. package/build/cjs/components/FileMenu/RenameDialog.js +13 -21
  68. package/build/cjs/components/FileMenu/SaveAsDialog.js +13 -21
  69. package/build/cjs/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
  70. package/build/cjs/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
  71. package/build/cjs/components/FileMenu/utils.js +10 -12
  72. package/build/cjs/components/Filter/Filter.js +21 -27
  73. package/build/cjs/components/Interpretations/InterpretationModal/Comment.js +8 -10
  74. package/build/cjs/components/Interpretations/InterpretationModal/CommentAddForm.js +10 -15
  75. package/build/cjs/components/Interpretations/InterpretationModal/CommentDeleteButton.js +10 -15
  76. package/build/cjs/components/Interpretations/InterpretationModal/CommentUpdateForm.js +12 -17
  77. package/build/cjs/components/Interpretations/InterpretationModal/InterpretationModal.js +19 -25
  78. package/build/cjs/components/Interpretations/InterpretationModal/InterpretationThread.js +12 -14
  79. package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationForm.js +12 -17
  80. package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
  81. package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +23 -33
  82. package/build/cjs/components/Interpretations/common/Interpretation/Interpretation.js +13 -15
  83. package/build/cjs/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
  84. package/build/cjs/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +5 -7
  85. package/build/cjs/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +15 -23
  86. package/build/cjs/components/Interpretations/common/Interpretation/useLike.js +5 -6
  87. package/build/cjs/components/Interpretations/common/Message/Message.js +6 -7
  88. package/build/cjs/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
  89. package/build/cjs/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
  90. package/build/cjs/components/Interpretations/common/Message/MessageIconButton.js +34 -40
  91. package/build/cjs/components/Interpretations/common/Message/MessageInput.js +1 -2
  92. package/build/cjs/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
  93. package/build/cjs/components/LegendKey/LegendKey.js +3 -4
  94. package/build/cjs/components/OfflineTooltip.js +18 -26
  95. package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +20 -26
  96. package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +23 -26
  97. package/build/cjs/components/OpenFileDialog/DateField.js +3 -4
  98. package/build/cjs/components/OpenFileDialog/FileList.js +19 -22
  99. package/build/cjs/components/OpenFileDialog/NameFilter.js +15 -21
  100. package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +36 -45
  101. package/build/cjs/components/OpenFileDialog/PaginationControls.js +22 -28
  102. package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +28 -37
  103. package/build/cjs/components/Options/VisualizationOptions.js +35 -46
  104. package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +38 -60
  105. package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +16 -25
  106. package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +15 -21
  107. package/build/cjs/components/PeriodDimension/PeriodDimension.js +9 -12
  108. package/build/cjs/components/PeriodDimension/PeriodTransfer.js +49 -63
  109. package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +24 -30
  110. package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
  111. package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
  112. package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +6 -7
  113. package/build/cjs/components/PeriodDimension/utils/index.js +1 -5
  114. package/build/cjs/components/PivotTable/PivotTable.js +8 -10
  115. package/build/cjs/components/PivotTable/PivotTableBody.js +20 -29
  116. package/build/cjs/components/PivotTable/PivotTableCell.js +8 -12
  117. package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +14 -17
  118. package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
  119. package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +22 -29
  120. package/build/cjs/components/PivotTable/PivotTableContainer.js +5 -6
  121. package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
  122. package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -4
  123. package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +4 -5
  124. package/build/cjs/components/PivotTable/PivotTableEngineContext.js +5 -7
  125. package/build/cjs/components/PivotTable/PivotTableHead.js +13 -16
  126. package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +8 -9
  127. package/build/cjs/components/PivotTable/PivotTableRow.js +20 -27
  128. package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
  129. package/build/cjs/components/PivotTable/PivotTableSortIcon.js +4 -5
  130. package/build/cjs/components/PivotTable/PivotTableTitleRow.js +19 -24
  131. package/build/cjs/components/PivotTable/PivotTableTitleRows.js +4 -5
  132. package/build/cjs/components/PivotTable/PivotTableValueCell.js +6 -8
  133. package/build/cjs/components/RichText/Editor/Editor.js +70 -85
  134. package/build/cjs/components/RichText/Parser/Parser.js +5 -10
  135. package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -24
  136. package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +8 -13
  137. package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuList.js +9 -17
  138. package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +11 -16
  139. package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
  140. package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +13 -11
  141. package/build/cjs/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
  142. package/build/cjs/components/Toolbar/Toolbar.js +10 -16
  143. package/build/cjs/components/Toolbar/ToolbarSidebar.js +12 -18
  144. package/build/cjs/components/Toolbar/UpdateButton.js +18 -24
  145. package/build/cjs/components/TransferOption.js +14 -15
  146. package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
  147. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +17 -25
  148. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +8 -10
  149. package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
  150. package/build/cjs/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +52 -0
  151. package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
  152. package/build/cjs/components/UserMention/UserList.js +6 -7
  153. package/build/cjs/components/UserMention/UserMentionWrapper.js +13 -20
  154. package/build/cjs/components/UserMention/useUserSearchResults.js +12 -16
  155. package/build/cjs/components/VisTypeIcon.js +5 -6
  156. package/build/cjs/index.js +38 -39
  157. package/build/cjs/locales/ar_IQ/translations.json +20 -11
  158. package/build/cjs/locales/cs/translations.json +2 -0
  159. package/build/cjs/locales/en/translations.json +1 -0
  160. package/build/cjs/locales/es/translations.json +2 -0
  161. package/build/cjs/locales/fr/translations.json +2 -0
  162. package/build/cjs/locales/id/translations.json +20 -11
  163. package/build/cjs/locales/index.js +62 -62
  164. package/build/cjs/locales/lo/translations.json +2 -0
  165. package/build/cjs/locales/nb/translations.json +2 -0
  166. package/build/cjs/locales/prs/translations.json +2 -0
  167. package/build/cjs/locales/ps/translations.json +2 -0
  168. package/build/cjs/locales/pt/translations.json +2 -0
  169. package/build/cjs/locales/pt_BR/translations.json +2 -0
  170. package/build/cjs/locales/ru/translations.json +2 -0
  171. package/build/cjs/locales/si/translations.json +20 -11
  172. package/build/cjs/locales/sv/translations.json +20 -11
  173. package/build/cjs/locales/tet/translations.json +20 -11
  174. package/build/cjs/locales/tg/translations.json +2 -0
  175. package/build/cjs/locales/uk/translations.json +2 -0
  176. package/build/cjs/locales/ur/translations.json +2 -0
  177. package/build/cjs/locales/uz_UZ_Cyrl/translations.json +2 -0
  178. package/build/cjs/locales/uz_UZ_Latn/translations.json +4 -2
  179. package/build/cjs/locales/vi/translations.json +2 -0
  180. package/build/cjs/locales/zh/translations.json +2 -0
  181. package/build/cjs/locales/zh_CN/translations.json +17 -15
  182. package/build/cjs/modules/__tests__/expressions.spec.js +4 -5
  183. package/build/cjs/modules/__tests__/isNumeric.spec.js +33 -0
  184. package/build/cjs/modules/dimensionListItem.js +4 -5
  185. package/build/cjs/modules/expressions.js +3 -9
  186. package/build/cjs/modules/getPWAInstallationStatus.js +7 -9
  187. package/build/cjs/modules/layout/dimensionCreate.js +1 -3
  188. package/build/cjs/modules/layout/dimensionIsValid.js +3 -4
  189. package/build/cjs/modules/legends.js +5 -6
  190. package/build/cjs/modules/outliers/index.js +5 -6
  191. package/build/cjs/modules/outliers/iqr.js +4 -6
  192. package/build/cjs/modules/outliers/modZScore.js +6 -14
  193. package/build/cjs/modules/outliers/zScore.js +3 -4
  194. package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +12 -16
  195. package/build/cjs/modules/pivotTable/PivotTableEngine.js +48 -59
  196. package/build/cjs/modules/pivotTable/clipAxis.js +7 -8
  197. package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +9 -10
  198. package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +8 -9
  199. package/build/cjs/modules/pivotTable/measureText.js +7 -9
  200. package/build/cjs/modules/pivotTable/useParentSize.js +1 -2
  201. package/build/cjs/modules/pivotTable/useScrollPosition.js +1 -2
  202. package/build/cjs/modules/pivotTable/useTableClipping.js +6 -7
  203. package/build/cjs/modules/relativeItems/index.js +1 -4
  204. package/build/cjs/modules/renderValue.js +1 -2
  205. package/build/cjs/modules/utils.js +11 -2
  206. package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
  207. package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +7 -10
  208. package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
  209. package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
  210. package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
  211. package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
  212. package/build/cjs/visualizations/config/adapters/dhis_highcharts/getFormatter.js +2 -3
  213. package/build/cjs/visualizations/config/adapters/dhis_highcharts/getSteps.js +2 -3
  214. package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
  215. package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +8 -10
  216. package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
  217. package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
  218. package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
  219. package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
  220. package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
  221. package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -2
  222. package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
  223. package/build/cjs/visualizations/config/index.js +11 -12
  224. package/build/cjs/visualizations/config/validators/dhis/index.js +3 -4
  225. package/build/cjs/visualizations/index.js +1 -4
  226. package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
  227. package/build/cjs/visualizations/store/index.js +15 -17
  228. package/build/cjs/visualizations/store/validators/dhis/index.js +5 -6
  229. package/build/cjs/visualizations/util/getFilterText.js +3 -6
  230. package/build/cjs/visualizations/util/shouldUseContrastColor.js +1 -2
  231. package/build/es/__demo__/DataDimension.stories.js +2 -2
  232. package/build/es/__demo__/OpenFileDialog.stories.js +2 -2
  233. package/build/es/__demo__/OrgUnitDimension.stories.js +2 -2
  234. package/build/es/__demo__/PeriodDimension.stories.js +2 -2
  235. package/build/es/__demo__/PivotTable.stories.js +165 -222
  236. package/build/es/api/__tests__/dimensions.spec.js +1 -2
  237. package/build/es/api/analytics/Analytics.js +8 -9
  238. package/build/es/api/analytics/AnalyticsBase.js +58 -77
  239. package/build/es/api/analytics/AnalyticsRequest.js +1 -2
  240. package/build/es/api/analytics/AnalyticsRequestBase.js +18 -21
  241. package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
  242. package/build/es/api/analytics/AnalyticsResponseHeader.js +5 -7
  243. package/build/es/api/analytics/__tests__/AnalyticsBase.spec.js +8 -10
  244. package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
  245. package/build/es/api/analytics/utils.js +11 -17
  246. package/build/es/api/dimensions.js +119 -148
  247. package/build/es/api/expression.js +39 -60
  248. package/build/es/api/organisationUnits.js +23 -35
  249. package/build/es/components/AboutAOUnit/AboutAOUnit.js +11 -18
  250. package/build/es/components/CachedDataQueryProvider.js +6 -7
  251. package/build/es/components/DashboardPluginWrapper/DashboardPluginWrapper.js +17 -20
  252. package/build/es/components/DataDimension/Calculation/CalculationModal.js +43 -59
  253. package/build/es/components/DataDimension/Calculation/DataElementOption.js +5 -6
  254. package/build/es/components/DataDimension/Calculation/DataElementSelector.js +28 -36
  255. package/build/es/components/DataDimension/Calculation/DndContext.js +28 -35
  256. package/build/es/components/DataDimension/Calculation/DraggingItem.js +5 -6
  257. package/build/es/components/DataDimension/Calculation/DropZone.js +4 -5
  258. package/build/es/components/DataDimension/Calculation/FormulaField.js +29 -32
  259. package/build/es/components/DataDimension/Calculation/FormulaItem.js +13 -14
  260. package/build/es/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
  261. package/build/es/components/DataDimension/Calculation/Operator.js +6 -7
  262. package/build/es/components/DataDimension/DataDimension.js +19 -30
  263. package/build/es/components/DataDimension/Info/CalculationInfo.js +13 -20
  264. package/build/es/components/DataDimension/Info/DataElementInfo.js +23 -36
  265. package/build/es/components/DataDimension/Info/DataElementOperandInfo.js +29 -42
  266. package/build/es/components/DataDimension/Info/DataSetInfo.js +26 -39
  267. package/build/es/components/DataDimension/Info/EventDataItemInfo.js +21 -34
  268. package/build/es/components/DataDimension/Info/IndicatorInfo.js +20 -30
  269. package/build/es/components/DataDimension/Info/InfoPopover.js +6 -7
  270. package/build/es/components/DataDimension/Info/InfoTable.js +39 -52
  271. package/build/es/components/DataDimension/Info/OptionInfo.js +13 -20
  272. package/build/es/components/DataDimension/Info/ProgramIndicatorInfo.js +45 -56
  273. package/build/es/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +21 -30
  274. package/build/es/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
  275. package/build/es/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
  276. package/build/es/components/DataDimension/ItemSelector/GroupSelector.js +9 -10
  277. package/build/es/components/DataDimension/ItemSelector/ItemSelector.js +85 -102
  278. package/build/es/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
  279. package/build/es/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
  280. package/build/es/components/DataDimension/TransferOption.js +35 -39
  281. package/build/es/components/DimensionMenu.js +13 -14
  282. package/build/es/components/DimensionsPanel/DimensionsPanel.js +7 -7
  283. package/build/es/components/DimensionsPanel/List/DimensionItem.js +11 -11
  284. package/build/es/components/DimensionsPanel/List/DimensionList.js +8 -8
  285. package/build/es/components/DimensionsPanel/List/OptionsButton.js +8 -11
  286. package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
  287. package/build/es/components/DynamicDimension/DynamicDimension.js +9 -13
  288. package/build/es/components/DynamicDimension/ItemSelector.js +24 -36
  289. package/build/es/components/FileMenu/DeleteDialog.js +10 -14
  290. package/build/es/components/FileMenu/FileMenu.js +18 -28
  291. package/build/es/components/FileMenu/GetLinkDialog.js +7 -7
  292. package/build/es/components/FileMenu/RenameDialog.js +12 -19
  293. package/build/es/components/FileMenu/SaveAsDialog.js +12 -19
  294. package/build/es/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
  295. package/build/es/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
  296. package/build/es/components/FileMenu/utils.js +10 -12
  297. package/build/es/components/Filter/Filter.js +21 -27
  298. package/build/es/components/Interpretations/InterpretationModal/Comment.js +7 -8
  299. package/build/es/components/Interpretations/InterpretationModal/CommentAddForm.js +9 -13
  300. package/build/es/components/Interpretations/InterpretationModal/CommentDeleteButton.js +9 -13
  301. package/build/es/components/Interpretations/InterpretationModal/CommentUpdateForm.js +11 -15
  302. package/build/es/components/Interpretations/InterpretationModal/InterpretationModal.js +18 -23
  303. package/build/es/components/Interpretations/InterpretationModal/InterpretationThread.js +11 -12
  304. package/build/es/components/Interpretations/InterpretationsUnit/InterpretationForm.js +11 -15
  305. package/build/es/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
  306. package/build/es/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +22 -31
  307. package/build/es/components/Interpretations/common/Interpretation/Interpretation.js +12 -13
  308. package/build/es/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
  309. package/build/es/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +4 -5
  310. package/build/es/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +14 -21
  311. package/build/es/components/Interpretations/common/Interpretation/useLike.js +5 -6
  312. package/build/es/components/Interpretations/common/Message/Message.js +6 -7
  313. package/build/es/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
  314. package/build/es/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
  315. package/build/es/components/Interpretations/common/Message/MessageIconButton.js +34 -40
  316. package/build/es/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
  317. package/build/es/components/LegendKey/LegendKey.js +3 -4
  318. package/build/es/components/OfflineTooltip.js +18 -26
  319. package/build/es/components/OpenFileDialog/CreatedByFilter.js +20 -26
  320. package/build/es/components/OpenFileDialog/CustomSelectOption.js +23 -26
  321. package/build/es/components/OpenFileDialog/DateField.js +3 -4
  322. package/build/es/components/OpenFileDialog/FileList.js +19 -22
  323. package/build/es/components/OpenFileDialog/NameFilter.js +15 -21
  324. package/build/es/components/OpenFileDialog/OpenFileDialog.js +35 -43
  325. package/build/es/components/OpenFileDialog/PaginationControls.js +22 -28
  326. package/build/es/components/OpenFileDialog/VisTypeFilter.js +28 -37
  327. package/build/es/components/Options/VisualizationOptions.js +34 -44
  328. package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +37 -58
  329. package/build/es/components/PeriodDimension/FixedPeriodFilter.js +16 -25
  330. package/build/es/components/PeriodDimension/FixedPeriodSelect.js +14 -19
  331. package/build/es/components/PeriodDimension/PeriodDimension.js +9 -12
  332. package/build/es/components/PeriodDimension/PeriodTransfer.js +48 -61
  333. package/build/es/components/PeriodDimension/RelativePeriodFilter.js +24 -30
  334. package/build/es/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
  335. package/build/es/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
  336. package/build/es/components/PeriodDimension/utils/fixedPeriods.js +6 -7
  337. package/build/es/components/PeriodDimension/utils/index.js +1 -5
  338. package/build/es/components/PivotTable/PivotTable.js +7 -8
  339. package/build/es/components/PivotTable/PivotTableBody.js +20 -29
  340. package/build/es/components/PivotTable/PivotTableCell.js +8 -12
  341. package/build/es/components/PivotTable/PivotTableClippedAxis.js +14 -17
  342. package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
  343. package/build/es/components/PivotTable/PivotTableColumnHeaders.js +22 -29
  344. package/build/es/components/PivotTable/PivotTableContainer.js +5 -6
  345. package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
  346. package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -4
  347. package/build/es/components/PivotTable/PivotTableEmptyRow.js +4 -5
  348. package/build/es/components/PivotTable/PivotTableEngineContext.js +4 -5
  349. package/build/es/components/PivotTable/PivotTableHead.js +13 -16
  350. package/build/es/components/PivotTable/PivotTableHeaderCell.js +8 -9
  351. package/build/es/components/PivotTable/PivotTableRow.js +20 -27
  352. package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
  353. package/build/es/components/PivotTable/PivotTableSortIcon.js +4 -5
  354. package/build/es/components/PivotTable/PivotTableTitleRow.js +18 -22
  355. package/build/es/components/PivotTable/PivotTableTitleRows.js +4 -5
  356. package/build/es/components/PivotTable/PivotTableValueCell.js +5 -6
  357. package/build/es/components/RichText/Editor/Editor.js +69 -83
  358. package/build/es/components/RichText/Parser/Parser.js +4 -8
  359. package/build/es/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -23
  360. package/build/es/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +7 -11
  361. package/build/es/components/Toolbar/HoverMenuBar/HoverMenuList.js +8 -15
  362. package/build/es/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +10 -14
  363. package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
  364. package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +6 -4
  365. package/build/es/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
  366. package/build/es/components/Toolbar/Toolbar.js +10 -16
  367. package/build/es/components/Toolbar/ToolbarSidebar.js +12 -18
  368. package/build/es/components/Toolbar/UpdateButton.js +18 -24
  369. package/build/es/components/TransferOption.js +14 -15
  370. package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
  371. package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +16 -23
  372. package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -8
  373. package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
  374. package/build/es/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +49 -0
  375. package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
  376. package/build/es/components/UserMention/UserList.js +6 -7
  377. package/build/es/components/UserMention/UserMentionWrapper.js +12 -18
  378. package/build/es/components/UserMention/useUserSearchResults.js +12 -16
  379. package/build/es/components/VisTypeIcon.js +5 -6
  380. package/build/es/locales/ar_IQ/translations.json +20 -11
  381. package/build/es/locales/cs/translations.json +2 -0
  382. package/build/es/locales/en/translations.json +1 -0
  383. package/build/es/locales/es/translations.json +2 -0
  384. package/build/es/locales/fr/translations.json +2 -0
  385. package/build/es/locales/id/translations.json +20 -11
  386. package/build/es/locales/lo/translations.json +2 -0
  387. package/build/es/locales/nb/translations.json +2 -0
  388. package/build/es/locales/prs/translations.json +2 -0
  389. package/build/es/locales/ps/translations.json +2 -0
  390. package/build/es/locales/pt/translations.json +2 -0
  391. package/build/es/locales/pt_BR/translations.json +2 -0
  392. package/build/es/locales/ru/translations.json +2 -0
  393. package/build/es/locales/si/translations.json +20 -11
  394. package/build/es/locales/sv/translations.json +20 -11
  395. package/build/es/locales/tet/translations.json +20 -11
  396. package/build/es/locales/tg/translations.json +2 -0
  397. package/build/es/locales/uk/translations.json +2 -0
  398. package/build/es/locales/ur/translations.json +2 -0
  399. package/build/es/locales/uz_UZ_Cyrl/translations.json +2 -0
  400. package/build/es/locales/uz_UZ_Latn/translations.json +4 -2
  401. package/build/es/locales/vi/translations.json +2 -0
  402. package/build/es/locales/zh/translations.json +2 -0
  403. package/build/es/locales/zh_CN/translations.json +17 -15
  404. package/build/es/modules/__tests__/expressions.spec.js +4 -5
  405. package/build/es/modules/__tests__/isNumeric.spec.js +31 -0
  406. package/build/es/modules/dimensionListItem.js +4 -5
  407. package/build/es/modules/expressions.js +3 -9
  408. package/build/es/modules/getPWAInstallationStatus.js +7 -9
  409. package/build/es/modules/layout/dimensionCreate.js +1 -3
  410. package/build/es/modules/layout/dimensionIsValid.js +3 -4
  411. package/build/es/modules/legends.js +5 -6
  412. package/build/es/modules/outliers/index.js +2 -3
  413. package/build/es/modules/outliers/iqr.js +4 -6
  414. package/build/es/modules/outliers/modZScore.js +6 -14
  415. package/build/es/modules/outliers/zScore.js +3 -4
  416. package/build/es/modules/pivotTable/AdaptiveClippingController.js +12 -16
  417. package/build/es/modules/pivotTable/PivotTableEngine.js +48 -59
  418. package/build/es/modules/pivotTable/clipAxis.js +7 -8
  419. package/build/es/modules/pivotTable/clipPartitionedAxis.js +9 -10
  420. package/build/es/modules/pivotTable/getHeaderForDisplay.js +8 -9
  421. package/build/es/modules/pivotTable/measureText.js +7 -9
  422. package/build/es/modules/pivotTable/useParentSize.js +1 -2
  423. package/build/es/modules/pivotTable/useScrollPosition.js +1 -2
  424. package/build/es/modules/pivotTable/useTableClipping.js +6 -7
  425. package/build/es/modules/relativeItems/index.js +1 -4
  426. package/build/es/modules/renderValue.js +1 -2
  427. package/build/es/modules/utils.js +9 -1
  428. package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
  429. package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +2 -5
  430. package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
  431. package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
  432. package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
  433. package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
  434. package/build/es/visualizations/config/adapters/dhis_highcharts/getFormatter.js +1 -1
  435. package/build/es/visualizations/config/adapters/dhis_highcharts/getSteps.js +1 -1
  436. package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
  437. package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +7 -8
  438. package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
  439. package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
  440. package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
  441. package/build/es/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
  442. package/build/es/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
  443. package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
  444. package/build/es/visualizations/config/index.js +11 -12
  445. package/build/es/visualizations/config/validators/dhis/index.js +3 -4
  446. package/build/es/visualizations/index.js +1 -4
  447. package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
  448. package/build/es/visualizations/store/index.js +15 -17
  449. package/build/es/visualizations/store/validators/dhis/index.js +5 -6
  450. package/build/es/visualizations/util/getFilterText.js +3 -6
  451. package/build/es/visualizations/util/shouldUseContrastColor.js +1 -2
  452. package/package.json +12 -12
@@ -12,43 +12,34 @@ var _visTypes = require("../../modules/visTypes.js");
12
12
  var _VisTypeIcon = require("../VisTypeIcon.js");
13
13
  var _CustomSelectOption = require("./CustomSelectOption.js");
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- const VisTypeFilter = _ref => {
16
- let {
17
- visTypes,
18
- selected,
19
- onChange
20
- } = _ref;
21
- return /*#__PURE__*/_react.default.createElement(_ui.SingleSelect, {
22
- selected: selected,
23
- onChange: _ref2 => {
24
- let {
25
- selected
26
- } = _ref2;
27
- return onChange(selected);
28
- },
29
- prefix: _d2I18n.default.t('Type'),
30
- dense: true,
31
- maxHeight: "400px"
32
- }, visTypes === null || visTypes === void 0 ? void 0 : visTypes.map(_ref3 => {
33
- let {
34
- type,
35
- disabled,
36
- insertDivider
37
- } = _ref3;
38
- return /*#__PURE__*/_react.default.createElement(_CustomSelectOption.CustomSelectOption, {
39
- key: type,
40
- disabled: disabled,
41
- label: (0, _visTypes.getDisplayNameByVisType)(type),
42
- insertDivider: insertDivider,
43
- value: type,
44
- icon: _visTypes.visTypeIcons[type] ? /*#__PURE__*/_react.default.createElement(_VisTypeIcon.VisTypeIcon, {
45
- type: type,
46
- useSmall: true,
47
- color: _ui.colors.grey600
48
- }) : undefined
49
- });
50
- }));
51
- };
15
+ const VisTypeFilter = ({
16
+ visTypes,
17
+ selected,
18
+ onChange
19
+ }) => /*#__PURE__*/_react.default.createElement(_ui.SingleSelect, {
20
+ selected: selected,
21
+ onChange: ({
22
+ selected
23
+ }) => onChange(selected),
24
+ prefix: _d2I18n.default.t('Type'),
25
+ dense: true,
26
+ maxHeight: "400px"
27
+ }, visTypes === null || visTypes === void 0 ? void 0 : visTypes.map(({
28
+ type,
29
+ disabled,
30
+ insertDivider
31
+ }) => /*#__PURE__*/_react.default.createElement(_CustomSelectOption.CustomSelectOption, {
32
+ key: type,
33
+ disabled: disabled,
34
+ label: (0, _visTypes.getDisplayNameByVisType)(type),
35
+ insertDivider: insertDivider,
36
+ value: type,
37
+ icon: _visTypes.visTypeIcons[type] ? /*#__PURE__*/_react.default.createElement(_VisTypeIcon.VisTypeIcon, {
38
+ type: type,
39
+ useSmall: true,
40
+ color: _ui.colors.grey600
41
+ }) : undefined
42
+ })));
52
43
  exports.VisTypeFilter = VisTypeFilter;
53
44
  VisTypeFilter.propTypes = {
54
45
  selected: _propTypes.default.string,
@@ -9,43 +9,35 @@ var _ui = require("@dhis2/ui");
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _VisualizationOptionsStyle = require("./styles/VisualizationOptions.style.js");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- const VisualizationOptions = _ref => {
16
- let {
17
- initiallyActiveTabKey,
18
- optionsConfig,
19
- onClose,
20
- onUpdate
21
- } = _ref;
14
+ const VisualizationOptions = ({
15
+ initiallyActiveTabKey,
16
+ optionsConfig,
17
+ onClose,
18
+ onUpdate
19
+ }) => {
22
20
  const [activeTabKey, setActiveTabKey] = (0, _react.useState)(initiallyActiveTabKey);
23
- const generateTabContent = sections => sections.map(_ref2 => {
24
- let {
25
- key,
26
- label,
27
- content,
28
- helpText
29
- } = _ref2;
30
- return /*#__PURE__*/_react.default.createElement("div", {
31
- key: key,
32
- className: _VisualizationOptionsStyle.tabSection.className
33
- }, /*#__PURE__*/_react.default.createElement(_ui.FieldSet, null, label ? /*#__PURE__*/_react.default.createElement(_ui.Legend, null, /*#__PURE__*/_react.default.createElement("span", {
34
- className: _VisualizationOptionsStyle.tabSectionTitle.className
35
- }, label)) : null, content, helpText ? /*#__PURE__*/_react.default.createElement(_ui.Legend, null, /*#__PURE__*/_react.default.createElement(_ui.Help, null, helpText)) : null));
36
- });
37
- const generateTabs = tabs => tabs.map(_ref3 => {
38
- let {
39
- key,
40
- label,
41
- content
42
- } = _ref3;
43
- return {
44
- key,
45
- label,
46
- content: generateTabContent(content)
47
- };
48
- });
21
+ const generateTabContent = sections => sections.map(({
22
+ key,
23
+ label,
24
+ content,
25
+ helpText
26
+ }) => /*#__PURE__*/_react.default.createElement("div", {
27
+ key: key,
28
+ className: _VisualizationOptionsStyle.tabSection.className
29
+ }, /*#__PURE__*/_react.default.createElement(_ui.FieldSet, null, label ? /*#__PURE__*/_react.default.createElement(_ui.Legend, null, /*#__PURE__*/_react.default.createElement("span", {
30
+ className: _VisualizationOptionsStyle.tabSectionTitle.className
31
+ }, label)) : null, content, helpText ? /*#__PURE__*/_react.default.createElement(_ui.Legend, null, /*#__PURE__*/_react.default.createElement(_ui.Help, null, helpText)) : null)));
32
+ const generateTabs = tabs => tabs.map(({
33
+ key,
34
+ label,
35
+ content
36
+ }) => ({
37
+ key,
38
+ label,
39
+ content: generateTabContent(content)
40
+ }));
49
41
  const getModalContent = () => {
50
42
  const tabs = generateTabs(optionsConfig);
51
43
  let activeTabIndex = tabs.findIndex(tab => tab.key === activeTabKey);
@@ -56,17 +48,14 @@ const VisualizationOptions = _ref => {
56
48
  className: _VisualizationOptionsStyle.tabBar.className
57
49
  }, /*#__PURE__*/_react.default.createElement(_ui.TabBar, {
58
50
  dataTest: 'options-modal-tab-bar'
59
- }, tabs.map((_ref4, index) => {
60
- let {
61
- key,
62
- label
63
- } = _ref4;
64
- return /*#__PURE__*/_react.default.createElement(_ui.Tab, {
65
- key: key,
66
- onClick: () => setActiveTabKey(key),
67
- selected: index === activeTabIndex
68
- }, label);
69
- })), _VisualizationOptionsStyle.tabBar.styles), /*#__PURE__*/_react.default.createElement("div", {
51
+ }, tabs.map(({
52
+ key,
53
+ label
54
+ }, index) => /*#__PURE__*/_react.default.createElement(_ui.Tab, {
55
+ key: key,
56
+ onClick: () => setActiveTabKey(key),
57
+ selected: index === activeTabIndex
58
+ }, label))), _VisualizationOptionsStyle.tabBar.styles), /*#__PURE__*/_react.default.createElement("div", {
70
59
  className: _VisualizationOptionsStyle.tabContent.className
71
60
  }, tabs[activeTabIndex].content, _VisualizationOptionsStyle.tabContent.styles, _VisualizationOptionsStyle.tabSection.styles, _VisualizationOptionsStyle.tabSectionTitle.styles, _VisualizationOptionsStyle.tabSectionTitleDisabled.styles, _VisualizationOptionsStyle.tabSectionTitleMargin.styles, _VisualizationOptionsStyle.tabSectionOption.styles, _VisualizationOptionsStyle.tabSectionOptionItem.styles, _VisualizationOptionsStyle.tabSectionOptionToggleable.styles, _VisualizationOptionsStyle.tabSectionToggleableSubsection.styles, _VisualizationOptionsStyle.tabSectionOptionComplexInline.styles, _VisualizationOptionsStyle.tabSectionOptionText.styles, _VisualizationOptionsStyle.tabSectionOptionIcon.styles));
72
61
  };
@@ -16,21 +16,19 @@ var _list = require("../../modules/list.js");
16
16
  var _index2 = require("../../modules/ouIdHelper/index.js");
17
17
  var _predefinedDimensions = require("../../modules/predefinedDimensions.js");
18
18
  var _OrgUnitDimensionStyle = _interopRequireDefault(require("./styles/OrgUnitDimension.style.js"));
19
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
21
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
21
  const DYNAMIC_ORG_UNITS = [_index2.USER_ORG_UNIT, _index2.USER_ORG_UNIT_CHILDREN, _index2.USER_ORG_UNIT_GRANDCHILDREN];
23
- const OrgUnitDimension = _ref => {
24
- let {
25
- roots,
26
- selected,
27
- onSelect,
28
- hideGroupSelect,
29
- hideLevelSelect,
30
- hideUserOrgUnits,
31
- warning,
32
- displayNameProp
33
- } = _ref;
22
+ const OrgUnitDimension = ({
23
+ roots,
24
+ selected,
25
+ onSelect,
26
+ hideGroupSelect = false,
27
+ hideLevelSelect = false,
28
+ hideUserOrgUnits = false,
29
+ warning,
30
+ displayNameProp
31
+ }) => {
34
32
  const [ouLevels, setOuLevels] = (0, _react.useState)([]);
35
33
  const [ouGroups, setOuGroups] = (0, _react.useState)([]);
36
34
  const dataEngine = (0, _appRuntime.useDataEngine)();
@@ -147,44 +145,35 @@ const OrgUnitDimension = _ref => {
147
145
  }, /*#__PURE__*/_react.default.createElement(_ui.Checkbox, {
148
146
  label: _index.default.t('User organisation unit'),
149
147
  checked: selected.some(item => item.id === _index2.USER_ORG_UNIT),
150
- onChange: _ref2 => {
151
- let {
152
- checked
153
- } = _ref2;
154
- return onSelectItems({
155
- id: _index2.USER_ORG_UNIT,
156
- checked,
157
- displayName: _index.default.t('User organisation unit')
158
- });
159
- },
148
+ onChange: ({
149
+ checked
150
+ }) => onSelectItems({
151
+ id: _index2.USER_ORG_UNIT,
152
+ checked,
153
+ displayName: _index.default.t('User organisation unit')
154
+ }),
160
155
  dense: true
161
156
  }), /*#__PURE__*/_react.default.createElement(_ui.Checkbox, {
162
157
  label: _index.default.t('User sub-units'),
163
158
  checked: selected.some(item => item.id === _index2.USER_ORG_UNIT_CHILDREN),
164
- onChange: _ref3 => {
165
- let {
166
- checked
167
- } = _ref3;
168
- return onSelectItems({
169
- id: _index2.USER_ORG_UNIT_CHILDREN,
170
- checked,
171
- displayName: _index.default.t('User sub-units')
172
- });
173
- },
159
+ onChange: ({
160
+ checked
161
+ }) => onSelectItems({
162
+ id: _index2.USER_ORG_UNIT_CHILDREN,
163
+ checked,
164
+ displayName: _index.default.t('User sub-units')
165
+ }),
174
166
  dense: true
175
167
  }), /*#__PURE__*/_react.default.createElement(_ui.Checkbox, {
176
168
  label: _index.default.t('User sub-x2-units'),
177
169
  checked: selected.some(item => item.id === _index2.USER_ORG_UNIT_GRANDCHILDREN),
178
- onChange: _ref4 => {
179
- let {
180
- checked
181
- } = _ref4;
182
- return onSelectItems({
183
- id: _index2.USER_ORG_UNIT_GRANDCHILDREN,
184
- checked,
185
- displayName: _index.default.t('User sub-x2-units')
186
- });
187
- },
170
+ onChange: ({
171
+ checked
172
+ }) => onSelectItems({
173
+ id: _index2.USER_ORG_UNIT_GRANDCHILDREN,
174
+ checked,
175
+ displayName: _index.default.t('User sub-x2-units')
176
+ }),
188
177
  dense: true
189
178
  })), /*#__PURE__*/_react.default.createElement("div", {
190
179
  className: `jsx-${_OrgUnitDimensionStyle.default.__hash}` + " " + "orgUnitTreeWrapper"
@@ -200,12 +189,9 @@ const OrgUnitDimension = _ref => {
200
189
  }) || "")
201
190
  }, !hideLevelSelect && /*#__PURE__*/_react.default.createElement(_ui.MultiSelect, {
202
191
  selected: ouLevels.length ? selected.filter(item => _index2.ouIdHelper.hasLevelPrefix(item.id)).map(item => _index2.ouIdHelper.removePrefix(item.id)) : [],
203
- onChange: _ref5 => {
204
- let {
205
- selected
206
- } = _ref5;
207
- return onLevelChange(selected);
208
- },
192
+ onChange: ({
193
+ selected
194
+ }) => onLevelChange(selected),
209
195
  placeholder: _index.default.t('Select a level'),
210
196
  loading: !ouLevels.length,
211
197
  dense: true,
@@ -217,12 +203,9 @@ const OrgUnitDimension = _ref => {
217
203
  dataTest: `org-unit-level-select-option-${level.id}`
218
204
  }))), !hideGroupSelect && /*#__PURE__*/_react.default.createElement(_ui.MultiSelect, {
219
205
  selected: ouGroups.length ? selected.filter(item => _index2.ouIdHelper.hasGroupPrefix(item.id)).map(item => _index2.ouIdHelper.removePrefix(item.id)) : [],
220
- onChange: _ref6 => {
221
- let {
222
- selected
223
- } = _ref6;
224
- return onGroupChange(selected);
225
- },
206
+ onChange: ({
207
+ selected
208
+ }) => onGroupChange(selected),
226
209
  placeholder: _index.default.t('Select a group'),
227
210
  loading: !ouGroups.length,
228
211
  dense: true,
@@ -253,11 +236,6 @@ const OrgUnitDimension = _ref => {
253
236
  id: _OrgUnitDimensionStyle.default.__hash
254
237
  }, _OrgUnitDimensionStyle.default));
255
238
  };
256
- OrgUnitDimension.defaultProps = {
257
- hideGroupSelect: false,
258
- hideLevelSelect: false,
259
- hideUserOrgUnits: false
260
- };
261
239
  OrgUnitDimension.propTypes = {
262
240
  displayNameProp: _propTypes.default.string,
263
241
  hideGroupSelect: _propTypes.default.bool,
@@ -13,27 +13,24 @@ var _PeriodFilterStyle = _interopRequireDefault(require("./styles/PeriodFilter.s
13
13
  var _fixedPeriods = require("./utils/fixedPeriods.js");
14
14
  var _index2 = require("./utils/index.js");
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- const FixedPeriodFilter = _ref => {
17
- let {
18
- allowedPeriodTypes,
19
- excludedPeriodTypes,
20
- currentPeriodType,
21
- currentYear,
22
- onSelectPeriodType,
23
- onSelectYear,
24
- dataTest
25
- } = _ref;
16
+ const EXCLUDED_PERIOD_TYPES_PROP_DEFAULT = [];
17
+ const FixedPeriodFilter = ({
18
+ allowedPeriodTypes,
19
+ excludedPeriodTypes = EXCLUDED_PERIOD_TYPES_PROP_DEFAULT,
20
+ currentPeriodType,
21
+ currentYear,
22
+ onSelectPeriodType,
23
+ onSelectYear,
24
+ dataTest
25
+ }) => {
26
26
  const onlyAllowedTypeIsSelected = Array.isArray(allowedPeriodTypes) && allowedPeriodTypes.length === 1 && allowedPeriodTypes[0] === currentPeriodType;
27
27
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
28
28
  className: `jsx-${_PeriodFilterStyle.default.__hash}` + " " + "leftSection"
29
29
  }, /*#__PURE__*/_react.default.createElement(_ui.SingleSelectField, {
30
30
  label: _index.default.t('Period type'),
31
- onChange: _ref2 => {
32
- let {
33
- selected
34
- } = _ref2;
35
- return onSelectPeriodType(selected);
36
- },
31
+ onChange: ({
32
+ selected
33
+ }) => onSelectPeriodType(selected),
37
34
  dense: true,
38
35
  selected: currentPeriodType,
39
36
  disabled: onlyAllowedTypeIsSelected,
@@ -52,21 +49,15 @@ const FixedPeriodFilter = _ref => {
52
49
  type: "number",
53
50
  placeholder: _index.default.t('Select year'),
54
51
  value: currentYear,
55
- onChange: _ref3 => {
56
- let {
57
- value
58
- } = _ref3;
59
- return onSelectYear(value);
60
- },
52
+ onChange: ({
53
+ value
54
+ }) => onSelectYear(value),
61
55
  dense: true,
62
56
  dataTest: `${dataTest}-year`
63
57
  })), /*#__PURE__*/_react.default.createElement(_style.default, {
64
58
  id: _PeriodFilterStyle.default.__hash
65
59
  }, _PeriodFilterStyle.default));
66
60
  };
67
- FixedPeriodFilter.defaultProps = {
68
- excludedPeriodTypes: []
69
- };
70
61
  FixedPeriodFilter.propTypes = {
71
62
  currentPeriodType: _propTypes.default.string.isRequired,
72
63
  currentYear: _propTypes.default.string.isRequired,
@@ -12,15 +12,14 @@ var _index = _interopRequireDefault(require("../../locales/index.js"));
12
12
  var _FixedPeriodFilter = _interopRequireDefault(require("./FixedPeriodFilter.js"));
13
13
  var _FixedPeriodSelectStyle = _interopRequireDefault(require("./styles/FixedPeriodSelect.style.js"));
14
14
  var _fixedPeriods = require("./utils/fixedPeriods.js");
15
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
17
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
19
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
20
19
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
21
20
  class FixedPeriodSelect extends _react.Component {
22
- constructor() {
23
- super(...arguments);
21
+ constructor(...args) {
22
+ super(...args);
24
23
  _defineProperty(this, "state", {
25
24
  periodType: '',
26
25
  year: '',
@@ -40,24 +39,19 @@ class FixedPeriodSelect extends _react.Component {
40
39
  });
41
40
  this.props.onChange();
42
41
  });
43
- _defineProperty(this, "onSelectPeriod", (_ref, event) => {
44
- let {
45
- selected: periodId
46
- } = _ref;
47
- const period = this.state.options.find(_ref2 => {
48
- let {
49
- id
50
- } = _ref2;
51
- return id === periodId;
52
- });
42
+ _defineProperty(this, "onSelectPeriod", ({
43
+ selected: periodId
44
+ }, event) => {
45
+ const period = this.state.options.find(({
46
+ id
47
+ }) => id === periodId);
53
48
  this.props.onChange(period, event);
54
49
  });
55
50
  }
56
- static getDerivedStateFromProps(_ref3) {
57
- let {
58
- value,
59
- allowedPeriodTypes
60
- } = _ref3;
51
+ static getDerivedStateFromProps({
52
+ value,
53
+ allowedPeriodTypes
54
+ }) {
61
55
  const period = (0, _fixedPeriods.parsePeriodCode)(value, allowedPeriodTypes);
62
56
  if (!period) {
63
57
  return null;
@@ -100,10 +94,10 @@ class FixedPeriodSelect extends _react.Component {
100
94
  }, _FixedPeriodSelectStyle.default));
101
95
  }
102
96
  }
103
- FixedPeriodSelect.defaultProps = {
97
+ _defineProperty(FixedPeriodSelect, "defaultProps", {
104
98
  dataTest: 'dhis2-analytics-fixedperiodselect',
105
99
  value: ''
106
- };
100
+ });
107
101
  FixedPeriodSelect.propTypes = {
108
102
  onChange: _propTypes.default.func.isRequired,
109
103
  allowedPeriodTypes: _propTypes.default.arrayOf(_propTypes.default.string),
@@ -18,15 +18,15 @@ const userSettingsQuery = {
18
18
  }
19
19
  }
20
20
  };
21
- const PeriodDimension = _ref => {
22
- let {
23
- onSelect,
24
- selectedPeriods,
25
- rightFooter,
26
- excludedPeriodTypes,
27
- infoBoxMessage,
28
- height
29
- } = _ref;
21
+ const SELECTED_PERIODS_PROP_DEFAULT = [];
22
+ const PeriodDimension = ({
23
+ onSelect,
24
+ selectedPeriods = SELECTED_PERIODS_PROP_DEFAULT,
25
+ rightFooter,
26
+ excludedPeriodTypes,
27
+ infoBoxMessage,
28
+ height
29
+ }) => {
30
30
  const {
31
31
  systemInfo
32
32
  } = (0, _appRuntime.useConfig)();
@@ -70,7 +70,4 @@ PeriodDimension.propTypes = {
70
70
  rightFooter: _propTypes.default.node,
71
71
  selectedPeriods: _propTypes.default.array
72
72
  };
73
- PeriodDimension.defaultProps = {
74
- selectedPeriods: []
75
- };
76
73
  var _default = exports.default = PeriodDimension;
@@ -19,40 +19,41 @@ var _RelativePeriodFilter = _interopRequireDefault(require("./RelativePeriodFilt
19
19
  var _fixedPeriods = require("./utils/fixedPeriods.js");
20
20
  var _index2 = require("./utils/index.js");
21
21
  var _relativePeriods = require("./utils/relativePeriods.js");
22
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
23
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
24
23
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
25
24
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } //TODO: Reimplement the icon.js
26
- const RightHeader = _ref => {
27
- let {
28
- infoBoxMessage
29
- } = _ref;
30
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", {
31
- className: `jsx-${_DimensionSelectorStyle.default.__hash}` + " " + "rightHeader"
32
- }, _index.default.t('Selected Periods')), infoBoxMessage && /*#__PURE__*/_react.default.createElement("div", {
33
- className: `jsx-${_DimensionSelectorStyle.default.__hash}` + " " + "info-container"
34
- }, /*#__PURE__*/_react.default.createElement("div", {
35
- className: `jsx-${_DimensionSelectorStyle.default.__hash}`
36
- }, /*#__PURE__*/_react.default.createElement(_ui.IconInfo16, null)), /*#__PURE__*/_react.default.createElement("span", {
37
- className: `jsx-${_DimensionSelectorStyle.default.__hash}` + " " + "info-text"
38
- }, infoBoxMessage)), /*#__PURE__*/_react.default.createElement(_style.default, {
39
- id: _DimensionSelectorStyle.default.__hash
40
- }, _DimensionSelectorStyle.default));
41
- };
25
+ const RightHeader = ({
26
+ infoBoxMessage
27
+ }) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("p", {
28
+ className: `jsx-${_DimensionSelectorStyle.default.__hash}` + " " + "rightHeader"
29
+ }, _index.default.t('Selected Periods')), infoBoxMessage && /*#__PURE__*/_react.default.createElement("div", {
30
+ className: `jsx-${_DimensionSelectorStyle.default.__hash}` + " " + "info-container"
31
+ }, /*#__PURE__*/_react.default.createElement("div", {
32
+ className: `jsx-${_DimensionSelectorStyle.default.__hash}`
33
+ }, /*#__PURE__*/_react.default.createElement(_ui.IconInfo16, null)), /*#__PURE__*/_react.default.createElement("span", {
34
+ className: `jsx-${_DimensionSelectorStyle.default.__hash}` + " " + "info-text"
35
+ }, infoBoxMessage)), /*#__PURE__*/_react.default.createElement(_style.default, {
36
+ id: _DimensionSelectorStyle.default.__hash
37
+ }, _DimensionSelectorStyle.default));
42
38
  RightHeader.propTypes = {
43
39
  infoBoxMessage: _propTypes.default.string
44
40
  };
45
- const PeriodTransfer = _ref2 => {
46
- let {
47
- onSelect,
48
- dataTest,
49
- selectedItems,
50
- rightFooter,
51
- excludedPeriodTypes,
52
- periodsSettings,
53
- infoBoxMessage,
54
- height = _dimensionSelectorHelper.TRANSFER_HEIGHT
55
- } = _ref2;
41
+ const SELECTED_ITEMS_PROP_DEFAULT = [];
42
+ const EXCLUDED_PERIOD_TYPES_PROP_DEFAULT = [];
43
+ const PERIODS_SETTINGS_PROP_DEFAULT = {
44
+ calendar: 'gregory',
45
+ locale: 'en'
46
+ };
47
+ const PeriodTransfer = ({
48
+ onSelect,
49
+ dataTest,
50
+ selectedItems = SELECTED_ITEMS_PROP_DEFAULT,
51
+ rightFooter,
52
+ excludedPeriodTypes = EXCLUDED_PERIOD_TYPES_PROP_DEFAULT,
53
+ periodsSettings = PERIODS_SETTINGS_PROP_DEFAULT,
54
+ infoBoxMessage,
55
+ height = _dimensionSelectorHelper.TRANSFER_HEIGHT
56
+ }) => {
56
57
  const defaultRelativePeriodType = excludedPeriodTypes.includes(_index2.MONTHLY) ? (0, _relativePeriods.getRelativePeriodsOptionsById)(_index2.QUARTERLY) : (0, _relativePeriods.getRelativePeriodsOptionsById)(_index2.MONTHLY);
57
58
  const defaultFixedPeriodType = excludedPeriodTypes.includes(_index2.MONTHLY) ? (0, _fixedPeriods.getFixedPeriodsOptionsById)(_index2.QUARTERLY, periodsSettings) : (0, _fixedPeriods.getFixedPeriodsOptionsById)(_index2.MONTHLY, periodsSettings);
58
59
  const now = (0, _multiCalendarDates.getNowInCalendar)(periodsSettings.calendar);
@@ -135,10 +136,9 @@ const PeriodTransfer = _ref2 => {
135
136
  id: _DimensionSelectorStyle.default.__hash
136
137
  }, _DimensionSelectorStyle.default));
137
138
  return /*#__PURE__*/_react.default.createElement(_ui.Transfer, {
138
- onChange: _ref3 => {
139
- let {
140
- selected
141
- } = _ref3;
139
+ onChange: ({
140
+ selected
141
+ }) => {
142
142
  const formattedItems = selected.map(id => {
143
143
  const matchingItem = [...allPeriods, ...selectedItems].find(item => item.id === id);
144
144
  return {
@@ -160,39 +160,25 @@ const PeriodTransfer = _ref2 => {
160
160
  infoBoxMessage: infoBoxMessage
161
161
  }),
162
162
  rightFooter: rightFooter,
163
- options: [...allPeriods, ...selectedItems].map(_ref4 => {
164
- let {
165
- id,
166
- name
167
- } = _ref4;
168
- return {
169
- label: name,
170
- value: id
171
- };
172
- }),
173
- renderOption: _ref5 => {
174
- let {
175
- value,
176
- ...props
177
- } = _ref5;
178
- return /*#__PURE__*/_react.default.createElement(_TransferOption.TransferOption, _extends({}, props, {
179
- value: value,
180
- active: isActive(value),
181
- icon: _PeriodIcon.default,
182
- dataTest: `${dataTest}-transfer-option`
183
- }));
184
- },
163
+ options: [...allPeriods, ...selectedItems].map(({
164
+ id,
165
+ name
166
+ }) => ({
167
+ label: name,
168
+ value: id
169
+ })),
170
+ renderOption: ({
171
+ value,
172
+ ...props
173
+ }) => /*#__PURE__*/_react.default.createElement(_TransferOption.TransferOption, _extends({}, props, {
174
+ value: value,
175
+ active: isActive(value),
176
+ icon: _PeriodIcon.default,
177
+ dataTest: `${dataTest}-transfer-option`
178
+ })),
185
179
  dataTest: `${dataTest}-transfer`
186
180
  });
187
181
  };
188
- PeriodTransfer.defaultProps = {
189
- selectedItems: [],
190
- excludedPeriodTypes: [],
191
- periodsSettings: {
192
- calendar: 'gregory',
193
- locale: 'en'
194
- }
195
- };
196
182
  PeriodTransfer.propTypes = {
197
183
  onSelect: _propTypes.default.func.isRequired,
198
184
  dataTest: _propTypes.default.string,