@beinformed/ui 1.24.0 → 1.24.1-beta.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 (1092) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/constants/package.json +8 -0
  3. package/esm/builder/index.js +0 -1
  4. package/esm/builder/index.js.map +1 -1
  5. package/esm/constants/Constants.js +0 -1
  6. package/esm/constants/Constants.js.map +1 -1
  7. package/esm/constants/LayoutHintConfig.js +0 -1
  8. package/esm/constants/LayoutHintConfig.js.map +1 -1
  9. package/esm/constants/LayoutHints.js +0 -1
  10. package/esm/constants/LayoutHints.js.map +1 -1
  11. package/esm/constants/index.js +0 -1
  12. package/esm/constants/index.js.map +1 -1
  13. package/esm/exceptions/ConfigurationException.js +0 -2
  14. package/esm/exceptions/ConfigurationException.js.map +1 -1
  15. package/esm/exceptions/FetchException.js +1 -1
  16. package/esm/exceptions/FetchException.js.map +1 -1
  17. package/esm/exceptions/IllegalArgumentException.js +0 -1
  18. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  19. package/esm/exceptions/IllegalReturnException.js +0 -1
  20. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  21. package/esm/exceptions/IllegalStateException.js +0 -1
  22. package/esm/exceptions/IllegalStateException.js.map +1 -1
  23. package/esm/exceptions/JsonParseException.js +0 -1
  24. package/esm/exceptions/JsonParseException.js.map +1 -1
  25. package/esm/exceptions/MissingPropertyException.js +0 -1
  26. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  27. package/esm/exceptions/NotAllowedUriException.js +0 -1
  28. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  29. package/esm/exceptions/ServerRequestException.js +0 -1
  30. package/esm/exceptions/ServerRequestException.js.map +1 -1
  31. package/esm/exceptions/ThemePropertyException.js +0 -1
  32. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  33. package/esm/exceptions/TimeoutException.js +0 -1
  34. package/esm/exceptions/TimeoutException.js.map +1 -1
  35. package/esm/exceptions/UnauthorizedException.js +0 -1
  36. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  37. package/esm/exceptions/UnsupportedOperationException.js +0 -1
  38. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  39. package/esm/exceptions/index.js +0 -1
  40. package/esm/exceptions/index.js.map +1 -1
  41. package/esm/hooks/index.js +0 -1
  42. package/esm/hooks/index.js.map +1 -1
  43. package/esm/hooks/useAuthentication.js +4 -5
  44. package/esm/hooks/useAuthentication.js.map +1 -1
  45. package/esm/hooks/useDeepCompareEffect.js +0 -1
  46. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  47. package/esm/hooks/useForm.js +1 -2
  48. package/esm/hooks/useForm.js.map +1 -1
  49. package/esm/hooks/useModelCatalog.js +1 -1
  50. package/esm/hooks/useModelCatalog.js.map +1 -1
  51. package/esm/hooks/useModels.js +0 -1
  52. package/esm/hooks/useModels.js.map +1 -1
  53. package/esm/hooks/useModularUI.js +0 -1
  54. package/esm/hooks/useModularUI.js.map +1 -1
  55. package/esm/hooks/useModularUIBasic.js +3 -3
  56. package/esm/hooks/useModularUIBasic.js.map +1 -1
  57. package/esm/hooks/useModularUIModel.js +0 -1
  58. package/esm/hooks/useModularUIModel.js.map +1 -1
  59. package/esm/hooks/useModularUIRequest.js +0 -1
  60. package/esm/hooks/useModularUIRequest.js.map +1 -1
  61. package/esm/hooks/useNotification.js +0 -1
  62. package/esm/hooks/useNotification.js.map +1 -1
  63. package/esm/hooks/usePreference.js +0 -1
  64. package/esm/hooks/usePreference.js.map +1 -1
  65. package/esm/hooks/useProgressIndicator.js +0 -1
  66. package/esm/hooks/useProgressIndicator.js.map +1 -1
  67. package/esm/hooks/useRouter.js +3 -13
  68. package/esm/hooks/useRouter.js.map +1 -1
  69. package/esm/i18n/Message.js +0 -1
  70. package/esm/i18n/Message.js.map +1 -1
  71. package/esm/i18n/index.js +0 -1
  72. package/esm/i18n/index.js.map +1 -1
  73. package/esm/i18n/languages.js +0 -1
  74. package/esm/i18n/languages.js.map +1 -1
  75. package/esm/i18n/translations/beinformed_error_messages_en.nl.js +0 -1
  76. package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  77. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js +0 -1
  78. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  79. package/esm/index.js +0 -1
  80. package/esm/index.js.map +1 -1
  81. package/esm/models/application/ApplicationModel.js +2 -4
  82. package/esm/models/application/ApplicationModel.js.map +1 -1
  83. package/esm/models/attributes/AttributeCollection.js +3 -8
  84. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  85. package/esm/models/attributes/AttributeContent.js +4 -7
  86. package/esm/models/attributes/AttributeContent.js.map +1 -1
  87. package/esm/models/attributes/AttributeDataHelper.js +1 -2
  88. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  89. package/esm/models/attributes/AttributeModel.js +2 -4
  90. package/esm/models/attributes/AttributeModel.js.map +1 -1
  91. package/esm/models/attributes/CaptchaAttributeModel.js +0 -1
  92. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  93. package/esm/models/attributes/ChoiceAttributeModel.js +2 -4
  94. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  95. package/esm/models/attributes/ChoiceAttributeOptionModel.js +2 -3
  96. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  97. package/esm/models/attributes/CompositeAttributeChildCollection.js +2 -5
  98. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  99. package/esm/models/attributes/CompositeAttributeModel.js +3 -5
  100. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  101. package/esm/models/attributes/HelptextAttributeModel.js +1 -2
  102. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  103. package/esm/models/attributes/LabelAttributeModel.js +1 -1
  104. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  105. package/esm/models/attributes/MemoAttributeModel.js +1 -2
  106. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  107. package/esm/models/attributes/MoneyAttributeModel.js +1 -1
  108. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  109. package/esm/models/attributes/PasswordAttributeModel.js +1 -1
  110. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  111. package/esm/models/attributes/StringAttributeModel.js +1 -1
  112. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  113. package/esm/models/attributes/XMLAttributeModel.js +1 -1
  114. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  115. package/esm/models/attributes/_createAttribute.js +2 -3
  116. package/esm/models/attributes/_createAttribute.js.map +1 -1
  117. package/esm/models/attributes/input-constraints/BSNConstraint.js +0 -2
  118. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  119. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js +0 -1
  120. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  121. package/esm/models/attributes/input-constraints/IBANConstraint.js +0 -1
  122. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  123. package/esm/models/attributes/input-constraints/MandatoryConstraint.js +0 -2
  124. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  125. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js +0 -1
  126. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  127. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js +0 -1
  128. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  129. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +0 -2
  130. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  131. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +0 -1
  132. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  133. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +0 -1
  134. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  135. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +0 -1
  136. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  137. package/esm/models/attributes/input-constraints/RegexConstraint.js +0 -1
  138. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  139. package/esm/models/attributes/input-constraints/StringLengthConstraint.js +0 -1
  140. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  141. package/esm/models/attributes/input-constraints/XMLConstraint.js +0 -2
  142. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  143. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
  144. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  145. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
  146. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  147. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +0 -1
  148. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  149. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +0 -1
  150. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  151. package/esm/models/base/ResourceCollection.js +1 -2
  152. package/esm/models/base/ResourceCollection.js.map +1 -1
  153. package/esm/models/concepts/BusinessScenarioModel.js +4 -12
  154. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  155. package/esm/models/concepts/ConceptDetailModel.js +1 -2
  156. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  157. package/esm/models/concepts/ConceptIndexModel.js +1 -2
  158. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  159. package/esm/models/concepts/ConceptLinkModel.js +2 -3
  160. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  161. package/esm/models/concepts/ConceptTypeDetailModel.js +0 -1
  162. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  163. package/esm/models/content/ContentIndexModel.js +3 -8
  164. package/esm/models/content/ContentIndexModel.js.map +1 -1
  165. package/esm/models/content/ContentLinkModel.js +1 -1
  166. package/esm/models/content/ContentLinkModel.js.map +1 -1
  167. package/esm/models/content/ContentModel.js +2 -4
  168. package/esm/models/content/ContentModel.js.map +1 -1
  169. package/esm/models/content/ContentTOCModel.js +2 -4
  170. package/esm/models/content/ContentTOCModel.js.map +1 -1
  171. package/esm/models/content/ContentTypeModel.js +0 -1
  172. package/esm/models/content/ContentTypeModel.js.map +1 -1
  173. package/esm/models/content/SectionModel.js +1 -2
  174. package/esm/models/content/SectionModel.js.map +1 -1
  175. package/esm/models/contentconfiguration/ContentConfigurationResults.js +1 -1
  176. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  177. package/esm/models/detail/DetailModel.js +2 -2
  178. package/esm/models/detail/DetailModel.js.map +1 -1
  179. package/esm/models/error/ErrorModel.js +0 -1
  180. package/esm/models/error/ErrorModel.js.map +1 -1
  181. package/esm/models/error/ErrorResponse.js +11 -22
  182. package/esm/models/error/ErrorResponse.js.map +1 -1
  183. package/esm/models/filters/BaseFilterModel.js +2 -4
  184. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  185. package/esm/models/filters/FilterCollection.js +2 -4
  186. package/esm/models/filters/FilterCollection.js.map +1 -1
  187. package/esm/models/filters/FilterModel.js +0 -1
  188. package/esm/models/filters/FilterModel.js.map +1 -1
  189. package/esm/models/form/FormModel.js +13 -28
  190. package/esm/models/form/FormModel.js.map +1 -1
  191. package/esm/models/form/FormObjectModel.js +6 -11
  192. package/esm/models/form/FormObjectModel.js.map +1 -1
  193. package/esm/models/grouping/GroupingModel.js +1 -1
  194. package/esm/models/grouping/GroupingModel.js.map +1 -1
  195. package/esm/models/index.js +0 -1
  196. package/esm/models/index.js.map +1 -1
  197. package/esm/models/list/ListDetailModel.js +4 -6
  198. package/esm/models/list/ListDetailModel.js.map +1 -1
  199. package/esm/models/list/ListModel.js +2 -2
  200. package/esm/models/list/ListModel.js.map +1 -1
  201. package/esm/models/lookup/LookupOptionCollection.js +0 -1
  202. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  203. package/esm/models/modelcatalog/ModelCatalogModel.js +0 -1
  204. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  205. package/esm/models/process/ProcessStatusSettingsModel.js +0 -1
  206. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  207. package/esm/models/sorting/SortOptionModel.js +0 -1
  208. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  209. package/esm/models/sorting/SortingModel.js +1 -1
  210. package/esm/models/sorting/SortingModel.js.map +1 -1
  211. package/esm/models/tab/TabModel.js +1 -2
  212. package/esm/models/tab/TabModel.js.map +1 -1
  213. package/esm/models/taskgroup/TaskGroupCollection.js +0 -1
  214. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  215. package/esm/models/user/UserModel.js +0 -1
  216. package/esm/models/user/UserModel.js.map +1 -1
  217. package/esm/modularui/ModularUIRequest.js +4 -9
  218. package/esm/modularui/ModularUIRequest.js.map +1 -1
  219. package/esm/modularui/ModularUIResponse.js +2 -3
  220. package/esm/modularui/ModularUIResponse.js.map +1 -1
  221. package/esm/modularui/index.js +0 -1
  222. package/esm/modularui/index.js.map +1 -1
  223. package/esm/react/ErrorBoundaryFallback.js +0 -1
  224. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  225. package/esm/react/index.js +0 -1
  226. package/esm/react/index.js.map +1 -1
  227. package/esm/react/utils.js +0 -2
  228. package/esm/react/utils.js.map +1 -1
  229. package/esm/react-client/Init.js +0 -1
  230. package/esm/react-client/Init.js.map +1 -1
  231. package/esm/react-client/contextPath.js +0 -1
  232. package/esm/react-client/contextPath.js.map +1 -1
  233. package/esm/react-client/index.js +0 -1
  234. package/esm/react-client/index.js.map +1 -1
  235. package/esm/react-client/rehydrate.js +1 -1
  236. package/esm/react-client/rehydrate.js.map +1 -1
  237. package/esm/react-server/contextPath.js +0 -1
  238. package/esm/react-server/contextPath.js.map +1 -1
  239. package/esm/react-server/htmlpage.js +1 -1
  240. package/esm/react-server/htmlpage.js.map +1 -1
  241. package/esm/react-server/index.js +0 -1
  242. package/esm/react-server/index.js.map +1 -1
  243. package/esm/react-server/renderSSRComplete.js +0 -1
  244. package/esm/react-server/renderSSRComplete.js.map +1 -1
  245. package/esm/react-server/renderSSRMinimal.js +0 -1
  246. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  247. package/esm/react-server/requestInformation.js +0 -1
  248. package/esm/react-server/requestInformation.js.map +1 -1
  249. package/esm/react-server/serverNoSSR.js +1 -3
  250. package/esm/react-server/serverNoSSR.js.map +1 -1
  251. package/esm/react-server/serverSSR.js +0 -1
  252. package/esm/react-server/serverSSR.js.map +1 -1
  253. package/esm/react-theme/ThemeProvider.js +0 -1
  254. package/esm/react-theme/ThemeProvider.js.map +1 -1
  255. package/esm/react-theme/index.js +0 -1
  256. package/esm/react-theme/index.js.map +1 -1
  257. package/esm/react-theme/useTheme.js +0 -1
  258. package/esm/react-theme/useTheme.js.map +1 -1
  259. package/esm/react-theme/utils/background.js +0 -1
  260. package/esm/react-theme/utils/background.js.map +1 -1
  261. package/esm/react-theme/utils/colors.js +0 -1
  262. package/esm/react-theme/utils/colors.js.map +1 -1
  263. package/esm/react-theme/utils/contrast.js +1 -3
  264. package/esm/react-theme/utils/contrast.js.map +1 -1
  265. package/esm/react-theme/utils/corners.js +0 -1
  266. package/esm/react-theme/utils/corners.js.map +1 -1
  267. package/esm/react-theme/utils/themeProps.js +0 -1
  268. package/esm/react-theme/utils/themeProps.js.map +1 -1
  269. package/esm/redux/_i18n/actions.js +0 -1
  270. package/esm/redux/_i18n/actions.js.map +1 -1
  271. package/esm/redux/_i18n/index.js +0 -1
  272. package/esm/redux/_i18n/index.js.map +1 -1
  273. package/esm/redux/_i18n/reducer.js +0 -1
  274. package/esm/redux/_i18n/reducer.js.map +1 -1
  275. package/esm/redux/_modularui/actions.js +7 -7
  276. package/esm/redux/_modularui/actions.js.map +1 -1
  277. package/esm/redux/_modularui/connector.js +2 -4
  278. package/esm/redux/_modularui/connector.js.map +1 -1
  279. package/esm/redux/_modularui/index.js +0 -1
  280. package/esm/redux/_modularui/index.js.map +1 -1
  281. package/esm/redux/_modularui/modularuiUtils.js +2 -2
  282. package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
  283. package/esm/redux/_modularui/reducer.js +1 -2
  284. package/esm/redux/_modularui/reducer.js.map +1 -1
  285. package/esm/redux/_modularui/selectors.js +7 -13
  286. package/esm/redux/_modularui/selectors.js.map +1 -1
  287. package/esm/redux/_modularui/withModularUI.js +0 -1
  288. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  289. package/esm/redux/_router/actions.js +0 -2
  290. package/esm/redux/_router/actions.js.map +1 -1
  291. package/esm/redux/_router/connectors.js +9 -19
  292. package/esm/redux/_router/connectors.js.map +1 -1
  293. package/esm/redux/_router/index.js +0 -1
  294. package/esm/redux/_router/index.js.map +1 -1
  295. package/esm/redux/_router/middleware.js +0 -2
  296. package/esm/redux/_router/middleware.js.map +1 -1
  297. package/esm/redux/_router/reducer.js +0 -2
  298. package/esm/redux/_router/reducer.js.map +1 -1
  299. package/esm/redux/actions/Application.js +0 -1
  300. package/esm/redux/actions/Application.js.map +1 -1
  301. package/esm/redux/actions/Authorization.js +4 -7
  302. package/esm/redux/actions/Authorization.js.map +1 -1
  303. package/esm/redux/actions/Error.js +0 -1
  304. package/esm/redux/actions/Error.js.map +1 -1
  305. package/esm/redux/actions/Form.js +0 -1
  306. package/esm/redux/actions/Form.js.map +1 -1
  307. package/esm/redux/actions/FormAttributeSet.js +2 -4
  308. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  309. package/esm/redux/actions/FormAttributeSetRepeatable.js +0 -1
  310. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  311. package/esm/redux/actions/FormAutosave.js +0 -1
  312. package/esm/redux/actions/FormAutosave.js.map +1 -1
  313. package/esm/redux/actions/FormAutosubmit.js +0 -1
  314. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  315. package/esm/redux/actions/FormValidations.js +0 -1
  316. package/esm/redux/actions/FormValidations.js.map +1 -1
  317. package/esm/redux/actions/Modals.js +0 -2
  318. package/esm/redux/actions/Modals.js.map +1 -1
  319. package/esm/redux/actions/Notification.js +0 -1
  320. package/esm/redux/actions/Notification.js.map +1 -1
  321. package/esm/redux/actions/Preferences.js +5 -5
  322. package/esm/redux/actions/Preferences.js.map +1 -1
  323. package/esm/redux/actions/ProgressIndicator.js +0 -2
  324. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  325. package/esm/redux/actions/SignIn.js +2 -3
  326. package/esm/redux/actions/SignIn.js.map +1 -1
  327. package/esm/redux/actions/SignOut.js +0 -1
  328. package/esm/redux/actions/SignOut.js.map +1 -1
  329. package/esm/redux/actions/index.js +0 -1
  330. package/esm/redux/actions/index.js.map +1 -1
  331. package/esm/redux/connectors/Application.js +0 -1
  332. package/esm/redux/connectors/Application.js.map +1 -1
  333. package/esm/redux/connectors/Breadcrumb.js +0 -1
  334. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  335. package/esm/redux/connectors/CaseView.js +0 -1
  336. package/esm/redux/connectors/CaseView.js.map +1 -1
  337. package/esm/redux/connectors/ConceptDetail.js +0 -1
  338. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  339. package/esm/redux/connectors/ContentBrowser.js +0 -1
  340. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  341. package/esm/redux/connectors/ContentDetail.js +0 -1
  342. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  343. package/esm/redux/connectors/ContentDetailSection.js +0 -1
  344. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  345. package/esm/redux/connectors/Form.js +3 -7
  346. package/esm/redux/connectors/Form.js.map +1 -1
  347. package/esm/redux/connectors/FormAttributeSet.js +0 -1
  348. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  349. package/esm/redux/connectors/ListDetail.js +0 -1
  350. package/esm/redux/connectors/ListDetail.js.map +1 -1
  351. package/esm/redux/connectors/ModelCatalog.js +0 -1
  352. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  353. package/esm/redux/connectors/Notification.js +0 -1
  354. package/esm/redux/connectors/Notification.js.map +1 -1
  355. package/esm/redux/connectors/PanelRenderer.js +0 -1
  356. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  357. package/esm/redux/connectors/Preferences.js +0 -1
  358. package/esm/redux/connectors/Preferences.js.map +1 -1
  359. package/esm/redux/connectors/Progress.js +0 -1
  360. package/esm/redux/connectors/Progress.js.map +1 -1
  361. package/esm/redux/connectors/ProgressIndicator.js +0 -1
  362. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  363. package/esm/redux/connectors/QuickSearch.js +0 -1
  364. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  365. package/esm/redux/connectors/SignIn.js +1 -2
  366. package/esm/redux/connectors/SignIn.js.map +1 -1
  367. package/esm/redux/connectors/SignOut.js +3 -7
  368. package/esm/redux/connectors/SignOut.js.map +1 -1
  369. package/esm/redux/connectors/Tab.js +0 -1
  370. package/esm/redux/connectors/Tab.js.map +1 -1
  371. package/esm/redux/connectors/index.js +0 -1
  372. package/esm/redux/connectors/index.js.map +1 -1
  373. package/esm/redux/index.js +0 -2
  374. package/esm/redux/index.js.map +1 -1
  375. package/esm/redux/reducers/AuthReducer.js +0 -2
  376. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  377. package/esm/redux/reducers/ErrorReducer.js +0 -2
  378. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  379. package/esm/redux/reducers/ModalsReducer.js +0 -1
  380. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  381. package/esm/redux/reducers/NotificationReducer.js +0 -2
  382. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  383. package/esm/redux/reducers/PreferencesReducer.js +2 -4
  384. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  385. package/esm/redux/reducers/ProgressIndicatorReducer.js +1 -4
  386. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  387. package/esm/redux/reducers/createReducer.js +0 -1
  388. package/esm/redux/reducers/createReducer.js.map +1 -1
  389. package/esm/redux/reducers/index.js +0 -1
  390. package/esm/redux/reducers/index.js.map +1 -1
  391. package/esm/redux/selectors/i18n.js +1 -4
  392. package/esm/redux/selectors/i18n.js.map +1 -1
  393. package/esm/redux/selectors/index.js +0 -1
  394. package/esm/redux/selectors/index.js.map +1 -1
  395. package/esm/redux/store/beforeRenderHooks.js +0 -2
  396. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  397. package/esm/redux/store/configureStore.js +0 -1
  398. package/esm/redux/store/configureStore.js.map +1 -1
  399. package/esm/utils/browser/Cache.js +0 -1
  400. package/esm/utils/browser/Cache.js.map +1 -1
  401. package/esm/utils/browser/Cookies.js +3 -4
  402. package/esm/utils/browser/Cookies.js.map +1 -1
  403. package/esm/utils/helpers/createHash.js +0 -2
  404. package/esm/utils/helpers/createHash.js.map +1 -1
  405. package/esm/utils/helpers/createUUID.js +0 -1
  406. package/esm/utils/helpers/createUUID.js.map +1 -1
  407. package/esm/utils/helpers/objects.js +0 -1
  408. package/esm/utils/helpers/objects.js.map +1 -1
  409. package/esm/utils/helpers/sanitizeHtml.js +0 -1
  410. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  411. package/esm/utils/helpers/text.js +0 -1
  412. package/esm/utils/helpers/text.js.map +1 -1
  413. package/esm/utils/index.js +0 -2
  414. package/esm/utils/index.js.map +1 -1
  415. package/esm/utils/number/formatValue.js +0 -1
  416. package/esm/utils/number/formatValue.js.map +1 -1
  417. package/esm/utils/number/parseNumbers.js +0 -1
  418. package/esm/utils/number/parseNumbers.js.map +1 -1
  419. package/lib/constants/LayoutHints.js +0 -1
  420. package/lib/constants/LayoutHints.js.map +1 -1
  421. package/lib/constants/Settings.js +0 -1
  422. package/lib/constants/Settings.js.map +1 -1
  423. package/lib/exceptions/ConfigurationException.js +0 -1
  424. package/lib/exceptions/ConfigurationException.js.map +1 -1
  425. package/lib/exceptions/FetchException.js +1 -2
  426. package/lib/exceptions/FetchException.js.map +1 -1
  427. package/lib/exceptions/UnauthorizedException.js +0 -1
  428. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  429. package/lib/hooks/useAllFormsOnModel.js +0 -1
  430. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  431. package/lib/hooks/useAuthentication.js +4 -5
  432. package/lib/hooks/useAuthentication.js.map +1 -1
  433. package/lib/hooks/useContent.js +0 -1
  434. package/lib/hooks/useContent.js.map +1 -1
  435. package/lib/hooks/useDeepCompareEffect.js +0 -1
  436. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  437. package/lib/hooks/useForm.js +1 -2
  438. package/lib/hooks/useForm.js.map +1 -1
  439. package/lib/hooks/useI18n.js +0 -1
  440. package/lib/hooks/useI18n.js.map +1 -1
  441. package/lib/hooks/useModal.js +0 -1
  442. package/lib/hooks/useModal.js.map +1 -1
  443. package/lib/hooks/useModelCatalog.js +1 -2
  444. package/lib/hooks/useModelCatalog.js.map +1 -1
  445. package/lib/hooks/useModels.js +0 -1
  446. package/lib/hooks/useModels.js.map +1 -1
  447. package/lib/hooks/useModularUI.js +0 -1
  448. package/lib/hooks/useModularUI.js.map +1 -1
  449. package/lib/hooks/useModularUIBasic.js +3 -4
  450. package/lib/hooks/useModularUIBasic.js.map +1 -1
  451. package/lib/hooks/useModularUIModel.js +0 -1
  452. package/lib/hooks/useModularUIModel.js.map +1 -1
  453. package/lib/hooks/useModularUIRequest.js +0 -1
  454. package/lib/hooks/useModularUIRequest.js.map +1 -1
  455. package/lib/hooks/useNotification.js +0 -1
  456. package/lib/hooks/useNotification.js.map +1 -1
  457. package/lib/hooks/usePreference.js +0 -1
  458. package/lib/hooks/usePreference.js.map +1 -1
  459. package/lib/hooks/useProgressIndicator.js +0 -1
  460. package/lib/hooks/useProgressIndicator.js.map +1 -1
  461. package/lib/hooks/useRouter.js +3 -13
  462. package/lib/hooks/useRouter.js.map +1 -1
  463. package/lib/i18n/Locale.js +0 -1
  464. package/lib/i18n/Locale.js.map +1 -1
  465. package/lib/i18n/Locales.js +0 -1
  466. package/lib/i18n/Locales.js.map +1 -1
  467. package/lib/i18n/Message.js +0 -1
  468. package/lib/i18n/Message.js.map +1 -1
  469. package/lib/i18n/withMessage.js +0 -1
  470. package/lib/i18n/withMessage.js.map +1 -1
  471. package/lib/models/actions/ActionCollection.js +0 -1
  472. package/lib/models/actions/ActionCollection.js.map +1 -1
  473. package/lib/models/actions/ActionModel.js +0 -1
  474. package/lib/models/actions/ActionModel.js.map +1 -1
  475. package/lib/models/application/ApplicationModel.js +2 -5
  476. package/lib/models/application/ApplicationModel.js.map +1 -1
  477. package/lib/models/attributes/AttributeCollection.js +3 -9
  478. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  479. package/lib/models/attributes/AttributeContent.js +4 -8
  480. package/lib/models/attributes/AttributeContent.js.map +1 -1
  481. package/lib/models/attributes/AttributeDataHelper.js +1 -3
  482. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  483. package/lib/models/attributes/AttributeModel.js +2 -5
  484. package/lib/models/attributes/AttributeModel.js.map +1 -1
  485. package/lib/models/attributes/AttributeSetModel.js +0 -1
  486. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  487. package/lib/models/attributes/BooleanAttributeModel.js +0 -1
  488. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  489. package/lib/models/attributes/CaptchaAttributeModel.js +0 -1
  490. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  491. package/lib/models/attributes/ChoiceAttributeModel.js +2 -5
  492. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  493. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +0 -1
  494. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  495. package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -4
  496. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  497. package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -6
  498. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  499. package/lib/models/attributes/CompositeAttributeModel.js +3 -6
  500. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  501. package/lib/models/attributes/DatetimeAttributeModel.js +0 -1
  502. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  503. package/lib/models/attributes/HelptextAttributeModel.js +1 -2
  504. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  505. package/lib/models/attributes/LabelAttributeModel.js +1 -2
  506. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  507. package/lib/models/attributes/MemoAttributeModel.js +1 -2
  508. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  509. package/lib/models/attributes/MoneyAttributeModel.js +1 -2
  510. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  511. package/lib/models/attributes/NumberAttributeModel.js +0 -1
  512. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  513. package/lib/models/attributes/PasswordAttributeModel.js +1 -2
  514. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  515. package/lib/models/attributes/StringAttributeModel.js +1 -2
  516. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  517. package/lib/models/attributes/UploadAttributeModel.js +0 -1
  518. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  519. package/lib/models/attributes/XMLAttributeModel.js +1 -2
  520. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  521. package/lib/models/attributes/_createAttribute.js +2 -4
  522. package/lib/models/attributes/_createAttribute.js.map +1 -1
  523. package/lib/models/attributes/input-constraints/BSNConstraint.js +0 -1
  524. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  525. package/lib/models/attributes/input-constraints/ConstraintCollection.js +0 -1
  526. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  527. package/lib/models/attributes/input-constraints/ConstraintModel.js +0 -1
  528. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  529. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +0 -1
  530. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  531. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +0 -1
  532. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  533. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +0 -1
  534. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  535. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +0 -1
  536. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  537. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +0 -1
  538. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  539. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +0 -1
  540. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  541. package/lib/models/attributes/input-constraints/IBANConstraint.js +0 -1
  542. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  543. package/lib/models/attributes/input-constraints/MandatoryConstraint.js +0 -1
  544. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  545. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +0 -1
  546. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  547. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +0 -1
  548. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  549. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +0 -1
  550. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  551. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +0 -1
  552. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  553. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +0 -1
  554. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  555. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +0 -1
  556. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  557. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +0 -1
  558. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  559. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +0 -1
  560. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  561. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +0 -1
  562. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  563. package/lib/models/attributes/input-constraints/RangeConstraint.js +0 -1
  564. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  565. package/lib/models/attributes/input-constraints/RegexConstraint.js +0 -1
  566. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  567. package/lib/models/attributes/input-constraints/StringLengthConstraint.js +0 -1
  568. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  569. package/lib/models/attributes/input-constraints/XMLConstraint.js +0 -1
  570. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  571. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
  572. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  573. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -3
  574. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  575. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +0 -1
  576. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  577. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +0 -1
  578. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  579. package/lib/models/base/BaseCollection.js +0 -1
  580. package/lib/models/base/BaseCollection.js.map +1 -1
  581. package/lib/models/base/BaseModel.js +0 -1
  582. package/lib/models/base/BaseModel.js.map +1 -1
  583. package/lib/models/base/ResourceCollection.js +1 -2
  584. package/lib/models/base/ResourceCollection.js.map +1 -1
  585. package/lib/models/base/ResourceModel.js +0 -1
  586. package/lib/models/base/ResourceModel.js.map +1 -1
  587. package/lib/models/caseview/CaseViewModel.js +0 -1
  588. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  589. package/lib/models/concepts/BusinessScenarioModel.js +4 -13
  590. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  591. package/lib/models/concepts/ConceptDetailModel.js +1 -3
  592. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  593. package/lib/models/concepts/ConceptIndexModel.js +1 -3
  594. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  595. package/lib/models/concepts/ConceptLinkModel.js +2 -4
  596. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  597. package/lib/models/concepts/ConceptRelationCollection.js +0 -1
  598. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  599. package/lib/models/concepts/ConceptRelationModel.js +0 -1
  600. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  601. package/lib/models/concepts/ConceptTypeDetailModel.js +0 -1
  602. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  603. package/lib/models/concepts/SourceReferenceCollection.js +0 -1
  604. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  605. package/lib/models/concepts/SourceReferenceModel.js +0 -1
  606. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  607. package/lib/models/content/ContentIndexModel.js +3 -9
  608. package/lib/models/content/ContentIndexModel.js.map +1 -1
  609. package/lib/models/content/ContentLinkModel.js +1 -2
  610. package/lib/models/content/ContentLinkModel.js.map +1 -1
  611. package/lib/models/content/ContentModel.js +2 -5
  612. package/lib/models/content/ContentModel.js.map +1 -1
  613. package/lib/models/content/ContentTOCModel.js +2 -5
  614. package/lib/models/content/ContentTOCModel.js.map +1 -1
  615. package/lib/models/content/ContentTypeModel.js +0 -1
  616. package/lib/models/content/ContentTypeModel.js.map +1 -1
  617. package/lib/models/content/SectionModel.js +1 -3
  618. package/lib/models/content/SectionModel.js.map +1 -1
  619. package/lib/models/content/SubSectionModel.js +0 -1
  620. package/lib/models/content/SubSectionModel.js.map +1 -1
  621. package/lib/models/contentconfiguration/ContentConfiguration.js +0 -1
  622. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  623. package/lib/models/contentconfiguration/ContentConfigurationElements.js +0 -1
  624. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  625. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +0 -1
  626. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  627. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +0 -1
  628. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  629. package/lib/models/contentconfiguration/ContentConfigurationResults.js +1 -2
  630. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  631. package/lib/models/detail/DetailModel.js +2 -3
  632. package/lib/models/detail/DetailModel.js.map +1 -1
  633. package/lib/models/error/ErrorCollection.js +0 -1
  634. package/lib/models/error/ErrorCollection.js.map +1 -1
  635. package/lib/models/error/ErrorModel.js +0 -1
  636. package/lib/models/error/ErrorModel.js.map +1 -1
  637. package/lib/models/error/ErrorResponse.js +11 -23
  638. package/lib/models/error/ErrorResponse.js.map +1 -1
  639. package/lib/models/filters/AssignmentFilterModel.js +0 -1
  640. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  641. package/lib/models/filters/BaseFilterModel.js +2 -5
  642. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  643. package/lib/models/filters/ConceptIndexFilterModel.js +0 -1
  644. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  645. package/lib/models/filters/FilterCollection.js +2 -5
  646. package/lib/models/filters/FilterCollection.js.map +1 -1
  647. package/lib/models/filters/FilterModel.js +0 -1
  648. package/lib/models/filters/FilterModel.js.map +1 -1
  649. package/lib/models/filters/RangeFilterModel.js +0 -1
  650. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  651. package/lib/models/form/FormModel.js +13 -29
  652. package/lib/models/form/FormModel.js.map +1 -1
  653. package/lib/models/form/FormObjectModel.js +6 -12
  654. package/lib/models/form/FormObjectModel.js.map +1 -1
  655. package/lib/models/grouping/GroupingModel.js +1 -2
  656. package/lib/models/grouping/GroupingModel.js.map +1 -1
  657. package/lib/models/href/Href.js +0 -1
  658. package/lib/models/href/Href.js.map +1 -1
  659. package/lib/models/href/ListHref.js +0 -1
  660. package/lib/models/href/ListHref.js.map +1 -1
  661. package/lib/models/layouthint/LayoutHintCollection.js +0 -1
  662. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  663. package/lib/models/links/LinkCollection.js +0 -1
  664. package/lib/models/links/LinkCollection.js.map +1 -1
  665. package/lib/models/links/LinkModel.js +0 -1
  666. package/lib/models/links/LinkModel.js.map +1 -1
  667. package/lib/models/list/ListDetailModel.js +4 -7
  668. package/lib/models/list/ListDetailModel.js.map +1 -1
  669. package/lib/models/list/ListHeaderModel.js +0 -1
  670. package/lib/models/list/ListHeaderModel.js.map +1 -1
  671. package/lib/models/list/ListItemCollection.js +0 -1
  672. package/lib/models/list/ListItemCollection.js.map +1 -1
  673. package/lib/models/list/ListItemModel.js +0 -1
  674. package/lib/models/list/ListItemModel.js.map +1 -1
  675. package/lib/models/list/ListModel.js +2 -3
  676. package/lib/models/list/ListModel.js.map +1 -1
  677. package/lib/models/lookup/LookupOptionCollection.js +0 -1
  678. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  679. package/lib/models/lookup/LookupOptionsModel.js +0 -1
  680. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  681. package/lib/models/modelcatalog/ModelCatalogModel.js +0 -1
  682. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  683. package/lib/models/paging/PagingModel.js +0 -1
  684. package/lib/models/paging/PagingModel.js.map +1 -1
  685. package/lib/models/panels/GroupingPanelModel.js +0 -1
  686. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  687. package/lib/models/parameter/Parameter.js +0 -1
  688. package/lib/models/parameter/Parameter.js.map +1 -1
  689. package/lib/models/process/ProcessStatusSettingsModel.js +0 -1
  690. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  691. package/lib/models/resolveModel.js +0 -1
  692. package/lib/models/resolveModel.js.map +1 -1
  693. package/lib/models/search/CaseSearchModel.js +0 -1
  694. package/lib/models/search/CaseSearchModel.js.map +1 -1
  695. package/lib/models/sorting/SortOptionModel.js +0 -1
  696. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  697. package/lib/models/sorting/SortingModel.js +1 -2
  698. package/lib/models/sorting/SortingModel.js.map +1 -1
  699. package/lib/models/tab/TabModel.js +1 -3
  700. package/lib/models/tab/TabModel.js.map +1 -1
  701. package/lib/models/taskgroup/TaskGroupCollection.js +0 -1
  702. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  703. package/lib/models/taskgroup/TaskGroupModel.js +0 -1
  704. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  705. package/lib/models/user/UserModel.js +0 -1
  706. package/lib/models/user/UserModel.js.map +1 -1
  707. package/lib/models/user/UserProfileModel.js +0 -1
  708. package/lib/models/user/UserProfileModel.js.map +1 -1
  709. package/lib/models/user/UserServicesModel.js +0 -1
  710. package/lib/models/user/UserServicesModel.js.map +1 -1
  711. package/lib/modularui/Authenticate.js +0 -1
  712. package/lib/modularui/Authenticate.js.map +1 -1
  713. package/lib/modularui/ModularUIRequest.js +4 -10
  714. package/lib/modularui/ModularUIRequest.js.map +1 -1
  715. package/lib/modularui/ModularUIResponse.js +2 -4
  716. package/lib/modularui/ModularUIResponse.js.map +1 -1
  717. package/lib/react/ErrorBoundary.js +0 -1
  718. package/lib/react/ErrorBoundary.js.map +1 -1
  719. package/lib/react/ErrorBoundaryFallback.js +0 -1
  720. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  721. package/lib/react/utils.js +0 -1
  722. package/lib/react/utils.js.map +1 -1
  723. package/lib/react-client/Init.js +0 -1
  724. package/lib/react-client/Init.js.map +1 -1
  725. package/lib/react-client/client.js +0 -1
  726. package/lib/react-client/client.js.map +1 -1
  727. package/lib/react-client/rehydrate.js +1 -2
  728. package/lib/react-client/rehydrate.js.map +1 -1
  729. package/lib/react-server/contextPath.js +0 -1
  730. package/lib/react-server/contextPath.js.map +1 -1
  731. package/lib/react-server/createSSRComplete.js +0 -1
  732. package/lib/react-server/createSSRComplete.js.map +1 -1
  733. package/lib/react-server/htmlpage.js +1 -2
  734. package/lib/react-server/htmlpage.js.map +1 -1
  735. package/lib/react-server/renderSSRComplete.js +0 -1
  736. package/lib/react-server/renderSSRComplete.js.map +1 -1
  737. package/lib/react-server/renderSSRMinimal.js +0 -1
  738. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  739. package/lib/react-server/requestInformation.js +0 -1
  740. package/lib/react-server/requestInformation.js.map +1 -1
  741. package/lib/react-server/serverNoSSR.js +1 -3
  742. package/lib/react-server/serverNoSSR.js.map +1 -1
  743. package/lib/react-server/serverSSR.js +0 -1
  744. package/lib/react-server/serverSSR.js.map +1 -1
  745. package/lib/react-server/serverUtil.js +0 -1
  746. package/lib/react-server/serverUtil.js.map +1 -1
  747. package/lib/react-theme/ThemeProvider.js +0 -1
  748. package/lib/react-theme/ThemeProvider.js.map +1 -1
  749. package/lib/react-theme/createTheme.js +0 -1
  750. package/lib/react-theme/createTheme.js.map +1 -1
  751. package/lib/react-theme/useTheme.js +0 -1
  752. package/lib/react-theme/useTheme.js.map +1 -1
  753. package/lib/react-theme/utils/background.js +0 -1
  754. package/lib/react-theme/utils/background.js.map +1 -1
  755. package/lib/react-theme/utils/colors.js +0 -1
  756. package/lib/react-theme/utils/colors.js.map +1 -1
  757. package/lib/react-theme/utils/contrast.js +1 -3
  758. package/lib/react-theme/utils/contrast.js.map +1 -1
  759. package/lib/react-theme/utils/corners.js +0 -1
  760. package/lib/react-theme/utils/corners.js.map +1 -1
  761. package/lib/react-theme/utils/spacers.js +0 -1
  762. package/lib/react-theme/utils/spacers.js.map +1 -1
  763. package/lib/react-theme/utils/themeProps.js +0 -1
  764. package/lib/react-theme/utils/themeProps.js.map +1 -1
  765. package/lib/redux/_i18n/actions.js +0 -1
  766. package/lib/redux/_i18n/actions.js.map +1 -1
  767. package/lib/redux/_i18n/reducer.js +0 -1
  768. package/lib/redux/_i18n/reducer.js.map +1 -1
  769. package/lib/redux/_modularui/actions.js +7 -8
  770. package/lib/redux/_modularui/actions.js.map +1 -1
  771. package/lib/redux/_modularui/connector.js +2 -4
  772. package/lib/redux/_modularui/connector.js.map +1 -1
  773. package/lib/redux/_modularui/middleware.js +0 -1
  774. package/lib/redux/_modularui/middleware.js.map +1 -1
  775. package/lib/redux/_modularui/modularuiUtils.js +2 -3
  776. package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
  777. package/lib/redux/_modularui/reducer.js +1 -3
  778. package/lib/redux/_modularui/reducer.js.map +1 -1
  779. package/lib/redux/_modularui/selectors.js +7 -14
  780. package/lib/redux/_modularui/selectors.js.map +1 -1
  781. package/lib/redux/_modularui/withModularUI.js +0 -1
  782. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  783. package/lib/redux/_router/actions.js +0 -1
  784. package/lib/redux/_router/actions.js.map +1 -1
  785. package/lib/redux/_router/connectors.js +9 -19
  786. package/lib/redux/_router/connectors.js.map +1 -1
  787. package/lib/redux/_router/middleware.js +0 -1
  788. package/lib/redux/_router/middleware.js.map +1 -1
  789. package/lib/redux/_router/reducer.js +0 -1
  790. package/lib/redux/_router/reducer.js.map +1 -1
  791. package/lib/redux/actions/Application.js +0 -1
  792. package/lib/redux/actions/Application.js.map +1 -1
  793. package/lib/redux/actions/Authorization.js +4 -7
  794. package/lib/redux/actions/Authorization.js.map +1 -1
  795. package/lib/redux/actions/Error.js +0 -1
  796. package/lib/redux/actions/Error.js.map +1 -1
  797. package/lib/redux/actions/Form.js +0 -1
  798. package/lib/redux/actions/Form.js.map +1 -1
  799. package/lib/redux/actions/FormAttributeSet.js +2 -4
  800. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  801. package/lib/redux/actions/FormAttributeSetRepeatable.js +0 -1
  802. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  803. package/lib/redux/actions/FormAutosave.js +0 -1
  804. package/lib/redux/actions/FormAutosave.js.map +1 -1
  805. package/lib/redux/actions/FormAutosubmit.js +0 -1
  806. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  807. package/lib/redux/actions/FormValidations.js +0 -1
  808. package/lib/redux/actions/FormValidations.js.map +1 -1
  809. package/lib/redux/actions/Modals.js +0 -1
  810. package/lib/redux/actions/Modals.js.map +1 -1
  811. package/lib/redux/actions/Notification.js +0 -1
  812. package/lib/redux/actions/Notification.js.map +1 -1
  813. package/lib/redux/actions/Preferences.js +5 -6
  814. package/lib/redux/actions/Preferences.js.map +1 -1
  815. package/lib/redux/actions/ProgressIndicator.js +0 -1
  816. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  817. package/lib/redux/actions/SignIn.js +2 -4
  818. package/lib/redux/actions/SignIn.js.map +1 -1
  819. package/lib/redux/actions/SignOut.js +0 -1
  820. package/lib/redux/actions/SignOut.js.map +1 -1
  821. package/lib/redux/connectors/Application.js +0 -1
  822. package/lib/redux/connectors/Application.js.map +1 -1
  823. package/lib/redux/connectors/Breadcrumb.js +0 -1
  824. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  825. package/lib/redux/connectors/CaseView.js +0 -1
  826. package/lib/redux/connectors/CaseView.js.map +1 -1
  827. package/lib/redux/connectors/ConceptDetail.js +0 -1
  828. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  829. package/lib/redux/connectors/ContentBrowser.js +0 -1
  830. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  831. package/lib/redux/connectors/ContentDetail.js +0 -1
  832. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  833. package/lib/redux/connectors/ContentDetailSection.js +0 -1
  834. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  835. package/lib/redux/connectors/Form.js +3 -7
  836. package/lib/redux/connectors/Form.js.map +1 -1
  837. package/lib/redux/connectors/FormAttributeSet.js +0 -1
  838. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  839. package/lib/redux/connectors/ListDetail.js +0 -1
  840. package/lib/redux/connectors/ListDetail.js.map +1 -1
  841. package/lib/redux/connectors/Modal.js +0 -1
  842. package/lib/redux/connectors/Modal.js.map +1 -1
  843. package/lib/redux/connectors/ModelCatalog.js +0 -1
  844. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  845. package/lib/redux/connectors/Notification.js +0 -1
  846. package/lib/redux/connectors/Notification.js.map +1 -1
  847. package/lib/redux/connectors/PanelRenderer.js +0 -1
  848. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  849. package/lib/redux/connectors/Preferences.js +0 -1
  850. package/lib/redux/connectors/Preferences.js.map +1 -1
  851. package/lib/redux/connectors/Progress.js +0 -1
  852. package/lib/redux/connectors/Progress.js.map +1 -1
  853. package/lib/redux/connectors/ProgressIndicator.js +0 -1
  854. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  855. package/lib/redux/connectors/QuickSearch.js +0 -1
  856. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  857. package/lib/redux/connectors/SignIn.js +1 -2
  858. package/lib/redux/connectors/SignIn.js.map +1 -1
  859. package/lib/redux/connectors/SignOut.js +3 -7
  860. package/lib/redux/connectors/SignOut.js.map +1 -1
  861. package/lib/redux/connectors/Tab.js +0 -1
  862. package/lib/redux/connectors/Tab.js.map +1 -1
  863. package/lib/redux/reducers/AuthReducer.js +0 -1
  864. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  865. package/lib/redux/reducers/ErrorReducer.js +0 -1
  866. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  867. package/lib/redux/reducers/ModalsReducer.js +0 -1
  868. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  869. package/lib/redux/reducers/NotificationReducer.js +0 -1
  870. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  871. package/lib/redux/reducers/PreferencesReducer.js +2 -3
  872. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  873. package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -3
  874. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  875. package/lib/redux/reducers/createReducer.js +0 -1
  876. package/lib/redux/reducers/createReducer.js.map +1 -1
  877. package/lib/redux/selectors/i18n.js +1 -3
  878. package/lib/redux/selectors/i18n.js.map +1 -1
  879. package/lib/redux/store/beforeRenderHooks.js +0 -1
  880. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  881. package/lib/redux/store/configureStore.js +0 -1
  882. package/lib/redux/store/configureStore.js.map +1 -1
  883. package/lib/utils/browser/Cache.js +0 -1
  884. package/lib/utils/browser/Cache.js.map +1 -1
  885. package/lib/utils/browser/Cookies.js +3 -4
  886. package/lib/utils/browser/Cookies.js.map +1 -1
  887. package/lib/utils/datetime/DateTimeUtil.js +0 -1
  888. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  889. package/lib/utils/fetch/serverFetch.js +0 -1
  890. package/lib/utils/fetch/serverFetch.js.map +1 -1
  891. package/lib/utils/fetch/universalFetch.js +0 -1
  892. package/lib/utils/fetch/universalFetch.js.map +1 -1
  893. package/lib/utils/fetch/xhr.js +0 -1
  894. package/lib/utils/fetch/xhr.js.map +1 -1
  895. package/lib/utils/helpers/checkResource.js +0 -1
  896. package/lib/utils/helpers/checkResource.js.map +1 -1
  897. package/lib/utils/helpers/createHash.js +0 -1
  898. package/lib/utils/helpers/createHash.js.map +1 -1
  899. package/lib/utils/helpers/objects.js +0 -1
  900. package/lib/utils/helpers/objects.js.map +1 -1
  901. package/lib/utils/helpers/sanitizeHtml.js +0 -1
  902. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  903. package/lib/utils/helpers/text.js +0 -1
  904. package/lib/utils/helpers/text.js.map +1 -1
  905. package/lib/utils/number/formatValue.js +0 -1
  906. package/lib/utils/number/formatValue.js.map +1 -1
  907. package/lib/utils/number/parseNumbers.js +0 -1
  908. package/lib/utils/number/parseNumbers.js.map +1 -1
  909. package/package.json +18 -13
  910. package/types/constants/Constants.d.ts +151 -0
  911. package/types/constants/LayoutHintConfig.d.ts +241 -0
  912. package/types/constants/LayoutHints.d.ts +78 -0
  913. package/types/constants/Settings.d.ts +16 -0
  914. package/types/constants/index.d.ts +3 -0
  915. package/types/exceptions/ConfigurationException.d.ts +6 -0
  916. package/types/exceptions/FetchException.d.ts +31 -0
  917. package/types/exceptions/IllegalArgumentException.d.ts +6 -0
  918. package/types/exceptions/IllegalReturnException.d.ts +5 -0
  919. package/types/exceptions/IllegalStateException.d.ts +6 -0
  920. package/types/exceptions/JsonParseException.d.ts +6 -0
  921. package/types/exceptions/MissingPropertyException.d.ts +6 -0
  922. package/types/exceptions/NetworkException.d.ts +9 -0
  923. package/types/exceptions/NotAllowedUriException.d.ts +6 -0
  924. package/types/exceptions/NotFoundException.d.ts +10 -0
  925. package/types/exceptions/ServerRequestException.d.ts +6 -0
  926. package/types/exceptions/ThemePropertyException.d.ts +6 -0
  927. package/types/exceptions/TimeoutException.d.ts +7 -0
  928. package/types/exceptions/UnauthorizedException.d.ts +11 -0
  929. package/types/exceptions/UnsupportedOperationException.d.ts +6 -0
  930. package/types/exceptions/index.d.ts +15 -0
  931. package/types/hooks/useI18n.d.ts +9 -0
  932. package/types/i18n/Locale.d.ts +53 -0
  933. package/types/i18n/Locales.d.ts +55 -0
  934. package/types/i18n/Message.d.ts +6 -0
  935. package/types/i18n/index.d.ts +5 -0
  936. package/types/i18n/languages.d.ts +215 -0
  937. package/types/i18n/translations/beinformed_error_messages_en.nl.d.ts +97 -0
  938. package/types/i18n/translations/beinformed_error_messages_nl.nl.d.ts +97 -0
  939. package/types/i18n/types.d.ts +11 -0
  940. package/types/i18n/withMessage.d.ts +3 -0
  941. package/types/index.d.ts +6 -0
  942. package/types/models/actions/ActionCollection.d.ts +29 -0
  943. package/types/models/actions/ActionModel.d.ts +84 -0
  944. package/types/models/application/ApplicationModel.d.ts +41 -0
  945. package/types/models/attributes/AttributeCollection.d.ts +96 -0
  946. package/types/models/attributes/AttributeContent.d.ts +64 -0
  947. package/types/models/attributes/AttributeDataHelper.d.ts +67 -0
  948. package/types/models/attributes/AttributeModel.d.ts +395 -0
  949. package/types/models/attributes/AttributeSetModel.d.ts +28 -0
  950. package/types/models/attributes/BooleanAttributeModel.d.ts +65 -0
  951. package/types/models/attributes/CaptchaAttributeModel.d.ts +10 -0
  952. package/types/models/attributes/ChoiceAttributeModel.d.ts +76 -0
  953. package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +82 -0
  954. package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +133 -0
  955. package/types/models/attributes/CompositeAttributeChildCollection.d.ts +56 -0
  956. package/types/models/attributes/CompositeAttributeModel.d.ts +44 -0
  957. package/types/models/attributes/DatetimeAttributeModel.d.ts +111 -0
  958. package/types/models/attributes/HelptextAttributeModel.d.ts +16 -0
  959. package/types/models/attributes/LabelAttributeModel.d.ts +12 -0
  960. package/types/models/attributes/MemoAttributeModel.d.ts +14 -0
  961. package/types/models/attributes/MoneyAttributeModel.d.ts +14 -0
  962. package/types/models/attributes/NumberAttributeModel.d.ts +49 -0
  963. package/types/models/attributes/PasswordAttributeModel.d.ts +62 -0
  964. package/types/models/attributes/StringAttributeModel.d.ts +62 -0
  965. package/types/models/attributes/UploadAttributeModel.d.ts +54 -0
  966. package/types/models/attributes/XMLAttributeModel.d.ts +10 -0
  967. package/types/models/attributes/_createAttribute.d.ts +6 -0
  968. package/types/models/attributes/input-constraints/BSNConstraint.d.ts +26 -0
  969. package/types/models/attributes/input-constraints/ConstraintCollection.d.ts +24 -0
  970. package/types/models/attributes/input-constraints/ConstraintModel.d.ts +34 -0
  971. package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +109 -0
  972. package/types/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +36 -0
  973. package/types/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +36 -0
  974. package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +92 -0
  975. package/types/models/attributes/input-constraints/FileExtensionConstraint.d.ts +33 -0
  976. package/types/models/attributes/input-constraints/FileSizeConstraint.d.ts +42 -0
  977. package/types/models/attributes/input-constraints/IBANConstraint.d.ts +23 -0
  978. package/types/models/attributes/input-constraints/MandatoryConstraint.d.ts +23 -0
  979. package/types/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +36 -0
  980. package/types/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +61 -0
  981. package/types/models/attributes/input-constraints/NumberFormatConstraint.d.ts +52 -0
  982. package/types/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +46 -0
  983. package/types/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +36 -0
  984. package/types/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +23 -0
  985. package/types/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +32 -0
  986. package/types/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +32 -0
  987. package/types/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +35 -0
  988. package/types/models/attributes/input-constraints/RangeConstraint.d.ts +97 -0
  989. package/types/models/attributes/input-constraints/RegexConstraint.d.ts +37 -0
  990. package/types/models/attributes/input-constraints/StringLengthConstraint.d.ts +46 -0
  991. package/types/models/attributes/input-constraints/XMLConstraint.d.ts +26 -0
  992. package/types/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +46 -0
  993. package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +57 -0
  994. package/types/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +27 -0
  995. package/types/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +17 -0
  996. package/types/models/base/BaseCollection.d.ts +89 -0
  997. package/types/models/base/BaseModel.d.ts +58 -0
  998. package/types/models/base/ResourceCollection.d.ts +19 -0
  999. package/types/models/base/ResourceModel.d.ts +93 -0
  1000. package/types/models/caseview/CaseViewModel.d.ts +45 -0
  1001. package/types/models/concepts/BusinessScenarioModel.d.ts +20 -0
  1002. package/types/models/concepts/ConceptDetailModel.d.ts +69 -0
  1003. package/types/models/concepts/ConceptIndexModel.d.ts +36 -0
  1004. package/types/models/concepts/ConceptLinkModel.d.ts +65 -0
  1005. package/types/models/concepts/ConceptRelationCollection.d.ts +34 -0
  1006. package/types/models/concepts/ConceptRelationModel.d.ts +43 -0
  1007. package/types/models/concepts/ConceptTypeDetailModel.d.ts +39 -0
  1008. package/types/models/concepts/SourceReferenceCollection.d.ts +13 -0
  1009. package/types/models/concepts/SourceReferenceModel.d.ts +30 -0
  1010. package/types/models/content/ContentIndexModel.d.ts +34 -0
  1011. package/types/models/content/ContentLinkModel.d.ts +81 -0
  1012. package/types/models/content/ContentModel.d.ts +74 -0
  1013. package/types/models/content/ContentTOCModel.d.ts +37 -0
  1014. package/types/models/content/ContentTypeModel.d.ts +26 -0
  1015. package/types/models/content/SectionModel.d.ts +75 -0
  1016. package/types/models/content/SubSectionModel.d.ts +64 -0
  1017. package/types/models/contentconfiguration/ContentConfiguration.d.ts +28 -0
  1018. package/types/models/contentconfiguration/ContentConfigurationElements.d.ts +47 -0
  1019. package/types/models/contentconfiguration/ContentConfigurationEndResults.d.ts +16 -0
  1020. package/types/models/contentconfiguration/ContentConfigurationQuestions.d.ts +22 -0
  1021. package/types/models/contentconfiguration/ContentConfigurationResults.d.ts +39 -0
  1022. package/types/models/detail/DetailModel.d.ts +72 -0
  1023. package/types/models/error/ErrorCollection.d.ts +51 -0
  1024. package/types/models/error/ErrorModel.d.ts +36 -0
  1025. package/types/models/error/ErrorResponse.d.ts +148 -0
  1026. package/types/models/filters/AssignmentFilterModel.d.ts +35 -0
  1027. package/types/models/filters/BaseFilterModel.d.ts +85 -0
  1028. package/types/models/filters/ConceptIndexFilterModel.d.ts +6 -0
  1029. package/types/models/filters/FilterCollection.d.ts +48 -0
  1030. package/types/models/filters/FilterModel.d.ts +5 -0
  1031. package/types/models/filters/RangeFilterModel.d.ts +6 -0
  1032. package/types/models/form/FormModel.d.ts +309 -0
  1033. package/types/models/form/FormObjectModel.d.ts +168 -0
  1034. package/types/models/grouping/GroupingModel.d.ts +85 -0
  1035. package/types/models/href/Href.d.ts +17 -0
  1036. package/types/models/href/ListHref.d.ts +64 -0
  1037. package/types/models/index.d.ts +94 -0
  1038. package/types/models/layouthint/LayoutHintCollection.d.ts +43 -0
  1039. package/types/models/links/LinkCollection.d.ts +62 -0
  1040. package/types/models/links/LinkModel.d.ts +92 -0
  1041. package/types/models/links/normalizeLinkJSON.d.ts +9 -0
  1042. package/types/models/list/ListDetailModel.d.ts +69 -0
  1043. package/types/models/list/ListHeaderModel.d.ts +64 -0
  1044. package/types/models/list/ListItemCollection.d.ts +21 -0
  1045. package/types/models/list/ListItemModel.d.ts +34 -0
  1046. package/types/models/list/ListModel.d.ts +135 -0
  1047. package/types/models/lookup/LookupOptionCollection.d.ts +11 -0
  1048. package/types/models/lookup/LookupOptionsModel.d.ts +19 -0
  1049. package/types/models/modelcatalog/ModelCatalogModel.d.ts +18 -0
  1050. package/types/models/paging/PagesizeModel.d.ts +25 -0
  1051. package/types/models/paging/PagingModel.d.ts +49 -0
  1052. package/types/models/panels/GroupingPanelModel.d.ts +39 -0
  1053. package/types/models/parameter/Parameter.d.ts +40 -0
  1054. package/types/models/process/ProcessStatusSettingsModel.d.ts +38 -0
  1055. package/types/models/resolveModel.d.ts +7 -0
  1056. package/types/models/search/CaseSearchModel.d.ts +14 -0
  1057. package/types/models/sorting/SortOptionModel.d.ts +48 -0
  1058. package/types/models/sorting/SortingModel.d.ts +42 -0
  1059. package/types/models/tab/TabModel.d.ts +44 -0
  1060. package/types/models/taskgroup/TaskGroupCollection.d.ts +12 -0
  1061. package/types/models/taskgroup/TaskGroupModel.d.ts +15 -0
  1062. package/types/models/types.d.ts +147 -0
  1063. package/types/models/user/UserModel.d.ts +14 -0
  1064. package/types/models/user/UserProfileModel.d.ts +12 -0
  1065. package/types/models/user/UserServicesModel.d.ts +28 -0
  1066. package/types/modularui/Authenticate.d.ts +42 -0
  1067. package/types/modularui/ModularUIError.d.ts +10 -0
  1068. package/types/modularui/ModularUIRequest.d.ts +170 -0
  1069. package/types/modularui/ModularUIResponse.d.ts +56 -0
  1070. package/types/modularui/index.d.ts +3 -0
  1071. package/types/redux/_i18n/types.d.ts +13 -0
  1072. package/types/redux/_modularui/types.d.ts +49 -0
  1073. package/types/redux/_router/types.d.ts +35 -0
  1074. package/types/redux/selectors/i18n.d.ts +4 -0
  1075. package/types/redux/types.d.ts +105 -0
  1076. package/types/utils/browser/Cache.d.ts +45 -0
  1077. package/types/utils/browser/Cookies.d.ts +15 -0
  1078. package/types/utils/datetime/DateTimeUtil.d.ts +164 -0
  1079. package/types/utils/fetch/serverFetch.d.ts +5 -0
  1080. package/types/utils/fetch/types.d.ts +38 -0
  1081. package/types/utils/fetch/universalFetch.d.ts +7 -0
  1082. package/types/utils/fetch/xhr.d.ts +5 -0
  1083. package/types/utils/helpers/checkResource.d.ts +3 -0
  1084. package/types/utils/helpers/createHash.d.ts +8 -0
  1085. package/types/utils/helpers/createUUID.d.ts +4 -0
  1086. package/types/utils/helpers/objects.d.ts +3 -0
  1087. package/types/utils/helpers/sanitizeHtml.d.ts +9 -0
  1088. package/types/utils/helpers/text.d.ts +7 -0
  1089. package/types/utils/index.d.ts +16 -0
  1090. package/types/utils/number/DecimalFormat.d.ts +90 -0
  1091. package/types/utils/number/formatValue.d.ts +4 -0
  1092. package/types/utils/number/parseNumbers.d.ts +9 -0
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutHints.js","names":["getHint","hint","LayoutHintConfiguration","MANDATORY","DISABLED","DEPENDENT_ATTRIBUTE_CONTROL","DEPENDENT_ATTRIBUTE","CONFIRM_PASSWORD","SORT_OPTIONS","TITLE","IGNORE_FORMAT_SETTING","DELETE_ACTION","UPDATE_ACTION","CREATE_ACTION","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","SHOW_ONE_RESULT_AS_DETAIL","HIDE_WHEN_EMPTY","INITIAL_FILTER","CASEVIEW_LINK","RENDER_SECTION_LABEL","getLayoutHintConfiguration"],"sources":["../../src/constants/LayoutHints.js"],"sourcesContent":["// @flow\nimport { LayoutHintConfiguration } from \"./LayoutHintConfig\";\n\n/**\n * Retrieve layout hint by id from the layout hint configuration\n */\nconst getHint = (hint: string): string => {\n if (LayoutHintConfiguration[hint]) {\n return LayoutHintConfiguration[hint].hint;\n }\n\n return \"\";\n};\n\n/**\n * Layout-hint: Indicates a mandatory attribute. Should be used together with the dependency hint.\n */\nexport const MANDATORY: string = getHint(\"MANDATORY\");\n\n/**\n * Layout-hint: Indicates a disabled attribute.\n * @constant\n */\nexport const DISABLED: string = getHint(\"DISABLED\");\n\n/*\n * --------------------------------\n * SELECT DEPENDENT ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute.\n */\nexport const DEPENDENT_ATTRIBUTE_CONTROL = \"dependent-control\";\n/**\n */\nexport const DEPENDENT_ATTRIBUTE = \"dependent-attribute:\";\n\n/*\n * --------------------------------\n * ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Password attribute must be confirmed using a second password attribute.\n */\nexport const CONFIRM_PASSWORD: string = getHint(\"CONFIRM_PASSWORD\");\n/**\n * Layout-hint: Sort options alphabetically\n */\nexport const SORT_OPTIONS: string = getHint(\"SORT_OPTIONS\");\n/**\n * Layout-hint: Marks an attribute as a title attribute\n */\nexport const TITLE: string = getHint(\"TITLE\");\n/**\n * Layout-hint: Ignore the global input format for specific attribute\n */\nexport const IGNORE_FORMAT_SETTING: string = getHint(\"IGNORE_FORMAT_SETTING\");\n\n/*\n * --------------------------------\n * FORM\n * --------------------------------\n */\n/**\n * Layout-hint: Mark task as delete task\n */\nexport const DELETE_ACTION: string = getHint(\"DELETE_ACTION\");\n/**\n * Layout-hint: Mark task as update task\n */\nexport const UPDATE_ACTION: string = getHint(\"UPDATE_ACTION\");\n/**\n * Layout-hint: Mark task as create task\n */\nexport const CREATE_ACTION: string = getHint(\"CREATE_ACTION\");\n\n/*\n * --------------------------------\n * UPLOAD TOTAL FILE SIZE\n * --------------------------------\n */\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used.\n */\nexport const INITIAL_TOTAL_FILESIZE: string = getHint(\"INITIAL_TOTAL_FILESIZE\");\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size.\n */\nexport const MAX_TOTAL_FILESIZE: string = getHint(\"MAX_TOTAL_FILESIZE\");\n\n/*\n * --------------------------------\n * LISTS\n * --------------------------------\n */\n/**\n * Layout-hint: A list with only one detail must be shown as a detail\n */\nexport const SHOW_ONE_RESULT_AS_DETAIL: string = getHint(\n \"SHOW_ONE_RESULT_AS_DETAIL\"\n);\n/**\n * Layout-hint: A list without list-items and list-tasks should not be shown.\n */\nexport const HIDE_WHEN_EMPTY: string = getHint(\"HIDE_WHEN_EMPTY\");\n/**\n * Layout-hint: Sets a default value on a filter\n */\nexport const INITIAL_FILTER: string = \"initial-filter:\";\n/**\n * Layout-hint: Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item\n */\nexport const CASEVIEW_LINK: string = getHint(\"CASEVIEW_LINK\");\n\n/**\n * Layout-hint: Set on configuration of instruments to show content in a popover on a label\n */\nexport const RENDER_SECTION_LABEL = \"render-section-label\";\n\n/**\n */\nexport const getLayoutHintConfiguration = (): Object => LayoutHintConfiguration;\n\nexport default getHint;\n"],"mappings":";;;;;;AACA;;AAEA;AACA;AACA;AACA,MAAMA,OAAO,GAAIC,IAAY,IAAa;EACxC,IAAIC,yCAAuB,CAACD,IAAI,CAAC,EAAE;IACjC,OAAOC,yCAAuB,CAACD,IAAI,CAAC,CAACA,IAAI;EAC3C;EAEA,OAAO,EAAE;AACX,CAAC;;AAED;AACA;AACA;AACO,MAAME,SAAiB,GAAGH,OAAO,CAAC,WAAW,CAAC;;AAErD;AACA;AACA;AACA;AAHA;AAIO,MAAMI,QAAgB,GAAGJ,OAAO,CAAC,UAAU,CAAC;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAGO,MAAMK,2BAA2B,GAAG,mBAAmB;AAC9D;AACA;AADA;AAEO,MAAMC,mBAAmB,GAAG,sBAAsB;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAGO,MAAMC,gBAAwB,GAAGP,OAAO,CAAC,kBAAkB,CAAC;AACnE;AACA;AACA;AAFA;AAGO,MAAMQ,YAAoB,GAAGR,OAAO,CAAC,cAAc,CAAC;AAC3D;AACA;AACA;AAFA;AAGO,MAAMS,KAAa,GAAGT,OAAO,CAAC,OAAO,CAAC;AAC7C;AACA;AACA;AAFA;AAGO,MAAMU,qBAA6B,GAAGV,OAAO,CAAC,uBAAuB,CAAC;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAGO,MAAMW,aAAqB,GAAGX,OAAO,CAAC,eAAe,CAAC;AAC7D;AACA;AACA;AAFA;AAGO,MAAMY,aAAqB,GAAGZ,OAAO,CAAC,eAAe,CAAC;AAC7D;AACA;AACA;AAFA;AAGO,MAAMa,aAAqB,GAAGb,OAAO,CAAC,eAAe,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAGO,MAAMc,sBAA8B,GAAGd,OAAO,CAAC,wBAAwB,CAAC;AAC/E;AACA;AACA;AAFA;AAGO,MAAMe,kBAA0B,GAAGf,OAAO,CAAC,oBAAoB,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAGO,MAAMgB,yBAAiC,GAAGhB,OAAO,CACtD,2BAA2B,CAC5B;AACD;AACA;AACA;AAFA;AAGO,MAAMiB,eAAuB,GAAGjB,OAAO,CAAC,iBAAiB,CAAC;AACjE;AACA;AACA;AAFA;AAGO,MAAMkB,cAAsB,GAAG,iBAAiB;AACvD;AACA;AACA;AAFA;AAGO,MAAMC,aAAqB,GAAGnB,OAAO,CAAC,eAAe,CAAC;;AAE7D;AACA;AACA;AAFA;AAGO,MAAMoB,oBAAoB,GAAG,sBAAsB;;AAE1D;AACA;AADA;AAEO,MAAMC,0BAA0B,GAAG,MAAcnB,yCAAuB;AAAC;AAAA,eAEjEF,OAAO;AAAA"}
1
+ {"version":3,"file":"LayoutHints.js","names":["getHint","hint","LayoutHintConfiguration","MANDATORY","DISABLED","DEPENDENT_ATTRIBUTE_CONTROL","DEPENDENT_ATTRIBUTE","CONFIRM_PASSWORD","SORT_OPTIONS","TITLE","IGNORE_FORMAT_SETTING","DELETE_ACTION","UPDATE_ACTION","CREATE_ACTION","INITIAL_TOTAL_FILESIZE","MAX_TOTAL_FILESIZE","SHOW_ONE_RESULT_AS_DETAIL","HIDE_WHEN_EMPTY","INITIAL_FILTER","CASEVIEW_LINK","RENDER_SECTION_LABEL","getLayoutHintConfiguration"],"sources":["../../src/constants/LayoutHints.js"],"sourcesContent":["// @flow\nimport { LayoutHintConfiguration } from \"./LayoutHintConfig\";\n\n/**\n * Retrieve layout hint by id from the layout hint configuration\n */\nconst getHint = (hint: string): string => {\n if (LayoutHintConfiguration[hint]) {\n return LayoutHintConfiguration[hint].hint;\n }\n\n return \"\";\n};\n\n/**\n * Layout-hint: Indicates a mandatory attribute. Should be used together with the dependency hint.\n */\nexport const MANDATORY: string = getHint(\"MANDATORY\");\n\n/**\n * Layout-hint: Indicates a disabled attribute.\n * @constant\n */\nexport const DISABLED: string = getHint(\"DISABLED\");\n\n/*\n * --------------------------------\n * SELECT DEPENDENT ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Marks the choice attribute where other attributes depend on. The unique control id is a unique id that can be used in the hint for the show|hide action on the dependent attribute.\n */\nexport const DEPENDENT_ATTRIBUTE_CONTROL = \"dependent-control\";\n/**\n */\nexport const DEPENDENT_ATTRIBUTE = \"dependent-attribute:\";\n\n/*\n * --------------------------------\n * ATTRIBUTES\n * --------------------------------\n */\n/**\n * Layout-hint: Password attribute must be confirmed using a second password attribute.\n */\nexport const CONFIRM_PASSWORD: string = getHint(\"CONFIRM_PASSWORD\");\n/**\n * Layout-hint: Sort options alphabetically\n */\nexport const SORT_OPTIONS: string = getHint(\"SORT_OPTIONS\");\n/**\n * Layout-hint: Marks an attribute as a title attribute\n */\nexport const TITLE: string = getHint(\"TITLE\");\n/**\n * Layout-hint: Ignore the global input format for specific attribute\n */\nexport const IGNORE_FORMAT_SETTING: string = getHint(\"IGNORE_FORMAT_SETTING\");\n\n/*\n * --------------------------------\n * FORM\n * --------------------------------\n */\n/**\n * Layout-hint: Mark task as delete task\n */\nexport const DELETE_ACTION: string = getHint(\"DELETE_ACTION\");\n/**\n * Layout-hint: Mark task as update task\n */\nexport const UPDATE_ACTION: string = getHint(\"UPDATE_ACTION\");\n/**\n * Layout-hint: Mark task as create task\n */\nexport const CREATE_ACTION: string = getHint(\"CREATE_ACTION\");\n\n/*\n * --------------------------------\n * UPLOAD TOTAL FILE SIZE\n * --------------------------------\n */\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the file size currently used.\n */\nexport const INITIAL_TOTAL_FILESIZE: string = getHint(\"INITIAL_TOTAL_FILESIZE\");\n/**\n * Layout-hint: Used in conjunction with an upload attribute, this hint is set on a read only attribute containing the maximum allowed total file size.\n */\nexport const MAX_TOTAL_FILESIZE: string = getHint(\"MAX_TOTAL_FILESIZE\");\n\n/*\n * --------------------------------\n * LISTS\n * --------------------------------\n */\n/**\n * Layout-hint: A list with only one detail must be shown as a detail\n */\nexport const SHOW_ONE_RESULT_AS_DETAIL: string = getHint(\n \"SHOW_ONE_RESULT_AS_DETAIL\"\n);\n/**\n * Layout-hint: A list without list-items and list-tasks should not be shown.\n */\nexport const HIDE_WHEN_EMPTY: string = getHint(\"HIDE_WHEN_EMPTY\");\n/**\n * Layout-hint: Sets a default value on a filter\n */\nexport const INITIAL_FILTER: string = \"initial-filter:\";\n/**\n * Layout-hint: Mark a case id reference attribute as the reference to the case view. Replaces the self link of a list item\n */\nexport const CASEVIEW_LINK: string = getHint(\"CASEVIEW_LINK\");\n\n/**\n * Layout-hint: Set on configuration of instruments to show content in a popover on a label\n */\nexport const RENDER_SECTION_LABEL = \"render-section-label\";\n\n/**\n */\nexport const getLayoutHintConfiguration = (): Object => LayoutHintConfiguration;\n\nexport default getHint;\n"],"mappings":";;;;;;AACA;AAEA;AACA;AACA;AACA,MAAMA,OAAO,GAAIC,IAAY,IAAa;EACxC,IAAIC,yCAAuB,CAACD,IAAI,CAAC,EAAE;IACjC,OAAOC,yCAAuB,CAACD,IAAI,CAAC,CAACA,IAAI;EAC3C;EAEA,OAAO,EAAE;AACX,CAAC;;AAED;AACA;AACA;AACO,MAAME,SAAiB,GAAGH,OAAO,CAAC,WAAW,CAAC;;AAErD;AACA;AACA;AACA;AAHA;AAIO,MAAMI,QAAgB,GAAGJ,OAAO,CAAC,UAAU,CAAC;;AAEnD;AACA;AACA;AAC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,oBAAoB,GAAG,sBAAsB;;AAE1D;AACA;AADA;AAEO,MAAMC,0BAA0B,GAAG,MAAcnB,yCAAuB;AAAC;AAAA,eAEjEF,OAAO;AAAA"}
@@ -8,7 +8,6 @@ exports.setSettings = exports.setSetting = exports.logoutPath = exports.loginUse
8
8
  var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
9
9
  var _objects = require("../utils/helpers/objects");
10
10
  var _Constants = require("./Constants");
11
-
12
11
  const defaultSettings = {
13
12
  // Debug missing i18n messages in layout
14
13
  DEBUG_I18N_MESSAGE_NOT_FOUND: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.js","names":["defaultSettings","DEBUG_I18N_MESSAGE_NOT_FOUND","HIDE_NOTIFICATION_TIMEOUT","ALWAYS_COMMIT_FORM","RENDER_QUESTION_LABELS","RENDER_MANDATORY_ATTRIBUTE_INDICATION","RENDER_OPTIONAL_ATTRIBUTE_INDICATION","AVAILABLE_LIST_VIEWS","USE_CLIENTSIDE_VALIDATION","USE_INSTANT_SERVER_VALIDATION","ENABLED_LOCALES","RENDER_GLOBAL_LOGIN_PAGE","RENDER_GLOBAL_LOGOUT_PAGE","RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE","LOGIN_PATH","ADMINISTRATOR_LOGIN_PATH","LOGOUT_PATH","RENDER_FORMS_IN_MODAL","SHOW_SUBMIT_WAIT_TIMEOUT","SWIM_LANE_DIAGRAM_CONFIGURATION","BUSINESS_SCENARIO_CONCEPT_TYPE","BUSINESS_SCENARIO_STEP_CONCEPT_TYPE","BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE","DATE_INPUT_FORMAT","DATE_READONLY_FORMAT","CALENDAR_WEEK_STARTS_ON","CALENDAR_FIRST_WEEK_CONTAINS_DATE","UI_PARAMETERS","ALLOW_HIDE_WHEN_EMPTY_ON_TABS","PAGE_RELOAD_ON_UNAUTHORIZED_ERROR","XHR_TIMEOUT_MS","HIDE_WHEN_EMPTY_IGNORE_TASKS","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","undefined","Error","setSetting","value","allSettings","hasAllContentInData","ALL_CONTENT_IN_DATA_SETTING","loginType","LOGIN_TYPE","loginPath","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING"],"sources":["../../src/constants/Settings.js"],"sourcesContent":["// @flow\nimport { isPlainObject, has } from \"../utils/helpers/objects\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGIN_PASSWORD_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"./Constants\";\n\ntype Setting = boolean | string | number | Array<string>;\n\nconst defaultSettings = {\n // Debug missing i18n messages in layout\n DEBUG_I18N_MESSAGE_NOT_FOUND: true,\n\n // Time to show the notification bar\n HIDE_NOTIFICATION_TIMEOUT: 5000,\n\n // Always commit form, does not show result pages for instruments\n ALWAYS_COMMIT_FORM: false,\n\n // Render instrument and event question labels on forms (might result in duplicate labels)\n RENDER_QUESTION_LABELS: true,\n\n // Render mandatory indications on attributes\n RENDER_MANDATORY_ATTRIBUTE_INDICATION: true,\n\n // Render optional indications on attributes\n RENDER_OPTIONAL_ATTRIBUTE_INDICATION: false,\n\n // Renders a toggle with supported list views, options are ListView and TableView\n AVAILABLE_LIST_VIEWS: [\"ListView\", \"TableView\"],\n\n // Toggle client side validation\n USE_CLIENTSIDE_VALIDATION: true,\n\n // Indicates if server validation should be used when a form field is changed\n USE_INSTANT_SERVER_VALIDATION: true,\n\n // Indicates which locales are enabled\n ENABLED_LOCALES: [\"en\", \"nl\"],\n\n // Renders the global log in page\n RENDER_GLOBAL_LOGIN_PAGE: false,\n\n // Renders the global log out page\n RENDER_GLOBAL_LOGOUT_PAGE: false,\n\n // Renders the login variants as option on the global logout page\n RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE: false,\n\n // Path to login page / component\n LOGIN_PATH: \"/signin\",\n\n // Path to administrator login page / component\n ADMINISTRATOR_LOGIN_PATH: \"\",\n\n // Path to logout page / component\n LOGOUT_PATH: \"/signout\",\n\n // Render forms in a modal\n RENDER_FORMS_IN_MODAL: true,\n\n // Wait timeout before rendering submit wait icon\n SHOW_SUBMIT_WAIT_TIMEOUT: 300,\n\n // Swim lane diagram configuration file\n SWIM_LANE_DIAGRAM_CONFIGURATION: \"/Library/Diagrams/Overviews.json\",\n\n // Business scenario concept types\n BUSINESS_SCENARIO_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/BusinessScenario\",\n ],\n BUSINESS_SCENARIO_STEP_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/ScenarioStep\",\n ],\n BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/Persona\",\n ],\n\n // Input format for dates. Without this setting having a value, the contributions format is used\n DATE_INPUT_FORMAT: \"\",\n\n // Readonly format for dates. Without this setting having a value, the contributions format is used\n DATE_READONLY_FORMAT: \"\",\n\n // indicates on what day the week starts (0 = Sunday)\n CALENDAR_WEEK_STARTS_ON: 1,\n\n // indicates which date indicates the first week of the year\n CALENDAR_FIRST_WEEK_CONTAINS_DATE: 1,\n\n // parameters that are added for the ui state, but should not be send to the modular ui\n UI_PARAMETERS: [],\n\n // disable hide-when-empty hint for layouts running on Be Informed versions older than 21.1\n ALLOW_HIDE_WHEN_EMPTY_ON_TABS: true,\n\n // reload the complete page on signout, usefull when third party authentication is in place\n PAGE_RELOAD_ON_UNAUTHORIZED_ERROR: false,\n\n XHR_TIMEOUT_MS: 300000,\n\n HIDE_WHEN_EMPTY_IGNORE_TASKS: false,\n};\n\nlet settings = defaultSettings;\n\n/**\n */\nexport const setSettings = (config: Object) => {\n if (isPlainObject(config)) {\n settings = Object.assign(defaultSettings, config);\n }\n};\n\n/**\n */\nexport const getSetting = (key: string, defaultValue?: any): any => {\n if (!has(settings, key) && defaultValue === undefined) {\n throw new Error(\n `Setting with name ${key} not found and no defaultValue given`\n );\n }\n\n return settings[key] ?? defaultValue;\n};\n\n/**\n */\nexport const setSetting = (key: string, value: any) => {\n settings[key] = value;\n};\n\n/**\n */\nexport const allSettings = (): { [name: string]: Setting } => settings;\n\n/**\n */\nexport const hasAllContentInData = (): boolean =>\n getSetting(ALL_CONTENT_IN_DATA_SETTING, true);\n\n/**\n * Login type, only available when pac4j is configured\n */\nexport const loginType = (): string => getSetting(LOGIN_TYPE, \"JAAS\");\n\n/**\n */\nexport const loginPath = (): string =>\n getSetting(LOGIN_PATH_SETTING, \"/j_security_check\");\n/**\n */\nexport const loginUsernameField = (): string =>\n getSetting(LOGIN_USERNAME_SETTING, \"j_username\");\n/**\n */\nexport const loginPasswordField = (): string =>\n getSetting(LOGIN_PASSWORD_SETTING, \"j_password\");\n/**\n */\nexport const logoutPath = (): string =>\n getSetting(LOGOUT_PATH_SETTING, \"/Logoff\");\n\nexport const LOGIN_PATH: string = loginPath();\nexport const LOGOUT_PATH: string = logoutPath();\n"],"mappings":";;;;;;;;AACA;AACA;;AAWA,MAAMA,eAAe,GAAG;EACtB;EACAC,4BAA4B,EAAE,IAAI;EAElC;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,kBAAkB,EAAE,KAAK;EAEzB;EACAC,sBAAsB,EAAE,IAAI;EAE5B;EACAC,qCAAqC,EAAE,IAAI;EAE3C;EACAC,oCAAoC,EAAE,KAAK;EAE3C;EACAC,oBAAoB,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;EAE/C;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,6BAA6B,EAAE,IAAI;EAEnC;EACAC,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EAE7B;EACAC,wBAAwB,EAAE,KAAK;EAE/B;EACAC,yBAAyB,EAAE,KAAK;EAEhC;EACAC,wCAAwC,EAAE,KAA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AAC,GAAGM,KAAK;AACvB,CAAC;;AAED;AACA;AADA;AAEO,MAAMC,WAAW,GAAG,MAAmCZ,QAAQ;;AAEtE;AACA;AADA;AAEO,MAAMa,mBAAmB,GAAG,MACjCT,UAAU,CAACU,sCAA2B,EAAE,IAAI,CAAC;;AAE/C;AACA;AACA;AAFA;AAGO,MAAMC,SAAS,GAAG,MAAcX,UAAU,CAACY,qBAAU,EAAE,MAAM,CAAC;;AAErE;AACA;AADA;AAEO,MAAMC,SAAS,GAAG,MACvBb,UAAU,CAACc,6BAAkB,EAAE,mBAAmB,CAAC;AACrD;AACA;AADA;AAEO,MAAMC,kBAAkB,GAAG,MAChCf,UAAU,CAACgB,iCAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AADA;AAEO,MAAMC,kBAAkB,GAAG,MAChCjB,UAAU,CAACkB,iCAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AADA;AAEO,MAAMC,UAAU,GAAG,MACxBnB,UAAU,CAACoB,8BAAmB,EAAE,SAAS,CAAC;AAAC;AAEtC,MAAM1C,UAAkB,GAAGmC,SAAS,EAAE;AAAC;AACvC,MAAMjC,WAAmB,GAAGuC,UAAU,EAAE;AAAC"}
1
+ {"version":3,"file":"Settings.js","names":["defaultSettings","DEBUG_I18N_MESSAGE_NOT_FOUND","HIDE_NOTIFICATION_TIMEOUT","ALWAYS_COMMIT_FORM","RENDER_QUESTION_LABELS","RENDER_MANDATORY_ATTRIBUTE_INDICATION","RENDER_OPTIONAL_ATTRIBUTE_INDICATION","AVAILABLE_LIST_VIEWS","USE_CLIENTSIDE_VALIDATION","USE_INSTANT_SERVER_VALIDATION","ENABLED_LOCALES","RENDER_GLOBAL_LOGIN_PAGE","RENDER_GLOBAL_LOGOUT_PAGE","RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE","LOGIN_PATH","ADMINISTRATOR_LOGIN_PATH","LOGOUT_PATH","RENDER_FORMS_IN_MODAL","SHOW_SUBMIT_WAIT_TIMEOUT","SWIM_LANE_DIAGRAM_CONFIGURATION","BUSINESS_SCENARIO_CONCEPT_TYPE","BUSINESS_SCENARIO_STEP_CONCEPT_TYPE","BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE","DATE_INPUT_FORMAT","DATE_READONLY_FORMAT","CALENDAR_WEEK_STARTS_ON","CALENDAR_FIRST_WEEK_CONTAINS_DATE","UI_PARAMETERS","ALLOW_HIDE_WHEN_EMPTY_ON_TABS","PAGE_RELOAD_ON_UNAUTHORIZED_ERROR","XHR_TIMEOUT_MS","HIDE_WHEN_EMPTY_IGNORE_TASKS","settings","setSettings","config","isPlainObject","getSetting","key","defaultValue","has","undefined","Error","setSetting","value","allSettings","hasAllContentInData","ALL_CONTENT_IN_DATA_SETTING","loginType","LOGIN_TYPE","loginPath","LOGIN_PATH_SETTING","loginUsernameField","LOGIN_USERNAME_SETTING","loginPasswordField","LOGIN_PASSWORD_SETTING","logoutPath","LOGOUT_PATH_SETTING"],"sources":["../../src/constants/Settings.js"],"sourcesContent":["// @flow\nimport { isPlainObject, has } from \"../utils/helpers/objects\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGIN_PASSWORD_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"./Constants\";\n\ntype Setting = boolean | string | number | Array<string>;\n\nconst defaultSettings = {\n // Debug missing i18n messages in layout\n DEBUG_I18N_MESSAGE_NOT_FOUND: true,\n\n // Time to show the notification bar\n HIDE_NOTIFICATION_TIMEOUT: 5000,\n\n // Always commit form, does not show result pages for instruments\n ALWAYS_COMMIT_FORM: false,\n\n // Render instrument and event question labels on forms (might result in duplicate labels)\n RENDER_QUESTION_LABELS: true,\n\n // Render mandatory indications on attributes\n RENDER_MANDATORY_ATTRIBUTE_INDICATION: true,\n\n // Render optional indications on attributes\n RENDER_OPTIONAL_ATTRIBUTE_INDICATION: false,\n\n // Renders a toggle with supported list views, options are ListView and TableView\n AVAILABLE_LIST_VIEWS: [\"ListView\", \"TableView\"],\n\n // Toggle client side validation\n USE_CLIENTSIDE_VALIDATION: true,\n\n // Indicates if server validation should be used when a form field is changed\n USE_INSTANT_SERVER_VALIDATION: true,\n\n // Indicates which locales are enabled\n ENABLED_LOCALES: [\"en\", \"nl\"],\n\n // Renders the global log in page\n RENDER_GLOBAL_LOGIN_PAGE: false,\n\n // Renders the global log out page\n RENDER_GLOBAL_LOGOUT_PAGE: false,\n\n // Renders the login variants as option on the global logout page\n RENDER_MULTI_LOGIN_ON_GLOBAL_LOGOUT_PAGE: false,\n\n // Path to login page / component\n LOGIN_PATH: \"/signin\",\n\n // Path to administrator login page / component\n ADMINISTRATOR_LOGIN_PATH: \"\",\n\n // Path to logout page / component\n LOGOUT_PATH: \"/signout\",\n\n // Render forms in a modal\n RENDER_FORMS_IN_MODAL: true,\n\n // Wait timeout before rendering submit wait icon\n SHOW_SUBMIT_WAIT_TIMEOUT: 300,\n\n // Swim lane diagram configuration file\n SWIM_LANE_DIAGRAM_CONFIGURATION: \"/Library/Diagrams/Overviews.json\",\n\n // Business scenario concept types\n BUSINESS_SCENARIO_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/BusinessScenario\",\n ],\n BUSINESS_SCENARIO_STEP_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/ScenarioStep\",\n ],\n BUSINESS_SCENARIO_PERSONA_CONCEPT_TYPE: [\n \"/Library/KMTs/Business scenarios.bixml/Persona\",\n ],\n\n // Input format for dates. Without this setting having a value, the contributions format is used\n DATE_INPUT_FORMAT: \"\",\n\n // Readonly format for dates. Without this setting having a value, the contributions format is used\n DATE_READONLY_FORMAT: \"\",\n\n // indicates on what day the week starts (0 = Sunday)\n CALENDAR_WEEK_STARTS_ON: 1,\n\n // indicates which date indicates the first week of the year\n CALENDAR_FIRST_WEEK_CONTAINS_DATE: 1,\n\n // parameters that are added for the ui state, but should not be send to the modular ui\n UI_PARAMETERS: [],\n\n // disable hide-when-empty hint for layouts running on Be Informed versions older than 21.1\n ALLOW_HIDE_WHEN_EMPTY_ON_TABS: true,\n\n // reload the complete page on signout, usefull when third party authentication is in place\n PAGE_RELOAD_ON_UNAUTHORIZED_ERROR: false,\n\n XHR_TIMEOUT_MS: 300000,\n\n HIDE_WHEN_EMPTY_IGNORE_TASKS: false,\n};\n\nlet settings = defaultSettings;\n\n/**\n */\nexport const setSettings = (config: Object) => {\n if (isPlainObject(config)) {\n settings = Object.assign(defaultSettings, config);\n }\n};\n\n/**\n */\nexport const getSetting = (key: string, defaultValue?: any): any => {\n if (!has(settings, key) && defaultValue === undefined) {\n throw new Error(\n `Setting with name ${key} not found and no defaultValue given`\n );\n }\n\n return settings[key] ?? defaultValue;\n};\n\n/**\n */\nexport const setSetting = (key: string, value: any) => {\n settings[key] = value;\n};\n\n/**\n */\nexport const allSettings = (): { [name: string]: Setting } => settings;\n\n/**\n */\nexport const hasAllContentInData = (): boolean =>\n getSetting(ALL_CONTENT_IN_DATA_SETTING, true);\n\n/**\n * Login type, only available when pac4j is configured\n */\nexport const loginType = (): string => getSetting(LOGIN_TYPE, \"JAAS\");\n\n/**\n */\nexport const loginPath = (): string =>\n getSetting(LOGIN_PATH_SETTING, \"/j_security_check\");\n/**\n */\nexport const loginUsernameField = (): string =>\n getSetting(LOGIN_USERNAME_SETTING, \"j_username\");\n/**\n */\nexport const loginPasswordField = (): string =>\n getSetting(LOGIN_PASSWORD_SETTING, \"j_password\");\n/**\n */\nexport const logoutPath = (): string =>\n getSetting(LOGOUT_PATH_SETTING, \"/Logoff\");\n\nexport const LOGIN_PATH: string = loginPath();\nexport const LOGOUT_PATH: string = logoutPath();\n"],"mappings":";;;;;;;;AACA;AACA;AAWA,MAAMA,eAAe,GAAG;EACtB;EACAC,4BAA4B,EAAE,IAAI;EAElC;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,kBAAkB,EAAE,KAAK;EAEzB;EACAC,sBAAsB,EAAE,IAAI;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AEC,YAAkB,KAAU;EAClE,IAAI,CAAC,IAAAC,YAAG,EAACP,QAAQ,EAAEK,GAAG,CAAC,IAAIC,YAAY,KAAKE,SAAS,EAAE;IACrD,MAAM,IAAIC,KAAK,CACZ,qBAAoBJ,GAAI,sCAAqC,CAC/D;EACH;EAEA,OAAOL,QAAQ,CAACK,GAAG,CAAC,IAAIC,YAAY;AACtC,CAAC;;AAED;AACA;AADA;AAEO,MAAMI,UAAU,GAAG,CAACL,GAAW,EAAEM,KAAU,KAAK;EACrDX,QAAQ,CAACK,GAAG,CAAC,GAAGM,KAAK;AACvB,CAAC;;AAED;AACA;AADA;AAEO,MAAMC,WAAW,GAAG,MAAmCZ,QAAQ;;AAEtE;AACA;AADA;AAEO,MAAMa,mBAAmB,GAAG,MACjCT,UAAU,CAACU,sCAA2B,EAAE,IAAI,CAAC;;AAE/C;AACA;AACA;AAFA;AAGO,MAAMC,SAAS,GAAG,MAAcX,UAAU,CAACY,qBAAU,EAAE,MAAM,CAAC;;AAErE;AACA;AADA;AAEO,MAAMC,SAAS,GAAG,MACvBb,UAAU,CAACc,6BAAkB,EAAE,mBAAmB,CAAC;AACrD;AACA;AADA;AAEO,MAAMC,kBAAkB,GAAG,MAChCf,UAAU,CAACgB,iCAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AADA;AAEO,MAAMC,kBAAkB,GAAG,MAChCjB,UAAU,CAACkB,iCAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AADA;AAEO,MAAMC,UAAU,GAAG,MACxBnB,UAAU,CAACoB,8BAAmB,EAAE,SAAS,CAAC;AAAC;AAEtC,MAAM1C,UAAkB,GAAGmC,SAAS,EAAE;AAAC;AACvC,MAAMjC,WAAmB,GAAGuC,UAAU,EAAE;AAAC"}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  /**
9
8
  * ConfigurationException
10
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationException.js","names":["ConfigurationException","Error","constructor","message","name"],"sources":["../../src/exceptions/ConfigurationException.js"],"sourcesContent":["// @flow\n\n/**\n * ConfigurationException\n */\nclass ConfigurationException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ConfigurationException\";\n }\n}\n\nexport default ConfigurationException;\n"],"mappings":";;;;;;;AAEA;AACA;AACA;AACA,MAAMA,sBAAsB,SAASC,KAAK,CAAC;EACzCC,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,wBAAwB;EACtC;AACF;AAAC,eAEcJ,sBAAsB;AAAA"}
1
+ {"version":3,"file":"ConfigurationException.js","names":["ConfigurationException","Error","constructor","message","name"],"sources":["../../src/exceptions/ConfigurationException.js"],"sourcesContent":["// @flow\n\n/**\n * ConfigurationException\n */\nclass ConfigurationException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ConfigurationException\";\n }\n}\n\nexport default ConfigurationException;\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA,MAAMA,sBAAsB,SAASC,KAAK,CAAC;EACzCC,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,wBAAwB;EACtC;AACF;AAAC,eAEcJ,sBAAsB;AAAA"}
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
9
9
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
10
10
  var _objects = require("../utils/helpers/objects");
11
11
  var _Constants = require("../constants/Constants");
12
-
13
12
  const CLIENT_ERROR_CODE = 400;
14
13
 
15
14
  /**
@@ -18,7 +17,7 @@ const CLIENT_ERROR_CODE = 400;
18
17
  const getErrorInfo = (errorResponse, requestOptions) => {
19
18
  const defaultErrorInfo = {
20
19
  id: "Error.CannotRequestResource",
21
- defaultMessage: `Cannot request resource ${(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.url) ?? ""} with method ${(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.method) ?? _Constants.HTTP_METHODS.GET}`,
20
+ defaultMessage: `Cannot request resource ${requestOptions?.url ?? ""} with method ${requestOptions?.method ?? _Constants.HTTP_METHODS.GET}`,
22
21
  properties: {},
23
22
  param: null
24
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FetchException.js","names":["CLIENT_ERROR_CODE","getErrorInfo","errorResponse","requestOptions","defaultErrorInfo","id","defaultMessage","url","method","HTTP_METHODS","GET","properties","param","has","error","key","errors","FetchException","Error","constructor","failedRequest","errorInfo","name","request","status","response","parameters","captureStackTrace"],"sources":["../../src/exceptions/FetchException.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport type { MessageParameters } from \"../i18n/types\";\nimport type { RequestOptions } from \"../utils/fetch/types\";\n\nexport type ModularUIErrorResponse = {\n error: {\n id: string,\n properties: {\n [propertyName: string]: string | number,\n ...\n },\n },\n};\n\ntype RequestResult = { status: number };\ntype RequestParameters = { [key: string]: any };\n\nconst CLIENT_ERROR_CODE = 400;\n\n/**\n * @private\n */\nconst getErrorInfo = (\n errorResponse: ?ModularUIErrorResponse,\n requestOptions: ?RequestOptions\n) => {\n const defaultErrorInfo = {\n id: \"Error.CannotRequestResource\",\n defaultMessage: `Cannot request resource ${\n requestOptions?.url ?? \"\"\n } with method ${requestOptions?.method ?? HTTP_METHODS.GET}`,\n properties: {},\n param: null,\n };\n\n if (!errorResponse) {\n return defaultErrorInfo;\n }\n\n if (has(errorResponse, \"error\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse.error,\n };\n }\n\n const [key] = Object.keys(errorResponse);\n if (has(errorResponse[key], \"errors\")) {\n return {\n ...defaultErrorInfo,\n // $FlowFixMe[prop-missing] - not sure in what case this could happen\n ...errorResponse[key].errors,\n };\n }\n\n return defaultErrorInfo;\n};\n\n/**\n * FetchException\n */\nexport default class FetchException extends Error {\n request: ?RequestResult | XMLHttpRequest;\n status: number;\n response: ?ModularUIErrorResponse;\n parameters: ?RequestParameters;\n properties: MessageParameters;\n requestOptions: ?RequestOptions;\n id: string;\n\n constructor(\n errorResponse: ?ModularUIErrorResponse,\n failedRequest?: ?RequestResult | XMLHttpRequest,\n requestOptions?: RequestOptions\n ) {\n const errorInfo = getErrorInfo(errorResponse, requestOptions);\n super(errorInfo.id);\n\n this.name = errorInfo.id;\n this.id = errorInfo.id;\n this.request = failedRequest;\n this.requestOptions = requestOptions;\n\n this.status =\n failedRequest && failedRequest.status\n ? failedRequest.status\n : CLIENT_ERROR_CODE;\n\n this.response = errorResponse;\n this.properties = errorInfo.properties ?? {};\n this.parameters = errorInfo.param ?? null;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FetchException);\n }\n }\n}\n"],"mappings":";;;;;;;;;AACA;AAEA;;AAkBA,MAAMA,iBAAiB,GAAG,GAAG;;AAE7B;AACA;AACA;AACA,MAAMC,YAAY,GAAG,CACnBC,aAAsC,EACtCC,cAA+B,KAC5B;EACH,MAAMC,gBAAgB,GAAG;IACvBC,EAAE,EAAE,6BAA6B;IACjCC,cAAc,EAAG,2BACf,CAAAH,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEI,GAAG,KAAI,EACxB,gBAAe,CAAAJ,cAAc,aAAdA,cAAc,uBAAdA,cAAc,CAAEK,MAAM,KAAIC,uBAAY,CAACC,GAAI,EAAC;IAC5DC,UAAU,EAAE,CAAC,CAAC;IACdC,KAAK,EAAE;EACT,CAAC;EAED,IAAI,CAACV,aAAa,EAAE;IAClB,OAAOE,gBAAgB;EACzB;EAEA,IAAI,IAAAS,YAAG,EAACX,aAAa,EAAE,OAAO,CAAC,EAAE;IAC/B,OAAO;MACL,GAAGE,gBAAgB;MACnB,GAAGF,aAAa,CAACY;IACnB,CAAC;EACH;EAEA,MAAM,CAACC,GAAG,CAAC,GAAG,mBAAYb,aAAa,CAAC;EACxC,IAAI,IAAAW,YAAG,EAACX,aAAa,CAACa,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE;IACrC,OAAO;MACL,GAAGX,gBAAgB;MACnB;MACA,GAAGF,aAAa,CAACa,GAAG,CAAC,CAACC;IACxB,CAAC;EACH;EAEA,OAAOZ,gBAAgB;AACzB,CAAC;;AAED;AACA;AACA;AACe,MAAMa,cAAc,SAASC,KAAK,CAAC;EAShDC,WAAW,CACTjB,aAAsC,EACtCkB,aAA+C,EAC/CjB,cAA+B,EAC/B;IACA,MAAMkB,SAAS,GAAGpB,YAAY,CAACC,aAAa,EAAEC,cAAc,CAAC;IAC7D,KAAK,CAACkB,SAAS,CAAChB,EAAE,CAAC;IAAC;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAEpB,IAAI,CAACiB,IAAI,GAAGD,SAAS,CAAChB,EAAE;IACxB,IAAI,CAACA,EAAE,GAAGgB,SAAS,CAAChB,EAAE;IACtB,IAAI,CAACkB,OAAO,GAAGH,aAAa;IAC5B,IAAI,CAACjB,cAAc,GAAGA,cAAc;IAEpC,IAAI,CAACqB,MAAM,GACTJ,aAAa,IAAIA,aAAa,CAACI,MAAM,GACjCJ,aAAa,CAACI,MAAM,GACpBxB,iBAAiB;IAEvB,IAAI,CAACyB,QAAQ,GAAGvB,aAAa;IAC7B,IAAI,CAACS,UAAU,GAAGU,SAAS,CAACV,UAAU,IAAI,CAAC,CAAC;IAC5C,IAAI,CAACe,UAAU,GAAGL,SAAS,CAACT,KAAK,IAAI,IAAI;IAEzC,IAAIM,KAAK,CAACS,iBAAiB,EAAE;MAC3BT,KAAK,CAACS,iBAAiB,CAAC,IAAI,EAAEV,cAAc,CAAC;IAC/C;EACF;AACF;AAAC"}
1
+ {"version":3,"file":"FetchException.js","names":["CLIENT_ERROR_CODE","getErrorInfo","errorResponse","requestOptions","defaultErrorInfo","id","defaultMessage","url","method","HTTP_METHODS","GET","properties","param","has","error","key","errors","FetchException","Error","constructor","failedRequest","errorInfo","name","request","status","response","parameters","captureStackTrace"],"sources":["../../src/exceptions/FetchException.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport type { MessageParameters } from \"../i18n/types\";\nimport type { RequestOptions } from \"../utils/fetch/types\";\n\nexport type ModularUIErrorResponse = {\n error: {\n id: string,\n properties: {\n [propertyName: string]: string | number,\n ...\n },\n },\n};\n\ntype RequestResult = { status: number };\ntype RequestParameters = { [key: string]: any };\n\nconst CLIENT_ERROR_CODE = 400;\n\n/**\n * @private\n */\nconst getErrorInfo = (\n errorResponse: ?ModularUIErrorResponse,\n requestOptions: ?RequestOptions\n) => {\n const defaultErrorInfo = {\n id: \"Error.CannotRequestResource\",\n defaultMessage: `Cannot request resource ${\n requestOptions?.url ?? \"\"\n } with method ${requestOptions?.method ?? HTTP_METHODS.GET}`,\n properties: {},\n param: null,\n };\n\n if (!errorResponse) {\n return defaultErrorInfo;\n }\n\n if (has(errorResponse, \"error\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse.error,\n };\n }\n\n const [key] = Object.keys(errorResponse);\n if (has(errorResponse[key], \"errors\")) {\n return {\n ...defaultErrorInfo,\n // $FlowFixMe[prop-missing] - not sure in what case this could happen\n ...errorResponse[key].errors,\n };\n }\n\n return defaultErrorInfo;\n};\n\n/**\n * FetchException\n */\nexport default class FetchException extends Error {\n request: ?RequestResult | XMLHttpRequest;\n status: number;\n response: ?ModularUIErrorResponse;\n parameters: ?RequestParameters;\n properties: MessageParameters;\n requestOptions: ?RequestOptions;\n id: string;\n\n constructor(\n errorResponse: ?ModularUIErrorResponse,\n failedRequest?: ?RequestResult | XMLHttpRequest,\n requestOptions?: RequestOptions\n ) {\n const errorInfo = getErrorInfo(errorResponse, requestOptions);\n super(errorInfo.id);\n\n this.name = errorInfo.id;\n this.id = errorInfo.id;\n this.request = failedRequest;\n this.requestOptions = requestOptions;\n\n this.status =\n failedRequest && failedRequest.status\n ? failedRequest.status\n : CLIENT_ERROR_CODE;\n\n this.response = errorResponse;\n this.properties = errorInfo.properties ?? {};\n this.parameters = errorInfo.param ?? null;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FetchException);\n }\n }\n}\n"],"mappings":";;;;;;;;;AACA;AAEA;AAkBA,MAAMA,iBAAiB,GAAG,GAAG;;AAE7B;AACA;AACA;AACA,MAAMC,YAAY,GAAG,CACnBC,aAAsC,EACtCC,cAA+B,KAC5B;EACH,MAAMC,gBAAgB,GAAG;IACvBC,EAAE,EAAE,6BAA6B;IACjCC,cAAc,EAAG,2BACfH,cAAc,EAAEI,GAAG,IAAI,EACxB,gBAAeJ,cAAc,EAAEK,MAAM,IAAIC,uBAAY,CAACC,GAAI,EAAC;IAC5DC,UAAU,EAAE,CAAC,CAAC;IACdC,KAAK,EAAE;EACT,CAAC;EAED,IAAI,CAACV,aAAa,EAAE;IAClB,OAAOE,gBAAgB;EACzB;EAEA,IAAI,IAAAS,YAAG,EAACX,aAAa,EAAE,OAAO,CAAC,EAAE;IAC/B,OAAO;MACL,GAAGE,gBAAgB;MACnB,GAAGF,aAAa,CAACY;IACnB,CAAC;EACH;EAEA,MAAM,CAACC,GAAG,CAAC,GAAG,mBAAYb,aAAa,CAAC;EACxC,IAAI,IAAAW,YAAG,EAACX,aAAa,CAACa,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE;IACrC,OAAO;MACL,GAAGX,gBAAgB;MACnB;MACA,GAAGF,aAAa,CAACa,GAAG,CAAC,CAACC;IACxB,CAAC;EACH;EAEA,OAAOZ,gBAAgB;AACzB,CAAC;;AAED;AACA;AACA;AACe,MAAMa,cAAc,SAASC,KAAK,CAAC;EAShDC,WAAW,CACTjB,aAAsC,EACtCkB,aAA+C,EAC/CjB,cAA+B,EAC/B;IACA,MAAMkB,SAAS,GAAGpB,YAAY,CAACC,aAAa,EAAEC,cAAc,CAAC;IAC7D,KAAK,CAACkB,SAAS,CAAChB,EAAE,CAAC;IAAC;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAEpB,IAAI,CAACiB,IAAI,GAAGD,SAAS,CAAChB,EAAE;IACxB,IAAI,CAACA,EAAE,GAAGgB,SAAS,CAAChB,EAAE;IACtB,IAAI,CAACkB,OAAO,GAAGH,aAAa;IAC5B,IAAI,CAACjB,cAAc,GAAGA,cAAc;IAEpC,IAAI,CAACqB,MAAM,GACTJ,aAAa,IAAIA,aAAa,CAACI,MAAM,GACjCJ,aAAa,CAACI,MAAM,GACpBxB,iBAAiB;IAEvB,IAAI,CAACyB,QAAQ,GAAGvB,aAAa;IAC7B,IAAI,CAACS,UAAU,GAAGU,SAAS,CAACV,UAAU,IAAI,CAAC,CAAC;IAC5C,IAAI,CAACe,UAAU,GAAGL,SAAS,CAACT,KAAK,IAAI,IAAI;IAEzC,IAAIM,KAAK,CAACS,iBAAiB,EAAE;MAC3BT,KAAK,CAACS,iBAAiB,CAAC,IAAI,EAAEV,cAAc,CAAC;IAC/C;EACF;AACF;AAAC"}
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
9
-
10
9
  /**
11
10
  * UnauthorizedException
12
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"UnauthorizedException.js","names":["UnauthorizedException","Error","constructor","url","method","errorResponse","name","id","status","response"],"sources":["../../src/exceptions/UnauthorizedException.js"],"sourcesContent":["// @flow\nimport type { ModularUIErrorResponse } from \"./FetchException\";\n\n/**\n * UnauthorizedException\n */\nclass UnauthorizedException extends Error {\n status: number;\n id: string;\n response: ?ModularUIErrorResponse;\n\n constructor(\n url: string,\n method: string,\n errorResponse: ?ModularUIErrorResponse\n ) {\n super(`Cannot request resource ${url} with method ${method}`);\n\n this.name = \"UnauthorizedException\";\n this.id = \"UnauthorizedException\";\n this.status = 401;\n this.response = errorResponse;\n }\n}\n\nexport default UnauthorizedException;\n"],"mappings":";;;;;;;;;AAGA;AACA;AACA;AACA,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAKxCC,WAAW,CACTC,GAAW,EACXC,MAAc,EACdC,aAAsC,EACtC;IACA,KAAK,CAAE,2BAA0BF,GAAI,gBAAeC,MAAO,EAAC,CAAC;IAAC;IAAA;IAAA;IAE9D,IAAI,CAACE,IAAI,GAAG,uBAAuB;IACnC,IAAI,CAACC,EAAE,GAAG,uBAAuB;IACjC,IAAI,CAACC,MAAM,GAAG,GAAG;IACjB,IAAI,CAACC,QAAQ,GAAGJ,aAAa;EAC/B;AACF;AAAC,eAEcL,qBAAqB;AAAA"}
1
+ {"version":3,"file":"UnauthorizedException.js","names":["UnauthorizedException","Error","constructor","url","method","errorResponse","name","id","status","response"],"sources":["../../src/exceptions/UnauthorizedException.js"],"sourcesContent":["// @flow\nimport type { ModularUIErrorResponse } from \"./FetchException\";\n\n/**\n * UnauthorizedException\n */\nclass UnauthorizedException extends Error {\n status: number;\n id: string;\n response: ?ModularUIErrorResponse;\n\n constructor(\n url: string,\n method: string,\n errorResponse: ?ModularUIErrorResponse\n ) {\n super(`Cannot request resource ${url} with method ${method}`);\n\n this.name = \"UnauthorizedException\";\n this.id = \"UnauthorizedException\";\n this.status = 401;\n this.response = errorResponse;\n }\n}\n\nexport default UnauthorizedException;\n"],"mappings":";;;;;;;;AAGA;AACA;AACA;AACA,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAKxCC,WAAW,CACTC,GAAW,EACXC,MAAc,EACdC,aAAsC,EACtC;IACA,KAAK,CAAE,2BAA0BF,GAAI,gBAAeC,MAAO,EAAC,CAAC;IAAC;IAAA;IAAA;IAE9D,IAAI,CAACE,IAAI,GAAG,uBAAuB;IACnC,IAAI,CAACC,EAAE,GAAG,uBAAuB;IACjC,IAAI,CAACC,MAAM,GAAG,GAAG;IACjB,IAAI,CAACC,QAAQ,GAAGJ,aAAa;EAC/B;AACF;AAAC,eAEcL,qBAAqB;AAAA"}
@@ -15,7 +15,6 @@ var _useModularUIRequest = require("./useModularUIRequest");
15
15
  var _constants = require("../constants");
16
16
  var _ListModel = _interopRequireDefault(require("../models/list/ListModel"));
17
17
  var _FormModel = _interopRequireDefault(require("../models/form/FormModel"));
18
-
19
18
  /**
20
19
  * Retrieve all forms configured on a model with actions
21
20
  * @param model
@@ -1 +1 @@
1
- {"version":3,"file":"useAllFormsOnModel.js","names":["useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","requestCount","setRequestCount","responseCount","setResponseCount","useEffect","requests","getActions","action","href","selfhref","addParameter","method","HTTP_METHODS","POST","fetch","then","form","FormModel","tokens","name","length","all","responses","actionForms","actionCollection","createActions","getActionsByType","isDisabled","allActions","ListModel","listItemCollection","forEach","listItem","updateActions","push","actions","unique"],"sources":["../../src/hooks/useAllFormsOnModel.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport { HTTP_METHODS } from \"../constants\";\n\nimport ListModel from \"../models/list/ListModel\";\nimport FormModel from \"../models/form/FormModel\";\n\nimport type DetailModel from \"../models/detail/DetailModel\";\nimport type TabModel from \"../models/tab/TabModel\";\nimport type ActionModel from \"../models/actions/ActionModel\";\n\n/**\n * Retrieve all forms configured on a model with actions\n * @param model\n * @returns Object - { actionName: FormModel }\n */\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel\n): null | { [actionName: string]: FormModel } => {\n const modularui = useModularUIRequest();\n const [forms, setForms] = useState(null);\n const [requestCount, setRequestCount] = useState(0);\n const [responseCount, setResponseCount] = useState(0);\n\n useEffect(() => {\n const requests = getActions(model).map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n setRequestCount(requests.length);\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [model, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (\n model: ListModel | DetailModel | TabModel\n): Array<ActionModel> => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions = [];\n const unique = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n"],"mappings":";;;;;;;;;;;;AACA;AAEA;AAEA;AAEA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACO,MAAMA,uBAAuB,GAClCC,KAAyC,IACM;EAC/C,MAAMC,SAAS,GAAG,IAAAC,wCAAmB,GAAE;EACvC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;EACxC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAF,eAAQ,EAAC,CAAC,CAAC;EACnD,MAAM,CAACG,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAJ,eAAQ,EAAC,CAAC,CAAC;EAErD,IAAAK,gBAAS,EAAC,MAAM;IAAA;IACd,MAAMC,QAAQ,GAAG,6BAAAC,UAAU,CAACZ,KAAK,CAAC,iBAAMa,MAAM,IAAK;MACjD,MAAMC,IAAI,GAAGD,MAAM,CAACE,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;MAE5D,OAAOf,SAAS,CAACa,IAAI,EAAE;QAAEG,MAAM,EAAEC,uBAAY,CAACC;MAAK,CA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A,MAAM,CAACoB,UAAU,CAAC;MAEzCC,UAAU,CAACM,IAAI,CAAC,GAAGD,aAAa,CAAC;IACnC,CAAC,CAAC;EACJ;EAEA,MAAME,OAAO,GAAG,EAAE;EAClB,MAAMC,MAAM,GAAG,EAAE;EACjBR,UAAU,CAACG,OAAO,CAAExB,MAAM,IAAK;IAC7B,IAAI,CAAC,uBAAA6B,MAAM,OAANA,MAAM,EAAU7B,MAAM,CAACY,IAAI,CAAC,EAAE;MACjCiB,MAAM,CAACF,IAAI,CAAC3B,MAAM,CAACY,IAAI,CAAC;MACxBgB,OAAO,CAACD,IAAI,CAAC3B,MAAM,CAAC;IACtB;EACF,CAAC,CAAC;EAEF,OAAO4B,OAAO;AAChB,CAAC"}
1
+ {"version":3,"file":"useAllFormsOnModel.js","names":["useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","requestCount","setRequestCount","responseCount","setResponseCount","useEffect","requests","getActions","action","href","selfhref","addParameter","method","HTTP_METHODS","POST","fetch","then","form","FormModel","tokens","name","length","all","responses","actionForms","actionCollection","createActions","getActionsByType","isDisabled","allActions","ListModel","listItemCollection","forEach","listItem","updateActions","push","actions","unique"],"sources":["../../src/hooks/useAllFormsOnModel.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport { HTTP_METHODS } from \"../constants\";\n\nimport ListModel from \"../models/list/ListModel\";\nimport FormModel from \"../models/form/FormModel\";\n\nimport type DetailModel from \"../models/detail/DetailModel\";\nimport type TabModel from \"../models/tab/TabModel\";\nimport type ActionModel from \"../models/actions/ActionModel\";\n\n/**\n * Retrieve all forms configured on a model with actions\n * @param model\n * @returns Object - { actionName: FormModel }\n */\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel\n): null | { [actionName: string]: FormModel } => {\n const modularui = useModularUIRequest();\n const [forms, setForms] = useState(null);\n const [requestCount, setRequestCount] = useState(0);\n const [responseCount, setResponseCount] = useState(0);\n\n useEffect(() => {\n const requests = getActions(model).map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n setRequestCount(requests.length);\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [model, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (\n model: ListModel | DetailModel | TabModel\n): Array<ActionModel> => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions = [];\n const unique = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n"],"mappings":";;;;;;;;;;;;AACA;AAEA;AAEA;AAEA;AACA;AAMA;AACA;AACA;AACA;AACA;AACO,MAAMA,uBAAuB,GAClCC,KAAyC,IACM;EAC/C,MAAMC,SAAS,GAAG,IAAAC,wCAAmB,GAAE;EACvC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;EACxC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAF,eAAQ,EAAC,CAAC,CAAC;EACnD,MAAM,CAACG,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAJ,eAAQ,EAAC,CAAC,CAAC;EAErD,IAAAK,gBAAS,EAAC,MAAM;IAAA;IACd,MAAMC,QAAQ,GAAG,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IAAI/B,KAAK,YAAYmC,kBAAS,EAAE;IAC9BnC,KAAK,CAACoC,kBAAkB,CAACC,OAAO,CAAEC,QAAQ,IAAK;MAAA;MAC7C,MAAMC,aAAa,GAAG,iCAAAD,QAAQ,CAACR,gBAAgB,CAC5CE,gBAAgB,CAAC,QAAQ,CAAC,kBAClBnB,MAAM,IAAK,CAACA,MAAM,CAACoB,UAAU,CAAC;MAEzCC,UAAU,CAACM,IAAI,CAAC,GAAGD,aAAa,CAAC;IACnC,CAAC,CAAC;EACJ;EAEA,MAAME,OAAO,GAAG,EAAE;EAClB,MAAMC,MAAM,GAAG,EAAE;EACjBR,UAAU,CAACG,OAAO,CAAExB,MAAM,IAAK;IAC7B,IAAI,CAAC,uBAAA6B,MAAM,OAANA,MAAM,EAAU7B,MAAM,CAACY,IAAI,CAAC,EAAE;MACjCiB,MAAM,CAACF,IAAI,CAAC3B,MAAM,CAACY,IAAI,CAAC;MACxBgB,OAAO,CAACD,IAAI,CAAC3B,MAAM,CAAC;IACtB;EACF,CAAC,CAAC;EAEF,OAAO4B,OAAO;AAChB,CAAC"}
@@ -11,7 +11,6 @@ var _actions = require("../redux/actions");
11
11
  var _Cache = _interopRequireDefault(require("../utils/browser/Cache"));
12
12
  var _constants = require("../constants");
13
13
  var _exceptions = require("../exceptions");
14
-
15
14
  /**
16
15
  */
17
16
  const useLogin = () => {
@@ -19,10 +18,10 @@ const useLogin = () => {
19
18
  const dispatch = (0, _reactRedux.useDispatch)();
20
19
  const application = (0, _reactRedux.useSelector)(_selectors.getApplication);
21
20
  const auth = (0, _reactRedux.useSelector)(state => state.auth);
22
- const isAuthenticated = (application === null || application === void 0 ? void 0 : application.isLoggedIn) ?? false;
21
+ const isAuthenticated = application?.isLoggedIn ?? false;
23
22
  return {
24
23
  isAuthenticated,
25
- authenticationTypes: (application === null || application === void 0 ? void 0 : application.authenticationTypes) ?? [],
24
+ authenticationTypes: application?.authenticationTypes ?? [],
26
25
  errorMessage: auth.error,
27
26
  resetErrors: () => dispatch((0, _actions.resetAuthErrors)()),
28
27
  login: (username, password) => dispatch((0, _actions.login)(username, password)),
@@ -46,10 +45,10 @@ const useLogout = () => {
46
45
  const dispatch = (0, _reactRedux.useDispatch)();
47
46
  const application = (0, _reactRedux.useSelector)(_selectors.getApplication);
48
47
  const LOGOUT_PATH = (0, _constants.getSetting)("LOGOUT_PATH", "/signout");
49
- const isAuthenticated = (application === null || application === void 0 ? void 0 : application.isLoggedIn) ?? false;
48
+ const isAuthenticated = application?.isLoggedIn ?? false;
50
49
  return {
51
50
  isAuthenticated,
52
- authenticationTypes: (application === null || application === void 0 ? void 0 : application.authenticationTypes) ?? [],
51
+ authenticationTypes: application?.authenticationTypes ?? [],
53
52
  logout: () => {
54
53
  if (_Cache.default.getItem("isRedirectLogin")) {
55
54
  const origin = window.location.origin;
@@ -1 +1 @@
1
- {"version":3,"file":"useAuthentication.js","names":["useLogin","Cache","setItem","dispatch","useDispatch","application","useSelector","getApplication","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","errorMessage","error","resetErrors","resetAuthErrors","login","username","password","redirectLogin","authenticationType","getItem","IllegalStateException","authentication","redirectUri","window","location","assign","BASE","useLogout","LOGOUT_PATH","getSetting","logout","origin","url"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/selectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\n\nimport Cache from \"../utils/browser/Cache\";\nimport { BASE, getSetting } from \"../constants\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\nimport type { AuthenticationType } from \"../models/types\";\nimport { IllegalStateException } from \"../exceptions\";\ntype LoginHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n redirectLogin: (authenticationType: AuthenticationType) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n logout: () => void,\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [],\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${authenticationType.authentication}' using url: '${authenticationType.redirectUri}'`\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(`${BASE}${authenticationType.redirectUri}`);\n }\n },\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [],\n logout: () => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE}/logout?url=${origin}${BASE}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n };\n};\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AAEA;AACA;AAIA;;AAeA;AACA;AACO,MAAMA,QAAQ,GAAG,MAAiB;EACvCC,cAAK,CAACC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;EAEvC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAE9B,MAAMC,WAAW,GAAG,IAAAC,uBAAW,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WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEM,UAAU,KAAI,KAAK;EACxD,OAAO;IACLD,eAAe;IACfE,mBAAmB,EAAE,CAAAP,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEO,mBAAmB,KAAI,EAAE;IAC3DqB,MAAM,EAAE,MAAM;MACZ,IAAIhC,cAAK,CAACqB,OAAO,CAAC,iBAAiB,CAAC,EAAE;QACpC,MAAMY,MAAM,GAAGR,MAAM,CAACC,QAAQ,CAACO,MAAM;QACrC,MAAMC,GAAG,GAAI,GAAED,MAAO,GAAEL,eAAK,eAAcK,MAAO,GAAEL,eAAK,GAAEE,WAAY,EAAC;QACxE9B,cAAK,CAACC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;QACvCwB,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACO,GAAG,CAAC;MAC7B,CAAC,MAAM;QACL,OAAOhC,QAAQ,CAAC,IAAA8B,eAAM,GAAE,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"file":"useAuthentication.js","names":["useLogin","Cache","setItem","dispatch","useDispatch","application","useSelector","getApplication","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","errorMessage","error","resetErrors","resetAuthErrors","login","username","password","redirectLogin","authenticationType","getItem","IllegalStateException","authentication","redirectUri","window","location","assign","BASE","useLogout","LOGOUT_PATH","getSetting","logout","origin","url"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/selectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\n\nimport Cache from \"../utils/browser/Cache\";\nimport { BASE, getSetting } from \"../constants\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\nimport type { AuthenticationType } from \"../models/types\";\nimport { IllegalStateException } from \"../exceptions\";\ntype LoginHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n redirectLogin: (authenticationType: AuthenticationType) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n logout: () => void,\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [],\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${authenticationType.authentication}' using url: '${authenticationType.redirectUri}'`\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(`${BASE}${authenticationType.redirectUri}`);\n }\n },\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [],\n logout: () => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE}/logout?url=${origin}${BASE}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n };\n};\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AAEA;AACA;AAIA;AAeA;AACA;AACO,MAAMA,QAAQ,GAAG,MAAiB;EACvCC,cAAK,CAACC,OAAO,CAAC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E,UAAU,CAAC;EAEzD,MAAMtB,eAAe,GAAGL,WAAW,EAAEM,UAAU,IAAI,KAAK;EACxD,OAAO;IACLD,eAAe;IACfE,mBAAmB,EAAEP,WAAW,EAAEO,mBAAmB,IAAI,EAAE;IAC3DqB,MAAM,EAAE,MAAM;MACZ,IAAIhC,cAAK,CAACqB,OAAO,CAAC,iBAAiB,CAAC,EAAE;QACpC,MAAMY,MAAM,GAAGR,MAAM,CAACC,QAAQ,CAACO,MAAM;QACrC,MAAMC,GAAG,GAAI,GAAED,MAAO,GAAEL,eAAK,eAAcK,MAAO,GAAEL,eAAK,GAAEE,WAAY,EAAC;QACxE9B,cAAK,CAACC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;QACvCwB,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACO,GAAG,CAAC;MAC7B,CAAC,MAAM;QACL,OAAOhC,QAAQ,CAAC,IAAA8B,eAAM,GAAE,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC;AAAC"}
@@ -14,7 +14,6 @@ var _SourceReferenceCollection = _interopRequireDefault(require("../models/conce
14
14
  var _ModularUIRequest = _interopRequireDefault(require("../modularui/ModularUIRequest"));
15
15
  var _useProgressIndicator = require("../hooks/useProgressIndicator");
16
16
  var _useI18n = require("../hooks/useI18n");
17
-
18
17
  /**
19
18
  * Hook to retrieve multiple source references at once
20
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useContent.js","names":["useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","useEffect","requests","JSON","parse","modularuiRequest","ModularUIRequest","locale","fetchContent","all","then","responseContent"],"sources":["../../src/hooks/useContent.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\nimport { useLocale } from \"../hooks/useI18n\";\n\nimport type ContentModel from \"../models/content/ContentModel\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean\n): Array<ContentModel> => {\n const [content, setContent] = useState([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allHrefs, localeCode, renderChildSections]);\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AACA;AAEA;AACA;AAEA;AACA;;AAIA;AACA;AACA;AACO,MAAMA,8BAA8B,GAAG,CAC5CC,gBAA2C,EAC3CC,mBAA4B,KACJ;EAAA;EACxB,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EAC1C,MAAMC,UAAU,GAAG,IAAAC,kBAAS,GAAE;EAE9B,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAG,IAAAC,0CAAoB,GAAE;EAEhD,MAAMC,KAAK,GAAG,gFAAAV,gBAAgB,OAAhBA,gBAAgB,EACtBW,eAAe,IAAKA,eAAe,CAACC,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC,kBACrD,CAACA,IAAI,EAAEC,KAAK,EAAEC,IAAI,KAAKA,IAAI,CAACC,OAAO,CAACH,IAAI,CAAC,KAAKC,KAAK,CAAC,iBACtDD,IAAI,IAAKA,IAAI,CAACI,QAAQ,EAAE,CAAC;EAEjC,MAAMC,QAAQ,GAAG,wBAAeT,KAAK,CAAC;EACtC,IAAAU,gBAAS,EAAC,MAAM;IAAA;IACd,MAAMC,QAAQ,GAAG,8BAAAC,IAAI,CAACC,KAAK,CAACJ,QAAQ,CAAC,kBAAML,IAAI,IAAK;MAClD,MAAMU,gBAAgB,GAAG,IAAIC,yBAAgB,CAACX,IAAI,CAAC;MACnDU,gBAAgB,CAACE,MAAM,GAAGrB,UAAU;MACpC,OAAOmB,gBAAgB,CAACG,YAAY,CAAC1B,mBAAmB,CAAC;IAC3D,CAAC,CAAC;IAEFM,KAAK,EAAE;IACP,iBAAQqB,GAAG,CAACP,QAAQ,CAAC,CAACQ,IAAI,CAAEC,eAAe,IAAK;MAC9C3B,UAAU,CAAC2B,eAAe,CAAC;MAC3BtB,MAAM,EAAE;IACV,CAAC,CAAC;;IAEF;IACA;EACF,CAAC,EAAE,CAACW,QAAQ,EAAEd,UAAU,EAAEJ,mBAAmB,CAAC,CAAC;EAE/C,OAAOC,OAAO;AAChB,CAAC;AAAC"}
1
+ {"version":3,"file":"useContent.js","names":["useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","useEffect","requests","JSON","parse","modularuiRequest","ModularUIRequest","locale","fetchContent","all","then","responseContent"],"sources":["../../src/hooks/useContent.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\nimport { useLocale } from \"../hooks/useI18n\";\n\nimport type ContentModel from \"../models/content/ContentModel\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean\n): Array<ContentModel> => {\n const [content, setContent] = useState([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allHrefs, localeCode, renderChildSections]);\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AACA;AAEA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACO,MAAMA,8BAA8B,GAAG,CAC5CC,gBAA2C,EAC3CC,mBAA4B,KACJ;EAAA;EACxB,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EAC1C,MAAMC,UAAU,GAAG,IAAAC,kBAAS,GAAE;EAE9B,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAG,IAAAC,0CAAoB,GAAE;EAEhD,MAAMC,KAAK,GAAG,gFAAAV,gBAAgB,OAAhBA,gBAAgB,EACtBW,eAAe,IAAKA,eAAe,CAACC,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC,kBACrD,CAACA,IAAI,EAAEC,KAAK,EAAEC,IAAI,KAAKA,IAAI,CAACC,OAAO,CAACH,IAAI,CAAC,KAAKC,KAAK,CAAC,iBACtDD,IAAI,IAAKA,IAAI,CAACI,QAAQ,EAAE,CAAC;EAEjC,MAAMC,QAAQ,GAAG,wBAAeT,KAAK,CAAC;EACtC,IAAAU,gBAAS,EAAC,MAAM;IAAA;IACd,MAAMC,QAAQ,GAAG,8BAAAC,IAAI,CAACC,KAAK,CAACJ,QAAQ,CAAC,kBAAML,IAAI,IAAK;MAClD,MAAMU,gBAAgB,GAAG,IAAIC,yBAAgB,CAACX,IAAI,CAAC;MACnDU,gBAAgB,CAACE,MAAM,GAAGrB,UAAU;MACpC,OAAOmB,gBAAgB,CAACG,YAAY,CAAC1B,mBAAmB,CAAC;IAC3D,CAAC,CAAC;IAEFM,KAAK,EAAE;IACP,iBAAQqB,GAAG,CAACP,QAAQ,CAAC,CAACQ,IAAI,CAAEC,eAAe,IAAK;MAC9C3B,UAAU,CAAC2B,eAAe,CAAC;MAC3BtB,MAAM,EAAE;IACV,CAAC,CAAC;;IAEF;IACA;EACF,CAAC,EAAE,CAACW,QAAQ,EAAEd,UAAU,EAAEJ,mBAAmB,CAAC,CAAC;EAE/C,OAAOC,OAAO;AAChB,CAAC;AAAC"}
@@ -11,7 +11,6 @@ var React = _interopRequireWildcard(require("react"));
11
11
  var _lite = require("dequal/lite");
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
-
15
14
  /**
16
15
  * As copied from https://github.com/kentcdodds/use-deep-compare-effect/
17
16
  * Need to copy this, because the dependency on dequal breaks in ie11
@@ -1 +1 @@
1
- {"version":3,"file":"useDeepCompareEffect.js","names":["useDeepCompareMemoize","value","ref","React","useRef","signalRef","deepEqual","current","useDeepCompareEffect","callback","dependencies","useEffect"],"sources":["../../src/hooks/useDeepCompareEffect.js"],"sourcesContent":["// @flow\nimport * as React from \"react\";\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = Array<mixed>;\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = React.useRef<DependencyList | null>(null); // NOSONAR\n const signalRef = React.useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\n/**\n */\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList\n): void {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\nexport default useDeepCompareEffect;\n"],"mappings":";;;;;;;;;AACA;AACA;AAAkD;AAAA;;AAKlD;AACA;AACA;AACA;AACA,MAAMA,qBAAqB,GAAIC,KAAqB,IAAK;EACvD,MAAMC,GAAG,GAAGC,KAAK,CAACC,MAAM,CAAwB,IAAI,CAAC,CAAC,CAAC;EACvD,MAAMC,SAAS,GAAGF,KAAK,CAACC,MAAM,CAAS,CAAC,CAAC;EAEzC,IAAI,CAAC,IAAAE,YAAS,EAACL,KAAK,EAAEC,GAAG,CAACK,OAAO,CAAC,EAAE;IAClCL,GAAG,CAACK,OAAO,GAAGN,KAAK;IACnBI,SAAS,CAACE,OAAO,IAAI,CAAC;EACxB;EAEA,OAAO,CAACF,SAAS,CAACE,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AACO,SAASC,oBAAoB,CAClCC,QAAkB,EAClBC,YAA4B,EACtB;EACN;EACA,OAAOP,KAAK,CAACQ,SAAS,CAACF,QAAQ,EAAET,qBAAqB,CAACU,YAAY,CAAC,CAAC;AACvE;AAAC,eAEcF,oBAAoB;AAAA"}
1
+ {"version":3,"file":"useDeepCompareEffect.js","names":["useDeepCompareMemoize","value","ref","React","useRef","signalRef","deepEqual","current","useDeepCompareEffect","callback","dependencies","useEffect"],"sources":["../../src/hooks/useDeepCompareEffect.js"],"sourcesContent":["// @flow\nimport * as React from \"react\";\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = Array<mixed>;\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = React.useRef<DependencyList | null>(null); // NOSONAR\n const signalRef = React.useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\n/**\n */\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList\n): void {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\nexport default useDeepCompareEffect;\n"],"mappings":";;;;;;;;;AACA;AACA;AAAkD;AAAA;AAKlD;AACA;AACA;AACA;AACA,MAAMA,qBAAqB,GAAIC,KAAqB,IAAK;EACvD,MAAMC,GAAG,GAAGC,KAAK,CAACC,MAAM,CAAwB,IAAI,CAAC,CAAC,CAAC;EACvD,MAAMC,SAAS,GAAGF,KAAK,CAACC,MAAM,CAAS,CAAC,CAAC;EAEzC,IAAI,CAAC,IAAAE,YAAS,EAACL,KAAK,EAAEC,GAAG,CAACK,OAAO,CAAC,EAAE;IAClCL,GAAG,CAACK,OAAO,GAAGN,KAAK;IACnBI,SAAS,CAACE,OAAO,IAAI,CAAC;EACxB;EAEA,OAAO,CAACF,SAAS,CAACE,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AACO,SAASC,oBAAoB,CAClCC,QAAkB,EAClBC,YAA4B,EACtB;EACN;EACA,OAAOP,KAAK,CAACQ,SAAS,CAACF,QAAQ,EAAET,qBAAqB,CAACU,YAAY,CAAC,CAAC;AACvE;AAAC,eAEcF,oBAAoB;AAAA"}
@@ -12,7 +12,6 @@ var _modularui = require("../redux/_modularui");
12
12
  var _useModularUI = require("./useModularUI");
13
13
  var _actions = require("../redux/actions");
14
14
  var _FormModel = _interopRequireDefault(require("../models/form/FormModel"));
15
-
16
15
  /**
17
16
  * Load a form by href
18
17
  */
@@ -26,7 +25,7 @@ const useForm = href => {
26
25
  targetModel: _FormModel.default,
27
26
  removeOnUnmount: true
28
27
  });
29
- if (form !== null && form !== void 0 && form.model) {
28
+ if (form?.model) {
30
29
  return form.model;
31
30
  }
32
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useForm.js","names":["useForm","href","formHref","Href","getSetting","addParameter","form","useModularUI","method","HTTP_METHODS","POST","targetModel","FormModel","removeOnUnmount","model","useFormNavigation","dispatch","useDispatch","previous","previousObject","cancel","cancelForm","submit","loadModularUI","connectKey","selfhref","data","formdata","updateModel","remove","removeModelByKey","showFormNotificationAction","showFormNotification","useAttributeUpdate","object","attribute","value","options","updateFormAttribute","useAttributeSet","save","addRepeatableAttributeSet","cancelRepeatableAttributeSet","removeRepeatableAttributeSet"],"sources":["../../src/hooks/useForm.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport Href from \"../models/href/Href\";\n\nimport { getSetting, HTTP_METHODS } from \"../constants\";\n\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui\";\nimport { useModularUI } from \"./useModularUI\";\n\nimport {\n addRepeatableAttributeSet,\n cancelForm,\n cancelRepeatableAttributeSet,\n previousObject,\n removeRepeatableAttributeSet,\n showFormNotification,\n updateFormAttribute,\n} from \"../redux/actions\";\n\nimport FormModel from \"../models/form/FormModel\";\n\nimport type { FormObjectModel, AttributeType } from \"../models\";\nimport type { UpdateFormOptions } from \"../redux/types\";\nimport type {\n RemoveModelByKeyAction,\n UpdateModelAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateModelAction,\n cancel: (form: FormModel) => void,\n submit: (form: FormModel) => void,\n showFormNotification: (form: FormModel) => void,\n remove: (form: FormModel) => RemoveModelByKeyAction,\n};\n\ntype AttributeSetHook = {\n save: () => UpdateModelAction,\n cancel: (object: FormObjectModel) => UpdateModelAction,\n remove: (object: FormObjectModel) => UpdateModelAction,\n};\n\ntype AttributeUpdateHook = (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n) => void;\n\n/**\n * Load a form by href\n */\nexport const useForm = (href: string | Href): ?FormModel => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n });\n\n if (form?.model) {\n return form.model;\n }\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = (): FormNavigationHook => {\n const dispatch = useDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n targetModel: FormModel,\n })\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Update attributes of a form\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n object: FormObjectModel\n): AttributeUpdateHook => {\n const dispatch = useDispatch();\n\n return (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => dispatch(updateFormAttribute(form, object, attribute, value, options));\n};\n\n/**\n * Attributeset actions\n */\nexport const useAttributeSet = (form: FormModel): AttributeSetHook => {\n const dispatch = useDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n"],"mappings":";;;;;;;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AAUA;;AA6BA;AACA;AACA;AACO,MAAMA,OAAO,GAAIC,IAAmB,IAAiB;EAC1D,MAAMC,QAAQ,GAAG,IAAIC,aAAI,CAACF,IAAI,CAAC;EAE/B,IAAI,CAAC,IAAAG,qBAAU,EAAC,oBAAoB,CAAC,EAAE;IACrCF,QAAQ,CAACG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;EAC1C;EAEA,MAAMC,IAAI,GAAG,IAAAC,0BAAY,EAAC,MAAM,EAAEL,QAAQ,EAAE;IAC1CM,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBC,WAAW,EAAEC,kBAAS;IACtBC,eAAe,EAAE;EACnB,CAAC,CAAC;EAEF,IAAIP,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEQ,KAAK,EAAE;IACf,OAAOR,IAAI,CAACQ,KAAK;EACnB;AACF,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAMC,iBAAiB,GAAG,MAA0B;EACzD,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAE9B,MAAMC,QAAQ,GAAIZ,IAAe,IAAKU,QAAQ,CAAC,IAAAG,uBAAc,EAACb,IAAI,CAAC,CAAC;EAEpE,MAAMc,MAAM,GAAId,IAAe,IAAKU,QAAQ,CAAC,IAAAK,mBAAU,EAACf,IAAI,CAAC,CAAC;EAE9D,MAAMgB,MAAM,GAAIh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AC9BlB,QAAQ,CAAC,IAAA2B,qCAA4B,EAACrC,IAAI,EAAE4B,MAAM,CAAC;EACvD,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"file":"useForm.js","names":["useForm","href","formHref","Href","getSetting","addParameter","form","useModularUI","method","HTTP_METHODS","POST","targetModel","FormModel","removeOnUnmount","model","useFormNavigation","dispatch","useDispatch","previous","previousObject","cancel","cancelForm","submit","loadModularUI","connectKey","selfhref","data","formdata","updateModel","remove","removeModelByKey","showFormNotificationAction","showFormNotification","useAttributeUpdate","object","attribute","value","options","updateFormAttribute","useAttributeSet","save","addRepeatableAttributeSet","cancelRepeatableAttributeSet","removeRepeatableAttributeSet"],"sources":["../../src/hooks/useForm.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport Href from \"../models/href/Href\";\n\nimport { getSetting, HTTP_METHODS } from \"../constants\";\n\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui\";\nimport { useModularUI } from \"./useModularUI\";\n\nimport {\n addRepeatableAttributeSet,\n cancelForm,\n cancelRepeatableAttributeSet,\n previousObject,\n removeRepeatableAttributeSet,\n showFormNotification,\n updateFormAttribute,\n} from \"../redux/actions\";\n\nimport FormModel from \"../models/form/FormModel\";\n\nimport type { FormObjectModel, AttributeType } from \"../models\";\nimport type { UpdateFormOptions } from \"../redux/types\";\nimport type {\n RemoveModelByKeyAction,\n UpdateModelAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateModelAction,\n cancel: (form: FormModel) => void,\n submit: (form: FormModel) => void,\n showFormNotification: (form: FormModel) => void,\n remove: (form: FormModel) => RemoveModelByKeyAction,\n};\n\ntype AttributeSetHook = {\n save: () => UpdateModelAction,\n cancel: (object: FormObjectModel) => UpdateModelAction,\n remove: (object: FormObjectModel) => UpdateModelAction,\n};\n\ntype AttributeUpdateHook = (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n) => void;\n\n/**\n * Load a form by href\n */\nexport const useForm = (href: string | Href): ?FormModel => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n });\n\n if (form?.model) {\n return form.model;\n }\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = (): FormNavigationHook => {\n const dispatch = useDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n targetModel: FormModel,\n })\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Update attributes of a form\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n object: FormObjectModel\n): AttributeUpdateHook => {\n const dispatch = useDispatch();\n\n return (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => dispatch(updateFormAttribute(form, object, attribute, value, options));\n};\n\n/**\n * Attributeset actions\n */\nexport const useAttributeSet = (form: FormModel): AttributeSetHook => {\n const dispatch = useDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n"],"mappings":";;;;;;;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AAUA;AA6BA;AACA;AACA;AACO,MAAMA,OAAO,GAAIC,IAAmB,IAAiB;EAC1D,MAAMC,QAAQ,GAAG,IAAIC,aAA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MAAM;IACNE,MAAM;IACNO,MAAM;IACNG,oBAAoB,EAAED;EACxB,CAAC;AACH,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAME,kBAAkB,GAAG,CAChC3B,IAAe,EACf4B,MAAuB,KACC;EACxB,MAAMlB,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAE9B,OAAO,CACLkB,SAAwB,EACxBC,KAAa,EACbC,OAA0B,KACvBrB,QAAQ,CAAC,IAAAsB,4BAAmB,EAAChC,IAAI,EAAE4B,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAEC,OAAO,CAAC,CAAC;AAC7E,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAME,eAAe,GAAIjC,IAAe,IAAuB;EACpE,MAAMU,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAE9B,OAAO;IACLuB,IAAI,EAAE,MAAMxB,QAAQ,CAAC,IAAAyB,kCAAyB,EAACnC,IAAI,CAAC,CAAC;IACrDc,MAAM,EAAGc,MAAuB,IAC9BlB,QAAQ,CAAC,IAAA0B,qCAA4B,EAACpC,IAAI,EAAE4B,MAAM,CAAC,CAAC;IACtDL,MAAM,EAAGK,MAAuB,IAC9BlB,QAAQ,CAAC,IAAA2B,qCAA4B,EAACrC,IAAI,EAAE4B,MAAM,CAAC;EACvD,CAAC;AACH,CAAC;AAAC"}
@@ -10,7 +10,6 @@ var _reactRedux = require("react-redux");
10
10
  var _reselect = require("reselect");
11
11
  var _memoize = _interopRequireDefault(require("lodash/memoize"));
12
12
  var _i18n = require("../redux/selectors/i18n");
13
-
14
13
  const getMessage = (0, _reselect.createSelector)([_i18n.getLocales, _i18n.getLocale], (locales, localeCode) => (0, _memoize.default)((id, defaultMessage, placeholders) => locales.getLocale(localeCode).getMessage(id, defaultMessage, placeholders), function () {
15
14
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16
15
  args[_key] = arguments[_key];
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n.js","names":["getMessage","createSelector","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useSelector","useTranslate","useLocale"],"sources":["../../src/hooks/useI18n.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { createSelector } from \"reselect\";\nimport memoize from \"lodash/memoize\";\n\nimport { getLocales, getLocale } from \"../redux/selectors/i18n\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (id: string, defaultMessage?: string, placeholders?: Object) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args)\n )\n);\n\n/**\n */\nconst useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: Object | null\n): any => useSelector(getMessage)(id, defaultMessage, placeholders);\n\n/**\n */\nconst useTranslate = (): ((...any) => any) => useSelector(getMessage);\n\n/**\n */\nconst useLocale = (): string => useSelector(getLocale);\n\nexport { useTranslate, useMessage, useLocale };\n"],"mappings":";;;;;;;;AACA;AACA;AACA;AAEA;;AAEA,MAAMA,UAAU,GAAG,IAAAC,wBAAc,EAC/B,CAACC,gBAAU,EAAEC,eAAS,CAAC,EACvB,CAACC,OAAO,EAAEC,UAAU,KAClB,IAAAC,gBAAO,EACL,CAACC,EAAU,EAAEC,cAAuB,EAAEC,YAAqB,KACzDL,OAAO,CACJD,SAAS,CAACE,UAAU,CAAC,CACrBL,UAAU,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC,EACjD;EAAA,kCAAIC,IAAI;IAAJA,IAAI;EAAA;EAAA,OAAK,wBAAeA,IAAI,CAAC;AAAA,EAClC,CACJ;;AAED;AACA;AACA,MAAMC,UAAU,GAAG,CACjBJ,EAAU,EACVC,cAAuB,EACvBC,YAA4B,KACpB,IAAAG,uBAAW,EAACZ,UAAU,CAAC,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC;;AAEnE;AACA;AADA;AAEA,MAAMI,YAAY,GAAG,MAAyB,IAAAD,uBAAW,EAACZ,UAAU,CAAC;;AAErE;AACA;AADA;AAEA,MAAMc,SAAS,GAAG,MAAc,IAAAF,uBAAW,EAACT,eAAS,CAAC;AAAC"}
1
+ {"version":3,"file":"useI18n.js","names":["getMessage","createSelector","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useSelector","useTranslate","useLocale"],"sources":["../../src/hooks/useI18n.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { createSelector } from \"reselect\";\nimport memoize from \"lodash/memoize\";\n\nimport { getLocales, getLocale } from \"../redux/selectors/i18n\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (id: string, defaultMessage?: string, placeholders?: Object) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args)\n )\n);\n\n/**\n */\nconst useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: Object | null\n): any => useSelector(getMessage)(id, defaultMessage, placeholders);\n\n/**\n */\nconst useTranslate = (): ((...any) => any) => useSelector(getMessage);\n\n/**\n */\nconst useLocale = (): string => useSelector(getLocale);\n\nexport { useTranslate, useMessage, useLocale };\n"],"mappings":";;;;;;;;AACA;AACA;AACA;AAEA;AAEA,MAAMA,UAAU,GAAG,IAAAC,wBAAc,EAC/B,CAACC,gBAAU,EAAEC,eAAS,CAAC,EACvB,CAACC,OAAO,EAAEC,UAAU,KAClB,IAAAC,gBAAO,EACL,CAACC,EAAU,EAAEC,cAAuB,EAAEC,YAAqB,KACzDL,OAAO,CACJD,SAAS,CAACE,UAAU,CAAC,CACrBL,UAAU,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC,EACjD;EAAA,kCAAIC,IAAI;IAAJA,IAAI;EAAA;EAAA,OAAK,wBAAeA,IAAI,CAAC;AAAA,EAClC,CACJ;;AAED;AACA;AACA,MAAMC,UAAU,GAAG,CACjBJ,EAAU,EACVC,cAAuB,EACvBC,YAA4B,KACpB,IAAAG,uBAAW,EAACZ,UAAU,CAAC,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC;;AAEnE;AACA;AADA;AAEA,MAAMI,YAAY,GAAG,MAAyB,IAAAD,uBAAW,EAACZ,UAAU,CAAC;;AAErE;AACA;AADA;AAEA,MAAMc,SAAS,GAAG,MAAc,IAAAF,uBAAW,EAACT,eAAS,CAAC;AAAC"}
@@ -10,7 +10,6 @@ var _react = require("react");
10
10
  var _reactRedux = require("react-redux");
11
11
  var _Modals = require("../redux/actions/Modals");
12
12
  var _exceptions = require("../exceptions");
13
-
14
13
  /**
15
14
  * Manage modals
16
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useModal.js","names":["useModal","modalId","IllegalArgumentException","dispatch","useDispatch","modal","useSelector","modals","m","key","show","useCallback","showModal","close","closeModal","size","visible"],"sources":["../../src/hooks/useModal.js"],"sourcesContent":["// @flow\nimport { useCallback } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../redux/actions/Modals\";\nimport { IllegalArgumentException } from \"../exceptions\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null,\n size: string | null,\n visible: boolean,\n show: () => void,\n close: () => void,\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\"\n );\n }\n\n const dispatch = useDispatch();\n const modal = useSelector(({ modals }) =>\n modals.modals.find((m) => m.key === modalId)\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n"],"mappings":";;;;;;;;AACA;AACA;AAEA;AACA;;AAUA;AACA;AACA;AACO,MAAMA,QAAmB,GAAIC,OAAe,IAAK;EACtD,IAAI,CAACA,OAAO,EAAE;IACZ,MAAM,IAAIC,oCAAwB,CAChC,4CAA4C,CAC7C;EACH;EAEA,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAC9B,MAAMC,KAAK,GAAG,IAAAC,uBAAW,EAAC;IAAA;IAAA,IAAC;MAAEC;IAAO,CAAC;IAAA,OACnC,8BAAAA,MAAM,CAACA,MAAM,iBAAOC,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKR,OAAO,CAAC;EAAA,EAC7C;EAED,MAAMS,IAAI,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAC7BR,QAAQ,CAAC,IAAAS,iBAAS,EAACX,OAAO,CAAC,CAAC;EAC9B,CAAC,EAAE,CAACE,QAAQ,EAAEF,OAAO,CAAC,CAAC;EAEvB,MAAMY,KAAK,GAAG,IAAAF,kBAAW,EAAC,MAAM;IAC9BR,QAAQ,CAAC,IAAAW,kBAAU,EAACb,OAAO,CAAC,CAAC;EAC/B,CAAC,EAAE,CAACE,QAAQ,EAAEF,OAAO,CAAC,CAAC;EAEvB,OAAO;IACLQ,GAAG,EAAEJ,KAAK,GAAGA,KAAK,CAACI,GAAG,GAAG,IAAI;IAC7BM,IAAI,EAAEV,KAAK,GAAGA,KAAK,CAACU,IAAI,GAAG,IAAI;IAC/BC,OAAO,EAAEX,KAAK,GAAGA,KAAK,CAACW,OAAO,GAAG,KAAK;IACtCN,IAAI;IACJG;EACF,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"file":"useModal.js","names":["useModal","modalId","IllegalArgumentException","dispatch","useDispatch","modal","useSelector","modals","m","key","show","useCallback","showModal","close","closeModal","size","visible"],"sources":["../../src/hooks/useModal.js"],"sourcesContent":["// @flow\nimport { useCallback } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../redux/actions/Modals\";\nimport { IllegalArgumentException } from \"../exceptions\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null,\n size: string | null,\n visible: boolean,\n show: () => void,\n close: () => void,\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\"\n );\n }\n\n const dispatch = useDispatch();\n const modal = useSelector(({ modals }) =>\n modals.modals.find((m) => m.key === modalId)\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n"],"mappings":";;;;;;;;AACA;AACA;AAEA;AACA;AAUA;AACA;AACA;AACO,MAAMA,QAAmB,GAAIC,OAAe,IAAK;EACtD,IAAI,CAACA,OAAO,EAAE;IACZ,MAAM,IAAIC,oCAAwB,CAChC,4CAA4C,CAC7C;EACH;EAEA,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAC9B,MAAMC,KAAK,GAAG,IAAAC,uBAAW,EAAC;IAAA;IAAA,IAAC;MAAEC;IAAO,CAAC;IAAA,OACnC,8BAAAA,MAAM,CAACA,MAAM,iBAAOC,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKR,OAAO,CAAC;EAAA,EAC7C;EAED,MAAMS,IAAI,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAC7BR,QAAQ,CAAC,IAAAS,iBAAS,EAACX,OAAO,CAAC,CAAC;EAC9B,CAAC,EAAE,CAACE,QAAQ,EAAEF,OAAO,CAAC,CAAC;EAEvB,MAAMY,KAAK,GAAG,IAAAF,kBAAW,EAAC,MAAM;IAC9BR,QAAQ,CAAC,IAAAW,kBAAU,EAACb,OAAO,CAAC,CAAC;EAC/B,CAAC,EAAE,CAACE,QAAQ,EAAEF,OAAO,CAAC,CAAC;EAEvB,OAAO;IACLQ,GAAG,EAAEJ,KAAK,GAAGA,KAAK,CAACI,GAAG,GAAG,IAAI;IAC7BM,IAAI,EAAEV,KAAK,GAAGA,KAAK,CAACU,IAAI,GAAG,IAAI;IAC/BC,OAAO,EAAEX,KAAK,GAAGA,KAAK,CAACW,OAAO,GAAG,KAAK;IACtCN,IAAI;IACJG;EACF,CAAC;AACH,CAAC;AAAC"}
@@ -16,7 +16,6 @@ var _ContentTOCModel = _interopRequireDefault(require("../models/content/Content
16
16
  var _ContentModel = _interopRequireDefault(require("../models/content/ContentModel"));
17
17
  var _useModularUIBasic = require("./useModularUIBasic");
18
18
  var _models = require("../models");
19
-
20
19
  /**
21
20
  */
22
21
  const useModelCatalog = () => (0, _useModularUIBasic.useModularUIBasic)("modelcatalog", "/modelcatalog", {
@@ -38,7 +37,7 @@ const getHref = (context, dynamic, location) => {
38
37
  href = `/${context}/${href}`;
39
38
  }
40
39
  href = href.replace(/\/\//g, "/");
41
- if (location !== null && location !== void 0 && location.search) {
40
+ if (location?.search) {
42
41
  href = `${href}${location.search}`;
43
42
  }
44
43
  return href;
@@ -1 +1 @@
1
- {"version":3,"file":"useModelCatalog.js","names":["useModelCatalog","useModularUIBasic","expectedModels","targetModel","ModelCatalogModel","useConceptIndex","href","ConceptIndexModel","getHref","context","dynamic","location","replace","search","useConceptDetail","concept","useLocation","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"sources":["../../src/hooks/useModelCatalog.js"],"sourcesContent":["// @flow\nimport { useLocation } from \"./useRouter\";\n\nimport ModelCatalogModel from \"../models/modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"../models/concepts/ConceptIndexModel\";\nimport ConceptDetailModel from \"../models/concepts/ConceptDetailModel\";\nimport { default as BusinessScenarioModel } from \"../models/concepts/BusinessScenarioModel\";\nimport ContentIndexModel from \"../models/content/ContentIndexModel\";\nimport ContentTOCModel from \"../models/content/ContentTOCModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { ContentTypeModel } from \"../models\";\n\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (href: string): ?ConceptIndexModel =>\n useModularUIBasic(\"conceptindex\", href, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n\nconst getHref = (context, dynamic, location) => {\n let href = dynamic;\n if (!href.startsWith(`/${context}/`)) {\n href = `/${context}/${href}`;\n }\n\n href = href.replace(/\\/\\//g, \"/\");\n\n if (location?.search) {\n href = `${href}${location.search}`;\n }\n\n return href;\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = getHref(\"concepts\", concept, location);\n return useModularUIBasic(\"conceptdetail\", href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n });\n};\n\n/**\n */\nexport const useContentIndex = (href: string): ?ContentIndexModel =>\n useModularUIBasic(\"contentindex\", href, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n\n/**\n */\nexport const useContentTOC = (content: string): ?ContentTOCModel => {\n const location = useLocation();\n const href = getHref(\"content\", content, location);\n return useModularUIBasic(\"contenttoc\", href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n });\n};\n\n/**\n */\nexport const useContent = (contentSection: string): ?ContentModel => {\n const href = getHref(\"content\", contentSection);\n return useModularUIBasic(\"content\", href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (contentType: string): ?ContentTypeModel => {\n const href = getHref(\"contenttypes\", contentType);\n return useModularUIBasic(\"contenttypes\", href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\n};\n"],"mapp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;AAEO,MAAMe,eAAe,GAAIX,IAAY,IAC1C,IAAAL,oCAAiB,EAAC,cAAc,EAAEK,IAAI,EAAE;EACtCJ,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEe;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMC,aAAa,GAAIC,OAAe,IAAuB;EAClE,MAAMT,QAAQ,GAAG,IAAAK,sBAAW,GAAE;EAC9B,MAAMV,IAAI,GAAGE,OAAO,CAAC,SAAS,EAAEY,OAAO,EAAET,QAAQ,CAAC;EAClD,OAAO,IAAAV,oCAAiB,EAAC,YAAY,EAAEK,IAAI,EAAE;IAC3CJ,cAAc,EAAE,CAAC,YAAY,CAAC;IAC9BC,WAAW,EAAEkB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADA;AAEO,MAAMC,UAAU,GAAIC,cAAsB,IAAoB;EACnE,MAAMjB,IAAI,GAAGE,OAAO,CAAC,SAAS,EAAEe,cAAc,CAAC;EAC/C,OAAO,IAAAtB,oCAAiB,EAAC,SAAS,EAAEK,IAAI,EAAE;IACxCJ,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEqB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADA;AAEO,MAAMC,cAAc,GAAIC,WAAmB,IAAwB;EACxE,MAAMpB,IAAI,GAAGE,OAAO,CAAC,cAAc,EAAEkB,WAAW,CAAC;EACjD,OAAO,IAAAzB,oCAAiB,EAAC,cAAc,EAAEK,IAAI,EAAE;IAC7CJ,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAEwB;EACf,CAAC,CAAC;AACJ,CAAC;AAAC"}
1
+ {"version":3,"file":"useModelCatalog.js","names":["useModelCatalog","useModularUIBasic","expectedModels","targetModel","ModelCatalogModel","useConceptIndex","href","ConceptIndexModel","getHref","context","dynamic","location","replace","search","useConceptDetail","concept","useLocation","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"sources":["../../src/hooks/useModelCatalog.js"],"sourcesContent":["// @flow\nimport { useLocation } from \"./useRouter\";\n\nimport ModelCatalogModel from \"../models/modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"../models/concepts/ConceptIndexModel\";\nimport ConceptDetailModel from \"../models/concepts/ConceptDetailModel\";\nimport { default as BusinessScenarioModel } from \"../models/concepts/BusinessScenarioModel\";\nimport ContentIndexModel from \"../models/content/ContentIndexModel\";\nimport ContentTOCModel from \"../models/content/ContentTOCModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { ContentTypeModel } from \"../models\";\n\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (href: string): ?ConceptIndexModel =>\n useModularUIBasic(\"conceptindex\", href, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n\nconst getHref = (context, dynamic, location) => {\n let href = dynamic;\n if (!href.startsWith(`/${context}/`)) {\n href = `/${context}/${href}`;\n }\n\n href = href.replace(/\\/\\//g, \"/\");\n\n if (location?.search) {\n href = `${href}${location.search}`;\n }\n\n return href;\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = getHref(\"concepts\", concept, location);\n return useModularUIBasic(\"conceptdetail\", href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n });\n};\n\n/**\n */\nexport const useContentIndex = (href: string): ?ContentIndexModel =>\n useModularUIBasic(\"contentindex\", href, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n\n/**\n */\nexport const useContentTOC = (content: string): ?ContentTOCModel => {\n const location = useLocation();\n const href = getHref(\"content\", content, location);\n return useModularUIBasic(\"contenttoc\", href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n });\n};\n\n/**\n */\nexport const useContent = (contentSection: string): ?ContentModel => {\n const href = getHref(\"content\", contentSection);\n return useModularUIBasic(\"content\", href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (contentType: string): ?ContentTypeModel => {\n const href = getHref(\"contenttypes\", contentType);\n return useModularUIBasic(\"contenttypes\", href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\n};\n"],"mappings":";;;;;;;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACO,MAAMA,eAAe,GAAG,MAC7B,IAAAC,oCAAiB,EAAC,cAAc,EAAE,eAAe,EAAE;EACjDC,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEC;AACf,CAAC,CAAC;;AAEJ;AACA;AADA;AAEO,MAAMC,eAAe,GAAIC,IAAY,IAC1C,IAAAL,oCAAiB,EAAC,cAAc,EAAEK,IAAI,EAAE;EACtCJ,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEI;AACf,CAAC,CAAC;AAAC;AAEL,MAAMC,OAAO,GAAG,CAACC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,KAAK;EAC9C,IAAIL,IAAI,GAAGI,OAAO;EAClB,IAAI,CAAC,yBAAAJ,IAAI,OAAJA,IAAI,EAAa,IAAGG,OAAQ,GAAE,CAAC,EAAE;IACpCH,IAAI,GAAI,IAAGG,OAAQ,IAAGH,IAAK,EAAC;EAC9B;EAEAA,IAAI,GAAGA,IAAI,CAACM,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;EAEjC,IAAID,QAAQ,EAAEE,MAAM,EAAE;IACpBP,IAAI,GAAI,GAAEA,IAAK,GAAEK,QAAQ,CAACE,MAAO,EAAC;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AC,cAAc,EAAEkB,WAAW,CAAC;EACjD,OAAO,IAAAzB,oCAAiB,EAAC,cAAc,EAAEK,IAAI,EAAE;IAC7CJ,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAEwB;EACf,CAAC,CAAC;AACJ,CAAC;AAAC"}
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useModels = void 0;
7
7
  var _reactRedux = require("react-redux");
8
8
  var _actions = require("../redux/_modularui/actions");
9
-
10
9
  /**
11
10
  * Hook that contains the reload property that can be used to reload a model
12
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useModels.js","names":["useModels","dispatch","useDispatch","reload","model","options","reloadModel"],"sources":["../../src/hooks/useModels.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport { reloadModel } from \"../redux/_modularui/actions\";\n\nimport type { ModularUIModel } from \"../models/types\";\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: any) => void,\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useDispatch();\n return {\n reload: (model: ModularUIModel, options?: Object) => {\n dispatch(reloadModel(model, options));\n },\n };\n};\n"],"mappings":";;;;;;AACA;AAEA;;AAQA;AACA;AACA;AACO,MAAMA,SAAoB,GAAG,MAAM;EACxC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAC9B,OAAO;IACLC,MAAM,EAAE,CAACC,KAAqB,EAAEC,OAAgB,KAAK;MACnDJ,QAAQ,CAAC,IAAAK,oBAAW,EAACF,KAAK,EAAEC,OAAO,CAAC,CAAC;IACvC;EACF,CAAC;AACH,CAAC;AAAC"}
1
+ {"version":3,"file":"useModels.js","names":["useModels","dispatch","useDispatch","reload","model","options","reloadModel"],"sources":["../../src/hooks/useModels.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport { reloadModel } from \"../redux/_modularui/actions\";\n\nimport type { ModularUIModel } from \"../models/types\";\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: any) => void,\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useDispatch();\n return {\n reload: (model: ModularUIModel, options?: Object) => {\n dispatch(reloadModel(model, options));\n },\n };\n};\n"],"mappings":";;;;;;AACA;AAEA;AAQA;AACA;AACA;AACO,MAAMA,SAAoB,GAAG,MAAM;EACxC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAC9B,OAAO;IACLC,MAAM,EAAE,CAACC,KAAqB,EAAEC,OAAgB,KAAK;MACnDJ,QAAQ,CAAC,IAAAK,oBAAW,EAACF,KAAK,EAAEC,OAAO,CAAC,CAAC;IACvC;EACF,CAAC;AACH,CAAC;AAAC"}
@@ -11,7 +11,6 @@ var _constants = require("../constants");
11
11
  var _actions = require("../redux/_modularui/actions");
12
12
  var _useDeepCompareEffect = _interopRequireDefault(require("./useDeepCompareEffect"));
13
13
  var _useI18n = require("./useI18n");
14
-
15
14
  /**
16
15
  */
17
16
  const useKeyForHook = (modelKey, url) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUI.js","names":["useKeyForHook","modelKey","url","locale","useLocale","split","useModularUI","options","method","HTTP_METHODS","GET","removeOnUnmount","dispatch","useDispatch","href","toString","key","prevOptions","useRef","prevHref","useDeepCompareEffect","isOldReload","current","isReload","loadModularUI","useEffect","removeModelByKey","useSelector","state","modularui"],"sources":["../../src/hooks/useModularUI.js"],"sourcesContent":["// @flow\nimport { useEffect, useRef } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { HTTP_METHODS } from \"../constants\";\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui/actions\";\n\nimport useDeepCompareEffect from \"./useDeepCompareEffect\";\n\nimport { useLocale } from \"./useI18n\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestBaseOptions } from \"../utils\";\n\n/**\n */\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useLocale();\n return `${modelKey}(${url.split(\"?\")[0]})(${locale})`;\n};\n\n/**\n * Use redux action and selector to retrieve the correct modular ui service model\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: RequestBaseOptions = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: false,\n }\n): any => {\n const dispatch = useDispatch();\n const href = url.toString();\n const key = useKeyForHook(modelKey, href);\n\n const prevOptions = useRef(options);\n const prevHref = useRef(href);\n\n // dispatch loadModularUI\n useDeepCompareEffect(() => {\n // prevent reloads when previous option had the isReload, but the new options not\n const isOldReload =\n prevHref.current === href &&\n prevOptions.current.isReload &&\n !options.isReload;\n\n if (!isOldReload) {\n dispatch(loadModularUI(key, href, options));\n }\n\n prevOptions.current = options;\n prevHref.current = href;\n }, [key, href, options]);\n\n const { removeOnUnmount = false } = options;\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(key));\n }\n };\n }, [dispatch, key, removeOnUnmount]);\n\n // retrieve current model from modularui reducer\n return useSelector((state) => {\n return state.modularui[key];\n });\n};\n"],"mappings":";;;;;;;AACA;AACA;AAEA;AACA;AAEA;AAEA;;AAKA;AACA;AACA,MAAMA,aAAa,GAAG,CAACC,QAAgB,EAAEC,GAAW,KAAK;EACvD,MAAMC,MAAM,GAAG,IAAAC,kBAAS,GAAE;EAC1B,OAAQ,GAAEH,QAAS,IAAGC,GAAG,CAACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,KAAIF,MAAO,GAAE;AACvD,CAAC;;AAED;AACA;AACA;AACO,MAAMG,YAAY,GAAG,UAC1BL,QAAgB,EAChBC,GAAkB,EAKV;EAAA,IAJRK,OAA2B,uEAAG;IAC5BC,MAAM,EAAEC,uBAAY,CAACC,GAAG;IACxBC,eAAe,EAAE;EACnB,CAAC;EAED,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,GAAE;EAC9B,MAAMC,IAAI,GAAGZ,GAAG,CAACa,QAAQ,EAAE;EAC3B,MAAMC,GAAG,GAAGhB,aAAa,CAACC,QAAQ,EAAEa,IAAI,CAAC;EAEzC,MAAMG,WAAW,GAAG,IAAAC,aAAM,EAACX,OAAO,CAAC;EACnC,MAAMY,QAAQ,GAAG,IAAAD,aAAM,EAACJ,IAAI,CAAC;;EAE7B;EACA,IAAAM,6BAAoB,EAAC,MAAM;IACzB;IACA,MAAMC,WAAW,GACfF,QAAQ,CAACG,OAAO,KAAKR,IAAI,IACzBG,WAAW,CAACK,OAAO,CAACC,QAAQ,IAC5B,CAAChB,OAAO,CAACgB,QAAQ;IAEnB,IAAI,CAACF,WAAW,EAAE;MAChBT,QAAQ,CAAC,IAAAY,sBAAa,EAACR,GAAG,EAAEF,IAAI,EAAEP,OAAO,CAAC,CAAC;IAC7C;IAEAU,WAAW,CAACK,OAAO,GAAGf,OAAO;IAC7BY,QAAQ,CAACG,OAAO,GAAGR,IAAI;EACzB,CAAC,EAAE,CAACE,GAAG,EAAEF,IAAI,EAAEP,OAAO,CAAC,CAAC;EAExB,MAAM;IAAEI,eAAe,GAAG;EAAM,CAAC,GAAGJ,OAAO;EAC3C,IAAAkB,gBAAS,EAAC,MAAM;IACd,OAAO,MAAM;MACX,IAAId,eAAe,EAAE;QACnBC,QAAQ,CAAC,IAAAc,yBAAgB,EAACV,GAAG,CAAC,CAAC;MACjC;IACF,CAAC;EACH,CAAC,EAAE,CAACJ,QAAQ,EAAEI,GAAG,EAAEL,eAAe,CAAC,CAAC;;EAEpC;EACA,OAAO,IAAAgB,uBAAW,EAAEC,KAAK,IAAK;IAC5B,OAAOA,KAAK,CAACC,SAAS,CAACb,GAAG,CAAC;EAC7B,CAAC,CAAC;AACJ,CAAC;AAAC"}
1
+ {"version":3,"file":"useModularUI.js","names":["useKeyForHook","modelKey","url","locale","useLocale","split","useModularUI","options","method","HTTP_METHODS","GET","removeOnUnmount","dispatch","useDispatch","href","toString","key","prevOptions","useRef","prevHref","useDeepCompareEffect","isOldReload","current","isReload","loadModularUI","useEffect","removeModelByKey","useSelector","state","modularui"],"sources":["../../src/hooks/useModularUI.js"],"sourcesContent":["// @flow\nimport { useEffect, useRef } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { HTTP_METHODS } from \"../constants\";\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui/actions\";\n\nimport useDeepCompareEffect from \"./useDeepCompareEffect\";\n\nimport { useLocale } from \"./useI18n\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestBaseOptions } from \"../utils\";\n\n/**\n */\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useLocale();\n return `${modelKey}(${url.split(\"?\")[0]})(${locale})`;\n};\n\n/**\n * Use redux action and selector to retrieve the correct modular ui service model\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: RequestBaseOptions = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: false,\n }\n): any => {\n const dispatch = useDispatch();\n const href = url.toString();\n const key = useKeyForHook(modelKey, href);\n\n const prevOptions = useRef(options);\n const prevHref = useRef(href);\n\n // dispatch loadModularUI\n useDeepCompareEffect(() => {\n // prevent reloads when previous option had the isReload, but the new options not\n const isOldReload =\n prevHref.current === href &&\n prevOptions.current.isReload &&\n !options.isReload;\n\n if (!isOldReload) {\n dispatch(loadModularUI(key, href, options));\n }\n\n prevOptions.current = options;\n prevHref.current = href;\n }, [key, href, options]);\n\n const { removeOnUnmount = false } = options;\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(key));\n }\n };\n }, [dispatch, key, removeOnUnmount]);\n\n // retrieve current model from modularui reducer\n return useSelector((state) => {\n return state.modularui[key];\n });\n};\n"],"mappings":";;;;;;;AACA;AACA;AAEA;AACA;AAEA;AAEA;AAKA;AACA;AACA,MAAMA,aAAa,GAAG,CAACC,QAAgB,EAAEC,GAAW,KAAK;EACvD,MAAMC,MAAM,GAAG,IAAAC,kBAAS,GAAE;EAC1B,OAAQ,GAAEH,QAAS,IA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QAAQ,EAAEI,GAAG,EAAEL,eAAe,CAAC,CAAC;;EAEpC;EACA,OAAO,IAAAgB,uBAAW,EAAEC,KAAK,IAAK;IAC5B,OAAOA,KAAK,CAACC,SAAS,CAACb,GAAG,CAAC;EAC7B,CAAC,CAAC;AACJ,CAAC;AAAC"}
@@ -9,11 +9,10 @@ var _startsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js
9
9
  var _useModularUI = require("./useModularUI");
10
10
  var _useRouter = require("./useRouter");
11
11
  var _exceptions = require("../exceptions");
12
-
13
12
  /**
14
13
  */
15
14
  const useModularUIBasic = function (key, href) {
16
- var _location$state, _context;
15
+ var _context;
17
16
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
18
17
  expectedModels: [],
19
18
  targetModel: undefined
@@ -28,11 +27,11 @@ const useModularUIBasic = function (key, href) {
28
27
  }
29
28
 
30
29
  // reload when the modular service starts with the current location
31
- if ((_location$state = location.state) !== null && _location$state !== void 0 && _location$state.reload && (0, _startsWith.default)(_context = location.pathname).call(_context, href.toString())) {
30
+ if (location.state?.reload && (0, _startsWith.default)(_context = location.pathname).call(_context, href.toString())) {
32
31
  useModularUIOptions.isReload = true;
33
32
  }
34
33
  const modularUI = (0, _useModularUI.useModularUI)(key, href, useModularUIOptions);
35
- if (modularUI !== null && modularUI !== void 0 && modularUI.model) {
34
+ if (modularUI?.model) {
36
35
  const {
37
36
  model
38
37
  } = modularUI;
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUIBasic.js","names":["useModularUIBasic","key","href","options","expectedModels","targetModel","undefined","location","useLocation","IllegalArgumentException","useModularUIOptions","state","reload","pathname","toString","isReload","modularUI","useModularUI","model","length","isCorrectModel","some","expectedModel","type","console","error","IllegalStateException"],"sources":["../../src/hooks/useModularUIBasic.js"],"sourcesContent":["// @flow\nimport { useModularUI } from \"./useModularUI\";\n\nimport { useLocation } from \"./useRouter\";\n\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport type { ModularUIModel, Href } from \"../models\";\n\ntype UseModularUIBasicOptions<T> = {\n expectedModels: Array<string>,\n targetModel?: Class<T>,\n};\n\n/**\n */\nexport const useModularUIBasic = <T: ModularUIModel>(\n key: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {\n expectedModels: [],\n targetModel: undefined,\n }\n): ?T => {\n const location = useLocation();\n if (!href) {\n throw new IllegalArgumentException(\"Missing href\");\n }\n\n const useModularUIOptions = {};\n if (options.targetModel) {\n useModularUIOptions.targetModel = options.targetModel;\n }\n\n // reload when the modular service starts with the current location\n if (location.state?.reload && location.pathname.startsWith(href.toString())) {\n useModularUIOptions.isReload = true;\n }\n\n const modularUI = useModularUI(key, href, useModularUIOptions);\n\n if (modularUI?.model) {\n const { model } = modularUI;\n if (options.expectedModels.length > 0) {\n const isCorrectModel = options.expectedModels.some((expectedModel) => {\n return model.type === expectedModel;\n });\n\n if (!isCorrectModel) {\n console.error(modularUI, \"is not of instance\", options.expectedModels);\n throw new IllegalStateException(\"Resolved model has incorrect type\");\n }\n }\n\n return model;\n }\n};\n"],"mappings":";;;;;;;;AACA;AAEA;AAEA;;AASA;AACA;AACO,MAAMA,iBAAiB,GAAG,UAC/BC,GAAW,EACXC,IAAmB,EAKZ;EAAA;EAAA,IAJPC,OAAoC,uEAAG;IACrCC,cAAc,EAAE,EAAE;IAClBC,WAAW,EAAEC;EACf,CAAC;EAED,MAAMC,QAAQ,GAAG,IAAAC,sBAAW,GAAE;EAC9B,IAAI,CAACN,IAAI,EAAE;IACT,MAAM,IAAIO,oCAAwB,CAAC,cAAc,CAAC;EACpD;EAEA,MAAMC,mBAAmB,GAAG,CAAC,CAAC;EAC9B,IAAIP,OAAO,CAACE,WAAW,EAAE;IACvBK,mBAAmB,CAACL,WAAW,GAAGF,OAAO,CAACE,WAAW;EACvD;;EAEA;EACA,IAAI,mBAAAE,QAAQ,CAACI,KAAK,4CAAd,gBAAgBC,MAAM,IAAI,oCAAAL,QAAQ,CAACM,QAAQ,iBAAYX,IAAI,CAACY,QAAQ,EAAE,CAAC,EAAE;IAC3EJ,mBAAmB,CAACK,QAAQ,GAAG,IAAI;EACrC;EAEA,MAAMC,SAAS,GAAG,IAAAC,0BAAY,EAAChB,GAAG,EAAEC,IAAI,EAAEQ,mBAAmB,CAAC;EAE9D,IAAIM,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEE,KAAK,EAAE;IACpB,MAAM;MAAEA;IAAM,CAAC,GAAGF,SAAS;IAC3B,IAAIb,OAAO,CAACC,cAAc,CAACe,MAAM,GAAG,CAAC,EAAE;MACrC,MAAMC,cAAc,GAAGjB,OAAO,CAACC,cAAc,CAACiB,IAAI,CAAEC,aAAa,IAAK;QACpE,OAAOJ,KAAK,CAACK,IAAI,KAAKD,aAAa;MACrC,CAAC,CAAC;MAEF,IAAI,CAACF,cAAc,EAAE;QACnBI,OAAO,CAACC,KAAK,CAACT,SAAS,EAAE,oBAAoB,EAAEb,OAAO,CAACC,cAAc,CAAC;QACtE,MAAM,IAAIsB,iCAAqB,CAAC,mCAAmC,CAAC;MACtE;IACF;IAEA,OAAOR,KAAK;EACd;AACF,CAAC;AAAC"}
1
+ {"version":3,"file":"useModularUIBasic.js","names":["useModularUIBasic","key","href","options","expectedModels","targetModel","undefined","location","useLocation","IllegalArgumentException","useModularUIOptions","state","reload","pathname","toString","isReload","modularUI","useModularUI","model","length","isCorrectModel","some","expectedModel","type","console","error","IllegalStateException"],"sources":["../../src/hooks/useModularUIBasic.js"],"sourcesContent":["// @flow\nimport { useModularUI } from \"./useModularUI\";\n\nimport { useLocation } from \"./useRouter\";\n\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport type { ModularUIModel, Href } from \"../models\";\n\ntype UseModularUIBasicOptions<T> = {\n expectedModels: Array<string>,\n targetModel?: Class<T>,\n};\n\n/**\n */\nexport const useModularUIBasic = <T: ModularUIModel>(\n key: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {\n expectedModels: [],\n targetModel: undefined,\n }\n): ?T => {\n const location = useLocation();\n if (!href) {\n throw new IllegalArgumentException(\"Missing href\");\n }\n\n const useModularUIOptions = {};\n if (options.targetModel) {\n useModularUIOptions.targetModel = options.targetModel;\n }\n\n // reload when the modular service starts with the current location\n if (location.state?.reload && location.pathname.startsWith(href.toString())) {\n useModularUIOptions.isReload = true;\n }\n\n const modularUI = useModularUI(key, href, useModularUIOptions);\n\n if (modularUI?.model) {\n const { model } = modularUI;\n if (options.expectedModels.length > 0) {\n const isCorrectModel = options.expectedModels.some((expectedModel) => {\n return model.type === expectedModel;\n });\n\n if (!isCorrectModel) {\n console.error(modularUI, \"is not of instance\", options.expectedModels);\n throw new IllegalStateException(\"Resolved model has incorrect type\");\n }\n }\n\n return model;\n }\n};\n"],"mappings":";;;;;;;;AACA;AAEA;AAEA;AASA;AACA;AACO,MAAMA,iBAAiB,GAAG,UAC/BC,GAAW,EACXC,IAAmB,EAKZ;EAAA;EAAA,IAJPC,OAAoC,uEAAG;IACrCC,cAAc,EAAE,EAAE;IAClBC,WAAW,EAAEC;EACf,CAAC;EAED,MAAMC,QAAQ,GAAG,IAAAC,sBAAW,GAAE;EAC9B,IAAI,CAACN,IAAI,EAAE;IACT,MAAM,IAAIO,oCAAwB,CAAC,cAAc,CAAC;EACpD;EAEA,MAAMC,mBAAmB,GAAG,CAAC,CAAC;EAC9B,IAAIP,OAAO,CAACE,WAAW,EAAE;IACvBK,mBAAmB,CAACL,WAAW,GAAGF,OAAO,CAACE,WAAW;EACvD;;EAEA;EACA,IAAIE,QAAQ,CAACI,KAAK,EAAEC,MAAM,IAAI,oCAAAL,QAAQ,CAACM,QAAQ,iBAAYX,IAAI,CAACY,QAAQ,EAAE,CAAC,EAAE;IAC3EJ,mBAAmB,CAACK,QAAQ,GAAG,IAAI;EACrC;EAEA,MAAMC,SAAS,GAAG,IAAAC,0BAAY,EAAChB,GAAG,EAAEC,IAAI,EAAEQ,mBAAmB,CAAC;EAE9D,IAAIM,SAAS,EAAEE,KAAK,EAAE;IACpB,MAAM;MAAEA;IAAM,CAAC,GAAGF,SAAS;IAC3B,IAAIb,OAAO,CAACC,cAAc,CAACe,MAAM,GAAG,CAAC,EAAE;MACrC,MAAMC,cAAc,GAAGjB,OAAO,CAACC,cAAc,CAACiB,IAAI,CAAEC,aAAa,IAAK;QACpE,OAAOJ,KAAK,CAACK,IAAI,KAAKD,aAAa;MACrC,CAAC,CAAC;MAEF,IAAI,CAACF,cAAc,EAAE;QACnBI,OAAO,CAACC,KAAK,CAACT,SAAS,EAAE,oBAAoB,EAAEb,OAAO,CAACC,cAAc,CAAC;QACtE,MAAM,IAAIsB,iCAAqB,CAAC,mCAAmC,CAAC;MACtE;IACF;IAEA,OAAOR,KAAK;EACd;AACF,CAAC;AAAC"}
@@ -15,7 +15,6 @@ var _CaseSearchModel = _interopRequireDefault(require("../models/search/CaseSear
15
15
  var _ListDetailModel = _interopRequireDefault(require("../models/list/ListDetailModel"));
16
16
  var _UserProfileModel = _interopRequireDefault(require("../models/user/UserProfileModel"));
17
17
  var _useModularUIBasic = require("./useModularUIBasic");
18
-
19
18
  /**
20
19
  * Load application
21
20
  */