@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":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","arguments","length","undefined","action","type","payload"],"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;AAED,eAAeI,wBAAwB","ignoreList":[]}
1
+ {"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","action","type","payload"],"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;AAED,eAAeI,wBAAwB","ignoreList":[]}
@@ -5,9 +5,7 @@
5
5
  * for example server preferences, and the request is available to retrieve request information
6
6
  *
7
7
  */
8
- export const handleBeforeRenderHooks = function () {
9
- let beforeRenderHooks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
10
- let props = arguments.length > 1 ? arguments[1] : undefined;
8
+ export const handleBeforeRenderHooks = (beforeRenderHooks = [], props) => {
11
9
  if (beforeRenderHooks.length > 0) {
12
10
  for (const beforeRenderHook of beforeRenderHooks) {
13
11
  beforeRenderHook(props);
@@ -1 +1 @@
1
- {"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","arguments","length","undefined","props","beforeRenderHook"],"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;AACA,OAAO,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","ignoreList":[]}
1
+ {"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","props","length","beforeRenderHook"],"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;AACA,OAAO,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","ignoreList":[]}
@@ -127,11 +127,7 @@ class Cache {
127
127
  var _context2;
128
128
  // receive sessionstorage from other tabs
129
129
  const newData = e.newValue ? JSON.parse(e.newValue) : {};
130
- _filterInstanceProperty(_context2 = _Object$entries(newData)).call(_context2, _ref => {
131
- let [key] = _ref;
132
- return !this.hasItem(key) && !_startsWithInstanceProperty(key).call(key, RESOURCE_CACHE_PREFIX);
133
- }).forEach(_ref2 => {
134
- let [key, value] = _ref2;
130
+ _filterInstanceProperty(_context2 = _Object$entries(newData)).call(_context2, ([key]) => !this.hasItem(key) && !_startsWithInstanceProperty(key).call(key, RESOURCE_CACHE_PREFIX)).forEach(([key, value]) => {
135
131
  this.addItem(key, value);
136
132
  });
137
133
  this.setItem("sessionStorageCopied", Date.now().toString());
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_JSON$stringify","setItem","removeItem","clear","pattern","_context","_filterInstanceProperty","_Object$keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_Object$entries","_ref","_startsWithInstanceProperty","_ref2"],"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;IAAAC,eAAA;IACZ,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;MACzC,IAAI,CAAC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sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_JSON$stringify","setItem","removeItem","clear","pattern","_context","_filterInstanceProperty","_Object$keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_Object$entries","_startsWithInstanceProperty"],"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;IAAAC,eAAA;IACZ,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;MACzC,IAAI,CAACC,MAAM,GAAGD,cAAc;IAC9B;EAC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AED,eAAA,CAAe,IAAI,CAAClB,MAAM,CAAC,CAAC;MACnEuC,YAAY,CAACnB,UAAU,CAAC,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;MACxDrB,uBAAA,CAAAmB,SAAA,GAAAG,eAAA,CAAeF,OAAO,CAAC,EAAAlB,IAAA,CAAAiB,SAAA,EAEnB,CAAC,CAACnC,GAAG,CAAC,KACJ,CAAC,IAAI,CAACM,OAAO,CAACN,GAAG,CAAC,IAAI,CAACuC,2BAAA,CAAAvC,GAAG,EAAAkB,IAAA,CAAHlB,GAAG,EAAYb,qBAAqB,CAC/D,CAAC,CACAmC,OAAO,CAAC,CAAC,CAACtB,GAAG,EAAEQ,KAAK,CAAC,KAAK;QACzB,IAAI,CAACD,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;AAEA,eAAgB,IAAIpC,KAAK,CAAC,CAAC","ignoreList":[]}
@@ -29,8 +29,7 @@ import { getCookie } from "../browser/Cookies";
29
29
  * @hideconstructor
30
30
  */
31
31
  class BaseDateTimeUtil {
32
- constructor(isoFormat) {
33
- let doOffsets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
32
+ constructor(isoFormat, doOffsets = false) {
34
33
  _defineProperty(this, "_isoFormat", void 0);
35
34
  _defineProperty(this, "_doOffsets", void 0);
36
35
  _defineProperty(this, "_timeZone", typeof Intl === "undefined" ? "Etc/UTC" : Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC");
@@ -108,8 +107,7 @@ class BaseDateTimeUtil {
108
107
 
109
108
  /**
110
109
  */
111
- toDate(date) {
112
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
110
+ toDate(date, inputFormat = this.getIsoFormat()) {
113
111
  if (date instanceof Date) {
114
112
  return date;
115
113
  }
@@ -126,8 +124,7 @@ class BaseDateTimeUtil {
126
124
 
127
125
  /**
128
126
  */
129
- toFormat(date, targetFormat) {
130
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
127
+ toFormat(date, targetFormat, inputFormat = this.getIsoFormat()) {
131
128
  const {
132
129
  weekStartsOn
133
130
  } = this.getOptions();
@@ -144,8 +141,7 @@ class BaseDateTimeUtil {
144
141
 
145
142
  /**
146
143
  */
147
- toISO(date) {
148
- let sourceFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
144
+ toISO(date, sourceFormat = this.getIsoFormat()) {
149
145
  return this.toFormat(date, this.getIsoFormat(), sourceFormat);
150
146
  }
151
147
 
@@ -174,8 +170,7 @@ class BaseDateTimeUtil {
174
170
 
175
171
  /**
176
172
  */
177
- isValid(date) {
178
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
173
+ isValid(date, inputFormat = this.getIsoFormat()) {
179
174
  if (!date) {
180
175
  return false;
181
176
  }
@@ -185,50 +180,43 @@ class BaseDateTimeUtil {
185
180
 
186
181
  /**
187
182
  */
188
- isAfter(inputDate, afterISODate) {
189
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
183
+ isAfter(inputDate, afterISODate, inputFormat = this.getIsoFormat()) {
190
184
  return afterISODate != null && isAfter(this.toDate(inputDate, inputFormat), this.toDate(afterISODate));
191
185
  }
192
186
 
193
187
  /**
194
188
  */
195
- isSameOrAfter(inputDate, afterISODate) {
196
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
189
+ isSameOrAfter(inputDate, afterISODate, inputFormat = this.getIsoFormat()) {
197
190
  return afterISODate != null && (this.isAfter(inputDate, afterISODate, inputFormat) || this.isSame(inputDate, afterISODate, inputFormat));
198
191
  }
199
192
 
200
193
  /**
201
194
  */
202
- isBefore(inputDate, beforeISODate) {
203
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
195
+ isBefore(inputDate, beforeISODate, inputFormat = this.getIsoFormat()) {
204
196
  return beforeISODate != null && isBefore(this.toDate(inputDate, inputFormat), this.toDate(beforeISODate));
205
197
  }
206
198
 
207
199
  /**
208
200
  */
209
- isSameOrBefore(inputDate, beforeISODate) {
210
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
201
+ isSameOrBefore(inputDate, beforeISODate, inputFormat = this.getIsoFormat()) {
211
202
  return beforeISODate != null && (this.isBefore(inputDate, beforeISODate, inputFormat) || this.isSame(inputDate, beforeISODate, inputFormat));
212
203
  }
213
204
 
214
205
  /**
215
206
  */
216
- isSame(inputDate, compareDate) {
217
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
207
+ isSame(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
218
208
  return compareDate != null && this.toDate(inputDate, inputFormat).getTime() === this.toDate(compareDate).getTime();
219
209
  }
220
210
 
221
211
  /**
222
212
  */
223
- isSameDay(inputDate, compareDate) {
224
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
213
+ isSameDay(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
225
214
  return compareDate != null && isSameDay(this.toDate(inputDate, inputFormat), this.toDate(compareDate, inputFormat));
226
215
  }
227
216
 
228
217
  /**
229
218
  */
230
- isOther(inputDate, compareDate) {
231
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
219
+ isOther(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
232
220
  return !this.isSame(inputDate, compareDate, inputFormat);
233
221
  }
234
222
 
@@ -245,8 +233,7 @@ class BaseDateTimeUtil {
245
233
  * Checks if a given local date and time is ambiguous in the specified timezone.
246
234
  * Ambiguity happens during the end of daylight saving time (DST) transitions.
247
235
  */
248
- isAmbiguous(inputDate) {
249
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
236
+ isAmbiguous(inputDate, inputFormat = this.getIsoFormat()) {
250
237
  if (inputDate == null || typeof Intl === "undefined") {
251
238
  return false;
252
239
  }
@@ -270,8 +257,7 @@ class BaseDateTimeUtil {
270
257
  /**
271
258
  * @private
272
259
  */
273
- _calculate(date, calculationFn, property, value) {
274
- let inputFormat = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.getIsoFormat();
260
+ _calculate(date, calculationFn, property, value, inputFormat = this.getIsoFormat()) {
275
261
  const parsedDate = this.toDate(date, inputFormat);
276
262
  return this.toISO(calculationFn(parsedDate, {
277
263
  [property]: value
@@ -282,99 +268,85 @@ class BaseDateTimeUtil {
282
268
 
283
269
  /**
284
270
  */
285
- addSeconds(date, amount) {
286
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
271
+ addSeconds(date, amount, inputFormat = this.getIsoFormat()) {
287
272
  return this._calculate(date, add, "seconds", amount, inputFormat);
288
273
  }
289
274
 
290
275
  /**
291
276
  */
292
- addMinutes(date, amount) {
293
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
277
+ addMinutes(date, amount, inputFormat = this.getIsoFormat()) {
294
278
  return this._calculate(date, add, "minutes", amount, inputFormat);
295
279
  }
296
280
 
297
281
  /**
298
282
  */
299
- addHours(date, amount) {
300
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
283
+ addHours(date, amount, inputFormat = this.getIsoFormat()) {
301
284
  return this._calculate(date, add, "hours", amount, inputFormat);
302
285
  }
303
286
 
304
287
  /**
305
288
  */
306
- addDays(date, amount) {
307
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
289
+ addDays(date, amount, inputFormat = this.getIsoFormat()) {
308
290
  return this._calculate(date, add, "days", amount, inputFormat);
309
291
  }
310
292
 
311
293
  /**
312
294
  */
313
- addWeeks(date, amount) {
314
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
295
+ addWeeks(date, amount, inputFormat = this.getIsoFormat()) {
315
296
  return this._calculate(date, add, "weeks", amount, inputFormat);
316
297
  }
317
298
 
318
299
  /**
319
300
  */
320
- addMonths(date, amount) {
321
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
301
+ addMonths(date, amount, inputFormat = this.getIsoFormat()) {
322
302
  return this._calculate(date, add, "months", amount, inputFormat);
323
303
  }
324
304
 
325
305
  /**
326
306
  */
327
- addYears(date, amount) {
328
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
307
+ addYears(date, amount, inputFormat = this.getIsoFormat()) {
329
308
  return this._calculate(date, add, "years", amount, inputFormat);
330
309
  }
331
310
 
332
311
  /**
333
312
  */
334
- subtractSeconds(date, amount) {
335
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
313
+ subtractSeconds(date, amount, inputFormat = this.getIsoFormat()) {
336
314
  return this._calculate(date, sub, "seconds", amount, inputFormat);
337
315
  }
338
316
 
339
317
  /**
340
318
  */
341
- subtractMinutes(date, amount) {
342
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
319
+ subtractMinutes(date, amount, inputFormat = this.getIsoFormat()) {
343
320
  return this._calculate(date, sub, "minutes", amount, inputFormat);
344
321
  }
345
322
 
346
323
  /**
347
324
  */
348
- subtractHours(date, amount) {
349
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
325
+ subtractHours(date, amount, inputFormat = this.getIsoFormat()) {
350
326
  return this._calculate(date, sub, "hours", amount, inputFormat);
351
327
  }
352
328
 
353
329
  /**
354
330
  */
355
- subtractDays(date, amount) {
356
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
331
+ subtractDays(date, amount, inputFormat = this.getIsoFormat()) {
357
332
  return this._calculate(date, sub, "days", amount, inputFormat);
358
333
  }
359
334
 
360
335
  /**
361
336
  */
362
- subtractWeeks(date, amount) {
363
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
337
+ subtractWeeks(date, amount, inputFormat = this.getIsoFormat()) {
364
338
  return this._calculate(date, sub, "weeks", amount, inputFormat);
365
339
  }
366
340
 
367
341
  /**
368
342
  */
369
- subtractMonths(date, amount) {
370
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
343
+ subtractMonths(date, amount, inputFormat = this.getIsoFormat()) {
371
344
  return this._calculate(date, sub, "months", amount, inputFormat);
372
345
  }
373
346
 
374
347
  /**
375
348
  */
376
- subtractYears(date, amount) {
377
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
349
+ subtractYears(date, amount, inputFormat = this.getIsoFormat()) {
378
350
  return this._calculate(date, sub, "years", amount, inputFormat);
379
351
  }
380
352
 
@@ -383,9 +355,7 @@ class BaseDateTimeUtil {
383
355
  /**
384
356
  * @private
385
357
  */
386
- _get(date, method) {
387
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
388
- let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
358
+ _get(date, method, inputFormat = this.getIsoFormat(), options = {}) {
389
359
  const parsedDate = this.toDate(date, inputFormat);
390
360
  return this.toISO(method(parsedDate, {
391
361
  in: this.getDateFnsContext(),
@@ -395,22 +365,19 @@ class BaseDateTimeUtil {
395
365
 
396
366
  /**
397
367
  */
398
- startOfMonth(date) {
399
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
368
+ startOfMonth(date, inputFormat = this.getIsoFormat()) {
400
369
  return this._get(date, startOfMonth, inputFormat);
401
370
  }
402
371
 
403
372
  /**
404
373
  */
405
- endOfMonth(date) {
406
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
374
+ endOfMonth(date, inputFormat = this.getIsoFormat()) {
407
375
  return this._get(date, endOfMonth, inputFormat);
408
376
  }
409
377
 
410
378
  /**
411
379
  */
412
- startOfWeek(date) {
413
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
380
+ startOfWeek(date, inputFormat = this.getIsoFormat()) {
414
381
  const {
415
382
  weekStartsOn
416
383
  } = this.getOptions();
@@ -421,8 +388,7 @@ class BaseDateTimeUtil {
421
388
 
422
389
  /**
423
390
  */
424
- getHours(date) {
425
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
391
+ getHours(date, inputFormat = this.getIsoFormat()) {
426
392
  const parsedDate = this.toDate(date, inputFormat);
427
393
  return getHours(parsedDate, {
428
394
  in: this.getDateFnsContext()
@@ -431,8 +397,7 @@ class BaseDateTimeUtil {
431
397
 
432
398
  /**
433
399
  */
434
- getMinutes(date) {
435
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
400
+ getMinutes(date, inputFormat = this.getIsoFormat()) {
436
401
  const parsedDate = this.toDate(date, inputFormat);
437
402
  return getMinutes(parsedDate, {
438
403
  in: this.getDateFnsContext()
@@ -441,8 +406,7 @@ class BaseDateTimeUtil {
441
406
 
442
407
  /**
443
408
  */
444
- getWeek(date) {
445
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
409
+ getWeek(date, inputFormat = this.getIsoFormat()) {
446
410
  const {
447
411
  weekStartsOn,
448
412
  firstWeekContainsDate
@@ -460,8 +424,7 @@ class BaseDateTimeUtil {
460
424
  /**
461
425
  * @private
462
426
  */
463
- _set(date, property, value) {
464
- let inputFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.getIsoFormat();
427
+ _set(date, property, value, inputFormat = this.getIsoFormat()) {
465
428
  const parsedDate = this.toDate(date, inputFormat);
466
429
  return this.toISO(set(parsedDate, {
467
430
  [property]: value
@@ -474,57 +437,49 @@ class BaseDateTimeUtil {
474
437
 
475
438
  /**
476
439
  */
477
- setYear(date, year) {
478
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
440
+ setYear(date, year, inputFormat = this.getIsoFormat()) {
479
441
  return this._set(date, "year", year, inputFormat);
480
442
  }
481
443
 
482
444
  /**
483
445
  */
484
- setMonth(date, month) {
485
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
446
+ setMonth(date, month, inputFormat = this.getIsoFormat()) {
486
447
  return this._set(date, "month", month, inputFormat);
487
448
  }
488
449
 
489
450
  /**
490
451
  */
491
- setDay(date, day) {
492
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
452
+ setDay(date, day, inputFormat = this.getIsoFormat()) {
493
453
  return this._set(date, "date", day, inputFormat);
494
454
  }
495
455
 
496
456
  /**
497
457
  */
498
- setHour(date, hour) {
499
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
458
+ setHour(date, hour, inputFormat = this.getIsoFormat()) {
500
459
  return this._set(date, "hours", hour, inputFormat);
501
460
  }
502
461
 
503
462
  /**
504
463
  */
505
- setMinute(date, minute) {
506
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
464
+ setMinute(date, minute, inputFormat = this.getIsoFormat()) {
507
465
  return this._set(date, "minutes", minute, inputFormat);
508
466
  }
509
467
 
510
468
  /**
511
469
  */
512
- setSecond(date, second) {
513
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
470
+ setSecond(date, second, inputFormat = this.getIsoFormat()) {
514
471
  return this._set(date, "seconds", second, inputFormat);
515
472
  }
516
473
 
517
474
  /**
518
475
  */
519
- setMilliseconds(date, millisecond) {
520
- let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
476
+ setMilliseconds(date, millisecond, inputFormat = this.getIsoFormat()) {
521
477
  return this._set(date, "milliseconds", millisecond, inputFormat);
522
478
  }
523
479
 
524
480
  /**
525
481
  */
526
- setTime(date, hours, minutes, seconds, milliseconds) {
527
- let inputFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : this.getIsoFormat();
482
+ setTime(date, hours, minutes, seconds, milliseconds, inputFormat = this.getIsoFormat()) {
528
483
  const parsedDate = this.toDate(date, inputFormat);
529
484
  return this.toISO(set(parsedDate, {
530
485
  hours,
@@ -563,8 +518,7 @@ class BaseDateTimeUtil {
563
518
 
564
519
  /**
565
520
  */
566
- getOffset(date) {
567
- let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
521
+ getOffset(date, inputFormat = this.getIsoFormat()) {
568
522
  const parsedDate = this.toDate(date, inputFormat);
569
523
  if (isValid(parsedDate)) {
570
524
  const dateOffset = this.toFormat(parsedDate, DATETIME_OFFSET_FORMAT);