@beinformed/ui 1.31.1 → 1.31.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (976) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  3. package/esm/constants/LayoutHints.js.map +1 -1
  4. package/esm/constants/Settings.js.map +1 -1
  5. package/esm/exceptions/FetchException.js.map +1 -1
  6. package/esm/exceptions/NetworkException.js.map +1 -1
  7. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  8. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  9. package/esm/hooks/useAuthentication.js.map +1 -1
  10. package/esm/hooks/useContent.js.map +1 -1
  11. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  12. package/esm/hooks/useForm.js.map +1 -1
  13. package/esm/hooks/useI18n.js.map +1 -1
  14. package/esm/hooks/useModal.js.map +1 -1
  15. package/esm/hooks/useModelCatalog.js.map +1 -1
  16. package/esm/hooks/useModularUI.js.map +1 -1
  17. package/esm/hooks/useModularUIBasic.js.map +1 -1
  18. package/esm/hooks/useModularUIModel.js.map +1 -1
  19. package/esm/hooks/useModularUIRequest.js.map +1 -1
  20. package/esm/hooks/useNotification.js.map +1 -1
  21. package/esm/hooks/usePreference.js +8 -2
  22. package/esm/hooks/usePreference.js.map +1 -1
  23. package/esm/i18n/Locale.js.map +1 -1
  24. package/esm/i18n/Locales.js.map +1 -1
  25. package/esm/i18n/Message.js.map +1 -1
  26. package/esm/i18n/withMessage.js.map +1 -1
  27. package/esm/models/actions/ActionCollection.js.map +1 -1
  28. package/esm/models/actions/ActionModel.js.map +1 -1
  29. package/esm/models/application/ApplicationModel.js.map +1 -1
  30. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  31. package/esm/models/attributes/AttributeContent.js.map +1 -1
  32. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  33. package/esm/models/attributes/AttributeModel.js.map +1 -1
  34. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  35. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  36. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  37. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  38. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  39. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  40. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  41. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  42. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  43. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  44. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  45. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  46. package/esm/models/attributes/_createAttribute.js.map +1 -1
  47. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  48. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  49. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  50. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  51. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  52. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  53. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  54. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  55. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  56. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  57. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  58. package/esm/models/base/BaseCollection.js.map +1 -1
  59. package/esm/models/base/BaseModel.js.map +1 -1
  60. package/esm/models/base/ResourceModel.js.map +1 -1
  61. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  62. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  63. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  64. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  65. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  66. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  67. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  68. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  69. package/esm/models/content/ContentIndexModel.js.map +1 -1
  70. package/esm/models/content/ContentLinkModel.js.map +1 -1
  71. package/esm/models/content/ContentModel.js.map +1 -1
  72. package/esm/models/content/ContentTOCModel.js.map +1 -1
  73. package/esm/models/content/SectionModel.js.map +1 -1
  74. package/esm/models/content/SubSectionModel.js.map +1 -1
  75. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  76. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  77. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  78. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  79. package/esm/models/detail/DetailModel.js.map +1 -1
  80. package/esm/models/error/ErrorCollection.js.map +1 -1
  81. package/esm/models/error/ErrorModel.js.map +1 -1
  82. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  83. package/esm/models/filters/BaseFilterModel.js +19 -0
  84. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  85. package/esm/models/filters/FilterCollection.js.map +1 -1
  86. package/esm/models/form/FormModel.js.map +1 -1
  87. package/esm/models/form/FormObjectModel.js.map +1 -1
  88. package/esm/models/grouping/GroupingModel.js.map +1 -1
  89. package/esm/models/href/Href.js +23 -11
  90. package/esm/models/href/Href.js.map +1 -1
  91. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  92. package/esm/models/links/LinkCollection.js.map +1 -1
  93. package/esm/models/links/LinkModel.js.map +1 -1
  94. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  95. package/esm/models/list/ListDetailModel.js.map +1 -1
  96. package/esm/models/list/ListItemCollection.js.map +1 -1
  97. package/esm/models/list/ListItemModel.js.map +1 -1
  98. package/esm/models/list/ListModel.js.map +1 -1
  99. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  100. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  101. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  102. package/esm/models/paging/PagingModel.js.map +1 -1
  103. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  104. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  105. package/esm/models/resolveModel.js.map +1 -1
  106. package/esm/models/sorting/SortingModel.js.map +1 -1
  107. package/esm/models/tab/TabModel.js.map +1 -1
  108. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  109. package/esm/models/types.js.map +1 -1
  110. package/esm/models/user/UserProfileModel.js.map +1 -1
  111. package/esm/modularui/CaptchaRequest.js.map +1 -1
  112. package/esm/modularui/ModularUIRequest.js.map +1 -1
  113. package/esm/modularui/UploadRequest.js.map +1 -1
  114. package/esm/react/utils.js.map +1 -1
  115. package/esm/react-client/client.js +1 -0
  116. package/esm/react-client/client.js.map +1 -1
  117. package/esm/react-client/contextPath.js.map +1 -1
  118. package/esm/react-client/rehydrate.js.map +1 -1
  119. package/esm/react-server/createSSRComplete.js.map +1 -1
  120. package/esm/react-server/renderSSRComplete.js.map +1 -1
  121. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  122. package/esm/react-server/requestInformation.js.map +1 -1
  123. package/esm/react-server/serverUtil.js.map +1 -1
  124. package/esm/react-theme/createTheme.js.map +1 -1
  125. package/esm/react-theme/utils/colors.js.map +1 -1
  126. package/esm/react-theme/utils/contrast.js.map +1 -1
  127. package/esm/react-theme/utils/corners.js.map +1 -1
  128. package/esm/react-theme/utils/spacers.js.map +1 -1
  129. package/esm/react-theme/utils/themeProps.js.map +1 -1
  130. package/esm/redux/_i18n/I18nActions.js.map +1 -1
  131. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  132. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  133. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  134. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  135. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  136. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
  137. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  138. package/esm/redux/_modularui/types.js.map +1 -1
  139. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  140. package/esm/redux/_router/RouterActions.js.map +1 -1
  141. package/esm/redux/_router/RouterConnectors.js.map +1 -1
  142. package/esm/redux/_router/RouterReducer.js.map +1 -1
  143. package/esm/redux/actions/Application.js.map +1 -1
  144. package/esm/redux/actions/Authorization.js.map +1 -1
  145. package/esm/redux/actions/Error.js.map +1 -1
  146. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  147. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  148. package/esm/redux/actions/FormAutosave.js.map +1 -1
  149. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  150. package/esm/redux/actions/FormValidations.js.map +1 -1
  151. package/esm/redux/actions/Notification.js.map +1 -1
  152. package/esm/redux/actions/Preferences.js.map +1 -1
  153. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  154. package/esm/redux/actions/SignIn.js.map +1 -1
  155. package/esm/redux/connectors/Application.js.map +1 -1
  156. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  157. package/esm/redux/connectors/CaseView.js.map +1 -1
  158. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  159. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  160. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  161. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  162. package/esm/redux/connectors/Form.js.map +1 -1
  163. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  164. package/esm/redux/connectors/ListDetail.js.map +1 -1
  165. package/esm/redux/connectors/Modal.js.map +1 -1
  166. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  167. package/esm/redux/connectors/Notification.js.map +1 -1
  168. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  169. package/esm/redux/connectors/Preferences.js.map +1 -1
  170. package/esm/redux/connectors/Progress.js.map +1 -1
  171. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  172. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  173. package/esm/redux/connectors/SignIn.js.map +1 -1
  174. package/esm/redux/connectors/SignOut.js.map +1 -1
  175. package/esm/redux/connectors/Tab.js.map +1 -1
  176. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  177. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  178. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  179. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  180. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  181. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  182. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  183. package/esm/redux/store/configureStore.js.map +1 -1
  184. package/esm/utils/browser/Cookies.js.map +1 -1
  185. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  186. package/esm/utils/fetch/universalFetch.js.map +1 -1
  187. package/esm/utils/fetch/xhr.js.map +1 -1
  188. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  189. package/esm/utils/helpers/text.js.map +1 -1
  190. package/esm/utils/number/DecimalFormat.js.map +1 -1
  191. package/esm/utils/number/formatValue.js.map +1 -1
  192. package/esm/utils/number/parseNumbers.js.map +1 -1
  193. package/lib/builder/__tests__/mergeLayoutHintConfigurations.spec.js.flow +4 -4
  194. package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
  195. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  196. package/lib/constants/LayoutHints.js.flow +1 -1
  197. package/lib/constants/LayoutHints.js.map +1 -1
  198. package/lib/constants/Settings.js.flow +2 -2
  199. package/lib/constants/Settings.js.map +1 -1
  200. package/lib/exceptions/FetchException.js.flow +2 -2
  201. package/lib/exceptions/FetchException.js.map +1 -1
  202. package/lib/exceptions/NetworkException.js.flow +1 -1
  203. package/lib/exceptions/NetworkException.js.map +1 -1
  204. package/lib/exceptions/UnauthorizedException.js.flow +1 -1
  205. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  206. package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +9 -9
  207. package/lib/hooks/__tests__/useAuthentication.spec.js.flow +2 -2
  208. package/lib/hooks/__tests__/useForm.spec.js.flow +2 -2
  209. package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +7 -7
  210. package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +2 -2
  211. package/lib/hooks/__tests__/usePreference.spec.js.flow +1 -1
  212. package/lib/hooks/useAllFormsOnModel.js.flow +2 -2
  213. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  214. package/lib/hooks/useAuthentication.js.flow +2 -2
  215. package/lib/hooks/useAuthentication.js.map +1 -1
  216. package/lib/hooks/useContent.js.flow +1 -1
  217. package/lib/hooks/useContent.js.map +1 -1
  218. package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
  219. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  220. package/lib/hooks/useForm.js.flow +4 -4
  221. package/lib/hooks/useForm.js.map +1 -1
  222. package/lib/hooks/useI18n.js.flow +3 -3
  223. package/lib/hooks/useI18n.js.map +1 -1
  224. package/lib/hooks/useModal.js.flow +2 -2
  225. package/lib/hooks/useModal.js.map +1 -1
  226. package/lib/hooks/useModelCatalog.js.flow +1 -1
  227. package/lib/hooks/useModelCatalog.js.map +1 -1
  228. package/lib/hooks/useModularUI.js.flow +1 -1
  229. package/lib/hooks/useModularUI.js.map +1 -1
  230. package/lib/hooks/useModularUIBasic.js.flow +1 -1
  231. package/lib/hooks/useModularUIBasic.js.map +1 -1
  232. package/lib/hooks/useModularUIModel.js.flow +1 -1
  233. package/lib/hooks/useModularUIModel.js.map +1 -1
  234. package/lib/hooks/useModularUIRequest.js.flow +1 -1
  235. package/lib/hooks/useModularUIRequest.js.map +1 -1
  236. package/lib/hooks/useNotification.js.flow +2 -2
  237. package/lib/hooks/useNotification.js.map +1 -1
  238. package/lib/hooks/usePreference.js +8 -2
  239. package/lib/hooks/usePreference.js.flow +17 -7
  240. package/lib/hooks/usePreference.js.map +1 -1
  241. package/lib/i18n/Locale.js.flow +4 -4
  242. package/lib/i18n/Locale.js.map +1 -1
  243. package/lib/i18n/Locales.js.flow +8 -8
  244. package/lib/i18n/Locales.js.map +1 -1
  245. package/lib/i18n/Message.js.flow +2 -2
  246. package/lib/i18n/Message.js.map +1 -1
  247. package/lib/i18n/__tests__/Locale.spec.js.flow +3 -3
  248. package/lib/i18n/__tests__/Locales.spec.js.flow +15 -13
  249. package/lib/i18n/withMessage.js.flow +4 -4
  250. package/lib/i18n/withMessage.js.map +1 -1
  251. package/lib/models/actions/ActionCollection.js.flow +4 -4
  252. package/lib/models/actions/ActionCollection.js.map +1 -1
  253. package/lib/models/actions/ActionModel.js.flow +4 -4
  254. package/lib/models/actions/ActionModel.js.map +1 -1
  255. package/lib/models/actions/__tests__/ActionCollection.spec.js.flow +3 -3
  256. package/lib/models/actions/__tests__/ActionModel.spec.js.flow +1 -1
  257. package/lib/models/application/ApplicationModel.js.flow +3 -3
  258. package/lib/models/application/ApplicationModel.js.map +1 -1
  259. package/lib/models/attributes/AttributeCollection.js.flow +7 -7
  260. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  261. package/lib/models/attributes/AttributeContent.js.flow +9 -9
  262. package/lib/models/attributes/AttributeContent.js.map +1 -1
  263. package/lib/models/attributes/AttributeDataHelper.js.flow +9 -9
  264. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  265. package/lib/models/attributes/AttributeModel.js.flow +24 -24
  266. package/lib/models/attributes/AttributeModel.js.map +1 -1
  267. package/lib/models/attributes/AttributeSetModel.js.flow +1 -1
  268. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  269. package/lib/models/attributes/BooleanAttributeModel.js.flow +4 -4
  270. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  271. package/lib/models/attributes/ChoiceAttributeModel.js.flow +6 -6
  272. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  273. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +15 -15
  274. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  275. package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +11 -11
  276. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  277. package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +10 -10
  278. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  279. package/lib/models/attributes/CompositeAttributeModel.js.flow +7 -7
  280. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  281. package/lib/models/attributes/DatetimeAttributeModel.js.flow +6 -6
  282. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  283. package/lib/models/attributes/NumberAttributeModel.js.flow +9 -9
  284. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  285. package/lib/models/attributes/PasswordAttributeModel.js.flow +8 -8
  286. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  287. package/lib/models/attributes/StringAttributeModel.js.flow +3 -3
  288. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  289. package/lib/models/attributes/UploadAttributeModel.js.flow +5 -5
  290. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  291. package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +11 -11
  292. package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +7 -7
  293. package/lib/models/attributes/__tests__/AttributeModel.spec.js.flow +5 -5
  294. package/lib/models/attributes/__tests__/AttributeSetModel.spec.js.flow +2 -2
  295. package/lib/models/attributes/__tests__/BooleanAttributeModel.spec.js.flow +1 -1
  296. package/lib/models/attributes/__tests__/ChoiceAttributeModel.spec.js.flow +8 -8
  297. package/lib/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js.flow +8 -8
  298. package/lib/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js.flow +1 -1
  299. package/lib/models/attributes/__tests__/DateAttributeModel.spec.js.flow +4 -4
  300. package/lib/models/attributes/__tests__/DatetimeAttributeModel.spec.js.flow +11 -11
  301. package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +3 -3
  302. package/lib/models/attributes/__tests__/MemoAttributeModel.spec.js.flow +1 -1
  303. package/lib/models/attributes/__tests__/MoneyAttributeModel.spec.js.flow +1 -1
  304. package/lib/models/attributes/__tests__/NumberAttributeModel.spec.js.flow +1 -1
  305. package/lib/models/attributes/__tests__/PasswordAttributeModel.spec.js.flow +1 -1
  306. package/lib/models/attributes/__tests__/StringAttributeModel.spec.js.flow +4 -4
  307. package/lib/models/attributes/__tests__/TimeAttributeModel.spec.js.flow +2 -2
  308. package/lib/models/attributes/__tests__/TimestampModel.spec.js.flow +2 -2
  309. package/lib/models/attributes/__tests__/UploadAttributeModel.spec.js.flow +4 -4
  310. package/lib/models/attributes/__tests__/_createAttribute.spec.js.flow +6 -6
  311. package/lib/models/attributes/__tests__/createAttributeComposite.spec.js.flow +3 -3
  312. package/lib/models/attributes/__tests__/createAttributeDynamicSchema.spec.js.flow +3 -3
  313. package/lib/models/attributes/_createAttribute.js.flow +5 -5
  314. package/lib/models/attributes/_createAttribute.js.map +1 -1
  315. package/lib/models/attributes/input-constraints/ConstraintCollection.js.flow +5 -5
  316. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  317. package/lib/models/attributes/input-constraints/ConstraintModel.js.flow +1 -1
  318. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  319. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.flow +6 -6
  320. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  321. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.flow +1 -1
  322. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  323. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.flow +6 -6
  324. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  325. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.flow +2 -2
  326. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  327. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.flow +2 -2
  328. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  329. package/lib/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js.flow +1 -1
  330. package/lib/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js.flow +6 -6
  331. package/lib/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js.flow +2 -2
  332. package/lib/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js.flow +2 -2
  333. package/lib/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js.flow +5 -5
  334. package/lib/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js.flow +6 -6
  335. package/lib/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js.flow +3 -3
  336. package/lib/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js.flow +2 -2
  337. package/lib/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js.flow +1 -1
  338. package/lib/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js.flow +4 -4
  339. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +4 -4
  340. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  341. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +15 -15
  342. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  343. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.flow +2 -2
  344. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  345. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.flow +2 -2
  346. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  347. package/lib/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js.flow +22 -22
  348. package/lib/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js.flow +1 -1
  349. package/lib/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js.flow +4 -4
  350. package/lib/models/base/BaseCollection.js.flow +6 -6
  351. package/lib/models/base/BaseCollection.js.map +1 -1
  352. package/lib/models/base/BaseModel.js.flow +1 -1
  353. package/lib/models/base/BaseModel.js.map +1 -1
  354. package/lib/models/base/ResourceModel.js.flow +5 -5
  355. package/lib/models/base/ResourceModel.js.map +1 -1
  356. package/lib/models/base/__tests__/ResourceCollection.spec.js.flow +1 -1
  357. package/lib/models/caseview/CaseViewModel.js.flow +4 -4
  358. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  359. package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +3 -3
  360. package/lib/models/concepts/BusinessScenarioModel.js.flow +9 -9
  361. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  362. package/lib/models/concepts/ConceptDetailModel.js.flow +17 -17
  363. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  364. package/lib/models/concepts/ConceptIndexModel.js.flow +2 -2
  365. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  366. package/lib/models/concepts/ConceptLinkModel.js.flow +6 -4
  367. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  368. package/lib/models/concepts/ConceptRelationCollection.js.flow +5 -5
  369. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  370. package/lib/models/concepts/SourceReferenceCollection.js.flow +2 -2
  371. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  372. package/lib/models/concepts/SourceReferenceModel.js.flow +2 -2
  373. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  374. package/lib/models/concepts/__tests__/ConceptDetailModel.spec.js.flow +1 -1
  375. package/lib/models/content/ContentIndexModel.js.flow +3 -3
  376. package/lib/models/content/ContentIndexModel.js.map +1 -1
  377. package/lib/models/content/ContentLinkModel.js.flow +11 -9
  378. package/lib/models/content/ContentLinkModel.js.map +1 -1
  379. package/lib/models/content/ContentModel.js.flow +2 -2
  380. package/lib/models/content/ContentModel.js.map +1 -1
  381. package/lib/models/content/ContentTOCModel.js.flow +4 -4
  382. package/lib/models/content/ContentTOCModel.js.map +1 -1
  383. package/lib/models/content/SectionModel.js.flow +4 -4
  384. package/lib/models/content/SectionModel.js.map +1 -1
  385. package/lib/models/content/SubSectionModel.js.flow +2 -2
  386. package/lib/models/content/SubSectionModel.js.map +1 -1
  387. package/lib/models/content/__tests__/ContentModel.spec.js.flow +16 -16
  388. package/lib/models/contentconfiguration/ContentConfiguration.js.flow +1 -1
  389. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  390. package/lib/models/contentconfiguration/ContentConfigurationElements.js.flow +5 -5
  391. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  392. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.flow +1 -1
  393. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  394. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.flow +2 -2
  395. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  396. package/lib/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js.flow +12 -12
  397. package/lib/models/detail/DetailModel.js.flow +5 -5
  398. package/lib/models/detail/DetailModel.js.map +1 -1
  399. package/lib/models/error/ErrorCollection.js.flow +4 -4
  400. package/lib/models/error/ErrorCollection.js.map +1 -1
  401. package/lib/models/error/ErrorModel.js.flow +1 -1
  402. package/lib/models/error/ErrorModel.js.map +1 -1
  403. package/lib/models/error/__tests__/ErrorModel.spec.js.flow +1 -1
  404. package/lib/models/filters/AssignmentFilterModel.js.flow +3 -3
  405. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  406. package/lib/models/filters/BaseFilterModel.js +19 -0
  407. package/lib/models/filters/BaseFilterModel.js.flow +19 -0
  408. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  409. package/lib/models/filters/FilterCollection.js.flow +5 -5
  410. package/lib/models/filters/FilterCollection.js.map +1 -1
  411. package/lib/models/filters/__tests__/AssignmentFilterModel.spec.js.flow +4 -4
  412. package/lib/models/filters/__tests__/FilterCollection.spec.js.flow +11 -11
  413. package/lib/models/filters/__tests__/FilterModel.spec.js.flow +3 -3
  414. package/lib/models/filters/__tests__/RangeFilterModel.spec.js.flow +1 -1
  415. package/lib/models/form/FormModel.js.flow +39 -39
  416. package/lib/models/form/FormModel.js.map +1 -1
  417. package/lib/models/form/FormObjectModel.js.flow +16 -16
  418. package/lib/models/form/FormObjectModel.js.map +1 -1
  419. package/lib/models/form/__tests__/FormModel.instrument.spec.js.flow +7 -7
  420. package/lib/models/form/__tests__/FormModel.repeating.spec.js.flow +2 -2
  421. package/lib/models/form/__tests__/FormModel.selfhref.spec.js.flow +1 -1
  422. package/lib/models/form/__tests__/FormModel.spec.js.flow +6 -6
  423. package/lib/models/form/__tests__/FormResultData.spec.js.flow +1 -1
  424. package/lib/models/form/__tests__/FormWithContent.spec.js.flow +3 -3
  425. package/lib/models/grouping/GroupingModel.js.flow +7 -7
  426. package/lib/models/grouping/GroupingModel.js.map +1 -1
  427. package/lib/models/grouping/__tests__/GroupingModel.spec.js.flow +2 -2
  428. package/lib/models/href/Href.js +23 -11
  429. package/lib/models/href/Href.js.flow +24 -9
  430. package/lib/models/href/Href.js.map +1 -1
  431. package/lib/models/href/__tests__/Href.spec.js.flow +18 -16
  432. package/lib/models/layouthint/LayoutHintCollection.js.flow +3 -3
  433. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  434. package/lib/models/links/LinkCollection.js.flow +4 -4
  435. package/lib/models/links/LinkCollection.js.map +1 -1
  436. package/lib/models/links/LinkModel.js.flow +3 -3
  437. package/lib/models/links/LinkModel.js.map +1 -1
  438. package/lib/models/links/__tests__/LinkModel.spec.js.flow +4 -4
  439. package/lib/models/links/normalizeLinkJSON.js.flow +6 -6
  440. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  441. package/lib/models/list/ListDetailModel.js.flow +7 -7
  442. package/lib/models/list/ListDetailModel.js.map +1 -1
  443. package/lib/models/list/ListItemCollection.js.flow +2 -2
  444. package/lib/models/list/ListItemCollection.js.map +1 -1
  445. package/lib/models/list/ListItemModel.js.flow +2 -2
  446. package/lib/models/list/ListItemModel.js.map +1 -1
  447. package/lib/models/list/ListModel.js.flow +6 -6
  448. package/lib/models/list/ListModel.js.map +1 -1
  449. package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +4 -4
  450. package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +1 -1
  451. package/lib/models/list/__tests__/ListModel.spec.js.flow +3 -3
  452. package/lib/models/list/__tests__/ListResultDetail.spec.js.flow +3 -3
  453. package/lib/models/lookup/LookupOptionCollection.js.flow +1 -1
  454. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  455. package/lib/models/lookup/LookupOptionsModel.js.flow +4 -4
  456. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  457. package/lib/models/lookup/__tests__/LookupOptionsModel.spec.js.flow +3 -3
  458. package/lib/models/modelcatalog/ModelCatalogModel.js.flow +2 -2
  459. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  460. package/lib/models/paging/PagingModel.js.flow +1 -1
  461. package/lib/models/paging/PagingModel.js.map +1 -1
  462. package/lib/models/paging/__tests__/PagingModel.spec.js.flow +2 -2
  463. package/lib/models/panels/GroupingPanelModel.js.flow +5 -5
  464. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  465. package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +8 -8
  466. package/lib/models/parameter/__tests__/Parameter.spec.js.flow +5 -5
  467. package/lib/models/process/ProcessStatusSettingsModel.js.flow +1 -1
  468. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  469. package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +1 -1
  470. package/lib/models/resolveModel.js.flow +4 -4
  471. package/lib/models/resolveModel.js.map +1 -1
  472. package/lib/models/sorting/SortingModel.js.flow +4 -4
  473. package/lib/models/sorting/SortingModel.js.map +1 -1
  474. package/lib/models/sorting/__tests__/SortingModel.spec.js.flow +3 -3
  475. package/lib/models/tab/TabModel.js.flow +3 -3
  476. package/lib/models/tab/TabModel.js.map +1 -1
  477. package/lib/models/tab/__tests__/TabModel.spec.js.flow +5 -5
  478. package/lib/models/taskgroup/TaskGroupModel.js.flow +2 -2
  479. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  480. package/lib/models/types.js.flow +1 -1
  481. package/lib/models/types.js.map +1 -1
  482. package/lib/models/user/UserProfileModel.js.flow +1 -1
  483. package/lib/models/user/UserProfileModel.js.map +1 -1
  484. package/lib/models/user/__tests__/UserModel.spec.js.flow +2 -2
  485. package/lib/models/user/__tests__/UserProfileModel.spec.js.flow +2 -2
  486. package/lib/models/user/__tests__/UserServicesModel.spec.js.flow +1 -1
  487. package/lib/modularui/CaptchaRequest.js.flow +1 -1
  488. package/lib/modularui/CaptchaRequest.js.map +1 -1
  489. package/lib/modularui/ModularUIRequest.js.flow +26 -26
  490. package/lib/modularui/ModularUIRequest.js.map +1 -1
  491. package/lib/modularui/UploadRequest.js.flow +6 -6
  492. package/lib/modularui/UploadRequest.js.map +1 -1
  493. package/lib/modularui/__tests__/ModularUIError.spec.js.flow +1 -1
  494. package/lib/modularui/__tests__/ModularUIRequest.spec.js.flow +9 -9
  495. package/lib/react/utils.js.flow +1 -1
  496. package/lib/react/utils.js.map +1 -1
  497. package/lib/react-client/client.js +1 -0
  498. package/lib/react-client/client.js.flow +11 -10
  499. package/lib/react-client/client.js.map +1 -1
  500. package/lib/react-client/contextPath.js.flow +2 -2
  501. package/lib/react-client/contextPath.js.map +1 -1
  502. package/lib/react-client/rehydrate.js.flow +1 -1
  503. package/lib/react-client/rehydrate.js.map +1 -1
  504. package/lib/react-server/__tests__/serverUtil.spec.js.flow +2 -2
  505. package/lib/react-server/createSSRComplete.js.flow +3 -3
  506. package/lib/react-server/createSSRComplete.js.map +1 -1
  507. package/lib/react-server/renderSSRComplete.js.flow +4 -4
  508. package/lib/react-server/renderSSRComplete.js.map +1 -1
  509. package/lib/react-server/renderSSRMinimal.js.flow +1 -1
  510. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  511. package/lib/react-server/requestInformation.js.flow +2 -2
  512. package/lib/react-server/requestInformation.js.map +1 -1
  513. package/lib/react-server/serverUtil.js.flow +8 -8
  514. package/lib/react-server/serverUtil.js.map +1 -1
  515. package/lib/react-theme/__tests__/createTheme.spec.js.flow +4 -4
  516. package/lib/react-theme/createTheme.js.flow +1 -1
  517. package/lib/react-theme/createTheme.js.map +1 -1
  518. package/lib/react-theme/utils/__tests__/background.spec.js.flow +2 -2
  519. package/lib/react-theme/utils/__tests__/contrast.spec.js.flow +1 -1
  520. package/lib/react-theme/utils/__tests__/corners.spec.js.flow +3 -3
  521. package/lib/react-theme/utils/__tests__/spacers.spec.js.flow +1 -1
  522. package/lib/react-theme/utils/__tests__/themeProps.spec.js.flow +9 -9
  523. package/lib/react-theme/utils/colors.js.flow +3 -3
  524. package/lib/react-theme/utils/colors.js.map +1 -1
  525. package/lib/react-theme/utils/contrast.js.flow +6 -6
  526. package/lib/react-theme/utils/contrast.js.map +1 -1
  527. package/lib/react-theme/utils/corners.js.flow +2 -2
  528. package/lib/react-theme/utils/corners.js.map +1 -1
  529. package/lib/react-theme/utils/spacers.js.flow +2 -2
  530. package/lib/react-theme/utils/spacers.js.map +1 -1
  531. package/lib/react-theme/utils/themeProps.js.flow +8 -8
  532. package/lib/react-theme/utils/themeProps.js.map +1 -1
  533. package/lib/redux/_i18n/I18nActions.js.flow +1 -1
  534. package/lib/redux/_i18n/I18nActions.js.map +1 -1
  535. package/lib/redux/_i18n/I18nReducer.js.flow +2 -2
  536. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  537. package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +2 -2
  538. package/lib/redux/_modularui/ModularUIActions.js.flow +8 -8
  539. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  540. package/lib/redux/_modularui/ModularUIConnector.js.flow +4 -4
  541. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  542. package/lib/redux/_modularui/ModularUIMiddleware.js.flow +6 -6
  543. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  544. package/lib/redux/_modularui/ModularUIReducer.js.flow +5 -5
  545. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  546. package/lib/redux/_modularui/ModularUISelectors.js.flow +11 -11
  547. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  548. package/lib/redux/_modularui/ModularUIUtils.js.flow +1 -1
  549. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  550. package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
  551. package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +13 -13
  552. package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +3 -3
  553. package/lib/redux/_modularui/types.js.flow +4 -4
  554. package/lib/redux/_modularui/types.js.map +1 -1
  555. package/lib/redux/_modularui/withModularUI.js.flow +3 -3
  556. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  557. package/lib/redux/_router/RouterActions.js.flow +3 -3
  558. package/lib/redux/_router/RouterActions.js.map +1 -1
  559. package/lib/redux/_router/RouterConnectors.js.flow +5 -5
  560. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  561. package/lib/redux/_router/RouterReducer.js.flow +1 -1
  562. package/lib/redux/_router/RouterReducer.js.map +1 -1
  563. package/lib/redux/_router/__tests__/reducer.spec.js.flow +2 -2
  564. package/lib/redux/actions/Application.js.flow +1 -1
  565. package/lib/redux/actions/Application.js.map +1 -1
  566. package/lib/redux/actions/Authorization.js.flow +1 -1
  567. package/lib/redux/actions/Authorization.js.map +1 -1
  568. package/lib/redux/actions/Error.js.flow +3 -3
  569. package/lib/redux/actions/Error.js.map +1 -1
  570. package/lib/redux/actions/FormAttributeSet.js.flow +2 -2
  571. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  572. package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +3 -3
  573. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  574. package/lib/redux/actions/FormAutosave.js.flow +1 -1
  575. package/lib/redux/actions/FormAutosave.js.map +1 -1
  576. package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
  577. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  578. package/lib/redux/actions/FormValidations.js.flow +3 -3
  579. package/lib/redux/actions/FormValidations.js.map +1 -1
  580. package/lib/redux/actions/Notification.js.flow +4 -4
  581. package/lib/redux/actions/Notification.js.map +1 -1
  582. package/lib/redux/actions/Preferences.js.flow +11 -11
  583. package/lib/redux/actions/Preferences.js.map +1 -1
  584. package/lib/redux/actions/ProgressIndicator.js.flow +1 -1
  585. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  586. package/lib/redux/actions/SignIn.js.flow +3 -3
  587. package/lib/redux/actions/SignIn.js.map +1 -1
  588. package/lib/redux/actions/__tests__/Authorization.spec.js.flow +2 -2
  589. package/lib/redux/actions/__tests__/Error-server.spec.js.flow +13 -13
  590. package/lib/redux/actions/__tests__/Error.spec.js.flow +6 -6
  591. package/lib/redux/actions/__tests__/Notification.spec.js.flow +1 -1
  592. package/lib/redux/actions/__tests__/Preferences.spec.js.flow +2 -2
  593. package/lib/redux/connectors/Application.js.flow +1 -1
  594. package/lib/redux/connectors/Application.js.map +1 -1
  595. package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
  596. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  597. package/lib/redux/connectors/CaseView.js.flow +1 -1
  598. package/lib/redux/connectors/CaseView.js.map +1 -1
  599. package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
  600. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  601. package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
  602. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  603. package/lib/redux/connectors/ContentDetail.js.flow +1 -1
  604. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  605. package/lib/redux/connectors/ContentDetailSection.js.flow +2 -2
  606. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  607. package/lib/redux/connectors/Form.js.flow +5 -5
  608. package/lib/redux/connectors/Form.js.map +1 -1
  609. package/lib/redux/connectors/FormAttributeSet.js.flow +6 -6
  610. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  611. package/lib/redux/connectors/ListDetail.js.flow +1 -1
  612. package/lib/redux/connectors/ListDetail.js.map +1 -1
  613. package/lib/redux/connectors/Modal.js.flow +1 -1
  614. package/lib/redux/connectors/Modal.js.map +1 -1
  615. package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
  616. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  617. package/lib/redux/connectors/Notification.js.flow +1 -1
  618. package/lib/redux/connectors/Notification.js.map +1 -1
  619. package/lib/redux/connectors/PanelRenderer.js.flow +2 -2
  620. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  621. package/lib/redux/connectors/Preferences.js.flow +3 -3
  622. package/lib/redux/connectors/Preferences.js.map +1 -1
  623. package/lib/redux/connectors/Progress.js.flow +1 -1
  624. package/lib/redux/connectors/Progress.js.map +1 -1
  625. package/lib/redux/connectors/ProgressIndicator.js.flow +1 -1
  626. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  627. package/lib/redux/connectors/QuickSearch.js.flow +2 -2
  628. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  629. package/lib/redux/connectors/SignIn.js.flow +1 -1
  630. package/lib/redux/connectors/SignIn.js.map +1 -1
  631. package/lib/redux/connectors/SignOut.js.flow +1 -1
  632. package/lib/redux/connectors/SignOut.js.map +1 -1
  633. package/lib/redux/connectors/Tab.js.flow +1 -1
  634. package/lib/redux/connectors/Tab.js.map +1 -1
  635. package/lib/redux/reducers/AuthReducer.js.flow +1 -1
  636. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  637. package/lib/redux/reducers/ErrorReducer.js.flow +1 -1
  638. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  639. package/lib/redux/reducers/ModalsReducer.js.flow +1 -1
  640. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  641. package/lib/redux/reducers/NotificationReducer.js.flow +1 -1
  642. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  643. package/lib/redux/reducers/PreferencesReducer.js.flow +1 -1
  644. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  645. package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
  646. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  647. package/lib/redux/reducers/__tests__/AuthReducer.spec.js.flow +10 -10
  648. package/lib/redux/reducers/__tests__/ErrorReducer.spec.js.flow +1 -1
  649. package/lib/redux/reducers/__tests__/ModalsReducer.spec.js.flow +3 -3
  650. package/lib/redux/reducers/__tests__/NotificationReducer.spec.js.flow +3 -3
  651. package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +2 -2
  652. package/lib/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js.flow +8 -8
  653. package/lib/redux/store/beforeRenderHooks.js.flow +1 -1
  654. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  655. package/lib/redux/store/configureStore.js.flow +3 -3
  656. package/lib/redux/store/configureStore.js.map +1 -1
  657. package/lib/utils/browser/Cookies.js.flow +1 -1
  658. package/lib/utils/browser/Cookies.js.map +1 -1
  659. package/lib/utils/browser/__tests__/Cookies.spec.js.flow +1 -1
  660. package/lib/utils/datetime/DateTimeUtil.js.flow +15 -15
  661. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  662. package/lib/utils/datetime/__tests__/DateTime.spec.js.flow +84 -81
  663. package/lib/utils/fetch/__tests__/xhr.spec.js.flow +2 -2
  664. package/lib/utils/fetch/universalFetch.js.flow +1 -1
  665. package/lib/utils/fetch/universalFetch.js.map +1 -1
  666. package/lib/utils/fetch/xhr.js.flow +6 -6
  667. package/lib/utils/fetch/xhr.js.map +1 -1
  668. package/lib/utils/helpers/__tests__/sanitizeHTML.spec.js.flow +8 -8
  669. package/lib/utils/helpers/sanitizeHtml.js.flow +3 -3
  670. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  671. package/lib/utils/helpers/text.js.flow +1 -1
  672. package/lib/utils/helpers/text.js.map +1 -1
  673. package/lib/utils/number/DecimalFormat.js.flow +2 -2
  674. package/lib/utils/number/DecimalFormat.js.map +1 -1
  675. package/lib/utils/number/__tests__/formatValue.spec.js.flow +1 -1
  676. package/lib/utils/number/formatValue.js.flow +2 -2
  677. package/lib/utils/number/formatValue.js.map +1 -1
  678. package/lib/utils/number/parseNumbers.js.flow +7 -7
  679. package/lib/utils/number/parseNumbers.js.map +1 -1
  680. package/package.json +20 -20
  681. package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +4 -4
  682. package/src/builder/mergeLayoutHintConfigurations.js +3 -3
  683. package/src/constants/LayoutHints.js +1 -1
  684. package/src/constants/Settings.js +2 -2
  685. package/src/exceptions/FetchException.js +2 -2
  686. package/src/exceptions/NetworkException.js +1 -1
  687. package/src/exceptions/UnauthorizedException.js +1 -1
  688. package/src/hooks/__tests__/UseModularUIModel.spec.js +9 -9
  689. package/src/hooks/__tests__/useAuthentication.spec.js +2 -2
  690. package/src/hooks/__tests__/useForm.spec.js +2 -2
  691. package/src/hooks/__tests__/useModelCatalog.spec.js +7 -7
  692. package/src/hooks/__tests__/useModularUIBasic.spec.js +2 -2
  693. package/src/hooks/__tests__/usePreference.spec.js +1 -1
  694. package/src/hooks/useAllFormsOnModel.js +2 -2
  695. package/src/hooks/useAuthentication.js +2 -2
  696. package/src/hooks/useContent.js +1 -1
  697. package/src/hooks/useDeepCompareEffect.js +1 -1
  698. package/src/hooks/useForm.js +4 -4
  699. package/src/hooks/useI18n.js +3 -3
  700. package/src/hooks/useModal.js +2 -2
  701. package/src/hooks/useModelCatalog.js +1 -1
  702. package/src/hooks/useModularUI.js +1 -1
  703. package/src/hooks/useModularUIBasic.js +1 -1
  704. package/src/hooks/useModularUIModel.js +1 -1
  705. package/src/hooks/useModularUIRequest.js +1 -1
  706. package/src/hooks/useNotification.js +2 -2
  707. package/src/hooks/usePreference.js +17 -7
  708. package/src/i18n/Locale.js +4 -4
  709. package/src/i18n/Locales.js +8 -8
  710. package/src/i18n/Message.js +2 -2
  711. package/src/i18n/__tests__/Locale.spec.js +3 -3
  712. package/src/i18n/__tests__/Locales.spec.js +15 -13
  713. package/src/i18n/withMessage.js +4 -4
  714. package/src/models/actions/ActionCollection.js +4 -4
  715. package/src/models/actions/ActionModel.js +4 -4
  716. package/src/models/actions/__tests__/ActionCollection.spec.js +3 -3
  717. package/src/models/actions/__tests__/ActionModel.spec.js +1 -1
  718. package/src/models/application/ApplicationModel.js +3 -3
  719. package/src/models/attributes/AttributeCollection.js +7 -7
  720. package/src/models/attributes/AttributeContent.js +9 -9
  721. package/src/models/attributes/AttributeDataHelper.js +9 -9
  722. package/src/models/attributes/AttributeModel.js +24 -24
  723. package/src/models/attributes/AttributeSetModel.js +1 -1
  724. package/src/models/attributes/BooleanAttributeModel.js +4 -4
  725. package/src/models/attributes/ChoiceAttributeModel.js +6 -6
  726. package/src/models/attributes/ChoiceAttributeOptionCollection.js +15 -15
  727. package/src/models/attributes/ChoiceAttributeOptionModel.js +11 -11
  728. package/src/models/attributes/CompositeAttributeChildCollection.js +10 -10
  729. package/src/models/attributes/CompositeAttributeModel.js +7 -7
  730. package/src/models/attributes/DatetimeAttributeModel.js +6 -6
  731. package/src/models/attributes/NumberAttributeModel.js +9 -9
  732. package/src/models/attributes/PasswordAttributeModel.js +8 -8
  733. package/src/models/attributes/StringAttributeModel.js +3 -3
  734. package/src/models/attributes/UploadAttributeModel.js +5 -5
  735. package/src/models/attributes/__tests__/AttributeCollection.spec.js +11 -11
  736. package/src/models/attributes/__tests__/AttributeContent.spec.js +7 -7
  737. package/src/models/attributes/__tests__/AttributeModel.spec.js +5 -5
  738. package/src/models/attributes/__tests__/AttributeSetModel.spec.js +2 -2
  739. package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +1 -1
  740. package/src/models/attributes/__tests__/ChoiceAttributeModel.spec.js +8 -8
  741. package/src/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js +8 -8
  742. package/src/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js +1 -1
  743. package/src/models/attributes/__tests__/DateAttributeModel.spec.js +4 -4
  744. package/src/models/attributes/__tests__/DatetimeAttributeModel.spec.js +11 -11
  745. package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +3 -3
  746. package/src/models/attributes/__tests__/MemoAttributeModel.spec.js +1 -1
  747. package/src/models/attributes/__tests__/MoneyAttributeModel.spec.js +1 -1
  748. package/src/models/attributes/__tests__/NumberAttributeModel.spec.js +1 -1
  749. package/src/models/attributes/__tests__/PasswordAttributeModel.spec.js +1 -1
  750. package/src/models/attributes/__tests__/StringAttributeModel.spec.js +4 -4
  751. package/src/models/attributes/__tests__/TimeAttributeModel.spec.js +2 -2
  752. package/src/models/attributes/__tests__/TimestampModel.spec.js +2 -2
  753. package/src/models/attributes/__tests__/UploadAttributeModel.spec.js +4 -4
  754. package/src/models/attributes/__tests__/_createAttribute.spec.js +6 -6
  755. package/src/models/attributes/__tests__/createAttributeComposite.spec.js +3 -3
  756. package/src/models/attributes/__tests__/createAttributeDynamicSchema.spec.js +3 -3
  757. package/src/models/attributes/_createAttribute.js +5 -5
  758. package/src/models/attributes/input-constraints/ConstraintCollection.js +5 -5
  759. package/src/models/attributes/input-constraints/ConstraintModel.js +1 -1
  760. package/src/models/attributes/input-constraints/DateBoundaryConstraint.js +6 -6
  761. package/src/models/attributes/input-constraints/MandatoryConstraint.js +1 -1
  762. package/src/models/attributes/input-constraints/NumberBoundaryConstraint.js +6 -6
  763. package/src/models/attributes/input-constraints/NumberFormatConstraint.js +2 -2
  764. package/src/models/attributes/input-constraints/NumberGroupingConstraint.js +2 -2
  765. package/src/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js +1 -1
  766. package/src/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js +6 -6
  767. package/src/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js +2 -2
  768. package/src/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js +2 -2
  769. package/src/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js +5 -5
  770. package/src/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js +6 -6
  771. package/src/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js +3 -3
  772. package/src/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js +2 -2
  773. package/src/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js +1 -1
  774. package/src/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js +4 -4
  775. package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +4 -4
  776. package/src/models/attributes/layouthint-rules/DependentAttribute.js +15 -15
  777. package/src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +2 -2
  778. package/src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +2 -2
  779. package/src/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js +22 -22
  780. package/src/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js +1 -1
  781. package/src/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js +4 -4
  782. package/src/models/base/BaseCollection.js +6 -6
  783. package/src/models/base/BaseModel.js +1 -1
  784. package/src/models/base/ResourceModel.js +5 -5
  785. package/src/models/base/__tests__/ResourceCollection.spec.js +1 -1
  786. package/src/models/caseview/CaseViewModel.js +4 -4
  787. package/src/models/caseview/__tests__/CaseViewModel.spec.js +3 -3
  788. package/src/models/concepts/BusinessScenarioModel.js +9 -9
  789. package/src/models/concepts/ConceptDetailModel.js +17 -17
  790. package/src/models/concepts/ConceptIndexModel.js +2 -2
  791. package/src/models/concepts/ConceptLinkModel.js +6 -4
  792. package/src/models/concepts/ConceptRelationCollection.js +5 -5
  793. package/src/models/concepts/SourceReferenceCollection.js +2 -2
  794. package/src/models/concepts/SourceReferenceModel.js +2 -2
  795. package/src/models/concepts/__tests__/ConceptDetailModel.spec.js +1 -1
  796. package/src/models/content/ContentIndexModel.js +3 -3
  797. package/src/models/content/ContentLinkModel.js +11 -9
  798. package/src/models/content/ContentModel.js +2 -2
  799. package/src/models/content/ContentTOCModel.js +4 -4
  800. package/src/models/content/SectionModel.js +4 -4
  801. package/src/models/content/SubSectionModel.js +2 -2
  802. package/src/models/content/__tests__/ContentModel.spec.js +16 -16
  803. package/src/models/contentconfiguration/ContentConfiguration.js +1 -1
  804. package/src/models/contentconfiguration/ContentConfigurationElements.js +5 -5
  805. package/src/models/contentconfiguration/ContentConfigurationEndResults.js +1 -1
  806. package/src/models/contentconfiguration/ContentConfigurationQuestions.js +2 -2
  807. package/src/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js +12 -12
  808. package/src/models/detail/DetailModel.js +5 -5
  809. package/src/models/error/ErrorCollection.js +4 -4
  810. package/src/models/error/ErrorModel.js +1 -1
  811. package/src/models/error/__tests__/ErrorModel.spec.js +1 -1
  812. package/src/models/filters/AssignmentFilterModel.js +3 -3
  813. package/src/models/filters/BaseFilterModel.js +19 -0
  814. package/src/models/filters/FilterCollection.js +5 -5
  815. package/src/models/filters/__tests__/AssignmentFilterModel.spec.js +4 -4
  816. package/src/models/filters/__tests__/FilterCollection.spec.js +11 -11
  817. package/src/models/filters/__tests__/FilterModel.spec.js +3 -3
  818. package/src/models/filters/__tests__/RangeFilterModel.spec.js +1 -1
  819. package/src/models/form/FormModel.js +39 -39
  820. package/src/models/form/FormObjectModel.js +16 -16
  821. package/src/models/form/__tests__/FormModel.instrument.spec.js +7 -7
  822. package/src/models/form/__tests__/FormModel.repeating.spec.js +2 -2
  823. package/src/models/form/__tests__/FormModel.selfhref.spec.js +1 -1
  824. package/src/models/form/__tests__/FormModel.spec.js +6 -6
  825. package/src/models/form/__tests__/FormResultData.spec.js +1 -1
  826. package/src/models/form/__tests__/FormWithContent.spec.js +3 -3
  827. package/src/models/grouping/GroupingModel.js +7 -7
  828. package/src/models/grouping/__tests__/GroupingModel.spec.js +2 -2
  829. package/src/models/href/Href.js +24 -9
  830. package/src/models/href/__tests__/Href.spec.js +18 -16
  831. package/src/models/layouthint/LayoutHintCollection.js +3 -3
  832. package/src/models/links/LinkCollection.js +4 -4
  833. package/src/models/links/LinkModel.js +3 -3
  834. package/src/models/links/__tests__/LinkModel.spec.js +4 -4
  835. package/src/models/links/normalizeLinkJSON.js +6 -6
  836. package/src/models/list/ListDetailModel.js +7 -7
  837. package/src/models/list/ListItemCollection.js +2 -2
  838. package/src/models/list/ListItemModel.js +2 -2
  839. package/src/models/list/ListModel.js +6 -6
  840. package/src/models/list/__tests__/ListDetailModel.spec.js +4 -4
  841. package/src/models/list/__tests__/ListItemCollection.spec.js +1 -1
  842. package/src/models/list/__tests__/ListModel.spec.js +3 -3
  843. package/src/models/list/__tests__/ListResultDetail.spec.js +3 -3
  844. package/src/models/lookup/LookupOptionCollection.js +1 -1
  845. package/src/models/lookup/LookupOptionsModel.js +4 -4
  846. package/src/models/lookup/__tests__/LookupOptionsModel.spec.js +3 -3
  847. package/src/models/modelcatalog/ModelCatalogModel.js +2 -2
  848. package/src/models/paging/PagingModel.js +1 -1
  849. package/src/models/paging/__tests__/PagingModel.spec.js +2 -2
  850. package/src/models/panels/GroupingPanelModel.js +5 -5
  851. package/src/models/panels/__tests__/GroupingPanelModel.spec.js +8 -8
  852. package/src/models/parameter/__tests__/Parameter.spec.js +5 -5
  853. package/src/models/process/ProcessStatusSettingsModel.js +1 -1
  854. package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +1 -1
  855. package/src/models/resolveModel.js +4 -4
  856. package/src/models/sorting/SortingModel.js +4 -4
  857. package/src/models/sorting/__tests__/SortingModel.spec.js +3 -3
  858. package/src/models/tab/TabModel.js +3 -3
  859. package/src/models/tab/__tests__/TabModel.spec.js +5 -5
  860. package/src/models/taskgroup/TaskGroupModel.js +2 -2
  861. package/src/models/types.js +1 -1
  862. package/src/models/user/UserProfileModel.js +1 -1
  863. package/src/models/user/__tests__/UserModel.spec.js +2 -2
  864. package/src/models/user/__tests__/UserProfileModel.spec.js +2 -2
  865. package/src/models/user/__tests__/UserServicesModel.spec.js +1 -1
  866. package/src/modularui/CaptchaRequest.js +1 -1
  867. package/src/modularui/ModularUIRequest.js +26 -26
  868. package/src/modularui/UploadRequest.js +6 -6
  869. package/src/modularui/__tests__/ModularUIError.spec.js +1 -1
  870. package/src/modularui/__tests__/ModularUIRequest.spec.js +9 -9
  871. package/src/react/utils.js +1 -1
  872. package/src/react-client/client.js +11 -10
  873. package/src/react-client/contextPath.js +2 -2
  874. package/src/react-client/rehydrate.js +1 -1
  875. package/src/react-server/__tests__/serverUtil.spec.js +2 -2
  876. package/src/react-server/createSSRComplete.js +3 -3
  877. package/src/react-server/renderSSRComplete.js +4 -4
  878. package/src/react-server/renderSSRMinimal.js +1 -1
  879. package/src/react-server/requestInformation.js +2 -2
  880. package/src/react-server/serverUtil.js +8 -8
  881. package/src/react-theme/__tests__/createTheme.spec.js +4 -4
  882. package/src/react-theme/createTheme.js +1 -1
  883. package/src/react-theme/utils/__tests__/background.spec.js +2 -2
  884. package/src/react-theme/utils/__tests__/contrast.spec.js +1 -1
  885. package/src/react-theme/utils/__tests__/corners.spec.js +3 -3
  886. package/src/react-theme/utils/__tests__/spacers.spec.js +1 -1
  887. package/src/react-theme/utils/__tests__/themeProps.spec.js +9 -9
  888. package/src/react-theme/utils/colors.js +3 -3
  889. package/src/react-theme/utils/contrast.js +6 -6
  890. package/src/react-theme/utils/corners.js +2 -2
  891. package/src/react-theme/utils/spacers.js +2 -2
  892. package/src/react-theme/utils/themeProps.js +8 -8
  893. package/src/redux/_i18n/I18nActions.js +1 -1
  894. package/src/redux/_i18n/I18nReducer.js +2 -2
  895. package/src/redux/_i18n/__tests__/reducer.spec.js +2 -2
  896. package/src/redux/_modularui/ModularUIActions.js +8 -8
  897. package/src/redux/_modularui/ModularUIConnector.js +4 -4
  898. package/src/redux/_modularui/ModularUIMiddleware.js +6 -6
  899. package/src/redux/_modularui/ModularUIReducer.js +5 -5
  900. package/src/redux/_modularui/ModularUISelectors.js +11 -11
  901. package/src/redux/_modularui/ModularUIUtils.js +1 -1
  902. package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
  903. package/src/redux/_modularui/__tests__/reducer.spec.js +13 -13
  904. package/src/redux/_modularui/__tests__/selectors.spec.js +3 -3
  905. package/src/redux/_modularui/types.js +4 -4
  906. package/src/redux/_modularui/withModularUI.js +3 -3
  907. package/src/redux/_router/RouterActions.js +3 -3
  908. package/src/redux/_router/RouterConnectors.js +5 -5
  909. package/src/redux/_router/RouterReducer.js +1 -1
  910. package/src/redux/_router/__tests__/reducer.spec.js +2 -2
  911. package/src/redux/actions/Application.js +1 -1
  912. package/src/redux/actions/Authorization.js +1 -1
  913. package/src/redux/actions/Error.js +3 -3
  914. package/src/redux/actions/FormAttributeSet.js +2 -2
  915. package/src/redux/actions/FormAttributeSetRepeatable.js +3 -3
  916. package/src/redux/actions/FormAutosave.js +1 -1
  917. package/src/redux/actions/FormAutosubmit.js +1 -1
  918. package/src/redux/actions/FormValidations.js +3 -3
  919. package/src/redux/actions/Notification.js +4 -4
  920. package/src/redux/actions/Preferences.js +11 -11
  921. package/src/redux/actions/ProgressIndicator.js +1 -1
  922. package/src/redux/actions/SignIn.js +3 -3
  923. package/src/redux/actions/__tests__/Authorization.spec.js +2 -2
  924. package/src/redux/actions/__tests__/Error-server.spec.js +13 -13
  925. package/src/redux/actions/__tests__/Error.spec.js +6 -6
  926. package/src/redux/actions/__tests__/Notification.spec.js +1 -1
  927. package/src/redux/actions/__tests__/Preferences.spec.js +2 -2
  928. package/src/redux/connectors/Application.js +1 -1
  929. package/src/redux/connectors/Breadcrumb.js +1 -1
  930. package/src/redux/connectors/CaseView.js +1 -1
  931. package/src/redux/connectors/ConceptDetail.js +1 -1
  932. package/src/redux/connectors/ContentBrowser.js +1 -1
  933. package/src/redux/connectors/ContentDetail.js +1 -1
  934. package/src/redux/connectors/ContentDetailSection.js +2 -2
  935. package/src/redux/connectors/Form.js +5 -5
  936. package/src/redux/connectors/FormAttributeSet.js +6 -6
  937. package/src/redux/connectors/ListDetail.js +1 -1
  938. package/src/redux/connectors/Modal.js +1 -1
  939. package/src/redux/connectors/ModelCatalog.js +1 -1
  940. package/src/redux/connectors/Notification.js +1 -1
  941. package/src/redux/connectors/PanelRenderer.js +2 -2
  942. package/src/redux/connectors/Preferences.js +3 -3
  943. package/src/redux/connectors/Progress.js +1 -1
  944. package/src/redux/connectors/ProgressIndicator.js +1 -1
  945. package/src/redux/connectors/QuickSearch.js +2 -2
  946. package/src/redux/connectors/SignIn.js +1 -1
  947. package/src/redux/connectors/SignOut.js +1 -1
  948. package/src/redux/connectors/Tab.js +1 -1
  949. package/src/redux/reducers/AuthReducer.js +1 -1
  950. package/src/redux/reducers/ErrorReducer.js +1 -1
  951. package/src/redux/reducers/ModalsReducer.js +1 -1
  952. package/src/redux/reducers/NotificationReducer.js +1 -1
  953. package/src/redux/reducers/PreferencesReducer.js +1 -1
  954. package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
  955. package/src/redux/reducers/__tests__/AuthReducer.spec.js +10 -10
  956. package/src/redux/reducers/__tests__/ErrorReducer.spec.js +1 -1
  957. package/src/redux/reducers/__tests__/ModalsReducer.spec.js +3 -3
  958. package/src/redux/reducers/__tests__/NotificationReducer.spec.js +3 -3
  959. package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +2 -2
  960. package/src/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js +8 -8
  961. package/src/redux/store/beforeRenderHooks.js +1 -1
  962. package/src/redux/store/configureStore.js +3 -3
  963. package/src/utils/browser/Cookies.js +1 -1
  964. package/src/utils/browser/__tests__/Cookies.spec.js +1 -1
  965. package/src/utils/datetime/DateTimeUtil.js +15 -15
  966. package/src/utils/datetime/__tests__/DateTime.spec.js +84 -81
  967. package/src/utils/fetch/__tests__/xhr.spec.js +2 -2
  968. package/src/utils/fetch/universalFetch.js +1 -1
  969. package/src/utils/fetch/xhr.js +6 -6
  970. package/src/utils/helpers/__tests__/sanitizeHTML.spec.js +8 -8
  971. package/src/utils/helpers/sanitizeHtml.js +3 -3
  972. package/src/utils/helpers/text.js +1 -1
  973. package/src/utils/number/DecimalFormat.js +2 -2
  974. package/src/utils/number/__tests__/formatValue.spec.js +1 -1
  975. package/src/utils/number/formatValue.js +2 -2
  976. package/src/utils/number/parseNumbers.js +7 -7
@@ -96,7 +96,7 @@ describe("modularui hooks", () => {
96
96
  () => useApplication(),
97
97
  "application",
98
98
  "/",
99
- ApplicationModel
99
+ ApplicationModel,
100
100
  );
101
101
  });
102
102
 
@@ -111,7 +111,7 @@ describe("modularui hooks", () => {
111
111
  () => useCaseView("/tab/caseview/1"),
112
112
  "caseview",
113
113
  "/tab/caseview/1",
114
- CaseViewModel
114
+ CaseViewModel,
115
115
  );
116
116
  });
117
117
 
@@ -120,7 +120,7 @@ describe("modularui hooks", () => {
120
120
  assertTargetModel(
121
121
  () => usePanel("/tab/caseview/1/panel"),
122
122
  "panel",
123
- "/tab/caseview/1/panel"
123
+ "/tab/caseview/1/panel",
124
124
  );
125
125
  });
126
126
 
@@ -130,7 +130,7 @@ describe("modularui hooks", () => {
130
130
  () => useList("/tab/list"),
131
131
  "list",
132
132
  "/tab/list",
133
- ListModel
133
+ ListModel,
134
134
  );
135
135
  });
136
136
 
@@ -140,7 +140,7 @@ describe("modularui hooks", () => {
140
140
  () => useListDetail("/tab/list/1"),
141
141
  "listdetail",
142
142
  "/tab/list/1",
143
- ListDetailModel
143
+ ListDetailModel,
144
144
  );
145
145
  });
146
146
 
@@ -150,7 +150,7 @@ describe("modularui hooks", () => {
150
150
  () => useGroupingPanel("/tab/groupingpanel"),
151
151
  "groupingpanel",
152
152
  "/tab/groupingpanel",
153
- GroupingPanelModel
153
+ GroupingPanelModel,
154
154
  );
155
155
  });
156
156
 
@@ -160,7 +160,7 @@ describe("modularui hooks", () => {
160
160
  () => useDetailPanel("/tab/detailpanel"),
161
161
  "detailpanel",
162
162
  "/tab/detailpanel",
163
- DetailModel
163
+ DetailModel,
164
164
  );
165
165
  });
166
166
 
@@ -170,7 +170,7 @@ describe("modularui hooks", () => {
170
170
  () => useQuicksearch("/quicksearch"),
171
171
  "quicksearch",
172
172
  "/quicksearch",
173
- CaseSearchModel
173
+ CaseSearchModel,
174
174
  );
175
175
  });
176
176
 
@@ -180,7 +180,7 @@ describe("modularui hooks", () => {
180
180
  () => useUserProfile("/user"),
181
181
  "userprofile",
182
182
  "/user",
183
- UserProfileModel
183
+ UserProfileModel,
184
184
  );
185
185
  });
186
186
  });
@@ -28,7 +28,7 @@ describe("authentication hooks", () => {
28
28
  .get("/BeInformed/login", (req, res) => {
29
29
  expect(req.header("accept")).toBe(JSON_TYPE);
30
30
  expect(req.header("Content-Type")).toBe(
31
- "application/x-www-form-urlencoded"
31
+ "application/x-www-form-urlencoded",
32
32
  );
33
33
  expect(req.header("accept-language")).toBe("en");
34
34
  return res.status(200).body({ data: "ok" });
@@ -36,7 +36,7 @@ describe("authentication hooks", () => {
36
36
  .post("/BeInformed/j_security_check", (req, res) => {
37
37
  expect(req.header("accept")).toBe(JSON_TYPE);
38
38
  expect(req.header("Content-Type")).toBe(
39
- "application/x-www-form-urlencoded"
39
+ "application/x-www-form-urlencoded",
40
40
  );
41
41
  expect(req.body()).toBe("j_username=a&j_password=b");
42
42
  return res.status(200).body({ data: "ok" });
@@ -243,7 +243,7 @@ describe("form hooks", () => {
243
243
 
244
244
  const { result } = renderHook(
245
245
  () => useAttributeUpdate(form, form.currentFormObject),
246
- { wrapper }
246
+ { wrapper },
247
247
  );
248
248
 
249
249
  expect(typeof result.current).toBe("function");
@@ -292,7 +292,7 @@ describe("form hooks", () => {
292
292
  store.clearActions();
293
293
 
294
294
  expect(() => result.current.remove(form.currentFormObject)).toThrow(
295
- IllegalArgumentException
295
+ IllegalArgumentException,
296
296
  );
297
297
  });
298
298
  });
@@ -91,7 +91,7 @@ describe("modelcatalog hooks", () => {
91
91
  useModelCatalog("modelcatalog", "/modelcatalog", [ModelCatalogModel]),
92
92
  "modelcatalog",
93
93
  "/modelcatalog",
94
- ModelCatalogModel
94
+ ModelCatalogModel,
95
95
  );
96
96
  });
97
97
 
@@ -101,7 +101,7 @@ describe("modelcatalog hooks", () => {
101
101
  () => useConceptIndex("/conceptindex"),
102
102
  "conceptindex",
103
103
  "/conceptindex",
104
- ConceptIndexModel
104
+ ConceptIndexModel,
105
105
  );
106
106
  });
107
107
 
@@ -110,7 +110,7 @@ describe("modelcatalog hooks", () => {
110
110
  assertTargetModel(
111
111
  () => useConceptDetail("/conceptdetail"),
112
112
  "conceptdetail",
113
- "/concepts/conceptdetail"
113
+ "/concepts/conceptdetail",
114
114
  );
115
115
  });
116
116
 
@@ -120,7 +120,7 @@ describe("modelcatalog hooks", () => {
120
120
  () => useContentIndex("/contentindex"),
121
121
  "contentindex",
122
122
  "/contentindex",
123
- ContentIndexModel
123
+ ContentIndexModel,
124
124
  );
125
125
  });
126
126
 
@@ -130,7 +130,7 @@ describe("modelcatalog hooks", () => {
130
130
  () => useContentTOC("/contenttoc"),
131
131
  "contenttoc",
132
132
  "/content/contenttoc",
133
- ContentTOCModel
133
+ ContentTOCModel,
134
134
  );
135
135
  });
136
136
 
@@ -140,7 +140,7 @@ describe("modelcatalog hooks", () => {
140
140
  () => useContent("/contentdetail"),
141
141
  "content",
142
142
  "/content/contentdetail",
143
- ContentModel
143
+ ContentModel,
144
144
  );
145
145
  });
146
146
 
@@ -150,7 +150,7 @@ describe("modelcatalog hooks", () => {
150
150
  () => useContentType("/contenttypes/contenttype"),
151
151
  "contenttypes",
152
152
  "/contenttypes/contenttype",
153
- ContentTypeModel
153
+ ContentTypeModel,
154
154
  );
155
155
  });
156
156
  });
@@ -51,7 +51,7 @@ describe("modularui hooks", () => {
51
51
  }),
52
52
  {
53
53
  wrapper,
54
- }
54
+ },
55
55
  );
56
56
 
57
57
  expect(result.current).toBeNull();
@@ -101,7 +101,7 @@ describe("modularui hooks", () => {
101
101
  }),
102
102
  {
103
103
  wrapper,
104
- }
104
+ },
105
105
  );
106
106
 
107
107
  expect(result.current).toBeNull();
@@ -44,7 +44,7 @@ describe("preferences hooks", () => {
44
44
  () => usePreference(["name1", "name2", "name3"]),
45
45
  {
46
46
  wrapper,
47
- }
47
+ },
48
48
  );
49
49
 
50
50
  expect(result.current).toStrictEqual({ name1: "value1", name2: "value2" });
@@ -18,7 +18,7 @@ import type ActionModel from "../models/actions/ActionModel";
18
18
  * @returns Object - { actionName: FormModel }
19
19
  */
20
20
  export const useRetrieveFormsOnModel = (
21
- model: ListModel | DetailModel | TabModel
21
+ model: ListModel | DetailModel | TabModel,
22
22
  ): null | { [actionName: string]: FormModel } => {
23
23
  const modularui = useModularUIRequest();
24
24
  const [forms, setForms] = useState(null);
@@ -57,7 +57,7 @@ export const useRetrieveFormsOnModel = (
57
57
  };
58
58
 
59
59
  const getActions = (
60
- model: ListModel | DetailModel | TabModel
60
+ model: ListModel | DetailModel | TabModel,
61
61
  ): Array<ActionModel> => {
62
62
  if (!model.actionCollection) {
63
63
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"useAllFormsOnModel.js","names":["_react","require","_useModularUIRequest","_constants","_ListModel","_interopRequireDefault","_FormModel","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","requestCount","setRequestCount","responseCount","setResponseCount","useEffect","_context","requests","_map","default","getActions","call","action","href","selfhref","addParameter","method","HTTP_METHODS","POST","fetch","then","form","FormModel","tokens","name","length","_promise","all","responses","actionForms","_assign","exports","_context2","actionCollection","createActions","_filter","getActionsByType","isDisabled","allActions","ListModel","listItemCollection","forEach","listItem","_context3","updateActions","push","actions","unique","_includes"],"sources":["../../src/hooks/useAllFormsOnModel.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport { HTTP_METHODS } from \"../constants\";\n\nimport ListModel from \"../models/list/ListModel\";\nimport FormModel from \"../models/form/FormModel\";\n\nimport type DetailModel from \"../models/detail/DetailModel\";\nimport type TabModel from \"../models/tab/TabModel\";\nimport type ActionModel from \"../models/actions/ActionModel\";\n\n/**\n * Retrieve all forms configured on a model with actions\n * @param model\n * @returns Object - { actionName: FormModel }\n */\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel\n): null | { [actionName: string]: FormModel } => {\n const modularui = useModularUIRequest();\n const [forms, setForms] = useState(null);\n const [requestCount, setRequestCount] = useState(0);\n const [responseCount, setResponseCount] = useState(0);\n\n useEffect(() => {\n const requests = getActions(model).map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n setRequestCount(requests.length);\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [model, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (\n model: ListModel | DetailModel | TabModel\n): Array<ActionModel> => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions = [];\n const unique = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAMA;AACA;AACA;AACA;AACA;AACO,MAAMM,uBAAuB,GAClCC,KAAyC,IACM;EAC/C,MAAMC,SAAS,GAAG,IAAAC,wCAAmB,EAAC,CAAC;EACvC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;EACxC,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAF,eAAQ,EAAC,CAAC,CAAC;EACnD,MAAM,CAACG,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAJ,eAAQ,EAAC,CAAC,CAAC;EAErD,IAAAK,gBAAS,EAAC,MAAM;IAAA,IAAAC,QAAA;IACd,MAAMC,QAAQ,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAH,QAAA,GAAAI,UAAU,CAACf,KAAK,CAAC,EAAAgB,IAAA,CAAAL,QAAA,EAAMM,MAAM,IAAK;MACjD,MAAMC,IAAI,GAAGD,MAAM,CAACE,QAAQ,CAACC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;MAE5D,OAAOnB,SAAS,CAACiB,IAAI,EAAE;QAAEG,MAAM,EAAEC,uBAAY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AAE;IAC9B5C,KAAK,CAAC6C,kBAAkB,CAACC,OAAO,CAAEC,QAAQ,IAAK;MAAA,IAAAC,SAAA;MAC7C,MAAMC,aAAa,GAAG,IAAAT,OAAA,CAAA1B,OAAA,EAAAkC,SAAA,GAAAD,QAAQ,CAACT,gBAAgB,CAC5CG,gBAAgB,CAAC,QAAQ,CAAC,EAAAzB,IAAA,CAAAgC,SAAA,EAClB/B,MAAM,IAAK,CAACA,MAAM,CAACyB,UAAU,CAAC;MAEzCC,UAAU,CAACO,IAAI,CAAC,GAAGD,aAAa,CAAC;IACnC,CAAC,CAAC;EACJ;EAEA,MAAME,OAAO,GAAG,EAAE;EAClB,MAAMC,MAAM,GAAG,EAAE;EACjBT,UAAU,CAACG,OAAO,CAAE7B,MAAM,IAAK;IAC7B,IAAI,CAAC,IAAAoC,SAAA,CAAAvC,OAAA,EAAAsC,MAAM,EAAApC,IAAA,CAANoC,MAAM,EAAUnC,MAAM,CAACY,IAAI,CAAC,EAAE;MACjCuB,MAAM,CAACF,IAAI,CAACjC,MAAM,CAACY,IAAI,CAAC;MACxBsB,OAAO,CAACD,IAAI,CAACjC,MAAM,CAAC;IACtB;EACF,CAAC,CAAC;EAEF,OAAOkC,OAAO;AAChB,CAAC"}
1
+ {"version":3,"file":"useAllFormsOnModel.js","names":["_react","require","_useModularUIRequest","_constants","_ListModel","_interopRequireDefault","_FormModel","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","useState","requestCount","setRequestCount","responseCount","setResponseCount","useEffect","_context","requests","_map","default","getActions","call","action","href","selfhref","addParameter","method","HTTP_METHODS","POST","fetch","then","form","FormModel","tokens","name","length","_promise","all","responses","actionForms","_assign","exports","_context2","actionCollection","createActions","_filter","getActionsByType","isDisabled","allActions","ListModel","listItemCollection","forEach","listItem","_context3","updateActions","push","actions","unique","_includes"],"sources":["../../src/hooks/useAllFormsOnModel.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport { HTTP_METHODS } from \"../constants\";\n\nimport ListModel from \"../models/list/ListModel\";\nimport FormModel from \"../models/form/FormModel\";\n\nimport type DetailModel from \"../models/detail/DetailModel\";\nimport type TabModel from \"../models/tab/TabModel\";\nimport type ActionModel from \"../models/actions/ActionModel\";\n\n/**\n * Retrieve all forms configured on a model with actions\n * @param model\n * @returns Object - { actionName: FormModel }\n */\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n): null | { [actionName: string]: FormModel } => {\n const modularui = useModularUIRequest();\n const [forms, setForms] = useState(null);\n const [requestCount, setRequestCount] = useState(0);\n const [responseCount, setResponseCount] = useState(0);\n\n useEffect(() => {\n const requests = getActions(model).map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n setRequestCount(requests.length);\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [model, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (\n model: ListModel | DetailModel | TabModel,\n): Array<ActionModel> => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions = [];\n const unique = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAA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CAAC,CAAC;EACJ;EAEA,MAAME,OAAO,GAAG,EAAE;EAClB,MAAMC,MAAM,GAAG,EAAE;EACjBT,UAAU,CAACG,OAAO,CAAE7B,MAAM,IAAK;IAC7B,IAAI,CAAC,IAAAoC,SAAA,CAAAvC,OAAA,EAAAsC,MAAM,EAAApC,IAAA,CAANoC,MAAM,EAAUnC,MAAM,CAACY,IAAI,CAAC,EAAE;MACjCuB,MAAM,CAACF,IAAI,CAACjC,MAAM,CAACY,IAAI,CAAC;MACxBsB,OAAO,CAACD,IAAI,CAACjC,MAAM,CAAC;IACtB;EACF,CAAC,CAAC;EAEF,OAAOkC,OAAO;AAChB,CAAC"}
@@ -55,14 +55,14 @@ export const useLogin = (): LoginHook => {
55
55
  throw new IllegalStateException(
56
56
  `Could not redirect to '${
57
57
  authenticationType.authentication
58
- }' using url: '${authenticationType.redirectUri ?? ""}'`
58
+ }' using url: '${authenticationType.redirectUri ?? ""}'`,
59
59
  );
60
60
  }
61
61
 
62
62
  if (!isAuthenticated) {
63
63
  Cache.setItem("isRedirectLogin", true);
64
64
  window.location.assign(
65
- `${getBasePath()}${authenticationType.redirectUri ?? ""}`
65
+ `${getBasePath()}${authenticationType.redirectUri ?? ""}`,
66
66
  );
67
67
  }
68
68
  },
@@ -1 +1 @@
1
- {"version":3,"file":"useAuthentication.js","names":["_reactRedux","require","_ModularUISelectors","_actions","_Cache","_interopRequireDefault","_constants","_exceptions","useLogin","Cache","setItem","dispatch","useDispatch","application","useSelector","getApplication","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","DEFAULT_AUTHENTICATION_TYPE","errorMessage","error","resetErrors","resetAuthErrors","login","username","password","redirectLogin","authenticationType","getItem","IllegalStateException","authentication","redirectUri","window","location","assign","getBasePath","exports","useLogout","LOGOUT_PATH","logoutPath","BASE_PATH","logout","origin","url"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/ModularUISelectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\n\nimport Cache from \"../utils/browser/Cache\";\nimport {\n DEFAULT_AUTHENTICATION_TYPE,\n getBasePath,\n logoutPath,\n} from \"../constants\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\nimport type { AuthenticationType } from \"../models/types\";\nimport { IllegalStateException } from \"../exceptions\";\ntype LoginHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n redirectLogin: (authenticationType: AuthenticationType) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n logout: () => void,\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getBasePath()}${authenticationType.redirectUri ?? \"\"}`\n );\n }\n },\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n\n const LOGOUT_PATH = logoutPath();\n const BASE_PATH = getBasePath();\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\n logout: () => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n };\n};\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAQA,IAAAM,WAAA,GAAAN,OAAA;AAeA;AACA;AACO,MAAMO,QAAQ,GAAGA,CAAA,KAAiB;EACvCC,cAAK,CAACC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;EAEvC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAE9B,MAAMC,WAAW,GAAG,IAAAC,uBAAW,EAACC,kCAAc,CAAC;EAC/C,MAAMC,IAAI,GAAG,IAAAF,uBAAW,EAAEG,KAAK,IAAKA,KAAK,CAACD,IAAI,CAAC;EAE/C,MAAME,eAAe,GAAGL,WAAW,EAAEM,UAAU,IAAI,KAAK;EAExD,OAAO;IACLD,eAAe;IACfE,mBAAmB,EAAEP,WAAW,EAAEO,mBAAmB,IAAI,CACvDC,sCAA2B,CAC5B;IACDC,YAAY,EAAEN,IAAI,CAACO,KAAK;IACxBC,WAAW,EAAEA,CAAA,KAAMb,QAAQ,CAAC,IAAAc,wBAAe,EAAC,CAAC,CAAC;IAC9CC,KAAK,EAAEA,CAACC,QAAgB,EAAEC,QAAgB,KACxCjB,QAAQ,CAAC,IAAAe,cAAK,EAACC,QAAQ,EAAEC,QAAQ,CAAC,CAAC;IACrCC,aAAa,EAAGC,kBAAsC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AACC,QAAQ,CAACC,MAAM,CAACS,GAAG,CAAC;MAC7B,CAAC,MAAM;QACL,OAAOnC,QAAQ,CAAC,IAAAiC,eAAM,EAAC,CAAC,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC;AAACL,OAAA,CAAAC,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"useAuthentication.js","names":["_reactRedux","require","_ModularUISelectors","_actions","_Cache","_interopRequireDefault","_constants","_exceptions","useLogin","Cache","setItem","dispatch","useDispatch","application","useSelector","getApplication","auth","state","isAuthenticated","isLoggedIn","authenticationTypes","DEFAULT_AUTHENTICATION_TYPE","errorMessage","error","resetErrors","resetAuthErrors","login","username","password","redirectLogin","authenticationType","getItem","IllegalStateException","authentication","redirectUri","window","location","assign","getBasePath","exports","useLogout","LOGOUT_PATH","logoutPath","BASE_PATH","logout","origin","url"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\n\nimport { getApplication } from \"../redux/_modularui/ModularUISelectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\n\nimport Cache from \"../utils/browser/Cache\";\nimport {\n DEFAULT_AUTHENTICATION_TYPE,\n getBasePath,\n logoutPath,\n} from \"../constants\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\nimport type { AuthenticationType } from \"../models/types\";\nimport { IllegalStateException } from \"../exceptions\";\ntype LoginHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n redirectLogin: (authenticationType: AuthenticationType) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n authenticationTypes: Array<AuthenticationType>,\n logout: () => void,\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getBasePath()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n\n const LOGOUT_PATH = logoutPath();\n const BASE_PATH = getBasePath();\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n isAuthenticated,\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\n logout: () => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n };\n};\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAQA,IAAAM,WAAA,GAAAN,OAAA;AAeA;AACA;AACO,MAAMO,QAAQ,GAAGA,CAAA,KAAiB;EACvCC,cAAK,CAACC,OAAO,CAAC,iBAAiB,EAAE,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AAMC,WAAW,GAAG,IAAAC,uBAAW,EAACC,kCAAc,CAAC;EAE/C,MAAM0B,WAAW,GAAG,IAAAC,qBAAU,EAAC,CAAC;EAChC,MAAMC,SAAS,GAAG,IAAAL,sBAAW,EAAC,CAAC;EAE/B,MAAMpB,eAAe,GAAGL,WAAW,EAAEM,UAAU,IAAI,KAAK;EACxD,OAAO;IACLD,eAAe;IACfE,mBAAmB,EAAEP,WAAW,EAAEO,mBAAmB,IAAI,CACvDC,sCAA2B,CAC5B;IACDuB,MAAM,EAAEA,CAAA,KAAM;MACZ,IAAInC,cAAK,CAACsB,OAAO,CAAC,iBAAiB,CAAC,EAAE;QACpC,MAAMc,MAAM,GAAGV,MAAM,CAACC,QAAQ,CAACS,MAAM;QACrC,MAAMC,GAAG,GAAI,GAAED,MAAO,GAAEF,SAAU,eAAcE,MAAO,GAAEF,SAAU,GAAEF,WAAY,EAAC;QAClFhC,cAAK,CAACC,OAAO,CAAC,iBAAiB,EAAE,KAAK,CAAC;QACvCyB,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACS,GAAG,CAAC;MAC7B,CAAC,MAAM;QACL,OAAOnC,QAAQ,CAAC,IAAAiC,eAAM,EAAC,CAAC,CAAC;MAC3B;IACF;EACF,CAAC;AACH,CAAC;AAACL,OAAA,CAAAC,SAAA,GAAAA,SAAA"}
@@ -14,7 +14,7 @@ import type ContentModel from "../models/content/ContentModel";
14
14
  */
15
15
  export const useContentFromSourceReferences = (
16
16
  sourceReferences: SourceReferenceCollection,
17
- renderChildSections: boolean
17
+ renderChildSections: boolean,
18
18
  ): Array<ContentModel> => {
19
19
  const [content, setContent] = useState([]);
20
20
  const localeCode = useLocale();
@@ -1 +1 @@
1
- {"version":3,"file":"useContent.js","names":["_react","require","_SourceReferenceCollection","_interopRequireDefault","_ModularUIRequest","_useProgressIndicator","_useI18n","useContentFromSourceReferences","sourceReferences","renderChildSections","_context","_context2","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","_map","default","_filter","call","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","_stringify","useEffect","_context3","requests","JSON","parse","modularuiRequest","ModularUIRequest","locale","fetchContent","_promise","all","then","responseContent","exports"],"sources":["../../src/hooks/useContent.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\nimport { useLocale } from \"../hooks/useI18n\";\n\nimport type ContentModel from \"../models/content/ContentModel\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean\n): Array<ContentModel> => {\n const [content, setContent] = useState([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allHrefs, localeCode, renderChildSections]);\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAIA;AACA;AACA;AACO,MAAMM,8BAA8B,GAAGA,CAC5CC,gBAA2C,EAC3CC,mBAA4B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AAtB,OAAA,CAAQuB,GAAG,CAACR,QAAQ,CAAC,CAACS,IAAI,CAAEC,eAAe,IAAK;MAC9ClC,UAAU,CAACkC,eAAe,CAAC;MAC3B7B,MAAM,CAAC,CAAC;IACV,CAAC,CAAC;;IAEF;IACA;EACF,CAAC,EAAE,CAACe,QAAQ,EAAElB,UAAU,EAAEN,mBAAmB,CAAC,CAAC;EAE/C,OAAOG,OAAO;AAChB,CAAC;AAACoC,OAAA,CAAAzC,8BAAA,GAAAA,8BAAA"}
1
+ {"version":3,"file":"useContent.js","names":["_react","require","_SourceReferenceCollection","_interopRequireDefault","_ModularUIRequest","_useProgressIndicator","_useI18n","useContentFromSourceReferences","sourceReferences","renderChildSections","_context","_context2","content","setContent","useState","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","_map","default","_filter","call","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","_stringify","useEffect","_context3","requests","JSON","parse","modularuiRequest","ModularUIRequest","locale","fetchContent","_promise","all","then","responseContent","exports"],"sources":["../../src/hooks/useContent.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\nimport { useLocale } from \"../hooks/useI18n\";\n\nimport type ContentModel from \"../models/content/ContentModel\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): Array<ContentModel> => {\n const [content, setContent] = useState([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [allHrefs, localeCode, renderChildSections]);\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAIA;AACA;AACA;AACO,MAAMM,8BAA8B,GAAGA,CAC5CC,gBAA2C,EAC3CC,mBAA4B,KACJ;EAAA,IAAAC,QAAA,EAAAC,SAAA;EACxB,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EAC1C,MAAMC,UAAU,GAAG,IAAAC,kBAAS,EAAC,CAAC;EAE9B,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAG,IAAAC,0CAAoB,EAAC,CAAC;EAEhD,MAAMC,KAAK,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAZ,QAAA,OAAAa,OAAA,CAAAD,OAAA,EAAAX,SAAA,OAAAU,IAAA,CAAAC,OAAA,EAAAd,gBAAgB,EAAAgB,IAAA,CAAhBhB,gBAAgB,EACtBiB,eAAe,IAAKA,eAAe,CAACC,IAAI,CAACC,QAAQ,CAACC,IAAI,CAAC,EAAAJ,IAAA,CAAAb,SAAA,EACrD,CAACiB,IAAI,EAAEC,KAAK,EAAEC,IAAI,KAAKA,IAAI,CAACC,OAAO,CAACH,IAAI,CAAC,KAAKC,KAAK,CAAC,EAAAL,IAAA,CAAAd,QAAA,EACtDkB,IAAI,IAAKA,IAAI,CAACI,QAAQ,CAAC,CAAC,CAAC;EAEjC,MAAMC,QAAQ,GAAG,IAAAC,UAAA,CAAAZ,OAAA,EAAeF,KAAK,CAAC;EACtC,IAAAe,gBAAS,EAAC,MAAM;IAAA,IAAAC,SAAA;IACd,MAAMC,QAAQ,GAAG,IAAAhB,IAAA,CAAAC,OAAA,EAAAc,SAAA,GAAAE,IAAI,CAACC,KAAK,CAACN,QAAQ,CAAC,EAAAT,IAAA,CAAAY,SAAA,EAAMR,IAAI,IAAK;MAClD,MAAMY,gBAAgB,GAAG,IAAIC,yBAAgB,CAACb,IAAI,CAAC;MACnDY,gBAAgB,CAACE,MAAM,GAAG3B,UAAU;MACpC,OAAOyB,gBAAgB,CAACG,YAAY,CAAClC,mBAAmB,CAAC;IAC3D,CAAC,CAAC;IAEFQ,KAAK,CAAC,CAAC;IACP2B,QAAA,CAAAtB,OAAA,CAAQuB,GAAG,CAACR,QAAQ,CAAC,CAACS,IAAI,CAAEC,eAAe,IAAK;MAC9ClC,UAAU,CAACkC,eAAe,CAAC;MAC3B7B,MAAM,CAAC,CAAC;IACV,CAAC,CAAC;;IAEF;IACA;EACF,CAAC,EAAE,CAACe,QAAQ,EAAElB,UAAU,EAAEN,mBAAmB,CAAC,CAAC;EAE/C,OAAOG,OAAO;AAChB,CAAC;AAACoC,OAAA,CAAAzC,8BAAA,GAAAA,8BAAA"}
@@ -25,7 +25,7 @@ const useDeepCompareMemoize = (value: DependencyList) => {
25
25
  */
26
26
  export function useDeepCompareEffect(
27
27
  callback: Callback,
28
- dependencies: DependencyList
28
+ dependencies: DependencyList,
29
29
  ): void {
30
30
  // eslint-disable-next-line react-hooks/exhaustive-deps
31
31
  return React.useEffect(callback, useDeepCompareMemoize(dependencies));
@@ -1 +1 @@
1
- {"version":3,"file":"useDeepCompareEffect.js","names":["React","_interopRequireWildcard","require","_lite","_getRequireWildcardCache","nodeInterop","_WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","_Object$getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","useDeepCompareMemoize","value","ref","useRef","signalRef","deepEqual","current","useDeepCompareEffect","callback","dependencies","useEffect","_default","exports"],"sources":["../../src/hooks/useDeepCompareEffect.js"],"sourcesContent":["// @flow\nimport * as React from \"react\";\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = Array<mixed>;\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = React.useRef<DependencyList | null>(null); // NOSONAR\n const signalRef = React.useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\n/**\n */\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList\n): void {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\nexport default useDeepCompareEffect;\n"],"mappings":";;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAkD,SAAAE,yBAAAC,WAAA,eAAAC,QAAA,kCAAAC,iBAAA,OAAAD,QAAA,QAAAE,gBAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAA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B,OAAA,GAAA0B,QAAA"}
1
+ {"version":3,"file":"useDeepCompareEffect.js","names":["React","_interopRequireWildcard","require","_lite","_getRequireWildcardCache","nodeInterop","_WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","_Object$getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","useDeepCompareMemoize","value","ref","useRef","signalRef","deepEqual","current","useDeepCompareEffect","callback","dependencies","useEffect","_default","exports"],"sources":["../../src/hooks/useDeepCompareEffect.js"],"sourcesContent":["// @flow\nimport * as React from \"react\";\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = Array<mixed>;\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = React.useRef<DependencyList | null>(null); // NOSONAR\n const signalRef = React.useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\n/**\n */\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList,\n): void {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n\nexport default useDeepCompareEffect;\n"],"mappings":";;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAkD,SAAAE,yBAAAC,WAAA,eAAAC,QAAA,kCAAAC,iBAAA,OAAAD,QAAA,QAAAE,gBAAA,OAAAF,QAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CA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;AACO,SAASC,oBAAoBA,CAClCC,QAAkB,EAClBC,YAA4B,EACtB;EACN;EACA,OAAOnC,KAAK,CAACoC,SAAS,CAACF,QAAQ,EAAER,qBAAqB,CAACS,YAAY,CAAC,CAAC;AACvE;AAAC,IAAAE,QAAA,GAEcJ,oBAAoB;AAAAK,OAAA,CAAA3B,OAAA,GAAA0B,QAAA"}
@@ -44,7 +44,7 @@ type AttributeSetHook = {
44
44
  type AttributeUpdateHook = (
45
45
  attribute: AttributeType,
46
46
  value: string,
47
- options: UpdateFormOptions
47
+ options: UpdateFormOptions,
48
48
  ) => void;
49
49
 
50
50
  /**
@@ -86,7 +86,7 @@ export const useFormNavigation = (): FormNavigationHook => {
86
86
  data: form.formdata,
87
87
  updateModel: form,
88
88
  targetModel: FormModel,
89
- })
89
+ }),
90
90
  );
91
91
 
92
92
  const remove = (form: FormModel) =>
@@ -109,14 +109,14 @@ export const useFormNavigation = (): FormNavigationHook => {
109
109
  */
110
110
  export const useAttributeUpdate = (
111
111
  form: FormModel,
112
- object: FormObjectModel
112
+ object: FormObjectModel,
113
113
  ): AttributeUpdateHook => {
114
114
  const dispatch = useDispatch();
115
115
 
116
116
  return (
117
117
  attribute: AttributeType,
118
118
  value: string,
119
- options: UpdateFormOptions
119
+ options: UpdateFormOptions,
120
120
  ) => dispatch(updateFormAttribute(form, object, attribute, value, options));
121
121
  };
122
122
 
@@ -1 +1 @@
1
- {"version":3,"file":"useForm.js","names":["_reactRedux","require","_Href","_interopRequireDefault","_constants","_modularui","_useModularUI","_actions","_FormModel","useForm","href","data","formHref","Href","getSetting","addParameter","form","useModularUI","method","HTTP_METHODS","POST","targetModel","FormModel","removeOnUnmount","model","exports","useFormNavigation","dispatch","useDispatch","previous","previousObject","cancel","cancelForm","submit","loadModularUI","connectKey","selfhref","formdata","updateModel","remove","removeModelByKey","showFormNotificationAction","showFormNotification","useAttributeUpdate","object","attribute","value","options","updateFormAttribute","useAttributeSet","save","addRepeatableAttributeSet","cancelRepeatableAttributeSet","removeRepeatableAttributeSet"],"sources":["../../src/hooks/useForm.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport Href from \"../models/href/Href\";\n\nimport { getSetting, HTTP_METHODS } from \"../constants\";\n\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui\";\nimport { useModularUI } from \"./useModularUI\";\n\nimport {\n addRepeatableAttributeSet,\n cancelForm,\n cancelRepeatableAttributeSet,\n previousObject,\n removeRepeatableAttributeSet,\n showFormNotification,\n updateFormAttribute,\n} from \"../redux/actions\";\n\nimport FormModel from \"../models/form/FormModel\";\n\nimport type { FormObjectModel, AttributeType } from \"../models\";\nimport type { UpdateFormOptions } from \"../redux/types\";\nimport type {\n RemoveModelByKeyAction,\n UpdateFormAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateFormAction,\n cancel: (form: FormModel) => void,\n submit: (form: FormModel) => void,\n showFormNotification: (form: FormModel) => void,\n remove: (form: FormModel) => RemoveModelByKeyAction,\n};\n\ntype AttributeSetHook = {\n save: () => UpdateFormAction,\n cancel: (object: FormObjectModel) => UpdateFormAction,\n remove: (object: FormObjectModel) => UpdateFormAction,\n};\n\ntype AttributeUpdateHook = (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n) => void;\n\n/**\n * Load a form by href\n */\nexport const useForm = (href: string | Href, data?: Object): ?FormModel => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data,\n });\n\n if (form?.model) {\n return form.model;\n }\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = (): FormNavigationHook => {\n const dispatch = useDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n targetModel: FormModel,\n })\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Update attributes of a form\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n object: FormObjectModel\n): AttributeUpdateHook => {\n const dispatch = useDispatch();\n\n return (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => dispatch(updateFormAttribute(form, object, attribute, value, options));\n};\n\n/**\n * Attributeset actions\n */\nexport const useAttributeSet = (form: FormModel): AttributeSetHook => {\n const dispatch = useDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AAUA,IAAAO,UAAA,GAAAL,sBAAA,CAAAF,OAAA;AA6BA;AACA;AACA;AACO,MAAMQ,OAAO,GAAGA,CAACC,IAAmB,EAAEC,IAAa,KAAiB;EACzE,MAAMC,QAAQ,GAAG,IAAIC,aAAI,CAACH,IAAI,CAAC;EAE/B,IAAI,CAAC,IAAAI,qBAAU,EAAC,oBAAoB,CAAC,EAAE;IACrCF,QAAQ,CAACG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;EAC1C;EAEA,MA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AhB,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAGO,MAAMiB,kBAAkB,GAAGA,CAChC3B,IAAe,EACf4B,MAAuB,KACC;EACxB,MAAMjB,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAE9B,OAAO,CACLiB,SAAwB,EACxBC,KAAa,EACbC,OAA0B,KACvBpB,QAAQ,CAAC,IAAAqB,4BAAmB,EAAChC,IAAI,EAAE4B,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAEC,OAAO,CAAC,CAAC;AAC7E,CAAC;;AAED;AACA;AACA;AAFAtB,OAAA,CAAAkB,kBAAA,GAAAA,kBAAA;AAGO,MAAMM,eAAe,GAAIjC,IAAe,IAAuB;EACpE,MAAMW,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAE9B,OAAO;IACLsB,IAAI,EAAEA,CAAA,KAAMvB,QAAQ,CAAC,IAAAwB,kCAAyB,EAACnC,IAAI,CAAC,CAAC;IACrDe,MAAM,EAAGa,MAAuB,IAC9BjB,QAAQ,CAAC,IAAAyB,qCAA4B,EAACpC,IAAI,EAAE4B,MAAM,CAAC,CAAC;IACtDL,MAAM,EAAGK,MAAuB,IAC9BjB,QAAQ,CAAC,IAAA0B,qCAA4B,EAACrC,IAAI,EAAE4B,MAAM,CAAC;EACvD,CAAC;AACH,CAAC;AAACnB,OAAA,CAAAwB,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"useForm.js","names":["_reactRedux","require","_Href","_interopRequireDefault","_constants","_modularui","_useModularUI","_actions","_FormModel","useForm","href","data","formHref","Href","getSetting","addParameter","form","useModularUI","method","HTTP_METHODS","POST","targetModel","FormModel","removeOnUnmount","model","exports","useFormNavigation","dispatch","useDispatch","previous","previousObject","cancel","cancelForm","submit","loadModularUI","connectKey","selfhref","formdata","updateModel","remove","removeModelByKey","showFormNotificationAction","showFormNotification","useAttributeUpdate","object","attribute","value","options","updateFormAttribute","useAttributeSet","save","addRepeatableAttributeSet","cancelRepeatableAttributeSet","removeRepeatableAttributeSet"],"sources":["../../src/hooks/useForm.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport Href from \"../models/href/Href\";\n\nimport { getSetting, HTTP_METHODS } from \"../constants\";\n\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui\";\nimport { useModularUI } from \"./useModularUI\";\n\nimport {\n addRepeatableAttributeSet,\n cancelForm,\n cancelRepeatableAttributeSet,\n previousObject,\n removeRepeatableAttributeSet,\n showFormNotification,\n updateFormAttribute,\n} from \"../redux/actions\";\n\nimport FormModel from \"../models/form/FormModel\";\n\nimport type { FormObjectModel, AttributeType } from \"../models\";\nimport type { UpdateFormOptions } from \"../redux/types\";\nimport type {\n RemoveModelByKeyAction,\n UpdateFormAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateFormAction,\n cancel: (form: FormModel) => void,\n submit: (form: FormModel) => void,\n showFormNotification: (form: FormModel) => void,\n remove: (form: FormModel) => RemoveModelByKeyAction,\n};\n\ntype AttributeSetHook = {\n save: () => UpdateFormAction,\n cancel: (object: FormObjectModel) => UpdateFormAction,\n remove: (object: FormObjectModel) => UpdateFormAction,\n};\n\ntype AttributeUpdateHook = (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions,\n) => void;\n\n/**\n * Load a form by href\n */\nexport const useForm = (href: string | Href, data?: Object): ?FormModel => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data,\n });\n\n if (form?.model) {\n return form.model;\n }\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = (): FormNavigationHook => {\n const dispatch = useDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n targetModel: FormModel,\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Update attributes of a form\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n object: FormObjectModel,\n): AttributeUpdateHook => {\n const dispatch = useDispatch();\n\n return (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions,\n ) => dispatch(updateFormAttribute(form, object, attribute, value, options));\n};\n\n/**\n * Attributeset actions\n */\nexport const useAttributeSet = (form: FormModel): AttributeSetHook => {\n const dispatch = useDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AAUA,IAAAO,UAAA,GAAAL,sBAAA,CAAAF,OAAA;AA6BA;AACA;AACA;AACO,MAAMQ,OAAO,GAAGA,CAACC,IAAmB,EAAEC,IAAa,KAAiB;EACzE,MAAMC,QAAQ,GAAG,IAAIC,aAAI,CAACH,IAAI,CAAC;EAE/B,IAAI,CAAC,IAAAI,qBAAU,EAAC,oBAAoB,CAAC,EAAE;IACrCF,QAAQ,CAACG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;EAC1C;E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ACA;AAFAhB,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAGO,MAAMiB,kBAAkB,GAAGA,CAChC3B,IAAe,EACf4B,MAAuB,KACC;EACxB,MAAMjB,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAE9B,OAAO,CACLiB,SAAwB,EACxBC,KAAa,EACbC,OAA0B,KACvBpB,QAAQ,CAAC,IAAAqB,4BAAmB,EAAChC,IAAI,EAAE4B,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAEC,OAAO,CAAC,CAAC;AAC7E,CAAC;;AAED;AACA;AACA;AAFAtB,OAAA,CAAAkB,kBAAA,GAAAA,kBAAA;AAGO,MAAMM,eAAe,GAAIjC,IAAe,IAAuB;EACpE,MAAMW,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAE9B,OAAO;IACLsB,IAAI,EAAEA,CAAA,KAAMvB,QAAQ,CAAC,IAAAwB,kCAAyB,EAACnC,IAAI,CAAC,CAAC;IACrDe,MAAM,EAAGa,MAAuB,IAC9BjB,QAAQ,CAAC,IAAAyB,qCAA4B,EAACpC,IAAI,EAAE4B,MAAM,CAAC,CAAC;IACtDL,MAAM,EAAGK,MAAuB,IAC9BjB,QAAQ,CAAC,IAAA0B,qCAA4B,EAACrC,IAAI,EAAE4B,MAAM,CAAC;EACvD,CAAC;AACH,CAAC;AAACnB,OAAA,CAAAwB,eAAA,GAAAA,eAAA"}
@@ -13,8 +13,8 @@ const getMessage = createSelector(
13
13
  locales
14
14
  .getLocale(localeCode)
15
15
  .getMessage(id, defaultMessage, placeholders),
16
- (...args) => JSON.stringify(args)
17
- )
16
+ (...args) => JSON.stringify(args),
17
+ ),
18
18
  );
19
19
 
20
20
  /**
@@ -22,7 +22,7 @@ const getMessage = createSelector(
22
22
  const useMessage = (
23
23
  id: string,
24
24
  defaultMessage?: string,
25
- placeholders?: Object | null
25
+ placeholders?: Object | null,
26
26
  ): any => useSelector(getMessage)(id, defaultMessage, placeholders);
27
27
 
28
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n.js","names":["_reactRedux","require","_reselect","_memoize","_interopRequireDefault","_i18n","getMessage","createSelector","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","_len","arguments","length","args","Array","_key","_stringify","default","useMessage","useSelector","exports","useTranslate","useLocale"],"sources":["../../src/hooks/useI18n.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { createSelector } from \"reselect\";\nimport memoize from \"lodash/memoize\";\n\nimport { getLocales, getLocale } from \"../redux/selectors/i18n\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (id: string, defaultMessage?: string, placeholders?: Object) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args)\n )\n);\n\n/**\n */\nconst useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: Object | null\n): any => useSelector(getMessage)(id, defaultMessage, placeholders);\n\n/**\n */\nconst useTranslate = (): ((...any) => any) => useSelector(getMessage);\n\n/**\n */\nconst useLocale = (): string => useSelector(getLocale);\n\nexport { useTranslate, useMessage, useLocale };\n"],"mappings":";;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,MAAMK,UAAU,GAAG,IAAAC,wBAAc,EAC/B,CAACC,gBAAU,EAAEC,eAAS,CAAC,EACvB,CAACC,OAAO,EAAEC,UAAU,KAClB,IAAAC,gBAAO,EACL,CAACC,EAAU,EAAEC,cAAuB,EAAEC,YAAqB,KACzDL,OAAO,CACJD,SAAS,CAACE,UAAU,CAAC,CACrBL,UAAU,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC,EACjD;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAIC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EAAA,OAAK,IAAAC,UAAA,CAAAC,OAAA,EAAeJ,IAAI,CAAC;AAAA,CACnC,CACJ,CAAC;;AAED;AACA;AACA,MAAMK,UAAU,GAAGA,CACjBX,EAAU,EACVC,cAAuB,EACvBC,YAA4B,KACpB,IAAAU,uBAAW,EAACnB,UAAU,CAAC,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC;;AAEnE;AACA;AADAW,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAEA,MAAMG,YAAY,GAAGA,CAAA,KAAyB,IAAAF,uBAAW,EAACnB,UAAU,CAAC;;AAErE;AACA;AADAoB,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEA,MAAMC,SAAS,GAAGA,CAAA,KAAc,IAAAH,uBAAW,EAAChB,eAAS,CAAC;AAACiB,OAAA,CAAAE,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"useI18n.js","names":["_reactRedux","require","_reselect","_memoize","_interopRequireDefault","_i18n","getMessage","createSelector","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","_len","arguments","length","args","Array","_key","_stringify","default","useMessage","useSelector","exports","useTranslate","useLocale"],"sources":["../../src/hooks/useI18n.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { createSelector } from \"reselect\";\nimport memoize from \"lodash/memoize\";\n\nimport { getLocales, getLocale } from \"../redux/selectors/i18n\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (id: string, defaultMessage?: string, placeholders?: Object) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args),\n ),\n);\n\n/**\n */\nconst useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: Object | null,\n): any => useSelector(getMessage)(id, defaultMessage, placeholders);\n\n/**\n */\nconst useTranslate = (): ((...any) => any) => useSelector(getMessage);\n\n/**\n */\nconst useLocale = (): string => useSelector(getLocale);\n\nexport { useTranslate, useMessage, useLocale };\n"],"mappings":";;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AAEA,MAAMK,UAAU,GAAG,IAAAC,wBAAc,EAC/B,CAACC,gBAAU,EAAEC,eAAS,CAAC,EACvB,CAACC,OAAO,EAAEC,UAAU,KAClB,IAAAC,gBAAO,EACL,CAACC,EAAU,EAAEC,cAAuB,EAAEC,YAAqB,KACzDL,OAAO,CACJD,SAAS,CAACE,UAAU,CAAC,CACrBL,UAAU,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC,EACjD;EAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAIC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;IAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;EAAA;EAAA,OAAK,IAAAC,UAAA,CAAAC,OAAA,EAAeJ,IAAI,CAAC;AAAA,CACnC,CACJ,CAAC;;AAED;AACA;AACA,MAAMK,UAAU,GAAGA,CACjBX,EAAU,EACVC,cAAuB,EACvBC,YAA4B,KACpB,IAAAU,uBAAW,EAACnB,UAAU,CAAC,CAACO,EAAE,EAAEC,cAAc,EAAEC,YAAY,CAAC;;AAEnE;AACA;AADAW,OAAA,CAAAF,UAAA,GAAAA,UAAA;AAEA,MAAMG,YAAY,GAAGA,CAAA,KAAyB,IAAAF,uBAAW,EAACnB,UAAU,CAAC;;AAErE;AACA;AADAoB,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEA,MAAMC,SAAS,GAAGA,CAAA,KAAc,IAAAH,uBAAW,EAAChB,eAAS,CAAC;AAACiB,OAAA,CAAAE,SAAA,GAAAA,SAAA"}
@@ -19,13 +19,13 @@ type ModalHook = (modalId: string) => {
19
19
  export const useModal: ModalHook = (modalId: string) => {
20
20
  if (!modalId) {
21
21
  throw new IllegalArgumentException(
22
- "Missing modalId argument for useModal hook"
22
+ "Missing modalId argument for useModal hook",
23
23
  );
24
24
  }
25
25
 
26
26
  const dispatch = useDispatch();
27
27
  const modal = useSelector(({ modals }) =>
28
- modals.modals.find((m) => m.key === modalId)
28
+ modals.modals.find((m) => m.key === modalId),
29
29
  );
30
30
 
31
31
  const show = useCallback(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useModal.js","names":["_react","require","_reactRedux","_Modals","_exceptions","useModal","modalId","IllegalArgumentException","dispatch","useDispatch","modal","useSelector","_ref","_context","modals","_find","default","call","m","key","show","useCallback","showModal","close","closeModal","size","visible","exports"],"sources":["../../src/hooks/useModal.js"],"sourcesContent":["// @flow\nimport { useCallback } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../redux/actions/Modals\";\nimport { IllegalArgumentException } from \"../exceptions\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null,\n size: string | null,\n visible: boolean,\n show: () => void,\n close: () => void,\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\"\n );\n }\n\n const dispatch = useDispatch();\n const modal = useSelector(({ modals }) =>\n modals.modals.find((m) => m.key === modalId)\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n"],"mappings":";;;;;;;;AAC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AAAA,QAAA"}
1
+ {"version":3,"file":"useModal.js","names":["_react","require","_reactRedux","_Modals","_exceptions","useModal","modalId","IllegalArgumentException","dispatch","useDispatch","modal","useSelector","_ref","_context","modals","_find","default","call","m","key","show","useCallback","showModal","close","closeModal","size","visible","exports"],"sources":["../../src/hooks/useModal.js"],"sourcesContent":["// @flow\nimport { useCallback } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../redux/actions/Modals\";\nimport { IllegalArgumentException } from \"../exceptions\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null,\n size: string | null,\n visible: boolean,\n show: () => void,\n close: () => void,\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useDispatch();\n const modal = useSelector(({ modals }) =>\n modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAUA;AACA;AACA;AACO,MAAMI,QAAmB,GAAIC,OAAe,IAAK;EACtD,IAAI,CAACA,OAAO,EAAE;IACZ,MAAM,IAAIC,oCAAwB,CAChC,4CACF,CAAC;EACH;EAEA,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAC9B,MAAMC,KAAK,GAAG,IAAAC,uBAAW,EAACC,IAAA;IAAA,IAAAC,QAAA;IAAA,IAAC;MAAEC;IAAO,CAAC,GAAAF,IAAA;IAAA,OACnC,IAAAG,KAAA,CAAAC,OAAA,EAAAH,QAAA,GAAAC,MAAM,CAACA,MAAM,EAAAG,IAAA,CAAAJ,QAAA,EAAOK,CAAC,IAAKA,CAAC,CAACC,GAAG,KAAKb,OAAO,CAAC;EAAA,CAC9C,CAAC;EAED,MAAMc,IAAI,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAC7Bb,QAAQ,CAAC,IAAAc,iBAAS,EAAChB,OAAO,CAAC,CAAC;EAC9B,CAAC,EAAE,CAACE,QAAQ,EAAEF,OAAO,CAAC,CAAC;EAEvB,MAAMiB,KAAK,GAAG,IAAAF,kBAAW,EAAC,MAAM;IAC9Bb,QAAQ,CAAC,IAAAgB,kBAAU,EAAClB,OAAO,CAAC,CAAC;EAC/B,CAAC,EAAE,CAACE,QAAQ,EAAEF,OAAO,CAAC,CAAC;EAEvB,OAAO;IACLa,GAAG,EAAET,KAAK,GAAGA,KAAK,CAACS,GAAG,GAAG,IAAI;IAC7BM,IAAI,EAAEf,KAAK,GAAGA,KAAK,CAACe,IAAI,GAAG,IAAI;IAC/BC,OAAO,EAAEhB,KAAK,GAAGA,KAAK,CAACgB,OAAO,GAAG,KAAK;IACtCN,IAAI;IACJG;EACF,CAAC;AACH,CAAC;AAACI,OAAA,CAAAtB,QAAA,GAAAA,QAAA"}
@@ -47,7 +47,7 @@ const getHref = (context: string, dynamic: string, location?: Location) => {
47
47
  /**
48
48
  */
49
49
  export const useConceptDetail = (
50
- concept: string
50
+ concept: string,
51
51
  ): ?ConceptDetailModel | ?BusinessScenarioModel => {
52
52
  const location = useLocation();
53
53
 
@@ -1 +1 @@
1
- {"version":3,"file":"useModelCatalog.js","names":["_useRouter","require","_ModelCatalogModel","_interopRequireDefault","_ConceptIndexModel","_ConceptDetailModel","_BusinessScenarioModel","_ContentIndexModel","_ContentTOCModel","_ContentModel","_useModularUIBasic","_models","useModelCatalog","useModularUIBasic","expectedModels","targetModel","ModelCatalogModel","exports","useConceptIndex","href","ConceptIndexModel","getHref","context","dynamic","location","_startsWith","default","call","replace","search","useConceptDetail","concept","useLocation","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"sources":["../../src/hooks/useModelCatalog.js"],"sourcesContent":["// @flow\nimport { useLocation } from \"./useRouter\";\n\nimport ModelCatalogModel from \"../models/modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"../models/concepts/ConceptIndexModel\";\nimport ConceptDetailModel from \"../models/concepts/ConceptDetailModel\";\nimport { default as BusinessScenarioModel } from \"../models/concepts/BusinessScenarioModel\";\nimport ContentIndexModel from \"../models/content/ContentIndexModel\";\nimport ContentTOCModel from \"../models/content/ContentTOCModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { ContentTypeModel } from \"../models\";\nimport type { Location } from \"react-router\";\n\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (href: string): ?ConceptIndexModel =>\n useModularUIBasic(\"conceptindex\", href, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n\nconst getHref = (context: string, dynamic: string, location?: Location) => {\n let href = dynamic;\n if (!href.startsWith(`/${context}/`)) {\n href = `/${context}/${href}`;\n }\n\n href = href.replace(/\\/\\//g, \"/\");\n\n if (location?.search) {\n href = `${href}${location.search}`;\n }\n\n return href;\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = getHref(\"concepts\", concept, location);\n return useModularUIBasic(\"conceptdetail\", href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n });\n};\n\n/**\n */\nexport const useContentIndex = (href: string): ?ContentIndexModel =>\n useModularUIBasic(\"contentindex\", href, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n\n/**\n */\nexport const useContentTOC = (content: string): ?ContentTOCModel => {\n const location = useLocation();\n const href = getHref(\"content\", content, location);\n return useModularUIBasic(\"contenttoc\", href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n });\n};\n\n/**\n */\nexport const useContent = (contentSection: string): ?ContentModel => {\n const href = getHref(\"content\", contentSection);\n return useModularUIBasic(\"content\", href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (contentType: string): ?ContentTypeModel => {\n const href = getHref(\"contenttypes\", contentType);\n return useModularUIBasic(\"contenttypes\", href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\n};\n"],"mappings":";;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,sBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,kBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,gBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,aAAA,GAAAN,sBAAA,CAAAF,OAAA;AAEA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAGA;AACA;AACO,MAAMW,eAAe,GAAGA,CAAA,KAC7B,IAAAC,oCAAiB,EAAC,cAAc,EAAE,eAAe,EAAE;EACjDC,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEC;AACf,CAAC,CAAC;;AAEJ;AACA;AADAC,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAEO,MAAMM,eAAe,GAAIC,IAAY,IAC1C,IAAAN,oCAAi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AA;AAEO,MAAME,aAAa,GAAIC,OAAe,IAAuB;EAClE,MAAMZ,QAAQ,GAAG,IAAAQ,sBAAW,EAAC,CAAC;EAC9B,MAAMb,IAAI,GAAGE,OAAO,CAAC,SAAS,EAAEe,OAAO,EAAEZ,QAAQ,CAAC;EAClD,OAAO,IAAAX,oCAAiB,EAAC,YAAY,EAAEM,IAAI,EAAE;IAC3CL,cAAc,EAAE,CAAC,YAAY,CAAC;IAC9BC,WAAW,EAAEsB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADApB,OAAA,CAAAkB,aAAA,GAAAA,aAAA;AAEO,MAAMG,UAAU,GAAIC,cAAsB,IAAoB;EACnE,MAAMpB,IAAI,GAAGE,OAAO,CAAC,SAAS,EAAEkB,cAAc,CAAC;EAC/C,OAAO,IAAA1B,oCAAiB,EAAC,SAAS,EAAEM,IAAI,EAAE;IACxCL,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEyB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADAvB,OAAA,CAAAqB,UAAA,GAAAA,UAAA;AAEO,MAAMG,cAAc,GAAIC,WAAmB,IAAwB;EACxE,MAAMvB,IAAI,GAAGE,OAAO,CAAC,cAAc,EAAEqB,WAAW,CAAC;EACjD,OAAO,IAAA7B,oCAAiB,EAAC,cAAc,EAAEM,IAAI,EAAE;IAC7CL,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAE4B;EACf,CAAC,CAAC;AACJ,CAAC;AAAC1B,OAAA,CAAAwB,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"useModelCatalog.js","names":["_useRouter","require","_ModelCatalogModel","_interopRequireDefault","_ConceptIndexModel","_ConceptDetailModel","_BusinessScenarioModel","_ContentIndexModel","_ContentTOCModel","_ContentModel","_useModularUIBasic","_models","useModelCatalog","useModularUIBasic","expectedModels","targetModel","ModelCatalogModel","exports","useConceptIndex","href","ConceptIndexModel","getHref","context","dynamic","location","_startsWith","default","call","replace","search","useConceptDetail","concept","useLocation","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"sources":["../../src/hooks/useModelCatalog.js"],"sourcesContent":["// @flow\nimport { useLocation } from \"./useRouter\";\n\nimport ModelCatalogModel from \"../models/modelcatalog/ModelCatalogModel\";\nimport ConceptIndexModel from \"../models/concepts/ConceptIndexModel\";\nimport ConceptDetailModel from \"../models/concepts/ConceptDetailModel\";\nimport { default as BusinessScenarioModel } from \"../models/concepts/BusinessScenarioModel\";\nimport ContentIndexModel from \"../models/content/ContentIndexModel\";\nimport ContentTOCModel from \"../models/content/ContentTOCModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { ContentTypeModel } from \"../models\";\nimport type { Location } from \"react-router\";\n\n/**\n */\nexport const useModelCatalog = (): ?ModelCatalogModel =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n });\n\n/**\n */\nexport const useConceptIndex = (href: string): ?ConceptIndexModel =>\n useModularUIBasic(\"conceptindex\", href, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n });\n\nconst getHref = (context: string, dynamic: string, location?: Location) => {\n let href = dynamic;\n if (!href.startsWith(`/${context}/`)) {\n href = `/${context}/${href}`;\n }\n\n href = href.replace(/\\/\\//g, \"/\");\n\n if (location?.search) {\n href = `${href}${location.search}`;\n }\n\n return href;\n};\n\n/**\n */\nexport const useConceptDetail = (\n concept: string,\n): ?ConceptDetailModel | ?BusinessScenarioModel => {\n const location = useLocation();\n\n const href = getHref(\"concepts\", concept, location);\n return useModularUIBasic(\"conceptdetail\", href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n });\n};\n\n/**\n */\nexport const useContentIndex = (href: string): ?ContentIndexModel =>\n useModularUIBasic(\"contentindex\", href, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n });\n\n/**\n */\nexport const useContentTOC = (content: string): ?ContentTOCModel => {\n const location = useLocation();\n const href = getHref(\"content\", content, location);\n return useModularUIBasic(\"contenttoc\", href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n });\n};\n\n/**\n */\nexport const useContent = (contentSection: string): ?ContentModel => {\n const href = getHref(\"content\", contentSection);\n return useModularUIBasic(\"content\", href, {\n expectedModels: [\"Content\"],\n targetModel: ContentModel,\n });\n};\n\n/**\n */\nexport const useContentType = (contentType: string): ?ContentTypeModel => {\n const href = getHref(\"contenttypes\", contentType);\n return useModularUIBasic(\"contenttypes\", href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n });\n};\n"],"mappings":";;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,sBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,kBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,gBAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,aAAA,GAAAN,sBAAA,CAAAF,OAAA;AAEA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAGA;AACA;AACO,MAAMW,eAAe,GAAGA,CAAA,KAC7B,IAAAC,oCAAiB,EAAC,cAAc,EAAE,eAAe,EAAE;EACjDC,cAAc,EAAE,CAAC,cAAc,CAAC;EAChCC,WAAW,EAAEC;AACf,CAAC,CAAC;;AAEJ;AACA;AADAC,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAEO,MAAMM,eAAe,GAAIC,IAAY,IAC1C,IAAAN,oCAAiB,EAAC,cAAc,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,aAAa,GAAIC,OAAe,IAAuB;EAClE,MAAMZ,QAAQ,GAAG,IAAAQ,sBAAW,EAAC,CAAC;EAC9B,MAAMb,IAAI,GAAGE,OAAO,CAAC,SAAS,EAAEe,OAAO,EAAEZ,QAAQ,CAAC;EAClD,OAAO,IAAAX,oCAAiB,EAAC,YAAY,EAAEM,IAAI,EAAE;IAC3CL,cAAc,EAAE,CAAC,YAAY,CAAC;IAC9BC,WAAW,EAAEsB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADApB,OAAA,CAAAkB,aAAA,GAAAA,aAAA;AAEO,MAAMG,UAAU,GAAIC,cAAsB,IAAoB;EACnE,MAAMpB,IAAI,GAAGE,OAAO,CAAC,SAAS,EAAEkB,cAAc,CAAC;EAC/C,OAAO,IAAA1B,oCAAiB,EAAC,SAAS,EAAEM,IAAI,EAAE;IACxCL,cAAc,EAAE,CAAC,SAAS,CAAC;IAC3BC,WAAW,EAAEyB;EACf,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADAvB,OAAA,CAAAqB,UAAA,GAAAA,UAAA;AAEO,MAAMG,cAAc,GAAIC,WAAmB,IAAwB;EACxE,MAAMvB,IAAI,GAAGE,OAAO,CAAC,cAAc,EAAEqB,WAAW,CAAC;EACjD,OAAO,IAAA7B,oCAAiB,EAAC,cAAc,EAAEM,IAAI,EAAE;IAC7CL,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/BC,WAAW,EAAE4B;EACf,CAAC,CAAC;AACJ,CAAC;AAAC1B,OAAA,CAAAwB,cAAA,GAAAA,cAAA"}
@@ -31,7 +31,7 @@ export const useModularUI = (
31
31
  options: RequestModularUIOptions = {
32
32
  method: HTTP_METHODS.GET,
33
33
  removeOnUnmount: false,
34
- }
34
+ },
35
35
  ): any => {
36
36
  const dispatch = useDispatch();
37
37
  const href = url.toString();
@@ -1 +1 @@
1
- {"version":3,"file":"useModularUI.js","names":["_react","require","_reactRedux","_constants","_ModularUIActions","_useDeepCompareEffect","_interopRequireDefault","_useI18n","useKeyForHook","modelKey","url","locale","useLocale","split","useModularUI","options","arguments","length","undefined","method","HTTP_METHODS","GET","removeOnUnmount","dispatch","useDispatch","href","toString","key","prevOptions","useRef","prevHref","useDeepCompareEffect","isOldReload","current","isReload","loadModularUI","useEffect","removeModelByKey","useSelector","state","modularui","exports"],"sources":["../../src/hooks/useModularUI.js"],"sourcesContent":["// @flow\nimport { useEffect, useRef } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { HTTP_METHODS } from \"../constants\";\nimport {\n loadModularUI,\n removeModelByKey,\n} from \"../redux/_modularui/ModularUIActions\";\n\nimport useDeepCompareEffect from \"./useDeepCompareEffect\";\n\nimport { useLocale } from \"./useI18n\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestModularUIOptions } from \"../utils\";\n\n/**\n */\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useLocale();\n return `${modelKey}(${url.split(\"?\")[0]})(${locale})`;\n};\n\n/**\n * Use redux action and selector to retrieve the correct modular ui service model\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: RequestModularUIOptions = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: false,\n }\n): any => {\n const dispatch = useDispatch();\n const href = url.toString();\n const key = useKeyForHook(modelKey, href);\n\n const prevOptions = useRef(options);\n const prevHref = useRef(href);\n\n // dispatch loadModularUI\n useDeepCompareEffect(() => {\n // prevent reloads when previous option had the isReload, but the new options not\n const isOldReload =\n prevHref.current === href &&\n prevOptions.current.isReload &&\n !options.isReload;\n\n if (!isOldReload) {\n dispatch(loadModularUI(key, href, options));\n }\n\n prevOptions.current = options;\n prevHref.current = href;\n }, [key, href, options]);\n\n const { removeOnUnmount = false } = options;\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(key));\n }\n };\n }, [dispatch, key, removeOnUnmount]);\n\n // retrieve current model from modularui reducer\n return useSelector((state) => {\n return state.modularui[key];\n });\n};\n"],"mappings":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AAY,+BAAa,EAACR,GAAG,EAAEF,IAAI,EAAEV,OAAO,CAAC,CAAC;IAC7C;IAEAa,WAAW,CAACK,OAAO,GAAGlB,OAAO;IAC7Be,QAAQ,CAACG,OAAO,GAAGR,IAAI;EACzB,CAAC,EAAE,CAACE,GAAG,EAAEF,IAAI,EAAEV,OAAO,CAAC,CAAC;EAExB,MAAM;IAAEO,eAAe,GAAG;EAAM,CAAC,GAAGP,OAAO;EAC3C,IAAAqB,gBAAS,EAAC,MAAM;IACd,OAAO,MAAM;MACX,IAAId,eAAe,EAAE;QACnBC,QAAQ,CAAC,IAAAc,kCAAgB,EAACV,GAAG,CAAC,CAAC;MACjC;IACF,CAAC;EACH,CAAC,EAAE,CAACJ,QAAQ,EAAEI,GAAG,EAAEL,eAAe,CAAC,CAAC;;EAEpC;EACA,OAAO,IAAAgB,uBAAW,EAAEC,KAAK,IAAK;IAC5B,OAAOA,KAAK,CAACC,SAAS,CAACb,GAAG,CAAC;EAC7B,CAAC,CAAC;AACJ,CAAC;AAACc,OAAA,CAAA3B,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"file":"useModularUI.js","names":["_react","require","_reactRedux","_constants","_ModularUIActions","_useDeepCompareEffect","_interopRequireDefault","_useI18n","useKeyForHook","modelKey","url","locale","useLocale","split","useModularUI","options","arguments","length","undefined","method","HTTP_METHODS","GET","removeOnUnmount","dispatch","useDispatch","href","toString","key","prevOptions","useRef","prevHref","useDeepCompareEffect","isOldReload","current","isReload","loadModularUI","useEffect","removeModelByKey","useSelector","state","modularui","exports"],"sources":["../../src/hooks/useModularUI.js"],"sourcesContent":["// @flow\nimport { useEffect, useRef } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { HTTP_METHODS } from \"../constants\";\nimport {\n loadModularUI,\n removeModelByKey,\n} from \"../redux/_modularui/ModularUIActions\";\n\nimport useDeepCompareEffect from \"./useDeepCompareEffect\";\n\nimport { useLocale } from \"./useI18n\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestModularUIOptions } from \"../utils\";\n\n/**\n */\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useLocale();\n return `${modelKey}(${url.split(\"?\")[0]})(${locale})`;\n};\n\n/**\n * Use redux action and selector to retrieve the correct modular ui service model\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: RequestModularUIOptions = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: false,\n },\n): any => {\n const dispatch = useDispatch();\n const href = url.toString();\n const key = useKeyForHook(modelKey, href);\n\n const prevOptions = useRef(options);\n const prevHref = useRef(href);\n\n // dispatch loadModularUI\n useDeepCompareEffect(() => {\n // prevent reloads when previous option had the isReload, but the new options not\n const isOldReload =\n prevHref.current === href &&\n prevOptions.current.isReload &&\n !options.isReload;\n\n if (!isOldReload) {\n dispatch(loadModularUI(key, href, options));\n }\n\n prevOptions.current = options;\n prevHref.current = href;\n }, [key, href, options]);\n\n const { removeOnUnmount = false } = options;\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(key));\n }\n };\n }, [dispatch, key, removeOnUnmount]);\n\n // retrieve current model from modularui reducer\n return useSelector((state) => {\n return state.modularui[key];\n });\n};\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAKA,IAAAI,qBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AAKA;AACA;AACA,MAAMO,aAAa,GAAGA,CAACC,QAAgB,EAAEC,GAAW,KAAK;EACvD,MAAMC,MAAM,GAAG,IAAAC,kBAAS,EAAC,CAAC;EAC1B,OAAQ,GAAEH,QAAS,IAAGC,GAAG,CAACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,KAAIF,MAAO,GAAE;AACvD,CAAC;;AAED;AACA;AACA;AACO,M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eAAe,CAAC,CAAC;;EAEpC;EACA,OAAO,IAAAgB,uBAAW,EAAEC,KAAK,IAAK;IAC5B,OAAOA,KAAK,CAACC,SAAS,CAACb,GAAG,CAAC;EAC7B,CAAC,CAAC;AACJ,CAAC;AAACc,OAAA,CAAA3B,YAAA,GAAAA,YAAA"}
@@ -22,7 +22,7 @@ export const useModularUIBasic = <T: ModularUIModel>(
22
22
  expectedModels: [],
23
23
  targetModel: undefined,
24
24
  forceTargetModel: false,
25
- }
25
+ },
26
26
  ): T | null => {
27
27
  const location = useLocation();
28
28
  if (!href) {