@beinformed/ui 1.18.1 → 1.18.2

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 (598) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/esm/builder/index.js.map +1 -1
  3. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  4. package/esm/constants/Constants.js.map +1 -1
  5. package/esm/constants/LayoutHintConfig.js.map +1 -1
  6. package/esm/constants/LayoutHints.js.map +1 -1
  7. package/esm/constants/Settings.js.map +1 -1
  8. package/esm/constants/index.js.map +1 -1
  9. package/esm/exceptions/ConfigurationException.js.map +1 -1
  10. package/esm/exceptions/FetchException.js.map +1 -1
  11. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  12. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  13. package/esm/exceptions/IllegalStateException.js.map +1 -1
  14. package/esm/exceptions/JsonParseException.js.map +1 -1
  15. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  16. package/esm/exceptions/NetworkException.js.map +1 -1
  17. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  18. package/esm/exceptions/NotFoundException.js.map +1 -1
  19. package/esm/exceptions/ServerRequestException.js.map +1 -1
  20. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  21. package/esm/exceptions/TimeoutException.js.map +1 -1
  22. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  23. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  24. package/esm/exceptions/index.js.map +1 -1
  25. package/esm/hooks/index.js.map +1 -1
  26. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  27. package/esm/hooks/useAuthentication.js.map +1 -1
  28. package/esm/hooks/useContent.js.map +1 -1
  29. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  30. package/esm/hooks/useForm.js.map +1 -1
  31. package/esm/hooks/useI18n.js.map +1 -1
  32. package/esm/hooks/useModal.js.map +1 -1
  33. package/esm/hooks/useModelCatalog.js.map +1 -1
  34. package/esm/hooks/useModels.js.map +1 -1
  35. package/esm/hooks/useModularUI.js.map +1 -1
  36. package/esm/hooks/useModularUIBasic.js.map +1 -1
  37. package/esm/hooks/useModularUIModel.js.map +1 -1
  38. package/esm/hooks/useModularUIRequest.js.map +1 -1
  39. package/esm/hooks/useNotification.js.map +1 -1
  40. package/esm/hooks/usePreference.js.map +1 -1
  41. package/esm/hooks/useProgressIndicator.js.map +1 -1
  42. package/esm/hooks/useRouter.js.map +1 -1
  43. package/esm/i18n/Locale.js.map +1 -1
  44. package/esm/i18n/Locales.js.map +1 -1
  45. package/esm/i18n/Message.js.map +1 -1
  46. package/esm/i18n/index.js.map +1 -1
  47. package/esm/i18n/languages.js.map +1 -1
  48. package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  49. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  50. package/esm/i18n/types.js.map +1 -1
  51. package/esm/i18n/withMessage.js.map +1 -1
  52. package/esm/index.js.map +1 -1
  53. package/esm/models/actions/ActionCollection.js.map +1 -1
  54. package/esm/models/actions/ActionModel.js.map +1 -1
  55. package/esm/models/application/ApplicationModel.js.map +1 -1
  56. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  57. package/esm/models/attributes/AttributeContent.js.map +1 -1
  58. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  59. package/esm/models/attributes/AttributeModel.js.map +1 -1
  60. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  61. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  62. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  63. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  64. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  65. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  66. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  67. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  68. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  69. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  70. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  71. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  72. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  73. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  74. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  75. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  76. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  77. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  78. package/esm/models/attributes/_createAttribute.js.map +1 -1
  79. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  80. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  81. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  82. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  83. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  84. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  85. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  86. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  87. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  88. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  89. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  90. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  91. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  92. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  93. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  94. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  95. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  96. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  97. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  98. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  99. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  100. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  101. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  102. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  103. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  104. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  105. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  106. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  107. package/esm/models/base/BaseCollection.js.map +1 -1
  108. package/esm/models/base/BaseModel.js.map +1 -1
  109. package/esm/models/base/ResourceCollection.js.map +1 -1
  110. package/esm/models/base/ResourceModel.js.map +1 -1
  111. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  112. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  113. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  114. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  115. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  116. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  117. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  118. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  119. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  120. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  121. package/esm/models/content/ContentIndexModel.js.map +1 -1
  122. package/esm/models/content/ContentLinkModel.js.map +1 -1
  123. package/esm/models/content/ContentModel.js.map +1 -1
  124. package/esm/models/content/ContentTOCModel.js.map +1 -1
  125. package/esm/models/content/ContentTypeModel.js.map +1 -1
  126. package/esm/models/content/SectionModel.js.map +1 -1
  127. package/esm/models/content/SubSectionModel.js.map +1 -1
  128. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  129. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  130. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  131. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  132. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  133. package/esm/models/detail/DetailModel.js.map +1 -1
  134. package/esm/models/error/ErrorCollection.js.map +1 -1
  135. package/esm/models/error/ErrorModel.js.map +1 -1
  136. package/esm/models/error/ErrorResponse.js.map +1 -1
  137. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  138. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  139. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  140. package/esm/models/filters/FilterCollection.js.map +1 -1
  141. package/esm/models/filters/FilterModel.js.map +1 -1
  142. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  143. package/esm/models/form/FormModel.js.map +1 -1
  144. package/esm/models/form/FormObjectModel.js.map +1 -1
  145. package/esm/models/grouping/GroupingModel.js.map +1 -1
  146. package/esm/models/href/Href.js.map +1 -1
  147. package/esm/models/href/ListHref.js.map +1 -1
  148. package/esm/models/index.js.map +1 -1
  149. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  150. package/esm/models/links/LinkCollection.js.map +1 -1
  151. package/esm/models/links/LinkModel.js.map +1 -1
  152. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  153. package/esm/models/list/ListDetailModel.js.map +1 -1
  154. package/esm/models/list/ListHeaderModel.js.map +1 -1
  155. package/esm/models/list/ListItemCollection.js.map +1 -1
  156. package/esm/models/list/ListItemModel.js.map +1 -1
  157. package/esm/models/list/ListModel.js +2 -2
  158. package/esm/models/list/ListModel.js.map +1 -1
  159. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  160. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  161. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  162. package/esm/models/paging/PagesizeModel.js.map +1 -1
  163. package/esm/models/paging/PagingModel.js.map +1 -1
  164. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  165. package/esm/models/parameter/Parameter.js.map +1 -1
  166. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  167. package/esm/models/resolveModel.js.map +1 -1
  168. package/esm/models/search/CaseSearchModel.js.map +1 -1
  169. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  170. package/esm/models/sorting/SortingModel.js.map +1 -1
  171. package/esm/models/tab/TabModel.js.map +1 -1
  172. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  173. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  174. package/esm/models/types.js.map +1 -1
  175. package/esm/models/user/UserModel.js.map +1 -1
  176. package/esm/models/user/UserProfileModel.js.map +1 -1
  177. package/esm/models/user/UserServicesModel.js.map +1 -1
  178. package/esm/modularui/Authenticate.js.map +1 -1
  179. package/esm/modularui/ModularUIError.js.map +1 -1
  180. package/esm/modularui/ModularUIRequest.js.map +1 -1
  181. package/esm/modularui/ModularUIResponse.js.map +1 -1
  182. package/esm/modularui/index.js.map +1 -1
  183. package/esm/react/ErrorBoundary.js.map +1 -1
  184. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  185. package/esm/react/index.js.map +1 -1
  186. package/esm/react/utils.js.map +1 -1
  187. package/esm/react-client/Init.js.map +1 -1
  188. package/esm/react-client/client.js.map +1 -1
  189. package/esm/react-client/contextPath.js.map +1 -1
  190. package/esm/react-client/index.js.map +1 -1
  191. package/esm/react-client/rehydrate.js.map +1 -1
  192. package/esm/react-server/contextPath.js.map +1 -1
  193. package/esm/react-server/createSSRComplete.js.map +1 -1
  194. package/esm/react-server/htmlpage.js.map +1 -1
  195. package/esm/react-server/index.js.map +1 -1
  196. package/esm/react-server/renderSSRComplete.js.map +1 -1
  197. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  198. package/esm/react-server/requestInformation.js.map +1 -1
  199. package/esm/react-server/serverNoSSR.js.map +1 -1
  200. package/esm/react-server/serverSSR.js.map +1 -1
  201. package/esm/react-server/serverUtil.js.map +1 -1
  202. package/esm/react-theme/ThemeProvider.js.map +1 -1
  203. package/esm/react-theme/createTheme.js.map +1 -1
  204. package/esm/react-theme/index.js.map +1 -1
  205. package/esm/react-theme/types.js.map +1 -1
  206. package/esm/react-theme/useTheme.js.map +1 -1
  207. package/esm/react-theme/utils/background.js.map +1 -1
  208. package/esm/react-theme/utils/colors.js.map +1 -1
  209. package/esm/react-theme/utils/contrast.js.map +1 -1
  210. package/esm/react-theme/utils/corners.js.map +1 -1
  211. package/esm/react-theme/utils/spacers.js.map +1 -1
  212. package/esm/react-theme/utils/themeProps.js.map +1 -1
  213. package/esm/redux/_i18n/actions.js.map +1 -1
  214. package/esm/redux/_i18n/index.js.map +1 -1
  215. package/esm/redux/_i18n/reducer.js.map +1 -1
  216. package/esm/redux/_i18n/types.js.map +1 -1
  217. package/esm/redux/_modularui/actions.js.map +1 -1
  218. package/esm/redux/_modularui/connector.js.map +1 -1
  219. package/esm/redux/_modularui/index.js.map +1 -1
  220. package/esm/redux/_modularui/middleware.js.map +1 -1
  221. package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
  222. package/esm/redux/_modularui/reducer.js.map +1 -1
  223. package/esm/redux/_modularui/selectors.js.map +1 -1
  224. package/esm/redux/_modularui/types.js.map +1 -1
  225. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  226. package/esm/redux/_router/actions.js.map +1 -1
  227. package/esm/redux/_router/connectors.js.map +1 -1
  228. package/esm/redux/_router/index.js.map +1 -1
  229. package/esm/redux/_router/middleware.js.map +1 -1
  230. package/esm/redux/_router/reducer.js.map +1 -1
  231. package/esm/redux/_router/types.js.map +1 -1
  232. package/esm/redux/actions/Application.js.map +1 -1
  233. package/esm/redux/actions/Authorization.js.map +1 -1
  234. package/esm/redux/actions/Error.js.map +1 -1
  235. package/esm/redux/actions/Form.js.map +1 -1
  236. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  237. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  238. package/esm/redux/actions/FormAutosave.js.map +1 -1
  239. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  240. package/esm/redux/actions/FormValidations.js.map +1 -1
  241. package/esm/redux/actions/Modals.js.map +1 -1
  242. package/esm/redux/actions/Notification.js.map +1 -1
  243. package/esm/redux/actions/Preferences.js.map +1 -1
  244. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  245. package/esm/redux/actions/SignIn.js.map +1 -1
  246. package/esm/redux/actions/SignOut.js.map +1 -1
  247. package/esm/redux/actions/index.js.map +1 -1
  248. package/esm/redux/connectors/Application.js.map +1 -1
  249. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  250. package/esm/redux/connectors/CaseView.js.map +1 -1
  251. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  252. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  253. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  254. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  255. package/esm/redux/connectors/Form.js.map +1 -1
  256. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  257. package/esm/redux/connectors/ListDetail.js.map +1 -1
  258. package/esm/redux/connectors/Modal.js.map +1 -1
  259. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  260. package/esm/redux/connectors/Notification.js.map +1 -1
  261. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  262. package/esm/redux/connectors/Preferences.js.map +1 -1
  263. package/esm/redux/connectors/Progress.js.map +1 -1
  264. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  265. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  266. package/esm/redux/connectors/SignIn.js.map +1 -1
  267. package/esm/redux/connectors/SignOut.js.map +1 -1
  268. package/esm/redux/connectors/Tab.js.map +1 -1
  269. package/esm/redux/connectors/index.js.map +1 -1
  270. package/esm/redux/index.js.map +1 -1
  271. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  272. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  273. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  274. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  275. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  276. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  277. package/esm/redux/reducers/createReducer.js.map +1 -1
  278. package/esm/redux/reducers/index.js.map +1 -1
  279. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  280. package/esm/redux/store/configureStore.js.map +1 -1
  281. package/esm/redux/types.js.map +1 -1
  282. package/esm/utils/browser/Cache.js.map +1 -1
  283. package/esm/utils/browser/Cookies.js.map +1 -1
  284. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  285. package/esm/utils/fetch/serverFetch.js.map +1 -1
  286. package/esm/utils/fetch/types.js.map +1 -1
  287. package/esm/utils/fetch/universalFetch.js.map +1 -1
  288. package/esm/utils/fetch/xhr.js.map +1 -1
  289. package/esm/utils/helpers/checkResource.js.map +1 -1
  290. package/esm/utils/helpers/createHash.js.map +1 -1
  291. package/esm/utils/helpers/createUUID.js.map +1 -1
  292. package/esm/utils/helpers/objects.js.map +1 -1
  293. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  294. package/esm/utils/helpers/text.js.map +1 -1
  295. package/esm/utils/index.js.map +1 -1
  296. package/esm/utils/number/DecimalFormat.js.map +1 -1
  297. package/esm/utils/number/formatValue.js.map +1 -1
  298. package/esm/utils/number/parseNumbers.js.map +1 -1
  299. package/lib/builder/index.js.map +1 -1
  300. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  301. package/lib/constants/Constants.js.map +1 -1
  302. package/lib/constants/LayoutHintConfig.js.map +1 -1
  303. package/lib/constants/LayoutHints.js.map +1 -1
  304. package/lib/constants/Settings.js.map +1 -1
  305. package/lib/constants/index.js.map +1 -1
  306. package/lib/exceptions/ConfigurationException.js.map +1 -1
  307. package/lib/exceptions/FetchException.js.map +1 -1
  308. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  309. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  310. package/lib/exceptions/IllegalStateException.js.map +1 -1
  311. package/lib/exceptions/JsonParseException.js.map +1 -1
  312. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  313. package/lib/exceptions/NetworkException.js.map +1 -1
  314. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  315. package/lib/exceptions/NotFoundException.js.map +1 -1
  316. package/lib/exceptions/ServerRequestException.js.map +1 -1
  317. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  318. package/lib/exceptions/TimeoutException.js.map +1 -1
  319. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  320. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  321. package/lib/exceptions/index.js.map +1 -1
  322. package/lib/hooks/index.js.map +1 -1
  323. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  324. package/lib/hooks/useAuthentication.js.map +1 -1
  325. package/lib/hooks/useContent.js.map +1 -1
  326. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  327. package/lib/hooks/useForm.js.map +1 -1
  328. package/lib/hooks/useI18n.js.map +1 -1
  329. package/lib/hooks/useModal.js.map +1 -1
  330. package/lib/hooks/useModelCatalog.js.map +1 -1
  331. package/lib/hooks/useModels.js.map +1 -1
  332. package/lib/hooks/useModularUI.js.map +1 -1
  333. package/lib/hooks/useModularUIBasic.js.map +1 -1
  334. package/lib/hooks/useModularUIModel.js.map +1 -1
  335. package/lib/hooks/useModularUIRequest.js.map +1 -1
  336. package/lib/hooks/useNotification.js.map +1 -1
  337. package/lib/hooks/usePreference.js.map +1 -1
  338. package/lib/hooks/useProgressIndicator.js.map +1 -1
  339. package/lib/hooks/useRouter.js.map +1 -1
  340. package/lib/i18n/Locale.js.map +1 -1
  341. package/lib/i18n/Locales.js.map +1 -1
  342. package/lib/i18n/Message.js.map +1 -1
  343. package/lib/i18n/index.js.map +1 -1
  344. package/lib/i18n/languages.js.map +1 -1
  345. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  346. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  347. package/lib/i18n/types.js.map +1 -1
  348. package/lib/i18n/withMessage.js.map +1 -1
  349. package/lib/index.js.map +1 -1
  350. package/lib/models/actions/ActionCollection.js.map +1 -1
  351. package/lib/models/actions/ActionModel.js.map +1 -1
  352. package/lib/models/application/ApplicationModel.js.map +1 -1
  353. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  354. package/lib/models/attributes/AttributeContent.js.map +1 -1
  355. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  356. package/lib/models/attributes/AttributeModel.js.map +1 -1
  357. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  358. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  359. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  360. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  361. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  362. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  363. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  364. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  365. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  366. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  367. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  368. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  369. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  370. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  371. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  372. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  373. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  374. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  375. package/lib/models/attributes/_createAttribute.js.map +1 -1
  376. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  377. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  378. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  379. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  380. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  381. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  382. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  383. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  384. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  385. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  386. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  387. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  388. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  389. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  390. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  391. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  392. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  393. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  394. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  395. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  396. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  397. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  398. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  399. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  400. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  401. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  402. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  403. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  404. package/lib/models/base/BaseCollection.js.map +1 -1
  405. package/lib/models/base/BaseModel.js.map +1 -1
  406. package/lib/models/base/ResourceCollection.js.map +1 -1
  407. package/lib/models/base/ResourceModel.js.map +1 -1
  408. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  409. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  410. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  411. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  412. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  413. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  414. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  415. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  416. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  417. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  418. package/lib/models/content/ContentIndexModel.js.map +1 -1
  419. package/lib/models/content/ContentLinkModel.js.map +1 -1
  420. package/lib/models/content/ContentModel.js.map +1 -1
  421. package/lib/models/content/ContentTOCModel.js.map +1 -1
  422. package/lib/models/content/ContentTypeModel.js.map +1 -1
  423. package/lib/models/content/SectionModel.js.map +1 -1
  424. package/lib/models/content/SubSectionModel.js.map +1 -1
  425. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  426. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  427. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  428. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  429. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  430. package/lib/models/detail/DetailModel.js.map +1 -1
  431. package/lib/models/error/ErrorCollection.js.map +1 -1
  432. package/lib/models/error/ErrorModel.js.map +1 -1
  433. package/lib/models/error/ErrorResponse.js.map +1 -1
  434. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  435. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  436. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  437. package/lib/models/filters/FilterCollection.js.map +1 -1
  438. package/lib/models/filters/FilterModel.js.map +1 -1
  439. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  440. package/lib/models/form/FormModel.js.map +1 -1
  441. package/lib/models/form/FormObjectModel.js.map +1 -1
  442. package/lib/models/grouping/GroupingModel.js.map +1 -1
  443. package/lib/models/href/Href.js.map +1 -1
  444. package/lib/models/href/ListHref.js.map +1 -1
  445. package/lib/models/index.js.map +1 -1
  446. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  447. package/lib/models/links/LinkCollection.js.map +1 -1
  448. package/lib/models/links/LinkModel.js.map +1 -1
  449. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  450. package/lib/models/list/ListDetailModel.js.map +1 -1
  451. package/lib/models/list/ListHeaderModel.js.map +1 -1
  452. package/lib/models/list/ListItemCollection.js.map +1 -1
  453. package/lib/models/list/ListItemModel.js.map +1 -1
  454. package/lib/models/list/ListModel.js +2 -2
  455. package/lib/models/list/ListModel.js.flow +1 -2
  456. package/lib/models/list/ListModel.js.map +1 -1
  457. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  458. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  459. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  460. package/lib/models/paging/PagesizeModel.js.map +1 -1
  461. package/lib/models/paging/PagingModel.js.map +1 -1
  462. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  463. package/lib/models/parameter/Parameter.js.map +1 -1
  464. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  465. package/lib/models/resolveModel.js.map +1 -1
  466. package/lib/models/search/CaseSearchModel.js.map +1 -1
  467. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  468. package/lib/models/sorting/SortingModel.js.map +1 -1
  469. package/lib/models/tab/TabModel.js.map +1 -1
  470. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  471. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  472. package/lib/models/types.js.map +1 -1
  473. package/lib/models/user/UserModel.js.map +1 -1
  474. package/lib/models/user/UserProfileModel.js.map +1 -1
  475. package/lib/models/user/UserServicesModel.js.map +1 -1
  476. package/lib/modularui/Authenticate.js.map +1 -1
  477. package/lib/modularui/ModularUIError.js.map +1 -1
  478. package/lib/modularui/ModularUIRequest.js.map +1 -1
  479. package/lib/modularui/ModularUIResponse.js.map +1 -1
  480. package/lib/modularui/index.js.map +1 -1
  481. package/lib/react/ErrorBoundary.js.map +1 -1
  482. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  483. package/lib/react/index.js.map +1 -1
  484. package/lib/react/utils.js.map +1 -1
  485. package/lib/react-client/Init.js.map +1 -1
  486. package/lib/react-client/client.js.map +1 -1
  487. package/lib/react-client/contextPath.js.map +1 -1
  488. package/lib/react-client/index.js.map +1 -1
  489. package/lib/react-client/rehydrate.js.map +1 -1
  490. package/lib/react-server/contextPath.js.map +1 -1
  491. package/lib/react-server/createSSRComplete.js.map +1 -1
  492. package/lib/react-server/htmlpage.js.map +1 -1
  493. package/lib/react-server/index.js.map +1 -1
  494. package/lib/react-server/renderSSRComplete.js.map +1 -1
  495. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  496. package/lib/react-server/requestInformation.js.map +1 -1
  497. package/lib/react-server/serverNoSSR.js.map +1 -1
  498. package/lib/react-server/serverSSR.js.map +1 -1
  499. package/lib/react-server/serverUtil.js.map +1 -1
  500. package/lib/react-theme/ThemeProvider.js.map +1 -1
  501. package/lib/react-theme/createTheme.js.map +1 -1
  502. package/lib/react-theme/index.js.map +1 -1
  503. package/lib/react-theme/types.js.map +1 -1
  504. package/lib/react-theme/useTheme.js.map +1 -1
  505. package/lib/react-theme/utils/background.js.map +1 -1
  506. package/lib/react-theme/utils/colors.js.map +1 -1
  507. package/lib/react-theme/utils/contrast.js.map +1 -1
  508. package/lib/react-theme/utils/corners.js.map +1 -1
  509. package/lib/react-theme/utils/spacers.js.map +1 -1
  510. package/lib/react-theme/utils/themeProps.js.map +1 -1
  511. package/lib/redux/_i18n/actions.js.map +1 -1
  512. package/lib/redux/_i18n/index.js.map +1 -1
  513. package/lib/redux/_i18n/reducer.js.map +1 -1
  514. package/lib/redux/_i18n/types.js.map +1 -1
  515. package/lib/redux/_modularui/actions.js.map +1 -1
  516. package/lib/redux/_modularui/connector.js.map +1 -1
  517. package/lib/redux/_modularui/index.js.map +1 -1
  518. package/lib/redux/_modularui/middleware.js.map +1 -1
  519. package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
  520. package/lib/redux/_modularui/reducer.js.map +1 -1
  521. package/lib/redux/_modularui/selectors.js.map +1 -1
  522. package/lib/redux/_modularui/types.js.map +1 -1
  523. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  524. package/lib/redux/_router/actions.js.map +1 -1
  525. package/lib/redux/_router/connectors.js.map +1 -1
  526. package/lib/redux/_router/index.js.map +1 -1
  527. package/lib/redux/_router/middleware.js.map +1 -1
  528. package/lib/redux/_router/reducer.js.map +1 -1
  529. package/lib/redux/_router/types.js.map +1 -1
  530. package/lib/redux/actions/Application.js.map +1 -1
  531. package/lib/redux/actions/Authorization.js.map +1 -1
  532. package/lib/redux/actions/Error.js.map +1 -1
  533. package/lib/redux/actions/Form.js.map +1 -1
  534. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  535. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  536. package/lib/redux/actions/FormAutosave.js.map +1 -1
  537. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  538. package/lib/redux/actions/FormValidations.js.map +1 -1
  539. package/lib/redux/actions/Modals.js.map +1 -1
  540. package/lib/redux/actions/Notification.js.map +1 -1
  541. package/lib/redux/actions/Preferences.js.map +1 -1
  542. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  543. package/lib/redux/actions/SignIn.js.map +1 -1
  544. package/lib/redux/actions/SignOut.js.map +1 -1
  545. package/lib/redux/actions/index.js.map +1 -1
  546. package/lib/redux/connectors/Application.js.map +1 -1
  547. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  548. package/lib/redux/connectors/CaseView.js.map +1 -1
  549. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  550. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  551. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  552. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  553. package/lib/redux/connectors/Form.js.map +1 -1
  554. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  555. package/lib/redux/connectors/ListDetail.js.map +1 -1
  556. package/lib/redux/connectors/Modal.js.map +1 -1
  557. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  558. package/lib/redux/connectors/Notification.js.map +1 -1
  559. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  560. package/lib/redux/connectors/Preferences.js.map +1 -1
  561. package/lib/redux/connectors/Progress.js.map +1 -1
  562. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  563. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  564. package/lib/redux/connectors/SignIn.js.map +1 -1
  565. package/lib/redux/connectors/SignOut.js.map +1 -1
  566. package/lib/redux/connectors/Tab.js.map +1 -1
  567. package/lib/redux/connectors/index.js.map +1 -1
  568. package/lib/redux/index.js.map +1 -1
  569. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  570. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  571. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  572. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  573. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  574. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  575. package/lib/redux/reducers/createReducer.js.map +1 -1
  576. package/lib/redux/reducers/index.js.map +1 -1
  577. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  578. package/lib/redux/store/configureStore.js.map +1 -1
  579. package/lib/redux/types.js.map +1 -1
  580. package/lib/utils/browser/Cache.js.map +1 -1
  581. package/lib/utils/browser/Cookies.js.map +1 -1
  582. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  583. package/lib/utils/fetch/serverFetch.js.map +1 -1
  584. package/lib/utils/fetch/types.js.map +1 -1
  585. package/lib/utils/fetch/universalFetch.js.map +1 -1
  586. package/lib/utils/fetch/xhr.js.map +1 -1
  587. package/lib/utils/helpers/checkResource.js.map +1 -1
  588. package/lib/utils/helpers/createHash.js.map +1 -1
  589. package/lib/utils/helpers/createUUID.js.map +1 -1
  590. package/lib/utils/helpers/objects.js.map +1 -1
  591. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  592. package/lib/utils/helpers/text.js.map +1 -1
  593. package/lib/utils/index.js.map +1 -1
  594. package/lib/utils/number/DecimalFormat.js.map +1 -1
  595. package/lib/utils/number/formatValue.js.map +1 -1
  596. package/lib/utils/number/parseNumbers.js.map +1 -1
  597. package/package.json +7 -7
  598. package/src/models/list/ListModel.js +1 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/FetchException.js"],"names":["CLIENT_ERROR_CODE","getErrorInfo","errorResponse","requestOptions","defaultErrorInfo","id","defaultMessage","url","method","HTTP_METHODS","GET","properties","param","error","key","errors","FetchException","failedRequest","errorInfo","name","request","status","response","parameters","Error","captureStackTrace"],"mappings":";;;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SAAS,CAACb,EAApB;AACA,UAAKe,OAAL,GAAeH,aAAf;AACA,UAAKd,cAAL,GAAsBA,cAAtB;AAEA,UAAKkB,MAAL,GACEJ,aAAa,IAAIA,aAAa,CAACI,MAA/B,GACIJ,aAAa,CAACI,MADlB,GAEIrB,iBAHN;AAKA,UAAKsB,QAAL,GAAgBpB,aAAhB;AACA,UAAKS,UAAL,4BAAkBO,SAAS,CAACP,UAA5B,yEAA0C,EAA1C;AACA,UAAKY,UAAL,uBAAkBL,SAAS,CAACN,KAA5B,+DAAqC,IAArC;;AAEA,QAAIY,KAAK,CAACC,iBAAV,EAA6B;AAC3BD,MAAAA,KAAK,CAACC,iBAAN,8CAA8BT,cAA9B;AACD;;AApBD;AAqBD;;;+CAlCyCQ,K","sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport type { MessageParameters } from \"../i18n/types\";\nimport type { RequestOptions } from \"../utils/fetch/types\";\n\nexport type ModularUIErrorResponse = {\n error: {\n id: string,\n properties: {\n [propertyName: string]: string | number,\n ...\n },\n },\n};\n\ntype RequestResult = { status: number };\ntype RequestParameters = { [key: string]: any };\n\nconst CLIENT_ERROR_CODE = 400;\n\n/**\n * @private\n */\nconst getErrorInfo = (\n errorResponse: ?ModularUIErrorResponse,\n requestOptions: ?RequestOptions\n) => {\n const defaultErrorInfo = {\n id: \"Error.CannotRequestResource\",\n defaultMessage: `Cannot request resource ${\n requestOptions?.url ?? \"\"\n } with method ${requestOptions?.method ?? HTTP_METHODS.GET}`,\n properties: {},\n param: null,\n };\n\n if (!errorResponse) {\n return defaultErrorInfo;\n }\n\n if (has(errorResponse, \"error\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse.error,\n };\n }\n\n const [key] = Object.keys(errorResponse);\n if (has(errorResponse[key], \"errors\")) {\n return {\n ...defaultErrorInfo,\n // $FlowFixMe[prop-missing] - not sure in what case this could happen\n ...errorResponse[key].errors,\n };\n }\n\n return defaultErrorInfo;\n};\n\n/**\n * FetchException\n */\nexport default class FetchException extends Error {\n request: ?RequestResult | XMLHttpRequest;\n status: number;\n response: ?ModularUIErrorResponse;\n parameters: ?RequestParameters;\n properties: MessageParameters;\n requestOptions: ?RequestOptions;\n id: string;\n\n constructor(\n errorResponse: ?ModularUIErrorResponse,\n failedRequest?: ?RequestResult | XMLHttpRequest,\n requestOptions?: RequestOptions\n ) {\n const errorInfo = getErrorInfo(errorResponse, requestOptions);\n super(errorInfo.id);\n\n this.name = errorInfo.id;\n this.id = errorInfo.id;\n this.request = failedRequest;\n this.requestOptions = requestOptions;\n\n this.status =\n failedRequest && failedRequest.status\n ? failedRequest.status\n : CLIENT_ERROR_CODE;\n\n this.response = errorResponse;\n this.properties = errorInfo.properties ?? {};\n this.parameters = errorInfo.param ?? null;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FetchException);\n }\n }\n}\n"],"file":"FetchException.js"}
1
+ {"version":3,"file":"FetchException.js","names":["CLIENT_ERROR_CODE","getErrorInfo","errorResponse","requestOptions","defaultErrorInfo","id","defaultMessage","url","method","HTTP_METHODS","GET","properties","param","error","key","errors","FetchException","failedRequest","errorInfo","name","request","status","response","parameters","Error","captureStackTrace"],"sources":["../../src/exceptions/FetchException.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport { HTTP_METHODS } from \"../constants/Constants\";\n\nimport type { MessageParameters } from \"../i18n/types\";\nimport type { RequestOptions } from \"../utils/fetch/types\";\n\nexport type ModularUIErrorResponse = {\n error: {\n id: string,\n properties: {\n [propertyName: string]: string | number,\n ...\n },\n },\n};\n\ntype RequestResult = { status: number };\ntype RequestParameters = { [key: string]: any };\n\nconst CLIENT_ERROR_CODE = 400;\n\n/**\n * @private\n */\nconst getErrorInfo = (\n errorResponse: ?ModularUIErrorResponse,\n requestOptions: ?RequestOptions\n) => {\n const defaultErrorInfo = {\n id: \"Error.CannotRequestResource\",\n defaultMessage: `Cannot request resource ${\n requestOptions?.url ?? \"\"\n } with method ${requestOptions?.method ?? HTTP_METHODS.GET}`,\n properties: {},\n param: null,\n };\n\n if (!errorResponse) {\n return defaultErrorInfo;\n }\n\n if (has(errorResponse, \"error\")) {\n return {\n ...defaultErrorInfo,\n ...errorResponse.error,\n };\n }\n\n const [key] = Object.keys(errorResponse);\n if (has(errorResponse[key], \"errors\")) {\n return {\n ...defaultErrorInfo,\n // $FlowFixMe[prop-missing] - not sure in what case this could happen\n ...errorResponse[key].errors,\n };\n }\n\n return defaultErrorInfo;\n};\n\n/**\n * FetchException\n */\nexport default class FetchException extends Error {\n request: ?RequestResult | XMLHttpRequest;\n status: number;\n response: ?ModularUIErrorResponse;\n parameters: ?RequestParameters;\n properties: MessageParameters;\n requestOptions: ?RequestOptions;\n id: string;\n\n constructor(\n errorResponse: ?ModularUIErrorResponse,\n failedRequest?: ?RequestResult | XMLHttpRequest,\n requestOptions?: RequestOptions\n ) {\n const errorInfo = getErrorInfo(errorResponse, requestOptions);\n super(errorInfo.id);\n\n this.name = errorInfo.id;\n this.id = errorInfo.id;\n this.request = failedRequest;\n this.requestOptions = requestOptions;\n\n this.status =\n failedRequest && failedRequest.status\n ? failedRequest.status\n : CLIENT_ERROR_CODE;\n\n this.response = errorResponse;\n this.properties = errorInfo.properties ?? {};\n this.parameters = errorInfo.param ?? null;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, FetchException);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;;;;;;;;;AAkBA,IAAMA,iBAAiB,GAAG,GAA1B;AAEA;AACA;AACA;;AACA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CACnBC,aADmB,EAEnBC,cAFmB,EAGhB;EAAA;;EACH,IAAMC,gBAAgB,GAAG;IACvBC,EAAE,EAAE,6BADmB;IAEvBC,cAAc,2FACZH,cADY,aACZA,cADY,uBACZA,cAAc,CAAEI,GADJ,qEACW,EAD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,KAAK,CAACC,iBAAV,EAA6B;MAC3BD,KAAK,CAACC,iBAAN,8CAA8BT,cAA9B;IACD;;IApBD;EAqBD;;;+CAlCyCQ,K"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/IllegalArgumentException.js"],"names":["IllegalArgumentException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,wB;;;;;AACJ,oCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,0BAAZ;AAF2B;AAG5B;;;+CAJoCC,K;;eAOxBH,wB","sourcesContent":["// @flow\n/**\n * IllegalArgumentException\n */\nclass IllegalArgumentException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalArgumentException\";\n }\n}\n\nexport default IllegalArgumentException;\n"],"file":"IllegalArgumentException.js"}
1
+ {"version":3,"file":"IllegalArgumentException.js","names":["IllegalArgumentException","message","name","Error"],"sources":["../../src/exceptions/IllegalArgumentException.js"],"sourcesContent":["// @flow\n/**\n * IllegalArgumentException\n */\nclass IllegalArgumentException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalArgumentException\";\n }\n}\n\nexport default IllegalArgumentException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,wB;;;;;EACJ,kCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,0BAAZ;IAF2B;EAG5B;;;+CAJoCC,K;;eAOxBH,wB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/IllegalReturnException.js"],"names":["IllegalReturnException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;+CAJkCC,K;;eAOtBH,sB","sourcesContent":["// @flow\n/**\n */\nclass IllegalReturnException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalReturnException\";\n }\n}\n\nexport default IllegalReturnException;\n"],"file":"IllegalReturnException.js"}
1
+ {"version":3,"file":"IllegalReturnException.js","names":["IllegalReturnException","message","name","Error"],"sources":["../../src/exceptions/IllegalReturnException.js"],"sourcesContent":["// @flow\n/**\n */\nclass IllegalReturnException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalReturnException\";\n }\n}\n\nexport default IllegalReturnException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;IACMA,sB;;;;;EACJ,gCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,wBAAZ;IAF2B;EAG5B;;;+CAJkCC,K;;eAOtBH,sB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/IllegalStateException.js"],"names":["IllegalStateException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,qB;;;;;AACJ,iCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,uBAAZ;AAF2B;AAG5B;;;+CAJiCC,K;;eAOrBH,qB","sourcesContent":["// @flow\n/**\n * IllegalStateException\n */\nclass IllegalStateException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalStateException\";\n }\n}\n\nexport default IllegalStateException;\n"],"file":"IllegalStateException.js"}
1
+ {"version":3,"file":"IllegalStateException.js","names":["IllegalStateException","message","name","Error"],"sources":["../../src/exceptions/IllegalStateException.js"],"sourcesContent":["// @flow\n/**\n * IllegalStateException\n */\nclass IllegalStateException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"IllegalStateException\";\n }\n}\n\nexport default IllegalStateException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,qB;;;;;EACJ,+BAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,uBAAZ;IAF2B;EAG5B;;;+CAJiCC,K;;eAOrBH,qB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/JsonParseException.js"],"names":["JsonParseException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,kB;;;;;AACJ,8BAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,oBAAZ;AAF2B;AAG5B;;;+CAJ8BC,K;;eAOlBH,kB","sourcesContent":["// @flow\n/**\n * JsonParseException\n */\nclass JsonParseException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"JsonParseException\";\n }\n}\n\nexport default JsonParseException;\n"],"file":"JsonParseException.js"}
1
+ {"version":3,"file":"JsonParseException.js","names":["JsonParseException","message","name","Error"],"sources":["../../src/exceptions/JsonParseException.js"],"sourcesContent":["// @flow\n/**\n * JsonParseException\n */\nclass JsonParseException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"JsonParseException\";\n }\n}\n\nexport default JsonParseException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,kB;;;;;EACJ,4BAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,oBAAZ;IAF2B;EAG5B;;;+CAJ8BC,K;;eAOlBH,kB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/MissingPropertyException.js"],"names":["MissingPropertyException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,wB;;;;;AACJ,oCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AAEA,UAAKC,IAAL,GAAY,0BAAZ;AAH2B;AAI5B;;;+CALoCC,K;;eAQxBH,wB","sourcesContent":["// @flow\n/**\n * MissingPropertyException\n */\nclass MissingPropertyException extends Error {\n constructor(message: string) {\n super(message);\n\n this.name = \"MissingPropertyException\";\n }\n}\n\nexport default MissingPropertyException;\n"],"file":"MissingPropertyException.js"}
1
+ {"version":3,"file":"MissingPropertyException.js","names":["MissingPropertyException","message","name","Error"],"sources":["../../src/exceptions/MissingPropertyException.js"],"sourcesContent":["// @flow\n/**\n * MissingPropertyException\n */\nclass MissingPropertyException extends Error {\n constructor(message: string) {\n super(message);\n\n this.name = \"MissingPropertyException\";\n }\n}\n\nexport default MissingPropertyException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,wB;;;;;EACJ,kCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IAEA,MAAKC,IAAL,GAAY,0BAAZ;IAH2B;EAI5B;;;+CALoCC,K;;eAQxBH,wB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/NetworkException.js"],"names":["NetworkException","url","method","name","id","status","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,gB;;;;;AAIJ,4BAAYC,GAAZ,EAAyBC,MAAzB,EAAyC;AAAA;;AAAA;;AAAA;AACvC,sIACmED,GADnE,mCACsFC,MADtF;AADuC;AAAA;AAKvC,UAAKC,IAAL,GAAY,kBAAZ;AACA,UAAKC,EAAL,GAAU,kBAAV;AACA,UAAKC,MAAL,GAAc,CAAd;AAPuC;AAQxC;;;+CAZ4BC,K;;eAehBN,gB","sourcesContent":["// @flow\n/**\n * NetworkException\n */\nclass NetworkException extends Error {\n status: number;\n id: string;\n\n constructor(url: string, method: string) {\n super(\n `An unexpected network error occurred, cannot request resource ${url} with method ${method}`\n );\n\n this.name = \"NetworkException\";\n this.id = \"NetworkException\";\n this.status = 0;\n }\n}\n\nexport default NetworkException;\n"],"file":"NetworkException.js"}
1
+ {"version":3,"file":"NetworkException.js","names":["NetworkException","url","method","name","id","status","Error"],"sources":["../../src/exceptions/NetworkException.js"],"sourcesContent":["// @flow\n/**\n * NetworkException\n */\nclass NetworkException extends Error {\n status: number;\n id: string;\n\n constructor(url: string, method: string) {\n super(\n `An unexpected network error occurred, cannot request resource ${url} with method ${method}`\n );\n\n this.name = \"NetworkException\";\n this.id = \"NetworkException\";\n this.status = 0;\n }\n}\n\nexport default NetworkException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,gB;;;;;EAIJ,0BAAYC,GAAZ,EAAyBC,MAAzB,EAAyC;IAAA;;IAAA;;IAAA;IACvC,kIACmED,GADnE,mCACsFC,MADtF;IADuC;IAAA;IAKvC,MAAKC,IAAL,GAAY,kBAAZ;IACA,MAAKC,EAAL,GAAU,kBAAV;IACA,MAAKC,MAAL,GAAc,CAAd;IAPuC;EAQxC;;;+CAZ4BC,K;;eAehBN,gB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/NotAllowedUriException.js"],"names":["NotAllowedUriException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;+CAJkCC,K;;eAOtBH,sB","sourcesContent":["// @flow\n/**\n * NotAllowedUriException\n */\nclass NotAllowedUriException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"NotAllowedUriException\";\n }\n}\n\nexport default NotAllowedUriException;\n"],"file":"NotAllowedUriException.js"}
1
+ {"version":3,"file":"NotAllowedUriException.js","names":["NotAllowedUriException","message","name","Error"],"sources":["../../src/exceptions/NotAllowedUriException.js"],"sourcesContent":["// @flow\n/**\n * NotAllowedUriException\n */\nclass NotAllowedUriException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"NotAllowedUriException\";\n }\n}\n\nexport default NotAllowedUriException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;EACJ,gCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,wBAAZ;IAF2B;EAG5B;;;+CAJkCC,K;;eAOtBH,sB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/NotFoundException.js"],"names":["NotFoundException","url","method","isReload","name","id","status","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,iB;;;;;AAKJ,6BAAYC,GAAZ,EAAyBC,MAAzB,EAAoE;AAAA;;AAAA;;AAAA,QAA3BC,QAA2B,uEAAP,KAAO;AAAA;AAClE,iFAAkBF,GAAlB,mCAAqCC,MAArC;AADkE;AAAA;AAAA;AAGlE,UAAKE,IAAL,GAAY,mBAAZ;AACA,UAAKC,EAAL,GAAU,mBAAV;AACA,UAAKC,MAAL,GAAc,GAAd;AACA,UAAKH,QAAL,GAAgBA,QAAhB;AANkE;AAOnE;;;+CAZ6BI,K;;eAejBP,iB","sourcesContent":["// @flow\n/**\n * NotFoundException\n */\nclass NotFoundException extends Error {\n status: number;\n isReload: boolean;\n id: string;\n\n constructor(url: string, method: string, isReload: boolean = false) {\n super(`Resource ${url} with method ${method} not found`);\n\n this.name = \"NotFoundException\";\n this.id = \"NotFoundException\";\n this.status = 404;\n this.isReload = isReload;\n }\n}\n\nexport default NotFoundException;\n"],"file":"NotFoundException.js"}
1
+ {"version":3,"file":"NotFoundException.js","names":["NotFoundException","url","method","isReload","name","id","status","Error"],"sources":["../../src/exceptions/NotFoundException.js"],"sourcesContent":["// @flow\n/**\n * NotFoundException\n */\nclass NotFoundException extends Error {\n status: number;\n isReload: boolean;\n id: string;\n\n constructor(url: string, method: string, isReload: boolean = false) {\n super(`Resource ${url} with method ${method} not found`);\n\n this.name = \"NotFoundException\";\n this.id = \"NotFoundException\";\n this.status = 404;\n this.isReload = isReload;\n }\n}\n\nexport default NotFoundException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,iB;;;;;EAKJ,2BAAYC,GAAZ,EAAyBC,MAAzB,EAAoE;IAAA;;IAAA;;IAAA,IAA3BC,QAA2B,uEAAP,KAAO;IAAA;IAClE,6EAAkBF,GAAlB,mCAAqCC,MAArC;IADkE;IAAA;IAAA;IAGlE,MAAKE,IAAL,GAAY,mBAAZ;IACA,MAAKC,EAAL,GAAU,mBAAV;IACA,MAAKC,MAAL,GAAc,GAAd;IACA,MAAKH,QAAL,GAAgBA,QAAhB;IANkE;EAOnE;;;+CAZ6BI,K;;eAejBP,iB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/ServerRequestException.js"],"names":["ServerRequestException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;+CAJkCC,K;;eAOtBH,sB","sourcesContent":["// @flow\n/**\n * ServerRequestException\n */\nclass ServerRequestException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ServerRequestException\";\n }\n}\n\nexport default ServerRequestException;\n"],"file":"ServerRequestException.js"}
1
+ {"version":3,"file":"ServerRequestException.js","names":["ServerRequestException","message","name","Error"],"sources":["../../src/exceptions/ServerRequestException.js"],"sourcesContent":["// @flow\n/**\n * ServerRequestException\n */\nclass ServerRequestException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ServerRequestException\";\n }\n}\n\nexport default ServerRequestException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;EACJ,gCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,wBAAZ;IAF2B;EAG5B;;;+CAJkCC,K;;eAOtBH,sB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/ThemePropertyException.js"],"names":["ThemePropertyException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;AACJ,kCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,wBAAZ;AAF2B;AAG5B;;;+CAJkCC,K;;eAOtBH,sB","sourcesContent":["// @flow\n/**\n * ThemePropertyException\n */\nclass ThemePropertyException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ThemePropertyException\";\n }\n}\n\nexport default ThemePropertyException;\n"],"file":"ThemePropertyException.js"}
1
+ {"version":3,"file":"ThemePropertyException.js","names":["ThemePropertyException","message","name","Error"],"sources":["../../src/exceptions/ThemePropertyException.js"],"sourcesContent":["// @flow\n/**\n * ThemePropertyException\n */\nclass ThemePropertyException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ThemePropertyException\";\n }\n}\n\nexport default ThemePropertyException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,sB;;;;;EACJ,gCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,wBAAZ;IAF2B;EAG5B;;;+CAJkCC,K;;eAOtBH,sB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/TimeoutException.js"],"names":["TimeoutException","url","method","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,gB;;;;;AACJ,4BAAYC,GAAZ,EAAyBC,MAAzB,EAAyC;AAAA;;AAAA;;AAAA;AACvC,0GAA2CD,GAA3C,mCAA8DC,MAA9D;AAEA,UAAKC,IAAL,GAAY,kBAAZ;AAHuC;AAIxC;;;+CAL4BC,K;;eAQhBJ,gB","sourcesContent":["// @flow\n/**\n * TimeoutException\n */\nclass TimeoutException extends Error {\n constructor(url: string, method: string) {\n super(`Timeout occurred in connection to ${url} with method ${method}.`);\n\n this.name = \"TimeoutException\";\n }\n}\n\nexport default TimeoutException;\n"],"file":"TimeoutException.js"}
1
+ {"version":3,"file":"TimeoutException.js","names":["TimeoutException","url","method","name","Error"],"sources":["../../src/exceptions/TimeoutException.js"],"sourcesContent":["// @flow\n/**\n * TimeoutException\n */\nclass TimeoutException extends Error {\n constructor(url: string, method: string) {\n super(`Timeout occurred in connection to ${url} with method ${method}.`);\n\n this.name = \"TimeoutException\";\n }\n}\n\nexport default TimeoutException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,gB;;;;;EACJ,0BAAYC,GAAZ,EAAyBC,MAAzB,EAAyC;IAAA;;IAAA;;IAAA;IACvC,sGAA2CD,GAA3C,mCAA8DC,MAA9D;IAEA,MAAKC,IAAL,GAAY,kBAAZ;IAHuC;EAIxC;;;+CAL4BC,K;;eAQhBJ,gB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/UnauthorizedException.js"],"names":["UnauthorizedException","url","method","errorResponse","name","id","status","response","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;IACMA,qB;;;;;AAKJ,iCACEC,GADF,EAEEC,MAFF,EAGEC,aAHF,EAIE;AAAA;;AAAA;;AAAA;AACA,gGAAiCF,GAAjC,mCAAoDC,MAApD;AADA;AAAA;AAAA;AAGA,UAAKE,IAAL,GAAY,uBAAZ;AACA,UAAKC,EAAL,GAAU,uBAAV;AACA,UAAKC,MAAL,GAAc,GAAd;AACA,UAAKC,QAAL,GAAgBJ,aAAhB;AANA;AAOD;;;+CAhBiCK,K;;eAmBrBR,qB","sourcesContent":["// @flow\nimport type { ModularUIErrorResponse } from \"./FetchException\";\n\n/**\n * UnauthorizedException\n */\nclass UnauthorizedException extends Error {\n status: number;\n id: string;\n response: ?ModularUIErrorResponse;\n\n constructor(\n url: string,\n method: string,\n errorResponse: ?ModularUIErrorResponse\n ) {\n super(`Cannot request resource ${url} with method ${method}`);\n\n this.name = \"UnauthorizedException\";\n this.id = \"UnauthorizedException\";\n this.status = 401;\n this.response = errorResponse;\n }\n}\n\nexport default UnauthorizedException;\n"],"file":"UnauthorizedException.js"}
1
+ {"version":3,"file":"UnauthorizedException.js","names":["UnauthorizedException","url","method","errorResponse","name","id","status","response","Error"],"sources":["../../src/exceptions/UnauthorizedException.js"],"sourcesContent":["// @flow\nimport type { ModularUIErrorResponse } from \"./FetchException\";\n\n/**\n * UnauthorizedException\n */\nclass UnauthorizedException extends Error {\n status: number;\n id: string;\n response: ?ModularUIErrorResponse;\n\n constructor(\n url: string,\n method: string,\n errorResponse: ?ModularUIErrorResponse\n ) {\n super(`Cannot request resource ${url} with method ${method}`);\n\n this.name = \"UnauthorizedException\";\n this.id = \"UnauthorizedException\";\n this.status = 401;\n this.response = errorResponse;\n }\n}\n\nexport default UnauthorizedException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AACA;AACA;IACMA,qB;;;;;EAKJ,+BACEC,GADF,EAEEC,MAFF,EAGEC,aAHF,EAIE;IAAA;;IAAA;;IAAA;IACA,4FAAiCF,GAAjC,mCAAoDC,MAApD;IADA;IAAA;IAAA;IAGA,MAAKE,IAAL,GAAY,uBAAZ;IACA,MAAKC,EAAL,GAAU,uBAAV;IACA,MAAKC,MAAL,GAAc,GAAd;IACA,MAAKC,QAAL,GAAgBJ,aAAhB;IANA;EAOD;;;+CAhBiCK,K;;eAmBrBR,qB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/UnsupportedOperationException.js"],"names":["UnsupportedOperationException","message","name","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,6B;;;;;AACJ,yCAAYC,OAAZ,EAA6B;AAAA;;AAAA;AAC3B,8BAAMA,OAAN;AACA,UAAKC,IAAL,GAAY,+BAAZ;AAF2B;AAG5B;;;+CAJyCC,K;;eAO7BH,6B","sourcesContent":["// @flow\n/**\n * UnsupportedOperationException\n */\nclass UnsupportedOperationException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UnsupportedOperationException\";\n }\n}\n\nexport default UnsupportedOperationException;\n"],"file":"UnsupportedOperationException.js"}
1
+ {"version":3,"file":"UnsupportedOperationException.js","names":["UnsupportedOperationException","message","name","Error"],"sources":["../../src/exceptions/UnsupportedOperationException.js"],"sourcesContent":["// @flow\n/**\n * UnsupportedOperationException\n */\nclass UnsupportedOperationException extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UnsupportedOperationException\";\n }\n}\n\nexport default UnsupportedOperationException;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;IACMA,6B;;;;;EACJ,uCAAYC,OAAZ,EAA6B;IAAA;;IAAA;IAC3B,0BAAMA,OAAN;IACA,MAAKC,IAAL,GAAY,+BAAZ;IAF2B;EAG5B;;;+CAJyCC,K;;eAO7BH,6B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/exceptions/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["// @flow\nexport { default as FetchException } from \"./FetchException\";\nexport { default as MissingPropertyException } from \"./MissingPropertyException\";\nexport { default as NotAllowedUriException } from \"./NotAllowedUriException\";\nexport { default as IllegalArgumentException } from \"./IllegalArgumentException\";\nexport { default as IllegalReturnException } from \"./IllegalReturnException\";\nexport { default as IllegalStateException } from \"./IllegalStateException\";\nexport { default as JsonParseException } from \"./JsonParseException\";\nexport { default as ConfigurationException } from \"./ConfigurationException\";\nexport { default as UnauthorizedException } from \"./UnauthorizedException\";\nexport { default as UnsupportedOperationException } from \"./UnsupportedOperationException\";\nexport { default as TimeoutException } from \"./TimeoutException\";\nexport { default as NotFoundException } from \"./NotFoundException\";\nexport { default as NetworkException } from \"./NetworkException\";\nexport { default as ServerRequestException } from \"./ServerRequestException\";\nexport { default as ThemePropertyException } from \"./ThemePropertyException\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/exceptions/index.js"],"sourcesContent":["// @flow\nexport { default as FetchException } from \"./FetchException\";\nexport { default as MissingPropertyException } from \"./MissingPropertyException\";\nexport { default as NotAllowedUriException } from \"./NotAllowedUriException\";\nexport { default as IllegalArgumentException } from \"./IllegalArgumentException\";\nexport { default as IllegalReturnException } from \"./IllegalReturnException\";\nexport { default as IllegalStateException } from \"./IllegalStateException\";\nexport { default as JsonParseException } from \"./JsonParseException\";\nexport { default as ConfigurationException } from \"./ConfigurationException\";\nexport { default as UnauthorizedException } from \"./UnauthorizedException\";\nexport { default as UnsupportedOperationException } from \"./UnsupportedOperationException\";\nexport { default as TimeoutException } from \"./TimeoutException\";\nexport { default as NotFoundException } from \"./NotFoundException\";\nexport { default as NetworkException } from \"./NetworkException\";\nexport { default as ServerRequestException } from \"./ServerRequestException\";\nexport { default as ThemePropertyException } from \"./ThemePropertyException\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/index.js"],"names":[],"mappings":";;;;;;;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// @flow\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useAllFormsOnModel\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/hooks/index.js"],"sourcesContent":["// @flow\nexport * from \"./useAuthentication\";\nexport * from \"./useContent\";\nexport * from \"./useForm\";\nexport * from \"./useI18n\";\nexport * from \"./useModal\";\nexport * from \"./useModelCatalog\";\nexport * from \"./useModels\";\nexport * from \"./useModularUI\";\nexport * from \"./useModularUIBasic\";\nexport * from \"./useModularUIModel\";\nexport * from \"./useModularUIRequest\";\nexport * from \"./useNotification\";\nexport * from \"./usePreference\";\nexport * from \"./useProgressIndicator\";\nexport * from \"./useRouter\";\nexport * from \"./useAllFormsOnModel\";\n"],"mappings":";;;;;;;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useAllFormsOnModel.js"],"names":["useRetrieveFormsOnModel","model","modularui","forms","setForms","requestCount","setRequestCount","responseCount","setResponseCount","requests","getActions","action","href","selfhref","addParameter","method","HTTP_METHODS","POST","fetch","then","form","FormModel","tokens","name","length","all","responses","actionForms","Object","actionCollection","createActions","getActionsByType","isDisabled","allActions","ListModel","listItemCollection","forEach","listItem","updateActions","push","actions","unique"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AAMA;AACA;AACA;AACA;AACA;AACO,IAAMA,uBAAuB,GAAG,SAA1BA,uBAA0B,CACrCC,KADqC,EAEU;AAC/C,MAAMC,SAAS,GAAG,+CAAlB;;AACA,kBAA0B,qBAAS,IAAT,CAA1B;AAAA;AAAA,MAAOC,KAAP;AAAA,MAAcC,QAAd;;AACA,mBAAwC,qBAAS,CAAT,CAAxC;AAAA;AAAA,MAAOC,YAAP;AAAA,MAAqBC,eAArB;;AACA,mBAA0C,qBAAS,CAAT,CAA1C;AAAA;AAAA,MAAOC,aAAP;AAAA,MAAsBC,gBAAtB;;AAEA,wBAAU,YAA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WAAY,CAACA,MAAM,CAACqB,UAApB;AAAA,GAFY,CAAtB;AAIA,MAAMC,UAAU,oCAAOH,aAAP,CAAhB;;AAEA,MAAI7B,KAAK,YAAYiC,kBAArB,EAAgC;AAC9BjC,IAAAA,KAAK,CAACkC,kBAAN,CAAyBC,OAAzB,CAAiC,UAACC,QAAD,EAAc;AAAA;;AAC7C,UAAMC,aAAa,GAAG,iCAAAD,QAAQ,CAACR,gBAAT,CACnBE,gBADmB,CACF,QADE,mBAEZ,UAACpB,MAAD;AAAA,eAAY,CAACA,MAAM,CAACqB,UAApB;AAAA,OAFY,CAAtB;AAIAC,MAAAA,UAAU,CAACM,IAAX,OAAAN,UAAU,mCAASK,aAAT,EAAV;AACD,KAND;AAOD;;AAED,MAAME,OAAO,GAAG,EAAhB;AACA,MAAMC,MAAM,GAAG,EAAf;AACAR,EAAAA,UAAU,CAACG,OAAX,CAAmB,UAACzB,MAAD,EAAY;AAC7B,QAAI,CAAC,uBAAA8B,MAAM,MAAN,CAAAA,MAAM,EAAU9B,MAAM,CAACY,IAAjB,CAAX,EAAmC;AACjCkB,MAAAA,MAAM,CAACF,IAAP,CAAY5B,MAAM,CAACY,IAAnB;AACAiB,MAAAA,OAAO,CAACD,IAAR,CAAa5B,MAAb;AACD;AACF,GALD;AAOA,SAAO6B,OAAP;AACD,CAjCD","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"],"file":"useAllFormsOnModel.js"}
1
+ {"version":3,"file":"useAllFormsOnModel.js","names":["useRetrieveFormsOnModel","model","modularui","forms","setForms","requestCount","setRequestCount","responseCount","setResponseCount","requests","getActions","action","href","selfhref","addParameter","method","HTTP_METHODS","POST","fetch","then","form","FormModel","tokens","name","length","all","responses","actionForms","Object","actionCollection","createActions","getActionsByType","isDisabled","allActions","ListModel","listItemCollection","forEach","listItem","updateActions","push","actions","unique"],"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;;AAEA;;AAEA;;AAEA;;AACA;;AAMA;AACA;AACA;AACA;AACA;AACO,IAA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AtB,EAAoC;IAClC,OAAOF,KAAP;EACD;;EAED,OAAO,IAAP;AACD,CArCM;;;;AAuCP,IAAMO,UAAU,GAAG,SAAbA,UAAa,CACjBT,KADiB,EAEM;EAAA;;EACvB,IAAI,CAACA,KAAK,CAAC4B,gBAAX,EAA6B;IAC3B,OAAO,EAAP;EACD;;EAED,IAAMC,aAAa,GAAG,iCAAA7B,KAAK,CAAC4B,gBAAN,CACnBE,gBADmB,CACF,QADE,mBAEZ,UAACpB,MAAD;IAAA,OAAY,CAACA,MAAM,CAACqB,UAApB;EAAA,CAFY,CAAtB;EAIA,IAAMC,UAAU,oCAAOH,aAAP,CAAhB;;EAEA,IAAI7B,KAAK,YAAYiC,kBAArB,EAAgC;IAC9BjC,KAAK,CAACkC,kBAAN,CAAyBC,OAAzB,CAAiC,UAACC,QAAD,EAAc;MAAA;;MAC7C,IAAMC,aAAa,GAAG,iCAAAD,QAAQ,CAACR,gBAAT,CACnBE,gBADmB,CACF,QADE,mBAEZ,UAACpB,MAAD;QAAA,OAAY,CAACA,MAAM,CAACqB,UAApB;MAAA,CAFY,CAAtB;MAIAC,UAAU,CAACM,IAAX,OAAAN,UAAU,mCAASK,aAAT,EAAV;IACD,CAND;EAOD;;EAED,IAAME,OAAO,GAAG,EAAhB;EACA,IAAMC,MAAM,GAAG,EAAf;EACAR,UAAU,CAACG,OAAX,CAAmB,UAACzB,MAAD,EAAY;IAC7B,IAAI,CAAC,uBAAA8B,MAAM,MAAN,CAAAA,MAAM,EAAU9B,MAAM,CAACY,IAAjB,CAAX,EAAmC;MACjCkB,MAAM,CAACF,IAAP,CAAY5B,MAAM,CAACY,IAAnB;MACAiB,OAAO,CAACD,IAAR,CAAa5B,MAAb;IACD;EACF,CALD;EAOA,OAAO6B,OAAP;AACD,CAjCD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useAuthentication.js"],"names":["getIsAuthenticated","isAuthenticated","application","userServicesModel","userServices","UserServicesModel","isLoggedIn","useLogin","dispatch","getApplication","auth","state","errorMessage","error","resetErrors","login","username","password","useLogout","cancel","setCancel","setIsAuthenticated","logout","then"],"mappings":";;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AAcA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,eAAD,EAAkBC,WAAlB,EAAkC;AAC3D,MAAI,CAACA,WAAL,EAAkB;AAChB,WAAO,KAAP;AACD;;AAED,MAAMC,iBAAiB,GAAGD,WAAW,CAACE,YAAtC;;AACA,MAAID,iBAAiB,YAAYE,0BAAjC,EAAoD;AAClD,WAAOJ,eAAe,IAAIE,iBAAiB,CAACG,UAA5C;AACD;;AAED,SAAO,KAAP;AACD,CAXD;AAaA;AACA;;;AACO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,GAAiB;AACvC,MAAMC,QAAQ,GAAG,8BAAjB;AAEA,MAAMN,WAAW,GAAG,6BAAYO,yBAAZ,CAApB;AACA,MAAMC,IAAI,GAAG,6BAAY,UAACC,KAAD;AAAA,WAAWA,KAAK,CAACD,IAAjB;AAAA,GAAZ,CAAb;AAEA,SAAO;AACLT,IAAAA,eAAe,EAAED,kBAAkB,CAACU,IAAI,CAACT,eAAN,EAAuBC,WAAvB,CAD9B;AAELU,IAAAA,YAAY,EAAEF,IAAI,CAACG,KAFd;AAGLC,IAAAA,WAAW,EAAE;AAAA,aAAMN,QAAQ,CAAC,+BAAD,CAAd;AAAA,KAHR;AAILO,IAAAA,KAAK,EAAE,eAACC,QAAD,EAAmBC,QAAnB;AAAA,aACLT,QAAQ,CAAC,oBAAMQ,QAAN,EAAgBC,QAAhB,CAAD,CADH;AAAA;AAJF,GAAP;AAOD,CAbM;AAeP;AACA;;;;;AACO,IAAMC,SAAS,GAAG,SAAZA,SAAY,GAAkB;AACzC,MAAMV,QAAQ,GAAG,8BAAjB;AACA,MAAMN,WAAW,GAAG,6BAAYO,yBAAZ,CAApB;AACA,MAAMC,IAAI,GAAG,6BAAY,UAACC,KAAD;AAAA;;AAAA,WAAW,gBAAAA,KAAK,CAACD,IAAN,4DAAYT,eAAZ,KAA+B,KAA1C;AAAA,GAAZ,CAAb;;AAEA,kBAA4B,qBAAS,KAAT,CAA5B;AAAA;AAAA,MAAOkB,MAAP;AAAA,MAAeC,SAAf;;AACA,mBAA8C,qBAAS;AAAA,WACrDpB,kBAAkB,CAACU,IAAD,EAAOR,WAAP,CADmC;AAAA,GAAT,CAA9C;AAAA;AAAA,MAAOD,eAAP;AAAA,MAAwBoB,kBAAxB,iBANyC,CAUzC;AACA;;;AACA,wBAAU,YAAM;AACd,WAAO,YAAM;AACXD,MAAAA,SAAS,CAAC,IAAD,CAAT;AACD,KAFD;AAGD,GAJD,EAIG,EAJH;AAMA,SAAO;AACLnB,IAAAA,eAAe,EAAfA,eADK;AAELqB,IAAAA,MAAM,EAAE;AAAA,aACNd,QAAQ,CAAC,sBAAD,CAAR,CAAmBe,IAAnB,CAAwB,YAAM;AAC5B,YAAI,CAACJ,MAAL,EAAa;AACXE,UAAAA,kBAAkB,CAAC,KAAD,CAAlB;AACD;AACF,OAJD,CADM;AAAA;AAFH,GAAP;AASD,CA3BM","sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { getApplication } from \"../redux/_modularui/selectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\nimport UserServicesModel from \"../models/user/UserServicesModel\";\nimport { useState, useEffect } from \"react\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\ntype LoginHook = {\n isAuthenticated: boolean,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n logout: () => void,\n};\n\nconst getIsAuthenticated = (isAuthenticated, application) => {\n if (!application) {\n return false;\n }\n\n const userServicesModel = application.userServices;\n if (userServicesModel instanceof UserServicesModel) {\n return isAuthenticated && userServicesModel.isLoggedIn;\n }\n\n return false;\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n return {\n isAuthenticated: getIsAuthenticated(auth.isAuthenticated, application),\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth?.isAuthenticated || false);\n\n const [cancel, setCancel] = useState(false);\n const [isAuthenticated, setIsAuthenticated] = useState(() =>\n getIsAuthenticated(auth, application)\n );\n\n // set cancel to true when the component this hook is used on, has been unmounted\n // prevents state changes after unmount\n useEffect(() => {\n return () => {\n setCancel(true);\n };\n }, []);\n\n return {\n isAuthenticated,\n logout: () =>\n dispatch(logout()).then(() => {\n if (!cancel) {\n setIsAuthenticated(false);\n }\n }),\n };\n};\n"],"file":"useAuthentication.js"}
1
+ {"version":3,"file":"useAuthentication.js","names":["getIsAuthenticated","isAuthenticated","application","userServicesModel","userServices","UserServicesModel","isLoggedIn","useLogin","dispatch","getApplication","auth","state","errorMessage","error","resetErrors","login","username","password","useLogout","cancel","setCancel","setIsAuthenticated","logout","then"],"sources":["../../src/hooks/useAuthentication.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { getApplication } from \"../redux/_modularui/selectors\";\nimport { login, logout, resetAuthErrors } from \"../redux/actions\";\nimport UserServicesModel from \"../models/user/UserServicesModel\";\nimport { useState, useEffect } from \"react\";\n\nimport type { ResetAuthErrorsAction } from \"../redux/types\";\ntype LoginHook = {\n isAuthenticated: boolean,\n errorMessage: ?string,\n resetErrors: () => ResetAuthErrorsAction,\n login: (username: string, password: string) => void,\n};\ntype LogoutHook = {\n isAuthenticated: boolean,\n logout: () => void,\n};\n\nconst getIsAuthenticated = (isAuthenticated, application) => {\n if (!application) {\n return false;\n }\n\n const userServicesModel = application.userServices;\n if (userServicesModel instanceof UserServicesModel) {\n return isAuthenticated && userServicesModel.isLoggedIn;\n }\n\n return false;\n};\n\n/**\n */\nexport const useLogin = (): LoginHook => {\n const dispatch = useDispatch();\n\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth);\n\n return {\n isAuthenticated: getIsAuthenticated(auth.isAuthenticated, application),\n errorMessage: auth.error,\n resetErrors: () => dispatch(resetAuthErrors()),\n login: (username: string, password: string) =>\n dispatch(login(username, password)),\n };\n};\n\n/**\n */\nexport const useLogout = (): LogoutHook => {\n const dispatch = useDispatch();\n const application = useSelector(getApplication);\n const auth = useSelector((state) => state.auth?.isAuthenticated || false);\n\n const [cancel, setCancel] = useState(false);\n const [isAuthenticated, setIsAuthenticated] = useState(() =>\n getIsAuthenticated(auth, application)\n );\n\n // set cancel to true when the component this hook is used on, has been unmounted\n // prevents state changes after unmount\n useEffect(() => {\n return () => {\n setCancel(true);\n };\n }, []);\n\n return {\n isAuthenticated,\n logout: () =>\n dispatch(logout()).then(() => {\n if (!cancel) {\n setIsAuthenticated(false);\n }\n }),\n };\n};\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AAcA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,eAAD,EAAkBC,WAAlB,EAAkC;EAC3D,IAAI,CAACA,WAAL,EAAkB;IAChB,OAAO,KAAP;EACD;;EAED,IAAMC,iBAAiB,GAAGD,WAAW,CAACE,YAAtC;;EACA,IAAID,iBAAiB,YAAYE,0BAAjC,EAAoD;IAClD,OAAOJ,eAAe,IAAIE,iBAAiB,CAACG,UAA5C;EACD;;EAED,OAAO,KAAP;AACD,CAXD;AAaA;AACA;;;AACO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,GAAiB;EACvC,IAAMC,QAAQ,GAAG,8BAAjB;EAEA,IAAMN,WAAW,GAAG,6BAAYO,yBAAZ,CAApB;EACA,IAAMC,IAAI,GAAG,6BAAY,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACD,I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
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useContent.js"],"names":["useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","state","i18n","locale","start","finish","hrefs","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","requests","JSON","parse","modularuiRequest","ModularUIRequest","fetchContent","all","then","responseContent"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAIA;AACA;AACA;AACO,IAAMA,8BAA8B,GAAG,SAAjCA,8BAAiC,CAC5CC,gBAD4C,EAE5CC,mBAF4C,EAGpB;AAAA;;AACxB,kBAA8B,qBAAS,EAAT,CAA9B;AAAA;AAAA,MAAOC,OAAP;AAAA,MAAgBC,UAAhB;;AACA,MAAMC,UAAU,GAAG,6BAAY,UAACC,KAAD;AAAA;;AAAA,iCAAWA,KAAK,CAACC,IAAN,CAAWC,MAAtB,mEAAgC,IAAhC;AAAA,GAAZ,CAAnB;;AAEA,8BAA0B,kDAA1B;AAAA,MAAQC,KAAR,yBAAQA,KAAR;AAAA,MAAeC,MAAf,yBAAeA,MAAf;;AAEA,MAAMC,KAAK,GAAG,gFAAAV,gBAAgB,MAAhB,CAAAA,gBAAgB,EACvB,UAACW,eAAD;AAAA,WAAqBA,eAAe,CAACC,IAAhB,CAAqBC,QAArB,CAA8BC,IAAnD;AAAA,GADuB,CAAhB,kBAEJ,UAACA,IAAD,EAAOC,KAAP,EAAcC,IAAd;AAAA,WAAuBA,IAAI,CAACC,OAAL,CAAaH,IAAb,MAAuBC,KAA9C;AAAA,GAFI,kBAGP,UAACD,IAAD;AAAA,WAAUA,IAAI,CAACI,QAAL,EAAV;AAAA,GAHO,CAAd;AAKA,MAAMC,QAAQ,GAAG,wBAAeT,KAAf,CAAjB;AACA,wBAAU,YAAM;AAAA;;AACd,QAAMU,QAAQ,GAAG,8BAAAC,IAAI,CAACC,KAAL,CAAWH,QAAX,mBAAyB,UAACL,IAAD,EAAU;AAClD,UAAMS,gBAAgB,GAAG,IAAIC,yBAAJ,CAAqBV,IAArB,CAAzB;AACAS,MAAAA,gBAAgB,CAAChB,MAAjB,GAA0BH,UAA1B;AACA,aAAOmB,gBAAgB,CAACE,YAAjB,CAA8BxB,mBAA9B,CAAP;AACD,KAJgB,CAAjB;AAMAO,IAAAA,KAAK;;AACL,qBAAQkB,GAAR,CAAYN,QAAZ,EAAsBO,IAAtB,CAA2B,UAACC,eAAD,EAAqB;AAC9CzB,MAAAA,UAAU,CAACyB,eAAD,CAAV;AACAnB,MAAAA,MAAM;AACP,KAHD,EARc,CAad;AACA;;AACD,GAfD,EAeG,CAACU,QAAD,EAAWf,UAAX,EAAuBH,mBAAvB,CAfH;AAiBA,SAAOC,OAAP;AACD,CAjCM","sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\nimport { useSelector } from \"react-redux\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\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 = useSelector((state) => state.i18n.locale ?? \"en\");\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"],"file":"useContent.js"}
1
+ {"version":3,"file":"useContent.js","names":["useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","state","i18n","locale","start","finish","hrefs","sourceReference","link","selfhref","href","index","self","indexOf","toString","allHrefs","requests","JSON","parse","modularuiRequest","ModularUIRequest","fetchContent","all","then","responseContent"],"sources":["../../src/hooks/useContent.js"],"sourcesContent":["// @flow\nimport { useState, useEffect } from \"react\";\nimport { useSelector } from \"react-redux\";\n\nimport SourceReferenceCollection from \"../models/concepts/SourceReferenceCollection\";\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\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 = useSelector((state) => state.i18n.locale ?? \"en\");\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;;AACA;;AAEA;;AACA;;AAEA;;AAIA;AACA;AACA;AACO,IAAMA,8BAA8B,GAAG,SAAjCA,8BAAiC,CAC5CC,gBAD4C,EAE5CC,mBAF4C,EAGpB;E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AAX,EAAuBH,mBAAvB,CAfH;EAiBA,OAAOC,OAAP;AACD,CAjCM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useDeepCompareEffect.js"],"names":["useDeepCompareMemoize","value","ref","React","useRef","signalRef","current","useDeepCompareEffect","callback","dependencies","useEffect"],"mappings":";;;;;;;;;;;;;;AACA;;AACA;;;;;;AAKA;AACA;AACA;AACA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA2B;AACvD,MAAMC,GAAG,GAAGC,KAAK,CAACC,MAAN,CAAoC,IAApC,CAAZ,CADuD,CACA;;AACvD,MAAMC,SAAS,GAAGF,KAAK,CAACC,MAAN,CAAqB,CAArB,CAAlB;;AAEA,MAAI,CAAC,kBAAUH,KAAV,EAAiBC,GAAG,CAACI,OAArB,CAAL,EAAoC;AAClCJ,IAAAA,GAAG,CAACI,OAAJ,GAAcL,KAAd;AACAI,IAAAA,SAAS,CAACC,OAAV,IAAqB,CAArB;AACD;;AAED,SAAO,CAACD,SAAS,CAACC,OAAX,CAAP;AACD,CAVD;AAYA;AACA;;;AACO,SAASC,oBAAT,CACLC,QADK,EAELC,YAFK,EAGC;AACN;AACA,SAAON,KAAK,CAACO,SAAN,CAAgBF,QAAhB,EAA0BR,qBAAqB,CAACS,YAAD,CAA/C,CAAP;AACD;;eAEcF,oB","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"],"file":"useDeepCompareEffect.js"}
1
+ {"version":3,"file":"useDeepCompareEffect.js","names":["useDeepCompareMemoize","value","ref","React","useRef","signalRef","current","useDeepCompareEffect","callback","dependencies","useEffect"],"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;;AACA;;;;;;AAKA;AACA;AACA;AACA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,KAAD,EAA2B;EACvD,IAAMC,GAAG,GAAGC,KAAK,CAACC,MAAN,CAAoC,IAApC,CAAZ,CADuD,CACA;;EACvD,IAAMC,SAAS,GAAGF,KAAK,CAACC,MAAN,CAAqB,CAArB,CAAlB;;EAEA,IAAI,CAAC,kBAAUH,KAAV,EAAiBC,GAAG,CAACI,OAArB,CAAL,EAAoC;IAClCJ,GAAG,CAACI,OAAJ,GAAcL,KAAd;IACAI,SAAS,CAACC,OAAV,IAAqB,CAArB;EACD;;EAED,OAAO,CAACD,SAAS,CAACC,OAAX,CAAP;AACD,CAVD;AAYA;AACA;;;AACO,SAASC,oBAAT,CACLC,QADK,EAELC,YAFK,EAGC;EACN;EACA,OAAON,KAAK,CAACO,SAAN,CAAgBF,QAAhB,EAA0BR,qBAAqB,CAACS,YAAD,CAA/C,CAAP;AACD;;eAEcF,oB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useForm.js"],"names":["useForm","href","formHref","Href","addParameter","form","method","HTTP_METHODS","POST","targetModel","FormModel","removeOnUnmount","model","useFormNavigation","dispatch","previous","cancel","submit","connectKey","selfhref","data","formdata","updateModel","remove","showFormNotificationAction","showFormNotification","useAttributeUpdate","object","attribute","value","options","useAttributeSet","save"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AAEA;;AAUA;;AA6BA;AACA;AACA;AACO,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,IAAD,EAAqC;AAC1D,MAAMC,QAAQ,GAAG,IAAIC,aAAJ,CAASF,IAAT,CAAjB;;AAEA,MAAI,CAAC,2BAAW,oBAAX,CAAL,EAAuC;AACrCC,IAAAA,QAAQ,CAACE,YAAT,CAAsB,QAAtB,EAAgC,OAAhC;AACD;;AAED,MAAMC,IAAI,GAAG,gCAAa,MAAb,EAAqBH,QAArB,EAA+B;AAC1CI,IAAAA,MAAM,EAAEC,wBAAaC,IADqB;AAE1CC,IAAAA,WAAW,EAAEC,kBAF6B;AAG1CC,IAAAA,eAAe,EAAE;AAHyB,GAA/B,CAAb;;AAMA,MAAIN,IAAJ,aAAIA,IAAJ,eAAIA,IAAI,CAAEO,KAAV,EAAiB;AACf,WAAOP,IAAI,CAACO,KAAZ;AACD;AACF,CAhBM;AAkBP;AACA;AACA;;;;;AACO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,GAA0B;AACzD,MAAMC,QAAQ,GAAG,8BAAjB;;AAEA,MAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACV,IAAD;AAAA,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KAA7C,EAAoDC,OAApD,CAAD,CAJN;AAAA,GAAP;AAKD,CAXM;AAaP;AACA;AACA;;;;;AACO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAC1B,IAAD,EAAuC;AACpE,MAAMS,QAAQ,GAAG,8BAAjB;AAEA,SAAO;AACLkB,IAAAA,IAAI,EAAE;AAAA,aAAMlB,QAAQ,CAAC,wCAA0BT,IAA1B,CAAD,CAAd;AAAA,KADD;AAELW,IAAAA,MAAM,EAAE,gBAACW,MAAD;AAAA,aACNb,QAAQ,CAAC,2CAA6BT,IAA7B,EAAmCsB,MAAnC,CAAD,CADF;AAAA,KAFH;AAILJ,IAAAA,MAAM,EAAE,gBAACI,MAAD;AAAA,aACNb,QAAQ,CAAC,2CAA6BT,IAA7B,EAAmCsB,MAAnC,CAAD,CADF;AAAA;AAJH,GAAP;AAOD,CAVM","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 UpdateModelAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateModelAction,\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: () => UpdateModelAction,\n cancel: (object: FormObjectModel) => UpdateModelAction,\n remove: (object: FormObjectModel) => UpdateModelAction,\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): ?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 });\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"],"file":"useForm.js"}
1
+ {"version":3,"file":"useForm.js","names":["useForm","href","formHref","Href","addParameter","form","method","HTTP_METHODS","POST","targetModel","FormModel","removeOnUnmount","model","useFormNavigation","dispatch","previous","cancel","submit","connectKey","selfhref","data","formdata","updateModel","remove","showFormNotificationAction","showFormNotification","useAttributeUpdate","object","attribute","value","options","useAttributeSet","save"],"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 UpdateModelAction,\n} from \"../redux/_modularui\";\n\ntype FormNavigationHook = {\n previous: (form: FormModel) => UpdateModelAction,\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: () => UpdateModelAction,\n cancel: (object: FormObjectModel) => UpdateModelAction,\n remove: (object: FormObjectModel) => UpdateModelAction,\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): ?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 });\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;;AAEA;;AAEA;;AAEA;;AACA;;AAEA;;AAUA;;AA6BA;AACA;AACA;AACO,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAACC,IAAD,EAAqC;EAC1D,IAAMC,QAAQ,GAAG,IAAIC,aAAJ,CAASF,IAAT,CAAjB;;EAEA,IAAI,CAAC,2BAAW,oBAAX,CAAL,EAAuC;IACrCC,QAAQ,CAACE,YAAT,CAAsB,QAAtB,EAAgC,OAAhC;EACD;;EAED,IAAMC,IAAI,GAAG,gCAAa,MAAb,EAAqBH,QAArB,EAA+B;IAC1CI,MAAM,EAAEC,wBAAaC,IADqB;IAE1CC,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AAOD,CA9BM;AAgCP;AACA;AACA;;;;;AACO,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCrB,IADgC,EAEhCsB,MAFgC,EAGR;EACxB,IAAMb,QAAQ,GAAG,8BAAjB;EAEA,OAAO,UACLc,SADK,EAELC,KAFK,EAGLC,OAHK;IAAA,OAIFhB,QAAQ,CAAC,kCAAoBT,IAApB,EAA0BsB,MAA1B,EAAkCC,SAAlC,EAA6CC,KAA7C,EAAoDC,OAApD,CAAD,CAJN;EAAA,CAAP;AAKD,CAXM;AAaP;AACA;AACA;;;;;AACO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAAC1B,IAAD,EAAuC;EACpE,IAAMS,QAAQ,GAAG,8BAAjB;EAEA,OAAO;IACLkB,IAAI,EAAE;MAAA,OAAMlB,QAAQ,CAAC,wCAA0BT,IAA1B,CAAD,CAAd;IAAA,CADD;IAELW,MAAM,EAAE,gBAACW,MAAD;MAAA,OACNb,QAAQ,CAAC,2CAA6BT,IAA7B,EAAmCsB,MAAnC,CAAD,CADF;IAAA,CAFH;IAILJ,MAAM,EAAE,gBAACI,MAAD;MAAA,OACNb,QAAQ,CAAC,2CAA6BT,IAA7B,EAAmCsB,MAAnC,CAAD,CADF;IAAA;EAJH,CAAP;AAOD,CAVM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useI18n.js"],"names":["getLocaleCode","state","i18n","locale","getLocales","locales","getMessage","localeCode","id","defaultMessage","placeholders","getLocale","args","useMessage","useTranslate"],"mappings":";;;;;;;;;;;AACA;;AACA;;AACA;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,IAAN,CAAWC,MAAX,IAAqB,IAAhC;AAAA,CAAtB;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,IAAN,CAAWG,OAAtB;AAAA,CAAnB;;AAEA,IAAMC,UAAU,GAAG,8BACjB,CAACF,UAAD,EAAaJ,aAAb,CADiB,EAEjB,UAACK,OAAD,EAAUE,UAAV;AAAA,SACE,sBACE,UACEC,EADF,EAEEC,cAFF,EAGEC,YAHF;AAAA,WAKEL,OAAO,CACJM,SADH,CACaJ,UADb,EAEGD,UAFH,CAEcE,EAFd,EAEkBC,cAFlB,EAEkCC,YAFlC,CALF;AAAA,GADF,EASE;AAAA,sCAAIE,IAAJ;AAAIA,MAAAA,IAAJ;AAAA;;AAAA,WAAa,wBAAeA,IAAf,CAAb;AAAA,GATF,CADF;AAAA,CAFiB,CAAnB;AAgBA;AACA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CACjBL,EADiB,EAEjBC,cAFiB,EAGjBC,YAHiB;AAAA,SAIT,6BAAYJ,UAAZ,EAAwBE,EAAxB,EAA4BC,cAA5B,EAA4CC,YAA5C,CAJS;AAAA,CAAnB;AAMA;AACA;;;;;AACA,IAAMI,YAAY,GAAG,SAAfA,YAAe;AAAA,SAAyB,6BAAYR,UAAZ,CAAzB;AAAA,CAArB","sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { createSelector } from \"reselect\";\nimport memoize from \"lodash/memoize\";\n\nconst getLocaleCode = (state) => state.i18n.locale || \"en\";\nconst getLocales = (state) => state.i18n.locales;\n\nconst getMessage = createSelector(\n [getLocales, getLocaleCode],\n (locales, localeCode) =>\n memoize(\n (\n id?: string | null,\n defaultMessage?: string | null,\n placeholders?: Object\n ) =>\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 | null,\n defaultMessage?: string | null,\n placeholders?: Object | null\n): any => useSelector(getMessage)(id, defaultMessage, placeholders);\n\n/**\n */\nconst useTranslate = (): ((...any) => any) => useSelector(getMessage);\n\nexport { useTranslate, useMessage };\n"],"file":"useI18n.js"}
1
+ {"version":3,"file":"useI18n.js","names":["getLocaleCode","state","i18n","locale","getLocales","locales","getMessage","localeCode","id","defaultMessage","placeholders","getLocale","args","useMessage","useTranslate"],"sources":["../../src/hooks/useI18n.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { createSelector } from \"reselect\";\nimport memoize from \"lodash/memoize\";\n\nconst getLocaleCode = (state) => state.i18n.locale || \"en\";\nconst getLocales = (state) => state.i18n.locales;\n\nconst getMessage = createSelector(\n [getLocales, getLocaleCode],\n (locales, localeCode) =>\n memoize(\n (\n id?: string | null,\n defaultMessage?: string | null,\n placeholders?: Object\n ) =>\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 | null,\n defaultMessage?: string | null,\n placeholders?: Object | null\n): any => useSelector(getMessage)(id, defaultMessage, placeholders);\n\n/**\n */\nconst useTranslate = (): ((...any) => any) => useSelector(getMessage);\n\nexport { useTranslate, useMessage };\n"],"mappings":";;;;;;;;;;;AACA;;AACA;;AACA;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,IAAN,CAAWC,MAAX,IAAqB,IAAhC;AAAA,CAAtB;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,IAAN,CAAWG,OAAtB;AAAA,CAAnB;;AAEA,IAAMC,UAAU,GAAG,8BACjB,CAACF,UAAD,EAAaJ,aAAb,CADiB,EAEjB,UAACK,OAAD,EAAUE,UAAV;EAAA,OACE,sBACE,UACEC,EADF,EAEEC,cAFF,EAGEC,YAHF;IAAA,OAKEL,OAAO,CACJM,SADH,CACaJ,UADb,EAEGD,UAFH,CAEcE,EAFd,EAEkBC,cAFlB,EAEkCC,YAFlC,CALF;EAAA,CADF,EASE;IAAA,kCAAIE,IAAJ;MAAIA,IAAJ;IAAA;;IAAA,OAAa,wBAAeA,IAAf,CAAb;EAAA,CATF,CADF;AAAA,CAFiB,CAAnB;AAgBA;AACA;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CACjBL,EADiB,EAEjBC,cAFiB,EAGjBC,YAHiB;EAAA,OAIT,6BAAYJ,UAAZ,EAAwBE,EAAxB,EAA4BC,cAA5B,EAA4CC,YAA5C,CAJS;AAAA,CAAnB;AAMA;AACA;;;;;AACA,IAAMI,YAAY,GAAG,SAAfA,YAAe;EAAA,OAAyB,6BAAYR,UAAZ,CAAzB;AAAA,CAArB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useModal.js"],"names":["useModal","modalId","IllegalArgumentException","dispatch","modal","modals","m","key","show","close","size","visible"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AAUA;AACA;AACA;AACO,IAAMA,QAAmB,GAAG,SAAtBA,QAAsB,CAACC,OAAD,EAAqB;AACtD,MAAI,CAACA,OAAL,EAAc;AACZ,UAAM,IAAIC,oCAAJ,CACJ,4CADI,CAAN;AAGD;;AAED,MAAMC,QAAQ,GAAG,8BAAjB;AACA,MAAMC,KAAK,GAAG,6BAAY;AAAA;;AAAA,QAAGC,MAAH,QAAGA,MAAH;AAAA,WACxB,8BAAAA,MAAM,CAACA,MAAP,iBAAmB,UAACC,CAAD;AAAA,aAAOA,CAAC,CAACC,GAAF,KAAUN,OAAjB;AAAA,KAAnB,CADwB;AAAA,GAAZ,CAAd;AAIA,MAAMO,IAAI,GAAG,wBAAY,YAAM;AAC7BL,IAAAA,QAAQ,CAAC,uBAAUF,OAAV,CAAD,CAAR;AACD,GAFY,EAEV,CAACE,QAAD,EAAWF,OAAX,CAFU,CAAb;AAIA,MAAMQ,KAAK,GAAG,wBAAY,YAAM;AAC9BN,IAAAA,QAAQ,CAAC,wBAAWF,OAAX,CAAD,CAAR;AACD,GAFa,EAEX,CAACE,QAAD,EAAWF,OAAX,CAFW,CAAd;AAIA,SAAO;AACLM,IAAAA,GAAG,EAAEH,KAAK,GAAGA,KAAK,CAACG,GAAT,GAAe,IADpB;AAELG,IAAAA,IAAI,EAAEN,KAAK,GAAGA,KAAK,CAACM,IAAT,GAAgB,IAFtB;AAGLC,IAAAA,OAAO,EAAEP,KAAK,GAAGA,KAAK,CAACO,OAAT,GAAmB,KAH5B;AAILH,IAAAA,IAAI,EAAJA,IAJK;AAKLC,IAAAA,KAAK,EAALA;AALK,GAAP;AAOD,CA3BM","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"],"file":"useModal.js"}
1
+ {"version":3,"file":"useModal.js","names":["useModal","modalId","IllegalArgumentException","dispatch","modal","modals","m","key","show","close","size","visible"],"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;;AACA;;AAEA;;AACA;;AAUA;AACA;AACA;AACO,IAAMA,QAAmB,GAAG,SAAtBA,QAAsB,CAACC,OAAD,EAAqB;EACtD,IAAI,CAACA,OAAL,EAAc;IACZ,MAAM,IAAIC,oCAAJ,CACJ,4CADI,CAAN;EAGD;;EAED,IAAMC,QAAQ,GAAG,8BAAjB;EACA,IAAMC,KAAK,GAAG,6BAAY;IAAA;;IAAA,IAAGC,MAAH,QAAGA,MAAH;IAAA,OACxB,8BAAAA,MAAM,CAACA,MAAP,iBAAmB,UAACC,CAAD;MAAA,OAAOA,CAAC,CAACC,GAAF,KAAUN,OAAjB;IAAA,CAAnB,CADwB;EAAA,CAAZ,CAAd;EAIA,IAAMO,IAAI,GAAG,wBAAY,YAAM;IAC7BL,QAAQ,CAAC,uBAAUF,OAAV,CAAD,CAAR;EACD,CAFY,EAEV,CAACE,QAAD,EAAWF,OAAX,CAFU,CAAb;EAIA,IAAMQ,KAAK,GAAG,wBAAY,YAAM;IAC9BN,QAAQ,CAAC,wBAAWF,OAAX,CAAD,CAAR;EACD,CAFa,EAEX,CAACE,QAAD,EAAWF,OAAX,CAFW,CAAd;EAIA,OAAO;IACLM,GAAG,EAAEH,KAAK,GAAGA,KAAK,CAACG,GAAT,GAAe,IADpB;IAELG,IAAI,EAAEN,KAAK,GAAGA,KAAK,CAACM,IAAT,GAAgB,IAFtB;IAGLC,OAAO,EAAEP,KAAK,GAAGA,KAAK,CAACO,OAAT,GAAmB,KAH5B;IAILH,IAAI,EAAJA,IAJK;IAKLC,KAAK,EAALA;EALK,CAAP;AAOD,CA3BM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useModelCatalog.js"],"names":["useModelCatalog","expectedModels","targetModel","ModelCatalogModel","useConceptIndex","href","ConceptIndexModel","getHref","context","dynamic","location","replace","search","useConceptDetail","concept","useContentIndex","ContentIndexModel","useContentTOC","content","ContentTOCModel","useContent","contentSection","ContentModel","useContentType","contentType","ContentTypeModel"],"mappings":";;;;;;;;;;;;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA;AACA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB;AAAA,SAC7B,0CAAkB,cAAlB,EAAkC,eAAlC,EAAmD;AACjDC,IAAAA,cAAc,EAAE,CAAC,cAAD,CADiC;AAEjDC,IAAAA,WAAW,EAAEC;AAFoC,GAAnD,CAD6B;AAAA,CAAxB;AAMP;AACA;;;;;AACO,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACC,IAAD;AAAA,SAC7B,0CAAkB,cAAlB,EAAkCA,IAAlC,EAAwC;AACtCJ,IAAAA,cAAc,EAAE,CAAC,cAAD,CADsB;AAEtCC,IAAAA,WAAW,EAAEI;AAFyB,GAAxC,CAD6B;AAAA,CAAxB;;;;AAMP,IAAMC,OAAO,GAAG,SAAVA,OAAU,CAACC,OAAD,EAAUC,OAAV,EAAmBC,QAAnB,EAAgC;AAC9C,MAAIL,IAAI,GAAGI,OAAX;;AACA,MAAI,CAAC,yBAAAJ,IAAI,MAAJ,CAAAA,IAAI,aAAgBG,OAAhB,OAAT,EAAsC;AAAA;;AACpCH,IAAAA,IAAI,8CAAOG,OAAP,uBAAkBH,IAAlB,CAAJ;AACD;;AAEDA,EAAAA,IAAI,GAAGA,IAAI,CAACM,OAAL,CAAa,OAAb,EAAsB,GAAtB,CAAP;;AAEA,MAAID,QAAJ,aAAIA,Q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B,IAA7B,EAAmC;AACxCJ,IAAAA,cAAc,EAAE,CAAC,SAAD,CADwB;AAExCC,IAAAA,WAAW,EAAEoB;AAF2B,GAAnC,CAAP;AAID,CANM;AAQP;AACA;;;;;AACO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACC,WAAD,EAA4C;AACxE,MAAMnB,IAAI,GAAGE,OAAO,CAAC,cAAD,EAAiBiB,WAAjB,CAApB;AACA,SAAO,0CAAkB,cAAlB,EAAkCnB,IAAlC,EAAwC;AAC7CJ,IAAAA,cAAc,EAAE,CAAC,aAAD,CAD6B;AAE7CC,IAAAA,WAAW,EAAEuB;AAFgC,GAAxC,CAAP;AAID,CANM","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\";\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, dynamic, 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"],"file":"useModelCatalog.js"}
1
+ {"version":3,"file":"useModelCatalog.js","names":["useModelCatalog","expectedModels","targetModel","ModelCatalogModel","useConceptIndex","href","ConceptIndexModel","getHref","context","dynamic","location","replace","search","useConceptDetail","concept","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\";\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, dynamic, 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\", content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C,aAAD,CAD6B;IAE7CC,WAAW,EAAEuB;EAFgC,CAAxC,CAAP;AAID,CANM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useModels.js"],"names":["useModels","dispatch","reload","model","options"],"mappings":";;;;;;;AACA;;AAEA;;AAQA;AACA;AACA;AACO,IAAMA,SAAoB,GAAG,SAAvBA,SAAuB,GAAM;AACxC,MAAMC,QAAQ,GAAG,8BAAjB;AACA,SAAO;AACLC,IAAAA,MAAM,EAAE,gBAACC,KAAD,EAAwBC,OAAxB,EAA6C;AACnDH,MAAAA,QAAQ,CAAC,0BAAYE,KAAZ,EAAmBC,OAAnB,CAAD,CAAR;AACD;AAHI,GAAP;AAKD,CAPM","sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport { reloadModel } from \"../redux/_modularui/actions\";\n\nimport type { ModularUIModel } from \"../models/types\";\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: any) => void,\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useDispatch();\n return {\n reload: (model: ModularUIModel, options?: Object) => {\n dispatch(reloadModel(model, options));\n },\n };\n};\n"],"file":"useModels.js"}
1
+ {"version":3,"file":"useModels.js","names":["useModels","dispatch","reload","model","options"],"sources":["../../src/hooks/useModels.js"],"sourcesContent":["// @flow\nimport { useDispatch } from \"react-redux\";\n\nimport { reloadModel } from \"../redux/_modularui/actions\";\n\nimport type { ModularUIModel } from \"../models/types\";\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: any) => void,\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useDispatch();\n return {\n reload: (model: ModularUIModel, options?: Object) => {\n dispatch(reloadModel(model, options));\n },\n };\n};\n"],"mappings":";;;;;;;AACA;;AAEA;;AAQA;AACA;AACA;AACO,IAAMA,SAAoB,GAAG,SAAvBA,SAAuB,GAAM;EACxC,IAAMC,QAAQ,GAAG,8BAAjB;EACA,OAAO;IACLC,MAAM,EAAE,gBAACC,KAAD,EAAwBC,OAAxB,EAA6C;MACnDH,QAAQ,CAAC,0BAAYE,KAAZ,EAAmBC,OAAnB,CAAD,CAAR;IACD;EAHI,CAAP;AAKD,CAPM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useModularUI.js"],"names":["useKeyForHook","modelKey","url","locale","state","i18n","split","useModularUI","options","method","HTTP_METHODS","GET","removeOnUnmount","dispatch","href","toString","key","prevOptions","prevHref","isOldReload","current","isReload","modularui"],"mappings":";;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AAKA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,QAAD,EAAmBC,GAAnB,EAAmC;AAAA;;AACvD,MAAMC,MAAM,GAAG,6BAAY,UAACC,KAAD;AAAA,WAAWA,KAAK,CAACC,IAAN,CAAWF,MAAtB;AAAA,GAAZ,CAAf;AAEA,oFAAUF,QAAV,wBAAsBC,GAAG,CAACI,KAAJ,CAAU,GAAV,EAAe,CAAf,CAAtB,wBAA4CH,MAA5C;AACD,CAJD;AAMA;AACA;AACA;;;AACO,IAAMI,YAAY,GAAG,SAAfA,YAAe,CAC1BN,QAD0B,EAE1BC,GAF0B,EAOlB;AAAA,MAJRM,OAIQ,uEAJsB;AAC5BC,IAAAA,MAAM,EAAEC,wBAAaC,GADO;AAE5BC,IAAAA,eAAe,EAAE;AAFW,GAItB;AACR,MAAMC,QAAQ,GAAG,8BAAjB;AACA,MAAMC,IAAI,GAAGZ,GAAG,CAACa,QAAJ,EAAb;AACA,MAAMC,GAAG,GAAGhB,aAAa,CAACC,QAAD,EAAWa,IAAX,CAAzB;AAEA,MAAMG,WAAW,GAAG,mBAAOT,OAAP,CAApB;AACA,MAAMU,QAAQ,GAAG,mBAAOJ,IAAP,CAAjB,CANQ,CAQR;;AACA,qCAAqB,YAAM;AACzB;AACA,QAAMK,WAAW,GACfD,QAAQ,CAACE,OAAT,KAAqBN,IAArB,IACAG,WAAW,CAACG,OAAZ,CAAoBC,QADpB,IAEA,CAACb,OAAO,CAACa,QAHX;;AAKA,QAAI,CAACF,WAAL,EAAkB;AAChBN,MAAAA,QAAQ,CAAC,4BAAcG,GAAd,EAAmBF,IAAnB,EAAyBN,OAAzB,CAAD,CAAR;AACD;;AAEDS,IAAAA,WAAW,CAACG,OAAZ,GAAsBZ,OAAtB;AACAU,IAAAA,QAAQ,CAACE,OAAT,GAAmBN,IAAnB;AACD,GAbD,EAaG,CAACE,GAAD,EAAMF,IAAN,EAAYN,OAAZ,CAbH;AAeA,8BAAoCA,OAApC,CAAQI,eAAR;AAAA,MAAQA,eAAR,sCAA0B,KAA1B;AACA,wBAAU,YAAM;AACd,WAAO,YAAM;AACX,UAAIA,eAAJ,EAAqB;AACnBC,QAAAA,QAAQ,CAAC,+BAAiBG,GAAjB,CAAD,CAAR;AACD;AACF,KAJD;AAKD,GAND,EAMG,CAACH,QAAD,EAAWG,GAAX,EAAgBJ,eAAhB,CANH,EAzBQ,CAiCR;;AACA,SAAO,6BAAY,UAACR,KAAD,EAAW;AAC5B,WAAOA,KAAK,CAACkB,SAAN,CAAgBN,GAAhB,CAAP;AACD,GAFM,CAAP;AAGD,CA5CM","sourcesContent":["// @flow\nimport { useEffect, useRef } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { HTTP_METHODS } from \"../constants\";\nimport { loadModularUI, removeModelByKey } from \"../redux/_modularui/actions\";\n\nimport useDeepCompareEffect from \"./useDeepCompareEffect\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestBaseOptions } from \"../utils\";\n\n/**\n */\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useSelector((state) => state.i18n.locale);\n\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: RequestBaseOptions = {\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"],"file":"useModularUI.js"}
1
+ {"version":3,"file":"useModularUI.js","names":["useKeyForHook","modelKey","url","locale","state","i18n","split","useModularUI","options","method","HTTP_METHODS","GET","removeOnUnmount","dispatch","href","toString","key","prevOptions","prevHref","isOldReload","current","isReload","modularui"],"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 { loadModularUI, removeModelByKey } from \"../redux/_modularui/actions\";\n\nimport useDeepCompareEffect from \"./useDeepCompareEffect\";\n\nimport type Href from \"../models/href/Href\";\nimport type { RequestBaseOptions } from \"../utils\";\n\n/**\n */\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useSelector((state) => state.i18n.locale);\n\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: RequestBaseOptions = {\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;;AACA;;AAEA;;AACA;;AAEA;;AAKA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,QAAD,EAAmBC,GAAnB,EAAmC;EAAA;;EACvD,IAAMC,MAAM,GAAG,6BAAY,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACC,IAAN,CAAWF,MAAtB;EAAA,CAAZ,CAAf;EAEA,kFAAUF,QAAV,wBAAsBC,GAAG,CAACI,KAAJ,CAAU,GAAV,EAAe,CAAf,CAAtB,wBAA4CH,MAA5C;AACD,CAJD;AAMA;AACA;AACA;;;AACO,IAAMI,YAAY,GAAG,SAAfA,YAAe,CAC1BN,QAD0B,EAE1BC,GAF0B,EAOlB;EAAA,IAJRM,OAIQ,uEAJsB;IAC5BC,MAAM,EAAEC,wBAAaC,GADO;IAE5BC,eAAe,EAAE;EAFW,CAItB;EACR,IAAMC,QAAQ,GAAG,8BAAjB;EACA,IAAMC,IAAI,GAAGZ,GAAG,CAACa,QAAJ,EAAb;EACA,IAAMC,GAAG,GAAGhB,aAAa,CAACC,QAAD,EAAWa,IAAX,CAAzB;EAEA,IAAMG,WAAW,GAAG,mBAAOT,OAAP,CAApB;EACA,IAAMU,QAAQ,GAAG,mBAAOJ,IAAP,CAAjB,CANQ,CAQR;;EACA,mCAAqB,YAAM;IACzB;IACA,IAAMK,WAAW,GACfD,QAAQ,CAACE,OAAT,KAAqBN,IAArB,IACAG,WAAW,CAACG,OAAZ,CAAoBC,QADpB,IAEA,CAACb,OAAO,CAACa,QAHX;;IAKA,IAAI,CAACF,WAAL,EAAkB;MAChBN,QAAQ,CAAC,4BAAcG,GAAd,EAAmBF,IAAnB,EAAyBN,OAAzB,CAAD,CAAR;IACD;;IAEDS,WAAW,CAACG,OAAZ,GAAsBZ,OAAtB;IACAU,QAAQ,CAACE,OAAT,GAAmBN,IAAnB;EACD,CAbD,EAaG,CAACE,GAAD,EAAMF,IAAN,EAAYN,OAAZ,CAbH;EAeA,4BAAoCA,OAApC,CAAQI,eAAR;EAAA,IAAQA,eAAR,sCAA0B,KAA1B;EACA,sBAAU,YAAM;IACd,OAAO,YAAM;MACX,IAAIA,eAAJ,EAAqB;QACnBC,QAAQ,CAAC,+BAAiBG,GAAjB,CAAD,CAAR;MACD;IACF,CAJD;EAKD,CAND,EAMG,CAACH,QAAD,EAAWG,GAAX,EAAgBJ,eAAhB,CANH,EAzBQ,CAiCR;;EACA,OAAO,6BAAY,UAACR,KAAD,EAAW;IAC5B,OAAOA,KAAK,CAACkB,SAAN,CAAgBN,GAAhB,CAAP;EACD,CAFM,CAAP;AAGD,CA5CM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useModularUIBasic.js"],"names":["useModularUIBasic","key","href","options","expectedModels","targetModel","undefined","location","IllegalArgumentException","useModularUIOptions","state","reload","pathname","toString","isReload","modularUI","model","length","isCorrectModel","some","expectedModel","type","console","error","IllegalStateException"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAEA;;AASA;AACA;AACO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAC/BC,GAD+B,EAE/BC,IAF+B,EAOxB;AAAA;;AAAA,MAJPC,OAIO,uEAJgC;AACrCC,IAAAA,cAAc,EAAE,EADqB;AAErCC,IAAAA,WAAW,EAAEC;AAFwB,GAIhC;AACP,MAAMC,QAAQ,GAAG,6BAAjB;;AACA,MAAI,CAACL,IAAL,EAAW;AACT,UAAM,IAAIM,oCAAJ,CAA6B,cAA7B,CAAN;AACD;;AAED,MAAMC,mBAAmB,GAAG,EAA5B;;AACA,MAAIN,OAAO,CAACE,WAAZ,EAAyB;AACvBI,IAAAA,mBAAmB,CAACJ,WAApB,GAAkCF,OAAO,CAACE,WAA1C;AACD,GATM,CAWP;;;AACA,MAAI,mBAAAE,QAAQ,CAACG,KAAT,4DAAgBC,MAAhB,IAA0B,oCAAAJ,QAAQ,CAACK,QAAT,iBAA6BV,IAAI,CAACW,QAAL,EAA7B,CAA9B,EAA6E;AAC3EJ,IAAAA,mBAAmB,CAACK,QAApB,GAA+B,IAA/B;AACD;;AAED,MAAMC,SAAS,GAAG,gCAAad,GAAb,EAAkBC,IAAlB,EAAwBO,mBAAxB,CAAlB;;AAEA,MAAIM,SAAJ,aAAIA,SAAJ,eAAIA,SAAS,CAAEC,KAAf,EAAsB;AACpB,QAAQA,KAAR,GAAkBD,SAAlB,CAAQC,KAAR;;AACA,QAAIb,OAAO,CAACC,cAAR,CAAuBa,MAAvB,GAAgC,CAApC,EAAuC;AACrC,UAAMC,cAAc,GAAGf,OAAO,CAACC,cAAR,CAAuBe,IAAvB,CAA4B,UAACC,aAAD,EAAmB;AACpE,eAAOJ,KAAK,CAACK,IAAN,KAAeD,aAAtB;AACD,OAFsB,CAAvB;;AAIA,UAAI,CAACF,cAAL,EAAqB;AACnBI,QAAAA,OAAO,CAACC,KAAR,CAAcR,SAAd,EAAyB,oBAAzB,EAA+CZ,OAAO,CAACC,cAAvD;AACA,cAAM,IAAIoB,iCAAJ,CAA0B,mCAA1B,CAAN;AACD;AACF;;AAED,WAAOR,KAAP;AACD;AACF,CAxCM","sourcesContent":["// @flow\nimport { useModularUI } from \"./useModularUI\";\n\nimport { useLocation } from \"./useRouter\";\n\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport type { ModularUIModel, Href } from \"../models\";\n\ntype UseModularUIBasicOptions<T> = {\n expectedModels: Array<string>,\n targetModel?: Class<T>,\n};\n\n/**\n */\nexport const useModularUIBasic = <T: ModularUIModel>(\n key: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {\n expectedModels: [],\n targetModel: undefined,\n }\n): ?T => {\n const location = useLocation();\n if (!href) {\n throw new IllegalArgumentException(\"Missing href\");\n }\n\n const useModularUIOptions = {};\n if (options.targetModel) {\n useModularUIOptions.targetModel = options.targetModel;\n }\n\n // reload when the modular service starts with the current location\n if (location.state?.reload && location.pathname.startsWith(href.toString())) {\n useModularUIOptions.isReload = true;\n }\n\n const modularUI = useModularUI(key, href, useModularUIOptions);\n\n if (modularUI?.model) {\n const { model } = modularUI;\n if (options.expectedModels.length > 0) {\n const isCorrectModel = options.expectedModels.some((expectedModel) => {\n return model.type === expectedModel;\n });\n\n if (!isCorrectModel) {\n console.error(modularUI, \"is not of instance\", options.expectedModels);\n throw new IllegalStateException(\"Resolved model has incorrect type\");\n }\n }\n\n return model;\n }\n};\n"],"file":"useModularUIBasic.js"}
1
+ {"version":3,"file":"useModularUIBasic.js","names":["useModularUIBasic","key","href","options","expectedModels","targetModel","undefined","location","IllegalArgumentException","useModularUIOptions","state","reload","pathname","toString","isReload","modularUI","model","length","isCorrectModel","some","expectedModel","type","console","error","IllegalStateException"],"sources":["../../src/hooks/useModularUIBasic.js"],"sourcesContent":["// @flow\nimport { useModularUI } from \"./useModularUI\";\n\nimport { useLocation } from \"./useRouter\";\n\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport type { ModularUIModel, Href } from \"../models\";\n\ntype UseModularUIBasicOptions<T> = {\n expectedModels: Array<string>,\n targetModel?: Class<T>,\n};\n\n/**\n */\nexport const useModularUIBasic = <T: ModularUIModel>(\n key: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {\n expectedModels: [],\n targetModel: undefined,\n }\n): ?T => {\n const location = useLocation();\n if (!href) {\n throw new IllegalArgumentException(\"Missing href\");\n }\n\n const useModularUIOptions = {};\n if (options.targetModel) {\n useModularUIOptions.targetModel = options.targetModel;\n }\n\n // reload when the modular service starts with the current location\n if (location.state?.reload && location.pathname.startsWith(href.toString())) {\n useModularUIOptions.isReload = true;\n }\n\n const modularUI = useModularUI(key, href, useModularUIOptions);\n\n if (modularUI?.model) {\n const { model } = modularUI;\n if (options.expectedModels.length > 0) {\n const isCorrectModel = options.expectedModels.some((expectedModel) => {\n return model.type === expectedModel;\n });\n\n if (!isCorrectModel) {\n console.error(modularUI, \"is not of instance\", options.expectedModels);\n throw new IllegalStateException(\"Resolved model has incorrect type\");\n }\n }\n\n return model;\n }\n};\n"],"mappings":";;;;;;;;;;;AACA;;AAEA;;AAEA;;AASA;AACA;AACO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAC/BC,GAD+B,EAE/BC,IAF+B,EAOxB;EAAA;;EAAA,IAJPC,OAIO,uEAJgC;IACrCC,cAAc,EAAE,EADqB;IAErCC,WAAW,EAAEC;EAFwB,CAIhC;EACP,IAAMC,QAAQ,GAAG,6BAAjB;;EACA,IAAI,CAACL,IAAL,EAAW;IACT,MAAM,IAAIM,oCAAJ,CAA6B,cAA7B,CAAN;EACD;;EAED,IAAMC,mBAAmB,GAAG,EAA5B;;EACA,IAAIN,OAAO,CAACE,WAAZ,EAAyB;IACvBI,mBAAmB,CAACJ,WAApB,GAAkCF,OAAO,CAACE,WAA1C;EACD,CATM,CAWP;;;EACA,IAAI,mBAAAE,QAAQ,CAACG,KAAT,4DAAgBC,MAAhB,IAA0B,oCAAAJ,QAAQ,CAACK,QAAT,iBAA6BV,IAAI,CAACW,QAAL,EAA7B,CAA9B,EAA6E;IAC3EJ,mBAAmB,CAACK,QAApB,GAA+B,IAA/B;EACD;;EAED,IAAMC,SAAS,GAAG,gCAAad,GAAb,EAAkBC,IAAlB,EAAwBO,mBAAxB,CAAlB;;EAEA,IAAIM,SAAJ,aAAIA,SAAJ,eAAIA,SAAS,CAAEC,KAAf,EAAsB;IACpB,IAAQA,KAAR,GAAkBD,SAAlB,CAAQC,KAAR;;IACA,IAAIb,OAAO,CAACC,cAAR,CAAuBa,MAAvB,GAAgC,CAApC,EAAuC;MACrC,IAAMC,cAAc,GAAGf,OAAO,CAACC,cAAR,CAAuBe,IAAvB,CAA4B,UAACC,aAAD,EAAmB;QACpE,OAAOJ,KAAK,CAACK,IAAN,KAAeD,aAAtB;MACD,CAFsB,CAAvB;;MAIA,IAAI,CAACF,cAAL,EAAqB;QACnBI,OAAO,CAACC,KAAR,CAAcR,SAAd,EAAyB,oBAAzB,EAA+CZ,OAAO,CAACC,cAAvD;QACA,MAAM,IAAIoB,iCAAJ,CAA0B,mCAA1B,CAAN;MACD;IACF;;IAED,OAAOR,KAAP;EACD;AACF,CAxCM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useModularUIModel.js"],"names":["useApplication","expectedModels","targetModel","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","usePanel","useList","ListModel","useListDetail","ListDetailModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","DetailModel","useQuicksearch","CaseSearchModel","useUserProfile","UserProfileModel"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAEA;AACA;AACA;AACO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAC5B,0CAAkB,aAAlB,EAAiC,GAAjC,EAAsC;AACpCC,IAAAA,cAAc,EAAE,CAAC,aAAD,CADoB;AAEpCC,IAAAA,WAAW,EAAEC;AAFuB,GAAtC,CAD4B;AAAA,CAAvB;AAMP;AACA;AACA;;;;;AACO,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,IAAD;AAAA,SACpB,0CAAkB,KAAlB,EAAyBA,IAAzB,EAA+B;AAC7BJ,IAAAA,cAAc,EAAE,CAAC,KAAD,CADa;A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jBA,cAAiB,CAACX,IAAD;AAAA,SAC5B,0CAAkB,aAAlB,EAAiCA,IAAjC,EAAuC;AACrCJ,IAAAA,cAAc,EAAE,CAAC,QAAD,CADqB;AAErCC,IAAAA,WAAW,EAAEe;AAFwB,GAAvC,CAD4B;AAAA,CAAvB;AAMP;AACA;;;;;AACO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACb,IAAD;AAAA,SAC5B,0CAAkB,aAAlB,EAAiCA,IAAjC,EAAuC;AACrCJ,IAAAA,cAAc,EAAE,CAAC,YAAD,CADqB;AAErCC,IAAAA,WAAW,EAAEiB;AAFwB,GAAvC,CAD4B;AAAA,CAAvB;AAMP;AACA;;;;;AACO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACf,IAAD;AAAA,SAC5B,0CAAkB,aAAlB,EAAiCA,IAAjC,EAAuC;AACrCJ,IAAAA,cAAc,EAAE,CAAC,aAAD,CADqB;AAErCC,IAAAA,WAAW,EAAEmB;AAFwB,GAAvC,CAD4B;AAAA,CAAvB","sourcesContent":["// @flow\nimport ApplicationModel from \"../models/application/ApplicationModel\";\nimport CaseViewModel from \"../models/caseview/CaseViewModel\";\nimport TabModel from \"../models/tab/TabModel\";\nimport ListModel from \"../models/list/ListModel\";\nimport GroupingPanelModel from \"../models/panels/GroupingPanelModel\";\nimport DetailModel from \"../models/detail/DetailModel\";\nimport CaseSearchModel from \"../models/search/CaseSearchModel\";\nimport ListDetailModel from \"../models/list/ListDetailModel\";\nimport UserProfileModel from \"../models/user/UserProfileModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (): ?ApplicationModel =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string): ?TabModel =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string): ?CaseViewModel =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n });\n\n/**\n */\nexport const usePanel = (\n href: string\n): ?ListModel | ?GroupingPanelModel | ?DetailModel =>\n useModularUIBasic(\"panel\", href, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n });\n\n/**\n */\nexport const useList = (href: string): ?ListModel =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n });\n\n/**\n */\nexport const useListDetail = (href: string): ?ListDetailModel =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n });\n\n/**\n */\nexport const useGroupingPanel = (href: string): ?GroupingPanelModel =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n });\n\n/**\n */\nexport const useDetailPanel = (href: string): ?DetailModel =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n });\n\n/**\n */\nexport const useQuicksearch = (href: string): ?CaseSearchModel =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useUserProfile = (href: string): ?UserProfileModel =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n });\n"],"file":"useModularUIModel.js"}
1
+ {"version":3,"file":"useModularUIModel.js","names":["useApplication","expectedModels","targetModel","ApplicationModel","useTab","href","TabModel","useCaseView","CaseViewModel","usePanel","useList","ListModel","useListDetail","ListDetailModel","useGroupingPanel","GroupingPanelModel","useDetailPanel","DetailModel","useQuicksearch","CaseSearchModel","useUserProfile","UserProfileModel"],"sources":["../../src/hooks/useModularUIModel.js"],"sourcesContent":["// @flow\nimport ApplicationModel from \"../models/application/ApplicationModel\";\nimport CaseViewModel from \"../models/caseview/CaseViewModel\";\nimport TabModel from \"../models/tab/TabModel\";\nimport ListModel from \"../models/list/ListModel\";\nimport GroupingPanelModel from \"../models/panels/GroupingPanelModel\";\nimport DetailModel from \"../models/detail/DetailModel\";\nimport CaseSearchModel from \"../models/search/CaseSearchModel\";\nimport ListDetailModel from \"../models/list/ListDetailModel\";\nimport UserProfileModel from \"../models/user/UserProfileModel\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\n/**\n * Load application\n */\nexport const useApplication = (): ?ApplicationModel =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string): ?TabModel =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string): ?CaseViewModel =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n });\n\n/**\n */\nexport const usePanel = (\n href: string\n): ?ListModel | ?GroupingPanelModel | ?DetailModel =>\n useModularUIBasic(\"panel\", href, {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n });\n\n/**\n */\nexport const useList = (href: string): ?ListModel =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n });\n\n/**\n */\nexport const useListDetail = (href: string): ?ListDetailModel =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n });\n\n/**\n */\nexport const useGroupingPanel = (href: string): ?GroupingPanelModel =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n });\n\n/**\n */\nexport const useDetailPanel = (href: string): ?DetailModel =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n });\n\n/**\n */\nexport const useQuicksearch = (href: string): ?CaseSearchModel =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n });\n\n/**\n */\nexport const useUserProfile = (href: string): ?UserProfileModel =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n });\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAEA;AACA;AACA;AACO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB;EAAA,OAC5B,0CAAkB,aAAlB,EAAiC,GAAjC,EAAsC;IACpCC,cAAc,EAAE,CAAC,aAAD,CADoB;IAEpCC,WAAW,EAAEC;EAFuB,CAAtC,CAD4B;AAAA,CAAvB;AAMP;AACA;AACA;;;;;AACO,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,IAAD;EAAA,OACpB,0CAAkB,KAAlB,EAAyBA,IAAzB,EAA+B;IAC7BJ,cAAc,EAAE,CAAC,KAAD,CADa;IAE7BC,WAAW,EAAEI;EAFgB,CAA/B,CADoB;AAAA,CAAf;AAMP;AACA;AACA;;;;;AACO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACF,IAAD;EAAA,OACzB,0CAAkB,UAAlB,EAA8BA,IAA9B,EAAoC;IAClCJ,cAAc,EAAE,CAAC,UAAD,CADkB;IAElCC,WAAW,EAAEM;EAFqB,CAApC,CADyB;AAAA,CAApB;AAMP;AACA;;;;;AACO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CACtBJ,IADsB;EAAA,OAGtB,0CAAkB,OAAlB,EAA2BA,IAA3B,EAAiC;IAC/BJ,cAAc,EAAE,CAAC,MAAD,EAAS,eAAT,EAA0B,QAA1B;EADe,CAAjC,CAHsB;AAAA,CAAjB;AAOP;AACA;;;;;AACO,IAAMS,OAAO,GAAG,SAAVA,OAAU,CAACL,IAAD;EAAA,OACrB,0C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ources":["../../src/hooks/useModularUIRequest.js"],"names":["getModularUIRequest","state","i18n","locale","localeCode","href","options","request","ModularUIRequest","useModularUIRequest"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;AAKA,IAAMA,mBAAmB,GAAG,8BAC1B,CAAC,UAACC,KAAD;AAAA;;AAAA,+BAAWA,KAAK,CAACC,IAAN,CAAWC,MAAtB,mEAAgC,IAAhC;AAAA,CAAD,CAD0B,EAE1B,UAACC,UAAD,EAAgB;AACd,SAAO,UAACC,IAAD,EAAaC,OAAb,EAAsD;AAC3D,QAAMC,OAAO,GAAG,IAAIC,yBAAJ,CAAqBH,IAArB,EAA2BC,OAA3B,CAAhB;AACAC,IAAAA,OAAO,CAACJ,MAAR,GAAiBC,UAAjB;AACA,WAAOG,OAAP;AACD,GAJD;AAKD,CARyB,CAA5B;AAWA;AACA;AACA;;AACO,IAAME,mBAAmB,GAAG,SAAtBA,mBAAsB;AAAA,SAGT,6BAAYT,mBAAZ,CAHS;AAAA,CAA5B","sourcesContent":["// @flow\nimport { createSelector } from \"reselect\";\nimport { useSelector } from \"react-redux\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport type { RequestBaseOptions } from \"../utils\";\nimport type Href from \"../models/href/Href\";\n\nconst getModularUIRequest = createSelector(\n [(state) => state.i18n.locale ?? \"en\"],\n (localeCode) => {\n return (href: Href, options?: $Shape<RequestBaseOptions>) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n }\n);\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: $Shape<RequestBaseOptions>\n) => ModularUIRequest) => useSelector(getModularUIRequest);\n"],"file":"useModularUIRequest.js"}
1
+ {"version":3,"file":"useModularUIRequest.js","names":["getModularUIRequest","state","i18n","locale","localeCode","href","options","request","ModularUIRequest","useModularUIRequest"],"sources":["../../src/hooks/useModularUIRequest.js"],"sourcesContent":["// @flow\nimport { createSelector } from \"reselect\";\nimport { useSelector } from \"react-redux\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport type { RequestBaseOptions } from \"../utils\";\nimport type Href from \"../models/href/Href\";\n\nconst getModularUIRequest = createSelector(\n [(state) => state.i18n.locale ?? \"en\"],\n (localeCode) => {\n return (href: Href, options?: $Shape<RequestBaseOptions>) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n }\n);\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: $Shape<RequestBaseOptions>\n) => ModularUIRequest) => useSelector(getModularUIRequest);\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;AAKA,IAAMA,mBAAmB,GAAG,8BAC1B,CAAC,UAACC,KAAD;EAAA;;EAAA,6BAAWA,KAAK,CAACC,IAAN,CAAWC,MAAtB,mEAAgC,IAAhC;AAAA,CAAD,CAD0B,EAE1B,UAACC,UAAD,EAAgB;EACd,OAAO,UAACC,IAAD,EAAaC,OAAb,EAAsD;IAC3D,IAAMC,OAAO,GAAG,IAAIC,yBAAJ,CAAqBH,IAArB,EAA2BC,OAA3B,CAAhB;IACAC,OAAO,CAACJ,MAAR,GAAiBC,UAAjB;IACA,OAAOG,OAAP;EACD,CAJD;AAKD,CARyB,CAA5B;AAWA;AACA;AACA;;AACO,IAAME,mBAAmB,GAAG,SAAtBA,mBAAsB;EAAA,OAGT,6BAAYT,mBAAZ,CAHS;AAAA,CAA5B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useNotification.js"],"names":["useNotification","dispatch","state","notification","render","messageType","message","error","dismiss"],"mappings":";;;;;;;AACA;;AACA;;AAWA;AACA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,GAAwB;AACrD,MAAMC,QAAQ,GAAG,8BAAjB;;AACA,qBAAgD,6BAC9C,UAACC,KAAD;AAAA,WAAWA,KAAK,CAACC,YAAjB;AAAA,GAD8C,CAAhD;AAAA,MAAQC,MAAR,gBAAQA,MAAR;AAAA,MAAgBC,WAAhB,gBAAgBA,WAAhB;AAAA,MAA6BC,OAA7B,gBAA6BA,OAA7B;AAAA,MAAsCC,KAAtC,gBAAsCA,KAAtC;;AAIA,SAAO;AACLH,IAAAA,MAAM,EAANA,MADK;AAELC,IAAAA,WAAW,EAAXA,WAFK;AAGLC,IAAAA,OAAO,EAAPA,OAHK;AAILC,IAAAA,KAAK,EAALA,KAJK;AAKLC,IAAAA,OAAO,EAAE;AAAA,aAAMP,QAAQ,CAAC,mCAAD,CAAd;AAAA;AALJ,GAAP;AAOD,CAbM","sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { dismissNotification } from \"../redux/actions\";\n\nimport type {\n DismissNotificationAction,\n NotificationState,\n} from \"../redux/types\";\ntype NotificationHook = {\n ...NotificationState,\n dismiss: () => DismissNotificationAction,\n};\n\n/**\n */\nexport const useNotification = (): NotificationHook => {\n const dispatch = useDispatch();\n const { render, messageType, message, error } = useSelector(\n (state) => state.notification\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => dispatch(dismissNotification()),\n };\n};\n"],"file":"useNotification.js"}
1
+ {"version":3,"file":"useNotification.js","names":["useNotification","dispatch","state","notification","render","messageType","message","error","dismiss"],"sources":["../../src/hooks/useNotification.js"],"sourcesContent":["// @flow\nimport { useSelector, useDispatch } from \"react-redux\";\nimport { dismissNotification } from \"../redux/actions\";\n\nimport type {\n DismissNotificationAction,\n NotificationState,\n} from \"../redux/types\";\ntype NotificationHook = {\n ...NotificationState,\n dismiss: () => DismissNotificationAction,\n};\n\n/**\n */\nexport const useNotification = (): NotificationHook => {\n const dispatch = useDispatch();\n const { render, messageType, message, error } = useSelector(\n (state) => state.notification\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => dispatch(dismissNotification()),\n };\n};\n"],"mappings":";;;;;;;AACA;;AACA;;AAWA;AACA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,GAAwB;EACrD,IAAMC,QAAQ,GAAG,8BAAjB;;EACA,mBAAgD,6BAC9C,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACC,YAAjB;EAAA,CAD8C,CAAhD;EAAA,IAAQC,MAAR,gBAAQA,MAAR;EAAA,IAAgBC,WAAhB,gBAAgBA,WAAhB;EAAA,IAA6BC,OAA7B,gBAA6BA,OAA7B;EAAA,IAAsCC,KAAtC,gBAAsCA,KAAtC;;EAIA,OAAO;IACLH,MAAM,EAANA,MADK;IAELC,WAAW,EAAXA,WAFK;IAGLC,OAAO,EAAPA,OAHK;IAILC,KAAK,EAALA,KAJK;IAKLC,OAAO,EAAE;MAAA,OAAMP,QAAQ,CAAC,mCAAD,CAAd;IAAA;EALJ,CAAP;AAOD,CAbM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/usePreference.js"],"names":["usePreference","preferenceNames","requestedPreferences","Array","isArray","state","preferences"],"mappings":";;;;;;;;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAC3BC,eAD2B,EAEN;AACrB,MAAMC,oBAAoB,GAAGC,KAAK,CAACC,OAAN,CAAcH,eAAd,IACzBA,eADyB,GAEzB,CAACA,eAAD,CAFJ;AAIA,SAAO,6BAAY,UAACI,KAAD;AAAA,WAAW,mBAAKA,KAAK,CAACC,WAAX,EAAwBJ,oBAAxB,CAAX;AAAA,GAAZ,CAAP;AACD,CARM","sourcesContent":["// @flow\nimport pick from \"lodash/pick\";\nimport { useSelector } from \"react-redux\";\n\nimport type { PreferencesState } from \"../redux/types\";\n\n/**\n */\nexport const usePreference = (\n preferenceNames: string | Array<string>\n): PreferencesState => {\n const requestedPreferences = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return useSelector((state) => pick(state.preferences, requestedPreferences));\n};\n"],"file":"usePreference.js"}
1
+ {"version":3,"file":"usePreference.js","names":["usePreference","preferenceNames","requestedPreferences","Array","isArray","state","preferences"],"sources":["../../src/hooks/usePreference.js"],"sourcesContent":["// @flow\nimport pick from \"lodash/pick\";\nimport { useSelector } from \"react-redux\";\n\nimport type { PreferencesState } from \"../redux/types\";\n\n/**\n */\nexport const usePreference = (\n preferenceNames: string | Array<string>\n): PreferencesState => {\n const requestedPreferences = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return useSelector((state) => pick(state.preferences, requestedPreferences));\n};\n"],"mappings":";;;;;;;;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAC3BC,eAD2B,EAEN;EACrB,IAAMC,oBAAoB,GAAGC,KAAK,CAACC,OAAN,CAAcH,eAAd,IACzBA,eADyB,GAEzB,CAACA,eAAD,CAFJ;EAIA,OAAO,6BAAY,UAACI,KAAD;IAAA,OAAW,mBAAKA,KAAK,CAACC,WAAX,EAAwBJ,oBAAxB,CAAX;EAAA,CAAZ,CAAP;AACD,CARM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useProgressIndicator.js"],"names":["useProgressIndicator","dispatch","progress","state","progressindicator","start","finish","reset","update","percentComplete"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;;;;;AAgBA;AACA;AACO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,GAA6B;AAC/D,MAAMC,QAAQ,GAAG,8BAAjB;AACA,MAAMC,QAAQ,GAAG,6BAAY,UAACC,KAAD;AAAA,WAAWA,KAAK,CAACC,iBAAjB;AAAA,GAAZ,CAAjB;AAEA,yCACKF,QADL;AAEEG,IAAAA,KAAK,EAAE;AAAA,aAAMJ,QAAQ,CAAC,uCAAD,CAAd;AAAA,KAFT;AAGEK,IAAAA,MAAM,EAAE;AAAA,aAAML,QAAQ,CAAC,wCAAD,CAAd;AAAA,KAHV;AAIEM,IAAAA,KAAK,EAAE;AAAA,aAAMN,QAAQ,CAAC,uCAAD,CAAd;AAAA,KAJT;AAKEO,IAAAA,MAAM,EAAE,gBAACC,eAAD;AAAA,aACNR,QAAQ,CAAC,uCAAeQ,eAAf,CAAD,CADF;AAAA;AALV;AAQD,CAZM","sourcesContent":["// @flow\nimport { useDispatch, useSelector } from \"react-redux\";\nimport {\n startProgress,\n finishProgress,\n resetProgress,\n updateProgress,\n} from \"../redux/actions/ProgressIndicator\";\nimport type { ProgressIndicatorState } from \"../redux/types\";\n\ntype ProgressIndicatorHook = {\n ...ProgressIndicatorState,\n start: () => void,\n finish: () => void,\n reset: () => void,\n update: (percentComplete: number) => void,\n};\n\n/**\n */\nexport const useProgressIndicator = (): ProgressIndicatorHook => {\n const dispatch = useDispatch();\n const progress = useSelector((state) => state.progressindicator);\n\n return {\n ...progress,\n start: () => dispatch(startProgress()),\n finish: () => dispatch(finishProgress()),\n reset: () => dispatch(resetProgress()),\n update: (percentComplete: number) =>\n dispatch(updateProgress(percentComplete)),\n };\n};\n"],"file":"useProgressIndicator.js"}
1
+ {"version":3,"file":"useProgressIndicator.js","names":["useProgressIndicator","dispatch","progress","state","progressindicator","start","finish","reset","update","percentComplete"],"sources":["../../src/hooks/useProgressIndicator.js"],"sourcesContent":["// @flow\nimport { useDispatch, useSelector } from \"react-redux\";\nimport {\n startProgress,\n finishProgress,\n resetProgress,\n updateProgress,\n} from \"../redux/actions/ProgressIndicator\";\nimport type { ProgressIndicatorState } from \"../redux/types\";\n\ntype ProgressIndicatorHook = {\n ...ProgressIndicatorState,\n start: () => void,\n finish: () => void,\n reset: () => void,\n update: (percentComplete: number) => void,\n};\n\n/**\n */\nexport const useProgressIndicator = (): ProgressIndicatorHook => {\n const dispatch = useDispatch();\n const progress = useSelector((state) => state.progressindicator);\n\n return {\n ...progress,\n start: () => dispatch(startProgress()),\n finish: () => dispatch(finishProgress()),\n reset: () => dispatch(resetProgress()),\n update: (percentComplete: number) =>\n dispatch(updateProgress(percentComplete)),\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;;;;;AAgBA;AACA;AACO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,GAA6B;EAC/D,IAAMC,QAAQ,GAAG,8BAAjB;EACA,IAAMC,QAAQ,GAAG,6BAAY,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACC,iBAAjB;EAAA,CAAZ,CAAjB;EAEA,uCACKF,QADL;IAEEG,KAAK,EAAE;MAAA,OAAMJ,QAAQ,CAAC,uCAAD,CAAd;IAAA,CAFT;IAGEK,MAAM,EAAE;MAAA,OAAML,QAAQ,CAAC,wCAAD,CAAd;IAAA,CAHV;IAIEM,KAAK,EAAE;MAAA,OAAMN,QAAQ,CAAC,uCAAD,CAAd;IAAA,CAJT;IAKEO,MAAM,EAAE,gBAACC,eAAD;MAAA,OACNR,QAAQ,CAAC,uCAAeQ,eAAf,CAAD,CADF;IAAA;EALV;AAQD,CAZM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useRouter.js"],"names":["useLocation","state","router","location","useLocationKey","key","useQuerystring","search","usePathname","pathname","useNavigation","dispatch","push","replace","go","delta","goBack","goForward"],"mappings":";;;;;;;AACA;;AAGA;;AAqBA;AACA;AACO,IAAMA,WAA4B,GAAG,SAA/BA,WAA+B;AAAA,SAC1C,6BAAY,UAACC,KAAD;AAAA,WAAWA,KAAK,CAACC,MAAN,CAAaC,QAAxB;AAAA,GAAZ,CAD0C;AAAA,CAArC;AAGP;AACA;;;;;AACO,IAAMC,cAAkC,GAAG,SAArCA,cAAqC;AAAA;;AAAA,6CAChDJ,WAAW,EADqC,iDAChD,aAAeK,GADiC,+DAC1B,EAD0B;AAAA,CAA3C;AAGP;AACA;;;;;AACO,IAAMC,cAAkC,GAAG,SAArCA,cAAqC;AAAA;;AAAA,0BAAMN,WAAW,EAAjB,kDAAM,cAAeO,MAArB;AAAA,CAA3C;AAEP;AACA;;;;;AACO,IAAMC,WAA4B,GAAG,SAA/BA,WAA+B;AAAA;;AAAA,0BAAMR,WAAW,EAAjB,kDAAM,cAAeS,QAArB;AAAA,CAArC;AAEP;AACA;;;;;AACO,IAAMC,aAAgC,GAAG,SAAnCA,aAAmC,GAAM;AACpD,MAAMC,QAAQ,GAAG,8BAAjB;AAEA,SAAO;AACLC,IAAAA,IAAI,EAAE,cAACT,QAAD,EAAmCF,KAAnC;AAAA,aACJU,QAAQ,CAAC,mBAAKR,QAAL,EAAeF,KAAf,CAAD,CADJ;AAAA,KADD;AAGLY,IAAAA,OAAO,EAAE,iBAACV,QAAD,EAAmCF,KAAnC;AAAA,aACPU,QAAQ,CAAC,sBAAQR,QAAR,EAAkBF,KAAlB,CAAD,CADD;AAAA,KAHJ;AAKLa,IAAAA,EAAE,EAAE,YAACC,KAAD;AAAA,aAAmBJ,QAAQ,CAAC,iBAAGI,KAAH,CAAD,CAA3B;AAAA,KALC;AAMLC,IAAAA,MAAM,EAAE;AAAA,aAAML,QAAQ,CAAC,sBAAD,CAAd;AAAA,KANH;AAOLM,IAAAA,SAAS,EAAE;AAAA,aAAMN,QAAQ,CAAC,yBAAD,CAAd;AAAA;AAPN,GAAP;AASD,CAZM","sourcesContent":["// @flow\nimport { useDispatch, useSelector } from \"react-redux\";\nimport type { Location, LocationShape } from \"react-router\";\n\nimport { push, replace, go, goBack, goForward } from \"../redux/_router/actions\";\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n PushAction,\n ReplaceAction,\n} from \"../redux\";\n\ntype UseLocationHook = () => Location;\ntype UseLocationKeyHook = () => string;\ntype UseQuerystringHook = () => string;\ntype UsePathnameHook = () => string;\ntype UseNavigationHook = () => {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nexport const useLocation: UseLocationHook = () =>\n useSelector((state) => state.router.location);\n\n/**\n */\nexport const useLocationKey: UseLocationKeyHook = () =>\n useLocation()?.key ?? \"\";\n\n/**\n */\nexport const useQuerystring: UseQuerystringHook = () => useLocation()?.search;\n\n/**\n */\nexport const usePathname: UsePathnameHook = () => useLocation()?.pathname;\n\n/**\n */\nexport const useNavigation: UseNavigationHook = () => {\n const dispatch = useDispatch();\n\n return {\n push: (location: LocationShape | string, state?: { ... }) =>\n dispatch(push(location, state)),\n replace: (location: LocationShape | string, state?: { ... }) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n };\n};\n"],"file":"useRouter.js"}
1
+ {"version":3,"file":"useRouter.js","names":["useLocation","state","router","location","useLocationKey","key","useQuerystring","search","usePathname","pathname","useNavigation","dispatch","push","replace","go","delta","goBack","goForward"],"sources":["../../src/hooks/useRouter.js"],"sourcesContent":["// @flow\nimport { useDispatch, useSelector } from \"react-redux\";\nimport type { Location, LocationShape } from \"react-router\";\n\nimport { push, replace, go, goBack, goForward } from \"../redux/_router/actions\";\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n PushAction,\n ReplaceAction,\n} from \"../redux\";\n\ntype UseLocationHook = () => Location;\ntype UseLocationKeyHook = () => string;\ntype UseQuerystringHook = () => string;\ntype UsePathnameHook = () => string;\ntype UseNavigationHook = () => {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nexport const useLocation: UseLocationHook = () =>\n useSelector((state) => state.router.location);\n\n/**\n */\nexport const useLocationKey: UseLocationKeyHook = () =>\n useLocation()?.key ?? \"\";\n\n/**\n */\nexport const useQuerystring: UseQuerystringHook = () => useLocation()?.search;\n\n/**\n */\nexport const usePathname: UsePathnameHook = () => useLocation()?.pathname;\n\n/**\n */\nexport const useNavigation: UseNavigationHook = () => {\n const dispatch = useDispatch();\n\n return {\n push: (location: LocationShape | string, state?: { ... }) =>\n dispatch(push(location, state)),\n replace: (location: LocationShape | string, state?: { ... }) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n };\n};\n"],"mappings":";;;;;;;AACA;;AAGA;;AAqBA;AACA;AACO,IAAMA,WAA4B,GAAG,SAA/BA,WAA+B;EAAA,OAC1C,6BAAY,UAACC,KAAD;IAAA,OAAWA,KAAK,CAACC,MAAN,CAAaC,QAAxB;EAAA,CAAZ,CAD0C;AAAA,CAArC;AAGP;AACA;;;;;AACO,IAAMC,cAAkC,GAAG,SAArCA,cAAqC;EAAA;;EAAA,2CAChDJ,WAAW,EADqC,iDAChD,aAAeK,GADiC,+DAC1B,EAD0B;AAAA,CAA3C;AAGP;AACA;;;;;AACO,IAAMC,cAAkC,GAAG,SAArCA,cAAqC;EAAA;;EAAA,wBAAMN,WAAW,EAAjB,kDAAM,cAAeO,MAArB;AAAA,CAA3C;AAEP;AACA;;;;;AACO,IAAMC,WAA4B,GAAG,SAA/BA,WAA+B;EAAA;;EAAA,wBAAMR,WAAW,EAAjB,kDAAM,cAAeS,QAArB;AAAA,CAArC;AAEP;AACA;;;;;AACO,IAAMC,aAAgC,GAAG,SAAnCA,aAAmC,GAAM;EACpD,IAAMC,QAAQ,GAAG,8BAAjB;EAEA,OAAO;IACLC,IAAI,EAAE,cAACT,QAAD,EAAmCF,KAAnC;MAAA,OACJU,QAAQ,CAAC,mBAAKR,QAAL,EAAeF,KAAf,CAAD,CADJ;IAAA,CADD;IAGLY,OAAO,EAAE,iBAACV,QAAD,EAAmCF,KAAnC;MAAA,OACPU,QAAQ,CAAC,sBAAQR,QAAR,EAAkBF,KAAlB,CAAD,CADD;IAAA,CAHJ;IAKLa,EAAE,EAAE,YAACC,KAAD;MAAA,OAAmBJ,QAAQ,CAAC,iBAAGI,KAAH,CAAD,CAA3B;IAAA,CALC;IAMLC,MAAM,EAAE;MAAA,OAAML,QAAQ,CAAC,sBAAD,CAAd;IAAA,CANH;IAOLM,SAAS,EAAE;MAAA,OAAMN,QAAQ,CAAC,yBAAD,CAAd;IAAA;EAPN,CAAP;AASD,CAZM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/i18n/Locale.js"],"names":["Locale","locale","_code","code","_messages","fixPlaceHoldersInObject","messages","_errors","errors","_nativeName","nativeName","formatMessage","setup","missingTranslation","aLocale","split","length","language","languages","lang","toUpperCase","IllegalStateException","message","replace","JSON","parse","id","defaultMessage","messageFromLocale","process","env","NODE_ENV","console","debug","fixPlaceHolders","parameters","getBaseMessage"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;;;;;;;AAIA;AACA;AACA;IACMA,M;AAMJ,kBAAYC,MAAZ,EAAyC;AAAA;AAAA;AAAA;AAAA;AAAA;AACvC,SAAKC,KAAL,GAAaD,MAAM,CAACE,IAApB;AAEA,SAAKC,SAAL,GAAiB,KAAKC,uBAAL,CAA6BJ,MAAM,CAACK,QAApC,CAAjB;AACA,SAAKC,OAAL,GAAe,KAAKF,uBAAL,CAA6BJ,MAAM,CAACO,MAApC,CAAf;AAEA,SAAKC,WAAL,GAAmBR,MAAM,CAACS,UAA1B;;AAEAC,4BAAcC,KAAd,CAAoB;AAClBC,MAAAA,kBAAkB,EAAE;AADF,KAApB;AAGD;AAED;AACF;AACA;;;;;SACE,eAAmB;AACjB,aAAO,KAAKX,KAAZ;AACD;AAED;AACF;AACA;;;;SACE,eAAyB;AACvB,UAAI,KAAKO,WAAT,EAAsB;AACpB,eAAO,KAAKA,WAAZ;AACD;;AAED,UAAMK,OAAO,GAAG,KAAKX,IAAL,CAAUY,KAAV,CAAgB,GAAhB,CAAhB;;AAEA,UAAID,OAAO,CAACE,MAAR,GAAiB,CAArB,EAAwB;AACtB,YAAMC,QAAQ,GAAGC,mBAAUC,IAAV,CAAeL,OAAO,CAAC,CAAD,CAAtB,CAAjB;;AAEA,YAAIG,QAAJ,EAAc;AACZ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I,KAAKM,eAAL,CAAqBP,cAArB,CAArB,IAA6DD,EAApE;AACD;AAED;AACF;AACA;;;;WACE,uBAAcJ,OAAd,EAA+Ba,UAA/B,EAAuE;AACrE,UAAIA,UAAJ,EAAgB;AACd,eAAO,6BAAcb,OAAd,EAAuBa,UAAvB,CAAP;AACD;;AAED,aAAOb,OAAP;AACD;AAED;AACF;AACA;;;;WACE,oBACEI,EADF,EAEEC,cAFF,EAGEQ,UAHF,EAIU;AACR,UAAMb,OAAO,GAAG,KAAKc,cAAL,CAAoBV,EAApB,EAAwBC,cAAxB,CAAhB;AACA,aAAO,KAAKhB,aAAL,CAAmBW,OAAnB,EAA4Ba,UAA5B,CAAP;AACD;AAED;AACF;AACA;;;;WACE,kBAAmD;AAAA,UAA5C7B,QAA4C,uEAAzB,EAAyB;AAAA,UAArBE,MAAqB,uEAAJ,EAAI;AACjD,WAAKJ,SAAL,mCACK,KAAKA,SADV,GAEK,KAAKC,uBAAL,CAA6BC,QAA7B,CAFL;AAKA,WAAKC,OAAL,mCACK,KAAKA,OADV,GAEK,KAAKF,uBAAL,CAA6BG,MAA7B,CAFL;AAID;;;;;eAGYR,M","sourcesContent":["// @flow\nimport formatMessage from \"format-message\";\n\nimport languages from \"./languages\";\nimport { IllegalStateException } from \"../exceptions\";\n\nimport { getSetting } from \"../constants\";\n\nimport type { LocaleConfiguration, MessageParameters } from \"./types\";\n\n/**\n * Create a locale\n */\nclass Locale {\n _code: string;\n _messages: { [string]: string };\n _errors: { [string]: string };\n _nativeName: ?string;\n\n constructor(locale: LocaleConfiguration) {\n this._code = locale.code;\n\n this._messages = this.fixPlaceHoldersInObject(locale.messages);\n this._errors = this.fixPlaceHoldersInObject(locale.errors);\n\n this._nativeName = locale.nativeName;\n\n formatMessage.setup({\n missingTranslation: \"ignore\",\n });\n }\n\n /**\n * Retrieve locale code\n */\n get code(): string {\n return this._code;\n }\n\n /**\n * Retrieve nativeName\n */\n get nativeName(): string {\n if (this._nativeName) {\n return this._nativeName;\n }\n\n const aLocale = this.code.split(\"-\");\n\n if (aLocale.length > 0) {\n const language = languages.lang[aLocale[0]];\n\n if (language) {\n return (\n language[1] + (aLocale[1] ? ` (${aLocale[1].toUpperCase()})` : \"\")\n );\n }\n }\n\n throw new IllegalStateException(\n `Can not find language name based on locale: ${this.code}`\n );\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHolders(message: ?string): null | string {\n if (typeof message === \"string\") {\n return message\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\");\n }\n\n return null;\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHoldersInObject(messages: Object = {}): Object {\n return JSON.parse(\n JSON.stringify(messages)\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\")\n );\n }\n\n /**\n * Retrieve message by id\n */\n getBaseMessage(id: string, defaultMessage?: string): string {\n if (!id && !defaultMessage) {\n return \"[message: id or defaultMessage missing]\";\n }\n\n const messageFromLocale = this._messages[id] || this._errors[id];\n\n if (\n (typeof process === \"undefined\" ||\n process.env.NODE_ENV !== \"production\") &&\n !messageFromLocale &&\n id &&\n getSetting(\"DEBUG_I18N_MESSAGE_NOT_FOUND\")\n ) {\n // eslint-disable-next-line no-console\n console.debug(\n `Message with id ${id} not found for locale ${this.code} in layout translations`\n );\n }\n return messageFromLocale || this.fixPlaceHolders(defaultMessage) || id;\n }\n\n /**\n * Format message using formatMessage library\n */\n formatMessage(message: string, parameters?: MessageParameters): string {\n if (parameters) {\n return formatMessage(message, parameters);\n }\n\n return message;\n }\n\n /**\n * Retrieve a messages with replaced parameters\n */\n getMessage(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters\n ): string {\n const message = this.getBaseMessage(id, defaultMessage);\n return this.formatMessage(message, parameters);\n }\n\n /**\n * Add or change messages for this locale. It is not possible to remove messages.\n */\n update(messages: Object = {}, errors: Object = {}) {\n this._messages = {\n ...this._messages,\n ...this.fixPlaceHoldersInObject(messages),\n };\n\n this._errors = {\n ...this._errors,\n ...this.fixPlaceHoldersInObject(errors),\n };\n }\n}\n\nexport default Locale;\n"],"file":"Locale.js"}
1
+ {"version":3,"file":"Locale.js","names":["Locale","locale","_code","code","_messages","fixPlaceHoldersInObject","messages","_errors","errors","_nativeName","nativeName","formatMessage","setup","missingTranslation","aLocale","split","length","language","languages","lang","toUpperCase","IllegalStateException","message","replace","JSON","parse","id","defaultMessage","messageFromLocale","process","env","NODE_ENV","console","debug","fixPlaceHolders","parameters","getBaseMessage"],"sources":["../../src/i18n/Locale.js"],"sourcesContent":["// @flow\nimport formatMessage from \"format-message\";\n\nimport languages from \"./languages\";\nimport { IllegalStateException } from \"../exceptions\";\n\nimport { getSetting } from \"../constants\";\n\nimport type { LocaleConfiguration, MessageParameters } from \"./types\";\n\n/**\n * Create a locale\n */\nclass Locale {\n _code: string;\n _messages: { [string]: string };\n _errors: { [string]: string };\n _nativeName: ?string;\n\n constructor(locale: LocaleConfiguration) {\n this._code = locale.code;\n\n this._messages = this.fixPlaceHoldersInObject(locale.messages);\n this._errors = this.fixPlaceHoldersInObject(locale.errors);\n\n this._nativeName = locale.nativeName;\n\n formatMessage.setup({\n missingTranslation: \"ignore\",\n });\n }\n\n /**\n * Retrieve locale code\n */\n get code(): string {\n return this._code;\n }\n\n /**\n * Retrieve nativeName\n */\n get nativeName(): string {\n if (this._nativeName) {\n return this._nativeName;\n }\n\n const aLocale = this.code.split(\"-\");\n\n if (aLocale.length > 0) {\n const language = languages.lang[aLocale[0]];\n\n if (language) {\n return (\n language[1] + (aLocale[1] ? ` (${aLocale[1].toUpperCase()})` : \"\")\n );\n }\n }\n\n throw new IllegalStateException(\n `Can not find language name based on locale: ${this.code}`\n );\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHolders(message: ?string): null | string {\n if (typeof message === \"string\") {\n return message\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\");\n }\n\n return null;\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHoldersInObject(messages: Object = {}): Object {\n return JSON.parse(\n JSON.stringify(messages)\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\")\n );\n }\n\n /**\n * Retrieve message by id\n */\n getBaseMessage(id: string, defaultMessage?: string): string {\n if (!id && !defaultMessage) {\n return \"[message: id or defaultMessage missing]\";\n }\n\n const messageFromLocale = this._messages[id] || this._errors[id];\n\n if (\n (typeof process === \"undefined\" ||\n process.env.NODE_ENV !== \"production\") &&\n !messageFromLocale &&\n id &&\n getSetting(\"DEBUG_I18N_MESSAGE_NOT_FOUND\")\n ) {\n // eslint-disable-next-line no-console\n console.debug(\n `Message with id ${id} not found for locale ${this.code} in layout translations`\n );\n }\n return messageFromLocale || this.fixPlaceHolders(defaultMessage) || id;\n }\n\n /**\n * Format message using formatMessage library\n */\n formatMessage(message: string, parameters?: MessageParameters): string {\n if (parameters) {\n return formatMessage(message, parameters);\n }\n\n return message;\n }\n\n /**\n * Retrieve a messages with replaced parameters\n */\n getMessage(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters\n ): string {\n const message = this.getBaseMessage(id, defaultMessage);\n return this.formatMessage(message, parameters);\n }\n\n /**\n * Add or change messages for this locale. It is not possible to remove messages.\n */\n update(messages: Object = {}, errors: Object = {}) {\n this._messages = {\n ...this._messages,\n ...this.fixPlaceHoldersInObject(messages),\n };\n\n this._errors = {\n ...this._errors,\n ...this.fixPlaceHoldersInObject(errors),\n };\n }\n}\n\nexport default Locale;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;;;;;;;AAIA;AACA;AACA;IACMA,M;EAMJ,gBAAYC,MAAZ,EAAyC;IAAA;IAAA;IAAA;IAAA;IAAA;IACvC,KAAKC,KAAL,GAAaD,MAAM,CAACE,IAApB;IAEA,KAAKC,SAAL,GAAiB,KAAKC,uBAAL,CAA6BJ,MAAM,CAACK,QAApC,CAAjB;IACA,KAAKC,OAAL,GAAe,KAAKF,uBAAL,CAA6BJ,MAAM,CAACO,MAApC,CAAf;IAEA,KAAKC,WAAL,GAAmBR,MAAM,CAACS,UAA1B;;IAEAC,wBAAcC,KAAd,CAAoB;MAClBC,kBAAkB,EAAE;IADF,CAApB;EAGD;EAED;AACF;AACA;;;;;SACE,eAAmB;MACjB,OAAO,KAAKX,KAAZ;IACD;IAED;AACF;AACA;;;;SACE,eAAyB;MACvB,IAAI,KAAKO,WAAT,EAAsB;QACpB,OAAO,KAAKA,WAAZ;MACD;;MAED,IAAMK,OAAO,GAAG,KAAKX,IAAL,CAAUY,KAAV,CAAgB,GAAhB,CAAhB;;MAEA,IAAID,OAAO,CAACE,MAAR,GAAiB,CAArB,EAAwB;QACtB,IAAMC,QAAQ,GAAGC,mBAAUC,IAAV,CAAeL,OAAO,CAAC,CAAD,CAAtB,CAAjB;;QAEA,IAAIG,QAAJ,EAAc;UACZ,OACEA,QAAQ,CAAC,CAAD,CAAR,IAAeH,OAAO,CAAC,CAAD,CAAP,eAAkBA,OAAO,CAAC,CAAD,CAAP,CAAWM,WAAX,EAAlB,SAAgD,EAA/D,CADF;QAGD;MACF;;MAED,MAAM,IAAIC,iCAAJ,uDAC2C,KAAKlB,IADhD,EAAN;IAGD;IAED;AACF;A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