@beinformed/ui 1.28.2 → 1.28.4

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 (556) 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/ConfigurationException.js.map +1 -1
  6. package/esm/exceptions/FetchException.js.map +1 -1
  7. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  8. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  9. package/esm/exceptions/IllegalStateException.js.map +1 -1
  10. package/esm/exceptions/JsonParseException.js.map +1 -1
  11. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  12. package/esm/exceptions/NetworkException.js.map +1 -1
  13. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  14. package/esm/exceptions/NotFoundException.js.map +1 -1
  15. package/esm/exceptions/ServerRequestException.js.map +1 -1
  16. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  17. package/esm/exceptions/TimeoutException.js.map +1 -1
  18. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  19. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  20. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  21. package/esm/hooks/useAuthentication.js.map +1 -1
  22. package/esm/hooks/useContent.js.map +1 -1
  23. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  24. package/esm/hooks/useForm.js.map +1 -1
  25. package/esm/hooks/useI18n.js.map +1 -1
  26. package/esm/hooks/useModal.js.map +1 -1
  27. package/esm/hooks/useModelCatalog.js.map +1 -1
  28. package/esm/hooks/useModels.js.map +1 -1
  29. package/esm/hooks/useModularUI.js.map +1 -1
  30. package/esm/hooks/useModularUIBasic.js.map +1 -1
  31. package/esm/hooks/useModularUIModel.js.map +1 -1
  32. package/esm/hooks/useModularUIRequest.js.map +1 -1
  33. package/esm/hooks/useNotification.js.map +1 -1
  34. package/esm/hooks/useProgressIndicator.js.map +1 -1
  35. package/esm/hooks/useRouter.js.map +1 -1
  36. package/esm/i18n/Locale.js.map +1 -1
  37. package/esm/i18n/Locales.js.map +1 -1
  38. package/esm/i18n/Message.js.map +1 -1
  39. package/esm/i18n/withMessage.js.map +1 -1
  40. package/esm/models/actions/ActionCollection.js.map +1 -1
  41. package/esm/models/actions/ActionModel.js.map +1 -1
  42. package/esm/models/application/ApplicationModel.js.map +1 -1
  43. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  44. package/esm/models/attributes/AttributeContent.js.map +1 -1
  45. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  46. package/esm/models/attributes/AttributeModel.js.map +1 -1
  47. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  48. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  49. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  50. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  51. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  52. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  53. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  54. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  55. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  56. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  57. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  58. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  59. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  60. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  61. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  62. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  63. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  64. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  65. package/esm/models/attributes/_createAttribute.js.map +1 -1
  66. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  67. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  68. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  69. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  70. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  71. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  72. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  73. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  74. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  75. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  76. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  77. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  78. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  79. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  80. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  81. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  82. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  83. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  84. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  85. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  86. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  87. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  88. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  89. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  90. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  91. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  92. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  93. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  94. package/esm/models/base/BaseCollection.js.map +1 -1
  95. package/esm/models/base/BaseModel.js.map +1 -1
  96. package/esm/models/base/ResourceCollection.js.map +1 -1
  97. package/esm/models/base/ResourceModel.js.map +1 -1
  98. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  99. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  100. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  101. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  102. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  103. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  104. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  105. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  106. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  107. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  108. package/esm/models/content/ContentIndexModel.js.map +1 -1
  109. package/esm/models/content/ContentLinkModel.js.map +1 -1
  110. package/esm/models/content/ContentModel.js.map +1 -1
  111. package/esm/models/content/ContentTOCModel.js.map +1 -1
  112. package/esm/models/content/ContentTypeModel.js.map +1 -1
  113. package/esm/models/content/SectionModel.js.map +1 -1
  114. package/esm/models/content/SubSectionModel.js.map +1 -1
  115. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  116. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  117. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  118. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  119. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  120. package/esm/models/detail/DetailModel.js.map +1 -1
  121. package/esm/models/error/ErrorCollection.js.map +1 -1
  122. package/esm/models/error/ErrorModel.js.map +1 -1
  123. package/esm/models/error/ErrorResponse.js.map +1 -1
  124. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  125. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  126. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  127. package/esm/models/filters/FilterCollection.js.map +1 -1
  128. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  129. package/esm/models/form/FormModel.js.map +1 -1
  130. package/esm/models/form/FormObjectModel.js.map +1 -1
  131. package/esm/models/grouping/GroupingModel.js.map +1 -1
  132. package/esm/models/href/Href.js.map +1 -1
  133. package/esm/models/href/ListHref.js.map +1 -1
  134. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  135. package/esm/models/links/LinkCollection.js.map +1 -1
  136. package/esm/models/links/LinkModel.js.map +1 -1
  137. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  138. package/esm/models/list/ListDetailModel.js.map +1 -1
  139. package/esm/models/list/ListHeaderModel.js.map +1 -1
  140. package/esm/models/list/ListItemCollection.js.map +1 -1
  141. package/esm/models/list/ListItemModel.js.map +1 -1
  142. package/esm/models/list/ListModel.js.map +1 -1
  143. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  144. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  145. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  146. package/esm/models/paging/PagesizeModel.js.map +1 -1
  147. package/esm/models/paging/PagingModel.js.map +1 -1
  148. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  149. package/esm/models/parameter/Parameter.js.map +1 -1
  150. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  151. package/esm/models/resolveModel.js.map +1 -1
  152. package/esm/models/search/CaseSearchModel.js.map +1 -1
  153. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  154. package/esm/models/sorting/SortingModel.js.map +1 -1
  155. package/esm/models/tab/TabModel.js.map +1 -1
  156. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  157. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  158. package/esm/models/user/UserModel.js.map +1 -1
  159. package/esm/models/user/UserProfileModel.js.map +1 -1
  160. package/esm/models/user/UserServicesModel.js.map +1 -1
  161. package/esm/modularui/Authenticate.js.map +1 -1
  162. package/esm/modularui/CaptchaRequest.js.map +1 -1
  163. package/esm/modularui/ModularUIError.js.map +1 -1
  164. package/esm/modularui/ModularUIRequest.js.map +1 -1
  165. package/esm/modularui/ModularUIResponse.js.map +1 -1
  166. package/esm/modularui/UploadRequest.js.map +1 -1
  167. package/esm/react/ErrorBoundary.js.map +1 -1
  168. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  169. package/esm/react/utils.js.map +1 -1
  170. package/esm/react-client/Init.js.map +1 -1
  171. package/esm/react-client/client.js +6 -5
  172. package/esm/react-client/client.js.map +1 -1
  173. package/esm/react-client/contextPath.js.map +1 -1
  174. package/esm/react-client/rehydrate.js.map +1 -1
  175. package/esm/react-server/contextPath.js.map +1 -1
  176. package/esm/react-server/createSSRComplete.js.map +1 -1
  177. package/esm/react-server/htmlpage.js.map +1 -1
  178. package/esm/react-server/renderSSRComplete.js.map +1 -1
  179. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  180. package/esm/react-server/requestInformation.js.map +1 -1
  181. package/esm/react-server/serverNoSSR.js.map +1 -1
  182. package/esm/react-server/serverSSR.js.map +1 -1
  183. package/esm/react-server/serverUtil.js.map +1 -1
  184. package/esm/react-theme/ThemeProvider.js.map +1 -1
  185. package/esm/react-theme/createTheme.js.map +1 -1
  186. package/esm/react-theme/useTheme.js.map +1 -1
  187. package/esm/react-theme/utils/background.js.map +1 -1
  188. package/esm/react-theme/utils/colors.js.map +1 -1
  189. package/esm/react-theme/utils/contrast.js.map +1 -1
  190. package/esm/react-theme/utils/corners.js.map +1 -1
  191. package/esm/react-theme/utils/spacers.js.map +1 -1
  192. package/esm/react-theme/utils/themeProps.js.map +1 -1
  193. package/esm/redux/_i18n/I18nActions.js.map +1 -1
  194. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  195. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  196. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  197. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  198. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  199. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
  200. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  201. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  202. package/esm/redux/_router/RouterActions.js.map +1 -1
  203. package/esm/redux/_router/RouterReducer.js.map +1 -1
  204. package/esm/redux/actions/Application.js.map +1 -1
  205. package/esm/redux/actions/Error.js.map +1 -1
  206. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  207. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  208. package/esm/redux/actions/FormAutosave.js.map +1 -1
  209. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  210. package/esm/redux/actions/FormValidations.js.map +1 -1
  211. package/esm/redux/actions/Notification.js.map +1 -1
  212. package/esm/redux/actions/Preferences.js +2 -2
  213. package/esm/redux/actions/Preferences.js.map +1 -1
  214. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  215. package/esm/redux/actions/SignIn.js.map +1 -1
  216. package/esm/redux/actions/SignOut.js.map +1 -1
  217. package/esm/redux/connectors/CaseView.js.map +1 -1
  218. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  219. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  220. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  221. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  222. package/esm/redux/connectors/Form.js.map +1 -1
  223. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  224. package/esm/redux/connectors/ListDetail.js.map +1 -1
  225. package/esm/redux/connectors/Modal.js.map +1 -1
  226. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  227. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  228. package/esm/redux/connectors/Preferences.js.map +1 -1
  229. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  230. package/esm/redux/connectors/Tab.js.map +1 -1
  231. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  232. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  233. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  234. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  235. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  236. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  237. package/esm/redux/reducers/createReducer.js.map +1 -1
  238. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  239. package/esm/redux/store/configureStore.js.map +1 -1
  240. package/esm/utils/browser/Cache.js.map +1 -1
  241. package/esm/utils/browser/Cookies.js.map +1 -1
  242. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  243. package/esm/utils/fetch/serverFetch.js.map +1 -1
  244. package/esm/utils/fetch/universalFetch.js.map +1 -1
  245. package/esm/utils/fetch/xhr.js.map +1 -1
  246. package/esm/utils/helpers/checkResource.js.map +1 -1
  247. package/esm/utils/helpers/createUUID.js.map +1 -1
  248. package/esm/utils/helpers/objects.js.map +1 -1
  249. package/esm/utils/helpers/repositoryResource.js.map +1 -1
  250. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  251. package/esm/utils/number/DecimalFormat.js.map +1 -1
  252. package/esm/utils/number/formatValue.js.map +1 -1
  253. package/esm/utils/number/parseNumbers.js.map +1 -1
  254. package/lib/builder/index.js.map +1 -1
  255. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  256. package/lib/constants/Constants.js.map +1 -1
  257. package/lib/constants/LayoutHintConfig.js.map +1 -1
  258. package/lib/constants/LayoutHints.js.map +1 -1
  259. package/lib/constants/Settings.js.map +1 -1
  260. package/lib/constants/index.js.map +1 -1
  261. package/lib/exceptions/ConfigurationException.js.map +1 -1
  262. package/lib/exceptions/FetchException.js.map +1 -1
  263. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  264. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  265. package/lib/exceptions/IllegalStateException.js.map +1 -1
  266. package/lib/exceptions/JsonParseException.js.map +1 -1
  267. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  268. package/lib/exceptions/NetworkException.js.map +1 -1
  269. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  270. package/lib/exceptions/NotFoundException.js.map +1 -1
  271. package/lib/exceptions/ServerRequestException.js.map +1 -1
  272. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  273. package/lib/exceptions/TimeoutException.js.map +1 -1
  274. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  275. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  276. package/lib/exceptions/index.js.map +1 -1
  277. package/lib/hooks/index.js.map +1 -1
  278. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  279. package/lib/hooks/useAuthentication.js.map +1 -1
  280. package/lib/hooks/useContent.js.map +1 -1
  281. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  282. package/lib/hooks/useForm.js.map +1 -1
  283. package/lib/hooks/useI18n.js.map +1 -1
  284. package/lib/hooks/useModal.js.map +1 -1
  285. package/lib/hooks/useModelCatalog.js.map +1 -1
  286. package/lib/hooks/useModels.js.map +1 -1
  287. package/lib/hooks/useModularUI.js.map +1 -1
  288. package/lib/hooks/useModularUIBasic.js.map +1 -1
  289. package/lib/hooks/useModularUIModel.js.map +1 -1
  290. package/lib/hooks/useModularUIRequest.js.map +1 -1
  291. package/lib/hooks/useNotification.js.map +1 -1
  292. package/lib/hooks/usePreference.js.map +1 -1
  293. package/lib/hooks/useProgressIndicator.js.map +1 -1
  294. package/lib/hooks/useRouter.js.map +1 -1
  295. package/lib/i18n/Locale.js.map +1 -1
  296. package/lib/i18n/Locales.js.map +1 -1
  297. package/lib/i18n/Message.js.map +1 -1
  298. package/lib/i18n/index.js.map +1 -1
  299. package/lib/i18n/languages.js.map +1 -1
  300. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  301. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  302. package/lib/i18n/withMessage.js.map +1 -1
  303. package/lib/index.js.map +1 -1
  304. package/lib/models/actions/ActionCollection.js.map +1 -1
  305. package/lib/models/actions/ActionModel.js.map +1 -1
  306. package/lib/models/application/ApplicationModel.js.map +1 -1
  307. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  308. package/lib/models/attributes/AttributeContent.js.map +1 -1
  309. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  310. package/lib/models/attributes/AttributeModel.js.map +1 -1
  311. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  312. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  313. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  314. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  315. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  316. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  317. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  318. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  319. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  320. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  321. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  322. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  323. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  324. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  325. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  326. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  327. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  328. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  329. package/lib/models/attributes/_createAttribute.js.map +1 -1
  330. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  331. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  332. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  333. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  334. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  335. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  336. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  337. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  338. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  339. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  340. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  341. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  342. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  343. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  344. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  345. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  346. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  347. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  348. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  349. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  350. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  351. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  352. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  353. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  354. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  355. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  356. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  357. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  358. package/lib/models/base/BaseCollection.js.map +1 -1
  359. package/lib/models/base/BaseModel.js.map +1 -1
  360. package/lib/models/base/ResourceCollection.js.map +1 -1
  361. package/lib/models/base/ResourceModel.js.map +1 -1
  362. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  363. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  364. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  365. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  366. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  367. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  368. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  369. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  370. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  371. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  372. package/lib/models/content/ContentIndexModel.js.map +1 -1
  373. package/lib/models/content/ContentLinkModel.js.map +1 -1
  374. package/lib/models/content/ContentModel.js.map +1 -1
  375. package/lib/models/content/ContentTOCModel.js.map +1 -1
  376. package/lib/models/content/ContentTypeModel.js.map +1 -1
  377. package/lib/models/content/SectionModel.js.map +1 -1
  378. package/lib/models/content/SubSectionModel.js.map +1 -1
  379. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  380. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  381. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  382. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  383. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  384. package/lib/models/detail/DetailModel.js.map +1 -1
  385. package/lib/models/error/ErrorCollection.js.map +1 -1
  386. package/lib/models/error/ErrorModel.js.map +1 -1
  387. package/lib/models/error/ErrorResponse.js.map +1 -1
  388. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  389. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  390. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  391. package/lib/models/filters/FilterCollection.js.map +1 -1
  392. package/lib/models/filters/FilterModel.js.map +1 -1
  393. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  394. package/lib/models/form/FormModel.js.map +1 -1
  395. package/lib/models/form/FormObjectModel.js.map +1 -1
  396. package/lib/models/grouping/GroupingModel.js.map +1 -1
  397. package/lib/models/href/Href.js.map +1 -1
  398. package/lib/models/href/ListHref.js.map +1 -1
  399. package/lib/models/index.js.map +1 -1
  400. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  401. package/lib/models/links/LinkCollection.js.map +1 -1
  402. package/lib/models/links/LinkModel.js.map +1 -1
  403. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  404. package/lib/models/list/ListDetailModel.js.map +1 -1
  405. package/lib/models/list/ListHeaderModel.js.map +1 -1
  406. package/lib/models/list/ListItemCollection.js.map +1 -1
  407. package/lib/models/list/ListItemModel.js.map +1 -1
  408. package/lib/models/list/ListModel.js.map +1 -1
  409. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  410. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  411. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  412. package/lib/models/paging/PagesizeModel.js.map +1 -1
  413. package/lib/models/paging/PagingModel.js.map +1 -1
  414. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  415. package/lib/models/parameter/Parameter.js.map +1 -1
  416. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  417. package/lib/models/resolveModel.js.map +1 -1
  418. package/lib/models/search/CaseSearchModel.js.map +1 -1
  419. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  420. package/lib/models/sorting/SortingModel.js.map +1 -1
  421. package/lib/models/tab/TabModel.js.map +1 -1
  422. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  423. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  424. package/lib/models/user/UserModel.js.map +1 -1
  425. package/lib/models/user/UserProfileModel.js.map +1 -1
  426. package/lib/models/user/UserServicesModel.js.map +1 -1
  427. package/lib/modularui/Authenticate.js.map +1 -1
  428. package/lib/modularui/CaptchaRequest.js.map +1 -1
  429. package/lib/modularui/ModularUIError.js.map +1 -1
  430. package/lib/modularui/ModularUIRequest.js.map +1 -1
  431. package/lib/modularui/ModularUIResponse.js.map +1 -1
  432. package/lib/modularui/UploadRequest.js.map +1 -1
  433. package/lib/modularui/index.js.map +1 -1
  434. package/lib/react/ErrorBoundary.js.map +1 -1
  435. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  436. package/lib/react/index.js.map +1 -1
  437. package/lib/react/utils.js.map +1 -1
  438. package/lib/react-client/Init.js.map +1 -1
  439. package/lib/react-client/client.js +6 -5
  440. package/lib/react-client/client.js.flow +14 -7
  441. package/lib/react-client/client.js.map +1 -1
  442. package/lib/react-client/contextPath.js.map +1 -1
  443. package/lib/react-client/index.js.map +1 -1
  444. package/lib/react-client/rehydrate.js.map +1 -1
  445. package/lib/react-server/__tests__/serverUtil.spec.js.flow +4 -4
  446. package/lib/react-server/contextPath.js.map +1 -1
  447. package/lib/react-server/createSSRComplete.js.map +1 -1
  448. package/lib/react-server/htmlpage.js.map +1 -1
  449. package/lib/react-server/index.js.map +1 -1
  450. package/lib/react-server/renderSSRComplete.js.map +1 -1
  451. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  452. package/lib/react-server/requestInformation.js.map +1 -1
  453. package/lib/react-server/serverNoSSR.js.map +1 -1
  454. package/lib/react-server/serverSSR.js.map +1 -1
  455. package/lib/react-server/serverUtil.js.map +1 -1
  456. package/lib/react-theme/ThemeProvider.js.map +1 -1
  457. package/lib/react-theme/createTheme.js.map +1 -1
  458. package/lib/react-theme/index.js.map +1 -1
  459. package/lib/react-theme/useTheme.js.map +1 -1
  460. package/lib/react-theme/utils/background.js.map +1 -1
  461. package/lib/react-theme/utils/colors.js.map +1 -1
  462. package/lib/react-theme/utils/contrast.js.map +1 -1
  463. package/lib/react-theme/utils/corners.js.map +1 -1
  464. package/lib/react-theme/utils/spacers.js.map +1 -1
  465. package/lib/react-theme/utils/themeProps.js.map +1 -1
  466. package/lib/redux/_i18n/I18nActions.js.map +1 -1
  467. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  468. package/lib/redux/_i18n/index.js.map +1 -1
  469. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  470. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  471. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  472. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  473. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  474. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  475. package/lib/redux/_modularui/index.js.map +1 -1
  476. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  477. package/lib/redux/_router/RouterActions.js.map +1 -1
  478. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  479. package/lib/redux/_router/RouterMiddleware.js.map +1 -1
  480. package/lib/redux/_router/RouterReducer.js.map +1 -1
  481. package/lib/redux/_router/index.js.map +1 -1
  482. package/lib/redux/actions/Application.js.map +1 -1
  483. package/lib/redux/actions/Authorization.js.map +1 -1
  484. package/lib/redux/actions/Error.js.map +1 -1
  485. package/lib/redux/actions/Form.js.map +1 -1
  486. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  487. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  488. package/lib/redux/actions/FormAutosave.js.map +1 -1
  489. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  490. package/lib/redux/actions/FormValidations.js.map +1 -1
  491. package/lib/redux/actions/Modals.js.map +1 -1
  492. package/lib/redux/actions/Notification.js.map +1 -1
  493. package/lib/redux/actions/Preferences.js +2 -2
  494. package/lib/redux/actions/Preferences.js.flow +3 -2
  495. package/lib/redux/actions/Preferences.js.map +1 -1
  496. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  497. package/lib/redux/actions/SignIn.js.map +1 -1
  498. package/lib/redux/actions/SignOut.js.map +1 -1
  499. package/lib/redux/actions/index.js.map +1 -1
  500. package/lib/redux/connectors/Application.js.map +1 -1
  501. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  502. package/lib/redux/connectors/CaseView.js.map +1 -1
  503. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  504. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  505. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  506. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  507. package/lib/redux/connectors/Form.js.map +1 -1
  508. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  509. package/lib/redux/connectors/ListDetail.js.map +1 -1
  510. package/lib/redux/connectors/Modal.js.map +1 -1
  511. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  512. package/lib/redux/connectors/Notification.js.map +1 -1
  513. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  514. package/lib/redux/connectors/Preferences.js.map +1 -1
  515. package/lib/redux/connectors/Progress.js.map +1 -1
  516. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  517. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  518. package/lib/redux/connectors/SignIn.js.map +1 -1
  519. package/lib/redux/connectors/SignOut.js.map +1 -1
  520. package/lib/redux/connectors/Tab.js.map +1 -1
  521. package/lib/redux/connectors/index.js.map +1 -1
  522. package/lib/redux/index.js.map +1 -1
  523. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  524. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  525. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  526. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  527. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  528. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  529. package/lib/redux/reducers/createReducer.js.map +1 -1
  530. package/lib/redux/reducers/index.js.map +1 -1
  531. package/lib/redux/selectors/i18n.js.map +1 -1
  532. package/lib/redux/selectors/index.js.map +1 -1
  533. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  534. package/lib/redux/store/configureStore.js.map +1 -1
  535. package/lib/utils/browser/Cache.js.map +1 -1
  536. package/lib/utils/browser/Cookies.js.map +1 -1
  537. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  538. package/lib/utils/fetch/serverFetch.js.map +1 -1
  539. package/lib/utils/fetch/universalFetch.js.map +1 -1
  540. package/lib/utils/fetch/xhr.js.map +1 -1
  541. package/lib/utils/helpers/checkResource.js.map +1 -1
  542. package/lib/utils/helpers/createHash.js.map +1 -1
  543. package/lib/utils/helpers/createUUID.js.map +1 -1
  544. package/lib/utils/helpers/index.js.map +1 -1
  545. package/lib/utils/helpers/objects.js.map +1 -1
  546. package/lib/utils/helpers/repositoryResource.js.map +1 -1
  547. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  548. package/lib/utils/helpers/text.js.map +1 -1
  549. package/lib/utils/index.js.map +1 -1
  550. package/lib/utils/number/DecimalFormat.js.map +1 -1
  551. package/lib/utils/number/formatValue.js.map +1 -1
  552. package/lib/utils/number/parseNumbers.js.map +1 -1
  553. package/package.json +5 -5
  554. package/src/react-client/client.js +14 -7
  555. package/src/react-server/__tests__/serverUtil.spec.js +4 -4
  556. package/src/redux/actions/Preferences.js +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIMiddleware.js","names":["ModularUIRequest","HTTP_METHODS","startProgress","finishProgress","handleError","createRequest","modularui","request","href","method","GET","data","locale","childmodels","isReload","targetModel","forceTargetModel","responseHandler","next","dispatch","successAction","model","successResult","then","result","catch","error","Error","errorHandler","errorAction","err","errorResult","handleFetch","action","requestOptions","payload","modularuiRequest","fetch","modularUIMiddleware","api","type","getState","i18n"],"sources":["../../../src/redux/_modularui/ModularUIMiddleware.js"],"sourcesContent":["// @flow\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport type { Middleware, MiddlewareAPI } from \"redux\";\nimport type {\n ReduxAction,\n ReduxState,\n Dispatch,\n PossibleAction,\n} from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIAction, SuccessAction, ErrorAction } from \"./types\";\nimport type { TargetModel } from \"../../modularui/types\";\n\ntype RequestOptions = {\n href: Href,\n method?: $Keys<typeof HTTP_METHODS>,\n data?: any,\n locale: string,\n childmodels?: boolean,\n targetModel?: TargetModel,\n forceTargetModel?: boolean,\n isReload?: boolean,\n};\n\n/**\n * Symbol key that carries API call info interpreted by this Redux middleware.\n */\nconst createRequest = (modularui: RequestOptions): ModularUIRequest => {\n const request = new ModularUIRequest(modularui.href, {\n method: modularui.method || HTTP_METHODS.GET,\n data: modularui.data || {},\n locale: modularui.locale,\n childmodels: modularui.childmodels ?? true,\n isReload: modularui.isReload,\n });\n\n if (modularui.targetModel) {\n request.targetModel = modularui.targetModel;\n request.forceTargetModel = modularui.forceTargetModel ?? false;\n }\n\n return request;\n};\n\n/**\n */\nconst responseHandler = (\n next: Dispatch,\n dispatch: Dispatch,\n successAction: SuccessAction,\n model: ModularUIModel\n) => {\n if (successAction) {\n const successResult = successAction(model);\n\n if (successResult instanceof Promise) {\n successResult\n .then((result) => {\n dispatch(result);\n })\n .catch((error) => {\n next(handleError(error));\n });\n } else {\n try {\n dispatch(successResult);\n } catch (error) {\n throw new Error(\n `Result of successResult is not a valid redux action: ${error}`\n );\n }\n }\n }\n\n return next(finishProgress());\n};\n\n/**\n */\nconst errorHandler = (\n next: Dispatch,\n dispatch: Dispatch,\n errorAction: ?ErrorAction,\n err: any\n) => {\n dispatch(finishProgress());\n\n if (errorAction) {\n const errorResult = errorAction(err);\n\n if (errorResult instanceof Promise) {\n errorResult.then((result) => dispatch(result));\n } else {\n dispatch(errorResult);\n }\n }\n\n return next(handleError(err));\n};\n\n/**\n */\nconst handleFetch = (\n action: ModularUIAction,\n locale: string,\n dispatch: Dispatch,\n next: Dispatch\n) => {\n dispatch(startProgress());\n\n const { successAction, errorAction, ...requestOptions } = action.payload;\n requestOptions.locale = locale;\n\n const modularuiRequest = createRequest(requestOptions);\n\n return modularuiRequest\n .fetch()\n .then((model) => responseHandler(next, dispatch, successAction, model))\n .catch((error) => errorHandler(next, dispatch, errorAction, error));\n};\n\n/**\n */\nexport const modularUIMiddleware: Middleware<\n ReduxState,\n ReduxAction,\n Dispatch\n> =\n (api: MiddlewareAPI<ReduxState, ReduxAction, Dispatch>) =>\n (next: Dispatch) =>\n (action: PossibleAction) => {\n if (action.type === \"MODULARUI/FETCH\") {\n return handleFetch(\n // $FlowExpectedError[incompatible-exact]\n action,\n api.getState().i18n.locale,\n api.dispatch,\n next\n );\n }\n\n return next(action);\n };\n"],"mappings":";AACA,OAAOA,gBAAgB,MAAM,kCAAkC;AAC/D,SAASC,YAAY,QAAQ,2BAA2B;AAExD,SAASC,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAE5E,SAASC,WAAW,QAAQ,kBAAkB;AAyB9C;AACA;AACA;AACA,MAAMC,aAAa,GAAIC,SAAyB,IAAuB;EACrE,MAAMC,OAAO,GAAG,IAAIP,gBAAgB,CAACM,SAAS,CAACE,IAAI,EAAE;IACnDC,MAAM,EAAEH,SAAS,CAACG,MAAM,IAAIR,YAAY,CAACS,GAAG;IAC5CC,IAAI,EAAEL,SAAS,CAACK,IAAI,IAAI,CAAC,CAAC;I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,CAAEC,MAAM,IAAKL,QAAQ,CAACK,MAAM,CAAC,CAAC;IAChD,CAAC,MAAM;MACLL,QAAQ,CAACY,WAAW,CAAC;IACvB;EACF;EAEA,OAAOb,IAAI,CAACd,WAAW,CAAC0B,GAAG,CAAC,CAAC;AAC/B,CAAC;;AAED;AACA;AACA,MAAME,WAAW,GAAG,CAClBC,MAAuB,EACvBrB,MAAc,EACdO,QAAkB,EAClBD,IAAc,KACX;EACHC,QAAQ,CAACjB,aAAa,EAAE,CAAC;EAEzB,MAAM;IAAEkB,aAAa;IAAES,WAAW;IAAE,GAAGK;EAAe,CAAC,GAAGD,MAAM,CAACE,OAAO;EACxED,cAAc,CAACtB,MAAM,GAAGA,MAAM;EAE9B,MAAMwB,gBAAgB,GAAG/B,aAAa,CAAC6B,cAAc,CAAC;EAEtD,OAAOE,gBAAgB,CACpBC,KAAK,EAAE,CACPd,IAAI,CAAEF,KAAK,IAAKJ,eAAe,CAACC,IAAI,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,KAAK,CAAC,CAAC,CACtEI,KAAK,CAAEC,KAAK,IAAKE,YAAY,CAACV,IAAI,EAAEC,QAAQ,EAAEU,WAAW,EAAEH,KAAK,CAAC,CAAC;AACvE,CAAC;;AAED;AACA;AACA,OAAO,MAAMY,mBAIZ,GACEC,GAAqD,IACrDrB,IAAc,IACde,MAAsB,IAAK;EAC1B,IAAIA,MAAM,CAACO,IAAI,KAAK,iBAAiB,EAAE;IACrC,OAAOR,WAAW;IAChB;IACAC,MAAM,EACNM,GAAG,CAACE,QAAQ,EAAE,CAACC,IAAI,CAAC9B,MAAM,EAC1B2B,GAAG,CAACpB,QAAQ,EACZD,IAAI,CACL;EACH;EAEA,OAAOA,IAAI,CAACe,MAAM,CAAC;AACrB,CAAC"}
1
+ {"version":3,"file":"ModularUIMiddleware.js","names":["ModularUIRequest","HTTP_METHODS","startProgress","finishProgress","handleError","createRequest","modularui","request","href","method","GET","data","locale","childmodels","isReload","targetModel","forceTargetModel","responseHandler","next","dispatch","successAction","model","successResult","_Promise","then","result","catch","error","Error","errorHandler","errorAction","err","errorResult","handleFetch","action","requestOptions","payload","modularuiRequest","fetch","modularUIMiddleware","api","type","getState","i18n"],"sources":["../../../src/redux/_modularui/ModularUIMiddleware.js"],"sourcesContent":["// @flow\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport type { Middleware, MiddlewareAPI } from \"redux\";\nimport type {\n ReduxAction,\n ReduxState,\n Dispatch,\n PossibleAction,\n} from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIAction, SuccessAction, ErrorAction } from \"./types\";\nimport type { TargetModel } from \"../../modularui/types\";\n\ntype RequestOptions = {\n href: Href,\n method?: $Keys<typeof HTTP_METHODS>,\n data?: any,\n locale: string,\n childmodels?: boolean,\n targetModel?: TargetModel,\n forceTargetModel?: boolean,\n isReload?: boolean,\n};\n\n/**\n * Symbol key that carries API call info interpreted by this Redux middleware.\n */\nconst createRequest = (modularui: RequestOptions): ModularUIRequest => {\n const request = new ModularUIRequest(modularui.href, {\n method: modularui.method || HTTP_METHODS.GET,\n data: modularui.data || {},\n locale: modularui.locale,\n childmodels: modularui.childmodels ?? true,\n isReload: modularui.isReload,\n });\n\n if (modularui.targetModel) {\n request.targetModel = modularui.targetModel;\n request.forceTargetModel = modularui.forceTargetModel ?? false;\n }\n\n return request;\n};\n\n/**\n */\nconst responseHandler = (\n next: Dispatch,\n dispatch: Dispatch,\n successAction: SuccessAction,\n model: ModularUIModel\n) => {\n if (successAction) {\n const successResult = successAction(model);\n\n if (successResult instanceof Promise) {\n successResult\n .then((result) => {\n dispatch(result);\n })\n .catch((error) => {\n next(handleError(error));\n });\n } else {\n try {\n dispatch(successResult);\n } catch (error) {\n throw new Error(\n `Result of successResult is not a valid redux action: ${error}`\n );\n }\n }\n }\n\n return next(finishProgress());\n};\n\n/**\n */\nconst errorHandler = (\n next: Dispatch,\n dispatch: Dispatch,\n errorAction: ?ErrorAction,\n err: any\n) => {\n dispatch(finishProgress());\n\n if (errorAction) {\n const errorResult = errorAction(err);\n\n if (errorResult instanceof Promise) {\n errorResult.then((result) => dispatch(result));\n } else {\n dispatch(errorResult);\n }\n }\n\n return next(handleError(err));\n};\n\n/**\n */\nconst handleFetch = (\n action: ModularUIAction,\n locale: string,\n dispatch: Dispatch,\n next: Dispatch\n) => {\n dispatch(startProgress());\n\n const { successAction, errorAction, ...requestOptions } = action.payload;\n requestOptions.locale = locale;\n\n const modularuiRequest = createRequest(requestOptions);\n\n return modularuiRequest\n .fetch()\n .then((model) => responseHandler(next, dispatch, successAction, model))\n .catch((error) => errorHandler(next, dispatch, errorAction, error));\n};\n\n/**\n */\nexport const modularUIMiddleware: Middleware<\n ReduxState,\n ReduxAction,\n Dispatch\n> =\n (api: MiddlewareAPI<ReduxState, ReduxAction, Dispatch>) =>\n (next: Dispatch) =>\n (action: PossibleAction) => {\n if (action.type === \"MODULARUI/FETCH\") {\n return handleFetch(\n // $FlowExpectedError[incompatible-exact]\n action,\n api.getState().i18n.locale,\n api.dispatch,\n next\n );\n }\n\n return next(action);\n };\n"],"mappings":";AACA,OAAOA,gBAAgB,MAAM,kCAAkC;AAC/D,SAASC,YAAY,QAAQ,2BAA2B;AAExD,SAASC,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAE5E,SAASC,WAAW,QAAQ,kBAAkB;AAyB9C;AACA;AACA;AACA,MAAMC,aAAa,GAAIC,SAAyB,IAAuB;EACrE,MAAMC,OAAO,GAAG,IAAIP,gBAAgB,CAACM,SAAS,CAACE,IAAI,EAAE;IACnDC,MAAM,EAAEH,SAAS,CAACG,MAAM,IAAIR,YAAY,CAACS,GAAG;IAC5CC,IAAI,EAAEL,SAAS,CAACK,IAAI,IAAI,CAAC,CAAC;IAC1BC,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ACR,IAAI,CAAEC,MAAM,IAAKN,QAAQ,CAACM,MAAM,CAAC,CAAC;IAChD,CAAC,MAAM;MACLN,QAAQ,CAACa,WAAW,CAAC;IACvB;EACF;EAEA,OAAOd,IAAI,CAACd,WAAW,CAAC2B,GAAG,CAAC,CAAC;AAC/B,CAAC;;AAED;AACA;AACA,MAAME,WAAW,GAAGA,CAClBC,MAAuB,EACvBtB,MAAc,EACdO,QAAkB,EAClBD,IAAc,KACX;EACHC,QAAQ,CAACjB,aAAa,EAAE,CAAC;EAEzB,MAAM;IAAEkB,aAAa;IAAEU,WAAW;IAAE,GAAGK;EAAe,CAAC,GAAGD,MAAM,CAACE,OAAO;EACxED,cAAc,CAACvB,MAAM,GAAGA,MAAM;EAE9B,MAAMyB,gBAAgB,GAAGhC,aAAa,CAAC8B,cAAc,CAAC;EAEtD,OAAOE,gBAAgB,CACpBC,KAAK,EAAE,CACPd,IAAI,CAAEH,KAAK,IAAKJ,eAAe,CAACC,IAAI,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,KAAK,CAAC,CAAC,CACtEK,KAAK,CAAEC,KAAK,IAAKE,YAAY,CAACX,IAAI,EAAEC,QAAQ,EAAEW,WAAW,EAAEH,KAAK,CAAC,CAAC;AACvE,CAAC;;AAED;AACA;AACA,OAAO,MAAMY,mBAIZ,GACEC,GAAqD,IACrDtB,IAAc,IACdgB,MAAsB,IAAK;EAC1B,IAAIA,MAAM,CAACO,IAAI,KAAK,iBAAiB,EAAE;IACrC,OAAOR,WAAW;IAChB;IACAC,MAAM,EACNM,GAAG,CAACE,QAAQ,EAAE,CAACC,IAAI,CAAC/B,MAAM,EAC1B4B,GAAG,CAACrB,QAAQ,EACZD,IAAI,CACL;EACH;EAEA,OAAOA,IAAI,CAACgB,MAAM,CAAC;AACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIReducer.js","names":["IllegalArgumentException","MODULARUI_STATUS","ApplicationModel","updateStatus","state","key","status","LOADING","lastModification","Date","now","setModel","model","initModularUI","models","newState","forEach","FINISHED","getModelKey","connectKey","updateModel","modelKey","Error","removeKey","resetModularUI","initialState","ModularUIReducer","action","type","payload"],"sources":["../../../src/redux/_modularui/ModularUIReducer.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport { ApplicationModel } from \"../../models\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { ModularUIState } from \"./types\";\nimport type { ModularUIModel } from \"../../models\";\n\n/**\n */\nconst updateStatus = (\n state: ModularUIState,\n { key, status }: { key: string, status: $Keys<typeof MODULARUI_STATUS> }\n) => {\n // model should always be available when status is not loading\n if (status !== MODULARUI_STATUS.LOADING && !state[key]) {\n return state;\n }\n\n return {\n ...state,\n [key]: {\n ...state[key],\n status,\n lastModification: Date.now(),\n },\n };\n};\n\n/**\n */\nconst setModel = (\n state: ModularUIState,\n { key, model }: { key: string, model: ?ModularUIModel }\n) => {\n if (!state[key]) {\n return state;\n }\n\n if (model) {\n return {\n ...state,\n [key]: {\n ...state[key],\n model,\n lastModification: Date.now(),\n },\n };\n }\n\n throw new IllegalArgumentException(\"No model for setModel\");\n};\n\n/**\n */\nconst initModularUI = (\n state: ModularUIState,\n models: Array<{ key: string, model: ModularUIModel }>\n) => {\n const newState = Object.assign({}, state);\n\n models.forEach(({ key, model }) => {\n newState[key] = {\n status: MODULARUI_STATUS.FINISHED,\n lastModification: Date.now(),\n model,\n };\n });\n\n return newState;\n};\n\n/**\n */\nconst getModelKey = (state: ModularUIState, model: ModularUIModel) =>\n Object.keys(state).find((key) => {\n const connectKey = state[key]?.model?.connectKey ?? \"\";\n return connectKey === model.connectKey;\n });\n\n/**\n */\nconst updateModel = (state: ModularUIState, model: ModularUIModel) => {\n const modelKey = getModelKey(state, model);\n\n if (modelKey) {\n return setModel(state, { key: modelKey, model });\n }\n\n throw new Error(\n `ModularUIReducer: Cannot update model with key ${model.connectKey}`\n );\n};\n\n/**\n */\nconst removeKey = (modelKey: string, state: ModularUIState): ModularUIState => {\n const newState = Object.assign({}, state);\n delete newState[modelKey];\n return newState;\n};\n\n/**\n * Remove all but application models\n */\nconst resetModularUI = (state: ModularUIState) => {\n const newState: ModularUIState = {};\n\n for (const key in state) {\n if (state[key].model instanceof ApplicationModel) {\n newState[key] = { ...state[key] };\n }\n }\n\n return newState;\n};\n\nconst initialState: ModularUIState = {};\n\n/**\n * Modular UI Reducer\n */\nexport const ModularUIReducer: Reducer<ModularUIState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"MODULARUI/INIT\":\n return initModularUI(state, action.payload);\n\n case \"MODULARUI/RESET\":\n return resetModularUI(state);\n\n case \"MODULARUI/STATUS\":\n return updateStatus(state, action.payload);\n\n case \"MODULARUI/SET\":\n return setModel(state, action.payload);\n\n case \"MODULARUI/UPDATE\":\n case \"MODULARUI/UPDATE_FORM\":\n return updateModel(state, action.payload);\n\n case \"MODULARUI/REMOVE_KEY\":\n return removeKey(action.payload, state);\n\n default:\n return state;\n }\n};\n"],"mappings":";;;AACA,SAASA,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,gBAAgB,QAAQ,cAAc;AAO/C;AACA;AACA,MAAMC,YAAY,GAAG,CACnBC,KAAqB,WAElB;EAAA,IADH;IAAEC,GAAG;IAAEC;EAAgE,CAAC;EAExE;EACA,IAAIA,MAAM,KAAKL,gBAAgB,CAACM,OAAO,IAAI,CAACH,KAAK,CAACC,GAAG,CAAC,EAAE;IACtD,OAAOD,KAAK;EACd;EAEA,OAAO;IACL,GAAGA,KAAK;IACR,CAACC,GAAG,GAAG;MACL,GAAGD,KAAK,CAACC,GAAG,CAAC;MACbC,MAAM;MACNE,gBAAgB,EAAEC,IAAI,CAACC,GAAG;IAC5B;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAMC,Q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,eAAe;MAClB,OAAOlB,QAAQ,CAACP,KAAK,EAAEuB,MAAM,CAACE,OAAO,CAAC;IAExC,KAAK,kBAAkB;IACvB,KAAK,uBAAuB;MAC1B,OAAOT,WAAW,CAAChB,KAAK,EAAEuB,MAAM,CAACE,OAAO,CAAC;IAE3C,KAAK,sBAAsB;MACzB,OAAON,SAAS,CAACI,MAAM,CAACE,OAAO,EAAEzB,KAAK,CAAC;IAEzC;MACE,OAAOA,KAAK;EAAC;AAEnB,CAAC"}
1
+ {"version":3,"file":"ModularUIReducer.js","names":["IllegalArgumentException","MODULARUI_STATUS","ApplicationModel","updateStatus","state","_ref","key","status","LOADING","lastModification","Date","now","setModel","_ref2","model","initModularUI","models","newState","_Object$assign","forEach","_ref3","FINISHED","getModelKey","_context","_findInstanceProperty","_Object$keys","call","connectKey","updateModel","modelKey","Error","removeKey","resetModularUI","initialState","ModularUIReducer","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/_modularui/ModularUIReducer.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport { ApplicationModel } from \"../../models\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { ModularUIState } from \"./types\";\nimport type { ModularUIModel } from \"../../models\";\n\n/**\n */\nconst updateStatus = (\n state: ModularUIState,\n { key, status }: { key: string, status: $Keys<typeof MODULARUI_STATUS> }\n) => {\n // model should always be available when status is not loading\n if (status !== MODULARUI_STATUS.LOADING && !state[key]) {\n return state;\n }\n\n return {\n ...state,\n [key]: {\n ...state[key],\n status,\n lastModification: Date.now(),\n },\n };\n};\n\n/**\n */\nconst setModel = (\n state: ModularUIState,\n { key, model }: { key: string, model: ?ModularUIModel }\n) => {\n if (!state[key]) {\n return state;\n }\n\n if (model) {\n return {\n ...state,\n [key]: {\n ...state[key],\n model,\n lastModification: Date.now(),\n },\n };\n }\n\n throw new IllegalArgumentException(\"No model for setModel\");\n};\n\n/**\n */\nconst initModularUI = (\n state: ModularUIState,\n models: Array<{ key: string, model: ModularUIModel }>\n) => {\n const newState = Object.assign({}, state);\n\n models.forEach(({ key, model }) => {\n newState[key] = {\n status: MODULARUI_STATUS.FINISHED,\n lastModification: Date.now(),\n model,\n };\n });\n\n return newState;\n};\n\n/**\n */\nconst getModelKey = (state: ModularUIState, model: ModularUIModel) =>\n Object.keys(state).find((key) => {\n const connectKey = state[key]?.model?.connectKey ?? \"\";\n return connectKey === model.connectKey;\n });\n\n/**\n */\nconst updateModel = (state: ModularUIState, model: ModularUIModel) => {\n const modelKey = getModelKey(state, model);\n\n if (modelKey) {\n return setModel(state, { key: modelKey, model });\n }\n\n throw new Error(\n `ModularUIReducer: Cannot update model with key ${model.connectKey}`\n );\n};\n\n/**\n */\nconst removeKey = (modelKey: string, state: ModularUIState): ModularUIState => {\n const newState = Object.assign({}, state);\n delete newState[modelKey];\n return newState;\n};\n\n/**\n * Remove all but application models\n */\nconst resetModularUI = (state: ModularUIState) => {\n const newState: ModularUIState = {};\n\n for (const key in state) {\n if (state[key].model instanceof ApplicationModel) {\n newState[key] = { ...state[key] };\n }\n }\n\n return newState;\n};\n\nconst initialState: ModularUIState = {};\n\n/**\n * Modular UI Reducer\n */\nexport const ModularUIReducer: Reducer<ModularUIState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"MODULARUI/INIT\":\n return initModularUI(state, action.payload);\n\n case \"MODULARUI/RESET\":\n return resetModularUI(state);\n\n case \"MODULARUI/STATUS\":\n return updateStatus(state, action.payload);\n\n case \"MODULARUI/SET\":\n return setModel(state, action.payload);\n\n case \"MODULARUI/UPDATE\":\n case \"MODULARUI/UPDATE_FORM\":\n return updateModel(state, action.payload);\n\n case \"MODULARUI/REMOVE_KEY\":\n return removeKey(action.payload, state);\n\n default:\n return state;\n }\n};\n"],"mappings":";;;AACA,SAASA,wBAAwB,QAAQ,kBAAkB;AAC3D,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KAAK,CAACE,GAAG,CAAC,CAACQ,KAAK,YAAYZ,gBAAgB,EAAE;MAChDe,QAAQ,CAACX,GAAG,CAAC,GAAG;QAAE,GAAGF,KAAK,CAACE,GAAG;MAAE,CAAC;IACnC;EACF;EAEA,OAAOW,QAAQ;AACjB,CAAC;AAED,MAAMgB,YAA4B,GAAG,CAAC,CAAC;;AAEvC;AACA;AACA;AACA,OAAO,MAAMC,gBAAsD,GAAG,SAAAA,CAAA,EAGjE;EAAA,IAFH9B,KAAK,GAAA+B,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGF,YAAY;EAAA,IACpBK,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOlC,KAAK;EACd;EAEA,QAAQkC,MAAM,CAACC,IAAI;IACjB,KAAK,gBAAgB;MACnB,OAAOxB,aAAa,CAACX,KAAK,EAAEkC,MAAM,CAACE,OAAO,CAAC;IAE7C,KAAK,iBAAiB;MACpB,OAAOR,cAAc,CAAC5B,KAAK,CAAC;IAE9B,KAAK,kBAAkB;MACrB,OAAOD,YAAY,CAACC,KAAK,EAAEkC,MAAM,CAACE,OAAO,CAAC;IAE5C,KAAK,eAAe;MAClB,OAAO5B,QAAQ,CAACR,KAAK,EAAEkC,MAAM,CAACE,OAAO,CAAC;IAExC,KAAK,kBAAkB;IACvB,KAAK,uBAAuB;MAC1B,OAAOZ,WAAW,CAACxB,KAAK,EAAEkC,MAAM,CAACE,OAAO,CAAC;IAE3C,KAAK,sBAAsB;MACzB,OAAOT,SAAS,CAACO,MAAM,CAACE,OAAO,EAAEpC,KAAK,CAAC;IAEzC;MACE,OAAOA,KAAK;EAAC;AAEnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUISelectors.js","names":["createSelectorCreator","defaultMemoize","has","Href","ContentModel","ContentTOCModel","ApplicationModel","TabModel","CaseViewModel","FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","key","model","getFirstModelByInstance","getActiveModelByInstance","location","getLocation","selfhref","path","getApplication","getTab","getCaseView","getForm","modelByHref","href","findHref","modelConfigKey","equals","keyByHref","allKeysByHref","router","pathname","getModels","models","forEach","modelKey","modelEntry","label","type","modelInfo","selfContentLink","push","getActiveModels","value","other","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType"],"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,SAASA,qBAAqB,EAAEC,cAAc,QAAQ,UAAU;AAChE,SAASC,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,YAAY,MAAM,mCAAmC;AAC5D,OAAOC,eAAe,MAAM,sCAAsC;AAClE,OAAOC,gBAAgB,MAAM,2CAA2C;AACxE,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,OAAOC,aAAa,MAAM,qCAAqC;AAC/D,OAAOC,SAAS,MAAM,6BAA6B;AAKnD;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAG,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;IACb,OAAO,iFAAYA,SAAS,CAAC,kBAClBC,GAAG,IAAK;MACf,MAAM;QAAEC;MAAM,CAAC,GAAGF,SAAS,CAACC,GAAG,CAAC;MAChC,OAAOC,KAAK,YAAYL,QAAQ,IAAIK,KAAK,CAACJ,MAAM,KAAKA,MAAM;IAC7D,CAAC,CAAC,iBACIG,GAAG,IAAKD,SAAS,CAACC,GAAG,CAAC,CAACC,KAAK,CAAC;EACvC;EAEA,OAAO,EAAE;AACX,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,CACrCP,KAAiB,EACjBC,QAAkB,KACL;EACb,MAAMC,MAAM,G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AAK,IAC1BN,KAAK,CAACI,SAAS,CAACC,GAAG,CAAC,CAACC,KAAK,CAAC0B,IAAI,KAAKA,IAAI,CAC3C,kBACK3B,GAAG,IAAKL,KAAK,CAACI,SAAS,CAACC,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC"}
1
+ {"version":3,"file":"ModularUISelectors.js","names":["createSelectorCreator","defaultMemoize","has","Href","ContentModel","ContentTOCModel","ApplicationModel","TabModel","CaseViewModel","FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_mapInstanceProperty","_filterInstanceProperty","_Object$keys","call","key","model","getFirstModelByInstance","_context3","_findInstanceProperty","getActiveModelByInstance","location","getLocation","_context4","_startsWithInstanceProperty","selfhref","path","getApplication","getTab","getCaseView","getForm","modelByHref","href","_context5","findHref","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","label","type","modelInfo","selfContentLink","push","getActiveModels","value","other","_JSON$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,SAASA,qBAAqB,EAAEC,cAAc,QAAQ,UAAU;AAChE,SAASC,GAAG,QAAQ,6BAA6B;AAEjD,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,YAAY,MAAM,mCAAmC;AAC5D,OAAOC,eAAe,MAAM,sCAAsC;AAClE,OAAOC,gBAAgB,MAAM,2CAA2C;AACxE,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,OAAOC,aAAa,MAAM,qCAAqC;AAC/D,OAAOC,SAAS,MAAM,6BAA6B;AAKnD;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGA,CACpCC,KAAiB,EACjBC,QAAkB,KACQ;EAC1B,MAAMC,MAAM,GAAGF,KAAK,EAAEG,IAAI,EAAED,MAAM,IAAI,IAAI;EAC1C,MAAME,SAAS,GAAGJ,KAAK,EAAEI,S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AG,CAAC,CAACC,KAAK,CAACiC,IAAI,KAAKA,IAAI,CAC3C,EAAAnC,IAAA,CAAA2D,SAAA,EACK1D,GAAG,IAAKX,KAAK,CAACI,SAAS,CAACO,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIUtils.js","names":["useState","getDisplayName","MODULARUI_STATUS","Href","getUrl","resource","props","url","toString","useUrl","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","isExact","getKey","WrappedComponent","name","split","useReload","modelEntry","reload","isFullyLoaded","status","FINISHED","lastModification"],"sources":["../../../src/redux/_modularui/ModularUIUtils.js"],"sourcesContent":["// @flow\nimport { useState } from \"react\";\n\nimport { getDisplayName } from \"../../react/utils\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ComponentType } from \"react\";\n\n/**\n * Generate modular ui url\n */\nconst getUrl = (resource: string | Function, props: Object) => {\n const url = typeof resource === \"function\" ? resource(props) : resource;\n\n if (url instanceof Href) {\n return url.toString();\n }\n\n return url || \"\";\n};\n\n/**\n */\nexport const useUrl = (resource: string | Function, props: Object): string => {\n const [previousUrl, setPreviousUrl] = useState(\"\");\n const [previousExact, setPreviousExact] = useState(false);\n\n const url = getUrl(resource, props);\n\n const { match } = props;\n\n // when match is not available through props,\n // this is a direct call to the modular ui hoc, not using a route\n if (!match) {\n return url;\n }\n\n const isDifferentUrl = url !== previousUrl;\n if (!isDifferentUrl) {\n return previousUrl;\n }\n\n const hasDifferentStartUriPart =\n previousUrl !== \"\" && !previousUrl.startsWith(match.url);\n\n // Always create an url when the match is exact\n // Or when the match is not exact AND the original match also was not exact\n // Or when the new start uri is different from the previous url\n if (\n match.isExact === true ||\n previousExact === match.isExact ||\n hasDifferentStartUriPart\n ) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n\n return url;\n }\n\n return previousUrl;\n};\n\n/**\n * Create key for modularui request based on component name and requested url\n */\nexport const getKey = (\n WrappedComponent: ComponentType<any>,\n name: string,\n url: string\n): string => {\n if (url) {\n return `${getDisplayName(WrappedComponent, name)}(${url.split(\"?\")[0]})`;\n }\n\n return getDisplayName(WrappedComponent, name);\n};\n\n/**\n * Check if the model corresponding to a modular ui service should be reloaded\n */\nexport const useReload = (modelEntry: Object, reload: number = 0): boolean => {\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n\n return false;\n};\n"],"mappings":";AACA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA;AACA,MAAMC,MAAM,GAAG,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYJ,IAAI,EAAE;IACvB,OAAOI,GAAG,CAACC,QAAQ,EAAE;EACvB;EAEA,OAAOD,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACA,OAAO,MAAME,MAAM,GAAG,CAACJ,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACI,WAAW,EAAEC,cAAc,CAAC,GAAGX,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACY,aAAa,EAAEC,gBAAgB,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EAEzD,MAAMO,GAAG,GAAGH,MAAM,CAACC,QAAQ,EAAEC,KAAK,CAAC;EAEnC,MAAM;IAAEQ;EAAM,CAAC,GAAGR,KAAK;;EAEvB;EACA;EACA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CAAC"}
1
+ {"version":3,"file":"ModularUIUtils.js","names":["useState","getDisplayName","MODULARUI_STATUS","Href","getUrl","resource","props","url","toString","useUrl","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","_startsWithInstanceProperty","call","isExact","getKey","WrappedComponent","name","split","useReload","modelEntry","reload","arguments","length","undefined","isFullyLoaded","status","FINISHED","lastModification"],"sources":["../../../src/redux/_modularui/ModularUIUtils.js"],"sourcesContent":["// @flow\nimport { useState } from \"react\";\n\nimport { getDisplayName } from \"../../react/utils\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ComponentType } from \"react\";\n\n/**\n * Generate modular ui url\n */\nconst getUrl = (resource: string | Function, props: Object) => {\n const url = typeof resource === \"function\" ? resource(props) : resource;\n\n if (url instanceof Href) {\n return url.toString();\n }\n\n return url || \"\";\n};\n\n/**\n */\nexport const useUrl = (resource: string | Function, props: Object): string => {\n const [previousUrl, setPreviousUrl] = useState(\"\");\n const [previousExact, setPreviousExact] = useState(false);\n\n const url = getUrl(resource, props);\n\n const { match } = props;\n\n // when match is not available through props,\n // this is a direct call to the modular ui hoc, not using a route\n if (!match) {\n return url;\n }\n\n const isDifferentUrl = url !== previousUrl;\n if (!isDifferentUrl) {\n return previousUrl;\n }\n\n const hasDifferentStartUriPart =\n previousUrl !== \"\" && !previousUrl.startsWith(match.url);\n\n // Always create an url when the match is exact\n // Or when the match is not exact AND the original match also was not exact\n // Or when the new start uri is different from the previous url\n if (\n match.isExact === true ||\n previousExact === match.isExact ||\n hasDifferentStartUriPart\n ) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n\n return url;\n }\n\n return previousUrl;\n};\n\n/**\n * Create key for modularui request based on component name and requested url\n */\nexport const getKey = (\n WrappedComponent: ComponentType<any>,\n name: string,\n url: string\n): string => {\n if (url) {\n return `${getDisplayName(WrappedComponent, name)}(${url.split(\"?\")[0]})`;\n }\n\n return getDisplayName(WrappedComponent, name);\n};\n\n/**\n * Check if the model corresponding to a modular ui service should be reloaded\n */\nexport const useReload = (modelEntry: Object, reload: number = 0): boolean => {\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n\n return false;\n};\n"],"mappings":";AACA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA;AACA,MAAMC,MAAM,GAAGA,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYJ,IAAI,EAAE;IACvB,OAAOI,GAAG,CAACC,QAAQ,EAAE;EACvB;EAEA,OAAOD,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACA,OAAO,MAAME,MAAM,GAAGA,CAACJ,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACI,WAAW,EAAEC,cAAc,CAAC,GAAGX,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACY,aAAa,EAAEC,gBAAgB,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EAEzD,MAAMO,GAAG,GAAGH,MAAM,CAACC,QAAQ,EAAEC,KAAK,CAAC;EAEnC,MAAM;IAAEQ;EAAM,CAAC,GAAGR,KAAK;;EAEvB;EACA;EACA,IAAI,CAACQ,KAAK,EAAE;IACV,OAAOP,GAAG;EACZ;EAEA,MAAMQ,cAAc,GAAGR,GAAG,KAAKG,WAAW;EAC1C,IAAI,CAACK,cAAc,EAAE;IACnB,OAAOL,WAAW;EACpB;EAEA,MAAMM,wB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gress","finishProgress","handleError","getLocale","reloadModel","modularui","localeCode","href","options","modularuiRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","withModularui"],"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,SAASA,OAAO,QAAQ,aAAa;AAErC,SAASC,cAAc,QAAQ,UAAU;AAEzC,OAAOC,gBAAgB,MAAM,kCAAkC;AAE/D,SAASC,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAE5E,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,SAAS,QAAQ,mBAAmB;AAE7C,SAASC,WAAW,QAAQ,oBAAoB;AAkChD,MAAMC,SAAS,GAAGP,cAAc,CAC9B,CAACK,SAAS,CAAC,EACVG,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,uEAAG,CAAC,CAAC;EACjB,MAAMC,gBAAgB,GAAG,IAAIV,gBAAgB,CAACQ,IAAI,EAAEC,OAAO,CAAC;EAC5DC,gBAAgB,CAACC,MAAM,GAAGJ,UAAU;EACpC,OAAOG,gBAAgB;AACzB,CAAC,CACJ;;AAED;AACA;AACA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DP,SAAS,EAAEA,SAAS,CAACO,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCd,aAAa;EACbC,cAAc;EACdG,WAAW;EACXF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMa,aAAiC,GAAGlB,OAAO,CAO/Cc,eAAe,EAAEG,kBAAkB,CAAC;AAEtC,eAAeC,aAAa"}
1
+ {"version":3,"file":"withModularUI.js","names":["connect","createSelector","ModularUIRequest","startProgress","finishProgress","handleError","getLocale","reloadModel","modularui","localeCode","href","options","arguments","length","undefined","modularuiRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","withModularui"],"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,SAASA,OAAO,QAAQ,aAAa;AAErC,SAASC,cAAc,QAAQ,UAAU;AAEzC,OAAOC,gBAAgB,MAAM,kCAAkC;AAE/D,SAASC,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAE5E,SAASC,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,SAAS,QAAQ,mBAAmB;AAE7C,SAASC,WAAW,QAAQ,oBAAoB;AAkChD,MAAMC,SAAS,GAAGP,cAAc,CAC9B,CAACK,SAAS,CAAC,EACVG,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,IAAIb,gBAAgB,CAACQ,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACC,MAAM,GAAGP,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CAAC,CACJ;;AAED;AACA;AACA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DV,SAAS,EAAEA,SAAS,CAACU,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCjB,aAAa;EACbC,cAAc;EACdG,WAAW;EACXF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMgB,aAAiC,GAAGrB,OAAO,CAO/CiB,eAAe,EAAEG,kBAAkB,CAAC;AAEtC,eAAeC,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"RouterActions.js","names":["locationChange","location","action","type","payload","push","state","replace","go","delta","goBack","goForward"],"sources":["../../../src/redux/_router/RouterActions.js"],"sourcesContent":["// @flow\nimport type { HistoryAction, Location, LocationShape } from \"react-router\";\n\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n} from \"./types\";\n\n/**\n * Action called on location changes, reducer listens to these actions and updates reducers\n */\nexport const locationChange = (\n location: Location,\n action: HistoryAction\n): LocationChangeAction => ({\n type: \"ROUTER/LOCATION_CHANGE\",\n payload: {\n location,\n action,\n },\n});\n\n/**\n * Actions called to navigate, middleware listens to these actions and calls the appropriate history method\n */\nexport const push = (\n location: LocationShape | string,\n state?: { ... }\n): PushAction => ({\n type: \"ROUTER/PUSH\",\n payload: {\n location,\n state,\n },\n});\n\n/**\n */\nexport const replace = (\n location: LocationShape | string,\n state?: { ... }\n): ReplaceAction => {\n return {\n type: \"ROUTER/REPLACE\",\n payload: {\n location,\n state,\n },\n };\n};\n\n/**\n */\nexport const go = (delta: number): GoAction => ({\n type: \"ROUTER/GO\",\n payload: {\n delta,\n },\n});\n\n/**\n */\nexport const goBack = (): GoBackAction => ({\n type: \"ROUTER/GOBACK\",\n});\n\n/**\n */\nexport const goForward = (): GoForwardAction => ({\n type: \"ROUTER/GOFORWARD\",\n});\n"],"mappings":"AAYA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAG,CAC5BC,QAAkB,EAClBC,MAAqB,MACK;EAC1BC,IAAI,EAAE,wBAAwB;EAC9BC,OAAO,EAAE;IACPH,QAAQ;IACRC;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,IAAI,GAAG,CAClBJ,QAAgC,EAChCK,KAAe,MACC;EAChBH,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPH,QAAQ;IACRK;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,CACrBN,QAAgC,EAChCK,KAAe,KACG;EAClB,OAAO;IACLH,IAAI,EAAE,gBAAgB;IACtBC,OAAO,EAAE;MACPH,QAAQ;MACRK;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAME,EAAE,GAAIC,KAAa,KAAgB;EAC9CN,IAAI,EAAE,WAAW;EACjBC,OAAO,EAAE;IACPK;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,MAAM,GAAG,OAAqB;EACzCP,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMQ,SAAS,GAAG,OAAwB;EAC/CR,IAAI,EAAE;AACR,CAAC,CAAC"}
1
+ {"version":3,"file":"RouterActions.js","names":["locationChange","location","action","type","payload","push","state","replace","go","delta","goBack","goForward"],"sources":["../../../src/redux/_router/RouterActions.js"],"sourcesContent":["// @flow\nimport type { HistoryAction, Location, LocationShape } from \"react-router\";\n\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n} from \"./types\";\n\n/**\n * Action called on location changes, reducer listens to these actions and updates reducers\n */\nexport const locationChange = (\n location: Location,\n action: HistoryAction\n): LocationChangeAction => ({\n type: \"ROUTER/LOCATION_CHANGE\",\n payload: {\n location,\n action,\n },\n});\n\n/**\n * Actions called to navigate, middleware listens to these actions and calls the appropriate history method\n */\nexport const push = (\n location: LocationShape | string,\n state?: { ... }\n): PushAction => ({\n type: \"ROUTER/PUSH\",\n payload: {\n location,\n state,\n },\n});\n\n/**\n */\nexport const replace = (\n location: LocationShape | string,\n state?: { ... }\n): ReplaceAction => {\n return {\n type: \"ROUTER/REPLACE\",\n payload: {\n location,\n state,\n },\n };\n};\n\n/**\n */\nexport const go = (delta: number): GoAction => ({\n type: \"ROUTER/GO\",\n payload: {\n delta,\n },\n});\n\n/**\n */\nexport const goBack = (): GoBackAction => ({\n type: \"ROUTER/GOBACK\",\n});\n\n/**\n */\nexport const goForward = (): GoForwardAction => ({\n type: \"ROUTER/GOFORWARD\",\n});\n"],"mappings":"AAYA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAGA,CAC5BC,QAAkB,EAClBC,MAAqB,MACK;EAC1BC,IAAI,EAAE,wBAAwB;EAC9BC,OAAO,EAAE;IACPH,QAAQ;IACRC;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,IAAI,GAAGA,CAClBJ,QAAgC,EAChCK,KAAe,MACC;EAChBH,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPH,QAAQ;IACRK;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,OAAO,GAAGA,CACrBN,QAAgC,EAChCK,KAAe,KACG;EAClB,OAAO;IACLH,IAAI,EAAE,gBAAgB;IACtBC,OAAO,EAAE;MACPH,QAAQ;MACRK;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAME,EAAE,GAAIC,KAAa,KAAgB;EAC9CN,IAAI,EAAE,WAAW;EACjBC,OAAO,EAAE;IACPK;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,MAAM,GAAGA,CAAA,MAAqB;EACzCP,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMQ,SAAS,GAAGA,CAAA,MAAwB;EAC/CR,IAAI,EAAE;AACR,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RouterReducer.js","names":["initialState","RouterReducer","state","action","type","payload"],"sources":["../../../src/redux/_router/RouterReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { RouterState } from \"./types\";\n\n// REDUCER\nconst initialState: $Shape<RouterState> = {};\n\n/**\n * Router reducer\n */\nexport const RouterReducer: Reducer<RouterState, ReduxAction> = (\n state = initialState,\n action = null\n) => {\n if (action && action.type === \"ROUTER/LOCATION_CHANGE\") {\n return action.payload;\n }\n\n return state;\n};\n"],"mappings":"AAKA;AACA,MAAMA,YAAiC,GAAG,CAAC,CAAC;;AAE5C;AACA;AACA;AACA,OAAO,MAAMC,aAAgD,GAAG,YAG3D;EAAA,IAFHC,KAAK,uEAAGF,YAAY;EAAA,IACpBG,MAAM,uEAAG,IAAI;EAEb,IAAIA,MAAM,IAAIA,MAAM,CAACC,IAAI,KAAK,wBAAwB,EAAE;IACtD,OAAOD,MAAM,CAACE,OAAO;EACvB;EAEA,OAAOH,KAAK;AACd,CAAC"}
1
+ {"version":3,"file":"RouterReducer.js","names":["initialState","RouterReducer","state","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/_router/RouterReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { RouterState } from \"./types\";\n\n// REDUCER\nconst initialState: $Shape<RouterState> = {};\n\n/**\n * Router reducer\n */\nexport const RouterReducer: Reducer<RouterState, ReduxAction> = (\n state = initialState,\n action = null\n) => {\n if (action && action.type === \"ROUTER/LOCATION_CHANGE\") {\n return action.payload;\n }\n\n return state;\n};\n"],"mappings":"AAKA;AACA,MAAMA,YAAiC,GAAG,CAAC,CAAC;;AAE5C;AACA;AACA;AACA,OAAO,MAAMC,aAAgD,GAAG,SAAAA,CAAA,EAG3D;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,YAAY;EAAA,IACpBM,MAAM,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAEb,IAAIG,MAAM,IAAIA,MAAM,CAACC,IAAI,KAAK,wBAAwB,EAAE;IACtD,OAAOD,MAAM,CAACE,OAAO;EACvB;EAEA,OAAON,KAAK;AACd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","names":["loadModularUI","removeModelByKey","allKeysByHref","ApplicationModel","Href","getLocale","reloadApplication","dispatch","getState","allKeys","key","modelKey","targetModel"],"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,SACEA,aAAa,EACbC,gBAAgB,QACX,gCAAgC;AACvC,SAASC,aAAa,QAAQ,kCAAkC;AAChE,SAASC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,SAAS,QAAQ,mBAAmB;AAI7C;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC5B,MAAmB,CAACC,QAAkB,EAAEC,QAAkB,KAAK;EAC7D,MAAMC,OAAO,GAAGP,aAAa,CAACM,QAAQ,EAAE,EAAE,GAAG,CAAC;EAC9C,KAAK,MAAME,GAAG,IAAID,OAAO,EAAE;IACzBF,QAAQ,CAACN,gBAAgB,CAACS,GAAG,CAAC,CAAC;EACjC;EAEA,MAAMC,QAAQ,GAAI,kBAAiBN,SAAS,CAACG,QAAQ,EAAE,CAAE,GAAE;EAC3D,OAAOD,QAAQ,CACbP,aAAa,CAACW,QAAQ,EAAE,IAAIP,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE;IACpDQ,WAAW,EAAET;EACf,CAAC,CAAC,CACH;AACH,CAAC"}
1
+ {"version":3,"file":"Application.js","names":["loadModularUI","removeModelByKey","allKeysByHref","ApplicationModel","Href","getLocale","reloadApplication","dispatch","getState","allKeys","key","modelKey","targetModel"],"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,SACEA,aAAa,EACbC,gBAAgB,QACX,gCAAgC;AACvC,SAASC,aAAa,QAAQ,kCAAkC;AAChE,SAASC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,SAAS,QAAQ,mBAAmB;AAI7C;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC5BA,CAAA,KAAmB,CAACC,QAAkB,EAAEC,QAAkB,KAAK;EAC7D,MAAMC,OAAO,GAAGP,aAAa,CAACM,QAAQ,EAAE,EAAE,GAAG,CAAC;EAC9C,KAAK,MAAME,GAAG,IAAID,OAAO,EAAE;IACzBF,QAAQ,CAACN,gBAAgB,CAACS,GAAG,CAAC,CAAC;EACjC;EAEA,MAAMC,QAAQ,GAAI,kBAAiBN,SAAS,CAACG,QAAQ,EAAE,CAAE,GAAE;EAC3D,OAAOD,QAAQ,CACbP,aAAa,CAACW,QAAQ,EAAE,IAAIP,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE;IACpDQ,WAAW,EAAET;EACf,CAAC,CAAC,CACH;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Error.js","names":["IS_SERVER","getSetting","ErrorResponse","push","showXHRErrorNotification","resetProgress","changePassword","handleUnauthorized","saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","isBlocked","isConcurrentUser","isInvalidUsername","LOGOUT_PATH","isChangePassword","setTimeout","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","handleError"],"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,SAASA,SAAS,QAAQ,2BAA2B;AACrD,SAASC,UAAU,QAAQ,0BAA0B;AAErD,OAAOC,aAAa,MAAM,kCAAkC;AAE5D,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,wBAAwB,QAAQ,gBAAgB;AACzD,SAASC,aAAa,QAAQ,qBAAqB;AACnD,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,kBAAkB,QAAQ,iBAAiB;AAWpD;AACA;AACA,MAAMC,SAAS,GAAIC,KAAoB,KAAuB;EAC5DC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA,MAAMG,2BAAwD,GAC3DH,KAAoB,IACpBI,QAAkB,IAAK;EACtB,IAAIJ,KAAK,CAACK,6BAA6B,IAAIL,KAAK,CAACM,wBAAwB,EAAE;IACzE,OAAOF,QAAQ,CAAC;MAAEH,IAAI,EAAE;IAAY,CAAC,CAAC;EACxC;EAEA,IAAID,KAAK,CAACO,cAAc,EAAE;IACxB,OAAOH,QAAQ,CAACN,kBAAkB,CAACE,KAAK,CAAC,CAAC;EAC5C;EAEA,IAAIA,KAAK,CAACQ,SAAS,IAAIR,KAAK,CAACS,gBAAgB,IAAIT,KAAK,CAACU,iBAAiB,EAAE;IACxE,MAAMC,WAAW,GAAGnB,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC;IACzDY,QAAQ,CAACV,IAAI,CAACiB,WAAW,CAAC,CAAC;EAC7B;EAEA,IAAIX,KAAK,CAACY,gBAAgB,EAAE;IAC1B,OAAOR,QAAQ,CAACP,cAAc,EAAE,CAAC;EACnC;EAEA,IAAIN,SAAS,EAAE;IACb,OAAOa,QAAQ,CAACL,SAAS,CAACC,KAAK,CAAC,CAAC;EACnC;EAEAa,UAAU,CAAC,MAAM;IACf,MAAMb,KAAK;EACb,CAAC,CAAC;EAEF,OAAOI,QAAQ,CAACT,wBAAwB,CAACK,KAAK,CAAC,CAAC;AAClD,CAAC;;AAEH;AACA;AACA;AACA,IAAIc,0BAAsD,GACxD,CAACC,aAAa,EAAEC,cAAc,KAAMZ,QAAkB,IACpDA,QAAQ,CAACY,cAAc,CAACD,aAAa,CAAC,CAAC;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,6BAA6B,GACxCC,OAAmC,IAChC;EACHJ,0BAA0B,GAAGI,OAAO;AACtC,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GACrBnB,KAA6B,IAC7BI,QAAkB,IAAK;EACtBA,QAAQ,CAACR,aAAa,EAAE,CAAC;EAEzB,MAAMmB,aAAa,GAAG,IAAItB,aAAa,CAACO,KAAK,CAAC;EAE9C,OAAOI,QAAQ,CACbU,0BAA0B,CAACC,aAAa,EAAEZ,2BAA2B,CAAC,CACvE;AACH,CAAC"}
1
+ {"version":3,"file":"Error.js","names":["IS_SERVER","getSetting","ErrorResponse","push","showXHRErrorNotification","resetProgress","changePassword","handleUnauthorized","saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","isBlocked","isConcurrentUser","isInvalidUsername","LOGOUT_PATH","isChangePassword","setTimeout","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","handleError"],"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,SAASA,SAAS,QAAQ,2BAA2B;AACrD,SAASC,UAAU,QAAQ,0BAA0B;AAErD,OAAOC,aAAa,MAAM,kCAAkC;AAE5D,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,wBAAwB,QAAQ,gBAAgB;AACzD,SAASC,aAAa,QAAQ,qBAAqB;AACnD,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,kBAAkB,QAAQ,iBAAiB;AAWpD;AACA;AACA,MAAMC,SAAS,GAAIC,KAAoB,KAAuB;EAC5DC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA,MAAMG,2BAAwD,GAC3DH,KAAoB,IACpBI,QAAkB,IAAK;EACtB,IAAIJ,KAAK,CAACK,6BAA6B,IAAIL,KAAK,CAACM,wBAAwB,EAAE;IACzE,OAAOF,QAAQ,CAAC;MAAEH,IAAI,EAAE;IAAY,CAAC,CAAC;EACxC;EAEA,IAAID,KAAK,CAACO,cAAc,EAAE;IACxB,OAAOH,QAAQ,CAACN,kBAAkB,CAACE,KAAK,CAAC,CAAC;EAC5C;EAEA,IAAIA,KAAK,CAACQ,SAAS,IAAIR,KAAK,CAACS,gBAAgB,IAAIT,KAAK,CAACU,iBAAiB,EAAE;IACxE,MAAMC,WAAW,GAAGnB,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC;IACzDY,QAAQ,CAACV,IAAI,CAACiB,WAAW,CAAC,CAAC;EAC7B;EAEA,IAAIX,KAAK,CAACY,gBAAgB,EAAE;IAC1B,OAAOR,QAAQ,CAACP,cAAc,EAAE,CAAC;EACnC;EAEA,IAAIN,SAAS,EAAE;IACb,OAAOa,QAAQ,CAACL,SAAS,CAACC,KAAK,CAAC,CAAC;EACnC;EAEAa,UAAU,CAAC,MAAM;IACf,MAAMb,KAAK;EACb,CAAC,CAAC;EAEF,OAAOI,QAAQ,CAACT,wBAAwB,CAACK,KAAK,CAAC,CAAC;AAClD,CAAC;;AAEH;AACA;AACA;AACA,IAAIc,0BAAsD,GACxDA,CAACC,aAAa,EAAEC,cAAc,KAAMZ,QAAkB,IACpDA,QAAQ,CAACY,cAAc,CAACD,aAAa,CAAC,CAAC;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,6BAA6B,GACxCC,OAAmC,IAChC;EACHJ,0BAA0B,GAAGI,OAAO;AACtC,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GACrBnB,KAA6B,IAC7BI,QAAkB,IAAK;EACtBA,QAAQ,CAACR,aAAa,EAAE,CAAC;EAEzB,MAAMmB,aAAa,GAAG,IAAItB,aAAa,CAACO,KAAK,CAAC;EAE9C,OAAOI,QAAQ,CACbU,0BAA0B,CAACC,aAAa,EAAEZ,2BAA2B,CAAC,CACvE;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSet.js","names":["updateForm","getSetting","validateFormObject","autosaveFormObject","autosubmitFormObject","updateFormAttribute","form","formObject","attribute","inputvalue","options","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","undefined","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","isChanged","hasDynamicValidations"],"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,SAASA,UAAU,QAAQ,gCAAgC;AAE3D,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,kBAAkB,QAAQ,mBAAmB;AACtD,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SAASC,oBAAoB,QAAQ,kBAAkB;AAOvD;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAC9B,UACEC,IAAe,EACfC,UAA2B,EAC3BC,SAAwB,EACxBC,UAAkB;EAAA,IAClBC,OAA0B,uEAAG;IAC3BC,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE,KAAK;IACfC,WAAW,EAAE,KAAK;IAClBC,QAAQ,EAAE;EACZ,CAAC;EAAA,OAEFC,QAAkB,IAAK;IACtB,MAAMC,OAAO,GAAGV,IAAI,CAACW,KAAK,EAAE;IAE5B,IAAIP,OAAO,CAACI,QAAQ,KAAKI,SAAS,EAAE;MAClCR,OAAO,CAACI,QAAQ,GAAG,IAAI;IACzB;IAEA,IAAIE,OAAO,CAACG,iBAAiB,EAAEC,MAAM,CAACb,UAAU,CAAC,EAAE;MACjDS,OAAO,CAACG,iBAAiB,CAACE,eAAe,CAACb,SAAS,EAAEC,UAAU,CAAC;IAClE,CAAC,MAAM;MACLO,OAAO,CAACM,oBAAoB,CAACC,OAAO,CAAEC,cAAc,IAAK;QACvD,IAAIA,cAAc,CAACJ,MAAM,CAACb,UAAU,CAAC,EAAE;UACrCiB,cAAc,CAACH,eAAe,CAACb,SAAS,EAAEC,UAAU,CAAC;QACvD;MACF,CAAC,CAAC;IACJ;IAEA,IAAIC,OAAO,CAACC,UAAU,IAAIK,OAAO,CAACS,OAAO,EAAE;MACzC,MAAMC,gBAAgB,GAAGtB,oBAAoB,CAC3CY,OAAO,EACPR,SAAS,EACTE,OAAO,CAACG,WAAW,CACpB;MACD,IAAIa,gBAAgB,EAAE;QACpB,OAAOX,QAAQ,CAACW,gBAAgB,CAAC;MACnC;IACF;IAEA,IAAIhB,OAAO,CAACE,QAAQ,IAAII,OAAO,CAACS,OAAO,IAAIT,OAAO,CAACW,SAAS,EAAE,EAAE;MAC9DZ,QAAQ,CAACZ,kBAAkB,CAACa,OAAO,CAAC,CAAC;IACvC;IAEA,IACEN,OAAO,CAACI,QAAQ,IAChBE,OAAO,CAACG,iBAAiB,EAAES,qBAAqB,IAChD3B,UAAU,CAAC,+BAA+B,CAAC,EAC3C;MACA;MACAc,QAAQ,CAACb,kBAAkB,CAACc,OAAO,CAAC,CAAC;IACvC;IAEA,OAAOD,QAAQ,CAACf,UAAU,CAACgB,OAAO,CAAC,CAAC;EACtC,CAAC;AAAA"}
1
+ {"version":3,"file":"FormAttributeSet.js","names":["updateForm","getSetting","validateFormObject","autosaveFormObject","autosubmitFormObject","updateFormAttribute","form","formObject","attribute","inputvalue","options","arguments","length","undefined","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","isChanged","hasDynamicValidations"],"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"],"mapp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AAQ,CAACU,gBAAgB,CAAC;MACnC;IACF;IAEA,IAAIlB,OAAO,CAACK,QAAQ,IAAII,OAAO,CAACQ,OAAO,IAAIR,OAAO,CAACU,SAAS,EAAE,EAAE;MAC9DX,QAAQ,CAACf,kBAAkB,CAACgB,OAAO,CAAC,CAAC;IACvC;IAEA,IACET,OAAO,CAACO,QAAQ,IAChBE,OAAO,CAACE,iBAAiB,EAAES,qBAAqB,IAChD7B,UAAU,CAAC,+BAA+B,CAAC,EAC3C;MACA;MACAiB,QAAQ,CAAChB,kBAAkB,CAACiB,OAAO,CAAC,CAAC;IACvC;IAEA,OAAOD,QAAQ,CAAClB,UAAU,CAACmB,OAAO,CAAC,CAAC;EACtC,CAAC;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSetRepeatable.js","names":["updateForm","addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","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,SAASA,UAAU,QAAQ,gCAAgC;AAM3D;AACA;AACA,OAAO,MAAMC,yBAAyB,GACpCC,IAAe,IACM;EACrB,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAE5B,OAAOL,UAAU,CAACG,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,4BAA4B,GAAG,CAC1CJ,IAAe,EACfK,UAA2B,KACN;EACrB,MAAMJ,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAC5BF,OAAO,CAACK,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAOP,UAAU,CAACG,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AACA,OAAO,MAAMM,4BAA4B,GAAG,CAC1CP,IAAe,EACfK,UAA2B,KACN;EACrB,MAAMJ,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACK,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAOP,UAAU,CAACG,OAAO,CAAC;AAC5B,CAAC"}
1
+ {"version":3,"file":"FormAttributeSetRepeatable.js","names":["updateForm","addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","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,SAASA,UAAU,QAAQ,gCAAgC;AAM3D;AACA;AACA,OAAO,MAAMC,yBAAyB,GACpCC,IAAe,IACM;EACrB,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAE5B,OAAOL,UAAU,CAACG,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,4BAA4B,GAAGA,CAC1CJ,IAAe,EACfK,UAA2B,KACN;EACrB,MAAMJ,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAC5BF,OAAO,CAACK,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAOP,UAAU,CAACG,OAAO,CAAC;AAC5B,CAAC;;AAED;AACA;AACA,OAAO,MAAMM,4BAA4B,GAAGA,CAC1CP,IAAe,EACfK,UAA2B,KACN;EACrB,MAAMJ,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACK,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAOP,UAAU,CAACG,OAAO,CAAC;AAC5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAutosave.js","names":["debounce","ModularUIRequest","FormModel","HTTP_METHODS","VALIDATE_DEBOUNCE_TIMEOUT","AUTOSAVE_STATUS","updateForm","updateAutosave","status","model","type","payload","autosave","dispatch","form","START","formdata","getFormData","selfhref","setParameter","method","POST","data","childmodels","locale","fetch","then","savedForm","lastServerUpdate","FINISHED","debouncedAutosave","autosaveFormObject"],"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,OAAOA,QAAQ,MAAM,iBAAiB;AAEtC,OAAOC,gBAAgB,MAAM,kCAAkC;AAC/D,O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,EAAEV,yBAAyB,CAAC;;AAE7B;AACA;AACA,OAAO,MAAM2B,kBAAkB,GAC5BjB,IAAe,IACfD,QAAQ,IACPiB,iBAAiB,CAACjB,QAAQ,EAAEC,IAAI,CAAC"}
1
+ {"version":3,"file":"FormAutosave.js","names":["debounce","ModularUIRequest","FormModel","HTTP_METHODS","VALIDATE_DEBOUNCE_TIMEOUT","AUTOSAVE_STATUS","updateForm","updateAutosave","status","model","type","payload","autosave","dispatch","form","START","formdata","getFormData","selfhref","setParameter","method","POST","data","childmodels","locale","fetch","then","savedForm","lastServerUpdate","FINISHED","debouncedAutosave","autosaveFormObject"],"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,OAAOA,QAAQ,MAAM,iBAAiB;AAEtC,OAAOC,gBAAgB,MAAM,kCAAkC;AAC/D,OAAOC,SAAS,MAAM,6BAA6B;AAEnD,SACEC,YAAY,EACZC,yBAAyB,EACzBC,eAAe,QACV,2BAA2B;AAElC,SAASC,UAAU,QAAQ,gCAAgC;AAI3D;AACA;AACA;AACA;AACA,MAAMC,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,CAACF,eAAe,CAACU,KAAK,EAAED,IAAI,CAAC,CAAC;EAErD,MAAME,QAAQ,GAAGF,IAAI,CAACG,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;EAE9C,IAAIhB,gBAAgB,CAACa,IAAI,CAACI,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;IACjEC,MAAM,EAAEjB,YAAY,CAACkB,IAAI;IACzBC,IAAI,EAAEN,QAAQ;IACdO,WAAW,EAAE,KAAK;IAClBC,MAAM,EAAEV,IAAI,CAACU;EACf,CAAC,CAAC,CACCC,KAAK,EAAE,CACPC,IAAI,CAAEC,SAAS,IAAK;IACnB,IAAIA,SAAS,YAAYzB,SAAS,EAAE;MAClC;MACA;MACAY,IAAI,CAACc,gBAAgB,GAAGD,SAAS,CAACC,gBAAgB;MAElDf,QAAQ,CAACP,UAAU,CAACQ,IAAI,CAAC,CAAC;MAC1BD,QAAQ,CAACN,cAAc,CAACF,eAAe,CAACwB,QAAQ,EAAEF,SAAS,CAAC,CAAC;IAC/D;EACF,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,iBAAiB,GAAG9B,QAAQ,CAAC,CAACa,QAAQ,EAAEC,IAAI,KAAK;EACrDF,QAAQ,CAACC,QAAQ,EAAEC,IAAI,CAAC;AAC1B,CAAC,EAAEV,yBAAyB,CAAC;;AAE7B;AACA;AACA,OAAO,MAAM2B,kBAAkB,GAC5BjB,IAAe,IACfD,QAAQ,IACPiB,iBAAiB,CAACjB,QAAQ,EAAEC,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormAutosubmit.js","names":["loadModularUI","HTTP_METHODS","autosubmitFormObject","form","attribute","forceUpdate","allObjects","length","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","connectKey","selfhref","method","POST","data","formdata","updateModel"],"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,SAASA,aAAa,QAAQ,gCAAgC;AAC9D,SAASC,YAAY,QAAQ,2BAA2B;AAMxD;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAG,UAClCC,IAAe,EACfC,SAAwB,EAEP;EAAA,IADjBC,WAAoB,uEAAG,KAAK;EAE5B;EACA;EACA;EACA,OACEF,IAAI,CAACG,UAAU,CAACC,MAAM,GAAG,CAAC,KACzB,CAACJ,IAAI,CAACK,iBAAiB,IACtB,CAACL,IAAI,CAACK,iBAAiB,CAACC,iBAAiB,CAACL,SAAS,CAACM,GAAG,CAAC,CAAC,EAC3D;IACAP,IAAI,CAACQ,iBAAiB,EAAE;EAC1B;EAEA,IAAIR,IAAI,CAACS,SAAS,EAAE,IAAIP,WAAW,EAAE;IACnC,OAAOL,aAAa,CAACG,IAAI,CAACU,UAAU,EAAEV,IAAI,CAACW,QAAQ,EAAE;MACnDC,MAAM,EAAEd,YAAY,CAACe,IAAI;MACzBC,IAAI,EAAEd,IAAI,CAACe,QAAQ;MACnBC,WAAW,EAAEhB;IACf,CAAC,CAAC;EACJ;EAEA,OAAO,IAAI;AACb,CAAC"}
1
+ {"version":3,"file":"FormAutosubmit.js","names":["loadModularUI","HTTP_METHODS","autosubmitFormObject","form","attribute","forceUpdate","arguments","length","undefined","allObjects","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","connectKey","selfhref","method","POST","data","formdata","updateModel"],"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,SAASA,aAAa,QAAQ,gCAAgC;AAC9D,SAASC,YAAY,QAAQ,2BAA2B;AAMxD;AACA;AACA,OAAO,MAAMC,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,OAAOL,aAAa,CAACG,IAAI,CAACY,UAAU,EAAEZ,IAAI,CAACa,QAAQ,EAAE;MACnDC,MAAM,EAAEhB,YAAY,CAACiB,IAAI;MACzBC,IAAI,EAAEhB,IAAI,CAACiB,QAAQ;MACnBC,WAAW,EAAElB;IACf,CAAC,CAAC;EACJ;EAEA,OAAO,IAAI;AACb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormValidations.js","names":["debounce","updateForm","ModularUIRequest","HTTP_METHODS","VALIDATE_DEBOUNCE_TIMEOUT","FormModel","updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","data","debouncedValidateFormObject","selfhref","setParameter","method","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","leading","trailing","validateFormObject"],"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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EAAE;AACZ,CAAC,CACF;;AAED;AACA;AACA,OAAO,MAAMC,kBAAkB,GAC5BxB,IAAe,IACfE,QAAQ,IACPS,2BAA2B,CAACT,QAAQ,EAAEF,IAAI,CAAC"}
1
+ {"version":3,"file":"FormValidations.js","names":["debounce","updateForm","ModularUIRequest","HTTP_METHODS","VALIDATE_DEBOUNCE_TIMEOUT","FormModel","updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","data","debouncedValidateFormObject","selfhref","setParameter","method","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","leading","trailing","validateFormObject"],"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,OAAOA,QAAQ,MAAM,iBAAiB;AAEtC,SAASC,UAAU,QAAQ,gCAAgC;AAE3D,OAAOC,gBAAgB,MAAM,kCAAkC;AAE/D,SACEC,YAAY,EACZC,yBAAyB,QACpB,2BAA2B;AAElC,OAAOC,SAAS,MAAM,6BAA6B;AAKnD;AACA;AACA;AACA;AACA,MAAMC,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,YAAYT,SAAS,EAAE;MACtCS,aAAa,CAACR,iBAAiB,CAACE,mBAAmB,CAACS,IAAI,CAAC;IAC3D;IAEAR,QAAQ,CAACR,UAAU,CAACa,aAAa,CAAC,CAAC;EACrC;AACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,2BAA2B,GAAGlB,QAAQ,CAG1C,CAACS,QAAQ,EAAEF,IAAe,KAAK;EAC7B,IAAIL,gBAAgB,CAACK,IAAI,CAACY,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE;IAClEC,MAAM,EAAElB,YAAY,CAACmB,IAAI;IACzBL,IAAI,EAAEV,IAAI,CAACgB,cAAc;IACzBC,WAAW,EAAE,KAAK;IAClBC,mBAAmB,EAAE,IAAI;IACzBC,MAAM,EAAEnB,IAAI,CAACmB;EACf,CAAC,CAAC,CACCC,KAAK,EAAE,CACPC,IAAI,CAAEpB,mBAAmB,IACxBC,QAAQ,CAACH,iBAAiB,CAACC,IAAI,EAAEC,mBAAmB,CAAC,CAAC,CACvD;AACL,CAAC,EACDJ,yBAAyB,EACzB;EACEyB,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE;AACZ,CAAC,CACF;;AAED;AACA;AACA,OAAO,MAAMC,kBAAkB,GAC5BxB,IAAe,IACfE,QAAQ,IACPS,2BAA2B,CAACT,QAAQ,EAAEF,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","names":["startProgress","finishProgress","getSetting","NOTIFICATION_TYPES","dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","SUCCESS","id","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,SAASA,aAAa,EAAEC,cAAc,QAAQ,qBAAqB;AAEnE,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,kBAAkB,QAAQ,2BAA2B;AAO9D;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAG,OAAkC;EACnEC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,gBAAgB,GAC3B,CACED,IAAsC,EACtCE,OAAsB,EACtBC,KAAsB,EACtBC,OAAiB,KAElBC,QAAQ,IAAK;EACZA,QAAQ,CAAC;IACPL,IAAI,EAAE,mBAAmB;IACzBM,OAAO,EAAE;MACPN,IAAI;MACJE,OAAO;MACPC;IACF;EACF,CAAC,CAAC;EAEF,IAAIC,OAAO,EAAE;IACXG,UAAU,CAAC,MAAM;MACfF,QAAQ,CAACN,mBAAmB,EAAE,CAAC;IACjC,CAAC,EAAEK,OAAO,CAAC;EACb;AACF,CAAC;;AAEH;AACA;AACA,MAAMI,wBAAwB,GAAIC,IAAe,IAAK;EACpD,IAAIA,IAAI,CAACC,UAAU,KAAK,QAAQ,EAAE;IAChC,OAAO,yBAAyB;EAClC;EAEA,IAAID,IAAI,CAACC,UAAU,KAAK,QAAQ,EAAE;IAChC,OAAO,yBAAyB;EAClC;EAEA,IAAID,IAAI,CAACC,UAAU,KAAK,QAAQ,EAAE;IAChC,OAAO,yBAAyB;EAClC;EAEA,OAAO,0BAA0B;AACnC,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAC9BF,IAAe,IACfJ,QAAQ,IAAK;EACZA,QAAQ,CAACV,aAAa,EAAE,CAAC;EAEzBU,QAAQ,CACNJ,gBAAgB,CAACH,kBAAkB,CAACc,OAAO,EAAE;IAC3CC,EAAE,EAAEL,wBAAwB,CAACC,IAAI;EACnC,CAAC,CAAC,CACH;EAEDF,UAAU,CAAC,MAAM;IACfF,QAAQ,CAACN,mBAAmB,EAAE,CAAC;EACjC,CAAC,EAAEF,UAAU,CAAC,2BAA2B,CAAC,CAAC;EAE3C,OAAOQ,QAAQ,CAACT,cAAc,EAAE,CAAC;AACnC,CAAC;;AAEH;AACA;AACA;AACA,OAAO,MAAMkB,wBAAwB,GAClCX,KAAoB,IACpBE,QAAQ,IACPA,QAAQ,CACNJ,gBAAgB,CACdH,kBAAkB,CAACiB,KAAK,EACxB;EACEF,EAAE,EAAEV,KAAK,CAACU,EAAE;EACZG,cAAc,EAAEb,KAAK,CAACD,OAAO;EAC7Be,UAAU,EAAEd,KAAK,CAACe;AACpB,CAAC,EACDf,KAAK,CACN,CACF"}
1
+ {"version":3,"file":"Notification.js","names":["startProgress","finishProgress","getSetting","NOTIFICATION_TYPES","dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","SUCCESS","id","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,SAASA,aAAa,EAAE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AAC,CAAC;EAE3C,OAAOQ,QAAQ,CAACT,cAAc,EAAE,CAAC;AACnC,CAAC;;AAEH;AACA;AACA;AACA,OAAO,MAAMkB,wBAAwB,GAClCX,KAAoB,IACpBE,QAAQ,IACPA,QAAQ,CACNJ,gBAAgB,CACdH,kBAAkB,CAACiB,KAAK,EACxB;EACEF,EAAE,EAAEV,KAAK,CAACU,EAAE;EACZG,cAAc,EAAEb,KAAK,CAACD,OAAO;EAC7Be,UAAU,EAAEd,KAAK,CAACe;AACpB,CAAC,EACDf,KAAK,CACN,CACF"}
@@ -90,10 +90,10 @@ export const setAllContentInDataSetting = state => {
90
90
  export const setLoginPreferences = state => {
91
91
  const loginSettings = {
92
92
  [LOGIN_TYPE]: getServerPreferenceValue(LOGIN_TYPE, state?.preferences[LOGIN_TYPE]),
93
- [LOGIN_PATH_SETTING]: getServerPreferenceValue(LOGIN_PATH_SETTING, state?.preferences[LOGIN_PATH_SETTING] ?? `/j_security_check`),
93
+ [LOGIN_PATH_SETTING]: getServerPreferenceValue(LOGIN_PATH_SETTING, state?.preferences[LOGIN_PATH_SETTING] ?? `/callback?client_name=FormClient`),
94
94
  [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(LOGIN_USERNAME_SETTING, state?.preferences[LOGIN_USERNAME_SETTING] ?? "j_username"),
95
95
  [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(LOGIN_PASSWORD_SETTING, state?.preferences[LOGIN_PASSWORD_SETTING] ?? "j_password"),
96
- [LOGOUT_PATH_SETTING]: getServerPreferenceValue(LOGOUT_PATH_SETTING, state?.preferences[LOGOUT_PATH_SETTING] ?? `/Logoff`)
96
+ [LOGOUT_PATH_SETTING]: getServerPreferenceValue(LOGOUT_PATH_SETTING, state?.preferences[LOGOUT_PATH_SETTING] ?? `/logout`)
97
97
  };
98
98
  setSettings(loginSettings);
99
99
  return setPreferences(loginSettings);
@@ -1 +1 @@
1
- {"version":3,"file":"Preferences.js","names":["isPlainObject","JsonParseException","setSetting","setSettings","ALL_CONTENT_IN_DATA_SETTING","LOGIN_TYPE","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","getServerPreferenceValue","preferenceName","defaultValue","type","value","preferencesProvider","getPreferenceByName","split","val","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","setLoginPreferences","loginSettings"],"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] ?? `/j_security_check`\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] ?? `/Logoff`\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;AACA,SAASA,aAAa,QAAQ,6BAA6B;AAE3D,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,UAAU,EAAEC,WAAW,QAAQ,0BAA0B;AASlE,SACEC,2BAA2B,EAC3BC,UAAU,EACVC,sBAAsB,EACtBC,kBAAkB,EAClBC,sBAAsB,EACtBC,mBAAmB,QACd,iBAAiB;;AAExB;AACA;AACA,MAAMC,wBAAwB,GAAG,UAC/BC,cAAsB,EAGnB;EAAA,IAFHC,YAA6B,uEAAG,IAAI;EAAA,IACpCC,IAAa;EAEb,IAAIC,KAAsB,GAAG,IAAI;EACjC,IAAI,OAAOC,mBAAmB,KAAK,WAAW,EAAE;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAAmB,CAACL,cAAc,CAAC;EACjE;EAEA,IAAIG,KAAK,IAAI,IAAI,EAAE;IACjBA,KAAK,GAAGF,YAAY;EACtB;EAEA,IAAI,OAAOE,KAAK,KAAK,QAAQ,IAAID,IAAI,KAAK,QAAQ,IAAI,0BAAAC,KAAK,OAALA,KAAK,EAAU,GAAG,CAAC,EAAE;IAAA;IACzEA,KAAK,GAAG,gCAAAA,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC,iBAAMC,GAAG,IAAK,sBAAAA,GAAG,OAAHA,GAAG,CAAO,CAAC;EACnD;EAEA,OAAOJ,KAAK;AACd,CAAC;;AAED;AACA;AACA,OAAO,MAAMK,mBAAmB,GAAG,UACjCC,YAAoB,EAGI;EAAA,IAFxBR,YAA6B,uEAAG,IAAI;EAAA,IACpCC,IAAa;EAEb,MAAMC,KAAK,GAAGJ,wBAAwB,CAACU,YAAY,EAAER,YAAY,EAAEC,IAAI,CAAC;EACxE,OAAOQ,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,CAACE,2BAA2B,EAAE,CAAC,CAAC+B,uBAAuB,CAAC;EAClE,OAAOd,aAAa,CAACjB,2BAA2B,EAAE+B,uBAAuB,CAAC;AAC5E,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,GAC9BH,KAAkB,IACO;EACzB,MAAMI,aAAa,GAAG;IACpB,CAACjC,UAAU,GAAGK,wBAAwB,CACpCL,UAAU,EACV6B,KAAK,EAAET,WAAW,CAACpB,UAAU,CAAC,CAC/B;IACD,CAACE,kBAAkB,GAAGG,wBAAwB,CAC5CH,kBAAkB,EAClB2B,KAAK,EAAET,WAAW,CAAClB,kBAAkB,CAAC,IAAK,mBAAkB,CAC9D;IACD,CAACC,sBAAsB,GAAGE,wBAAwB,CAChDF,sBAAsB,EACtB0B,KAAK,EAAET,WAAW,CAACjB,sBAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACF,sBAAsB,GAAGI,wBAAwB,CAChDJ,sBAAsB,EACtB4B,KAAK,EAAET,WAAW,CAACnB,sBAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACG,mBAAmB,GAAGC,wBAAwB,CAC7CD,mBAAmB,EACnByB,KAAK,EAAET,WAAW,CAAChB,mBAAmB,CAAC,IAAK,SAAQ;EAExD,CAAC;EAEDN,WAAW,CAACmC,aAAa,CAAC;EAC1B,OAAOd,cAAc,CAACc,aAAa,CAAC;AACtC,CAAC"}
1
+ {"version":3,"file":"Preferences.js","names":["isPlainObject","JsonParseException","setSetting","setSettings","ALL_CONTENT_IN_DATA_SETTING","LOGIN_TYPE","LOGIN_PASSWORD_SETTING","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGOUT_PATH_SETTING","getServerPreferenceValue","preferenceName","defaultValue","arguments","length","undefined","type","value","preferencesProvider","getPreferenceByName","_includesInstanceProperty","call","_context","_mapInstanceProperty","split","val","_trimInstanceProperty","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","setLoginPreferences","loginSettings"],"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,SAASA,aAAa,QAAQ,6BAA6B;AAE3D,SAASC,kBAAkB,QAAQ,kBAA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AuB,GAAGzB,mBAAmB,CAAC0B,yBAAyB,EAAE;EAC3E,CAAC,MAAM,IAAI,OAAOF,KAAK,KAAK,WAAW,EAAE;IACvCC,uBAAuB,GAAGD,KAAK,CAACT,WAAW,CAAC7B,2BAA2B,CAAC;EAC1E;EAEAF,UAAU,CAACE,2BAA2B,EAAE,CAAC,CAACuC,uBAAuB,CAAC;EAClE,OAAOd,aAAa,CAACzB,2BAA2B,EAAEuC,uBAAuB,CAAC;AAC5E,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,GAC9BH,KAAkB,IACO;EACzB,MAAMI,aAAa,GAAG;IACpB,CAACzC,UAAU,GAAGK,wBAAwB,CACpCL,UAAU,EACVqC,KAAK,EAAET,WAAW,CAAC5B,UAAU,CAAC,CAC/B;IACD,CAACE,kBAAkB,GAAGG,wBAAwB,CAC5CH,kBAAkB,EAClBmC,KAAK,EAAET,WAAW,CAAC1B,kBAAkB,CAAC,IACnC,kCAAiC,CACrC;IACD,CAACC,sBAAsB,GAAGE,wBAAwB,CAChDF,sBAAsB,EACtBkC,KAAK,EAAET,WAAW,CAACzB,sBAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACF,sBAAsB,GAAGI,wBAAwB,CAChDJ,sBAAsB,EACtBoC,KAAK,EAAET,WAAW,CAAC3B,sBAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACG,mBAAmB,GAAGC,wBAAwB,CAC7CD,mBAAmB,EACnBiC,KAAK,EAAET,WAAW,CAACxB,mBAAmB,CAAC,IAAK,SAAQ;EAExD,CAAC;EAEDN,WAAW,CAAC2C,aAAa,CAAC;EAC1B,OAAOd,cAAc,CAACc,aAAa,CAAC;AACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressIndicator.js","names":["startProgress","type","finishProgress","resetProgress","updateProgress","percentComplete","payload"],"sources":["../../../src/redux/actions/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport type {\n StartProgressAction,\n FinishProgressAction,\n ResetProgressAction,\n UpdateProgressAction,\n} from \"../types\";\n\n// ACTIONS\n/**\n * Start the progress indicator\n */\nexport const startProgress = (): StartProgressAction => ({\n type: \"START_PROGRESS\",\n});\n\n/**\n * Stop the progress indicator\n */\nexport const finishProgress = (): FinishProgressAction => ({\n type: \"FINISH_PROGRESS\",\n});\n\n/**\n * Reset the progress indicator\n */\nexport const resetProgress = (): ResetProgressAction => ({\n type: \"RESET_PROGRESS\",\n});\n\n/**\n * Update progress complete percentage\n */\nexport const updateProgress = (\n percentComplete: number\n): UpdateProgressAction => ({\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete },\n});\n"],"mappings":"AAQA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAG,OAA4B;EACvDC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,OAA6B;EACzDD,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAME,aAAa,GAAG,OAA4B;EACvDF,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,cAAc,GACzBC,eAAuB,KACG;EAC1BJ,IAAI,EAAE,iBAAiB;EACvBK,OAAO,EAAE;IAAED;EAAgB;AAC7B,CAAC,CAAC"}
1
+ {"version":3,"file":"ProgressIndicator.js","names":["startProgress","type","finishProgress","resetProgress","updateProgress","percentComplete","payload"],"sources":["../../../src/redux/actions/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport type {\n StartProgressAction,\n FinishProgressAction,\n ResetProgressAction,\n UpdateProgressAction,\n} from \"../types\";\n\n// ACTIONS\n/**\n * Start the progress indicator\n */\nexport const startProgress = (): StartProgressAction => ({\n type: \"START_PROGRESS\",\n});\n\n/**\n * Stop the progress indicator\n */\nexport const finishProgress = (): FinishProgressAction => ({\n type: \"FINISH_PROGRESS\",\n});\n\n/**\n * Reset the progress indicator\n */\nexport const resetProgress = (): ResetProgressAction => ({\n type: \"RESET_PROGRESS\",\n});\n\n/**\n * Update progress complete percentage\n */\nexport const updateProgress = (\n percentComplete: number\n): UpdateProgressAction => ({\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete },\n});\n"],"mappings":"AAQA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAGA,CAAA,MAA4B;EACvDC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAA,MAA6B;EACzDD,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAME,aAAa,GAAGA,CAAA,MAA4B;EACvDF,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,cAAc,GACzBC,eAAuB,KACG;EAC1BJ,IAAI,EAAE,iBAAiB;EACvBK,OAAO,EAAE;IAAED;EAAgB;AAC7B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignIn.js","names":["Cache","Authenticate","reloadApplication","startProgress","finishProgress","push","CHANGEPASSWORD_PATH","loginFailed","errorMessage","sendAuthenticationError","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","login","username","password","then","addItem","catch","error","id","dispatchedReloadApplication","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 return dispatch(changePassword());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,OAAOC,YAAY,MAAM,8BAA8B;AAEvD,SAASC,iBAAiB,QAAQ,eAAe;AAEjD,SAASC,aAAa,EAAEC,cAAc,QAAQ,qBAAqB;AACnE,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,mBAAmB,QAAQ,2BAA2B;AAS/D;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GACtBC,YAAoB,IACcC,uBAAuB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,YAAY,EAAE,CAAC;IAExB,OAAOE,QAAQ,CAACX,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC,CACDyB,KAAK,CAAEC,KAAK,IAAK;IAChB,IAAIA,KAAK,CAACC,EAAE,KAAK,8BAA8B,EAAE;MAC/C,MAAMC,2BAA2B,GAAGjB,QAAQ,CAACb,iBAAiB,EAAE,CAAC;MAEjE,OAAO,SAAQ+B,OAAO,CAACD,2BAA2B,CAAC,CAACL,IAAI,CAAC,MAAM;QAC7D3B,KAAK,CAAC4B,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QAC3B,OAAOb,QAAQ,CAACD,cAAc,EAAE,CAAC;MACnC,CAAC,CAAC;IACJ;IAEAC,QAAQ,CAACR,WAAW,CAACuB,KAAK,CAACC,EAAE,CAAC,CAAC;IAC/B,OAAOhB,QAAQ,CAACX,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"SignIn.js","names":["Cache","Authenticate","reloadApplication","startProgress","finishProgress","push","CHANGEPASSWORD_PATH","loginFailed","errorMessage","sendAuthenticationError","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","login","username","password","then","addItem","catch","error","id","dispatchedReloadApplication","_Promise","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 return dispatch(changePassword());\n });\n }\n\n dispatch(loginFailed(error.id));\n return dispatch(finishProgress());\n });\n };\n"],"mappings":";AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,OAAOC,YAAY,MAAM,8BAA8B;AAEvD,SAASC,iBAAiB,QAAQ,eAAe;AAEjD,SAASC,aAAa,EAAEC,cAAc,QAAQ,qBAAqB;AACnE,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC,mBAAmB,QAAQ,2BAA2B;AAS/D;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GACtBC,YAAoB,IACcC,uBAAuB,CAACD,YAAY,CAAC;;AAEzE;A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,EAAE,CAAC;IAExB,OAAOE,QAAQ,CAACX,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC,CACDyB,KAAK,CAAEC,KAAK,IAAK;IAChB,IAAIA,KAAK,CAACC,EAAE,KAAK,8BAA8B,EAAE;MAC/C,MAAMC,2BAA2B,GAAGjB,QAAQ,CAACb,iBAAiB,EAAE,CAAC;MAEjE,OAAO+B,QAAA,CAAQC,OAAO,CAACF,2BAA2B,CAAC,CAACL,IAAI,CAAC,MAAM;QAC7D3B,KAAK,CAAC4B,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QAC3B,OAAOb,QAAQ,CAACD,cAAc,EAAE,CAAC;MACnC,CAAC,CAAC;IACJ;IAEAC,QAAQ,CAACR,WAAW,CAACuB,KAAK,CAACC,EAAE,CAAC,CAAC;IAC/B,OAAOhB,QAAQ,CAACX,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignOut.js","names":["Authenticate","startProgress","finishProgress","resetModularUI","reloadApplication","logoutSuccess","type","logout","dispatch","then"],"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,OAAOA,YAAY,MAAM,8BAA8B;AACvD,SAASC,aAAa,EAAEC,cAAc,QAAQ,qBAAqB;AACnE,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,iBAAiB,QAAQ,eAAe;AAIjD;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,OAA4B;EACvDC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,MAAM,GAAG,MAAoBC,QAAkB,IAAK;EAC/DA,QAAQ,CAACP,aAAa,EAAE,CAAC;EAEzB,OAAO,IAAID,YAAY,EAAE,CACtBO,MAAM,EAAE,CACRE,IAAI,CAAC,MAAMD,QAAQ,CAACL,cAAc,EAAE,CAAC,CAAC,CACtCM,IAAI,CAAC,MAAMD,QAAQ,CAACJ,iBAAiB,EAAE,CAAC,CAAC,CACzCK,IAAI,CAAC,MAAM;IACVD,QAAQ,CAACH,aAAa,EAAE,CAAC;IACzB,OAAOG,QAAQ,CAACN,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"SignOut.js","names":["Authenticate","startProgress","finishProgress","resetModularUI","reloadApplication","logoutSuccess","type","logout","dispatch","then"],"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,OAAOA,YAAY,MAAM,8BAA8B;AACvD,SAASC,aAAa,EAAEC,cAAc,QAAQ,qBAAqB;AACnE,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,iBAAiB,QAAQ,eAAe;AAIjD;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAGA,CAAA,MAA4B;EACvDC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,MAAM,GAAGA,CAAA,KAAoBC,QAAkB,IAAK;EAC/DA,QAAQ,CAACP,aAAa,EAAE,CAAC;EAEzB,OAAO,IAAID,YAAY,EAAE,CACtBO,MAAM,EAAE,CACRE,IAAI,CAAC,MAAMD,QAAQ,CAACL,cAAc,EAAE,CAAC,CAAC,CACtCM,IAAI,CAAC,MAAMD,QAAQ,CAACJ,iBAAiB,EAAE,CAAC,CAAC,CACzCK,IAAI,CAAC,MAAM;IACVD,QAAQ,CAACH,aAAa,EAAE,CAAC;IACzB,OAAOG,QAAQ,CAACN,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.js","names":["modularui","connectCaseView","match","url","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,eAAmC,GAAGD,SAAS,CAC1D,UAAU,EACV;EAAA,IAAC;IAAEE;EAAM,CAAC;EAAA,OAAKA,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF"}
1
+ {"version":3,"file":"CaseView.js","names":["modularui","connectCaseView","_ref","match","url","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,eAAmC,GAAGD,SAAS,CAC1D,UAAU,EACVE,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptDetail.js","names":["modularui","connectConceptDetail","concept","location","search","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,oBAAwC,GAAGD,SAAS,CAC/D,eAAe,EACf;EAAA,IAAC;IAAEE,OAAO;IAAEC;EAAS,CAAC;EAAA,OAAM,aAAYD,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAAC,CAC9B"}
1
+ {"version":3,"file":"ConceptDetail.js","names":["modularui","connectConceptDetail","_ref","concept","location","search","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,oBAAwC,GAAGD,SAAS,CAC/D,eAAe,EACfE,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentBrowser.js","names":["modularui","connectContentBrowser","href","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,qBAAyC,GAAGD,SAAS,CAChE,gBAAgB,EAChB;EAAA,IAAC;IAAEE;EAAK,CAAC;EAAA,OAAKA,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF"}
1
+ {"version":3,"file":"ContentBrowser.js","names":["modularui","connectContentBrowser","_ref","href","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,qBAAyC,GAAGD,SAAS,CAChE,gBAAgB,EAChBE,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentDetail.js","names":["modularui","connectContentDetail","content","location","decodeURIComponent","search","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,oBAAwC,GAAGD,SAAS,CAC/D,eAAe,EACf;EAAA,IAAC;IAAEE,OAAO;IAAEC;EAAS,CAAC;EAAA,OACnB,YAAWC,kBAAkB,CAACF,OAAO,CAAE,GAAEC,QAAQ,CAACE,MAAO,EAAC;AAAA,GAC7D;EAAEC,QAAQ,EAAE;AAAa,CAAC,CAC3B"}
1
+ {"version":3,"file":"ContentDetail.js","names":["modularui","connectContentDetail","_ref","content","location","decodeURIComponent","search","propName"],"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,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,oBAAwC,GAAGD,SAAS,CAC/D,eAAe,EACfE,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"}