@beinformed/ui 1.30.0 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (612) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  3. package/esm/constants/LayoutHints.js.map +1 -1
  4. package/esm/constants/Settings.js.map +1 -1
  5. package/esm/exceptions/NetworkException.js.map +1 -1
  6. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  7. package/esm/hooks/useAuthentication.js.map +1 -1
  8. package/esm/hooks/useContent.js.map +1 -1
  9. package/esm/hooks/useForm.js +3 -2
  10. package/esm/hooks/useForm.js.map +1 -1
  11. package/esm/hooks/useI18n.js.map +1 -1
  12. package/esm/hooks/useModal.js.map +1 -1
  13. package/esm/hooks/useModelCatalog.js.map +1 -1
  14. package/esm/hooks/useModels.js.map +1 -1
  15. package/esm/hooks/useModularUI.js.map +1 -1
  16. package/esm/hooks/useModularUIBasic.js.map +1 -1
  17. package/esm/hooks/useNotification.js.map +1 -1
  18. package/esm/hooks/useProgressIndicator.js.map +1 -1
  19. package/esm/hooks/useRouter.js.map +1 -1
  20. package/esm/i18n/Locale.js.map +1 -1
  21. package/esm/i18n/Locales.js.map +1 -1
  22. package/esm/i18n/Message.js.map +1 -1
  23. package/esm/i18n/withMessage.js.map +1 -1
  24. package/esm/models/actions/ActionCollection.js.map +1 -1
  25. package/esm/models/actions/ActionModel.js.map +1 -1
  26. package/esm/models/application/ApplicationModel.js.map +1 -1
  27. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  28. package/esm/models/attributes/AttributeContent.js.map +1 -1
  29. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  30. package/esm/models/attributes/AttributeModel.js.map +1 -1
  31. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  32. package/esm/models/attributes/BooleanAttributeModel.js +1 -1
  33. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  34. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  35. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  36. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  37. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  38. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  39. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  40. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  41. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  42. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  43. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  44. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  45. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  46. package/esm/models/attributes/_createAttribute.js.map +1 -1
  47. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  48. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  49. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  50. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  51. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  52. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  53. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  54. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  55. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  56. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  57. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +5 -7
  58. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  59. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -0
  60. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  61. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  62. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  63. package/esm/models/base/BaseCollection.js.map +1 -1
  64. package/esm/models/base/BaseModel.js.map +1 -1
  65. package/esm/models/base/ResourceCollection.js.map +1 -1
  66. package/esm/models/base/ResourceModel.js.map +1 -1
  67. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  68. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  69. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  70. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  71. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  72. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  73. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  74. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  75. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  76. package/esm/models/content/ContentIndexModel.js.map +1 -1
  77. package/esm/models/content/ContentLinkModel.js.map +1 -1
  78. package/esm/models/content/ContentModel.js.map +1 -1
  79. package/esm/models/content/ContentTOCModel.js.map +1 -1
  80. package/esm/models/content/SectionModel.js.map +1 -1
  81. package/esm/models/content/SubSectionModel.js.map +1 -1
  82. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  83. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  84. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  85. package/esm/models/detail/DetailModel.js.map +1 -1
  86. package/esm/models/error/ErrorCollection.js.map +1 -1
  87. package/esm/models/error/ErrorModel.js.map +1 -1
  88. package/esm/models/error/ErrorResponse.js +6 -0
  89. package/esm/models/error/ErrorResponse.js.map +1 -1
  90. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  91. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  92. package/esm/models/filters/FilterCollection.js.map +1 -1
  93. package/esm/models/form/FormModel.js +30 -3
  94. package/esm/models/form/FormModel.js.map +1 -1
  95. package/esm/models/form/FormObjectModel.js.map +1 -1
  96. package/esm/models/grouping/GroupingModel.js.map +1 -1
  97. package/esm/models/href/Href.js.map +1 -1
  98. package/esm/models/href/ListHref.js.map +1 -1
  99. package/esm/models/layouthint/LayoutHintCollection.js +4 -4
  100. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  101. package/esm/models/links/LinkCollection.js.map +1 -1
  102. package/esm/models/links/LinkModel.js.map +1 -1
  103. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  104. package/esm/models/list/ListDetailModel.js.map +1 -1
  105. package/esm/models/list/ListItemCollection.js.map +1 -1
  106. package/esm/models/list/ListItemModel.js.map +1 -1
  107. package/esm/models/list/ListModel.js.map +1 -1
  108. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  109. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  110. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  111. package/esm/models/paging/PagingModel.js.map +1 -1
  112. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  113. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  114. package/esm/models/resolveModel.js.map +1 -1
  115. package/esm/models/search/CaseSearchModel.js.map +1 -1
  116. package/esm/models/sorting/SortingModel.js +1 -1
  117. package/esm/models/sorting/SortingModel.js.map +1 -1
  118. package/esm/models/tab/TabModel.js.map +1 -1
  119. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  120. package/esm/models/user/UserProfileModel.js.map +1 -1
  121. package/esm/modularui/Authenticate.js.map +1 -1
  122. package/esm/modularui/CaptchaRequest.js.map +1 -1
  123. package/esm/modularui/ModularUIRequest.js.map +1 -1
  124. package/esm/modularui/ModularUIResponse.js.map +1 -1
  125. package/esm/modularui/UploadRequest.js.map +1 -1
  126. package/esm/react/ErrorBoundary.js.map +1 -1
  127. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  128. package/esm/react-client/Init.js.map +1 -1
  129. package/esm/react-client/client.js.map +1 -1
  130. package/esm/react-client/contextPath.js.map +1 -1
  131. package/esm/react-client/rehydrate.js.map +1 -1
  132. package/esm/react-server/contextPath.js.map +1 -1
  133. package/esm/react-server/createSSRComplete.js.map +1 -1
  134. package/esm/react-server/htmlpage.js.map +1 -1
  135. package/esm/react-server/renderSSRComplete.js.map +1 -1
  136. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  137. package/esm/react-server/requestInformation.js.map +1 -1
  138. package/esm/react-server/serverNoSSR.js.map +1 -1
  139. package/esm/react-server/serverSSR.js.map +1 -1
  140. package/esm/react-server/serverUtil.js.map +1 -1
  141. package/esm/react-theme/ThemeProvider.js.map +1 -1
  142. package/esm/react-theme/createTheme.js.map +1 -1
  143. package/esm/react-theme/utils/contrast.js.map +1 -1
  144. package/esm/react-theme/utils/corners.js.map +1 -1
  145. package/esm/react-theme/utils/spacers.js.map +1 -1
  146. package/esm/react-theme/utils/themeProps.js.map +1 -1
  147. package/esm/redux/_i18n/I18nActions.js.map +1 -1
  148. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  149. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  150. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  151. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  152. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  153. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
  154. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  155. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  156. package/esm/redux/_router/RouterConnectors.js.map +1 -1
  157. package/esm/redux/_router/RouterMiddleware.js.map +1 -1
  158. package/esm/redux/actions/Application.js.map +1 -1
  159. package/esm/redux/actions/Authorization.js.map +1 -1
  160. package/esm/redux/actions/Error.js.map +1 -1
  161. package/esm/redux/actions/Form.js.map +1 -1
  162. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  163. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  164. package/esm/redux/actions/FormAutosave.js.map +1 -1
  165. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  166. package/esm/redux/actions/FormValidations.js.map +1 -1
  167. package/esm/redux/actions/Notification.js.map +1 -1
  168. package/esm/redux/actions/Preferences.js.map +1 -1
  169. package/esm/redux/actions/SignIn.js.map +1 -1
  170. package/esm/redux/actions/SignOut.js.map +1 -1
  171. package/esm/redux/connectors/Application.js.map +1 -1
  172. package/esm/redux/connectors/CaseView.js.map +1 -1
  173. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  174. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  175. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  176. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  177. package/esm/redux/connectors/Form.js.map +1 -1
  178. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  179. package/esm/redux/connectors/ListDetail.js.map +1 -1
  180. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  181. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  182. package/esm/redux/connectors/Preferences.js.map +1 -1
  183. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  184. package/esm/redux/connectors/Tab.js.map +1 -1
  185. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  186. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  187. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  188. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  189. package/esm/redux/store/configureStore.js.map +1 -1
  190. package/esm/utils/browser/Cache.js.map +1 -1
  191. package/esm/utils/browser/Cookies.js.map +1 -1
  192. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  193. package/esm/utils/fetch/serverFetch.js.map +1 -1
  194. package/esm/utils/fetch/universalFetch.js.map +1 -1
  195. package/esm/utils/fetch/xhr.js.map +1 -1
  196. package/esm/utils/helpers/checkResource.js.map +1 -1
  197. package/esm/utils/helpers/createHash.js.map +1 -1
  198. package/esm/utils/helpers/createUUID.js.map +1 -1
  199. package/esm/utils/helpers/repositoryResource.js.map +1 -1
  200. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  201. package/esm/utils/number/DecimalFormat.js +4 -8
  202. package/esm/utils/number/DecimalFormat.js.map +1 -1
  203. package/esm/utils/number/formatValue.js.map +1 -1
  204. package/esm/utils/number/parseNumbers.js.map +1 -1
  205. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  206. package/lib/constants/LayoutHints.js.map +1 -1
  207. package/lib/constants/Settings.js.map +1 -1
  208. package/lib/exceptions/NetworkException.js.map +1 -1
  209. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  210. package/lib/hooks/useAuthentication.js.map +1 -1
  211. package/lib/hooks/useContent.js.map +1 -1
  212. package/lib/hooks/useForm.js +3 -2
  213. package/lib/hooks/useForm.js.flow +2 -1
  214. package/lib/hooks/useForm.js.map +1 -1
  215. package/lib/hooks/useI18n.js.map +1 -1
  216. package/lib/hooks/useModal.js.map +1 -1
  217. package/lib/hooks/useModelCatalog.js.map +1 -1
  218. package/lib/hooks/useModels.js.map +1 -1
  219. package/lib/hooks/useModularUI.js.map +1 -1
  220. package/lib/hooks/useModularUIBasic.js.map +1 -1
  221. package/lib/hooks/useNotification.js.map +1 -1
  222. package/lib/hooks/useProgressIndicator.js.map +1 -1
  223. package/lib/hooks/useRouter.js.map +1 -1
  224. package/lib/i18n/Locale.js.map +1 -1
  225. package/lib/i18n/Locales.js.map +1 -1
  226. package/lib/i18n/Message.js.map +1 -1
  227. package/lib/i18n/withMessage.js.map +1 -1
  228. package/lib/models/actions/ActionCollection.js.map +1 -1
  229. package/lib/models/actions/ActionModel.js.map +1 -1
  230. package/lib/models/application/ApplicationModel.js.map +1 -1
  231. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  232. package/lib/models/attributes/AttributeContent.js.map +1 -1
  233. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  234. package/lib/models/attributes/AttributeModel.js.map +1 -1
  235. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  236. package/lib/models/attributes/BooleanAttributeModel.js +1 -1
  237. package/lib/models/attributes/BooleanAttributeModel.js.flow +1 -1
  238. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  239. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  240. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  241. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  242. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  243. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  244. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  245. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  246. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  247. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  248. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  249. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  250. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  251. package/lib/models/attributes/__tests__/BooleanAttributeModel.spec.js.flow +14 -0
  252. package/lib/models/attributes/_createAttribute.js.map +1 -1
  253. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  254. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  255. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  256. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  257. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  258. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  259. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  260. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  261. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  262. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  263. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +5 -7
  264. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +0 -1
  265. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  266. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -0
  267. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  268. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  269. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  270. package/lib/models/base/BaseCollection.js.map +1 -1
  271. package/lib/models/base/BaseModel.js.map +1 -1
  272. package/lib/models/base/ResourceCollection.js.map +1 -1
  273. package/lib/models/base/ResourceModel.js.map +1 -1
  274. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  275. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  276. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  277. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  278. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  279. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  280. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  281. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  282. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  283. package/lib/models/content/ContentIndexModel.js.map +1 -1
  284. package/lib/models/content/ContentLinkModel.js.map +1 -1
  285. package/lib/models/content/ContentModel.js.map +1 -1
  286. package/lib/models/content/ContentTOCModel.js.map +1 -1
  287. package/lib/models/content/SectionModel.js.map +1 -1
  288. package/lib/models/content/SubSectionModel.js.map +1 -1
  289. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  290. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  291. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  292. package/lib/models/detail/DetailModel.js.map +1 -1
  293. package/lib/models/error/ErrorCollection.js.map +1 -1
  294. package/lib/models/error/ErrorModel.js.map +1 -1
  295. package/lib/models/error/ErrorResponse.js +6 -0
  296. package/lib/models/error/ErrorResponse.js.map +1 -1
  297. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  298. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  299. package/lib/models/filters/FilterCollection.js.map +1 -1
  300. package/lib/models/form/FormModel.js +30 -3
  301. package/lib/models/form/FormModel.js.flow +32 -4
  302. package/lib/models/form/FormModel.js.map +1 -1
  303. package/lib/models/form/FormObjectModel.js.map +1 -1
  304. package/lib/models/form/__tests__/FormModel.spec.js.flow +4 -0
  305. package/lib/models/grouping/GroupingModel.js.map +1 -1
  306. package/lib/models/href/Href.js.map +1 -1
  307. package/lib/models/href/ListHref.js.map +1 -1
  308. package/lib/models/layouthint/LayoutHintCollection.js +4 -4
  309. package/lib/models/layouthint/LayoutHintCollection.js.flow +4 -4
  310. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  311. package/lib/models/links/LinkCollection.js.map +1 -1
  312. package/lib/models/links/LinkModel.js.map +1 -1
  313. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  314. package/lib/models/list/ListDetailModel.js.map +1 -1
  315. package/lib/models/list/ListItemCollection.js.map +1 -1
  316. package/lib/models/list/ListItemModel.js.map +1 -1
  317. package/lib/models/list/ListModel.js.map +1 -1
  318. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  319. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  320. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  321. package/lib/models/paging/PagingModel.js.map +1 -1
  322. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  323. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  324. package/lib/models/resolveModel.js.map +1 -1
  325. package/lib/models/search/CaseSearchModel.js.map +1 -1
  326. package/lib/models/sorting/SortingModel.js +1 -1
  327. package/lib/models/sorting/SortingModel.js.flow +1 -1
  328. package/lib/models/sorting/SortingModel.js.map +1 -1
  329. package/lib/models/tab/TabModel.js.map +1 -1
  330. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  331. package/lib/models/user/UserProfileModel.js.map +1 -1
  332. package/lib/modularui/Authenticate.js.map +1 -1
  333. package/lib/modularui/CaptchaRequest.js.map +1 -1
  334. package/lib/modularui/ModularUIRequest.js.map +1 -1
  335. package/lib/modularui/ModularUIResponse.js.map +1 -1
  336. package/lib/modularui/UploadRequest.js.map +1 -1
  337. package/lib/react/ErrorBoundary.js.map +1 -1
  338. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  339. package/lib/react-client/Init.js.map +1 -1
  340. package/lib/react-client/client.js.map +1 -1
  341. package/lib/react-client/contextPath.js.map +1 -1
  342. package/lib/react-client/rehydrate.js.map +1 -1
  343. package/lib/react-server/contextPath.js.map +1 -1
  344. package/lib/react-server/createSSRComplete.js.map +1 -1
  345. package/lib/react-server/htmlpage.js.map +1 -1
  346. package/lib/react-server/renderSSRComplete.js.map +1 -1
  347. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  348. package/lib/react-server/requestInformation.js.map +1 -1
  349. package/lib/react-server/serverNoSSR.js.map +1 -1
  350. package/lib/react-server/serverSSR.js.map +1 -1
  351. package/lib/react-server/serverUtil.js.map +1 -1
  352. package/lib/react-theme/ThemeProvider.js.map +1 -1
  353. package/lib/react-theme/createTheme.js.map +1 -1
  354. package/lib/react-theme/utils/contrast.js.map +1 -1
  355. package/lib/react-theme/utils/corners.js.map +1 -1
  356. package/lib/react-theme/utils/spacers.js.map +1 -1
  357. package/lib/react-theme/utils/themeProps.js.map +1 -1
  358. package/lib/redux/_i18n/I18nActions.js.map +1 -1
  359. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  360. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  361. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  362. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  363. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  364. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  365. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  366. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  367. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  368. package/lib/redux/_router/RouterMiddleware.js.map +1 -1
  369. package/lib/redux/actions/Application.js.map +1 -1
  370. package/lib/redux/actions/Authorization.js.map +1 -1
  371. package/lib/redux/actions/Error.js.map +1 -1
  372. package/lib/redux/actions/Form.js.map +1 -1
  373. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  374. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  375. package/lib/redux/actions/FormAutosave.js.map +1 -1
  376. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  377. package/lib/redux/actions/FormValidations.js.map +1 -1
  378. package/lib/redux/actions/Notification.js.map +1 -1
  379. package/lib/redux/actions/Preferences.js.map +1 -1
  380. package/lib/redux/actions/SignIn.js.map +1 -1
  381. package/lib/redux/actions/SignOut.js.map +1 -1
  382. package/lib/redux/connectors/Application.js.map +1 -1
  383. package/lib/redux/connectors/CaseView.js.map +1 -1
  384. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  385. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  386. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  387. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  388. package/lib/redux/connectors/Form.js.map +1 -1
  389. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  390. package/lib/redux/connectors/ListDetail.js.map +1 -1
  391. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  392. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  393. package/lib/redux/connectors/Preferences.js.map +1 -1
  394. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  395. package/lib/redux/connectors/Tab.js.map +1 -1
  396. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  397. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  398. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  399. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  400. package/lib/redux/store/configureStore.js.map +1 -1
  401. package/lib/utils/browser/Cache.js.map +1 -1
  402. package/lib/utils/browser/Cookies.js.map +1 -1
  403. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  404. package/lib/utils/fetch/serverFetch.js.map +1 -1
  405. package/lib/utils/fetch/universalFetch.js.map +1 -1
  406. package/lib/utils/fetch/xhr.js.map +1 -1
  407. package/lib/utils/helpers/checkResource.js.map +1 -1
  408. package/lib/utils/helpers/createHash.js.map +1 -1
  409. package/lib/utils/helpers/createUUID.js.map +1 -1
  410. package/lib/utils/helpers/repositoryResource.js.map +1 -1
  411. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  412. package/lib/utils/number/DecimalFormat.js +4 -8
  413. package/lib/utils/number/DecimalFormat.js.map +1 -1
  414. package/lib/utils/number/formatValue.js.map +1 -1
  415. package/lib/utils/number/parseNumbers.js.map +1 -1
  416. package/package.json +32 -32
  417. package/src/hooks/useForm.js +2 -1
  418. package/src/models/attributes/BooleanAttributeModel.js +1 -1
  419. package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +14 -0
  420. package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
  421. package/src/models/form/FormModel.js +32 -4
  422. package/src/models/form/__tests__/FormModel.spec.js +4 -0
  423. package/src/models/layouthint/LayoutHintCollection.js +4 -4
  424. package/src/models/sorting/SortingModel.js +1 -1
  425. package/types/constants/Constants.d.ts +145 -145
  426. package/types/constants/LayoutHintConfig.d.ts +226 -226
  427. package/types/constants/LayoutHints.d.ts +74 -74
  428. package/types/constants/Settings.d.ts +29 -29
  429. package/types/constants/index.d.ts +3 -3
  430. package/types/exceptions/ConfigurationException.d.ts +6 -6
  431. package/types/exceptions/FetchException.d.ts +31 -31
  432. package/types/exceptions/IllegalArgumentException.d.ts +6 -6
  433. package/types/exceptions/IllegalReturnException.d.ts +5 -5
  434. package/types/exceptions/IllegalStateException.d.ts +6 -6
  435. package/types/exceptions/JsonParseException.d.ts +6 -6
  436. package/types/exceptions/MissingPropertyException.d.ts +6 -6
  437. package/types/exceptions/NetworkException.d.ts +9 -9
  438. package/types/exceptions/NotAllowedUriException.d.ts +6 -6
  439. package/types/exceptions/NotFoundException.d.ts +10 -10
  440. package/types/exceptions/ServerRequestException.d.ts +6 -6
  441. package/types/exceptions/ThemePropertyException.d.ts +6 -6
  442. package/types/exceptions/TimeoutException.d.ts +7 -7
  443. package/types/exceptions/UnauthorizedException.d.ts +11 -11
  444. package/types/exceptions/UnsupportedOperationException.d.ts +6 -6
  445. package/types/exceptions/index.d.ts +15 -15
  446. package/types/hooks/useI18n.d.ts +9 -9
  447. package/types/i18n/Locale.d.ts +53 -53
  448. package/types/i18n/Locales.d.ts +55 -55
  449. package/types/i18n/Message.d.ts +6 -6
  450. package/types/i18n/index.d.ts +5 -5
  451. package/types/i18n/languages.d.ts +215 -215
  452. package/types/i18n/translations/beinformed_error_messages_en.nl.d.ts +97 -97
  453. package/types/i18n/translations/beinformed_error_messages_nl.nl.d.ts +97 -97
  454. package/types/i18n/types.d.ts +11 -11
  455. package/types/i18n/withMessage.d.ts +3 -3
  456. package/types/index.d.ts +6 -6
  457. package/types/models/actions/ActionCollection.d.ts +29 -29
  458. package/types/models/actions/ActionModel.d.ts +84 -84
  459. package/types/models/application/ApplicationModel.d.ts +41 -41
  460. package/types/models/attributes/AttributeCollection.d.ts +96 -96
  461. package/types/models/attributes/AttributeContent.d.ts +64 -64
  462. package/types/models/attributes/AttributeDataHelper.d.ts +67 -67
  463. package/types/models/attributes/AttributeModel.d.ts +395 -395
  464. package/types/models/attributes/AttributeSetModel.d.ts +28 -28
  465. package/types/models/attributes/BooleanAttributeModel.d.ts +65 -65
  466. package/types/models/attributes/CaptchaAttributeModel.d.ts +19 -19
  467. package/types/models/attributes/ChoiceAttributeModel.d.ts +76 -76
  468. package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +79 -79
  469. package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +133 -133
  470. package/types/models/attributes/CompositeAttributeChildCollection.d.ts +56 -56
  471. package/types/models/attributes/CompositeAttributeModel.d.ts +44 -44
  472. package/types/models/attributes/DatetimeAttributeModel.d.ts +117 -117
  473. package/types/models/attributes/HelptextAttributeModel.d.ts +16 -16
  474. package/types/models/attributes/LabelAttributeModel.d.ts +12 -12
  475. package/types/models/attributes/MemoAttributeModel.d.ts +14 -14
  476. package/types/models/attributes/MoneyAttributeModel.d.ts +14 -14
  477. package/types/models/attributes/NumberAttributeModel.d.ts +49 -49
  478. package/types/models/attributes/PasswordAttributeModel.d.ts +62 -62
  479. package/types/models/attributes/StringAttributeModel.d.ts +62 -62
  480. package/types/models/attributes/UploadAttributeModel.d.ts +60 -60
  481. package/types/models/attributes/XMLAttributeModel.d.ts +10 -10
  482. package/types/models/attributes/_createAttribute.d.ts +6 -6
  483. package/types/models/attributes/input-constraints/BSNConstraint.d.ts +26 -26
  484. package/types/models/attributes/input-constraints/ConstraintCollection.d.ts +24 -24
  485. package/types/models/attributes/input-constraints/ConstraintModel.d.ts +34 -34
  486. package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +109 -109
  487. package/types/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +36 -36
  488. package/types/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +36 -36
  489. package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +92 -92
  490. package/types/models/attributes/input-constraints/FileExtensionConstraint.d.ts +33 -33
  491. package/types/models/attributes/input-constraints/FileSizeConstraint.d.ts +42 -42
  492. package/types/models/attributes/input-constraints/IBANConstraint.d.ts +23 -23
  493. package/types/models/attributes/input-constraints/MandatoryConstraint.d.ts +23 -23
  494. package/types/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +36 -36
  495. package/types/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +61 -61
  496. package/types/models/attributes/input-constraints/NumberFormatConstraint.d.ts +52 -52
  497. package/types/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +46 -46
  498. package/types/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +36 -36
  499. package/types/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +23 -23
  500. package/types/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +32 -32
  501. package/types/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +32 -32
  502. package/types/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +35 -35
  503. package/types/models/attributes/input-constraints/RangeConstraint.d.ts +97 -97
  504. package/types/models/attributes/input-constraints/RegexConstraint.d.ts +37 -37
  505. package/types/models/attributes/input-constraints/StringLengthConstraint.d.ts +46 -46
  506. package/types/models/attributes/input-constraints/XMLConstraint.d.ts +26 -26
  507. package/types/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +46 -46
  508. package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +57 -57
  509. package/types/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +27 -27
  510. package/types/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +17 -17
  511. package/types/models/base/BaseCollection.d.ts +89 -89
  512. package/types/models/base/BaseModel.d.ts +67 -67
  513. package/types/models/base/ResourceCollection.d.ts +19 -19
  514. package/types/models/base/ResourceModel.d.ts +97 -97
  515. package/types/models/caseview/CaseViewModel.d.ts +45 -45
  516. package/types/models/concepts/BusinessScenarioModel.d.ts +20 -20
  517. package/types/models/concepts/ConceptDetailModel.d.ts +69 -69
  518. package/types/models/concepts/ConceptIndexModel.d.ts +36 -36
  519. package/types/models/concepts/ConceptLinkModel.d.ts +65 -65
  520. package/types/models/concepts/ConceptRelationCollection.d.ts +34 -34
  521. package/types/models/concepts/ConceptRelationModel.d.ts +44 -44
  522. package/types/models/concepts/ConceptTypeDetailModel.d.ts +39 -39
  523. package/types/models/concepts/SourceReferenceCollection.d.ts +13 -13
  524. package/types/models/concepts/SourceReferenceModel.d.ts +30 -30
  525. package/types/models/content/ContentIndexModel.d.ts +34 -34
  526. package/types/models/content/ContentLinkModel.d.ts +81 -81
  527. package/types/models/content/ContentModel.d.ts +74 -74
  528. package/types/models/content/ContentTOCModel.d.ts +37 -37
  529. package/types/models/content/ContentTypeModel.d.ts +26 -26
  530. package/types/models/content/SectionModel.d.ts +75 -75
  531. package/types/models/content/SubSectionModel.d.ts +64 -64
  532. package/types/models/contentconfiguration/ContentConfiguration.d.ts +28 -28
  533. package/types/models/contentconfiguration/ContentConfigurationElements.d.ts +47 -47
  534. package/types/models/contentconfiguration/ContentConfigurationEndResults.d.ts +16 -16
  535. package/types/models/contentconfiguration/ContentConfigurationQuestions.d.ts +22 -22
  536. package/types/models/contentconfiguration/ContentConfigurationResults.d.ts +39 -39
  537. package/types/models/detail/DetailModel.d.ts +72 -72
  538. package/types/models/error/ErrorCollection.d.ts +51 -51
  539. package/types/models/error/ErrorModel.d.ts +41 -41
  540. package/types/models/error/ErrorResponse.d.ts +148 -148
  541. package/types/models/filters/AssignmentFilterModel.d.ts +35 -35
  542. package/types/models/filters/BaseFilterModel.d.ts +85 -85
  543. package/types/models/filters/ConceptIndexFilterModel.d.ts +6 -6
  544. package/types/models/filters/FilterCollection.d.ts +48 -48
  545. package/types/models/filters/FilterModel.d.ts +5 -5
  546. package/types/models/filters/RangeFilterModel.d.ts +6 -6
  547. package/types/models/form/FormModel.d.ts +343 -320
  548. package/types/models/form/FormObjectModel.d.ts +196 -196
  549. package/types/models/grouping/GroupingModel.d.ts +85 -85
  550. package/types/models/href/Href.d.ts +196 -196
  551. package/types/models/href/ListHref.d.ts +64 -64
  552. package/types/models/index.d.ts +95 -94
  553. package/types/models/layouthint/LayoutHintCollection.d.ts +43 -43
  554. package/types/models/links/LinkCollection.d.ts +62 -62
  555. package/types/models/links/LinkModel.d.ts +92 -92
  556. package/types/models/links/normalizeLinkJSON.d.ts +9 -9
  557. package/types/models/list/ListDetailModel.d.ts +69 -69
  558. package/types/models/list/ListHeaderModel.d.ts +64 -64
  559. package/types/models/list/ListItemCollection.d.ts +21 -21
  560. package/types/models/list/ListItemModel.d.ts +34 -34
  561. package/types/models/list/ListModel.d.ts +135 -135
  562. package/types/models/lookup/LookupOptionCollection.d.ts +11 -11
  563. package/types/models/lookup/LookupOptionsModel.d.ts +19 -19
  564. package/types/models/modelcatalog/ModelCatalogModel.d.ts +18 -18
  565. package/types/models/paging/PagesizeModel.d.ts +25 -25
  566. package/types/models/paging/PagingModel.d.ts +49 -49
  567. package/types/models/panels/GroupingPanelModel.d.ts +39 -39
  568. package/types/models/parameter/Parameter.d.ts +40 -40
  569. package/types/models/process/ProcessStatusSettingsModel.d.ts +38 -38
  570. package/types/models/resolveModel.d.ts +7 -7
  571. package/types/models/search/CaseSearchModel.d.ts +14 -14
  572. package/types/models/sorting/SortOptionModel.d.ts +48 -48
  573. package/types/models/sorting/SortingModel.d.ts +42 -42
  574. package/types/models/tab/TabModel.d.ts +44 -44
  575. package/types/models/taskgroup/TaskGroupCollection.d.ts +12 -12
  576. package/types/models/taskgroup/TaskGroupModel.d.ts +15 -15
  577. package/types/models/types.d.ts +161 -161
  578. package/types/models/user/UserModel.d.ts +14 -14
  579. package/types/models/user/UserProfileModel.d.ts +12 -12
  580. package/types/models/user/UserServicesModel.d.ts +28 -28
  581. package/types/modularui/Authenticate.d.ts +49 -49
  582. package/types/modularui/CaptchaRequest.d.ts +45 -45
  583. package/types/modularui/ModularUIError.d.ts +10 -10
  584. package/types/modularui/ModularUIRequest.d.ts +198 -198
  585. package/types/modularui/ModularUIResponse.d.ts +56 -56
  586. package/types/modularui/UploadRequest.d.ts +35 -35
  587. package/types/modularui/index.d.ts +5 -5
  588. package/types/modularui/types.d.ts +2 -2
  589. package/types/redux/_i18n/types.d.ts +13 -13
  590. package/types/redux/_modularui/types.d.ts +61 -61
  591. package/types/redux/_router/types.d.ts +35 -35
  592. package/types/redux/selectors/i18n.d.ts +4 -4
  593. package/types/redux/types.d.ts +105 -105
  594. package/types/utils/browser/Cache.d.ts +45 -45
  595. package/types/utils/browser/Cookies.d.ts +9 -9
  596. package/types/utils/datetime/DateTimeUtil.d.ts +164 -164
  597. package/types/utils/fetch/serverFetch.d.ts +5 -5
  598. package/types/utils/fetch/types.d.ts +40 -40
  599. package/types/utils/fetch/universalFetch.d.ts +7 -7
  600. package/types/utils/fetch/xhr.d.ts +5 -5
  601. package/types/utils/helpers/checkResource.d.ts +3 -3
  602. package/types/utils/helpers/createHash.d.ts +8 -8
  603. package/types/utils/helpers/createUUID.d.ts +4 -4
  604. package/types/utils/helpers/index.d.ts +7 -7
  605. package/types/utils/helpers/objects.d.ts +11 -11
  606. package/types/utils/helpers/repositoryResource.d.ts +1 -1
  607. package/types/utils/helpers/sanitizeHtml.d.ts +9 -9
  608. package/types/utils/helpers/text.d.ts +7 -7
  609. package/types/utils/index.d.ts +11 -11
  610. package/types/utils/number/DecimalFormat.d.ts +90 -90
  611. package/types/utils/number/formatValue.d.ts +4 -4
  612. package/types/utils/number/parseNumbers.d.ts +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUISelectors.js","names":["_reselect","require","_objects","_Href","_interopRequireDefault","_ContentModel","_ContentTOCModel","_ApplicationModel","_TabModel","_CaseViewModel","_FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_map","default","_filter","_keys","call","key","model","exports","getFirstModelByInstance","_context3","_find","getActiveModelByInstance","location","getLocation","_context4","_startsWith","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","_context5","findHref","Href","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","has","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","createSelectorCreator","defaultMemoize","value","other","_stringify","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType","_context8","_context9"],"sources":["../../../src/redux/_modularui/ModularUISelectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (\n state: ReduxState,\n href: Href | string\n): Array<string> => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return [];\n};\n\n/**\n */\nconst getLocation = (state: ReduxState): string =>\n state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state: ReduxState) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other)\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\"\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath)\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,SAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,cAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,UAAA,GAAAN,sBAAA,CAAAH,OAAA;AAKA;AACA;AACO,MAAMU,sBAAsB,GAAGA,CACpCC,KAAiB,EACjBC,QAAkB,KACQ;EAC1B,MAAMC,MAAM,GAAGF,KAAK,EAAEG,IAAI,EAAED,MAAM,IAAI,IAAI;EAC1C,MAAME,SAAS,GAAGJ,KAAK,EAAEI,SAAS;EAElC,IAAIA,SAAS,EAAE;IAAA,IAAAC,QAAA,EAAAC,SAAA;IACb,OAAO,IAAAC,IAAA,CAAAC,OAAA,EAAAH,QAAA,OAAAI,OAAA,CAAAD,OAAA,EAAAF,SAAA,OAAAI,KAAA,CAAAF,OAAA,EAAYJ,SAAS,CAAC,EAAAO,IAAA,CAAAL,SAAA,EAClBM,GAAG,IAAK;MACf,MAAM;QAAEC;MAAM,CAAC,GAAGT,SAAS,CAACQ,GAAG,CAAC;MAChC,OAAOC,KAAK,YAAYZ,QAAQ,IAAIY,KAAK,CAACX,MAAM,KAAKA,MAAM;IAC7D,CAAC,CAAC,EAAAS,IAAA,CAAAN,QAAA,EACIO,GAAG,IAAKR,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EACvC;EAEA,OAAO,EAAE;AACX,CAAC;;AAED;AACA;AADA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AAxE,OAAA,CAAAD,OAAA,EAAA0E,SAAA,OAAAxE,KAAA,CAAAF,OAAA,EAAYR,KAAK,CAACI,SAAS,CAAC,EAAAO,IAAA,CAAAuE,SAAA,EAE9BtE,GAAG,IACFZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,IACpBZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,IAC1Bb,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAACwC,IAAI,KAAKA,IAAI,CAC3C,EAAA1C,IAAA,CAAAsE,SAAA,EACKrE,GAAG,IAAKZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"ModularUISelectors.js","names":["_reselect","require","_objects","_Href","_interopRequireDefault","_ContentModel","_ContentTOCModel","_ApplicationModel","_TabModel","_CaseViewModel","_FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_map","default","_filter","_keys","call","key","model","exports","getFirstModelByInstance","_context3","_find","getActiveModelByInstance","location","getLocation","_context4","_startsWith","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","_context5","findHref","Href","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","has","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","createSelectorCreator","defaultMemoize","value","other","_stringify","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType","_context8","_context9"],"sources":["../../../src/redux/_modularui/ModularUISelectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (\n state: ReduxState,\n href: Href | string\n): Array<string> => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return [];\n};\n\n/**\n */\nconst getLocation = (state: ReduxState): string =>\n state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state: ReduxState) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other)\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\"\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath)\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH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AACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAACwC,IAAI,KAAKA,IACxC,CAAC,EAAA1C,IAAA,CAAAsE,SAAA,EACKrE,GAAG,IAAKZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIUtils.js","names":["_react","require","_utils","_Constants","_Href","_interopRequireDefault","getUrl","resource","props","url","Href","toString","useUrl","previousUrl","setPreviousUrl","useState","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","_startsWith","default","call","isExact","exports","getKey","WrappedComponent","name","getDisplayName","split","useReload","modelEntry","reload","arguments","length","undefined","isFullyLoaded","status","MODULARUI_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,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAIA;AACA;AACA;AACA,MAAMK,MAAM,GAAGA,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYC,aAAI,EAAE;IACvB,OAAOD,GAAG,CAACE,QAAQ,EAAE;EACvB;EAEA,OAAOF,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACO,MAAMG,MAAM,GAAGA,CAACL,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EAClD,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAF,eAAQ,EAAC,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AAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAC9D,IAAID,MAAM,GAAG,CAAC,EAAE;IACd,MAAMI,aAAa,GAAGL,UAAU,EAAEM,MAAM,KAAKC,2BAAgB,CAACC,QAAQ;IACtE,MAAMC,gBAAgB,GAAGT,UAAU,EAAES,gBAAgB,IAAI,CAAC;IAE1D,IAAIJ,aAAa,IAAII,gBAAgB,GAAGR,MAAM,EAAE;MAC9C,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd,CAAC;AAACR,OAAA,CAAAM,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"ModularUIUtils.js","names":["_react","require","_utils","_Constants","_Href","_interopRequireDefault","getUrl","resource","props","url","Href","toString","useUrl","previousUrl","setPreviousUrl","useState","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","_startsWith","default","call","isExact","exports","getKey","WrappedComponent","name","getDisplayName","split","useReload","modelEntry","reload","arguments","length","undefined","isFullyLoaded","status","MODULARUI_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,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAIA;AACA;AACA;AACA,MAAMK,MAAM,GAAGA,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYC,aAAI,EAAE;IACvB,OAAOD,GAAG,CAACE,QAAQ,CAAC,CAAC;EACvB;EAEA,OAAOF,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACO,MAAMG,MAAM,GAAGA,CAACL,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,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AA,MAAA;AAGO,MAAMK,SAAS,GAAG,SAAAA,CAACC,UAAkB,EAAkC;EAAA,IAAhCC,MAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAC9D,IAAID,MAAM,GAAG,CAAC,EAAE;IACd,MAAMI,aAAa,GAAGL,UAAU,EAAEM,MAAM,KAAKC,2BAAgB,CAACC,QAAQ;IACtE,MAAMC,gBAAgB,GAAGT,UAAU,EAAES,gBAAgB,IAAI,CAAC;IAE1D,IAAIJ,aAAa,IAAII,gBAAgB,GAAGR,MAAM,EAAE;MAC9C,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd,CAAC;AAACR,OAAA,CAAAM,SAAA,GAAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"withModularUI.js","names":["_reactRedux","require","_reselect","_ModularUIRequest","_interopRequireDefault","_ProgressIndicator","_Error","_i18n","_ModularUIActions","modularui","createSelector","getLocale","localeCode","href","options","arguments","length","undefined","modularuiRequest","ModularUIRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui","connect","_default","exports","default"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { getLocale } from \"../selectors/i18n\";\n\nimport { reloadModel } from \"./ModularUIActions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestModularUIOptions\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst modularui = createSelector(\n [getLocale],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n }\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAkCA,MAAMQ,SAAS,GAAG,IAAAC,wBAAc,EAC9B,CAACC,eAAS,CAAC,EACVC,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjB,MAAMG,gBAAgB,GAAG,IAAIC,yBAAgB,CAACN,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACE,MAAM,GAAGR,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CAAC,CACJ;;AAED;AACA;AACA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1Db,SAAS,EAAEA,SAAS,CAACa,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCAAa;EACbC,cAAc,EAAdA,iCAAc;EACdC,WAAW,EAAXA,6BAAW;EACXC,WAAW,EAAXA;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAiC,GAAG,IAAAC,mBAAO,EAO/CT,eAAe,EAAEG,kBAAkB,CAAC;AAAC,IAAAO,QAAA,GAExBF,aAAa;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"withModularUI.js","names":["_reactRedux","require","_reselect","_ModularUIRequest","_interopRequireDefault","_ProgressIndicator","_Error","_i18n","_ModularUIActions","modularui","createSelector","getLocale","localeCode","href","options","arguments","length","undefined","modularuiRequest","ModularUIRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui","connect","_default","exports","default"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { getLocale } from \"../selectors/i18n\";\n\nimport { reloadModel } from \"./ModularUIActions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestModularUIOptions\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst modularui = createSelector(\n [getLocale],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n }\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAkCA,MAAMQ,SAAS,GAAG,IAAAC,wBAAc,EAC9B,CAACC,eAAS,CAAC,EACVC,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjB,MAAMG,gBAAgB,GAAG,IAAIC,yBAAgB,CAACN,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACE,MAAM,GAAGR,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CACJ,CAAC;;AAED;AACA;AACA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1Db,SAAS,EAAEA,SAAS,CAACa,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCAAa;EACbC,cAAc,EAAdA,iCAAc;EACdC,WAAW,EAAXA,6BAAW;EACXC,WAAW,EAAXA;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAiC,GAAG,IAAAC,mBAAO,EAO/CT,eAAe,EAAEG,kBAAkB,CAAC;AAAC,IAAAO,QAAA,GAExBF,aAAa;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","connect","state","locationKey","router","location","key","exports","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/RouterConnectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./RouterActions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n })\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AA6BA;AACA;AACA,MAAME,OAA2B,GAAG,IAAAC,mBAAO,EACxCC,KAAiB,KAAM;EACtBC,WAAW,EAAED,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEC,GAAG,IAAI;AAC7C,CAAC,CAAC,CACH;;AAED;AACA;AADAC,OAAA,CAAAP,OAAA,GAAAA,OAAA;AAEA,MAAMQ,YAAgC,GAAG,IAAAP,mBAAO,EAO7CC,KAAiB,KAAM;EACxBO,QAAQ,EAAEP,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEI;AACnC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAF,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEA,MAAME,YAAgC,GAAG,IAAAT,mBAAO,EAO7CC,KAAiB,KAAM;EACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAM,CAACC;AACzB,CAAC,CAAC,CAAC;;AAEH;AACA;AADAE,OAAA,CAAAG,YAAA,GAAAA,YAAA;AAEA,MAAMC,eAAmC,GAAG,IAAAV,mBAAO,EAOhDC,KAAiB,KAAM;EACxBU,WAAW,EAAEV,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEQ;AACtC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAN,OAAA,CAAAI,eAAA,GAAAA,eAAA;AAEA,MAAMG,cAAkC,GAAG,IAAAb,mBAAO,EAOhD,IAAI,EAAE;EACNc,IAAI,EAAJA,mBAAI;EACJC,OAAO,EAAPA,sBAAO;EACPC,EAAE,EAAFA,iBAAE;EACFC,MAAM,EAANA,qBAAM;EACNC,SAAS,EAATA;AACF,CAAC,CAAC;AAACZ,OAAA,CAAAO,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","connect","state","locationKey","router","location","key","exports","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/RouterConnectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./RouterActions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n })\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AA6BA;AACA;AACA,MAAME,OAA2B,GAAG,IAAAC,mBAAO,EACxCC,KAAiB,KAAM;EACtBC,WAAW,EAAED,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEC,GAAG,IAAI;AAC7C,CAAC,CACH,CAAC;;AAED;AACA;AADAC,OAAA,CAAAP,OAAA,GAAAA,OAAA;AAEA,MAAMQ,YAAgC,GAAG,IAAAP,mBAAO,EAO7CC,KAAiB,KAAM;EACxBO,QAAQ,EAAEP,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEI;AACnC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAF,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEA,MAAME,YAAgC,GAAG,IAAAT,mBAAO,EAO7CC,KAAiB,KAAM;EACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAM,CAACC;AACzB,CAAC,CAAC,CAAC;;AAEH;AACA;AADAE,OAAA,CAAAG,YAAA,GAAAA,YAAA;AAEA,MAAMC,eAAmC,GAAG,IAAAV,mBAAO,EAOhDC,KAAiB,KAAM;EACxBU,WAAW,EAAEV,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEQ;AACtC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAN,OAAA,CAAAI,eAAA,GAAAA,eAAA;AAEA,MAAMG,cAAkC,GAAG,IAAAb,mBAAO,EAOhD,IAAI,EAAE;EACNc,IAAI,EAAJA,mBAAI;EACJC,OAAO,EAAPA,sBAAO;EACPC,EAAE,EAAFA,iBAAE;EACFC,MAAM,EAANA,qBAAM;EACNC,SAAS,EAATA;AACF,CAAC,CAAC;AAACZ,OAAA,CAAAO,cAAA,GAAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"RouterMiddleware.js","names":["routerMiddleware","history","next","action","type","location","state","payload","push","replace","delta","go","goBack","goForward","exports"],"sources":["../../../src/redux/_router/RouterMiddleware.js"],"sourcesContent":["// @flow\nimport type { RouterHistory } from \"react-router\";\nimport type { Middleware } from \"redux\";\nimport type {\n ReduxAction,\n ReduxState,\n Dispatch,\n PossibleAction,\n} from \"../types\";\n\n/**\n */\nexport const routerMiddleware =\n (history: RouterHistory): Middleware<ReduxState, ReduxAction, Dispatch> =>\n () =>\n (next: Dispatch) =>\n (action: PossibleAction) => {\n if (action.type === \"ROUTER/PUSH\") {\n // $FlowExpectedError[prop-missing]\n const { location, state } = action.payload;\n history.push(location, state);\n } else if (action.type === \"ROUTER/REPLACE\") {\n // $FlowExpectedError[prop-missing]\n const { location, state } = action.payload;\n history.replace(location, state);\n } else if (action.type === \"ROUTER/GO\") {\n // $FlowExpectedError[prop-missing]\n const { delta } = action.payload;\n history.go(delta);\n } else if (action.type === \"ROUTER/GOBACK\") {\n history.goBack();\n } else if (action.type === \"ROUTER/GOFORWARD\") {\n history.goForward();\n }\n\n return next(action);\n };\n"],"mappings":";;;;;;AAUA;AACA;AACO,MAAMA,gBAAgB,GAC1BC,OAAsB,IACvB,MACCC,IAAc,IACdC,MAAsB,IAAK;EAC1B,IAAIA,MAAM,CAACC,IAAI,KAAK,aAAa,EAAE;IACjC;IACA,MAAM;MAAEC,QAAQ;MAAEC;IAAM,CAAC,GAAGH,MAAM,CAACI,OAAO;IAC1CN,OAAO,CAACO,IAAI,CAACH,QAAQ,EAAEC,KAAK,CAAC;EAC/B,CAAC,MAAM,IAAIH,MAAM,CAACC,IAAI,KAAK,gBAAgB,EAAE;IAC3C;IACA,MAAM;MAAEC,QAAQ;MAAEC;IAAM,CAAC,GAAGH,MAAM,CAACI,OAAO;IAC1CN,OAAO,CAACQ,OAAO,CAACJ,QAAQ,EAAEC,KAAK,CAAC;EAClC,CAAC,MAAM,IAAIH,MAAM,CAACC,IAAI,KAAK,WAAW,EAAE;IACtC;IACA,MAAM;MAAEM;IAAM,CAAC,GAAGP,MAAM,CAACI,OAAO;IAChCN,OAAO,CAACU,EAAE,CAACD,KAAK,CAAC;EACnB,CAAC,MAAM,IAAIP,MAAM,CAACC,IAAI,KAAK,eAAe,EAAE;IAC1CH,OAAO,CAACW,MAAM,EAAE;EAClB,CAAC,MAAM,IAAIT,MAAM,CAACC,IAAI,KAAK,kBAAkB,EAAE;IAC7CH,OAAO,CAACY,SAAS,EAAE;EACrB;EAEA,OAAOX,IAAI,CAACC,MAAM,CAAC;AACrB,CAAC;AAACW,OAAA,CAAAd,gBAAA,GAAAA,gBAAA"}
1
+ {"version":3,"file":"RouterMiddleware.js","names":["routerMiddleware","history","next","action","type","location","state","payload","push","replace","delta","go","goBack","goForward","exports"],"sources":["../../../src/redux/_router/RouterMiddleware.js"],"sourcesContent":["// @flow\nimport type { RouterHistory } from \"react-router\";\nimport type { Middleware } from \"redux\";\nimport type {\n ReduxAction,\n ReduxState,\n Dispatch,\n PossibleAction,\n} from \"../types\";\n\n/**\n */\nexport const routerMiddleware =\n (history: RouterHistory): Middleware<ReduxState, ReduxAction, Dispatch> =>\n () =>\n (next: Dispatch) =>\n (action: PossibleAction) => {\n if (action.type === \"ROUTER/PUSH\") {\n // $FlowExpectedError[prop-missing]\n const { location, state } = action.payload;\n history.push(location, state);\n } else if (action.type === \"ROUTER/REPLACE\") {\n // $FlowExpectedError[prop-missing]\n const { location, state } = action.payload;\n history.replace(location, state);\n } else if (action.type === \"ROUTER/GO\") {\n // $FlowExpectedError[prop-missing]\n const { delta } = action.payload;\n history.go(delta);\n } else if (action.type === \"ROUTER/GOBACK\") {\n history.goBack();\n } else if (action.type === \"ROUTER/GOFORWARD\") {\n history.goForward();\n }\n\n return next(action);\n };\n"],"mappings":";;;;;;AAUA;AACA;AACO,MAAMA,gBAAgB,GAC1BC,OAAsB,IACvB,MACCC,IAAc,IACdC,MAAsB,IAAK;EAC1B,IAAIA,MAAM,CAACC,IAAI,KAAK,aAAa,EAAE;IACjC;IACA,MAAM;MAAEC,QAAQ;MAAEC;IAAM,CAAC,GAAGH,MAAM,CAACI,OAAO;IAC1CN,OAAO,CAACO,IAAI,CAACH,QAAQ,EAAEC,KAAK,CAAC;EAC/B,CAAC,MAAM,IAAIH,MAAM,CAACC,IAAI,KAAK,gBAAgB,EAAE;IAC3C;IACA,MAAM;MAAEC,QAAQ;MAAEC;IAAM,CAAC,GAAGH,MAAM,CAACI,OAAO;IAC1CN,OAAO,CAACQ,OAAO,CAACJ,QAAQ,EAAEC,KAAK,CAAC;EAClC,CAAC,MAAM,IAAIH,MAAM,CAACC,IAAI,KAAK,WAAW,EAAE;IACtC;IACA,MAAM;MAAEM;IAAM,CAAC,GAAGP,MAAM,CAACI,OAAO;IAChCN,OAAO,CAACU,EAAE,CAACD,KAAK,CAAC;EACnB,CAAC,MAAM,IAAIP,MAAM,CAACC,IAAI,KAAK,eAAe,EAAE;IAC1CH,OAAO,CAACW,MAAM,CAAC,CAAC;EAClB,CAAC,MAAM,IAAIT,MAAM,CAACC,IAAI,KAAK,kBAAkB,EAAE;IAC7CH,OAAO,CAACY,SAAS,CAAC,CAAC;EACrB;EAEA,OAAOX,IAAI,CAACC,MAAM,CAAC;AACrB,CAAC;AAACW,OAAA,CAAAd,gBAAA,GAAAA,gBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","names":["_ModularUIActions","require","_ModularUISelectors","_models","_i18n","reloadApplication","dispatch","getState","allKeys","allKeysByHref","key","removeModelByKey","modelKey","getLocale","loadModularUI","Href","targetModel","ApplicationModel","exports"],"sources":["../../../src/redux/actions/Application.js"],"sourcesContent":["// @flow\nimport {\n loadModularUI,\n removeModelByKey,\n} from \"../_modularui/ModularUIActions\";\nimport { allKeysByHref } from \"../_modularui/ModularUISelectors\";\nimport { ApplicationModel, Href } from \"../../models\";\nimport { getLocale } from \"../selectors/i18n\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\n\n/**\n */\nexport const reloadApplication =\n (): ThunkAction => (dispatch: Dispatch, getState: GetState) => {\n const allKeys = allKeysByHref(getState(), \"/\");\n for (const key of allKeys) {\n dispatch(removeModelByKey(key));\n }\n\n const modelKey = `application(/)(${getLocale(getState())})`;\n return dispatch(\n loadModularUI(modelKey, new Href(\"/\", \"Application\"), {\n targetModel: ApplicationModel,\n })\n );\n };\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAIA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAIA;AACA;AACO,MAAMI,iBAAiB,GAC5BA,CAAA,KAAmB,CAACC,QAAkB,EAAEC,QAAkB,KAAK;EAC7D,MAAMC,OAAO,GAAG,IAAAC,iCAAa,EAACF,QAAQ,EAAE,EAAE,GAAG,CAAC;EAC9C,KAAK,MAAMG,GAAG,IAAIF,OAAO,EAAE;IACzBF,QAAQ,CAAC,IAAAK,kCAAgB,EAACD,GAAG,CAAC,CAAC;EACjC;EAEA,MAAME,QAAQ,GAAI,kBAAiB,IAAAC,eAAS,EAACN,QAAQ,EAAE,CAAE,GAAE;EAC3D,OAAOD,QAAQ,CACb,IAAAQ,+BAAa,EAACF,QAAQ,EAAE,IAAIG,YAAI,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE;IACpDC,WAAW,EAAEC;EACf,CAAC,CAAC,CACH;AACH,CAAC;AAACC,OAAA,CAAAb,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"Application.js","names":["_ModularUIActions","require","_ModularUISelectors","_models","_i18n","reloadApplication","dispatch","getState","allKeys","allKeysByHref","key","removeModelByKey","modelKey","getLocale","loadModularUI","Href","targetModel","ApplicationModel","exports"],"sources":["../../../src/redux/actions/Application.js"],"sourcesContent":["// @flow\nimport {\n loadModularUI,\n removeModelByKey,\n} from \"../_modularui/ModularUIActions\";\nimport { allKeysByHref } from \"../_modularui/ModularUISelectors\";\nimport { ApplicationModel, Href } from \"../../models\";\nimport { getLocale } from \"../selectors/i18n\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\n\n/**\n */\nexport const reloadApplication =\n (): ThunkAction => (dispatch: Dispatch, getState: GetState) => {\n const allKeys = allKeysByHref(getState(), \"/\");\n for (const key of allKeys) {\n dispatch(removeModelByKey(key));\n }\n\n const modelKey = `application(/)(${getLocale(getState())})`;\n return dispatch(\n loadModularUI(modelKey, new Href(\"/\", \"Application\"), {\n targetModel: ApplicationModel,\n })\n );\n };\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAIA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAIA;AACA;AACO,MAAMI,iBAAiB,GAC5BA,CAAA,KAAmB,CAACC,QAAkB,EAAEC,QAAkB,KAAK;EAC7D,MAAMC,OAAO,GAAG,IAAAC,iCAAa,EAACF,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;EAC9C,KAAK,MAAMG,GAAG,IAAIF,OAAO,EAAE;IACzBF,QAAQ,CAAC,IAAAK,kCAAgB,EAACD,GAAG,CAAC,CAAC;EACjC;EAEA,MAAME,QAAQ,GAAI,kBAAiB,IAAAC,eAAS,EAACN,QAAQ,CAAC,CAAC,CAAE,GAAE;EAC3D,OAAOD,QAAQ,CACb,IAAAQ,+BAAa,EAACF,QAAQ,EAAE,IAAIG,YAAI,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE;IACpDC,WAAW,EAAEC;EACf,CAAC,CACH,CAAC;AACH,CAAC;AAACC,OAAA,CAAAb,iBAAA,GAAAA,iBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Authorization.js","names":["_ErrorResponse","_interopRequireDefault","require","_RouterActions","_SignOut","_Cache","_ModularUIActions","_ModularUISelectors","_Application","_constants","_SignIn","handleUnauthorized","errorResponse","dispatch","getState","connectKey","removeModelByKey","getSetting","response","error","window","location","reload","application","getApplication","Cache","getItem","isLoggedIn","reloadApplication","logoutSuccess","removeItem","isInvalidUsername","sendAuthenticationError","message","router","LOGIN_PATH","pathname","locationFrom","state","from","replace","modal","type","exports"],"sources":["../../../src/redux/actions/Authorization.js"],"sourcesContent":["// @flow\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { replace } from \"../_router/RouterActions\";\nimport { logoutSuccess } from \"./SignOut\";\n\nimport Cache from \"../../utils/browser/Cache\";\n\nimport { removeModelByKey } from \"../_modularui/ModularUIActions\";\nimport { getApplication } from \"../_modularui/ModularUISelectors\";\nimport { reloadApplication } from \"./Application\";\n\nimport { getSetting } from \"../../constants\";\n\nimport type { ThunkAction } from \"../types\";\nimport { sendAuthenticationError } from \"./SignIn\";\n\n/**\n */\nexport const handleUnauthorized =\n (errorResponse: ErrorResponse): ThunkAction =>\n (dispatch, getState) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response?.error\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set or isLogged\n const application = getApplication(getState());\n if (Cache.getItem(\"auth\") || application?.isLoggedIn) {\n dispatch(reloadApplication());\n }\n\n // set logged out\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n dispatch(sendAuthenticationError(errorResponse.message));\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n const LOGIN_PATH = getSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n return dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n })\n );\n }\n\n return { type: \"NO_ACTION\" };\n };\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAEA,IAAAO,UAAA,GAAAP,OAAA;AAGA,IAAAQ,OAAA,GAAAR,OAAA;AAEA;AACA;AACO,MAAMS,kBAAkB,GAC5BC,aAA4B,IAC7B,CAACC,QAAQ,EAAEC,QAAQ,KAAK;EACtB,IAAIF,aAAa,CAACG,UAAU,EAAE;IAC5BF,QAAQ,CAAC,IAAAG,kCAAgB,EAACJ,aAAa,CAACG,UAAU,CAAC,CAAC;EACtD;EAEA,IACE,IAAAE,qBAAU,EAAC,mCAAmC,EAAE,KAAK,CAAC,IACtDL,aAAa,CAACM,QAAQ,EAAEC,KAAK,EAC7B;IACAC,MAAM,CAACC,QAAQ,CAACC,MAAM,EAAE;IACxB;EACF;;EAEA;EACA,MAAMC,WAAW,GAAG,IAAAC,kCAAc,EAACV,QAAQ,EAAE,CAAC;EAC9C,IAAIW,cAAK,CAACC,OAAO,CAAC,MAAM,CAAC,IAAIH,WAAW,EAAEI,UAAU,EAAE;IACpDd,QAAQ,CAAC,IAAAe,8BAAiB,GAAE,CAAC;EAC/B;;EAEA;EACAf,QAAQ,CAAC,IAAAgB,sBAAa,GAAE,CAAC;EAEzBJ,cAAK,CAACK,UAAU,CAAC,MAAM,CAAC;EAExB,IAAIlB,aAAa,CAACmB,iBAAiB,EAAE;IACnClB,QAAQ,CAAC,IAAAmB,+BAAuB,EAACpB,aAAa,CAACqB,OAAO,CAAC,CAAC;EAC1D;;EAEA;EACA,MAAMZ,QAAQ,GAAGP,QAAQ,EAAE,CAACoB,MAAM,CAACb,QAAQ;EAC3C,MAAMc,UAAU,GAAG,IAAAlB,qBAAU,EAAC,YAAY,EAAE,SAAS,CAAC;EACtD,IAAII,QAAQ,EAAEe,QAAQ,KAAKD,UAAU,EAAE;IACrC,MAAME,YAAY,GAAGhB,QAAQ,EAAEiB,KAAK,EAAEC,IAAI;IAC1C,OAAO1B,QAAQ,CACb,IAAA2B,sBAAO,EAACL,UAAU,EAAE;MAClBI,IAAI,EAAEF,YAAY,GAAGA,YAAY,GAAGvB,QAAQ,EAAE,CAACoB,MAAM,CAACb,QAAQ;MAC9D;MACAoB,KAAK,EAAE;IACT,CAAC,CAAC,CACH;EACH;EAEA,OAAO;IAAEC,IAAI,EAAE;EAAY,CAAC;AAC9B,CAAC;AAACC,OAAA,CAAAhC,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"Authorization.js","names":["_ErrorResponse","_interopRequireDefault","require","_RouterActions","_SignOut","_Cache","_ModularUIActions","_ModularUISelectors","_Application","_constants","_SignIn","handleUnauthorized","errorResponse","dispatch","getState","connectKey","removeModelByKey","getSetting","response","error","window","location","reload","application","getApplication","Cache","getItem","isLoggedIn","reloadApplication","logoutSuccess","removeItem","isInvalidUsername","sendAuthenticationError","message","router","LOGIN_PATH","pathname","locationFrom","state","from","replace","modal","type","exports"],"sources":["../../../src/redux/actions/Authorization.js"],"sourcesContent":["// @flow\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { replace } from \"../_router/RouterActions\";\nimport { logoutSuccess } from \"./SignOut\";\n\nimport Cache from \"../../utils/browser/Cache\";\n\nimport { removeModelByKey } from \"../_modularui/ModularUIActions\";\nimport { getApplication } from \"../_modularui/ModularUISelectors\";\nimport { reloadApplication } from \"./Application\";\n\nimport { getSetting } from \"../../constants\";\n\nimport type { ThunkAction } from \"../types\";\nimport { sendAuthenticationError } from \"./SignIn\";\n\n/**\n */\nexport const handleUnauthorized =\n (errorResponse: ErrorResponse): ThunkAction =>\n (dispatch, getState) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response?.error\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set or isLogged\n const application = getApplication(getState());\n if (Cache.getItem(\"auth\") || application?.isLoggedIn) {\n dispatch(reloadApplication());\n }\n\n // set logged out\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n dispatch(sendAuthenticationError(errorResponse.message));\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n const LOGIN_PATH = getSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n return dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n })\n );\n }\n\n return { type: \"NO_ACTION\" };\n };\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAA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,EAACL,UAAU,EAAE;MAClBI,IAAI,EAAEF,YAAY,GAAGA,YAAY,GAAGvB,QAAQ,CAAC,CAAC,CAACoB,MAAM,CAACb,QAAQ;MAC9D;MACAoB,KAAK,EAAE;IACT,CAAC,CACH,CAAC;EACH;EAEA,OAAO;IAAEC,IAAI,EAAE;EAAY,CAAC;AAC9B,CAAC;AAACC,OAAA,CAAAhC,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Error.js","names":["_Constants","require","_Settings","_ErrorResponse","_interopRequireDefault","_RouterActions","_Notification","_ProgressIndicator","_SignIn","_Authorization","saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","handleUnauthorized","isBlocked","isConcurrentUser","isInvalidUsername","LOGOUT_PATH","getSetting","push","isChangePassword","changePassword","IS_SERVER","setTimeout","showXHRErrorNotification","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","exports","handleError","resetProgress","ErrorResponse"],"sources":["../../../src/redux/actions/Error.js"],"sourcesContent":["// @flow\nimport { IS_SERVER } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { push } from \"../_router/RouterActions\";\nimport { showXHRErrorNotification } from \"./Notification\";\nimport { resetProgress } from \"./ProgressIndicator\";\nimport { changePassword } from \"./SignIn\";\nimport { handleUnauthorized } from \"./Authorization\";\n\nimport type { FetchException } from \"../../exceptions\";\nimport type { Dispatch, SaveErrorAction, ThunkAction } from \"../types\";\n\ntype DefaultErrorResponseHandler = (error: ErrorResponse) => ThunkAction;\ntype CustomErrorResponseHandler = (\n errorResponse: ErrorResponse,\n defaultHandler: DefaultErrorResponseHandler\n) => ThunkAction;\n\n/**\n */\nconst saveError = (error: ErrorResponse): SaveErrorAction => ({\n type: \"SAVE_ERROR\",\n payload: error,\n});\n\n/**\n */\nconst defaultErrorResponseHandler: DefaultErrorResponseHandler =\n (error: ErrorResponse): ThunkAction =>\n (dispatch: Dispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch({ type: \"NO_ACTION\" });\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n dispatch(push(LOGOUT_PATH));\n }\n\n if (error.isChangePassword) {\n return dispatch(changePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n setTimeout(() => {\n throw error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\n/**\n * Standard Custom error response, acts as a proxy and can be overwritten by {@link setCustomErrorResponseHandler}\n */\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (errorResponse, defaultHandler) => (dispatch: Dispatch) =>\n dispatch(defaultHandler(errorResponse));\n\n/**\n * Set a custom error response handler,\n * can be used when custom functionality is needed on certain (error) response\n * of the modular ui, for example when custom logic is needed when a user is unauthorized<br>\n * It receives an {@link ErrorResponse} and the {@link defaultErrorResponseHandler}\n */\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler\n) => {\n customErrorResponseHandler = handler;\n};\n\n/**\n * Handle errors by sending an error notification message\n */\nexport const handleError =\n (error: Error | FetchException): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(resetProgress());\n\n const errorResponse = new ErrorResponse(error);\n\n return dispatch(\n customErrorResponseHandler(errorResponse, defaultErrorResponseHandler)\n );\n };\n"],"mappings":";;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GA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AAmC,IAChC;EACHJ,0BAA0B,GAAGI,OAAO;AACtC,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAF,6BAAA,GAAAA,6BAAA;AAGO,MAAMG,WAAW,GACrB1B,KAA6B,IAC7BI,QAAkB,IAAK;EACtBA,QAAQ,CAAC,IAAAuB,gCAAa,GAAE,CAAC;EAEzB,MAAMN,aAAa,GAAG,IAAIO,sBAAa,CAAC5B,KAAK,CAAC;EAE9C,OAAOI,QAAQ,CACbgB,0BAA0B,CAACC,aAAa,EAAElB,2BAA2B,CAAC,CACvE;AACH,CAAC;AAACsB,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"Error.js","names":["_Constants","require","_Settings","_ErrorResponse","_interopRequireDefault","_RouterActions","_Notification","_ProgressIndicator","_SignIn","_Authorization","saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","handleUnauthorized","isBlocked","isConcurrentUser","isInvalidUsername","LOGOUT_PATH","getSetting","push","isChangePassword","changePassword","IS_SERVER","setTimeout","showXHRErrorNotification","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","exports","handleError","resetProgress","ErrorResponse"],"sources":["../../../src/redux/actions/Error.js"],"sourcesContent":["// @flow\nimport { IS_SERVER } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { push } from \"../_router/RouterActions\";\nimport { showXHRErrorNotification } from \"./Notification\";\nimport { resetProgress } from \"./ProgressIndicator\";\nimport { changePassword } from \"./SignIn\";\nimport { handleUnauthorized } from \"./Authorization\";\n\nimport type { FetchException } from \"../../exceptions\";\nimport type { Dispatch, SaveErrorAction, ThunkAction } from \"../types\";\n\ntype DefaultErrorResponseHandler = (error: ErrorResponse) => ThunkAction;\ntype CustomErrorResponseHandler = (\n errorResponse: ErrorResponse,\n defaultHandler: DefaultErrorResponseHandler\n) => ThunkAction;\n\n/**\n */\nconst saveError = (error: ErrorResponse): SaveErrorAction => ({\n type: \"SAVE_ERROR\",\n payload: error,\n});\n\n/**\n */\nconst defaultErrorResponseHandler: DefaultErrorResponseHandler =\n (error: ErrorResponse): ThunkAction =>\n (dispatch: Dispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch({ type: \"NO_ACTION\" });\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n dispatch(push(LOGOUT_PATH));\n }\n\n if (error.isChangePassword) {\n return dispatch(changePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n setTimeout(() => {\n throw error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\n/**\n * Standard Custom error response, acts as a proxy and can be overwritten by {@link setCustomErrorResponseHandler}\n */\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (errorResponse, defaultHandler) => (dispatch: Dispatch) =>\n dispatch(defaultHandler(errorResponse));\n\n/**\n * Set a custom error response handler,\n * can be used when custom functionality is needed on certain (error) response\n * of the modular ui, for example when custom logic is needed when a user is unauthorized<br>\n * It receives an {@link ErrorResponse} and the {@link defaultErrorResponseHandler}\n */\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler\n) => {\n customErrorResponseHandler = handler;\n};\n\n/**\n * Handle errors by sending an error notification message\n */\nexport const handleError =\n (error: Error | FetchException): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(resetProgress());\n\n const errorResponse = new ErrorResponse(error);\n\n return dispatch(\n customErrorResponseHandler(errorResponse, defaultErrorResponseHandler)\n );\n };\n"],"mappings":";;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAC,sBAAA,CAAA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AAc,KAAMlB,QAAkB,IACpDA,QAAQ,CAACkB,cAAc,CAACD,aAAa,CAAC,CAAC;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,6BAA6B,GACxCC,OAAmC,IAChC;EACHJ,0BAA0B,GAAGI,OAAO;AACtC,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAF,6BAAA,GAAAA,6BAAA;AAGO,MAAMG,WAAW,GACrB1B,KAA6B,IAC7BI,QAAkB,IAAK;EACtBA,QAAQ,CAAC,IAAAuB,gCAAa,EAAC,CAAC,CAAC;EAEzB,MAAMN,aAAa,GAAG,IAAIO,sBAAa,CAAC5B,KAAK,CAAC;EAE9C,OAAOI,QAAQ,CACbgB,0BAA0B,CAACC,aAAa,EAAElB,2BAA2B,CACvE,CAAC;AACH,CAAC;AAACsB,OAAA,CAAAC,WAAA,GAAAA,WAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","names":["_RouterActions","require","_ModularUIActions","_SignOut","_Application","_ProgressIndicator","_Authenticate","_interopRequireDefault","previousObject","form","newForm","clone","setPreviousObject","updateForm","exports","cancelForm","dispatch","getState","key","auth","mustChangePassword","startProgress","Authenticate","logout","then","logoutSuccess","reloadApplication","finishProgress","goBack"],"sources":["../../../src/redux/actions/Form.js"],"sourcesContent":["// @flow\nimport { goBack } from \"../_router/RouterActions\";\nimport { updateForm } from \"../_modularui/ModularUIActions\";\nimport { logoutSuccess } from \"./SignOut\";\nimport { reloadApplication } from \"./Application\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\n\n/**\n * Go back to previous object (back button on form)\n */\nexport const previousObject = (form: FormModel): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.setPreviousObject();\n\n return updateForm(newForm);\n};\n\n/**\n */\nexport const cancelForm =\n (form: FormModel): ThunkAction =>\n (dispatch: Dispatch, getState: GetState) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n return new Authenticate().logout().then(() => {\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n\n return dispatch(goBack());\n });\n }\n\n return dispatch(goBack());\n };\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,aAAA,GAAAC,sBAAA,CAAAN,OAAA;AAMA;AACA;AACA;AACO,MAAMO,cAAc,GAAIC,IAAe,IAAuB;EACnE,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,iBAAiB,EAAE;EAE3B,OAAO,IAAAC,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AADAI,OAAA,CAAAN,cAAA,GAAAA,cAAA;AAEO,MAAMO,UAAU,GACpBN,IAAe,IAChB,CAACO,QAAkB,EAAEC,QAAkB,KAAK;EAC1C,IAAIR,IAAI,CAACS,GAAG,KAAK,gBAAgB,IAAID,QAAQ,EAAE,CAACE,IAAI,CAACC,kBAAkB,EAAE;IACvEJ,QAAQ,CAAC,IAAAK,gCAAa,GAAE,CAAC;IACzB,OAAO,IAAIC,qBAAY,EAAE,CAACC,MAAM,EAAE,CAACC,IAAI,CAAC,MAAM;MAC5CR,QAAQ,CAAC,IAAAS,sBAAa,GAAE,CAAC;MACzBT,QAAQ,CAAC,IAAAU,8BAAiB,GAAE,CAAC;MAC7BV,QAAQ,CAAC,IAAAW,iCAAc,GAAE,CAAC;MAE1B,OAAOX,QAAQ,CAAC,IAAAY,qBAAM,GAAE,CAAC;IAC3B,CAAC,CAAC;EACJ;EAEA,OAAOZ,QAAQ,CAAC,IAAAY,qBAAM,GAAE,CAAC;AAC3B,CAAC;AAACd,OAAA,CAAAC,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"file":"Form.js","names":["_RouterActions","require","_ModularUIActions","_SignOut","_Application","_ProgressIndicator","_Authenticate","_interopRequireDefault","previousObject","form","newForm","clone","setPreviousObject","updateForm","exports","cancelForm","dispatch","getState","key","auth","mustChangePassword","startProgress","Authenticate","logout","then","logoutSuccess","reloadApplication","finishProgress","goBack"],"sources":["../../../src/redux/actions/Form.js"],"sourcesContent":["// @flow\nimport { goBack } from \"../_router/RouterActions\";\nimport { updateForm } from \"../_modularui/ModularUIActions\";\nimport { logoutSuccess } from \"./SignOut\";\nimport { reloadApplication } from \"./Application\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\n\n/**\n * Go back to previous object (back button on form)\n */\nexport const previousObject = (form: FormModel): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.setPreviousObject();\n\n return updateForm(newForm);\n};\n\n/**\n */\nexport const cancelForm =\n (form: FormModel): ThunkAction =>\n (dispatch: Dispatch, getState: GetState) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n return new Authenticate().logout().then(() => {\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n\n return dispatch(goBack());\n });\n }\n\n return dispatch(goBack());\n };\n"],"mappings":";;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,aAAA,GAAAC,sBAAA,CAAAN,OAAA;AAMA;AACA;AACA;AACO,MAAMO,cAAc,GAAIC,IAAe,IAAuB;EACnE,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,CAAC,CAAC;EAE5BD,OAAO,CAACE,iBAAiB,CAAC,CAAC;EAE3B,OAAO,IAAAC,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AADAI,OAAA,CAAAN,cAAA,GAAAA,cAAA;AAEO,MAAMO,UAAU,GACpBN,IAAe,IAChB,CAACO,QAAkB,EAAEC,QAAkB,KAAK;EAC1C,IAAIR,IAAI,CAACS,GAAG,KAAK,gBAAgB,IAAID,QAAQ,CAAC,CAAC,CAACE,IAAI,CAACC,kBAAkB,EAAE;IACvEJ,QAAQ,CAAC,IAAAK,gCAAa,EAAC,CAAC,CAAC;IACzB,OAAO,IAAIC,qBAAY,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,MAAM;MAC5CR,QAAQ,CAAC,IAAAS,sBAAa,EAAC,CAAC,CAAC;MACzBT,QAAQ,CAAC,IAAAU,8BAAiB,EAAC,CAAC,CAAC;MAC7BV,QAAQ,CAAC,IAAAW,iCAAc,EAAC,CAAC,CAAC;MAE1B,OAAOX,QAAQ,CAAC,IAAAY,qBAAM,EAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;EACJ;EAEA,OAAOZ,QAAQ,CAAC,IAAAY,qBAAM,EAAC,CAAC,CAAC;AAC3B,CAAC;AAACd,OAAA,CAAAC,UAAA,GAAAA,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSet.js","names":["_ModularUIActions","require","_Settings","_FormValidations","_FormAutosave","_FormAutosubmit","updateFormAttribute","form","formObject","attribute","inputvalue","options","arguments","length","undefined","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","autosubmitFormObject","isChanged","autosaveFormObject","hasDynamicValidations","getSetting","validateFormObject","updateForm","exports"],"sources":["../../../src/redux/actions/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { validateFormObject } from \"./FormValidations\";\nimport { autosaveFormObject } from \"./FormAutosave\";\nimport { autosubmitFormObject } from \"./FormAutosubmit\";\n\nimport type { Dispatch, ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\n\n/**\n * Update an attribute on a form\n */\nexport const updateFormAttribute =\n (\n form: FormModel,\n formObject: FormObjectModel,\n attribute: AttributeType,\n inputvalue: string,\n options: UpdateFormOptions = {\n autosubmit: false,\n autosave: false,\n forceUpdate: false,\n validate: true,\n }\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n const newForm = form.clone();\n\n if (options.validate === undefined) {\n options.validate = true;\n }\n\n if (newForm.currentFormObject?.equals(formObject)) {\n newForm.currentFormObject.updateAttribute(attribute, inputvalue);\n } else {\n newForm.completedFormObjects.forEach((completeObject) => {\n if (completeObject.equals(formObject)) {\n completeObject.updateAttribute(attribute, inputvalue);\n }\n });\n }\n\n if (options.autosubmit && newForm.isValid) {\n const autosubmitAction = autosubmitFormObject(\n newForm,\n attribute,\n options.forceUpdate\n );\n if (autosubmitAction) {\n return dispatch(autosubmitAction);\n }\n }\n\n if (options.autosave && newForm.isValid && newForm.isChanged()) {\n dispatch(autosaveFormObject(newForm));\n }\n\n if (\n options.validate &&\n newForm.currentFormObject?.hasDynamicValidations &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\")\n ) {\n // server form validations happens async, don't wait for the form to return\n dispatch(validateFormObject(newForm));\n }\n\n return dispatch(updateForm(newForm));\n };\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AACA,I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E,EAAE;MAC9DZ,QAAQ,CAAC,IAAAa,gCAAkB,EAACZ,OAAO,CAAC,CAAC;IACvC;IAEA,IACET,OAAO,CAACO,QAAQ,IAChBE,OAAO,CAACE,iBAAiB,EAAEW,qBAAqB,IAChD,IAAAC,oBAAU,EAAC,+BAA+B,CAAC,EAC3C;MACA;MACAf,QAAQ,CAAC,IAAAgB,mCAAkB,EAACf,OAAO,CAAC,CAAC;IACvC;IAEA,OAAOD,QAAQ,CAAC,IAAAiB,4BAAU,EAAChB,OAAO,CAAC,CAAC;EACtC,CAAC;AAAA;AAACiB,OAAA,CAAA/B,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"file":"FormAttributeSet.js","names":["_ModularUIActions","require","_Settings","_FormValidations","_FormAutosave","_FormAutosubmit","updateFormAttribute","form","formObject","attribute","inputvalue","options","arguments","length","undefined","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","autosubmitFormObject","isChanged","autosaveFormObject","hasDynamicValidations","getSetting","validateFormObject","updateForm","exports"],"sources":["../../../src/redux/actions/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { validateFormObject } from \"./FormValidations\";\nimport { autosaveFormObject } from \"./FormAutosave\";\nimport { autosubmitFormObject } from \"./FormAutosubmit\";\n\nimport type { Dispatch, ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\n\n/**\n * Update an attribute on a form\n */\nexport const updateFormAttribute =\n (\n form: FormModel,\n formObject: FormObjectModel,\n attribute: AttributeType,\n inputvalue: string,\n options: UpdateFormOptions = {\n autosubmit: false,\n autosave: false,\n forceUpdate: false,\n validate: true,\n }\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n const newForm = form.clone();\n\n if (options.validate === undefined) {\n options.validate = true;\n }\n\n if (newForm.currentFormObject?.equals(formObject)) {\n newForm.currentFormObject.updateAttribute(attribute, inputvalue);\n } else {\n newForm.completedFormObjects.forEach((completeObject) => {\n if (completeObject.equals(formObject)) {\n completeObject.updateAttribute(attribute, inputvalue);\n }\n });\n }\n\n if (options.autosubmit && newForm.isValid) {\n const autosubmitAction = autosubmitFormObject(\n newForm,\n attribute,\n options.forceUpdate\n );\n if (autosubmitAction) {\n return dispatch(autosubmitAction);\n }\n }\n\n if (options.autosave && newForm.isValid && newForm.isChanged()) {\n dispatch(autosaveFormObject(newForm));\n }\n\n if (\n options.validate &&\n newForm.currentFormObject?.hasDynamicValidations &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\")\n ) {\n // server form validations happens async, don't wait for the form to return\n dispatch(validateFormObject(newForm));\n }\n\n return dispatch(updateForm(newForm));\n };\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAOA;AACA;AACA;AACO,MAAMK,mBAAmB,GAC9B,SAAAA,CACEC,IAAe,EACfC,UAA2B,EAC3BC,SAAwB,EACxBC,UAAkB;EAAA,IAClBC,OAA0B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IAC3BG,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,KAAK;IACfC,WAAW,EAAE,KAAK;IAClBC,QAAQ,EAAE;EACZ,CAAC;EAAA,OAEFC,QAAkB,IAAK;IACtB,MAAMC,OAAO,GAAGb,IAAI,CAACc,KAAK,CAAC,CAAC;IAE5B,IAAIV,OAAO,CAACO,QAAQ,KAAKJ,SAAS,EAAE;MAClCH,OAAO,CAACO,QAAQ,GAAG,IAAI;IACzB;IAEA,IAAIE,OAAO,CAACE,iBAAiB,EAAEC,MAAM,CAACf,UAAU,CAAC,EAAE;MACjDY,OAAO,CAACE,iBAAiB,CAACE,eAAe,CAACf,SAAS,EAAEC,UAAU,CAAC;IAClE,CAAC,MAAM;MACLU,OAAO,CAACK,oBAAoB,CAACC,OAAO,CAAEC,cAAc,IAAK;QACvD,IAAIA,cAAc,CAACJ,MAAM,CAACf,UAAU,CAAC,EAAE;UACrCmB,cAAc,CAACH,eAAe,CAACf,SAAS,EAAEC,UAAU,CAAC;QACvD;MACF,CAAC,CAAC;IACJ;IAEA,IAAIC,OAAO,CAACI,UAAU,IAAIK,OAAO,CAACQ,OAAO,EAAE;MACzC,MAAMC,gBAAgB,GAAG,IAAAC,oCAAoB,EAC3CV,OAAO,EACPX,SAAS,EACTE,OAAO,CAACM,WACV,CAAC;MACD,IAAIY,gBAAgB,EAAE;QACpB,OAAOV,QAAQ,CAACU,gBAAgB,CAAC;MACnC;IACF;IAEA,IAAIlB,OAAO,CAACK,QAAQ,IAAII,OAAO,CAACQ,OAAO,IAAIR,OAAO,CAACW,SAAS,CAAC,CAAC,EAAE;MAC9DZ,QAAQ,CAAC,IAAAa,gCAAkB,EAACZ,OAAO,CAAC,CAAC;IACvC;IAEA,IACET,OAAO,CAACO,QAAQ,IAChBE,OAAO,CAACE,iBAAiB,EAAEW,qBAAqB,IAChD,IAAAC,oBAAU,EAAC,+BAA+B,CAAC,EAC3C;MACA;MACAf,QAAQ,CAAC,IAAAgB,mCAAkB,EAACf,OAAO,CAAC,CAAC;IACvC;IAEA,OAAOD,QAAQ,CAAC,IAAAiB,4BAAU,EAAChB,OAAO,CAAC,CAAC;EACtC,CAAC;AAAA;AAACiB,OAAA,CAAA/B,mBAAA,GAAAA,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSetRepeatable.js","names":["_ModularUIActions","require","addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","updateForm","exports","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateForm(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateForm(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateForm(newForm);\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAMA;AACA;AACO,MAAMC,yBAAyB,GACpCC,IAAe,IACM;EACrB,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAE5B,OAAO,IAAAC,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AADAI,OAAA,CAAAN,yBAAA,GAAAA,yBAAA;AAEO,MAAMO,4BAA4B,GAAGA,CAC1CN,IAAe,EACfO,UAA2B,KACN;EACrB,MAAMN,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAC5BF,OAAO,CAACO,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAH,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AADAI,OAAA,CAAAC,4BAAA,GAAAA,4BAAA;AAEO,MAAMG,4BAA4B,GAAGA,CAC1CT,IAAe,EACfO,UAA2B,KACN;EACrB,MAAMN,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACO,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAH,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;AAACI,OAAA,CAAAI,4BAAA,GAAAA,4BAAA"}
1
+ {"version":3,"file":"FormAttributeSetRepeatable.js","names":["_ModularUIActions","require","addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","updateForm","exports","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateForm(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateForm(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateFormAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateForm(newForm);\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAMA;AACA;AACO,MAAMC,yBAAyB,GACpCC,IAAe,IACM;EACrB,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,CAAC,CAAC;EAE5BD,OAAO,CAACE,kBAAkB,CAAC,CAAC;EAE5B,OAAO,IAAAC,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AADAI,OAAA,CAAAN,yBAAA,GAAAA,yBAAA;AAEO,MAAMO,4BAA4B,GAAGA,CAC1CN,IAAe,EACfO,UAA2B,KACN;EACrB,MAAMN,OAAO,GAAGD,IAAI,CAACE,KAAK,CAAC,CAAC;EAE5BD,OAAO,CAACE,kBAAkB,CAAC,CAAC;EAC5BF,OAAO,CAACO,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAH,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AADAI,OAAA,CAAAC,4BAAA,GAAAA,4BAAA;AAEO,MAAMG,4BAA4B,GAAGA,CAC1CT,IAAe,EACfO,UAA2B,KACN;EACrB,MAAMN,OAAO,GAAGD,IAAI,CAACE,KAAK,CAAC,CAAC;EAE5BD,OAAO,CAACO,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAH,4BAAU,EAACH,OAAO,CAAC;AAC5B,CAAC;AAACI,OAAA,CAAAI,4BAAA,GAAAA,4BAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAutosave.js","names":["_debounce","_interopRequireDefault","require","_ModularUIRequest","_FormModel","_Constants","_ModularUIActions","updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","updateForm","FINISHED","debouncedAutosave","debounce","VALIDATE_DEBOUNCE_TIMEOUT","autosaveFormObject","exports"],"sources":["../../../src/redux/actions/FormAutosave.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n AUTOSAVE_STATUS,\n} from \"../../constants/Constants\";\n\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport type { UpdateAutosaveAction, ThunkAction, Dispatch } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (\n status: $Keys<typeof AUTOSAVE_STATUS>,\n model: FormModel\n): UpdateAutosaveAction => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: Dispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateForm(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce((dispatch, form) => {\n autosave(dispatch, form);\n}, VALIDATE_DEBOUNCE_TIMEOUT);\n\n/**\n */\nexport const autosaveFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedAutosave(dispatch, form);\n"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAMA,IAAAI,iBAAA,GAAAJ,OAAA;AAIA;AACA;AACA;AACA;AACA,MAAMK,cAAc,GAAGA,CACrBC,MAAq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AAD,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"FormAutosave.js","names":["_debounce","_interopRequireDefault","require","_ModularUIRequest","_FormModel","_Constants","_ModularUIActions","updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","updateForm","FINISHED","debouncedAutosave","debounce","VALIDATE_DEBOUNCE_TIMEOUT","autosaveFormObject","exports"],"sources":["../../../src/redux/actions/FormAutosave.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n AUTOSAVE_STATUS,\n} from \"../../constants/Constants\";\n\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport type { UpdateAutosaveAction, ThunkAction, Dispatch } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (\n status: $Keys<typeof AUTOSAVE_STATUS>,\n model: FormModel\n): UpdateAutosaveAction => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: Dispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateForm(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce((dispatch, form) => {\n autosave(dispatch, form);\n}, VALIDATE_DEBOUNCE_TIMEOUT);\n\n/**\n */\nexport const autosaveFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedAutosave(dispatch, form);\n"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAMA,IAAAI,iBAAA,GAAAJ,OAAA;AAIA;AACA;AACA;AACA;AACA,MAAMK,cAAc,GAAGA,CACrBC,MAAqC,EACrCC,KAAgB,MACU;EAC1BC,IAAI,EAAE,wBAAwB;EAC9BC,OAAO,EAAE;IACPH,MAAM;IACNC;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,MAAMG,QAAQ,GAAGA,CAACC,QAAkB,EAAEC,IAAe,KAAK;EACxDD,QAAQ,CAACN,cAAc,CAACQ,0BAAe,CAACC,KAAK,EAAEF,IAAI,CAAC,CAAC;EAErD,MAAMG,QAAQ,GAAGH,IAAI,CAACI,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;EAE9C,IAAIC,yBAAgB,CAACL,IAAI,CAACM,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;IACjEC,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBC,IAAI,EAAER,QAAQ;IACdS,WAAW,EAAE,KAAK;IAClBC,MAAM,EAAEb,IAAI,CAACa;EACf,CAAC,CAAC,CACCC,KAAK,CAAC,CAAC,CACPC,IAAI,CAAEC,SAAS,IAAK;IACnB,IAAIA,SAAS,YAAYC,kBAAS,EAAE;MAClC;MACA;MACAjB,IAAI,CAACkB,gBAAgB,GAAGF,SAAS,CAACE,gBAAgB;MAElDnB,QAAQ,CAAC,IAAAoB,4BAAU,EAACnB,IAAI,CAAC,CAAC;MAC1BD,QAAQ,CAACN,cAAc,CAACQ,0BAAe,CAACmB,QAAQ,EAAEJ,SAAS,CAAC,CAAC;IAC/D;EACF,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,iBAAiB,GAAG,IAAAC,iBAAQ,EAAC,CAACvB,QAAQ,EAAEC,IAAI,KAAK;EACrDF,QAAQ,CAACC,QAAQ,EAAEC,IAAI,CAAC;AAC1B,CAAC,EAAEuB,oCAAyB,CAAC;;AAE7B;AACA;AACO,MAAMC,kBAAkB,GAC5BxB,IAAe,IACfD,QAAQ,IACPsB,iBAAiB,CAACtB,QAAQ,EAAEC,IAAI,CAAC;AAACyB,OAAA,CAAAD,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAutosubmit.js","names":["_ModularUIActions","require","_Constants","autosubmitFormObject","form","attribute","forceUpdate","arguments","length","undefined","allObjects","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","loadModularUI","connectKey","selfhref","method","HTTP_METHODS","POST","data","formdata","updateModel","exports"],"sources":["../../../src/redux/actions/FormAutosubmit.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/ModularUIActions\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n */\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeType,\n forceUpdate: boolean = false\n): ?ThunkAction => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n });\n }\n\n return null;\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAMA;AACA;AACO,MAAME,oBAAoB,GAAG,SAAAA,CAClCC,IAAe,EACfC,SAAwB,EAEP;EAAA,IADjBC,WAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE5B;EACA;EACA;EACA,OACEH,IAAI,CAACM,UAAU,CAACF,MAAM,GAAG,CAAC,KACzB,CAACJ,IAAI,CAACO,iBAAiB,IACtB,CAACP,IAAI,CAACO,iBAAiB,CAACC,iBAAiB,CAACP,SAAS,CAACQ,GAAG,CAAC,CAAC,EAC3D;IACAT,IAAI,CAACU,iBAAiB,EAAE;EAC1B;EAEA,IAAIV,IAAI,CAACW,SAAS,EAAE,IAAIT,WAAW,EAAE;IACnC,OAAO,IAAAU,+BAAa,EAACZ,IAAI,CAACa,UAAU,EAAEb,IAAI,CAACc,QAAQ,EAAE;MACnDC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,IAAI,EAAElB,IAAI,CAACmB,QAAQ;MACnBC,WAAW,EAAEpB;IACf,CAAC,CAAC;EACJ;EAEA,OAAO,IAAI;AACb,CAAC;AAACqB,OAAA,CAAAtB,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"file":"FormAutosubmit.js","names":["_ModularUIActions","require","_Constants","autosubmitFormObject","form","attribute","forceUpdate","arguments","length","undefined","allObjects","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","loadModularUI","connectKey","selfhref","method","HTTP_METHODS","POST","data","formdata","updateModel","exports"],"sources":["../../../src/redux/actions/FormAutosubmit.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/ModularUIActions\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n */\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeType,\n forceUpdate: boolean = false\n): ?ThunkAction => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n });\n }\n\n return null;\n};\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAMA;AACA;AACO,MAAME,oBAAoB,GAAG,SAAAA,CAClCC,IAAe,EACfC,SAAwB,EAEP;EAAA,IADjBC,WAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE5B;EACA;EACA;EACA,OACEH,IAAI,CAACM,UAAU,CAACF,MAAM,GAAG,CAAC,KACzB,CAACJ,IAAI,CAACO,iBAAiB,IACtB,CAACP,IAAI,CAACO,iBAAiB,CAACC,iBAAiB,CAACP,SAAS,CAACQ,GAAG,CAAC,CAAC,EAC3D;IACAT,IAAI,CAACU,iBAAiB,CAAC,CAAC;EAC1B;EAEA,IAAIV,IAAI,CAACW,SAAS,CAAC,CAAC,IAAIT,WAAW,EAAE;IACnC,OAAO,IAAAU,+BAAa,EAACZ,IAAI,CAACa,UAAU,EAAEb,IAAI,CAACc,QAAQ,EAAE;MACnDC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,IAAI,EAAElB,IAAI,CAACmB,QAAQ;MACnBC,WAAW,EAAEpB;IACf,CAAC,CAAC;EACJ;EAEA,OAAO,IAAI;AACb,CAAC;AAACqB,OAAA,CAAAtB,oBAAA,GAAAA,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormValidations.js","names":["_debounce","_interopRequireDefault","require","_ModularUIActions","_ModularUIRequest","_Constants","_FormModel","updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","updateForm","debouncedValidateFormObject","debounce","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject","exports"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n} from \"../../constants/Constants\";\n\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type { ModularUIModel } from \"../../models\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations =\n (form: FormModel, formWithValidations: ModularUIModel) =>\n (dispatch: Dispatch, getState: GetState) => {\n const currentForm = getState().modularui[form.connectKey];\n\n if (currentForm) {\n const validatedForm = currentForm.model.clone();\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateForm(validatedForm));\n }\n };\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: Dispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) =>\n dispatch(updateValidations(form, formWithValidations))\n );\n },\n VALIDATE_DEBOUNCE_TIMEOUT,\n {\n leading: true,\n trailing: true,\n }\n);\n\n/**\n */\nexport const validateFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedValidateFormObject(dispatch, form);\n"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AAKA;AACA;AACA;AACA;AACA,MAAMK,iBAAiB,GACrBA,CAACC,IAAe,EAAEC,mBAAmC,KACrD,CAACC,QAAkB,EAAEC,QAAkB,KAAK;EAC1C,MAAMC,WAAW,GAAGD,QAAQ,EAAE,CAACE,SAAS,CAACL,IAAI,CAACM,UAAU,CAAC;EAEzD,IAAIF,WAAW,EAAE;IACf,MAAMG,aAAa,GAAGH,WAAW,CAACI,KAAK,CAACC,KAAK,EAAE;IAC/C,IAAIF,aAAa,YAAYG,kBAAS,EAAE;MACtCH,aAAa,CAACR,iBAAiB,CAACE,mBAAmB,CAACU,IAAI,CAAC;IAC3D;IAEAT,QAAQ,CAAC,IAAAU,4BAAU,EAACL,aAAa,CAAC,CAAC;EACrC;AACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,2BAA2B,GAAG,IAAAC,iBAAQ,EAG1C,CAACZ,QAAQ,EAAEF,IAAe,KAAK;EAC7B,IAAIe,yBAAgB,CAACf,IAAI,CAACgB,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE;IAClEC,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBT,IAAI,EAAEX,IAAI,CAACqB,cAAc;IACzBC,WAAW,EAAE,KAAK;IAClBC,mBAAmB,EAAE,IAAI;IACzBC,MAAM,EAAExB,IAAI,CAACwB;EACf,CAAC,CAAC,CACCC,KAAK,EAAE,CACPC,IAAI,CAAEzB,mBAAmB,IACxBC,QAAQ,CAACH,iBAAiB,CAACC,IAAI,EAAEC,mBAAmB,CAAC,CAAC,CACvD;AACL,CAAC,EACD0B,oCAAyB,EACzB;EACEC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE;AACZ,CAAC,CACF;;AAED;AACA;AACO,MAAMC,kBAAkB,GAC5B9B,IAAe,IACfE,QAAQ,IACPW,2BAA2B,CAACX,QAAQ,EAAEF,IAAI,CAAC;AAAC+B,OAAA,CAAAD,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"FormValidations.js","names":["_debounce","_interopRequireDefault","require","_ModularUIActions","_ModularUIRequest","_Constants","_FormModel","updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","updateForm","debouncedValidateFormObject","debounce","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject","exports"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateForm } from \"../_modularui/ModularUIActions\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n} from \"../../constants/Constants\";\n\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type { ModularUIModel } from \"../../models\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations =\n (form: FormModel, formWithValidations: ModularUIModel) =>\n (dispatch: Dispatch, getState: GetState) => {\n const currentForm = getState().modularui[form.connectKey];\n\n if (currentForm) {\n const validatedForm = currentForm.model.clone();\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateForm(validatedForm));\n }\n };\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: Dispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) =>\n dispatch(updateValidations(form, formWithValidations))\n );\n },\n VALIDATE_DEBOUNCE_TIMEOUT,\n {\n leading: true,\n trailing: true,\n }\n);\n\n/**\n */\nexport const validateFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedValidateFormObject(dispatch, form);\n"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAKA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AAKA;AACA;AACA;AACA;AACA,MAAMK,iBAAiB,GACrBA,CAACC,IAAe,EAAEC,mBAAmC,KACrD,CAACC,QAAkB,EAAEC,QAAkB,KAAK;EAC1C,MAAMC,WAAW,GAAGD,QAAQ,CAAC,CAAC,CAACE,SAAS,CAACL,IAAI,CAACM,UAAU,CAAC;EAEzD,IAAIF,WAAW,EAAE;IACf,MAAMG,aAAa,GAAGH,WAAW,CAACI,KAAK,CAACC,KAAK,CAAC,CAAC;IAC/C,IAAIF,aAAa,YAAYG,kBAAS,EAAE;MACtCH,aAAa,CAACR,iBAAiB,CAACE,mBAAmB,CAACU,IAAI,CAAC;IAC3D;IAEAT,QAAQ,CAAC,IAAAU,4BAAU,EAACL,aAAa,CAAC,CAAC;EACrC;AACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,2BAA2B,GAAG,IAAAC,iBAAQ,EAG1C,CAACZ,QAAQ,EAAEF,IAAe,KAAK;EAC7B,IAAIe,yBAAgB,CAACf,IAAI,CAACgB,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE;IAClEC,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBT,IAAI,EAAEX,IAAI,CAACqB,cAAc;IACzBC,WAAW,EAAE,KAAK;IAClBC,mBAAmB,EAAE,IAAI;IACzBC,MAAM,EAAExB,IAAI,CAACwB;EACf,CAAC,CAAC,CACCC,KAAK,CAAC,CAAC,CACPC,IAAI,CAAEzB,mBAAmB,IACxBC,QAAQ,CAACH,iBAAiB,CAACC,IAAI,EAAEC,mBAAmB,CAAC,CACvD,CAAC;AACL,CAAC,EACD0B,oCAAyB,EACzB;EACEC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE;AACZ,CACF,CAAC;;AAED;AACA;AACO,MAAMC,kBAAkB,GAC5B9B,IAAe,IACfE,QAAQ,IACPW,2BAA2B,CAACX,QAAQ,EAAEF,IAAI,CAAC;AAAC+B,OAAA,CAAAD,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","names":["_ProgressIndicator","require","_Settings","_Constants","dismissNotification","type","exports","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","startProgress","NOTIFICATION_TYPES","SUCCESS","id","getSetting","finishProgress","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification =\n (form: FormModel): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification(NOTIFICATION_TYPES.SUCCESS, {\n id: getNotificationMessageId(form),\n })\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n };\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification =\n (error: ErrorResponse): ThunkAction =>\n (dispatch) =>\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.ERROR,\n {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error\n )\n );\n"],"mappings":";;;;;;AACA,IAAAA,kBA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,mBAAmB,EAAE,CAAC;EACjC,CAAC,EAAE,IAAAkB,oBAAU,EAAC,2BAA2B,CAAC,CAAC;EAE3C,OAAOX,QAAQ,CAAC,IAAAY,iCAAc,GAAE,CAAC;AACnC,CAAC;;AAEH;AACA;AACA;AAFAjB,OAAA,CAAAW,oBAAA,GAAAA,oBAAA;AAGO,MAAMO,wBAAwB,GAClCf,KAAoB,IACpBE,QAAQ,IACPA,QAAQ,CACNJ,gBAAgB,CACdY,6BAAkB,CAACM,KAAK,EACxB;EACEJ,EAAE,EAAEZ,KAAK,CAACY,EAAE;EACZK,cAAc,EAAEjB,KAAK,CAACD,OAAO;EAC7BmB,UAAU,EAAElB,KAAK,CAACmB;AACpB,CAAC,EACDnB,KAAK,CACN,CACF;AAACH,OAAA,CAAAkB,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"file":"Notification.js","names":["_ProgressIndicator","require","_Settings","_Constants","dismissNotification","type","exports","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","startProgress","NOTIFICATION_TYPES","SUCCESS","id","getSetting","finishProgress","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification =\n (form: FormModel): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification(NOTIFICATION_TYPES.SUCCESS, {\n id: getNotificationMessageId(form),\n })\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n };\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification =\n (error: ErrorResponse): ThunkAction =>\n (dispatch) =>\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.ERROR,\n {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error\n )\n );\n"],"mappings":";;;;;;AACA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAOA;AACA;AACA;AACO,MAAMG,mBAAmB,GAAGA,CAAA,MAAkC;EACnEC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AADAC,OAAA,CAAAF,mBAAA,GAAAA,mBAAA;AAEO,MAAMG,gBAAgB,GAC3BA,CACEF,IAAsC,EACtCG,OAAsB,EACtBC,KAAsB,EACtBC,OAAiB,KAElBC,QAAQ,IAAK;EACZA,QAAQ,CAAC;IACPN,IAAI,EAAE,mBAAmB;IACzBO,OAAO,EAAE;MACPP,IAAI;MACJG,OAAO;MACPC;IACF;EACF,CAAC,CA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AK,CAACmB;AACpB,CAAC,EACDnB,KACF,CACF,CAAC;AAACH,OAAA,CAAAkB,wBAAA,GAAAA,wBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Preferences.js","names":["_objects","require","_exceptions","_Settings","_constants","getServerPreferenceValue","preferenceName","defaultValue","arguments","length","undefined","type","value","preferencesProvider","getPreferenceByName","_includes","default","call","_context","_map","split","val","_trim","setServerPreference","propertyName","setPreference","exports","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","isPlainObject","setSettings","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setSetting","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n) => {\n let value: PreferenceValue = null;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (value == null) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value;\n};\n\n/**\n */\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n): SetPreferenceAction => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\n/**\n */\nexport const setPreference = (\n propertyName: string,\n propertyValue: PreferenceValue = null\n): SetPreferenceAction => ({\n type: \"SET_PREFERENCE\",\n payload: {\n [propertyName]: propertyValue,\n },\n});\n\n/**\n */\nexport const setPreferences = (preferences: Object): SetPreferencesAction => ({\n type: \"SET_PREFERENCES\",\n payload: {\n ...preferences,\n },\n});\n\n/**\n */\nexport const setThemePreference = (\n configTheme: string\n): SetPreferenceAction => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (\n state?: ReduxState\n): SetPreferenceAction => {\n let allContentInDataSetting: PreferenceValue = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[ALL_CONTENT_IN_DATA_SETTING];\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (\n state?: ReduxState\n): SetPreferencesAction => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE]\n ),\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ??\n `/callback?client_name=FormClient`\n ),\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] ?? \"j_username\"\n ),\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] ?? \"j_password\"\n ),\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] ?? `/logout`\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AASA,IAAAG,UAAA,GAAAH,OAAA;AASA;AACA;AACA,MAAMI,wBAAwB,GAAG,SAAAA,CAC/BC,cAAsB,EAGnB;EAAA,IAFHC,YAA6B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IACpCG,IAAa,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEb,IAAIE,KAAsB,GAAG,IAAI;EACjC,IAAI,OAAOC,mBAAmB,KAAK,WAAW,EAAE;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAAmB,CAACR,cAAc,CAAC;EACjE;EAEA,IAAIM,KAAK,IAAI,IAAI,EAAE;IACjBA,KAAK,GAAGL,YAAY;EACtB;EAEA,IAAI,OAAOK,KAAK,KAAK,QAAQ,IAAID,IAAI,KAAK,QAAQ,IAAI,IAAAI,SAAA,CAAAC,OAAA,EAAAJ,KAAK,EAAAK,IAAA,CAALL,KAAK,EAAU,GAAG,CAAC,EAAE;IAAA,IAAAM,QAAA;IACzEN,KAAK,GAAG,IAAAO,IAAA,CAAAH,OAAA,EAAAE,QAAA,GAAAN,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iC,CACrC;IACD,CAACC,iCAAsB,GAAG9C,wBAAwB,CAChD8C,iCAAsB,EACtBT,KAAK,EAAEZ,WAAW,CAACqB,iCAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACC,iCAAsB,GAAG/C,wBAAwB,CAChD+C,iCAAsB,EACtBV,KAAK,EAAEZ,WAAW,CAACsB,iCAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACC,8BAAmB,GAAGhD,wBAAwB,CAC7CgD,8BAAmB,EACnBX,KAAK,EAAEZ,WAAW,CAACuB,8BAAmB,CAAC,IAAK,SAAQ;EAExD,CAAC;EAED,IAAAd,qBAAW,EAACS,aAAa,CAAC;EAC1B,OAAOnB,cAAc,CAACmB,aAAa,CAAC;AACtC,CAAC;AAACtB,OAAA,CAAAqB,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"file":"Preferences.js","names":["_objects","require","_exceptions","_Settings","_constants","getServerPreferenceValue","preferenceName","defaultValue","arguments","length","undefined","type","value","preferencesProvider","getPreferenceByName","_includes","default","call","_context","_map","split","val","_trim","setServerPreference","propertyName","setPreference","exports","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","isPlainObject","setSettings","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setSetting","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n) => {\n let value: PreferenceValue = null;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (value == null) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value;\n};\n\n/**\n */\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n): SetPreferenceAction => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\n/**\n */\nexport const setPreference = (\n propertyName: string,\n propertyValue: PreferenceValue = null\n): SetPreferenceAction => ({\n type: \"SET_PREFERENCE\",\n payload: {\n [propertyName]: propertyValue,\n },\n});\n\n/**\n */\nexport const setPreferences = (preferences: Object): SetPreferencesAction => ({\n type: \"SET_PREFERENCES\",\n payload: {\n ...preferences,\n },\n});\n\n/**\n */\nexport const setThemePreference = (\n configTheme: string\n): SetPreferenceAction => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (\n state?: ReduxState\n): SetPreferenceAction => {\n let allContentInDataSetting: PreferenceValue = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[ALL_CONTENT_IN_DATA_SETTING];\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (\n state?: ReduxState\n): SetPreferencesAction => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE]\n ),\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ??\n `/callback?client_name=FormClient`\n ),\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] ?? \"j_username\"\n ),\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] ?? \"j_password\"\n ),\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] ?? `/logout`\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AASA,IAAAG,UAAA,GAAAH,OAAA;AASA;AACA;AACA,MAAMI,wBAAwB,GAAG,SAAAA,CAC/BC,cAAsB,EAGnB;EAAA,IAFHC,YAA6B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAAA,IACpCG,IAAa,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEb,IAAIE,KAAsB,GAAG,IAAI;EACjC,IAAI,OAA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C;EAClE,OAAOlB,aAAa,CAACoB,sCAA2B,EAAEF,uBAAuB,CAAC;AAC5E,CAAC;;AAED;AACA;AACA;AAFAjB,OAAA,CAAAe,0BAAA,GAAAA,0BAAA;AAGO,MAAMM,mBAAmB,GAC9BL,KAAkB,IACO;EACzB,MAAMM,aAAa,GAAG;IACpB,CAACC,qBAAU,GAAG5C,wBAAwB,CACpC4C,qBAAU,EACVP,KAAK,EAAEZ,WAAW,CAACmB,qBAAU,CAC/B,CAAC;IACD,CAACC,6BAAkB,GAAG7C,wBAAwB,CAC5C6C,6BAAkB,EAClBR,KAAK,EAAEZ,WAAW,CAACoB,6BAAkB,CAAC,IACnC,kCACL,CAAC;IACD,CAACC,iCAAsB,GAAG9C,wBAAwB,CAChD8C,iCAAsB,EACtBT,KAAK,EAAEZ,WAAW,CAACqB,iCAAsB,CAAC,IAAI,YAChD,CAAC;IACD,CAACC,iCAAsB,GAAG/C,wBAAwB,CAChD+C,iCAAsB,EACtBV,KAAK,EAAEZ,WAAW,CAACsB,iCAAsB,CAAC,IAAI,YAChD,CAAC;IACD,CAACC,8BAAmB,GAAGhD,wBAAwB,CAC7CgD,8BAAmB,EACnBX,KAAK,EAAEZ,WAAW,CAACuB,8BAAmB,CAAC,IAAK,SAC9C;EACF,CAAC;EAED,IAAAd,qBAAW,EAACS,aAAa,CAAC;EAC1B,OAAOnB,cAAc,CAACmB,aAAa,CAAC;AACtC,CAAC;AAACtB,OAAA,CAAAqB,mBAAA,GAAAA,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignIn.js","names":["_Cache","_interopRequireDefault","require","_Authenticate","_Application","_ProgressIndicator","_RouterActions","_Constants","loginFailed","errorMessage","sendAuthenticationError","exports","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","push","CHANGEPASSWORD_PATH","login","username","password","startProgress","Authenticate","then","reloadApplication","Cache","addItem","finishProgress","catch","error","id","dispatchedReloadApplication","_promise","default","resolve"],"sources":["../../../src/redux/actions/SignIn.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport { reloadApplication } from \"./Application\";\n\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { push } from \"../_router/RouterActions\";\nimport { CHANGEPASSWORD_PATH } from \"../../constants/Constants\";\n\nimport type {\n SendAuthenticationErrorAction,\n ResetAuthErrorsAction,\n LoginSuccessAction,\n ThunkAction,\n} from \"../types\";\n\n/**\n * Send login failed action\n */\nexport const loginFailed = (\n errorMessage: string\n): SendAuthenticationErrorAction => sendAuthenticationError(errorMessage);\n\n/**\n * Send authentication error action\n */\nexport const sendAuthenticationError = (\n errorMessage: string\n): SendAuthenticationErrorAction => ({\n type: \"AUTHENTICATION_ERROR\",\n payload: errorMessage,\n});\n\n/**\n * Resets any authentication errors\n */\nexport const resetAuthErrors = (): ResetAuthErrorsAction => ({\n type: \"AUTHENTICATION_RESET_ERRORS\",\n});\n\n/**\n * Send login success action\n */\nexport const loginSuccess = (): LoginSuccessAction => ({\n type: \"AUTHENTICATION_SUCCESS\",\n});\n\n/**\n * Send change password action\n */\nexport const changePassword = (): ThunkAction => (dispatch, getState) => {\n dispatch({\n type: \"CHANGE_PASSWORD\",\n });\n\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return dispatch(\n push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n })\n );\n};\n\n/**\n */\nexport const login =\n (username: string, password: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .login(username, password)\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(loginSuccess());\n\n return dispatch(finishProgress());\n })\n .catch((error) => {\n if (error.id === \"Error.ChangePasswordRequired\") {\n const dispatchedReloadApplication = dispatch(reloadApplication());\n\n return Promise.resolve(dispatchedReloadApplication).then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(changePassword());\n return dispatch(finishProgress());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AASA;AACA;AACA;AACO,MAAMM,WAAW,GACtBC,YAAoB,IACcC,uBAAuB,CAACD,YAAY,CAAC;;AAEzE;AACA;AACA;AAFAE,OAAA,CAAAH,WAAA,GAAAA,WAAA;AAGO,MAAME,uBAAuB,GAClCD,YAAoB,KACe;EACnCG,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEJ;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AAFAE,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAGO,MAAMI,eAAe,GAAGA,CAAA,MAA8B;EAC3DF,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AAFAD,OAAA,CAAAG,eAAA,GAAAA,eAAA;AAGO,MAAMC,YAAY,GAAGA,CAAA,MAA2B;EACrDH,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AAFAD,OAAA,CAAAI,YAAA,GAAAA,YAAA;AAGO,MAAMC,cAAc,GAAGA,CAAA,KAAmB,CAACC,QAAQ,EAAEC,QAAQ,KAAK;EACvED,QAAQ,CAAC;IACPL,IAAI,EAAE;EACR,CAAC,CAAC;EAEF,MAAMO,OAAO,GAAGD,QAAQ,EAAE,CAACE,MAAM,CAACC,QAAQ,EAAEC,KAAK,EAAEC,KAAK;EACxD,MAAMC,YAAY,GAAGN,QAAQ,EAAE,CAACE,MAAM,CAACC,QAAQ,EAAEC,KAAK,EAAEG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B,QAAQ,CAAC,IAAAoB,iCAAc,GAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC;AAAC1B,OAAA,CAAAiB,KAAA,GAAAA,KAAA"}
1
+ {"version":3,"file":"SignIn.js","names":["_Cache","_interopRequireDefault","require","_Authenticate","_Application","_ProgressIndicator","_RouterActions","_Constants","loginFailed","errorMessage","sendAuthenticationError","exports","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","push","CHANGEPASSWORD_PATH","login","username","password","startProgress","Authenticate","then","reloadApplication","Cache","addItem","finishProgress","catch","error","id","dispatchedReloadApplication","_promise","default","resolve"],"sources":["../../../src/redux/actions/SignIn.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport { reloadApplication } from \"./Application\";\n\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { push } from \"../_router/RouterActions\";\nimport { CHANGEPASSWORD_PATH } from \"../../constants/Constants\";\n\nimport type {\n SendAuthenticationErrorAction,\n ResetAuthErrorsAction,\n LoginSuccessAction,\n ThunkAction,\n} from \"../types\";\n\n/**\n * Send login failed action\n */\nexport const loginFailed = (\n errorMessage: string\n): SendAuthenticationErrorAction => sendAuthenticationError(errorMessage);\n\n/**\n * Send authentication error action\n */\nexport const sendAuthenticationError = (\n errorMessage: string\n): SendAuthenticationErrorAction => ({\n type: \"AUTHENTICATION_ERROR\",\n payload: errorMessage,\n});\n\n/**\n * Resets any authentication errors\n */\nexport const resetAuthErrors = (): ResetAuthErrorsAction => ({\n type: \"AUTHENTICATION_RESET_ERRORS\",\n});\n\n/**\n * Send login success action\n */\nexport const loginSuccess = (): LoginSuccessAction => ({\n type: \"AUTHENTICATION_SUCCESS\",\n});\n\n/**\n * Send change password action\n */\nexport const changePassword = (): ThunkAction => (dispatch, getState) => {\n dispatch({\n type: \"CHANGE_PASSWORD\",\n });\n\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return dispatch(\n push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n })\n );\n};\n\n/**\n */\nexport const login =\n (username: string, password: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .login(username, password)\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(loginSuccess());\n\n return dispatch(finishProgress());\n })\n .catch((error) => {\n if (error.id === \"Error.ChangePasswordRequired\") {\n const dispatchedReloadApplication = dispatch(reloadApplication());\n\n return Promise.resolve(dispatchedReloadApplication).then(() => {\n Cache.addItem(\"auth\", true);\n dispatch(changePassword());\n return dispatch(finishProgress());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AASA;AACA;AACA;AACO,MAAMM,WAAW,GACtBC,YAAoB,IACcC,uBAAuB,CAACD,YAAY,CAAC;;AAEzE;AACA;AACA;AAFAE,OAAA,CAAAH,WAAA,GAAAA,WAAA;AAGO,MAAME,uBAAuB,GAClCD,YAAoB,KACe;EACnCG,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEJ;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AAFAE,OAAA,CAAAD,uBAAA,GAAAA,uBAAA;AAGO,MAAMI,eAAe,GAAGA,CAAA,MAA8B;EAC3DF,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AAFAD,OAAA,CAAAG,eAAA,GAAAA,eAAA;AAGO,MAAMC,YAAY,GAAGA,CAAA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AACC,EAAE,KAAK,8BAA8B,EAAE;MAC/C,MAAMC,2BAA2B,GAAGxB,QAAQ,CAAC,IAAAiB,8BAAiB,EAAC,CAAC,CAAC;MAEjE,OAAOQ,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,2BAA2B,CAAC,CAACR,IAAI,CAAC,MAAM;QAC7DE,cAAK,CAACC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QAC3BnB,QAAQ,CAACD,cAAc,CAAC,CAAC,CAAC;QAC1B,OAAOC,QAAQ,CAAC,IAAAoB,iCAAc,EAAC,CAAC,CAAC;MACnC,CAAC,CAAC;IACJ;IAEApB,QAAQ,CAACT,WAAW,CAAC+B,KAAK,CAACC,EAAE,CAAC,CAAC;IAC/B,OAAOvB,QAAQ,CAAC,IAAAoB,iCAAc,EAAC,CAAC,CAAC;EACnC,CAAC,CAAC;AACN,CAAC;AAAC1B,OAAA,CAAAiB,KAAA,GAAAA,KAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignOut.js","names":["_Authenticate","_interopRequireDefault","require","_ProgressIndicator","_ModularUIActions","_Application","logoutSuccess","type","exports","logout","dispatch","startProgress","Authenticate","then","resetModularUI","reloadApplication","finishProgress"],"sources":["../../../src/redux/actions/SignOut.js"],"sourcesContent":["// @flow\nimport Authenticate from \"../../modularui/Authenticate\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { resetModularUI } from \"../_modularui/ModularUIActions\";\nimport { reloadApplication } from \"./Application\";\n\nimport type { Dispatch, LogoutSuccessAction, ThunkAction } from \"../types\";\n\n/**\n * Send logout success action\n */\nexport const logoutSuccess = (): LogoutSuccessAction => ({\n type: \"AUTHENTICATION_LOGOUT\",\n});\n\n/**\n */\nexport const logout = (): ThunkAction => (dispatch: Dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .logout()\n .then(() => dispatch(resetModularUI()))\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n dispatch(logoutSuccess());\n return dispatch(finishProgress());\n });\n};\n"],"mappings":";;;;;;;AACA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA;AACA;AACA;AACO,MAAMI,aAAa,GAAGA,CAAA,MAA4B;EACvDC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AADAC,OAAA,CAAAF,aAAA,GAAAA,aAAA;AAEO,MAAMG,MAAM,GAAGA,CAAA,KAAoBC,QAAkB,IAAK;EAC/DA,QAAQ,CAAC,IAAAC,gCAAa,GAAE,CAAC;EAEzB,OAAO,IAAIC,qBAAY,EAAE,CACtBH,MAAM,EAAE,CACRI,IAAI,CAAC,MAAMH,QAAQ,CAAC,IAAAI,gCAAc,GAAE,CAAC,CAAC,CACtCD,IAAI,CAAC,MAAMH,QAAQ,CAAC,IAAAK,8BAAiB,GAAE,CAAC,CAAC,CACzCF,IAAI,CAAC,MAAM;IACVH,QAAQ,CAACJ,aAAa,EAAE,CAAC;IACzB,OAAOI,QAAQ,CAAC,IAAAM,iCAAc,GAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC;AAACR,OAAA,CAAAC,MAAA,GAAAA,MAAA"}
1
+ {"version":3,"file":"SignOut.js","names":["_Authenticate","_interopRequireDefault","require","_ProgressIndicator","_ModularUIActions","_Application","logoutSuccess","type","exports","logout","dispatch","startProgress","Authenticate","then","resetModularUI","reloadApplication","finishProgress"],"sources":["../../../src/redux/actions/SignOut.js"],"sourcesContent":["// @flow\nimport Authenticate from \"../../modularui/Authenticate\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\nimport { resetModularUI } from \"../_modularui/ModularUIActions\";\nimport { reloadApplication } from \"./Application\";\n\nimport type { Dispatch, LogoutSuccessAction, ThunkAction } from \"../types\";\n\n/**\n * Send logout success action\n */\nexport const logoutSuccess = (): LogoutSuccessAction => ({\n type: \"AUTHENTICATION_LOGOUT\",\n});\n\n/**\n */\nexport const logout = (): ThunkAction => (dispatch: Dispatch) => {\n dispatch(startProgress());\n\n return new Authenticate()\n .logout()\n .then(() => dispatch(resetModularUI()))\n .then(() => dispatch(reloadApplication()))\n .then(() => {\n dispatch(logoutSuccess());\n return dispatch(finishProgress());\n });\n};\n"],"mappings":";;;;;;;AACA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA;AACA;AACA;AACO,MAAMI,aAAa,GAAGA,CAAA,MAA4B;EACvDC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AADAC,OAAA,CAAAF,aAAA,GAAAA,aAAA;AAEO,MAAMG,MAAM,GAAGA,CAAA,KAAoBC,QAAkB,IAAK;EAC/DA,QAAQ,CAAC,IAAAC,gCAAa,EAAC,CAAC,CAAC;EAEzB,OAAO,IAAIC,qBAAY,CAAC,CAAC,CACtBH,MAAM,CAAC,CAAC,CACRI,IAAI,CAAC,MAAMH,QAAQ,CAAC,IAAAI,gCAAc,EAAC,CAAC,CAAC,CAAC,CACtCD,IAAI,CAAC,MAAMH,QAAQ,CAAC,IAAAK,8BAAiB,EAAC,CAAC,CAAC,CAAC,CACzCF,IAAI,CAAC,MAAM;IACVH,QAAQ,CAACJ,aAAa,CAAC,CAAC,CAAC;IACzB,OAAOI,QAAQ,CAAC,IAAAM,iCAAc,EAAC,CAAC,CAAC;EACnC,CAAC,CAAC;AACN,CAAC;AAACR,OAAA,CAAAC,MAAA,GAAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","modularui","propName","exports"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,kBAAsC,GAAG,IAAAC,2BAAS,EAC7D,aAAa,EACb,GAAG,EACH;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF;AAACC,OAAA,CAAAH,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","modularui","propName","exports"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,kBAAsC,GAAG,IAAAC,2BAAS,EAC7D,aAAa,EACb,GAAG,EACH;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAH,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","modularui","_ref","match","url","propName","exports"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,eAAmC,GAAG,IAAAC,2BAAS,EAC1D,UAAU,EACVC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF;AAACC,OAAA,CAAAN,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","modularui","_ref","match","url","propName","exports"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,eAAmC,GAAG,IAAAC,2BAAS,EAC1D,UAAU,EACVC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAN,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","modularui","_ref","concept","location","search","propName","exports"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OAAM,aAAYC,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAAC,CAC9B;AAACC,OAAA,CAAAP,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","modularui","_ref","concept","location","search","propName","exports"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OAAM,aAAYC,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAC9B,CAAC;AAACC,OAAA,CAAAP,oBAAA,GAAAA,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentBrowser.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentBrowser","modularui","_ref","href","propName","exports"],"sources":["../../../src/redux/connectors/ContentBrowser.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentBrowser: ModularUIConnector = modularui(\n \"ContentBrowser\",\n ({ href }) => href,\n {\n propName: \"contentindex\",\n }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,qBAAyC,GAAG,IAAAC,2BAAS,EAChE,gBAAgB,EAChBC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF;AAACC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"file":"ContentBrowser.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentBrowser","modularui","_ref","href","propName","exports"],"sources":["../../../src/redux/connectors/ContentBrowser.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentBrowser: ModularUIConnector = modularui(\n \"ContentBrowser\",\n ({ href }) => href,\n {\n propName: \"contentindex\",\n }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,qBAAyC,GAAG,IAAAC,2BAAS,EAChE,gBAAgB,EAChBC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentDetail","modularui","_ref","content","location","decodeURIComponent","search","propName","exports"],"sources":["../../../src/redux/connectors/ContentDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetail: ModularUIConnector = modularui(\n \"ContentDetail\",\n ({ content, location }) =>\n `/content/${decodeURIComponent(content)}${location.search}`,\n { propName: \"contentTOC\" }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OACnB,YAAWG,kBAAkB,CAACF,OAAO,CAAE,GAAEC,QAAQ,CAACE,MAAO,EAAC;AAAA,GAC7D;EAAEC,QAAQ,EAAE;AAAa,CAAC,CAC3B;AAACC,OAAA,CAAAR,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"file":"ContentDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentDetail","modularui","_ref","content","location","decodeURIComponent","search","propName","exports"],"sources":["../../../src/redux/connectors/ContentDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetail: ModularUIConnector = modularui(\n \"ContentDetail\",\n ({ content, location }) =>\n `/content/${decodeURIComponent(content)}${location.search}`,\n { propName: \"contentTOC\" }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OACnB,YAAWG,kBAAkB,CAACF,OAAO,CAAE,GAAEC,QAAQ,CAACE,MAAO,EAAC;AAAA,GAC7D;EAAEC,QAAQ,EAAE;AAAa,CAC3B,CAAC;AAACC,OAAA,CAAAR,oBAAA,GAAAA,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentDetailSection.js","names":["_Href","_interopRequireDefault","require","_ModularUIConnector","connectContentDetailSection","modularui","_ref","sectioncontent","section","entryDate","Href","decodeURIComponent","addParameter","propName","exports"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,2BAA+C,GAAG,IAAAC,2BAAS,EACtE,sBAAsB,EACtBC,IAAA;EAAA,IAAC;IAAEC,cAAc;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAAH,IAAA;EAAA,OACrC,IAAII,aAAI,CACL,YAAWC,kBAAkB,CAACJ,cAAc,CAAE,IAAGC,OAAQ,EAAC,CAC5D,CAACI,YAAY,CAAC,WAAW,EAAEH,SAAS,CAAC;AAAA,GACxC;EAAEI,QAAQ,EAAE;AAAU,CAAC,CACxB;AAACC,OAAA,CAAAV,2BAAA,GAAAA,2BAAA"}
1
+ {"version":3,"file":"ContentDetailSection.js","names":["_Href","_interopRequireDefault","require","_ModularUIConnector","connectContentDetailSection","modularui","_ref","sectioncontent","section","entryDate","Href","decodeURIComponent","addParameter","propName","exports"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" }\n);\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,2BAA+C,GAAG,IAAAC,2BAAS,EACtE,sBAAsB,EACtBC,IAAA;EAAA,IAAC;IAAEC,cAAc;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAAH,IAAA;EAAA,OACrC,IAAII,aAAI,CACL,YAAWC,kBAAkB,CAACJ,cAAc,CAAE,IAAGC,OAAQ,EAC5D,CAAC,CAACI,YAAY,CAAC,WAAW,EAAEH,SAAS,CAAC;AAAA,GACxC;EAAEI,QAAQ,EAAE;AAAU,CACxB,CAAC;AAACC,OAAA,CAAAV,2BAAA,GAAAA,2BAAA"}