@beinformed/ui 1.20.8 → 1.20.9

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 (1093) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js +34 -59
  3. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  4. package/esm/constants/Constants.js +37 -37
  5. package/esm/constants/Constants.js.map +1 -1
  6. package/esm/constants/LayoutHintConfig.js +1 -1
  7. package/esm/constants/LayoutHintConfig.js.map +1 -1
  8. package/esm/constants/LayoutHints.js +20 -22
  9. package/esm/constants/LayoutHints.js.map +1 -1
  10. package/esm/constants/Settings.js +12 -26
  11. package/esm/constants/Settings.js.map +1 -1
  12. package/esm/exceptions/ConfigurationException.js +5 -27
  13. package/esm/exceptions/ConfigurationException.js.map +1 -1
  14. package/esm/exceptions/FetchException.js +33 -65
  15. package/esm/exceptions/FetchException.js.map +1 -1
  16. package/esm/exceptions/IllegalArgumentException.js +5 -27
  17. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  18. package/esm/exceptions/IllegalReturnException.js +5 -27
  19. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  20. package/esm/exceptions/IllegalStateException.js +5 -27
  21. package/esm/exceptions/IllegalStateException.js.map +1 -1
  22. package/esm/exceptions/JsonParseException.js +5 -27
  23. package/esm/exceptions/JsonParseException.js.map +1 -1
  24. package/esm/exceptions/MissingPropertyException.js +5 -27
  25. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  26. package/esm/exceptions/NetworkException.js +9 -31
  27. package/esm/exceptions/NetworkException.js.map +1 -1
  28. package/esm/exceptions/NotAllowedUriException.js +5 -27
  29. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  30. package/esm/exceptions/NotFoundException.js +12 -35
  31. package/esm/exceptions/NotFoundException.js.map +1 -1
  32. package/esm/exceptions/ServerRequestException.js +5 -27
  33. package/esm/exceptions/ServerRequestException.js.map +1 -1
  34. package/esm/exceptions/ThemePropertyException.js +5 -27
  35. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  36. package/esm/exceptions/TimeoutException.js +5 -26
  37. package/esm/exceptions/TimeoutException.js.map +1 -1
  38. package/esm/exceptions/UnauthorizedException.js +11 -33
  39. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  40. package/esm/exceptions/UnsupportedOperationException.js +5 -27
  41. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  42. package/esm/hooks/useAllFormsOnModel.js +25 -46
  43. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  44. package/esm/hooks/useAuthentication.js +20 -26
  45. package/esm/hooks/useAuthentication.js.map +1 -1
  46. package/esm/hooks/useContent.js +13 -24
  47. package/esm/hooks/useContent.js.map +1 -1
  48. package/esm/hooks/useDeepCompareEffect.js +3 -3
  49. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  50. package/esm/hooks/useForm.js +27 -45
  51. package/esm/hooks/useForm.js.map +1 -1
  52. package/esm/hooks/useI18n.js +9 -19
  53. package/esm/hooks/useI18n.js.map +1 -1
  54. package/esm/hooks/useModal.js +11 -11
  55. package/esm/hooks/useModal.js.map +1 -1
  56. package/esm/hooks/useModelCatalog.js +24 -30
  57. package/esm/hooks/useModelCatalog.js.map +1 -1
  58. package/esm/hooks/useModels.js +3 -3
  59. package/esm/hooks/useModels.js.map +1 -1
  60. package/esm/hooks/useModularUI.js +17 -16
  61. package/esm/hooks/useModularUI.js.map +1 -1
  62. package/esm/hooks/useModularUIBasic.js +9 -7
  63. package/esm/hooks/useModularUIBasic.js.map +1 -1
  64. package/esm/hooks/useModularUIModel.js +39 -59
  65. package/esm/hooks/useModularUIModel.js.map +1 -1
  66. package/esm/hooks/useModularUIRequest.js +4 -6
  67. package/esm/hooks/useModularUIRequest.js.map +1 -1
  68. package/esm/hooks/useNotification.js +16 -21
  69. package/esm/hooks/useNotification.js.map +1 -1
  70. package/esm/hooks/usePreference.js +3 -5
  71. package/esm/hooks/usePreference.js.map +1 -1
  72. package/esm/hooks/useProgressIndicator.js +9 -30
  73. package/esm/hooks/useProgressIndicator.js.map +1 -1
  74. package/esm/hooks/useRouter.js +12 -26
  75. package/esm/hooks/useRouter.js.map +1 -1
  76. package/esm/i18n/Locale.js +96 -135
  77. package/esm/i18n/Locale.js.map +1 -1
  78. package/esm/i18n/Locales.js +94 -148
  79. package/esm/i18n/Locales.js.map +1 -1
  80. package/esm/i18n/Message.js +13 -24
  81. package/esm/i18n/Message.js.map +1 -1
  82. package/esm/i18n/languages.js +1 -1
  83. package/esm/i18n/languages.js.map +1 -1
  84. package/esm/i18n/withMessage.js +10 -16
  85. package/esm/i18n/withMessage.js.map +1 -1
  86. package/esm/models/actions/ActionCollection.js +55 -100
  87. package/esm/models/actions/ActionCollection.js.map +1 -1
  88. package/esm/models/actions/ActionModel.js +165 -204
  89. package/esm/models/actions/ActionModel.js.map +1 -1
  90. package/esm/models/application/ApplicationModel.js +104 -153
  91. package/esm/models/application/ApplicationModel.js.map +1 -1
  92. package/esm/models/attributes/AttributeCollection.js +246 -331
  93. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  94. package/esm/models/attributes/AttributeContent.js +181 -246
  95. package/esm/models/attributes/AttributeContent.js.map +1 -1
  96. package/esm/models/attributes/AttributeDataHelper.js +202 -250
  97. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  98. package/esm/models/attributes/AttributeModel.js +832 -941
  99. package/esm/models/attributes/AttributeModel.js.map +1 -1
  100. package/esm/models/attributes/AttributeSetModel.js +46 -77
  101. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  102. package/esm/models/attributes/BooleanAttributeModel.js +259 -325
  103. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  104. package/esm/models/attributes/CaptchaAttributeModel.js +24 -55
  105. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  106. package/esm/models/attributes/ChoiceAttributeModel.js +337 -424
  107. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  108. package/esm/models/attributes/ChoiceAttributeOptionCollection.js +271 -361
  109. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  110. package/esm/models/attributes/ChoiceAttributeOptionModel.js +297 -351
  111. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  112. package/esm/models/attributes/CompositeAttributeChildCollection.js +180 -257
  113. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  114. package/esm/models/attributes/CompositeAttributeModel.js +326 -401
  115. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  116. package/esm/models/attributes/DatetimeAttributeModel.js +368 -419
  117. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  118. package/esm/models/attributes/HelptextAttributeModel.js +38 -70
  119. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  120. package/esm/models/attributes/LabelAttributeModel.js +23 -54
  121. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  122. package/esm/models/attributes/MemoAttributeModel.js +31 -63
  123. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  124. package/esm/models/attributes/MoneyAttributeModel.js +30 -62
  125. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  126. package/esm/models/attributes/NumberAttributeModel.js +178 -225
  127. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  128. package/esm/models/attributes/PasswordAttributeModel.js +197 -246
  129. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  130. package/esm/models/attributes/StringAttributeModel.js +234 -282
  131. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  132. package/esm/models/attributes/UploadAttributeModel.js +181 -238
  133. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  134. package/esm/models/attributes/XMLAttributeModel.js +32 -64
  135. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  136. package/esm/models/attributes/_createAttribute.js +21 -36
  137. package/esm/models/attributes/_createAttribute.js.map +1 -1
  138. package/esm/models/attributes/input-constraints/BSNConstraint.js +63 -81
  139. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  140. package/esm/models/attributes/input-constraints/ConstraintCollection.js +29 -66
  141. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  142. package/esm/models/attributes/input-constraints/ConstraintModel.js +44 -59
  143. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  144. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js +170 -192
  145. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  146. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +52 -67
  147. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  148. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +52 -67
  149. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  150. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js +66 -83
  151. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  152. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js +53 -69
  153. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  154. package/esm/models/attributes/input-constraints/FileSizeConstraint.js +78 -94
  155. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  156. package/esm/models/attributes/input-constraints/IBANConstraint.js +35 -51
  157. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  158. package/esm/models/attributes/input-constraints/MandatoryConstraint.js +39 -57
  159. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  160. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js +62 -81
  161. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  162. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js +149 -171
  163. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  164. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js +104 -124
  165. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  166. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js +91 -113
  167. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  168. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js +58 -73
  169. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  170. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +35 -52
  171. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  172. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +51 -65
  173. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  174. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +51 -65
  175. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  176. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +65 -83
  177. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  178. package/esm/models/attributes/input-constraints/RangeConstraint.js +115 -134
  179. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  180. package/esm/models/attributes/input-constraints/RegexConstraint.js +47 -61
  181. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  182. package/esm/models/attributes/input-constraints/StringLengthConstraint.js +157 -176
  183. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  184. package/esm/models/attributes/input-constraints/XMLConstraint.js +48 -66
  185. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  186. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +49 -64
  187. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  188. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +167 -209
  189. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  190. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +40 -68
  191. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  192. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +30 -59
  193. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  194. package/esm/models/base/BaseCollection.js +169 -203
  195. package/esm/models/base/BaseCollection.js.map +1 -1
  196. package/esm/models/base/BaseModel.js +97 -112
  197. package/esm/models/base/BaseModel.js.map +1 -1
  198. package/esm/models/base/ResourceCollection.js +27 -55
  199. package/esm/models/base/ResourceCollection.js.map +1 -1
  200. package/esm/models/base/ResourceModel.js +167 -217
  201. package/esm/models/base/ResourceModel.js.map +1 -1
  202. package/esm/models/caseview/CaseViewModel.js +132 -180
  203. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  204. package/esm/models/concepts/BusinessScenarioModel.js +98 -147
  205. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  206. package/esm/models/concepts/ConceptDetailModel.js +239 -316
  207. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  208. package/esm/models/concepts/ConceptIndexModel.js +114 -150
  209. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  210. package/esm/models/concepts/ConceptLinkModel.js +118 -158
  211. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  212. package/esm/models/concepts/ConceptRelationCollection.js +56 -103
  213. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  214. package/esm/models/concepts/ConceptRelationModel.js +60 -75
  215. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  216. package/esm/models/concepts/ConceptTypeDetailModel.js +89 -126
  217. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  218. package/esm/models/concepts/SourceReferenceCollection.js +11 -42
  219. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  220. package/esm/models/concepts/SourceReferenceModel.js +47 -70
  221. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  222. package/esm/models/content/ContentIndexModel.js +108 -150
  223. package/esm/models/content/ContentIndexModel.js.map +1 -1
  224. package/esm/models/content/ContentLinkModel.js +157 -199
  225. package/esm/models/content/ContentLinkModel.js.map +1 -1
  226. package/esm/models/content/ContentModel.js +184 -228
  227. package/esm/models/content/ContentModel.js.map +1 -1
  228. package/esm/models/content/ContentTOCModel.js +132 -196
  229. package/esm/models/content/ContentTOCModel.js.map +1 -1
  230. package/esm/models/content/ContentTypeModel.js +58 -93
  231. package/esm/models/content/ContentTypeModel.js.map +1 -1
  232. package/esm/models/content/SectionModel.js +161 -247
  233. package/esm/models/content/SectionModel.js.map +1 -1
  234. package/esm/models/content/SubSectionModel.js +122 -188
  235. package/esm/models/content/SubSectionModel.js.map +1 -1
  236. package/esm/models/contentconfiguration/ContentConfiguration.js +44 -58
  237. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  238. package/esm/models/contentconfiguration/ContentConfigurationElements.js +123 -162
  239. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  240. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js +24 -38
  241. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  242. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js +30 -41
  243. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  244. package/esm/models/contentconfiguration/ContentConfigurationResults.js +73 -95
  245. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  246. package/esm/models/detail/DetailModel.js +174 -225
  247. package/esm/models/detail/DetailModel.js.map +1 -1
  248. package/esm/models/error/ErrorCollection.js +79 -132
  249. package/esm/models/error/ErrorCollection.js.map +1 -1
  250. package/esm/models/error/ErrorModel.js +36 -48
  251. package/esm/models/error/ErrorModel.js.map +1 -1
  252. package/esm/models/error/ErrorResponse.js +175 -204
  253. package/esm/models/error/ErrorResponse.js.map +1 -1
  254. package/esm/models/filters/AssignmentFilterModel.js +142 -186
  255. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  256. package/esm/models/filters/BaseFilterModel.js +170 -220
  257. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  258. package/esm/models/filters/ConceptIndexFilterModel.js +8 -36
  259. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  260. package/esm/models/filters/FilterCollection.js +106 -165
  261. package/esm/models/filters/FilterCollection.js.map +1 -1
  262. package/esm/models/filters/FilterModel.js +1 -26
  263. package/esm/models/filters/FilterModel.js.map +1 -1
  264. package/esm/models/filters/RangeFilterModel.js +29 -58
  265. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  266. package/esm/models/form/FormModel.js +957 -1133
  267. package/esm/models/form/FormModel.js.map +1 -1
  268. package/esm/models/form/FormObjectModel.js +412 -506
  269. package/esm/models/form/FormObjectModel.js.map +1 -1
  270. package/esm/models/grouping/GroupingModel.js +115 -163
  271. package/esm/models/grouping/GroupingModel.js.map +1 -1
  272. package/esm/models/href/Href.js +391 -450
  273. package/esm/models/href/Href.js.map +1 -1
  274. package/esm/models/href/ListHref.js +116 -155
  275. package/esm/models/href/ListHref.js.map +1 -1
  276. package/esm/models/layouthint/LayoutHintCollection.js +91 -136
  277. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  278. package/esm/models/links/LinkCollection.js +127 -185
  279. package/esm/models/links/LinkCollection.js.map +1 -1
  280. package/esm/models/links/LinkModel.js +189 -228
  281. package/esm/models/links/LinkModel.js.map +1 -1
  282. package/esm/models/links/normalizeLinkJSON.js +30 -57
  283. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  284. package/esm/models/list/ListDetailModel.js +226 -289
  285. package/esm/models/list/ListDetailModel.js.map +1 -1
  286. package/esm/models/list/ListHeaderModel.js +74 -97
  287. package/esm/models/list/ListHeaderModel.js.map +1 -1
  288. package/esm/models/list/ListItemCollection.js +49 -85
  289. package/esm/models/list/ListItemCollection.js.map +1 -1
  290. package/esm/models/list/ListItemModel.js +73 -110
  291. package/esm/models/list/ListItemModel.js.map +1 -1
  292. package/esm/models/list/ListModel.js +342 -421
  293. package/esm/models/list/ListModel.js.map +1 -1
  294. package/esm/models/lookup/LookupOptionCollection.js +15 -51
  295. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  296. package/esm/models/lookup/LookupOptionsModel.js +42 -71
  297. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  298. package/esm/models/modelcatalog/ModelCatalogModel.js +35 -67
  299. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  300. package/esm/models/paging/PagesizeModel.js +31 -42
  301. package/esm/models/paging/PagesizeModel.js.map +1 -1
  302. package/esm/models/paging/PagingModel.js +77 -94
  303. package/esm/models/paging/PagingModel.js.map +1 -1
  304. package/esm/models/panels/GroupingPanelModel.js +116 -160
  305. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  306. package/esm/models/parameter/Parameter.js +82 -97
  307. package/esm/models/parameter/Parameter.js.map +1 -1
  308. package/esm/models/process/ProcessStatusSettingsModel.js +63 -100
  309. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  310. package/esm/models/resolveModel.js +3 -5
  311. package/esm/models/resolveModel.js.map +1 -1
  312. package/esm/models/search/CaseSearchModel.js +23 -56
  313. package/esm/models/search/CaseSearchModel.js.map +1 -1
  314. package/esm/models/sorting/SortOptionModel.js +76 -90
  315. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  316. package/esm/models/sorting/SortingModel.js +86 -134
  317. package/esm/models/sorting/SortingModel.js.map +1 -1
  318. package/esm/models/tab/TabModel.js +118 -163
  319. package/esm/models/tab/TabModel.js.map +1 -1
  320. package/esm/models/taskgroup/TaskGroupCollection.js +7 -37
  321. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  322. package/esm/models/taskgroup/TaskGroupModel.js +51 -83
  323. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  324. package/esm/models/user/UserModel.js +29 -61
  325. package/esm/models/user/UserModel.js.map +1 -1
  326. package/esm/models/user/UserProfileModel.js +19 -50
  327. package/esm/models/user/UserProfileModel.js.map +1 -1
  328. package/esm/models/user/UserServicesModel.js +79 -123
  329. package/esm/models/user/UserServicesModel.js.map +1 -1
  330. package/esm/modularui/Authenticate.js +143 -156
  331. package/esm/modularui/Authenticate.js.map +1 -1
  332. package/esm/modularui/ModularUIError.js +9 -32
  333. package/esm/modularui/ModularUIError.js.map +1 -1
  334. package/esm/modularui/ModularUIRequest.js +476 -630
  335. package/esm/modularui/ModularUIRequest.js.map +1 -1
  336. package/esm/modularui/ModularUIResponse.js +104 -119
  337. package/esm/modularui/ModularUIResponse.js.map +1 -1
  338. package/esm/react/ErrorBoundary.js +32 -65
  339. package/esm/react/ErrorBoundary.js.map +1 -1
  340. package/esm/react/ErrorBoundaryFallback.js +8 -6
  341. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  342. package/esm/react/utils.js +12 -15
  343. package/esm/react/utils.js.map +1 -1
  344. package/esm/react-client/Init.js +9 -7
  345. package/esm/react-client/Init.js.map +1 -1
  346. package/esm/react-client/client.js +21 -22
  347. package/esm/react-client/client.js.map +1 -1
  348. package/esm/react-client/contextPath.js +4 -4
  349. package/esm/react-client/contextPath.js.map +1 -1
  350. package/esm/react-client/rehydrate.js +14 -21
  351. package/esm/react-client/rehydrate.js.map +1 -1
  352. package/esm/react-server/createSSRComplete.js +10 -14
  353. package/esm/react-server/createSSRComplete.js.map +1 -1
  354. package/esm/react-server/htmlpage.js +5 -8
  355. package/esm/react-server/htmlpage.js.map +1 -1
  356. package/esm/react-server/renderSSRComplete.js +50 -55
  357. package/esm/react-server/renderSSRComplete.js.map +1 -1
  358. package/esm/react-server/renderSSRMinimal.js +13 -13
  359. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  360. package/esm/react-server/requestInformation.js +8 -10
  361. package/esm/react-server/requestInformation.js.map +1 -1
  362. package/esm/react-server/serverNoSSR.js +22 -21
  363. package/esm/react-server/serverNoSSR.js.map +1 -1
  364. package/esm/react-server/serverSSR.js +24 -24
  365. package/esm/react-server/serverSSR.js.map +1 -1
  366. package/esm/react-server/serverUtil.js +45 -61
  367. package/esm/react-server/serverUtil.js.map +1 -1
  368. package/esm/react-theme/ThemeProvider.js +10 -7
  369. package/esm/react-theme/ThemeProvider.js.map +1 -1
  370. package/esm/react-theme/createTheme.js +15 -35
  371. package/esm/react-theme/createTheme.js.map +1 -1
  372. package/esm/react-theme/useTheme.js +1 -1
  373. package/esm/react-theme/useTheme.js.map +1 -1
  374. package/esm/react-theme/utils/background.js +9 -9
  375. package/esm/react-theme/utils/background.js.map +1 -1
  376. package/esm/react-theme/utils/colors.js +12 -12
  377. package/esm/react-theme/utils/colors.js.map +1 -1
  378. package/esm/react-theme/utils/contrast.js +27 -27
  379. package/esm/react-theme/utils/contrast.js.map +1 -1
  380. package/esm/react-theme/utils/corners.js +10 -9
  381. package/esm/react-theme/utils/corners.js.map +1 -1
  382. package/esm/react-theme/utils/spacers.js +23 -22
  383. package/esm/react-theme/utils/spacers.js.map +1 -1
  384. package/esm/react-theme/utils/themeProps.js +28 -29
  385. package/esm/react-theme/utils/themeProps.js.map +1 -1
  386. package/esm/redux/_i18n/actions.js +15 -21
  387. package/esm/redux/_i18n/actions.js.map +1 -1
  388. package/esm/redux/_i18n/reducer.js +20 -29
  389. package/esm/redux/_i18n/reducer.js.map +1 -1
  390. package/esm/redux/_modularui/actions.js +40 -67
  391. package/esm/redux/_modularui/actions.js.map +1 -1
  392. package/esm/redux/_modularui/connector.js +46 -50
  393. package/esm/redux/_modularui/connector.js.map +1 -1
  394. package/esm/redux/_modularui/middleware.js +23 -36
  395. package/esm/redux/_modularui/middleware.js.map +1 -1
  396. package/esm/redux/_modularui/modularuiUtils.js +16 -23
  397. package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
  398. package/esm/redux/_modularui/reducer.js +42 -53
  399. package/esm/redux/_modularui/reducer.js.map +1 -1
  400. package/esm/redux/_modularui/selectors.js +89 -99
  401. package/esm/redux/_modularui/selectors.js.map +1 -1
  402. package/esm/redux/_modularui/withModularUI.js +15 -19
  403. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  404. package/esm/redux/_router/actions.js +29 -39
  405. package/esm/redux/_router/actions.js.map +1 -1
  406. package/esm/redux/_router/connectors.js +12 -14
  407. package/esm/redux/_router/connectors.js.map +1 -1
  408. package/esm/redux/_router/middleware.js +27 -29
  409. package/esm/redux/_router/middleware.js.map +1 -1
  410. package/esm/redux/_router/reducer.js +4 -4
  411. package/esm/redux/_router/reducer.js.map +1 -1
  412. package/esm/redux/actions/Application.js +9 -32
  413. package/esm/redux/actions/Application.js.map +1 -1
  414. package/esm/redux/actions/Authorization.js +31 -33
  415. package/esm/redux/actions/Authorization.js.map +1 -1
  416. package/esm/redux/actions/Error.js +33 -43
  417. package/esm/redux/actions/Error.js.map +1 -1
  418. package/esm/redux/actions/Form.js +13 -15
  419. package/esm/redux/actions/Form.js.map +1 -1
  420. package/esm/redux/actions/FormAttributeSet.js +6 -6
  421. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  422. package/esm/redux/actions/FormAttributeSetRepeatable.js +6 -6
  423. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  424. package/esm/redux/actions/FormAutosave.js +12 -18
  425. package/esm/redux/actions/FormAutosave.js.map +1 -1
  426. package/esm/redux/actions/FormAutosubmit.js +2 -2
  427. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  428. package/esm/redux/actions/FormValidations.js +12 -20
  429. package/esm/redux/actions/FormValidations.js.map +1 -1
  430. package/esm/redux/actions/Modals.js +8 -12
  431. package/esm/redux/actions/Modals.js.map +1 -1
  432. package/esm/redux/actions/Notification.js +32 -42
  433. package/esm/redux/actions/Notification.js.map +1 -1
  434. package/esm/redux/actions/Preferences.js +32 -38
  435. package/esm/redux/actions/Preferences.js.map +1 -1
  436. package/esm/redux/actions/ProgressIndicator.js +15 -23
  437. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  438. package/esm/redux/actions/SignIn.js +39 -53
  439. package/esm/redux/actions/SignIn.js.map +1 -1
  440. package/esm/redux/actions/SignOut.js +9 -17
  441. package/esm/redux/actions/SignOut.js.map +1 -1
  442. package/esm/redux/connectors/Application.js +1 -1
  443. package/esm/redux/connectors/Application.js.map +1 -1
  444. package/esm/redux/connectors/Breadcrumb.js +4 -6
  445. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  446. package/esm/redux/connectors/CaseView.js +4 -2
  447. package/esm/redux/connectors/CaseView.js.map +1 -1
  448. package/esm/redux/connectors/ConceptDetail.js +5 -3
  449. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  450. package/esm/redux/connectors/ContentBrowser.js +4 -2
  451. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  452. package/esm/redux/connectors/ContentDetail.js +5 -3
  453. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  454. package/esm/redux/connectors/ContentDetailSection.js +6 -4
  455. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  456. package/esm/redux/connectors/Form.js +11 -9
  457. package/esm/redux/connectors/Form.js.map +1 -1
  458. package/esm/redux/connectors/FormAttributeSet.js +13 -21
  459. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  460. package/esm/redux/connectors/ListDetail.js +4 -2
  461. package/esm/redux/connectors/ListDetail.js.map +1 -1
  462. package/esm/redux/connectors/Modal.js +4 -6
  463. package/esm/redux/connectors/Modal.js.map +1 -1
  464. package/esm/redux/connectors/ModelCatalog.js +4 -2
  465. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  466. package/esm/redux/connectors/Notification.js +8 -10
  467. package/esm/redux/connectors/Notification.js.map +1 -1
  468. package/esm/redux/connectors/PanelRenderer.js +7 -6
  469. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  470. package/esm/redux/connectors/Preferences.js +6 -8
  471. package/esm/redux/connectors/Preferences.js.map +1 -1
  472. package/esm/redux/connectors/Progress.js +2 -2
  473. package/esm/redux/connectors/Progress.js.map +1 -1
  474. package/esm/redux/connectors/ProgressIndicator.js +6 -8
  475. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  476. package/esm/redux/connectors/QuickSearch.js +6 -4
  477. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  478. package/esm/redux/connectors/SignIn.js +4 -4
  479. package/esm/redux/connectors/SignIn.js.map +1 -1
  480. package/esm/redux/connectors/SignOut.js +3 -3
  481. package/esm/redux/connectors/SignOut.js.map +1 -1
  482. package/esm/redux/connectors/Tab.js +4 -2
  483. package/esm/redux/connectors/Tab.js.map +1 -1
  484. package/esm/redux/reducers/AuthReducer.js +14 -25
  485. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  486. package/esm/redux/reducers/ErrorReducer.js +4 -4
  487. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  488. package/esm/redux/reducers/ModalsReducer.js +19 -37
  489. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  490. package/esm/redux/reducers/NotificationReducer.js +8 -19
  491. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  492. package/esm/redux/reducers/PreferencesReducer.js +10 -17
  493. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  494. package/esm/redux/reducers/ProgressIndicatorReducer.js +14 -25
  495. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  496. package/esm/redux/reducers/createReducer.js +11 -13
  497. package/esm/redux/reducers/createReducer.js.map +1 -1
  498. package/esm/redux/selectors/i18n.js +2 -4
  499. package/esm/redux/selectors/i18n.js.map +1 -1
  500. package/esm/redux/store/beforeRenderHooks.js +5 -26
  501. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  502. package/esm/redux/store/configureStore.js +10 -19
  503. package/esm/redux/store/configureStore.js.map +1 -1
  504. package/esm/utils/browser/Cache.js +122 -156
  505. package/esm/utils/browser/Cache.js.map +1 -1
  506. package/esm/utils/browser/Cookies.js +4 -4
  507. package/esm/utils/browser/Cookies.js.map +1 -1
  508. package/esm/utils/datetime/DateTimeUtil.js +363 -418
  509. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  510. package/esm/utils/fetch/serverFetch.js +5 -5
  511. package/esm/utils/fetch/serverFetch.js.map +1 -1
  512. package/esm/utils/fetch/universalFetch.js +13 -14
  513. package/esm/utils/fetch/universalFetch.js.map +1 -1
  514. package/esm/utils/fetch/xhr.js +281 -358
  515. package/esm/utils/fetch/xhr.js.map +1 -1
  516. package/esm/utils/helpers/checkResource.js +7 -7
  517. package/esm/utils/helpers/checkResource.js.map +1 -1
  518. package/esm/utils/helpers/createHash.js +5 -5
  519. package/esm/utils/helpers/createHash.js.map +1 -1
  520. package/esm/utils/helpers/createUUID.js +4 -4
  521. package/esm/utils/helpers/createUUID.js.map +1 -1
  522. package/esm/utils/helpers/objects.js +9 -14
  523. package/esm/utils/helpers/objects.js.map +1 -1
  524. package/esm/utils/helpers/sanitizeHtml.js +13 -13
  525. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  526. package/esm/utils/helpers/text.js +1 -1
  527. package/esm/utils/helpers/text.js.map +1 -1
  528. package/esm/utils/number/DecimalFormat.js +297 -327
  529. package/esm/utils/number/DecimalFormat.js.map +1 -1
  530. package/esm/utils/number/formatValue.js +10 -16
  531. package/esm/utils/number/formatValue.js.map +1 -1
  532. package/esm/utils/number/parseNumbers.js +13 -13
  533. package/esm/utils/number/parseNumbers.js.map +1 -1
  534. package/lib/builder/index.js +1 -1
  535. package/lib/builder/mergeLayoutHintConfigurations.js +34 -64
  536. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  537. package/lib/constants/Constants.js +37 -37
  538. package/lib/constants/Constants.js.map +1 -1
  539. package/lib/constants/LayoutHintConfig.js +1 -1
  540. package/lib/constants/LayoutHintConfig.js.map +1 -1
  541. package/lib/constants/LayoutHints.js +20 -22
  542. package/lib/constants/LayoutHints.js.map +1 -1
  543. package/lib/constants/Settings.js +12 -26
  544. package/lib/constants/Settings.js.map +1 -1
  545. package/lib/constants/index.js +3 -3
  546. package/lib/exceptions/ConfigurationException.js +5 -34
  547. package/lib/exceptions/ConfigurationException.js.map +1 -1
  548. package/lib/exceptions/FetchException.js +32 -75
  549. package/lib/exceptions/FetchException.js.map +1 -1
  550. package/lib/exceptions/IllegalArgumentException.js +5 -34
  551. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  552. package/lib/exceptions/IllegalReturnException.js +5 -34
  553. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  554. package/lib/exceptions/IllegalStateException.js +5 -34
  555. package/lib/exceptions/IllegalStateException.js.map +1 -1
  556. package/lib/exceptions/JsonParseException.js +5 -34
  557. package/lib/exceptions/JsonParseException.js.map +1 -1
  558. package/lib/exceptions/MissingPropertyException.js +5 -34
  559. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  560. package/lib/exceptions/NetworkException.js +9 -38
  561. package/lib/exceptions/NetworkException.js.map +1 -1
  562. package/lib/exceptions/NotAllowedUriException.js +5 -34
  563. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  564. package/lib/exceptions/NotFoundException.js +12 -41
  565. package/lib/exceptions/NotFoundException.js.map +1 -1
  566. package/lib/exceptions/ServerRequestException.js +5 -34
  567. package/lib/exceptions/ServerRequestException.js.map +1 -1
  568. package/lib/exceptions/ThemePropertyException.js +5 -34
  569. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  570. package/lib/exceptions/TimeoutException.js +5 -32
  571. package/lib/exceptions/TimeoutException.js.map +1 -1
  572. package/lib/exceptions/UnauthorizedException.js +11 -40
  573. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  574. package/lib/exceptions/UnsupportedOperationException.js +5 -34
  575. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  576. package/lib/exceptions/index.js +15 -15
  577. package/lib/hooks/index.js +16 -16
  578. package/lib/hooks/useAllFormsOnModel.js +25 -51
  579. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  580. package/lib/hooks/useAuthentication.js +18 -24
  581. package/lib/hooks/useAuthentication.js.map +1 -1
  582. package/lib/hooks/useContent.js +14 -27
  583. package/lib/hooks/useContent.js.map +1 -1
  584. package/lib/hooks/useDeepCompareEffect.js +5 -7
  585. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  586. package/lib/hooks/useForm.js +27 -45
  587. package/lib/hooks/useForm.js.map +1 -1
  588. package/lib/hooks/useI18n.js +10 -20
  589. package/lib/hooks/useI18n.js.map +1 -1
  590. package/lib/hooks/useModal.js +11 -11
  591. package/lib/hooks/useModal.js.map +1 -1
  592. package/lib/hooks/useModelCatalog.js +24 -30
  593. package/lib/hooks/useModelCatalog.js.map +1 -1
  594. package/lib/hooks/useModels.js +3 -3
  595. package/lib/hooks/useModels.js.map +1 -1
  596. package/lib/hooks/useModularUI.js +17 -16
  597. package/lib/hooks/useModularUI.js.map +1 -1
  598. package/lib/hooks/useModularUIBasic.js +9 -7
  599. package/lib/hooks/useModularUIBasic.js.map +1 -1
  600. package/lib/hooks/useModularUIModel.js +39 -59
  601. package/lib/hooks/useModularUIModel.js.map +1 -1
  602. package/lib/hooks/useModularUIRequest.js +4 -6
  603. package/lib/hooks/useModularUIRequest.js.map +1 -1
  604. package/lib/hooks/useNotification.js +16 -21
  605. package/lib/hooks/useNotification.js.map +1 -1
  606. package/lib/hooks/usePreference.js +3 -5
  607. package/lib/hooks/usePreference.js.map +1 -1
  608. package/lib/hooks/useProgressIndicator.js +9 -37
  609. package/lib/hooks/useProgressIndicator.js.map +1 -1
  610. package/lib/hooks/useRouter.js +11 -25
  611. package/lib/hooks/useRouter.js.map +1 -1
  612. package/lib/i18n/Locale.js +97 -144
  613. package/lib/i18n/Locale.js.map +1 -1
  614. package/lib/i18n/Locales.js +97 -160
  615. package/lib/i18n/Locales.js.map +1 -1
  616. package/lib/i18n/Message.js +13 -31
  617. package/lib/i18n/Message.js.map +1 -1
  618. package/lib/i18n/index.js +9 -11
  619. package/lib/i18n/index.js.map +1 -1
  620. package/lib/i18n/languages.js +1 -1
  621. package/lib/i18n/languages.js.map +1 -1
  622. package/lib/i18n/withMessage.js +11 -17
  623. package/lib/i18n/withMessage.js.map +1 -1
  624. package/lib/index.js +6 -6
  625. package/lib/models/actions/ActionCollection.js +58 -104
  626. package/lib/models/actions/ActionCollection.js.map +1 -1
  627. package/lib/models/actions/ActionModel.js +169 -210
  628. package/lib/models/actions/ActionModel.js.map +1 -1
  629. package/lib/models/application/ApplicationModel.js +107 -159
  630. package/lib/models/application/ApplicationModel.js.map +1 -1
  631. package/lib/models/attributes/AttributeCollection.js +245 -341
  632. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  633. package/lib/models/attributes/AttributeContent.js +182 -257
  634. package/lib/models/attributes/AttributeContent.js.map +1 -1
  635. package/lib/models/attributes/AttributeDataHelper.js +203 -257
  636. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  637. package/lib/models/attributes/AttributeModel.js +838 -950
  638. package/lib/models/attributes/AttributeModel.js.map +1 -1
  639. package/lib/models/attributes/AttributeSetModel.js +49 -83
  640. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  641. package/lib/models/attributes/BooleanAttributeModel.js +267 -339
  642. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  643. package/lib/models/attributes/CaptchaAttributeModel.js +27 -59
  644. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  645. package/lib/models/attributes/ChoiceAttributeModel.js +343 -437
  646. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  647. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +268 -369
  648. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  649. package/lib/models/attributes/ChoiceAttributeOptionModel.js +299 -357
  650. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  651. package/lib/models/attributes/CompositeAttributeChildCollection.js +181 -270
  652. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  653. package/lib/models/attributes/CompositeAttributeModel.js +331 -411
  654. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  655. package/lib/models/attributes/DatetimeAttributeModel.js +371 -425
  656. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  657. package/lib/models/attributes/HelptextAttributeModel.js +41 -74
  658. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  659. package/lib/models/attributes/LabelAttributeModel.js +26 -58
  660. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  661. package/lib/models/attributes/MemoAttributeModel.js +34 -67
  662. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  663. package/lib/models/attributes/MoneyAttributeModel.js +34 -67
  664. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  665. package/lib/models/attributes/NumberAttributeModel.js +181 -231
  666. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  667. package/lib/models/attributes/PasswordAttributeModel.js +201 -253
  668. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  669. package/lib/models/attributes/StringAttributeModel.js +239 -289
  670. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  671. package/lib/models/attributes/UploadAttributeModel.js +183 -243
  672. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  673. package/lib/models/attributes/XMLAttributeModel.js +38 -71
  674. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  675. package/lib/models/attributes/_createAttribute.js +20 -43
  676. package/lib/models/attributes/_createAttribute.js.map +1 -1
  677. package/lib/models/attributes/input-constraints/BSNConstraint.js +64 -84
  678. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  679. package/lib/models/attributes/input-constraints/ConstraintCollection.js +36 -74
  680. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  681. package/lib/models/attributes/input-constraints/ConstraintModel.js +46 -59
  682. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  683. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +171 -193
  684. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  685. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +53 -68
  686. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  687. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +53 -68
  688. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  689. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +67 -84
  690. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  691. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +53 -69
  692. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  693. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +79 -95
  694. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  695. package/lib/models/attributes/input-constraints/IBANConstraint.js +41 -58
  696. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  697. package/lib/models/attributes/input-constraints/MandatoryConstraint.js +39 -60
  698. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  699. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +63 -82
  700. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  701. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +150 -172
  702. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  703. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +105 -125
  704. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  705. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +92 -114
  706. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  707. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +58 -73
  708. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  709. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +36 -55
  710. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  711. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +51 -65
  712. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  713. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +51 -65
  714. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  715. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +64 -82
  716. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  717. package/lib/models/attributes/input-constraints/RangeConstraint.js +116 -135
  718. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  719. package/lib/models/attributes/input-constraints/RegexConstraint.js +48 -62
  720. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  721. package/lib/models/attributes/input-constraints/StringLengthConstraint.js +158 -177
  722. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  723. package/lib/models/attributes/input-constraints/XMLConstraint.js +49 -69
  724. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  725. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +54 -70
  726. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  727. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +172 -218
  728. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  729. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +43 -74
  730. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  731. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +32 -64
  732. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  733. package/lib/models/base/BaseCollection.js +170 -206
  734. package/lib/models/base/BaseCollection.js.map +1 -1
  735. package/lib/models/base/BaseModel.js +98 -113
  736. package/lib/models/base/BaseModel.js.map +1 -1
  737. package/lib/models/base/ResourceCollection.js +28 -60
  738. package/lib/models/base/ResourceCollection.js.map +1 -1
  739. package/lib/models/base/ResourceModel.js +171 -231
  740. package/lib/models/base/ResourceModel.js.map +1 -1
  741. package/lib/models/caseview/CaseViewModel.js +137 -188
  742. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  743. package/lib/models/concepts/BusinessScenarioModel.js +97 -153
  744. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  745. package/lib/models/concepts/ConceptDetailModel.js +243 -329
  746. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  747. package/lib/models/concepts/ConceptIndexModel.js +118 -156
  748. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  749. package/lib/models/concepts/ConceptLinkModel.js +122 -163
  750. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  751. package/lib/models/concepts/ConceptRelationCollection.js +57 -105
  752. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  753. package/lib/models/concepts/ConceptRelationModel.js +62 -75
  754. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  755. package/lib/models/concepts/ConceptTypeDetailModel.js +87 -127
  756. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  757. package/lib/models/concepts/SourceReferenceCollection.js +13 -44
  758. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  759. package/lib/models/concepts/SourceReferenceModel.js +47 -74
  760. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  761. package/lib/models/content/ContentIndexModel.js +112 -156
  762. package/lib/models/content/ContentIndexModel.js.map +1 -1
  763. package/lib/models/content/ContentLinkModel.js +162 -205
  764. package/lib/models/content/ContentLinkModel.js.map +1 -1
  765. package/lib/models/content/ContentModel.js +188 -235
  766. package/lib/models/content/ContentModel.js.map +1 -1
  767. package/lib/models/content/ContentTOCModel.js +133 -209
  768. package/lib/models/content/ContentTOCModel.js.map +1 -1
  769. package/lib/models/content/ContentTypeModel.js +56 -92
  770. package/lib/models/content/ContentTypeModel.js.map +1 -1
  771. package/lib/models/content/SectionModel.js +160 -254
  772. package/lib/models/content/SectionModel.js.map +1 -1
  773. package/lib/models/content/SubSectionModel.js +125 -196
  774. package/lib/models/content/SubSectionModel.js.map +1 -1
  775. package/lib/models/contentconfiguration/ContentConfiguration.js +46 -58
  776. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  777. package/lib/models/contentconfiguration/ContentConfigurationElements.js +127 -171
  778. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  779. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +28 -45
  780. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  781. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +31 -42
  782. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  783. package/lib/models/contentconfiguration/ContentConfigurationResults.js +74 -98
  784. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  785. package/lib/models/detail/DetailModel.js +176 -232
  786. package/lib/models/detail/DetailModel.js.map +1 -1
  787. package/lib/models/error/ErrorCollection.js +82 -139
  788. package/lib/models/error/ErrorCollection.js.map +1 -1
  789. package/lib/models/error/ErrorModel.js +36 -48
  790. package/lib/models/error/ErrorModel.js.map +1 -1
  791. package/lib/models/error/ErrorResponse.js +177 -205
  792. package/lib/models/error/ErrorResponse.js.map +1 -1
  793. package/lib/models/filters/AssignmentFilterModel.js +144 -195
  794. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  795. package/lib/models/filters/BaseFilterModel.js +171 -228
  796. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  797. package/lib/models/filters/ConceptIndexFilterModel.js +9 -39
  798. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  799. package/lib/models/filters/FilterCollection.js +109 -177
  800. package/lib/models/filters/FilterCollection.js.map +1 -1
  801. package/lib/models/filters/FilterModel.js +2 -29
  802. package/lib/models/filters/FilterModel.js.map +1 -1
  803. package/lib/models/filters/RangeFilterModel.js +30 -60
  804. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  805. package/lib/models/form/FormModel.js +961 -1150
  806. package/lib/models/form/FormModel.js.map +1 -1
  807. package/lib/models/form/FormObjectModel.js +411 -517
  808. package/lib/models/form/FormObjectModel.js.map +1 -1
  809. package/lib/models/grouping/GroupingModel.js +117 -165
  810. package/lib/models/grouping/GroupingModel.js.map +1 -1
  811. package/lib/models/href/Href.js +392 -452
  812. package/lib/models/href/Href.js.map +1 -1
  813. package/lib/models/href/ListHref.js +119 -159
  814. package/lib/models/href/ListHref.js.map +1 -1
  815. package/lib/models/index.js +97 -99
  816. package/lib/models/index.js.map +1 -1
  817. package/lib/models/layouthint/LayoutHintCollection.js +94 -140
  818. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  819. package/lib/models/links/LinkCollection.js +136 -196
  820. package/lib/models/links/LinkCollection.js.map +1 -1
  821. package/lib/models/links/LinkModel.js +191 -235
  822. package/lib/models/links/LinkModel.js.map +1 -1
  823. package/lib/models/links/normalizeLinkJSON.js +30 -66
  824. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  825. package/lib/models/list/ListDetailModel.js +229 -302
  826. package/lib/models/list/ListDetailModel.js.map +1 -1
  827. package/lib/models/list/ListHeaderModel.js +73 -97
  828. package/lib/models/list/ListHeaderModel.js.map +1 -1
  829. package/lib/models/list/ListItemCollection.js +49 -91
  830. package/lib/models/list/ListItemCollection.js.map +1 -1
  831. package/lib/models/list/ListItemModel.js +76 -114
  832. package/lib/models/list/ListItemModel.js.map +1 -1
  833. package/lib/models/list/ListModel.js +347 -435
  834. package/lib/models/list/ListModel.js.map +1 -1
  835. package/lib/models/lookup/LookupOptionCollection.js +16 -61
  836. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  837. package/lib/models/lookup/LookupOptionsModel.js +48 -79
  838. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  839. package/lib/models/modelcatalog/ModelCatalogModel.js +39 -72
  840. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  841. package/lib/models/paging/PagesizeModel.js +29 -38
  842. package/lib/models/paging/PagesizeModel.js.map +1 -1
  843. package/lib/models/paging/PagingModel.js +77 -92
  844. package/lib/models/paging/PagingModel.js.map +1 -1
  845. package/lib/models/panels/GroupingPanelModel.js +117 -164
  846. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  847. package/lib/models/parameter/Parameter.js +83 -99
  848. package/lib/models/parameter/Parameter.js.map +1 -1
  849. package/lib/models/process/ProcessStatusSettingsModel.js +67 -105
  850. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  851. package/lib/models/resolveModel.js +3 -5
  852. package/lib/models/resolveModel.js.map +1 -1
  853. package/lib/models/search/CaseSearchModel.js +26 -60
  854. package/lib/models/search/CaseSearchModel.js.map +1 -1
  855. package/lib/models/sorting/SortOptionModel.js +77 -91
  856. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  857. package/lib/models/sorting/SortingModel.js +88 -140
  858. package/lib/models/sorting/SortingModel.js.map +1 -1
  859. package/lib/models/tab/TabModel.js +122 -170
  860. package/lib/models/tab/TabModel.js.map +1 -1
  861. package/lib/models/taskgroup/TaskGroupCollection.js +8 -39
  862. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  863. package/lib/models/taskgroup/TaskGroupModel.js +54 -88
  864. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  865. package/lib/models/user/UserModel.js +32 -65
  866. package/lib/models/user/UserModel.js.map +1 -1
  867. package/lib/models/user/UserProfileModel.js +21 -56
  868. package/lib/models/user/UserProfileModel.js.map +1 -1
  869. package/lib/models/user/UserServicesModel.js +78 -128
  870. package/lib/models/user/UserServicesModel.js.flow +1 -7
  871. package/lib/models/user/UserServicesModel.js.map +1 -1
  872. package/lib/modularui/Authenticate.js +144 -157
  873. package/lib/modularui/Authenticate.js.flow +13 -7
  874. package/lib/modularui/Authenticate.js.map +1 -1
  875. package/lib/modularui/ModularUIError.js +9 -39
  876. package/lib/modularui/ModularUIError.js.map +1 -1
  877. package/lib/modularui/ModularUIRequest.js +477 -647
  878. package/lib/modularui/ModularUIRequest.js.map +1 -1
  879. package/lib/modularui/ModularUIResponse.js +102 -120
  880. package/lib/modularui/ModularUIResponse.js.map +1 -1
  881. package/lib/modularui/index.js +3 -3
  882. package/lib/react/ErrorBoundary.js +33 -71
  883. package/lib/react/ErrorBoundary.js.map +1 -1
  884. package/lib/react/ErrorBoundaryFallback.js +8 -6
  885. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  886. package/lib/react/index.js +2 -2
  887. package/lib/react/utils.js +12 -16
  888. package/lib/react/utils.js.map +1 -1
  889. package/lib/react-client/Init.js +9 -7
  890. package/lib/react-client/Init.js.map +1 -1
  891. package/lib/react-client/client.js +22 -23
  892. package/lib/react-client/client.js.map +1 -1
  893. package/lib/react-client/contextPath.js +4 -4
  894. package/lib/react-client/contextPath.js.map +1 -1
  895. package/lib/react-client/index.js +3 -3
  896. package/lib/react-client/rehydrate.js +14 -22
  897. package/lib/react-client/rehydrate.js.map +1 -1
  898. package/lib/react-server/createSSRComplete.js +10 -14
  899. package/lib/react-server/createSSRComplete.js.map +1 -1
  900. package/lib/react-server/htmlpage.js +5 -8
  901. package/lib/react-server/htmlpage.js.map +1 -1
  902. package/lib/react-server/index.js +8 -8
  903. package/lib/react-server/renderSSRComplete.js +50 -55
  904. package/lib/react-server/renderSSRComplete.js.map +1 -1
  905. package/lib/react-server/renderSSRMinimal.js +13 -13
  906. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  907. package/lib/react-server/requestInformation.js +8 -10
  908. package/lib/react-server/requestInformation.js.map +1 -1
  909. package/lib/react-server/serverNoSSR.js +22 -21
  910. package/lib/react-server/serverNoSSR.js.map +1 -1
  911. package/lib/react-server/serverSSR.js +24 -24
  912. package/lib/react-server/serverSSR.js.map +1 -1
  913. package/lib/react-server/serverUtil.js +49 -74
  914. package/lib/react-server/serverUtil.js.map +1 -1
  915. package/lib/react-theme/ThemeProvider.js +10 -7
  916. package/lib/react-theme/ThemeProvider.js.map +1 -1
  917. package/lib/react-theme/createTheme.js +15 -44
  918. package/lib/react-theme/createTheme.js.map +1 -1
  919. package/lib/react-theme/index.js +9 -9
  920. package/lib/react-theme/useTheme.js +1 -1
  921. package/lib/react-theme/useTheme.js.map +1 -1
  922. package/lib/react-theme/utils/background.js +9 -9
  923. package/lib/react-theme/utils/background.js.map +1 -1
  924. package/lib/react-theme/utils/colors.js +12 -12
  925. package/lib/react-theme/utils/colors.js.map +1 -1
  926. package/lib/react-theme/utils/contrast.js +27 -28
  927. package/lib/react-theme/utils/contrast.js.map +1 -1
  928. package/lib/react-theme/utils/corners.js +10 -9
  929. package/lib/react-theme/utils/corners.js.map +1 -1
  930. package/lib/react-theme/utils/spacers.js +23 -22
  931. package/lib/react-theme/utils/spacers.js.map +1 -1
  932. package/lib/react-theme/utils/themeProps.js +28 -30
  933. package/lib/react-theme/utils/themeProps.js.map +1 -1
  934. package/lib/redux/_i18n/actions.js +15 -21
  935. package/lib/redux/_i18n/actions.js.map +1 -1
  936. package/lib/redux/_i18n/index.js +2 -2
  937. package/lib/redux/_i18n/reducer.js +20 -34
  938. package/lib/redux/_i18n/reducer.js.map +1 -1
  939. package/lib/redux/_modularui/actions.js +40 -72
  940. package/lib/redux/_modularui/actions.js.map +1 -1
  941. package/lib/redux/_modularui/connector.js +46 -55
  942. package/lib/redux/_modularui/connector.js.map +1 -1
  943. package/lib/redux/_modularui/index.js +7 -7
  944. package/lib/redux/_modularui/middleware.js +23 -36
  945. package/lib/redux/_modularui/middleware.js.map +1 -1
  946. package/lib/redux/_modularui/modularuiUtils.js +16 -24
  947. package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
  948. package/lib/redux/_modularui/reducer.js +42 -61
  949. package/lib/redux/_modularui/reducer.js.map +1 -1
  950. package/lib/redux/_modularui/selectors.js +89 -106
  951. package/lib/redux/_modularui/selectors.js.map +1 -1
  952. package/lib/redux/_modularui/withModularUI.js +11 -15
  953. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  954. package/lib/redux/_router/actions.js +29 -39
  955. package/lib/redux/_router/actions.js.map +1 -1
  956. package/lib/redux/_router/connectors.js +7 -9
  957. package/lib/redux/_router/connectors.js.map +1 -1
  958. package/lib/redux/_router/index.js +4 -4
  959. package/lib/redux/_router/middleware.js +27 -29
  960. package/lib/redux/_router/middleware.js.map +1 -1
  961. package/lib/redux/_router/reducer.js +4 -4
  962. package/lib/redux/_router/reducer.js.map +1 -1
  963. package/lib/redux/actions/Application.js +11 -37
  964. package/lib/redux/actions/Application.js.map +1 -1
  965. package/lib/redux/actions/Authorization.js +31 -33
  966. package/lib/redux/actions/Authorization.js.map +1 -1
  967. package/lib/redux/actions/Error.js +33 -43
  968. package/lib/redux/actions/Error.js.map +1 -1
  969. package/lib/redux/actions/Form.js +14 -16
  970. package/lib/redux/actions/Form.js.map +1 -1
  971. package/lib/redux/actions/FormAttributeSet.js +6 -6
  972. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  973. package/lib/redux/actions/FormAttributeSetRepeatable.js +6 -6
  974. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  975. package/lib/redux/actions/FormAutosave.js +12 -18
  976. package/lib/redux/actions/FormAutosave.js.map +1 -1
  977. package/lib/redux/actions/FormAutosubmit.js +2 -2
  978. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  979. package/lib/redux/actions/FormValidations.js +12 -20
  980. package/lib/redux/actions/FormValidations.js.map +1 -1
  981. package/lib/redux/actions/Modals.js +8 -12
  982. package/lib/redux/actions/Modals.js.map +1 -1
  983. package/lib/redux/actions/Notification.js +32 -42
  984. package/lib/redux/actions/Notification.js.map +1 -1
  985. package/lib/redux/actions/Preferences.js +32 -43
  986. package/lib/redux/actions/Preferences.js.map +1 -1
  987. package/lib/redux/actions/ProgressIndicator.js +15 -23
  988. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  989. package/lib/redux/actions/SignIn.js +43 -57
  990. package/lib/redux/actions/SignIn.js.map +1 -1
  991. package/lib/redux/actions/SignOut.js +9 -17
  992. package/lib/redux/actions/SignOut.js.map +1 -1
  993. package/lib/redux/actions/index.js +15 -15
  994. package/lib/redux/connectors/Application.js +1 -1
  995. package/lib/redux/connectors/Application.js.map +1 -1
  996. package/lib/redux/connectors/Breadcrumb.js +4 -6
  997. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  998. package/lib/redux/connectors/CaseView.js +4 -2
  999. package/lib/redux/connectors/CaseView.js.map +1 -1
  1000. package/lib/redux/connectors/ConceptDetail.js +5 -3
  1001. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  1002. package/lib/redux/connectors/ContentBrowser.js +4 -2
  1003. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  1004. package/lib/redux/connectors/ContentDetail.js +5 -3
  1005. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  1006. package/lib/redux/connectors/ContentDetailSection.js +6 -4
  1007. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  1008. package/lib/redux/connectors/Form.js +10 -8
  1009. package/lib/redux/connectors/Form.js.map +1 -1
  1010. package/lib/redux/connectors/FormAttributeSet.js +13 -21
  1011. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  1012. package/lib/redux/connectors/ListDetail.js +4 -2
  1013. package/lib/redux/connectors/ListDetail.js.map +1 -1
  1014. package/lib/redux/connectors/Modal.js +4 -6
  1015. package/lib/redux/connectors/Modal.js.map +1 -1
  1016. package/lib/redux/connectors/ModelCatalog.js +4 -2
  1017. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  1018. package/lib/redux/connectors/Notification.js +8 -10
  1019. package/lib/redux/connectors/Notification.js.map +1 -1
  1020. package/lib/redux/connectors/PanelRenderer.js +7 -6
  1021. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  1022. package/lib/redux/connectors/Preferences.js +6 -8
  1023. package/lib/redux/connectors/Preferences.js.map +1 -1
  1024. package/lib/redux/connectors/Progress.js +2 -2
  1025. package/lib/redux/connectors/Progress.js.map +1 -1
  1026. package/lib/redux/connectors/ProgressIndicator.js +6 -8
  1027. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  1028. package/lib/redux/connectors/QuickSearch.js +5 -3
  1029. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  1030. package/lib/redux/connectors/SignIn.js +4 -4
  1031. package/lib/redux/connectors/SignIn.js.map +1 -1
  1032. package/lib/redux/connectors/SignOut.js +3 -3
  1033. package/lib/redux/connectors/SignOut.js.map +1 -1
  1034. package/lib/redux/connectors/Tab.js +4 -2
  1035. package/lib/redux/connectors/Tab.js.map +1 -1
  1036. package/lib/redux/connectors/index.js +21 -21
  1037. package/lib/redux/index.js +8 -8
  1038. package/lib/redux/reducers/AuthReducer.js +14 -33
  1039. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  1040. package/lib/redux/reducers/ErrorReducer.js +4 -4
  1041. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  1042. package/lib/redux/reducers/ModalsReducer.js +19 -45
  1043. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  1044. package/lib/redux/reducers/NotificationReducer.js +8 -27
  1045. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  1046. package/lib/redux/reducers/PreferencesReducer.js +10 -25
  1047. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  1048. package/lib/redux/reducers/ProgressIndicatorReducer.js +14 -33
  1049. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  1050. package/lib/redux/reducers/createReducer.js +11 -13
  1051. package/lib/redux/reducers/createReducer.js.map +1 -1
  1052. package/lib/redux/reducers/index.js +7 -7
  1053. package/lib/redux/selectors/i18n.js +2 -4
  1054. package/lib/redux/selectors/i18n.js.map +1 -1
  1055. package/lib/redux/selectors/index.js +1 -1
  1056. package/lib/redux/store/beforeRenderHooks.js +5 -29
  1057. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  1058. package/lib/redux/store/configureStore.js +10 -24
  1059. package/lib/redux/store/configureStore.js.map +1 -1
  1060. package/lib/utils/browser/Cache.js +126 -161
  1061. package/lib/utils/browser/Cache.js.map +1 -1
  1062. package/lib/utils/browser/Cookies.js +4 -4
  1063. package/lib/utils/browser/Cookies.js.map +1 -1
  1064. package/lib/utils/datetime/DateTimeUtil.js +364 -418
  1065. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  1066. package/lib/utils/fetch/serverFetch.js +5 -5
  1067. package/lib/utils/fetch/serverFetch.js.map +1 -1
  1068. package/lib/utils/fetch/universalFetch.js +13 -13
  1069. package/lib/utils/fetch/universalFetch.js.map +1 -1
  1070. package/lib/utils/fetch/xhr.js +281 -365
  1071. package/lib/utils/fetch/xhr.js.map +1 -1
  1072. package/lib/utils/helpers/checkResource.js +7 -7
  1073. package/lib/utils/helpers/checkResource.js.map +1 -1
  1074. package/lib/utils/helpers/createHash.js +5 -5
  1075. package/lib/utils/helpers/createHash.js.map +1 -1
  1076. package/lib/utils/helpers/createUUID.js +4 -4
  1077. package/lib/utils/helpers/createUUID.js.map +1 -1
  1078. package/lib/utils/helpers/objects.js +9 -15
  1079. package/lib/utils/helpers/objects.js.map +1 -1
  1080. package/lib/utils/helpers/sanitizeHtml.js +13 -13
  1081. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  1082. package/lib/utils/helpers/text.js +1 -1
  1083. package/lib/utils/helpers/text.js.map +1 -1
  1084. package/lib/utils/index.js +15 -15
  1085. package/lib/utils/number/DecimalFormat.js +298 -328
  1086. package/lib/utils/number/DecimalFormat.js.map +1 -1
  1087. package/lib/utils/number/formatValue.js +10 -17
  1088. package/lib/utils/number/formatValue.js.map +1 -1
  1089. package/lib/utils/number/parseNumbers.js +13 -13
  1090. package/lib/utils/number/parseNumbers.js.map +1 -1
  1091. package/package.json +13 -13
  1092. package/src/models/user/UserServicesModel.js +1 -7
  1093. package/src/modularui/Authenticate.js +13 -7
@@ -1,24 +1,5 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
4
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
5
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
6
- import _toConsumableArray from "@babel/runtime-corejs3/helpers/esm/toConsumableArray";
7
- import _classCallCheck from "@babel/runtime-corejs3/helpers/esm/classCallCheck";
8
- import _createClass from "@babel/runtime-corejs3/helpers/esm/createClass";
9
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/esm/assertThisInitialized";
10
- import _inherits from "@babel/runtime-corejs3/helpers/esm/inherits";
11
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn";
12
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/esm/getPrototypeOf";
13
1
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
14
- var _excluded = ["elements"];
15
-
16
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
-
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
19
-
20
2
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
21
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
22
3
  import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
23
4
  import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
24
5
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
@@ -26,11 +7,6 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
26
7
  import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
27
8
  import _JSON$stringify from "@babel/runtime-corejs3/core-js-stable/json/stringify";
28
9
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
29
-
30
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
31
-
32
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
-
34
10
  import flattenDeep from "lodash/flattenDeep";
35
11
  import deepmerge from "deepmerge";
36
12
  import { has } from "../../utils/helpers/objects";
@@ -46,1299 +22,1147 @@ import { CREATE_ACTION, DELETE_ACTION, UPDATE_ACTION } from "../../constants/Lay
46
22
 
47
23
  /**
48
24
  */
49
- var FormModel = /*#__PURE__*/function (_ResourceModel) {
50
- _inherits(FormModel, _ResourceModel);
51
-
52
- var _super = _createSuper(FormModel);
53
-
25
+ class FormModel extends ResourceModel {
54
26
  /**
55
27
  */
56
- function FormModel(modularuiResponse) {
57
- var _this;
28
+ constructor(modularuiResponse) {
29
+ super(modularuiResponse);
58
30
 
59
- _classCallCheck(this, FormModel);
31
+ _defineProperty(this, "_lastUpdate", void 0);
60
32
 
61
- _this = _super.call(this, modularuiResponse);
33
+ _defineProperty(this, "_completedFormObjects", []);
62
34
 
63
- _defineProperty(_assertThisInitialized(_this), "_lastUpdate", void 0);
35
+ _defineProperty(this, "_currentFormObject", null);
64
36
 
65
- _defineProperty(_assertThisInitialized(_this), "_completedFormObjects", []);
37
+ _defineProperty(this, "_previouslyEnteredFormObjects", []);
66
38
 
67
- _defineProperty(_assertThisInitialized(_this), "_currentFormObject", null);
39
+ _defineProperty(this, "_mergePreviouslyEnteredObjects", true);
68
40
 
69
- _defineProperty(_assertThisInitialized(_this), "_previouslyEnteredFormObjects", []);
41
+ _defineProperty(this, "_endResultFormObjects", []);
70
42
 
71
- _defineProperty(_assertThisInitialized(_this), "_mergePreviouslyEnteredObjects", true);
43
+ _defineProperty(this, "_previousEndResultKeys", []);
72
44
 
73
- _defineProperty(_assertThisInitialized(_this), "_endResultFormObjects", []);
45
+ _defineProperty(this, "_useClientsideValidation", getSetting("USE_CLIENTSIDE_VALIDATION"));
74
46
 
75
- _defineProperty(_assertThisInitialized(_this), "_previousEndResultKeys", []);
47
+ _defineProperty(this, "_errorCollection", new ErrorCollection("form"));
76
48
 
77
- _defineProperty(_assertThisInitialized(_this), "_useClientsideValidation", getSetting("USE_CLIENTSIDE_VALIDATION"));
49
+ _defineProperty(this, "_redirectLocation", void 0);
78
50
 
79
- _defineProperty(_assertThisInitialized(_this), "_errorCollection", new ErrorCollection("form"));
51
+ _defineProperty(this, "_commit", void 0);
80
52
 
81
- _defineProperty(_assertThisInitialized(_this), "_redirectLocation", void 0);
53
+ _defineProperty(this, "_isFinished", void 0);
82
54
 
83
- _defineProperty(_assertThisInitialized(_this), "_commit", void 0);
55
+ _defineProperty(this, "_isComplete", void 0);
84
56
 
85
- _defineProperty(_assertThisInitialized(_this), "_isFinished", void 0);
57
+ _defineProperty(this, "_parameters", void 0);
86
58
 
87
- _defineProperty(_assertThisInitialized(_this), "_isComplete", void 0);
59
+ _defineProperty(this, "_tokens", void 0);
88
60
 
89
- _defineProperty(_assertThisInitialized(_this), "_parameters", void 0);
61
+ this.lastUpdate = 0;
62
+ this.currentFormObject = this.createFormObject();
63
+ this.endResultFormObjects = this.setEndResultFormObjects();
64
+ this.parameters = this.setParameters(modularuiResponse);
65
+ this.isComplete = this.getData("complete", false);
90
66
 
91
- _defineProperty(_assertThisInitialized(_this), "_tokens", void 0);
92
-
93
- _this.lastUpdate = 0;
94
- _this.currentFormObject = _this.createFormObject();
95
- _this.endResultFormObjects = _this.setEndResultFormObjects();
96
- _this.parameters = _this.setParameters(modularuiResponse);
97
- _this.isComplete = _this.getData("complete", false);
98
-
99
- if (_this.data.errors) {
100
- _this.handleRootErrors(_this.data.errors);
67
+ if (this.data.errors) {
68
+ this.handleRootErrors(this.data.errors);
101
69
  }
102
-
103
- return _this;
104
70
  }
105
71
  /**
106
72
  */
107
73
 
108
74
 
109
- _createClass(FormModel, [{
110
- key: "type",
111
- get: function get() {
112
- return "Form";
113
- }
114
- /**
115
- */
116
-
117
- }, {
118
- key: "actiontype",
119
- get: function get() {
120
- if (this.layouthint.has(CREATE_ACTION)) {
121
- return "create";
122
- }
123
-
124
- if (this.layouthint.has(UPDATE_ACTION)) {
125
- return "update";
126
- }
127
-
128
- if (this.layouthint.has(DELETE_ACTION)) {
129
- return "delete";
130
- }
75
+ get type() {
76
+ return "Form";
77
+ }
78
+ /**
79
+ */
131
80
 
132
- return this.getContribution("actiontype", "form");
133
- }
134
- /**
135
- */
136
-
137
- }, {
138
- key: "getInitialChildModelLinks",
139
- value:
140
- /**
141
- */
142
- function getInitialChildModelLinks() {
143
- var _context, _context2;
144
-
145
- var endResultChildLinks = flattenDeep(_mapInstanceProperty(_context = this.endResultFormObjects).call(_context, function (endResultFormObject) {
146
- return endResultFormObject.getInitialChildModelLinks();
147
- }));
148
-
149
- if (this.currentFormObject === null) {
150
- return endResultChildLinks;
151
- }
152
81
 
153
- return _concatInstanceProperty(_context2 = []).call(_context2, _toConsumableArray(this.currentFormObject.getInitialChildModelLinks()), _toConsumableArray(endResultChildLinks));
82
+ get actiontype() {
83
+ if (this.layouthint.has(CREATE_ACTION)) {
84
+ return "create";
154
85
  }
155
- /**
156
- */
157
-
158
- }, {
159
- key: "setChildModels",
160
- value: function setChildModels(models) {
161
- if (this.currentFormObject) {
162
- this.currentFormObject.setChildModels(models);
163
- }
164
86
 
165
- this.endResultFormObjects.forEach(function (endResultFormObject) {
166
- endResultFormObject.setChildModels(models);
167
- });
87
+ if (this.layouthint.has(UPDATE_ACTION)) {
88
+ return "update";
168
89
  }
169
- /**
170
- */
171
90
 
172
- }, {
173
- key: "label",
174
- get: function get() {
175
- return this.getContribution("label", "");
91
+ if (this.layouthint.has(DELETE_ACTION)) {
92
+ return "delete";
176
93
  }
177
- /**
178
- * Get form level button labels
179
- */
180
-
181
- }, {
182
- key: "buttonLabels",
183
- get: function get() {
184
- return this.getContribution("buttonLabels", {});
185
- }
186
- /**
187
- * @returns button label from contributions;
188
- */
189
-
190
- }, {
191
- key: "getButtonLabel",
192
- value: function getButtonLabel(buttonType) {
193
- var _this$currentFormObje, _this$currentFormObje2, _this$currentFormObje3;
194
94
 
195
- // cancel button labels are defined on the form
196
- if (buttonType === "cancel") {
197
- var _this$buttonLabels$ca, _this$buttonLabels;
95
+ return this.getContribution("actiontype", "form");
96
+ }
97
+ /**
98
+ */
198
99
 
199
- return (_this$buttonLabels$ca = (_this$buttonLabels = this.buttonLabels) === null || _this$buttonLabels === void 0 ? void 0 : _this$buttonLabels.cancel) !== null && _this$buttonLabels$ca !== void 0 ? _this$buttonLabels$ca : null;
200
- } // all other form related button labels are defined on the object
201
100
 
101
+ static isApplicableModel(data) {
102
+ return data.contributions.resourcetype && data.contributions.resourcetype === "Form";
103
+ }
104
+ /**
105
+ */
202
106
 
203
- return (_this$currentFormObje = (_this$currentFormObje2 = this.currentFormObject) === null || _this$currentFormObje2 === void 0 ? void 0 : (_this$currentFormObje3 = _this$currentFormObje2.buttonLabels) === null || _this$currentFormObje3 === void 0 ? void 0 : _this$currentFormObje3[buttonType]) !== null && _this$currentFormObje !== void 0 ? _this$currentFormObje : null;
204
- }
205
- /**
206
- * Get all applicable objects
207
- */
208
107
 
209
- }, {
210
- key: "allObjects",
211
- get: function get() {
212
- var _context3;
108
+ getInitialChildModelLinks() {
109
+ var _context;
213
110
 
214
- if (this.currentFormObject === null) {
215
- return this.completedFormObjects;
216
- }
111
+ const endResultChildLinks = flattenDeep(_mapInstanceProperty(_context = this.endResultFormObjects).call(_context, endResultFormObject => endResultFormObject.getInitialChildModelLinks()));
217
112
 
218
- return _concatInstanceProperty(_context3 = []).call(_context3, _toConsumableArray(this.completedFormObjects), [this.currentFormObject]);
113
+ if (this.currentFormObject === null) {
114
+ return endResultChildLinks;
219
115
  }
220
- /**
221
- */
222
-
223
- }, {
224
- key: "objectKeys",
225
- get: function get() {
226
- if (has(this.contributions, "objects")) {
227
- return _Object$keys(this.contributions.objects);
228
- }
229
116
 
230
- return [];
231
- }
232
- /**
233
- */
117
+ return [...this.currentFormObject.getInitialChildModelLinks(), ...endResultChildLinks];
118
+ }
119
+ /**
120
+ */
234
121
 
235
- }, {
236
- key: "numberOfExpectedQuestions",
237
- get: function get() {
238
- return this.objectKeys.length;
239
- }
240
- /**
241
- * Has questions configured on form
242
- */
243
-
244
- }, {
245
- key: "hasNoQuestionsConfigured",
246
- get: function get() {
247
- return this.isComplete && (this.objectKeys.length === 0 || !("missing" in this.data) && !("results" in this.data) && !("errors" in this.data));
248
- }
249
- /**
250
- */
251
122
 
252
- }, {
253
- key: "addGlobalDynamicSchema",
254
- value: function addGlobalDynamicSchema(anchor, dynamicschema) {
255
- var _context4;
123
+ setChildModels(models) {
124
+ if (this.currentFormObject) {
125
+ this.currentFormObject.setChildModels(models);
126
+ }
256
127
 
257
- if (!dynamicschema) {
258
- return anchor;
259
- }
128
+ this.endResultFormObjects.forEach(endResultFormObject => {
129
+ endResultFormObject.setChildModels(models);
130
+ });
131
+ }
132
+ /**
133
+ */
260
134
 
261
- return _objectSpread(_objectSpread({}, anchor), {}, {
262
- elements: _mapInstanceProperty(_context4 = anchor.elements).call(_context4, function (element) {
263
- var _context5;
264
-
265
- return _objectSpread(_objectSpread({}, element), {}, {
266
- dynamicschema: element.dynamicschema ? _mapInstanceProperty(_context5 = element.dynamicschema).call(_context5, function (item) {
267
- return _objectSpread(_objectSpread({}, item), {}, {
268
- elements: _objectSpread(_objectSpread({}, item.elements), {}, {
269
- dynamicschema: dynamicschema
270
- })
271
- });
272
- }) : null
273
- });
274
- })
275
- });
276
- }
277
- /**
278
- */
279
135
 
280
- }, {
281
- key: "getMissingAnchors",
282
- value: function getMissingAnchors() {
283
- var _this$data$missing$an,
284
- _this$data$missing,
285
- _this2 = this;
136
+ get label() {
137
+ return this.getContribution("label", "");
138
+ }
139
+ /**
140
+ * Get form level button labels
141
+ */
286
142
 
287
- var missingAnchors = (_this$data$missing$an = (_this$data$missing = this.data.missing) === null || _this$data$missing === void 0 ? void 0 : _this$data$missing.anchors) !== null && _this$data$missing$an !== void 0 ? _this$data$missing$an : []; // Add intermediate result data to anchor
288
143
 
289
- return _mapInstanceProperty(missingAnchors).call(missingAnchors, function (anchor) {
290
- if (_this2.data.results) {
291
- var _context6;
144
+ get buttonLabels() {
145
+ return this.getContribution("buttonLabels", {});
146
+ }
147
+ /**
148
+ * @returns button label from contributions;
149
+ */
292
150
 
293
- var resultObject = _findInstanceProperty(_context6 = _this2.data.results).call(_context6, function (result) {
294
- return result.objectid === anchor.objectid && "elements" in result;
295
- });
296
151
 
297
- if (resultObject) {
298
- anchor.results = resultObject.elements;
299
- }
300
- }
152
+ getButtonLabel(buttonType) {
153
+ var _this$currentFormObje, _this$currentFormObje2, _this$currentFormObje3;
301
154
 
302
- return _this2.addGlobalDynamicSchema(anchor, _this2.data.dynamicschema);
303
- });
304
- }
305
- /**
306
- * Create form object based on the data and contributions available in this form
307
- */
155
+ // cancel button labels are defined on the form
156
+ if (buttonType === "cancel") {
157
+ var _this$buttonLabels$ca, _this$buttonLabels;
308
158
 
309
- }, {
310
- key: "createFormObject",
311
- value: function createFormObject() {
312
- if (this.data && this.contributions) {
313
- var _missingAnchors$0$obj, _missingAnchors$, _this$contributions$o;
159
+ return (_this$buttonLabels$ca = (_this$buttonLabels = this.buttonLabels) === null || _this$buttonLabels === void 0 ? void 0 : _this$buttonLabels.cancel) !== null && _this$buttonLabels$ca !== void 0 ? _this$buttonLabels$ca : null;
160
+ } // all other form related button labels are defined on the object
314
161
 
315
- var missingAnchors = this.getMissingAnchors(); // Get object id from first anchor
316
162
 
317
- var objectId = (_missingAnchors$0$obj = missingAnchors === null || missingAnchors === void 0 ? void 0 : (_missingAnchors$ = missingAnchors[0]) === null || _missingAnchors$ === void 0 ? void 0 : _missingAnchors$.objectid) !== null && _missingAnchors$0$obj !== void 0 ? _missingAnchors$0$obj : "";
318
- var contributions = (_this$contributions$o = this.contributions.objects) === null || _this$contributions$o === void 0 ? void 0 : _this$contributions$o[objectId];
163
+ return (_this$currentFormObje = (_this$currentFormObje2 = this.currentFormObject) === null || _this$currentFormObje2 === void 0 ? void 0 : (_this$currentFormObje3 = _this$currentFormObje2.buttonLabels) === null || _this$currentFormObje3 === void 0 ? void 0 : _this$currentFormObje3[buttonType]) !== null && _this$currentFormObje !== void 0 ? _this$currentFormObje : null;
164
+ }
165
+ /**
166
+ * Get all applicable objects
167
+ */
319
168
 
320
- if (contributions) {
321
- return new FormObjectModel(missingAnchors[0], contributions);
322
- }
323
- }
324
169
 
325
- return null;
326
- }
327
- /**
328
- */
329
-
330
- }, {
331
- key: "addEmptyFormObject",
332
- value: function addEmptyFormObject() {
333
- var formObjectModel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.currentFormObject;
334
-
335
- if (formObjectModel) {
336
- var emptyFormObject = FormObjectModel.createEmpty(formObjectModel);
337
- emptyFormObject.repeatIndex = this.getHighestRepeatIndex(formObjectModel) + 1;
338
- this.addFormObject(emptyFormObject);
339
- }
340
- }
341
- /**
342
- */
343
-
344
- }, {
345
- key: "getHighestRepeatIndex",
346
- value: function getHighestRepeatIndex(formObjectModel) {
347
- var _context7, _context8;
348
-
349
- return Math.max.apply(Math, _toConsumableArray(_mapInstanceProperty(_context7 = _filterInstanceProperty(_context8 = this.allObjects).call(_context8, function (formObject) {
350
- return formObject.equals(formObjectModel, false);
351
- })).call(_context7, function (formObject) {
352
- return formObject.repeatIndex;
353
- })));
170
+ get allObjects() {
171
+ if (this.currentFormObject === null) {
172
+ return this.completedFormObjects;
354
173
  }
355
- /**
356
- */
357
-
358
- }, {
359
- key: "addFormObject",
360
- value: function addFormObject(formObjectModel) {
361
- if (!formObjectModel) {
362
- throw new IllegalArgumentException("Missing form object to add");
363
- }
364
174
 
365
- this.completedFormObjects = _toConsumableArray(this.allObjects);
366
- this.currentFormObject = formObjectModel;
367
- }
368
- /**
369
- * Retrieve a form object by the key
370
- */
175
+ return [...this.completedFormObjects, this.currentFormObject];
176
+ }
177
+ /**
178
+ */
371
179
 
372
- }, {
373
- key: "getFormObjectByKey",
374
- value: function getFormObjectByKey(key) {
375
- var _context9;
376
180
 
377
- return _findInstanceProperty(_context9 = this.allObjects).call(_context9, function (formObject) {
378
- return formObject.key === key;
379
- });
181
+ get objectKeys() {
182
+ if (has(this.contributions, "objects")) {
183
+ return _Object$keys(this.contributions.objects);
380
184
  }
381
- /**
382
- * Retrieve a form object by a layouthint
383
- */
384
185
 
385
- }, {
386
- key: "getFormObjectByLayoutHint",
387
- value: function getFormObjectByLayoutHint(hint) {
388
- var _context10;
186
+ return [];
187
+ }
188
+ /**
189
+ */
389
190
 
390
- return _findInstanceProperty(_context10 = this.allObjects).call(_context10, function (formObject) {
391
- return formObject.layouthint.has(hint);
392
- });
393
- }
394
- /**
395
- */
396
191
 
397
- }, {
398
- key: "removeFormObject",
399
- value: function removeFormObject(formObjectModel) {
400
- var _context11;
192
+ get numberOfExpectedQuestions() {
193
+ return this.objectKeys.length;
194
+ }
195
+ /**
196
+ * Has questions configured on form
197
+ */
198
+
401
199
 
402
- if (!formObjectModel) {
403
- throw new IllegalArgumentException("Missing form object to remove");
404
- }
200
+ get hasNoQuestionsConfigured() {
201
+ return this.isComplete && (this.objectKeys.length === 0 || !("missing" in this.data) && !("results" in this.data) && !("errors" in this.data));
202
+ }
203
+ /**
204
+ */
405
205
 
406
- if (formObjectModel.equals(this.currentFormObject)) {
407
- throw new IllegalArgumentException("Can not remove the current form object");
408
- }
409
206
 
410
- this.completedFormObjects = _filterInstanceProperty(_context11 = this.completedFormObjects).call(_context11, function (formObject) {
411
- return !formObject.equals(formObjectModel);
412
- });
413
- }
414
- /**
415
- */
207
+ addGlobalDynamicSchema(anchor, dynamicschema) {
208
+ var _context2;
416
209
 
417
- }, {
418
- key: "currentFormObject",
419
- get: function get() {
420
- return this._currentFormObject;
210
+ if (!dynamicschema) {
211
+ return anchor;
421
212
  }
422
- /**
423
- */
424
- ,
425
- set: function set(formObject) {
426
- this._currentFormObject = formObject;
427
- }
428
- /**
429
- * Completed objects are previously entered questions
430
- */
431
-
432
- }, {
433
- key: "completedFormObjects",
434
- get: function get() {
435
- return this._completedFormObjects;
436
- }
437
- /**
438
- */
439
- ,
440
- set: function set(formObjects) {
441
- this._completedFormObjects = formObjects;
442
- }
443
- /**
444
- * Previously entered objects are questions that have been entered before,
445
- * but are currently not applicable for the form.
446
- * For example because of previous navigation
447
- */
448
-
449
- }, {
450
- key: "previouslyEnteredFormObjects",
451
- get: function get() {
452
- return this._previouslyEnteredFormObjects;
453
- }
454
- /**
455
- */
456
- ,
457
- set: function set(formObjects) {
458
- this._previouslyEnteredFormObjects = formObjects;
459
- }
460
- /**
461
- * Handle end results
462
- */
463
213
 
464
- }, {
465
- key: "setEndResultFormObjects",
466
- value: function setEndResultFormObjects() {
467
- var _this3 = this;
214
+ return { ...anchor,
215
+ elements: _mapInstanceProperty(_context2 = anchor.elements).call(_context2, element => {
216
+ var _context3;
468
217
 
469
- if (this.data && this.data.results) {
470
- var _this$data$missing$an2, _this$data$missing2, _context12, _context13;
218
+ return { ...element,
219
+ dynamicschema: element.dynamicschema ? _mapInstanceProperty(_context3 = element.dynamicschema).call(_context3, item => ({ ...item,
220
+ elements: { ...item.elements,
221
+ dynamicschema
222
+ }
223
+ })) : null
224
+ };
225
+ })
226
+ };
227
+ }
228
+ /**
229
+ */
471
230
 
472
- var missingObjects = (_this$data$missing$an2 = (_this$data$missing2 = this.data.missing) === null || _this$data$missing2 === void 0 ? void 0 : _this$data$missing2.anchors) !== null && _this$data$missing$an2 !== void 0 ? _this$data$missing$an2 : [];
473
231
 
474
- var missingObjectIds = _mapInstanceProperty(missingObjects).call(missingObjects, function (anchor) {
475
- return anchor.objectid;
476
- }); // Filter out intermediate results and rename elements property to result property
232
+ getMissingAnchors() {
233
+ var _this$data$missing$an, _this$data$missing;
477
234
 
235
+ const missingAnchors = (_this$data$missing$an = (_this$data$missing = this.data.missing) === null || _this$data$missing === void 0 ? void 0 : _this$data$missing.anchors) !== null && _this$data$missing$an !== void 0 ? _this$data$missing$an : []; // Add intermediate result data to anchor
478
236
 
479
- var endResultAnchors = _mapInstanceProperty(_context12 = _filterInstanceProperty(_context13 = this.data.results).call(_context13, function (result) {
480
- return !_includesInstanceProperty(missingObjectIds).call(missingObjectIds, result.objectid);
481
- })).call(_context12, function (result) {
482
- var elements = result.elements,
483
- otherProps = _objectWithoutProperties(result, _excluded);
237
+ return _mapInstanceProperty(missingAnchors).call(missingAnchors, anchor => {
238
+ if (this.data.results) {
239
+ var _context4;
484
240
 
485
- return _objectSpread(_objectSpread({}, otherProps), {}, {
486
- results: elements
487
- });
488
- });
241
+ const resultObject = _findInstanceProperty(_context4 = this.data.results).call(_context4, result => result.objectid === anchor.objectid && "elements" in result);
489
242
 
490
- if (endResultAnchors.length > 0) {
491
- return _mapInstanceProperty(endResultAnchors).call(endResultAnchors, function (endResult) {
492
- return new FormObjectModel(endResult, _this3.contributions.objects[endResult.objectid]);
493
- });
243
+ if (resultObject) {
244
+ anchor.results = resultObject.elements;
494
245
  }
495
246
  }
496
247
 
497
- return [];
498
- }
499
- /**
500
- */
248
+ return this.addGlobalDynamicSchema(anchor, this.data.dynamicschema);
249
+ });
250
+ }
251
+ /**
252
+ * Create form object based on the data and contributions available in this form
253
+ */
501
254
 
502
- }, {
503
- key: "expectsEndResultFormObjects",
504
- get: function get() {
505
- var _context14,
506
- _this4 = this;
507
255
 
508
- var endResultKeys = _mapInstanceProperty(_context14 = this.endResultFormObjects).call(_context14, function (endResult) {
509
- return endResult.key;
510
- });
256
+ createFormObject() {
257
+ if (this.data && this.contributions) {
258
+ var _missingAnchors$0$obj, _missingAnchors$, _this$contributions$o;
511
259
 
512
- return this.objectKeys.some(function (objectKey) {
513
- var _this4$contributions$, _this4$contributions$2, _this4$contributions$3;
260
+ const missingAnchors = this.getMissingAnchors(); // Get object id from first anchor
514
261
 
515
- return ((_this4$contributions$ = _this4.contributions.objects) === null || _this4$contributions$ === void 0 ? void 0 : (_this4$contributions$2 = _this4$contributions$[objectKey]) === null || _this4$contributions$2 === void 0 ? void 0 : (_this4$contributions$3 = _this4$contributions$2.content) === null || _this4$contributions$3 === void 0 ? void 0 : _this4$contributions$3.results) && !_includesInstanceProperty(endResultKeys).call(endResultKeys, objectKey);
516
- });
517
- }
518
- /**
519
- */
262
+ const objectId = (_missingAnchors$0$obj = missingAnchors === null || missingAnchors === void 0 ? void 0 : (_missingAnchors$ = missingAnchors[0]) === null || _missingAnchors$ === void 0 ? void 0 : _missingAnchors$.objectid) !== null && _missingAnchors$0$obj !== void 0 ? _missingAnchors$0$obj : "";
263
+ const contributions = (_this$contributions$o = this.contributions.objects) === null || _this$contributions$o === void 0 ? void 0 : _this$contributions$o[objectId];
520
264
 
521
- }, {
522
- key: "endResultFormObjects",
523
- get: function get() {
524
- return this._endResultFormObjects;
525
- }
526
- /**
527
- */
528
- ,
529
- set:
530
- /**
531
- */
532
- function set(endResultFormObjects) {
533
- var _context15;
534
-
535
- this.previousEndResultKeys = _mapInstanceProperty(_context15 = this.endResultFormObjects).call(_context15, function (endResult) {
536
- return endResult.key;
537
- });
538
- this._endResultFormObjects = endResultFormObjects;
265
+ if (contributions) {
266
+ return new FormObjectModel(missingAnchors[0], contributions);
267
+ }
539
268
  }
540
- /**
541
- */
542
269
 
543
- }, {
544
- key: "getEndResultFormObjects",
545
- value: function getEndResultFormObjects() {
546
- var _context16,
547
- _this5 = this;
270
+ return null;
271
+ }
272
+ /**
273
+ */
548
274
 
549
- return _filterInstanceProperty(_context16 = this.endResultFormObjects).call(_context16, function (endResult) {
550
- var _context17;
551
275
 
552
- return !_includesInstanceProperty(_context17 = _this5.previousEndResultKeys).call(_context17, endResult.key);
553
- });
554
- }
555
- }, {
556
- key: "previousEndResultKeys",
557
- get: function get() {
558
- return this._previousEndResultKeys;
559
- }
560
- /**
561
- */
562
- ,
563
- set: function set(endResultFormObjectKeys) {
564
- this._previousEndResultKeys = endResultFormObjectKeys;
276
+ addEmptyFormObject() {
277
+ let formObjectModel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.currentFormObject;
278
+
279
+ if (formObjectModel) {
280
+ const emptyFormObject = FormObjectModel.createEmpty(formObjectModel);
281
+ emptyFormObject.repeatIndex = this.getHighestRepeatIndex(formObjectModel) + 1;
282
+ this.addFormObject(emptyFormObject);
565
283
  }
566
- /**
567
- * Error handling
568
- */
569
-
570
- }, {
571
- key: "isValid",
572
- get: function get() {
573
- var _this6 = this;
574
-
575
- if (this.currentFormObject) {
576
- var _this$currentFormObje4, _this$currentFormObje5;
577
-
578
- if (this.currentFormObject.isRepeatable) {
579
- var _context18, _context19;
580
-
581
- // repeating objects need at least one valid form object
582
- var hasOneValidQuestion = _findInstanceProperty(_context18 = _filterInstanceProperty(_context19 = this.allObjects).call(_context19, function (object) {
583
- return object.equals(_this6.currentFormObject, false);
584
- })).call(_context18, function (object) {
585
- return object.isValid;
586
- });
587
-
588
- if (hasOneValidQuestion) {
589
- return true;
590
- }
591
- }
284
+ }
285
+ /**
286
+ */
592
287
 
593
- return (_this$currentFormObje4 = (_this$currentFormObje5 = this.currentFormObject) === null || _this$currentFormObje5 === void 0 ? void 0 : _this$currentFormObje5.isValid) !== null && _this$currentFormObje4 !== void 0 ? _this$currentFormObje4 : true;
594
- }
595
288
 
596
- return true;
597
- }
598
- /**
599
- */
600
-
601
- }, {
602
- key: "hasServerErrors",
603
- value: function hasServerErrors() {
604
- if (this.errorCollection.hasItems) {
605
- return true;
606
- }
289
+ getHighestRepeatIndex(formObjectModel) {
290
+ var _context5, _context6;
607
291
 
608
- if (this.currentFormObject) {
609
- return this.currentFormObject.hasServerErrors();
610
- }
292
+ return Math.max(..._mapInstanceProperty(_context5 = _filterInstanceProperty(_context6 = this.allObjects).call(_context6, formObject => formObject.equals(formObjectModel, false))).call(_context5, formObject => formObject.repeatIndex));
293
+ }
294
+ /**
295
+ */
611
296
 
612
- return false;
297
+
298
+ addFormObject(formObjectModel) {
299
+ if (!formObjectModel) {
300
+ throw new IllegalArgumentException("Missing form object to add");
613
301
  }
614
- /**
615
- */
616
-
617
- }, {
618
- key: "hasErrors",
619
- value: function hasErrors() {
620
- if (this.errorCollection.hasItems) {
621
- return true;
622
- }
623
302
 
624
- if (this.currentFormObject) {
625
- return this.currentFormObject.hasErrors();
626
- }
303
+ this.completedFormObjects = [...this.allObjects];
304
+ this.currentFormObject = formObjectModel;
305
+ }
306
+ /**
307
+ * Retrieve a form object by the key
308
+ */
627
309
 
628
- return false;
629
- }
630
- /**
631
- * Add an error to the error collection of this form
632
- */
633
-
634
- }, {
635
- key: "addServerError",
636
- value: function addServerError(error) {
637
- if (error.parameters) {
638
- this.errorCollection.addServerError(error.id, error.message, error.parameters);
639
- } else {
640
- this.errorCollection.addServerError(error.id, error.message);
641
- }
642
- }
643
- /**
644
- * Reset error messages
645
- */
646
310
 
647
- }, {
648
- key: "resetErrors",
649
- value: function resetErrors() {
650
- this._errorCollection = new ErrorCollection("form");
311
+ getFormObjectByKey(key) {
312
+ var _context7;
651
313
 
652
- if (this.currentFormObject) {
653
- this.currentFormObject.resetErrors();
654
- }
655
- }
656
- /**
657
- */
314
+ return _findInstanceProperty(_context7 = this.allObjects).call(_context7, formObject => formObject.key === key);
315
+ }
316
+ /**
317
+ * Retrieve a form object by a layouthint
318
+ */
658
319
 
659
- }, {
660
- key: "errorCollection",
661
- get: function get() {
662
- return this._errorCollection;
663
- }
664
- /**
665
- */
666
- ,
667
- set: function set(errorCollection) {
668
- this._errorCollection = errorCollection;
669
- }
670
- /**
671
- * Indicates if the form needs to be committed
672
- */
673
-
674
- }, {
675
- key: "commit",
676
- get: function get() {
677
- return this._commit || false;
678
- }
679
- /**
680
- */
681
- ,
682
- set: function set(commit) {
683
- this._commit = commit;
684
- }
685
- /**
686
- * Inidicates if form is finished: Form is completely entered and committed
687
- */
688
-
689
- }, {
690
- key: "isFinished",
691
- get: function get() {
692
- return this._isFinished || "success" in this.data;
693
- }
694
- /**
695
- */
696
- ,
697
- set: function set(isFinished) {
698
- this._isFinished = isFinished;
699
- }
700
- /**
701
- * Indicates if form is completely entered
702
- */
703
-
704
- }, {
705
- key: "isComplete",
706
- get: function get() {
707
- return this._isComplete;
708
- }
709
- /**
710
- */
711
- ,
712
- set: function set(isComplete) {
713
- this._isComplete = isComplete;
714
- }
715
- /**
716
- * Handle success redirects
717
- */
718
-
719
- }, {
720
- key: "successRedirect",
721
- get: function get() {
722
- return this.isFinished && this.data.success ? new Href(this.data.success.redirect) : null;
723
- }
724
- /**
725
- */
726
320
 
727
- }, {
728
- key: "redirectLocation",
729
- get: function get() {
730
- return this._redirectLocation || this.successRedirect;
731
- }
732
- /**
733
- */
321
+ getFormObjectByLayoutHint(hint) {
322
+ var _context8;
734
323
 
735
- }, {
736
- key: "getSuccessData",
737
- value: function getSuccessData() {
738
- var _this$data$success;
324
+ return _findInstanceProperty(_context8 = this.allObjects).call(_context8, formObject => formObject.layouthint.has(hint));
325
+ }
326
+ /**
327
+ */
739
328
 
740
- return (_this$data$success = this.data.success) === null || _this$data$success === void 0 ? void 0 : _this$data$success.data;
741
- }
742
- /**
743
- * Href handling
744
- */
745
-
746
- }, {
747
- key: "setParameters",
748
- value: function setParameters(modularuiResponse) {
749
- var _modularuiResponse$pa;
750
-
751
- var parameters = (_modularuiResponse$pa = modularuiResponse === null || modularuiResponse === void 0 ? void 0 : modularuiResponse.parameters) !== null && _modularuiResponse$pa !== void 0 ? _modularuiResponse$pa : [];
752
- return _mapInstanceProperty(parameters).call(parameters, function (par) {
753
- return new Parameter(par._prefix, par._name, par._value);
754
- });
755
- }
756
- /**
757
- */
758
329
 
759
- }, {
760
- key: "parameters",
761
- get: function get() {
762
- return this._parameters;
763
- }
764
- /**
765
- */
766
- ,
767
- set: function set(parameters) {
768
- this._parameters = parameters;
330
+ removeFormObject(formObjectModel) {
331
+ var _context9;
332
+
333
+ if (!formObjectModel) {
334
+ throw new IllegalArgumentException("Missing form object to remove");
769
335
  }
770
- /**
771
- */
772
-
773
- }, {
774
- key: "selfhrefNoCommitParam",
775
- value: function selfhrefNoCommitParam() {
776
- var _context20;
777
-
778
- var selfhref = this.selflink.href;
779
- selfhref.method = HTTP_METHODS.POST;
780
- selfhref.parameters = _filterInstanceProperty(_context20 = this.parameters).call(_context20, function (parameter) {
781
- return parameter.name !== "commit";
782
- });
783
- return selfhref;
336
+
337
+ if (formObjectModel.equals(this.currentFormObject)) {
338
+ throw new IllegalArgumentException("Can not remove the current form object");
784
339
  }
785
- /**
786
- */
787
340
 
788
- }, {
789
- key: "selfhrefWithCommitParam",
790
- value: function selfhrefWithCommitParam() {
791
- var selfhref = this.selfhrefNoCommitParam();
341
+ this.completedFormObjects = _filterInstanceProperty(_context9 = this.completedFormObjects).call(_context9, formObject => !formObject.equals(formObjectModel));
342
+ }
343
+ /**
344
+ */
792
345
 
793
- if (this.expectsEndResultFormObjects && !this.isComplete && !this.commit) {
794
- selfhref.addParameter("commit", "false");
795
- }
796
346
 
797
- return selfhref;
798
- }
799
- /**
800
- * Create a selfhref including the parameters that are used to start this form
801
- */
802
-
803
- }, {
804
- key: "selfhref",
805
- get: function get() {
806
- if (!this.selflink) {
807
- throw new Error("No self link found for form");
808
- }
347
+ get currentFormObject() {
348
+ return this._currentFormObject;
349
+ }
350
+ /**
351
+ */
809
352
 
810
- if (getSetting("ALWAYS_COMMIT_FORM")) {
811
- return this.selfhrefNoCommitParam();
812
- }
813
353
 
814
- return this.selfhrefWithCommitParam();
815
- }
816
- /**
817
- * Handle form tokens to indicate concurrent form use
818
- */
354
+ set currentFormObject(formObject) {
355
+ this._currentFormObject = formObject;
356
+ }
357
+ /**
358
+ * Completed objects are previously entered questions
359
+ */
819
360
 
820
- }, {
821
- key: "tokens",
822
- get: function get() {
823
- if (!this._tokens) {
824
- var _this$data$tokens;
825
361
 
826
- this._tokens = (_this$data$tokens = this.data.tokens) !== null && _this$data$tokens !== void 0 ? _this$data$tokens : [];
827
- }
362
+ get completedFormObjects() {
363
+ return this._completedFormObjects;
364
+ }
365
+ /**
366
+ */
828
367
 
829
- return this._tokens;
830
- }
831
- /**
832
- * Replaces all tokens with the given collection of tokens
833
- */
834
- ,
835
- set: function set(tokens) {
836
- this._tokens = tokens;
837
- }
838
- /**
839
- * Removes all tokens from the form
840
- */
841
-
842
- }, {
843
- key: "removeTokens",
844
- value: function removeTokens() {
845
- this._tokens = [];
846
- }
847
- /**
848
- * Keep track of changed form
849
- */
850
-
851
- }, {
852
- key: "isChanged",
853
- value: function isChanged() {
854
- return this.currentFormObject !== null && this.currentFormObject.isChangedSince(this.lastUpdate);
855
- }
856
- /**
857
- */
858
368
 
859
- }, {
860
- key: "lastUpdate",
861
- get: function get() {
862
- return this._lastUpdate;
863
- }
864
- /**
865
- */
866
- ,
867
- set: function set(lastUpdate) {
868
- this._lastUpdate = lastUpdate;
869
- }
870
- /**
871
- */
872
-
873
- }, {
874
- key: "getFormDataObjects",
875
- value: function getFormDataObjects() {
876
- var _context21,
877
- _this7 = this;
878
-
879
- var validOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
880
- var validationData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
881
- var formdata = [];
882
-
883
- var formObjects = _filterInstanceProperty(_context21 = this.allObjects).call(_context21, function (formObject, index) {
884
- // repeatabe object without fixed nr of repeats, remove last form object from formdata,
885
- // because this is the formobject that is used as a placeholder for the create object
886
- // of the collection of repeats
887
- if (formObject.isRepeatable && !formObject.hasFixedNrOfRepeats) {
888
- var isLastRepeat = index === _this7.allObjects.length - 1 || _this7.allObjects[index + 1].key !== formObject.key;
889
-
890
- if (isLastRepeat) {
891
- return false;
892
- }
893
- }
369
+ set completedFormObjects(formObjects) {
370
+ this._completedFormObjects = formObjects;
371
+ }
372
+ /**
373
+ * Previously entered objects are questions that have been entered before,
374
+ * but are currently not applicable for the form.
375
+ * For example because of previous navigation
376
+ */
894
377
 
895
- return formObject.isValid || !validOnly;
896
- });
897
378
 
898
- formObjects.forEach(function (formObject) {
899
- var objectFormData = formObject.getFormData(validationData);
379
+ get previouslyEnteredFormObjects() {
380
+ return this._previouslyEnteredFormObjects;
381
+ }
382
+ /**
383
+ */
900
384
 
901
- var existingObjectIndex = _findIndexInstanceProperty(formdata).call(formdata, function (obj) {
902
- return obj.key === formObject.key && obj.repeatIndex === formObject.repeatIndex;
903
- });
904
- /*
905
- * when the object already exists in the formdata with the same key and index,
906
- * merge the attributes of both objects together
907
- */
908
385
 
386
+ set previouslyEnteredFormObjects(formObjects) {
387
+ this._previouslyEnteredFormObjects = formObjects;
388
+ }
389
+ /**
390
+ * Handle end results
391
+ */
909
392
 
910
- if (existingObjectIndex > -1) {
911
- formdata[existingObjectIndex].formdata = deepmerge(formdata[existingObjectIndex].formdata, objectFormData);
912
- } else {
913
- formdata.push({
914
- key: formObject.key,
915
- repeatIndex: formObject.repeatIndex,
916
- formdata: objectFormData
917
- });
918
- }
919
- });
920
- return _mapInstanceProperty(formdata).call(formdata, function (obj) {
921
- return _defineProperty({}, obj.key, obj.formdata);
922
- });
923
- }
924
- /**
925
- */
926
-
927
- }, {
928
- key: "getFormData",
929
- value: function getFormData() {
930
- var validOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
931
- var withConcurrencyToken = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
932
- var validationData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
933
-
934
- if (withConcurrencyToken && this.tokens.length > 0) {
935
- return _JSON$stringify({
936
- objects: this.getFormDataObjects(validOnly, validationData),
937
- tokens: this.tokens
938
- });
939
- }
940
393
 
941
- return _JSON$stringify({
942
- objects: this.getFormDataObjects(validOnly, validationData)
943
- });
944
- }
945
- /**
946
- * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION
947
- */
948
-
949
- }, {
950
- key: "setUseClientsideValidation",
951
- value: function setUseClientsideValidation(enabled) {
952
- this._useClientsideValidation = enabled;
953
- this.allObjects.forEach(function (formObject) {
954
- formObject.attributeCollection.all.forEach(function (item) {
955
- return item.setUseClientsideValidation(enabled);
956
- });
394
+ setEndResultFormObjects() {
395
+ if (this.data && this.data.results) {
396
+ var _this$data$missing$an2, _this$data$missing2, _context10, _context11;
397
+
398
+ const missingObjects = (_this$data$missing$an2 = (_this$data$missing2 = this.data.missing) === null || _this$data$missing2 === void 0 ? void 0 : _this$data$missing2.anchors) !== null && _this$data$missing$an2 !== void 0 ? _this$data$missing$an2 : [];
399
+
400
+ const missingObjectIds = _mapInstanceProperty(missingObjects).call(missingObjects, anchor => anchor.objectid); // Filter out intermediate results and rename elements property to result property
401
+
402
+
403
+ const endResultAnchors = _mapInstanceProperty(_context10 = _filterInstanceProperty(_context11 = this.data.results).call(_context11, result => !_includesInstanceProperty(missingObjectIds).call(missingObjectIds, result.objectid))).call(_context10, result => {
404
+ const {
405
+ elements,
406
+ ...otherProps
407
+ } = result;
408
+ return { ...otherProps,
409
+ results: elements
410
+ };
957
411
  });
412
+
413
+ if (endResultAnchors.length > 0) {
414
+ return _mapInstanceProperty(endResultAnchors).call(endResultAnchors, endResult => new FormObjectModel(endResult, this.contributions.objects[endResult.objectid]));
415
+ }
958
416
  }
959
- /**
960
- * Indicates if client side validation is enabled
961
- * @returns {boolean}
962
- */
963
417
 
964
- }, {
965
- key: "useClientsideValidation",
966
- value: function useClientsideValidation() {
967
- var _this$_useClientsideV;
418
+ return [];
419
+ }
420
+ /**
421
+ */
968
422
 
969
- return (_this$_useClientsideV = this._useClientsideValidation) !== null && _this$_useClientsideV !== void 0 ? _this$_useClientsideV : true;
970
- }
971
- /**
972
- * Get form data for submitting
973
- */
974
-
975
- }, {
976
- key: "formdata",
977
- get: function get() {
978
- return this.getFormData(this.useClientsideValidation());
979
- }
980
- /**
981
- */
982
423
 
983
- }, {
984
- key: "validationData",
985
- get: function get() {
986
- return this.getFormData(false, false, true);
987
- }
988
- /**
989
- * Form navigation: Go one object back (previous button)
990
- */
991
-
992
- }, {
993
- key: "hasPreviousStep",
994
- get: function get() {
995
- var _context22;
996
-
997
- var currentFormObjectKey = this.currentFormObject != null ? this.currentFormObject.key : "";
998
- return _filterInstanceProperty(_context22 = this.completedFormObjects).call(_context22, function (formObject) {
999
- return !formObject.isRepeatWithUnknownTotal || formObject.key !== currentFormObjectKey;
1000
- }).length > 0;
1001
- }
1002
- /**
1003
- * Go one form-object back,
1004
- * for repeating object this means go back
1005
- * until we get at a form object that had
1006
- * a different key than the current form object
1007
- */
1008
-
1009
- }, {
1010
- key: "setPreviousObject",
1011
- value: function setPreviousObject() {
1012
- var _context24,
1013
- _context25,
1014
- _context26,
1015
- _this8 = this,
1016
- _context27,
1017
- _context28;
1018
-
1019
- this.isComplete = false;
1020
- var oldCurrentFormObject = this.currentFormObject;
1021
-
1022
- if (this.currentFormObject !== null) {
1023
- var _context23;
1024
-
1025
- this.previouslyEnteredFormObjects = _concatInstanceProperty(_context23 = [this.currentFormObject]).call(_context23, _toConsumableArray(this.previouslyEnteredFormObjects));
1026
- }
424
+ get expectsEndResultFormObjects() {
425
+ var _context12;
1027
426
 
1028
- this.currentFormObject = this.completedFormObjects[this.completedFormObjects.length - 1];
1029
- this.completedFormObjects = _sliceInstanceProperty(_context24 = this.completedFormObjects).call(_context24, 0, -1);
427
+ const endResultKeys = _mapInstanceProperty(_context12 = this.endResultFormObjects).call(_context12, endResult => endResult.key);
1030
428
 
1031
- var completedFormObjectKeys = _filterInstanceProperty(_context25 = _mapInstanceProperty(_context26 = this.completedFormObjects).call(_context26, function (formObject) {
1032
- return formObject.key;
1033
- })).call(_context25, function (formObjectKey) {
1034
- var _this8$currentFormObj;
429
+ return this.objectKeys.some(objectKey => {
430
+ var _this$contributions$o2, _this$contributions$o3, _this$contributions$o4;
1035
431
 
1036
- return formObjectKey !== ((_this8$currentFormObj = _this8.currentFormObject) === null || _this8$currentFormObj === void 0 ? void 0 : _this8$currentFormObj.key);
1037
- });
432
+ return ((_this$contributions$o2 = this.contributions.objects) === null || _this$contributions$o2 === void 0 ? void 0 : (_this$contributions$o3 = _this$contributions$o2[objectKey]) === null || _this$contributions$o3 === void 0 ? void 0 : (_this$contributions$o4 = _this$contributions$o3.content) === null || _this$contributions$o4 === void 0 ? void 0 : _this$contributions$o4.results) && !_includesInstanceProperty(endResultKeys).call(endResultKeys, objectKey);
433
+ });
434
+ }
435
+ /**
436
+ */
1038
437
 
1039
- this.endResultFormObjects = _filterInstanceProperty(_context27 = this._endResultFormObjects).call(_context27, function (endResult) {
1040
- return _includesInstanceProperty(completedFormObjectKeys).call(completedFormObjectKeys, endResult.key);
1041
- });
1042
- this.previousEndResultKeys = _mapInstanceProperty(_context28 = this.endResultFormObjects).call(_context28, function (endResult) {
1043
- return endResult.key;
1044
- }); // while we are at the same repeating form object, go a step back
1045
438
 
1046
- if (this.currentFormObject && this.currentFormObject.equals(oldCurrentFormObject, this.currentFormObject.hasFixedNrOfRepeats)) {
1047
- this.setPreviousObject();
1048
- }
1049
- }
1050
- /**
1051
- * Form navigation: has next step or is last
1052
- */
439
+ get endResultFormObjects() {
440
+ return this._endResultFormObjects;
441
+ }
442
+ /**
443
+ */
1053
444
 
1054
- }, {
1055
- key: "hasNextStep",
1056
- get: function get() {
1057
- var _context29,
1058
- _this9 = this;
1059
445
 
1060
- if (this.isComplete || this.isFinished || this.hasNoQuestionsConfigured || !this.contributions.objects) {
1061
- return false;
1062
- } // current object is a dynamic object
446
+ getEndResultFormObjects() {
447
+ var _context13;
1063
448
 
449
+ return _filterInstanceProperty(_context13 = this.endResultFormObjects).call(_context13, endResult => {
450
+ var _context14;
1064
451
 
1065
- if (this.currentFormObject && this.currentFormObject.isDynamic) {
1066
- return true;
1067
- }
452
+ return !_includesInstanceProperty(_context14 = this.previousEndResultKeys).call(_context14, endResult.key);
453
+ });
454
+ }
455
+ /**
456
+ */
1068
457
 
1069
- if (this.expectsEndResultFormObjects) {
1070
- return true;
1071
- }
1072
458
 
1073
- var currentObjectIndex = _findIndexInstanceProperty(_context29 = this.objectKeys).call(_context29, function (objectKey) {
1074
- var _this9$currentFormObj;
459
+ set endResultFormObjects(endResultFormObjects) {
460
+ var _context15;
461
+
462
+ this.previousEndResultKeys = _mapInstanceProperty(_context15 = this.endResultFormObjects).call(_context15, endResult => endResult.key);
463
+ this._endResultFormObjects = endResultFormObjects;
464
+ }
465
+ /**
466
+ */
1075
467
 
1076
- return objectKey === ((_this9$currentFormObj = _this9.currentFormObject) === null || _this9$currentFormObj === void 0 ? void 0 : _this9$currentFormObj.key);
1077
- });
1078
468
 
1079
- var isLastObject = this.objectKeys.length - 1 === currentObjectIndex; // current object is a repeating question but it is not the last one
469
+ get previousEndResultKeys() {
470
+ return this._previousEndResultKeys;
471
+ }
472
+ /**
473
+ */
1080
474
 
1081
- if (isLastObject && this.currentFormObject && this.currentFormObject.isRepeatable && !this.currentFormObject.isLastRepeat) {
1082
- return true;
1083
- } // current object is not repeatable and the last object
1084
475
 
476
+ set previousEndResultKeys(endResultFormObjectKeys) {
477
+ this._previousEndResultKeys = endResultFormObjectKeys;
478
+ }
479
+ /**
480
+ * Error handling
481
+ */
1085
482
 
1086
- if (isLastObject) {
1087
- return false;
1088
- } // can't determine if this is te last, render a next button
1089
483
 
484
+ get isValid() {
485
+ if (this.currentFormObject) {
486
+ var _this$currentFormObje4, _this$currentFormObje5;
1090
487
 
1091
- return true;
1092
- }
1093
- /**
1094
- * Merge existing form with new form
1095
- */
1096
-
1097
- }, {
1098
- key: "update",
1099
- value: function update(receivedForm) {
1100
- if (receivedForm instanceof FormModel) {
1101
- var _receivedForm$data;
1102
-
1103
- this.resetErrors();
1104
- this.lastUpdate = Date.now();
1105
- this.lastServerUpdate = receivedForm.lastServerUpdate;
1106
- this.tokens = receivedForm.tokens;
1107
- this.isComplete = receivedForm.isComplete;
1108
- this.isFinished = receivedForm.isFinished;
1109
- var receivedFormData = (_receivedForm$data = receivedForm.data) !== null && _receivedForm$data !== void 0 ? _receivedForm$data : {};
1110
- var hasMissing = has(receivedFormData, "missing");
1111
- var hasErrors = has(receivedFormData, "errors");
1112
-
1113
- if (!hasMissing && !hasErrors) {
1114
- this.handleFinished(receivedForm);
1115
- }
488
+ if (this.currentFormObject.isRepeatable) {
489
+ var _context16, _context17;
1116
490
 
1117
- if (hasErrors) {
1118
- this.handleErrors(receivedForm);
1119
- }
491
+ // repeating objects need at least one valid form object
492
+ const hasOneValidQuestion = _findInstanceProperty(_context16 = _filterInstanceProperty(_context17 = this.allObjects).call(_context17, object => object.equals(this.currentFormObject, false))).call(_context16, object => object.isValid);
1120
493
 
1121
- if (hasMissing) {
1122
- this.handleMissing(receivedForm);
494
+ if (hasOneValidQuestion) {
495
+ return true;
1123
496
  }
1124
497
  }
1125
498
 
1126
- return this;
499
+ return (_this$currentFormObje4 = (_this$currentFormObje5 = this.currentFormObject) === null || _this$currentFormObje5 === void 0 ? void 0 : _this$currentFormObje5.isValid) !== null && _this$currentFormObje4 !== void 0 ? _this$currentFormObje4 : true;
1127
500
  }
1128
- /**
1129
- */
1130
-
1131
- }, {
1132
- key: "updateValidations",
1133
- value: function updateValidations(data) {
1134
- if (this.currentFormObject) {
1135
- this.currentFormObject.updateValidations(data);
1136
- }
1137
501
 
1138
- return this;
1139
- }
1140
- /**
1141
- * Process finished form
1142
- */
1143
-
1144
- }, {
1145
- key: "handleFinished",
1146
- value: function handleFinished(receivedForm) {
1147
- if (this.currentFormObject) {
1148
- var _context30;
502
+ return true;
503
+ }
504
+ /**
505
+ */
1149
506
 
1150
- this.completedFormObjects = _concatInstanceProperty(_context30 = []).call(_context30, _toConsumableArray(this.completedFormObjects), [this.currentFormObject]);
1151
- }
1152
507
 
1153
- this.currentFormObject = receivedForm.currentFormObject;
1154
- this.endResultFormObjects = receivedForm.endResultFormObjects;
1155
- this._data = receivedForm._data;
508
+ hasServerErrors() {
509
+ if (this.errorCollection.hasItems) {
510
+ return true;
1156
511
  }
1157
- /**
1158
- */
1159
-
1160
- }, {
1161
- key: "handleRootErrors",
1162
- value: function handleRootErrors(errors) {
1163
- var _this10 = this;
1164
-
1165
- _filterInstanceProperty(errors).call(errors, function (error) {
1166
- return !error.anchor;
1167
- }).forEach(function (error) {
1168
- _this10.errorCollection.addServerError(error.id, error.message, error.properties);
1169
- });
512
+
513
+ if (this.currentFormObject) {
514
+ return this.currentFormObject.hasServerErrors();
1170
515
  }
1171
- /**
1172
- * Process errors from received form
1173
- */
1174
-
1175
- }, {
1176
- key: "handleErrors",
1177
- value: function handleErrors(receivedForm) {
1178
- var _this11 = this;
1179
-
1180
- var errorAnchors = receivedForm.data.errors;
1181
-
1182
- if (errorAnchors) {
1183
- errorAnchors.forEach(function (error) {
1184
- if (error.anchor && _this11.currentFormObject && _this11.currentFormObject.key === error.anchor.objectid) {
1185
- _this11.currentFormObject.addServerError(error);
1186
- } else {
1187
- _this11.errorCollection.addServerError(error.id, error.message, error.properties);
1188
- }
1189
- });
1190
- }
516
+
517
+ return false;
518
+ }
519
+ /**
520
+ */
521
+
522
+
523
+ hasErrors() {
524
+ if (this.errorCollection.hasItems) {
525
+ return true;
1191
526
  }
1192
- /**
1193
- * Process missing from received form
1194
- */
1195
-
1196
- }, {
1197
- key: "handleMissing",
1198
- value: function handleMissing(receivedForm) {
1199
- if (this.currentFormObject && this.currentFormObject.equals(receivedForm.currentFormObject)) {
1200
- this.handleMissingErrors(receivedForm);
1201
- } else {
1202
- this.handleNewFormObject(receivedForm);
1203
- }
527
+
528
+ if (this.currentFormObject) {
529
+ return this.currentFormObject.hasErrors();
1204
530
  }
1205
- /**
1206
- * Received missing anchors in the response with an object id that is the current form object
1207
- */
1208
531
 
1209
- }, {
1210
- key: "processMissingErrors",
1211
- value: function processMissingErrors(receivedForm) {
1212
- var _context31;
532
+ return false;
533
+ }
534
+ /**
535
+ * Add an error to the error collection of this form
536
+ */
537
+
1213
538
 
1214
- if (this.currentFormObject === null) {
1215
- return null;
1216
- }
539
+ addServerError(error) {
540
+ if (error.parameters) {
541
+ this.errorCollection.addServerError(error.id, error.message, error.parameters);
542
+ } else {
543
+ this.errorCollection.addServerError(error.id, error.message);
544
+ }
545
+ }
546
+ /**
547
+ * Reset error messages
548
+ */
1217
549
 
1218
- _mapInstanceProperty(_context31 = this.currentFormObject.attributeCollection).call(_context31, function (attribute) {
1219
- if (receivedForm.currentFormObject && receivedForm.currentFormObject.hasAttributeByKey(attribute.key)) {
1220
- attribute.addMissingError();
1221
- } else {
1222
- attribute.removeMissingError();
1223
- }
1224
550
 
1225
- return attribute;
1226
- });
551
+ resetErrors() {
552
+ this._errorCollection = new ErrorCollection("form");
1227
553
 
1228
- return this.currentFormObject;
554
+ if (this.currentFormObject) {
555
+ this.currentFormObject.resetErrors();
1229
556
  }
1230
- /**
1231
- */
557
+ }
558
+ /**
559
+ */
560
+
561
+
562
+ get errorCollection() {
563
+ return this._errorCollection;
564
+ }
565
+ /**
566
+ */
567
+
568
+
569
+ set errorCollection(errorCollection) {
570
+ this._errorCollection = errorCollection;
571
+ }
572
+ /**
573
+ * Indicates if the form needs to be committed
574
+ */
575
+
576
+
577
+ get commit() {
578
+ return this._commit || false;
579
+ }
580
+ /**
581
+ */
582
+
583
+
584
+ set commit(commit) {
585
+ this._commit = commit;
586
+ }
587
+ /**
588
+ * Inidicates if form is finished: Form is completely entered and committed
589
+ */
590
+
591
+
592
+ get isFinished() {
593
+ return this._isFinished || "success" in this.data;
594
+ }
595
+ /**
596
+ */
597
+
598
+
599
+ set isFinished(isFinished) {
600
+ this._isFinished = isFinished;
601
+ }
602
+ /**
603
+ * Indicates if form is completely entered
604
+ */
605
+
606
+
607
+ get isComplete() {
608
+ return this._isComplete;
609
+ }
610
+ /**
611
+ */
612
+
613
+
614
+ set isComplete(isComplete) {
615
+ this._isComplete = isComplete;
616
+ }
617
+ /**
618
+ * Handle success redirects
619
+ */
620
+
621
+
622
+ get successRedirect() {
623
+ return this.isFinished && this.data.success ? new Href(this.data.success.redirect) : null;
624
+ }
625
+ /**
626
+ */
627
+
628
+
629
+ get redirectLocation() {
630
+ return this._redirectLocation || this.successRedirect;
631
+ }
632
+ /**
633
+ */
634
+
635
+
636
+ getSuccessData() {
637
+ var _this$data$success;
1232
638
 
1233
- }, {
1234
- key: "handleMissingErrors",
1235
- value: function handleMissingErrors(receivedForm) {
1236
- this.currentFormObject = this.processMissingErrors(receivedForm);
639
+ return (_this$data$success = this.data.success) === null || _this$data$success === void 0 ? void 0 : _this$data$success.data;
640
+ }
641
+ /**
642
+ * Href handling
643
+ */
644
+
645
+
646
+ setParameters(modularuiResponse) {
647
+ var _modularuiResponse$pa;
648
+
649
+ const parameters = (_modularuiResponse$pa = modularuiResponse === null || modularuiResponse === void 0 ? void 0 : modularuiResponse.parameters) !== null && _modularuiResponse$pa !== void 0 ? _modularuiResponse$pa : [];
650
+ return _mapInstanceProperty(parameters).call(parameters, par => new Parameter(par._prefix, par._name, par._value));
651
+ }
652
+ /**
653
+ */
654
+
655
+
656
+ get parameters() {
657
+ return this._parameters;
658
+ }
659
+ /**
660
+ */
661
+
662
+
663
+ set parameters(parameters) {
664
+ this._parameters = parameters;
665
+ }
666
+ /**
667
+ */
668
+
669
+
670
+ selfhrefNoCommitParam() {
671
+ var _context18;
672
+
673
+ const selfhref = this.selflink.href;
674
+ selfhref.method = HTTP_METHODS.POST;
675
+ selfhref.parameters = _filterInstanceProperty(_context18 = this.parameters).call(_context18, parameter => parameter.name !== "commit");
676
+ return selfhref;
677
+ }
678
+ /**
679
+ */
680
+
681
+
682
+ selfhrefWithCommitParam() {
683
+ const selfhref = this.selfhrefNoCommitParam();
684
+
685
+ if (this.expectsEndResultFormObjects && !this.isComplete && !this.commit) {
686
+ selfhref.addParameter("commit", "false");
1237
687
  }
1238
- /**
1239
- */
1240
-
1241
- }, {
1242
- key: "handleNewFormObject",
1243
- value: function handleNewFormObject(receivedForm) {
1244
- this.endResultFormObjects = receivedForm.endResultFormObjects;
1245
- var receivedCurrentFormObject = receivedForm.currentFormObject;
1246
-
1247
- if (receivedCurrentFormObject === null) {
1248
- this.completedFormObjects = _toConsumableArray(this.allObjects);
1249
- this.currentFormObject = null;
1250
- } else {
1251
- var _context32;
1252
688
 
1253
- // check if received form exists in the previously entered form objects
1254
- var previouslyEnteredFormObjects = _filterInstanceProperty(_context32 = this.previouslyEnteredFormObjects).call(_context32, function (formObject) {
1255
- return formObject.equals(receivedCurrentFormObject, formObject.hasFixedNrOfRepeats);
1256
- });
689
+ return selfhref;
690
+ }
691
+ /**
692
+ * Create a selfhref including the parameters that are used to start this form
693
+ */
1257
694
 
1258
- if (previouslyEnteredFormObjects.length > 0) {
1259
- this.handlePreviouslyEnteredFormObjects(receivedCurrentFormObject, previouslyEnteredFormObjects);
1260
- } else {
1261
- this.completedFormObjects = _toConsumableArray(this.allObjects);
1262
- this.currentFormObject = receivedCurrentFormObject;
1263
- }
1264
- }
695
+
696
+ get selfhref() {
697
+ if (!this.selflink) {
698
+ throw new Error("No self link found for form");
1265
699
  }
1266
- /**
1267
- * Indicate if a new form object model should be merged with a previousled entered form object model
1268
- * Set this property to false on the form that receives the new form to skip the merge behavior
1269
- */
1270
-
1271
- }, {
1272
- key: "mergePreviouslyEnteredObjects",
1273
- get: function get() {
1274
- return this._mergePreviouslyEnteredObjects;
700
+
701
+ if (getSetting("ALWAYS_COMMIT_FORM")) {
702
+ return this.selfhrefNoCommitParam();
1275
703
  }
1276
- /**
1277
- */
1278
- ,
1279
- set: function set(mergePreviouslyEnteredObjects) {
1280
- this._mergePreviouslyEnteredObjects = mergePreviouslyEnteredObjects;
704
+
705
+ return this.selfhrefWithCommitParam();
706
+ }
707
+ /**
708
+ * Handle form tokens to indicate concurrent form use
709
+ */
710
+
711
+
712
+ get tokens() {
713
+ if (!this._tokens) {
714
+ var _this$data$tokens;
715
+
716
+ this._tokens = (_this$data$tokens = this.data.tokens) !== null && _this$data$tokens !== void 0 ? _this$data$tokens : [];
1281
717
  }
1282
- /**
1283
- */
1284
718
 
1285
- }, {
1286
- key: "handlePreviouslyEnteredFormObjects",
1287
- value: function handlePreviouslyEnteredFormObjects(receivedCurrentFormObject, previouslyEnteredFormObjects) {
1288
- var _this12 = this,
1289
- _context33;
719
+ return this._tokens;
720
+ }
721
+ /**
722
+ * Replaces all tokens with the given collection of tokens
723
+ */
724
+
725
+
726
+ set tokens(tokens) {
727
+ this._tokens = tokens;
728
+ }
729
+ /**
730
+ * Removes all tokens from the form
731
+ */
732
+
733
+
734
+ removeTokens() {
735
+ this._tokens = [];
736
+ }
737
+ /**
738
+ * Keep track of changed form
739
+ */
1290
740
 
1291
- previouslyEnteredFormObjects.forEach(function (previouslyEnteredFormObject) {
1292
- var mergedObject = _this12.mergePreviouslyEnteredObjects ? _this12.mergeObjects(receivedCurrentFormObject, previouslyEnteredFormObject) : receivedCurrentFormObject;
1293
741
 
1294
- _this12.addFormObject(mergedObject);
1295
- }); // remove the previously entered form object
742
+ isChanged() {
743
+ return this.currentFormObject !== null && this.currentFormObject.isChangedSince(this.lastUpdate);
744
+ }
745
+ /**
746
+ */
747
+
748
+
749
+ get lastUpdate() {
750
+ return this._lastUpdate;
751
+ }
752
+ /**
753
+ */
1296
754
 
1297
- this.previouslyEnteredFormObjects = _filterInstanceProperty(_context33 = this.previouslyEnteredFormObjects).call(_context33, function (formObject) {
1298
- var hasPreviouslyEnteredObject = _findInstanceProperty(previouslyEnteredFormObjects).call(previouslyEnteredFormObjects, function (previouslyEnteredFormObject) {
1299
- return formObject.equals(previouslyEnteredFormObject);
755
+
756
+ set lastUpdate(lastUpdate) {
757
+ this._lastUpdate = lastUpdate;
758
+ }
759
+ /**
760
+ */
761
+
762
+
763
+ getFormDataObjects() {
764
+ var _context19;
765
+
766
+ let validOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
767
+ let validationData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
768
+ const formdata = [];
769
+
770
+ const formObjects = _filterInstanceProperty(_context19 = this.allObjects).call(_context19, (formObject, index) => {
771
+ // repeatabe object without fixed nr of repeats, remove last form object from formdata,
772
+ // because this is the formobject that is used as a placeholder for the create object
773
+ // of the collection of repeats
774
+ if (formObject.isRepeatable && !formObject.hasFixedNrOfRepeats) {
775
+ const isLastRepeat = index === this.allObjects.length - 1 || this.allObjects[index + 1].key !== formObject.key;
776
+
777
+ if (isLastRepeat) {
778
+ return false;
779
+ }
780
+ }
781
+
782
+ return formObject.isValid || !validOnly;
783
+ });
784
+
785
+ formObjects.forEach(formObject => {
786
+ const objectFormData = formObject.getFormData(validationData);
787
+
788
+ const existingObjectIndex = _findIndexInstanceProperty(formdata).call(formdata, obj => obj.key === formObject.key && obj.repeatIndex === formObject.repeatIndex);
789
+ /*
790
+ * when the object already exists in the formdata with the same key and index,
791
+ * merge the attributes of both objects together
792
+ */
793
+
794
+
795
+ if (existingObjectIndex > -1) {
796
+ formdata[existingObjectIndex].formdata = deepmerge(formdata[existingObjectIndex].formdata, objectFormData);
797
+ } else {
798
+ formdata.push({
799
+ key: formObject.key,
800
+ repeatIndex: formObject.repeatIndex,
801
+ formdata: objectFormData
1300
802
  });
803
+ }
804
+ });
805
+ return _mapInstanceProperty(formdata).call(formdata, obj => ({
806
+ [obj.key]: obj.formdata
807
+ }));
808
+ }
809
+ /**
810
+ */
1301
811
 
1302
- return !hasPreviouslyEnteredObject;
812
+
813
+ getFormData() {
814
+ let validOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
815
+ let withConcurrencyToken = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
816
+ let validationData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
817
+
818
+ if (withConcurrencyToken && this.tokens.length > 0) {
819
+ return _JSON$stringify({
820
+ objects: this.getFormDataObjects(validOnly, validationData),
821
+ tokens: this.tokens
1303
822
  });
1304
823
  }
1305
- /**
1306
- */
1307
-
1308
- }, {
1309
- key: "mergeObjects",
1310
- value: function mergeObjects(newObject, oldObject) {
1311
- var mergedFormObject = FormObjectModel.createEmpty(newObject);
1312
- mergedFormObject.mergeObject(oldObject);
1313
- return mergedFormObject;
824
+
825
+ return _JSON$stringify({
826
+ objects: this.getFormDataObjects(validOnly, validationData)
827
+ });
828
+ }
829
+ /**
830
+ * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION
831
+ */
832
+
833
+
834
+ setUseClientsideValidation(enabled) {
835
+ this._useClientsideValidation = enabled;
836
+ this.allObjects.forEach(formObject => {
837
+ formObject.attributeCollection.all.forEach(item => item.setUseClientsideValidation(enabled));
838
+ });
839
+ }
840
+ /**
841
+ * Indicates if client side validation is enabled
842
+ * @returns {boolean}
843
+ */
844
+
845
+
846
+ useClientsideValidation() {
847
+ var _this$_useClientsideV;
848
+
849
+ return (_this$_useClientsideV = this._useClientsideValidation) !== null && _this$_useClientsideV !== void 0 ? _this$_useClientsideV : true;
850
+ }
851
+ /**
852
+ * Get form data for submitting
853
+ */
854
+
855
+
856
+ get formdata() {
857
+ return this.getFormData(this.useClientsideValidation());
858
+ }
859
+ /**
860
+ */
861
+
862
+
863
+ get validationData() {
864
+ return this.getFormData(false, false, true);
865
+ }
866
+ /**
867
+ * Form navigation: Go one object back (previous button)
868
+ */
869
+
870
+
871
+ get hasPreviousStep() {
872
+ var _context20;
873
+
874
+ const currentFormObjectKey = this.currentFormObject != null ? this.currentFormObject.key : "";
875
+ return _filterInstanceProperty(_context20 = this.completedFormObjects).call(_context20, formObject => !formObject.isRepeatWithUnknownTotal || formObject.key !== currentFormObjectKey).length > 0;
876
+ }
877
+ /**
878
+ * Go one form-object back,
879
+ * for repeating object this means go back
880
+ * until we get at a form object that had
881
+ * a different key than the current form object
882
+ */
883
+
884
+
885
+ setPreviousObject() {
886
+ var _context21, _context22, _context23, _context24, _context25;
887
+
888
+ this.isComplete = false;
889
+ const oldCurrentFormObject = this.currentFormObject;
890
+
891
+ if (this.currentFormObject !== null) {
892
+ this.previouslyEnteredFormObjects = [this.currentFormObject, ...this.previouslyEnteredFormObjects];
893
+ }
894
+
895
+ this.currentFormObject = this.completedFormObjects[this.completedFormObjects.length - 1];
896
+ this.completedFormObjects = _sliceInstanceProperty(_context21 = this.completedFormObjects).call(_context21, 0, -1);
897
+
898
+ const completedFormObjectKeys = _filterInstanceProperty(_context22 = _mapInstanceProperty(_context23 = this.completedFormObjects).call(_context23, formObject => formObject.key)).call(_context22, formObjectKey => {
899
+ var _this$currentFormObje6;
900
+
901
+ return formObjectKey !== ((_this$currentFormObje6 = this.currentFormObject) === null || _this$currentFormObje6 === void 0 ? void 0 : _this$currentFormObje6.key);
902
+ });
903
+
904
+ this.endResultFormObjects = _filterInstanceProperty(_context24 = this._endResultFormObjects).call(_context24, endResult => _includesInstanceProperty(completedFormObjectKeys).call(completedFormObjectKeys, endResult.key));
905
+ this.previousEndResultKeys = _mapInstanceProperty(_context25 = this.endResultFormObjects).call(_context25, endResult => endResult.key); // while we are at the same repeating form object, go a step back
906
+
907
+ if (this.currentFormObject && this.currentFormObject.equals(oldCurrentFormObject, this.currentFormObject.hasFixedNrOfRepeats)) {
908
+ this.setPreviousObject();
909
+ }
910
+ }
911
+ /**
912
+ * Form navigation: has next step or is last
913
+ */
914
+
915
+
916
+ get hasNextStep() {
917
+ var _context26;
918
+
919
+ if (this.isComplete || this.isFinished || this.hasNoQuestionsConfigured || !this.contributions.objects) {
920
+ return false;
921
+ } // current object is a dynamic object
922
+
923
+
924
+ if (this.currentFormObject && this.currentFormObject.isDynamic) {
925
+ return true;
926
+ }
927
+
928
+ if (this.expectsEndResultFormObjects) {
929
+ return true;
930
+ }
931
+
932
+ const currentObjectIndex = _findIndexInstanceProperty(_context26 = this.objectKeys).call(_context26, objectKey => {
933
+ var _this$currentFormObje7;
934
+
935
+ return objectKey === ((_this$currentFormObje7 = this.currentFormObject) === null || _this$currentFormObje7 === void 0 ? void 0 : _this$currentFormObje7.key);
936
+ });
937
+
938
+ const isLastObject = this.objectKeys.length - 1 === currentObjectIndex; // current object is a repeating question but it is not the last one
939
+
940
+ if (isLastObject && this.currentFormObject && this.currentFormObject.isRepeatable && !this.currentFormObject.isLastRepeat) {
941
+ return true;
942
+ } // current object is not repeatable and the last object
943
+
944
+
945
+ if (isLastObject) {
946
+ return false;
947
+ } // can't determine if this is te last, render a next button
948
+
949
+
950
+ return true;
951
+ }
952
+ /**
953
+ * Merge existing form with new form
954
+ */
955
+
956
+
957
+ update(receivedForm) {
958
+ if (receivedForm instanceof FormModel) {
959
+ var _receivedForm$data;
960
+
961
+ this.resetErrors();
962
+ this.lastUpdate = Date.now();
963
+ this.lastServerUpdate = receivedForm.lastServerUpdate;
964
+ this.tokens = receivedForm.tokens;
965
+ this.isComplete = receivedForm.isComplete;
966
+ this.isFinished = receivedForm.isFinished;
967
+ const receivedFormData = (_receivedForm$data = receivedForm.data) !== null && _receivedForm$data !== void 0 ? _receivedForm$data : {};
968
+ const hasMissing = has(receivedFormData, "missing");
969
+ const hasErrors = has(receivedFormData, "errors");
970
+
971
+ if (!hasMissing && !hasErrors) {
972
+ this.handleFinished(receivedForm);
973
+ }
974
+
975
+ if (hasErrors) {
976
+ this.handleErrors(receivedForm);
977
+ }
978
+
979
+ if (hasMissing) {
980
+ this.handleMissing(receivedForm);
981
+ }
982
+ }
983
+
984
+ return this;
985
+ }
986
+ /**
987
+ */
988
+
989
+
990
+ updateValidations(data) {
991
+ if (this.currentFormObject) {
992
+ this.currentFormObject.updateValidations(data);
993
+ }
994
+
995
+ return this;
996
+ }
997
+ /**
998
+ * Process finished form
999
+ */
1000
+
1001
+
1002
+ handleFinished(receivedForm) {
1003
+ if (this.currentFormObject) {
1004
+ this.completedFormObjects = [...this.completedFormObjects, this.currentFormObject];
1314
1005
  }
1315
- /**
1316
- */
1317
-
1318
- }, {
1319
- key: "findAttribute",
1320
- value: function findAttribute(findMethod) {
1321
- var foundAttribute = null;
1322
- this.allObjects.forEach(function (formObject) {
1323
- if (foundAttribute === null) {
1324
- var _context34;
1325
-
1326
- foundAttribute = _findInstanceProperty(_context34 = formObject.attributeCollection.all).call(_context34, function (item) {
1327
- return findMethod(item);
1328
- }) || null;
1006
+
1007
+ this.currentFormObject = receivedForm.currentFormObject;
1008
+ this.endResultFormObjects = receivedForm.endResultFormObjects;
1009
+ this._data = receivedForm._data;
1010
+ }
1011
+ /**
1012
+ */
1013
+
1014
+
1015
+ handleRootErrors(errors) {
1016
+ _filterInstanceProperty(errors).call(errors, error => !error.anchor).forEach(error => {
1017
+ this.errorCollection.addServerError(error.id, error.message, error.properties);
1018
+ });
1019
+ }
1020
+ /**
1021
+ * Process errors from received form
1022
+ */
1023
+
1024
+
1025
+ handleErrors(receivedForm) {
1026
+ const errorAnchors = receivedForm.data.errors;
1027
+
1028
+ if (errorAnchors) {
1029
+ errorAnchors.forEach(error => {
1030
+ if (error.anchor && this.currentFormObject && this.currentFormObject.key === error.anchor.objectid) {
1031
+ this.currentFormObject.addServerError(error);
1032
+ } else {
1033
+ this.errorCollection.addServerError(error.id, error.message, error.properties);
1329
1034
  }
1330
1035
  });
1331
- return foundAttribute;
1332
1036
  }
1333
- }], [{
1334
- key: "isApplicableModel",
1335
- value: function isApplicableModel(data) {
1336
- return data.contributions.resourcetype && data.contributions.resourcetype === "Form";
1037
+ }
1038
+ /**
1039
+ * Process missing from received form
1040
+ */
1041
+
1042
+
1043
+ handleMissing(receivedForm) {
1044
+ if (this.currentFormObject && this.currentFormObject.equals(receivedForm.currentFormObject)) {
1045
+ this.handleMissingErrors(receivedForm);
1046
+ } else {
1047
+ this.handleNewFormObject(receivedForm);
1048
+ }
1049
+ }
1050
+ /**
1051
+ * Received missing anchors in the response with an object id that is the current form object
1052
+ */
1053
+
1054
+
1055
+ processMissingErrors(receivedForm) {
1056
+ var _context27;
1057
+
1058
+ if (this.currentFormObject === null) {
1059
+ return null;
1337
1060
  }
1338
- }]);
1339
1061
 
1340
- return FormModel;
1341
- }(ResourceModel);
1062
+ _mapInstanceProperty(_context27 = this.currentFormObject.attributeCollection).call(_context27, attribute => {
1063
+ if (receivedForm.currentFormObject && receivedForm.currentFormObject.hasAttributeByKey(attribute.key)) {
1064
+ attribute.addMissingError();
1065
+ } else {
1066
+ attribute.removeMissingError();
1067
+ }
1068
+
1069
+ return attribute;
1070
+ });
1071
+
1072
+ return this.currentFormObject;
1073
+ }
1074
+ /**
1075
+ */
1076
+
1077
+
1078
+ handleMissingErrors(receivedForm) {
1079
+ this.currentFormObject = this.processMissingErrors(receivedForm);
1080
+ }
1081
+ /**
1082
+ */
1083
+
1084
+
1085
+ handleNewFormObject(receivedForm) {
1086
+ this.endResultFormObjects = receivedForm.endResultFormObjects;
1087
+ const receivedCurrentFormObject = receivedForm.currentFormObject;
1088
+
1089
+ if (receivedCurrentFormObject === null) {
1090
+ this.completedFormObjects = [...this.allObjects];
1091
+ this.currentFormObject = null;
1092
+ } else {
1093
+ var _context28;
1094
+
1095
+ // check if received form exists in the previously entered form objects
1096
+ const previouslyEnteredFormObjects = _filterInstanceProperty(_context28 = this.previouslyEnteredFormObjects).call(_context28, formObject => formObject.equals(receivedCurrentFormObject, formObject.hasFixedNrOfRepeats));
1097
+
1098
+ if (previouslyEnteredFormObjects.length > 0) {
1099
+ this.handlePreviouslyEnteredFormObjects(receivedCurrentFormObject, previouslyEnteredFormObjects);
1100
+ } else {
1101
+ this.completedFormObjects = [...this.allObjects];
1102
+ this.currentFormObject = receivedCurrentFormObject;
1103
+ }
1104
+ }
1105
+ }
1106
+ /**
1107
+ * Indicate if a new form object model should be merged with a previousled entered form object model
1108
+ * Set this property to false on the form that receives the new form to skip the merge behavior
1109
+ */
1110
+
1111
+
1112
+ get mergePreviouslyEnteredObjects() {
1113
+ return this._mergePreviouslyEnteredObjects;
1114
+ }
1115
+ /**
1116
+ */
1117
+
1118
+
1119
+ set mergePreviouslyEnteredObjects(mergePreviouslyEnteredObjects) {
1120
+ this._mergePreviouslyEnteredObjects = mergePreviouslyEnteredObjects;
1121
+ }
1122
+ /**
1123
+ */
1124
+
1125
+
1126
+ handlePreviouslyEnteredFormObjects(receivedCurrentFormObject, previouslyEnteredFormObjects) {
1127
+ var _context29;
1128
+
1129
+ previouslyEnteredFormObjects.forEach(previouslyEnteredFormObject => {
1130
+ const mergedObject = this.mergePreviouslyEnteredObjects ? this.mergeObjects(receivedCurrentFormObject, previouslyEnteredFormObject) : receivedCurrentFormObject;
1131
+ this.addFormObject(mergedObject);
1132
+ }); // remove the previously entered form object
1133
+
1134
+ this.previouslyEnteredFormObjects = _filterInstanceProperty(_context29 = this.previouslyEnteredFormObjects).call(_context29, formObject => {
1135
+ const hasPreviouslyEnteredObject = _findInstanceProperty(previouslyEnteredFormObjects).call(previouslyEnteredFormObjects, previouslyEnteredFormObject => formObject.equals(previouslyEnteredFormObject));
1136
+
1137
+ return !hasPreviouslyEnteredObject;
1138
+ });
1139
+ }
1140
+ /**
1141
+ */
1142
+
1143
+
1144
+ mergeObjects(newObject, oldObject) {
1145
+ const mergedFormObject = FormObjectModel.createEmpty(newObject);
1146
+ mergedFormObject.mergeObject(oldObject);
1147
+ return mergedFormObject;
1148
+ }
1149
+ /**
1150
+ */
1151
+
1152
+
1153
+ findAttribute(findMethod) {
1154
+ let foundAttribute = null;
1155
+ this.allObjects.forEach(formObject => {
1156
+ if (foundAttribute === null) {
1157
+ var _context30;
1158
+
1159
+ foundAttribute = _findInstanceProperty(_context30 = formObject.attributeCollection.all).call(_context30, item => findMethod(item)) || null;
1160
+ }
1161
+ });
1162
+ return foundAttribute;
1163
+ }
1164
+
1165
+ }
1342
1166
 
1343
1167
  export default FormModel;
1344
1168
  //# sourceMappingURL=FormModel.js.map