@beinformed/ui 1.24.0 → 1.24.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1092) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/constants/package.json +8 -0
  3. package/esm/builder/index.js +0 -1
  4. package/esm/builder/index.js.map +1 -1
  5. package/esm/constants/Constants.js +0 -1
  6. package/esm/constants/Constants.js.map +1 -1
  7. package/esm/constants/LayoutHintConfig.js +0 -1
  8. package/esm/constants/LayoutHintConfig.js.map +1 -1
  9. package/esm/constants/LayoutHints.js +0 -1
  10. package/esm/constants/LayoutHints.js.map +1 -1
  11. package/esm/constants/index.js +0 -1
  12. package/esm/constants/index.js.map +1 -1
  13. package/esm/exceptions/ConfigurationException.js +0 -2
  14. package/esm/exceptions/ConfigurationException.js.map +1 -1
  15. package/esm/exceptions/FetchException.js +1 -1
  16. package/esm/exceptions/FetchException.js.map +1 -1
  17. package/esm/exceptions/IllegalArgumentException.js +0 -1
  18. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  19. package/esm/exceptions/IllegalReturnException.js +0 -1
  20. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  21. package/esm/exceptions/IllegalStateException.js +0 -1
  22. package/esm/exceptions/IllegalStateException.js.map +1 -1
  23. package/esm/exceptions/JsonParseException.js +0 -1
  24. package/esm/exceptions/JsonParseException.js.map +1 -1
  25. package/esm/exceptions/MissingPropertyException.js +0 -1
  26. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  27. package/esm/exceptions/NotAllowedUriException.js +0 -1
  28. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  29. package/esm/exceptions/ServerRequestException.js +0 -1
  30. package/esm/exceptions/ServerRequestException.js.map +1 -1
  31. package/esm/exceptions/ThemePropertyException.js +0 -1
  32. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  33. package/esm/exceptions/TimeoutException.js +0 -1
  34. package/esm/exceptions/TimeoutException.js.map +1 -1
  35. package/esm/exceptions/UnauthorizedException.js +0 -1
  36. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  37. package/esm/exceptions/UnsupportedOperationException.js +0 -1
  38. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  39. package/esm/exceptions/index.js +0 -1
  40. package/esm/exceptions/index.js.map +1 -1
  41. package/esm/hooks/index.js +0 -1
  42. package/esm/hooks/index.js.map +1 -1
  43. package/esm/hooks/useAuthentication.js +4 -5
  44. package/esm/hooks/useAuthentication.js.map +1 -1
  45. package/esm/hooks/useDeepCompareEffect.js +0 -1
  46. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  47. package/esm/hooks/useForm.js +1 -2
  48. package/esm/hooks/useForm.js.map +1 -1
  49. package/esm/hooks/useModelCatalog.js +1 -1
  50. package/esm/hooks/useModelCatalog.js.map +1 -1
  51. package/esm/hooks/useModels.js +0 -1
  52. package/esm/hooks/useModels.js.map +1 -1
  53. package/esm/hooks/useModularUI.js +0 -1
  54. package/esm/hooks/useModularUI.js.map +1 -1
  55. package/esm/hooks/useModularUIBasic.js +3 -3
  56. package/esm/hooks/useModularUIBasic.js.map +1 -1
  57. package/esm/hooks/useModularUIModel.js +0 -1
  58. package/esm/hooks/useModularUIModel.js.map +1 -1
  59. package/esm/hooks/useModularUIRequest.js +0 -1
  60. package/esm/hooks/useModularUIRequest.js.map +1 -1
  61. package/esm/hooks/useNotification.js +0 -1
  62. package/esm/hooks/useNotification.js.map +1 -1
  63. package/esm/hooks/usePreference.js +0 -1
  64. package/esm/hooks/usePreference.js.map +1 -1
  65. package/esm/hooks/useProgressIndicator.js +0 -1
  66. package/esm/hooks/useProgressIndicator.js.map +1 -1
  67. package/esm/hooks/useRouter.js +3 -13
  68. package/esm/hooks/useRouter.js.map +1 -1
  69. package/esm/i18n/Message.js +0 -1
  70. package/esm/i18n/Message.js.map +1 -1
  71. package/esm/i18n/index.js +0 -1
  72. package/esm/i18n/index.js.map +1 -1
  73. package/esm/i18n/languages.js +0 -1
  74. package/esm/i18n/languages.js.map +1 -1
  75. package/esm/i18n/translations/beinformed_error_messages_en.nl.js +0 -1
  76. package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  77. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js +0 -1
  78. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  79. package/esm/index.js +0 -1
  80. package/esm/index.js.map +1 -1
  81. package/esm/models/application/ApplicationModel.js +2 -4
  82. package/esm/models/application/ApplicationModel.js.map +1 -1
  83. package/esm/models/attributes/AttributeCollection.js +3 -8
  84. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  85. package/esm/models/attributes/AttributeContent.js +4 -7
  86. package/esm/models/attributes/AttributeContent.js.map +1 -1
  87. package/esm/models/attributes/AttributeDataHelper.js +1 -2
  88. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  89. package/esm/models/attributes/AttributeModel.js +2 -4
  90. package/esm/models/attributes/AttributeModel.js.map +1 -1
  91. package/esm/models/attributes/CaptchaAttributeModel.js +0 -1
  92. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  93. package/esm/models/attributes/ChoiceAttributeModel.js +2 -4
  94. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  95. package/esm/models/attributes/ChoiceAttributeOptionModel.js +2 -3
  96. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  97. package/esm/models/attributes/CompositeAttributeChildCollection.js +2 -5
  98. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  99. package/esm/models/attributes/CompositeAttributeModel.js +3 -5
  100. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  101. package/esm/models/attributes/HelptextAttributeModel.js +1 -2
  102. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  103. package/esm/models/attributes/LabelAttributeModel.js +1 -1
  104. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  105. package/esm/models/attributes/MemoAttributeModel.js +1 -2
  106. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  107. package/esm/models/attributes/MoneyAttributeModel.js +1 -1
  108. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  109. package/esm/models/attributes/PasswordAttributeModel.js +1 -1
  110. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  111. package/esm/models/attributes/StringAttributeModel.js +1 -1
  112. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  113. package/esm/models/attributes/XMLAttributeModel.js +1 -1
  114. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  115. package/esm/models/attributes/_createAttribute.js +2 -3
  116. package/esm/models/attributes/_createAttribute.js.map +1 -1
  117. package/esm/models/attributes/input-constraints/BSNConstraint.js +0 -2
  118. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  119. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js +0 -1
  120. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  121. package/esm/models/attributes/input-constraints/IBANConstraint.js +0 -1
  122. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  123. package/esm/models/attributes/input-constraints/MandatoryConstraint.js +0 -2
  124. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  125. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js +0 -1
  126. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  127. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js +0 -1
  128. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  129. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +0 -2
  130. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  131. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +0 -1
  132. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  133. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +0 -1
  134. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  135. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +0 -1
  136. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  137. package/esm/models/attributes/input-constraints/RegexConstraint.js +0 -1
  138. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  139. package/esm/models/attributes/input-constraints/StringLengthConstraint.js +0 -1
  140. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  141. package/esm/models/attributes/input-constraints/XMLConstraint.js +0 -2
  142. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  143. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
  144. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  145. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
  146. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  147. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +0 -1
  148. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  149. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +0 -1
  150. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  151. package/esm/models/base/ResourceCollection.js +1 -2
  152. package/esm/models/base/ResourceCollection.js.map +1 -1
  153. package/esm/models/concepts/BusinessScenarioModel.js +4 -12
  154. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  155. package/esm/models/concepts/ConceptDetailModel.js +1 -2
  156. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  157. package/esm/models/concepts/ConceptIndexModel.js +1 -2
  158. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  159. package/esm/models/concepts/ConceptLinkModel.js +2 -3
  160. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  161. package/esm/models/concepts/ConceptTypeDetailModel.js +0 -1
  162. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  163. package/esm/models/content/ContentIndexModel.js +3 -8
  164. package/esm/models/content/ContentIndexModel.js.map +1 -1
  165. package/esm/models/content/ContentLinkModel.js +1 -1
  166. package/esm/models/content/ContentLinkModel.js.map +1 -1
  167. package/esm/models/content/ContentModel.js +2 -4
  168. package/esm/models/content/ContentModel.js.map +1 -1
  169. package/esm/models/content/ContentTOCModel.js +2 -4
  170. package/esm/models/content/ContentTOCModel.js.map +1 -1
  171. package/esm/models/content/ContentTypeModel.js +0 -1
  172. package/esm/models/content/ContentTypeModel.js.map +1 -1
  173. package/esm/models/content/SectionModel.js +1 -2
  174. package/esm/models/content/SectionModel.js.map +1 -1
  175. package/esm/models/contentconfiguration/ContentConfigurationResults.js +1 -1
  176. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  177. package/esm/models/detail/DetailModel.js +2 -2
  178. package/esm/models/detail/DetailModel.js.map +1 -1
  179. package/esm/models/error/ErrorModel.js +0 -1
  180. package/esm/models/error/ErrorModel.js.map +1 -1
  181. package/esm/models/error/ErrorResponse.js +11 -22
  182. package/esm/models/error/ErrorResponse.js.map +1 -1
  183. package/esm/models/filters/BaseFilterModel.js +2 -4
  184. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  185. package/esm/models/filters/FilterCollection.js +2 -4
  186. package/esm/models/filters/FilterCollection.js.map +1 -1
  187. package/esm/models/filters/FilterModel.js +0 -1
  188. package/esm/models/filters/FilterModel.js.map +1 -1
  189. package/esm/models/form/FormModel.js +13 -28
  190. package/esm/models/form/FormModel.js.map +1 -1
  191. package/esm/models/form/FormObjectModel.js +6 -11
  192. package/esm/models/form/FormObjectModel.js.map +1 -1
  193. package/esm/models/grouping/GroupingModel.js +1 -1
  194. package/esm/models/grouping/GroupingModel.js.map +1 -1
  195. package/esm/models/index.js +0 -1
  196. package/esm/models/index.js.map +1 -1
  197. package/esm/models/list/ListDetailModel.js +4 -6
  198. package/esm/models/list/ListDetailModel.js.map +1 -1
  199. package/esm/models/list/ListModel.js +2 -2
  200. package/esm/models/list/ListModel.js.map +1 -1
  201. package/esm/models/lookup/LookupOptionCollection.js +0 -1
  202. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  203. package/esm/models/modelcatalog/ModelCatalogModel.js +0 -1
  204. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  205. package/esm/models/process/ProcessStatusSettingsModel.js +0 -1
  206. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  207. package/esm/models/sorting/SortOptionModel.js +0 -1
  208. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  209. package/esm/models/sorting/SortingModel.js +1 -1
  210. package/esm/models/sorting/SortingModel.js.map +1 -1
  211. package/esm/models/tab/TabModel.js +1 -2
  212. package/esm/models/tab/TabModel.js.map +1 -1
  213. package/esm/models/taskgroup/TaskGroupCollection.js +0 -1
  214. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  215. package/esm/models/user/UserModel.js +0 -1
  216. package/esm/models/user/UserModel.js.map +1 -1
  217. package/esm/modularui/ModularUIRequest.js +4 -9
  218. package/esm/modularui/ModularUIRequest.js.map +1 -1
  219. package/esm/modularui/ModularUIResponse.js +2 -3
  220. package/esm/modularui/ModularUIResponse.js.map +1 -1
  221. package/esm/modularui/index.js +0 -1
  222. package/esm/modularui/index.js.map +1 -1
  223. package/esm/react/ErrorBoundaryFallback.js +0 -1
  224. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  225. package/esm/react/index.js +0 -1
  226. package/esm/react/index.js.map +1 -1
  227. package/esm/react/utils.js +0 -2
  228. package/esm/react/utils.js.map +1 -1
  229. package/esm/react-client/Init.js +0 -1
  230. package/esm/react-client/Init.js.map +1 -1
  231. package/esm/react-client/contextPath.js +0 -1
  232. package/esm/react-client/contextPath.js.map +1 -1
  233. package/esm/react-client/index.js +0 -1
  234. package/esm/react-client/index.js.map +1 -1
  235. package/esm/react-client/rehydrate.js +1 -1
  236. package/esm/react-client/rehydrate.js.map +1 -1
  237. package/esm/react-server/contextPath.js +0 -1
  238. package/esm/react-server/contextPath.js.map +1 -1
  239. package/esm/react-server/htmlpage.js +1 -1
  240. package/esm/react-server/htmlpage.js.map +1 -1
  241. package/esm/react-server/index.js +0 -1
  242. package/esm/react-server/index.js.map +1 -1
  243. package/esm/react-server/renderSSRComplete.js +0 -1
  244. package/esm/react-server/renderSSRComplete.js.map +1 -1
  245. package/esm/react-server/renderSSRMinimal.js +0 -1
  246. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  247. package/esm/react-server/requestInformation.js +0 -1
  248. package/esm/react-server/requestInformation.js.map +1 -1
  249. package/esm/react-server/serverNoSSR.js +1 -3
  250. package/esm/react-server/serverNoSSR.js.map +1 -1
  251. package/esm/react-server/serverSSR.js +0 -1
  252. package/esm/react-server/serverSSR.js.map +1 -1
  253. package/esm/react-theme/ThemeProvider.js +0 -1
  254. package/esm/react-theme/ThemeProvider.js.map +1 -1
  255. package/esm/react-theme/index.js +0 -1
  256. package/esm/react-theme/index.js.map +1 -1
  257. package/esm/react-theme/useTheme.js +0 -1
  258. package/esm/react-theme/useTheme.js.map +1 -1
  259. package/esm/react-theme/utils/background.js +0 -1
  260. package/esm/react-theme/utils/background.js.map +1 -1
  261. package/esm/react-theme/utils/colors.js +0 -1
  262. package/esm/react-theme/utils/colors.js.map +1 -1
  263. package/esm/react-theme/utils/contrast.js +1 -3
  264. package/esm/react-theme/utils/contrast.js.map +1 -1
  265. package/esm/react-theme/utils/corners.js +0 -1
  266. package/esm/react-theme/utils/corners.js.map +1 -1
  267. package/esm/react-theme/utils/themeProps.js +0 -1
  268. package/esm/react-theme/utils/themeProps.js.map +1 -1
  269. package/esm/redux/_i18n/actions.js +0 -1
  270. package/esm/redux/_i18n/actions.js.map +1 -1
  271. package/esm/redux/_i18n/index.js +0 -1
  272. package/esm/redux/_i18n/index.js.map +1 -1
  273. package/esm/redux/_i18n/reducer.js +0 -1
  274. package/esm/redux/_i18n/reducer.js.map +1 -1
  275. package/esm/redux/_modularui/actions.js +7 -7
  276. package/esm/redux/_modularui/actions.js.map +1 -1
  277. package/esm/redux/_modularui/connector.js +2 -4
  278. package/esm/redux/_modularui/connector.js.map +1 -1
  279. package/esm/redux/_modularui/index.js +0 -1
  280. package/esm/redux/_modularui/index.js.map +1 -1
  281. package/esm/redux/_modularui/modularuiUtils.js +2 -2
  282. package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
  283. package/esm/redux/_modularui/reducer.js +1 -2
  284. package/esm/redux/_modularui/reducer.js.map +1 -1
  285. package/esm/redux/_modularui/selectors.js +7 -13
  286. package/esm/redux/_modularui/selectors.js.map +1 -1
  287. package/esm/redux/_modularui/withModularUI.js +0 -1
  288. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  289. package/esm/redux/_router/actions.js +0 -2
  290. package/esm/redux/_router/actions.js.map +1 -1
  291. package/esm/redux/_router/connectors.js +9 -19
  292. package/esm/redux/_router/connectors.js.map +1 -1
  293. package/esm/redux/_router/index.js +0 -1
  294. package/esm/redux/_router/index.js.map +1 -1
  295. package/esm/redux/_router/middleware.js +0 -2
  296. package/esm/redux/_router/middleware.js.map +1 -1
  297. package/esm/redux/_router/reducer.js +0 -2
  298. package/esm/redux/_router/reducer.js.map +1 -1
  299. package/esm/redux/actions/Application.js +0 -1
  300. package/esm/redux/actions/Application.js.map +1 -1
  301. package/esm/redux/actions/Authorization.js +4 -7
  302. package/esm/redux/actions/Authorization.js.map +1 -1
  303. package/esm/redux/actions/Error.js +0 -1
  304. package/esm/redux/actions/Error.js.map +1 -1
  305. package/esm/redux/actions/Form.js +0 -1
  306. package/esm/redux/actions/Form.js.map +1 -1
  307. package/esm/redux/actions/FormAttributeSet.js +2 -4
  308. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  309. package/esm/redux/actions/FormAttributeSetRepeatable.js +0 -1
  310. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  311. package/esm/redux/actions/FormAutosave.js +0 -1
  312. package/esm/redux/actions/FormAutosave.js.map +1 -1
  313. package/esm/redux/actions/FormAutosubmit.js +0 -1
  314. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  315. package/esm/redux/actions/FormValidations.js +0 -1
  316. package/esm/redux/actions/FormValidations.js.map +1 -1
  317. package/esm/redux/actions/Modals.js +0 -2
  318. package/esm/redux/actions/Modals.js.map +1 -1
  319. package/esm/redux/actions/Notification.js +0 -1
  320. package/esm/redux/actions/Notification.js.map +1 -1
  321. package/esm/redux/actions/Preferences.js +5 -5
  322. package/esm/redux/actions/Preferences.js.map +1 -1
  323. package/esm/redux/actions/ProgressIndicator.js +0 -2
  324. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  325. package/esm/redux/actions/SignIn.js +2 -3
  326. package/esm/redux/actions/SignIn.js.map +1 -1
  327. package/esm/redux/actions/SignOut.js +0 -1
  328. package/esm/redux/actions/SignOut.js.map +1 -1
  329. package/esm/redux/actions/index.js +0 -1
  330. package/esm/redux/actions/index.js.map +1 -1
  331. package/esm/redux/connectors/Application.js +0 -1
  332. package/esm/redux/connectors/Application.js.map +1 -1
  333. package/esm/redux/connectors/Breadcrumb.js +0 -1
  334. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  335. package/esm/redux/connectors/CaseView.js +0 -1
  336. package/esm/redux/connectors/CaseView.js.map +1 -1
  337. package/esm/redux/connectors/ConceptDetail.js +0 -1
  338. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  339. package/esm/redux/connectors/ContentBrowser.js +0 -1
  340. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  341. package/esm/redux/connectors/ContentDetail.js +0 -1
  342. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  343. package/esm/redux/connectors/ContentDetailSection.js +0 -1
  344. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  345. package/esm/redux/connectors/Form.js +3 -7
  346. package/esm/redux/connectors/Form.js.map +1 -1
  347. package/esm/redux/connectors/FormAttributeSet.js +0 -1
  348. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  349. package/esm/redux/connectors/ListDetail.js +0 -1
  350. package/esm/redux/connectors/ListDetail.js.map +1 -1
  351. package/esm/redux/connectors/ModelCatalog.js +0 -1
  352. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  353. package/esm/redux/connectors/Notification.js +0 -1
  354. package/esm/redux/connectors/Notification.js.map +1 -1
  355. package/esm/redux/connectors/PanelRenderer.js +0 -1
  356. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  357. package/esm/redux/connectors/Preferences.js +0 -1
  358. package/esm/redux/connectors/Preferences.js.map +1 -1
  359. package/esm/redux/connectors/Progress.js +0 -1
  360. package/esm/redux/connectors/Progress.js.map +1 -1
  361. package/esm/redux/connectors/ProgressIndicator.js +0 -1
  362. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  363. package/esm/redux/connectors/QuickSearch.js +0 -1
  364. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  365. package/esm/redux/connectors/SignIn.js +1 -2
  366. package/esm/redux/connectors/SignIn.js.map +1 -1
  367. package/esm/redux/connectors/SignOut.js +3 -7
  368. package/esm/redux/connectors/SignOut.js.map +1 -1
  369. package/esm/redux/connectors/Tab.js +0 -1
  370. package/esm/redux/connectors/Tab.js.map +1 -1
  371. package/esm/redux/connectors/index.js +0 -1
  372. package/esm/redux/connectors/index.js.map +1 -1
  373. package/esm/redux/index.js +0 -2
  374. package/esm/redux/index.js.map +1 -1
  375. package/esm/redux/reducers/AuthReducer.js +0 -2
  376. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  377. package/esm/redux/reducers/ErrorReducer.js +0 -2
  378. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  379. package/esm/redux/reducers/ModalsReducer.js +0 -1
  380. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  381. package/esm/redux/reducers/NotificationReducer.js +0 -2
  382. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  383. package/esm/redux/reducers/PreferencesReducer.js +2 -4
  384. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  385. package/esm/redux/reducers/ProgressIndicatorReducer.js +1 -4
  386. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  387. package/esm/redux/reducers/createReducer.js +0 -1
  388. package/esm/redux/reducers/createReducer.js.map +1 -1
  389. package/esm/redux/reducers/index.js +0 -1
  390. package/esm/redux/reducers/index.js.map +1 -1
  391. package/esm/redux/selectors/i18n.js +1 -4
  392. package/esm/redux/selectors/i18n.js.map +1 -1
  393. package/esm/redux/selectors/index.js +0 -1
  394. package/esm/redux/selectors/index.js.map +1 -1
  395. package/esm/redux/store/beforeRenderHooks.js +0 -2
  396. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  397. package/esm/redux/store/configureStore.js +0 -1
  398. package/esm/redux/store/configureStore.js.map +1 -1
  399. package/esm/utils/browser/Cache.js +0 -1
  400. package/esm/utils/browser/Cache.js.map +1 -1
  401. package/esm/utils/browser/Cookies.js +3 -4
  402. package/esm/utils/browser/Cookies.js.map +1 -1
  403. package/esm/utils/helpers/createHash.js +0 -2
  404. package/esm/utils/helpers/createHash.js.map +1 -1
  405. package/esm/utils/helpers/createUUID.js +0 -1
  406. package/esm/utils/helpers/createUUID.js.map +1 -1
  407. package/esm/utils/helpers/objects.js +0 -1
  408. package/esm/utils/helpers/objects.js.map +1 -1
  409. package/esm/utils/helpers/sanitizeHtml.js +0 -1
  410. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  411. package/esm/utils/helpers/text.js +0 -1
  412. package/esm/utils/helpers/text.js.map +1 -1
  413. package/esm/utils/index.js +0 -2
  414. package/esm/utils/index.js.map +1 -1
  415. package/esm/utils/number/formatValue.js +0 -1
  416. package/esm/utils/number/formatValue.js.map +1 -1
  417. package/esm/utils/number/parseNumbers.js +0 -1
  418. package/esm/utils/number/parseNumbers.js.map +1 -1
  419. package/lib/constants/LayoutHints.js +0 -1
  420. package/lib/constants/LayoutHints.js.map +1 -1
  421. package/lib/constants/Settings.js +0 -1
  422. package/lib/constants/Settings.js.map +1 -1
  423. package/lib/exceptions/ConfigurationException.js +0 -1
  424. package/lib/exceptions/ConfigurationException.js.map +1 -1
  425. package/lib/exceptions/FetchException.js +1 -2
  426. package/lib/exceptions/FetchException.js.map +1 -1
  427. package/lib/exceptions/UnauthorizedException.js +0 -1
  428. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  429. package/lib/hooks/useAllFormsOnModel.js +0 -1
  430. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  431. package/lib/hooks/useAuthentication.js +4 -5
  432. package/lib/hooks/useAuthentication.js.map +1 -1
  433. package/lib/hooks/useContent.js +0 -1
  434. package/lib/hooks/useContent.js.map +1 -1
  435. package/lib/hooks/useDeepCompareEffect.js +0 -1
  436. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  437. package/lib/hooks/useForm.js +1 -2
  438. package/lib/hooks/useForm.js.map +1 -1
  439. package/lib/hooks/useI18n.js +0 -1
  440. package/lib/hooks/useI18n.js.map +1 -1
  441. package/lib/hooks/useModal.js +0 -1
  442. package/lib/hooks/useModal.js.map +1 -1
  443. package/lib/hooks/useModelCatalog.js +1 -2
  444. package/lib/hooks/useModelCatalog.js.map +1 -1
  445. package/lib/hooks/useModels.js +0 -1
  446. package/lib/hooks/useModels.js.map +1 -1
  447. package/lib/hooks/useModularUI.js +0 -1
  448. package/lib/hooks/useModularUI.js.map +1 -1
  449. package/lib/hooks/useModularUIBasic.js +3 -4
  450. package/lib/hooks/useModularUIBasic.js.map +1 -1
  451. package/lib/hooks/useModularUIModel.js +0 -1
  452. package/lib/hooks/useModularUIModel.js.map +1 -1
  453. package/lib/hooks/useModularUIRequest.js +0 -1
  454. package/lib/hooks/useModularUIRequest.js.map +1 -1
  455. package/lib/hooks/useNotification.js +0 -1
  456. package/lib/hooks/useNotification.js.map +1 -1
  457. package/lib/hooks/usePreference.js +0 -1
  458. package/lib/hooks/usePreference.js.map +1 -1
  459. package/lib/hooks/useProgressIndicator.js +0 -1
  460. package/lib/hooks/useProgressIndicator.js.map +1 -1
  461. package/lib/hooks/useRouter.js +3 -13
  462. package/lib/hooks/useRouter.js.map +1 -1
  463. package/lib/i18n/Locale.js +0 -1
  464. package/lib/i18n/Locale.js.map +1 -1
  465. package/lib/i18n/Locales.js +0 -1
  466. package/lib/i18n/Locales.js.map +1 -1
  467. package/lib/i18n/Message.js +0 -1
  468. package/lib/i18n/Message.js.map +1 -1
  469. package/lib/i18n/withMessage.js +0 -1
  470. package/lib/i18n/withMessage.js.map +1 -1
  471. package/lib/models/actions/ActionCollection.js +0 -1
  472. package/lib/models/actions/ActionCollection.js.map +1 -1
  473. package/lib/models/actions/ActionModel.js +0 -1
  474. package/lib/models/actions/ActionModel.js.map +1 -1
  475. package/lib/models/application/ApplicationModel.js +2 -5
  476. package/lib/models/application/ApplicationModel.js.map +1 -1
  477. package/lib/models/attributes/AttributeCollection.js +3 -9
  478. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  479. package/lib/models/attributes/AttributeContent.js +4 -8
  480. package/lib/models/attributes/AttributeContent.js.map +1 -1
  481. package/lib/models/attributes/AttributeDataHelper.js +1 -3
  482. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  483. package/lib/models/attributes/AttributeModel.js +2 -5
  484. package/lib/models/attributes/AttributeModel.js.map +1 -1
  485. package/lib/models/attributes/AttributeSetModel.js +0 -1
  486. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  487. package/lib/models/attributes/BooleanAttributeModel.js +0 -1
  488. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  489. package/lib/models/attributes/CaptchaAttributeModel.js +0 -1
  490. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  491. package/lib/models/attributes/ChoiceAttributeModel.js +2 -5
  492. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  493. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +0 -1
  494. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  495. package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -4
  496. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  497. package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -6
  498. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  499. package/lib/models/attributes/CompositeAttributeModel.js +3 -6
  500. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  501. package/lib/models/attributes/DatetimeAttributeModel.js +0 -1
  502. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  503. package/lib/models/attributes/HelptextAttributeModel.js +1 -2
  504. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  505. package/lib/models/attributes/LabelAttributeModel.js +1 -2
  506. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  507. package/lib/models/attributes/MemoAttributeModel.js +1 -2
  508. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  509. package/lib/models/attributes/MoneyAttributeModel.js +1 -2
  510. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  511. package/lib/models/attributes/NumberAttributeModel.js +0 -1
  512. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  513. package/lib/models/attributes/PasswordAttributeModel.js +1 -2
  514. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  515. package/lib/models/attributes/StringAttributeModel.js +1 -2
  516. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  517. package/lib/models/attributes/UploadAttributeModel.js +0 -1
  518. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  519. package/lib/models/attributes/XMLAttributeModel.js +1 -2
  520. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  521. package/lib/models/attributes/_createAttribute.js +2 -4
  522. package/lib/models/attributes/_createAttribute.js.map +1 -1
  523. package/lib/models/attributes/input-constraints/BSNConstraint.js +0 -1
  524. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  525. package/lib/models/attributes/input-constraints/ConstraintCollection.js +0 -1
  526. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  527. package/lib/models/attributes/input-constraints/ConstraintModel.js +0 -1
  528. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  529. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +0 -1
  530. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  531. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +0 -1
  532. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  533. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +0 -1
  534. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  535. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +0 -1
  536. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  537. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +0 -1
  538. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  539. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +0 -1
  540. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  541. package/lib/models/attributes/input-constraints/IBANConstraint.js +0 -1
  542. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  543. package/lib/models/attributes/input-constraints/MandatoryConstraint.js +0 -1
  544. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  545. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +0 -1
  546. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  547. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +0 -1
  548. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  549. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +0 -1
  550. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  551. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +0 -1
  552. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  553. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +0 -1
  554. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  555. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +0 -1
  556. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  557. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +0 -1
  558. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  559. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +0 -1
  560. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  561. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +0 -1
  562. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  563. package/lib/models/attributes/input-constraints/RangeConstraint.js +0 -1
  564. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  565. package/lib/models/attributes/input-constraints/RegexConstraint.js +0 -1
  566. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  567. package/lib/models/attributes/input-constraints/StringLengthConstraint.js +0 -1
  568. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  569. package/lib/models/attributes/input-constraints/XMLConstraint.js +0 -1
  570. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  571. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
  572. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  573. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -3
  574. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  575. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +0 -1
  576. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  577. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +0 -1
  578. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  579. package/lib/models/base/BaseCollection.js +0 -1
  580. package/lib/models/base/BaseCollection.js.map +1 -1
  581. package/lib/models/base/BaseModel.js +0 -1
  582. package/lib/models/base/BaseModel.js.map +1 -1
  583. package/lib/models/base/ResourceCollection.js +1 -2
  584. package/lib/models/base/ResourceCollection.js.map +1 -1
  585. package/lib/models/base/ResourceModel.js +0 -1
  586. package/lib/models/base/ResourceModel.js.map +1 -1
  587. package/lib/models/caseview/CaseViewModel.js +0 -1
  588. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  589. package/lib/models/concepts/BusinessScenarioModel.js +4 -13
  590. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  591. package/lib/models/concepts/ConceptDetailModel.js +1 -3
  592. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  593. package/lib/models/concepts/ConceptIndexModel.js +1 -3
  594. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  595. package/lib/models/concepts/ConceptLinkModel.js +2 -4
  596. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  597. package/lib/models/concepts/ConceptRelationCollection.js +0 -1
  598. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  599. package/lib/models/concepts/ConceptRelationModel.js +0 -1
  600. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  601. package/lib/models/concepts/ConceptTypeDetailModel.js +0 -1
  602. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  603. package/lib/models/concepts/SourceReferenceCollection.js +0 -1
  604. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  605. package/lib/models/concepts/SourceReferenceModel.js +0 -1
  606. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  607. package/lib/models/content/ContentIndexModel.js +3 -9
  608. package/lib/models/content/ContentIndexModel.js.map +1 -1
  609. package/lib/models/content/ContentLinkModel.js +1 -2
  610. package/lib/models/content/ContentLinkModel.js.map +1 -1
  611. package/lib/models/content/ContentModel.js +2 -5
  612. package/lib/models/content/ContentModel.js.map +1 -1
  613. package/lib/models/content/ContentTOCModel.js +2 -5
  614. package/lib/models/content/ContentTOCModel.js.map +1 -1
  615. package/lib/models/content/ContentTypeModel.js +0 -1
  616. package/lib/models/content/ContentTypeModel.js.map +1 -1
  617. package/lib/models/content/SectionModel.js +1 -3
  618. package/lib/models/content/SectionModel.js.map +1 -1
  619. package/lib/models/content/SubSectionModel.js +0 -1
  620. package/lib/models/content/SubSectionModel.js.map +1 -1
  621. package/lib/models/contentconfiguration/ContentConfiguration.js +0 -1
  622. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  623. package/lib/models/contentconfiguration/ContentConfigurationElements.js +0 -1
  624. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  625. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +0 -1
  626. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  627. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +0 -1
  628. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  629. package/lib/models/contentconfiguration/ContentConfigurationResults.js +1 -2
  630. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  631. package/lib/models/detail/DetailModel.js +2 -3
  632. package/lib/models/detail/DetailModel.js.map +1 -1
  633. package/lib/models/error/ErrorCollection.js +0 -1
  634. package/lib/models/error/ErrorCollection.js.map +1 -1
  635. package/lib/models/error/ErrorModel.js +0 -1
  636. package/lib/models/error/ErrorModel.js.map +1 -1
  637. package/lib/models/error/ErrorResponse.js +11 -23
  638. package/lib/models/error/ErrorResponse.js.map +1 -1
  639. package/lib/models/filters/AssignmentFilterModel.js +0 -1
  640. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  641. package/lib/models/filters/BaseFilterModel.js +2 -5
  642. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  643. package/lib/models/filters/ConceptIndexFilterModel.js +0 -1
  644. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  645. package/lib/models/filters/FilterCollection.js +2 -5
  646. package/lib/models/filters/FilterCollection.js.map +1 -1
  647. package/lib/models/filters/FilterModel.js +0 -1
  648. package/lib/models/filters/FilterModel.js.map +1 -1
  649. package/lib/models/filters/RangeFilterModel.js +0 -1
  650. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  651. package/lib/models/form/FormModel.js +13 -29
  652. package/lib/models/form/FormModel.js.map +1 -1
  653. package/lib/models/form/FormObjectModel.js +6 -12
  654. package/lib/models/form/FormObjectModel.js.map +1 -1
  655. package/lib/models/grouping/GroupingModel.js +1 -2
  656. package/lib/models/grouping/GroupingModel.js.map +1 -1
  657. package/lib/models/href/Href.js +0 -1
  658. package/lib/models/href/Href.js.map +1 -1
  659. package/lib/models/href/ListHref.js +0 -1
  660. package/lib/models/href/ListHref.js.map +1 -1
  661. package/lib/models/layouthint/LayoutHintCollection.js +0 -1
  662. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  663. package/lib/models/links/LinkCollection.js +0 -1
  664. package/lib/models/links/LinkCollection.js.map +1 -1
  665. package/lib/models/links/LinkModel.js +0 -1
  666. package/lib/models/links/LinkModel.js.map +1 -1
  667. package/lib/models/list/ListDetailModel.js +4 -7
  668. package/lib/models/list/ListDetailModel.js.map +1 -1
  669. package/lib/models/list/ListHeaderModel.js +0 -1
  670. package/lib/models/list/ListHeaderModel.js.map +1 -1
  671. package/lib/models/list/ListItemCollection.js +0 -1
  672. package/lib/models/list/ListItemCollection.js.map +1 -1
  673. package/lib/models/list/ListItemModel.js +0 -1
  674. package/lib/models/list/ListItemModel.js.map +1 -1
  675. package/lib/models/list/ListModel.js +2 -3
  676. package/lib/models/list/ListModel.js.map +1 -1
  677. package/lib/models/lookup/LookupOptionCollection.js +0 -1
  678. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  679. package/lib/models/lookup/LookupOptionsModel.js +0 -1
  680. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  681. package/lib/models/modelcatalog/ModelCatalogModel.js +0 -1
  682. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  683. package/lib/models/paging/PagingModel.js +0 -1
  684. package/lib/models/paging/PagingModel.js.map +1 -1
  685. package/lib/models/panels/GroupingPanelModel.js +0 -1
  686. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  687. package/lib/models/parameter/Parameter.js +0 -1
  688. package/lib/models/parameter/Parameter.js.map +1 -1
  689. package/lib/models/process/ProcessStatusSettingsModel.js +0 -1
  690. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  691. package/lib/models/resolveModel.js +0 -1
  692. package/lib/models/resolveModel.js.map +1 -1
  693. package/lib/models/search/CaseSearchModel.js +0 -1
  694. package/lib/models/search/CaseSearchModel.js.map +1 -1
  695. package/lib/models/sorting/SortOptionModel.js +0 -1
  696. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  697. package/lib/models/sorting/SortingModel.js +1 -2
  698. package/lib/models/sorting/SortingModel.js.map +1 -1
  699. package/lib/models/tab/TabModel.js +1 -3
  700. package/lib/models/tab/TabModel.js.map +1 -1
  701. package/lib/models/taskgroup/TaskGroupCollection.js +0 -1
  702. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  703. package/lib/models/taskgroup/TaskGroupModel.js +0 -1
  704. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  705. package/lib/models/user/UserModel.js +0 -1
  706. package/lib/models/user/UserModel.js.map +1 -1
  707. package/lib/models/user/UserProfileModel.js +0 -1
  708. package/lib/models/user/UserProfileModel.js.map +1 -1
  709. package/lib/models/user/UserServicesModel.js +0 -1
  710. package/lib/models/user/UserServicesModel.js.map +1 -1
  711. package/lib/modularui/Authenticate.js +0 -1
  712. package/lib/modularui/Authenticate.js.map +1 -1
  713. package/lib/modularui/ModularUIRequest.js +4 -10
  714. package/lib/modularui/ModularUIRequest.js.map +1 -1
  715. package/lib/modularui/ModularUIResponse.js +2 -4
  716. package/lib/modularui/ModularUIResponse.js.map +1 -1
  717. package/lib/react/ErrorBoundary.js +0 -1
  718. package/lib/react/ErrorBoundary.js.map +1 -1
  719. package/lib/react/ErrorBoundaryFallback.js +0 -1
  720. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  721. package/lib/react/utils.js +0 -1
  722. package/lib/react/utils.js.map +1 -1
  723. package/lib/react-client/Init.js +0 -1
  724. package/lib/react-client/Init.js.map +1 -1
  725. package/lib/react-client/client.js +0 -1
  726. package/lib/react-client/client.js.map +1 -1
  727. package/lib/react-client/rehydrate.js +1 -2
  728. package/lib/react-client/rehydrate.js.map +1 -1
  729. package/lib/react-server/contextPath.js +0 -1
  730. package/lib/react-server/contextPath.js.map +1 -1
  731. package/lib/react-server/createSSRComplete.js +0 -1
  732. package/lib/react-server/createSSRComplete.js.map +1 -1
  733. package/lib/react-server/htmlpage.js +1 -2
  734. package/lib/react-server/htmlpage.js.map +1 -1
  735. package/lib/react-server/renderSSRComplete.js +0 -1
  736. package/lib/react-server/renderSSRComplete.js.map +1 -1
  737. package/lib/react-server/renderSSRMinimal.js +0 -1
  738. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  739. package/lib/react-server/requestInformation.js +0 -1
  740. package/lib/react-server/requestInformation.js.map +1 -1
  741. package/lib/react-server/serverNoSSR.js +1 -3
  742. package/lib/react-server/serverNoSSR.js.map +1 -1
  743. package/lib/react-server/serverSSR.js +0 -1
  744. package/lib/react-server/serverSSR.js.map +1 -1
  745. package/lib/react-server/serverUtil.js +0 -1
  746. package/lib/react-server/serverUtil.js.map +1 -1
  747. package/lib/react-theme/ThemeProvider.js +0 -1
  748. package/lib/react-theme/ThemeProvider.js.map +1 -1
  749. package/lib/react-theme/createTheme.js +0 -1
  750. package/lib/react-theme/createTheme.js.map +1 -1
  751. package/lib/react-theme/useTheme.js +0 -1
  752. package/lib/react-theme/useTheme.js.map +1 -1
  753. package/lib/react-theme/utils/background.js +0 -1
  754. package/lib/react-theme/utils/background.js.map +1 -1
  755. package/lib/react-theme/utils/colors.js +0 -1
  756. package/lib/react-theme/utils/colors.js.map +1 -1
  757. package/lib/react-theme/utils/contrast.js +1 -3
  758. package/lib/react-theme/utils/contrast.js.map +1 -1
  759. package/lib/react-theme/utils/corners.js +0 -1
  760. package/lib/react-theme/utils/corners.js.map +1 -1
  761. package/lib/react-theme/utils/spacers.js +0 -1
  762. package/lib/react-theme/utils/spacers.js.map +1 -1
  763. package/lib/react-theme/utils/themeProps.js +0 -1
  764. package/lib/react-theme/utils/themeProps.js.map +1 -1
  765. package/lib/redux/_i18n/actions.js +0 -1
  766. package/lib/redux/_i18n/actions.js.map +1 -1
  767. package/lib/redux/_i18n/reducer.js +0 -1
  768. package/lib/redux/_i18n/reducer.js.map +1 -1
  769. package/lib/redux/_modularui/actions.js +7 -8
  770. package/lib/redux/_modularui/actions.js.map +1 -1
  771. package/lib/redux/_modularui/connector.js +2 -4
  772. package/lib/redux/_modularui/connector.js.map +1 -1
  773. package/lib/redux/_modularui/middleware.js +0 -1
  774. package/lib/redux/_modularui/middleware.js.map +1 -1
  775. package/lib/redux/_modularui/modularuiUtils.js +2 -3
  776. package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
  777. package/lib/redux/_modularui/reducer.js +1 -3
  778. package/lib/redux/_modularui/reducer.js.map +1 -1
  779. package/lib/redux/_modularui/selectors.js +7 -14
  780. package/lib/redux/_modularui/selectors.js.map +1 -1
  781. package/lib/redux/_modularui/withModularUI.js +0 -1
  782. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  783. package/lib/redux/_router/actions.js +0 -1
  784. package/lib/redux/_router/actions.js.map +1 -1
  785. package/lib/redux/_router/connectors.js +9 -19
  786. package/lib/redux/_router/connectors.js.map +1 -1
  787. package/lib/redux/_router/middleware.js +0 -1
  788. package/lib/redux/_router/middleware.js.map +1 -1
  789. package/lib/redux/_router/reducer.js +0 -1
  790. package/lib/redux/_router/reducer.js.map +1 -1
  791. package/lib/redux/actions/Application.js +0 -1
  792. package/lib/redux/actions/Application.js.map +1 -1
  793. package/lib/redux/actions/Authorization.js +4 -7
  794. package/lib/redux/actions/Authorization.js.map +1 -1
  795. package/lib/redux/actions/Error.js +0 -1
  796. package/lib/redux/actions/Error.js.map +1 -1
  797. package/lib/redux/actions/Form.js +0 -1
  798. package/lib/redux/actions/Form.js.map +1 -1
  799. package/lib/redux/actions/FormAttributeSet.js +2 -4
  800. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  801. package/lib/redux/actions/FormAttributeSetRepeatable.js +0 -1
  802. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  803. package/lib/redux/actions/FormAutosave.js +0 -1
  804. package/lib/redux/actions/FormAutosave.js.map +1 -1
  805. package/lib/redux/actions/FormAutosubmit.js +0 -1
  806. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  807. package/lib/redux/actions/FormValidations.js +0 -1
  808. package/lib/redux/actions/FormValidations.js.map +1 -1
  809. package/lib/redux/actions/Modals.js +0 -1
  810. package/lib/redux/actions/Modals.js.map +1 -1
  811. package/lib/redux/actions/Notification.js +0 -1
  812. package/lib/redux/actions/Notification.js.map +1 -1
  813. package/lib/redux/actions/Preferences.js +5 -6
  814. package/lib/redux/actions/Preferences.js.map +1 -1
  815. package/lib/redux/actions/ProgressIndicator.js +0 -1
  816. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  817. package/lib/redux/actions/SignIn.js +2 -4
  818. package/lib/redux/actions/SignIn.js.map +1 -1
  819. package/lib/redux/actions/SignOut.js +0 -1
  820. package/lib/redux/actions/SignOut.js.map +1 -1
  821. package/lib/redux/connectors/Application.js +0 -1
  822. package/lib/redux/connectors/Application.js.map +1 -1
  823. package/lib/redux/connectors/Breadcrumb.js +0 -1
  824. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  825. package/lib/redux/connectors/CaseView.js +0 -1
  826. package/lib/redux/connectors/CaseView.js.map +1 -1
  827. package/lib/redux/connectors/ConceptDetail.js +0 -1
  828. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  829. package/lib/redux/connectors/ContentBrowser.js +0 -1
  830. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  831. package/lib/redux/connectors/ContentDetail.js +0 -1
  832. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  833. package/lib/redux/connectors/ContentDetailSection.js +0 -1
  834. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  835. package/lib/redux/connectors/Form.js +3 -7
  836. package/lib/redux/connectors/Form.js.map +1 -1
  837. package/lib/redux/connectors/FormAttributeSet.js +0 -1
  838. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  839. package/lib/redux/connectors/ListDetail.js +0 -1
  840. package/lib/redux/connectors/ListDetail.js.map +1 -1
  841. package/lib/redux/connectors/Modal.js +0 -1
  842. package/lib/redux/connectors/Modal.js.map +1 -1
  843. package/lib/redux/connectors/ModelCatalog.js +0 -1
  844. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  845. package/lib/redux/connectors/Notification.js +0 -1
  846. package/lib/redux/connectors/Notification.js.map +1 -1
  847. package/lib/redux/connectors/PanelRenderer.js +0 -1
  848. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  849. package/lib/redux/connectors/Preferences.js +0 -1
  850. package/lib/redux/connectors/Preferences.js.map +1 -1
  851. package/lib/redux/connectors/Progress.js +0 -1
  852. package/lib/redux/connectors/Progress.js.map +1 -1
  853. package/lib/redux/connectors/ProgressIndicator.js +0 -1
  854. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  855. package/lib/redux/connectors/QuickSearch.js +0 -1
  856. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  857. package/lib/redux/connectors/SignIn.js +1 -2
  858. package/lib/redux/connectors/SignIn.js.map +1 -1
  859. package/lib/redux/connectors/SignOut.js +3 -7
  860. package/lib/redux/connectors/SignOut.js.map +1 -1
  861. package/lib/redux/connectors/Tab.js +0 -1
  862. package/lib/redux/connectors/Tab.js.map +1 -1
  863. package/lib/redux/reducers/AuthReducer.js +0 -1
  864. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  865. package/lib/redux/reducers/ErrorReducer.js +0 -1
  866. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  867. package/lib/redux/reducers/ModalsReducer.js +0 -1
  868. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  869. package/lib/redux/reducers/NotificationReducer.js +0 -1
  870. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  871. package/lib/redux/reducers/PreferencesReducer.js +2 -3
  872. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  873. package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -3
  874. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  875. package/lib/redux/reducers/createReducer.js +0 -1
  876. package/lib/redux/reducers/createReducer.js.map +1 -1
  877. package/lib/redux/selectors/i18n.js +1 -3
  878. package/lib/redux/selectors/i18n.js.map +1 -1
  879. package/lib/redux/store/beforeRenderHooks.js +0 -1
  880. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  881. package/lib/redux/store/configureStore.js +0 -1
  882. package/lib/redux/store/configureStore.js.map +1 -1
  883. package/lib/utils/browser/Cache.js +0 -1
  884. package/lib/utils/browser/Cache.js.map +1 -1
  885. package/lib/utils/browser/Cookies.js +3 -4
  886. package/lib/utils/browser/Cookies.js.map +1 -1
  887. package/lib/utils/datetime/DateTimeUtil.js +0 -1
  888. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  889. package/lib/utils/fetch/serverFetch.js +0 -1
  890. package/lib/utils/fetch/serverFetch.js.map +1 -1
  891. package/lib/utils/fetch/universalFetch.js +0 -1
  892. package/lib/utils/fetch/universalFetch.js.map +1 -1
  893. package/lib/utils/fetch/xhr.js +0 -1
  894. package/lib/utils/fetch/xhr.js.map +1 -1
  895. package/lib/utils/helpers/checkResource.js +0 -1
  896. package/lib/utils/helpers/checkResource.js.map +1 -1
  897. package/lib/utils/helpers/createHash.js +0 -1
  898. package/lib/utils/helpers/createHash.js.map +1 -1
  899. package/lib/utils/helpers/objects.js +0 -1
  900. package/lib/utils/helpers/objects.js.map +1 -1
  901. package/lib/utils/helpers/sanitizeHtml.js +0 -1
  902. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  903. package/lib/utils/helpers/text.js +0 -1
  904. package/lib/utils/helpers/text.js.map +1 -1
  905. package/lib/utils/number/formatValue.js +0 -1
  906. package/lib/utils/number/formatValue.js.map +1 -1
  907. package/lib/utils/number/parseNumbers.js +0 -1
  908. package/lib/utils/number/parseNumbers.js.map +1 -1
  909. package/package.json +18 -13
  910. package/types/constants/Constants.d.ts +151 -0
  911. package/types/constants/LayoutHintConfig.d.ts +241 -0
  912. package/types/constants/LayoutHints.d.ts +78 -0
  913. package/types/constants/Settings.d.ts +16 -0
  914. package/types/constants/index.d.ts +3 -0
  915. package/types/exceptions/ConfigurationException.d.ts +6 -0
  916. package/types/exceptions/FetchException.d.ts +31 -0
  917. package/types/exceptions/IllegalArgumentException.d.ts +6 -0
  918. package/types/exceptions/IllegalReturnException.d.ts +5 -0
  919. package/types/exceptions/IllegalStateException.d.ts +6 -0
  920. package/types/exceptions/JsonParseException.d.ts +6 -0
  921. package/types/exceptions/MissingPropertyException.d.ts +6 -0
  922. package/types/exceptions/NetworkException.d.ts +9 -0
  923. package/types/exceptions/NotAllowedUriException.d.ts +6 -0
  924. package/types/exceptions/NotFoundException.d.ts +10 -0
  925. package/types/exceptions/ServerRequestException.d.ts +6 -0
  926. package/types/exceptions/ThemePropertyException.d.ts +6 -0
  927. package/types/exceptions/TimeoutException.d.ts +7 -0
  928. package/types/exceptions/UnauthorizedException.d.ts +11 -0
  929. package/types/exceptions/UnsupportedOperationException.d.ts +6 -0
  930. package/types/exceptions/index.d.ts +15 -0
  931. package/types/hooks/useI18n.d.ts +9 -0
  932. package/types/i18n/Locale.d.ts +53 -0
  933. package/types/i18n/Locales.d.ts +55 -0
  934. package/types/i18n/Message.d.ts +6 -0
  935. package/types/i18n/index.d.ts +5 -0
  936. package/types/i18n/languages.d.ts +215 -0
  937. package/types/i18n/translations/beinformed_error_messages_en.nl.d.ts +97 -0
  938. package/types/i18n/translations/beinformed_error_messages_nl.nl.d.ts +97 -0
  939. package/types/i18n/types.d.ts +11 -0
  940. package/types/i18n/withMessage.d.ts +3 -0
  941. package/types/index.d.ts +6 -0
  942. package/types/models/actions/ActionCollection.d.ts +29 -0
  943. package/types/models/actions/ActionModel.d.ts +84 -0
  944. package/types/models/application/ApplicationModel.d.ts +41 -0
  945. package/types/models/attributes/AttributeCollection.d.ts +96 -0
  946. package/types/models/attributes/AttributeContent.d.ts +64 -0
  947. package/types/models/attributes/AttributeDataHelper.d.ts +67 -0
  948. package/types/models/attributes/AttributeModel.d.ts +395 -0
  949. package/types/models/attributes/AttributeSetModel.d.ts +28 -0
  950. package/types/models/attributes/BooleanAttributeModel.d.ts +65 -0
  951. package/types/models/attributes/CaptchaAttributeModel.d.ts +10 -0
  952. package/types/models/attributes/ChoiceAttributeModel.d.ts +76 -0
  953. package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +82 -0
  954. package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +133 -0
  955. package/types/models/attributes/CompositeAttributeChildCollection.d.ts +56 -0
  956. package/types/models/attributes/CompositeAttributeModel.d.ts +44 -0
  957. package/types/models/attributes/DatetimeAttributeModel.d.ts +111 -0
  958. package/types/models/attributes/HelptextAttributeModel.d.ts +16 -0
  959. package/types/models/attributes/LabelAttributeModel.d.ts +12 -0
  960. package/types/models/attributes/MemoAttributeModel.d.ts +14 -0
  961. package/types/models/attributes/MoneyAttributeModel.d.ts +14 -0
  962. package/types/models/attributes/NumberAttributeModel.d.ts +49 -0
  963. package/types/models/attributes/PasswordAttributeModel.d.ts +62 -0
  964. package/types/models/attributes/StringAttributeModel.d.ts +62 -0
  965. package/types/models/attributes/UploadAttributeModel.d.ts +54 -0
  966. package/types/models/attributes/XMLAttributeModel.d.ts +10 -0
  967. package/types/models/attributes/_createAttribute.d.ts +6 -0
  968. package/types/models/attributes/input-constraints/BSNConstraint.d.ts +26 -0
  969. package/types/models/attributes/input-constraints/ConstraintCollection.d.ts +24 -0
  970. package/types/models/attributes/input-constraints/ConstraintModel.d.ts +34 -0
  971. package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +109 -0
  972. package/types/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +36 -0
  973. package/types/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +36 -0
  974. package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +92 -0
  975. package/types/models/attributes/input-constraints/FileExtensionConstraint.d.ts +33 -0
  976. package/types/models/attributes/input-constraints/FileSizeConstraint.d.ts +42 -0
  977. package/types/models/attributes/input-constraints/IBANConstraint.d.ts +23 -0
  978. package/types/models/attributes/input-constraints/MandatoryConstraint.d.ts +23 -0
  979. package/types/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +36 -0
  980. package/types/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +61 -0
  981. package/types/models/attributes/input-constraints/NumberFormatConstraint.d.ts +52 -0
  982. package/types/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +46 -0
  983. package/types/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +36 -0
  984. package/types/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +23 -0
  985. package/types/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +32 -0
  986. package/types/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +32 -0
  987. package/types/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +35 -0
  988. package/types/models/attributes/input-constraints/RangeConstraint.d.ts +97 -0
  989. package/types/models/attributes/input-constraints/RegexConstraint.d.ts +37 -0
  990. package/types/models/attributes/input-constraints/StringLengthConstraint.d.ts +46 -0
  991. package/types/models/attributes/input-constraints/XMLConstraint.d.ts +26 -0
  992. package/types/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +46 -0
  993. package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +57 -0
  994. package/types/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +27 -0
  995. package/types/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +17 -0
  996. package/types/models/base/BaseCollection.d.ts +89 -0
  997. package/types/models/base/BaseModel.d.ts +58 -0
  998. package/types/models/base/ResourceCollection.d.ts +19 -0
  999. package/types/models/base/ResourceModel.d.ts +93 -0
  1000. package/types/models/caseview/CaseViewModel.d.ts +45 -0
  1001. package/types/models/concepts/BusinessScenarioModel.d.ts +20 -0
  1002. package/types/models/concepts/ConceptDetailModel.d.ts +69 -0
  1003. package/types/models/concepts/ConceptIndexModel.d.ts +36 -0
  1004. package/types/models/concepts/ConceptLinkModel.d.ts +65 -0
  1005. package/types/models/concepts/ConceptRelationCollection.d.ts +34 -0
  1006. package/types/models/concepts/ConceptRelationModel.d.ts +43 -0
  1007. package/types/models/concepts/ConceptTypeDetailModel.d.ts +39 -0
  1008. package/types/models/concepts/SourceReferenceCollection.d.ts +13 -0
  1009. package/types/models/concepts/SourceReferenceModel.d.ts +30 -0
  1010. package/types/models/content/ContentIndexModel.d.ts +34 -0
  1011. package/types/models/content/ContentLinkModel.d.ts +81 -0
  1012. package/types/models/content/ContentModel.d.ts +74 -0
  1013. package/types/models/content/ContentTOCModel.d.ts +37 -0
  1014. package/types/models/content/ContentTypeModel.d.ts +26 -0
  1015. package/types/models/content/SectionModel.d.ts +75 -0
  1016. package/types/models/content/SubSectionModel.d.ts +64 -0
  1017. package/types/models/contentconfiguration/ContentConfiguration.d.ts +28 -0
  1018. package/types/models/contentconfiguration/ContentConfigurationElements.d.ts +47 -0
  1019. package/types/models/contentconfiguration/ContentConfigurationEndResults.d.ts +16 -0
  1020. package/types/models/contentconfiguration/ContentConfigurationQuestions.d.ts +22 -0
  1021. package/types/models/contentconfiguration/ContentConfigurationResults.d.ts +39 -0
  1022. package/types/models/detail/DetailModel.d.ts +72 -0
  1023. package/types/models/error/ErrorCollection.d.ts +51 -0
  1024. package/types/models/error/ErrorModel.d.ts +36 -0
  1025. package/types/models/error/ErrorResponse.d.ts +148 -0
  1026. package/types/models/filters/AssignmentFilterModel.d.ts +35 -0
  1027. package/types/models/filters/BaseFilterModel.d.ts +85 -0
  1028. package/types/models/filters/ConceptIndexFilterModel.d.ts +6 -0
  1029. package/types/models/filters/FilterCollection.d.ts +48 -0
  1030. package/types/models/filters/FilterModel.d.ts +5 -0
  1031. package/types/models/filters/RangeFilterModel.d.ts +6 -0
  1032. package/types/models/form/FormModel.d.ts +309 -0
  1033. package/types/models/form/FormObjectModel.d.ts +168 -0
  1034. package/types/models/grouping/GroupingModel.d.ts +85 -0
  1035. package/types/models/href/Href.d.ts +17 -0
  1036. package/types/models/href/ListHref.d.ts +64 -0
  1037. package/types/models/index.d.ts +94 -0
  1038. package/types/models/layouthint/LayoutHintCollection.d.ts +43 -0
  1039. package/types/models/links/LinkCollection.d.ts +62 -0
  1040. package/types/models/links/LinkModel.d.ts +92 -0
  1041. package/types/models/links/normalizeLinkJSON.d.ts +9 -0
  1042. package/types/models/list/ListDetailModel.d.ts +69 -0
  1043. package/types/models/list/ListHeaderModel.d.ts +64 -0
  1044. package/types/models/list/ListItemCollection.d.ts +21 -0
  1045. package/types/models/list/ListItemModel.d.ts +34 -0
  1046. package/types/models/list/ListModel.d.ts +135 -0
  1047. package/types/models/lookup/LookupOptionCollection.d.ts +11 -0
  1048. package/types/models/lookup/LookupOptionsModel.d.ts +19 -0
  1049. package/types/models/modelcatalog/ModelCatalogModel.d.ts +18 -0
  1050. package/types/models/paging/PagesizeModel.d.ts +25 -0
  1051. package/types/models/paging/PagingModel.d.ts +49 -0
  1052. package/types/models/panels/GroupingPanelModel.d.ts +39 -0
  1053. package/types/models/parameter/Parameter.d.ts +40 -0
  1054. package/types/models/process/ProcessStatusSettingsModel.d.ts +38 -0
  1055. package/types/models/resolveModel.d.ts +7 -0
  1056. package/types/models/search/CaseSearchModel.d.ts +14 -0
  1057. package/types/models/sorting/SortOptionModel.d.ts +48 -0
  1058. package/types/models/sorting/SortingModel.d.ts +42 -0
  1059. package/types/models/tab/TabModel.d.ts +44 -0
  1060. package/types/models/taskgroup/TaskGroupCollection.d.ts +12 -0
  1061. package/types/models/taskgroup/TaskGroupModel.d.ts +15 -0
  1062. package/types/models/types.d.ts +147 -0
  1063. package/types/models/user/UserModel.d.ts +14 -0
  1064. package/types/models/user/UserProfileModel.d.ts +12 -0
  1065. package/types/models/user/UserServicesModel.d.ts +28 -0
  1066. package/types/modularui/Authenticate.d.ts +42 -0
  1067. package/types/modularui/ModularUIError.d.ts +10 -0
  1068. package/types/modularui/ModularUIRequest.d.ts +170 -0
  1069. package/types/modularui/ModularUIResponse.d.ts +56 -0
  1070. package/types/modularui/index.d.ts +3 -0
  1071. package/types/redux/_i18n/types.d.ts +13 -0
  1072. package/types/redux/_modularui/types.d.ts +49 -0
  1073. package/types/redux/_router/types.d.ts +35 -0
  1074. package/types/redux/selectors/i18n.d.ts +4 -0
  1075. package/types/redux/types.d.ts +105 -0
  1076. package/types/utils/browser/Cache.d.ts +45 -0
  1077. package/types/utils/browser/Cookies.d.ts +15 -0
  1078. package/types/utils/datetime/DateTimeUtil.d.ts +164 -0
  1079. package/types/utils/fetch/serverFetch.d.ts +5 -0
  1080. package/types/utils/fetch/types.d.ts +38 -0
  1081. package/types/utils/fetch/universalFetch.d.ts +7 -0
  1082. package/types/utils/fetch/xhr.d.ts +5 -0
  1083. package/types/utils/helpers/checkResource.d.ts +3 -0
  1084. package/types/utils/helpers/createHash.d.ts +8 -0
  1085. package/types/utils/helpers/createUUID.d.ts +4 -0
  1086. package/types/utils/helpers/objects.d.ts +3 -0
  1087. package/types/utils/helpers/sanitizeHtml.d.ts +9 -0
  1088. package/types/utils/helpers/text.d.ts +7 -0
  1089. package/types/utils/index.d.ts +16 -0
  1090. package/types/utils/number/DecimalFormat.d.ts +90 -0
  1091. package/types/utils/number/formatValue.d.ts +4 -0
  1092. package/types/utils/number/parseNumbers.d.ts +9 -0
@@ -1 +1 @@
1
- {"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,EACrBC,YAAY,QACP,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,WAAW,MAAM,4BAA4B;AAkBpD;AACA;AACA,MAAMC,WAAW,GAAG,QASO;EAAA,IATN;IACnBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGnB,UAAU,EAAE;EACzBoB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGpB,kBAAkB,CAACU,OAAO,CAAC;EAC/C,MAAMW,KAAK,GAAGpB,gBAAgB,CAACmB,WAAW,EAAER,cAAc,CAAC;EAE3DT,oBAAoB,CAACkB,KAAK,EAAER,iBAAiB,CAAC;EAC9CT,qBAAqB,CAACiB,KAAK,CAAC;EAE5B,IAAIP,KAAK,EAAE;IAAA;IACT,MAAMQ,WAAW,sBAAGD,KAAK,CAACE,QAAQ,EAAE,6EAAhB,gBAAkBC,WAAW,0DAA7B,sBAA+BV,KAAK;IACxD;IACAN,WAAW,CAACc,WAAW,EAAER,KAAK,CAAC;EACjC;EAEAZ,OAAO,CAACmB,KAAK,EAAEV,OAAO,EAAED,OAAO,CAAC;EAEhCL,YAAY,CAACgB,KAAK,CAAC;EAEnBf,uBAAuB,CAACW,iBAAiB,EAAE;IAAEI,KAAK;IAAEX;EAAQ,CAAC,CAAC;EAE9D,OAAOH,gBAAgB,CAAC;IAAEc,KAAK;IAAEP,KAAK;IAAEI,IAAI;IAAEH,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAED,eAAeP,WAAW"}
1
+ {"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,EACrBC,YAAY,QACP,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,WAAW,MAAM,4BAA4B;AAkBpD;AACA;AACA,MAAMC,WAAW,GAAG,QASO;EAAA,IATN;IACnBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGnB,UAAU,EAAE;EACzBoB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGpB,kBAAkB,CAACU,OAAO,CAAC;EAC/C,MAAMW,KAAK,GAAGpB,gBAAgB,CAACmB,WAAW,EAAER,cAAc,CAAC;EAE3DT,oBAAoB,CAACkB,KAAK,EAAER,iBAAiB,CAAC;EAC9CT,qBAAqB,CAACiB,KAAK,CAAC;EAE5B,IAAIP,KAAK,EAAE;IACT,MAAMQ,WAAW,GAAGD,KAAK,CAACE,QAAQ,EAAE,EAAEC,WAAW,EAAEV,KAAK;IACxD;IACAN,WAAW,CAACc,WAAW,EAAER,KAAK,CAAC;EACjC;EAEAZ,OAAO,CAACmB,KAAK,EAAEV,OAAO,EAAED,OAAO,CAAC;EAEhCL,YAAY,CAACgB,KAAK,CAAC;EAEnBf,uBAAuB,CAACW,iBAAiB,EAAE;IAAEI,KAAK;IAAEX;EAAQ,CAAC,CAAC;EAE9D,OAAOH,gBAAgB,CAAC;IAAEc,KAAK;IAAEP,KAAK;IAAEI,IAAI;IAAEH,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAED,eAAeP,WAAW"}
@@ -1,4 +1,3 @@
1
-
2
1
  import "./contextPath";
3
2
  import createUUID from "../utils/helpers/createUUID";
4
3
  import { getFullRequestHref } from "./requestInformation";
@@ -1 +1 @@
1
- {"version":3,"file":"serverSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleBeforeRenderHooks","renderSSRComplete","serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":";AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,iBAAiB,MAAM,qBAAqB;AAkBnD;AACA;AACA,MAAMC,SAAS,GAAG,QAUkB;EAAA,IAVjB;IACjBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK,GAAG,IAAI;IACZC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGlB,UAAU,EAAE;EACzBmB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGnB,kBAAkB,CAACQ,OAAO,CAAC;EAC/C,MAAMY,KAAK,GAAGnB,gBAAgB,CAACkB,WAAW,EAAET,cAAc,CAAC;EAE3DP,oBAAoB,CAACiB,KAAK,EAAET,iBAAiB,CAAC;EAC9CP,qBAAqB,CAACgB,KAAK,CAAC;EAC5BlB,OAAO,CAACkB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhCH,uBAAuB,CAACW,iBAAiB,EAAE;IAAER,OAAO;IAAEY;EAAM,CAAC,CAAC;EAE9D,OAAOd,iBAAiB,CAAC;IACvBc,KAAK;IACLR,KAAK;IACLK,IAAI;IACJE,WAAW;IACXN,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeR,SAAS"}
1
+ {"version":3,"file":"serverSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleBeforeRenderHooks","renderSSRComplete","serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,iBAAiB,MAAM,qBAAqB;AAkBnD;AACA;AACA,MAAMC,SAAS,GAAG,QAUkB;EAAA,IAVjB;IACjBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK,GAAG,IAAI;IACZC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGlB,UAAU,EAAE;EACzBmB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGnB,kBAAkB,CAACQ,OAAO,CAAC;EAC/C,MAAMY,KAAK,GAAGnB,gBAAgB,CAACkB,WAAW,EAAET,cAAc,CAAC;EAE3DP,oBAAoB,CAACiB,KAAK,EAAET,iBAAiB,CAAC;EAC9CP,qBAAqB,CAACgB,KAAK,CAAC;EAC5BlB,OAAO,CAACkB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhCH,uBAAuB,CAACW,iBAAiB,EAAE;IAAER,OAAO;IAAEY;EAAM,CAAC,CAAC;EAE9D,OAAOd,iBAAiB,CAAC;IACvBc,KAAK;IACLR,KAAK;IACLK,IAAI;IACJE,WAAW;IACXN,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeR,SAAS"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { useSelector } from "react-redux";
3
2
  import { ThemeProvider as SCThemeProvider } from "styled-components";
4
3
  import createTheme from "./createTheme";
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme = {}, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":";AACA,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,IAAIC,eAAe,QAAQ,mBAAmB;AAEpE,OAAOC,WAAW,MAAM,eAAe;AAAC;AAUxC;AACA;AACA,MAAMF,aAAa,GAAG,QAA2C;EAAA,IAA1C;IAAEG,KAAK,GAAG,CAAC,CAAC;IAAEC;EAAgB,CAAC;EACpD,MAAMC,WAAW,GAAGN,WAAW,CAAC;IAAA,IAAC;MAAEO;IAAY,CAAC;IAAA,OAAKA,WAAW,CAACH,KAAK;EAAA,EAAC;EACvE,MAAMI,UAAU,GAAGL,WAAW,CAACG,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAO,KAAC,eAAe;IAAC,KAAK,EAAEI,UAAW;IAAA,UAAEH;EAAQ,EAAmB;AACzE,CAAC;AACDJ,aAAa,CAACQ,WAAW,GAAG,kBAAkB;AAE9C,eAAeR,aAAa"}
1
+ {"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme = {}, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":"AACA,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,IAAIC,eAAe,QAAQ,mBAAmB;AAEpE,OAAOC,WAAW,MAAM,eAAe;AAAC;AAUxC;AACA;AACA,MAAMF,aAAa,GAAG,QAA2C;EAAA,IAA1C;IAAEG,KAAK,GAAG,CAAC,CAAC;IAAEC;EAAgB,CAAC;EACpD,MAAMC,WAAW,GAAGN,WAAW,CAAC;IAAA,IAAC;MAAEO;IAAY,CAAC;IAAA,OAAKA,WAAW,CAACH,KAAK;EAAA,EAAC;EACvE,MAAMI,UAAU,GAAGL,WAAW,CAACG,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAO,KAAC,eAAe;IAAC,KAAK,EAAEI,UAAW;IAAA,UAAEH;EAAQ,EAAmB;AACzE,CAAC;AACDJ,aAAa,CAACQ,WAAW,GAAG,kBAAkB;AAE9C,eAAeR,aAAa"}
@@ -1,4 +1,3 @@
1
-
2
1
  export { default as createTheme } from "./createTheme";
3
2
  export { default as ThemeProvider } from "./ThemeProvider";
4
3
  export * from "./useTheme";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","createTheme","ThemeProvider"],"sources":["../../src/react-theme/index.js"],"sourcesContent":["// @flow\nexport { default as createTheme } from \"./createTheme\";\nexport { default as ThemeProvider } from \"./ThemeProvider\";\n\nexport * from \"./useTheme\";\n\nexport * from \"./utils/themeProps\";\n\nexport * from \"./utils/background\";\nexport * from \"./utils/colors\";\nexport * from \"./utils/contrast\";\nexport * from \"./utils/corners\";\nexport * from \"./utils/spacers\";\n\nexport type * from \"./types\";\n"],"mappings":";AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,SAASD,OAAO,IAAIE,aAAa,QAAQ,iBAAiB;AAE1D,cAAc,YAAY;AAE1B,cAAc,oBAAoB;AAElC,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,cAAc,kBAAkB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB"}
1
+ {"version":3,"file":"index.js","names":["default","createTheme","ThemeProvider"],"sources":["../../src/react-theme/index.js"],"sourcesContent":["// @flow\nexport { default as createTheme } from \"./createTheme\";\nexport { default as ThemeProvider } from \"./ThemeProvider\";\n\nexport * from \"./useTheme\";\n\nexport * from \"./utils/themeProps\";\n\nexport * from \"./utils/background\";\nexport * from \"./utils/colors\";\nexport * from \"./utils/contrast\";\nexport * from \"./utils/corners\";\nexport * from \"./utils/spacers\";\n\nexport type * from \"./types\";\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,SAASD,OAAO,IAAIE,aAAa,QAAQ,iBAAiB;AAE1D,cAAc,YAAY;AAE1B,cAAc,oBAAoB;AAElC,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,cAAc,kBAAkB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { useContext } from "react";
3
2
  import { ThemeContext } from "styled-components";
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useTheme.js","names":["useContext","ThemeContext","useTheme"],"sources":["../../src/react-theme/useTheme.js"],"sourcesContent":["// @flow\nimport { useContext } from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\n/**\n */\nconst useTheme = (): Theme => {\n return useContext(ThemeContext);\n};\n\nexport { useTheme };\n"],"mappings":";AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,YAAY,QAAQ,mBAAmB;AAIhD;AACA;AACA,MAAMC,QAAQ,GAAG,MAAa;EAC5B,OAAOF,UAAU,CAACC,YAAY,CAAC;AACjC,CAAC;AAED,SAASC,QAAQ"}
1
+ {"version":3,"file":"useTheme.js","names":["useContext","ThemeContext","useTheme"],"sources":["../../src/react-theme/useTheme.js"],"sourcesContent":["// @flow\nimport { useContext } from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\n/**\n */\nconst useTheme = (): Theme => {\n return useContext(ThemeContext);\n};\n\nexport { useTheme };\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,YAAY,QAAQ,mBAAmB;AAIhD;AACA;AACA,MAAMC,QAAQ,GAAG,MAAa;EAC5B,OAAOF,UAAU,CAACC,YAAY,CAAC;AACjC,CAAC;AAED,SAASC,QAAQ"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { getThemeProp } from "./themeProps";
3
2
  /**
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"file":"background.js","names":["getThemeProp","renderBackground","path","defaultValue","theme","value"],"sources":["../../../src/react-theme/utils/background.js"],"sourcesContent":["// @flow\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n */\nconst renderBackground =\n (path: string, defaultValue?: string): ((UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n"],"mappings":";AACA,SAASA,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA,MAAMC,gBAAgB,GACpB,CAACC,IAAY,EAAEC,YAAqB,KACpC,QAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC;EACxB,MAAMC,KAAK,GAAGL,YAAY,CAACI,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC;EAErD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAQ,eAAcA,KAAM,EAAC;EAC/B;EAEA,OAAOA,KAAK;AACd,CAAC;AAEH,SAASJ,gBAAgB"}
1
+ {"version":3,"file":"background.js","names":["getThemeProp","renderBackground","path","defaultValue","theme","value"],"sources":["../../../src/react-theme/utils/background.js"],"sourcesContent":["// @flow\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n */\nconst renderBackground =\n (path: string, defaultValue?: string): ((UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA,MAAMC,gBAAgB,GACpB,CAACC,IAAY,EAAEC,YAAqB,KACpC,QAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC;EACxB,MAAMC,KAAK,GAAGL,YAAY,CAACI,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC;EAErD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAQ,eAAcA,KAAM,EAAC;EAC/B;EAEA,OAAOA,KAAK;AACd,CAAC;AAEH,SAASJ,gBAAgB"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { darken, hsl, lighten, parseToHsl } from "polished";
3
2
  import { getThemeProp } from "./themeProps";
4
3
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","names":["darken","hsl","lighten","parseToHsl","getThemeProp","darkenColor","amount","path","defaultValue","theme","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","hue"],"sources":["../../../src/react-theme/utils/colors.js"],"sourcesContent":["// @flow\nimport { darken, hsl, lighten, parseToHsl } from \"polished\";\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\n/**\n */\nconst darkenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Themed color x amount lightened\n */\n/**\n */\nconst lightenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Make a color lighter or darker in the same color family\n */\n/**\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment: number = 0\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n"],"mappings":";AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,UAAU,QAAQ,UAAU;AAC3D,SAASC,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GACf,CACEC,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBT,MAAM,CAACM,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE3D;AACA;AACA;AACA;AACA;AACA,MAAME,YAAY,GAChB,CACEJ,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBP,OAAO,CAACI,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE5D;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAG,UAChBC,KAAa,EACbC,UAAmB,EACnBC,SAAkB;EAAA,IAClBC,aAAqB,uEAAG,CAAC;EAAA,OACdd,GAAG,CAACE,UAAU,CAACS,KAAK,CAAC,CAACI,GAAG,GAAGD,aAAa,EAAEF,UAAU,EAAEC,SAAS,CAAC;AAAA;AAE9E,SAAST,WAAW,EAAEK,YAAY,EAAEC,SAAS"}
1
+ {"version":3,"file":"colors.js","names":["darken","hsl","lighten","parseToHsl","getThemeProp","darkenColor","amount","path","defaultValue","theme","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","hue"],"sources":["../../../src/react-theme/utils/colors.js"],"sourcesContent":["// @flow\nimport { darken, hsl, lighten, parseToHsl } from \"polished\";\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\n/**\n */\nconst darkenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Themed color x amount lightened\n */\n/**\n */\nconst lightenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Make a color lighter or darker in the same color family\n */\n/**\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment: number = 0\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n"],"mappings":"AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,UAAU,QAAQ,UAAU;AAC3D,SAASC,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GACf,CACEC,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBT,MAAM,CAACM,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE3D;AACA;AACA;AACA;AACA;AACA,MAAME,YAAY,GAChB,CACEJ,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBP,OAAO,CAACI,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE5D;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAG,UAChBC,KAAa,EACbC,UAAmB,EACnBC,SAAkB;EAAA,IAClBC,aAAqB,uEAAG,CAAC;EAAA,OACdd,GAAG,CAACE,UAAU,CAACS,KAAK,CAAC,CAACI,GAAG,GAAGD,aAAa,EAAEF,UAAU,EAAEC,SAAS,CAAC;AAAA;AAE9E,SAAST,WAAW,EAAEK,YAAY,EAAEC,SAAS"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { getLuminance, parseToRgb } from "polished";
3
2
  import { getThemeStringProp, getProp } from "./themeProps";
4
3
  import { ThemePropertyException } from "../../exceptions";
@@ -55,8 +54,7 @@ const getContrastYIQ = function (color) {
55
54
  const getBackgroundColor = (theme, bgColorProperty, defaultValue) => {
56
55
  let bgColor = getProp(theme, bgColorProperty, defaultValue);
57
56
  if (typeof bgColor === "object") {
58
- var _bgColor;
59
- bgColor = ((_bgColor = bgColor) === null || _bgColor === void 0 ? void 0 : _bgColor.backgroundColor) ?? defaultValue;
57
+ bgColor = bgColor?.backgroundColor ?? defaultValue;
60
58
  }
61
59
  if (typeof bgColor === "string") {
62
60
  return bgColor;
@@ -1 +1 @@
1
- {"version":3,"file":"contrast.js","names":["getLuminance","parseToRgb","getThemeStringProp","getProp","ThemePropertyException","getColorContrast","color1","color2","luminance1","luminance2","parseFloat","toFixed","getYIQ","color","rgb","red","green","blue","getContrastYIQ","dark","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty"],"sources":["../../../src/react-theme/utils/contrast.js"],"sourcesContent":["// @flow\nimport { getLuminance, parseToRgb } from \"polished\";\n\nimport { getThemeStringProp, getProp } from \"./themeProps\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string): number => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2)\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\n/**\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: string,\n dark: string = \"#212529\",\n light: string = \"#fff\",\n preferredColor?: string\n): string => {\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\n/**\n */\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string\n) => {\n let bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (typeof bgColor === \"object\") {\n bgColor = bgColor?.backgroundColor ?? defaultValue;\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n throw new ThemePropertyException(\n `${bgColorProperty} is not a string, but: ${typeof bgColor}`\n );\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty: string,\n preferredColorProperty?: string,\n standardDarkProperty: string = \"YIQ_DARK_COLOR\",\n standardLightProperty: string = \"YIQ_LIGHT_COLOR\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\"\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,UAAU,QAAQ,UAAU;AAEnD,SAASC,kBAAkB,EAAEC,OAAO,QAAQ,cAAc;AAE1D,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,CAACC,MAAc,EAAEC,MAAc,KAAa;EACnE,MAAMC,UAAU,GAAGR,YAAY,CAACM,MAAM,CAAC;EAC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,cAAc,EAAEa,mBAAmB"}
1
+ {"version":3,"file":"contrast.js","names":["getLuminance","parseToRgb","getThemeStringProp","getProp","ThemePropertyException","getColorContrast","color1","color2","luminance1","luminance2","parseFloat","toFixed","getYIQ","color","rgb","red","green","blue","getContrastYIQ","dark","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty"],"sources":["../../../src/react-theme/utils/contrast.js"],"sourcesContent":["// @flow\nimport { getLuminance, parseToRgb } from \"polished\";\n\nimport { getThemeStringProp, getProp } from \"./themeProps\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string): number => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2)\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\n/**\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: string,\n dark: string = \"#212529\",\n light: string = \"#fff\",\n preferredColor?: string\n): string => {\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\n/**\n */\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string\n) => {\n let bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (typeof bgColor === \"object\") {\n bgColor = bgColor?.backgroundColor ?? defaultValue;\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n throw new ThemePropertyException(\n `${bgColorProperty} is not a string, but: ${typeof bgColor}`\n );\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty: string,\n preferredColorProperty?: string,\n standardDarkProperty: string = \"YIQ_DARK_COLOR\",\n standardLightProperty: string = \"YIQ_LIGHT_COLOR\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\"\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,QAAQ,UAAU;AAEnD,SAASC,kBAAkB,EAAEC,OAAO,QAAQ,cAAc;AAE1D,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,CAACC,MAAc,EAAEC,MAAc,KAAa;EACnE,MAAMC,UAAU,GAAGR,YAAY,CAACM,MAAM,CAAC;EACvC,MAAMG,UAAU,GAAGT,YAAY,CAACO,MAAM,CAAC;EACvC,OAAOG,UAAU,CACf,CAACF,UAAU,GAAGC,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"border-radius";
4
3
 
@@ -1 +1 @@
1
- {"version":3,"file":"corners.js","names":["getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","ROUNDED_CORNERS","propertyName"],"sources":["../../../src/react-theme/utils/corners.js"],"sourcesContent":["// @flow\nimport { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\n/**\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path: string = \"BORDER_RADIUS\",\n defaultValue: string = \"0.25rem\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n"],"mappings":";AACA,SAASA,kBAAkB,QAAQ,cAAc;AAIjD,MAAMC,uBAAuB,GAAG,eAAe;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAClB;EAAA,IACEC,QAAgB,uEAAGF,uBAAuB;EAAA,IAC1CG,IAAY,uEAAG,eAAe;EAAA,IAC9BC,YAAoB,uEAAG,SAAS;EAAA,OAElC,QAAoC;IAAA,IAAnC;MAAEC,KAAK,GAAG,CAAC;IAAkB,CAAC;IAC7B,IAAIA,KAAK,CAACC,eAAe,EAAE;MACzB,MAAMC,YAAY,GAChBL,QAAQ,IAAIA,QAAQ,KAAKF,uBAAuB,GAC3C,UAASE,QAAS,SAAQ,GAC3BF,uBAAuB;MAE7B,OAAQ,GAAEO,YAAa,KAAIR,kBAAkB,CAC3CM,KAAK,EACLF,IAAI,EACJC,YAAY,CACZ,EAAC;IACL;IAEA,OAAO,EAAE;EACX,CAAC;AAAA;AAEH,SAASH,cAAc"}
1
+ {"version":3,"file":"corners.js","names":["getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","ROUNDED_CORNERS","propertyName"],"sources":["../../../src/react-theme/utils/corners.js"],"sourcesContent":["// @flow\nimport { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\n/**\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path: string = \"BORDER_RADIUS\",\n defaultValue: string = \"0.25rem\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,cAAc;AAIjD,MAAMC,uBAAuB,GAAG,eAAe;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAClB;EAAA,IACEC,QAAgB,uEAAGF,uBAAuB;EAAA,IAC1CG,IAAY,uEAAG,eAAe;EAAA,IAC9BC,YAAoB,uEAAG,SAAS;EAAA,OAElC,QAAoC;IAAA,IAAnC;MAAEC,KAAK,GAAG,CAAC;IAAkB,CAAC;IAC7B,IAAIA,KAAK,CAACC,eAAe,EAAE;MACzB,MAAMC,YAAY,GAChBL,QAAQ,IAAIA,QAAQ,KAAKF,uBAAuB,GAC3C,UAASE,QAAS,SAAQ,GAC3BF,uBAAuB;MAE7B,OAAQ,GAAEO,YAAa,KAAIR,kBAAkB,CAC3CM,KAAK,EACLF,IAAI,EACJC,YAAY,CACZ,EAAC;IACL;IAEA,OAAO,EAAE;EACX,CAAC;AAAA;AAEH,SAASH,cAAc"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { get } from "../../utils/helpers/objects";
3
2
  import { ThemePropertyException } from "../../exceptions";
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"themeProps.js","names":["get","ThemePropertyException","getProp","theme","path","defaultValue","getThemeProp","value","getThemeStringProp","toString","getThemeNumberProp","themeProp"],"sources":["../../../src/react-theme/utils/themeProps.js"],"sourcesContent":["// @flow\nimport { get } from \"../../utils/helpers/objects\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\n/**\n */\nexport const getProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ?ThemePropValue => {\n return path === \"\" ? defaultValue : get(theme, path, defaultValue);\n};\n\n/**\n */\nexport const getThemeProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ThemePropValue => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, number or plain object, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeStringProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: string = \"\"\n): string => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeNumberProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: number = 0\n): number => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a number, but: ${typeof value}`\n );\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\n/**\n */\nexport const themeProp =\n (\n path: string,\n defaultValue?: ThemePropValue\n ): (({ theme: Theme }) => ThemePropValue) =>\n ({ theme }: { theme: Theme }) =>\n getThemeProp(theme, path, defaultValue);\n"],"mappings":";AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,YAID;EAAA,IAHpBC,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAA4B,uEAAG,EAAE;EAEjC,OAAOD,IAAI,KAAK,EAAE,GAAGC,YAAY,GAAGL,GAAG,CAACG,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;AACpE,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,YAAY,GAAG,YAIP;EAAA,IAHnBH,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAA4B,uEAAG,EAAE;EAEjC,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IACEE,KAAK,IAAI,IAAI,KACZ,OAAOA,KAAK,KAAK,QAAQ,IACxB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,CAAC,EAC5B;IACA,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIN,sBAAsB,CAC7B,GAAEG,IAAK,kDAAiD,OAAOG,KAAM,EAAC,CACxE;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG,YAIrB;EAAA,IAHXL,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAAoB,uEAAG,EAAE;EAEzB,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd,CAAC,MAAM,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACpC,OAAOA,KAAK,CAACE,QAAQ,EAAE;EACzB;EAEA,MAAM,IAAIR,sBAAsB,CAC7B,GAAEG,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,kBAAkB,GAAG,YAIrB;EAAA,IAHXP,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAAoB,uEAAG,CAAC;EAExB,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIN,sBAAsB,CAC7B,GAAEG,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,SAAS,GACpB,CACEP,IAAY,EACZC,YAA6B,KAE/B;EAAA,IAAC;IAAEF;EAAwB,CAAC;EAAA,OAC1BG,YAAY,CAACH,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;AAAA"}
1
+ {"version":3,"file":"themeProps.js","names":["get","ThemePropertyException","getProp","theme","path","defaultValue","getThemeProp","value","getThemeStringProp","toString","getThemeNumberProp","themeProp"],"sources":["../../../src/react-theme/utils/themeProps.js"],"sourcesContent":["// @flow\nimport { get } from \"../../utils/helpers/objects\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\n/**\n */\nexport const getProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ?ThemePropValue => {\n return path === \"\" ? defaultValue : get(theme, path, defaultValue);\n};\n\n/**\n */\nexport const getThemeProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ThemePropValue => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, number or plain object, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeStringProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: string = \"\"\n): string => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeNumberProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: number = 0\n): number => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a number, but: ${typeof value}`\n );\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\n/**\n */\nexport const themeProp =\n (\n path: string,\n defaultValue?: ThemePropValue\n ): (({ theme: Theme }) => ThemePropValue) =>\n ({ theme }: { theme: Theme }) =>\n getThemeProp(theme, path, defaultValue);\n"],"mappings":"AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,YAID;EAAA,IAHpBC,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAA4B,uEAAG,EAAE;EAEjC,OAAOD,IAAI,KAAK,EAAE,GAAGC,YAAY,GAAGL,GAAG,CAACG,KAAK,EAAEC,IAAI,EAAEC,YA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C;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIN,sBAAsB,CAC7B,GAAEG,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,SAAS,GACpB,CACEP,IAAY,EACZC,YAA6B,KAE/B;EAAA,IAAC;IAAEF;EAAwB,CAAC;EAAA,OAC1BG,YAAY,CAACH,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;AAAA"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { startProgress, finishProgress } from "../actions/ProgressIndicator";
3
2
  /**
4
3
  * Update current locale
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","names":["startProgress","finishProgress","receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/actions.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport type Locales from \"../../i18n/Locales\";\nimport type { SetLocalesAction, UpdateLocaleAction } from \"./types\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n * Update current locale\n */\nexport const receiveLocale = (locale: string): UpdateLocaleAction => ({\n type: \"UPDATE_LOCALE\",\n payload: locale,\n});\n\n/**\n * Change locale of application and redirect\n */\nexport const updateLocale =\n (locale: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n dispatch(receiveLocale(locale));\n\n dispatch(finishProgress());\n };\n\n/**\n */\nexport const setLocales = (\n locales: Locales,\n locale: string\n): SetLocalesAction => ({\n type: \"SET_LOCALES\",\n payload: {\n locales,\n locale,\n },\n});\n"],"mappings":";AACA,SAASA,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAM5E;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,MAAc,KAA0B;EACpEC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,YAAY,GACtBH,MAAc,IACdI,QAAQ,IAAK;EACZA,QAAQ,CAACP,aAAa,EAAE,CAAC;EACzBO,QAAQ,CAACL,aAAa,CAACC,MAAM,CAAC,CAAC;EAE/BI,QAAQ,CAACN,cAAc,EAAE,CAAC;AAC5B,CAAC;;AAEH;AACA;AACA,OAAO,MAAMO,UAAU,GAAG,CACxBC,OAAgB,EAChBN,MAAc,MACQ;EACtBC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPI,OAAO;IACPN;EACF;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"actions.js","names":["startProgress","finishProgress","receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/actions.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport type Locales from \"../../i18n/Locales\";\nimport type { SetLocalesAction, UpdateLocaleAction } from \"./types\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n * Update current locale\n */\nexport const receiveLocale = (locale: string): UpdateLocaleAction => ({\n type: \"UPDATE_LOCALE\",\n payload: locale,\n});\n\n/**\n * Change locale of application and redirect\n */\nexport const updateLocale =\n (locale: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n dispatch(receiveLocale(locale));\n\n dispatch(finishProgress());\n };\n\n/**\n */\nexport const setLocales = (\n locales: Locales,\n locale: string\n): SetLocalesAction => ({\n type: \"SET_LOCALES\",\n payload: {\n locales,\n locale,\n },\n});\n"],"mappings":"AACA,SAASA,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAM5E;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,MAAc,KAA0B;EACpEC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,YAAY,GACtBH,MAAc,IACdI,QAAQ,IAAK;EACZA,QAAQ,CAACP,aAAa,EAAE,CAAC;EACzBO,QAAQ,CAACL,aAAa,CAACC,MAAM,CAAC,CAAC;EAE/BI,QAAQ,CAACN,cAAc,EAAE,CAAC;AAC5B,CAAC;;AAEH;AACA;AACA,OAAO,MAAMO,UAAU,GAAG,CACxBC,OAAgB,EAChBN,MAAc,MACQ;EACtBC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPI,OAAO;IACPN;EACF;AACF,CAAC,CAAC"}
@@ -1,4 +1,3 @@
1
-
2
1
  export * from "./reducer";
3
2
  export * from "./actions";
4
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/redux/_i18n/index.js"],"sourcesContent":["// @flow\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\n\nexport type * from \"./types\";\n"],"mappings":";AACA,cAAc,WAAW;AAEzB,cAAc,WAAW"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/redux/_i18n/index.js"],"sourcesContent":["// @flow\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\n\nexport type * from \"./types\";\n"],"mappings":"AACA,cAAc,WAAW;AAEzB,cAAc,WAAW"}
@@ -1,4 +1,3 @@
1
-
2
1
  import Cache from "../../utils/browser/Cache";
3
2
  import { setCookie } from "../../utils/browser/Cookies";
4
3
  import Locales from "../../i18n/Locales";
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.js","names":["Cache","setCookie","Locales","updateLocale","state","locale","clear","setLocales","locales","initialState","I18nReducer","action","type","payload"],"sources":["../../../src/redux/_i18n/reducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport { setCookie } from \"../../utils/browser/Cookies\";\n\nimport Locales from \"../../i18n/Locales\";\n\nimport type { Reducer } from \"redux\";\nimport type { I18nState } from \"./types\";\nimport type { ReduxAction } from \"../types\";\n\n/**\n */\nconst updateLocale = (state, locale) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n // clear cache because of cached contributions\n Cache.clear();\n\n return {\n ...state,\n locale,\n };\n};\n\n/**\n */\nconst setLocales = (state, { locale, locales }) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n if (locale) {\n return {\n ...state,\n locales,\n locale,\n };\n }\n\n return {\n ...state,\n locales,\n };\n};\n\n// REDUCER\nconst initialState: I18nState = {\n locales: new Locales(),\n locale: \"en\",\n};\n\n/**\n * Form reducer\n */\nexport const I18nReducer: Reducer<I18nState, ReduxAction> = (\n state = initialState,\n action = void 0\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_LOCALES\":\n return setLocales(state, action.payload);\n\n case \"UPDATE_LOCALE\":\n return updateLocale(state, action.payload);\n\n default:\n return state;\n }\n};\n"],"mappings":";AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAOC,OAAO,MAAM,oBAAoB;AAMxC;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAK,EAAEC,MAAM,KAAK;EACtC;EACAJ,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;;EAE3B;EACAL,KAAK,CAACM,KAAK,EAAE;EAEb,OAAO;IACL,GAAGF,KAAK;IACRC;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAME,UAAU,GAAG,CAACH,KAAK,WAA0B;EAAA,IAAxB;IAAEC,MAAM;IAAEG;EAAQ,CAAC;EAC5C;EACAP,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;EAE3B,IAAIA,MAAM,EAAE;IACV,OAAO;MACL,GAAGD,KAAK;MACRI,OAAO;MACPH;IACF,CAAC;EACH;EAEA,OAAO;IACL,GAAGD,KAAK;IACRI;EACF,CAAC;AACH,CAAC;;AAED;AACA,MAAMC,YAAuB,GAAG;EAC9BD,OAAO,EAAE,IAAIN,OAAO,EAAE;EACtBG,MAAM,EAAE;AACV,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMK,WAA4C,GAAG,YAGvD;EAAA,IAFHN,KAAK,uEAAGK,YAAY;EAAA,IACpBE,MAAM,uEAAG,KAAK,CAAC;EAEf,IAAI,CAACA,MAAM,EAAE;IACX,OAAOP,KAAK;EACd;EAEA,QAAQO,MAAM,CAACC,IAAI;IACjB,KAAK,aAAa;MAChB,OAAOL,UAAU,CAACH,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE1C,KAAK,eAAe;MAClB,OAAOV,YAAY,CAACC,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE5C;MACE,OAAOT,KAAK;EAAC;AAEnB,CAAC"}
1
+ {"version":3,"file":"reducer.js","names":["Cache","setCookie","Locales","updateLocale","state","locale","clear","setLocales","locales","initialState","I18nReducer","action","type","payload"],"sources":["../../../src/redux/_i18n/reducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport { setCookie } from \"../../utils/browser/Cookies\";\n\nimport Locales from \"../../i18n/Locales\";\n\nimport type { Reducer } from \"redux\";\nimport type { I18nState } from \"./types\";\nimport type { ReduxAction } from \"../types\";\n\n/**\n */\nconst updateLocale = (state, locale) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n // clear cache because of cached contributions\n Cache.clear();\n\n return {\n ...state,\n locale,\n };\n};\n\n/**\n */\nconst setLocales = (state, { locale, locales }) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n if (locale) {\n return {\n ...state,\n locales,\n locale,\n };\n }\n\n return {\n ...state,\n locales,\n };\n};\n\n// REDUCER\nconst initialState: I18nState = {\n locales: new Locales(),\n locale: \"en\",\n};\n\n/**\n * Form reducer\n */\nexport const I18nReducer: Reducer<I18nState, ReduxAction> = (\n state = initialState,\n action = void 0\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_LOCALES\":\n return setLocales(state, action.payload);\n\n case \"UPDATE_LOCALE\":\n return updateLocale(state, action.payload);\n\n default:\n return state;\n }\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAOC,OAAO,MAAM,oBAAoB;AAMxC;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAK,EAAEC,MAAM,KAAK;EACtC;EACAJ,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;;EAE3B;EACAL,KAAK,CAACM,KAAK,EAAE;EAEb,OAAO;IACL,GAAGF,KAAK;IACRC;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAME,UAAU,GAAG,CAACH,KAAK,WAA0B;EAAA,IAAxB;IAAEC,MAAM;IAAEG;EAAQ,CAAC;EAC5C;EACAP,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;EAE3B,IAAIA,MAAM,EAAE;IACV,OAAO;MACL,GAAGD,KAAK;MACRI,OAAO;MACPH;IACF,CAAC;EACH;EAEA,OAAO;IACL,GAAGD,KAAK;IACRI;EACF,CAAC;AACH,CAAC;;AAED;AACA,MAAMC,YAAuB,GAAG;EAC9BD,OAAO,EAAE,IAAIN,OAAO,EAAE;EACtBG,MAAM,EAAE;AACV,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMK,WAA4C,GAAG,YAGvD;EAAA,IAFHN,KAAK,uEAAGK,YAAY;EAAA,IACpBE,MAAM,uEAAG,KAAK,CAAC;EAEf,IAAI,CAACA,MAAM,EAAE;IACX,OAAOP,KAAK;EACd;EAEA,QAAQO,MAAM,CAACC,IAAI;IACjB,KAAK,aAAa;MAChB,OAAOL,UAAU,CAACH,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE1C,KAAK,eAAe;MAClB,OAAOV,YAAY,CAACC,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE5C;MACE,OAAOT,KAAK;EAAC;AAEnB,CAAC"}
@@ -70,14 +70,14 @@ export const loadModel = (key, href, options) => ({
70
70
  type: "MODULARUI/FETCH",
71
71
  payload: {
72
72
  href: href instanceof Href ? href : new Href(href),
73
- method: (options === null || options === void 0 ? void 0 : options.method) ?? HTTP_METHODS.GET,
74
- data: options === null || options === void 0 ? void 0 : options.data,
75
- locale: (options === null || options === void 0 ? void 0 : options.locale) ?? "en",
76
- childmodels: options === null || options === void 0 ? void 0 : options.childmodels,
77
- targetModel: options === null || options === void 0 ? void 0 : options.targetModel,
73
+ method: options?.method ?? HTTP_METHODS.GET,
74
+ data: options?.data,
75
+ locale: options?.locale ?? "en",
76
+ childmodels: options?.childmodels,
77
+ targetModel: options?.targetModel,
78
78
  /**
79
79
  */
80
- successAction: model => loadModelSuccessAction(key, model, options === null || options === void 0 ? void 0 : options.updateModel),
80
+ successAction: model => loadModelSuccessAction(key, model, options?.updateModel),
81
81
  /**
82
82
  */
83
83
  errorAction: error => {
@@ -101,7 +101,7 @@ export const loadModularUI = (key, href, options) => dispatch => {
101
101
  dispatch(startProgress());
102
102
  const loadModelPromise = dispatch(loadModel(key, href, options));
103
103
  return _Promise.resolve(loadModelPromise).then(response => {
104
- if ((response === null || response === void 0 ? void 0 : response.type) === "FINISH_PROGRESS") {
104
+ if (response?.type === "FINISH_PROGRESS") {
105
105
  dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));
106
106
  }
107
107
  return dispatch(finishProgress());
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","names":["HTTP_METHODS","MODULARUI_STATUS","Href","ErrorResponse","finishProgress","startProgress","handleError","setModel","key","model","connectKey","type","payload","updateModel","removeModelByKey","resetModularUI","updateStatus","status","loadModelSuccessAction","modelToUpdate","clonedModel","clone","update","Error","loadModel","href","options","method","GET","data","locale","childmodels","targetModel","successAction","errorAction","error","errorResponse","isChangePassword","isResourceNotFoundAfterReload","ERROR","loadModularUI","dispatch","LOADING","loadModelPromise","resolve","then","response","FINISHED","catch","reloadModel","selfhref","isReload"],"sources":["../../../src/redux/_modularui/actions.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS, MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { Dispatch, ThunkAction } from \"../types\";\nimport type {\n ModularUIAction,\n SetModelAction,\n UpdateModelAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n UpdateStatusAction,\n} from \"./types\";\nimport type { RequestBaseOptions } from \"../../utils/fetch/types\";\n\n/**\n */\nexport const setModel = (\n key: string,\n model: ModularUIModel\n): SetModelAction => {\n // set key on model for later reference\n model.connectKey = key;\n return {\n type: \"MODULARUI/SET\",\n payload: {\n key,\n model,\n },\n };\n};\n\n/**\n */\nexport const updateModel = (model: ModularUIModel): UpdateModelAction => ({\n type: \"MODULARUI/UPDATE\",\n payload: model,\n});\n\n/**\n */\nexport const removeModelByKey = (key: string): RemoveModelByKeyAction => ({\n type: \"MODULARUI/REMOVE_KEY\",\n payload: key,\n});\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = (): ResetModularUIAction => ({\n type: \"MODULARUI/RESET\",\n});\n\n/**\n */\nexport const updateStatus = (\n key: string,\n status: $Keys<typeof MODULARUI_STATUS>\n): UpdateStatusAction => ({\n type: \"MODULARUI/STATUS\",\n payload: { key, status },\n});\n\n/**\n */\nconst loadModelSuccessAction = (\n key: string,\n model: ModularUIModel,\n modelToUpdate\n): UpdateModelAction | SetModelAction => {\n if (modelToUpdate) {\n // $FlowFixMe[prop-missing]\n if (typeof modelToUpdate[\"update\"] === \"function\") {\n const clonedModel = modelToUpdate.clone();\n clonedModel.update(model);\n\n return updateModel(clonedModel);\n }\n\n throw new Error(\n `loadModel action: updateModel is set as option for ${key}, but the model is missing an update methode`\n );\n }\n\n return setModel(key, model);\n};\n\n/**\n */\nexport const loadModel = (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n): ModularUIAction => ({\n type: \"MODULARUI/FETCH\",\n payload: {\n href: href instanceof Href ? href : new Href(href),\n method: options?.method ?? HTTP_METHODS.GET,\n data: options?.data,\n locale: options?.locale ?? \"en\",\n childmodels: options?.childmodels,\n targetModel: options?.targetModel,\n /**\n */\n successAction: (model) =>\n loadModelSuccessAction(key, model, options?.updateModel),\n /**\n */\n errorAction: (error) => {\n const errorResponse = new ErrorResponse(error, key);\n if (errorResponse.isChangePassword) {\n return {\n type: \"NO_ACTION\",\n };\n } else if (errorResponse.isResourceNotFoundAfterReload) {\n return removeModelByKey(key);\n }\n\n return updateStatus(key, MODULARUI_STATUS.ERROR);\n },\n },\n});\n\n/**\n */\nexport const loadModularUI =\n (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(updateStatus(key, MODULARUI_STATUS.LOADING));\n dispatch(startProgress());\n\n const loadModelPromise = dispatch(loadModel(key, href, options));\n\n return Promise.resolve(loadModelPromise)\n .then((response) => {\n if (response?.type === \"FINISH_PROGRESS\") {\n dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));\n }\n\n return dispatch(finishProgress());\n })\n .catch((error) => dispatch(handleError(error)));\n };\n\n/**\n */\nexport const reloadModel = (\n model: ModularUIModel,\n options?: RequestBaseOptions\n): ThunkAction =>\n loadModularUI(model.connectKey, model.selfhref, {\n ...options,\n isReload: true,\n });\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,gBAAgB,QAAQ,2BAA2B;AAC1E,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,8BAA8B;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAc9C;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CACtBC,GAAW,EACXC,KAAqB,KACF;EACnB;EACAA,KAAK,CAACC,UAAU,GAAGF,GAAG;EACtB,OAAO;IACLG,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE;MACPJ,GAAG;MAC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,CAAC,CAAC;EAEhE,OAAO,SAAQkB,OAAO,CAACD,gBAAgB,CAAC,CACrCE,IAAI,CAAEC,QAAQ,IAAK;IAClB,IAAI,CAAAA,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEnC,IAAI,MAAK,iBAAiB,EAAE;MACxC8B,QAAQ,CAACzB,YAAY,CAACR,GAAG,EAAEP,gBAAgB,CAAC8C,QAAQ,CAAC,CAAC;IACxD;IAEA,OAAON,QAAQ,CAACrC,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC,CACD4C,KAAK,CAAEb,KAAK,IAAKM,QAAQ,CAACnC,WAAW,CAAC6B,KAAK,CAAC,CAAC,CAAC;AACnD,CAAC;;AAEH;AACA;AACA,OAAO,MAAMc,WAAW,GAAG,CACzBxC,KAAqB,EACrBiB,OAA4B,KAE5Bc,aAAa,CAAC/B,KAAK,CAACC,UAAU,EAAED,KAAK,CAACyC,QAAQ,EAAE;EAC9C,GAAGxB,OAAO;EACVyB,QAAQ,EAAE;AACZ,CAAC,CAAC"}
1
+ {"version":3,"file":"actions.js","names":["HTTP_METHODS","MODULARUI_STATUS","Href","ErrorResponse","finishProgress","startProgress","handleError","setModel","key","model","connectKey","type","payload","updateModel","removeModelByKey","resetModularUI","updateStatus","status","loadModelSuccessAction","modelToUpdate","clonedModel","clone","update","Error","loadModel","href","options","method","GET","data","locale","childmodels","targetModel","successAction","errorAction","error","errorResponse","isChangePassword","isResourceNotFoundAfterReload","ERROR","loadModularUI","dispatch","LOADING","loadModelPromise","resolve","then","response","FINISHED","catch","reloadModel","selfhref","isReload"],"sources":["../../../src/redux/_modularui/actions.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS, MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { Dispatch, ThunkAction } from \"../types\";\nimport type {\n ModularUIAction,\n SetModelAction,\n UpdateModelAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n UpdateStatusAction,\n} from \"./types\";\nimport type { RequestBaseOptions } from \"../../utils/fetch/types\";\n\n/**\n */\nexport const setModel = (\n key: string,\n model: ModularUIModel\n): SetModelAction => {\n // set key on model for later reference\n model.connectKey = key;\n return {\n type: \"MODULARUI/SET\",\n payload: {\n key,\n model,\n },\n };\n};\n\n/**\n */\nexport const updateModel = (model: ModularUIModel): UpdateModelAction => ({\n type: \"MODULARUI/UPDATE\",\n payload: model,\n});\n\n/**\n */\nexport const removeModelByKey = (key: string): RemoveModelByKeyAction => ({\n type: \"MODULARUI/REMOVE_KEY\",\n payload: key,\n});\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = (): ResetModularUIAction => ({\n type: \"MODULARUI/RESET\",\n});\n\n/**\n */\nexport const updateStatus = (\n key: string,\n status: $Keys<typeof MODULARUI_STATUS>\n): UpdateStatusAction => ({\n type: \"MODULARUI/STATUS\",\n payload: { key, status },\n});\n\n/**\n */\nconst loadModelSuccessAction = (\n key: string,\n model: ModularUIModel,\n modelToUpdate\n): UpdateModelAction | SetModelAction => {\n if (modelToUpdate) {\n // $FlowFixMe[prop-missing]\n if (typeof modelToUpdate[\"update\"] === \"function\") {\n const clonedModel = modelToUpdate.clone();\n clonedModel.update(model);\n\n return updateModel(clonedModel);\n }\n\n throw new Error(\n `loadModel action: updateModel is set as option for ${key}, but the model is missing an update methode`\n );\n }\n\n return setModel(key, model);\n};\n\n/**\n */\nexport const loadModel = (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n): ModularUIAction => ({\n type: \"MODULARUI/FETCH\",\n payload: {\n href: href instanceof Href ? href : new Href(href),\n method: options?.method ?? HTTP_METHODS.GET,\n data: options?.data,\n locale: options?.locale ?? \"en\",\n childmodels: options?.childmodels,\n targetModel: options?.targetModel,\n /**\n */\n successAction: (model) =>\n loadModelSuccessAction(key, model, options?.updateModel),\n /**\n */\n errorAction: (error) => {\n const errorResponse = new ErrorResponse(error, key);\n if (errorResponse.isChangePassword) {\n return {\n type: \"NO_ACTION\",\n };\n } else if (errorResponse.isResourceNotFoundAfterReload) {\n return removeModelByKey(key);\n }\n\n return updateStatus(key, MODULARUI_STATUS.ERROR);\n },\n },\n});\n\n/**\n */\nexport const loadModularUI =\n (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(updateStatus(key, MODULARUI_STATUS.LOADING));\n dispatch(startProgress());\n\n const loadModelPromise = dispatch(loadModel(key, href, options));\n\n return Promise.resolve(loadModelPromise)\n .then((response) => {\n if (response?.type === \"FINISH_PROGRESS\") {\n dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));\n }\n\n return dispatch(finishProgress());\n })\n .catch((error) => dispatch(handleError(error)));\n };\n\n/**\n */\nexport const reloadModel = (\n model: ModularUIModel,\n options?: RequestBaseOptions\n): ThunkAction =>\n loadModularUI(model.connectKey, model.selfhref, {\n ...options,\n isReload: true,\n });\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,gBAAgB,QAAQ,2BAA2B;AAC1E,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,8BAA8B;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAc9C;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CACtBC,GAAW,EACXC,KAAqB,KACF;EACnB;EACAA,KAAK,CAACC,UAAU,GAAGF,GAAG;EACtB,OAAO;IACLG,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE;MACPJ,GAAG;MACHC;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,WAAW,GAAIJ,KAAqB,KAAyB;EACxEE,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAA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AAK,CAAEb,KAAK,IAAKM,QAAQ,CAACnC,WAAW,CAAC6B,KAAK,CAAC,CAAC,CAAC;AACnD,CAAC;;AAEH;AACA;AACA,OAAO,MAAMc,WAAW,GAAG,CACzBxC,KAAqB,EACrBiB,OAA4B,KAE5Bc,aAAa,CAAC/B,KAAK,CAACC,UAAU,EAAED,KAAK,CAACyC,QAAQ,EAAE;EAC9C,GAAGxB,OAAO;EACVyB,QAAQ,EAAE;AACZ,CAAC,CAAC"}
@@ -1,4 +1,3 @@
1
-
2
1
  import { useEffect } from "react";
3
2
  import { useDispatch } from "react-redux";
4
3
  import { useLocation } from "react-router";
@@ -23,7 +22,6 @@ const connector = function (name, resource) {
23
22
  } = options;
24
23
  return Component => {
25
24
  const WrappedComponent = props => {
26
- var _modelEntry$model, _location$state;
27
25
  const dispatch = useDispatch();
28
26
  const location = useLocation();
29
27
  const url = useUrl(resource, {
@@ -34,7 +32,7 @@ const connector = function (name, resource) {
34
32
 
35
33
  // Load the model through the useModUI hook
36
34
  const modelEntry = useModularUI(displayName, url, otherOptions);
37
- const modelKey = modelEntry === null || modelEntry === void 0 ? void 0 : (_modelEntry$model = modelEntry.model) === null || _modelEntry$model === void 0 ? void 0 : _modelEntry$model.connectKey;
35
+ const modelKey = modelEntry?.model?.connectKey;
38
36
 
39
37
  // handle manual reload of model
40
38
  const handleManualReload = (model, reloadOptions) => {
@@ -48,7 +46,7 @@ const connector = function (name, resource) {
48
46
  };
49
47
 
50
48
  // Check if current model needs a reload
51
- const reload = (location === null || location === void 0 ? void 0 : (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.reload) ?? 0;
49
+ const reload = location?.state?.reload ?? 0;
52
50
  const doReload = useReload(modelEntry, reload);
53
51
  useEffect(() => {
54
52
  if (doReload) {
@@ -1 +1 @@
1
- {"version":3,"file":"connector.js","names":["useEffect","useDispatch","useLocation","loadModularUI","reloadModel","removeModelByKey","Href","getDisplayName","useUrl","useReload","useModularUI","useLocale","connector","name","resource","options","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","location","url","displayName","contextId","modelEntry","modelKey","model","connectKey","handleManualReload","reloadOptions","handleFetch","href","fetchOptions","reload","state","doReload","isReload","locale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI"],"sources":["../../../src/redux/_modularui/connector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport { loadModularUI, reloadModel, removeModelByKey } from \"./actions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./modularuiUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst connector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false }\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true })\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default connector;\n"],"mappings":";AACA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,cAAc;AAE1C,SAASC,aAAa,EAAEC,WAAW,EAAEC,gBAAgB,QAAQ,WAAW;AAExE,OAAOC,IAAI,MAAM,wBAAwB;AACzC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAASC,MAAM,EAAEC,SAAS,QAAQ,kBAAkB;AACpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,SAAS,QAAQ,qBAAqB;AAAC;AAmBhD;AACA;AACA,MAAMC,SAAS,GAAG,UAChBC,IAAY,EACZC,QAA2B,EAEmC;EAAA,IAD9DC,OAAyB,uEAAG;IAAEC,QAAQ,EAAE,MAAM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NnB,aAAa,CAACyB,QAAQ,EAAEJ,GAAG,EAAE;YAAE,GAAGN,YAAY;YAAEqB,QAAQ,EAAE;UAAK,CAAC,CAAC,CAClE;QACH;MACF,CAAC,EAAE,CAACjB,QAAQ,EAAEgB,QAAQ,EAAEd,GAAG,EAAEI,QAAQ,CAAC,CAAC;;MAEvC;MACA5B,SAAS,CAAC,MAAM;QACd,OAAO,MAAM;UACX,IAAIiB,eAAe,EAAE;YACnBK,QAAQ,CAACjB,gBAAgB,CAACuB,QAAQ,CAAC,CAAC;UACtC;QACF,CAAC;MACH,CAAC,EAAE,CAACN,QAAQ,EAAEM,QAAQ,CAAC,CAAC;;MAExB;MACA,MAAMY,MAAM,GAAG7B,SAAS,EAAE;MAC1B,MAAM8B,QAAuB,GAAG;QAC9Bb,QAAQ;QACR,CAACZ,QAAQ,GAAGW,UAAU,GAAGA,UAAU,CAACE,KAAK,GAAG,IAAI;QAChDN,QAAQ;QACRmB,MAAM,EAAEf,UAAU,GAAGA,UAAU,CAACe,MAAM,GAAG,IAAI;QAC7CC,gBAAgB,EAAEhB,UAAU,GAAGA,UAAU,CAACgB,gBAAgB,GAAG,IAAI;QACjEC,QAAQ,EAAEC,OAAO,CAAClB,UAAU,CAAC;QAC7Ba,MAAM;QACNM,cAAc,EAAEb,WAAW;QAC3B7B,WAAW,EAAE2B;MACf,CAAC;MAED,oBAAO,KAAC,SAAS;QAAA,GAAKV,KAAK;QAAA,GAAMoB;MAAQ,EAAI;IAC/C,CAAC;IAEDrB,gBAAgB,CAACK,WAAW,GAAI,gBAAelB,cAAc,CAC3Da,gBAAgB,EAChBP,IAAI,CACJ,EAAC;IAEH,OAAOO,gBAAgB;EACzB,CAAC;AACH,CAAC;AAED,eAAeR,SAAS"}
1
+ {"version":3,"file":"connector.js","names":["useEffect","useDispatch","useLocation","loadModularUI","reloadModel","removeModelByKey","Href","getDisplayName","useUrl","useReload","useModularUI","useLocale","connector","name","resource","options","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","location","url","displayName","contextId","modelEntry","modelKey","model","connectKey","handleManualReload","reloadOptions","handleFetch","href","fetchOptions","reload","state","doReload","isReload","locale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI"],"sources":["../../../src/redux/_modularui/connector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport { loadModularUI, reloadModel, removeModelByKey } from \"./actions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./modularuiUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst connector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false }\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true })\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default connector;\n"],"mappings":"AACA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,cAAc;AAE1C,SAASC,aAAa,EAAEC,WAAW,EAAEC,gBAAgB,QAAQ,WAAW;AAExE,OAAOC,IAAI,MAAM,wBAAwB;AACzC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAASC,MAAM,EAAEC,SAAS,QAAQ,kBAAkB;AACpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,SAAS,QAAQ,qBAAqB;AAAC;AAmBhD;AACA;AACA,MAAMC,SAAS,GAAG,UAChBC,IAAY,EACZC,QAA2B,EAEmC;EAAA,IAD9DC,OAAyB,uEAAG;IAAEC,QAAQ,EAAE,MAAM;IAAEC,eAAe,EAAE;EAAM,CAA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,CAAC,EAAE,CAACjB,QAAQ,EAAEgB,QAAQ,EAAEd,GAAG,EAAEI,QAAQ,CAAC,CAAC;;MAEvC;MACA5B,SAAS,CAAC,MAAM;QACd,OAAO,MAAM;UACX,IAAIiB,eAAe,EAAE;YACnBK,QAAQ,CAACjB,gBAAgB,CAACuB,QAAQ,CAAC,CAAC;UACtC;QACF,CAAC;MACH,CAAC,EAAE,CAACN,QAAQ,EAAEM,QAAQ,CAAC,CAAC;;MAExB;MACA,MAAMY,MAAM,GAAG7B,SAAS,EAAE;MAC1B,MAAM8B,QAAuB,GAAG;QAC9Bb,QAAQ;QACR,CAACZ,QAAQ,GAAGW,UAAU,GAAGA,UAAU,CAACE,KAAK,GAAG,IAAI;QAChDN,QAAQ;QACRmB,MAAM,EAAEf,UAAU,GAAGA,UAAU,CAACe,MAAM,GAAG,IAAI;QAC7CC,gBAAgB,EAAEhB,UAAU,GAAGA,UAAU,CAACgB,gBAAgB,GAAG,IAAI;QACjEC,QAAQ,EAAEC,OAAO,CAAClB,UAAU,CAAC;QAC7Ba,MAAM;QACNM,cAAc,EAAEb,WAAW;QAC3B7B,WAAW,EAAE2B;MACf,CAAC;MAED,oBAAO,KAAC,SAAS;QAAA,GAAKV,KAAK;QAAA,GAAMoB;MAAQ,EAAI;IAC/C,CAAC;IAEDrB,gBAAgB,CAACK,WAAW,GAAI,gBAAelB,cAAc,CAC3Da,gBAAgB,EAChBP,IAAI,CACJ,EAAC;IAEH,OAAOO,gBAAgB;EACzB,CAAC;AACH,CAAC;AAED,eAAeR,SAAS"}
@@ -1,4 +1,3 @@
1
-
2
1
  export * from "./middleware";
3
2
  export * from "./reducer";
4
3
  export { default as modularui } from "./connector";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","modularui","withModularUI"],"sources":["../../../src/redux/_modularui/index.js"],"sourcesContent":["// @flow\nexport * from \"./middleware\";\nexport * from \"./reducer\";\nexport { default as modularui } from \"./connector\";\nexport { default as withModularUI } from \"./withModularUI\";\n\nexport * from \"./modularuiUtils\";\nexport * from \"./actions\";\nexport * from \"./selectors\";\n\nexport type * from \"./types\";\n"],"mappings":";AACA,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,SAASA,OAAO,IAAIC,SAAS,QAAQ,aAAa;AAClD,SAASD,OAAO,IAAIE,aAAa,QAAQ,iBAAiB;AAE1D,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,aAAa"}
1
+ {"version":3,"file":"index.js","names":["default","modularui","withModularUI"],"sources":["../../../src/redux/_modularui/index.js"],"sourcesContent":["// @flow\nexport * from \"./middleware\";\nexport * from \"./reducer\";\nexport { default as modularui } from \"./connector\";\nexport { default as withModularUI } from \"./withModularUI\";\n\nexport * from \"./modularuiUtils\";\nexport * from \"./actions\";\nexport * from \"./selectors\";\n\nexport type * from \"./types\";\n"],"mappings":"AACA,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,SAASA,OAAO,IAAIC,SAAS,QAAQ,aAAa;AAClD,SAASD,OAAO,IAAIE,aAAa,QAAQ,iBAAiB;AAE1D,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,aAAa"}
@@ -62,8 +62,8 @@ export const getKey = (WrappedComponent, name, url) => {
62
62
  export const useReload = function (modelEntry) {
63
63
  let reload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
64
64
  if (reload > 0) {
65
- const isFullyLoaded = (modelEntry === null || modelEntry === void 0 ? void 0 : modelEntry.status) === MODULARUI_STATUS.FINISHED;
66
- const lastModification = (modelEntry === null || modelEntry === void 0 ? void 0 : modelEntry.lastModification) ?? 0;
65
+ const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;
66
+ const lastModification = modelEntry?.lastModification ?? 0;
67
67
  if (isFullyLoaded && lastModification < reload) {
68
68
  return true;
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"modularuiUtils.js","names":["useState","getDisplayName","MODULARUI_STATUS","Href","getUrl","resource","props","url","toString","useUrl","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","isExact","getKey","WrappedComponent","name","split","useReload","modelEntry","reload","isFullyLoaded","status","FINISHED","lastModification"],"sources":["../../../src/redux/_modularui/modularuiUtils.js"],"sourcesContent":["// @flow\nimport { useState } from \"react\";\n\nimport { getDisplayName } from \"../../react/utils\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ComponentType } from \"react\";\n\n/**\n * Generate modular ui url\n */\nconst getUrl = (resource: string | Function, props: Object) => {\n const url = typeof resource === \"function\" ? resource(props) : resource;\n\n if (url instanceof Href) {\n return url.toString();\n }\n\n return url || \"\";\n};\n\n/**\n */\nexport const useUrl = (resource: string | Function, props: Object): string => {\n const [previousUrl, setPreviousUrl] = useState(\"\");\n const [previousExact, setPreviousExact] = useState(false);\n\n const url = getUrl(resource, props);\n\n const { match } = props;\n\n // when match is not available through props,\n // this is a direct call to the modular ui hoc, not using a route\n if (!match) {\n return url;\n }\n\n const isDifferentUrl = url !== previousUrl;\n if (!isDifferentUrl) {\n return previousUrl;\n }\n\n const hasDifferentStartUriPart =\n previousUrl !== \"\" && !previousUrl.startsWith(match.url);\n\n // Always create an url when the match is exact\n // Or when the match is not exact AND the original match also was not exact\n // Or when the new start uri is different from the previous url\n if (\n match.isExact === true ||\n previousExact === match.isExact ||\n hasDifferentStartUriPart\n ) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n\n return url;\n }\n\n return previousUrl;\n};\n\n/**\n * Create key for modularui request based on component name and requested url\n */\nexport const getKey = (\n WrappedComponent: ComponentType<any>,\n name: string,\n url: string\n): string => {\n if (url) {\n return `${getDisplayName(WrappedComponent, name)}(${url.split(\"?\")[0]})`;\n }\n\n return getDisplayName(WrappedComponent, name);\n};\n\n/**\n * Check if the model corresponding to a modular ui service should be reloaded\n */\nexport const useReload = (modelEntry: Object, reload: number = 0): boolean => {\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n\n return false;\n};\n"],"mappings":";AACA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA;AACA,MAAMC,MAAM,GAAG,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYJ,IAAI,EAAE;IACvB,OAAOI,GAAG,CAACC,QAAQ,EAAE;EACvB;EAEA,OAAOD,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACA,OAAO,MAAME,MAAM,GAAG,CAACJ,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACI,WAAW,EAAEC,cAAc,CAAC,GAAGX,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACY,aAAa,EAAEC,gBAAgB,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EAEzD,MAAMO,GAAG,GAAGH,MAAM,CAACC,QAAQ,EAAEC,KAAK,CAAC;EAEnC,MAAM;IAAEQ;EAAM,CAAC,GAAGR,KAAK;;EAEvB;EACA;EACA,IAAI,CAACQ,KAAK,EAAE;IACV,OAAOP,GAAG;EACZ;EAEA,MAAMQ,cAAc,GAAGR,GAAG,KAAKG,WAAW;EAC1C,IAAI,CAACK,cAAc,EAAE;IACnB,OAAOL,WAAW;EACpB;EAEA,MAAMM,wBAAwB,GAC5BN,WAAW,KAAK,EAAE,IAAI,CAAC,4BAAAA,WAAW,OAAXA,WAAW,EAAYI,KAAK,CAACP,GAAG,CAAC;;EAE1D;EACA;EACA;EACA,IACEO,KAAK,CAACG,OAAO,KAAK,IAAI,IACtBL,aAAa,KAAKE,KAAK,CAACG,OAAO,IAC/BD,wBAAwB,EACxB;IACAL,cAAc,CAACJ,GAAG,CAAC;IACnBM,gBAAgB,CAACC,KAAK,CAACG,OAAO,CAAC;IAE/B,OAAOV,GAAG;EACZ;EAEA,OAAOG,WAAW;AACpB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMQ,MAAM,GAAG,CACpBC,gBAAoC,EACpCC,IAAY,EACZb,GAAW,KACA;EACX,IAAIA,GAAG,EAAE;IACP,OAAQ,GAAEN,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAE,IAAGb,GAAG,CAACc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAE;EAC1E;EAEA,OAAOpB,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAC;AAC/C,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,SAAS,GAAG,UAACC,UAAkB,EAAkC;EAAA,IAAhCC,MAAc,uEAAG,CAAC;EAC9D,IAAIA,MAAM,GAAG,CAAC,EAAE;IACd,MAAMC,aAAa,GAAG,CAAAF,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEG,MAAM,MAAKxB,gBAAgB,CAACyB,QAAQ;IACtE,MAAMC,gBAAgB,GAAG,CAAAL,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEK,gBAAgB,KAAI,CAAC;IAE1D,IAAIH,aAAa,IAAIG,gBAAgB,GAAGJ,MAAM,EAAE;MAC9C,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd,CAAC"}
1
+ {"version":3,"file":"modularuiUtils.js","names":["useState","getDisplayName","MODULARUI_STATUS","Href","getUrl","resource","props","url","toString","useUrl","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","isExact","getKey","WrappedComponent","name","split","useReload","modelEntry","reload","isFullyLoaded","status","FINISHED","lastModification"],"sources":["../../../src/redux/_modularui/modularuiUtils.js"],"sourcesContent":["// @flow\nimport { useState } from \"react\";\n\nimport { getDisplayName } from \"../../react/utils\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ComponentType } from \"react\";\n\n/**\n * Generate modular ui url\n */\nconst getUrl = (resource: string | Function, props: Object) => {\n const url = typeof resource === \"function\" ? resource(props) : resource;\n\n if (url instanceof Href) {\n return url.toString();\n }\n\n return url || \"\";\n};\n\n/**\n */\nexport const useUrl = (resource: string | Function, props: Object): string => {\n const [previousUrl, setPreviousUrl] = useState(\"\");\n const [previousExact, setPreviousExact] = useState(false);\n\n const url = getUrl(resource, props);\n\n const { match } = props;\n\n // when match is not available through props,\n // this is a direct call to the modular ui hoc, not using a route\n if (!match) {\n return url;\n }\n\n const isDifferentUrl = url !== previousUrl;\n if (!isDifferentUrl) {\n return previousUrl;\n }\n\n const hasDifferentStartUriPart =\n previousUrl !== \"\" && !previousUrl.startsWith(match.url);\n\n // Always create an url when the match is exact\n // Or when the match is not exact AND the original match also was not exact\n // Or when the new start uri is different from the previous url\n if (\n match.isExact === true ||\n previousExact === match.isExact ||\n hasDifferentStartUriPart\n ) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n\n return url;\n }\n\n return previousUrl;\n};\n\n/**\n * Create key for modularui request based on component name and requested url\n */\nexport const getKey = (\n WrappedComponent: ComponentType<any>,\n name: string,\n url: string\n): string => {\n if (url) {\n return `${getDisplayName(WrappedComponent, name)}(${url.split(\"?\")[0]})`;\n }\n\n return getDisplayName(WrappedComponent, name);\n};\n\n/**\n * Check if the model corresponding to a modular ui service should be reloaded\n */\nexport const useReload = (modelEntry: Object, reload: number = 0): boolean => {\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n\n return false;\n};\n"],"mappings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gBAAgB,CAACC,KAAK,CAACG,OAAO,CAAC;IAE/B,OAAOV,GAAG;EACZ;EAEA,OAAOG,WAAW;AACpB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMQ,MAAM,GAAG,CACpBC,gBAAoC,EACpCC,IAAY,EACZb,GAAW,KACA;EACX,IAAIA,GAAG,EAAE;IACP,OAAQ,GAAEN,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAE,IAAGb,GAAG,CAACc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAE;EAC1E;EAEA,OAAOpB,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAC;AAC/C,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,SAAS,GAAG,UAACC,UAAkB,EAAkC;EAAA,IAAhCC,MAAc,uEAAG,CAAC;EAC9D,IAAIA,MAAM,GAAG,CAAC,EAAE;IACd,MAAMC,aAAa,GAAGF,UAAU,EAAEG,MAAM,KAAKxB,gBAAgB,CAACyB,QAAQ;IACtE,MAAMC,gBAAgB,GAAGL,UAAU,EAAEK,gBAAgB,IAAI,CAAC;IAE1D,IAAIH,aAAa,IAAIG,gBAAgB,GAAGJ,MAAM,EAAE;MAC9C,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd,CAAC"}
@@ -52,8 +52,7 @@ const setModel = (state, _ref2) => {
52
52
  const getModelKey = (state, model) => {
53
53
  var _context;
54
54
  return _findInstanceProperty(_context = _Object$keys(state)).call(_context, key => {
55
- var _state$key, _state$key$model;
56
- const connectKey = ((_state$key = state[key]) === null || _state$key === void 0 ? void 0 : (_state$key$model = _state$key.model) === null || _state$key$model === void 0 ? void 0 : _state$key$model.connectKey) ?? "";
55
+ const connectKey = state[key]?.model?.connectKey ?? "";
57
56
  return connectKey === model.connectKey;
58
57
  });
59
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.js","names":["IllegalArgumentException","MODULARUI_STATUS","ApplicationModel","updateStatus","state","key","status","LOADING","lastModification","Date","now","setModel","model","getModelKey","connectKey","updateModel","modelKey","Error","removeKey","_","newState","resetModularUI","initialState","ModularUIReducer","action","type","payload"],"sources":["../../../src/redux/_modularui/reducer.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport { ApplicationModel } from \"../../models\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { ModularUIState } from \"./types\";\n\n/**\n */\nconst updateStatus = (state, { key, status }) => {\n // model should always be available when status is not loading\n if (status !== MODULARUI_STATUS.LOADING && !state[key]) {\n return state;\n }\n\n return {\n ...state,\n [key]: {\n ...state[key],\n status,\n lastModification: Date.now(),\n },\n };\n};\n\n/**\n */\nconst setModel = (state, { key, model }) => {\n if (!state[key]) {\n return state;\n }\n\n if (model) {\n return {\n ...state,\n [key]: {\n ...state[key],\n model,\n lastModification: Date.now(),\n },\n };\n }\n\n throw new IllegalArgumentException(\"No model for setModel\");\n};\n\n/**\n */\nconst getModelKey = (state, model) =>\n Object.keys(state).find((key) => {\n const connectKey = state[key]?.model?.connectKey ?? \"\";\n return connectKey === model.connectKey;\n });\n\n/**\n */\nconst updateModel = (state, model) => {\n const modelKey = getModelKey(state, model);\n\n if (modelKey) {\n return setModel(state, { key: modelKey, model });\n }\n\n throw new Error(\n `ModularUIReducer: Cannot update model with key ${model.connectKey}`\n );\n};\n\n/**\n */\nconst removeKey = (modelKey: string, state: ModularUIState): ModularUIState => {\n // eslint-disable-next-line no-unused-vars\n const { [modelKey]: _, ...newState } = state;\n\n return newState;\n};\n\n/**\n * Remove all but application models\n */\nconst resetModularUI = (state: ModularUIState) => {\n const newState = {};\n\n for (const key in state) {\n if (state[key].model instanceof ApplicationModel) {\n newState[key] = { ...state[key] };\n }\n }\n\n return newState;\n};\n\nconst initialState: ModularUIState = {};\n\n/**\n * Modular UI Reducer\n */\nexport const ModularUIReducer: Reducer<ModularUIState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"MODULARUI/RESET\":\n return resetModularUI(state);\n\n case \"MODULARUI/STATUS\":\n return updateStatus(state, action.payload);\n\n case \"MODULARUI/SET\":\n return setModel(state, action.payload);\n\n case \"MODULARUI/UPDATE\":\n return updateModel(state, action.payload);\n\n case \"MODULARUI/REMOVE_KEY\":\n return removeKey(action.payload, state);\n\n default:\n return state;\n }\n};\n"],"mappings":";;AACA,SAASA,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,gBAAgB,QAAQ,cAAc;AAM/C;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAK,WAAsB;EAAA,IAApB;IAAEC,GAAG;IAAEC;EAAO,CAAC;EAC1C;EACA,IAAIA,MAAM,KAAKL,gBAAgB,CAACM,OAAO,IAAI,CAACH,KAAK,CAACC,GAAG,CAAC,EAAE;IACtD,OAAOD,KAAK;EACd;EAEA,OAAO;IACL,GAAGA,KAAK;IACR,CAACC,GAAG,GAAG;MACL,GAAGD,KAAK,CAACC,GAAG,CAAC;MACbC,MAAM;MACNE,gBAAgB,EAAEC,IAAI,CAACC,GAAG;IAC5B;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAMC,QAAQ,GAAG,CAACP,KAAK,YAAqB;EAAA,IAAnB;IAAEC,GAAG;IAAEO;EAAM,CAAC;EACrC,IAAI,CAACR,KAAK,CAACC,GAAG,CAAC,EAAE;IACf,OAAOD,KAAK;EACd;EAEA,IAAIQ,KAAK,EAAE;IACT,OAAO;MACL,GAAGR,KAAK;MACR,CAACC,GAAG,GAAG;QACL,GAAGD,KAAK,CAACC,GAAG,CAAC;QACbO,KAAK;QACLJ,gBAAgB,EAAEC,IAAI,CAACC,GAAG;MAC5B;IACF,CAAC;EACH;EAEA,MAAM,IAAIV,wBAAwB,CAAC,uBAAuB,CAAC;AAC7D,CAAC;;AAED;AACA;AACA,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AO,MAAMC,gBAAsD,GAAG,YAGjE;EAAA,IAFHnB,KAAK,uEAAGkB,YAAY;EAAA,IACpBE,MAAM;EAEN,IAAI,CAACA,MAAM,EAAE;IACX,OAAOpB,KAAK;EACd;EAEA,QAAQoB,MAAM,CAACC,IAAI;IACjB,KAAK,iBAAiB;MACpB,OAAOJ,cAAc,CAACjB,KAAK,CAAC;IAE9B,KAAK,kBAAkB;MACrB,OAAOD,YAAY,CAACC,KAAK,EAAEoB,MAAM,CAACE,OAAO,CAAC;IAE5C,KAAK,eAAe;MAClB,OAAOf,QAAQ,CAACP,KAAK,EAAEoB,MAAM,CAACE,OAAO,CAAC;IAExC,KAAK,kBAAkB;MACrB,OAAOX,WAAW,CAACX,KAAK,EAAEoB,MAAM,CAACE,OAAO,CAAC;IAE3C,KAAK,sBAAsB;MACzB,OAAOR,SAAS,CAACM,MAAM,CAACE,OAAO,EAAEtB,KAAK,CAAC;IAEzC;MACE,OAAOA,KAAK;EAAC;AAEnB,CAAC"}
1
+ {"version":3,"file":"reducer.js","names":["IllegalArgumentException","MODULARUI_STATUS","ApplicationModel","updateStatus","state","key","status","LOADING","lastModification","Date","now","setModel","model","getModelKey","connectKey","updateModel","modelKey","Error","removeKey","_","newState","resetModularUI","initialState","ModularUIReducer","action","type","payload"],"sources":["../../../src/redux/_modularui/reducer.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport { ApplicationModel } from \"../../models\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { ModularUIState } from \"./types\";\n\n/**\n */\nconst updateStatus = (state, { key, status }) => {\n // model should always be available when status is not loading\n if (status !== MODULARUI_STATUS.LOADING && !state[key]) {\n return state;\n }\n\n return {\n ...state,\n [key]: {\n ...state[key],\n status,\n lastModification: Date.now(),\n },\n };\n};\n\n/**\n */\nconst setModel = (state, { key, model }) => {\n if (!state[key]) {\n return state;\n }\n\n if (model) {\n return {\n ...state,\n [key]: {\n ...state[key],\n model,\n lastModification: Date.now(),\n },\n };\n }\n\n throw new IllegalArgumentException(\"No model for setModel\");\n};\n\n/**\n */\nconst getModelKey = (state, model) =>\n Object.keys(state).find((key) => {\n const connectKey = state[key]?.model?.connectKey ?? \"\";\n return connectKey === model.connectKey;\n });\n\n/**\n */\nconst updateModel = (state, model) => {\n const modelKey = getModelKey(state, model);\n\n if (modelKey) {\n return setModel(state, { key: modelKey, model });\n }\n\n throw new Error(\n `ModularUIReducer: Cannot update model with key ${model.connectKey}`\n );\n};\n\n/**\n */\nconst removeKey = (modelKey: string, state: ModularUIState): ModularUIState => {\n // eslint-disable-next-line no-unused-vars\n const { [modelKey]: _, ...newState } = state;\n\n return newState;\n};\n\n/**\n * Remove all but application models\n */\nconst resetModularUI = (state: ModularUIState) => {\n const newState = {};\n\n for (const key in state) {\n if (state[key].model instanceof ApplicationModel) {\n newState[key] = { ...state[key] };\n }\n }\n\n return newState;\n};\n\nconst initialState: ModularUIState = {};\n\n/**\n * Modular UI Reducer\n */\nexport const ModularUIReducer: Reducer<ModularUIState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"MODULARUI/RESET\":\n return resetModularUI(state);\n\n case \"MODULARUI/STATUS\":\n return updateStatus(state, action.payload);\n\n case \"MODULARUI/SET\":\n return setModel(state, action.payload);\n\n case \"MODULARUI/UPDATE\":\n return updateModel(state, action.payload);\n\n case \"MODULARUI/REMOVE_KEY\":\n return removeKey(action.payload, state);\n\n default:\n return state;\n }\n};\n"],"mappings":";;AACA,SAASA,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,gBAAgB,QAAQ,cAAc;AAM/C;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAK,WAAsB;EAAA,IAApB;IAAEC,GAAG;IAAEC;EAAO,CAAC;EAC1C;EACA,IAAIA,MAAM,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B,KAAK,CAAC;IAEzC;MACE,OAAOA,KAAK;EAAC;AAEnB,CAAC"}
@@ -16,9 +16,8 @@ import FormModel from "../../models/form/FormModel";
16
16
  /**
17
17
  */
18
18
  export const getAllModelsByInstance = (state, instance) => {
19
- var _state$i18n;
20
- const locale = (state === null || state === void 0 ? void 0 : (_state$i18n = state.i18n) === null || _state$i18n === void 0 ? void 0 : _state$i18n.locale) || "en";
21
- const modularui = state === null || state === void 0 ? void 0 : state.modularui;
19
+ const locale = state?.i18n?.locale || "en";
20
+ const modularui = state?.modularui;
22
21
  if (modularui) {
23
22
  var _context, _context2;
24
23
  return _mapInstanceProperty(_context = _filterInstanceProperty(_context2 = _Object$keys(modularui)).call(_context2, key => {
@@ -34,9 +33,8 @@ export const getAllModelsByInstance = (state, instance) => {
34
33
  /**
35
34
  */
36
35
  export const getFirstModelByInstance = (state, instance) => {
37
- var _state$i18n2;
38
- const locale = (state === null || state === void 0 ? void 0 : (_state$i18n2 = state.i18n) === null || _state$i18n2 === void 0 ? void 0 : _state$i18n2.locale) || "en";
39
- const modularui = state === null || state === void 0 ? void 0 : state.modularui;
36
+ const locale = state?.i18n?.locale || "en";
37
+ const modularui = state?.modularui;
40
38
  if (modularui) {
41
39
  var _context3;
42
40
  const key = _findInstanceProperty(_context3 = _Object$keys(modularui)).call(_context3, key => {
@@ -60,10 +58,9 @@ export const getFirstModelByInstance = (state, instance) => {
60
58
  /**
61
59
  */
62
60
  export const getActiveModelByInstance = (state, instance) => {
63
- var _state$i18n3;
64
61
  const location = getLocation(state);
65
- const locale = (state === null || state === void 0 ? void 0 : (_state$i18n3 = state.i18n) === null || _state$i18n3 === void 0 ? void 0 : _state$i18n3.locale) || "en";
66
- const modularui = state === null || state === void 0 ? void 0 : state.modularui;
62
+ const locale = state?.i18n?.locale || "en";
63
+ const modularui = state?.modularui;
67
64
  if (modularui) {
68
65
  var _context4;
69
66
  const key = _findInstanceProperty(_context4 = _Object$keys(modularui)).call(_context4, key => {
@@ -155,10 +152,7 @@ export const allKeysByHref = (state, href) => {
155
152
 
156
153
  /**
157
154
  */
158
- const getLocation = state => {
159
- var _state$router;
160
- return state === null || state === void 0 ? void 0 : (_state$router = state.router) === null || _state$router === void 0 ? void 0 : _state$router.location.pathname;
161
- };
155
+ const getLocation = state => state?.router?.location.pathname;
162
156
 
163
157
  /**
164
158
  */