@beinformed/ui 1.25.0 → 1.25.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (534) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  3. package/esm/constants/Settings.js.map +1 -1
  4. package/esm/hooks/useAuthentication.js +1 -1
  5. package/esm/hooks/useAuthentication.js.map +1 -1
  6. package/esm/hooks/useModelCatalog.js +0 -1
  7. package/esm/hooks/useModelCatalog.js.map +1 -1
  8. package/esm/hooks/useModels.js +1 -1
  9. package/esm/hooks/useModels.js.map +1 -1
  10. package/esm/hooks/useModularUI.js +1 -1
  11. package/esm/hooks/useModularUI.js.map +1 -1
  12. package/esm/hooks/useModularUIBasic.js +4 -1
  13. package/esm/hooks/useModularUIBasic.js.map +1 -1
  14. package/esm/hooks/useRouter.js +1 -1
  15. package/esm/hooks/useRouter.js.map +1 -1
  16. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  17. package/esm/models/attributes/AttributeModel.js.map +1 -1
  18. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  19. package/esm/models/attributes/NumberAttributeModel.js +5 -2
  20. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  21. package/esm/models/attributes/_createAttribute.js.map +1 -1
  22. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  23. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  24. package/esm/models/base/ResourceModel.js.map +1 -1
  25. package/esm/models/content/ContentTOCModel.js.map +1 -1
  26. package/esm/models/filters/FilterCollection.js.map +1 -1
  27. package/esm/models/form/FormModel.js.map +1 -1
  28. package/esm/models/links/LinkModel.js +3 -1
  29. package/esm/models/links/LinkModel.js.map +1 -1
  30. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  31. package/esm/models/list/ListModel.js.map +1 -1
  32. package/esm/models/parameter/Parameter.js +1 -1
  33. package/esm/models/parameter/Parameter.js.map +1 -1
  34. package/esm/models/types.js.map +1 -1
  35. package/esm/modularui/ModularUIRequest.js.map +1 -1
  36. package/esm/react-client/client.js +1 -1
  37. package/esm/react-client/client.js.map +1 -1
  38. package/esm/react-client/rehydrate.js.map +1 -1
  39. package/esm/react-server/createSSRComplete.js.map +1 -1
  40. package/esm/react-server/renderSSRComplete.js +4 -2
  41. package/esm/react-server/renderSSRComplete.js.map +1 -1
  42. package/esm/react-server/serverUtil.js +18 -9
  43. package/esm/react-server/serverUtil.js.map +1 -1
  44. package/esm/react-theme/ThemeProvider.js +1 -1
  45. package/esm/react-theme/ThemeProvider.js.map +1 -1
  46. package/esm/react-theme/createTheme.js +8 -3
  47. package/esm/react-theme/createTheme.js.map +1 -1
  48. package/esm/react-theme/utils/contrast.js +3 -1
  49. package/esm/react-theme/utils/contrast.js.map +1 -1
  50. package/esm/react-theme/utils/corners.js +3 -1
  51. package/esm/react-theme/utils/corners.js.map +1 -1
  52. package/esm/react-theme/utils/spacers.js +9 -3
  53. package/esm/react-theme/utils/spacers.js.map +1 -1
  54. package/esm/redux/_i18n/{actions.js → I18nActions.js} +1 -1
  55. package/esm/redux/_i18n/I18nActions.js.map +1 -0
  56. package/esm/redux/_i18n/{reducer.js → I18nReducer.js} +1 -1
  57. package/esm/redux/_i18n/I18nReducer.js.map +1 -0
  58. package/esm/redux/_i18n/index.js +2 -2
  59. package/esm/redux/_i18n/index.js.map +1 -1
  60. package/esm/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
  61. package/esm/redux/_modularui/ModularUIActions.js.map +1 -0
  62. package/esm/redux/_modularui/{connector.js → ModularUIConnector.js} +5 -5
  63. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -0
  64. package/esm/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +2 -2
  65. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -0
  66. package/esm/redux/_modularui/{reducer.js → ModularUIReducer.js} +1 -1
  67. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -0
  68. package/esm/redux/_modularui/{selectors.js → ModularUISelectors.js} +1 -1
  69. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -0
  70. package/esm/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +1 -1
  71. package/esm/redux/_modularui/{modularuiUtils.js.map → ModularUIUtils.js.map} +1 -1
  72. package/esm/redux/_modularui/index.js +6 -6
  73. package/esm/redux/_modularui/index.js.map +1 -1
  74. package/esm/redux/_modularui/types.js.map +1 -1
  75. package/esm/redux/_modularui/withModularUI.js +1 -1
  76. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  77. package/esm/redux/_router/{actions.js → RouterActions.js} +1 -1
  78. package/esm/redux/_router/RouterActions.js.map +1 -0
  79. package/esm/redux/_router/{connectors.js → RouterConnectors.js} +2 -2
  80. package/esm/redux/_router/RouterConnectors.js.map +1 -0
  81. package/esm/redux/_router/{middleware.js → RouterMiddleware.js} +1 -1
  82. package/esm/redux/_router/RouterMiddleware.js.map +1 -0
  83. package/esm/redux/_router/{reducer.js → RouterReducer.js} +1 -1
  84. package/esm/redux/_router/RouterReducer.js.map +1 -0
  85. package/esm/redux/_router/index.js +4 -4
  86. package/esm/redux/_router/index.js.map +1 -1
  87. package/esm/redux/actions/Application.js +2 -2
  88. package/esm/redux/actions/Application.js.map +1 -1
  89. package/esm/redux/actions/Authorization.js +3 -3
  90. package/esm/redux/actions/Authorization.js.map +1 -1
  91. package/esm/redux/actions/Error.js +1 -1
  92. package/esm/redux/actions/Error.js.map +1 -1
  93. package/esm/redux/actions/Form.js +2 -2
  94. package/esm/redux/actions/Form.js.map +1 -1
  95. package/esm/redux/actions/FormAttributeSet.js +1 -1
  96. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  97. package/esm/redux/actions/FormAttributeSetRepeatable.js +1 -1
  98. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  99. package/esm/redux/actions/FormAutosave.js +1 -1
  100. package/esm/redux/actions/FormAutosave.js.map +1 -1
  101. package/esm/redux/actions/FormAutosubmit.js +1 -1
  102. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  103. package/esm/redux/actions/FormValidations.js +1 -1
  104. package/esm/redux/actions/FormValidations.js.map +1 -1
  105. package/esm/redux/actions/Notification.js.map +1 -1
  106. package/esm/redux/actions/Preferences.js +1 -1
  107. package/esm/redux/actions/Preferences.js.map +1 -1
  108. package/esm/redux/actions/SignIn.js +1 -1
  109. package/esm/redux/actions/SignIn.js.map +1 -1
  110. package/esm/redux/actions/SignOut.js +1 -1
  111. package/esm/redux/actions/SignOut.js.map +1 -1
  112. package/esm/redux/connectors/Application.js +1 -1
  113. package/esm/redux/connectors/Application.js.map +1 -1
  114. package/esm/redux/connectors/Breadcrumb.js +1 -1
  115. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  116. package/esm/redux/connectors/CaseView.js +1 -1
  117. package/esm/redux/connectors/CaseView.js.map +1 -1
  118. package/esm/redux/connectors/ConceptDetail.js +1 -1
  119. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  120. package/esm/redux/connectors/ContentBrowser.js +1 -1
  121. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  122. package/esm/redux/connectors/ContentDetail.js +1 -1
  123. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  124. package/esm/redux/connectors/ContentDetailSection.js +1 -1
  125. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  126. package/esm/redux/connectors/Form.js +1 -1
  127. package/esm/redux/connectors/Form.js.map +1 -1
  128. package/esm/redux/connectors/ListDetail.js +1 -1
  129. package/esm/redux/connectors/ListDetail.js.map +1 -1
  130. package/esm/redux/connectors/ModelCatalog.js +1 -1
  131. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  132. package/esm/redux/connectors/PanelRenderer.js +1 -1
  133. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  134. package/esm/redux/connectors/Preferences.js.map +1 -1
  135. package/esm/redux/connectors/QuickSearch.js +2 -2
  136. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  137. package/esm/redux/connectors/SignIn.js +1 -1
  138. package/esm/redux/connectors/SignIn.js.map +1 -1
  139. package/esm/redux/connectors/SignOut.js.map +1 -1
  140. package/esm/redux/connectors/Tab.js +1 -1
  141. package/esm/redux/connectors/Tab.js.map +1 -1
  142. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  143. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  144. package/esm/redux/reducers/createReducer.js +3 -3
  145. package/esm/redux/reducers/createReducer.js.map +1 -1
  146. package/esm/redux/store/configureStore.js +4 -4
  147. package/esm/redux/store/configureStore.js.map +1 -1
  148. package/esm/utils/fetch/universalFetch.js +3 -2
  149. package/esm/utils/fetch/universalFetch.js.map +1 -1
  150. package/esm/utils/fetch/xhr.js.map +1 -1
  151. package/esm/utils/helpers/objects.js +4 -3
  152. package/esm/utils/helpers/objects.js.map +1 -1
  153. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  154. package/esm/utils/number/parseNumbers.js.map +1 -1
  155. package/lib/builder/mergeLayoutHintConfigurations.js.flow +1 -1
  156. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  157. package/lib/constants/Settings.js.flow +1 -1
  158. package/lib/constants/Settings.js.map +1 -1
  159. package/lib/hooks/useAuthentication.js +3 -3
  160. package/lib/hooks/useAuthentication.js.flow +1 -1
  161. package/lib/hooks/useAuthentication.js.map +1 -1
  162. package/lib/hooks/useModelCatalog.js.flow +2 -1
  163. package/lib/hooks/useModelCatalog.js.map +1 -1
  164. package/lib/hooks/useModels.js +2 -2
  165. package/lib/hooks/useModels.js.flow +1 -1
  166. package/lib/hooks/useModels.js.map +1 -1
  167. package/lib/hooks/useModularUI.js +3 -3
  168. package/lib/hooks/useModularUI.js.flow +4 -1
  169. package/lib/hooks/useModularUI.js.map +1 -1
  170. package/lib/hooks/useModularUIBasic.js +4 -1
  171. package/lib/hooks/useModularUIBasic.js.flow +1 -1
  172. package/lib/hooks/useModularUIBasic.js.map +1 -1
  173. package/lib/hooks/useRouter.js +6 -6
  174. package/lib/hooks/useRouter.js.flow +7 -1
  175. package/lib/hooks/useRouter.js.map +1 -1
  176. package/lib/models/attributes/AttributeCollection.js.flow +8 -6
  177. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  178. package/lib/models/attributes/AttributeModel.js.flow +18 -16
  179. package/lib/models/attributes/AttributeModel.js.map +1 -1
  180. package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +1 -1
  181. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  182. package/lib/models/attributes/NumberAttributeModel.js +5 -2
  183. package/lib/models/attributes/NumberAttributeModel.js.flow +7 -3
  184. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  185. package/lib/models/attributes/_createAttribute.js.flow +1 -1
  186. package/lib/models/attributes/_createAttribute.js.map +1 -1
  187. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +1 -1
  188. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  189. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +1 -1
  190. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  191. package/lib/models/base/ResourceModel.js.flow +1 -1
  192. package/lib/models/base/ResourceModel.js.map +1 -1
  193. package/lib/models/content/ContentTOCModel.js.flow +4 -1
  194. package/lib/models/content/ContentTOCModel.js.map +1 -1
  195. package/lib/models/filters/FilterCollection.js.flow +1 -1
  196. package/lib/models/filters/FilterCollection.js.map +1 -1
  197. package/lib/models/form/FormModel.js.flow +2 -2
  198. package/lib/models/form/FormModel.js.map +1 -1
  199. package/lib/models/links/LinkModel.js +3 -1
  200. package/lib/models/links/LinkModel.js.flow +4 -2
  201. package/lib/models/links/LinkModel.js.map +1 -1
  202. package/lib/models/links/normalizeLinkJSON.js.flow +1 -1
  203. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  204. package/lib/models/list/ListModel.js.flow +1 -1
  205. package/lib/models/list/ListModel.js.map +1 -1
  206. package/lib/models/parameter/Parameter.js +1 -1
  207. package/lib/models/parameter/Parameter.js.flow +1 -1
  208. package/lib/models/parameter/Parameter.js.map +1 -1
  209. package/lib/models/types.js.flow +6 -6
  210. package/lib/models/types.js.map +1 -1
  211. package/lib/modularui/ModularUIRequest.js.flow +6 -6
  212. package/lib/modularui/ModularUIRequest.js.map +1 -1
  213. package/lib/react-client/client.js +2 -2
  214. package/lib/react-client/client.js.flow +8 -8
  215. package/lib/react-client/client.js.map +1 -1
  216. package/lib/react-client/rehydrate.js.flow +2 -2
  217. package/lib/react-client/rehydrate.js.map +1 -1
  218. package/lib/react-server/createSSRComplete.js.flow +3 -3
  219. package/lib/react-server/createSSRComplete.js.map +1 -1
  220. package/lib/react-server/renderSSRComplete.js +4 -2
  221. package/lib/react-server/renderSSRComplete.js.flow +2 -2
  222. package/lib/react-server/renderSSRComplete.js.map +1 -1
  223. package/lib/react-server/serverUtil.js +19 -10
  224. package/lib/react-server/serverUtil.js.flow +20 -11
  225. package/lib/react-server/serverUtil.js.map +1 -1
  226. package/lib/react-theme/ThemeProvider.js +1 -1
  227. package/lib/react-theme/ThemeProvider.js.flow +1 -1
  228. package/lib/react-theme/ThemeProvider.js.map +1 -1
  229. package/lib/react-theme/__tests__/ThemeProvider.spec.js.flow +2 -0
  230. package/lib/react-theme/__tests__/createTheme.spec.js.flow +3 -0
  231. package/lib/react-theme/createTheme.js +8 -3
  232. package/lib/react-theme/createTheme.js.flow +7 -5
  233. package/lib/react-theme/createTheme.js.map +1 -1
  234. package/lib/react-theme/utils/contrast.js +3 -1
  235. package/lib/react-theme/utils/contrast.js.flow +1 -1
  236. package/lib/react-theme/utils/contrast.js.map +1 -1
  237. package/lib/react-theme/utils/corners.js +3 -1
  238. package/lib/react-theme/utils/corners.js.flow +1 -1
  239. package/lib/react-theme/utils/corners.js.map +1 -1
  240. package/lib/react-theme/utils/spacers.js +9 -3
  241. package/lib/react-theme/utils/spacers.js.flow +3 -3
  242. package/lib/react-theme/utils/spacers.js.map +1 -1
  243. package/lib/redux/_i18n/{actions.js → I18nActions.js} +1 -1
  244. package/lib/redux/_i18n/{actions.js.flow → I18nActions.js.flow} +0 -0
  245. package/lib/redux/_i18n/I18nActions.js.map +1 -0
  246. package/lib/redux/_i18n/{reducer.js → I18nReducer.js} +1 -1
  247. package/{src/redux/_i18n/reducer.js → lib/redux/_i18n/I18nReducer.js.flow} +5 -2
  248. package/lib/redux/_i18n/I18nReducer.js.map +1 -0
  249. package/lib/redux/_i18n/__tests__/actions.spec.js.flow +1 -1
  250. package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +1 -1
  251. package/lib/redux/_i18n/index.js +8 -8
  252. package/lib/redux/_i18n/index.js.flow +2 -2
  253. package/lib/redux/_i18n/index.js.map +1 -1
  254. package/lib/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
  255. package/lib/redux/_modularui/{actions.js.flow → ModularUIActions.js.flow} +1 -1
  256. package/lib/redux/_modularui/ModularUIActions.js.map +1 -0
  257. package/lib/redux/_modularui/{connector.js → ModularUIConnector.js} +11 -11
  258. package/{src/redux/_modularui/connector.js → lib/redux/_modularui/ModularUIConnector.js.flow} +8 -4
  259. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -0
  260. package/lib/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +4 -4
  261. package/lib/redux/_modularui/{middleware.js.flow → ModularUIMiddleware.js.flow} +20 -5
  262. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -0
  263. package/lib/redux/_modularui/{reducer.js → ModularUIReducer.js} +1 -1
  264. package/lib/redux/_modularui/{reducer.js.flow → ModularUIReducer.js.flow} +12 -5
  265. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -0
  266. package/lib/redux/_modularui/{selectors.js → ModularUISelectors.js} +1 -1
  267. package/lib/redux/_modularui/{selectors.js.flow → ModularUISelectors.js.flow} +3 -2
  268. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -0
  269. package/lib/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +1 -1
  270. package/lib/redux/_modularui/{modularuiUtils.js.flow → ModularUIUtils.js.flow} +0 -0
  271. package/lib/redux/_modularui/{modularuiUtils.js.map → ModularUIUtils.js.map} +1 -1
  272. package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
  273. package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +2 -2
  274. package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +1 -1
  275. package/lib/redux/_modularui/index.js +22 -22
  276. package/lib/redux/_modularui/index.js.flow +6 -6
  277. package/lib/redux/_modularui/index.js.map +1 -1
  278. package/lib/redux/_modularui/types.js.flow +10 -4
  279. package/lib/redux/_modularui/types.js.map +1 -1
  280. package/lib/redux/_modularui/withModularUI.js +2 -2
  281. package/lib/redux/_modularui/withModularUI.js.flow +1 -1
  282. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  283. package/lib/redux/_router/{actions.js → RouterActions.js} +1 -1
  284. package/lib/redux/_router/{actions.js.flow → RouterActions.js.flow} +0 -0
  285. package/lib/redux/_router/RouterActions.js.map +1 -0
  286. package/lib/redux/_router/{connectors.js → RouterConnectors.js} +7 -7
  287. package/lib/redux/_router/{connectors.js.flow → RouterConnectors.js.flow} +1 -1
  288. package/lib/redux/_router/RouterConnectors.js.map +1 -0
  289. package/lib/redux/_router/{middleware.js → RouterMiddleware.js} +1 -1
  290. package/lib/redux/_router/{middleware.js.flow → RouterMiddleware.js.flow} +0 -0
  291. package/lib/redux/_router/RouterMiddleware.js.map +1 -0
  292. package/lib/redux/_router/{reducer.js → RouterReducer.js} +1 -1
  293. package/lib/redux/_router/{reducer.js.flow → RouterReducer.js.flow} +0 -0
  294. package/lib/redux/_router/RouterReducer.js.map +1 -0
  295. package/lib/redux/_router/__tests__/actions.spec.js.flow +1 -1
  296. package/lib/redux/_router/__tests__/middleware.spec.js.flow +2 -2
  297. package/lib/redux/_router/__tests__/reducer.spec.js.flow +1 -1
  298. package/lib/redux/_router/index.js +16 -16
  299. package/lib/redux/_router/index.js.flow +4 -4
  300. package/lib/redux/_router/index.js.map +1 -1
  301. package/lib/redux/actions/Application.js +5 -5
  302. package/lib/redux/actions/Application.js.flow +5 -2
  303. package/lib/redux/actions/Application.js.map +1 -1
  304. package/lib/redux/actions/Authorization.js +6 -6
  305. package/lib/redux/actions/Authorization.js.flow +3 -3
  306. package/lib/redux/actions/Authorization.js.map +1 -1
  307. package/lib/redux/actions/Error.js +2 -2
  308. package/lib/redux/actions/Error.js.flow +2 -2
  309. package/lib/redux/actions/Error.js.map +1 -1
  310. package/lib/redux/actions/Form.js +5 -5
  311. package/lib/redux/actions/Form.js.flow +2 -2
  312. package/lib/redux/actions/Form.js.map +1 -1
  313. package/lib/redux/actions/FormAttributeSet.js +2 -2
  314. package/lib/redux/actions/FormAttributeSet.js.flow +1 -1
  315. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  316. package/lib/redux/actions/FormAttributeSetRepeatable.js +4 -4
  317. package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +1 -1
  318. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  319. package/lib/redux/actions/FormAutosave.js +2 -2
  320. package/lib/redux/actions/FormAutosave.js.flow +1 -1
  321. package/lib/redux/actions/FormAutosave.js.map +1 -1
  322. package/lib/redux/actions/FormAutosubmit.js +2 -2
  323. package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
  324. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  325. package/lib/redux/actions/FormValidations.js +2 -2
  326. package/lib/redux/actions/FormValidations.js.flow +5 -3
  327. package/lib/redux/actions/FormValidations.js.map +1 -1
  328. package/lib/redux/actions/Notification.js.flow +1 -1
  329. package/lib/redux/actions/Notification.js.map +1 -1
  330. package/lib/redux/actions/Preferences.js +1 -1
  331. package/lib/redux/actions/Preferences.js.flow +3 -3
  332. package/lib/redux/actions/Preferences.js.map +1 -1
  333. package/lib/redux/actions/SignIn.js +2 -2
  334. package/lib/redux/actions/SignIn.js.flow +1 -1
  335. package/lib/redux/actions/SignIn.js.map +1 -1
  336. package/lib/redux/actions/SignOut.js +2 -2
  337. package/lib/redux/actions/SignOut.js.flow +1 -1
  338. package/lib/redux/actions/SignOut.js.map +1 -1
  339. package/lib/redux/connectors/Application.js +2 -2
  340. package/lib/redux/connectors/Application.js.flow +1 -1
  341. package/lib/redux/connectors/Application.js.map +1 -1
  342. package/lib/redux/connectors/Breadcrumb.js +2 -2
  343. package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
  344. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  345. package/lib/redux/connectors/CaseView.js +2 -2
  346. package/lib/redux/connectors/CaseView.js.flow +1 -1
  347. package/lib/redux/connectors/CaseView.js.map +1 -1
  348. package/lib/redux/connectors/ConceptDetail.js +2 -2
  349. package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
  350. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  351. package/lib/redux/connectors/ContentBrowser.js +2 -2
  352. package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
  353. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  354. package/lib/redux/connectors/ContentDetail.js +2 -2
  355. package/lib/redux/connectors/ContentDetail.js.flow +1 -1
  356. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  357. package/lib/redux/connectors/ContentDetailSection.js +2 -2
  358. package/lib/redux/connectors/ContentDetailSection.js.flow +1 -1
  359. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  360. package/lib/redux/connectors/Form.js +2 -2
  361. package/lib/redux/connectors/Form.js.flow +1 -1
  362. package/lib/redux/connectors/Form.js.map +1 -1
  363. package/lib/redux/connectors/ListDetail.js +2 -2
  364. package/lib/redux/connectors/ListDetail.js.flow +1 -1
  365. package/lib/redux/connectors/ListDetail.js.map +1 -1
  366. package/lib/redux/connectors/ModelCatalog.js +2 -2
  367. package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
  368. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  369. package/lib/redux/connectors/PanelRenderer.js +2 -2
  370. package/lib/redux/connectors/PanelRenderer.js.flow +1 -1
  371. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  372. package/lib/redux/connectors/Preferences.js.flow +5 -2
  373. package/lib/redux/connectors/Preferences.js.map +1 -1
  374. package/lib/redux/connectors/QuickSearch.js +4 -4
  375. package/lib/redux/connectors/QuickSearch.js.flow +2 -2
  376. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  377. package/lib/redux/connectors/SignIn.js +2 -2
  378. package/lib/redux/connectors/SignIn.js.flow +1 -1
  379. package/lib/redux/connectors/SignIn.js.map +1 -1
  380. package/lib/redux/connectors/SignOut.js.flow +2 -2
  381. package/lib/redux/connectors/SignOut.js.map +1 -1
  382. package/lib/redux/connectors/Tab.js +2 -2
  383. package/lib/redux/connectors/Tab.js.flow +1 -1
  384. package/lib/redux/connectors/Tab.js.map +1 -1
  385. package/lib/redux/reducers/ModalsReducer.js.flow +2 -2
  386. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  387. package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
  388. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  389. package/lib/redux/reducers/createReducer.js +6 -6
  390. package/lib/redux/reducers/createReducer.js.flow +3 -3
  391. package/lib/redux/reducers/createReducer.js.map +1 -1
  392. package/lib/redux/store/configureStore.js +5 -5
  393. package/lib/redux/store/configureStore.js.flow +4 -4
  394. package/lib/redux/store/configureStore.js.map +1 -1
  395. package/lib/utils/fetch/universalFetch.js +5 -3
  396. package/lib/utils/fetch/universalFetch.js.flow +8 -6
  397. package/lib/utils/fetch/universalFetch.js.map +1 -1
  398. package/lib/utils/fetch/xhr.js.flow +21 -21
  399. package/lib/utils/fetch/xhr.js.map +1 -1
  400. package/lib/utils/helpers/objects.js.flow +5 -3
  401. package/lib/utils/helpers/objects.js.map +1 -1
  402. package/lib/utils/helpers/sanitizeHtml.js.flow +1 -1
  403. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  404. package/lib/utils/number/parseNumbers.js.flow +8 -2
  405. package/lib/utils/number/parseNumbers.js.map +1 -1
  406. package/package.json +8 -8
  407. package/src/builder/mergeLayoutHintConfigurations.js +1 -1
  408. package/src/constants/Settings.js +1 -1
  409. package/src/hooks/useAuthentication.js +1 -1
  410. package/src/hooks/useModelCatalog.js +2 -1
  411. package/src/hooks/useModels.js +1 -1
  412. package/src/hooks/useModularUI.js +4 -1
  413. package/src/hooks/useModularUIBasic.js +1 -1
  414. package/src/hooks/useRouter.js +7 -1
  415. package/src/models/attributes/AttributeCollection.js +8 -6
  416. package/src/models/attributes/AttributeModel.js +18 -16
  417. package/src/models/attributes/CompositeAttributeChildCollection.js +1 -1
  418. package/src/models/attributes/NumberAttributeModel.js +7 -3
  419. package/src/models/attributes/_createAttribute.js +1 -1
  420. package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +1 -1
  421. package/src/models/attributes/layouthint-rules/DependentAttribute.js +1 -1
  422. package/src/models/base/ResourceModel.js +1 -1
  423. package/src/models/content/ContentTOCModel.js +4 -1
  424. package/src/models/filters/FilterCollection.js +1 -1
  425. package/src/models/form/FormModel.js +2 -2
  426. package/src/models/links/LinkModel.js +4 -2
  427. package/src/models/links/normalizeLinkJSON.js +1 -1
  428. package/src/models/list/ListModel.js +1 -1
  429. package/src/models/parameter/Parameter.js +1 -1
  430. package/src/models/types.js +6 -6
  431. package/src/modularui/ModularUIRequest.js +6 -6
  432. package/src/react-client/client.js +8 -8
  433. package/src/react-client/rehydrate.js +2 -2
  434. package/src/react-server/createSSRComplete.js +3 -3
  435. package/src/react-server/renderSSRComplete.js +2 -2
  436. package/src/react-server/serverUtil.js +20 -11
  437. package/src/react-theme/ThemeProvider.js +1 -1
  438. package/src/react-theme/__tests__/ThemeProvider.spec.js +2 -0
  439. package/src/react-theme/__tests__/createTheme.spec.js +3 -0
  440. package/src/react-theme/createTheme.js +7 -5
  441. package/src/react-theme/utils/contrast.js +1 -1
  442. package/src/react-theme/utils/corners.js +1 -1
  443. package/src/react-theme/utils/spacers.js +3 -3
  444. package/src/redux/_i18n/{actions.js → I18nActions.js} +0 -0
  445. package/{lib/redux/_i18n/reducer.js.flow → src/redux/_i18n/I18nReducer.js} +5 -2
  446. package/src/redux/_i18n/__tests__/actions.spec.js +1 -1
  447. package/src/redux/_i18n/__tests__/reducer.spec.js +1 -1
  448. package/src/redux/_i18n/index.js +2 -2
  449. package/src/redux/_modularui/{actions.js → ModularUIActions.js} +1 -1
  450. package/{lib/redux/_modularui/connector.js.flow → src/redux/_modularui/ModularUIConnector.js} +8 -4
  451. package/src/redux/_modularui/{middleware.js → ModularUIMiddleware.js} +20 -5
  452. package/src/redux/_modularui/{reducer.js → ModularUIReducer.js} +12 -5
  453. package/src/redux/_modularui/{selectors.js → ModularUISelectors.js} +3 -2
  454. package/src/redux/_modularui/{modularuiUtils.js → ModularUIUtils.js} +0 -0
  455. package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
  456. package/src/redux/_modularui/__tests__/reducer.spec.js +2 -2
  457. package/src/redux/_modularui/__tests__/selectors.spec.js +1 -1
  458. package/src/redux/_modularui/index.js +6 -6
  459. package/src/redux/_modularui/types.js +10 -4
  460. package/src/redux/_modularui/withModularUI.js +1 -1
  461. package/src/redux/_router/{actions.js → RouterActions.js} +0 -0
  462. package/src/redux/_router/{connectors.js → RouterConnectors.js} +1 -1
  463. package/src/redux/_router/{middleware.js → RouterMiddleware.js} +0 -0
  464. package/src/redux/_router/{reducer.js → RouterReducer.js} +0 -0
  465. package/src/redux/_router/__tests__/actions.spec.js +1 -1
  466. package/src/redux/_router/__tests__/middleware.spec.js +2 -2
  467. package/src/redux/_router/__tests__/reducer.spec.js +1 -1
  468. package/src/redux/_router/index.js +4 -4
  469. package/src/redux/actions/Application.js +5 -2
  470. package/src/redux/actions/Authorization.js +3 -3
  471. package/src/redux/actions/Error.js +2 -2
  472. package/src/redux/actions/Form.js +2 -2
  473. package/src/redux/actions/FormAttributeSet.js +1 -1
  474. package/src/redux/actions/FormAttributeSetRepeatable.js +1 -1
  475. package/src/redux/actions/FormAutosave.js +1 -1
  476. package/src/redux/actions/FormAutosubmit.js +1 -1
  477. package/src/redux/actions/FormValidations.js +5 -3
  478. package/src/redux/actions/Notification.js +1 -1
  479. package/src/redux/actions/Preferences.js +3 -3
  480. package/src/redux/actions/SignIn.js +1 -1
  481. package/src/redux/actions/SignOut.js +1 -1
  482. package/src/redux/connectors/Application.js +1 -1
  483. package/src/redux/connectors/Breadcrumb.js +1 -1
  484. package/src/redux/connectors/CaseView.js +1 -1
  485. package/src/redux/connectors/ConceptDetail.js +1 -1
  486. package/src/redux/connectors/ContentBrowser.js +1 -1
  487. package/src/redux/connectors/ContentDetail.js +1 -1
  488. package/src/redux/connectors/ContentDetailSection.js +1 -1
  489. package/src/redux/connectors/Form.js +1 -1
  490. package/src/redux/connectors/ListDetail.js +1 -1
  491. package/src/redux/connectors/ModelCatalog.js +1 -1
  492. package/src/redux/connectors/PanelRenderer.js +1 -1
  493. package/src/redux/connectors/Preferences.js +5 -2
  494. package/src/redux/connectors/QuickSearch.js +2 -2
  495. package/src/redux/connectors/SignIn.js +1 -1
  496. package/src/redux/connectors/SignOut.js +2 -2
  497. package/src/redux/connectors/Tab.js +1 -1
  498. package/src/redux/reducers/ModalsReducer.js +2 -2
  499. package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
  500. package/src/redux/reducers/createReducer.js +3 -3
  501. package/src/redux/store/configureStore.js +4 -4
  502. package/src/utils/fetch/universalFetch.js +8 -6
  503. package/src/utils/fetch/xhr.js +21 -21
  504. package/src/utils/helpers/objects.js +5 -3
  505. package/src/utils/helpers/sanitizeHtml.js +1 -1
  506. package/src/utils/number/parseNumbers.js +8 -2
  507. package/types/models/concepts/ConceptDetailModel.d.ts +3 -3
  508. package/types/models/concepts/ConceptRelationModel.d.ts +2 -1
  509. package/types/models/types.d.ts +17 -3
  510. package/types/redux/_modularui/types.d.ts +3 -1
  511. package/types/utils/fetch/universalFetch.d.ts +3 -3
  512. package/types/utils/helpers/objects.d.ts +10 -2
  513. package/esm/redux/_i18n/actions.js.map +0 -1
  514. package/esm/redux/_i18n/reducer.js.map +0 -1
  515. package/esm/redux/_modularui/actions.js.map +0 -1
  516. package/esm/redux/_modularui/connector.js.map +0 -1
  517. package/esm/redux/_modularui/middleware.js.map +0 -1
  518. package/esm/redux/_modularui/reducer.js.map +0 -1
  519. package/esm/redux/_modularui/selectors.js.map +0 -1
  520. package/esm/redux/_router/actions.js.map +0 -1
  521. package/esm/redux/_router/connectors.js.map +0 -1
  522. package/esm/redux/_router/middleware.js.map +0 -1
  523. package/esm/redux/_router/reducer.js.map +0 -1
  524. package/lib/redux/_i18n/actions.js.map +0 -1
  525. package/lib/redux/_i18n/reducer.js.map +0 -1
  526. package/lib/redux/_modularui/actions.js.map +0 -1
  527. package/lib/redux/_modularui/connector.js.map +0 -1
  528. package/lib/redux/_modularui/middleware.js.map +0 -1
  529. package/lib/redux/_modularui/reducer.js.map +0 -1
  530. package/lib/redux/_modularui/selectors.js.map +0 -1
  531. package/lib/redux/_router/actions.js.map +0 -1
  532. package/lib/redux/_router/connectors.js.map +0 -1
  533. package/lib/redux/_router/middleware.js.map +0 -1
  534. package/lib/redux/_router/reducer.js.map +0 -1
@@ -8,7 +8,7 @@ exports.setCustomErrorResponseHandler = exports.handleError = void 0;
8
8
  var _Constants = require("../../constants/Constants");
9
9
  var _Settings = require("../../constants/Settings");
10
10
  var _ErrorResponse = _interopRequireDefault(require("../../models/error/ErrorResponse"));
11
- var _actions = require("../_router/actions");
11
+ var _RouterActions = require("../_router/RouterActions");
12
12
  var _Notification = require("./Notification");
13
13
  var _ProgressIndicator = require("./ProgressIndicator");
14
14
  var _SignIn = require("./SignIn");
@@ -33,7 +33,7 @@ const defaultErrorResponseHandler = error => dispatch => {
33
33
  }
34
34
  if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {
35
35
  const LOGOUT_PATH = (0, _Settings.getSetting)("LOGOUT_PATH", "/signout");
36
- dispatch((0, _actions.push)(LOGOUT_PATH));
36
+ dispatch((0, _RouterActions.push)(LOGOUT_PATH));
37
37
  }
38
38
  if (error.isChangePassword) {
39
39
  return dispatch((0, _SignIn.changePassword)());
@@ -4,7 +4,7 @@ import { getSetting } from "../../constants/Settings";
4
4
 
5
5
  import ErrorResponse from "../../models/error/ErrorResponse";
6
6
 
7
- import { push } from "../_router/actions";
7
+ import { push } from "../_router/RouterActions";
8
8
  import { showXHRErrorNotification } from "./Notification";
9
9
  import { resetProgress } from "./ProgressIndicator";
10
10
  import { changePassword } from "./SignIn";
@@ -21,7 +21,7 @@ type CustomErrorResponseHandler = (
21
21
 
22
22
  /**
23
23
  */
24
- const saveError = (error): SaveErrorAction => ({
24
+ const saveError = (error: ErrorResponse): SaveErrorAction => ({
25
25
  type: "SAVE_ERROR",
26
26
  payload: error,
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Error.js","names":["saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","handleUnauthorized","isBlocked","isConcurrentUser","isInvalidUsername","LOGOUT_PATH","getSetting","push","isChangePassword","changePassword","IS_SERVER","setTimeout","showXHRErrorNotification","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","handleError","resetProgress","ErrorResponse"],"sources":["../../../src/redux/actions/Error.js"],"sourcesContent":["// @flow\nimport { IS_SERVER } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { push } from \"../_router/actions\";\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): 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(err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AACA;AACA;AACA;AACO,MAAME,6BAA6B,GACxCC,OAAmC,IAChC;EACHJ,0BAA0B,GAAGI,OAAO;AACtC,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAMC,WAAW,GACrBzB,KAA6B,IAC7BI,QAAkB,IAAK;EACtBA,QAAQ,CAAC,IAAAsB,gCAAa,GAAE,CAAC;EAEzB,MAAML,aAAa,GAAG,IAAIM,sBAAa,CAAC3B,KAAK,CAAC;EAE9C,OAAOI,QAAQ,CACbgB,0BAA0B,CAACC,aAAa,EAAElB,2BAA2B,CAAC,CACvE;AACH,CAAC;AAAC"}
1
+ {"version":3,"file":"Error.js","names":["saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","handleUnauthorized","isBlocked","isConcurrentUser","isInvalidUsername","LOGOUT_PATH","getSetting","push","isChangePassword","changePassword","IS_SERVER","setTimeout","showXHRErrorNotification","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","handleError","resetProgress","ErrorResponse"],"sources":["../../../src/redux/actions/Error.js"],"sourcesContent":["// @flow\nimport { IS_SERVER } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { push } from \"../_router/RouterActions\";\nimport { showXHRErrorNotification } from \"./Notification\";\nimport { resetProgress } from \"./ProgressIndicator\";\nimport { changePassword } from \"./SignIn\";\nimport { handleUnauthorized } from \"./Authorization\";\n\nimport type { FetchException } from \"../../exceptions\";\nimport type { Dispatch, SaveErrorAction, ThunkAction } from \"../types\";\n\ntype DefaultErrorResponseHandler = (error: ErrorResponse) => ThunkAction;\ntype CustomErrorResponseHandler = (\n errorResponse: ErrorResponse,\n defaultHandler: DefaultErrorResponseHandler\n) => ThunkAction;\n\n/**\n */\nconst saveError = (error: ErrorResponse): SaveErrorAction => ({\n type: \"SAVE_ERROR\",\n payload: error,\n});\n\n/**\n */\nconst defaultErrorResponseHandler: DefaultErrorResponseHandler =\n (error: ErrorResponse): ThunkAction =>\n (dispatch: Dispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch({ type: \"NO_ACTION\" });\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n const LOGOUT_PATH = getSetting(\"LOGOUT_PATH\", \"/signout\");\n dispatch(push(LOGOUT_PATH));\n }\n\n if (error.isChangePassword) {\n return dispatch(changePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n setTimeout(() => {\n throw error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\n/**\n * Standard Custom error response, acts as a proxy and can be overwritten by {@link setCustomErrorResponseHandler}\n */\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (errorResponse, defaultHandler) => (dispatch: Dispatch) =>\n dispatch(defaultHandler(errorResponse));\n\n/**\n * Set a custom error response handler,\n * can be used when custom functionality is needed on certain (error) response\n * of the modular ui, for example when custom logic is needed when a user is unauthorized<br>\n * It receives an {@link ErrorResponse} and the {@link defaultErrorResponseHandler}\n */\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler\n) => {\n customErrorResponseHandler = handler;\n};\n\n/**\n * Handle errors by sending an error notification message\n */\nexport const handleError =\n (error: Error | FetchException): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(resetProgress());\n\n const errorResponse = new ErrorResponse(error);\n\n return dispatch(\n customErrorResponseHandler(errorResponse, defaultErrorResponseHandler)\n );\n };\n"],"mappings":";;;;;;;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAWA;AACA;AACA,MAAMA,SAAS,GAAIC,KAAoB,KAAuB;EAC5DC,IAAI,EAAE,YAAY;EAClBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA,MAAMG,2BAAwD,GAC3DH,KAAoB,IACpBI,Q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Aa,CAAC3B,KAAK,CAAC;EAE9C,OAAOI,QAAQ,CACbgB,0BAA0B,CAACC,aAAa,EAAElB,2BAA2B,CAAC,CACvE;AACH,CAAC;AAAC"}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.previousObject = exports.cancelForm = void 0;
8
- var _actions = require("../_router/actions");
9
- var _actions2 = require("../_modularui/actions");
8
+ var _RouterActions = require("../_router/RouterActions");
9
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
10
10
  var _SignOut = require("./SignOut");
11
11
  var _Application = require("./Application");
12
12
  var _ProgressIndicator = require("./ProgressIndicator");
@@ -17,7 +17,7 @@ var _Authenticate = _interopRequireDefault(require("../../modularui/Authenticate
17
17
  const previousObject = form => {
18
18
  const newForm = form.clone();
19
19
  newForm.setPreviousObject();
20
- return (0, _actions2.updateModel)(newForm);
20
+ return (0, _ModularUIActions.updateModel)(newForm);
21
21
  };
22
22
 
23
23
  /**
@@ -30,10 +30,10 @@ const cancelForm = form => (dispatch, getState) => {
30
30
  dispatch((0, _SignOut.logoutSuccess)());
31
31
  dispatch((0, _Application.reloadApplication)());
32
32
  dispatch((0, _ProgressIndicator.finishProgress)());
33
- return dispatch((0, _actions.goBack)());
33
+ return dispatch((0, _RouterActions.goBack)());
34
34
  });
35
35
  }
36
- return dispatch((0, _actions.goBack)());
36
+ return dispatch((0, _RouterActions.goBack)());
37
37
  };
38
38
  exports.cancelForm = cancelForm;
39
39
  //# sourceMappingURL=Form.js.map
@@ -1,6 +1,6 @@
1
1
  // @flow
2
- import { goBack } from "../_router/actions";
3
- import { updateModel } from "../_modularui/actions";
2
+ import { goBack } from "../_router/RouterActions";
3
+ import { updateModel } from "../_modularui/ModularUIActions";
4
4
  import { logoutSuccess } from "./SignOut";
5
5
  import { reloadApplication } from "./Application";
6
6
  import { startProgress, finishProgress } from "./ProgressIndicator";
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","names":["previousObject","form","newForm","clone","setPreviousObject","updateModel","cancelForm","dispatch","getState","key","auth","mustChangePassword","startProgress","Authenticate","logout","then","logoutSuccess","reloadApplication","finishProgress","goBack"],"sources":["../../../src/redux/actions/Form.js"],"sourcesContent":["// @flow\nimport { goBack } from \"../_router/actions\";\nimport { updateModel } from \"../_modularui/actions\";\nimport { logoutSuccess } from \"./SignOut\";\nimport { reloadApplication } from \"./Application\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n * Go back to previous object (back button on form)\n */\nexport const previousObject = (form: FormModel): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.setPreviousObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelForm =\n (form: FormModel): ThunkAction =>\n (dispatch: Dispatch, getState: GetState) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n return new Authenticate().logout().then(() => {\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n\n return dispatch(goBack());\n });\n }\n\n return dispatch(goBack());\n };\n"],"mappings":";;;;;;;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AACA;AACA;AACO,MAAMA,cAAc,GAAIC,IAAe,IAAwB;EACpE,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,iBAAiB,EAAE;EAE3B,OAAO,IAAAC,qBAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;;AAED;AACA;AADA;AAEO,MAAMI,UAAU,GACpBL,IAAe,IAChB,CAACM,QAAkB,EAAEC,QAAkB,KAAK;EAC1C,IAAIP,IAAI,CAACQ,GAAG,KAAK,gBAAgB,IAAID,QAAQ,EAAE,CAACE,IAAI,CAACC,kBAAkB,EAAE;IACvEJ,QAAQ,CAAC,IAAAK,gCAAa,GAAE,CAAC;IACzB,OAAO,IAAIC,qBAAY,EAAE,CAACC,MAAM,EAAE,CAACC,IAAI,CAAC,MAAM;MAC5CR,QAAQ,CAAC,IAAAS,sBAAa,GAAE,CAAC;MACzBT,QAAQ,CAAC,IAAAU,8BAAiB,GAAE,CAAC;MAC7BV,QAAQ,CAAC,IAAAW,iCAAc,GAAE,CAAC;MAE1B,OAAOX,QAAQ,CAAC,IAAAY,eAAM,GAAE,CAAC;IAC3B,CAAC,CAAC;EACJ;EAEA,OAAOZ,QAAQ,CAAC,IAAAY,eAAM,GAAE,CAAC;AAC3B,CAAC;AAAC"}
1
+ {"version":3,"file":"Form.js","names":["previousObject","form","newForm","clone","setPreviousObject","updateModel","cancelForm","dispatch","getState","key","auth","mustChangePassword","startProgress","Authenticate","logout","then","logoutSuccess","reloadApplication","finishProgress","goBack"],"sources":["../../../src/redux/actions/Form.js"],"sourcesContent":["// @flow\nimport { goBack } from \"../_router/RouterActions\";\nimport { updateModel } from \"../_modularui/ModularUIActions\";\nimport { logoutSuccess } from \"./SignOut\";\nimport { reloadApplication } from \"./Application\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n * Go back to previous object (back button on form)\n */\nexport const previousObject = (form: FormModel): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.setPreviousObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelForm =\n (form: FormModel): ThunkAction =>\n (dispatch: Dispatch, getState: GetState) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n return new Authenticate().logout().then(() => {\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n\n return dispatch(goBack());\n });\n }\n\n return dispatch(goBack());\n };\n"],"mappings":";;;;;;;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AACA;AACA;AACO,MAAMA,cAAc,GAAIC,IAAe,IAAwB;EACpE,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,iBAAiB,EAAE;EAE3B,OAAO,IAAAC,6BAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;;AAED;AACA;AADA;AAEO,MAAMI,UAAU,GACpBL,IAAe,IAChB,CAACM,QAAkB,EAAEC,QAAkB,KAAK;EAC1C,IAAIP,IAAI,CAACQ,GAAG,KAAK,gBAAgB,IAAID,QAAQ,EAAE,CAACE,IAAI,CAACC,kBAAkB,EAAE;IACvEJ,QAAQ,CAAC,IAAAK,gCAAa,GAAE,CAAC;IACzB,OAAO,IAAIC,qBAAY,EAAE,CAACC,MAAM,EAAE,CAACC,IAAI,CAAC,MAAM;MAC5CR,QAAQ,CAAC,IAAAS,sBAAa,GAAE,CAAC;MACzBT,QAAQ,CAAC,IAAAU,8BAAiB,GAAE,CAAC;MAC7BV,QAAQ,CAAC,IAAAW,iCAAc,GAAE,CAAC;MAE1B,OAAOX,QAAQ,CAAC,IAAAY,qBAAM,GAAE,CAAC;IAC3B,CAAC,CAAC;EACJ;EAEA,OAAOZ,QAAQ,CAAC,IAAAY,qBAAM,GAAE,CAAC;AAC3B,CAAC;AAAC"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.updateFormAttribute = void 0;
7
- var _actions = require("../_modularui/actions");
7
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
8
8
  var _Settings = require("../../constants/Settings");
9
9
  var _FormValidations = require("./FormValidations");
10
10
  var _FormAutosave = require("./FormAutosave");
@@ -46,7 +46,7 @@ const updateFormAttribute = function (form, formObject, attribute, inputvalue) {
46
46
  // server form validations happens async, don't wait for the form to return
47
47
  dispatch((0, _FormValidations.validateFormObject)(newForm));
48
48
  }
49
- return dispatch((0, _actions.updateModel)(newForm));
49
+ return dispatch((0, _ModularUIActions.updateModel)(newForm));
50
50
  };
51
51
  };
52
52
  exports.updateFormAttribute = updateFormAttribute;
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import { updateModel } from "../_modularui/actions";
2
+ import { updateModel } from "../_modularui/ModularUIActions";
3
3
 
4
4
  import { getSetting } from "../../constants/Settings";
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSet.js","names":["updateFormAttribute","form","formObject","attribute","inputvalue","options","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","undefined","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","autosubmitFormObject","isChanged","autosaveFormObject","hasDynamicValidations","getSetting","validateFormObject","updateModel"],"sources":["../../../src/redux/actions/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/actions\";\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 return dispatch(updateModel(newForm));\n };\n"],"mappings":";;;;;;AACA;AAEA;AAEA;AACA;AACA;AAOA;AACA;AACA;AACO,MAAMA,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,GAAG,IAAAC,oCAAoB,EAC3CX,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,CAACY,SAAS,EAAE,EAAE;MAC9Db,QAAQ,CAAC,IAAAc,gCAAkB,EAACb,OAAO,CAAC,CAAC;IACvC;IAEA,IACEN,OAAO,CAACI,QAAQ,IAChBE,OAAO,CAACG,iBAAiB,EAAEW,qBAAqB,IAChD,IAAAC,oBAAU,EAAC,+BAA+B,CAAC,EAC3C;MACA;MACAhB,QAAQ,CAAC,IAAAiB,mCAAkB,EAAChB,OAAO,CAAC,CAAC;IACvC;IACA,OAAOD,QAAQ,CAAC,IAAAkB,oBAAW,EAACjB,OAAO,CAAC,CAAC;EACvC,CAAC;AAAA;AAAC"}
1
+ {"version":3,"file":"FormAttributeSet.js","names":["updateFormAttribute","form","formObject","attribute","inputvalue","options","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","undefined","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","autosubmitFormObject","isChanged","autosaveFormObject","hasDynamicValidations","getSetting","validateFormObject","updateModel"],"sources":["../../../src/redux/actions/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { updateModel } 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 return dispatch(updateModel(newForm));\n };\n"],"mappings":";;;;;;AACA;AAEA;AAEA;AACA;AACA;AAOA;AACA;AACA;AACO,MAAMA,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,GAAG,IAAAC,oCAAoB,EAC3CX,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,CAACY,SAAS,EAAE,EAAE;MAC9Db,QAAQ,CAAC,IAAAc,gCAAkB,EAACb,OAAO,CAAC,CAAC;IACvC;IAEA,IACEN,OAAO,CAACI,QAAQ,IAChBE,OAAO,CAACG,iBAAiB,EAAEW,qBAAqB,IAChD,IAAAC,oBAAU,EAAC,+BAA+B,CAAC,EAC3C;MACA;MACAhB,QAAQ,CAAC,IAAAiB,mCAAkB,EAAChB,OAAO,CAAC,CAAC;IACvC;IACA,OAAOD,QAAQ,CAAC,IAAAkB,6BAAW,EAACjB,OAAO,CAAC,CAAC;EACvC,CAAC;AAAA;AAAC"}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.removeRepeatableAttributeSet = exports.cancelRepeatableAttributeSet = exports.addRepeatableAttributeSet = void 0;
7
- var _actions = require("../_modularui/actions");
7
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
8
8
  /**
9
9
  */
10
10
  const addRepeatableAttributeSet = form => {
11
11
  const newForm = form.clone();
12
12
  newForm.addEmptyFormObject();
13
- return (0, _actions.updateModel)(newForm);
13
+ return (0, _ModularUIActions.updateModel)(newForm);
14
14
  };
15
15
 
16
16
  /**
@@ -20,7 +20,7 @@ const cancelRepeatableAttributeSet = (form, formObject) => {
20
20
  const newForm = form.clone();
21
21
  newForm.addEmptyFormObject();
22
22
  newForm.removeFormObject(formObject);
23
- return (0, _actions.updateModel)(newForm);
23
+ return (0, _ModularUIActions.updateModel)(newForm);
24
24
  };
25
25
 
26
26
  /**
@@ -29,7 +29,7 @@ exports.cancelRepeatableAttributeSet = cancelRepeatableAttributeSet;
29
29
  const removeRepeatableAttributeSet = (form, formObject) => {
30
30
  const newForm = form.clone();
31
31
  newForm.removeFormObject(formObject);
32
- return (0, _actions.updateModel)(newForm);
32
+ return (0, _ModularUIActions.updateModel)(newForm);
33
33
  };
34
34
  exports.removeRepeatableAttributeSet = removeRepeatableAttributeSet;
35
35
  //# sourceMappingURL=FormAttributeSetRepeatable.js.map
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import { updateModel } from "../_modularui/actions";
2
+ import { updateModel } from "../_modularui/ModularUIActions";
3
3
 
4
4
  import type FormModel from "../../models/form/FormModel";
5
5
  import type FormObjectModel from "../../models/form/FormObjectModel";
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSetRepeatable.js","names":["addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","updateModel","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n"],"mappings":";;;;;;AACA;AAMA;AACA;AACO,MAAMA,yBAAyB,GACpCC,IAAe,IACO;EACtB,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAE5B,OAAO,IAAAC,oBAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;;AAED;AACA;AADA;AAEO,MAAMI,4BAA4B,GAAG,CAC1CL,IAAe,EACfM,UAA2B,KACL;EACtB,MAAML,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAC5BF,OAAO,CAACM,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAF,oBAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;;AAED;AACA;AADA;AAEO,MAAMO,4BAA4B,GAAG,CAC1CR,IAAe,EACfM,UAA2B,KACL;EACtB,MAAML,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACM,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAF,oBAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;AAAC"}
1
+ {"version":3,"file":"FormAttributeSetRepeatable.js","names":["addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","updateModel","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/ModularUIActions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n"],"mappings":";;;;;;AACA;AAMA;AACA;AACO,MAAMA,yBAAyB,GACpCC,IAAe,IACO;EACtB,MAAMC,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAE5B,OAAO,IAAAC,6BAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;;AAED;AACA;AADA;AAEO,MAAMI,4BAA4B,GAAG,CAC1CL,IAAe,EACfM,UAA2B,KACL;EACtB,MAAML,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACE,kBAAkB,EAAE;EAC5BF,OAAO,CAACM,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAF,6BAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;;AAED;AACA;AADA;AAEO,MAAMO,4BAA4B,GAAG,CAC1CR,IAAe,EACfM,UAA2B,KACL;EACtB,MAAML,OAAO,GAAGD,IAAI,CAACE,KAAK,EAAE;EAE5BD,OAAO,CAACM,gBAAgB,CAACD,UAAU,CAAC;EAEpC,OAAO,IAAAF,6BAAW,EAACH,OAAO,CAAC;AAC7B,CAAC;AAAC"}
@@ -9,7 +9,7 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
9
9
  var _ModularUIRequest = _interopRequireDefault(require("../../modularui/ModularUIRequest"));
10
10
  var _FormModel = _interopRequireDefault(require("../../models/form/FormModel"));
11
11
  var _Constants = require("../../constants/Constants");
12
- var _actions = require("../_modularui/actions");
12
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
13
13
  /**
14
14
  * Update validations of the form currently in the reducer
15
15
  * because of the debounce timeout there might have been an update on the form during validation
@@ -37,7 +37,7 @@ const autosave = (dispatch, form) => {
37
37
  // update last server update to indicate an update has happened
38
38
  // send the existing form to prevent updates in the ui based on autosave results
39
39
  form.lastServerUpdate = savedForm.lastServerUpdate;
40
- dispatch((0, _actions.updateModel)(form));
40
+ dispatch((0, _ModularUIActions.updateModel)(form));
41
41
  dispatch(updateAutosave(_Constants.AUTOSAVE_STATUS.FINISHED, savedForm));
42
42
  }
43
43
  });
@@ -10,7 +10,7 @@ import {
10
10
  AUTOSAVE_STATUS,
11
11
  } from "../../constants/Constants";
12
12
 
13
- import { updateModel } from "../_modularui/actions";
13
+ import { updateModel } from "../_modularui/ModularUIActions";
14
14
 
15
15
  import type { UpdateAutosaveAction, ThunkAction, Dispatch } from "../types";
16
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"FormAutosave.js","names":["updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","updateModel","FINISHED","debouncedAutosave","debounce","VALIDATE_DEBOUNCE_TIMEOUT","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 { updateModel } from \"../_modularui/actions\";\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(updateModel(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;AAEA;AACA;AAEA;AAMA;AAIA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,CACrBC,MAAqC,EACrCC,KAAgB,MACU;EAC1BC,IAAI,EAAE,wBAAwB;EAC9BC,OAAO,EAAE;IACPH,MAAM;IACNC;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,MAAMG,QAAQ,GAAG,CAACC,QAAkB,EAAEC,IAAe,KAAK;EACxDD,QAAQ,CAACN,cAAc,CAACQ,0BAAe,CAACC,KAAK,EAAEF,IAAI,CAAC,CAAC;EAErD,MAAMG,QAAQ,GAAGH,IAAI,CAACI,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;EAE9C,IAAIC,yBAAgB,CAACL,IAAI,CAACM,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;IACjEC,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBC,IAAI,EAAER,QAAQ;IACdS,WAAW,EAAE,KAAK;IAClBC,MAAM,EAAEb,IAAI,CAACa;EACf,CAAC,CAAC,CACCC,KAAK,EAAE,CACPC,IAAI,CAAEC,SAAS,IAAK;IACnB,IAAIA,SAAS,YAAYC,kBAAS,EAAE;MAClC;MACA;MACAjB,IAAI,CAACkB,gBAAgB,GAAGF,SAAS,CAACE,gBAAgB;MAElDnB,QAAQ,CAAC,IAAAoB,oBAAW,EAACnB,IAAI,CAAC,CAAC;MAC3BD,QAAQ,CAACN,cAAc,CAACQ,0BAAe,CAACmB,QAAQ,EAAEJ,SAAS,CAAC,CAAC;IAC/D;EACF,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,iBAAiB,GAAG,IAAAC,iBAAQ,EAAC,CAACvB,QAAQ,EAAEC,IAAI,KAAK;EACrDF,QAAQ,CAACC,QAAQ,EAAEC,IAAI,CAAC;AAC1B,CAAC,EAAEuB,oCAAyB,CAAC;;AAE7B;AACA;AACO,MAAMC,kBAAkB,GAC5BxB,IAAe,IACfD,QAAQ,IACPsB,iBAAiB,CAACtB,QAAQ,EAAEC,IAAI,CAAC;AAAC"}
1
+ {"version":3,"file":"FormAutosave.js","names":["updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","updateModel","FINISHED","debouncedAutosave","debounce","VALIDATE_DEBOUNCE_TIMEOUT","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 { updateModel } 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(updateModel(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;AAEA;AACA;AAEA;AAMA;AAIA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,CACrBC,MAAqC,EACrCC,KAAgB,MACU;EAC1BC,IAAI,EAAE,wBAAwB;EAC9BC,OAAO,EAAE;IACPH,MAAM;IACNC;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,MAAMG,QAAQ,GAAG,CAACC,QAAkB,EAAEC,IAAe,KAAK;EACxDD,QAAQ,CAACN,cAAc,CAACQ,0BAAe,CAACC,KAAK,EAAEF,IAAI,CAAC,CAAC;EAErD,MAAMG,QAAQ,GAAGH,IAAI,CAACI,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;EAE9C,IAAIC,yBAAgB,CAACL,IAAI,CAACM,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE;IACjEC,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBC,IAAI,EAAER,QAAQ;IACdS,WAAW,EAAE,KAAK;IAClBC,MAAM,EAAEb,IAAI,CAACa;EACf,CAAC,CAAC,CACCC,KAAK,EAAE,CACPC,IAAI,CAAEC,SAAS,IAAK;IACnB,IAAIA,SAAS,YAAYC,kBAAS,EAAE;MAClC;MACA;MACAjB,IAAI,CAACkB,gBAAgB,GAAGF,SAAS,CAACE,gBAAgB;MAElDnB,QAAQ,CAAC,IAAAoB,6BAAW,EAACnB,IAAI,CAAC,CAAC;MAC3BD,QAAQ,CAACN,cAAc,CAACQ,0BAAe,CAACmB,QAAQ,EAAEJ,SAAS,CAAC,CAAC;IAC/D;EACF,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,iBAAiB,GAAG,IAAAC,iBAAQ,EAAC,CAACvB,QAAQ,EAAEC,IAAI,KAAK;EACrDF,QAAQ,CAACC,QAAQ,EAAEC,IAAI,CAAC;AAC1B,CAAC,EAAEuB,oCAAyB,CAAC;;AAE7B;AACA;AACO,MAAMC,kBAAkB,GAC5BxB,IAAe,IACfD,QAAQ,IACPsB,iBAAiB,CAACtB,QAAQ,EAAEC,IAAI,CAAC;AAAC"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.autosubmitFormObject = void 0;
7
- var _actions = require("../_modularui/actions");
7
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
8
8
  var _Constants = require("../../constants/Constants");
9
9
  /**
10
10
  */
@@ -17,7 +17,7 @@ const autosubmitFormObject = function (form, attribute) {
17
17
  form.setPreviousObject();
18
18
  }
19
19
  if (form.isChanged() || forceUpdate) {
20
- return (0, _actions.loadModularUI)(form.connectKey, form.selfhref, {
20
+ return (0, _ModularUIActions.loadModularUI)(form.connectKey, form.selfhref, {
21
21
  method: _Constants.HTTP_METHODS.POST,
22
22
  data: form.formdata,
23
23
  updateModel: form
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import { loadModularUI } from "../_modularui/actions";
2
+ import { loadModularUI } from "../_modularui/ModularUIActions";
3
3
  import { HTTP_METHODS } from "../../constants/Constants";
4
4
 
5
5
  import type { AttributeType } from "../../models/types";
@@ -1 +1 @@
1
- {"version":3,"file":"FormAutosubmit.js","names":["autosubmitFormObject","form","attribute","forceUpdate","allObjects","length","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","loadModularUI","connectKey","selfhref","method","HTTP_METHODS","POST","data","formdata","updateModel"],"sources":["../../../src/redux/actions/FormAutosubmit.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/actions\";\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;AACA;AAMA;AACA;AACO,MAAMA,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,OAAO,IAAAQ,sBAAa,EAACV,IAAI,CAACW,UAAU,EAAEX,IAAI,CAACY,QAAQ,EAAE;MACnDC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,IAAI,EAAEhB,IAAI,CAACiB,QAAQ;MACnBC,WAAW,EAAElB;IACf,CAAC,CAAC;EACJ;EAEA,OAAO,IAAI;AACb,CAAC;AAAC"}
1
+ {"version":3,"file":"FormAutosubmit.js","names":["autosubmitFormObject","form","attribute","forceUpdate","allObjects","length","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","loadModularUI","connectKey","selfhref","method","HTTP_METHODS","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;AACA;AAMA;AACA;AACO,MAAMA,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,OAAO,IAAAQ,+BAAa,EAACV,IAAI,CAACW,UAAU,EAAEX,IAAI,CAACY,QAAQ,EAAE;MACnDC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,IAAI,EAAEhB,IAAI,CAACiB,QAAQ;MACnBC,WAAW,EAAElB;IACf,CAAC,CAAC;EACJ;EAEA,OAAO,IAAI;AACb,CAAC;AAAC"}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.validateFormObject = void 0;
8
8
  var _debounce = _interopRequireDefault(require("lodash/debounce"));
9
- var _actions = require("../_modularui/actions");
9
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
10
10
  var _ModularUIRequest = _interopRequireDefault(require("../../modularui/ModularUIRequest"));
11
11
  var _Constants = require("../../constants/Constants");
12
12
  var _FormModel = _interopRequireDefault(require("../../models/form/FormModel"));
@@ -21,7 +21,7 @@ const updateValidations = (form, formWithValidations) => (dispatch, getState) =>
21
21
  if (validatedForm instanceof _FormModel.default) {
22
22
  validatedForm.updateValidations(formWithValidations.data);
23
23
  }
24
- dispatch((0, _actions.updateModel)(validatedForm));
24
+ dispatch((0, _ModularUIActions.updateModel)(validatedForm));
25
25
  }
26
26
  };
27
27
 
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import debounce from "lodash/debounce";
3
3
 
4
- import { updateModel } from "../_modularui/actions";
4
+ import { updateModel } from "../_modularui/ModularUIActions";
5
5
 
6
6
  import ModularUIRequest from "../../modularui/ModularUIRequest";
7
7
 
@@ -12,14 +12,16 @@ import {
12
12
 
13
13
  import FormModel from "../../models/form/FormModel";
14
14
 
15
- import type { Dispatch, ThunkAction } from "../types";
15
+ import type { Dispatch, GetState, ThunkAction } from "../types";
16
+ import type { ModularUIModel } from "../../models";
16
17
 
17
18
  /**
18
19
  * Update validations of the form currently in the reducer
19
20
  * because of the debounce timeout there might have been an update on the form during validation
20
21
  */
21
22
  const updateValidations =
22
- (form, formWithValidations) => (dispatch, getState) => {
23
+ (form: FormModel, formWithValidations: ModularUIModel) =>
24
+ (dispatch: Dispatch, getState: GetState) => {
23
25
  const currentForm = getState().modularui[form.connectKey];
24
26
 
25
27
  if (currentForm) {
@@ -1 +1 @@
1
- {"version":3,"file":"FormValidations.js","names":["updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","updateModel","debouncedValidateFormObject","debounce","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateModel } from \"../_modularui/actions\";\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, ThunkAction } 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 updateValidations =\n (form, formWithValidations) => (dispatch, getState) => {\n const currentForm = getState().modularui[form.connectKey];\n\n if (currentForm) {\n const validatedForm = currentForm.model.clone(true);\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateModel(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;AAEA;AAEA;AAEA;AAKA;AAIA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,GACrB,CAACC,IAAI,EAAEC,mBAAmB,KAAK,CAACC,QAAQ,EAAEC,QAAQ,KAAK;EACrD,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,CAAC,IAAI,CAAC;IACnD,IAAIF,aAAa,YAAYG,kBAAS,EAAE;MACtCH,aAAa,CAACR,iBAAiB,CAACE,mBAAmB,CAACU,IAAI,CAAC;IAC3D;IAEAT,QAAQ,CAAC,IAAAU,oBAAW,EAACL,aAAa,CAAC,CAAC;EACtC;AACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,2BAA2B,GAAG,IAAAC,iBAAQ,EAG1C,CAACZ,QAAQ,EAAEF,IAAe,KAAK;EAC7B,IAAIe,yBAAgB,CAACf,IAAI,CAACgB,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE;IAClEC,MAAM,EAAEC,uBAAY,CAACC,IAAI;IACzBT,IAAI,EAAEX,IAAI,CAACqB,cAAc;IACzBC,WAAW,EAAE,KAAK;IAClBC,mBAAmB,EAAE,IAAI;IACzBC,MAAM,EAAExB,IAAI,CAACwB;EACf,CAAC,CAAC,CACCC,KAAK,EAAE,CACPC,IAAI,CAAEzB,mBAAmB,IACxBC,QAAQ,CAACH,iBAAiB,CAACC,IAAI,EAAEC,mBAAmB,CAAC,CAAC,CACvD;AACL,CAAC,EACD0B,oCAAyB,EACzB;EACEC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE;AACZ,CAAC,CACF;;AAED;AACA;AACO,MAAMC,kBAAkB,GAC5B9B,IAAe,IACfE,QAAQ,IACPW,2BAA2B,CAACX,QAAQ,EAAEF,IAAI,CAAC;AAAC"}
1
+ {"version":3,"file":"FormValidations.js","names":["updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","updateModel","debouncedValidateFormObject","debounce","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateModel } 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(true);\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateModel(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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AAAC"}
@@ -45,7 +45,7 @@ export const showNotification =
45
45
 
46
46
  /**
47
47
  */
48
- const getNotificationMessageId = (form) => {
48
+ const getNotificationMessageId = (form: FormModel) => {
49
49
  if (form.actiontype === "create") {
50
50
  return "Notification.Msg.Create";
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","names":["dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","startProgress","NOTIFICATION_TYPES","SUCCESS","id","getSetting","finishProgress","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form) => {\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;AAEA;AAEA;AAOA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAG,OAAkC;EACnEC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AADA;AAEO,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;AADA;AAEA,MAAMI,wBAAwB,GAAIC,IAAI,IAAK;EACzC,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;AACO,MAAMC,oBAAoB,GAC9BF,IAAe,IACfJ,QAAQ,IAAK;EACZA,QAAQ,CAAC,IAAAO,gCAAa,GAAE,CAAC;EAEzBP,QAAQ,CACNJ,gBAAgB,CAACY,6BAAkB,CAACC,OAAO,EAAE;IAC3CC,EAAE,EAAEP,wBAAwB,CAACC,IAAI;EACnC,CAAC,CAAC,CACH;EAEDF,UAAU,CAAC,MAAM;IACfF,QAAQ,CAACN,mBAAmB,EAAE,CAAC;EACjC,CAAC,EAAE,IAAAiB,oBAAU,EAAC,2BAA2B,CAAC,CAAC;EAE3C,OAAOX,QAAQ,CAAC,IAAAY,iCAAc,GAAE,CAAC;AACnC,CAAC;;AAEH;AACA;AACA;AAFA;AAGO,MAAMC,wBAAwB,GAClCf,KAAoB,IACpBE,QAAQ,IACPA,QAAQ,CACNJ,gBAAgB,CACdY,6BAAkB,CAACM,KAAK,EACxB;EACEJ,EAAE,EAAEZ,KAAK,CAACY,EAAE;EACZK,cAAc,EAAEjB,KAAK,CAACD,OAAO;EAC7BmB,UAAU,EAAElB,KAAK,CAACmB;AACpB,CAAC,EACDnB,KAAK,CACN,CACF;AAAC"}
1
+ {"version":3,"file":"Notification.js","names":["dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","startProgress","NOTIFICATION_TYPES","SUCCESS","id","getSetting","finishProgress","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification =\n (form: FormModel): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification(NOTIFICATION_TYPES.SUCCESS, {\n id: getNotificationMessageId(form),\n })\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n };\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification =\n (error: ErrorResponse): ThunkAction =>\n (dispatch) =>\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.ERROR,\n {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error\n )\n );\n"],"mappings":";;;;;;AACA;AAEA;AAEA;AAOA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAG,OAAkC;EACnEC,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AADA;AAEO,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,OAA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 const setPreferences = preferences => ({
67
67
  */
68
68
  exports.setPreferences = setPreferences;
69
69
  const setThemePreference = configTheme => {
70
- let themeData = {};
70
+ let themeData;
71
71
  try {
72
72
  themeData = configTheme ? JSON.parse(configTheme) : null;
73
73
  } catch (error) {
@@ -27,7 +27,7 @@ const getServerPreferenceValue = (
27
27
  defaultValue: PreferenceValue = null,
28
28
  type?: string
29
29
  ) => {
30
- let value = null;
30
+ let value: PreferenceValue = null;
31
31
  if (typeof preferencesProvider !== "undefined") {
32
32
  value = preferencesProvider.getPreferenceByName(preferenceName);
33
33
  }
@@ -80,7 +80,7 @@ export const setPreferences = (preferences: Object): SetPreferencesAction => ({
80
80
  export const setThemePreference = (
81
81
  configTheme: string
82
82
  ): SetPreferenceAction => {
83
- let themeData = {};
83
+ let themeData;
84
84
 
85
85
  try {
86
86
  themeData = configTheme ? JSON.parse(configTheme) : null;
@@ -101,7 +101,7 @@ export const setThemePreference = (
101
101
  export const setAllContentInDataSetting = (
102
102
  state?: ReduxState
103
103
  ): SetPreferenceAction => {
104
- let allContentInDataSetting = false;
104
+ let allContentInDataSetting: PreferenceValue = false;
105
105
 
106
106
  if (
107
107
  typeof preferencesProvider !== "undefined" &&
@@ -1 +1 @@
1
- {"version":3,"file":"Preferences.js","names":["getServerPreferenceValue","preferenceName","defaultValue","type","value","preferencesProvider","getPreferenceByName","split","val","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","isPlainObject","setSettings","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setSetting","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n) => {\n let value = 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 = 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;AAEA;AACA;AASA;AASA;AACA;AACA,MAAMA,wBAAwB,GAAG,UAC/BC,cAAsB,EAGnB;EAAA,IAFHC,YAA6B,uEAAG,IAAI;EAAA,IACpCC,IAAa;EAEb,IAAIC,KAAK,GAAG,IAAI;EAChB,IAAI,OAAOC,mBAAmB,KAAK,WAAW,EAAE;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAAmB,C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,EACtBV,KAAK,EAAEZ,WAAW,CAACsB,iCAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACC,8BAAmB,GAAGtC,wBAAwB,CAC7CsC,8BAAmB,EACnBX,KAAK,EAAEZ,WAAW,CAACuB,8BAAmB,CAAC,IAAK,SAAQ;EAExD,CAAC;EAED,IAAAd,qBAAW,EAACS,aAAa,CAAC;EAC1B,OAAOnB,cAAc,CAACmB,aAAa,CAAC;AACtC,CAAC;AAAC"}
1
+ {"version":3,"file":"Preferences.js","names":["getServerPreferenceValue","preferenceName","defaultValue","type","value","preferencesProvider","getPreferenceByName","split","val","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","isPlainObject","setSettings","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setSetting","setLoginPreferences","loginSettings","LOGIN_TYPE","LOGIN_PATH_SETTING","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_TYPE,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n) => {\n let value: PreferenceValue = null;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (value == null) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value;\n};\n\n/**\n */\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n): SetPreferenceAction => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\n/**\n */\nexport const setPreference = (\n propertyName: string,\n propertyValue: PreferenceValue = null\n): SetPreferenceAction => ({\n type: \"SET_PREFERENCE\",\n payload: {\n [propertyName]: propertyValue,\n },\n});\n\n/**\n */\nexport const setPreferences = (preferences: Object): SetPreferencesAction => ({\n type: \"SET_PREFERENCES\",\n payload: {\n ...preferences,\n },\n});\n\n/**\n */\nexport const setThemePreference = (\n configTheme: string\n): SetPreferenceAction => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (\n state?: ReduxState\n): SetPreferenceAction => {\n let allContentInDataSetting: PreferenceValue = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[ALL_CONTENT_IN_DATA_SETTING];\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (\n state?: ReduxState\n): SetPreferencesAction => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE]\n ),\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ?? `/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;AAEA;AACA;AASA;AASA;AACA;AACA,MAAMA,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,uBAAAC,KAAK,OAALA,KAAK,EAAU,GAAG,CAAC,EAAE;IAAA;IACzEA,KAAK,GAAG,6BAAAA,KAAK,CAACG,KAAK,CAAC,GAAG,CAAC,iBAAMC,GAAG,IAAK,mBAAAA,GAAG,OAAHA,GAAG,CAAO,CAAC;EACnD;EAEA,OAAOJ,KAAK;AACd,CAAC;;AAED;AACA;AACO,MAAMK,mBAAmB,GAAG,UACjCC,YAAoB,EAGI;EAAA,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AAyB,EAAE;EAC3E,CAAC,MAAM,IAAI,OAAOF,KAAK,KAAK,WAAW,EAAE;IACvCC,uBAAuB,GAAGD,KAAK,CAACZ,WAAW,CAACe,sCAA2B,CAAC;EAC1E;EAEA,IAAAC,oBAAU,EAACD,sCAA2B,EAAE,CAAC,CAACF,uBAAuB,CAAC;EAClE,OAAOjB,aAAa,CAACmB,sCAA2B,EAAEF,uBAAuB,CAAC;AAC5E,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAMI,mBAAmB,GAC9BL,KAAkB,IACO;EACzB,MAAMM,aAAa,GAAG;IACpB,CAACC,qBAAU,GAAGlC,wBAAwB,CACpCkC,qBAAU,EACVP,KAAK,EAAEZ,WAAW,CAACmB,qBAAU,CAAC,CAC/B;IACD,CAACC,6BAAkB,GAAGnC,wBAAwB,CAC5CmC,6BAAkB,EAClBR,KAAK,EAAEZ,WAAW,CAACoB,6BAAkB,CAAC,IAAK,mBAAkB,CAC9D;IACD,CAACC,iCAAsB,GAAGpC,wBAAwB,CAChDoC,iCAAsB,EACtBT,KAAK,EAAEZ,WAAW,CAACqB,iCAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACC,iCAAsB,GAAGrC,wBAAwB,CAChDqC,iCAAsB,EACtBV,KAAK,EAAEZ,WAAW,CAACsB,iCAAsB,CAAC,IAAI,YAAY,CAC3D;IACD,CAACC,8BAAmB,GAAGtC,wBAAwB,CAC7CsC,8BAAmB,EACnBX,KAAK,EAAEZ,WAAW,CAACuB,8BAAmB,CAAC,IAAK,SAAQ;EAExD,CAAC;EAED,IAAAd,qBAAW,EAACS,aAAa,CAAC;EAC1B,OAAOnB,cAAc,CAACmB,aAAa,CAAC;AACtC,CAAC;AAAC"}
@@ -10,7 +10,7 @@ var _Cache = _interopRequireDefault(require("../../utils/browser/Cache"));
10
10
  var _Authenticate = _interopRequireDefault(require("../../modularui/Authenticate"));
11
11
  var _Application = require("./Application");
12
12
  var _ProgressIndicator = require("./ProgressIndicator");
13
- var _actions = require("../_router/actions");
13
+ var _RouterActions = require("../_router/RouterActions");
14
14
  var _Constants = require("../../constants/Constants");
15
15
  /**
16
16
  * Send login failed action
@@ -52,7 +52,7 @@ const changePassword = () => (dispatch, getState) => {
52
52
  });
53
53
  const isModal = getState().router.location?.state?.modal;
54
54
  const locationFrom = getState().router.location?.state?.from;
55
- return dispatch((0, _actions.push)(_Constants.CHANGEPASSWORD_PATH, {
55
+ return dispatch((0, _RouterActions.push)(_Constants.CHANGEPASSWORD_PATH, {
56
56
  from: locationFrom ? locationFrom : getState().router.location,
57
57
  modal: isModal
58
58
  }));
@@ -5,7 +5,7 @@ import Authenticate from "../../modularui/Authenticate";
5
5
  import { reloadApplication } from "./Application";
6
6
 
7
7
  import { startProgress, finishProgress } from "./ProgressIndicator";
8
- import { push } from "../_router/actions";
8
+ import { push } from "../_router/RouterActions";
9
9
  import { CHANGEPASSWORD_PATH } from "../../constants/Constants";
10
10
 
11
11
  import type {
@@ -1 +1 @@
1
- {"version":3,"file":"SignIn.js","names":["loginFailed","errorMessage","sendAuthenticationError","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","push","CHANGEPASSWORD_PATH","login","username","password","startProgress","Authenticate","then","reloadApplication","Cache","addItem","finishProgress","catch","error","id","dispatchedReloadApplication","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/actions\";\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;AACA;AAEA;AAEA;AACA;AACA;AASA;AACA;AACA;AACO,MAAMA,WAAW,GACtBC,YAAoB,IACcC,uBAAuB,CAACD,YAAY,CAAC;;AAEzE;AACA;AACA;AAFA;AAGO,MAAMC,uBAAuB,GAClCD,YAAoB,KACe;EACnCE,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEH;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AAFA;AAGO,MAAMI,eAAe,GAAG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AC/C,MAAMC,2BAA2B,GAAGxB,QAAQ,CAAC,IAAAiB,8BAAiB,GAAE,CAAC;MAEjE,OAAO,iBAAQQ,OAAO,CAACD,2BAA2B,CAAC,CAACR,IAAI,CAAC,MAAM;QAC7DE,cAAK,CAACC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QAC3B,OAAOnB,QAAQ,CAACD,cAAc,EAAE,CAAC;MACnC,CAAC,CAAC;IACJ;IAEAC,QAAQ,CAACR,WAAW,CAAC8B,KAAK,CAACC,EAAE,CAAC,CAAC;IAC/B,OAAOvB,QAAQ,CAAC,IAAAoB,iCAAc,GAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC;AAAC"}
1
+ {"version":3,"file":"SignIn.js","names":["loginFailed","errorMessage","sendAuthenticationError","type","payload","resetAuthErrors","loginSuccess","changePassword","dispatch","getState","isModal","router","location","state","modal","locationFrom","from","push","CHANGEPASSWORD_PATH","login","username","password","startProgress","Authenticate","then","reloadApplication","Cache","addItem","finishProgress","catch","error","id","dispatchedReloadApplication","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;AACA;AAEA;AAEA;AACA;AACA;AASA;AACA;AACA;AACO,MAAMA,WAAW,GACtBC,YAAoB,IACcC,uBAAuB,CAACD,YAAY,CAAC;;AAEzE;AACA;AACA;AAFA;AAGO,MAAMC,uBAAuB,GAClCD,YAAoB,KACe;EACnCE,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEH;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AAFA;AAGO,MAAMI,eAAe,GAAG,OAA8B;EAC3DF,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AAFA;AAGO,MAAMG,YAAY,GAAG,OAA2B;EACrDH,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA;AAFA;AAGO,MAAMI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,CAAC,MAAM,EAAE,IAAI,CAAC;QAC3B,OAAOnB,QAAQ,CAACD,cAAc,EAAE,CAAC;MACnC,CAAC,CAAC;IACJ;IAEAC,QAAQ,CAACR,WAAW,CAAC8B,KAAK,CAACC,EAAE,CAAC,CAAC;IAC/B,OAAOvB,QAAQ,CAAC,IAAAoB,iCAAc,GAAE,CAAC;EACnC,CAAC,CAAC;AACN,CAAC;AAAC"}
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.logoutSuccess = exports.logout = void 0;
8
8
  var _Authenticate = _interopRequireDefault(require("../../modularui/Authenticate"));
9
9
  var _ProgressIndicator = require("./ProgressIndicator");
10
- var _actions = require("../_modularui/actions");
10
+ var _ModularUIActions = require("../_modularui/ModularUIActions");
11
11
  var _Application = require("./Application");
12
12
  /**
13
13
  * Send logout success action
@@ -21,7 +21,7 @@ const logoutSuccess = () => ({
21
21
  exports.logoutSuccess = logoutSuccess;
22
22
  const logout = () => dispatch => {
23
23
  dispatch((0, _ProgressIndicator.startProgress)());
24
- return new _Authenticate.default().logout().then(() => dispatch((0, _actions.resetModularUI)())).then(() => dispatch((0, _Application.reloadApplication)())).then(() => {
24
+ return new _Authenticate.default().logout().then(() => dispatch((0, _ModularUIActions.resetModularUI)())).then(() => dispatch((0, _Application.reloadApplication)())).then(() => {
25
25
  dispatch(logoutSuccess());
26
26
  return dispatch((0, _ProgressIndicator.finishProgress)());
27
27
  });
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
  import Authenticate from "../../modularui/Authenticate";
3
3
  import { startProgress, finishProgress } from "./ProgressIndicator";
4
- import { resetModularUI } from "../_modularui/actions";
4
+ import { resetModularUI } from "../_modularui/ModularUIActions";
5
5
  import { reloadApplication } from "./Application";
6
6
 
7
7
  import type { Dispatch, LogoutSuccessAction, ThunkAction } from "../types";