@beinformed/ui 1.23.2 → 1.24.0

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 (1160) hide show
  1. package/CHANGELOG.md +11 -6
  2. package/esm/builder/index.js +1 -0
  3. package/esm/builder/index.js.map +1 -1
  4. package/esm/builder/mergeLayoutHintConfigurations.js +1 -11
  5. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  6. package/esm/constants/Constants.js +23 -28
  7. package/esm/constants/Constants.js.map +1 -1
  8. package/esm/constants/LayoutHintConfig.js +1 -0
  9. package/esm/constants/LayoutHintConfig.js.map +1 -1
  10. package/esm/constants/LayoutHints.js +11 -27
  11. package/esm/constants/LayoutHints.js.map +1 -1
  12. package/esm/constants/Settings.js +9 -15
  13. package/esm/constants/Settings.js.map +1 -1
  14. package/esm/constants/index.js +1 -0
  15. package/esm/constants/index.js.map +1 -1
  16. package/esm/exceptions/ConfigurationException.js +2 -2
  17. package/esm/exceptions/ConfigurationException.js.map +1 -1
  18. package/esm/exceptions/FetchException.js +9 -28
  19. package/esm/exceptions/FetchException.js.map +1 -1
  20. package/esm/exceptions/IllegalArgumentException.js +1 -2
  21. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  22. package/esm/exceptions/IllegalReturnException.js +1 -2
  23. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  24. package/esm/exceptions/IllegalStateException.js +1 -2
  25. package/esm/exceptions/IllegalStateException.js.map +1 -1
  26. package/esm/exceptions/JsonParseException.js +1 -2
  27. package/esm/exceptions/JsonParseException.js.map +1 -1
  28. package/esm/exceptions/MissingPropertyException.js +1 -2
  29. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  30. package/esm/exceptions/NetworkException.js +1 -10
  31. package/esm/exceptions/NetworkException.js.map +1 -1
  32. package/esm/exceptions/NotAllowedUriException.js +1 -2
  33. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  34. package/esm/exceptions/NotFoundException.js +1 -11
  35. package/esm/exceptions/NotFoundException.js.map +1 -1
  36. package/esm/exceptions/ServerRequestException.js +1 -2
  37. package/esm/exceptions/ServerRequestException.js.map +1 -1
  38. package/esm/exceptions/ThemePropertyException.js +1 -2
  39. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  40. package/esm/exceptions/TimeoutException.js +1 -6
  41. package/esm/exceptions/TimeoutException.js.map +1 -1
  42. package/esm/exceptions/UnauthorizedException.js +1 -10
  43. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  44. package/esm/exceptions/UnsupportedOperationException.js +1 -2
  45. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  46. package/esm/exceptions/index.js +1 -0
  47. package/esm/exceptions/index.js.map +1 -1
  48. package/esm/hooks/index.js +1 -0
  49. package/esm/hooks/index.js.map +1 -1
  50. package/esm/hooks/useAllFormsOnModel.js +0 -16
  51. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  52. package/esm/hooks/useAuthentication.js +9 -23
  53. package/esm/hooks/useAuthentication.js.map +1 -1
  54. package/esm/hooks/useContent.js +3 -10
  55. package/esm/hooks/useContent.js.map +1 -1
  56. package/esm/hooks/useDeepCompareEffect.js +2 -6
  57. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  58. package/esm/hooks/useForm.js +4 -13
  59. package/esm/hooks/useForm.js.map +1 -1
  60. package/esm/hooks/useI18n.js +3 -7
  61. package/esm/hooks/useI18n.js.map +1 -1
  62. package/esm/hooks/useModal.js +0 -3
  63. package/esm/hooks/useModal.js.map +1 -1
  64. package/esm/hooks/useModelCatalog.js +10 -21
  65. package/esm/hooks/useModelCatalog.js.map +1 -1
  66. package/esm/hooks/useModels.js +1 -1
  67. package/esm/hooks/useModels.js.map +1 -1
  68. package/esm/hooks/useModularUI.js +7 -11
  69. package/esm/hooks/useModularUI.js.map +1 -1
  70. package/esm/hooks/useModularUIBasic.js +2 -12
  71. package/esm/hooks/useModularUIBasic.js.map +1 -1
  72. package/esm/hooks/useModularUIModel.js +11 -10
  73. package/esm/hooks/useModularUIModel.js.map +1 -1
  74. package/esm/hooks/useModularUIRequest.js +2 -1
  75. package/esm/hooks/useModularUIRequest.js.map +1 -1
  76. package/esm/hooks/useNotification.js +2 -2
  77. package/esm/hooks/useNotification.js.map +1 -1
  78. package/esm/hooks/usePreference.js +1 -1
  79. package/esm/hooks/usePreference.js.map +1 -1
  80. package/esm/hooks/useProgressIndicator.js +3 -2
  81. package/esm/hooks/useProgressIndicator.js.map +1 -1
  82. package/esm/hooks/useRouter.js +7 -10
  83. package/esm/hooks/useRouter.js.map +1 -1
  84. package/esm/i18n/Locale.js +15 -40
  85. package/esm/i18n/Locale.js.map +1 -1
  86. package/esm/i18n/Locales.js +13 -33
  87. package/esm/i18n/Locales.js.map +1 -1
  88. package/esm/i18n/Message.js +3 -5
  89. package/esm/i18n/Message.js.map +1 -1
  90. package/esm/i18n/index.js +1 -0
  91. package/esm/i18n/index.js.map +1 -1
  92. package/esm/i18n/languages.js +1 -0
  93. package/esm/i18n/languages.js.map +1 -1
  94. package/esm/i18n/translations/beinformed_error_messages_en.nl.js +1 -0
  95. package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  96. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js +1 -0
  97. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  98. package/esm/i18n/withMessage.js +1 -4
  99. package/esm/i18n/withMessage.js.map +1 -1
  100. package/esm/index.js +1 -0
  101. package/esm/index.js.map +1 -1
  102. package/esm/models/actions/ActionCollection.js +13 -26
  103. package/esm/models/actions/ActionCollection.js.map +1 -1
  104. package/esm/models/actions/ActionModel.js +23 -60
  105. package/esm/models/actions/ActionModel.js.map +1 -1
  106. package/esm/models/application/ApplicationModel.js +14 -34
  107. package/esm/models/application/ApplicationModel.js.map +1 -1
  108. package/esm/models/attributes/AttributeCollection.js +27 -81
  109. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  110. package/esm/models/attributes/AttributeContent.js +23 -56
  111. package/esm/models/attributes/AttributeContent.js.map +1 -1
  112. package/esm/models/attributes/AttributeDataHelper.js +33 -83
  113. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  114. package/esm/models/attributes/AttributeModel.js +102 -258
  115. package/esm/models/attributes/AttributeModel.js.map +1 -1
  116. package/esm/models/attributes/AttributeSetModel.js +6 -17
  117. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  118. package/esm/models/attributes/BooleanAttributeModel.js +29 -76
  119. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  120. package/esm/models/attributes/CaptchaAttributeModel.js +5 -8
  121. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  122. package/esm/models/attributes/ChoiceAttributeModel.js +38 -108
  123. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  124. package/esm/models/attributes/ChoiceAttributeOptionCollection.js +27 -80
  125. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  126. package/esm/models/attributes/ChoiceAttributeOptionModel.js +34 -102
  127. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  128. package/esm/models/attributes/CompositeAttributeChildCollection.js +23 -64
  129. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  130. package/esm/models/attributes/CompositeAttributeModel.js +40 -99
  131. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  132. package/esm/models/attributes/DatetimeAttributeModel.js +51 -145
  133. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  134. package/esm/models/attributes/HelptextAttributeModel.js +7 -17
  135. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  136. package/esm/models/attributes/LabelAttributeModel.js +4 -8
  137. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  138. package/esm/models/attributes/MemoAttributeModel.js +6 -10
  139. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  140. package/esm/models/attributes/MoneyAttributeModel.js +5 -10
  141. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  142. package/esm/models/attributes/NumberAttributeModel.js +22 -49
  143. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  144. package/esm/models/attributes/PasswordAttributeModel.js +23 -65
  145. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  146. package/esm/models/attributes/StringAttributeModel.js +29 -72
  147. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  148. package/esm/models/attributes/UploadAttributeModel.js +21 -62
  149. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  150. package/esm/models/attributes/XMLAttributeModel.js +5 -10
  151. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  152. package/esm/models/attributes/_createAttribute.js +7 -21
  153. package/esm/models/attributes/_createAttribute.js.map +1 -1
  154. package/esm/models/attributes/input-constraints/BSNConstraint.js +8 -19
  155. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  156. package/esm/models/attributes/input-constraints/ConstraintCollection.js +3 -10
  157. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  158. package/esm/models/attributes/input-constraints/ConstraintModel.js +6 -22
  159. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  160. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js +16 -59
  161. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  162. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +8 -22
  163. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  164. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +8 -22
  165. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  166. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js +10 -28
  167. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  168. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js +7 -18
  169. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  170. package/esm/models/attributes/input-constraints/FileSizeConstraint.js +10 -24
  171. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  172. package/esm/models/attributes/input-constraints/IBANConstraint.js +6 -13
  173. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  174. package/esm/models/attributes/input-constraints/MandatoryConstraint.js +8 -15
  175. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  176. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js +8 -25
  177. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  178. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js +17 -53
  179. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  180. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js +15 -41
  181. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  182. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js +15 -39
  183. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  184. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js +8 -20
  185. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  186. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +7 -12
  187. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  188. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +7 -17
  189. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  190. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +7 -17
  191. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  192. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +8 -22
  193. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  194. package/esm/models/attributes/input-constraints/RangeConstraint.js +22 -57
  195. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  196. package/esm/models/attributes/input-constraints/RegexConstraint.js +7 -18
  197. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  198. package/esm/models/attributes/input-constraints/StringLengthConstraint.js +14 -50
  199. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  200. package/esm/models/attributes/input-constraints/XMLConstraint.js +8 -17
  201. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  202. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +9 -17
  203. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  204. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +30 -84
  205. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  206. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +5 -11
  207. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  208. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +4 -10
  209. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  210. package/esm/models/base/BaseCollection.js +27 -67
  211. package/esm/models/base/BaseCollection.js.map +1 -1
  212. package/esm/models/base/BaseModel.js +14 -39
  213. package/esm/models/base/BaseModel.js.map +1 -1
  214. package/esm/models/base/ResourceCollection.js +2 -5
  215. package/esm/models/base/ResourceCollection.js.map +1 -1
  216. package/esm/models/base/ResourceModel.js +21 -53
  217. package/esm/models/base/ResourceModel.js.map +1 -1
  218. package/esm/models/caseview/CaseViewModel.js +16 -46
  219. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  220. package/esm/models/concepts/BusinessScenarioModel.js +10 -39
  221. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  222. package/esm/models/concepts/ConceptDetailModel.js +32 -85
  223. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  224. package/esm/models/concepts/ConceptIndexModel.js +12 -36
  225. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  226. package/esm/models/concepts/ConceptLinkModel.js +16 -45
  227. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  228. package/esm/models/concepts/ConceptRelationCollection.js +7 -20
  229. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  230. package/esm/models/concepts/ConceptRelationModel.js +8 -22
  231. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  232. package/esm/models/concepts/ConceptTypeDetailModel.js +12 -25
  233. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  234. package/esm/models/concepts/SourceReferenceCollection.js +2 -5
  235. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  236. package/esm/models/concepts/SourceReferenceModel.js +10 -21
  237. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  238. package/esm/models/content/ContentIndexModel.js +13 -37
  239. package/esm/models/content/ContentIndexModel.js.map +1 -1
  240. package/esm/models/content/ContentLinkModel.js +19 -56
  241. package/esm/models/content/ContentLinkModel.js.map +1 -1
  242. package/esm/models/content/ContentModel.js +22 -59
  243. package/esm/models/content/ContentModel.js.map +1 -1
  244. package/esm/models/content/ContentTOCModel.js +17 -45
  245. package/esm/models/content/ContentTOCModel.js.map +1 -1
  246. package/esm/models/content/ContentTypeModel.js +8 -16
  247. package/esm/models/content/ContentTypeModel.js.map +1 -1
  248. package/esm/models/content/SectionModel.js +20 -57
  249. package/esm/models/content/SectionModel.js.map +1 -1
  250. package/esm/models/content/SubSectionModel.js +16 -43
  251. package/esm/models/content/SubSectionModel.js.map +1 -1
  252. package/esm/models/contentconfiguration/ContentConfiguration.js +6 -20
  253. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  254. package/esm/models/contentconfiguration/ContentConfigurationElements.js +11 -48
  255. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  256. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js +3 -13
  257. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  258. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js +5 -15
  259. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  260. package/esm/models/contentconfiguration/ContentConfigurationResults.js +13 -32
  261. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  262. package/esm/models/detail/DetailModel.js +21 -54
  263. package/esm/models/detail/DetailModel.js.map +1 -1
  264. package/esm/models/error/ErrorCollection.js +11 -29
  265. package/esm/models/error/ErrorCollection.js.map +1 -1
  266. package/esm/models/error/ErrorModel.js +8 -21
  267. package/esm/models/error/ErrorModel.js.map +1 -1
  268. package/esm/models/error/ErrorResponse.js +37 -93
  269. package/esm/models/error/ErrorResponse.js.map +1 -1
  270. package/esm/models/filters/AssignmentFilterModel.js +19 -45
  271. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  272. package/esm/models/filters/BaseFilterModel.js +25 -58
  273. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  274. package/esm/models/filters/ConceptIndexFilterModel.js +1 -5
  275. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  276. package/esm/models/filters/FilterCollection.js +11 -44
  277. package/esm/models/filters/FilterCollection.js.map +1 -1
  278. package/esm/models/filters/FilterModel.js +2 -1
  279. package/esm/models/filters/FilterModel.js.map +1 -1
  280. package/esm/models/filters/RangeFilterModel.js +1 -6
  281. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  282. package/esm/models/form/FormModel.js +136 -332
  283. package/esm/models/form/FormModel.js.map +1 -1
  284. package/esm/models/form/FormObjectModel.js +55 -141
  285. package/esm/models/form/FormObjectModel.js.map +1 -1
  286. package/esm/models/grouping/GroupingModel.js +20 -58
  287. package/esm/models/grouping/GroupingModel.js.map +1 -1
  288. package/esm/models/href/Href.js +47 -121
  289. package/esm/models/href/Href.js.map +1 -1
  290. package/esm/models/href/ListHref.js +11 -32
  291. package/esm/models/href/ListHref.js.map +1 -1
  292. package/esm/models/index.js +1 -0
  293. package/esm/models/index.js.map +1 -1
  294. package/esm/models/layouthint/LayoutHintCollection.js +9 -32
  295. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  296. package/esm/models/links/LinkCollection.js +15 -44
  297. package/esm/models/links/LinkCollection.js.map +1 -1
  298. package/esm/models/links/LinkModel.js +21 -57
  299. package/esm/models/links/LinkModel.js.map +1 -1
  300. package/esm/models/links/normalizeLinkJSON.js +5 -21
  301. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  302. package/esm/models/list/ListDetailModel.js +31 -79
  303. package/esm/models/list/ListDetailModel.js.map +1 -1
  304. package/esm/models/list/ListHeaderModel.js +10 -28
  305. package/esm/models/list/ListHeaderModel.js.map +1 -1
  306. package/esm/models/list/ListItemCollection.js +4 -20
  307. package/esm/models/list/ListItemCollection.js.map +1 -1
  308. package/esm/models/list/ListItemModel.js +7 -23
  309. package/esm/models/list/ListItemModel.js.map +1 -1
  310. package/esm/models/list/ListModel.js +38 -115
  311. package/esm/models/list/ListModel.js.map +1 -1
  312. package/esm/models/lookup/LookupOptionCollection.js +4 -6
  313. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  314. package/esm/models/lookup/LookupOptionsModel.js +5 -16
  315. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  316. package/esm/models/modelcatalog/ModelCatalogModel.js +6 -14
  317. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  318. package/esm/models/paging/PagesizeModel.js +4 -12
  319. package/esm/models/paging/PagesizeModel.js.map +1 -1
  320. package/esm/models/paging/PagingModel.js +11 -26
  321. package/esm/models/paging/PagingModel.js.map +1 -1
  322. package/esm/models/panels/GroupingPanelModel.js +14 -41
  323. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  324. package/esm/models/parameter/Parameter.js +14 -41
  325. package/esm/models/parameter/Parameter.js.map +1 -1
  326. package/esm/models/process/ProcessStatusSettingsModel.js +10 -24
  327. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  328. package/esm/models/resolveModel.js +2 -7
  329. package/esm/models/resolveModel.js.map +1 -1
  330. package/esm/models/search/CaseSearchModel.js +3 -9
  331. package/esm/models/search/CaseSearchModel.js.map +1 -1
  332. package/esm/models/sorting/SortOptionModel.js +15 -41
  333. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  334. package/esm/models/sorting/SortingModel.js +9 -28
  335. package/esm/models/sorting/SortingModel.js.map +1 -1
  336. package/esm/models/tab/TabModel.js +14 -41
  337. package/esm/models/tab/TabModel.js.map +1 -1
  338. package/esm/models/taskgroup/TaskGroupCollection.js +1 -2
  339. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  340. package/esm/models/taskgroup/TaskGroupModel.js +7 -17
  341. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  342. package/esm/models/user/UserModel.js +5 -10
  343. package/esm/models/user/UserModel.js.map +1 -1
  344. package/esm/models/user/UserProfileModel.js +2 -10
  345. package/esm/models/user/UserProfileModel.js.map +1 -1
  346. package/esm/models/user/UserServicesModel.js +11 -27
  347. package/esm/models/user/UserServicesModel.js.map +1 -1
  348. package/esm/modularui/Authenticate.js +21 -56
  349. package/esm/modularui/Authenticate.js.map +1 -1
  350. package/esm/modularui/ModularUIError.js +3 -8
  351. package/esm/modularui/ModularUIError.js.map +1 -1
  352. package/esm/modularui/ModularUIRequest.js +89 -193
  353. package/esm/modularui/ModularUIRequest.js.map +1 -1
  354. package/esm/modularui/ModularUIResponse.js +13 -37
  355. package/esm/modularui/ModularUIResponse.js.map +1 -1
  356. package/esm/modularui/index.js +1 -0
  357. package/esm/modularui/index.js.map +1 -1
  358. package/esm/react/ErrorBoundary.js +2 -12
  359. package/esm/react/ErrorBoundary.js.map +1 -1
  360. package/esm/react/ErrorBoundaryFallback.js +2 -2
  361. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  362. package/esm/react/index.js +1 -0
  363. package/esm/react/index.js.map +1 -1
  364. package/esm/react/utils.js +3 -7
  365. package/esm/react/utils.js.map +1 -1
  366. package/esm/react-client/Init.js +1 -2
  367. package/esm/react-client/Init.js.map +1 -1
  368. package/esm/react-client/client.js +15 -29
  369. package/esm/react-client/client.js.map +1 -1
  370. package/esm/react-client/contextPath.js +3 -8
  371. package/esm/react-client/contextPath.js.map +1 -1
  372. package/esm/react-client/index.js +1 -0
  373. package/esm/react-client/index.js.map +1 -1
  374. package/esm/react-client/rehydrate.js +4 -19
  375. package/esm/react-client/rehydrate.js.map +1 -1
  376. package/esm/react-server/contextPath.js +2 -2
  377. package/esm/react-server/contextPath.js.map +1 -1
  378. package/esm/react-server/createSSRComplete.js +2 -12
  379. package/esm/react-server/createSSRComplete.js.map +1 -1
  380. package/esm/react-server/htmlpage.js +25 -12
  381. package/esm/react-server/htmlpage.js.map +1 -1
  382. package/esm/react-server/index.js +1 -0
  383. package/esm/react-server/index.js.map +1 -1
  384. package/esm/react-server/renderSSRComplete.js +4 -4
  385. package/esm/react-server/renderSSRComplete.js.map +1 -1
  386. package/esm/react-server/renderSSRMinimal.js +1 -2
  387. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  388. package/esm/react-server/requestInformation.js +7 -12
  389. package/esm/react-server/requestInformation.js.map +1 -1
  390. package/esm/react-server/serverNoSSR.js +3 -7
  391. package/esm/react-server/serverNoSSR.js.map +1 -1
  392. package/esm/react-server/serverSSR.js +1 -2
  393. package/esm/react-server/serverSSR.js.map +1 -1
  394. package/esm/react-server/serverUtil.js +13 -37
  395. package/esm/react-server/serverUtil.js.map +1 -1
  396. package/esm/react-theme/ThemeProvider.js +1 -2
  397. package/esm/react-theme/ThemeProvider.js.map +1 -1
  398. package/esm/react-theme/createTheme.js +7 -20
  399. package/esm/react-theme/createTheme.js.map +1 -1
  400. package/esm/react-theme/index.js +1 -0
  401. package/esm/react-theme/index.js.map +1 -1
  402. package/esm/react-theme/useTheme.js +1 -2
  403. package/esm/react-theme/useTheme.js.map +1 -1
  404. package/esm/react-theme/utils/background.js +2 -5
  405. package/esm/react-theme/utils/background.js.map +1 -1
  406. package/esm/react-theme/utils/colors.js +3 -9
  407. package/esm/react-theme/utils/colors.js.map +1 -1
  408. package/esm/react-theme/utils/contrast.js +8 -27
  409. package/esm/react-theme/utils/contrast.js.map +1 -1
  410. package/esm/react-theme/utils/corners.js +4 -10
  411. package/esm/react-theme/utils/corners.js.map +1 -1
  412. package/esm/react-theme/utils/spacers.js +7 -22
  413. package/esm/react-theme/utils/spacers.js.map +1 -1
  414. package/esm/react-theme/utils/themeProps.js +8 -22
  415. package/esm/react-theme/utils/themeProps.js.map +1 -1
  416. package/esm/redux/_i18n/actions.js +3 -3
  417. package/esm/redux/_i18n/actions.js.map +1 -1
  418. package/esm/redux/_i18n/index.js +1 -0
  419. package/esm/redux/_i18n/index.js.map +1 -1
  420. package/esm/redux/_i18n/reducer.js +13 -16
  421. package/esm/redux/_i18n/reducer.js.map +1 -1
  422. package/esm/redux/_modularui/actions.js +36 -48
  423. package/esm/redux/_modularui/actions.js.map +1 -1
  424. package/esm/redux/_modularui/connector.js +21 -18
  425. package/esm/redux/_modularui/connector.js.map +1 -1
  426. package/esm/redux/_modularui/index.js +1 -0
  427. package/esm/redux/_modularui/index.js.map +1 -1
  428. package/esm/redux/_modularui/middleware.js +8 -22
  429. package/esm/redux/_modularui/middleware.js.map +1 -1
  430. package/esm/redux/_modularui/modularuiUtils.js +10 -25
  431. package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
  432. package/esm/redux/_modularui/reducer.js +19 -39
  433. package/esm/redux/_modularui/reducer.js.map +1 -1
  434. package/esm/redux/_modularui/selectors.js +20 -62
  435. package/esm/redux/_modularui/selectors.js.map +1 -1
  436. package/esm/redux/_modularui/withModularUI.js +3 -3
  437. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  438. package/esm/redux/_router/actions.js +7 -5
  439. package/esm/redux/_router/actions.js.map +1 -1
  440. package/esm/redux/_router/connectors.js +11 -14
  441. package/esm/redux/_router/connectors.js.map +1 -1
  442. package/esm/redux/_router/index.js +1 -0
  443. package/esm/redux/_router/index.js.map +1 -1
  444. package/esm/redux/_router/middleware.js +2 -1
  445. package/esm/redux/_router/middleware.js.map +1 -1
  446. package/esm/redux/_router/reducer.js +3 -3
  447. package/esm/redux/_router/reducer.js.map +1 -1
  448. package/esm/redux/actions/Application.js +2 -4
  449. package/esm/redux/actions/Application.js.map +1 -1
  450. package/esm/redux/actions/Authorization.js +8 -14
  451. package/esm/redux/actions/Authorization.js.map +1 -1
  452. package/esm/redux/actions/Error.js +5 -13
  453. package/esm/redux/actions/Error.js.map +1 -1
  454. package/esm/redux/actions/Form.js +2 -3
  455. package/esm/redux/actions/Form.js.map +1 -1
  456. package/esm/redux/actions/FormAttributeSet.js +1 -9
  457. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  458. package/esm/redux/actions/FormAttributeSetRepeatable.js +3 -3
  459. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  460. package/esm/redux/actions/FormAutosave.js +4 -6
  461. package/esm/redux/actions/FormAutosave.js.map +1 -1
  462. package/esm/redux/actions/FormAutosubmit.js +1 -4
  463. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  464. package/esm/redux/actions/FormValidations.js +3 -7
  465. package/esm/redux/actions/FormValidations.js.map +1 -1
  466. package/esm/redux/actions/Modals.js +3 -1
  467. package/esm/redux/actions/Modals.js.map +1 -1
  468. package/esm/redux/actions/Notification.js +5 -10
  469. package/esm/redux/actions/Notification.js.map +1 -1
  470. package/esm/redux/actions/Preferences.js +14 -26
  471. package/esm/redux/actions/Preferences.js.map +1 -1
  472. package/esm/redux/actions/ProgressIndicator.js +5 -4
  473. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  474. package/esm/redux/actions/SignIn.js +5 -8
  475. package/esm/redux/actions/SignIn.js.map +1 -1
  476. package/esm/redux/actions/SignOut.js +2 -2
  477. package/esm/redux/actions/SignOut.js.map +1 -1
  478. package/esm/redux/actions/index.js +1 -0
  479. package/esm/redux/actions/index.js.map +1 -1
  480. package/esm/redux/connectors/Application.js +1 -1
  481. package/esm/redux/connectors/Application.js.map +1 -1
  482. package/esm/redux/connectors/Breadcrumb.js +2 -3
  483. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  484. package/esm/redux/connectors/CaseView.js +1 -1
  485. package/esm/redux/connectors/CaseView.js.map +1 -1
  486. package/esm/redux/connectors/ConceptDetail.js +2 -5
  487. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  488. package/esm/redux/connectors/ContentBrowser.js +1 -1
  489. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  490. package/esm/redux/connectors/ContentDetail.js +2 -5
  491. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  492. package/esm/redux/connectors/ContentDetailSection.js +2 -5
  493. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  494. package/esm/redux/connectors/Form.js +3 -10
  495. package/esm/redux/connectors/Form.js.map +1 -1
  496. package/esm/redux/connectors/FormAttributeSet.js +2 -3
  497. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  498. package/esm/redux/connectors/ListDetail.js +1 -1
  499. package/esm/redux/connectors/ListDetail.js.map +1 -1
  500. package/esm/redux/connectors/Modal.js +1 -5
  501. package/esm/redux/connectors/Modal.js.map +1 -1
  502. package/esm/redux/connectors/ModelCatalog.js +1 -1
  503. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  504. package/esm/redux/connectors/Notification.js +2 -3
  505. package/esm/redux/connectors/Notification.js.map +1 -1
  506. package/esm/redux/connectors/PanelRenderer.js +1 -5
  507. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  508. package/esm/redux/connectors/Preferences.js +2 -4
  509. package/esm/redux/connectors/Preferences.js.map +1 -1
  510. package/esm/redux/connectors/Progress.js +2 -1
  511. package/esm/redux/connectors/Progress.js.map +1 -1
  512. package/esm/redux/connectors/ProgressIndicator.js +2 -3
  513. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  514. package/esm/redux/connectors/QuickSearch.js +2 -1
  515. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  516. package/esm/redux/connectors/SignIn.js +3 -6
  517. package/esm/redux/connectors/SignIn.js.map +1 -1
  518. package/esm/redux/connectors/SignOut.js +4 -6
  519. package/esm/redux/connectors/SignOut.js.map +1 -1
  520. package/esm/redux/connectors/Tab.js +1 -1
  521. package/esm/redux/connectors/Tab.js.map +1 -1
  522. package/esm/redux/connectors/index.js +1 -0
  523. package/esm/redux/connectors/index.js.map +1 -1
  524. package/esm/redux/index.js +16 -7
  525. package/esm/redux/index.js.map +1 -1
  526. package/esm/redux/reducers/AuthReducer.js +13 -14
  527. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  528. package/esm/redux/reducers/ErrorReducer.js +3 -4
  529. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  530. package/esm/redux/reducers/ModalsReducer.js +11 -15
  531. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  532. package/esm/redux/reducers/NotificationReducer.js +7 -8
  533. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  534. package/esm/redux/reducers/PreferencesReducer.js +7 -7
  535. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  536. package/esm/redux/reducers/ProgressIndicatorReducer.js +11 -15
  537. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  538. package/esm/redux/reducers/createReducer.js +1 -1
  539. package/esm/redux/reducers/createReducer.js.map +1 -1
  540. package/esm/redux/reducers/index.js +1 -0
  541. package/esm/redux/reducers/index.js.map +1 -1
  542. package/esm/redux/selectors/i18n.js +5 -4
  543. package/esm/redux/selectors/i18n.js.map +1 -1
  544. package/esm/redux/selectors/index.js +1 -0
  545. package/esm/redux/selectors/index.js.map +1 -1
  546. package/esm/redux/store/beforeRenderHooks.js +2 -1
  547. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  548. package/esm/redux/store/configureStore.js +3 -7
  549. package/esm/redux/store/configureStore.js.map +1 -1
  550. package/esm/utils/browser/Cache.js +17 -44
  551. package/esm/utils/browser/Cache.js.map +1 -1
  552. package/esm/utils/browser/Cookies.js +4 -9
  553. package/esm/utils/browser/Cookies.js.map +1 -1
  554. package/esm/utils/datetime/DateTimeUtil.js +53 -110
  555. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  556. package/esm/utils/fetch/serverFetch.js +2 -8
  557. package/esm/utils/fetch/serverFetch.js.map +1 -1
  558. package/esm/utils/fetch/universalFetch.js +6 -17
  559. package/esm/utils/fetch/universalFetch.js.map +1 -1
  560. package/esm/utils/fetch/xhr.js +42 -101
  561. package/esm/utils/fetch/xhr.js.map +1 -1
  562. package/esm/utils/helpers/checkResource.js +6 -6
  563. package/esm/utils/helpers/checkResource.js.map +1 -1
  564. package/esm/utils/helpers/createHash.js +3 -5
  565. package/esm/utils/helpers/createHash.js.map +1 -1
  566. package/esm/utils/helpers/createUUID.js +1 -1
  567. package/esm/utils/helpers/createUUID.js.map +1 -1
  568. package/esm/utils/helpers/objects.js +5 -8
  569. package/esm/utils/helpers/objects.js.map +1 -1
  570. package/esm/utils/helpers/sanitizeHtml.js +7 -9
  571. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  572. package/esm/utils/helpers/text.js +2 -3
  573. package/esm/utils/helpers/text.js.map +1 -1
  574. package/esm/utils/index.js +8 -3
  575. package/esm/utils/index.js.map +1 -1
  576. package/esm/utils/number/DecimalFormat.js +43 -124
  577. package/esm/utils/number/DecimalFormat.js.map +1 -1
  578. package/esm/utils/number/formatValue.js +5 -18
  579. package/esm/utils/number/formatValue.js.map +1 -1
  580. package/esm/utils/number/parseNumbers.js +5 -17
  581. package/esm/utils/number/parseNumbers.js.map +1 -1
  582. package/lib/builder/index.js +0 -3
  583. package/lib/builder/index.js.map +1 -1
  584. package/lib/builder/mergeLayoutHintConfigurations.js +1 -13
  585. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  586. package/lib/constants/Constants.js +25 -32
  587. package/lib/constants/Constants.js.map +1 -1
  588. package/lib/constants/LayoutHintConfig.js.map +1 -1
  589. package/lib/constants/LayoutHints.js +9 -29
  590. package/lib/constants/LayoutHints.js.map +1 -1
  591. package/lib/constants/Settings.js +9 -38
  592. package/lib/constants/Settings.js.map +1 -1
  593. package/lib/constants/index.js +0 -7
  594. package/lib/constants/index.js.map +1 -1
  595. package/lib/exceptions/ConfigurationException.js +0 -2
  596. package/lib/exceptions/ConfigurationException.js.map +1 -1
  597. package/lib/exceptions/FetchException.js +9 -27
  598. package/lib/exceptions/FetchException.js.map +1 -1
  599. package/lib/exceptions/IllegalArgumentException.js +0 -3
  600. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  601. package/lib/exceptions/IllegalReturnException.js +0 -3
  602. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  603. package/lib/exceptions/IllegalStateException.js +0 -3
  604. package/lib/exceptions/IllegalStateException.js.map +1 -1
  605. package/lib/exceptions/JsonParseException.js +0 -3
  606. package/lib/exceptions/JsonParseException.js.map +1 -1
  607. package/lib/exceptions/MissingPropertyException.js +0 -3
  608. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  609. package/lib/exceptions/NetworkException.js +1 -10
  610. package/lib/exceptions/NetworkException.js.map +1 -1
  611. package/lib/exceptions/NotAllowedUriException.js +0 -3
  612. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  613. package/lib/exceptions/NotFoundException.js +1 -10
  614. package/lib/exceptions/NotFoundException.js.map +1 -1
  615. package/lib/exceptions/ServerRequestException.js +0 -3
  616. package/lib/exceptions/ServerRequestException.js.map +1 -1
  617. package/lib/exceptions/ThemePropertyException.js +0 -3
  618. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  619. package/lib/exceptions/TimeoutException.js +1 -10
  620. package/lib/exceptions/TimeoutException.js.map +1 -1
  621. package/lib/exceptions/UnauthorizedException.js +1 -9
  622. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  623. package/lib/exceptions/UnsupportedOperationException.js +0 -3
  624. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  625. package/lib/exceptions/index.js +0 -16
  626. package/lib/exceptions/index.js.map +1 -1
  627. package/lib/hooks/index.js +0 -33
  628. package/lib/hooks/index.js.map +1 -1
  629. package/lib/hooks/useAllFormsOnModel.js +0 -23
  630. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  631. package/lib/hooks/useAuthentication.js +8 -35
  632. package/lib/hooks/useAuthentication.js.map +1 -1
  633. package/lib/hooks/useContent.js +3 -16
  634. package/lib/hooks/useContent.js.map +1 -1
  635. package/lib/hooks/useDeepCompareEffect.js +1 -12
  636. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  637. package/lib/hooks/useForm.js +3 -27
  638. package/lib/hooks/useForm.js.map +1 -1
  639. package/lib/hooks/useI18n.js +3 -15
  640. package/lib/hooks/useI18n.js.map +1 -1
  641. package/lib/hooks/useModal.js +0 -9
  642. package/lib/hooks/useModal.js.map +1 -1
  643. package/lib/hooks/useModelCatalog.js +9 -45
  644. package/lib/hooks/useModelCatalog.js.map +1 -1
  645. package/lib/hooks/useModels.js +0 -3
  646. package/lib/hooks/useModels.js.map +1 -1
  647. package/lib/hooks/useModularUI.js +6 -19
  648. package/lib/hooks/useModularUI.js.map +1 -1
  649. package/lib/hooks/useModularUIBasic.js +2 -17
  650. package/lib/hooks/useModularUIBasic.js.map +1 -1
  651. package/lib/hooks/useModularUIModel.js +9 -39
  652. package/lib/hooks/useModularUIModel.js.map +1 -1
  653. package/lib/hooks/useModularUIRequest.js +1 -7
  654. package/lib/hooks/useModularUIRequest.js.map +1 -1
  655. package/lib/hooks/useNotification.js +1 -7
  656. package/lib/hooks/useNotification.js.map +1 -1
  657. package/lib/hooks/usePreference.js +0 -4
  658. package/lib/hooks/usePreference.js.map +1 -1
  659. package/lib/hooks/useProgressIndicator.js +2 -4
  660. package/lib/hooks/useProgressIndicator.js.map +1 -1
  661. package/lib/hooks/useRouter.js +6 -20
  662. package/lib/hooks/useRouter.js.map +1 -1
  663. package/lib/i18n/Locale.js +15 -44
  664. package/lib/i18n/Locale.js.map +1 -1
  665. package/lib/i18n/Locales.js +13 -44
  666. package/lib/i18n/Locales.js.map +1 -1
  667. package/lib/i18n/Message.js +2 -8
  668. package/lib/i18n/Message.js.map +1 -1
  669. package/lib/i18n/index.js +0 -9
  670. package/lib/i18n/index.js.map +1 -1
  671. package/lib/i18n/languages.js.map +1 -1
  672. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  673. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  674. package/lib/i18n/withMessage.js +1 -10
  675. package/lib/i18n/withMessage.js.map +1 -1
  676. package/lib/index.js +0 -13
  677. package/lib/index.js.map +1 -1
  678. package/lib/models/actions/ActionCollection.js +12 -33
  679. package/lib/models/actions/ActionCollection.js.map +1 -1
  680. package/lib/models/actions/ActionModel.js +23 -68
  681. package/lib/models/actions/ActionModel.js.map +1 -1
  682. package/lib/models/application/ApplicationModel.js +14 -41
  683. package/lib/models/application/ApplicationModel.js.map +1 -1
  684. package/lib/models/attributes/AttributeCollection.js +27 -87
  685. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  686. package/lib/models/attributes/AttributeContent.js +23 -65
  687. package/lib/models/attributes/AttributeContent.js.map +1 -1
  688. package/lib/models/attributes/AttributeDataHelper.js +32 -89
  689. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  690. package/lib/models/attributes/AttributeModel.js +101 -254
  691. package/lib/models/attributes/AttributeModel.js.map +1 -1
  692. package/lib/models/attributes/AttributeSetModel.js +5 -20
  693. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  694. package/lib/models/attributes/BooleanAttributeModel.js +29 -83
  695. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  696. package/lib/models/attributes/CaptchaAttributeModel.js +3 -10
  697. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  698. package/lib/models/attributes/ChoiceAttributeModel.js +38 -115
  699. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  700. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +26 -84
  701. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  702. package/lib/models/attributes/ChoiceAttributeOptionModel.js +34 -108
  703. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  704. package/lib/models/attributes/CompositeAttributeChildCollection.js +23 -70
  705. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  706. package/lib/models/attributes/CompositeAttributeModel.js +40 -109
  707. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  708. package/lib/models/attributes/DatetimeAttributeModel.js +51 -159
  709. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  710. package/lib/models/attributes/HelptextAttributeModel.js +5 -20
  711. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  712. package/lib/models/attributes/LabelAttributeModel.js +3 -11
  713. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  714. package/lib/models/attributes/MemoAttributeModel.js +4 -13
  715. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  716. package/lib/models/attributes/MoneyAttributeModel.js +4 -14
  717. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  718. package/lib/models/attributes/NumberAttributeModel.js +21 -61
  719. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  720. package/lib/models/attributes/PasswordAttributeModel.js +23 -75
  721. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  722. package/lib/models/attributes/StringAttributeModel.js +28 -79
  723. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  724. package/lib/models/attributes/UploadAttributeModel.js +21 -66
  725. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  726. package/lib/models/attributes/XMLAttributeModel.js +4 -16
  727. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  728. package/lib/models/attributes/_createAttribute.js +7 -41
  729. package/lib/models/attributes/_createAttribute.js.map +1 -1
  730. package/lib/models/attributes/input-constraints/BSNConstraint.js +6 -19
  731. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  732. package/lib/models/attributes/input-constraints/ConstraintCollection.js +3 -15
  733. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  734. package/lib/models/attributes/input-constraints/ConstraintModel.js +6 -19
  735. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  736. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +16 -58
  737. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  738. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +8 -22
  739. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  740. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +8 -22
  741. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  742. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +10 -27
  743. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  744. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +7 -20
  745. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  746. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +10 -26
  747. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  748. package/lib/models/attributes/input-constraints/IBANConstraint.js +5 -14
  749. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  750. package/lib/models/attributes/input-constraints/MandatoryConstraint.js +6 -15
  751. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  752. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +8 -25
  753. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  754. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +17 -51
  755. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  756. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +15 -44
  757. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  758. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +15 -40
  759. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  760. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +8 -20
  761. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  762. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +5 -12
  763. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  764. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +7 -18
  765. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  766. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +7 -18
  767. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  768. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +8 -24
  769. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  770. package/lib/models/attributes/input-constraints/RangeConstraint.js +22 -57
  771. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  772. package/lib/models/attributes/input-constraints/RegexConstraint.js +7 -19
  773. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  774. package/lib/models/attributes/input-constraints/StringLengthConstraint.js +13 -50
  775. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  776. package/lib/models/attributes/input-constraints/XMLConstraint.js +6 -17
  777. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  778. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +8 -18
  779. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  780. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +30 -88
  781. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  782. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +4 -19
  783. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  784. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +3 -13
  785. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  786. package/lib/models/base/BaseCollection.js +26 -73
  787. package/lib/models/base/BaseCollection.js.map +1 -1
  788. package/lib/models/base/BaseModel.js +14 -40
  789. package/lib/models/base/BaseModel.js.map +1 -1
  790. package/lib/models/base/ResourceCollection.js +1 -6
  791. package/lib/models/base/ResourceCollection.js.map +1 -1
  792. package/lib/models/base/ResourceModel.js +21 -53
  793. package/lib/models/base/ResourceModel.js.map +1 -1
  794. package/lib/models/caseview/CaseViewModel.js +16 -54
  795. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  796. package/lib/models/concepts/BusinessScenarioModel.js +10 -44
  797. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  798. package/lib/models/concepts/ConceptDetailModel.js +32 -90
  799. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  800. package/lib/models/concepts/ConceptIndexModel.js +12 -42
  801. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  802. package/lib/models/concepts/ConceptLinkModel.js +16 -49
  803. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  804. package/lib/models/concepts/ConceptRelationCollection.js +6 -25
  805. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  806. package/lib/models/concepts/ConceptRelationModel.js +8 -23
  807. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  808. package/lib/models/concepts/ConceptTypeDetailModel.js +11 -26
  809. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  810. package/lib/models/concepts/SourceReferenceCollection.js +1 -11
  811. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  812. package/lib/models/concepts/SourceReferenceModel.js +9 -22
  813. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  814. package/lib/models/content/ContentIndexModel.js +12 -44
  815. package/lib/models/content/ContentIndexModel.js.map +1 -1
  816. package/lib/models/content/ContentLinkModel.js +19 -61
  817. package/lib/models/content/ContentLinkModel.js.map +1 -1
  818. package/lib/models/content/ContentModel.js +21 -67
  819. package/lib/models/content/ContentModel.js.map +1 -1
  820. package/lib/models/content/ContentTOCModel.js +17 -55
  821. package/lib/models/content/ContentTOCModel.js.map +1 -1
  822. package/lib/models/content/ContentTypeModel.js +7 -18
  823. package/lib/models/content/ContentTypeModel.js.map +1 -1
  824. package/lib/models/content/SectionModel.js +19 -62
  825. package/lib/models/content/SectionModel.js.map +1 -1
  826. package/lib/models/content/SubSectionModel.js +15 -51
  827. package/lib/models/content/SubSectionModel.js.map +1 -1
  828. package/lib/models/contentconfiguration/ContentConfiguration.js +5 -25
  829. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  830. package/lib/models/contentconfiguration/ContentConfigurationElements.js +10 -45
  831. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  832. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +2 -17
  833. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  834. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +4 -16
  835. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  836. package/lib/models/contentconfiguration/ContentConfigurationResults.js +12 -37
  837. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  838. package/lib/models/detail/DetailModel.js +21 -61
  839. package/lib/models/detail/DetailModel.js.map +1 -1
  840. package/lib/models/error/ErrorCollection.js +10 -35
  841. package/lib/models/error/ErrorCollection.js.map +1 -1
  842. package/lib/models/error/ErrorModel.js +6 -17
  843. package/lib/models/error/ErrorModel.js.map +1 -1
  844. package/lib/models/error/ErrorResponse.js +36 -96
  845. package/lib/models/error/ErrorResponse.js.map +1 -1
  846. package/lib/models/filters/AssignmentFilterModel.js +19 -45
  847. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  848. package/lib/models/filters/BaseFilterModel.js +24 -60
  849. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  850. package/lib/models/filters/ConceptIndexFilterModel.js +0 -9
  851. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  852. package/lib/models/filters/FilterCollection.js +11 -55
  853. package/lib/models/filters/FilterCollection.js.map +1 -1
  854. package/lib/models/filters/FilterModel.js +0 -3
  855. package/lib/models/filters/FilterModel.js.map +1 -1
  856. package/lib/models/filters/RangeFilterModel.js +1 -10
  857. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  858. package/lib/models/form/FormModel.js +135 -328
  859. package/lib/models/form/FormModel.js.map +1 -1
  860. package/lib/models/form/FormObjectModel.js +55 -144
  861. package/lib/models/form/FormObjectModel.js.map +1 -1
  862. package/lib/models/grouping/GroupingModel.js +20 -58
  863. package/lib/models/grouping/GroupingModel.js.map +1 -1
  864. package/lib/models/href/Href.js +47 -123
  865. package/lib/models/href/Href.js.map +1 -1
  866. package/lib/models/href/ListHref.js +11 -29
  867. package/lib/models/href/ListHref.js.map +1 -1
  868. package/lib/models/index.js +0 -97
  869. package/lib/models/index.js.map +1 -1
  870. package/lib/models/layouthint/LayoutHintCollection.js +8 -40
  871. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  872. package/lib/models/links/LinkCollection.js +15 -51
  873. package/lib/models/links/LinkCollection.js.map +1 -1
  874. package/lib/models/links/LinkModel.js +20 -62
  875. package/lib/models/links/LinkModel.js.map +1 -1
  876. package/lib/models/links/normalizeLinkJSON.js +5 -21
  877. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  878. package/lib/models/list/ListDetailModel.js +31 -84
  879. package/lib/models/list/ListDetailModel.js.map +1 -1
  880. package/lib/models/list/ListHeaderModel.js +10 -30
  881. package/lib/models/list/ListHeaderModel.js.map +1 -1
  882. package/lib/models/list/ListItemCollection.js +4 -24
  883. package/lib/models/list/ListItemCollection.js.map +1 -1
  884. package/lib/models/list/ListItemModel.js +7 -29
  885. package/lib/models/list/ListItemModel.js.map +1 -1
  886. package/lib/models/list/ListModel.js +38 -123
  887. package/lib/models/list/ListModel.js.map +1 -1
  888. package/lib/models/lookup/LookupOptionCollection.js +2 -8
  889. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  890. package/lib/models/lookup/LookupOptionsModel.js +5 -19
  891. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  892. package/lib/models/modelcatalog/ModelCatalogModel.js +4 -17
  893. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  894. package/lib/models/paging/PagesizeModel.js +4 -13
  895. package/lib/models/paging/PagesizeModel.js.map +1 -1
  896. package/lib/models/paging/PagingModel.js +10 -26
  897. package/lib/models/paging/PagingModel.js.map +1 -1
  898. package/lib/models/panels/GroupingPanelModel.js +14 -47
  899. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  900. package/lib/models/parameter/Parameter.js +13 -42
  901. package/lib/models/parameter/Parameter.js.map +1 -1
  902. package/lib/models/process/ProcessStatusSettingsModel.js +9 -29
  903. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  904. package/lib/models/resolveModel.js +1 -33
  905. package/lib/models/resolveModel.js.map +1 -1
  906. package/lib/models/search/CaseSearchModel.js +3 -12
  907. package/lib/models/search/CaseSearchModel.js.map +1 -1
  908. package/lib/models/sorting/SortOptionModel.js +13 -39
  909. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  910. package/lib/models/sorting/SortingModel.js +8 -35
  911. package/lib/models/sorting/SortingModel.js.map +1 -1
  912. package/lib/models/tab/TabModel.js +14 -48
  913. package/lib/models/tab/TabModel.js.map +1 -1
  914. package/lib/models/taskgroup/TaskGroupCollection.js +0 -4
  915. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  916. package/lib/models/taskgroup/TaskGroupModel.js +6 -19
  917. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  918. package/lib/models/user/UserModel.js +4 -12
  919. package/lib/models/user/UserModel.js.map +1 -1
  920. package/lib/models/user/UserProfileModel.js +2 -14
  921. package/lib/models/user/UserProfileModel.js.map +1 -1
  922. package/lib/models/user/UserServicesModel.js +11 -30
  923. package/lib/models/user/UserServicesModel.js.map +1 -1
  924. package/lib/modularui/Authenticate.js +20 -66
  925. package/lib/modularui/Authenticate.js.map +1 -1
  926. package/lib/modularui/ModularUIError.js +3 -7
  927. package/lib/modularui/ModularUIError.js.map +1 -1
  928. package/lib/modularui/ModularUIRequest.js +89 -200
  929. package/lib/modularui/ModularUIRequest.js.flow +14 -0
  930. package/lib/modularui/ModularUIRequest.js.map +1 -1
  931. package/lib/modularui/ModularUIResponse.js +13 -34
  932. package/lib/modularui/ModularUIResponse.js.map +1 -1
  933. package/lib/modularui/index.js +0 -4
  934. package/lib/modularui/index.js.map +1 -1
  935. package/lib/react/ErrorBoundary.js +2 -14
  936. package/lib/react/ErrorBoundary.js.map +1 -1
  937. package/lib/react/ErrorBoundaryFallback.js +1 -8
  938. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  939. package/lib/react/index.js +0 -5
  940. package/lib/react/index.js.map +1 -1
  941. package/lib/react/utils.js +2 -13
  942. package/lib/react/utils.js.map +1 -1
  943. package/lib/react-client/Init.js +0 -8
  944. package/lib/react-client/Init.js.map +1 -1
  945. package/lib/react-client/client.js +16 -49
  946. package/lib/react-client/client.js.map +1 -1
  947. package/lib/react-client/contextPath.js +2 -9
  948. package/lib/react-client/contextPath.js.map +1 -1
  949. package/lib/react-client/index.js +0 -4
  950. package/lib/react-client/index.js.map +1 -1
  951. package/lib/react-client/rehydrate.js +3 -23
  952. package/lib/react-client/rehydrate.js.map +1 -1
  953. package/lib/react-server/contextPath.js +1 -2
  954. package/lib/react-server/contextPath.js.map +1 -1
  955. package/lib/react-server/createSSRComplete.js +2 -16
  956. package/lib/react-server/createSSRComplete.js.map +1 -1
  957. package/lib/react-server/htmlpage.js +25 -16
  958. package/lib/react-server/htmlpage.js.map +1 -1
  959. package/lib/react-server/index.js +0 -12
  960. package/lib/react-server/index.js.map +1 -1
  961. package/lib/react-server/renderSSRComplete.js +3 -16
  962. package/lib/react-server/renderSSRComplete.js.map +1 -1
  963. package/lib/react-server/renderSSRMinimal.js +0 -10
  964. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  965. package/lib/react-server/requestInformation.js +6 -21
  966. package/lib/react-server/requestInformation.js.map +1 -1
  967. package/lib/react-server/serverNoSSR.js +2 -14
  968. package/lib/react-server/serverNoSSR.js.map +1 -1
  969. package/lib/react-server/serverSSR.js +0 -8
  970. package/lib/react-server/serverSSR.js.map +1 -1
  971. package/lib/react-server/serverUtil.js +13 -60
  972. package/lib/react-server/serverUtil.js.map +1 -1
  973. package/lib/react-theme/ThemeProvider.js +0 -6
  974. package/lib/react-theme/ThemeProvider.js.map +1 -1
  975. package/lib/react-theme/createTheme.js +7 -23
  976. package/lib/react-theme/createTheme.js.map +1 -1
  977. package/lib/react-theme/index.js +0 -18
  978. package/lib/react-theme/index.js.map +1 -1
  979. package/lib/react-theme/useTheme.js +0 -3
  980. package/lib/react-theme/useTheme.js.map +1 -1
  981. package/lib/react-theme/utils/background.js +1 -5
  982. package/lib/react-theme/utils/background.js.map +1 -1
  983. package/lib/react-theme/utils/colors.js +2 -12
  984. package/lib/react-theme/utils/colors.js.map +1 -1
  985. package/lib/react-theme/utils/contrast.js +7 -35
  986. package/lib/react-theme/utils/contrast.js.map +1 -1
  987. package/lib/react-theme/utils/corners.js +3 -14
  988. package/lib/react-theme/utils/corners.js.map +1 -1
  989. package/lib/react-theme/utils/spacers.js +6 -30
  990. package/lib/react-theme/utils/spacers.js.map +1 -1
  991. package/lib/react-theme/utils/themeProps.js +7 -35
  992. package/lib/react-theme/utils/themeProps.js.map +1 -1
  993. package/lib/redux/_i18n/actions.js +2 -8
  994. package/lib/redux/_i18n/actions.js.map +1 -1
  995. package/lib/redux/_i18n/index.js +0 -5
  996. package/lib/redux/_i18n/index.js.map +1 -1
  997. package/lib/redux/_i18n/reducer.js +12 -21
  998. package/lib/redux/_i18n/reducer.js.map +1 -1
  999. package/lib/redux/_modularui/actions.js +36 -69
  1000. package/lib/redux/_modularui/actions.js.map +1 -1
  1001. package/lib/redux/_modularui/connector.js +20 -28
  1002. package/lib/redux/_modularui/connector.js.map +1 -1
  1003. package/lib/redux/_modularui/index.js +0 -14
  1004. package/lib/redux/_modularui/index.js.map +1 -1
  1005. package/lib/redux/_modularui/middleware.js +8 -28
  1006. package/lib/redux/_modularui/middleware.js.map +1 -1
  1007. package/lib/redux/_modularui/modularuiUtils.js +10 -36
  1008. package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
  1009. package/lib/redux/_modularui/reducer.js +19 -45
  1010. package/lib/redux/_modularui/reducer.js.map +1 -1
  1011. package/lib/redux/_modularui/selectors.js +20 -97
  1012. package/lib/redux/_modularui/selectors.js.map +1 -1
  1013. package/lib/redux/_modularui/withModularUI.js +2 -11
  1014. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  1015. package/lib/redux/_router/actions.js +5 -16
  1016. package/lib/redux/_router/actions.js.map +1 -1
  1017. package/lib/redux/_router/connectors.js +10 -15
  1018. package/lib/redux/_router/connectors.js.map +1 -1
  1019. package/lib/redux/_router/index.js +0 -9
  1020. package/lib/redux/_router/index.js.map +1 -1
  1021. package/lib/redux/_router/middleware.js +0 -2
  1022. package/lib/redux/_router/middleware.js.map +1 -1
  1023. package/lib/redux/_router/reducer.js +2 -4
  1024. package/lib/redux/_router/reducer.js.map +1 -1
  1025. package/lib/redux/actions/Application.js +1 -8
  1026. package/lib/redux/actions/Application.js.map +1 -1
  1027. package/lib/redux/actions/Authorization.js +6 -25
  1028. package/lib/redux/actions/Authorization.js.map +1 -1
  1029. package/lib/redux/actions/Error.js +4 -24
  1030. package/lib/redux/actions/Error.js.map +1 -1
  1031. package/lib/redux/actions/Form.js +1 -12
  1032. package/lib/redux/actions/Form.js.map +1 -1
  1033. package/lib/redux/actions/FormAttributeSet.js +0 -14
  1034. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  1035. package/lib/redux/actions/FormAttributeSetRepeatable.js +2 -8
  1036. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  1037. package/lib/redux/actions/FormAutosave.js +3 -12
  1038. package/lib/redux/actions/FormAutosave.js.map +1 -1
  1039. package/lib/redux/actions/FormAutosubmit.js +0 -6
  1040. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  1041. package/lib/redux/actions/FormValidations.js +2 -13
  1042. package/lib/redux/actions/FormValidations.js.map +1 -1
  1043. package/lib/redux/actions/Modals.js +1 -4
  1044. package/lib/redux/actions/Modals.js.map +1 -1
  1045. package/lib/redux/actions/Notification.js +4 -19
  1046. package/lib/redux/actions/Notification.js.map +1 -1
  1047. package/lib/redux/actions/Preferences.js +13 -44
  1048. package/lib/redux/actions/Preferences.js.map +1 -1
  1049. package/lib/redux/actions/ProgressIndicator.js +3 -11
  1050. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  1051. package/lib/redux/actions/SignIn.js +5 -28
  1052. package/lib/redux/actions/SignIn.js.map +1 -1
  1053. package/lib/redux/actions/SignOut.js +1 -9
  1054. package/lib/redux/actions/SignOut.js.map +1 -1
  1055. package/lib/redux/actions/index.js +0 -31
  1056. package/lib/redux/actions/index.js.map +1 -1
  1057. package/lib/redux/connectors/Application.js +0 -2
  1058. package/lib/redux/connectors/Application.js.map +1 -1
  1059. package/lib/redux/connectors/Breadcrumb.js +1 -4
  1060. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  1061. package/lib/redux/connectors/CaseView.js +0 -2
  1062. package/lib/redux/connectors/CaseView.js.map +1 -1
  1063. package/lib/redux/connectors/ConceptDetail.js +1 -7
  1064. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  1065. package/lib/redux/connectors/ContentBrowser.js +0 -2
  1066. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  1067. package/lib/redux/connectors/ContentDetail.js +1 -7
  1068. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  1069. package/lib/redux/connectors/ContentDetailSection.js +1 -8
  1070. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  1071. package/lib/redux/connectors/Form.js +2 -19
  1072. package/lib/redux/connectors/Form.js.map +1 -1
  1073. package/lib/redux/connectors/FormAttributeSet.js +1 -5
  1074. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  1075. package/lib/redux/connectors/ListDetail.js +0 -3
  1076. package/lib/redux/connectors/ListDetail.js.map +1 -1
  1077. package/lib/redux/connectors/Modal.js +1 -7
  1078. package/lib/redux/connectors/Modal.js.map +1 -1
  1079. package/lib/redux/connectors/ModelCatalog.js +0 -2
  1080. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  1081. package/lib/redux/connectors/Notification.js +1 -4
  1082. package/lib/redux/connectors/Notification.js.map +1 -1
  1083. package/lib/redux/connectors/PanelRenderer.js +0 -7
  1084. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  1085. package/lib/redux/connectors/Preferences.js +1 -5
  1086. package/lib/redux/connectors/Preferences.js.map +1 -1
  1087. package/lib/redux/connectors/Progress.js +1 -4
  1088. package/lib/redux/connectors/Progress.js.map +1 -1
  1089. package/lib/redux/connectors/ProgressIndicator.js +1 -3
  1090. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  1091. package/lib/redux/connectors/QuickSearch.js +1 -7
  1092. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  1093. package/lib/redux/connectors/SignIn.js +2 -8
  1094. package/lib/redux/connectors/SignIn.js.map +1 -1
  1095. package/lib/redux/connectors/SignOut.js +3 -8
  1096. package/lib/redux/connectors/SignOut.js.map +1 -1
  1097. package/lib/redux/connectors/Tab.js +0 -2
  1098. package/lib/redux/connectors/Tab.js.map +1 -1
  1099. package/lib/redux/connectors/index.js +0 -21
  1100. package/lib/redux/connectors/index.js.map +1 -1
  1101. package/lib/redux/index.js +0 -17
  1102. package/lib/redux/index.js.map +1 -1
  1103. package/lib/redux/reducers/AuthReducer.js +12 -14
  1104. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  1105. package/lib/redux/reducers/ErrorReducer.js +2 -4
  1106. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  1107. package/lib/redux/reducers/ModalsReducer.js +11 -18
  1108. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  1109. package/lib/redux/reducers/NotificationReducer.js +6 -8
  1110. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  1111. package/lib/redux/reducers/PreferencesReducer.js +6 -7
  1112. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  1113. package/lib/redux/reducers/ProgressIndicatorReducer.js +10 -15
  1114. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  1115. package/lib/redux/reducers/createReducer.js +0 -11
  1116. package/lib/redux/reducers/createReducer.js.map +1 -1
  1117. package/lib/redux/reducers/index.js +0 -10
  1118. package/lib/redux/reducers/index.js.map +1 -1
  1119. package/lib/redux/selectors/i18n.js +3 -7
  1120. package/lib/redux/selectors/i18n.js.map +1 -1
  1121. package/lib/redux/selectors/index.js +0 -3
  1122. package/lib/redux/selectors/index.js.map +1 -1
  1123. package/lib/redux/store/beforeRenderHooks.js +0 -2
  1124. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  1125. package/lib/redux/store/configureStore.js +2 -13
  1126. package/lib/redux/store/configureStore.js.map +1 -1
  1127. package/lib/utils/browser/Cache.js +16 -49
  1128. package/lib/utils/browser/Cache.js.map +1 -1
  1129. package/lib/utils/browser/Cookies.js +3 -14
  1130. package/lib/utils/browser/Cookies.js.map +1 -1
  1131. package/lib/utils/datetime/DateTimeUtil.js +52 -115
  1132. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  1133. package/lib/utils/fetch/serverFetch.js +2 -13
  1134. package/lib/utils/fetch/serverFetch.js.map +1 -1
  1135. package/lib/utils/fetch/universalFetch.js +6 -25
  1136. package/lib/utils/fetch/universalFetch.js.map +1 -1
  1137. package/lib/utils/fetch/xhr.js +42 -111
  1138. package/lib/utils/fetch/xhr.js.map +1 -1
  1139. package/lib/utils/helpers/checkResource.js +5 -11
  1140. package/lib/utils/helpers/checkResource.js.map +1 -1
  1141. package/lib/utils/helpers/createHash.js +1 -6
  1142. package/lib/utils/helpers/createHash.js.map +1 -1
  1143. package/lib/utils/helpers/createUUID.js +0 -2
  1144. package/lib/utils/helpers/createUUID.js.map +1 -1
  1145. package/lib/utils/helpers/objects.js +3 -15
  1146. package/lib/utils/helpers/objects.js.map +1 -1
  1147. package/lib/utils/helpers/sanitizeHtml.js +6 -13
  1148. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  1149. package/lib/utils/helpers/text.js +0 -4
  1150. package/lib/utils/helpers/text.js.map +1 -1
  1151. package/lib/utils/index.js +0 -25
  1152. package/lib/utils/index.js.map +1 -1
  1153. package/lib/utils/number/DecimalFormat.js +43 -121
  1154. package/lib/utils/number/DecimalFormat.js.map +1 -1
  1155. package/lib/utils/number/formatValue.js +3 -22
  1156. package/lib/utils/number/formatValue.js.map +1 -1
  1157. package/lib/utils/number/parseNumbers.js +3 -19
  1158. package/lib/utils/number/parseNumbers.js.map +1 -1
  1159. package/package.json +29 -29
  1160. package/src/modularui/ModularUIRequest.js +14 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIRequest.js","names":["deepmerge","BASE","HTTP_METHODS","TIMEVERSION_FILTER_NAME","HIDE_WHEN_EMPTY","getSetting","Href","universalFetch","resolveModel","FormModel","ContentModel","ModularUIResponse","ModularUIError","IllegalArgumentException","IllegalStateException","isPlainObject","ModularUIRequest","constructor","href","options","GET","_response","locale","parameters","targetModel","method","contributionsHref","_contributionsHref","_locale","response","_href","_method","_options","withChildModels","childmodels","_targetModel","createModel","Model","isApplicableModel","processContributionsService","contributionsData","contributionsKey","error","handleContributionsError","key","contributions","errorMessage","properties","message","handleDataError","path","toString","handleData","data","links","_links","Array","isArray","processDataService","fetchContributionsService","url","cache","fetchDataService","params","getQuerystringForModularUI","onProgress","processAsyncLayoutHints","processApplicationLinks","processTabLinks","processPanelLinks","resolve","contributionLinks","dataLinks","contributionTabLink","tab","dataTabLinks","dataLink","name","processLinks","components","then","newLinks","replaceApplicationLinks","tabName","tabLink","component","panel","dataLinksPerName","linksPerName","hideWhenEmptyLinks","contributionLink","layouthint","isHiddenListChecks","push","isHiddenList","all","hiddenLinks","newDataLinks","dataLinkKey","HIDE_WHEN_EMPTY_IGNORE_TASKS","_embedded","actions","noListItems","noActions","isHidden","catch","progressEvent","_progressEvent","getDynamicValidationData","model","prevData","JSON","parse","newData","validationData","loadDynamicValidations","isValidationRequest","currentFormObject","hasDynamicValidations","validationHref","setParameter","updateValidations","fetch","Error","fetchChildModels","fetchFromCache","childModelLinks","getInitialChildModelLinks","childModelRequests","childModelLink","request","isCacheable","allSettled","childModels","resolvedChildModels","forEach","childModel","status","reason","console","value","addChildModels","fetchContent","withChildSections","childSectionLinks","length","fetchContentChildSections","contentModel","newContentModel","clone","childSectionLink","contentHrefWithEntryDate","selfhref","addParameter","entryDate","sectionModels","childSections"],"sources":["../../src/modularui/ModularUIRequest.js"],"sourcesContent":["// @flow\nimport deepmerge from \"deepmerge\";\n\nimport {\n BASE,\n HTTP_METHODS,\n TIMEVERSION_FILTER_NAME,\n} from \"../constants/Constants\";\n\nimport { HIDE_WHEN_EMPTY } from \"../constants/LayoutHints\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport Href from \"../models/href/Href\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport resolveModel from \"../models/resolveModel\";\nimport FormModel from \"../models/form/FormModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport ModularUIResponse from \"./ModularUIResponse\";\n\nimport ModularUIError from \"./ModularUIError\";\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport type { RequestBaseOptions } from \"../utils/fetch/types\";\nimport type { ModularUIModel } from \"../models/types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n */\nclass ModularUIRequest {\n _response: ModularUIResponse;\n\n _href: Href;\n _options: RequestBaseOptions;\n _targetModel: ?Class<ModularUIModel>;\n _contributionsHref: string;\n _locale: string;\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n\n _progressEvent: ProgressEventHandler;\n\n /**\n */\n constructor(href: Href | string, options: $Shape<RequestBaseOptions> = {}) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\"\n );\n }\n\n this.options = options;\n\n this._response = new ModularUIResponse();\n\n this.href = typeof href === \"string\" ? new Href(href) : href;\n this.locale = options.locale ?? \"en\";\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters;\n\n if (options.targetModel) {\n this.targetModel = options.targetModel;\n }\n\n if (options.method) {\n this.method = options.method;\n } else {\n this.method = this.href.method;\n }\n }\n\n /**\n */\n get contributionsHref(): string {\n return this._contributionsHref;\n }\n\n /**\n */\n set contributionsHref(contributionsHref: string) {\n this._contributionsHref = contributionsHref;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n get response(): ModularUIResponse {\n return this._response;\n }\n\n /**\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method;\n }\n\n /**\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n */\n get options(): RequestBaseOptions {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n /**\n */\n set options(options: RequestBaseOptions) {\n this._options = options;\n }\n\n /**\n */\n get withChildModels(): boolean {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n /**\n */\n set targetModel(targetModel: ?Class<ModularUIModel>) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get targetModel(): ?Class<ModularUIModel> {\n return this._targetModel;\n }\n\n /**\n */\n createModel(): ModularUIModel {\n const Model = this.targetModel || resolveModel(this.response);\n\n // check for ResourceModel\n if (Model && Model.isApplicableModel) {\n return new Model(this.response);\n }\n\n throw new IllegalStateException(\n `No model available for data: ${JSON.stringify(this.response)}`\n );\n }\n\n /**\n */\n processContributionsService(contributionsData: Object) {\n if (!isPlainObject(contributionsData)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\"\n );\n }\n\n const [contributionsKey] = Object.keys(contributionsData);\n\n if (contributionsData.error && contributionsKey === \"error\") {\n this.handleContributionsError(contributionsData.error);\n }\n\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsData)) {\n this.response.key = contributionsKey;\n }\n\n this.response.contributions = contributionsData[this.response.key];\n }\n\n /**\n */\n handleContributionsError(error: Object) {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n /**\n */\n handleDataError(error: Object) {\n if (error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(errorMessage, error, this.href.path.toString());\n }\n\n throw new IllegalArgumentException(error);\n }\n\n /**\n */\n handleData(key: string, data: Object) {\n this.response.key = key;\n this.response.data = data;\n\n const links = data._links;\n\n if (links && links.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`\n );\n }\n }\n\n /**\n */\n processDataService(data: Object) {\n if (!isPlainObject(data)) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n if (data.error) {\n this.handleDataError(data.error);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, data[key]);\n }\n }\n\n /**\n */\n fetchContributionsService(): Promise<any> {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${BASE}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n /**\n */\n fetchDataService(): Promise<any> {\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n /**\n * Check if links contain a 'hide-when-empty' layout hint and remove the link from\n * the component when it exists and no results are available\n */\n async processAsyncLayoutHints(): Promise<void> {\n if (getSetting(\"ALLOW_HIDE_WHEN_EMPTY_ON_TABS\")) {\n await this.processApplicationLinks();\n await this.processTabLinks();\n }\n await this.processPanelLinks();\n\n return Promise.resolve();\n }\n\n /**\n * hide application links<br>\n * _links on application data contains an extra level of tab links\n */\n processApplicationLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n const dataLinks = this.response.data._links;\n if (!contributionLinks || !dataLinks) {\n return Promise.resolve();\n }\n\n if (\"tab\" in contributionLinks && \"tab\" in dataLinks) {\n for (const contributionTabLink of contributionLinks.tab) {\n if (\"components\" in contributionTabLink) {\n const dataTabLinks = dataLinks.tab.find(\n (dataLink) => dataLink.name === contributionTabLink.name\n );\n\n if (dataTabLinks && \"components\" in dataTabLinks) {\n return this.processLinks(\n dataTabLinks.components,\n contributionTabLink.components\n ).then((newLinks) =>\n this.replaceApplicationLinks(contributionTabLink.name, newLinks)\n );\n }\n }\n }\n }\n\n return Promise.resolve();\n }\n\n /**\n * Replace hidden link in application link tree\n */\n replaceApplicationLinks(tabName: string, newLinks: Array<Object>): void {\n this.response.data._links.tab = this.response.data._links.tab.map(\n (tabLink) => {\n const key = tabLink.name;\n if (tabName === key) {\n tabLink.components = newLinks;\n }\n return tabLink;\n }\n );\n }\n\n /**\n */\n processTabLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"component\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links.component,\n contributionLinks.component\n ).then((newLinks) => {\n this.response.data._links.component = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n */\n processPanelLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"panel\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links,\n contributionLinks.panel\n ).then((newLinks) => {\n this.response.data._links = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Retrieve an object of key: link\n */\n dataLinksPerName(dataLinks: any): { [linkName: string]: any } {\n if (Array.isArray(dataLinks)) {\n const links = {};\n for (const dataLink of dataLinks) {\n links[dataLink.name] = dataLink;\n }\n return links;\n }\n return dataLinks;\n }\n\n /**\n * Check if links are empty and hide them when hide-when-empty hint exists\n */\n processLinks(\n dataLinks: any,\n contributionLinks: any\n ): Promise<Object | Array<Object>> {\n const linksPerName = this.dataLinksPerName(dataLinks);\n const hideWhenEmptyLinks = contributionLinks.filter((contributionLink) =>\n contributionLink.layouthint?.includes(HIDE_WHEN_EMPTY)\n );\n\n const isHiddenListChecks = [];\n\n for (const contributionLink of hideWhenEmptyLinks) {\n const dataLink = linksPerName[contributionLink.name];\n if (dataLink?.href) {\n isHiddenListChecks.push(\n this.isHiddenList(contributionLink.name, dataLink.href)\n );\n }\n }\n\n return Promise.all(isHiddenListChecks).then(\n (hiddenLinks: Array<string>) => {\n if (Array.isArray(dataLinks)) {\n return dataLinks.filter(\n (dataLink) => !hiddenLinks.includes(dataLink.name)\n );\n }\n\n const newDataLinks = {};\n for (const dataLinkKey in dataLinks) {\n if (!hiddenLinks.includes(dataLinkKey)) {\n newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];\n }\n }\n return newDataLinks;\n }\n );\n }\n\n /**\n */\n isHiddenList(name: string, href: string): Promise<string> {\n const HIDE_WHEN_EMPTY_IGNORE_TASKS = getSetting(\n \"HIDE_WHEN_EMPTY_IGNORE_TASKS\",\n false\n );\n\n return universalFetch({\n ...this.options,\n url: `${BASE}${href}`,\n })\n .then((response: Object) => {\n if (isPlainObject(response)) {\n const [key] = Object.keys(response);\n const { _embedded, actions } = response[key];\n\n const noListItems = _embedded === null;\n const noActions = actions == null || HIDE_WHEN_EMPTY_IGNORE_TASKS;\n\n const isHidden = noListItems && noActions;\n if (isHidden) {\n return name;\n }\n }\n return \"\";\n })\n .catch(() => {\n return \"\";\n });\n }\n\n /**\n */\n set onProgress(progressEvent: ProgressEventHandler) {\n this._progressEvent = progressEvent;\n }\n\n /**\n */\n get onProgress(): ProgressEventHandler {\n return this._progressEvent || null;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n getDynamicValidationData(model: ModularUIModel): string {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n // $FlowFixMe incompatible-call\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n loadDynamicValidations(model: ModularUIModel): Promise<ModularUIModel> {\n if (\n !this.options.isValidationRequest &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject &&\n model.currentFormObject.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n childmodels: false,\n data: this.getDynamicValidationData(model),\n }).then((data) => {\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const [key] = Object.keys(data);\n return model.updateValidations(data[key]);\n });\n }\n\n return Promise.resolve(model);\n }\n\n /**\n */\n fetch(): Promise<ModularUIModel> {\n return this.fetchDataService()\n .then((data) => {\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n return this.fetchContributionsService();\n })\n .then((contributionsData) => {\n if (contributionsData == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`\n );\n }\n\n this.processContributionsService(contributionsData);\n return this.processAsyncLayoutHints();\n })\n .then(() => Promise.resolve(this.createModel()))\n .then((model) => this.loadDynamicValidations(model))\n .then((model) => {\n if (this.withChildModels) {\n return this.fetchChildModels(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n */\n fetchFromCache(): Promise<ModularUIModel> {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n /**\n */\n fetchChildModels(model: ModularUIModel): Promise<ModularUIModel> {\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModelRequests = childModelLinks.map((childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n });\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.error(\n \"Unexpected error when retrieving child model:\",\n reason\n );\n }\n } else {\n resolvedChildModels.push(childModel.value);\n }\n });\n\n model.addChildModels(resolvedChildModels);\n\n return model;\n });\n }\n\n /**\n */\n fetchContent(withChildSections: boolean): Promise<mixed> {\n return this.fetchFromCache().then((model) => {\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n fetchContentChildSections(contentModel: ContentModel): Promise<mixed> {\n const newContentModel = contentModel.clone();\n\n return Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n })\n ).then((sectionModels) => {\n newContentModel.childSections = sectionModels;\n\n return newContentModel;\n });\n }\n}\n\nexport default ModularUIRequest;\n"],"mappings":";;;;;;;;;AACA,OAAOA,SAAP,MAAsB,WAAtB;AAEA,SACEC,IADF,EAEEC,YAFF,EAGEC,uBAHF,QAIO,wBAJP;AAMA,SAASC,eAAT,QAAgC,0BAAhC;AAEA,SAASC,UAAT,QAA2B,uBAA3B;AAEA,OAAOC,IAAP,MAAiB,qBAAjB;AAEA,OAAOC,cAAP,MAA2B,+BAA3B;AACA,OAAOC,YAAP,MAAyB,wBAAzB;AACA,OAAOC,SAAP,MAAsB,0BAAtB;AACA,OAAOC,YAAP,MAAyB,gCAAzB;AAEA,OAAOC,iBAAP,MAA8B,qBAA9B;AAEA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,SAASC,wBAAT,EAAmCC,qBAAnC,QAAgE,eAAhE;AAEA,SAASC,aAAT,QAA8B,0BAA9B;;AAKA;AACA;AACA;AACA;AACA,MAAMC,gBAAN,CAAuB;EAYrB;AACF;EACEC,WAAW,CAACC,IAAD,EAAgE;IAAA;;IAAA,IAA1CC,OAA0C,uEAAJ,EAAI;;IAAA;;IAAA;;IAAA;;IAAA;;IAAA;;IAAA;;IAAA,iCANrCjB,YAAY,CAACkB,GAMwB;;IAAA;;IACzE,IAAI,CAACF,IAAL,EAAW;MACT,MAAM,IAAIL,wBAAJ,CACJ,wDADI,CAAN;IAGD;;IAED,KAAKM,OAAL,GAAeA,OAAf;IAEA,KAAKE,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AL,GAAsB7C,IAAtB,CAA4B6B,KAAD,IAAW;MAC3C,IACEkC,iBAAiB,IACjBlC,KAAK,YAAYnG,YADjB,IAEAmG,KAAK,CAACmC,iBAAN,CAAwBC,MAAxB,GAAiC,CAHnC,EAIE;QACA,OAAO,KAAKC,yBAAL,CAA+BrC,KAA/B,CAAP;MACD;;MAED,OAAO,SAAQvC,OAAR,CAAgBuC,KAAhB,CAAP;IACD,CAVM,CAAP;EAWD;EAED;AACF;AACA;;;EACEqC,yBAAyB,CAACC,YAAD,EAA6C;IAAA;;IACpE,MAAMC,eAAe,GAAGD,YAAY,CAACE,KAAb,EAAxB;IAEA,OAAO,SAAQtD,GAAR,CACL,iCAAAoD,YAAY,CAACH,iBAAb,kBAAoCM,gBAAD,IAAsB;MACvD,MAAMC,wBAAwB,GAAGD,gBAAgB,CAACE,QAAjB,CAA0BC,YAA1B,CAC/BtJ,uBAD+B,EAE/BgJ,YAAY,CAACO,SAFkB,CAAjC;MAKA,MAAMxB,OAAO,GAAG,IAAIlH,gBAAJ,CAAqBuI,wBAArB,EAA+C;QAC7DjI,MAAM,EAAE,KAAKA;MADgD,CAA/C,CAAhB;MAIA,OAAO4G,OAAO,CAACY,YAAR,CAAqB,IAArB,CAAP;IACD,CAXD,CADK,EAaL9D,IAbK,CAaC2E,aAAD,IAAmB;MACxBP,eAAe,CAACQ,aAAhB,GAAgCD,aAAhC;MAEA,OAAOP,eAAP;IACD,CAjBM,CAAP;EAkBD;;AAznBoB;;AA4nBvB,eAAepI,gBAAf"}
1
+ {"version":3,"file":"ModularUIRequest.js","names":["deepmerge","BASE","HTTP_METHODS","TIMEVERSION_FILTER_NAME","HIDE_WHEN_EMPTY","getSetting","Href","universalFetch","resolveModel","FormModel","ContentModel","ModularUIResponse","ModularUIError","IllegalArgumentException","IllegalStateException","isPlainObject","ModularUIRequest","constructor","href","options","GET","_response","locale","parameters","targetModel","method","contributionsHref","_contributionsHref","_locale","response","_href","_method","_options","withChildModels","childmodels","_targetModel","createModel","Model","isApplicableModel","processContributionsService","contributionsData","contributionsKey","error","handleContributionsError","key","contributions","errorMessage","properties","message","handleDataError","path","toString","handleData","data","links","_links","Array","isArray","processDataService","fetchContributionsService","url","cache","fetchDataService","params","getQuerystringForModularUI","onProgress","processAsyncLayoutHints","processApplicationLinks","processTabLinks","processPanelLinks","resolve","contributionLinks","dataLinks","contributionTabLink","tab","dataTabLinks","dataLink","name","processLinks","components","then","newLinks","replaceApplicationLinks","tabName","tabLink","component","panel","dataLinksPerName","linksPerName","hideWhenEmptyLinks","contributionLink","layouthint","isHiddenListChecks","push","isHiddenList","all","hiddenLinks","newDataLinks","dataLinkKey","HIDE_WHEN_EMPTY_IGNORE_TASKS","_embedded","actions","noListItems","noActions","isHidden","catch","progressEvent","_progressEvent","getDynamicValidationData","model","prevData","JSON","parse","newData","validationData","loadDynamicValidations","isValidationRequest","currentFormObject","hasDynamicValidations","validationHref","setParameter","updateValidations","fetch","Error","fetchChildModels","fetchFromCache","childModelLinks","getInitialChildModelLinks","childModelRequests","childModelLink","request","isCacheable","allSettled","childModels","resolvedChildModels","forEach","childModel","status","reason","console","value","addChildModels","fetchContent","withChildSections","childSectionLinks","length","fetchContentChildSections","contentModel","newContentModel","clone","childSectionLink","contentHrefWithEntryDate","selfhref","addParameter","entryDate","sectionModels","childSections","post","POST"],"sources":["../../src/modularui/ModularUIRequest.js"],"sourcesContent":["// @flow\nimport deepmerge from \"deepmerge\";\n\nimport {\n BASE,\n HTTP_METHODS,\n TIMEVERSION_FILTER_NAME,\n} from \"../constants/Constants\";\n\nimport { HIDE_WHEN_EMPTY } from \"../constants/LayoutHints\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport Href from \"../models/href/Href\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport resolveModel from \"../models/resolveModel\";\nimport FormModel from \"../models/form/FormModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport ModularUIResponse from \"./ModularUIResponse\";\n\nimport ModularUIError from \"./ModularUIError\";\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport type { RequestBaseOptions } from \"../utils/fetch/types\";\nimport type { ModularUIModel } from \"../models/types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n */\nclass ModularUIRequest {\n _response: ModularUIResponse;\n\n _href: Href;\n _options: RequestBaseOptions;\n _targetModel: ?Class<ModularUIModel>;\n _contributionsHref: string;\n _locale: string;\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n\n _progressEvent: ProgressEventHandler;\n\n /**\n */\n constructor(href: Href | string, options: $Shape<RequestBaseOptions> = {}) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\"\n );\n }\n\n this.options = options;\n\n this._response = new ModularUIResponse();\n\n this.href = typeof href === \"string\" ? new Href(href) : href;\n this.locale = options.locale ?? \"en\";\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters;\n\n if (options.targetModel) {\n this.targetModel = options.targetModel;\n }\n\n if (options.method) {\n this.method = options.method;\n } else {\n this.method = this.href.method;\n }\n }\n\n /**\n */\n get contributionsHref(): string {\n return this._contributionsHref;\n }\n\n /**\n */\n set contributionsHref(contributionsHref: string) {\n this._contributionsHref = contributionsHref;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n get response(): ModularUIResponse {\n return this._response;\n }\n\n /**\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method;\n }\n\n /**\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n */\n get options(): RequestBaseOptions {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n /**\n */\n set options(options: RequestBaseOptions) {\n this._options = options;\n }\n\n /**\n */\n get withChildModels(): boolean {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n /**\n */\n set targetModel(targetModel: ?Class<ModularUIModel>) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get targetModel(): ?Class<ModularUIModel> {\n return this._targetModel;\n }\n\n /**\n */\n createModel(): ModularUIModel {\n const Model = this.targetModel || resolveModel(this.response);\n\n // check for ResourceModel\n if (Model && Model.isApplicableModel) {\n return new Model(this.response);\n }\n\n throw new IllegalStateException(\n `No model available for data: ${JSON.stringify(this.response)}`\n );\n }\n\n /**\n */\n processContributionsService(contributionsData: Object) {\n if (!isPlainObject(contributionsData)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\"\n );\n }\n\n const [contributionsKey] = Object.keys(contributionsData);\n\n if (contributionsData.error && contributionsKey === \"error\") {\n this.handleContributionsError(contributionsData.error);\n }\n\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsData)) {\n this.response.key = contributionsKey;\n }\n\n this.response.contributions = contributionsData[this.response.key];\n }\n\n /**\n */\n handleContributionsError(error: Object) {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n /**\n */\n handleDataError(error: Object) {\n if (error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(errorMessage, error, this.href.path.toString());\n }\n\n throw new IllegalArgumentException(error);\n }\n\n /**\n */\n handleData(key: string, data: Object) {\n this.response.key = key;\n this.response.data = data;\n\n const links = data._links;\n\n if (links && links.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`\n );\n }\n }\n\n /**\n */\n processDataService(data: Object) {\n if (!isPlainObject(data)) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n if (data.error) {\n this.handleDataError(data.error);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, data[key]);\n }\n }\n\n /**\n */\n fetchContributionsService(): Promise<any> {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${BASE}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n /**\n */\n fetchDataService(): Promise<any> {\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n /**\n * Check if links contain a 'hide-when-empty' layout hint and remove the link from\n * the component when it exists and no results are available\n */\n async processAsyncLayoutHints(): Promise<void> {\n if (getSetting(\"ALLOW_HIDE_WHEN_EMPTY_ON_TABS\")) {\n await this.processApplicationLinks();\n await this.processTabLinks();\n }\n await this.processPanelLinks();\n\n return Promise.resolve();\n }\n\n /**\n * hide application links<br>\n * _links on application data contains an extra level of tab links\n */\n processApplicationLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n const dataLinks = this.response.data._links;\n if (!contributionLinks || !dataLinks) {\n return Promise.resolve();\n }\n\n if (\"tab\" in contributionLinks && \"tab\" in dataLinks) {\n for (const contributionTabLink of contributionLinks.tab) {\n if (\"components\" in contributionTabLink) {\n const dataTabLinks = dataLinks.tab.find(\n (dataLink) => dataLink.name === contributionTabLink.name\n );\n\n if (dataTabLinks && \"components\" in dataTabLinks) {\n return this.processLinks(\n dataTabLinks.components,\n contributionTabLink.components\n ).then((newLinks) =>\n this.replaceApplicationLinks(contributionTabLink.name, newLinks)\n );\n }\n }\n }\n }\n\n return Promise.resolve();\n }\n\n /**\n * Replace hidden link in application link tree\n */\n replaceApplicationLinks(tabName: string, newLinks: Array<Object>): void {\n this.response.data._links.tab = this.response.data._links.tab.map(\n (tabLink) => {\n const key = tabLink.name;\n if (tabName === key) {\n tabLink.components = newLinks;\n }\n return tabLink;\n }\n );\n }\n\n /**\n */\n processTabLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"component\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links.component,\n contributionLinks.component\n ).then((newLinks) => {\n this.response.data._links.component = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n */\n processPanelLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"panel\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links,\n contributionLinks.panel\n ).then((newLinks) => {\n this.response.data._links = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Retrieve an object of key: link\n */\n dataLinksPerName(dataLinks: any): { [linkName: string]: any } {\n if (Array.isArray(dataLinks)) {\n const links = {};\n for (const dataLink of dataLinks) {\n links[dataLink.name] = dataLink;\n }\n return links;\n }\n return dataLinks;\n }\n\n /**\n * Check if links are empty and hide them when hide-when-empty hint exists\n */\n processLinks(\n dataLinks: any,\n contributionLinks: any\n ): Promise<Object | Array<Object>> {\n const linksPerName = this.dataLinksPerName(dataLinks);\n const hideWhenEmptyLinks = contributionLinks.filter((contributionLink) =>\n contributionLink.layouthint?.includes(HIDE_WHEN_EMPTY)\n );\n\n const isHiddenListChecks = [];\n\n for (const contributionLink of hideWhenEmptyLinks) {\n const dataLink = linksPerName[contributionLink.name];\n if (dataLink?.href) {\n isHiddenListChecks.push(\n this.isHiddenList(contributionLink.name, dataLink.href)\n );\n }\n }\n\n return Promise.all(isHiddenListChecks).then(\n (hiddenLinks: Array<string>) => {\n if (Array.isArray(dataLinks)) {\n return dataLinks.filter(\n (dataLink) => !hiddenLinks.includes(dataLink.name)\n );\n }\n\n const newDataLinks = {};\n for (const dataLinkKey in dataLinks) {\n if (!hiddenLinks.includes(dataLinkKey)) {\n newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];\n }\n }\n return newDataLinks;\n }\n );\n }\n\n /**\n */\n isHiddenList(name: string, href: string): Promise<string> {\n const HIDE_WHEN_EMPTY_IGNORE_TASKS = getSetting(\n \"HIDE_WHEN_EMPTY_IGNORE_TASKS\",\n false\n );\n\n return universalFetch({\n ...this.options,\n url: `${BASE}${href}`,\n })\n .then((response: Object) => {\n if (isPlainObject(response)) {\n const [key] = Object.keys(response);\n const { _embedded, actions } = response[key];\n\n const noListItems = _embedded === null;\n const noActions = actions == null || HIDE_WHEN_EMPTY_IGNORE_TASKS;\n\n const isHidden = noListItems && noActions;\n if (isHidden) {\n return name;\n }\n }\n return \"\";\n })\n .catch(() => {\n return \"\";\n });\n }\n\n /**\n */\n set onProgress(progressEvent: ProgressEventHandler) {\n this._progressEvent = progressEvent;\n }\n\n /**\n */\n get onProgress(): ProgressEventHandler {\n return this._progressEvent || null;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n getDynamicValidationData(model: ModularUIModel): string {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n // $FlowFixMe incompatible-call\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n loadDynamicValidations(model: ModularUIModel): Promise<ModularUIModel> {\n if (\n !this.options.isValidationRequest &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject &&\n model.currentFormObject.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n childmodels: false,\n data: this.getDynamicValidationData(model),\n }).then((data) => {\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const [key] = Object.keys(data);\n return model.updateValidations(data[key]);\n });\n }\n\n return Promise.resolve(model);\n }\n\n /**\n */\n fetch(): Promise<ModularUIModel> {\n return this.fetchDataService()\n .then((data) => {\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n return this.fetchContributionsService();\n })\n .then((contributionsData) => {\n if (contributionsData == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`\n );\n }\n\n this.processContributionsService(contributionsData);\n return this.processAsyncLayoutHints();\n })\n .then(() => Promise.resolve(this.createModel()))\n .then((model) => this.loadDynamicValidations(model))\n .then((model) => {\n if (this.withChildModels) {\n return this.fetchChildModels(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n */\n fetchFromCache(): Promise<ModularUIModel> {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n /**\n */\n fetchChildModels(model: ModularUIModel): Promise<ModularUIModel> {\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModelRequests = childModelLinks.map((childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n });\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.error(\n \"Unexpected error when retrieving child model:\",\n reason\n );\n }\n } else {\n resolvedChildModels.push(childModel.value);\n }\n });\n\n model.addChildModels(resolvedChildModels);\n\n return model;\n });\n }\n\n /**\n */\n fetchContent(withChildSections: boolean): Promise<mixed> {\n return this.fetchFromCache().then((model) => {\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n fetchContentChildSections(contentModel: ContentModel): Promise<mixed> {\n const newContentModel = contentModel.clone();\n\n return Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n })\n ).then((sectionModels) => {\n newContentModel.childSections = sectionModels;\n\n return newContentModel;\n });\n }\n\n /**\n * Make a post request with optionally data to send\n * @param data\n */\n post(data?: string | { [key: string]: string }): Promise<ModularUIModel> {\n this.method = HTTP_METHODS.POST;\n this.options = {\n ...this.options,\n data,\n };\n\n return this.fetch();\n }\n}\n\nexport default ModularUIRequest;\n"],"mappings":";;;;;;;;AACA,OAAOA,SAAS,MAAM,WAAW;AAEjC,SACEC,IAAI,EACJC,YAAY,EACZC,uBAAuB,QAClB,wBAAwB;AAE/B,SAASC,eAAe,QAAQ,0BAA0B;AAE1D,SAASC,UAAU,QAAQ,uBAAuB;AAElD,OAAOC,IAAI,MAAM,qBAAqB;AAEtC,OAAOC,cAAc,MAAM,+BAA+B;AAC1D,OAAOC,YAAY,MAAM,wBAAwB;AACjD,OAAOC,SAAS,MAAM,0BAA0B;AAChD,OAAOC,YAAY,MAAM,gCAAgC;AAEzD,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,wBAAwB,EAAEC,qBAAqB,QAAQ,eAAe;AAE/E,SAASC,aAAa,QAAQ,0BAA0B;AAKxD;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,CAAC;EAYrB;AACF;EACEC,WAAW,CAACC,IAAmB,EAA4C;IAAA,IAA1CC,OAAmC,uEAAG,CAAC,CAAC;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;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GAAG,IAAIlH,gBAAgB,CAACuI,wBAAwB,EAAE;QAC7DjI,MAAM,EAAE,IAAI,CAACA;MACf,CAAC,CAAC;MAEF,OAAO4G,OAAO,CAACY,YAAY,CAAC,IAAI,CAAC;IACnC,CAAC,CAAC,CACH,CAAC9D,IAAI,CAAE2E,aAAa,IAAK;MACxBP,eAAe,CAACQ,aAAa,GAAGD,aAAa;MAE7C,OAAOP,eAAe;IACxB,CAAC,CAAC;EACJ;;EAEA;AACF;AACA;AACA;EACES,IAAI,CAACxG,IAAyC,EAA2B;IACvE,IAAI,CAAC5B,MAAM,GAAGvB,YAAY,CAAC4J,IAAI;IAC/B,IAAI,CAAC3I,OAAO,GAAG;MACb,GAAG,IAAI,CAACA,OAAO;MACfkC;IACF,CAAC;IAED,OAAO,IAAI,CAACqE,KAAK,EAAE;EACrB;AACF;AAEA,eAAe1G,gBAAgB"}
@@ -1,115 +1,93 @@
1
1
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
2
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
3
3
  import { has } from "../utils/helpers/objects";
4
-
5
4
  /**
6
5
  */
7
6
  class ModularUIResponse {
8
7
  constructor() {
9
8
  _defineProperty(this, "_key", "unknown");
10
-
11
9
  _defineProperty(this, "_data", void 0);
12
-
13
10
  _defineProperty(this, "_contributions", void 0);
14
-
15
11
  _defineProperty(this, "_locale", "en");
16
-
17
12
  _defineProperty(this, "_parameters", []);
18
13
  }
19
-
20
14
  /**
21
15
  */
22
16
  static create(input) {
23
17
  const response = new ModularUIResponse();
24
-
25
18
  if (has(input, "data") && has(input, "contributions")) {
26
- var _input$key, _input$data, _input$contributions;
27
-
19
+ var _input$data, _input$contributions;
28
20
  const [dataKey] = _Object$keys(input.data);
29
-
30
21
  const [contributionsKey] = _Object$keys(input.contributions);
31
-
32
- response.key = (_input$key = input.key) !== null && _input$key !== void 0 ? _input$key : contributionsKey;
22
+ response.key = input.key ?? contributionsKey;
33
23
  response.data = (_input$data = input.data) === null || _input$data === void 0 ? void 0 : _input$data[dataKey];
34
24
  response.contributions = (_input$contributions = input.contributions) === null || _input$contributions === void 0 ? void 0 : _input$contributions[contributionsKey];
35
25
  }
36
-
37
26
  return response;
38
27
  }
28
+
39
29
  /**
40
30
  */
41
-
42
-
43
31
  set locale(locale) {
44
32
  this._locale = locale;
45
33
  }
34
+
46
35
  /**
47
36
  */
48
-
49
-
50
37
  get locale() {
51
38
  return this._locale;
52
39
  }
40
+
53
41
  /**
54
42
  */
55
-
56
-
57
43
  set key(key) {
58
44
  this._key = key;
59
45
  }
46
+
60
47
  /**
61
48
  */
62
-
63
-
64
49
  get key() {
65
50
  return this._key;
66
51
  }
52
+
67
53
  /**
68
54
  */
69
-
70
-
71
55
  set data(data) {
72
56
  this._data = data;
73
57
  }
58
+
74
59
  /**
75
60
  */
76
-
77
-
78
61
  get data() {
79
62
  return this._data;
80
63
  }
64
+
81
65
  /**
82
66
  */
83
-
84
-
85
67
  set contributions(contributions) {
86
68
  this._contributions = contributions;
87
69
  }
70
+
88
71
  /**
89
72
  */
90
-
91
-
92
73
  get contributions() {
93
74
  return this._contributions;
94
75
  }
76
+
95
77
  /**
96
78
  */
97
-
98
-
99
79
  set parameters(parameters) {
100
80
  this._parameters = parameters;
101
81
  }
82
+
102
83
  /**
103
84
  */
104
-
105
-
106
85
  get parameters() {
107
86
  return this._parameters;
108
87
  }
88
+
109
89
  /**
110
90
  */
111
-
112
-
113
91
  static rehydrate(data) {
114
92
  const modelData = new ModularUIResponse();
115
93
  modelData.locale = data.locale;
@@ -118,8 +96,6 @@ class ModularUIResponse {
118
96
  modelData.contributions = data.contributions;
119
97
  return modelData;
120
98
  }
121
-
122
99
  }
123
-
124
100
  export default ModularUIResponse;
125
101
  //# sourceMappingURL=ModularUIResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIResponse.js","names":["has","ModularUIResponse","create","input","response","dataKey","data","contributionsKey","contributions","key","locale","_locale","_key","_data","_contributions","parameters","_parameters","rehydrate","modelData"],"sources":["../../src/modularui/ModularUIResponse.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport type Parameter from \"../models/parameter/Parameter\";\n\n/**\n */\nclass ModularUIResponse {\n _key: string = \"unknown\";\n _data: Object;\n _contributions: Object;\n _locale: string = \"en\";\n _parameters: Array<Parameter> = [];\n\n /**\n */\n static create(input: {\n key: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const response = new ModularUIResponse();\n\n if (has(input, \"data\") && has(input, \"contributions\")) {\n const [dataKey] = Object.keys(input.data);\n const [contributionsKey] = Object.keys(input.contributions);\n\n response.key = input.key ?? contributionsKey;\n response.data = input.data?.[dataKey];\n response.contributions = input.contributions?.[contributionsKey];\n }\n\n return response;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n set key(key: string) {\n this._key = key;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n set data(data: Object) {\n this._data = data;\n }\n\n /**\n */\n get data(): Object {\n return this._data;\n }\n\n /**\n */\n set contributions(contributions: Object) {\n this._contributions = contributions;\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions;\n }\n\n /**\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n */\n static rehydrate(data: {\n key: string,\n locale: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const modelData = new ModularUIResponse();\n\n modelData.locale = data.locale;\n modelData.key = data.key;\n modelData.data = data.data;\n modelData.contributions = data.contributions;\n\n return modelData;\n }\n}\n\nexport default ModularUIResponse;\n"],"mappings":";;AACA,SAASA,GAAT,QAAoB,0BAApB;;AAIA;AACA;AACA,MAAMC,iBAAN,CAAwB;EAAA;IAAA,8BACP,SADO;;IAAA;;IAAA;;IAAA,iCAIJ,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AC1B,OAAO,KAAKM,cAAZ;EACD;EAED;AACF;;;EACgB,IAAVC,UAAU,CAACA,UAAD,EAA+B;IAC3C,KAAKC,WAAL,GAAmBD,UAAnB;EACD;EAED;AACF;;;EACgB,IAAVA,UAAU,GAAqB;IACjC,OAAO,KAAKC,WAAZ;EACD;EAED;AACF;;;EACkB,OAATC,SAAS,CAACX,IAAD,EAKM;IACpB,MAAMY,SAAS,GAAG,IAAIjB,iBAAJ,EAAlB;IAEAiB,SAAS,CAACR,MAAV,GAAmBJ,IAAI,CAACI,MAAxB;IACAQ,SAAS,CAACT,GAAV,GAAgBH,IAAI,CAACG,GAArB;IACAS,SAAS,CAACZ,IAAV,GAAiBA,IAAI,CAACA,IAAtB;IACAY,SAAS,CAACV,aAAV,GAA0BF,IAAI,CAACE,aAA/B;IAEA,OAAOU,SAAP;EACD;;AAxGqB;;AA2GxB,eAAejB,iBAAf"}
1
+ {"version":3,"file":"ModularUIResponse.js","names":["has","ModularUIResponse","create","input","response","dataKey","data","contributionsKey","contributions","key","locale","_locale","_key","_data","_contributions","parameters","_parameters","rehydrate","modelData"],"sources":["../../src/modularui/ModularUIResponse.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport type Parameter from \"../models/parameter/Parameter\";\n\n/**\n */\nclass ModularUIResponse {\n _key: string = \"unknown\";\n _data: Object;\n _contributions: Object;\n _locale: string = \"en\";\n _parameters: Array<Parameter> = [];\n\n /**\n */\n static create(input: {\n key: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const response = new ModularUIResponse();\n\n if (has(input, \"data\") && has(input, \"contributions\")) {\n const [dataKey] = Object.keys(input.data);\n const [contributionsKey] = Object.keys(input.contributions);\n\n response.key = input.key ?? contributionsKey;\n response.data = input.data?.[dataKey];\n response.contributions = input.contributions?.[contributionsKey];\n }\n\n return response;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n set key(key: string) {\n this._key = key;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n set data(data: Object) {\n this._data = data;\n }\n\n /**\n */\n get data(): Object {\n return this._data;\n }\n\n /**\n */\n set contributions(contributions: Object) {\n this._contributions = contributions;\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions;\n }\n\n /**\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n */\n static rehydrate(data: {\n key: string,\n locale: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const modelData = new ModularUIResponse();\n\n modelData.locale = data.locale;\n modelData.key = data.key;\n modelData.data = data.data;\n modelData.contributions = data.contributions;\n\n return modelData;\n }\n}\n\nexport default ModularUIResponse;\n"],"mappings":";;AACA,SAASA,GAAG,QAAQ,0BAA0B;AAI9C;AACA;AACA,MAAMC,iBAAiB,CAAC;EAAA;IAAA,8BACP,SAAS;IAAA;IAAA;IAAA,iCAGN,IAAI;IAAA,qCACU,EAAE;EAAA;EAElC;AACF;EACE,OAAOC,MAAM,CAACC,KAIb,EAAqB;IACpB,MAAMC,QAAQ,GAAG,IAAIH,iBAAiB,EAAE;IAExC,IAAID,GAAG,CAACG,KAAK,EAAE,MAAM,CAAC,IAAIH,GAAG,CAACG,KAAK,EAAE,eAAe,CAAC,EAAE;MAAA;MACrD,MAAM,CAACE,OAAO,CAAC,GAAG,aAAYF,KAAK,CAACG,IAAI,CAAC;MACzC,MAAM,CAACC,gBAAgB,CAAC,GAAG,aAAYJ,KAAK,CAACK,aAAa,CAAC;MAE3DJ,QAAQ,CAACK,GAAG,GAAGN,KAAK,CAACM,GAAG,IAAIF,gBAAgB;MAC5CH,QAAQ,CAACE,IAAI,kBAAGH,KAAK,CAACG,IAAI,gDAAV,YAAaD,OAAO,CAAC;MACrCD,QAAQ,CAACI,aAAa,2BAAGL,KAAK,CAACK,aAAa,yDAAnB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AAejB,iBAAiB"}
@@ -1,3 +1,4 @@
1
+
1
2
  export { default as Authenticate } from "./Authenticate";
2
3
  export { default as ModularUIRequest } from "./ModularUIRequest";
3
4
  export { default as ModularUIResponse } from "./ModularUIResponse";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","Authenticate","ModularUIRequest","ModularUIResponse"],"sources":["../../src/modularui/index.js"],"sourcesContent":["// @flow\nexport { default as Authenticate } from \"./Authenticate\";\nexport { default as ModularUIRequest } from \"./ModularUIRequest\";\nexport { default as ModularUIResponse } from \"./ModularUIResponse\";\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,YAApB,QAAwC,gBAAxC;AACA,SAASD,OAAO,IAAIE,gBAApB,QAA4C,oBAA5C;AACA,SAASF,OAAO,IAAIG,iBAApB,QAA6C,qBAA7C"}
1
+ {"version":3,"file":"index.js","names":["default","Authenticate","ModularUIRequest","ModularUIResponse"],"sources":["../../src/modularui/index.js"],"sourcesContent":["// @flow\nexport { default as Authenticate } from \"./Authenticate\";\nexport { default as ModularUIRequest } from \"./ModularUIRequest\";\nexport { default as ModularUIResponse } from \"./ModularUIResponse\";\n"],"mappings":";AACA,SAASA,OAAO,IAAIC,YAAY,QAAQ,gBAAgB;AACxD,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,oBAAoB;AAChE,SAASF,OAAO,IAAIG,iBAAiB,QAAQ,qBAAqB"}
@@ -2,19 +2,16 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
2
2
  import { Component } from "react";
3
3
  import ErrorBoundaryFallback from "./ErrorBoundaryFallback";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
-
6
5
  /**
7
6
  */
8
7
  class ErrorBoundary extends Component {
9
8
  constructor() {
10
9
  super(...arguments);
11
-
12
10
  _defineProperty(this, "state", {
13
11
  error: null,
14
12
  errorInfo: null
15
13
  });
16
14
  }
17
-
18
15
  /**
19
16
  */
20
17
  componentDidCatch(error, errorInfo) {
@@ -23,37 +20,30 @@ class ErrorBoundary extends Component {
23
20
  errorInfo
24
21
  });
25
22
  }
23
+
26
24
  /**
27
25
  */
28
-
29
-
30
26
  render() {
31
27
  const {
32
28
  children,
33
29
  FallbackComponent
34
30
  } = this.props; // NOSONAR
35
-
36
31
  const {
37
32
  error,
38
33
  errorInfo
39
34
  } = this.state;
40
-
41
35
  if (error != null) {
42
36
  return /*#__PURE__*/_jsx(FallbackComponent, {
43
37
  componentStack: errorInfo ? errorInfo.componentStack : "",
44
38
  error: error
45
39
  });
46
40
  }
47
-
48
- return children !== null && children !== void 0 ? children : null;
41
+ return children ?? null;
49
42
  }
50
-
51
43
  }
52
-
53
44
  _defineProperty(ErrorBoundary, "defaultProps", {
54
45
  FallbackComponent: ErrorBoundaryFallback
55
46
  });
56
-
57
47
  ErrorBoundary.displayName = "BI.ErrorBoundary";
58
48
  export default ErrorBoundary;
59
49
  //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","names":["Component","ErrorBoundaryFallback","ErrorBoundary","error","errorInfo","componentDidCatch","setState","render","children","FallbackComponent","props","state","componentStack","displayName"],"sources":["../../src/react/ErrorBoundary.js"],"sourcesContent":["// @flow\nimport { Component } from \"react\";\n\nimport ErrorBoundaryFallback from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Props as FallbackProps } from \"./ErrorBoundaryFallback\";\nexport type Props = {\n +children: ?Node,\n +FallbackComponent: ComponentType<FallbackProps>,\n};\n\ntype ErrorInfo = {\n componentStack: string,\n ...\n};\n\ntype State = {\n error: ?Error,\n errorInfo: ?ErrorInfo,\n};\n\n/**\n */\nclass ErrorBoundary extends Component<Props, State> {\n static defaultProps: { FallbackComponent: ComponentType<FallbackProps> } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n state: State = {\n error: null,\n errorInfo: null,\n };\n\n /**\n */\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n /**\n */\n render(): Node {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n\nexport default ErrorBoundary;\n"],"mappings":";AACA,SAASA,SAAT,QAA0B,OAA1B;AAEA,OAAOC,qBAAP,MAAkC,yBAAlC;;;AAmBA;AACA;AACA,MAAMC,aAAN,SAA4BF,SAA5B,CAAoD;EAAA;IAAA;;IAAA,+BAKnC;MACbG,KAAK,EAAE,IADM;MAEbC,SAAS,EAAE;IAFE,CALmC;EAAA;;EAUlD;AACF;EACEC,iBAAiB,CAACF,KAAD,EAAeC,SAAf,EAA2C;IAC1D,KAAKE,QAAL,CAAc;MAAEH,KAAF;MAASC;IAAT,CAAd;EACD;EAED;AACF;;;EACEG,MAAM,GAAS;IACb,MAAM;MAAEC,QAAF;MAAYC;IAAZ,IAAkC,KAAKC,KAA7C,CADa,CACuC;;IACpD,MAAM;MAAEP,KAAF;MAASC;IAAT,IAAuB,KAAKO,KAAlC;;IAEA,IAAIR,KAAK,IAAI,IAAb,EAAmB;MACjB,oBACE,KAAC,iBAAD;QACE,cAAc,EAAEC,SAAS,GAAGA,SAAS,CAACQ,cAAb,GAA8B,EADzD;QAEE,KAAK,EAAET;MAFT,EADF;IAMD;;IAED,OAAOK,QAAP,aAAOA,QAAP,cAAOA,QAAP,GAAmB,IAAnB;EACD;;AAhCiD;;gBAA9CN,a,kBACuE;EACzEO,iBAAiB,EAAER;AADsD,C;;AAiC7EC,aAAa,CAACW,WAAd,GAA4B,kBAA5B;AAEA,eAAeX,aAAf"}
1
+ {"version":3,"file":"ErrorBoundary.js","names":["Component","ErrorBoundaryFallback","ErrorBoundary","error","errorInfo","componentDidCatch","setState","render","children","FallbackComponent","props","state","componentStack","displayName"],"sources":["../../src/react/ErrorBoundary.js"],"sourcesContent":["// @flow\nimport { Component } from \"react\";\n\nimport ErrorBoundaryFallback from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Props as FallbackProps } from \"./ErrorBoundaryFallback\";\nexport type Props = {\n +children: ?Node,\n +FallbackComponent: ComponentType<FallbackProps>,\n};\n\ntype ErrorInfo = {\n componentStack: string,\n ...\n};\n\ntype State = {\n error: ?Error,\n errorInfo: ?ErrorInfo,\n};\n\n/**\n */\nclass ErrorBoundary extends Component<Props, State> {\n static defaultProps: { FallbackComponent: ComponentType<FallbackProps> } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n state: State = {\n error: null,\n errorInfo: null,\n };\n\n /**\n */\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n /**\n */\n render(): Node {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n\nexport default ErrorBoundary;\n"],"mappings":";AACA,SAASA,SAAS,QAAQ,OAAO;AAEjC,OAAOC,qBAAqB,MAAM,yBAAyB;AAAC;AAmB5D;AACA;AACA,MAAMC,aAAa,SAASF,SAAS,CAAe;EAAA;IAAA;IAAA,+BAKnC;MACbG,KAAK,EAAE,IAAI;MACXC,SAAS,EAAE;IACb,CAAC;EAAA;EAED;AACF;EACEC,iBAAiB,CAACF,KAAY,EAAEC,SAAoB,EAAQ;IAC1D,IAAI,CAACE,QAAQ,CAAC;MAAEH,KAAK;MAAEC;IAAU,CAAC,CAAC;EACrC;;EAEA;AACF;EACEG,MAAM,GAAS;IACb,MAAM;MAAEC,QAAQ;MAAEC;IAAkB,CAAC,GAAG,IAAI,CAACC,KAAK,CAAC,CAAC;IACpD,MAAM;MAAEP,KAAK;MAAEC;IAAU,CAAC,GAAG,IAAI,CAACO,KAAK;IAEvC,IAAIR,KAAK,IAAI,IAAI,EAAE;MACjB,oBACE,KAAC,iBAAiB;QAChB,cAAc,EAAEC,SAAS,GAAGA,SAAS,CAACQ,cAAc,GAAG,EAAG;QAC1D,KAAK,EAAET;MAAM,EACb;IAEN;IAEA,OAAOK,QAAQ,IAAI,IAAI;EACzB;AACF;AAAC,gBAjCKN,aAAa,kBAC0D;EACzEO,iBAAiB,EAAER;AACrB,CAAC;AA+BHC,aAAa,CAACW,WAAW,GAAG,kBAAkB;AAE9C,eAAeX,aAAa"}
@@ -1,3 +1,4 @@
1
+
1
2
  import styled from "styled-components";
2
3
  import { spacers, spacer } from "../react-theme/utils/spacers";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -8,9 +9,9 @@ const StyledBoundary = /*#__PURE__*/styled.div.withConfig({
8
9
  const StyledStack = /*#__PURE__*/styled.pre.withConfig({
9
10
  componentId: "sc-xsbtpo-1"
10
11
  })(["display:block;font-size:87.5%;color:#212529;font-style:italic;"]);
12
+
11
13
  /**
12
14
  */
13
-
14
15
  const ErrorBoundaryFallback = _ref => {
15
16
  let {
16
17
  className,
@@ -27,7 +28,6 @@ const ErrorBoundaryFallback = _ref => {
27
28
  })]
28
29
  });
29
30
  };
30
-
31
31
  ErrorBoundaryFallback.displayName = "BI.ErrorBoundaryFallback";
32
32
  export default ErrorBoundaryFallback;
33
33
  //# sourceMappingURL=ErrorBoundaryFallback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundaryFallback.js","names":["styled","spacers","spacer","StyledBoundary","div","StyledStack","pre","ErrorBoundaryFallback","className","componentStack","error","toString","displayName"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":"AACA,OAAOA,MAAP,MAAmB,mBAAnB;AACA,SAASC,OAAT,EAAkBC,MAAlB,QAAgC,8BAAhC;;;AAYA,MAAMC,cAA6C,gBAAGH,MAAM,CAACI,GAAV;EAAA;AAAA,sFACtCH,OAAO,CAAC,CAAD,EAAI,CAAJ,CAD+B,EAEhCC,MAAM,CAAC,CAAD,CAF0B,CAAnD;AAOA,MAAMG,WAAW,gBAAGL,MAAM,CAACM,GAAV;EAAA;AAAA,sEAAjB;AAOA;AACA;;AACA,MAAMC,qBAAqB,GAAG;EAAA,IAAC;IAC7BC,SAD6B;IAE7BC,cAF6B;IAG7BC;EAH6B,CAAD;EAAA,oBAK5B,MAAC,cAAD;IAAgB,SAAS,EAAEF,SAA3B;IAAA,wBACE;MAAA,UAAKE,KAAK,CAACC,QAAN;IAAL,EADF,eAEE,KAAC,WAAD;MAAa,SAAS,EAAC,OAAvB;MAAA,UAAgCF;IAAhC,EAFF;EAAA,EAL4B;AAAA,CAA9B;;AAWAF,qBAAqB,CAACK,WAAtB,GAAoC,0BAApC;AAEA,eAAeL,qBAAf"}
1
+ {"version":3,"file":"ErrorBoundaryFallback.js","names":["styled","spacers","spacer","StyledBoundary","div","StyledStack","pre","ErrorBoundaryFallback","className","componentStack","error","toString","displayName"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":";AACA,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,OAAO,EAAEC,MAAM,QAAQ,8BAA8B;AAAC;AAAA;AAY/D,MAAMC,cAA6C,gBAAGH,MAAM,CAACI,GAAG;EAAA;AAAA,sFACnDH,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EACPC,MAAM,CAAC,CAAC,CAAC,CAG3B;AAED,MAAMG,WAAW,gBAAGL,MAAM,CAACM,GAAG;EAAA;AAAA,sEAK7B;;AAED;AACA;AACA,MAAMC,qBAAqB,GAAG;EAAA,IAAC;IAC7BC,SAAS;IACTC,cAAc;IACdC;EACK,CAAC;EAAA,oBACN,MAAC,cAAc;IAAC,SAAS,EAAEF,SAAU;IAAA,wBACnC;MAAA,UAAKE,KAAK,CAACC,QAAQ;IAAE,EAAM,eAC3B,KAAC,WAAW;MAAC,SAAS,EAAC,OAAO;MAAA,UAAEF;IAAc,EAAe;EAAA,EAC9C;AAAA,CAClB;AAEDF,qBAAqB,CAACK,WAAW,GAAG,0BAA0B;AAE9D,eAAeL,qBAAqB"}
@@ -1,3 +1,4 @@
1
+
1
2
  export * from "./utils";
2
3
  export * from "../hooks";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/react/index.js"],"sourcesContent":["// @flow\nexport * from \"./utils\";\nexport * from \"../hooks\";\n"],"mappings":"AACA,cAAc,SAAd;AACA,cAAc,UAAd"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/react/index.js"],"sourcesContent":["// @flow\nexport * from \"./utils\";\nexport * from \"../hooks\";\n"],"mappings":";AACA,cAAc,SAAS;AACvB,cAAc,UAAU"}
@@ -1,4 +1,4 @@
1
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
1
+
2
2
 
3
3
  /**
4
4
  */
@@ -6,18 +6,14 @@ export const getDisplayName = function (WrappedComponent) {
6
6
  let defaultName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Component";
7
7
  let contextId = arguments.length > 2 ? arguments[2] : undefined;
8
8
  const componentName = WrappedComponent.displayName || WrappedComponent.name || defaultName;
9
-
10
9
  if (contextId) {
11
- var _context;
12
-
13
- return _concatInstanceProperty(_context = "".concat(componentName, "[")).call(_context, contextId, "]");
10
+ return `${componentName}[${contextId}]`;
14
11
  }
15
-
16
12
  return componentName;
17
13
  };
14
+
18
15
  /**
19
16
  */
20
-
21
17
  export const mergeRefs = refs => value => {
22
18
  refs.forEach(ref => {
23
19
  if (typeof ref === "function") {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","contextId","componentName","displayName","name","mergeRefs","refs","value","forEach","ref","current"],"sources":["../../src/react/utils.js"],"sourcesContent":["// @flow\nimport type { ComponentType, Ref } from \"react\";\n\n/**\n */\nexport const getDisplayName = (\n WrappedComponent: ComponentType<any>,\n defaultName: string = \"Component\",\n contextId?: string\n): string => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\n/**\n */\nexport const mergeRefs =\n <T: any>(refs: Array<Ref<T>>): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n ref.current = value;\n }\n });\n };\n"],"mappings":";;AAGA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,UAC5BC,gBAD4B,EAIjB;EAAA,IAFXC,WAEW,uEAFW,WAEX;EAAA,IADXC,SACW;EACX,MAAMC,aAAa,GACjBH,gBAAgB,CAACI,WAAjB,IAAgCJ,gBAAgB,CAACK,IAAjD,IAAyDJ,WAD3D;;EAGA,IAAIC,SAAJ,EAAe;IAAA;;IACb,oDAAUC,aAAV,uBAA2BD,SAA3B;EACD;;EAED,OAAOC,aAAP;AACD,CAbM;AAeP;AACA;;AACA,OAAO,MAAMG,SAAS,GACXC,IAAT,IACCC,KAAD,IAAW;EACTD,IAAI,CAACE,OAAL,CAAcC,GAAD,IAAS;IACpB,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;MAC7BA,GAAG,CAACF,KAAD,CAAH;IACD,CAFD,MAEO,IAAIE,GAAG,IAAI,IAAP,IAAe,OAAOA,GAAP,KAAe,QAAlC,EAA4C;MACjDA,GAAG,CAACC,OAAJ,GAAcH,KAAd;IACD;EACF,CAND;AAOD,CAVI"}
1
+ {"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","contextId","componentName","displayName","name","mergeRefs","refs","value","forEach","ref","current"],"sources":["../../src/react/utils.js"],"sourcesContent":["// @flow\nimport type { ComponentType, Ref } from \"react\";\n\n/**\n */\nexport const getDisplayName = (\n WrappedComponent: ComponentType<any>,\n defaultName: string = \"Component\",\n contextId?: string\n): string => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\n/**\n */\nexport const mergeRefs =\n <T: any>(refs: Array<Ref<T>>): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n ref.current = value;\n }\n });\n };\n"],"mappings":";;AAGA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,UAC5BC,gBAAoC,EAGzB;EAAA,IAFXC,WAAmB,uEAAG,WAAW;EAAA,IACjCC,SAAkB;EAElB,MAAMC,aAAa,GACjBH,gBAAgB,CAACI,WAAW,IAAIJ,gBAAgB,CAACK,IAAI,IAAIJ,WAAW;EAEtE,IAAIC,SAAS,EAAE;IACb,OAAQ,GAAEC,aAAc,IAAGD,SAAU,GAAE;EACzC;EAEA,OAAOC,aAAa;AACtB,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,SAAS,GACXC,IAAmB,IAC3BC,KAAK,IAAK;EACTD,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACF,KAAK,CAAC;IACZ,CAAC,MAAM,IAAIE,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MACjDA,GAAG,CAACC,OAAO,GAAGH,KAAK;IACrB;EACF,CAAC,CAAC;AACJ,CAAC"}
@@ -1,10 +1,10 @@
1
+
1
2
  import { Provider } from "react-redux";
2
3
  import { HelmetProvider } from "react-helmet-async";
3
4
  import { Router } from "react-router";
4
5
  import ThemeProvider from "../react-theme/ThemeProvider";
5
6
  import ErrorBoundary from "../react/ErrorBoundary";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
-
8
8
  /**
9
9
  */
10
10
  const Init = _ref => {
@@ -33,7 +33,6 @@ const Init = _ref => {
33
33
  })
34
34
  });
35
35
  };
36
-
37
36
  Init.displayName = "BI.Init";
38
37
  export default Init;
39
38
  //# sourceMappingURL=Init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Init.js","names":["Provider","HelmetProvider","Router","ThemeProvider","ErrorBoundary","Init","store","history","contextPath","theme","children","ErrorFallbackComponent","displayName"],"sources":["../../src/react-client/Init.js"],"sourcesContent":["// @flow\nimport { Provider } from \"react-redux\";\nimport { HelmetProvider } from \"react-helmet-async\";\nimport { Router } from \"react-router\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { RouterHistory } from \"react-router\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\nexport type Props = {\n +store: ReduxStore,\n +history: RouterHistory,\n +contextPath: string,\n +theme?: Theme | Array<Theme>,\n +children: ?Node,\n +ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/**\n */\nconst Init = ({\n store,\n history,\n contextPath,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): Node => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={history} basename={contextPath}>\n {children}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\n\nInit.displayName = \"BI.Init\";\n\nexport default Init;\n"],"mappings":"AACA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,cAAT,QAA+B,oBAA/B;AACA,SAASC,MAAT,QAAuB,cAAvB;AAEA,OAAOC,aAAP,MAA0B,8BAA1B;AACA,OAAOC,aAAP,MAA0B,wBAA1B;;;AAiBA;AACA;AACA,MAAMC,IAAI,GAAG;EAAA,IAAC;IACZC,KADY;IAEZC,OAFY;IAGZC,WAHY;IAIZC,KAJY;IAKZC,QALY;IAMZC;EANY,CAAD;EAAA,oBAQX,KAAC,QAAD;IAAU,KAAK,EAAEL,KAAjB;IAAA,uBACE,KAAC,aAAD;MAAe,KAAK,EAAEG,KAAtB;MAAA,uBACE,KAAC,cAAD;QAAA,uBACE,KAAC,aAAD;UAAe,iBAAiB,EAAEE,sBAAlC;UAAA,uBACE,KAAC,MAAD;YAAQ,OAAO,EAAEJ,OAAjB;YAA0B,QAAQ,EAAEC,WAApC;YAAA,UACGE;UADH;QADF;MADF;IADF;EADF,EARW;AAAA,CAAb;;AAqBAL,IAAI,CAACO,WAAL,GAAmB,SAAnB;AAEA,eAAeP,IAAf"}
1
+ {"version":3,"file":"Init.js","names":["Provider","HelmetProvider","Router","ThemeProvider","ErrorBoundary","Init","store","history","contextPath","theme","children","ErrorFallbackComponent","displayName"],"sources":["../../src/react-client/Init.js"],"sourcesContent":["// @flow\nimport { Provider } from \"react-redux\";\nimport { HelmetProvider } from \"react-helmet-async\";\nimport { Router } from \"react-router\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { RouterHistory } from \"react-router\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\nexport type Props = {\n +store: ReduxStore,\n +history: RouterHistory,\n +contextPath: string,\n +theme?: Theme | Array<Theme>,\n +children: ?Node,\n +ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/**\n */\nconst Init = ({\n store,\n history,\n contextPath,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): Node => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={history} basename={contextPath}>\n {children}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\n\nInit.displayName = \"BI.Init\";\n\nexport default Init;\n"],"mappings":";AACA,SAASA,QAAQ,QAAQ,aAAa;AACtC,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,MAAM,QAAQ,cAAc;AAErC,OAAOC,aAAa,MAAM,8BAA8B;AACxD,OAAOC,aAAa,MAAM,wBAAwB;AAAC;AAiBnD;AACA;AACA,MAAMC,IAAI,GAAG;EAAA,IAAC;IACZC,KAAK;IACLC,OAAO;IACPC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC;EACK,CAAC;EAAA,oBACN,KAAC,QAAQ;IAAC,KAAK,EAAEL,KAAM;IAAA,uBACrB,KAAC,aAAa;MAAC,KAAK,EAAEG,KAAM;MAAA,uBAC1B,KAAC,cAAc;QAAA,uBACb,KAAC,aAAa;UAAC,iBAAiB,EAAEE,sBAAuB;UAAA,uBACvD,KAAC,MAAM;YAAC,OAAO,EAAEJ,OAAQ;YAAC,QAAQ,EAAEC,WAAY;YAAA,UAC7CE;UAAQ;QACF;MACK;IACD;EACH,EACP;AAAA,CACZ;AAEDL,IAAI,CAACO,WAAW,GAAG,SAAS;AAE5B,eAAeP,IAAI"}