@beinformed/ui 1.25.0 → 1.25.1-beta.1

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 (534) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  3. package/esm/constants/Settings.js.map +1 -1
  4. package/esm/hooks/useAuthentication.js +1 -1
  5. package/esm/hooks/useAuthentication.js.map +1 -1
  6. package/esm/hooks/useModelCatalog.js +0 -1
  7. package/esm/hooks/useModelCatalog.js.map +1 -1
  8. package/esm/hooks/useModels.js +1 -1
  9. package/esm/hooks/useModels.js.map +1 -1
  10. package/esm/hooks/useModularUI.js +1 -1
  11. package/esm/hooks/useModularUI.js.map +1 -1
  12. package/esm/hooks/useModularUIBasic.js +4 -1
  13. package/esm/hooks/useModularUIBasic.js.map +1 -1
  14. package/esm/hooks/useRouter.js +1 -1
  15. package/esm/hooks/useRouter.js.map +1 -1
  16. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  17. package/esm/models/attributes/AttributeModel.js.map +1 -1
  18. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  19. package/esm/models/attributes/NumberAttributeModel.js +5 -2
  20. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  21. package/esm/models/attributes/_createAttribute.js.map +1 -1
  22. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  23. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  24. package/esm/models/base/ResourceModel.js.map +1 -1
  25. package/esm/models/content/ContentTOCModel.js.map +1 -1
  26. package/esm/models/filters/FilterCollection.js.map +1 -1
  27. package/esm/models/form/FormModel.js.map +1 -1
  28. package/esm/models/links/LinkModel.js +3 -1
  29. package/esm/models/links/LinkModel.js.map +1 -1
  30. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  31. package/esm/models/list/ListModel.js.map +1 -1
  32. package/esm/models/parameter/Parameter.js +1 -1
  33. package/esm/models/parameter/Parameter.js.map +1 -1
  34. package/esm/models/types.js.map +1 -1
  35. package/esm/modularui/ModularUIRequest.js.map +1 -1
  36. package/esm/react-client/client.js +1 -1
  37. package/esm/react-client/client.js.map +1 -1
  38. package/esm/react-client/rehydrate.js.map +1 -1
  39. package/esm/react-server/createSSRComplete.js.map +1 -1
  40. package/esm/react-server/renderSSRComplete.js +4 -2
  41. package/esm/react-server/renderSSRComplete.js.map +1 -1
  42. package/esm/react-server/serverUtil.js +18 -9
  43. package/esm/react-server/serverUtil.js.map +1 -1
  44. package/esm/react-theme/ThemeProvider.js +1 -1
  45. package/esm/react-theme/ThemeProvider.js.map +1 -1
  46. package/esm/react-theme/createTheme.js +8 -3
  47. package/esm/react-theme/createTheme.js.map +1 -1
  48. package/esm/react-theme/utils/contrast.js +3 -1
  49. package/esm/react-theme/utils/contrast.js.map +1 -1
  50. package/esm/react-theme/utils/corners.js +3 -1
  51. package/esm/react-theme/utils/corners.js.map +1 -1
  52. package/esm/react-theme/utils/spacers.js +9 -3
  53. package/esm/react-theme/utils/spacers.js.map +1 -1
  54. package/esm/redux/_i18n/{actions.js → I18nActions.js} +1 -1
  55. package/esm/redux/_i18n/I18nActions.js.map +1 -0
  56. package/esm/redux/_i18n/{reducer.js → I18nReducer.js} +1 -1
  57. package/esm/redux/_i18n/I18nReducer.js.map +1 -0
  58. package/esm/redux/_i18n/index.js +2 -2
  59. package/esm/redux/_i18n/index.js.map +1 -1
  60. package/esm/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
  61. package/esm/redux/_modularui/ModularUIActions.js.map +1 -0
  62. package/esm/redux/_modularui/{connector.js → ModularUIConnector.js} +5 -5
  63. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -0
  64. package/esm/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +2 -2
  65. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -0
  66. package/esm/redux/_modularui/{reducer.js → ModularUIReducer.js} +4 -6
  67. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -0
  68. package/esm/redux/_modularui/{selectors.js → ModularUISelectors.js} +1 -1
  69. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -0
  70. package/esm/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +1 -1
  71. package/esm/redux/_modularui/{modularuiUtils.js.map → ModularUIUtils.js.map} +1 -1
  72. package/esm/redux/_modularui/index.js +6 -6
  73. package/esm/redux/_modularui/index.js.map +1 -1
  74. package/esm/redux/_modularui/types.js.map +1 -1
  75. package/esm/redux/_modularui/withModularUI.js +1 -1
  76. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  77. package/esm/redux/_router/{actions.js → RouterActions.js} +1 -1
  78. package/esm/redux/_router/RouterActions.js.map +1 -0
  79. package/esm/redux/_router/{connectors.js → RouterConnectors.js} +2 -2
  80. package/esm/redux/_router/RouterConnectors.js.map +1 -0
  81. package/esm/redux/_router/{middleware.js → RouterMiddleware.js} +1 -1
  82. package/esm/redux/_router/RouterMiddleware.js.map +1 -0
  83. package/esm/redux/_router/{reducer.js → RouterReducer.js} +1 -1
  84. package/esm/redux/_router/RouterReducer.js.map +1 -0
  85. package/esm/redux/_router/index.js +4 -4
  86. package/esm/redux/_router/index.js.map +1 -1
  87. package/esm/redux/actions/Application.js +2 -2
  88. package/esm/redux/actions/Application.js.map +1 -1
  89. package/esm/redux/actions/Authorization.js +3 -3
  90. package/esm/redux/actions/Authorization.js.map +1 -1
  91. package/esm/redux/actions/Error.js +1 -1
  92. package/esm/redux/actions/Error.js.map +1 -1
  93. package/esm/redux/actions/Form.js +2 -2
  94. package/esm/redux/actions/Form.js.map +1 -1
  95. package/esm/redux/actions/FormAttributeSet.js +1 -1
  96. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  97. package/esm/redux/actions/FormAttributeSetRepeatable.js +1 -1
  98. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  99. package/esm/redux/actions/FormAutosave.js +1 -1
  100. package/esm/redux/actions/FormAutosave.js.map +1 -1
  101. package/esm/redux/actions/FormAutosubmit.js +1 -1
  102. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  103. package/esm/redux/actions/FormValidations.js +1 -1
  104. package/esm/redux/actions/FormValidations.js.map +1 -1
  105. package/esm/redux/actions/Notification.js.map +1 -1
  106. package/esm/redux/actions/Preferences.js +1 -1
  107. package/esm/redux/actions/Preferences.js.map +1 -1
  108. package/esm/redux/actions/SignIn.js +1 -1
  109. package/esm/redux/actions/SignIn.js.map +1 -1
  110. package/esm/redux/actions/SignOut.js +1 -1
  111. package/esm/redux/actions/SignOut.js.map +1 -1
  112. package/esm/redux/connectors/Application.js +1 -1
  113. package/esm/redux/connectors/Application.js.map +1 -1
  114. package/esm/redux/connectors/Breadcrumb.js +1 -1
  115. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  116. package/esm/redux/connectors/CaseView.js +1 -1
  117. package/esm/redux/connectors/CaseView.js.map +1 -1
  118. package/esm/redux/connectors/ConceptDetail.js +1 -1
  119. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  120. package/esm/redux/connectors/ContentBrowser.js +1 -1
  121. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  122. package/esm/redux/connectors/ContentDetail.js +1 -1
  123. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  124. package/esm/redux/connectors/ContentDetailSection.js +1 -1
  125. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  126. package/esm/redux/connectors/Form.js +1 -1
  127. package/esm/redux/connectors/Form.js.map +1 -1
  128. package/esm/redux/connectors/ListDetail.js +1 -1
  129. package/esm/redux/connectors/ListDetail.js.map +1 -1
  130. package/esm/redux/connectors/ModelCatalog.js +1 -1
  131. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  132. package/esm/redux/connectors/PanelRenderer.js +1 -1
  133. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  134. package/esm/redux/connectors/Preferences.js.map +1 -1
  135. package/esm/redux/connectors/QuickSearch.js +2 -2
  136. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  137. package/esm/redux/connectors/SignIn.js +1 -1
  138. package/esm/redux/connectors/SignIn.js.map +1 -1
  139. package/esm/redux/connectors/SignOut.js.map +1 -1
  140. package/esm/redux/connectors/Tab.js +1 -1
  141. package/esm/redux/connectors/Tab.js.map +1 -1
  142. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  143. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  144. package/esm/redux/reducers/createReducer.js +3 -3
  145. package/esm/redux/reducers/createReducer.js.map +1 -1
  146. package/esm/redux/store/configureStore.js +4 -4
  147. package/esm/redux/store/configureStore.js.map +1 -1
  148. package/esm/utils/fetch/universalFetch.js +3 -2
  149. package/esm/utils/fetch/universalFetch.js.map +1 -1
  150. package/esm/utils/fetch/xhr.js.map +1 -1
  151. package/esm/utils/helpers/objects.js +4 -3
  152. package/esm/utils/helpers/objects.js.map +1 -1
  153. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  154. package/esm/utils/number/parseNumbers.js.map +1 -1
  155. package/lib/builder/mergeLayoutHintConfigurations.js.flow +1 -1
  156. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  157. package/lib/constants/Settings.js.flow +1 -1
  158. package/lib/constants/Settings.js.map +1 -1
  159. package/lib/hooks/useAuthentication.js +3 -3
  160. package/lib/hooks/useAuthentication.js.flow +1 -1
  161. package/lib/hooks/useAuthentication.js.map +1 -1
  162. package/lib/hooks/useModelCatalog.js.flow +2 -1
  163. package/lib/hooks/useModelCatalog.js.map +1 -1
  164. package/lib/hooks/useModels.js +2 -2
  165. package/lib/hooks/useModels.js.flow +1 -1
  166. package/lib/hooks/useModels.js.map +1 -1
  167. package/lib/hooks/useModularUI.js +3 -3
  168. package/lib/hooks/useModularUI.js.flow +4 -1
  169. package/lib/hooks/useModularUI.js.map +1 -1
  170. package/lib/hooks/useModularUIBasic.js +4 -1
  171. package/lib/hooks/useModularUIBasic.js.flow +1 -1
  172. package/lib/hooks/useModularUIBasic.js.map +1 -1
  173. package/lib/hooks/useRouter.js +6 -6
  174. package/lib/hooks/useRouter.js.flow +7 -1
  175. package/lib/hooks/useRouter.js.map +1 -1
  176. package/lib/models/attributes/AttributeCollection.js.flow +8 -6
  177. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  178. package/lib/models/attributes/AttributeModel.js.flow +18 -16
  179. package/lib/models/attributes/AttributeModel.js.map +1 -1
  180. package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +1 -1
  181. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  182. package/lib/models/attributes/NumberAttributeModel.js +5 -2
  183. package/lib/models/attributes/NumberAttributeModel.js.flow +7 -3
  184. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  185. package/lib/models/attributes/_createAttribute.js.flow +1 -1
  186. package/lib/models/attributes/_createAttribute.js.map +1 -1
  187. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +1 -1
  188. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  189. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +1 -1
  190. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  191. package/lib/models/base/ResourceModel.js.flow +1 -1
  192. package/lib/models/base/ResourceModel.js.map +1 -1
  193. package/lib/models/content/ContentTOCModel.js.flow +4 -1
  194. package/lib/models/content/ContentTOCModel.js.map +1 -1
  195. package/lib/models/filters/FilterCollection.js.flow +1 -1
  196. package/lib/models/filters/FilterCollection.js.map +1 -1
  197. package/lib/models/form/FormModel.js.flow +2 -2
  198. package/lib/models/form/FormModel.js.map +1 -1
  199. package/lib/models/links/LinkModel.js +3 -1
  200. package/lib/models/links/LinkModel.js.flow +4 -2
  201. package/lib/models/links/LinkModel.js.map +1 -1
  202. package/lib/models/links/normalizeLinkJSON.js.flow +1 -1
  203. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  204. package/lib/models/list/ListModel.js.flow +1 -1
  205. package/lib/models/list/ListModel.js.map +1 -1
  206. package/lib/models/parameter/Parameter.js +1 -1
  207. package/lib/models/parameter/Parameter.js.flow +1 -1
  208. package/lib/models/parameter/Parameter.js.map +1 -1
  209. package/lib/models/types.js.flow +6 -6
  210. package/lib/models/types.js.map +1 -1
  211. package/lib/modularui/ModularUIRequest.js.flow +6 -6
  212. package/lib/modularui/ModularUIRequest.js.map +1 -1
  213. package/lib/react-client/client.js +2 -2
  214. package/lib/react-client/client.js.flow +8 -8
  215. package/lib/react-client/client.js.map +1 -1
  216. package/lib/react-client/rehydrate.js.flow +2 -2
  217. package/lib/react-client/rehydrate.js.map +1 -1
  218. package/lib/react-server/createSSRComplete.js.flow +3 -3
  219. package/lib/react-server/createSSRComplete.js.map +1 -1
  220. package/lib/react-server/renderSSRComplete.js +4 -2
  221. package/lib/react-server/renderSSRComplete.js.flow +2 -2
  222. package/lib/react-server/renderSSRComplete.js.map +1 -1
  223. package/lib/react-server/serverUtil.js +19 -10
  224. package/lib/react-server/serverUtil.js.flow +20 -11
  225. package/lib/react-server/serverUtil.js.map +1 -1
  226. package/lib/react-theme/ThemeProvider.js +1 -1
  227. package/lib/react-theme/ThemeProvider.js.flow +1 -1
  228. package/lib/react-theme/ThemeProvider.js.map +1 -1
  229. package/lib/react-theme/__tests__/ThemeProvider.spec.js.flow +2 -0
  230. package/lib/react-theme/__tests__/createTheme.spec.js.flow +3 -0
  231. package/lib/react-theme/createTheme.js +8 -3
  232. package/lib/react-theme/createTheme.js.flow +7 -5
  233. package/lib/react-theme/createTheme.js.map +1 -1
  234. package/lib/react-theme/utils/contrast.js +3 -1
  235. package/lib/react-theme/utils/contrast.js.flow +1 -1
  236. package/lib/react-theme/utils/contrast.js.map +1 -1
  237. package/lib/react-theme/utils/corners.js +3 -1
  238. package/lib/react-theme/utils/corners.js.flow +1 -1
  239. package/lib/react-theme/utils/corners.js.map +1 -1
  240. package/lib/react-theme/utils/spacers.js +9 -3
  241. package/lib/react-theme/utils/spacers.js.flow +3 -3
  242. package/lib/react-theme/utils/spacers.js.map +1 -1
  243. package/lib/redux/_i18n/{actions.js → I18nActions.js} +1 -1
  244. package/lib/redux/_i18n/{actions.js.flow → I18nActions.js.flow} +0 -0
  245. package/lib/redux/_i18n/I18nActions.js.map +1 -0
  246. package/lib/redux/_i18n/{reducer.js → I18nReducer.js} +1 -1
  247. package/{src/redux/_i18n/reducer.js → lib/redux/_i18n/I18nReducer.js.flow} +5 -2
  248. package/lib/redux/_i18n/I18nReducer.js.map +1 -0
  249. package/lib/redux/_i18n/__tests__/actions.spec.js.flow +1 -1
  250. package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +1 -1
  251. package/lib/redux/_i18n/index.js +8 -8
  252. package/lib/redux/_i18n/index.js.flow +2 -2
  253. package/lib/redux/_i18n/index.js.map +1 -1
  254. package/lib/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
  255. package/lib/redux/_modularui/{actions.js.flow → ModularUIActions.js.flow} +1 -1
  256. package/lib/redux/_modularui/ModularUIActions.js.map +1 -0
  257. package/lib/redux/_modularui/{connector.js → ModularUIConnector.js} +11 -11
  258. package/{src/redux/_modularui/connector.js → lib/redux/_modularui/ModularUIConnector.js.flow} +8 -4
  259. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -0
  260. package/lib/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +4 -4
  261. package/lib/redux/_modularui/{middleware.js.flow → ModularUIMiddleware.js.flow} +20 -5
  262. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -0
  263. package/lib/redux/_modularui/{reducer.js → ModularUIReducer.js} +4 -6
  264. package/lib/redux/_modularui/{reducer.js.flow → ModularUIReducer.js.flow} +14 -8
  265. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -0
  266. package/lib/redux/_modularui/{selectors.js → ModularUISelectors.js} +1 -1
  267. package/lib/redux/_modularui/{selectors.js.flow → ModularUISelectors.js.flow} +3 -2
  268. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -0
  269. package/lib/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +1 -1
  270. package/lib/redux/_modularui/{modularuiUtils.js.flow → ModularUIUtils.js.flow} +0 -0
  271. package/lib/redux/_modularui/{modularuiUtils.js.map → ModularUIUtils.js.map} +1 -1
  272. package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
  273. package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +6 -4
  274. package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +1 -1
  275. package/lib/redux/_modularui/index.js +22 -22
  276. package/lib/redux/_modularui/index.js.flow +6 -6
  277. package/lib/redux/_modularui/index.js.map +1 -1
  278. package/lib/redux/_modularui/types.js.flow +10 -4
  279. package/lib/redux/_modularui/types.js.map +1 -1
  280. package/lib/redux/_modularui/withModularUI.js +2 -2
  281. package/lib/redux/_modularui/withModularUI.js.flow +1 -1
  282. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  283. package/lib/redux/_router/{actions.js → RouterActions.js} +1 -1
  284. package/lib/redux/_router/{actions.js.flow → RouterActions.js.flow} +0 -0
  285. package/lib/redux/_router/RouterActions.js.map +1 -0
  286. package/lib/redux/_router/{connectors.js → RouterConnectors.js} +7 -7
  287. package/lib/redux/_router/{connectors.js.flow → RouterConnectors.js.flow} +1 -1
  288. package/lib/redux/_router/RouterConnectors.js.map +1 -0
  289. package/lib/redux/_router/{middleware.js → RouterMiddleware.js} +1 -1
  290. package/lib/redux/_router/{middleware.js.flow → RouterMiddleware.js.flow} +0 -0
  291. package/lib/redux/_router/RouterMiddleware.js.map +1 -0
  292. package/lib/redux/_router/{reducer.js → RouterReducer.js} +1 -1
  293. package/lib/redux/_router/{reducer.js.flow → RouterReducer.js.flow} +0 -0
  294. package/lib/redux/_router/RouterReducer.js.map +1 -0
  295. package/lib/redux/_router/__tests__/actions.spec.js.flow +1 -1
  296. package/lib/redux/_router/__tests__/middleware.spec.js.flow +2 -2
  297. package/lib/redux/_router/__tests__/reducer.spec.js.flow +1 -1
  298. package/lib/redux/_router/index.js +16 -16
  299. package/lib/redux/_router/index.js.flow +4 -4
  300. package/lib/redux/_router/index.js.map +1 -1
  301. package/lib/redux/actions/Application.js +5 -5
  302. package/lib/redux/actions/Application.js.flow +5 -2
  303. package/lib/redux/actions/Application.js.map +1 -1
  304. package/lib/redux/actions/Authorization.js +6 -6
  305. package/lib/redux/actions/Authorization.js.flow +3 -3
  306. package/lib/redux/actions/Authorization.js.map +1 -1
  307. package/lib/redux/actions/Error.js +2 -2
  308. package/lib/redux/actions/Error.js.flow +2 -2
  309. package/lib/redux/actions/Error.js.map +1 -1
  310. package/lib/redux/actions/Form.js +5 -5
  311. package/lib/redux/actions/Form.js.flow +2 -2
  312. package/lib/redux/actions/Form.js.map +1 -1
  313. package/lib/redux/actions/FormAttributeSet.js +2 -2
  314. package/lib/redux/actions/FormAttributeSet.js.flow +1 -1
  315. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  316. package/lib/redux/actions/FormAttributeSetRepeatable.js +4 -4
  317. package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +1 -1
  318. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  319. package/lib/redux/actions/FormAutosave.js +2 -2
  320. package/lib/redux/actions/FormAutosave.js.flow +1 -1
  321. package/lib/redux/actions/FormAutosave.js.map +1 -1
  322. package/lib/redux/actions/FormAutosubmit.js +2 -2
  323. package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
  324. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  325. package/lib/redux/actions/FormValidations.js +2 -2
  326. package/lib/redux/actions/FormValidations.js.flow +5 -3
  327. package/lib/redux/actions/FormValidations.js.map +1 -1
  328. package/lib/redux/actions/Notification.js.flow +1 -1
  329. package/lib/redux/actions/Notification.js.map +1 -1
  330. package/lib/redux/actions/Preferences.js +1 -1
  331. package/lib/redux/actions/Preferences.js.flow +3 -3
  332. package/lib/redux/actions/Preferences.js.map +1 -1
  333. package/lib/redux/actions/SignIn.js +2 -2
  334. package/lib/redux/actions/SignIn.js.flow +1 -1
  335. package/lib/redux/actions/SignIn.js.map +1 -1
  336. package/lib/redux/actions/SignOut.js +2 -2
  337. package/lib/redux/actions/SignOut.js.flow +1 -1
  338. package/lib/redux/actions/SignOut.js.map +1 -1
  339. package/lib/redux/connectors/Application.js +2 -2
  340. package/lib/redux/connectors/Application.js.flow +1 -1
  341. package/lib/redux/connectors/Application.js.map +1 -1
  342. package/lib/redux/connectors/Breadcrumb.js +2 -2
  343. package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
  344. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  345. package/lib/redux/connectors/CaseView.js +2 -2
  346. package/lib/redux/connectors/CaseView.js.flow +1 -1
  347. package/lib/redux/connectors/CaseView.js.map +1 -1
  348. package/lib/redux/connectors/ConceptDetail.js +2 -2
  349. package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
  350. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  351. package/lib/redux/connectors/ContentBrowser.js +2 -2
  352. package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
  353. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  354. package/lib/redux/connectors/ContentDetail.js +2 -2
  355. package/lib/redux/connectors/ContentDetail.js.flow +1 -1
  356. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  357. package/lib/redux/connectors/ContentDetailSection.js +2 -2
  358. package/lib/redux/connectors/ContentDetailSection.js.flow +1 -1
  359. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  360. package/lib/redux/connectors/Form.js +2 -2
  361. package/lib/redux/connectors/Form.js.flow +1 -1
  362. package/lib/redux/connectors/Form.js.map +1 -1
  363. package/lib/redux/connectors/ListDetail.js +2 -2
  364. package/lib/redux/connectors/ListDetail.js.flow +1 -1
  365. package/lib/redux/connectors/ListDetail.js.map +1 -1
  366. package/lib/redux/connectors/ModelCatalog.js +2 -2
  367. package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
  368. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  369. package/lib/redux/connectors/PanelRenderer.js +2 -2
  370. package/lib/redux/connectors/PanelRenderer.js.flow +1 -1
  371. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  372. package/lib/redux/connectors/Preferences.js.flow +5 -2
  373. package/lib/redux/connectors/Preferences.js.map +1 -1
  374. package/lib/redux/connectors/QuickSearch.js +4 -4
  375. package/lib/redux/connectors/QuickSearch.js.flow +2 -2
  376. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  377. package/lib/redux/connectors/SignIn.js +2 -2
  378. package/lib/redux/connectors/SignIn.js.flow +1 -1
  379. package/lib/redux/connectors/SignIn.js.map +1 -1
  380. package/lib/redux/connectors/SignOut.js.flow +2 -2
  381. package/lib/redux/connectors/SignOut.js.map +1 -1
  382. package/lib/redux/connectors/Tab.js +2 -2
  383. package/lib/redux/connectors/Tab.js.flow +1 -1
  384. package/lib/redux/connectors/Tab.js.map +1 -1
  385. package/lib/redux/reducers/ModalsReducer.js.flow +2 -2
  386. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  387. package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
  388. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  389. package/lib/redux/reducers/createReducer.js +6 -6
  390. package/lib/redux/reducers/createReducer.js.flow +3 -3
  391. package/lib/redux/reducers/createReducer.js.map +1 -1
  392. package/lib/redux/store/configureStore.js +5 -5
  393. package/lib/redux/store/configureStore.js.flow +4 -4
  394. package/lib/redux/store/configureStore.js.map +1 -1
  395. package/lib/utils/fetch/universalFetch.js +5 -3
  396. package/lib/utils/fetch/universalFetch.js.flow +8 -6
  397. package/lib/utils/fetch/universalFetch.js.map +1 -1
  398. package/lib/utils/fetch/xhr.js.flow +21 -21
  399. package/lib/utils/fetch/xhr.js.map +1 -1
  400. package/lib/utils/helpers/objects.js.flow +5 -3
  401. package/lib/utils/helpers/objects.js.map +1 -1
  402. package/lib/utils/helpers/sanitizeHtml.js.flow +1 -1
  403. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  404. package/lib/utils/number/parseNumbers.js.flow +8 -2
  405. package/lib/utils/number/parseNumbers.js.map +1 -1
  406. package/package.json +8 -8
  407. package/src/builder/mergeLayoutHintConfigurations.js +1 -1
  408. package/src/constants/Settings.js +1 -1
  409. package/src/hooks/useAuthentication.js +1 -1
  410. package/src/hooks/useModelCatalog.js +2 -1
  411. package/src/hooks/useModels.js +1 -1
  412. package/src/hooks/useModularUI.js +4 -1
  413. package/src/hooks/useModularUIBasic.js +1 -1
  414. package/src/hooks/useRouter.js +7 -1
  415. package/src/models/attributes/AttributeCollection.js +8 -6
  416. package/src/models/attributes/AttributeModel.js +18 -16
  417. package/src/models/attributes/CompositeAttributeChildCollection.js +1 -1
  418. package/src/models/attributes/NumberAttributeModel.js +7 -3
  419. package/src/models/attributes/_createAttribute.js +1 -1
  420. package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +1 -1
  421. package/src/models/attributes/layouthint-rules/DependentAttribute.js +1 -1
  422. package/src/models/base/ResourceModel.js +1 -1
  423. package/src/models/content/ContentTOCModel.js +4 -1
  424. package/src/models/filters/FilterCollection.js +1 -1
  425. package/src/models/form/FormModel.js +2 -2
  426. package/src/models/links/LinkModel.js +4 -2
  427. package/src/models/links/normalizeLinkJSON.js +1 -1
  428. package/src/models/list/ListModel.js +1 -1
  429. package/src/models/parameter/Parameter.js +1 -1
  430. package/src/models/types.js +6 -6
  431. package/src/modularui/ModularUIRequest.js +6 -6
  432. package/src/react-client/client.js +8 -8
  433. package/src/react-client/rehydrate.js +2 -2
  434. package/src/react-server/createSSRComplete.js +3 -3
  435. package/src/react-server/renderSSRComplete.js +2 -2
  436. package/src/react-server/serverUtil.js +20 -11
  437. package/src/react-theme/ThemeProvider.js +1 -1
  438. package/src/react-theme/__tests__/ThemeProvider.spec.js +2 -0
  439. package/src/react-theme/__tests__/createTheme.spec.js +3 -0
  440. package/src/react-theme/createTheme.js +7 -5
  441. package/src/react-theme/utils/contrast.js +1 -1
  442. package/src/react-theme/utils/corners.js +1 -1
  443. package/src/react-theme/utils/spacers.js +3 -3
  444. package/src/redux/_i18n/{actions.js → I18nActions.js} +0 -0
  445. package/{lib/redux/_i18n/reducer.js.flow → src/redux/_i18n/I18nReducer.js} +5 -2
  446. package/src/redux/_i18n/__tests__/actions.spec.js +1 -1
  447. package/src/redux/_i18n/__tests__/reducer.spec.js +1 -1
  448. package/src/redux/_i18n/index.js +2 -2
  449. package/src/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
  450. package/{lib/redux/_modularui/connector.js.flow → src/redux/_modularui/ModularUIConnector.js} +8 -4
  451. package/src/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +20 -5
  452. package/src/redux/_modularui/{reducer.js → ModularUIReducer.js} +14 -8
  453. package/src/redux/_modularui/{selectors.js → ModularUISelectors.js} +3 -2
  454. package/src/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +0 -0
  455. package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
  456. package/src/redux/_modularui/__tests__/reducer.spec.js +6 -4
  457. package/src/redux/_modularui/__tests__/selectors.spec.js +1 -1
  458. package/src/redux/_modularui/index.js +6 -6
  459. package/src/redux/_modularui/types.js +10 -4
  460. package/src/redux/_modularui/withModularUI.js +1 -1
  461. package/src/redux/_router/{actions.js → RouterActions.js} +0 -0
  462. package/src/redux/_router/{connectors.js → RouterConnectors.js} +1 -1
  463. package/src/redux/_router/{middleware.js → RouterMiddleware.js} +0 -0
  464. package/src/redux/_router/{reducer.js → RouterReducer.js} +0 -0
  465. package/src/redux/_router/__tests__/actions.spec.js +1 -1
  466. package/src/redux/_router/__tests__/middleware.spec.js +2 -2
  467. package/src/redux/_router/__tests__/reducer.spec.js +1 -1
  468. package/src/redux/_router/index.js +4 -4
  469. package/src/redux/actions/Application.js +5 -2
  470. package/src/redux/actions/Authorization.js +3 -3
  471. package/src/redux/actions/Error.js +2 -2
  472. package/src/redux/actions/Form.js +2 -2
  473. package/src/redux/actions/FormAttributeSet.js +1 -1
  474. package/src/redux/actions/FormAttributeSetRepeatable.js +1 -1
  475. package/src/redux/actions/FormAutosave.js +1 -1
  476. package/src/redux/actions/FormAutosubmit.js +1 -1
  477. package/src/redux/actions/FormValidations.js +5 -3
  478. package/src/redux/actions/Notification.js +1 -1
  479. package/src/redux/actions/Preferences.js +3 -3
  480. package/src/redux/actions/SignIn.js +1 -1
  481. package/src/redux/actions/SignOut.js +1 -1
  482. package/src/redux/connectors/Application.js +1 -1
  483. package/src/redux/connectors/Breadcrumb.js +1 -1
  484. package/src/redux/connectors/CaseView.js +1 -1
  485. package/src/redux/connectors/ConceptDetail.js +1 -1
  486. package/src/redux/connectors/ContentBrowser.js +1 -1
  487. package/src/redux/connectors/ContentDetail.js +1 -1
  488. package/src/redux/connectors/ContentDetailSection.js +1 -1
  489. package/src/redux/connectors/Form.js +1 -1
  490. package/src/redux/connectors/ListDetail.js +1 -1
  491. package/src/redux/connectors/ModelCatalog.js +1 -1
  492. package/src/redux/connectors/PanelRenderer.js +1 -1
  493. package/src/redux/connectors/Preferences.js +5 -2
  494. package/src/redux/connectors/QuickSearch.js +2 -2
  495. package/src/redux/connectors/SignIn.js +1 -1
  496. package/src/redux/connectors/SignOut.js +2 -2
  497. package/src/redux/connectors/Tab.js +1 -1
  498. package/src/redux/reducers/ModalsReducer.js +2 -2
  499. package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
  500. package/src/redux/reducers/createReducer.js +3 -3
  501. package/src/redux/store/configureStore.js +4 -4
  502. package/src/utils/fetch/universalFetch.js +8 -6
  503. package/src/utils/fetch/xhr.js +21 -21
  504. package/src/utils/helpers/objects.js +5 -3
  505. package/src/utils/helpers/sanitizeHtml.js +1 -1
  506. package/src/utils/number/parseNumbers.js +8 -2
  507. package/types/models/concepts/ConceptDetailModel.d.ts +3 -3
  508. package/types/models/concepts/ConceptRelationModel.d.ts +2 -1
  509. package/types/models/types.d.ts +17 -3
  510. package/types/redux/_modularui/types.d.ts +3 -1
  511. package/types/utils/fetch/universalFetch.d.ts +3 -3
  512. package/types/utils/helpers/objects.d.ts +10 -2
  513. package/esm/redux/_i18n/actions.js.map +0 -1
  514. package/esm/redux/_i18n/reducer.js.map +0 -1
  515. package/esm/redux/_modularui/actions.js.map +0 -1
  516. package/esm/redux/_modularui/connector.js.map +0 -1
  517. package/esm/redux/_modularui/middleware.js.map +0 -1
  518. package/esm/redux/_modularui/reducer.js.map +0 -1
  519. package/esm/redux/_modularui/selectors.js.map +0 -1
  520. package/esm/redux/_router/actions.js.map +0 -1
  521. package/esm/redux/_router/connectors.js.map +0 -1
  522. package/esm/redux/_router/middleware.js.map +0 -1
  523. package/esm/redux/_router/reducer.js.map +0 -1
  524. package/lib/redux/_i18n/actions.js.map +0 -1
  525. package/lib/redux/_i18n/reducer.js.map +0 -1
  526. package/lib/redux/_modularui/actions.js.map +0 -1
  527. package/lib/redux/_modularui/connector.js.map +0 -1
  528. package/lib/redux/_modularui/middleware.js.map +0 -1
  529. package/lib/redux/_modularui/reducer.js.map +0 -1
  530. package/lib/redux/_modularui/selectors.js.map +0 -1
  531. package/lib/redux/_router/actions.js.map +0 -1
  532. package/lib/redux/_router/connectors.js.map +0 -1
  533. package/lib/redux/_router/middleware.js.map +0 -1
  534. package/lib/redux/_router/reducer.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.25.1-beta.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.25.1-beta.0...v1.25.1-beta.1) (2023-01-03)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **remove-model:** refactor removal of model ([26fa8b6](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/26fa8b616d826a3a4bdb72a93a14406fa5d244bf))
10
+
11
+ ### [1.25.1-beta.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.25.0...v1.25.1-beta.0) (2023-01-03)
12
+
13
+ ### Bug Fixes
14
+
15
+ - **flowtype:** improve flow declarations ([e769ea3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/e769ea30200725e7e4116982163b85ee4cd8998a))
16
+
5
17
  ## [1.25.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.24.1-beta.8...v1.25.0) (2022-12-16)
6
18
 
7
19
  ### Features
@@ -1 +1 @@
1
- {"version":3,"file":"mergeLayoutHintConfigurations.js","names":["glob","require","fs","path","LayoutHintConfiguration","readFiles","files","filePromises","file","resolve","reject","readFile","err","data","JSON","parse","all","exports","mergeLayoutHintConfigurations","srcFolder","outputFolder","escapedSrcFolder","replace","then","jsons","newConfig","writeFile","join","writeErr"],"sources":["../../src/builder/mergeLayoutHintConfigurations.js"],"sourcesContent":["// @flow\nconst glob = require(\"glob\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst { LayoutHintConfiguration } = require(\"../constants/LayoutHintConfig\");\n\nconst readFiles = (files) => {\n const filePromises = files.map(\n (file) =>\n new Promise((resolve, reject) => {\n fs.readFile(file, \"utf-8\", (err, data) => {\n if (err) {\n return reject(err);\n } else {\n return resolve(JSON.parse(data));\n }\n });\n })\n );\n\n return Promise.all(filePromises);\n};\n\n/**\n * Merge all LayoutHintConfig.json files from this library and in the srcFolder\n * together into one config file, and copies it to the outputFolder.<br/>\n * This file is consumed by Be Informed studio to give layout hint information\n */\nexports.mergeLayoutHintConfigurations = async (\n srcFolder: string,\n outputFolder: string\n): Promise<void> => {\n const escapedSrcFolder = srcFolder.replace(/\\\\/g, \"/\");\n return new Promise((resolve, reject) => {\n glob(escapedSrcFolder + \"/**/LayoutHintConfig.json\", {}, (err, files) => {\n if (err) {\n return reject(err);\n }\n\n readFiles(files).then((jsons) => {\n const newConfig = Object.assign(LayoutHintConfiguration, ...jsons);\n fs.writeFile(\n path.join(outputFolder, \"LayoutHintConfig.json\"),\n JSON.stringify(newConfig),\n\n (writeErr) => {\n if (writeErr) {\n return reject(writeErr);\n }\n\n return resolve();\n }\n );\n });\n });\n });\n};\n"],"mappings":";;;;AACA,MAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC;AAC5B,MAAMC,EAAE,GAAGD,OAAO,CAAC,IAAI,CAAC;AACxB,MAAME,IAAI,GAAGF,OAAO,CAAC,MAAM,CAAC;AAE5B,MAAM;EAAEG;AAAwB,CAAC,GAAGH,OAAO,CAAC,+BAA+B,CAAC;AAE5E,MAAMI,SAAS,GAAIC,KAAK,IAAK;EAC3B,MAAMC,YAAY,GAAG,qBAAAD,KAAK,OAALA,KAAK,EACvBE,IAAI,IACH,aAAY,CAACC,OAAO,EAAEC,MAAM,KAAK;IAC/BR,EAAE,CAACS,QAAQ,CAACH,IAAI,EAAE,OAAO,EAAE,CAACI,GAAG,EAAEC,IAAI,KAAK;MACxC,IAAID,GAAG,EAAE;QACP,OAAOF,MAAM,CAACE,GAAG,CAAC;MACpB,CAAC,MAAM;QACL,OAAOH,OAAO,CAACK,IAAI,CAACC,KAAK,CAACF,IAAI,CAAC,CAAC;MAClC;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,CACL;EAED,OAAO,SAAQG,GAAG,CAACT,YAAY,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACAU,OAAO,CAACC,6BAA6B,GAAG,OACtCC,SAAiB,EACjBC,YAAoB,KACF;EAClB,MAAMC,gBAAgB,GAAGF,SAAS,CAACG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EACtD,OAAO,aAAY,CAACb,OAAO,EAAEC,MAAM,KAAK;IACtCV,IAAI,CAACqB,gBAAgB,GAAG,2BAA2B,EAAE,CAAC,CAAC,EAAE,CAACT,GAAG,EAAEN,KAAK,KAAK;MACvE,IAAIM,GAAG,EAAE;QACP,OAAOF,MAAM,CAACE,GAAG,CAAC;MACpB;MAEAP,SAAS,CAACC,KAAK,CAAC,CAACiB,IAAI,CAAEC,KAAK,IAAK;QAC/B,MAAMC,SAAS,GAAG,eAAcrB,uBAAuB,EAAE,GAAGoB,KAAK,CAAC;QAClEtB,EAAE,CAACwB,SAAS,CACVvB,IAAI,CAACwB,IAAI,CAACP,YAAY,EAAE,uBAAuB,CAAC,EAChD,gBAAeK,SAAS,CAAC,EAExBG,QAAQ,IAAK;UACZ,IAAIA,QAAQ,EAAE;YACZ,OAAOlB,MAAM,CAACkB,QAAQ,CAAC;UACzB;UAEA,OAAOnB,OAAO,EAAE;QAClB,CAAC,CACF;MACH,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"mergeLayoutHintConfigurations.js","names":["glob","require","fs","path","LayoutHintConfiguration","readFiles","files","filePromises","file","resolve","reject","readFile","err","data","JSON","parse","all","exports","mergeLayoutHintConfigurations","srcFolder","outputFolder","escapedSrcFolder","replace","then","jsons","newConfig","writeFile","join","writeErr"],"sources":["../../src/builder/mergeLayoutHintConfigurations.js"],"sourcesContent":["// @flow\nconst glob = require(\"glob\");\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst { LayoutHintConfiguration } = require(\"../constants/LayoutHintConfig\");\n\nconst readFiles = (files: Array<string>) => {\n const filePromises = files.map(\n (file) =>\n new Promise((resolve, reject) => {\n fs.readFile(file, \"utf-8\", (err, data) => {\n if (err) {\n return reject(err);\n } else {\n return resolve(JSON.parse(data));\n }\n });\n })\n );\n\n return Promise.all(filePromises);\n};\n\n/**\n * Merge all LayoutHintConfig.json files from this library and in the srcFolder\n * together into one config file, and copies it to the outputFolder.<br/>\n * This file is consumed by Be Informed studio to give layout hint information\n */\nexports.mergeLayoutHintConfigurations = async (\n srcFolder: string,\n outputFolder: string\n): Promise<void> => {\n const escapedSrcFolder = srcFolder.replace(/\\\\/g, \"/\");\n return new Promise((resolve, reject) => {\n glob(escapedSrcFolder + \"/**/LayoutHintConfig.json\", {}, (err, files) => {\n if (err) {\n return reject(err);\n }\n\n readFiles(files).then((jsons) => {\n const newConfig = Object.assign(LayoutHintConfiguration, ...jsons);\n fs.writeFile(\n path.join(outputFolder, \"LayoutHintConfig.json\"),\n JSON.stringify(newConfig),\n\n (writeErr) => {\n if (writeErr) {\n return reject(writeErr);\n }\n\n return resolve();\n }\n );\n });\n });\n });\n};\n"],"mappings":";;;;AACA,MAAMA,IAAI,GAAGC,OAAO,CAAC,MAAM,CAAC;AAC5B,MAAMC,EAAE,GAAGD,OAAO,CAAC,IAAI,CAAC;AACxB,MAAME,IAAI,GAAGF,OAAO,CAAC,MAAM,CAAC;AAE5B,MAAM;EAAEG;AAAwB,CAAC,GAAGH,OAAO,CAAC,+BAA+B,CAAC;AAE5E,MAAMI,SAAS,GAAIC,KAAoB,IAAK;EAC1C,MAAMC,YAAY,GAAG,qBAAAD,KAAK,OAALA,KAAK,EACvBE,IAAI,IACH,aAAY,CAACC,OAAO,EAAEC,MAAM,KAAK;IAC/BR,EAAE,CAACS,QAAQ,CAACH,IAAI,EAAE,OAAO,EAAE,CAACI,GAAG,EAAEC,IAAI,KAAK;MACxC,IAAID,GAAG,EAAE;QACP,OAAOF,MAAM,CAACE,GAAG,CAAC;MACpB,CAAC,MAAM;QACL,OAAOH,OAAO,CAACK,IAAI,CAACC,KAAK,CAACF,IAAI,CAAC,CAAC;MAClC;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,CACL;EAED,OAAO,SAAQG,GAAG,CAACT,YAAY,CAAC;AAClC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACAU,OAAO,CAACC,6BAA6B,GAAG,OACtCC,SAAiB,EACjBC,YAAoB,KACF;EAClB,MAAMC,gBAAgB,GAAGF,SAAS,CAACG,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;EACtD,OAAO,aAAY,CAACb,OAAO,EAAEC,MAAM,KAAK;IACtCV,IAAI,CAACqB,gBAAgB,GAAG,2BAA2B,EAAE,CAAC,CAAC,EAAE,CAACT,GAAG,EAAEN,KAAK,KAAK;MACvE,IAAIM,GAAG,EAAE;QACP,OAAOF,MAAM,CAACE,GAAG,CAAC;MACpB;MAEAP,SAAS,CAACC,KAAK,CAAC,CAACiB,IAAI,CAAEC,KAAK,IAAK;QAC/B,MAAMC,SAAS,GAAG,eAAcrB,uBAAuB,EAAE,GAAGoB,KAAK,CAAC;QAClEtB,EAAE,CAACwB,SAAS,CACVvB,IAAI,CAACwB,IAAI,CAACP,YAAY,EAAE,uBAAuB,CAAC,EAChD,gBAAeK,SAAS,CAAC,EAExBG,QAAQ,IAAK;UACZ,IAAIA,QAAQ,EAAE;YACZ,OAAOlB,MAAM,CAACkB,QAAQ,CAAC;UACzB;UAEA,OAAOnB,OAAO,EAAE;QAClB,CAAC,CACF;MACH,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.js","names":["isPlainObject","has","ALL_CONTENT_IN_DATA_SETTING","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING","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","getSetting","key","defaultValue","undefined","Error","setSetting","value","allSettings","hasAllContentInData","loginType","loginPath","loginUsernameField","loginPasswordField","logoutPath"],"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,SAASA,aAAa,EAAEC,GAAG,QAAQ,0BAA0B;AAC7D,SACEC,2BAA2B,EAC3BC,UAAU,EACVC,kBAAkB,EAClBC,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,QACd,aAAa;AAIpB,MAAMC,eAAe,GAAG;EACtB;EACAC,4BAA4B,EAAE,IAAI;EAElC;EACAC,yBAAyB,EAAE,IAAI;EAE/B;EACAC,kBAAkB,EAAE,KAAK;EAEzB;EACAC,sBAAs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SETTING","LOGOUT_PATH_SETTING","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","getSetting","key","defaultValue","undefined","Error","setSetting","value","allSettings","hasAllContentInData","loginType","loginPath","loginUsernameField","loginPasswordField","logoutPath"],"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: { [name: string]: Setting } = {\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,SAASA,aAAa,EAAEC,GAAG,QAAQ,0BAA0B;AAC7D,SACEC,2BAA2B,EAC3BC,UAAU,EACVC,kBAAkB,EAClBC,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,QACd,aAAa;AAIpB,MAAMC,eAA4C,GAAG;EACnD;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,KAAK;EAE/C;EACAC,UAAU,EAAE,SAAS;EAErB;EACAC,wBAAwB,EAAE,EAAE;EAE5B;EACAC,WAAW,EAAE,UAAU;EAEvB;EACAC,qBAAqB,EAAE,IAAI;EAE3B;EACAC,wBAAwB,EAAE,GAAG;EAE7B;EACAC,+BAA+B,EAAE,kCAAkC;EAEnE;EACAC,8BAA8B,EAAE,CAC9B,yDAAyD,CAC1D;EACDC,mCAAmC,EAAE,CACnC,qDAAqD,CACtD;EACDC,sCAAsC,EAAE,CACtC,gDAAgD,CACjD;EAED;EACAC,iBAAiB,EAAE,EAAE;EAErB;EAC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ACA;AACA,OAAO,MAAMkD,kBAAkB,GAAG,MAChCX,UAAU,CAACtC,sBAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AACA,OAAO,MAAMkD,kBAAkB,GAAG,MAChCZ,UAAU,CAACrC,sBAAsB,EAAE,YAAY,CAAC;AAClD;AACA;AACA,OAAO,MAAMkD,UAAU,GAAG,MACxBb,UAAU,CAACpC,mBAAmB,EAAE,SAAS,CAAC;AAE5C,OAAO,MAAMe,UAAkB,GAAG+B,SAAS,EAAE;AAC7C,OAAO,MAAM7B,WAAmB,GAAGgC,UAAU,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import { useSelector, useDispatch } from "react-redux";
2
- import { getApplication } from "../redux/_modularui/selectors";
2
+ import { getApplication } from "../redux/_modularui/ModularUISelectors";
3
3
  import { login, logout, resetAuthErrors } from "../redux/actions";
4
4
  import Cache from "../utils/browser/Cache";
5
5
  import { BASE, getSetting } from "../constants";
@@ -1 +1 @@
1
- {"version":3,"file":"useAuthentication.js","names":["useSelector","useDispatch","getApplication","login","logout","resetAuthErrors","Cache","BASE","getSetting","IllegalStateException","useLogin","setItem","dispatch","application","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","errorMessage","error","resetErrors","username","password","redirectLogin","authenticationType","getItem","authentication","redirectUri","window","location","assign","useLogout","LOGOUT_PATH","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,SAASA,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,KAAK,EAAEC,MAAM,EAAEC,eAAe,QAAQ,kBAAkB;AAEjE,OAAOC,KAAK,MAAM,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WAAW,EAAE;EAC9B,MAAMY,WAAW,GAAGb,WAAW,CAACE,cAAc,CAAC;EAE/C,MAAM+B,WAAW,GAAGzB,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC;EAEzD,MAAMQ,eAAe,GAAGH,WAAW,EAAEI,UAAU,IAAI,KAAK;EACxD,OAAO;IACLD,eAAe;IACfE,mBAAmB,EAAEL,WAAW,EAAEK,mBAAmB,IAAI,EAAE;IAC3Dd,MAAM,EAAE,MAAM;MACZ,IAAIE,KAAK,CAACoB,OAAO,CAAC,iBAAiB,CAAC,EAAE;QACpC,MAAMQ,MAAM,GAAGL,MAAM,CAACC,QAAQ,CAACI,MAAM;QACrC,MAAMC,GAAG,GAAI,GAAED,MAAO,GAAE3B,IAAK,eAAc2B,MAAO,GAAE3B,IAAK,GAAE0B,WAAY,EAAC;QACxE3B,KAAK,CAACK,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;QACvCkB,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACI,GAAG,CAAC;MAC7B,CAAC,MAAM;QACL,OAAOvB,QAAQ,CAACR,MAAM,EAAE,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"useAuthentication.js","names":["useSelector","useDispatch","getApplication","login","logout","resetAuthErrors","Cache","BASE","getSetting","IllegalStateException","useLogin","setItem","dispatch","application","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","errorMessage","error","resetErrors","username","password","redirectLogin","authenticationType","getItem","authentication","redirectUri","window","location","assign","useLogout","LOGOUT_PATH","origin","url"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/ModularUISelectors\";\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,SAASA,WAAW,EA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kB,kBAAkB,CAACG,WAAY,EAAC,CAAC;MACpE;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,SAAS,GAAG,MAAkB;EACzC,MAAMpB,QAAQ,GAAGX,WAAW,EAAE;EAC9B,MAAMY,WAAW,GAAGb,WAAW,CAACE,cAAc,CAAC;EAE/C,MAAM+B,WAAW,GAAGzB,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC;EAEzD,MAAMQ,eAAe,GAAGH,WAAW,EAAEI,UAAU,IAAI,KAAK;EACxD,OAAO;IACLD,eAAe;IACfE,mBAAmB,EAAEL,WAAW,EAAEK,mBAAmB,IAAI,EAAE;IAC3Dd,MAAM,EAAE,MAAM;MACZ,IAAIE,KAAK,CAACoB,OAAO,CAAC,iBAAiB,CAAC,EAAE;QACpC,MAAMQ,MAAM,GAAGL,MAAM,CAACC,QAAQ,CAACI,MAAM;QACrC,MAAMC,GAAG,GAAI,GAAED,MAAO,GAAE3B,IAAK,eAAc2B,MAAO,GAAE3B,IAAK,GAAE0B,WAAY,EAAC;QACxE3B,KAAK,CAACK,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;QACvCkB,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACI,GAAG,CAAC;MAC7B,CAAC,MAAM;QACL,OAAOvB,QAAQ,CAACR,MAAM,EAAE,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC"}
@@ -9,7 +9,6 @@ import ContentTOCModel from "../models/content/ContentTOCModel";
9
9
  import ContentModel from "../models/content/ContentModel";
10
10
  import { useModularUIBasic } from "./useModularUIBasic";
11
11
  import { ContentTypeModel } from "../models";
12
-
13
12
  /**
14
13
  */
15
14
  export const useModelCatalog = () => useModularUIBasic("modelcatalog", "/modelcatalog", {
@@ -1 +1 @@
1
- {"version":3,"file":"useModelCatalog.js","names":["useLocation","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","default","BusinessScenarioModel","ContentIndexModel","ContentTOCModel","ContentModel","useModularUIBasic","ContentTypeModel","useModelCatalog","expectedModels","targetModel","useConceptIndex","href","getHref","context","dynamic","location","replace","search","useConceptDetail","concept","useContentIndex","useContentTOC","content","useContent","contentSection","useContentType","contentType"],"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,SAASA,WAAW,QAAQ,aAAa;AAEzC,OAAOC,iBAAiB,MAAM,0CAA0C;AACxE,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,kBAAkB,MAAM,uCAAuC;AACtE,SAASC,OAAO,IAAIC,qBAAqB,QAAQ,0CAA0C;AAC3F,OAAOC,iBAAiB,MAAM,qCAAqC;AACnE,OAAOC,eAAe,MAAM,mCAAmC;AAC/D,OAAOC,YAAY,MAAM,gCAAgC;AAEzD,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,gBAAgB,QAAQ,WAAW;;AAE5C;AACA;AACA,OAAO,MAAMC,eAAe,GAAG,MAC7BF,iBAAiB,CAAC,cAAc,EAAE,eAAe,EAAE;EACjDG,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEZ;AACf,CAAC,CAAC;;AAEJ;AACA;AACA,OAAO,MAAMa,eAAe,GAAIC,IAAY,IAC1CN,iBAAiB,CAAC,cAAc,EAAEM,IAAI,EAAE;EACtCH,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEX;AACf,CAAC,CAAC;AAEJ,MAAMc,OAAO,GAAG,CAACC,OAAO,EAA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ACA,OAAO,MAAMoB,UAAU,GAAIC,cAAsB,IAAoB;EACnE,MAAMb,IAAI,GAAGC,OAAO,CAAC,SAAS,EAAEY,cAAc,CAAC;EAC/C,OAAOnB,iBAAiB,CAAC,SAAS,EAAEM,IAAI,EAAE;IACxCH,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEL;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA,OAAO,MAAMqB,cAAc,GAAIC,WAAmB,IAAwB;EACxE,MAAMf,IAAI,GAAGC,OAAO,CAAC,cAAc,EAAEc,WAAW,CAAC;EACjD,OAAOrB,iBAAiB,CAAC,cAAc,EAAEM,IAAI,EAAE;IAC7CH,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAEH;EACf,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"useModelCatalog.js","names":["useLocation","ModelCatalogModel","ConceptIndexModel","ConceptDetailModel","default","BusinessScenarioModel","ContentIndexModel","ContentTOCModel","ContentModel","useModularUIBasic","ContentTypeModel","useModelCatalog","expectedModels","targetModel","useConceptIndex","href","getHref","context","dynamic","location","replace","search","useConceptDetail","concept","useContentIndex","useContentTOC","content","useContent","contentSection","useContentType","contentType"],"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\";\nimport type { Location } from \"react-router\";\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: string, dynamic: string, location?: 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,SAASA,WAAW,QAAQ,aAAa;AAEzC,OAAOC,iBAAiB,MAAM,0CAA0C;AACxE,O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";
2
- import { reloadModel } from "../redux/_modularui/actions";
2
+ import { reloadModel } from "../redux/_modularui/ModularUIActions";
3
3
  /**
4
4
  * Hook that contains the reload property that can be used to reload a model
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useModels.js","names":["useDispatch","reloadModel","useModels","dispatch","reload","model","options"],"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,SAASA,WAAW,QAAQ,aAAa;AAEzC,SAASC,WAAW,QAAQ,6BAA6B;AAQzD;AACA;AACA;AACA,OAAO,MAAMC,SAAoB,GAAG,MAAM;EACxC,MAAMC,QAAQ,GAAGH,WAAW,EAAE;EAC9B,OAAO;IACLI,MAAM,EAAE,CAACC,KAAqB,EAAEC,OAAgB,KAAK;MACnDH,QAAQ,CAACF,WAAW,CAACI,KAAK,EAAEC,OAAO,CAAC,CAAC;IACvC;EACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"useModels.js","names":["useDispatch","reloadModel","useModels","dispatch","reload","model","options"],"sources":["../../src/hooks/useModels.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport { reloadModel } from \"../redux/_modularui/ModularUIActions\";\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,SAASA,WAAW,QAAQ,aAAa;AAEzC,SAASC,WAAW,QAAQ,sCAAsC;AAQlE;AACA;AACA;AACA,OAAO,MAAMC,SAAoB,GAAG,MAAM;EACxC,MAAMC,QAAQ,GAAGH,WAAW,EAAE;EAC9B,OAAO;IACLI,MAAM,EAAE,CAACC,KAAqB,EAAEC,OAAgB,KAAK;MACnDH,QAAQ,CAACF,WAAW,CAACI,KAAK,EAAEC,OAAO,CAAC,CAAC;IACvC;EACF,CAAC;AACH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useRef } from "react";
2
2
  import { useDispatch, useSelector } from "react-redux";
3
3
  import { HTTP_METHODS } from "../constants";
4
- import { loadModularUI, removeModelByKey } from "../redux/_modularui/actions";
4
+ import { loadModularUI, removeModelByKey } from "../redux/_modularui/ModularUIActions";
5
5
  import useDeepCompareEffect from "./useDeepCompareEffect";
6
6
  import { useLocale } from "./useI18n";
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUI.js","names":["useEffect","useRef","useDispatch","useSelector","HTTP_METHODS","loadModularUI","removeModelByKey","useDeepCompareEffect","useLocale","useKeyForHook","modelKey","url","locale","split","useModularUI","options","method","GET","removeOnUnmount","dispatch","href","toString","key","prevOptions","prevHref","isOldReload","current","isReload","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,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,aAAa,EAAEC,gBAAgB,QAAQ,6BAA6B;AAE7E,OAAOC,oBAAoB,MAAM,wBAAwB;AAEzD,SAASC,SAAS,QAAQ,WAAW;AAKrC;AACA;AACA,MAAMC,aAAa,GAAG,CAACC,QAAgB,EAAEC,GAAW,KAAK;EACvD,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1B,OAAQ,GAAEE,QAAS,IAAGC,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,KAAID,MAAO,GAAE;AACvD,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,YAAY,GAAG,UAC1BJ,QAAgB,EAChBC,GAAkB,EAKV;EAAA,IAJRI,OAA2B,uEAAG;IAC5BC,MAAM,EAAEZ,YAAY,CAACa,GAAG;IACxBC,eAAe,EAAE;EACnB,CAAC;EAED,MAAMC,QAAQ,GAAGjB,WAAW,EAAE;EAC9B,MAAMkB,IAAI,GAAGT,GAAG,CAACU,QAAQ,EAAE;EAC3B,MAAMC,GAAG,GAAGb,aAAa,CAACC,QAAQ,EAAEU,IAAI,CAAC;EAEzC,MAAMG,WAAW,GAAGtB,MAAM,CAACc,OAAO,CAAC;EACnC,MAAMS,QAAQ,GAAGvB,MAAM,CAACmB,IAAI,CAAC;;EAE7B;EACAb,oBAAoB,CAAC,MAAM;IACzB;IACA,MAAMkB,WAAW,GACfD,QAAQ,CAACE,OAAO,KAAKN,IAAI,IACzBG,WAAW,CAACG,OAAO,CAACC,QAAQ,IAC5B,CAACZ,OAAO,CAACY,QAAQ;IAEnB,IAAI,CAACF,WAAW,EAAE;MAChBN,QAAQ,CAACd,aAAa,CAACiB,GAAG,EAAEF,IAAI,EAAEL,OAAO,CAAC,CAAC;IAC7C;IAEAQ,WAAW,CAACG,OAAO,GAAGX,OAAO;IAC7BS,QAAQ,CAACE,OAAO,GAAGN,IAAI;EACzB,CAAC,EAAE,CAACE,GAAG,EAAEF,IAAI,EAAEL,OAAO,CAAC,CAAC;EAExB,MAAM;IAAEG,eAAe,GAAG;EAAM,CAAC,GAAGH,OAAO;EAC3Cf,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACX,IAAIkB,eAAe,EAAE;QACnBC,QAAQ,CAACb,gBAAgB,CAACgB,GAAG,CAAC,CAAC;MACjC;IACF,CAAC;EACH,CAAC,EAAE,CAACH,QAAQ,EAAEG,GAAG,EAAEJ,eAAe,CAAC,CAAC;;EAEpC;EACA,OAAOf,WAAW,CAAEyB,KAAK,IAAK;IAC5B,OAAOA,KAAK,CAACC,SAAS,CAACP,GAAG,CAAC;EAC7B,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"useModularUI.js","names":["useEffect","useRef","useDispatch","useSelector","HTTP_METHODS","loadModularUI","removeModelByKey","useDeepCompareEffect","useLocale","useKeyForHook","modelKey","url","locale","split","useModularUI","options","method","GET","removeOnUnmount","dispatch","href","toString","key","prevOptions","prevHref","isOldReload","current","isReload","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 {\n loadModularUI,\n removeModelByKey,\n} from \"../redux/_modularui/ModularUIActions\";\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,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SAASC,YAAY,QAAQ,cAAc;A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B,MAAM;IAAEG,eAAe,GAAG;EAAM,CAAC,GAAGH,OAAO;EAC3Cf,SAAS,CAAC,MAAM;IACd,OAAO,MAAM;MACX,IAAIkB,eAAe,EAAE;QACnBC,QAAQ,CAACb,gBAAgB,CAACgB,GAAG,CAAC,CAAC;MACjC;IACF,CAAC;EACH,CAAC,EAAE,CAACH,QAAQ,EAAEG,GAAG,EAAEJ,eAAe,CAAC,CAAC;;EAEpC;EACA,OAAOf,WAAW,CAAEyB,KAAK,IAAK;IAC5B,OAAOA,KAAK,CAACC,SAAS,CAACP,GAAG,CAAC;EAC7B,CAAC,CAAC;AACJ,CAAC"}
@@ -14,7 +14,10 @@ export const useModularUIBasic = function (key, href) {
14
14
  if (!href) {
15
15
  throw new IllegalArgumentException("Missing href");
16
16
  }
17
- const useModularUIOptions = {};
17
+ const useModularUIOptions = {
18
+ targetModel: undefined,
19
+ isReload: false
20
+ };
18
21
  if (options.targetModel) {
19
22
  useModularUIOptions.targetModel = options.targetModel;
20
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUIBasic.js","names":["useModularUI","useLocation","IllegalArgumentException","IllegalStateException","useModularUIBasic","key","href","options","expectedModels","targetModel","undefined","location","useModularUIOptions","state","reload","pathname","toString","isReload","modularUI","model","length","isCorrectModel","some","expectedModel","type","console","error"],"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,SAASA,YAAY,QAAQ,gBAAgB;AAE7C,SAASC,WAAW,QAAQ,aAAa;AAEzC,SAASC,wBAAwB,EAAEC,qBAAqB,QAAQ,eAAe;AAS/E;AACA;AACA,OAAO,MAAMC,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,GAAGV,WAAW,EAAE;EAC9B,IAAI,CAACK,IAAI,EAAE;IACT,MAAM,IAAIJ,wBAAwB,CAAC,cAAc,CAAC;EACpD;EAEA,MAAMU,mBAAmB,GAAG,CAAC,CAAC;EAC9B,IAAIL,OAAO,CAACE,WAAW,EAAE;IACvBG,mBAAmB,CAACH,WAAW,GAAGF,OAAO,CAACE,WAAW;EACvD;;EAEA;EACA,IAAIE,QAAQ,CAACE,KAAK,EAAEC,MAAM,IAAI,uCAAAH,QAAQ,CAACI,QAAQ,iBAAYT,IAAI,CAACU,QAAQ,EAAE,CAAC,EAAE;IAC3EJ,mBAAmB,CAACK,QAAQ,GAAG,IAAI;EACrC;EAEA,MAAMC,SAAS,GAAGlB,YAAY,CAACK,GAAG,EAAEC,IAAI,EAAEM,mBAAmB,CAAC;EAE9D,IAAIM,SAAS,EAAEC,KAAK,EAAE;IACpB,MAAM;MAAEA;IAAM,CAAC,GAAGD,SAAS;IAC3B,IAAIX,OAAO,CAACC,cAAc,CAACY,MAAM,GAAG,CAAC,EAAE;MACrC,MAAMC,cAAc,GAAGd,OAAO,CAACC,cAAc,CAACc,IAAI,CAAEC,aAAa,IAAK;QACpE,OAAOJ,KAAK,CAACK,IAAI,KAAKD,aAAa;MACrC,CAAC,CAAC;MAEF,IAAI,CAACF,cAAc,EAAE;QACnBI,OAAO,CAACC,KAAK,CAACR,SAAS,EAAE,oBAAoB,EAAEX,OAAO,CAACC,cAAc,CAAC;QACtE,MAAM,IAAIL,qBAAqB,CAAC,mCAAmC,CAAC;MACtE;IACF;IAEA,OAAOgB,KAAK;EACd;AACF,CAAC"}
1
+ {"version":3,"file":"useModularUIBasic.js","names":["useModularUI","useLocation","IllegalArgumentException","IllegalStateException","useModularUIBasic","key","href","options","expectedModels","targetModel","undefined","location","useModularUIOptions","isReload","state","reload","pathname","toString","modularUI","model","length","isCorrectModel","some","expectedModel","type","console","error"],"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 = { targetModel: undefined, isReload: false };\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,SAASA,YAAY,QAAQ,gBAAgB;AAE7C,SAASC,WAAW,QAAQ,aAAa;AAEzC,SAASC,wBAAwB,EAAEC,qBAAqB,QAAQ,eAAe;AAS/E;AACA;AACA,OAAO,MAAMC,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,GAAGV,WAAW,EAAE;EAC9B,IAAI,CAACK,IAAI,EAAE;IACT,MAAM,IAAIJ,wBAAwB,CAAC,cAAc,CAAC;EACpD;EAEA,MAAMU,mBAAmB,GAAG;IAAEH,WAAW,EAAEC,SAAS;IAAEG,QAAQ,EAAE;EAAM,CAAC;EACvE,IAAIN,OAAO,CAACE,WAAW,EAAE;IACvBG,mBAAmB,CAACH,WAAW,GAAGF,OAAO,CAACE,WAAW;EACvD;;EAEA;EACA,IAAIE,QAAQ,CAACG,KAAK,EAAEC,MAAM,IAAI,uCAAAJ,QAAQ,CAACK,QAAQ,iBAAYV,IAAI,CAACW,QAAQ,EAAE,CAAC,EAAE;IAC3EL,mBAAmB,CAACC,QAAQ,GAAG,IAAI;EACrC;EAEA,MAAMK,SAAS,GAAGlB,YAAY,CAACK,GAAG,EAAEC,IAAI,EAAEM,mBAAmB,CAAC;EAE9D,IAAIM,SAAS,EAAEC,KAAK,EAAE;IACpB,MAAM;MAAEA;IAAM,CAAC,GAAGD,SAAS;IAC3B,IAAIX,OAAO,CAACC,cAAc,CAACY,MAAM,GAAG,CAAC,EAAE;MACrC,MAAMC,cAAc,GAAGd,OAAO,CAACC,cAAc,CAACc,IAAI,CAAEC,aAAa,IAAK;QACpE,OAAOJ,KAAK,CAACK,IAAI,KAAKD,aAAa;MACrC,CAAC,CAAC;MAEF,IAAI,CAACF,cAAc,EAAE;QACnBI,OAAO,CAACC,KAAK,CAACR,SAAS,EAAE,oBAAoB,EAAEX,OAAO,CAACC,cAAc,CAAC;QACtE,MAAM,IAAIL,qBAAqB,CAAC,mCAAmC,CAAC;MACtE;IACF;IAEA,OAAOgB,KAAK;EACd;AACF,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useDispatch, useSelector } from "react-redux";
2
- import { push, replace, go, goBack, goForward } from "../redux/_router/actions";
2
+ import { push, replace, go, goBack, goForward } from "../redux/_router/RouterActions";
3
3
  /**
4
4
  */
5
5
  export const useLocation = () => useSelector(state => state.router.location);
@@ -1 +1 @@
1
- {"version":3,"file":"useRouter.js","names":["useDispatch","useSelector","push","replace","go","goBack","goForward","useLocation","state","router","location","useLocationKey","key","useQuerystring","search","usePathname","pathname","useNavigation","dispatch","delta"],"sources":["../../src/hooks/useRouter.js"],"sourcesContent":["// @flow\nimport { useDispatch, useSelector } from \"react-redux\";\nimport type { Location, LocationShape } from \"react-router\";\n\nimport { push, replace, go, goBack, goForward } from \"../redux/_router/actions\";\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n PushAction,\n ReplaceAction,\n} from \"../redux\";\n\ntype UseLocationHook = () => Location;\ntype UseLocationKeyHook = () => string;\ntype UseQuerystringHook = () => string;\ntype UsePathnameHook = () => string;\ntype UseNavigationHook = () => {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nexport const useLocation: UseLocationHook = () =>\n useSelector((state) => state.router.location);\n\n/**\n */\nexport const useLocationKey: UseLocationKeyHook = () =>\n useLocation()?.key ?? \"\";\n\n/**\n */\nexport const useQuerystring: UseQuerystringHook = () => useLocation()?.search;\n\n/**\n */\nexport const usePathname: UsePathnameHook = () => useLocation()?.pathname;\n\n/**\n */\nexport const useNavigation: UseNavigationHook = () => {\n const dispatch = useDispatch();\n\n return {\n push: (location: LocationShape | string, state?: { ... }) =>\n dispatch(push(location, state)),\n replace: (location: LocationShape | string, state?: { ... }) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n };\n};\n"],"mappings":"AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAGtD,SAASC,IAAI,EAAEC,OAAO,EAAEC,EAAE,EAAEC,MAAM,EAAEC,SAAS,QAAQ,0BAA0B;AAqB/E;AACA;AACA,OAAO,MAAMC,WAA4B,GAAG,MAC1CN,WAAW,CAAEO,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACC,QAAQ,CAAC;;AAE/C;AACA;AACA,OAAO,MAAMC,cAAkC,GAAG,MAChDJ,WAAW,EAAE,EAAEK,GAAG,IAAI,EAAE;;AAE1B;AACA;AACA,OAAO,MAAMC,cAAkC,GAAG,MAAMN,WAAW,EAAE,EAAEO,MAAM;;AAE7E;AACA;AACA,OAAO,MAAMC,WAA4B,GAAG,MAAMR,WAAW,EAAE,EAAES,QAAQ;;AAEzE;AACA;AACA,OAAO,MAAMC,aAAgC,GAAG,MAAM;EACpD,MAAMC,QAAQ,GAAGlB,WAAW,EAAE;EAE9B,OAAO;IACLE,IAAI,EAAE,CAACQ,QAAgC,EAAEF,KAAe,KACtDU,QAAQ,CAAChB,IAAI,CAACQ,QAAQ,EAAEF,KAAK,CAAC,CAAC;IACjCL,OAAO,EAAE,CAACO,QAAgC,EAAEF,KAAe,KACzDU,QAAQ,CAACf,OAAO,CAACO,QAAQ,EAAEF,KAAK,CAAC,CAAC;IACpCJ,EAAE,EAAGe,KAAa,IAAKD,QAAQ,CAACd,EAAE,CAACe,KAAK,CAAC,CAAC;IAC1Cd,MAAM,EAAE,MAAMa,QAAQ,CAACb,MAAM,EAAE,CAAC;IAChCC,SAAS,EAAE,MAAMY,QAAQ,CAACZ,SAAS,EAAE;EACvC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"useRouter.js","names":["useDispatch","useSelector","push","replace","go","goBack","goForward","useLocation","state","router","location","useLocationKey","key","useQuerystring","search","usePathname","pathname","useNavigation","dispatch","delta"],"sources":["../../src/hooks/useRouter.js"],"sourcesContent":["// @flow\nimport { useDispatch, useSelector } from \"react-redux\";\nimport type { Location, LocationShape } from \"react-router\";\n\nimport {\n push,\n replace,\n go,\n goBack,\n goForward,\n} from \"../redux/_router/RouterActions\";\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n PushAction,\n ReplaceAction,\n} from \"../redux\";\n\ntype UseLocationHook = () => Location;\ntype UseLocationKeyHook = () => string;\ntype UseQuerystringHook = () => string;\ntype UsePathnameHook = () => string;\ntype UseNavigationHook = () => {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nexport const useLocation: UseLocationHook = () =>\n useSelector((state) => state.router.location);\n\n/**\n */\nexport const useLocationKey: UseLocationKeyHook = () =>\n useLocation()?.key ?? \"\";\n\n/**\n */\nexport const useQuerystring: UseQuerystringHook = () => useLocation()?.search;\n\n/**\n */\nexport const usePathname: UsePathnameHook = () => useLocation()?.pathname;\n\n/**\n */\nexport const useNavigation: UseNavigationHook = () => {\n const dispatch = useDispatch();\n\n return {\n push: (location: LocationShape | string, state?: { ... }) =>\n dispatch(push(location, state)),\n replace: (location: LocationShape | string, state?: { ... }) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n };\n};\n"],"mappings":"AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAGtD,SACEC,IAAI,EACJC,OAAO,EACPC,EAAE,EACFC,MAAM,EACNC,SAAS,QACJ,gCAAgC;AAqBvC;AACA;AACA,OAAO,MAAMC,WAA4B,GAAG,MAC1CN,WAAW,CAAEO,KAAK,IAAKA,KAAK,CAACC,MAAM,CAACC,QAAQ,CAAC;;AAE/C;AACA;AACA,OAAO,MAAMC,cAAkC,GAAG,MAChDJ,WAAW,EAAE,EAAEK,GAAG,IAAI,EAAE;;AAE1B;AACA;AACA,OAAO,MAAMC,cAAkC,GAAG,MAAMN,WAAW,EAAE,EAAEO,MAAM;;AAE7E;AACA;AACA,OAAO,MAAMC,WAA4B,GAAG,MAAMR,WAAW,EAAE,EAAES,QAAQ;;AAEzE;AACA;AACA,OAAO,MAAMC,aAAgC,GAAG,MAAM;EACpD,MAAMC,QAAQ,GAAGlB,WAAW,EAAE;EAE9B,OAAO;IACLE,IAAI,EAAE,CAACQ,QAAgC,EAAEF,KAAe,KACtDU,QAAQ,CAAChB,IAAI,CAACQ,QAAQ,EAAEF,KAAK,CAAC,CAAC;IACjCL,OAAO,EAAE,CAACO,QAAgC,EAAEF,KAAe,KACzDU,QAAQ,CAACf,OAAO,CAACO,QAAQ,EAAEF,KAAK,CAAC,CAAC;IACpCJ,EAAE,EAAGe,KAAa,IAAKD,QAAQ,CAACd,EAAE,CAACe,KAAK,CAAC,CAAC;IAC1Cd,MAAM,EAAE,MAAMa,QAAQ,CAACb,MAAM,EAAE,CAAC;IAChCC,SAAS,EAAE,MAAMY,QAAQ,CAACZ,SAAS,EAAE;EACvC,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AttributeCollection.js","names":["has","ResourceCollection","createAttribute","ChoiceAttributeModel","CompositeAttributeModel","ContentConfiguration","ConfigurationException","AttributeCollection","constructor","data","contributions","isReadonly","forEach","contribution","key","attribute","readonly","collection","push","processLayoutHintRules","attributes","all","visible","isHidden","questions","isResult","results","getAttributeByAttribute","attr","equals","getChildByAttribute","getAttributeByKey","getChildByKey","hasAttributeByKey","getAttributeByLayoutHint","hints","layouthint","getChoiceAttributeByLayoutHint","layoutHint","getAttributesByLayoutHint","replace","oldAttribute","newAttribute","replaceByKey","index","setReferenceDate","date","clone","referenceDate","hasServerErrors","some","addServerError","error","elementid","anchor","hasErrors","updateValidations","errors","hasDynamicValidationData","attributeErrors","compositeChildErrors","elementId","children","indicateContentConfiguration","contentConfiguration","formdata","getFormData","validationData","attributesFormData","isVisible","getEmptyFormData","attributeFormData"],"sources":["../../../src/models/attributes/AttributeCollection.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ResourceCollection from \"../base/ResourceCollection\";\n\nimport createAttribute from \"./_createAttribute\";\nimport ChoiceAttributeModel from \"./ChoiceAttributeModel\";\nimport CompositeAttributeModel from \"./CompositeAttributeModel\";\n\nimport ContentConfiguration from \"../contentconfiguration/ContentConfiguration\";\n\nimport { ConfigurationException } from \"../../exceptions\";\n\nimport type { AttributeType, FormErrorAnchor } from \"../types\";\n\n/**\n * Collection of attributes\n */\nclass AttributeCollection extends ResourceCollection<AttributeType> {\n constructor(\n data: Object | Array<Object> = {},\n contributions: Array<Object> = [],\n isReadonly: boolean = false\n ) {\n super();\n\n if (contributions) {\n contributions.forEach((contribution) => {\n const [key] = Object.keys(contribution);\n\n const attribute = createAttribute(key, data, contribution[key]);\n\n if (attribute !== null) {\n // when readonly is not explicitly set in the contributions, follow argument\n if (isReadonly && !has(contribution[key], \"readonly\")) {\n attribute.readonly = true;\n }\n\n this.collection.push(attribute);\n }\n });\n\n this.processLayoutHintRules();\n }\n }\n\n /**\n * Retrieve all attributes in this collection<br>\n * This getter processes layout hints, this is different from the standard {@link BaseCollection#all} property\n * @returns {Array<AttributeType>}\n */\n get attributes(): Array<AttributeType> {\n this.processLayoutHintRules();\n return this.all;\n }\n\n /**\n * Replace attributes with a new array of attributes\n */\n set attributes(attributes: Array<AttributeType>) {\n this.collection = attributes;\n }\n\n /**\n */\n processLayoutHintRules() {\n this.all.forEach((attribute) => {\n attribute.processLayoutHintRules(this);\n });\n }\n\n /**\n * Retrieve only visible attributes from the collection\n */\n get visible(): Array<AttributeType> {\n // Let flow know that this is a AttributeCollection\n if (this instanceof AttributeCollection) {\n return this.attributes.filter((attribute) => !attribute.isHidden);\n }\n\n return [];\n }\n\n /**\n */\n get questions(): Array<AttributeType> {\n return this.visible.filter((attribute) => !attribute.isResult);\n }\n\n /**\n */\n get results(): Array<AttributeType> {\n return this.visible.filter((attribute) => attribute.isResult);\n }\n\n /**\n */\n getAttributeByAttribute(attribute: AttributeType): AttributeType | null {\n return this.find((attr) => {\n if (attr.equals(attribute)) {\n return true;\n } else if (attribute instanceof CompositeAttributeModel) {\n return attribute.getChildByAttribute(attribute);\n }\n\n return false;\n });\n }\n\n /**\n * Get a single attribute by it's key\n */\n getAttributeByKey(key: string): AttributeType | null {\n return this.find((attribute) => {\n if (attribute.key === key) {\n return true;\n } else if (attribute instanceof CompositeAttributeModel) {\n return attribute.getChildByKey(key);\n }\n\n return false;\n });\n }\n\n /**\n * Indicates if attribute with key exists in collection\n */\n hasAttributeByKey(key: string): boolean {\n return this.getAttributeByKey(key) !== null;\n }\n\n /**\n * Getting the first attribute having the supplied layout hint\n */\n getAttributeByLayoutHint(...hints: Array<string>): AttributeType | null {\n return this.find((attribute) => attribute.layouthint.has(...hints)) || null;\n }\n\n /**\n * Getting a choice attribute by layouthint, returns null when not found or not a choice attribute\n */\n getChoiceAttributeByLayoutHint(\n layoutHint: string\n ): ChoiceAttributeModel | null {\n const attribute = this.getAttributeByLayoutHint(layoutHint);\n\n return attribute instanceof ChoiceAttributeModel ? attribute : null;\n }\n\n /**\n * Getting all attributes having the supplied layout hint\n */\n getAttributesByLayoutHint(...hints: Array<string>): Array<AttributeType> {\n return this.filter((attribute) => attribute.layouthint.has(...hints));\n }\n\n /**\n * Replace an attribute instance in the collection with a new attribute instance\n */\n replace(oldAttribute: AttributeType, newAttribute: AttributeType) {\n this.replaceByKey(oldAttribute.key, newAttribute);\n }\n\n /**\n * Replace an attribute by the key of the attribute\n */\n replaceByKey(key: string, newAttribute: AttributeType) {\n this.forEach((attribute, index) => {\n if (attribute.key === key) {\n this.collection[index] = newAttribute;\n }\n });\n }\n\n /**\n * Set reference date by replacing an old attribute with a new attribute with a reference Date\n * Date is a string in ISO format yyyy-MM-dd\n */\n setReferenceDate(date: string) {\n this.forEach((attribute) => {\n const newAttribute = attribute.clone();\n\n newAttribute.referenceDate = date;\n\n this.replace(attribute, newAttribute);\n });\n }\n\n /**\n */\n hasServerErrors(): boolean {\n return this.collection.some((attribute) => attribute.hasServerErrors());\n }\n\n /**\n */\n addServerError(error: FormErrorAnchor) {\n const elementid = error?.anchor?.elementid;\n\n if (elementid) {\n const attribute = this.getAttributeByKey(elementid);\n if (attribute) {\n attribute.addServerError(error);\n } else {\n throw new ConfigurationException(\n `Could not add error to missing attribute with id ${elementid}`\n );\n }\n }\n }\n\n /**\n */\n hasErrors(): boolean {\n return this.visible.some((attribute) => attribute.hasErrors());\n }\n\n /**\n */\n updateValidations(errors: Array<Object>): AttributeCollection {\n this.all\n .filter((attribute) => attribute.hasDynamicValidationData)\n .forEach((attribute) => {\n const attributeErrors = errors.filter(\n (error) => error.anchor?.elementid === attribute.key\n );\n attribute.updateValidations(attributeErrors);\n\n if (attribute instanceof CompositeAttributeModel) {\n const compositeChildErrors = errors.filter((error) => {\n const elementId = error.anchor?.elementid;\n return elementId && elementId.startsWith(`${attribute.key}.`);\n });\n\n attribute.children.updateValidations(\n `${attribute.key}.`,\n compositeChildErrors\n );\n }\n });\n\n return this;\n }\n\n /**\n */\n indicateContentConfiguration(contentConfiguration: ContentConfiguration) {\n if (contentConfiguration) {\n this.all.forEach((attribute) => {\n attribute.indicateContentConfiguration(contentConfiguration);\n });\n }\n }\n\n /**\n * Generate formdata object for current collection based on formdata of attributes\n * Skip attributes that are readonly, the confirmation password or null\n */\n get formdata(): { [string]: any } | null {\n return this.getFormData(false);\n }\n\n /**\n */\n getFormData(validationData: boolean = false): { [string]: any } | null {\n const attributesFormData = this.attributes\n .filter(\n (attribute) =>\n attribute.formdata !== null &&\n !attribute.readonly &&\n (!validationData || attribute.hasDynamicValidationData)\n )\n .map((attribute) => {\n // make attribute empty when it is not (or no longer) visible\n if (attribute.isVisible) {\n return attribute.formdata;\n }\n\n return attribute.getEmptyFormData();\n });\n\n let data = {};\n attributesFormData.forEach((attributeFormData) => {\n // $FlowIgnore[cannot-spread-indexer]\n // $FlowIgnore[exponential-spread]\n data = {\n ...data,\n ...attributeFormData,\n };\n });\n\n return data;\n }\n}\n\nexport default AttributeCollection;\n"],"mappings":";;;;;AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,kBAAkB,MAAM,4BAA4B;AAE3D,OAAOC,eAAe,MAAM,oBAAoB;AAChD,OAAOC,oBAAoB,MAAM,wBAAwB;AACzD,OAAOC,uBAAuB,MAAM,2BAA2B;AAE/D,OAAOC,oBAAoB,MAAM,8CAA8C;AAE/E,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA;AACA,MAAMC,mBAAmB,SAASN,kBAAkB,CAAgB;EAClEO,WAAW,GAIT;IAAA,IAHAC,IAA4B,uEAAG,CAAC,CAAC;IAAA,IACjCC,aAA4B,uEAAG,EAAE;IAAA,IACjCC,UAAmB,uEAAG,KAAK;IAE3B,KAAK,EAAE;IAEP,IAAID,aAAa,EAAE;MACjBA,aAAa,CAACE,OAAO,CAAEC,YAAY,IAAK;QACtC,MAAM,CAACC,GAAG,CAAC,GAAG,aAAYD,YAAY,CAAC;QAEvC,MAAME,SAAS,GAAGb,eAAe,CAACY,GAAG,EAAEL,IAAI,EAAEI,YAAY,CAACC,GAAG,CAAC,CAAC;QAE/D,IAAIC,SAAS,KAAK,IAAI,EAAE;UACtB;UACA,IAAIJ,UAAU,IAAI,CAACX,GA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,kBAAkB,GAAG,0EAAI,CAAChD,UAAU,mBAErCL,SAAS,IACRA,SAAS,CAACkD,QAAQ,KAAK,IAAI,IAC3B,CAAClD,SAAS,CAACC,QAAQ,KAClB,CAACmD,cAAc,IAAIpD,SAAS,CAAC2C,wBAAwB,CAAC,CAC1D,kBACK3C,SAAS,IAAK;MAClB;MACA,IAAIA,SAAS,CAACsD,SAAS,EAAE;QACvB,OAAOtD,SAAS,CAACkD,QAAQ;MAC3B;MAEA,OAAOlD,SAAS,CAACuD,gBAAgB,EAAE;IACrC,CAAC,CAAC;IAEJ,IAAI7D,IAAI,GAAG,CAAC,CAAC;IACb2D,kBAAkB,CAACxD,OAAO,CAAE2D,iBAAiB,IAAK;MAChD;MACA;MACA9D,IAAI,GAAG;QACL,GAAGA,IAAI;QACP,GAAG8D;MACL,CAAC;IACH,CAAC,CAAC;IAEF,OAAO9D,IAAI;EACb;AACF;AAEA,eAAeF,mBAAmB"}
1
+ {"version":3,"file":"AttributeCollection.js","names":["has","ResourceCollection","createAttribute","ChoiceAttributeModel","CompositeAttributeModel","ContentConfiguration","ConfigurationException","AttributeCollection","constructor","data","contributions","isReadonly","forEach","contribution","key","attribute","readonly","collection","push","processLayoutHintRules","attributes","all","visible","isHidden","questions","isResult","results","getAttributeByAttribute","attr","equals","getChildByAttribute","getAttributeByKey","getChildByKey","hasAttributeByKey","getAttributeByLayoutHint","hints","layouthint","getChoiceAttributeByLayoutHint","layoutHint","getAttributesByLayoutHint","replace","oldAttribute","newAttribute","replaceByKey","index","setReferenceDate","date","clone","referenceDate","hasServerErrors","some","addServerError","error","elementid","anchor","hasErrors","updateValidations","errors","hasDynamicValidationData","attributeErrors","compositeChildErrors","elementId","children","indicateContentConfiguration","contentConfiguration","formdata","getFormData","validationData","attributesFormData","isVisible","getEmptyFormData","attributeFormData"],"sources":["../../../src/models/attributes/AttributeCollection.js"],"sourcesContent":["// @flow\nimport { has } from \"../../utils/helpers/objects\";\n\nimport ResourceCollection from \"../base/ResourceCollection\";\n\nimport createAttribute from \"./_createAttribute\";\nimport ChoiceAttributeModel from \"./ChoiceAttributeModel\";\nimport CompositeAttributeModel from \"./CompositeAttributeModel\";\n\nimport ContentConfiguration from \"../contentconfiguration/ContentConfiguration\";\n\nimport { ConfigurationException } from \"../../exceptions\";\n\nimport type { AttributeType, FormErrorAnchor } from \"../types\";\n\n/**\n * Collection of attributes\n */\nclass AttributeCollection extends ResourceCollection<AttributeType> {\n constructor(\n data: Object | Array<Object> = {},\n contributions: Array<Object> = [],\n isReadonly: boolean = false\n ) {\n super();\n\n if (contributions) {\n contributions.forEach((contribution) => {\n const [key] = Object.keys(contribution);\n\n const attribute = createAttribute(key, data, contribution[key]);\n\n if (attribute !== null) {\n // when readonly is not explicitly set in the contributions, follow argument\n if (isReadonly && !has(contribution[key], \"readonly\")) {\n attribute.readonly = true;\n }\n\n this.collection.push(attribute);\n }\n });\n\n this.processLayoutHintRules();\n }\n }\n\n /**\n * Retrieve all attributes in this collection<br>\n * This getter processes layout hints, this is different from the standard {@link BaseCollection#all} property\n * @returns {Array<AttributeType>}\n */\n get attributes(): Array<AttributeType> {\n this.processLayoutHintRules();\n return this.all;\n }\n\n /**\n * Replace attributes with a new array of attributes\n */\n set attributes(attributes: Array<AttributeType>) {\n this.collection = attributes;\n }\n\n /**\n */\n processLayoutHintRules(): void {\n this.all.forEach((attribute) => {\n attribute.processLayoutHintRules(this);\n });\n }\n\n /**\n * Retrieve only visible attributes from the collection\n */\n get visible(): Array<AttributeType> {\n // Let flow know that this is a AttributeCollection\n if (this instanceof AttributeCollection) {\n return this.attributes.filter((attribute) => !attribute.isHidden);\n }\n\n return [];\n }\n\n /**\n */\n get questions(): Array<AttributeType> {\n return this.visible.filter((attribute) => !attribute.isResult);\n }\n\n /**\n */\n get results(): Array<AttributeType> {\n return this.visible.filter((attribute) => attribute.isResult);\n }\n\n /**\n */\n getAttributeByAttribute(attribute: AttributeType): AttributeType | null {\n return this.find((attr) => {\n if (attr.equals(attribute)) {\n return true;\n } else if (attribute instanceof CompositeAttributeModel) {\n return attribute.getChildByAttribute(attribute);\n }\n\n return false;\n });\n }\n\n /**\n * Get a single attribute by it's key\n */\n getAttributeByKey(key: string): AttributeType | null {\n return this.find((attribute) => {\n if (attribute.key === key) {\n return true;\n } else if (attribute instanceof CompositeAttributeModel) {\n return attribute.getChildByKey(key);\n }\n\n return false;\n });\n }\n\n /**\n * Indicates if attribute with key exists in collection\n */\n hasAttributeByKey(key: string): boolean {\n return this.getAttributeByKey(key) !== null;\n }\n\n /**\n * Getting the first attribute having the supplied layout hint\n */\n getAttributeByLayoutHint(...hints: Array<string>): AttributeType | null {\n return this.find((attribute) => attribute.layouthint.has(...hints)) || null;\n }\n\n /**\n * Getting a choice attribute by layouthint, returns null when not found or not a choice attribute\n */\n getChoiceAttributeByLayoutHint(\n layoutHint: string\n ): ChoiceAttributeModel | null {\n const attribute = this.getAttributeByLayoutHint(layoutHint);\n\n return attribute instanceof ChoiceAttributeModel ? attribute : null;\n }\n\n /**\n * Getting all attributes having the supplied layout hint\n */\n getAttributesByLayoutHint(...hints: Array<string>): Array<AttributeType> {\n return this.filter((attribute) => attribute.layouthint.has(...hints));\n }\n\n /**\n * Replace an attribute instance in the collection with a new attribute instance\n */\n replace(oldAttribute: AttributeType, newAttribute: AttributeType): void {\n this.replaceByKey(oldAttribute.key, newAttribute);\n }\n\n /**\n * Replace an attribute by the key of the attribute\n */\n replaceByKey(key: string, newAttribute: AttributeType): void {\n this.forEach((attribute, index) => {\n if (attribute.key === key) {\n this.collection[index] = newAttribute;\n }\n });\n }\n\n /**\n * Set reference date by replacing an old attribute with a new attribute with a reference Date\n * Date is a string in ISO format yyyy-MM-dd\n */\n setReferenceDate(date: string): void {\n this.forEach((attribute) => {\n const newAttribute = attribute.clone();\n\n newAttribute.referenceDate = date;\n\n this.replace(attribute, newAttribute);\n });\n }\n\n /**\n */\n hasServerErrors(): boolean {\n return this.collection.some((attribute) => attribute.hasServerErrors());\n }\n\n /**\n */\n addServerError(error: FormErrorAnchor): void {\n const elementid = error?.anchor?.elementid;\n\n if (elementid) {\n const attribute = this.getAttributeByKey(elementid);\n if (attribute) {\n attribute.addServerError(error);\n } else {\n throw new ConfigurationException(\n `Could not add error to missing attribute with id ${elementid}`\n );\n }\n }\n }\n\n /**\n */\n hasErrors(): boolean {\n return this.visible.some((attribute) => attribute.hasErrors());\n }\n\n /**\n */\n updateValidations(errors: Array<Object>): AttributeCollection {\n this.all\n .filter((attribute) => attribute.hasDynamicValidationData)\n .forEach((attribute) => {\n const attributeErrors = errors.filter(\n (error) => error.anchor?.elementid === attribute.key\n );\n attribute.updateValidations(attributeErrors);\n\n if (attribute instanceof CompositeAttributeModel) {\n const compositeChildErrors = errors.filter((error) => {\n const elementId = error.anchor?.elementid;\n return elementId && elementId.startsWith(`${attribute.key}.`);\n });\n\n attribute.children.updateValidations(\n `${attribute.key}.`,\n compositeChildErrors\n );\n }\n });\n\n return this;\n }\n\n /**\n */\n indicateContentConfiguration(\n contentConfiguration: ContentConfiguration\n ): void {\n if (contentConfiguration) {\n this.all.forEach((attribute) => {\n attribute.indicateContentConfiguration(contentConfiguration);\n });\n }\n }\n\n /**\n * Generate formdata object for current collection based on formdata of attributes\n * Skip attributes that are readonly, the confirmation password or null\n */\n get formdata(): { [string]: any } | null {\n return this.getFormData(false);\n }\n\n /**\n */\n getFormData(validationData: boolean = false): { [string]: any } | null {\n const attributesFormData = this.attributes\n .filter(\n (attribute) =>\n attribute.formdata !== null &&\n !attribute.readonly &&\n (!validationData || attribute.hasDynamicValidationData)\n )\n .map((attribute) => {\n // make attribute empty when it is not (or no longer) visible\n if (attribute.isVisible) {\n return attribute.formdata;\n }\n\n return attribute.getEmptyFormData();\n });\n\n let data = {};\n attributesFormData.forEach((attributeFormData) => {\n // $FlowIgnore[cannot-spread-indexer]\n // $FlowIgnore[exponential-spread]\n data = {\n ...data,\n ...attributeFormData,\n };\n });\n\n return data;\n }\n}\n\nexport default AttributeCollection;\n"],"mappings":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AI,GAAG;QACL,GAAGA,IAAI;QACP,GAAG8D;MACL,CAAC;IACH,CAAC,CAAC;IAEF,OAAO9D,IAAI;EACb;AACF;AAEA,eAAeF,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"AttributeModel.js","names":["DateUtil","isPlainObject","BaseModel","ConstraintCollection","ErrorCollection","LinkCollection","StringLengthConstraint","MandatoryConstraint","ConceptDetailModel","DISABLED","MANDATORY","ATTRIBUTE_WIDTH","TIMEVERSION_FILTER_NAME","getSetting","hasAllContentInData","IllegalArgumentException","UnsupportedOperationException","AttributeContent","AttributeModel","constructor","attribute","attributeContributions","hasContentFromData","content","label","_label","contributions","_initvalue","data","value","_inputvalue","getInitialInputValue","_value","_disabled","layouthint","has","_errorCollection","message","addServerError","id","parameters","_referenceDate","getData","now","_isResult","_mandatory","mandatory","_links","isApplicableModel","getInitialChildModelLinks","hasContentConfiguration","conceptLink","setChildModels","models","conceptHref","href","concept","model","selfhref","equalsWithParameters","key","parentKey","_parentKey","name","type","_hasContentConfiguration","indicateContentConfiguration","contentConfiguration","hasQuestionConfig","questions","hasConfig","hasEndResultConfig","isConfiguredEndResultAttribute","hasIntermediateResultConfig","isConfiguredIntermediateResultAttribute","getContentConfiguredLabel","configuredLabelProperties","labelConfig","length","types","configuredLabels","getLabelElementByIds","configuredLabel","firstConfiguredLabel","configuredLabelProperty","some","_id","defaultAlignment","alignment","alignmentHints","getByLayoutHint","substring","links","downloadLink","getLinksByGroup","first","getLinkByKey","addParameter","referenceDate","isCacheable","_concept","date","initvalue","getInputValue","inputvalue","toString","validateValue","validate","hasValue","getValue","getFormData","inError","formdata","getEmptyFormData","updateLastModification","formatValue","readonlyvalue","configuredMandatory","_validatedValue","readonly","_readonly","static","isResult","disabled","format","getContribution","formatLabel","minLength","maxLength","operator","assistantMessage","isValid","constraintCollection","constraints","add","_serverConstraints","addConstraints","setUseClientsideValidation","enabled","_useClientsideValidation","useClientsideValidation","isOptionalAndEmpty","_isValid","undefined","errorCollection","collection","invalidConstraints","isChangedSince","resetErrors","error","properties","removeServerError","hasServerErrors","serverErrors","hasErrors","hasItems","addMissingError","removeMissingError","addServerConstraint","defaultMessage","addConstraint","formatParameters","params","forEach","paramKey","paramValue","hasDynamicValidationData","updateValidations","errors","_lastModification","Date","timestamp","reset","mergeAttribute","oldAttribute","update","changedAttribute","isEditable","_isEditable","isVisible","_isHidden","isHidden","show","hide","equals","otherAttribute","readonlyWidth","MEDIUM","layoutHintRules","_layoutHintRules","rules","processLayoutHintRules","attributes","process"],"sources":["../../../src/models/attributes/AttributeModel.js"],"sourcesContent":["// @flow\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport ConstraintCollection from \"./input-constraints/ConstraintCollection\";\nimport ErrorCollection from \"../error/ErrorCollection\";\nimport LinkCollection from \"../links/LinkCollection\";\n\nimport StringLengthConstraint from \"./input-constraints/StringLengthConstraint\";\nimport MandatoryConstraint from \"./input-constraints/MandatoryConstraint\";\n\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\n\nimport { DISABLED, MANDATORY } from \"../../constants/LayoutHints\";\nimport {\n ATTRIBUTE_WIDTH,\n TIMEVERSION_FILTER_NAME,\n} from \"../../constants/Constants\";\n\nimport { getSetting, hasAllContentInData } from \"../../constants/Settings\";\n\nimport {\n IllegalArgumentException,\n UnsupportedOperationException,\n} from \"../../exceptions\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport type {\n AttributeType,\n FormErrorAnchor,\n IModelWithChildModels,\n ModularUIModel,\n} from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ContentConfiguration from \"../contentconfiguration/ContentConfiguration\";\nimport type ContentConfigurationElements from \"../contentconfiguration/ContentConfigurationElements\";\nimport type LayoutHintRuleCollection from \"./layouthint-rules/LayoutHintRuleCollection\";\nimport type AttributeCollection from \"./AttributeCollection\";\nimport AttributeContent from \"./AttributeContent\";\n\n/**\n * Attribute model, base model for all kind of attributes\n */\nexport default class AttributeModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _label: string;\n _lastModification: number = 0;\n\n _initvalue: any;\n _inputvalue: string;\n _value: any;\n\n _errorCollection: ErrorCollection;\n _serverConstraints: ConstraintCollection = new ConstraintCollection();\n _useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\");\n _isValid: boolean = true;\n _validatedValue: string | null;\n _isEditable: boolean = false;\n _concept: ConceptDetailModel | null = null;\n _referenceDate: ISO_DATE;\n _isResult: boolean;\n _isHidden: boolean = false;\n _readonly: boolean;\n _disabled: boolean = false;\n _mandatory: boolean;\n _links: LinkCollection;\n _parentKey: ?string;\n _hasContentConfiguration: boolean;\n _layoutHintRules: LayoutHintRuleCollection;\n\n /**\n */\n constructor(attribute: Object, attributeContributions: Object) {\n super(attribute, attributeContributions);\n\n if (this.hasContentFromData && this.content.label) {\n this._label = this.content.label;\n } else {\n this._label = this.contributions.label;\n }\n\n this._initvalue = this.data.value;\n this._inputvalue = this.getInitialInputValue(this.data.value);\n this._value = this.data.value;\n this._disabled = this.layouthint.has(DISABLED);\n\n this._errorCollection = new ErrorCollection(\"attribute\");\n if (attribute && attribute.message) {\n this._errorCollection.addServerError(\n attribute.message.id,\n attribute.message.message,\n attribute.message.parameters,\n attribute.message.layouthint\n );\n }\n\n this._referenceDate = this.getData(\"referenceDate\", DateUtil.now());\n\n this._isResult = this.getData(\"isResult\", false);\n\n this._mandatory =\n this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n /**\n */\n static isApplicableModel(contributions: Object): boolean {\n if (!isPlainObject(contributions)) {\n throw new IllegalArgumentException(\n \"Given argument for isApplicableModel is not a contributions object\"\n );\n }\n\n return false;\n }\n\n /**\n * Retrieve initial input value\n */\n getInitialInputValue(value: any): any {\n return value;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (\n !this.hasContentFromData &&\n this.hasContentConfiguration &&\n this.conceptLink\n ) {\n return [this.conceptLink];\n }\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>) {\n const conceptHref = this.conceptLink?.href;\n if (conceptHref) {\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref)\n );\n }\n }\n\n /**\n * Getting the attribute key\n */\n get key(): string {\n return this.data.key;\n }\n\n /**\n */\n get parentKey(): string {\n return this._parentKey || \"\";\n }\n\n /**\n */\n set parentKey(parentKey: string) {\n this._parentKey = parentKey;\n }\n\n /**\n * Getting the attribute name\n */\n get name(): string {\n return this.key;\n }\n\n /**\n * Getting the type of the attribute\n */\n get type(): string {\n return this.contributions.type;\n }\n\n /**\n * Getting the label of the attribute\n */\n get label(): string {\n return this._label || \"\";\n }\n\n /**\n * Set the label of this attribute\n */\n set label(label: string) {\n this._label = label;\n }\n\n /**\n */\n set hasContentConfiguration(hasContentConfiguration: boolean) {\n this._hasContentConfiguration = hasContentConfiguration;\n }\n\n /**\n */\n get hasContentConfiguration(): boolean {\n return this._hasContentConfiguration || false;\n }\n\n /**\n */\n indicateContentConfiguration(contentConfiguration: ContentConfiguration) {\n if (contentConfiguration) {\n const hasQuestionConfig = contentConfiguration.questions?.hasConfig();\n\n const hasEndResultConfig =\n contentConfiguration.isConfiguredEndResultAttribute(this.key);\n const hasIntermediateResultConfig =\n contentConfiguration.isConfiguredIntermediateResultAttribute(this.key);\n\n this.hasContentConfiguration =\n hasQuestionConfig || hasEndResultConfig || hasIntermediateResultConfig;\n }\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(\n contentConfiguration: ?ContentConfigurationElements\n ): string {\n if (this.hasContentFromData) {\n return this.content.label ?? this.label;\n }\n\n const configuredLabelProperties =\n contentConfiguration && contentConfiguration.labelConfig.length > 0\n ? contentConfiguration.labelConfig[0].types\n : [];\n\n if (this.concept && configuredLabelProperties.length > 0) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\"\n );\n\n if (configuredLabels.length > 0) {\n const [firstConfiguredLabel] = configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n );\n\n if (firstConfiguredLabel) {\n return firstConfiguredLabel.value;\n }\n }\n }\n\n return this.label;\n }\n\n /**\n */\n get defaultAlignment(): \"left\" | \"center\" | \"right\" {\n return \"left\";\n }\n\n /**\n * Handles layout hint align-left, align-center and align-right\n */\n get alignment(): \"left\" | \"center\" | \"right\" {\n const alignmentHints = this.layouthint.getByLayoutHint(\"align-\");\n\n // return alignment based on layouthint or the default alignment for the attribute\n const alignment = alignmentHints\n ? alignmentHints.substring(\"align-\".length)\n : this.defaultAlignment;\n\n if (\n alignment === \"left\" ||\n alignment === \"center\" ||\n alignment === \"right\"\n ) {\n return alignment;\n }\n\n return this.defaultAlignment;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Retrieve link of attribute when available\n */\n get downloadLink(): ?LinkModel {\n const downloadLink = this.links.getLinksByGroup(\"download\").first;\n\n if (downloadLink && downloadLink.key === this.key) {\n return downloadLink;\n }\n\n return null;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): ?LinkModel {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept ?? null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Retrieve reference date of attribute which can be used as entryDate for content\n * to get information in correct time version\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n * Set reference date for concepts and content\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Initial value received from the modular ui service\n */\n get initvalue(): any {\n return this._initvalue;\n }\n\n /**\n * Retrieve input value\n */\n getInputValue(): string {\n const inputvalue = this._inputvalue;\n\n return inputvalue ? inputvalue.toString() : \"\";\n }\n\n /**\n * Returns the value as entered by the user. This can differ from the internal iso value that is stored\n */\n get inputvalue(): string {\n return this.getInputValue();\n }\n\n /**\n * Value that is used when retrieving an error collection of this attribute\n * Mostly this is the input value, but sometimes a different value is needed,\n * for example iban and postcode need to validate length without spaces\n */\n get validateValue(): string {\n return this.inputvalue;\n }\n\n /**\n * Sets the input value to the value entered by the user\n */\n set inputvalue(value: string) {\n this._inputvalue = value;\n this.value = value;\n\n this.validate(value);\n }\n\n /**\n */\n hasValue(): boolean {\n return this._value != null && this._value !== \"\";\n }\n\n /**\n * Getting the value of the attribute\n */\n getValue(): any {\n return this.hasValue() ? this._value : null;\n }\n\n /**\n * Getting data ready to be send to the modular ui\n * Returns null when the attribute should not be send to the server\n */\n getFormData(): { [string]: any } | null {\n if (this.inError()) {\n return null;\n }\n\n return {\n [this.name]: this.value,\n };\n }\n\n /**\n */\n get formdata(): { [string]: any } | null {\n return this.getFormData();\n }\n\n /**\n */\n getEmptyFormData(): { [string]: null } {\n return { [this.name]: null };\n }\n\n /**\n * Getting the value of the attribute\n */\n get value(): any {\n return this.getValue();\n }\n\n /**\n * Setting a value in the element\n */\n set value(value: ?string) {\n this.updateLastModification();\n\n this._value = value;\n }\n\n /**\n */\n formatValue(value: string): string {\n return value;\n }\n\n /**\n * Getting the readonly value, iso value converted for human reading\n */\n get readonlyvalue(): string {\n return this.value ? this.value.toString() : \"\";\n }\n\n /**\n * Getting mandatory status of attribute\n */\n get mandatory(): boolean {\n return this._mandatory || false;\n }\n\n /**\n */\n get configuredMandatory(): ?boolean {\n return this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n }\n\n /**\n * Set mandatory status of attribute\n */\n set mandatory(mandatory: boolean) {\n if (mandatory !== this._mandatory) {\n this._validatedValue = null;\n }\n this._mandatory = mandatory;\n }\n\n /**\n */\n get readonly(): boolean {\n return (\n this._readonly ||\n this.contributions.readonly === true ||\n this.data.static === true ||\n this.isResult === true\n );\n }\n\n /**\n */\n set readonly(readonly: boolean) {\n this._readonly = readonly;\n }\n\n /**\n */\n get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n */\n set disabled(disabled: boolean) {\n this._disabled = disabled;\n }\n\n /**\n */\n get isResult(): boolean {\n return this._isResult;\n }\n\n /**\n */\n set isResult(isResult: boolean) {\n this._isResult = isResult;\n }\n\n /**\n * Getting the display and input format of a attribute\n */\n get format(): string | null {\n return this.getContribution(\"format\");\n }\n\n /**\n */\n get formatLabel(): string {\n return this.format || \"\";\n }\n\n /**\n * Get minimum string length\n */\n get minLength(): number | null {\n return this.getContribution(\"minLength\");\n }\n\n /**\n * Get maximum string length\n */\n get maxLength(): number | null {\n return this.getContribution(\"maxLength\");\n }\n\n /**\n */\n get operator(): string {\n return \"\";\n }\n\n /**\n * Get assistant message\n */\n get assistantMessage(): string | null {\n return this.getContribution(\"assistant\");\n }\n\n /**\n * Get valid status\n */\n get isValid(): boolean {\n return this.validate(this.validateValue);\n }\n\n /**\n * Retrieve applicable constraint for this attribute\n */\n get constraintCollection(): ConstraintCollection {\n const constraints = new ConstraintCollection();\n\n constraints.add(this._serverConstraints);\n\n // Mandatory constraint\n if (this.mandatory) {\n constraints.add(new MandatoryConstraint());\n }\n\n if (this.minLength || this.maxLength) {\n constraints.add(\n new StringLengthConstraint(this.minLength, this.maxLength)\n );\n }\n\n constraints.add(this.addConstraints());\n\n return constraints;\n }\n\n /**\n * Template method for class extending this model to add extra constraints\n * @abstract\n */\n addConstraints(): ConstraintCollection {\n return new ConstraintCollection();\n }\n\n /**\n * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION\n */\n setUseClientsideValidation(enabled: boolean) {\n this._useClientsideValidation = enabled;\n }\n\n /**\n * Indicates if client side validation is enabled\n * @returns {boolean}\n */\n useClientsideValidation(): boolean {\n return this._useClientsideValidation ?? true;\n }\n\n /**\n * Validate input on client side constraint\n */\n validate(value: string): boolean {\n // when client side validation is disabled, this attribute is always valid\n if (!this.useClientsideValidation()) {\n return true;\n }\n\n if (this.isOptionalAndEmpty(value)) {\n this._isValid = true;\n } else if (this._validatedValue !== value) {\n this._isValid = this.constraintCollection.validate(value);\n }\n this._validatedValue = value;\n\n return this._isValid;\n }\n\n /**\n * Indicates if attribute is optional and empty\n */\n isOptionalAndEmpty(value: string): boolean {\n if (value === undefined) {\n throw new IllegalArgumentException(\n \"isOptionalAndEmpty method needs value argument\"\n );\n }\n\n return !this.mandatory && value === \"\";\n }\n\n /**\n * Retrieve error messages of this attribute\n */\n get errorCollection(): ErrorCollection {\n const collection = new ErrorCollection(\"attribute\", this._errorCollection);\n\n collection.addConstraints(\n this.constraintCollection.invalidConstraints(this.validateValue)\n );\n\n return collection;\n }\n\n /**\n * Check if attribute is in error\n */\n inError(): boolean {\n return !this._isValid && this.isChangedSince(0);\n }\n\n /**\n * Reset static error messages on attribute\n */\n resetErrors() {\n this._errorCollection = new ErrorCollection(\"attribute\");\n }\n\n /**\n * Registers an error that was received from a server response\n */\n addServerError(error: FormErrorAnchor) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n error.properties,\n error.layouthint\n );\n }\n\n /**\n */\n removeServerError(id: string) {\n this._errorCollection.removeServerError(id);\n }\n\n /**\n */\n hasServerErrors(): boolean {\n return this.errorCollection.serverErrors.length > 0;\n }\n\n /**\n */\n hasErrors(): boolean {\n return this.errorCollection.hasItems;\n }\n\n /**\n * Registers a missing error that was received from the server\n */\n addMissingError() {\n this._errorCollection.addServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n removeMissingError() {\n this.removeServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n addServerConstraint(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters\n ) {\n this._serverConstraints.addConstraint(\n id,\n null,\n defaultMessage,\n parameters,\n this.useClientsideValidation()\n );\n }\n\n /**\n */\n formatParameters(parameters: Object): { [string]: string | number } {\n if (parameters == null) {\n return {};\n }\n\n const params = {};\n\n Object.keys(parameters).forEach((paramKey: string) => {\n const paramValue = parameters[paramKey];\n if (paramKey.endsWith(\"-number\") || paramKey.endsWith(\"-date\")) {\n params[paramKey] = this.formatValue(paramValue);\n } else {\n params[paramKey] = paramValue;\n }\n });\n\n return params;\n }\n\n /**\n */\n get hasDynamicValidationData(): boolean {\n return true;\n }\n\n /**\n */\n updateValidations(errors: Array<Object>) {\n if (\n errors.some((error) => error.id === \"Constraint.Mandatory\") ||\n this.layouthint.has(MANDATORY)\n ) {\n this.mandatory = true;\n } else if (!this.hasValue()) {\n this.mandatory = false;\n }\n\n this._serverConstraints = new ConstraintCollection();\n this.resetErrors();\n\n errors\n .filter(\n (error) => error.id !== \"Constraint.Mandatory\" || !this.hasValue()\n )\n .forEach((error) => {\n if (this.hasValue()) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n this.formatParameters(error.properties),\n error.layouthint\n );\n } else {\n this.addServerConstraint(\n error.id,\n error.message,\n this.formatParameters(error.properties)\n );\n }\n });\n }\n\n /**\n * Set last modification to current timestamp\n */\n updateLastModification() {\n this._lastModification = Date.now();\n }\n\n /**\n * Inidicates if attribute is changed since a given timestamp (Date.now)\n */\n isChangedSince(timestamp: number): boolean {\n return this._lastModification > timestamp;\n }\n\n /**\n * Abstract reset method which should be implemented on each attribute that has this attribute as a base class.\n *\n * @abstract\n */\n reset() {\n throw new UnsupportedOperationException(\n `Reset method not implemented for ${this.type}`\n );\n }\n\n /**\n * Merge old attribute with the attribute from the server.\n * Readonly attributes always need to show the value from the server\n */\n mergeAttribute(oldAttribute: AttributeType) {\n this.concept = oldAttribute.concept;\n\n if (\n !oldAttribute.readonly &&\n oldAttribute.isValid &&\n oldAttribute.inputvalue !== null\n ) {\n this.update(oldAttribute.inputvalue);\n }\n }\n\n /**\n * Abstract update method which should be implemented on each attribute that has this attribute as a base class.\n * @abstract\n */\n // eslint-disable-next-line no-unused-vars\n update(value: string, changedAttribute?: AttributeType): AttributeType {\n throw new UnsupportedOperationException(\n `Update method not implemented for ${this.type}`\n );\n }\n\n /**\n * Indicate if attribute is editable\n */\n set isEditable(isEditable: boolean) {\n this._isEditable = isEditable;\n }\n\n /**\n * Retrieve if attribute is editable\n */\n get isEditable(): boolean {\n return this._isEditable;\n }\n\n /**\n * Indicates if the attribute is visible\n */\n get isVisible(): boolean {\n return !this._isHidden;\n }\n\n /**\n */\n get isHidden(): boolean {\n return this._isHidden;\n }\n\n /**\n */\n set isHidden(isHidden: boolean) {\n this._isHidden = isHidden;\n }\n\n /**\n * Explicitly toggle visibility of this attribute\n */\n show() {\n this.isHidden = false;\n }\n\n /**\n */\n hide() {\n this.isHidden = true;\n }\n\n /**\n */\n equals(otherAttribute: AttributeType): boolean {\n return (\n this.key === otherAttribute.key &&\n this.parentKey === otherAttribute.parentKey\n );\n }\n\n /**\n * Readonly attribute width indicates the proposed width of this attribute\n */\n get readonlyWidth(): $Keys<typeof ATTRIBUTE_WIDTH> {\n return ATTRIBUTE_WIDTH.MEDIUM;\n }\n\n /**\n */\n get layoutHintRules(): LayoutHintRuleCollection {\n return this._layoutHintRules;\n }\n\n /**\n */\n set layoutHintRules(rules: LayoutHintRuleCollection) {\n this._layoutHintRules = rules;\n }\n\n /**\n */\n processLayoutHintRules(attributes: AttributeCollection) {\n if (this._layoutHintRules) {\n this.layoutHintRules.process(this, attributes);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return new AttributeContent(this.data.content);\n }\n}\n"],"mappings":";;;;;;AACA,SAASA,QAAQ,QAAQ,mCAAmC;AAC5D,SAASC,aAAa,QAAQ,6BAA6B;AAE3D,OAAOC,SAAS,MAAM,mBAAmB;AACzC,OAAOC,oBAAoB,MAAM,0CAA0C;AAC3E,OAAOC,eAAe,MAAM,0BAA0B;AACtD,OAAOC,cAAc,MAAM,yBAAyB;AAEpD,OAAOC,sBAAsB,MAAM,4CAA4C;AAC/E,OAAOC,mBAAmB,MAAM,yCAAyC;AAEzE,OAAOC,kBAAkB,MAAM,gCAAgC;AAE/D,SAASC,QAAQ,EAAEC,SAAS,QAAQ,6BAA6B;AACjE,SACEC,eAAe,EACfC,uBAAuB,QAClB,2BAA2B;AAElC,SAASC,UAAU,EAAEC,mBAAmB,QAAQ,0BAA0B;AAE1E,SACEC,wBAAwB,EACxBC,6BAA6B,QACxB,kBAAkB;AAczB,OAAOC,gBAAgB,MAAM,oBAAoB;;AAEjD;AACA;AACA;AACA,eAAe,MAAMC,cAAc,SACzBhB,SAAS,CAEnB;EA0BE;AACF;EACEiB,WAAW,CAACC,SAAiB,EAAEC,sBAA8B,EAAE;IAC7D,KAAK,CAACD,SAAS,EAAEC,sBAAsB,CAAC;IAAC;IAAA,2CA3Bf,CAAC;IAAA;IAAA;IAAA;IAAA;IAAA,4CAOc,IAAIlB,oBAAoB,EAAE;IAAA,kDACjCU,UAAU,CAAC,2BAA2B,CAAC;IAAA,kCACvD,IAAI;IAAA;IAAA,qCAED,KAAK;IAAA,kCACU,IAAI;IAAA;IAAA;IAAA,mCAGrB,KAAK;IAAA;IAAA,mCAEL,KAAK;IAAA;IAAA;IAAA;IAAA;IAAA;IAYxB,IAAI,IAAI,CAACS,kBAAkB,IAAI,IAAI,CAACC,OAAO,CAACC,KAAK,EAAE;MACjD,IAAI,CAACC,MAAM,GAAG,I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"}
1
+ {"version":3,"file":"AttributeModel.js","names":["DateUtil","isPlainObject","BaseModel","ConstraintCollection","ErrorCollection","LinkCollection","StringLengthConstraint","MandatoryConstraint","ConceptDetailModel","DISABLED","MANDATORY","ATTRIBUTE_WIDTH","TIMEVERSION_FILTER_NAME","getSetting","hasAllContentInData","IllegalArgumentException","UnsupportedOperationException","AttributeContent","AttributeModel","constructor","attribute","attributeContributions","hasContentFromData","content","label","_label","contributions","_initvalue","data","value","_inputvalue","getInitialInputValue","_value","_disabled","layouthint","has","_errorCollection","message","addServerError","id","parameters","_referenceDate","getData","now","_isResult","_mandatory","mandatory","_links","isApplicableModel","getInitialChildModelLinks","hasContentConfiguration","conceptLink","setChildModels","models","conceptHref","href","concept","model","selfhref","equalsWithParameters","key","parentKey","_parentKey","name","type","_hasContentConfiguration","indicateContentConfiguration","contentConfiguration","hasQuestionConfig","questions","hasConfig","hasEndResultConfig","isConfiguredEndResultAttribute","hasIntermediateResultConfig","isConfiguredIntermediateResultAttribute","getContentConfiguredLabel","configuredLabelProperties","labelConfig","length","types","configuredLabels","getLabelElementByIds","configuredLabel","firstConfiguredLabel","configuredLabelProperty","some","_id","defaultAlignment","alignment","alignmentHints","getByLayoutHint","substring","links","downloadLink","getLinksByGroup","first","getLinkByKey","addParameter","referenceDate","isCacheable","_concept","date","initvalue","getInputValue","inputvalue","toString","validateValue","validate","hasValue","getValue","getFormData","inError","formdata","getEmptyFormData","updateLastModification","formatValue","readonlyvalue","configuredMandatory","_validatedValue","readonly","_readonly","static","isResult","disabled","format","getContribution","formatLabel","minLength","maxLength","operator","assistantMessage","isValid","constraintCollection","constraints","add","_serverConstraints","addConstraints","setUseClientsideValidation","enabled","_useClientsideValidation","useClientsideValidation","isOptionalAndEmpty","_isValid","undefined","errorCollection","collection","invalidConstraints","isChangedSince","resetErrors","error","properties","removeServerError","hasServerErrors","serverErrors","hasErrors","hasItems","addMissingError","removeMissingError","addServerConstraint","defaultMessage","addConstraint","formatParameters","params","forEach","paramKey","paramValue","hasDynamicValidationData","updateValidations","errors","_lastModification","Date","timestamp","reset","mergeAttribute","oldAttribute","update","changedAttribute","isEditable","_isEditable","isVisible","_isHidden","isHidden","show","hide","equals","otherAttribute","readonlyWidth","MEDIUM","layoutHintRules","_layoutHintRules","rules","processLayoutHintRules","attributes","process"],"sources":["../../../src/models/attributes/AttributeModel.js"],"sourcesContent":["// @flow\nimport { DateUtil } from \"../../utils/datetime/DateTimeUtil\";\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport BaseModel from \"../base/BaseModel\";\nimport ConstraintCollection from \"./input-constraints/ConstraintCollection\";\nimport ErrorCollection from \"../error/ErrorCollection\";\nimport LinkCollection from \"../links/LinkCollection\";\n\nimport StringLengthConstraint from \"./input-constraints/StringLengthConstraint\";\nimport MandatoryConstraint from \"./input-constraints/MandatoryConstraint\";\n\nimport ConceptDetailModel from \"../concepts/ConceptDetailModel\";\n\nimport { DISABLED, MANDATORY } from \"../../constants/LayoutHints\";\nimport {\n ATTRIBUTE_WIDTH,\n TIMEVERSION_FILTER_NAME,\n} from \"../../constants/Constants\";\n\nimport { getSetting, hasAllContentInData } from \"../../constants/Settings\";\n\nimport {\n IllegalArgumentException,\n UnsupportedOperationException,\n} from \"../../exceptions\";\n\nimport type { MessageParameters } from \"../../i18n/types\";\nimport type {\n AttributeType,\n FormErrorAnchor,\n IModelWithChildModels,\n ModularUIModel,\n} from \"../types\";\nimport type LinkModel from \"../links/LinkModel\";\nimport type ContentConfiguration from \"../contentconfiguration/ContentConfiguration\";\nimport type ContentConfigurationElements from \"../contentconfiguration/ContentConfigurationElements\";\nimport type LayoutHintRuleCollection from \"./layouthint-rules/LayoutHintRuleCollection\";\nimport type AttributeCollection from \"./AttributeCollection\";\nimport AttributeContent from \"./AttributeContent\";\n\n/**\n * Attribute model, base model for all kind of attributes\n */\nexport default class AttributeModel\n extends BaseModel\n implements IModelWithChildModels\n{\n _label: string;\n _lastModification: number = 0;\n\n _initvalue: any;\n _inputvalue: string;\n _value: any;\n\n _errorCollection: ErrorCollection;\n _serverConstraints: ConstraintCollection = new ConstraintCollection();\n _useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\");\n _isValid: boolean = true;\n _validatedValue: string | null;\n _isEditable: boolean = false;\n _concept: ConceptDetailModel | null = null;\n _referenceDate: ISO_DATE;\n _isResult: boolean;\n _isHidden: boolean = false;\n _readonly: boolean;\n _disabled: boolean = false;\n _mandatory: boolean;\n _links: LinkCollection;\n _parentKey: ?string;\n _hasContentConfiguration: boolean;\n _layoutHintRules: LayoutHintRuleCollection;\n\n /**\n */\n constructor(attribute: Object, attributeContributions: Object) {\n super(attribute, attributeContributions);\n\n if (this.hasContentFromData && this.content.label) {\n this._label = this.content.label;\n } else {\n this._label = this.contributions.label;\n }\n\n this._initvalue = this.data.value;\n this._inputvalue = this.getInitialInputValue(this.data.value);\n this._value = this.data.value;\n this._disabled = this.layouthint.has(DISABLED);\n\n this._errorCollection = new ErrorCollection(\"attribute\");\n if (attribute && attribute.message) {\n this._errorCollection.addServerError(\n attribute.message.id,\n attribute.message.message,\n attribute.message.parameters,\n attribute.message.layouthint\n );\n }\n\n this._referenceDate = this.getData(\"referenceDate\", DateUtil.now());\n\n this._isResult = this.getData(\"isResult\", false);\n\n this._mandatory =\n this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n /**\n */\n static isApplicableModel(contributions: Object): boolean {\n if (!isPlainObject(contributions)) {\n throw new IllegalArgumentException(\n \"Given argument for isApplicableModel is not a contributions object\"\n );\n }\n\n return false;\n }\n\n /**\n * Retrieve initial input value\n */\n getInitialInputValue(value: any): any {\n return value;\n }\n\n /**\n */\n getInitialChildModelLinks(): Array<LinkModel> {\n if (\n !this.hasContentFromData &&\n this.hasContentConfiguration &&\n this.conceptLink\n ) {\n return [this.conceptLink];\n }\n return [];\n }\n\n /**\n */\n setChildModels(models: Array<ModularUIModel>): void {\n const conceptHref = this.conceptLink?.href;\n if (conceptHref) {\n this.concept = models.find((model) =>\n model.selfhref.equalsWithParameters(conceptHref)\n );\n }\n }\n\n /**\n * Getting the attribute key\n */\n get key(): string {\n return this.data.key;\n }\n\n /**\n */\n get parentKey(): string {\n return this._parentKey || \"\";\n }\n\n /**\n */\n set parentKey(parentKey: string) {\n this._parentKey = parentKey;\n }\n\n /**\n * Getting the attribute name\n */\n get name(): string {\n return this.key;\n }\n\n /**\n * Getting the type of the attribute\n */\n get type(): string {\n return this.contributions.type;\n }\n\n /**\n * Getting the label of the attribute\n */\n get label(): string {\n return this._label || \"\";\n }\n\n /**\n * Set the label of this attribute\n */\n set label(label: string) {\n this._label = label;\n }\n\n /**\n */\n set hasContentConfiguration(hasContentConfiguration: boolean) {\n this._hasContentConfiguration = hasContentConfiguration;\n }\n\n /**\n */\n get hasContentConfiguration(): boolean {\n return this._hasContentConfiguration || false;\n }\n\n /**\n */\n indicateContentConfiguration(\n contentConfiguration: ContentConfiguration\n ): void {\n if (contentConfiguration) {\n const hasQuestionConfig = contentConfiguration.questions?.hasConfig();\n\n const hasEndResultConfig =\n contentConfiguration.isConfiguredEndResultAttribute(this.key);\n const hasIntermediateResultConfig =\n contentConfiguration.isConfiguredIntermediateResultAttribute(this.key);\n\n this.hasContentConfiguration =\n hasQuestionConfig || hasEndResultConfig || hasIntermediateResultConfig;\n }\n }\n\n /**\n * Retrieve the first permitted label to render when a concept and contentConfiguration is available\n * Be aware that permission could be in place for labels from a concept.\n */\n getContentConfiguredLabel(\n contentConfiguration: ?ContentConfigurationElements\n ): string {\n if (this.hasContentFromData) {\n return this.content.label ?? this.label;\n }\n\n const configuredLabelProperties =\n contentConfiguration && contentConfiguration.labelConfig.length > 0\n ? contentConfiguration.labelConfig[0].types\n : [];\n\n if (this.concept && configuredLabelProperties.length > 0) {\n const configuredLabels = this.concept\n .getLabelElementByIds(configuredLabelProperties)\n .filter(\n (configuredLabel) =>\n configuredLabel.value && configuredLabel.value !== \"\"\n );\n\n if (configuredLabels.length > 0) {\n const [firstConfiguredLabel] = configuredLabelProperties\n .filter((configuredLabelProperty) =>\n configuredLabels.some(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n )\n .map((configuredLabelProperty) =>\n configuredLabels.find(\n (configuredLabel) =>\n configuredLabel._id === configuredLabelProperty\n )\n );\n\n if (firstConfiguredLabel) {\n return firstConfiguredLabel.value;\n }\n }\n }\n\n return this.label;\n }\n\n /**\n */\n get defaultAlignment(): \"left\" | \"center\" | \"right\" {\n return \"left\";\n }\n\n /**\n * Handles layout hint align-left, align-center and align-right\n */\n get alignment(): \"left\" | \"center\" | \"right\" {\n const alignmentHints = this.layouthint.getByLayoutHint(\"align-\");\n\n // return alignment based on layouthint or the default alignment for the attribute\n const alignment = alignmentHints\n ? alignmentHints.substring(\"align-\".length)\n : this.defaultAlignment;\n\n if (\n alignment === \"left\" ||\n alignment === \"center\" ||\n alignment === \"right\"\n ) {\n return alignment;\n }\n\n return this.defaultAlignment;\n }\n\n /**\n * Retrieve links of attribute\n */\n get links(): LinkCollection {\n if (!this._links) {\n this._links = new LinkCollection(\n this.data._links,\n this.contributions._links\n );\n }\n\n return this._links;\n }\n\n /**\n * Retrieve link of attribute when available\n */\n get downloadLink(): ?LinkModel {\n const downloadLink = this.links.getLinksByGroup(\"download\").first;\n\n if (downloadLink && downloadLink.key === this.key) {\n return downloadLink;\n }\n\n return null;\n }\n\n /**\n * Retrieve concept link of attribute when available\n */\n get conceptLink(): ?LinkModel {\n const conceptLink = this.links.getLinkByKey(\"concept\");\n\n if (conceptLink !== null) {\n conceptLink.href = conceptLink.href.addParameter(\n TIMEVERSION_FILTER_NAME,\n this.referenceDate\n );\n\n conceptLink.isCacheable = true;\n }\n\n return conceptLink;\n }\n\n /**\n * Get concept information\n */\n get concept(): ConceptDetailModel | null {\n return this._concept ?? null;\n }\n\n /**\n * Set the concept\n */\n set concept(concept: ?ModularUIModel) {\n this._concept = concept instanceof ConceptDetailModel ? concept : null;\n }\n\n /**\n * Retrieve reference date of attribute which can be used as entryDate for content\n * to get information in correct time version\n */\n get referenceDate(): ISO_DATE {\n return this._referenceDate;\n }\n\n /**\n * Set reference date for concepts and content\n */\n set referenceDate(date: ISO_DATE) {\n this._referenceDate = date;\n }\n\n /**\n * Initial value received from the modular ui service\n */\n get initvalue(): any {\n return this._initvalue;\n }\n\n /**\n * Retrieve input value\n */\n getInputValue(): string {\n const inputvalue = this._inputvalue;\n\n return inputvalue ? inputvalue.toString() : \"\";\n }\n\n /**\n * Returns the value as entered by the user. This can differ from the internal iso value that is stored\n */\n get inputvalue(): string {\n return this.getInputValue();\n }\n\n /**\n * Value that is used when retrieving an error collection of this attribute\n * Mostly this is the input value, but sometimes a different value is needed,\n * for example iban and postcode need to validate length without spaces\n */\n get validateValue(): string {\n return this.inputvalue;\n }\n\n /**\n * Sets the input value to the value entered by the user\n */\n set inputvalue(value: string) {\n this._inputvalue = value;\n this.value = value;\n\n this.validate(value);\n }\n\n /**\n */\n hasValue(): boolean {\n return this._value != null && this._value !== \"\";\n }\n\n /**\n * Getting the value of the attribute\n */\n getValue(): any {\n return this.hasValue() ? this._value : null;\n }\n\n /**\n * Getting data ready to be send to the modular ui\n * Returns null when the attribute should not be send to the server\n */\n getFormData(): { [string]: any } | null {\n if (this.inError()) {\n return null;\n }\n\n return {\n [this.name]: this.value,\n };\n }\n\n /**\n */\n get formdata(): { [string]: any } | null {\n return this.getFormData();\n }\n\n /**\n */\n getEmptyFormData(): { [string]: null } {\n return { [this.name]: null };\n }\n\n /**\n * Getting the value of the attribute\n */\n get value(): any {\n return this.getValue();\n }\n\n /**\n * Setting a value in the element\n */\n set value(value: ?string) {\n this.updateLastModification();\n\n this._value = value;\n }\n\n /**\n */\n formatValue(value: string): string {\n return value;\n }\n\n /**\n * Getting the readonly value, iso value converted for human reading\n */\n get readonlyvalue(): string {\n return this.value ? this.value.toString() : \"\";\n }\n\n /**\n * Getting mandatory status of attribute\n */\n get mandatory(): boolean {\n return this._mandatory || false;\n }\n\n /**\n */\n get configuredMandatory(): ?boolean {\n return this.layouthint.has(MANDATORY) || this.contributions.mandatory;\n }\n\n /**\n * Set mandatory status of attribute\n */\n set mandatory(mandatory: boolean) {\n if (mandatory !== this._mandatory) {\n this._validatedValue = null;\n }\n this._mandatory = mandatory;\n }\n\n /**\n */\n get readonly(): boolean {\n return (\n this._readonly ||\n this.contributions.readonly === true ||\n this.data.static === true ||\n this.isResult === true\n );\n }\n\n /**\n */\n set readonly(readonly: boolean) {\n this._readonly = readonly;\n }\n\n /**\n */\n get disabled(): boolean {\n return this._disabled;\n }\n\n /**\n */\n set disabled(disabled: boolean) {\n this._disabled = disabled;\n }\n\n /**\n */\n get isResult(): boolean {\n return this._isResult;\n }\n\n /**\n */\n set isResult(isResult: boolean) {\n this._isResult = isResult;\n }\n\n /**\n * Getting the display and input format of a attribute\n */\n get format(): string | null {\n return this.getContribution(\"format\");\n }\n\n /**\n */\n get formatLabel(): string {\n return this.format || \"\";\n }\n\n /**\n * Get minimum string length\n */\n get minLength(): number | null {\n return this.getContribution(\"minLength\");\n }\n\n /**\n * Get maximum string length\n */\n get maxLength(): number | null {\n return this.getContribution(\"maxLength\");\n }\n\n /**\n */\n get operator(): string {\n return \"\";\n }\n\n /**\n * Get assistant message\n */\n get assistantMessage(): string | null {\n return this.getContribution(\"assistant\");\n }\n\n /**\n * Get valid status\n */\n get isValid(): boolean {\n return this.validate(this.validateValue);\n }\n\n /**\n * Retrieve applicable constraint for this attribute\n */\n get constraintCollection(): ConstraintCollection {\n const constraints = new ConstraintCollection();\n\n constraints.add(this._serverConstraints);\n\n // Mandatory constraint\n if (this.mandatory) {\n constraints.add(new MandatoryConstraint());\n }\n\n if (this.minLength || this.maxLength) {\n constraints.add(\n new StringLengthConstraint(this.minLength, this.maxLength)\n );\n }\n\n constraints.add(this.addConstraints());\n\n return constraints;\n }\n\n /**\n * Template method for class extending this model to add extra constraints\n * @abstract\n */\n addConstraints(): ConstraintCollection {\n return new ConstraintCollection();\n }\n\n /**\n * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION\n */\n setUseClientsideValidation(enabled: boolean): void {\n this._useClientsideValidation = enabled;\n }\n\n /**\n * Indicates if client side validation is enabled\n * @returns {boolean}\n */\n useClientsideValidation(): boolean {\n return this._useClientsideValidation ?? true;\n }\n\n /**\n * Validate input on client side constraint\n */\n validate(value: string): boolean {\n // when client side validation is disabled, this attribute is always valid\n if (!this.useClientsideValidation()) {\n return true;\n }\n\n if (this.isOptionalAndEmpty(value)) {\n this._isValid = true;\n } else if (this._validatedValue !== value) {\n this._isValid = this.constraintCollection.validate(value);\n }\n this._validatedValue = value;\n\n return this._isValid;\n }\n\n /**\n * Indicates if attribute is optional and empty\n */\n isOptionalAndEmpty(value: string): boolean {\n if (value === undefined) {\n throw new IllegalArgumentException(\n \"isOptionalAndEmpty method needs value argument\"\n );\n }\n\n return !this.mandatory && value === \"\";\n }\n\n /**\n * Retrieve error messages of this attribute\n */\n get errorCollection(): ErrorCollection {\n const collection = new ErrorCollection(\"attribute\", this._errorCollection);\n\n collection.addConstraints(\n this.constraintCollection.invalidConstraints(this.validateValue)\n );\n\n return collection;\n }\n\n /**\n * Check if attribute is in error\n */\n inError(): boolean {\n return !this._isValid && this.isChangedSince(0);\n }\n\n /**\n * Reset static error messages on attribute\n */\n resetErrors(): void {\n this._errorCollection = new ErrorCollection(\"attribute\");\n }\n\n /**\n * Registers an error that was received from a server response\n */\n addServerError(error: FormErrorAnchor): void {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n error.properties,\n error.layouthint\n );\n }\n\n /**\n */\n removeServerError(id: string): void {\n this._errorCollection.removeServerError(id);\n }\n\n /**\n */\n hasServerErrors(): boolean {\n return this.errorCollection.serverErrors.length > 0;\n }\n\n /**\n */\n hasErrors(): boolean {\n return this.errorCollection.hasItems;\n }\n\n /**\n * Registers a missing error that was received from the server\n */\n addMissingError(): void {\n this._errorCollection.addServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n removeMissingError(): void {\n this.removeServerError(\"Constraint.Missing\");\n }\n\n /**\n */\n addServerConstraint(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters\n ) {\n this._serverConstraints.addConstraint(\n id,\n null,\n defaultMessage,\n parameters,\n this.useClientsideValidation()\n );\n }\n\n /**\n */\n formatParameters(parameters: Object): { [string]: string | number } {\n if (parameters == null) {\n return {};\n }\n\n const params: { [name: string]: string | number } = {};\n\n Object.keys(parameters).forEach((paramKey: string) => {\n const paramValue = parameters[paramKey];\n if (paramKey.endsWith(\"-number\") || paramKey.endsWith(\"-date\")) {\n params[paramKey] = this.formatValue(paramValue);\n } else {\n params[paramKey] = paramValue;\n }\n });\n\n return params;\n }\n\n /**\n */\n get hasDynamicValidationData(): boolean {\n return true;\n }\n\n /**\n */\n updateValidations(errors: Array<Object>): void {\n if (\n errors.some((error) => error.id === \"Constraint.Mandatory\") ||\n this.layouthint.has(MANDATORY)\n ) {\n this.mandatory = true;\n } else if (!this.hasValue()) {\n this.mandatory = false;\n }\n\n this._serverConstraints = new ConstraintCollection();\n this.resetErrors();\n\n errors\n .filter(\n (error) => error.id !== \"Constraint.Mandatory\" || !this.hasValue()\n )\n .forEach((error) => {\n if (this.hasValue()) {\n this._errorCollection.addServerError(\n error.id,\n error.message,\n this.formatParameters(error.properties),\n error.layouthint\n );\n } else {\n this.addServerConstraint(\n error.id,\n error.message,\n this.formatParameters(error.properties)\n );\n }\n });\n }\n\n /**\n * Set last modification to current timestamp\n */\n updateLastModification(): void {\n this._lastModification = Date.now();\n }\n\n /**\n * Inidicates if attribute is changed since a given timestamp (Date.now)\n */\n isChangedSince(timestamp: number): boolean {\n return this._lastModification > timestamp;\n }\n\n /**\n * Abstract reset method which should be implemented on each attribute that has this attribute as a base class.\n *\n * @abstract\n */\n reset(): void {\n throw new UnsupportedOperationException(\n `Reset method not implemented for ${this.type}`\n );\n }\n\n /**\n * Merge old attribute with the attribute from the server.\n * Readonly attributes always need to show the value from the server\n */\n mergeAttribute(oldAttribute: AttributeType): void {\n this.concept = oldAttribute.concept;\n\n if (\n !oldAttribute.readonly &&\n oldAttribute.isValid &&\n oldAttribute.inputvalue !== null\n ) {\n this.update(oldAttribute.inputvalue);\n }\n }\n\n /**\n * Abstract update method which should be implemented on each attribute that has this attribute as a base class.\n * @abstract\n */\n // eslint-disable-next-line no-unused-vars\n update(value: string, changedAttribute?: AttributeType): AttributeType {\n throw new UnsupportedOperationException(\n `Update method not implemented for ${this.type}`\n );\n }\n\n /**\n * Indicate if attribute is editable\n */\n set isEditable(isEditable: boolean) {\n this._isEditable = isEditable;\n }\n\n /**\n * Retrieve if attribute is editable\n */\n get isEditable(): boolean {\n return this._isEditable;\n }\n\n /**\n * Indicates if the attribute is visible\n */\n get isVisible(): boolean {\n return !this._isHidden;\n }\n\n /**\n */\n get isHidden(): boolean {\n return this._isHidden;\n }\n\n /**\n */\n set isHidden(isHidden: boolean) {\n this._isHidden = isHidden;\n }\n\n /**\n * Explicitly toggle visibility of this attribute\n */\n show(): void {\n this.isHidden = false;\n }\n\n /**\n */\n hide(): void {\n this.isHidden = true;\n }\n\n /**\n */\n equals(otherAttribute: AttributeType): boolean {\n return (\n this.key === otherAttribute.key &&\n this.parentKey === otherAttribute.parentKey\n );\n }\n\n /**\n * Readonly attribute width indicates the proposed width of this attribute\n */\n get readonlyWidth(): $Keys<typeof ATTRIBUTE_WIDTH> {\n return ATTRIBUTE_WIDTH.MEDIUM;\n }\n\n /**\n */\n get layoutHintRules(): LayoutHintRuleCollection {\n return this._layoutHintRules;\n }\n\n /**\n */\n set layoutHintRules(rules: LayoutHintRuleCollection) {\n this._layoutHintRules = rules;\n }\n\n /**\n */\n processLayoutHintRules(attributes: AttributeCollection): void {\n if (this._layoutHintRules) {\n this.layoutHintRules.process(this, attributes);\n }\n }\n\n /**\n * Indicates if content comes from the data service\n */\n get hasContentFromData(): boolean {\n return hasAllContentInData();\n }\n\n /**\n */\n get content(): AttributeContent {\n return new Attribut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