@beinformed/ui 1.28.2 → 1.28.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  3. package/esm/constants/LayoutHints.js.map +1 -1
  4. package/esm/constants/Settings.js.map +1 -1
  5. package/esm/exceptions/ConfigurationException.js.map +1 -1
  6. package/esm/exceptions/FetchException.js.map +1 -1
  7. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  8. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  9. package/esm/exceptions/IllegalStateException.js.map +1 -1
  10. package/esm/exceptions/JsonParseException.js.map +1 -1
  11. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  12. package/esm/exceptions/NetworkException.js.map +1 -1
  13. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  14. package/esm/exceptions/NotFoundException.js.map +1 -1
  15. package/esm/exceptions/ServerRequestException.js.map +1 -1
  16. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  17. package/esm/exceptions/TimeoutException.js.map +1 -1
  18. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  19. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  20. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  21. package/esm/hooks/useAuthentication.js.map +1 -1
  22. package/esm/hooks/useContent.js.map +1 -1
  23. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  24. package/esm/hooks/useForm.js.map +1 -1
  25. package/esm/hooks/useI18n.js.map +1 -1
  26. package/esm/hooks/useModal.js.map +1 -1
  27. package/esm/hooks/useModelCatalog.js.map +1 -1
  28. package/esm/hooks/useModels.js.map +1 -1
  29. package/esm/hooks/useModularUI.js.map +1 -1
  30. package/esm/hooks/useModularUIBasic.js.map +1 -1
  31. package/esm/hooks/useModularUIModel.js.map +1 -1
  32. package/esm/hooks/useModularUIRequest.js.map +1 -1
  33. package/esm/hooks/useNotification.js.map +1 -1
  34. package/esm/hooks/useProgressIndicator.js.map +1 -1
  35. package/esm/hooks/useRouter.js.map +1 -1
  36. package/esm/i18n/Locale.js.map +1 -1
  37. package/esm/i18n/Locales.js.map +1 -1
  38. package/esm/i18n/Message.js.map +1 -1
  39. package/esm/i18n/withMessage.js.map +1 -1
  40. package/esm/models/actions/ActionCollection.js.map +1 -1
  41. package/esm/models/actions/ActionModel.js.map +1 -1
  42. package/esm/models/application/ApplicationModel.js.map +1 -1
  43. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  44. package/esm/models/attributes/AttributeContent.js.map +1 -1
  45. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  46. package/esm/models/attributes/AttributeModel.js.map +1 -1
  47. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  48. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  49. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  50. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  51. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  52. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  53. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  54. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  55. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  56. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  57. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  58. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  59. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  60. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  61. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  62. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  63. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  64. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  65. package/esm/models/attributes/_createAttribute.js.map +1 -1
  66. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  67. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  68. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  69. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  70. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  71. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  72. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  73. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  74. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  75. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  76. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  77. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  78. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  79. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  80. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  81. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  82. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  83. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  84. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  85. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  86. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  87. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  88. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  89. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  90. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  91. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  92. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  93. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  94. package/esm/models/base/BaseCollection.js.map +1 -1
  95. package/esm/models/base/BaseModel.js.map +1 -1
  96. package/esm/models/base/ResourceCollection.js.map +1 -1
  97. package/esm/models/base/ResourceModel.js.map +1 -1
  98. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  99. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  100. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  101. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  102. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  103. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  104. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  105. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  106. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  107. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  108. package/esm/models/content/ContentIndexModel.js.map +1 -1
  109. package/esm/models/content/ContentLinkModel.js.map +1 -1
  110. package/esm/models/content/ContentModel.js.map +1 -1
  111. package/esm/models/content/ContentTOCModel.js.map +1 -1
  112. package/esm/models/content/ContentTypeModel.js.map +1 -1
  113. package/esm/models/content/SectionModel.js.map +1 -1
  114. package/esm/models/content/SubSectionModel.js.map +1 -1
  115. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  116. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  117. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  118. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  119. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  120. package/esm/models/detail/DetailModel.js.map +1 -1
  121. package/esm/models/error/ErrorCollection.js.map +1 -1
  122. package/esm/models/error/ErrorModel.js.map +1 -1
  123. package/esm/models/error/ErrorResponse.js.map +1 -1
  124. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  125. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  126. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  127. package/esm/models/filters/FilterCollection.js.map +1 -1
  128. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  129. package/esm/models/form/FormModel.js.map +1 -1
  130. package/esm/models/form/FormObjectModel.js.map +1 -1
  131. package/esm/models/grouping/GroupingModel.js.map +1 -1
  132. package/esm/models/href/Href.js.map +1 -1
  133. package/esm/models/href/ListHref.js.map +1 -1
  134. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  135. package/esm/models/links/LinkCollection.js.map +1 -1
  136. package/esm/models/links/LinkModel.js.map +1 -1
  137. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  138. package/esm/models/list/ListDetailModel.js.map +1 -1
  139. package/esm/models/list/ListHeaderModel.js.map +1 -1
  140. package/esm/models/list/ListItemCollection.js.map +1 -1
  141. package/esm/models/list/ListItemModel.js.map +1 -1
  142. package/esm/models/list/ListModel.js.map +1 -1
  143. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  144. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  145. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  146. package/esm/models/paging/PagesizeModel.js.map +1 -1
  147. package/esm/models/paging/PagingModel.js.map +1 -1
  148. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  149. package/esm/models/parameter/Parameter.js.map +1 -1
  150. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  151. package/esm/models/resolveModel.js.map +1 -1
  152. package/esm/models/search/CaseSearchModel.js.map +1 -1
  153. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  154. package/esm/models/sorting/SortingModel.js.map +1 -1
  155. package/esm/models/tab/TabModel.js.map +1 -1
  156. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  157. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  158. package/esm/models/user/UserModel.js.map +1 -1
  159. package/esm/models/user/UserProfileModel.js.map +1 -1
  160. package/esm/models/user/UserServicesModel.js.map +1 -1
  161. package/esm/modularui/Authenticate.js.map +1 -1
  162. package/esm/modularui/CaptchaRequest.js.map +1 -1
  163. package/esm/modularui/ModularUIError.js.map +1 -1
  164. package/esm/modularui/ModularUIRequest.js.map +1 -1
  165. package/esm/modularui/ModularUIResponse.js.map +1 -1
  166. package/esm/modularui/UploadRequest.js.map +1 -1
  167. package/esm/react/ErrorBoundary.js.map +1 -1
  168. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  169. package/esm/react/utils.js.map +1 -1
  170. package/esm/react-client/Init.js.map +1 -1
  171. package/esm/react-client/client.js +6 -5
  172. package/esm/react-client/client.js.map +1 -1
  173. package/esm/react-client/contextPath.js.map +1 -1
  174. package/esm/react-client/rehydrate.js.map +1 -1
  175. package/esm/react-server/contextPath.js.map +1 -1
  176. package/esm/react-server/createSSRComplete.js.map +1 -1
  177. package/esm/react-server/htmlpage.js.map +1 -1
  178. package/esm/react-server/renderSSRComplete.js.map +1 -1
  179. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  180. package/esm/react-server/requestInformation.js.map +1 -1
  181. package/esm/react-server/serverNoSSR.js.map +1 -1
  182. package/esm/react-server/serverSSR.js.map +1 -1
  183. package/esm/react-server/serverUtil.js.map +1 -1
  184. package/esm/react-theme/ThemeProvider.js.map +1 -1
  185. package/esm/react-theme/createTheme.js.map +1 -1
  186. package/esm/react-theme/useTheme.js.map +1 -1
  187. package/esm/react-theme/utils/background.js.map +1 -1
  188. package/esm/react-theme/utils/colors.js.map +1 -1
  189. package/esm/react-theme/utils/contrast.js.map +1 -1
  190. package/esm/react-theme/utils/corners.js.map +1 -1
  191. package/esm/react-theme/utils/spacers.js.map +1 -1
  192. package/esm/react-theme/utils/themeProps.js.map +1 -1
  193. package/esm/redux/_i18n/I18nActions.js.map +1 -1
  194. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  195. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  196. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  197. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  198. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  199. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
  200. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  201. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  202. package/esm/redux/_router/RouterActions.js.map +1 -1
  203. package/esm/redux/_router/RouterReducer.js.map +1 -1
  204. package/esm/redux/actions/Application.js.map +1 -1
  205. package/esm/redux/actions/Error.js.map +1 -1
  206. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  207. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  208. package/esm/redux/actions/FormAutosave.js.map +1 -1
  209. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  210. package/esm/redux/actions/FormValidations.js.map +1 -1
  211. package/esm/redux/actions/Notification.js.map +1 -1
  212. package/esm/redux/actions/Preferences.js +2 -2
  213. package/esm/redux/actions/Preferences.js.map +1 -1
  214. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  215. package/esm/redux/actions/SignIn.js.map +1 -1
  216. package/esm/redux/actions/SignOut.js.map +1 -1
  217. package/esm/redux/connectors/CaseView.js.map +1 -1
  218. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  219. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  220. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  221. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  222. package/esm/redux/connectors/Form.js.map +1 -1
  223. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  224. package/esm/redux/connectors/ListDetail.js.map +1 -1
  225. package/esm/redux/connectors/Modal.js.map +1 -1
  226. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  227. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  228. package/esm/redux/connectors/Preferences.js.map +1 -1
  229. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  230. package/esm/redux/connectors/Tab.js.map +1 -1
  231. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  232. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  233. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  234. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  235. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  236. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  237. package/esm/redux/reducers/createReducer.js.map +1 -1
  238. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  239. package/esm/redux/store/configureStore.js.map +1 -1
  240. package/esm/utils/browser/Cache.js.map +1 -1
  241. package/esm/utils/browser/Cookies.js.map +1 -1
  242. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  243. package/esm/utils/fetch/serverFetch.js.map +1 -1
  244. package/esm/utils/fetch/universalFetch.js.map +1 -1
  245. package/esm/utils/fetch/xhr.js.map +1 -1
  246. package/esm/utils/helpers/checkResource.js.map +1 -1
  247. package/esm/utils/helpers/createUUID.js.map +1 -1
  248. package/esm/utils/helpers/objects.js.map +1 -1
  249. package/esm/utils/helpers/repositoryResource.js.map +1 -1
  250. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  251. package/esm/utils/number/DecimalFormat.js.map +1 -1
  252. package/esm/utils/number/formatValue.js.map +1 -1
  253. package/esm/utils/number/parseNumbers.js.map +1 -1
  254. package/lib/builder/index.js.map +1 -1
  255. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  256. package/lib/constants/Constants.js.map +1 -1
  257. package/lib/constants/LayoutHintConfig.js.map +1 -1
  258. package/lib/constants/LayoutHints.js.map +1 -1
  259. package/lib/constants/Settings.js.map +1 -1
  260. package/lib/constants/index.js.map +1 -1
  261. package/lib/exceptions/ConfigurationException.js.map +1 -1
  262. package/lib/exceptions/FetchException.js.map +1 -1
  263. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  264. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  265. package/lib/exceptions/IllegalStateException.js.map +1 -1
  266. package/lib/exceptions/JsonParseException.js.map +1 -1
  267. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  268. package/lib/exceptions/NetworkException.js.map +1 -1
  269. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  270. package/lib/exceptions/NotFoundException.js.map +1 -1
  271. package/lib/exceptions/ServerRequestException.js.map +1 -1
  272. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  273. package/lib/exceptions/TimeoutException.js.map +1 -1
  274. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  275. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  276. package/lib/exceptions/index.js.map +1 -1
  277. package/lib/hooks/index.js.map +1 -1
  278. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  279. package/lib/hooks/useAuthentication.js.map +1 -1
  280. package/lib/hooks/useContent.js.map +1 -1
  281. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  282. package/lib/hooks/useForm.js.map +1 -1
  283. package/lib/hooks/useI18n.js.map +1 -1
  284. package/lib/hooks/useModal.js.map +1 -1
  285. package/lib/hooks/useModelCatalog.js.map +1 -1
  286. package/lib/hooks/useModels.js.map +1 -1
  287. package/lib/hooks/useModularUI.js.map +1 -1
  288. package/lib/hooks/useModularUIBasic.js.map +1 -1
  289. package/lib/hooks/useModularUIModel.js.map +1 -1
  290. package/lib/hooks/useModularUIRequest.js.map +1 -1
  291. package/lib/hooks/useNotification.js.map +1 -1
  292. package/lib/hooks/usePreference.js.map +1 -1
  293. package/lib/hooks/useProgressIndicator.js.map +1 -1
  294. package/lib/hooks/useRouter.js.map +1 -1
  295. package/lib/i18n/Locale.js.map +1 -1
  296. package/lib/i18n/Locales.js.map +1 -1
  297. package/lib/i18n/Message.js.map +1 -1
  298. package/lib/i18n/index.js.map +1 -1
  299. package/lib/i18n/languages.js.map +1 -1
  300. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  301. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  302. package/lib/i18n/withMessage.js.map +1 -1
  303. package/lib/index.js.map +1 -1
  304. package/lib/models/actions/ActionCollection.js.map +1 -1
  305. package/lib/models/actions/ActionModel.js.map +1 -1
  306. package/lib/models/application/ApplicationModel.js.map +1 -1
  307. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  308. package/lib/models/attributes/AttributeContent.js.map +1 -1
  309. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  310. package/lib/models/attributes/AttributeModel.js.map +1 -1
  311. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  312. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  313. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  314. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  315. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  316. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  317. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  318. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  319. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  320. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  321. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  322. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  323. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  324. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  325. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  326. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  327. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  328. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  329. package/lib/models/attributes/_createAttribute.js.map +1 -1
  330. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  331. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  332. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  333. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  334. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  335. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  336. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  337. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  338. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  339. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  340. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  341. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  342. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  343. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  344. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  345. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  346. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  347. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  348. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  349. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  350. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  351. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  352. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  353. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  354. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  355. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  356. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  357. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  358. package/lib/models/base/BaseCollection.js.map +1 -1
  359. package/lib/models/base/BaseModel.js.map +1 -1
  360. package/lib/models/base/ResourceCollection.js.map +1 -1
  361. package/lib/models/base/ResourceModel.js.map +1 -1
  362. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  363. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  364. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  365. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  366. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  367. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  368. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  369. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  370. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  371. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  372. package/lib/models/content/ContentIndexModel.js.map +1 -1
  373. package/lib/models/content/ContentLinkModel.js.map +1 -1
  374. package/lib/models/content/ContentModel.js.map +1 -1
  375. package/lib/models/content/ContentTOCModel.js.map +1 -1
  376. package/lib/models/content/ContentTypeModel.js.map +1 -1
  377. package/lib/models/content/SectionModel.js.map +1 -1
  378. package/lib/models/content/SubSectionModel.js.map +1 -1
  379. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  380. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  381. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  382. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  383. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  384. package/lib/models/detail/DetailModel.js.map +1 -1
  385. package/lib/models/error/ErrorCollection.js.map +1 -1
  386. package/lib/models/error/ErrorModel.js.map +1 -1
  387. package/lib/models/error/ErrorResponse.js.map +1 -1
  388. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  389. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  390. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  391. package/lib/models/filters/FilterCollection.js.map +1 -1
  392. package/lib/models/filters/FilterModel.js.map +1 -1
  393. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  394. package/lib/models/form/FormModel.js.map +1 -1
  395. package/lib/models/form/FormObjectModel.js.map +1 -1
  396. package/lib/models/grouping/GroupingModel.js.map +1 -1
  397. package/lib/models/href/Href.js.map +1 -1
  398. package/lib/models/href/ListHref.js.map +1 -1
  399. package/lib/models/index.js.map +1 -1
  400. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  401. package/lib/models/links/LinkCollection.js.map +1 -1
  402. package/lib/models/links/LinkModel.js.map +1 -1
  403. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  404. package/lib/models/list/ListDetailModel.js.map +1 -1
  405. package/lib/models/list/ListHeaderModel.js.map +1 -1
  406. package/lib/models/list/ListItemCollection.js.map +1 -1
  407. package/lib/models/list/ListItemModel.js.map +1 -1
  408. package/lib/models/list/ListModel.js.map +1 -1
  409. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  410. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  411. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  412. package/lib/models/paging/PagesizeModel.js.map +1 -1
  413. package/lib/models/paging/PagingModel.js.map +1 -1
  414. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  415. package/lib/models/parameter/Parameter.js.map +1 -1
  416. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  417. package/lib/models/resolveModel.js.map +1 -1
  418. package/lib/models/search/CaseSearchModel.js.map +1 -1
  419. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  420. package/lib/models/sorting/SortingModel.js.map +1 -1
  421. package/lib/models/tab/TabModel.js.map +1 -1
  422. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  423. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  424. package/lib/models/user/UserModel.js.map +1 -1
  425. package/lib/models/user/UserProfileModel.js.map +1 -1
  426. package/lib/models/user/UserServicesModel.js.map +1 -1
  427. package/lib/modularui/Authenticate.js.map +1 -1
  428. package/lib/modularui/CaptchaRequest.js.map +1 -1
  429. package/lib/modularui/ModularUIError.js.map +1 -1
  430. package/lib/modularui/ModularUIRequest.js.map +1 -1
  431. package/lib/modularui/ModularUIResponse.js.map +1 -1
  432. package/lib/modularui/UploadRequest.js.map +1 -1
  433. package/lib/modularui/index.js.map +1 -1
  434. package/lib/react/ErrorBoundary.js.map +1 -1
  435. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  436. package/lib/react/index.js.map +1 -1
  437. package/lib/react/utils.js.map +1 -1
  438. package/lib/react-client/Init.js.map +1 -1
  439. package/lib/react-client/client.js +6 -5
  440. package/lib/react-client/client.js.flow +14 -7
  441. package/lib/react-client/client.js.map +1 -1
  442. package/lib/react-client/contextPath.js.map +1 -1
  443. package/lib/react-client/index.js.map +1 -1
  444. package/lib/react-client/rehydrate.js.map +1 -1
  445. package/lib/react-server/__tests__/serverUtil.spec.js.flow +4 -4
  446. package/lib/react-server/contextPath.js.map +1 -1
  447. package/lib/react-server/createSSRComplete.js.map +1 -1
  448. package/lib/react-server/htmlpage.js.map +1 -1
  449. package/lib/react-server/index.js.map +1 -1
  450. package/lib/react-server/renderSSRComplete.js.map +1 -1
  451. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  452. package/lib/react-server/requestInformation.js.map +1 -1
  453. package/lib/react-server/serverNoSSR.js.map +1 -1
  454. package/lib/react-server/serverSSR.js.map +1 -1
  455. package/lib/react-server/serverUtil.js.map +1 -1
  456. package/lib/react-theme/ThemeProvider.js.map +1 -1
  457. package/lib/react-theme/createTheme.js.map +1 -1
  458. package/lib/react-theme/index.js.map +1 -1
  459. package/lib/react-theme/useTheme.js.map +1 -1
  460. package/lib/react-theme/utils/background.js.map +1 -1
  461. package/lib/react-theme/utils/colors.js.map +1 -1
  462. package/lib/react-theme/utils/contrast.js.map +1 -1
  463. package/lib/react-theme/utils/corners.js.map +1 -1
  464. package/lib/react-theme/utils/spacers.js.map +1 -1
  465. package/lib/react-theme/utils/themeProps.js.map +1 -1
  466. package/lib/redux/_i18n/I18nActions.js.map +1 -1
  467. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  468. package/lib/redux/_i18n/index.js.map +1 -1
  469. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  470. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  471. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  472. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  473. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  474. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  475. package/lib/redux/_modularui/index.js.map +1 -1
  476. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  477. package/lib/redux/_router/RouterActions.js.map +1 -1
  478. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  479. package/lib/redux/_router/RouterMiddleware.js.map +1 -1
  480. package/lib/redux/_router/RouterReducer.js.map +1 -1
  481. package/lib/redux/_router/index.js.map +1 -1
  482. package/lib/redux/actions/Application.js.map +1 -1
  483. package/lib/redux/actions/Authorization.js.map +1 -1
  484. package/lib/redux/actions/Error.js.map +1 -1
  485. package/lib/redux/actions/Form.js.map +1 -1
  486. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  487. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  488. package/lib/redux/actions/FormAutosave.js.map +1 -1
  489. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  490. package/lib/redux/actions/FormValidations.js.map +1 -1
  491. package/lib/redux/actions/Modals.js.map +1 -1
  492. package/lib/redux/actions/Notification.js.map +1 -1
  493. package/lib/redux/actions/Preferences.js +2 -2
  494. package/lib/redux/actions/Preferences.js.flow +3 -2
  495. package/lib/redux/actions/Preferences.js.map +1 -1
  496. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  497. package/lib/redux/actions/SignIn.js.map +1 -1
  498. package/lib/redux/actions/SignOut.js.map +1 -1
  499. package/lib/redux/actions/index.js.map +1 -1
  500. package/lib/redux/connectors/Application.js.map +1 -1
  501. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  502. package/lib/redux/connectors/CaseView.js.map +1 -1
  503. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  504. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  505. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  506. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  507. package/lib/redux/connectors/Form.js.map +1 -1
  508. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  509. package/lib/redux/connectors/ListDetail.js.map +1 -1
  510. package/lib/redux/connectors/Modal.js.map +1 -1
  511. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  512. package/lib/redux/connectors/Notification.js.map +1 -1
  513. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  514. package/lib/redux/connectors/Preferences.js.map +1 -1
  515. package/lib/redux/connectors/Progress.js.map +1 -1
  516. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  517. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  518. package/lib/redux/connectors/SignIn.js.map +1 -1
  519. package/lib/redux/connectors/SignOut.js.map +1 -1
  520. package/lib/redux/connectors/Tab.js.map +1 -1
  521. package/lib/redux/connectors/index.js.map +1 -1
  522. package/lib/redux/index.js.map +1 -1
  523. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  524. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  525. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  526. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  527. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  528. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  529. package/lib/redux/reducers/createReducer.js.map +1 -1
  530. package/lib/redux/reducers/index.js.map +1 -1
  531. package/lib/redux/selectors/i18n.js.map +1 -1
  532. package/lib/redux/selectors/index.js.map +1 -1
  533. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  534. package/lib/redux/store/configureStore.js.map +1 -1
  535. package/lib/utils/browser/Cache.js.map +1 -1
  536. package/lib/utils/browser/Cookies.js.map +1 -1
  537. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  538. package/lib/utils/fetch/serverFetch.js.map +1 -1
  539. package/lib/utils/fetch/universalFetch.js.map +1 -1
  540. package/lib/utils/fetch/xhr.js.map +1 -1
  541. package/lib/utils/helpers/checkResource.js.map +1 -1
  542. package/lib/utils/helpers/createHash.js.map +1 -1
  543. package/lib/utils/helpers/createUUID.js.map +1 -1
  544. package/lib/utils/helpers/index.js.map +1 -1
  545. package/lib/utils/helpers/objects.js.map +1 -1
  546. package/lib/utils/helpers/repositoryResource.js.map +1 -1
  547. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  548. package/lib/utils/helpers/text.js.map +1 -1
  549. package/lib/utils/index.js.map +1 -1
  550. package/lib/utils/number/DecimalFormat.js.map +1 -1
  551. package/lib/utils/number/formatValue.js.map +1 -1
  552. package/lib/utils/number/parseNumbers.js.map +1 -1
  553. package/package.json +5 -5
  554. package/src/react-client/client.js +14 -7
  555. package/src/react-server/__tests__/serverUtil.spec.js +4 -4
  556. package/src/redux/actions/Preferences.js +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"UploadRequest.js","names":["UploadRequest","constructor","uploadConstraints","progressHandler","_uploadConstraints","_progressHandler","getFileExtension","file","name","split","pop","toLowerCase","isNotAllowedFileType","allowedFileTypes","fileTypes","length","fileExtension","some","fileType","extensions","exceedsMaxFileSize","maxFileSize","fileSize","size","uploadFile","error","reject","ErrorModel","extension","join","xhr","url","getUploadPath","method","HTTP_METHODS","POST","headers","type","encodeURIComponent","toString","onProgress","e","lengthComputable","progress","Math","ceil","loaded","total","data","then","response","token"],"sources":["../../src/modularui/UploadRequest.js"],"sourcesContent":["// @flow\nimport { getUploadPath, HTTP_METHODS } from \"../constants\";\n\nimport xhr from \"../utils/fetch/xhr\";\n\nimport type {\n FilesizeConstraintsType,\n FiletypeConstraintsType,\n} from \"../models\";\nimport ErrorModel from \"../models/error/ErrorModel\";\n\ntype ProgressHandler = (file: File, uploadInfo: Object) => void;\n\ntype UploadResponse = {\n token: string,\n};\n\n/**\n * Upload a file to the upload file service of Be Informed\n */\nclass UploadRequest {\n _uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n };\n _progressHandler: ProgressHandler;\n\n constructor(\n uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n },\n progressHandler: ProgressHandler\n ) {\n this._uploadConstraints = uploadConstraints;\n this._progressHandler = progressHandler;\n }\n\n /**\n */\n getFileExtension(file: File): string {\n return file.name.split(\".\").pop().toLowerCase();\n }\n\n /**\n */\n isNotAllowedFileType(file: File): boolean {\n const allowedFileTypes = this._uploadConstraints.fileTypes;\n\n if (allowedFileTypes.length > 0) {\n const fileExtension = this.getFileExtension(file);\n\n return !allowedFileTypes.some((fileType) =>\n fileType.extensions.includes(fileExtension)\n );\n }\n\n return false;\n }\n\n /**\n */\n exceedsMaxFileSize(file: File): boolean {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n return maxFileSize > -1 && file.size > maxFileSize;\n }\n\n /**\n */\n uploadFile(file: File): Promise<UploadResponse> {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n\n if (this.exceedsMaxFileSize(file)) {\n this._progressHandler(file, { error: \"errorExceedsMaxFileSize\" });\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.MaxFileSizeExceeded\",\n \"Maximum file upload size is ${max-filesize}\",\n {\n \"max-filesize\": maxFileSize,\n },\n true\n )\n );\n }\n\n if (this.isNotAllowedFileType(file)) {\n this._progressHandler(file, { error: \"errorExtensionNotAllowed\" });\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.InvalidExtension\",\n \"Allowed extensions are: ${extensions}\",\n {\n extension: this.getFileExtension(file),\n extensions: this._uploadConstraints.fileTypes.join(\", \"),\n },\n true\n )\n );\n }\n\n return xhr({\n url: getUploadPath(),\n method: HTTP_METHODS.POST,\n headers: {\n \"Content-Type\": file.type,\n \"x-filename\": encodeURIComponent(file.name),\n \"x-filesize\": file.size.toString(),\n },\n onProgress: (e: ProgressEvent) => {\n if (this._progressHandler && e.lengthComputable) {\n this._progressHandler(file, {\n progress: Math.ceil((e.loaded / e.total) * 100),\n });\n }\n },\n data: file,\n }).then((response) => {\n this._progressHandler(file, { progress: 100, token: response.token });\n return response;\n });\n }\n}\n\nexport default UploadRequest;\n"],"mappings":";;;;;;;;;;AACA;AAEA;AAMA;AAQA;AACA;AACA;AACA,MAAMA,aAAa,CAAC;EAQlBC,WAAW,CACTC,iBAIC,EACDC,eAAgC,EAChC;IAAA;IAAA;IACA,IAAI,CAACC,kBAAkB,GAAGF,iBAAiB;IAC3C,IAAI,CAACG,gBAAgB,GAAGF,eAAe;EACzC;;EAEA;AACF;EACEG,gBAAgB,CAACC,IAAU,EAAU;IACnC,OAAOA,IAAI,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE,CAACC,WAAW,EAAE;EACjD;;EAEA;AACF;EACEC,oBAAoB,CAACL,IAAU,EAAW;IACxC,MAAMM,gBAAgB,GAAG,IAAI,CAACT,kBAAkB,CAACU,SAAS;IAE1D,IAAID,gBAA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AACe,IAAI,CAAC,IAAI;MACzD,CAAC,EACD,IAAI,CACL,CACF;IACH;IAEA,OAAO,IAAAC,YAAG,EAAC;MACTC,GAAG,EAAE,IAAAC,wBAAa,GAAE;MACpBC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,OAAO,EAAE;QACP,cAAc,EAAE7B,IAAI,CAAC8B,IAAI;QACzB,YAAY,EAAEC,kBAAkB,CAAC/B,IAAI,CAACC,IAAI,CAAC;QAC3C,YAAY,EAAED,IAAI,CAACgB,IAAI,CAACgB,QAAQ;MAClC,CAAC;MACDC,UAAU,EAAGC,CAAgB,IAAK;QAChC,IAAI,IAAI,CAACpC,gBAAgB,IAAIoC,CAAC,CAACC,gBAAgB,EAAE;UAC/C,IAAI,CAACrC,gBAAgB,CAACE,IAAI,EAAE;YAC1BoC,QAAQ,EAAEC,IAAI,CAACC,IAAI,CAAEJ,CAAC,CAACK,MAAM,GAAGL,CAAC,CAACM,KAAK,GAAI,GAAG;UAChD,CAAC,CAAC;QACJ;MACF,CAAC;MACDC,IAAI,EAAEzC;IACR,CAAC,CAAC,CAAC0C,IAAI,CAAEC,QAAQ,IAAK;MACpB,IAAI,CAAC7C,gBAAgB,CAACE,IAAI,EAAE;QAAEoC,QAAQ,EAAE,GAAG;QAAEQ,KAAK,EAAED,QAAQ,CAACC;MAAM,CAAC,CAAC;MACrE,OAAOD,QAAQ;IACjB,CAAC,CAAC;EACJ;AACF;AAAC,eAEclD,aAAa;AAAA"}
1
+ {"version":3,"file":"UploadRequest.js","names":["_constants","require","_xhr","_interopRequireDefault","_ErrorModel","UploadRequest","constructor","uploadConstraints","progressHandler","_defineProperty2","default","_uploadConstraints","_progressHandler","getFileExtension","file","name","split","pop","toLowerCase","isNotAllowedFileType","allowedFileTypes","fileTypes","length","fileExtension","some","fileType","_context","_includes","extensions","call","exceedsMaxFileSize","maxFileSize","fileSize","size","uploadFile","error","_promise","reject","ErrorModel","extension","join","xhr","url","getUploadPath","method","HTTP_METHODS","POST","headers","type","encodeURIComponent","toString","onProgress","e","lengthComputable","progress","Math","ceil","loaded","total","data","then","response","token","_default","exports"],"sources":["../../src/modularui/UploadRequest.js"],"sourcesContent":["// @flow\nimport { getUploadPath, HTTP_METHODS } from \"../constants\";\n\nimport xhr from \"../utils/fetch/xhr\";\n\nimport type {\n FilesizeConstraintsType,\n FiletypeConstraintsType,\n} from \"../models\";\nimport ErrorModel from \"../models/error/ErrorModel\";\n\ntype ProgressHandler = (file: File, uploadInfo: Object) => void;\n\ntype UploadResponse = {\n token: string,\n};\n\n/**\n * Upload a file to the upload file service of Be Informed\n */\nclass UploadRequest {\n _uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n };\n _progressHandler: ProgressHandler;\n\n constructor(\n uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n },\n progressHandler: ProgressHandler\n ) {\n this._uploadConstraints = uploadConstraints;\n this._progressHandler = progressHandler;\n }\n\n /**\n */\n getFileExtension(file: File): string {\n return file.name.split(\".\").pop().toLowerCase();\n }\n\n /**\n */\n isNotAllowedFileType(file: File): boolean {\n const allowedFileTypes = this._uploadConstraints.fileTypes;\n\n if (allowedFileTypes.length > 0) {\n const fileExtension = this.getFileExtension(file);\n\n return !allowedFileTypes.some((fileType) =>\n fileType.extensions.includes(fileExtension)\n );\n }\n\n return false;\n }\n\n /**\n */\n exceedsMaxFileSize(file: File): boolean {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n return maxFileSize > -1 && file.size > maxFileSize;\n }\n\n /**\n */\n uploadFile(file: File): Promise<UploadResponse> {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n\n if (this.exceedsMaxFileSize(file)) {\n this._progressHandler(file, { error: \"errorExceedsMaxFileSize\" });\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.MaxFileSizeExceeded\",\n \"Maximum file upload size is ${max-filesize}\",\n {\n \"max-filesize\": maxFileSize,\n },\n true\n )\n );\n }\n\n if (this.isNotAllowedFileType(file)) {\n this._progressHandler(file, { error: \"errorExtensionNotAllowed\" });\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.InvalidExtension\",\n \"Allowed extensions are: ${extensions}\",\n {\n extension: this.getFileExtension(file),\n extensions: this._uploadConstraints.fileTypes.join(\", \"),\n },\n true\n )\n );\n }\n\n return xhr({\n url: getUploadPath(),\n method: HTTP_METHODS.POST,\n headers: {\n \"Content-Type\": file.type,\n \"x-filename\": encodeURIComponent(file.name),\n \"x-filesize\": file.size.toString(),\n },\n onProgress: (e: ProgressEvent) => {\n if (this._progressHandler && e.lengthComputable) {\n this._progressHandler(file, {\n progress: Math.ceil((e.loaded / e.total) * 100),\n });\n }\n },\n data: file,\n }).then((response) => {\n this._progressHandler(file, { progress: 100, token: response.token });\n return response;\n });\n }\n}\n\nexport default UploadRequest;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAMA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAQA;AACA;AACA;AACA,MAAMI,aAAa,CAAC;EAQlBC,WAAWA,CACTC,iBAIC,EACDC,eAAgC,EAChC;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACA,IAAI,CAACC,kBAAkB,GAAGJ,iBAAiB;IAC3C,IAAI,CAACK,gBAAgB,GAAGJ,eAAe;EACzC;;EAEA;AACF;EACEK,gBAAgBA,CAACC,IAAU,EAAU;IACnC,OAAOA,IAAI,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE,CAACC,WAAW,EAAE;EACjD;;EAEA;AACF;EACEC,oBAAoBA,CAACL,IAAU,EAAW;IACxC,MAAMM,gBAAgB,GAAG,IAAI,CA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Q2B,MAAM,CACnB,IAAIC,mBAAU,CACZ,kCAAkC,EAClC,uCAAuC,EACvC;QACEC,SAAS,EAAE,IAAI,CAAC1B,gBAAgB,CAACC,IAAI,CAAC;QACtCc,UAAU,EAAE,IAAI,CAACjB,kBAAkB,CAACU,SAAS,CAACmB,IAAI,CAAC,IAAI;MACzD,CAAC,EACD,IAAI,CACL,CACF;IACH;IAEA,OAAO,IAAAC,YAAG,EAAC;MACTC,GAAG,EAAE,IAAAC,wBAAa,GAAE;MACpBC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,OAAO,EAAE;QACP,cAAc,EAAEjC,IAAI,CAACkC,IAAI;QACzB,YAAY,EAAEC,kBAAkB,CAACnC,IAAI,CAACC,IAAI,CAAC;QAC3C,YAAY,EAAED,IAAI,CAACmB,IAAI,CAACiB,QAAQ;MAClC,CAAC;MACDC,UAAU,EAAGC,CAAgB,IAAK;QAChC,IAAI,IAAI,CAACxC,gBAAgB,IAAIwC,CAAC,CAACC,gBAAgB,EAAE;UAC/C,IAAI,CAACzC,gBAAgB,CAACE,IAAI,EAAE;YAC1BwC,QAAQ,EAAEC,IAAI,CAACC,IAAI,CAAEJ,CAAC,CAACK,MAAM,GAAGL,CAAC,CAACM,KAAK,GAAI,GAAG;UAChD,CAAC,CAAC;QACJ;MACF,CAAC;MACDC,IAAI,EAAE7C;IACR,CAAC,CAAC,CAAC8C,IAAI,CAAEC,QAAQ,IAAK;MACpB,IAAI,CAACjD,gBAAgB,CAACE,IAAI,EAAE;QAAEwC,QAAQ,EAAE,GAAG;QAAEQ,KAAK,EAAED,QAAQ,CAACC;MAAM,CAAC,CAAC;MACrE,OAAOD,QAAQ;IACjB,CAAC,CAAC;EACJ;AACF;AAAC,IAAAE,QAAA,GAEc1D,aAAa;AAAA2D,OAAA,CAAAtD,OAAA,GAAAqD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/modularui/index.js"],"sourcesContent":["// @flow\nexport { default as Authenticate } from \"./Authenticate\";\nexport { default as ModularUIRequest } from \"./ModularUIRequest\";\nexport { default as ModularUIResponse } from \"./ModularUIResponse\";\nexport { default as UploadRequest } from \"./UploadRequest\";\nexport { default as CaptchaRequest } from \"./CaptchaRequest\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"file":"index.js","names":["_Authenticate","_interopRequireDefault","require","_ModularUIRequest","_ModularUIResponse","_UploadRequest","_CaptchaRequest"],"sources":["../../src/modularui/index.js"],"sourcesContent":["// @flow\nexport { default as Authenticate } from \"./Authenticate\";\nexport { default as ModularUIRequest } from \"./ModularUIRequest\";\nexport { default as ModularUIResponse } from \"./ModularUIResponse\";\nexport { default as UploadRequest } from \"./UploadRequest\";\nexport { default as CaptchaRequest } from \"./CaptchaRequest\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,cAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","names":["ErrorBoundary","Component","error","errorInfo","componentDidCatch","setState","render","children","FallbackComponent","props","state","componentStack","ErrorBoundaryFallback","displayName"],"sources":["../../src/react/ErrorBoundary.js"],"sourcesContent":["// @flow\nimport { Component } from \"react\";\n\nimport ErrorBoundaryFallback from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Props as FallbackProps } from \"./ErrorBoundaryFallback\";\nexport type Props = {\n +children: ?Node,\n +FallbackComponent: ComponentType<FallbackProps>,\n};\n\ntype ErrorInfo = {\n componentStack: string,\n ...\n};\n\ntype State = {\n error: ?Error,\n errorInfo: ?ErrorInfo,\n};\n\n/**\n */\nclass ErrorBoundary extends Component<Props, State> {\n static defaultProps: { FallbackComponent: ComponentType<FallbackProps> } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n state: State = {\n error: null,\n errorInfo: null,\n };\n\n /**\n */\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n /**\n */\n render(): Node {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n\nexport default ErrorBoundary;\n"],"mappings":";;;;;;;;AACA;AAEA;AAA4D;AAmB5D;AACA;AACA,MAAMA,aAAa,SAASC,gBAAS,CAAe;EAAA;IAAA;IAAA,6CAKnC;MACbC,KAAK,EAAE,IAAI;MACXC,SAAS,EAAE;IACb,CAAC;EAAA;EAED;AACF;EACEC,iBAAiB,CAACF,KAAY,EAAEC,SAAoB,EAAQ;IAC1D,IAAI,CAACE,QAAQ,CAAC;MAAEH,KAAK;MAAEC;IAAU,CAAC,CAAC;EACrC;;EAEA;AACF;EACEG,MAAM,GAAS;IACb,MAAM;MAAEC,QAAQ;MAAEC;IAAkB,CAAC,GAAG,IAAI,CAACC,KAAK,CAAC,CAAC;IACpD,MAAM;MAAEP,KAAK;MAAEC;IAAU,CAAC,GAAG,IAAI,CAACO,KAAK;IAEvC,IAAIR,KAAK,IAAI,IAAI,EAAE;MACjB,oBACE,qBAAC,iBAAiB;QAChB,cAAc,EAAEC,SAAS,GAAGA,SAAS,CAACQ,cAAc,GAAG,EAAG;QAC1D,KAAK,EAAET;MAAM,EACb;IAEN;IAEA,OAAOK,QAAQ,IAAI,IAAI;EACzB;AACF;AAAC,8BAjCKP,aAAa,kBAC0D;EACzEQ,iBAAiB,EAAEI;AACrB,CAAC;AA+BHZ,aAAa,CAACa,WAAW,GAAG,kBAAkB;AAAC,eAEhCb,aAAa;AAAA"}
1
+ {"version":3,"file":"ErrorBoundary.js","names":["_react","require","_ErrorBoundaryFallback","_interopRequireDefault","_jsxRuntime","ErrorBoundary","Component","constructor","arguments","_defineProperty2","default","error","errorInfo","componentDidCatch","setState","render","children","FallbackComponent","props","state","jsx","componentStack","ErrorBoundaryFallback","displayName","_default","exports"],"sources":["../../src/react/ErrorBoundary.js"],"sourcesContent":["// @flow\nimport { Component } from \"react\";\n\nimport ErrorBoundaryFallback from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Props as FallbackProps } from \"./ErrorBoundaryFallback\";\nexport type Props = {\n +children: ?Node,\n +FallbackComponent: ComponentType<FallbackProps>,\n};\n\ntype ErrorInfo = {\n componentStack: string,\n ...\n};\n\ntype State = {\n error: ?Error,\n errorInfo: ?ErrorInfo,\n};\n\n/**\n */\nclass ErrorBoundary extends Component<Props, State> {\n static defaultProps: { FallbackComponent: ComponentType<FallbackProps> } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n state: State = {\n error: null,\n errorInfo: null,\n };\n\n /**\n */\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n /**\n */\n render(): Node {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n\nexport default ErrorBoundary;\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4D,IAAAG,WAAA,GAAAH,OAAA;AAmB5D;AACA;AACA,MAAMI,aAAa,SAASC,gBAAS,CAAe;EAAAC,YAAA;IAAA,SAAAC,SAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,iBAKnC;MACbC,KAAK,EAAE,IAAI;MACXC,SAAS,EAAE;IACb,CAAC;EAAA;EAED;AACF;EACEC,iBAAiBA,CAACF,KAAY,EAAEC,SAAoB,EAAQ;IAC1D,IAAI,CAACE,QAAQ,CAAC;MAAEH,KAAK;MAAEC;IAAU,CAAC,CAAC;EACrC;;EAEA;AACF;EACEG,MAAMA,CAAA,EAAS;IACb,MAAM;MAAEC,QAAQ;MAAEC;IAAkB,CAAC,GAAG,IAAI,CAACC,KAAK,CAAC,CAAC;IACpD,MAAM;MAAEP,KAAK;MAAEC;IAAU,CAAC,GAAG,IAAI,CAACO,KAAK;IAEvC,IAAIR,KAAK,IAAI,IAAI,EAAE;MACjB,oBACE,IAAAP,WAAA,CAAAgB,GAAA,EAACH,iBAAiB;QAChBI,cAAc,EAAET,SAAS,GAAGA,SAAS,CAACS,cAAc,GAAG,EAAG;QAC1DV,KAAK,EAAEA;MAAM,EACb;IAEN;IAEA,OAAOK,QAAQ,IAAI,IAAI;EACzB;AACF;AAAC,IAAAP,gBAAA,CAAAC,OAAA,EAjCKL,aAAa,kBAC0D;EACzEY,iBAAiB,EAAEK;AACrB,CAAC;AA+BHjB,aAAa,CAACkB,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAEhCnB,aAAa;AAAAoB,OAAA,CAAAf,OAAA,GAAAc,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundaryFallback.js","names":["StyledBoundary","styled","div","spacers","spacer","StyledStack","pre","ErrorBoundaryFallback","className","componentStack","error","toString","displayName"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\n// $FlowFixMe\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\n// $FlowFixMe\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":";;;;;;;AACA;AACA;AAA+D;AAY/D;AACA,MAAMA,cAA6C,gBAAGC,yBAAM,CAACC,GAAG;EAAA;AAAA,sFACnD,IAAAC,gBAAO,EAAC,CAAC,EAAE,CAAC,CAAC,EACP,IAAAC,eAAM,EAAC,CAAC,CAAC,CAG3B;;AAED;AACA,MAAMC,WAAW,gBAAGJ,yBAAM,CAACK,GAAG;EAAA;AAAA,sEAK7B;;AAED;AACA;AACA,MAAMC,qBAAqB,GAAG;EAAA,IAAC;IAC7BC,SAAS;IACTC,cAAc;IACdC;EACK,CAAC;EAAA,oBACN,sBAAC,cAAc;IAAC,SAAS,EAAEF,SAAU;IAAA,wBACnC;MAAA,UAAKE,KAAK,CAACC,QAAQ;IAAE,EAAM,eAC3B,qBAAC,WAAW;MAAC,SAAS,EAAC,OAAO;MAAA,UAAEF;IAAc,EAAe;EAAA,EAC9C;AAAA,CAClB;AAEDF,qBAAqB,CAACK,WAAW,GAAG,0BAA0B;AAAC,eAEhDL,qBAAqB;AAAA"}
1
+ {"version":3,"file":"ErrorBoundaryFallback.js","names":["_styledComponents","_interopRequireDefault","require","_spacers","_jsxRuntime","StyledBoundary","styled","div","withConfig","componentId","spacers","spacer","StyledStack","pre","ErrorBoundaryFallback","_ref","className","componentStack","error","jsxs","children","jsx","toString","displayName","_default","exports","default"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\n// $FlowFixMe\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\n// $FlowFixMe\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":";;;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA+D,IAAAE,WAAA,GAAAF,OAAA;AAY/D;AACA,MAAMG,cAA6C,gBAAGC,yBAAM,CAACC,GAAG,CAAAC,UAAA;EAAAC,WAAA;AAAA,sFACnD,IAAAC,gBAAO,EAAC,CAAC,EAAE,CAAC,CAAC,EACP,IAAAC,eAAM,EAAC,CAAC,CAAC,CAG3B;;AAED;AACA,MAAMC,WAAW,gBAAGN,yBAAM,CAACO,GAAG,CAAAL,UAAA;EAAAC,WAAA;AAAA,sEAK7B;;AAED;AACA;AACA,MAAMK,qBAAqB,GAAGC,IAAA;EAAA,IAAC;IAC7BC,SAAS;IACTC,cAAc;IACdC;EACK,CAAC,GAAAH,IAAA;EAAA,oBACN,IAAAX,WAAA,CAAAe,IAAA,EAACd,cAAc;IAACW,SAAS,EAAEA,SAAU;IAAAI,QAAA,gBACnC,IAAAhB,WAAA,CAAAiB,GAAA;MAAAD,QAAA,EAAKF,KAAK,CAACI,QAAQ;IAAE,EAAM,eAC3B,IAAAlB,WAAA,CAAAiB,GAAA,EAACT,WAAW;MAACI,SAAS,EAAC,OAAO;MAAAI,QAAA,EAAEH;IAAc,EAAe;EAAA,EAC9C;AAAA,CAClB;AAEDH,qBAAqB,CAACS,WAAW,GAAG,0BAA0B;AAAC,IAAAC,QAAA,GAEhDV,qBAAqB;AAAAW,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/react/index.js"],"sourcesContent":["// @flow\nexport * from \"./utils\";\nexport * from \"../hooks\";\n"],"mappings":";;;;;;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_utils","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_hooks"],"sources":["../../src/react/index.js"],"sourcesContent":["// @flow\nexport * from \"./utils\";\nexport * from \"../hooks\";\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAT,OAAA;AAAAC,YAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","contextId","componentName","displayName","name","mergeRefs","refs","value","forEach","ref","current"],"sources":["../../src/react/utils.js"],"sourcesContent":["// @flow\nimport type { ComponentType, Ref } from \"react\";\n\n/**\n */\nexport const getDisplayName = (\n WrappedComponent: ComponentType<any>,\n defaultName: string = \"Component\",\n contextId?: string\n): string => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\n/**\n */\nexport const mergeRefs =\n <T: any>(refs: Array<Ref<T>>): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n ref.current = value;\n }\n });\n };\n"],"mappings":";;;;;;AAGA;AACA;AACO,MAAMA,cAAc,GAAG,UAC5BC,gBAAoC,EAGzB;EAAA,IAFXC,WAAmB,uEAAG,WAAW;EAAA,IACjCC,SAAkB;EAElB,MAAMC,aAAa,GACjBH,gBAAgB,CAACI,WAAW,IAAIJ,gBAAgB,CAACK,IAAI,IAAIJ,WAAW;EAEtE,IAAIC,SAAS,EAAE;IACb,OAAQ,GAAEC,aAAc,IAAGD,SAAU,GAAE;EACzC;EAEA,OAAOC,aAAa;AACtB,CAAC;;AAED;AACA;AADA;AAEO,MAAMG,SAAS,GACXC,IAAmB,IAC3BC,KAAK,IAAK;EACTD,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACF,KAAK,CAAC;IACZ,CAAC,MAAM,IAAIE,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MACjDA,GAAG,CAACC,OAAO,GAAGH,KAAK;IACrB;EACF,CAAC,CAAC;AACJ,CAAC;AAAC"}
1
+ {"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","arguments","length","undefined","contextId","componentName","displayName","name","exports","mergeRefs","refs","value","forEach","ref","current"],"sources":["../../src/react/utils.js"],"sourcesContent":["// @flow\nimport type { ComponentType, Ref } from \"react\";\n\n/**\n */\nexport const getDisplayName = (\n WrappedComponent: ComponentType<any>,\n defaultName: string = \"Component\",\n contextId?: string\n): string => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\n/**\n */\nexport const mergeRefs =\n <T: any>(refs: Array<Ref<T>>): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n ref.current = value;\n }\n });\n };\n"],"mappings":";;;;;;AAGA;AACA;AACO,MAAMA,cAAc,GAAG,SAAAA,CAC5BC,gBAAoC,EAGzB;EAAA,IAFXC,WAAmB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,WAAW;EAAA,IACjCG,SAAkB,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAElB,MAAME,aAAa,GACjBN,gBAAgB,CAACO,WAAW,IAAIP,gBAAgB,CAACQ,IAAI,IAAIP,WAAW;EAEtE,IAAII,SAAS,EAAE;IACb,OAAQ,GAAEC,aAAc,IAAGD,SAAU,GAAE;EACzC;EAEA,OAAOC,aAAa;AACtB,CAAC;;AAED;AACA;AADAG,OAAA,CAAAV,cAAA,GAAAA,cAAA;AAEO,MAAMW,SAAS,GACXC,IAAmB,IAC3BC,KAAK,IAAK;EACTD,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACF,KAAK,CAAC;IACZ,CAAC,MAAM,IAAIE,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MACjDA,GAAG,CAACC,OAAO,GAAGH,KAAK;IACrB;EACF,CAAC,CAAC;AACJ,CAAC;AAACH,OAAA,CAAAC,SAAA,GAAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Init.js","names":["Init","store","routerHistory","contextPath","theme","children","ErrorFallbackComponent","displayName"],"sources":["../../src/react-client/Init.js"],"sourcesContent":["// @flow\nimport { Provider } from \"react-redux\";\nimport { HelmetProvider } from \"react-helmet-async\";\nimport { Router } from \"react-router\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { RouterHistory } from \"react-router\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\ntype Props = {\n +store: ReduxStore,\n +routerHistory: RouterHistory,\n +contextPath: string,\n +theme?: Theme | Array<Theme>,\n +children: ?Node,\n +ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/**\n */\nexport const Init = ({\n store,\n routerHistory,\n contextPath,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): Node => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={routerHistory} basename={contextPath}>\n {children}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\nInit.displayName = \"BI.Init\";\n"],"mappings":";;;;;;;AACA;AACA;AACA;AAEA;AACA;AAAmD;AAiBnD;AACA;AACO,MAAMA,IAAI,GAAG;EAAA,IAAC;IACnBC,KAAK;IACLC,aAAa;IACbC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC;EACK,CAAC;EAAA,oBACN,qBAAC,oBAAQ;IAAC,KAAK,EAAEL,KAAM;IAAA,uBACrB,qBAAC,sBAAa;MAAC,KAAK,EAAEG,KAAM;MAAA,uBAC1B,qBAAC,gCAAc;QAAA,uBACb,qBAAC,sBAAa;UAAC,iBAAiB,EAAEE,sBAAuB;UAAA,uBACvD,qBAAC,mBAAM;YAAC,OAAO,EAAEJ,aAAc;YAAC,QAAQ,EAAEC,WAAY;YAAA,UACnDE;UAAQ;QACF;MACK;IACD;EACH,EACP;AAAA,CACZ;AAAC;AACFL,IAAI,CAACO,WAAW,GAAG,SAAS"}
1
+ {"version":3,"file":"Init.js","names":["_reactRedux","require","_reactHelmetAsync","_reactRouter","_ThemeProvider","_interopRequireDefault","_ErrorBoundary","_jsxRuntime","Init","_ref","store","routerHistory","contextPath","theme","children","ErrorFallbackComponent","jsx","Provider","default","HelmetProvider","FallbackComponent","Router","history","basename","exports","displayName"],"sources":["../../src/react-client/Init.js"],"sourcesContent":["// @flow\nimport { Provider } from \"react-redux\";\nimport { HelmetProvider } from \"react-helmet-async\";\nimport { Router } from \"react-router\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { RouterHistory } from \"react-router\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\ntype Props = {\n +store: ReduxStore,\n +routerHistory: RouterHistory,\n +contextPath: string,\n +theme?: Theme | Array<Theme>,\n +children: ?Node,\n +ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/**\n */\nexport const Init = ({\n store,\n routerHistory,\n contextPath,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): Node => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={routerHistory} basename={contextPath}>\n {children}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\nInit.displayName = \"BI.Init\";\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAAmD,IAAAM,WAAA,GAAAN,OAAA;AAiBnD;AACA;AACO,MAAMO,IAAI,GAAGC,IAAA;EAAA,IAAC;IACnBC,KAAK;IACLC,aAAa;IACbC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC;EACK,CAAC,GAAAN,IAAA;EAAA,oBACN,IAAAF,WAAA,CAAAS,GAAA,EAAChB,WAAA,CAAAiB,QAAQ;IAACP,KAAK,EAAEA,KAAM;IAAAI,QAAA,eACrB,IAAAP,WAAA,CAAAS,GAAA,EAACZ,cAAA,CAAAc,OAAa;MAACL,KAAK,EAAEA,KAAM;MAAAC,QAAA,eAC1B,IAAAP,WAAA,CAAAS,GAAA,EAACd,iBAAA,CAAAiB,cAAc;QAAAL,QAAA,eACb,IAAAP,WAAA,CAAAS,GAAA,EAACV,cAAA,CAAAY,OAAa;UAACE,iBAAiB,EAAEL,sBAAuB;UAAAD,QAAA,eACvD,IAAAP,WAAA,CAAAS,GAAA,EAACb,YAAA,CAAAkB,MAAM;YAACC,OAAO,EAAEX,aAAc;YAACY,QAAQ,EAAEX,WAAY;YAAAE,QAAA,EACnDA;UAAQ;QACF;MACK;IACD;EACH,EACP;AAAA,CACZ;AAACU,OAAA,CAAAhB,IAAA,GAAAA,IAAA;AACFA,IAAI,CAACiB,WAAW,GAAG,SAAS"}
@@ -140,12 +140,12 @@ const addContentLoadedEvent = (store, routerHistory, theme, render, ErrorFallbac
140
140
  /**
141
141
  */
142
142
  exports.addContentLoadedEvent = addContentLoadedEvent;
143
- const mountClient = (applicationNode, initComponent) => {
143
+ const mountClient = (applicationNode, element) => {
144
144
  const isSSR = applicationNode.querySelector(".application");
145
145
  if (isSSR) {
146
- (0, _reactDom.hydrate)(initComponent, applicationNode);
146
+ (0, _reactDom.hydrate)(element, applicationNode);
147
147
  } else {
148
- (0, _reactDom.render)(initComponent, applicationNode);
148
+ (0, _reactDom.render)(element, applicationNode);
149
149
  }
150
150
  };
151
151
 
@@ -158,13 +158,14 @@ const client = _ref => {
158
158
  theme,
159
159
  render,
160
160
  beforeRenderHooks,
161
- ErrorFallbackComponent
161
+ ErrorFallbackComponent,
162
+ mount
162
163
  } = _ref;
163
164
  const {
164
165
  store,
165
166
  routerHistory
166
167
  } = setupClient(customReducers, beforeRenderHooks);
167
- addContentLoadedEvent(store, routerHistory, theme, render, ErrorFallbackComponent, mountClient);
168
+ addContentLoadedEvent(store, routerHistory, theme, render, ErrorFallbackComponent, mount ?? mountClient);
168
169
  };
169
170
  exports.client = client;
170
171
  //# sourceMappingURL=client.js.map
@@ -40,10 +40,16 @@ import type { RouterHistory } from "react-router";
40
40
  import type { BeforeRenderHook } from "../redux/store/beforeRenderHooks";
41
41
  import type { Props as FallbackProps } from "../react/ErrorBoundaryFallback";
42
42
 
43
+ type RenderFunction = () => ReactElement<ElementType>;
44
+ type MountFunction = (
45
+ applicationNode: Element,
46
+ element: ReactElement<ElementType>
47
+ ) => void;
43
48
  type Props = {
44
49
  customReducers?: CustomReducers,
45
50
  theme?: Theme | Array<Theme>,
46
- render: Function,
51
+ render: RenderFunction,
52
+ mount: MountFunction,
47
53
  beforeRenderHooks?: Array<BeforeRenderHook>,
48
54
  ErrorFallbackComponent?: ComponentType<FallbackProps>,
49
55
  };
@@ -158,9 +164,9 @@ export const addContentLoadedEvent = (
158
164
  store: ReduxStore,
159
165
  routerHistory: RouterHistory,
160
166
  theme?: Theme | Array<Theme>,
161
- render: Function,
167
+ render: RenderFunction,
162
168
  ErrorFallbackComponent?: ComponentType<FallbackProps>,
163
- mount: Function
169
+ mount: MountFunction
164
170
  ) => {
165
171
  window.addEventListener("DOMContentLoaded", () => {
166
172
  const applicationNode = document.querySelector("#application");
@@ -189,13 +195,13 @@ export const addContentLoadedEvent = (
189
195
  */
190
196
  const mountClient = (
191
197
  applicationNode: Element,
192
- initComponent: ReactElement<ElementType>
198
+ element: ReactElement<ElementType>
193
199
  ) => {
194
200
  const isSSR = applicationNode.querySelector(".application");
195
201
  if (isSSR) {
196
- hydrate(initComponent, applicationNode);
202
+ hydrate(element, applicationNode);
197
203
  } else {
198
- render(initComponent, applicationNode);
204
+ render(element, applicationNode);
199
205
  }
200
206
  };
201
207
 
@@ -208,6 +214,7 @@ export const client = ({
208
214
  render,
209
215
  beforeRenderHooks,
210
216
  ErrorFallbackComponent,
217
+ mount,
211
218
  }: Props) => {
212
219
  const { store, routerHistory } = setupClient(
213
220
  customReducers,
@@ -220,6 +227,6 @@ export const client = ({
220
227
  theme,
221
228
  render,
222
229
  ErrorFallbackComponent,
223
- mountClient
230
+ mount ?? mountClient
224
231
  );
225
232
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["parseDataToJSON","data","JSON","parse","error","JsonParseException","getDataFromServer","dataElement","document","querySelector","Error","textContent","setUnhandledRejectionEvent","store","window","onunhandledrejection","event","detail","setImmediate","errorMessage","reason","message","toString","dispatch","showXHRErrorNotification","setupClient","customReducers","beforeRenderHooks","contextPath","Cache","clear","browserHistory","createBrowserHistory","basename","getBasePath","routerHistory","configureStore","rehydrate","setAllContentInDataSetting","getState","setLoginPreferences","loadOtherBrowserTabs","getItem","loginSuccess","has","FetchException","response","handleError","listen","location","action","locationChange","body","className","handleBeforeRenderHooks","addContentLoadedEvent","theme","render","ErrorFallbackComponent","mount","addEventListener","applicationNode","mountClient","initComponent","isSSR","hydrate","client"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\nimport { hydrate, render } from \"react-dom\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport { getBasePath } from \"../constants/Settings\";\n\nimport {\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\n\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\n\nimport { locationChange } from \"../redux/_router/RouterActions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport { Init } from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type {\n ComponentType,\n Element as ReactElement,\n ElementType,\n} from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers, ReduxStore } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\ntype Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: Function,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\nconst parseDataToJSON = (data: string) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\nconst getDataFromServer = () => {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement.textContent.trim() === \"\") {\n return {};\n }\n\n return parseDataToJSON(dataElement.textContent);\n};\n\n/**\n */\nexport const setUnhandledRejectionEvent = (store: ReduxStore) => {\n window.onunhandledrejection = (event) => {\n if (event.detail) {\n return setImmediate(() => {\n const errorMessage = event.detail.reason.message.toString();\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.detail.reason;\n });\n }\n\n return event;\n };\n};\n\n/**\n */\nexport const setupClient = (\n customReducers: CustomReducers = {},\n beforeRenderHooks: ?Array<BeforeRenderHook>\n): { store: ReduxStore, routerHistory: RouterHistory } => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const data = getDataFromServer();\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: getBasePath(),\n });\n const { routerHistory, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data)\n );\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n });\n\n if (has(data, \"error.name\")) {\n const error = new FetchException(data?.error?.response);\n store.dispatch(handleError(error));\n }\n\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n routerHistory.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n setUnhandledRejectionEvent(store);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n }\n\n return { store, routerHistory };\n};\n\n/**\n */\nexport const addContentLoadedEvent = (\n store: ReduxStore,\n routerHistory: RouterHistory,\n theme?: Theme | Array<Theme>,\n render: Function,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n mount: Function\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\"\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={routerHistory}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>\n );\n });\n};\n\n/**\n */\nconst mountClient = (\n applicationNode: Element,\n initComponent: ReactElement<ElementType>\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrate(initComponent, applicationNode);\n } else {\n render(initComponent, applicationNode);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n}: Props) => {\n const { store, routerHistory } = setupClient(\n customReducers,\n beforeRenderHooks\n );\n\n addContentLoadedEvent(\n store,\n routerHistory,\n theme,\n render,\n ErrorFallbackComponent,\n mountClient\n );\n};\n"],"mappings":";;;;;;;;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AAEA;AAIA;AAEA;AACA;AAEA;AAEA;AAEA;AAEA;AAA2E;AAqB3E;AACA;AACA;AACA,MAAMA,eAAe,GAAIC,IAAY,IAAK;EACxC,IAAI;IACF,OAAOC,IAAI,CAACC,KAAK,CAACF,IAAI,CAAC;EACzB,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,MAAM,IAAIC,8BAAkB,CAAE,yBAAwBJ,IAAK,EAAC,CAAC;EAC/D;AACF,CAAC;AAED,MAAMK,iBAAiB,GAAG,MAAM;EAAA;EAC9B,MAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CACxC,4DAA4D,CAC7D;EAED,IAAI,CAACF,WAAW,EAAE;IAChB,MAAM,IAAIG,KAAK,CAAC,qCAAqC,CAAC;EAC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;EACH7C,MAAM,CAAC8C,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;IAChD,MAAMC,eAAe,GAAGrD,QAAQ,CAACC,aAAa,CAAC,cAAc,CAAC;IAC9D,IAAI,CAACoD,eAAe,EAAE;MACpB,MAAM,IAAInD,KAAK,CACb,8DAA8D,CAC/D;IACH;IAEAiD,KAAK,CACHE,eAAe,eACf,qBAAC,UAAI;MACH,KAAK,EAAEhD,KAAM;MACb,aAAa,EAAEsB,aAAc;MAC7B,WAAW,EAAErB,MAAM,CAACc,WAAY;MAChC,KAAK,EAAE4B,KAAM;MACb,sBAAsB,EAAEE,sBAAuB;MAAA,UAE9CD,MAAM;IAAE,EACJ,CACR;EACH,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AADA;AAEA,MAAMK,WAAW,GAAG,CAClBD,eAAwB,EACxBE,aAAwC,KACrC;EACH,MAAMC,KAAK,GAAGH,eAAe,CAACpD,aAAa,CAAC,cAAc,CAAC;EAC3D,IAAIuD,KAAK,EAAE;IACT,IAAAC,iBAAO,EAACF,aAAa,EAAEF,eAAe,CAAC;EACzC,CAAC,MAAM;IACL,IAAAJ,gBAAM,EAACM,aAAa,EAAEF,eAAe,CAAC;EACxC;AACF,CAAC;;AAED;AACA;AACA;AACO,MAAMK,MAAM,GAAG,QAMT;EAAA,IANU;IACrBxC,cAAc;IACd8B,KAAK;IACLC,MAAM;IACN9B,iBAAiB;IACjB+B;EACK,CAAC;EACN,MAAM;IAAE7C,KAAK;IAAEsB;EAAc,CAAC,GAAGV,WAAW,CAC1CC,cAAc,EACdC,iBAAiB,CAClB;EAED4B,qBAAqB,CACnB1C,KAAK,EACLsB,aAAa,EACbqB,KAAK,EACLC,MAAM,EACNC,sBAAsB,EACtBI,WAAW,CACZ;AACH,CAAC;AAAC"}
1
+ {"version":3,"file":"client.js","names":["_reactDom","require","_objects","_setimmediate","_interopRequireDefault","_Cache","_history","_configureStore","_rehydrate","_Settings","_Preferences","_Notification","_Error","_SignIn","_RouterActions","_exceptions","_Init","_beforeRenderHooks","_jsxRuntime","parseDataToJSON","data","JSON","parse","error","JsonParseException","getDataFromServer","_context","dataElement","document","querySelector","Error","_trim","default","textContent","call","setUnhandledRejectionEvent","store","window","onunhandledrejection","event","detail","setImmediate","errorMessage","reason","message","toString","dispatch","showXHRErrorNotification","exports","setupClient","customReducers","arguments","length","undefined","beforeRenderHooks","contextPath","Cache","clear","browserHistory","createBrowserHistory","basename","getBasePath","routerHistory","configureStore","rehydrate","setAllContentInDataSetting","getState","setLoginPreferences","loadOtherBrowserTabs","getItem","loginSuccess","has","FetchException","response","handleError","listen","location","action","locationChange","body","className","handleBeforeRenderHooks","addContentLoadedEvent","theme","render","ErrorFallbackComponent","mount","addEventListener","applicationNode","jsx","Init","children","mountClient","element","isSSR","hydrate","client","_ref"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\nimport { hydrate, render } from \"react-dom\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport { getBasePath } from \"../constants/Settings\";\n\nimport {\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\n\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\n\nimport { locationChange } from \"../redux/_router/RouterActions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport { Init } from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type {\n ComponentType,\n Element as ReactElement,\n ElementType,\n} from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers, ReduxStore } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\ntype RenderFunction = () => ReactElement<ElementType>;\ntype MountFunction = (\n applicationNode: Element,\n element: ReactElement<ElementType>\n) => void;\ntype Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: RenderFunction,\n mount: MountFunction,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\nconst parseDataToJSON = (data: string) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\nconst getDataFromServer = () => {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement.textContent.trim() === \"\") {\n return {};\n }\n\n return parseDataToJSON(dataElement.textContent);\n};\n\n/**\n */\nexport const setUnhandledRejectionEvent = (store: ReduxStore) => {\n window.onunhandledrejection = (event) => {\n if (event.detail) {\n return setImmediate(() => {\n const errorMessage = event.detail.reason.message.toString();\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.detail.reason;\n });\n }\n\n return event;\n };\n};\n\n/**\n */\nexport const setupClient = (\n customReducers: CustomReducers = {},\n beforeRenderHooks: ?Array<BeforeRenderHook>\n): { store: ReduxStore, routerHistory: RouterHistory } => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const data = getDataFromServer();\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: getBasePath(),\n });\n const { routerHistory, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data)\n );\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n });\n\n if (has(data, \"error.name\")) {\n const error = new FetchException(data?.error?.response);\n store.dispatch(handleError(error));\n }\n\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n routerHistory.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n setUnhandledRejectionEvent(store);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n }\n\n return { store, routerHistory };\n};\n\n/**\n */\nexport const addContentLoadedEvent = (\n store: ReduxStore,\n routerHistory: RouterHistory,\n theme?: Theme | Array<Theme>,\n render: RenderFunction,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n mount: MountFunction\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\"\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={routerHistory}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>\n );\n });\n};\n\n/**\n */\nconst mountClient = (\n applicationNode: Element,\n element: ReactElement<ElementType>\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrate(element, applicationNode);\n } else {\n render(element, applicationNode);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n mount,\n}: Props) => {\n const { store, routerHistory } = setupClient(\n customReducers,\n beforeRenderHooks\n );\n\n addContentLoadedEvent(\n store,\n routerHistory,\n theme,\n render,\n ErrorFallbackComponent,\n mount ?? mountClient\n );\n};\n"],"mappings":";;;;;;;;AACA,IAAAA,SAAA,G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B,aAAa,EACbqB,KAAK,EACLC,MAAM,EACNC,sBAAsB,EACtBC,KAAK,IAAIM,WAAW,CACrB;AACH,CAAC;AAAC5C,OAAA,CAAAgD,MAAA,GAAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"contextPath.js","names":["x","dataElement","document","querySelector","Error","contextPath","getAttribute","window","filePath","__webpack_public_path__","nonce","__webpack_nonce__"],"sources":["../../src/react-client/contextPath.js"],"sourcesContent":["// @flow\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path\"\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n window.contextPath = contextPath;\n }\n\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"mappings":";;;;;AACA,CAAC,SAASA,CAAC,GAAG;EACZ,MAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CACxC,4DAA4D,CAC7D;EACD,IAAI,CAACF,WAAW,EAAE;IAChB,MAAM,IAAIG,KAAK,CACb,uEAAuE,CACxE;EACH;EAEA,MAAMC,WAAW,GAAGJ,WAAW,CAACK,YAAY,CAAC,sBAAsB,CAAC;EACpE,IAAID,WAAW,EAAE;IACfE,MAAM,CAACF,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMG,QAAQ,GAAGP,WAAW,CAACK,YAAY,CAAC,mBAAmB,CAAC;EAC9D,IAAIE,QAAQ,IAAIA,QAAQ,KAAK,YAAY,EAAE;IACzCC,uBAAuB,GAAI,GAAED,QAAS,GAAE,CAAC,CAAC;EAC5C,CAAC,MAAM,IAAIH,WAAW,EAAE;IACtBI,uBAAuB,GAAI,GAAEJ,WAAY,GAAE,CAAC,CAAC;EAC/C;;EAEA,MAAMK,KAAK,GAAGT,WAAW,CAACK,YAAY,CAAC,gBAAgB,CAAC;EACxD,IAAII,KAAK,EAAE;IACTC,iBAAiB,GAAGD,KAAK,CAAC,CAAC;EAC7B;AACF,CAAC,GAAG"}
1
+ {"version":3,"file":"contextPath.js","names":["x","dataElement","document","querySelector","Error","contextPath","getAttribute","window","filePath","__webpack_public_path__","nonce","__webpack_nonce__"],"sources":["../../src/react-client/contextPath.js"],"sourcesContent":["// @flow\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path\"\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n window.contextPath = contextPath;\n }\n\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"mappings":";;;;;AACA,CAAC,SAASA,CAACA,CAAA,EAAG;EACZ,MAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CACxC,4DAA4D,CAC7D;EACD,IAAI,CAACF,WAAW,EAAE;IAChB,MAAM,IAAIG,KAAK,CACb,uEAAuE,CACxE;EACH;EAEA,MAAMC,WAAW,GAAGJ,WAAW,CAACK,YAAY,CAAC,sBAAsB,CAAC;EACpE,IAAID,WAAW,EAAE;IACfE,MAAM,CAACF,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMG,QAAQ,GAAGP,WAAW,CAACK,YAAY,CAAC,mBAAmB,CAAC;EAC9D,IAAIE,QAAQ,IAAIA,QAAQ,KAAK,YAAY,EAAE;IACzCC,uBAAuB,GAAI,GAAED,QAAS,GAAE,CAAC,CAAC;EAC5C,CAAC,MAAM,IAAIH,WAAW,EAAE;IACtBI,uBAAuB,GAAI,GAAEJ,WAAY,GAAE,CAAC,CAAC;EAC/C;;EAEA,MAAMK,KAAK,GAAGT,WAAW,CAACK,YAAY,CAAC,gBAAgB,CAAC;EACxD,IAAII,KAAK,EAAE;IACTC,iBAAiB,GAAGD,KAAK,CAAC,CAAC;EAC7B;AACF,CAAC,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/react-client/index.js"],"sourcesContent":["// @flow\nexport * from \"./client\";\nexport * from \"./Init\";\nexport * from \"../redux/actions/Error\";\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"}
1
+ {"version":3,"file":"index.js","names":["_client","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get","_Init","_Error"],"sources":["../../src/react-client/index.js"],"sourcesContent":["// @flow\nexport * from \"./client\";\nexport * from \"./Init\";\nexport * from \"../redux/actions/Error\";\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,KAAA,GAAAT,OAAA;AAAAC,YAAA,CAAAQ,KAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,KAAA,CAAAN,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,MAAA,GAAAV,OAAA;AAAAC,YAAA,CAAAS,MAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,MAAA,CAAAP,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAP,GAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"rehydrate.js","names":["recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","resolveModel","model","childModels","childModel","addChildModels","isModularUIModelData","has","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","state","mappedState","forEach"],"sources":["../../src/react-client/rehydrate.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel)\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey: string, stateValue: any) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState: { [string]: any } = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"mappings":";;;;;;;;;;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA,MAAMA,aAAa,GAAIC,IAAY,IAAK;EACtC,MAAMC,SAAS,GAAGC,0BAAiB,CAACC,SAAS,CAACH,IAAI,CAAC;EAEnD,MAAMI,KAAK,GAAG,IAAAC,qBAAY,EAACJ,SAAS,CAAC;EAErC,IAAIG,KAAK,EAAE;IAAA;IACT,MAAME,KAAK,GAAG,IAAIF,KAAK,CAACH,SAAS,CAAC;IAClCK,KAAK,CAACH,SAAS,CAACH,IAAI,CAAC;IAErB,MAAMO,WAAW,GAAG,6BAAA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ACW,UAAU,CAAC,CAAC,CAAC;EAChC;;EAEA,OAAOA,UAAU;AACnB,CAAC;;AAED;AACA;AACA;AACA,MAAMX,SAAS,GAAImB,KAAa,IAAc;EAC5C,MAAMC,WAA8B,GAAG,CAAC,CAAC;EAEzC,mBAAYD,KAAK,CAAC,CAACE,OAAO,CAAEX,QAAQ,IAAK;IACvC,MAAMC,UAAU,GAAGQ,KAAK,CAACT,QAAQ,CAAC;IAClCU,WAAW,CAACV,QAAQ,CAAC,GAAGD,eAAe,CAACC,QAAQ,EAAEC,UAAU,CAAC;EAC/D,CAAC,CAAC;EAEF,OAAOS,WAAW;AACpB,CAAC;AAAC,eAEapB,SAAS;AAAA"}
1
+ {"version":3,"file":"rehydrate.js","names":["_objects","require","_Locales","_interopRequireDefault","_resolveModel","_ModularUIResponse","recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","resolveModel","_context","model","childModels","_map","default","call","childModel","addChildModels","isModularUIModelData","has","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","_includes","state","mappedState","_keys","forEach","_default","exports"],"sources":["../../src/react-client/rehydrate.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel)\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey: string, stateValue: any) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState: { [string]: any } = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,kBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA;AACA;AACA;AACA,MAAMK,aAAa,GAAIC,IAAY,IAAK;EACtC,MAAMC,SAAS,GAAGC,0BAAiB,CAACC,SAAS,CAACH,IAAI,CAAC;EAEnD,MAAMI,KAAK,GAAG,IAAAC,qBAAY,EAACJ,SAAS,CAAC;EAErC,IAAIG,KAAK,EAAE;IAAA,IAAAE,QAAA;IACT,MAAMC,KAAK,GAAG,IAAIH,KAAK,CAACH,SAAS,CAAC;IAClCM,KAAK,CAACJ,SAAS,CAACH,IAAI,CAAC;IAErB,MAAMQ,WAAW,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAJ,QAAA,GAAAN,IAAI,CAACQ,WAAW,EAAAG,IAAA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,UAAU,KAAK,IAAI,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACzD,OAAOf,SAAS,CAACe,UAAU,CAAC,CAAC,CAAC;EAChC;;EAEA,OAAOA,UAAU;AACnB,CAAC;;AAED;AACA;AACA;AACA,MAAMf,SAAS,GAAIwB,KAAa,IAAc;EAC5C,MAAMC,WAA8B,GAAG,CAAC,CAAC;EAEzC,IAAAC,KAAA,CAAAnB,OAAA,EAAYiB,KAAK,CAAC,CAACG,OAAO,CAAEb,QAAQ,IAAK;IACvC,MAAMC,UAAU,GAAGS,KAAK,CAACV,QAAQ,CAAC;IAClCW,WAAW,CAACX,QAAQ,CAAC,GAAGD,eAAe,CAACC,QAAQ,EAAEC,UAAU,CAAC;EAC/D,CAAC,CAAC;EAEF,OAAOU,WAAW;AACpB,CAAC;AAAC,IAAAG,QAAA,GAEa5B,SAAS;AAAA6B,OAAA,CAAAtB,OAAA,GAAAqB,QAAA"}
@@ -112,8 +112,8 @@ describe("serverUtil", () => {
112
112
  {
113
113
  type: "SET_PREFERENCES",
114
114
  payload: {
115
- "FormClient.login_url": "/j_security_check",
116
- "FormClient.logout_url": "/Logoff",
115
+ "FormClient.login_url": "/callback?client_name=FormClient",
116
+ "FormClient.logout_url": "/logout",
117
117
  "FormClient.password_field_name": "j_password",
118
118
  "FormClient.username_field_name": "j_username",
119
119
  "security.clients": null,
@@ -159,8 +159,8 @@ describe("serverUtil", () => {
159
159
  {
160
160
  type: "SET_PREFERENCES",
161
161
  payload: {
162
- "FormClient.login_url": "/j_security_check",
163
- "FormClient.logout_url": "/Logoff",
162
+ "FormClient.login_url": "/callback?client_name=FormClient",
163
+ "FormClient.logout_url": "/logout",
164
164
  "FormClient.password_field_name": "j_password",
165
165
  "FormClient.username_field_name": "j_username",
166
166
  "security.clients": null,
@@ -1 +1 @@
1
- {"version":3,"file":"contextPath.js","names":["x","__webpack_public_path__","getBasePath"],"sources":["../../src/react-server/contextPath.js"],"sourcesContent":["// @flow\nimport { getBasePath } from \"../constants/Settings\";\n\n(function x() {\n __webpack_public_path__ = `${getBasePath()}/`; // NOSONAR\n})();\n\nexport {};\n"],"mappings":";;;;;AACA;AAEA,CAAC,SAASA,CAAC,GAAG;EACZC,uBAAuB,GAAI,GAAE,IAAAC,qBAAW,GAAG,GAAE,CAAC,CAAC;AACjD,CAAC,GAAG"}
1
+ {"version":3,"file":"contextPath.js","names":["_Settings","require","x","__webpack_public_path__","getBasePath"],"sources":["../../src/react-server/contextPath.js"],"sourcesContent":["// @flow\nimport { getBasePath } from \"../constants/Settings\";\n\n(function x() {\n __webpack_public_path__ = `${getBasePath()}/`; // NOSONAR\n})();\n\nexport {};\n"],"mappings":";;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,CAAC,SAASC,CAACA,CAAA,EAAG;EACZC,uBAAuB,GAAI,GAAE,IAAAC,qBAAW,GAAG,GAAE,CAAC,CAAC;AACjD,CAAC,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"createSSRComplete.js","names":["noLoading","state","modularui","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","createSSRComplete","store","render","loadingCount","getState","html","resolve","reject","unsubscribe","subscribe","previousCount","error"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore, ReduxState } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length;\n\n/**\n */\nconst createSSRComplete = (\n store: ReduxStore,\n render: Function\n): Promise<string> => {\n let loadingCount = loadingCounter(store.getState());\n let html = \"<div>Nothing to render</div>\";\n\n return new Promise((resolve, reject) => {\n const unsubscribe = store.subscribe(() => {\n const previousCount = loadingCount;\n loadingCount = loadingCounter(store.getState());\n\n if (previousCount !== loadingCount && noLoading(store.getState())) {\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n }\n });\n\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n });\n};\n\nexport default createSSRComplete;\n"],"mappings":";;;;;;;;;;AACA;AAIA;AACA;AACA,MAAMA,SAAS,GAAIC,KAAiB;EAAA;EAAA,OAClC,mDAAYA,KAAK,CAACC,SAAS,CAAC,iBACzBC,GAAG,IAAKF,KAAK,CAACC,SAAS,CAACC,GAAG,CAAC,CAACC,MAAM,KAAKC,2BAAgB,CAACC,OAAO,CAClE,CAACC,MAAM,KAAK,CAAC;AAAA;;AAEhB;AACA;AACA,MAAMC,cAAc,GAAIP,KAAiB;EAAA;EAAA,OACvC,oDAAYA,KAAK,CAACC,SAAS,CAAC,kBACzBC,GAAG,IAAKF,KAAK,CAACC,SAAS,CAACC,GAAG,CAAC,CAACC,MAAM,KAAKC,2BAAgB,CAACC,OAAO,CAClE,CAACC,MAAM;AAAA;;AAEV;AACA;AACA,MAAME,iBAAiB,GAAG,CACxBC,KAAiB,EACjBC,MAAgB,KACI;EACpB,IAAIC,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAQ,EAAE,CAAC;EACnD,IAAIC,IAAI,GAAG,8BAA8B;EAEzC,OAAO,qBAAY,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtC,MAAMC,WAAW,GAAGP,KAAK,CAACQ,SAAS,CAAC,MAAM;MACxC,MAAMC,aAAa,GAAGP,YAAY;MAClCA,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAQ,EAAE,CAAC;MAE/C,IAAIM,aAAa,KAAKP,YAAY,IAAIZ,SAAS,CAACU,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;QACjE,IAAI;UACFC,IAAI,GAAGH,MAAM,EAAE;QACjB,CAAC,CAAC,OAAOS,KAAK,EAAE;UACdJ,MAAM,CAACI,KAAK,CAAC;UACb;QACF;QAEA,IAAIpB,SAAS,CAACU,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;UAC/BI,WAAW,EAAE;UACbF,OAAO,CAACD,IAAI,CAAC;QACf;MACF;IACF,CAAC,CAAC;IAEF,IAAI;MACFA,IAAI,GAAGH,MAAM,EAAE;IACjB,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb;IACF;IAEA,IAAIpB,SAAS,CAACU,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;MAC/BI,WAAW,EAAE;MACbF,OAAO,CAACD,IAAI,CAAC;IACf;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,eAEaL,iBAAiB;AAAA"}
1
+ {"version":3,"file":"createSSRComplete.js","names":["_Constants","require","noLoading","state","_context","_filter","default","_keys","modularui","call","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","_context2","createSSRComplete","store","render","loadingCount","getState","html","_promise","resolve","reject","unsubscribe","subscribe","previousCount","error","_default","exports"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore, ReduxState } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length;\n\n/**\n */\nconst createSSRComplete = (\n store: ReduxStore,\n render: Function\n): Promise<string> => {\n let loadingCount = loadingCounter(store.getState());\n let html = \"<div>Nothing to render</div>\";\n\n return new Promise((resolve, reject) => {\n const unsubscribe = store.subscribe(() => {\n const previousCount = loadingCount;\n loadingCount = loadingCounter(store.getState());\n\n if (previousCount !== loadingCount && noLoading(store.getState())) {\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n }\n });\n\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n });\n};\n\nexport default createSSRComplete;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAIA;AACA;AACA,MAAMC,SAAS,GAAIC,KAAiB;EAAA,IAAAC,QAAA;EAAA,OAClC,IAAAC,OAAA,CAAAC,OAAA,EAAAF,QAAA,OAAAG,KAAA,CAAAD,OAAA,EAAYH,KAAK,CAACK,SAAS,CAAC,EAAAC,IAAA,CAAAL,QAAA,EACzBM,GAAG,IAAKP,KAAK,CAACK,SAAS,CAACE,GAAG,CAAC,CAACC,MAAM,KAAKC,2BAAgB,CAACC,OAAO,CAClE,CAACC,MAAM,KAAK,CAAC;AAAA;;AAEhB;AACA;AACA,MAAMC,cAAc,GAAIZ,KAAiB;EAAA,IAAAa,SAAA;EAAA,OACvC,IAAAX,OAAA,CAAAC,OAAA,EAAAU,SAAA,OAAAT,KAAA,CAAAD,OAAA,EAAYH,KAAK,CAACK,SAAS,CAAC,EAAAC,IAAA,CAAAO,SAAA,EACzBN,GAAG,IAAKP,KAAK,CAACK,SAAS,CAACE,GAAG,CAAC,CAACC,MAAM,KAAKC,2BAAgB,CAACC,OAAO,CAClE,CAACC,MAAM;AAAA;;AAEV;AACA;AACA,MAAMG,iBAAiB,GAAGA,CACxBC,KAAiB,EACjBC,MAAgB,KACI;EACpB,IAAIC,YAAY,GAAGL,cAAc,CAACG,KAAK,CAACG,QAAQ,EAAE,CAAC;EACnD,IAAIC,IAAI,GAAG,8BAA8B;EAEzC,OAAO,IAAAC,QAAA,CAAAjB,OAAA,CAAY,CAACkB,OAAO,EAAEC,MAAM,KAAK;IACtC,MAAMC,WAAW,GAAGR,KAAK,CAACS,SAAS,CAAC,MAAM;MACxC,MAAMC,aAAa,GAAGR,YAAY;MAClCA,YAAY,GAAGL,cAAc,CAACG,KAAK,CAACG,QAAQ,EAAE,CAAC;MAE/C,IAAIO,aAAa,KAAKR,YAAY,IAAIlB,SAAS,CAACgB,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;QACjE,IAAI;UACFC,IAAI,GAAGH,MAAM,EAAE;QACjB,CAAC,CAAC,OAAOU,KAAK,EAAE;UACdJ,MAAM,CAACI,KAAK,CAAC;UACb;QACF;QAEA,IAAI3B,SAAS,CAACgB,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;UAC/BK,WAAW,EAAE;UACbF,OAAO,CAACF,IAAI,CAAC;QACf;MACF;IACF,CAAC,CAAC;IAEF,IAAI;MACFA,IAAI,GAAGH,MAAM,EAAE;IACjB,CAAC,CAAC,OAAOU,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb;IACF;IAEA,IAAI3B,SAAS,CAACgB,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;MAC/BK,WAAW,EAAE;MACbF,OAAO,CAACF,IAAI,CAAC;IACf;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAQ,QAAA,GAEab,iBAAiB;AAAAc,OAAA,CAAAzB,OAAA,GAAAwB,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"htmlpage.js","names":["htmlpage","props","contextPath","undefined","IllegalArgumentException","html","head","template","htmlAttributes","toString","key","join","UUID","state","replace"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = (props: TemplateProps): string => {\n if (props?.contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;;;;;;;;AACA;AAUA;AACA;AACA,MAAMA,QAAQ,GAAIC,KAAoB,IAAa;EAAA;EACjD,IAAIA,KAAK,EAAEC,WAAW,KAAKC,SAAS,EAAE;IACpC,MAAM,IAAIC,oCAAwB,CAAC,8BAA8B,CAAC;EACpE;EACA,IAAIH,KAAK,CAACI,IAAI,KAAKF,SAAS,EAAE;IAC5B,MAAM,IAAIC,oCAAwB,CAAC,yBAAyB,CAAC;EAC/D;EAEA,MAAM;IAAEE,IAAI,GAAG,CAAC;EAAE,CAAC,GAAGL,KAAK;EAE3B,MAAMM,QAAQ,GAAI;AACpB;AACA,UAAUD,IAAI,CAACE,cAAc,GAAGF,IAAI,CAACE,cAAc,CAACC,QAAQ,EAAE,GAAG,EAAG;AACpE;AACA;AACA,QAAQ,iFAAYH,IAAI,CAAC,kBACRI,GAAG,IAAKA,GAAG,KAAK,gBAAgB,CAAC,iBACpCA,GAAG,IAAKJ,IAAI,CAACI,GAAG,CAAC,CAACD,QAAQ,EAAE,CAAC,CAClCE,IAAI,CAAC,EAAE,CAAE;AAClB;AACA;AACA;AACA,8BAA8BV,KAAK,CAACI,IAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BJ,KAAK,CAACW,IAAI,IAAI,EAAG,KAAIX,KAAK,CAACY,KAAK,IAAI,EAAG;AACjE;AACA;AACA;AACA,CAAC;;EAEC;EACA;EACA;EACA,OAAO,+BAAAN,QAAQ,CAACO,OAAO,CAAC,iBAAiB,EAAEb,KAAK,CAACC,WAAW,CAAC,iBAAO;AACtE,CAAC;AAAC,eAEaF,QAAQ;AAAA"}
1
+ {"version":3,"file":"htmlpage.js","names":["_exceptions","require","htmlpage","props","_context","_context2","_context3","contextPath","undefined","IllegalArgumentException","html","head","template","htmlAttributes","toString","_map","default","_filter","_keys","call","key","join","UUID","state","_trim","replace","_default","exports"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = (props: TemplateProps): string => {\n if (props?.contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAUA;AACA;AACA,MAAMC,QAAQ,GAAIC,KAAoB,IAAa;EAAA,IAAAC,QAAA,EAAAC,SAAA,EAAAC,SAAA;EACjD,IAAIH,KAAK,EAAEI,WAAW,KAAKC,SAAS,EAAE;IACpC,MAAM,IAAIC,oCAAwB,CAAC,8BAA8B,CAAC;EACpE;EACA,IAAIN,KAAK,CAACO,IAAI,KAAKF,SAAS,EAAE;IAC5B,MAAM,IAAIC,oCAAwB,CAAC,yBAAyB,CAAC;EAC/D;EAEA,MAAM;IAAEE,IAAI,GAAG,CAAC;EAAE,CAAC,GAAGR,KAAK;EAE3B,MAAMS,QAAQ,GAAI;AACpB;AACA,UAAUD,IAAI,CAACE,cAAc,GAAGF,IAAI,CAACE,cAAc,CAACC,QAAQ,EAAE,GAAG,EAAG;AACpE;AACA;AACA,QAAQ,IAAAC,IAAA,CAAAC,OAAA,EAAAZ,QAAA,OAAAa,OAAA,CAAAD,OAAA,EAAAX,SAAA,OAAAa,KAAA,CAAAF,OAAA,EAAYL,IAAI,CAAC,EAAAQ,IAAA,CAAAd,SAAA,EACRe,GAAG,IAAKA,GAAG,KAAK,gBAAgB,CAAC,EAAAD,IAAA,CAAAf,QAAA,EACpCgB,GAAG,IAAKT,IAAI,CAACS,GAAG,CAAC,CAACN,QAAQ,EAAE,CAAC,CAClCO,IAAI,CAAC,EAAE,CAAE;AAClB;AACA;AACA;AACA,8BAA8BlB,KAAK,CAACO,IAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BP,KAAK,CAACmB,IAAI,IAAI,EAAG,KAAInB,KAAK,CAACoB,KAAK,IAAI,EAAG;AACjE;AACA;AACA;AACA,CAAC;;EAEC;EACA;EACA;EACA,OAAO,IAAAC,KAAA,CAAAR,OAAA,EAAAV,SAAA,GAAAM,QAAQ,CAACa,OAAO,CAAC,iBAAiB,EAAEtB,KAAK,CAACI,WAAW,CAAC,EAAAY,IAAA,CAAAb,SAAA,CAAO;AACtE,CAAC;AAAC,IAAAoB,QAAA,GAEaxB,QAAQ;AAAAyB,OAAA,CAAAX,OAAA,GAAAU,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/react-server/index.js"],"sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as renderSSRComplete } from \"./renderSSRComplete\";\nexport { default as renderSSRMinimal } from \"./renderSSRMinimal\";\n\nexport { default as serverNoSSR } from \"./serverNoSSR\";\nexport { default as serverSSR } from \"./serverSSR\";\n\nexport { default as htmlpage } from \"./htmlpage\";\n\nexport * from \"./requestInformation\";\nexport * from \"./serverUtil\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAEA;AACA;AAEA;AACA;AAEA;AAEA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_Error","require","_renderSSRComplete","_interopRequireDefault","_renderSSRMinimal","_serverNoSSR","_serverSSR","_htmlpage","_requestInformation","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_serverUtil"],"sources":["../../src/react-server/index.js"],"sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as renderSSRComplete } from \"./renderSSRComplete\";\nexport { default as renderSSRMinimal } from \"./renderSSRMinimal\";\n\nexport { default as serverNoSSR } from \"./serverNoSSR\";\nexport { default as serverSSR } from \"./serverSSR\";\n\nexport { default as htmlpage } from \"./htmlpage\";\n\nexport * from \"./requestInformation\";\nexport * from \"./serverUtil\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,mBAAA,GAAAP,OAAA;AAAAQ,YAAA,CAAAD,mBAAA,EAAAE,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAH,mBAAA,CAAAG,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,mBAAA,CAAAG,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,WAAA,GAAApB,OAAA;AAAAQ,YAAA,CAAAY,WAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAU,WAAA,CAAAV,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,WAAA,CAAAV,GAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderSSRComplete.js","names":["renderSSRComplete","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","helmet","routerContext","sheet","ServerStyleSheet","location","toLocation","basePath","getBasePath","createSSRComplete","renderToString","instance","then","appHTML","handleErrors","head","createHead","contextPath","html","state","dehydrate","catch","error","message","fileName","lineNumber","stack"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme,\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = { helmet: {} };\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n const basePath = getBasePath();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>\n )\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n })\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":";;;;;;;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAEA;AAAmE;AAiBnE;AACA;AACA,MAAMA,iBAAiB,GAAG,QAQI;EAAA,IARH;IACzBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,WAAW;IACXC,MAAM;IACNC,SAAS;IACTC,QAAQ,GAAGC;EACN,CAAC;EACN,MAAMC,aAAa,GAAG;IAAEC,MAAM,EAAE,CAAC;EAAE,CAAC;EACpC,MAAMC,aAAa,GAAG,CAAC,CAAC;EAExB,MAAMC,KAAK,GAAG,IAAIC,kCAA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,CAACC,OAAQ;UAC5B,aAAa,EAAED,KAAK,CAACE,QAAS;UAC9B,SAAS,EAAEF,KAAK,CAACG,UAAW;UAC5B,UAAU,EAAEH,KAAK,CAACI;QAAM;MACxB;IACY,EACE,CACrB;IACDX,IAAI,EAAEf,aAAa,CAACC,MAAM;IAC1BkB,KAAK,EAAE,EAAE;IACTzB;EACF,CAAC,CAAC,CACH;AACL,CAAC;AAAC,eAEaH,iBAAiB;AAAA"}
1
+ {"version":3,"file":"renderSSRComplete.js","names":["_server","require","_reactRedux","_reactRouter","_reactHelmetAsync","_styledComponents","_createSSRComplete","_interopRequireDefault","_htmlpage","_Settings","_ThemeProvider","_ErrorBoundary","_serverUtil","_jsxRuntime","renderSSRComplete","_ref","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","helmet","routerContext","sheet","ServerStyleSheet","location","toLocation","basePath","getBasePath","createSSRComplete","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","HelmetProvider","context","StaticRouter","basename","then","appHTML","handleErrors","head","createHead","contextPath","html","state","dehydrate","catch","error","errorMessage","message","errorResource","fileName","errorLine","lineNumber","errorStack","stack","_default","exports"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme,\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = { helmet: {} };\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n const basePath = getBasePath();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>\n )\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n })\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,S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AC,CAAC,CACH;AACL,CAAC;AAAC,IAAA8C,QAAA,GAEalD,iBAAiB;AAAAmD,OAAA,CAAAzB,OAAA,GAAAwB,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderSSRMinimal.js","names":["renderSSRMinimal","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","renderToString","instance","head","createHead","contextPath","getBasePath","html","state","dehydrate"],"sources":["../../src/react-server/renderSSRMinimal.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\n\nimport { Provider } from \"react-redux\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport { createHead, dehydrate } from \"./serverUtil\";\nimport htmlpage from \"./htmlpage\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { TemplateProps } from \"./htmlpage\";\ntype Props = {\n store: ReduxStore,\n theme?: Theme | Array<Theme>,\n UUID: string,\n render: Function,\n template?: (TemplateProps) => string,\n};\n\n/**\n */\nconst renderSSRMinimal = ({\n store,\n theme,\n UUID = \"\",\n render,\n template = htmlpage,\n}: Props): string => {\n const sheet = new ServerStyleSheet();\n\n const appHTML = renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>{render()}</ThemeProvider>\n </StyleSheetManager>\n </Provider>\n );\n\n const head = createHead(sheet, UUID);\n return template({\n contextPath: getBasePath(),\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;AACA;AAEA;AAEA;AACA;AAEA;AAEA;AACA;AAAkC;AAalC;AACA;AACA,MAAMA,gBAAgB,GAAG,QAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGC;EACN,CAAC;EACN,MAAMC,KAAK,GAAG,IAAIC,kCAAgB,EAAE;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,gBAC5B,qBAAC,oBAAQ;IAAC,KAAK,EAAET,KAAM;IAAA,uBACrB,qBAAC,mCAAiB;MAAC,KAAK,EAAEM,KAAK,CAACI,QAAS;MAAA,uBACvC,qBAAC,sBAAa;QAAC,KAAK,EAAET,KAAM;QAAA,UAAEE,MAAM;MAAE;IAAiB;EACrC,EACX,CACZ;EAED,MAAMQ,IAAI,GAAG,IAAAC,sBAAU,EAACN,KAAK,EAAEJ,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdS,WAAW,EAAE,IAAAC,qBAAW,GAAE;IAC1BC,IAAI,EAAEP,OAAO;IACbG,IAAI;IACJK,KAAK,EAAE,IAAAC,qBAAS,EAACjB,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,eAEaH,gBAAgB;AAAA"}
1
+ {"version":3,"file":"renderSSRMinimal.js","names":["_server","require","_reactRedux","_styledComponents","_ThemeProvider","_interopRequireDefault","_Settings","_serverUtil","_htmlpage","_jsxRuntime","renderSSRMinimal","_ref","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","head","createHead","contextPath","getBasePath","html","state","dehydrate","_default","exports"],"sources":["../../src/react-server/renderSSRMinimal.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\n\nimport { Provider } from \"react-redux\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport { createHead, dehydrate } from \"./serverUtil\";\nimport htmlpage from \"./htmlpage\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { TemplateProps } from \"./htmlpage\";\ntype Props = {\n store: ReduxStore,\n theme?: Theme | Array<Theme>,\n UUID: string,\n render: Function,\n template?: (TemplateProps) => string,\n};\n\n/**\n */\nconst renderSSRMinimal = ({\n store,\n theme,\n UUID = \"\",\n render,\n template = htmlpage,\n}: Props): string => {\n const sheet = new ServerStyleSheet();\n\n const appHTML = renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>{render()}</ThemeProvider>\n </StyleSheetManager>\n </Provider>\n );\n\n const head = createHead(sheet, UUID);\n return template({\n contextPath: getBasePath(),\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAH,sBAAA,CAAAJ,OAAA;AAAkC,IAAAQ,WAAA,GAAAR,OAAA;AAalC;AACA;AACA,MAAMS,gBAAgB,GAAGC,IAAA,IAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGC;EACN,CAAC,GAAAN,IAAA;EACN,MAAMO,KAAK,GAAG,IAAIC,kCAAgB,EAAE;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,gBAC5B,IAAAZ,WAAA,CAAAa,GAAA,EAACpB,WAAA,CAAAqB,QAAQ;IAACX,KAAK,EAAEA,KAAM;IAAAY,QAAA,eACrB,IAAAf,WAAA,CAAAa,GAAA,EAACnB,iBAAA,CAAAsB,iBAAiB;MAACP,KAAK,EAAEA,KAAK,CAACQ,QAAS;MAAAF,QAAA,eACvC,IAAAf,WAAA,CAAAa,GAAA,EAAClB,cAAA,CAAAuB,OAAa;QAACd,KAAK,EAAEA,KAAM;QAAAW,QAAA,EAAET,MAAM;MAAE;IAAiB;EACrC,EACX,CACZ;EAED,MAAMa,IAAI,GAAG,IAAAC,sBAAU,EAACX,KAAK,EAAEJ,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdc,WAAW,EAAE,IAAAC,qBAAW,GAAE;IAC1BC,IAAI,EAAEZ,OAAO;IACbQ,IAAI;IACJK,KAAK,EAAE,IAAAC,qBAAS,EAACtB,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqB,QAAA,GAEazB,gBAAgB;AAAA0B,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"requestInformation.js","names":["getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n const pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n if (queryString) {\n return `${pathInfo}?${queryString}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":";;;;;;;AACA;AAIA;AACA;AACO,MAAMA,iBAAiB,GAAIC,OAA+B,IAAa;EAC5E,MAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAW,EAAE,IAAI,GAAG;EAC7C,MAAMC,WAAW,GAAGH,OAAO,CAACI,cAAc,EAAE;EAE5C,IAAID,WAAW,EAAE;IACf,OAAQ,GAAEF,QAAS,IAAGE,WAAY,EAAC;EACrC;EAEA,OAAOF,QAAQ;AACjB,CAAC;;AAED;AACA;AADA;AAEO,MAAMI,kBAAkB,GAAIL,OAA+B,IAChE,IAAIM,aAAI,CAACP,iBAAiB,CAACC,OAAO,CAAC,CAAC;;AAEtC;AACA;AADA;AAEO,MAAMO,oBAAoB,GAAG,CAClCP,OAA+B,EAC/BQ,UAAkB,KACA;EAClB,OAAOR,OAAO,CAACS,eAAe,CAACD,UAAU,CAAC;AAC5C,CAAC;;AAED;AACA;AADA;AAEO,MAAME,kBAAkB,GAAG,CAChCV,OAA+B,EAC/BW,OAAgB,KACE;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACP,OAAO,EAAE,QAAQ,CAAC;EAClE,MAAMa,oBAAoB,GACxBD,kBAAkB,IAAIZ,OAAO,CAACc,SAAS,CAAC,iBAAiB,CAAC;;EAE5D;EACA,IAAID,oBAAoB,KAAK,IAAI,EAAE;IACjC,OAAOF,OAAO,CAACI,oBAAoB,CAAC,CAAC,CAAC;EACxC;EAEA,OAAOJ,OAAO,CAACD,kBAAkB,CAACG,oBAAoB,CAAC;AACzD,CAAC;AAAC"}
1
+ {"version":3,"file":"requestInformation.js","names":["_Href","_interopRequireDefault","require","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","exports","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n const pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n if (queryString) {\n return `${pathInfo}?${queryString}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,iBAAiB,GAAIC,OAA+B,IAAa;EAC5E,MAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAW,EAAE,IAAI,GAAG;EAC7C,MAAMC,WAAW,GAAGH,OAAO,CAACI,cAAc,EAAE;EAE5C,IAAID,WAAW,EAAE;IACf,OAAQ,GAAEF,QAAS,IAAGE,WAAY,EAAC;EACrC;EAEA,OAAOF,QAAQ;AACjB,CAAC;;AAED;AACA;AADAI,OAAA,CAAAN,iBAAA,GAAAA,iBAAA;AAEO,MAAMO,kBAAkB,GAAIN,OAA+B,IAChE,IAAIO,aAAI,CAACR,iBAAiB,CAACC,OAAO,CAAC,CAAC;;AAEtC;AACA;AADAK,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEO,MAAME,oBAAoB,GAAGA,CAClCR,OAA+B,EAC/BS,UAAkB,KACA;EAClB,OAAOT,OAAO,CAACU,eAAe,CAACD,UAAU,CAAC;AAC5C,CAAC;;AAED;AACA;AADAJ,OAAA,CAAAG,oBAAA,GAAAA,oBAAA;AAEO,MAAMG,kBAAkB,GAAGA,CAChCX,OAA+B,EAC/BY,OAAgB,KACE;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACR,OAAO,EAAE,QAAQ,CAAC;EAClE,MAAMc,oBAAoB,GACxBD,kBAAkB,IAAIb,OAAO,CAACe,SAAS,CAAC,iBAAiB,CAAC;;EAE5D;EACA,IAAID,oBAAoB,KAAK,IAAI,EAAE;IACjC,OAAOF,OAAO,CAACI,oBAAoB,CAAC,CAAC,CAAC;EACxC;EAEA,OAAOJ,OAAO,CAACD,kBAAkB,CAACG,oBAAoB,CAAC;AACzD,CAAC;AAACT,OAAA,CAAAM,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"serverNoSSR.js","names":["serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","storedTheme","getState","preferences","createTheme","setI18n","setApplication","handleErrors","handleBeforeRenderHooks","renderSSRMinimal"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AAEA;AASA;AAEA;AAEA;AAoBA;AACA;AACA,MAAMA,WAAW,GAAG,QAUO;EAAA,IAVN;IACnBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,iBAAiB;IACjBC,kBAAkB,GAAG;EACV,CAAC;EACZ,MAAMC,IAAI,GAAG,IAAAC,mBAAU,GAAE;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACb,OAAO,CAAC;EAE/C,MAAMc,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEV,cAAc,CAAC;EAE3D,IAAAc,gCAAoB,EAACF,KAAK,EAAEX,iBAAiB,CAAC;EAC9C,IAAAc,iCAAqB,EAACH,KAAK,CAAC;EAE5B,IAAIV,KAAK,EAAE;IACT,MAAMc,WAAW,GAAGJ,KAAK,CAACK,QAAQ,EAAE,EAAEC,WAAW,EAAEhB,KAAK;IACxD;IACA,IAAAiB,oBAAW,EAACH,WAAW,EAAEd,KAAK,CAAC;EACjC;EAEA,IAAAkB,mBAAO,EAACR,KAAK,EAAEb,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtB,IAAAe,0BAAc,EAACT,KAAK,CAAC;EACvB;EAEA,IAAAU,wBAAY,EAACV,KAAK,CAAC;EAEnB,IAAAW,0CAAuB,EAAClB,iBAAiB,EAAE;IAAEO,KAAK;IAAEd;EAAQ,CAAC,CAAC;EAE9D,OAAO,IAAA0B,yBAAgB,EAAC;IAAEZ,KAAK;IAAEV,KAAK;IAAEK,IAAI;IAAEJ,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAAC,eAEaP,WAAW;AAAA"}
1
+ {"version":3,"file":"serverNoSSR.js","names":["require","_createUUID","_interopRequireDefault","_requestInformation","_serverUtil","_beforeRenderHooks","_renderSSRMinimal","_createTheme","serverNoSSR","_ref","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","storedTheme","getState","preferences","createTheme","setI18n","setApplication","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","_default","exports","default"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;AACAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AASA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,iBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,YAAA,G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3,"file":"serverSSR.js","names":["serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","setI18n","handleBeforeRenderHooks","renderSSRComplete"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":";;;;;;;AACA;AAEA;AACA;AAEA;AAOA;AAEA;AAkBA;AACA;AACA,MAAMA,SAAS,GAAG,QAUkB;EAAA,IAVjB;IACjBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK,GAAG,IAAI;IACZC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAG,IAAAC,mBAAU,GAAE;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACb,OAAO,CAAC;EAC/C,MAAMc,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEV,cAAc,CAAC;EAE3D,IAAAc,gCAAoB,EAACF,KAAK,EAAEX,iBAAiB,CAAC;EAC9C,IAAAc,iCAAqB,EAACH,KAAK,CAAC;EAC5B,IAAAI,mBAAO,EAACJ,KAAK,EAAEb,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAAmB,0CAAuB,EAACX,iBAAiB,EAAE;IAAER,OAAO;IAAEc;EAAM,CAAC,CAAC;EAE9D,OAAO,IAAAM,0BAAiB,EAAC;IACvBN,KAAK;IACLV,KAAK;IACLK,IAAI;IACJG,WAAW;IACXP,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,eAEaR,SAAS;AAAA"}
1
+ {"version":3,"file":"serverSSR.js","names":["require","_createUUID","_interopRequireDefault","_requestInformation","_serverUtil","_beforeRenderHooks","_renderSSRComplete","serverSSR","_ref","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","setI18n","handleBeforeRenderHooks","renderSSRComplete","_default","exports","default"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":";;;;;;;AACAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AAOA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,kBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAkBA;AACA;AACA,MAAMO,SAAS,GAAGC,IAAA,IAUkB;EAAA,IAVjB;IACjBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK,GAAG,IAAI;IACZC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC;EACW,CAAC,GAAAT,IAAA;EACZ,MAAMU,IAAI,GAAG,IAAAC,mBAAU,GAAE;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACb,OAAO,CAAC;EAC/C,MAAMc,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEV,cAAc,CAAC;EAE3D,IAAAc,gCAAoB,EAACF,KAAK,EAAEX,iBAAiB,CAAC;EAC9C,IAAAc,iCAAqB,EAACH,KAAK,CAAC;EAC5B,IAAAI,mBAAO,EAACJ,KAAK,EAAEb,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAAmB,0CAAuB,EAACX,iBAAiB,EAAE;IAAER,OAAO;IAAEc;EAAM,CAAC,CAAC;EAE9D,OAAO,IAAAM,0BAAiB,EAAC;IACvBN,KAAK;IACLV,KAAK;IACLK,IAAI;IACJG,WAAW;IACXP,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAc,QAAA,GAEavB,SAAS;AAAAwB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}