@beinformed/ui 1.63.2 → 1.63.3

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 (460) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/esm/constants/Settings.js +3 -14
  3. package/esm/constants/Settings.js.map +1 -1
  4. package/esm/exceptions/NotFoundException.js +1 -2
  5. package/esm/exceptions/NotFoundException.js.map +1 -1
  6. package/esm/hooks/useI18n.js +1 -6
  7. package/esm/hooks/useI18n.js.map +1 -1
  8. package/esm/hooks/useModal.js +3 -4
  9. package/esm/hooks/useModal.js.map +1 -1
  10. package/esm/hooks/useModelCatalog.js +10 -30
  11. package/esm/hooks/useModelCatalog.js.map +1 -1
  12. package/esm/hooks/useModularUI.js +4 -5
  13. package/esm/hooks/useModularUI.js.map +1 -1
  14. package/esm/hooks/useModularUIBasic.js +7 -8
  15. package/esm/hooks/useModularUIBasic.js.map +1 -1
  16. package/esm/i18n/Locale.js +2 -5
  17. package/esm/i18n/Locale.js.map +1 -1
  18. package/esm/i18n/Locales.js +2 -5
  19. package/esm/i18n/Locales.js.map +1 -1
  20. package/esm/i18n/Message.js +9 -10
  21. package/esm/i18n/Message.js.map +1 -1
  22. package/esm/i18n/withMessage.js +1 -6
  23. package/esm/i18n/withMessage.js.map +1 -1
  24. package/esm/models/actions/ActionCollection.js +3 -6
  25. package/esm/models/actions/ActionCollection.js.map +1 -1
  26. package/esm/models/actions/ActionModel.js +1 -4
  27. package/esm/models/actions/ActionModel.js.map +1 -1
  28. package/esm/models/application/ApplicationModel.js +2 -2
  29. package/esm/models/application/ApplicationModel.js.map +1 -1
  30. package/esm/models/attributes/AttributeCollection.js +4 -14
  31. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  32. package/esm/models/attributes/AttributeDataHelper.js +1 -2
  33. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  34. package/esm/models/attributes/AttributeSetModel.js +1 -5
  35. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  36. package/esm/models/attributes/CaptchaAttributeModel.js +2 -2
  37. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  38. package/esm/models/attributes/ChoiceAttributeModel.js +1 -3
  39. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  40. package/esm/models/attributes/ChoiceAttributeOptionCollection.js +3 -9
  41. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  42. package/esm/models/attributes/ChoiceAttributeOptionModel.js +2 -8
  43. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  44. package/esm/models/attributes/PasswordAttributeModel.js +2 -2
  45. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  46. package/esm/models/attributes/UploadAttributeModel.js +2 -2
  47. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  48. package/esm/models/attributes/input-constraints/ConstraintCollection.js +1 -2
  49. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  50. package/esm/models/attributes/input-constraints/ConstraintModel.js +1 -2
  51. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  52. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -4
  53. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  54. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -6
  55. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  56. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -4
  57. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  58. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
  59. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  60. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
  61. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  62. package/esm/models/base/BaseCollection.js +1 -2
  63. package/esm/models/base/BaseCollection.js.map +1 -1
  64. package/esm/models/base/BaseModel.js +6 -9
  65. package/esm/models/base/BaseModel.js.map +1 -1
  66. package/esm/models/base/ResourceModel.js +1 -2
  67. package/esm/models/base/ResourceModel.js.map +1 -1
  68. package/esm/models/concepts/BusinessScenarioModel.js +2 -2
  69. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  70. package/esm/models/concepts/ConceptDetailModel.js +1 -2
  71. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  72. package/esm/models/concepts/ConceptLinkModel.js +1 -3
  73. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  74. package/esm/models/concepts/ConceptRelationCollection.js +1 -4
  75. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  76. package/esm/models/concepts/ConceptRelationModel.js +1 -3
  77. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  78. package/esm/models/concepts/SourceReferenceCollection.js +1 -4
  79. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  80. package/esm/models/concepts/SourceReferenceModel.js +7 -3
  81. package/esm/models/concepts/SourceReferenceModel.js.flow +6 -0
  82. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  83. package/esm/models/content/ContentLinkModel.js +1 -3
  84. package/esm/models/content/ContentLinkModel.js.map +1 -1
  85. package/esm/models/content/ContentTOCModel.js +2 -2
  86. package/esm/models/content/ContentTOCModel.js.map +1 -1
  87. package/esm/models/contentconfiguration/ContentConfigurationElements.js +1 -2
  88. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  89. package/esm/models/error/ErrorModel.js +1 -3
  90. package/esm/models/error/ErrorModel.js.map +1 -1
  91. package/esm/models/filters/FilterCollection.js +1 -4
  92. package/esm/models/filters/FilterCollection.js.map +1 -1
  93. package/esm/models/form/FormModel.js +3 -9
  94. package/esm/models/form/FormModel.js.map +1 -1
  95. package/esm/models/form/FormObjectModel.js +2 -4
  96. package/esm/models/form/FormObjectModel.js.map +1 -1
  97. package/esm/models/href/Href.js +3 -6
  98. package/esm/models/href/Href.js.map +1 -1
  99. package/esm/models/href/ListHref.js +1 -2
  100. package/esm/models/href/ListHref.js.map +1 -1
  101. package/esm/models/layouthint/LayoutHintCollection.js +3 -10
  102. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  103. package/esm/models/links/LinkCollection.js +6 -15
  104. package/esm/models/links/LinkCollection.js.map +1 -1
  105. package/esm/models/list/ListModel.js +2 -2
  106. package/esm/models/list/ListModel.js.map +1 -1
  107. package/esm/models/modelcatalog/ModelCategoryCollection.js +1 -2
  108. package/esm/models/modelcatalog/ModelCategoryCollection.js.map +1 -1
  109. package/esm/models/parameter/Parameter.js +2 -4
  110. package/esm/models/parameter/Parameter.js.map +1 -1
  111. package/esm/models/resolveModel.js +1 -2
  112. package/esm/models/resolveModel.js.map +1 -1
  113. package/esm/models/sorting/SortingModel.js +1 -2
  114. package/esm/models/sorting/SortingModel.js.map +1 -1
  115. package/esm/models/user/UserServicesModel.js +2 -2
  116. package/esm/models/user/UserServicesModel.js.map +1 -1
  117. package/esm/modularui/ModularUIRequest.js +1 -2
  118. package/esm/modularui/ModularUIRequest.js.map +1 -1
  119. package/esm/react/ErrorBoundary.js +2 -2
  120. package/esm/react/ErrorBoundary.js.map +1 -1
  121. package/esm/react/ErrorBoundaryFallback.js +13 -16
  122. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  123. package/esm/react/utils.js +1 -3
  124. package/esm/react/utils.js.map +1 -1
  125. package/esm/react-client/Init.js +20 -23
  126. package/esm/react-client/Init.js.map +1 -1
  127. package/esm/react-client/client.js +9 -13
  128. package/esm/react-client/client.js.map +1 -1
  129. package/esm/react-server/renderSSRComplete.js +9 -10
  130. package/esm/react-server/renderSSRComplete.js.map +1 -1
  131. package/esm/react-server/renderSSRMinimal.js +7 -8
  132. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  133. package/esm/react-server/serverNoSSR.js +11 -12
  134. package/esm/react-server/serverNoSSR.js.map +1 -1
  135. package/esm/react-server/serverSSR.js +11 -12
  136. package/esm/react-server/serverSSR.js.map +1 -1
  137. package/esm/react-server/serverUtil.js +1 -3
  138. package/esm/react-server/serverUtil.js.map +1 -1
  139. package/esm/react-theme/ThemeProvider.js +7 -11
  140. package/esm/react-theme/ThemeProvider.js.map +1 -1
  141. package/esm/react-theme/createTheme.js +3 -10
  142. package/esm/react-theme/createTheme.js.map +1 -1
  143. package/esm/react-theme/utils/background.js +3 -4
  144. package/esm/react-theme/utils/background.js.map +1 -1
  145. package/esm/react-theme/utils/colors.js +7 -16
  146. package/esm/react-theme/utils/colors.js.map +1 -1
  147. package/esm/react-theme/utils/contrast.js +11 -19
  148. package/esm/react-theme/utils/contrast.js.map +1 -1
  149. package/esm/react-theme/utils/corners.js +10 -16
  150. package/esm/react-theme/utils/corners.js.map +1 -1
  151. package/esm/react-theme/utils/spacers.js +15 -38
  152. package/esm/react-theme/utils/spacers.js.map +1 -1
  153. package/esm/react-theme/utils/themeProps.js +7 -22
  154. package/esm/react-theme/utils/themeProps.js.map +1 -1
  155. package/esm/redux/_i18n/I18nReducer.js +5 -8
  156. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  157. package/esm/redux/_modularui/ModularUIActions.js +19 -23
  158. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  159. package/esm/redux/_modularui/ModularUIConnector.js +4 -5
  160. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  161. package/esm/redux/_modularui/ModularUIReducer.js +14 -19
  162. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  163. package/esm/redux/_modularui/ModularUIUtils.js +1 -2
  164. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  165. package/esm/redux/_modularui/withModularUI.js +1 -2
  166. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  167. package/esm/redux/_router/RouterReducer.js +1 -3
  168. package/esm/redux/_router/RouterReducer.js.map +1 -1
  169. package/esm/redux/actions/FormAttributeSet.js +34 -37
  170. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  171. package/esm/redux/actions/FormAutosubmit.js +1 -2
  172. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  173. package/esm/redux/actions/Preferences.js +8 -15
  174. package/esm/redux/actions/Preferences.js.map +1 -1
  175. package/esm/redux/connectors/CaseView.js +3 -6
  176. package/esm/redux/connectors/CaseView.js.map +1 -1
  177. package/esm/redux/connectors/ConceptDetail.js +4 -7
  178. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  179. package/esm/redux/connectors/ContentBrowser.js +3 -6
  180. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  181. package/esm/redux/connectors/ContentDetail.js +4 -7
  182. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  183. package/esm/redux/connectors/ContentDetailSection.js +5 -8
  184. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  185. package/esm/redux/connectors/Form.js +4 -5
  186. package/esm/redux/connectors/Form.js.map +1 -1
  187. package/esm/redux/connectors/FormAttributeSet.js +5 -8
  188. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  189. package/esm/redux/connectors/ListDetail.js +3 -6
  190. package/esm/redux/connectors/ListDetail.js.map +1 -1
  191. package/esm/redux/connectors/ModelCatalog.js +3 -6
  192. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  193. package/esm/redux/connectors/PanelRenderer.js +5 -6
  194. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  195. package/esm/redux/connectors/QuickSearch.js +3 -6
  196. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  197. package/esm/redux/connectors/Tab.js +3 -6
  198. package/esm/redux/connectors/Tab.js.map +1 -1
  199. package/esm/redux/reducers/AuthReducer.js +1 -3
  200. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  201. package/esm/redux/reducers/ErrorReducer.js +1 -3
  202. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  203. package/esm/redux/reducers/ModalsReducer.js +1 -3
  204. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  205. package/esm/redux/reducers/ModelCatalogReducer.js +1 -3
  206. package/esm/redux/reducers/ModelCatalogReducer.js.map +1 -1
  207. package/esm/redux/reducers/NotificationReducer.js +1 -3
  208. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  209. package/esm/redux/reducers/PreferencesReducer.js +1 -3
  210. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  211. package/esm/redux/reducers/ProgressIndicatorReducer.js +1 -3
  212. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  213. package/esm/redux/store/beforeRenderHooks.js +1 -3
  214. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  215. package/esm/utils/browser/Cache.js +1 -5
  216. package/esm/utils/browser/Cache.js.map +1 -1
  217. package/esm/utils/datetime/DateTimeUtil.js +45 -91
  218. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  219. package/esm/utils/fetch/xhr.js +1 -2
  220. package/esm/utils/fetch/xhr.js.map +1 -1
  221. package/esm/utils/helpers/repositoryResource.js +1 -3
  222. package/esm/utils/helpers/repositoryResource.js.map +1 -1
  223. package/esm/utils/helpers/sanitizeHtml.js +3 -4
  224. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  225. package/esm/utils/number/DecimalFormat.js +1 -2
  226. package/esm/utils/number/DecimalFormat.js.map +1 -1
  227. package/esm/utils/number/formatValue.js +1 -4
  228. package/esm/utils/number/formatValue.js.map +1 -1
  229. package/esm/utils/number/parseNumbers.js +2 -6
  230. package/esm/utils/number/parseNumbers.js.map +1 -1
  231. package/lib/constants/Settings.js +3 -14
  232. package/lib/constants/Settings.js.map +1 -1
  233. package/lib/exceptions/NotFoundException.js +1 -2
  234. package/lib/exceptions/NotFoundException.js.map +1 -1
  235. package/lib/hooks/useI18n.js +1 -6
  236. package/lib/hooks/useI18n.js.map +1 -1
  237. package/lib/hooks/useModal.js +3 -4
  238. package/lib/hooks/useModal.js.map +1 -1
  239. package/lib/hooks/useModelCatalog.js +10 -30
  240. package/lib/hooks/useModelCatalog.js.map +1 -1
  241. package/lib/hooks/useModularUI.js +4 -5
  242. package/lib/hooks/useModularUI.js.map +1 -1
  243. package/lib/hooks/useModularUIBasic.js +7 -8
  244. package/lib/hooks/useModularUIBasic.js.map +1 -1
  245. package/lib/i18n/Locale.js +2 -5
  246. package/lib/i18n/Locale.js.map +1 -1
  247. package/lib/i18n/Locales.js +2 -5
  248. package/lib/i18n/Locales.js.map +1 -1
  249. package/lib/i18n/Message.js +9 -10
  250. package/lib/i18n/Message.js.map +1 -1
  251. package/lib/i18n/withMessage.js +1 -6
  252. package/lib/i18n/withMessage.js.map +1 -1
  253. package/lib/models/actions/ActionCollection.js +3 -6
  254. package/lib/models/actions/ActionCollection.js.map +1 -1
  255. package/lib/models/actions/ActionModel.js +1 -4
  256. package/lib/models/actions/ActionModel.js.map +1 -1
  257. package/lib/models/application/ApplicationModel.js +2 -2
  258. package/lib/models/application/ApplicationModel.js.map +1 -1
  259. package/lib/models/attributes/AttributeCollection.js +4 -14
  260. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  261. package/lib/models/attributes/AttributeDataHelper.js +1 -2
  262. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  263. package/lib/models/attributes/AttributeSetModel.js +1 -5
  264. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  265. package/lib/models/attributes/CaptchaAttributeModel.js +2 -2
  266. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  267. package/lib/models/attributes/ChoiceAttributeModel.js +1 -3
  268. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  269. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +3 -9
  270. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  271. package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -8
  272. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  273. package/lib/models/attributes/PasswordAttributeModel.js +2 -2
  274. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  275. package/lib/models/attributes/UploadAttributeModel.js +2 -2
  276. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  277. package/lib/models/attributes/input-constraints/ConstraintCollection.js +1 -2
  278. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  279. package/lib/models/attributes/input-constraints/ConstraintModel.js +1 -2
  280. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  281. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -4
  282. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  283. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -6
  284. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  285. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -4
  286. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  287. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
  288. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  289. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
  290. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  291. package/lib/models/base/BaseCollection.js +1 -2
  292. package/lib/models/base/BaseCollection.js.map +1 -1
  293. package/lib/models/base/BaseModel.js +6 -9
  294. package/lib/models/base/BaseModel.js.map +1 -1
  295. package/lib/models/base/ResourceModel.js +1 -2
  296. package/lib/models/base/ResourceModel.js.map +1 -1
  297. package/lib/models/concepts/BusinessScenarioModel.js +2 -2
  298. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  299. package/lib/models/concepts/ConceptDetailModel.js +1 -2
  300. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  301. package/lib/models/concepts/ConceptLinkModel.js +1 -3
  302. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  303. package/lib/models/concepts/ConceptRelationCollection.js +1 -4
  304. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  305. package/lib/models/concepts/ConceptRelationModel.js +1 -3
  306. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  307. package/lib/models/concepts/SourceReferenceCollection.js +1 -4
  308. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  309. package/lib/models/concepts/SourceReferenceModel.js +7 -3
  310. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  311. package/lib/models/content/ContentLinkModel.js +1 -3
  312. package/lib/models/content/ContentLinkModel.js.map +1 -1
  313. package/lib/models/content/ContentTOCModel.js +2 -2
  314. package/lib/models/content/ContentTOCModel.js.map +1 -1
  315. package/lib/models/contentconfiguration/ContentConfigurationElements.js +1 -2
  316. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  317. package/lib/models/error/ErrorModel.js +1 -3
  318. package/lib/models/error/ErrorModel.js.map +1 -1
  319. package/lib/models/filters/FilterCollection.js +1 -4
  320. package/lib/models/filters/FilterCollection.js.map +1 -1
  321. package/lib/models/form/FormModel.js +3 -9
  322. package/lib/models/form/FormModel.js.map +1 -1
  323. package/lib/models/form/FormObjectModel.js +2 -4
  324. package/lib/models/form/FormObjectModel.js.map +1 -1
  325. package/lib/models/href/Href.js +3 -6
  326. package/lib/models/href/Href.js.map +1 -1
  327. package/lib/models/href/ListHref.js +1 -2
  328. package/lib/models/href/ListHref.js.map +1 -1
  329. package/lib/models/layouthint/LayoutHintCollection.js +3 -10
  330. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  331. package/lib/models/links/LinkCollection.js +6 -15
  332. package/lib/models/links/LinkCollection.js.map +1 -1
  333. package/lib/models/list/ListModel.js +2 -2
  334. package/lib/models/list/ListModel.js.map +1 -1
  335. package/lib/models/modelcatalog/ModelCategoryCollection.js +1 -2
  336. package/lib/models/modelcatalog/ModelCategoryCollection.js.map +1 -1
  337. package/lib/models/parameter/Parameter.js +2 -4
  338. package/lib/models/parameter/Parameter.js.map +1 -1
  339. package/lib/models/resolveModel.js +1 -2
  340. package/lib/models/resolveModel.js.map +1 -1
  341. package/lib/models/sorting/SortingModel.js +1 -2
  342. package/lib/models/sorting/SortingModel.js.map +1 -1
  343. package/lib/models/user/UserServicesModel.js +2 -2
  344. package/lib/models/user/UserServicesModel.js.map +1 -1
  345. package/lib/modularui/ModularUIRequest.js +1 -2
  346. package/lib/modularui/ModularUIRequest.js.map +1 -1
  347. package/lib/react/ErrorBoundary.js +2 -2
  348. package/lib/react/ErrorBoundary.js.map +1 -1
  349. package/lib/react/ErrorBoundaryFallback.js +13 -16
  350. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  351. package/lib/react/utils.js +1 -3
  352. package/lib/react/utils.js.map +1 -1
  353. package/lib/react-client/Init.js +20 -23
  354. package/lib/react-client/Init.js.map +1 -1
  355. package/lib/react-client/client.js +9 -13
  356. package/lib/react-client/client.js.map +1 -1
  357. package/lib/react-server/renderSSRComplete.js +9 -10
  358. package/lib/react-server/renderSSRComplete.js.map +1 -1
  359. package/lib/react-server/renderSSRMinimal.js +7 -8
  360. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  361. package/lib/react-server/serverNoSSR.js +11 -12
  362. package/lib/react-server/serverNoSSR.js.map +1 -1
  363. package/lib/react-server/serverSSR.js +11 -12
  364. package/lib/react-server/serverSSR.js.map +1 -1
  365. package/lib/react-server/serverUtil.js +1 -3
  366. package/lib/react-server/serverUtil.js.map +1 -1
  367. package/lib/react-theme/ThemeProvider.js +7 -11
  368. package/lib/react-theme/ThemeProvider.js.map +1 -1
  369. package/lib/react-theme/createTheme.js +3 -10
  370. package/lib/react-theme/createTheme.js.map +1 -1
  371. package/lib/react-theme/utils/background.js +3 -4
  372. package/lib/react-theme/utils/background.js.map +1 -1
  373. package/lib/react-theme/utils/colors.js +7 -16
  374. package/lib/react-theme/utils/colors.js.map +1 -1
  375. package/lib/react-theme/utils/contrast.js +11 -19
  376. package/lib/react-theme/utils/contrast.js.map +1 -1
  377. package/lib/react-theme/utils/corners.js +10 -16
  378. package/lib/react-theme/utils/corners.js.map +1 -1
  379. package/lib/react-theme/utils/spacers.js +15 -38
  380. package/lib/react-theme/utils/spacers.js.map +1 -1
  381. package/lib/react-theme/utils/themeProps.js +7 -22
  382. package/lib/react-theme/utils/themeProps.js.map +1 -1
  383. package/lib/redux/_i18n/I18nReducer.js +5 -8
  384. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  385. package/lib/redux/_modularui/ModularUIActions.js +19 -23
  386. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  387. package/lib/redux/_modularui/ModularUIConnector.js +4 -5
  388. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  389. package/lib/redux/_modularui/ModularUIReducer.js +14 -19
  390. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  391. package/lib/redux/_modularui/ModularUIUtils.js +1 -2
  392. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  393. package/lib/redux/_modularui/withModularUI.js +1 -2
  394. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  395. package/lib/redux/_router/RouterReducer.js +1 -3
  396. package/lib/redux/_router/RouterReducer.js.map +1 -1
  397. package/lib/redux/actions/FormAttributeSet.js +34 -37
  398. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  399. package/lib/redux/actions/FormAutosubmit.js +1 -2
  400. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  401. package/lib/redux/actions/Preferences.js +8 -15
  402. package/lib/redux/actions/Preferences.js.map +1 -1
  403. package/lib/redux/connectors/CaseView.js +3 -6
  404. package/lib/redux/connectors/CaseView.js.map +1 -1
  405. package/lib/redux/connectors/ConceptDetail.js +4 -7
  406. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  407. package/lib/redux/connectors/ContentBrowser.js +3 -6
  408. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  409. package/lib/redux/connectors/ContentDetail.js +4 -7
  410. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  411. package/lib/redux/connectors/ContentDetailSection.js +5 -8
  412. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  413. package/lib/redux/connectors/Form.js +4 -5
  414. package/lib/redux/connectors/Form.js.map +1 -1
  415. package/lib/redux/connectors/FormAttributeSet.js +5 -8
  416. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  417. package/lib/redux/connectors/ListDetail.js +3 -6
  418. package/lib/redux/connectors/ListDetail.js.map +1 -1
  419. package/lib/redux/connectors/ModelCatalog.js +3 -6
  420. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  421. package/lib/redux/connectors/PanelRenderer.js +5 -6
  422. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  423. package/lib/redux/connectors/QuickSearch.js +3 -6
  424. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  425. package/lib/redux/connectors/Tab.js +3 -6
  426. package/lib/redux/connectors/Tab.js.map +1 -1
  427. package/lib/redux/reducers/AuthReducer.js +1 -3
  428. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  429. package/lib/redux/reducers/ErrorReducer.js +1 -3
  430. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  431. package/lib/redux/reducers/ModalsReducer.js +1 -3
  432. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  433. package/lib/redux/reducers/ModelCatalogReducer.js +1 -3
  434. package/lib/redux/reducers/ModelCatalogReducer.js.map +1 -1
  435. package/lib/redux/reducers/NotificationReducer.js +1 -3
  436. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  437. package/lib/redux/reducers/PreferencesReducer.js +1 -3
  438. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  439. package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -3
  440. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  441. package/lib/redux/store/beforeRenderHooks.js +1 -3
  442. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  443. package/lib/utils/browser/Cache.js +1 -5
  444. package/lib/utils/browser/Cache.js.map +1 -1
  445. package/lib/utils/datetime/DateTimeUtil.js +45 -91
  446. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  447. package/lib/utils/fetch/xhr.js +1 -2
  448. package/lib/utils/fetch/xhr.js.map +1 -1
  449. package/lib/utils/helpers/repositoryResource.js +1 -3
  450. package/lib/utils/helpers/repositoryResource.js.map +1 -1
  451. package/lib/utils/helpers/sanitizeHtml.js +3 -4
  452. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  453. package/lib/utils/number/DecimalFormat.js +1 -2
  454. package/lib/utils/number/DecimalFormat.js.map +1 -1
  455. package/lib/utils/number/formatValue.js +1 -4
  456. package/lib/utils/number/formatValue.js.map +1 -1
  457. package/lib/utils/number/parseNumbers.js +2 -6
  458. package/lib/utils/number/parseNumbers.js.map +1 -1
  459. package/package.json +22 -22
  460. package/src/models/concepts/SourceReferenceModel.js +6 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ModelCatalogReducer.js","names":["_Cache","_interopRequireDefault","require","initialState","entryDate","Date","toISOString","split","ModelCatalogReducer","state","arguments","length","undefined","action","type","Cache","addItem","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/ModelCatalogReducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ModelCatalogState } from \"../types\";\n\nconst initialState: ModelCatalogState = {\n entryDate: new Date().toISOString().split(\"T\")[0],\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nconst ModelCatalogReducer: Reducer<ModelCatalogState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_ENTRYDATE\":\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n return {\n ...state,\n entryDate: action.payload,\n };\n default:\n return state;\n }\n};\n\nexport default ModelCatalogReducer;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,MAAMC,YAA+B,GAAG;EACtCC,SAAS,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAG,SAAAA,CAAA,EAGhE;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGP,YAAY;EAAA,IACpBU,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOJ,KAAK;EACd;EAEA,QAAQI,MAAM,CAACC,IAAI;IACjB,KAAK,kBAAkB;MACrBC,cAAK,CAACC,OAAO,CAAC,uBAAuB,EAAEH,MAAM,CAACI,OAAO,CAAC;MACtD,OAAO;QACL,GAAGR,KAAK;QACRL,SAAS,EAAES,MAAM,CAACI;MACpB,CAAC;IACH;MACE,OAAOR,KAAK;EAChB;AACF,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"ModelCatalogReducer.js","names":["_Cache","_interopRequireDefault","require","initialState","entryDate","Date","toISOString","split","ModelCatalogReducer","state","action","type","Cache","addItem","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/ModelCatalogReducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ModelCatalogState } from \"../types\";\n\nconst initialState: ModelCatalogState = {\n entryDate: new Date().toISOString().split(\"T\")[0],\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nconst ModelCatalogReducer: Reducer<ModelCatalogState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_ENTRYDATE\":\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n return {\n ...state,\n entryDate: action.payload,\n };\n default:\n return state;\n }\n};\n\nexport default ModelCatalogReducer;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,MAAMC,YAA+B,GAAG;EACtCC,SAAS,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAGA,CACnEC,KAAK,GAAGN,YAAY,EACpBO,MAAM,KACH;EACH,IAAI,CAACA,MAAM,EAAE;IACX,OAAOD,KAAK;EACd;EAEA,QAAQC,MAAM,CAACC,IAAI;IACjB,KAAK,kBAAkB;MACrBC,cAAK,CAACC,OAAO,CAAC,uBAAuB,EAAEH,MAAM,CAACI,OAAO,CAAC;MACtD,OAAO;QACL,GAAGL,KAAK;QACRL,SAAS,EAAEM,MAAM,CAACI;MACpB,CAAC;IACH;MACE,OAAOL,KAAK;EAChB;AACF,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaT,mBAAmB","ignoreList":[]}
@@ -15,9 +15,7 @@ const initialState = {
15
15
  /**
16
16
  * Form reducer
17
17
  */
18
- const NotificationReducer = function () {
19
- let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
20
- let action = arguments.length > 1 ? arguments[1] : undefined;
18
+ const NotificationReducer = (state = initialState, action) => {
21
19
  if (!action) {
22
20
  return state;
23
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationReducer.js","names":["initialState","render","messageType","message","error","NotificationReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/NotificationReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, NotificationState } from \"../types\";\n\n// REDUCER\nconst initialState: NotificationState = {\n render: false,\n messageType: null,\n message: null,\n error: null,\n};\n\n/**\n * Form reducer\n */\nconst NotificationReducer: Reducer<NotificationState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"DISMISS_NOTIFICATION\":\n return {\n ...state,\n render: false,\n };\n\n case \"SHOW_NOTIFICATION\":\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n\n default:\n return state;\n }\n};\n\nexport default NotificationReducer;\n"],"mappings":";;;;;;AAIA;AACA,MAAMA,YAA+B,GAAG;EACtCC,MAAM,EAAE,KAAK;EACbC,WAAW,EAAE,IAAI;EACjBC,OAAO,EAAE,IAAI;EACbC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAG,SAAAA,CAAA,EAGhE;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGP,YAAY;EAAA,IACpBU,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOJ,KAAK;EACd;EAEA,QAAQI,MAAM,CAACC,IAAI;IACjB,KAAK,sBAAsB;MACzB,OAAO;QACL,GAAGL,KAAK;QACRL,MAAM,EAAE;MACV,CAAC;IAEH,KAAK,mBAAmB;MACtB,OAAO;QACL,GAAGK,KAAK;QACRL,MAAM,EAAE,IAAI;QACZC,WAAW,EAAEQ,MAAM,CAACE,OAAO,CAACD,IAAI;QAChCR,OAAO,EAAEO,MAAM,CAACE,OAAO,CAACT,OAAO;QAC/BC,KAAK,EAAEM,MAAM,CAACE,OAAO,CAACR;MACxB,CAAC;IAEH;MACE,OAAOE,KAAK;EAChB;AACF,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"NotificationReducer.js","names":["initialState","render","messageType","message","error","NotificationReducer","state","action","type","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/NotificationReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, NotificationState } from \"../types\";\n\n// REDUCER\nconst initialState: NotificationState = {\n render: false,\n messageType: null,\n message: null,\n error: null,\n};\n\n/**\n * Form reducer\n */\nconst NotificationReducer: Reducer<NotificationState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"DISMISS_NOTIFICATION\":\n return {\n ...state,\n render: false,\n };\n\n case \"SHOW_NOTIFICATION\":\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n\n default:\n return state;\n }\n};\n\nexport default NotificationReducer;\n"],"mappings":";;;;;;AAIA;AACA,MAAMA,YAA+B,GAAG;EACtCC,MAAM,EAAE,KAAK;EACbC,WAAW,EAAE,IAAI;EACjBC,OAAO,EAAE,IAAI;EACbC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAGA,CACnEC,KAAK,GAAGN,YAAY,EACpBO,MAAM,KACH;EACH,IAAI,CAACA,MAAM,EAAE;IACX,OAAOD,KAAK;EACd;EAEA,QAAQC,MAAM,CAACC,IAAI;IACjB,KAAK,sBAAsB;MACzB,OAAO;QACL,GAAGF,KAAK;QACRL,MAAM,EAAE;MACV,CAAC;IAEH,KAAK,mBAAmB;MACtB,OAAO;QACL,GAAGK,KAAK;QACRL,MAAM,EAAE,IAAI;QACZC,WAAW,EAAEK,MAAM,CAACE,OAAO,CAACD,IAAI;QAChCL,OAAO,EAAEI,MAAM,CAACE,OAAO,CAACN,OAAO;QAC/BC,KAAK,EAAEG,MAAM,CAACE,OAAO,CAACL;MACxB,CAAC;IAEH;MACE,OAAOE,KAAK;EAChB;AACF,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaP,mBAAmB","ignoreList":[]}
@@ -9,9 +9,7 @@ const initialState = {};
9
9
  /**
10
10
  * Pref reducer
11
11
  */
12
- const PreferencesReducer = function () {
13
- let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
14
- let action = arguments.length > 1 ? arguments[1] : undefined;
12
+ const PreferencesReducer = (state = initialState, action) => {
15
13
  if (action?.type === "SET_PREFERENCE") {
16
14
  return {
17
15
  ...state,
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesReducer.js","names":["initialState","PreferencesReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/PreferencesReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, PreferencesState } from \"../types\";\n\nconst initialState: $Shape<PreferencesState> = {};\n\n/**\n * Pref reducer\n */\nconst PreferencesReducer: Reducer<PreferencesState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (action?.type === \"SET_PREFERENCE\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n if (action?.type === \"SET_PREFERENCES\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n return state;\n};\n\nexport default PreferencesReducer;\n"],"mappings":";;;;;;AAIA,MAAMA,YAAsC,GAAG,CAAC,CAAC;;AAEjD;AACA;AACA;AACA,MAAMC,kBAA0D,GAAG,SAAAA,CAAA,EAG9D;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,YAAY;EAAA,IACpBM,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAIC,MAAM,EAAEC,IAAI,KAAK,gBAAgB,EAAE;IACrC,OAAO;MACL,GAAGL,KAAK;MACR,GAAGI,MAAM,CAACE;IACZ,CAAC;EACH;EAEA,IAAIF,MAAM,EAAEC,IAAI,KAAK,iBAAiB,EAAE;IACtC,OAAO;MACL,GAAGL,KAAK;MACR,GAAGI,MAAM,CAACE;IACZ,CAAC;EACH;EAEA,OAAON,KAAK;AACd,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"PreferencesReducer.js","names":["initialState","PreferencesReducer","state","action","type","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/PreferencesReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, PreferencesState } from \"../types\";\n\nconst initialState: $Shape<PreferencesState> = {};\n\n/**\n * Pref reducer\n */\nconst PreferencesReducer: Reducer<PreferencesState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (action?.type === \"SET_PREFERENCE\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n if (action?.type === \"SET_PREFERENCES\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n return state;\n};\n\nexport default PreferencesReducer;\n"],"mappings":";;;;;;AAIA,MAAMA,YAAsC,GAAG,CAAC,CAAC;;AAEjD;AACA;AACA;AACA,MAAMC,kBAA0D,GAAGA,CACjEC,KAAK,GAAGF,YAAY,EACpBG,MAAM,KACH;EACH,IAAIA,MAAM,EAAEC,IAAI,KAAK,gBAAgB,EAAE;IACrC,OAAO;MACL,GAAGF,KAAK;MACR,GAAGC,MAAM,CAACE;IACZ,CAAC;EACH;EAEA,IAAIF,MAAM,EAAEC,IAAI,KAAK,iBAAiB,EAAE;IACtC,OAAO;MACL,GAAGF,KAAK;MACR,GAAGC,MAAM,CAACE;IACZ,CAAC;EACH;EAEA,OAAOH,KAAK;AACd,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaP,kBAAkB","ignoreList":[]}
@@ -23,9 +23,7 @@ const finishProgress = state => {
23
23
  /**
24
24
  * Keep state for the progress indicator
25
25
  */
26
- const progressIndicatorReducer = function () {
27
- let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
28
- let action = arguments.length > 1 ? arguments[1] : undefined;
26
+ const progressIndicatorReducer = (state = initialState, action) => {
29
27
  if (!action) {
30
28
  return state;
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","arguments","length","undefined","action","type","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/ProgressIndicatorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ProgressIndicatorState } from \"../types\";\n\n// REDUCER\nconst initialState: ProgressIndicatorState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst finishProgress = (state: ProgressIndicatorState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\n/**\n * Keep state for the progress indicator\n */\nconst progressIndicatorReducer: Reducer<ProgressIndicatorState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_PROGRESS\":\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n\n case \"FINISH_PROGRESS\":\n return finishProgress(state);\n\n case \"START_PROGRESS\":\n return {\n ...state,\n count: state.count + 1,\n };\n\n case \"RESET_PROGRESS\":\n return {\n ...state,\n count: 0,\n };\n\n default:\n return state;\n }\n};\n\nexport default progressIndicatorReducer;\n"],"mappings":";;;;;;AAIA;AACA,MAAMA,YAAoC,GAAG;EAC3CC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,eAAe,EAAE;AACnB,CAAC;AAED,MAAMC,cAAc,GAAIC,KAA6B,IAAK;EACxD,MAAMC,aAAa,GAAGD,KAAK,CAACJ,KAAK,GAAG,CAAC,KAAK,CAAC;EAC3C,OAAO;IACL,GAAGI,KAAK;IACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,IAAI,CAAC,GAAG,CAAC,GAAGI,KAAK,CAACJ,KAAK,GAAG,CAAC;IAC7CC,SAAS,EAAEI,aAAa,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGH,KAAK,CAACH,SAAS;IACvDC,eAAe,EAAEG,aAAa,GAAG,CAAC,GAAGD,KAAK,CAACF;EAC7C,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA,MAAMM,wBAAsE,GAAG,SAAAA,CAAA,EAG1E;EAAA,IAFHJ,KAAK,GAAAK,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGV,YAAY;EAAA,IACpBa,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOR,KAAK;EACd;EAEA,QAAQQ,MAAM,CAACC,IAAI;IACjB,KAAK,iBAAiB;MACpB,OAAO;QACL,GAAGT,KAAK;QACRF,eAAe,EAAEU,MAAM,CAACE,OAAO,EAAEZ;MACnC,CAAC;IAEH,KAAK,iBAAiB;MACpB,OAAOC,cAAc,CAACC,KAAK,CAAC;IAE9B,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGA,KAAK;QACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,GAAG;MACvB,CAAC;IAEH,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGI,KAAK;QACRJ,KAAK,EAAE;MACT,CAAC;IAEH;MACE,OAAOI,KAAK;EAChB;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaT,wBAAwB","ignoreList":[]}
1
+ {"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","action","type","payload","_default","exports","default"],"sources":["../../../src/redux/reducers/ProgressIndicatorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ProgressIndicatorState } from \"../types\";\n\n// REDUCER\nconst initialState: ProgressIndicatorState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst finishProgress = (state: ProgressIndicatorState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\n/**\n * Keep state for the progress indicator\n */\nconst progressIndicatorReducer: Reducer<ProgressIndicatorState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_PROGRESS\":\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n\n case \"FINISH_PROGRESS\":\n return finishProgress(state);\n\n case \"START_PROGRESS\":\n return {\n ...state,\n count: state.count + 1,\n };\n\n case \"RESET_PROGRESS\":\n return {\n ...state,\n count: 0,\n };\n\n default:\n return state;\n }\n};\n\nexport default progressIndicatorReducer;\n"],"mappings":";;;;;;AAIA;AACA,MAAMA,YAAoC,GAAG;EAC3CC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,eAAe,EAAE;AACnB,CAAC;AAED,MAAMC,cAAc,GAAIC,KAA6B,IAAK;EACxD,MAAMC,aAAa,GAAGD,KAAK,CAACJ,KAAK,GAAG,CAAC,KAAK,CAAC;EAC3C,OAAO;IACL,GAAGI,KAAK;IACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,IAAI,CAAC,GAAG,CAAC,GAAGI,KAAK,CAACJ,KAAK,GAAG,CAAC;IAC7CC,SAAS,EAAEI,aAAa,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGH,KAAK,CAACH,SAAS;IACvDC,eAAe,EAAEG,aAAa,GAAG,CAAC,GAAGD,KAAK,CAACF;EAC7C,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA,MAAMM,wBAAsE,GAAGA,CAC7EJ,KAAK,GAAGL,YAAY,EACpBU,MAAM,KACH;EACH,IAAI,CAACA,MAAM,EAAE;IACX,OAAOL,KAAK;EACd;EAEA,QAAQK,MAAM,CAACC,IAAI;IACjB,KAAK,iBAAiB;MACpB,OAAO;QACL,GAAGN,KAAK;QACRF,eAAe,EAAEO,MAAM,CAACE,OAAO,EAAET;MACnC,CAAC;IAEH,KAAK,iBAAiB;MACpB,OAAOC,cAAc,CAACC,KAAK,CAAC;IAE9B,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGA,KAAK;QACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,GAAG;MACvB,CAAC;IAEH,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGI,KAAK;QACRJ,KAAK,EAAE;MACT,CAAC;IAEH;MACE,OAAOI,KAAK;EAChB;AACF,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaN,wBAAwB","ignoreList":[]}
@@ -11,9 +11,7 @@ exports.handleBeforeRenderHooks = void 0;
11
11
  * for example server preferences, and the request is available to retrieve request information
12
12
  *
13
13
  */
14
- const handleBeforeRenderHooks = function () {
15
- let beforeRenderHooks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
16
- let props = arguments.length > 1 ? arguments[1] : undefined;
14
+ const handleBeforeRenderHooks = (beforeRenderHooks = [], props) => {
17
15
  if (beforeRenderHooks.length > 0) {
18
16
  for (const beforeRenderHook of beforeRenderHooks) {
19
17
  beforeRenderHook(props);
@@ -1 +1 @@
1
- {"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","arguments","length","undefined","props","beforeRenderHook","exports"],"sources":["../../../src/redux/store/beforeRenderHooks.js"],"sourcesContent":["// @flow\nimport type { ReduxStore } from \"../types\";\n\nexport type BeforeRenderHookProps = {\n store: ReduxStore,\n request?: HttpServletRequestJava,\n};\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: Array<BeforeRenderHook> = [],\n props: BeforeRenderHookProps,\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n"],"mappings":";;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,uBAAuB,GAAG,SAAAA,CAAA,EAGlC;EAAA,IAFHC,iBAA0C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IAC/CG,KAA4B,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAE5B,IAAIH,iBAAiB,CAACE,MAAM,GAAG,CAAC,EAAE;IAChC,KAAK,MAAMG,gBAAgB,IAAIL,iBAAiB,EAAE;MAChDK,gBAAgB,CAACD,KAAK,CAAC;IACzB;EACF;AACF,CAAC;AAACE,OAAA,CAAAP,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","props","length","beforeRenderHook","exports"],"sources":["../../../src/redux/store/beforeRenderHooks.js"],"sourcesContent":["// @flow\nimport type { ReduxStore } from \"../types\";\n\nexport type BeforeRenderHookProps = {\n store: ReduxStore,\n request?: HttpServletRequestJava,\n};\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: Array<BeforeRenderHook> = [],\n props: BeforeRenderHookProps,\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n"],"mappings":";;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,uBAAuB,GAAGA,CACrCC,iBAA0C,GAAG,EAAE,EAC/CC,KAA4B,KACzB;EACH,IAAID,iBAAiB,CAACE,MAAM,GAAG,CAAC,EAAE;IAChC,KAAK,MAAMC,gBAAgB,IAAIH,iBAAiB,EAAE;MAChDG,gBAAgB,CAACF,KAAK,CAAC;IACzB;EACF;AACF,CAAC;AAACG,OAAA,CAAAL,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -134,11 +134,7 @@ class Cache {
134
134
  var _context2;
135
135
  // receive sessionstorage from other tabs
136
136
  const newData = e.newValue ? JSON.parse(e.newValue) : {};
137
- (0, _filter.default)(_context2 = (0, _entries.default)(newData)).call(_context2, _ref => {
138
- let [key] = _ref;
139
- return !this.hasItem(key) && !(0, _startsWith.default)(key).call(key, RESOURCE_CACHE_PREFIX);
140
- }).forEach(_ref2 => {
141
- let [key, value] = _ref2;
137
+ (0, _filter.default)(_context2 = (0, _entries.default)(newData)).call(_context2, ([key]) => !this.hasItem(key) && !(0, _startsWith.default)(key).call(key, RESOURCE_CACHE_PREFIX)).forEach(([key, value]) => {
142
138
  this.addItem(key, value);
143
139
  });
144
140
  this.setItem("sessionStorageCopied", Date.now().toString());
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty2","default","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_stringify","setItem","removeItem","clear","pattern","_context","_filter","_keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_entries","_ref","_startsWith","_ref2","_default","exports"],"sources":["../../../src/utils/browser/Cache.js"],"sourcesContent":["// @flow\nimport type { RequestOptions } from \"../fetch/types\";\n\nconst RESOURCE_CACHE_PREFIX = \"res:\";\n\n/**\n * Manage the browser cache\n */\nclass Cache {\n _cache: Storage;\n\n /**\n */\n constructor() {\n if (typeof sessionStorage !== \"undefined\") {\n this._cache = sessionStorage;\n }\n }\n\n /**\n * Create a key that can be used to cache resources, needs the request arguments and uses url, params and header of the request args\n * to create a key that is unique for time versions and locale\n */\n createResourceKey(requestArgs: RequestOptions): string {\n let resourceKey = requestArgs.url;\n\n if (requestArgs.params) {\n resourceKey += `|${requestArgs.params}`;\n }\n\n if (requestArgs.locale) {\n resourceKey += `|${requestArgs.locale}`;\n }\n\n return `${RESOURCE_CACHE_PREFIX}${resourceKey}`;\n }\n\n /**\n * Get a cached item by it's key\n */\n getItem(key: string): any {\n const cache = this._cache;\n\n if (!cache) {\n return null;\n }\n\n const cacheItem = cache.getItem(key);\n\n if (!cacheItem) {\n return null;\n }\n\n try {\n return JSON.parse(cacheItem);\n } catch (error) {\n return this._cache.getItem(key);\n }\n }\n\n /**\n * Check if the item with key exists in the browser cache\n */\n hasItem(key: string): boolean {\n return this.getItem(key) !== null;\n }\n\n /**\n * Add an item to the cache\n */\n addItem(key: string, value: string | Object) {\n const stringValue =\n typeof value === \"string\" ? value : JSON.stringify(value);\n\n this._cache.setItem(key, stringValue);\n }\n\n /**\n */\n setItem(key: string, value: string | Object) {\n this.addItem(key, value);\n }\n\n /**\n */\n removeItem(key: string) {\n this._cache.removeItem(key);\n }\n\n /**\n * Clear complete cache storage\n */\n clear(pattern: ?string) {\n if (!this._cache) {\n return;\n }\n\n if (pattern) {\n Object.keys(this._cache)\n .filter((k) => (pattern ? new RegExp(pattern).test(k) : true))\n .forEach((k) => this._cache.removeItem(k));\n } else {\n this._cache.clear();\n }\n }\n\n // Session storage is not available between different tabs in the same window,\n // this load method copies sessionStorage from other tabs into this tab using localStorage\n // see https://blog.guya.net/2015/06/12/sharing-sessionstorage-between-tabs-for-secure-multi-tab-authentication/\n /**\n */\n loadOtherBrowserTabs(callback: Function) {\n window.addEventListener(\"storage\", (e) => {\n this.sendSessionStorage(e);\n this.receiveSessionStorage(e, callback);\n });\n\n if (this._cache.length === 0) {\n // trigger retrieval of sessionstorage on other tabs\n localStorage.setItem(\"getSessionStorage\", Date.now().toString());\n }\n }\n\n /**\n */\n sendSessionStorage(e: StorageEvent) {\n if (e.key === \"getSessionStorage\") {\n localStorage.setItem(\"sessionStorage\", JSON.stringify(this._cache));\n localStorage.removeItem(\"sessionStorage\");\n }\n }\n\n /**\n */\n receiveSessionStorage(e: StorageEvent, callback: Function): any {\n if (e.key === \"sessionStorage\" && !this.getItem(\"sessionStorageCopied\")) {\n // receive sessionstorage from other tabs\n const newData = e.newValue ? JSON.parse(e.newValue) : {};\n Object.entries(newData)\n .filter(\n ([key]) =>\n !this.hasItem(key) && !key.startsWith(RESOURCE_CACHE_PREFIX),\n )\n .forEach(([key, value]) => {\n this.addItem(key, value);\n });\n\n this.setItem(\"sessionStorageCopied\", Date.now().toString());\n\n return callback();\n }\n\n return null;\n }\n}\n\nexport default (new Cache(): Cache);\n"],"mappings":";;;;;;;;;;;;;AAGA,MAAMA,qBAAqB,GAAG,MAAM;;AAEpC;AACA;AACA;AACA,MAAMC,KAAK,CAAC;EAGV;AACF;EACEC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACZ,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;MACzC,IAAI,CAACC,MAAM,GAAGD,cAAc;IAC9B;EACF;;EAEA;AACF;AACA;AACA;EACEE,iBAAiBA,CAACC,WAA2B,EAAU;IACrD,IAAIC,WAAW,GAAGD,WAAW,CAACE,GAAG;IAEjC,IAAIF,WAAW,CAACG,MAAM,EAAE;MACtBF,WAA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gBAAgB,CAAC;IAC3C;EACF;;EAEA;AACF;EACEiB,qBAAqBA,CAACF,CAAe,EAAEH,QAAkB,EAAO;IAC9D,IAAIG,CAAC,CAAC3B,GAAG,KAAK,gBAAgB,IAAI,CAAC,IAAI,CAACD,OAAO,CAAC,sBAAsB,CAAC,EAAE;MAAA,IAAAoC,SAAA;MACvE;MACA,MAAMC,OAAO,GAAGT,CAAC,CAACU,QAAQ,GAAGlC,IAAI,CAACC,KAAK,CAACuB,CAAC,CAACU,QAAQ,CAAC,GAAG,CAAC,CAAC;MACxD,IAAArB,OAAA,CAAA1B,OAAA,EAAA6C,SAAA,OAAAG,QAAA,CAAAhD,OAAA,EAAe8C,OAAO,CAAC,EAAAlB,IAAA,CAAAiB,SAAA,EAEnBI,IAAA;QAAA,IAAC,CAACvC,GAAG,CAAC,GAAAuC,IAAA;QAAA,OACJ,CAAC,IAAI,CAACjC,OAAO,CAACN,GAAG,CAAC,IAAI,CAAC,IAAAwC,WAAA,CAAAlD,OAAA,EAAAU,GAAG,EAAAkB,IAAA,CAAHlB,GAAG,EAAYd,qBAAqB,CAAC;MAAA,CAChE,CAAC,CACAoC,OAAO,CAACmB,KAAA,IAAkB;QAAA,IAAjB,CAACzC,GAAG,EAAEQ,KAAK,CAAC,GAAAiC,KAAA;QACpB,IAAI,CAAClC,OAAO,CAACP,GAAG,EAAEQ,KAAK,CAAC;MAC1B,CAAC,CAAC;MAEJ,IAAI,CAACG,OAAO,CAAC,sBAAsB,EAAEqB,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAAC;MAE3D,OAAOV,QAAQ,CAAC,CAAC;IACnB;IAEA,OAAO,IAAI;EACb;AACF;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAArD,OAAA,GAEe,IAAIH,KAAK,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty2","default","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_stringify","setItem","removeItem","clear","pattern","_context","_filter","_keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_entries","_startsWith","_default","exports"],"sources":["../../../src/utils/browser/Cache.js"],"sourcesContent":["// @flow\nimport type { RequestOptions } from \"../fetch/types\";\n\nconst RESOURCE_CACHE_PREFIX = \"res:\";\n\n/**\n * Manage the browser cache\n */\nclass Cache {\n _cache: Storage;\n\n /**\n */\n constructor() {\n if (typeof sessionStorage !== \"undefined\") {\n this._cache = sessionStorage;\n }\n }\n\n /**\n * Create a key that can be used to cache resources, needs the request arguments and uses url, params and header of the request args\n * to create a key that is unique for time versions and locale\n */\n createResourceKey(requestArgs: RequestOptions): string {\n let resourceKey = requestArgs.url;\n\n if (requestArgs.params) {\n resourceKey += `|${requestArgs.params}`;\n }\n\n if (requestArgs.locale) {\n resourceKey += `|${requestArgs.locale}`;\n }\n\n return `${RESOURCE_CACHE_PREFIX}${resourceKey}`;\n }\n\n /**\n * Get a cached item by it's key\n */\n getItem(key: string): any {\n const cache = this._cache;\n\n if (!cache) {\n return null;\n }\n\n const cacheItem = cache.getItem(key);\n\n if (!cacheItem) {\n return null;\n }\n\n try {\n return JSON.parse(cacheItem);\n } catch (error) {\n return this._cache.getItem(key);\n }\n }\n\n /**\n * Check if the item with key exists in the browser cache\n */\n hasItem(key: string): boolean {\n return this.getItem(key) !== null;\n }\n\n /**\n * Add an item to the cache\n */\n addItem(key: string, value: string | Object) {\n const stringValue =\n typeof value === \"string\" ? value : JSON.stringify(value);\n\n this._cache.setItem(key, stringValue);\n }\n\n /**\n */\n setItem(key: string, value: string | Object) {\n this.addItem(key, value);\n }\n\n /**\n */\n removeItem(key: string) {\n this._cache.removeItem(key);\n }\n\n /**\n * Clear complete cache storage\n */\n clear(pattern: ?string) {\n if (!this._cache) {\n return;\n }\n\n if (pattern) {\n Object.keys(this._cache)\n .filter((k) => (pattern ? new RegExp(pattern).test(k) : true))\n .forEach((k) => this._cache.removeItem(k));\n } else {\n this._cache.clear();\n }\n }\n\n // Session storage is not available between different tabs in the same window,\n // this load method copies sessionStorage from other tabs into this tab using localStorage\n // see https://blog.guya.net/2015/06/12/sharing-sessionstorage-between-tabs-for-secure-multi-tab-authentication/\n /**\n */\n loadOtherBrowserTabs(callback: Function) {\n window.addEventListener(\"storage\", (e) => {\n this.sendSessionStorage(e);\n this.receiveSessionStorage(e, callback);\n });\n\n if (this._cache.length === 0) {\n // trigger retrieval of sessionstorage on other tabs\n localStorage.setItem(\"getSessionStorage\", Date.now().toString());\n }\n }\n\n /**\n */\n sendSessionStorage(e: StorageEvent) {\n if (e.key === \"getSessionStorage\") {\n localStorage.setItem(\"sessionStorage\", JSON.stringify(this._cache));\n localStorage.removeItem(\"sessionStorage\");\n }\n }\n\n /**\n */\n receiveSessionStorage(e: StorageEvent, callback: Function): any {\n if (e.key === \"sessionStorage\" && !this.getItem(\"sessionStorageCopied\")) {\n // receive sessionstorage from other tabs\n const newData = e.newValue ? JSON.parse(e.newValue) : {};\n Object.entries(newData)\n .filter(\n ([key]) =>\n !this.hasItem(key) && !key.startsWith(RESOURCE_CACHE_PREFIX),\n )\n .forEach(([key, value]) => {\n this.addItem(key, value);\n });\n\n this.setItem(\"sessionStorageCopied\", Date.now().toString());\n\n return callback();\n }\n\n return null;\n }\n}\n\nexport default (new Cache(): Cache);\n"],"mappings":";;;;;;;;;;;;;AAGA,MAAMA,qBAAqB,GAAG,MAAM;;AAEpC;AACA;AACA;AACA,MAAMC,KAAK,CAAC;EAGV;AACF;EACEC,WAAWA,CAAA,EAAG;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IACZ,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;MACzC,IAAI,CAACC,MAAM,GAAGD,cAAc;IAC9B;EACF;;EAEA;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_Cookies = require("../browser/Cookies");
36
36
  * @hideconstructor
37
37
  */
38
38
  class BaseDateTimeUtil {
39
- constructor(isoFormat) {
40
- let doOffsets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
39
+ constructor(isoFormat, doOffsets = false) {
41
40
  (0, _defineProperty2.default)(this, "_isoFormat", void 0);
42
41
  (0, _defineProperty2.default)(this, "_doOffsets", void 0);
43
42
  (0, _defineProperty2.default)(this, "_timeZone", typeof Intl === "undefined" ? "Etc/UTC" : Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC");
@@ -115,8 +114,7 @@ class BaseDateTimeUtil {
115
114
 
116
115
  /**
117
116
  */
118
- toDate(date) {
119
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
117
+ toDate(date, inputFormat = this.getIsoFormat()) {
120
118
  if (date instanceof Date) {
121
119
  return date;
122
120
  }
@@ -133,8 +131,7 @@ class BaseDateTimeUtil {
133
131
 
134
132
  /**
135
133
  */
136
- toFormat(date, targetFormat) {
137
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
134
+ toFormat(date, targetFormat, inputFormat = this.getIsoFormat()) {
138
135
  const {
139
136
  weekStartsOn
140
137
  } = this.getOptions();
@@ -151,8 +148,7 @@ class BaseDateTimeUtil {
151
148
 
152
149
  /**
153
150
  */
154
- toISO(date) {
155
- let sourceFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
151
+ toISO(date, sourceFormat = this.getIsoFormat()) {
156
152
  return this.toFormat(date, this.getIsoFormat(), sourceFormat);
157
153
  }
158
154
 
@@ -181,8 +177,7 @@ class BaseDateTimeUtil {
181
177
 
182
178
  /**
183
179
  */
184
- isValid(date) {
185
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
180
+ isValid(date, inputFormat = this.getIsoFormat()) {
186
181
  if (!date) {
187
182
  return false;
188
183
  }
@@ -192,50 +187,43 @@ class BaseDateTimeUtil {
192
187
 
193
188
  /**
194
189
  */
195
- isAfter(inputDate, afterISODate) {
196
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
190
+ isAfter(inputDate, afterISODate, inputFormat = this.getIsoFormat()) {
197
191
  return afterISODate != null && (0, _isAfter.isAfter)(this.toDate(inputDate, inputFormat), this.toDate(afterISODate));
198
192
  }
199
193
 
200
194
  /**
201
195
  */
202
- isSameOrAfter(inputDate, afterISODate) {
203
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
196
+ isSameOrAfter(inputDate, afterISODate, inputFormat = this.getIsoFormat()) {
204
197
  return afterISODate != null && (this.isAfter(inputDate, afterISODate, inputFormat) || this.isSame(inputDate, afterISODate, inputFormat));
205
198
  }
206
199
 
207
200
  /**
208
201
  */
209
- isBefore(inputDate, beforeISODate) {
210
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
202
+ isBefore(inputDate, beforeISODate, inputFormat = this.getIsoFormat()) {
211
203
  return beforeISODate != null && (0, _isBefore.isBefore)(this.toDate(inputDate, inputFormat), this.toDate(beforeISODate));
212
204
  }
213
205
 
214
206
  /**
215
207
  */
216
- isSameOrBefore(inputDate, beforeISODate) {
217
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
208
+ isSameOrBefore(inputDate, beforeISODate, inputFormat = this.getIsoFormat()) {
218
209
  return beforeISODate != null && (this.isBefore(inputDate, beforeISODate, inputFormat) || this.isSame(inputDate, beforeISODate, inputFormat));
219
210
  }
220
211
 
221
212
  /**
222
213
  */
223
- isSame(inputDate, compareDate) {
224
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
214
+ isSame(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
225
215
  return compareDate != null && this.toDate(inputDate, inputFormat).getTime() === this.toDate(compareDate).getTime();
226
216
  }
227
217
 
228
218
  /**
229
219
  */
230
- isSameDay(inputDate, compareDate) {
231
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
220
+ isSameDay(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
232
221
  return compareDate != null && (0, _isSameDay.isSameDay)(this.toDate(inputDate, inputFormat), this.toDate(compareDate, inputFormat));
233
222
  }
234
223
 
235
224
  /**
236
225
  */
237
- isOther(inputDate, compareDate) {
238
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
226
+ isOther(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
239
227
  return !this.isSame(inputDate, compareDate, inputFormat);
240
228
  }
241
229
 
@@ -252,8 +240,7 @@ class BaseDateTimeUtil {
252
240
  * Checks if a given local date and time is ambiguous in the specified timezone.
253
241
  * Ambiguity happens during the end of daylight saving time (DST) transitions.
254
242
  */
255
- isAmbiguous(inputDate) {
256
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
243
+ isAmbiguous(inputDate, inputFormat = this.getIsoFormat()) {
257
244
  if (inputDate == null || typeof Intl === "undefined") {
258
245
  return false;
259
246
  }
@@ -277,8 +264,7 @@ class BaseDateTimeUtil {
277
264
  /**
278
265
  * @private
279
266
  */
280
- _calculate(date, calculationFn, property, value) {
281
- let inputFormat = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.getIsoFormat();
267
+ _calculate(date, calculationFn, property, value, inputFormat = this.getIsoFormat()) {
282
268
  const parsedDate = this.toDate(date, inputFormat);
283
269
  return this.toISO(calculationFn(parsedDate, {
284
270
  [property]: value
@@ -289,99 +275,85 @@ class BaseDateTimeUtil {
289
275
 
290
276
  /**
291
277
  */
292
- addSeconds(date, amount) {
293
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
278
+ addSeconds(date, amount, inputFormat = this.getIsoFormat()) {
294
279
  return this._calculate(date, _add.add, "seconds", amount, inputFormat);
295
280
  }
296
281
 
297
282
  /**
298
283
  */
299
- addMinutes(date, amount) {
300
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
284
+ addMinutes(date, amount, inputFormat = this.getIsoFormat()) {
301
285
  return this._calculate(date, _add.add, "minutes", amount, inputFormat);
302
286
  }
303
287
 
304
288
  /**
305
289
  */
306
- addHours(date, amount) {
307
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
290
+ addHours(date, amount, inputFormat = this.getIsoFormat()) {
308
291
  return this._calculate(date, _add.add, "hours", amount, inputFormat);
309
292
  }
310
293
 
311
294
  /**
312
295
  */
313
- addDays(date, amount) {
314
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
296
+ addDays(date, amount, inputFormat = this.getIsoFormat()) {
315
297
  return this._calculate(date, _add.add, "days", amount, inputFormat);
316
298
  }
317
299
 
318
300
  /**
319
301
  */
320
- addWeeks(date, amount) {
321
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
302
+ addWeeks(date, amount, inputFormat = this.getIsoFormat()) {
322
303
  return this._calculate(date, _add.add, "weeks", amount, inputFormat);
323
304
  }
324
305
 
325
306
  /**
326
307
  */
327
- addMonths(date, amount) {
328
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
308
+ addMonths(date, amount, inputFormat = this.getIsoFormat()) {
329
309
  return this._calculate(date, _add.add, "months", amount, inputFormat);
330
310
  }
331
311
 
332
312
  /**
333
313
  */
334
- addYears(date, amount) {
335
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
314
+ addYears(date, amount, inputFormat = this.getIsoFormat()) {
336
315
  return this._calculate(date, _add.add, "years", amount, inputFormat);
337
316
  }
338
317
 
339
318
  /**
340
319
  */
341
- subtractSeconds(date, amount) {
342
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
320
+ subtractSeconds(date, amount, inputFormat = this.getIsoFormat()) {
343
321
  return this._calculate(date, _sub.sub, "seconds", amount, inputFormat);
344
322
  }
345
323
 
346
324
  /**
347
325
  */
348
- subtractMinutes(date, amount) {
349
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
326
+ subtractMinutes(date, amount, inputFormat = this.getIsoFormat()) {
350
327
  return this._calculate(date, _sub.sub, "minutes", amount, inputFormat);
351
328
  }
352
329
 
353
330
  /**
354
331
  */
355
- subtractHours(date, amount) {
356
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
332
+ subtractHours(date, amount, inputFormat = this.getIsoFormat()) {
357
333
  return this._calculate(date, _sub.sub, "hours", amount, inputFormat);
358
334
  }
359
335
 
360
336
  /**
361
337
  */
362
- subtractDays(date, amount) {
363
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
338
+ subtractDays(date, amount, inputFormat = this.getIsoFormat()) {
364
339
  return this._calculate(date, _sub.sub, "days", amount, inputFormat);
365
340
  }
366
341
 
367
342
  /**
368
343
  */
369
- subtractWeeks(date, amount) {
370
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
344
+ subtractWeeks(date, amount, inputFormat = this.getIsoFormat()) {
371
345
  return this._calculate(date, _sub.sub, "weeks", amount, inputFormat);
372
346
  }
373
347
 
374
348
  /**
375
349
  */
376
- subtractMonths(date, amount) {
377
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
350
+ subtractMonths(date, amount, inputFormat = this.getIsoFormat()) {
378
351
  return this._calculate(date, _sub.sub, "months", amount, inputFormat);
379
352
  }
380
353
 
381
354
  /**
382
355
  */
383
- subtractYears(date, amount) {
384
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
356
+ subtractYears(date, amount, inputFormat = this.getIsoFormat()) {
385
357
  return this._calculate(date, _sub.sub, "years", amount, inputFormat);
386
358
  }
387
359
 
@@ -390,9 +362,7 @@ class BaseDateTimeUtil {
390
362
  /**
391
363
  * @private
392
364
  */
393
- _get(date, method) {
394
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
395
- let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
365
+ _get(date, method, inputFormat = this.getIsoFormat(), options = {}) {
396
366
  const parsedDate = this.toDate(date, inputFormat);
397
367
  return this.toISO(method(parsedDate, {
398
368
  in: this.getDateFnsContext(),
@@ -402,22 +372,19 @@ class BaseDateTimeUtil {
402
372
 
403
373
  /**
404
374
  */
405
- startOfMonth(date) {
406
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
375
+ startOfMonth(date, inputFormat = this.getIsoFormat()) {
407
376
  return this._get(date, _startOfMonth.startOfMonth, inputFormat);
408
377
  }
409
378
 
410
379
  /**
411
380
  */
412
- endOfMonth(date) {
413
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
381
+ endOfMonth(date, inputFormat = this.getIsoFormat()) {
414
382
  return this._get(date, _endOfMonth.endOfMonth, inputFormat);
415
383
  }
416
384
 
417
385
  /**
418
386
  */
419
- startOfWeek(date) {
420
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
387
+ startOfWeek(date, inputFormat = this.getIsoFormat()) {
421
388
  const {
422
389
  weekStartsOn
423
390
  } = this.getOptions();
@@ -428,8 +395,7 @@ class BaseDateTimeUtil {
428
395
 
429
396
  /**
430
397
  */
431
- getHours(date) {
432
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
398
+ getHours(date, inputFormat = this.getIsoFormat()) {
433
399
  const parsedDate = this.toDate(date, inputFormat);
434
400
  return (0, _getHours.getHours)(parsedDate, {
435
401
  in: this.getDateFnsContext()
@@ -438,8 +404,7 @@ class BaseDateTimeUtil {
438
404
 
439
405
  /**
440
406
  */
441
- getMinutes(date) {
442
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
407
+ getMinutes(date, inputFormat = this.getIsoFormat()) {
443
408
  const parsedDate = this.toDate(date, inputFormat);
444
409
  return (0, _getMinutes.getMinutes)(parsedDate, {
445
410
  in: this.getDateFnsContext()
@@ -448,8 +413,7 @@ class BaseDateTimeUtil {
448
413
 
449
414
  /**
450
415
  */
451
- getWeek(date) {
452
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
416
+ getWeek(date, inputFormat = this.getIsoFormat()) {
453
417
  const {
454
418
  weekStartsOn,
455
419
  firstWeekContainsDate
@@ -467,8 +431,7 @@ class BaseDateTimeUtil {
467
431
  /**
468
432
  * @private
469
433
  */
470
- _set(date, property, value) {
471
- let inputFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.getIsoFormat();
434
+ _set(date, property, value, inputFormat = this.getIsoFormat()) {
472
435
  const parsedDate = this.toDate(date, inputFormat);
473
436
  return this.toISO((0, _set.set)(parsedDate, {
474
437
  [property]: value
@@ -481,57 +444,49 @@ class BaseDateTimeUtil {
481
444
 
482
445
  /**
483
446
  */
484
- setYear(date, year) {
485
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
447
+ setYear(date, year, inputFormat = this.getIsoFormat()) {
486
448
  return this._set(date, "year", year, inputFormat);
487
449
  }
488
450
 
489
451
  /**
490
452
  */
491
- setMonth(date, month) {
492
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
453
+ setMonth(date, month, inputFormat = this.getIsoFormat()) {
493
454
  return this._set(date, "month", month, inputFormat);
494
455
  }
495
456
 
496
457
  /**
497
458
  */
498
- setDay(date, day) {
499
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
459
+ setDay(date, day, inputFormat = this.getIsoFormat()) {
500
460
  return this._set(date, "date", day, inputFormat);
501
461
  }
502
462
 
503
463
  /**
504
464
  */
505
- setHour(date, hour) {
506
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
465
+ setHour(date, hour, inputFormat = this.getIsoFormat()) {
507
466
  return this._set(date, "hours", hour, inputFormat);
508
467
  }
509
468
 
510
469
  /**
511
470
  */
512
- setMinute(date, minute) {
513
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
471
+ setMinute(date, minute, inputFormat = this.getIsoFormat()) {
514
472
  return this._set(date, "minutes", minute, inputFormat);
515
473
  }
516
474
 
517
475
  /**
518
476
  */
519
- setSecond(date, second) {
520
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
477
+ setSecond(date, second, inputFormat = this.getIsoFormat()) {
521
478
  return this._set(date, "seconds", second, inputFormat);
522
479
  }
523
480
 
524
481
  /**
525
482
  */
526
- setMilliseconds(date, millisecond) {
527
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
483
+ setMilliseconds(date, millisecond, inputFormat = this.getIsoFormat()) {
528
484
  return this._set(date, "milliseconds", millisecond, inputFormat);
529
485
  }
530
486
 
531
487
  /**
532
488
  */
533
- setTime(date, hours, minutes, seconds, milliseconds) {
534
- let inputFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : this.getIsoFormat();
489
+ setTime(date, hours, minutes, seconds, milliseconds, inputFormat = this.getIsoFormat()) {
535
490
  const parsedDate = this.toDate(date, inputFormat);
536
491
  return this.toISO((0, _set.set)(parsedDate, {
537
492
  hours,
@@ -570,8 +525,7 @@ class BaseDateTimeUtil {
570
525
 
571
526
  /**
572
527
  */
573
- getOffset(date) {
574
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
528
+ getOffset(date, inputFormat = this.getIsoFormat()) {
575
529
  const parsedDate = this.toDate(date, inputFormat);
576
530
  if ((0, _isValid.isValid)(parsedDate)) {
577
531
  const dateOffset = this.toFormat(parsedDate, _constants.DATETIME_OFFSET_FORMAT);