@beinformed/ui 1.63.2 → 1.63.3

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 (460) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/esm/constants/Settings.js +3 -14
  3. package/esm/constants/Settings.js.map +1 -1
  4. package/esm/exceptions/NotFoundException.js +1 -2
  5. package/esm/exceptions/NotFoundException.js.map +1 -1
  6. package/esm/hooks/useI18n.js +1 -6
  7. package/esm/hooks/useI18n.js.map +1 -1
  8. package/esm/hooks/useModal.js +3 -4
  9. package/esm/hooks/useModal.js.map +1 -1
  10. package/esm/hooks/useModelCatalog.js +10 -30
  11. package/esm/hooks/useModelCatalog.js.map +1 -1
  12. package/esm/hooks/useModularUI.js +4 -5
  13. package/esm/hooks/useModularUI.js.map +1 -1
  14. package/esm/hooks/useModularUIBasic.js +7 -8
  15. package/esm/hooks/useModularUIBasic.js.map +1 -1
  16. package/esm/i18n/Locale.js +2 -5
  17. package/esm/i18n/Locale.js.map +1 -1
  18. package/esm/i18n/Locales.js +2 -5
  19. package/esm/i18n/Locales.js.map +1 -1
  20. package/esm/i18n/Message.js +9 -10
  21. package/esm/i18n/Message.js.map +1 -1
  22. package/esm/i18n/withMessage.js +1 -6
  23. package/esm/i18n/withMessage.js.map +1 -1
  24. package/esm/models/actions/ActionCollection.js +3 -6
  25. package/esm/models/actions/ActionCollection.js.map +1 -1
  26. package/esm/models/actions/ActionModel.js +1 -4
  27. package/esm/models/actions/ActionModel.js.map +1 -1
  28. package/esm/models/application/ApplicationModel.js +2 -2
  29. package/esm/models/application/ApplicationModel.js.map +1 -1
  30. package/esm/models/attributes/AttributeCollection.js +4 -14
  31. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  32. package/esm/models/attributes/AttributeDataHelper.js +1 -2
  33. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  34. package/esm/models/attributes/AttributeSetModel.js +1 -5
  35. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  36. package/esm/models/attributes/CaptchaAttributeModel.js +2 -2
  37. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  38. package/esm/models/attributes/ChoiceAttributeModel.js +1 -3
  39. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  40. package/esm/models/attributes/ChoiceAttributeOptionCollection.js +3 -9
  41. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  42. package/esm/models/attributes/ChoiceAttributeOptionModel.js +2 -8
  43. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  44. package/esm/models/attributes/PasswordAttributeModel.js +2 -2
  45. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  46. package/esm/models/attributes/UploadAttributeModel.js +2 -2
  47. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  48. package/esm/models/attributes/input-constraints/ConstraintCollection.js +1 -2
  49. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  50. package/esm/models/attributes/input-constraints/ConstraintModel.js +1 -2
  51. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  52. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -4
  53. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  54. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -6
  55. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  56. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -4
  57. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  58. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
  59. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  60. package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
  61. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  62. package/esm/models/base/BaseCollection.js +1 -2
  63. package/esm/models/base/BaseCollection.js.map +1 -1
  64. package/esm/models/base/BaseModel.js +6 -9
  65. package/esm/models/base/BaseModel.js.map +1 -1
  66. package/esm/models/base/ResourceModel.js +1 -2
  67. package/esm/models/base/ResourceModel.js.map +1 -1
  68. package/esm/models/concepts/BusinessScenarioModel.js +2 -2
  69. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  70. package/esm/models/concepts/ConceptDetailModel.js +1 -2
  71. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  72. package/esm/models/concepts/ConceptLinkModel.js +1 -3
  73. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  74. package/esm/models/concepts/ConceptRelationCollection.js +1 -4
  75. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  76. package/esm/models/concepts/ConceptRelationModel.js +1 -3
  77. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  78. package/esm/models/concepts/SourceReferenceCollection.js +1 -4
  79. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  80. package/esm/models/concepts/SourceReferenceModel.js +7 -3
  81. package/esm/models/concepts/SourceReferenceModel.js.flow +6 -0
  82. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  83. package/esm/models/content/ContentLinkModel.js +1 -3
  84. package/esm/models/content/ContentLinkModel.js.map +1 -1
  85. package/esm/models/content/ContentTOCModel.js +2 -2
  86. package/esm/models/content/ContentTOCModel.js.map +1 -1
  87. package/esm/models/contentconfiguration/ContentConfigurationElements.js +1 -2
  88. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  89. package/esm/models/error/ErrorModel.js +1 -3
  90. package/esm/models/error/ErrorModel.js.map +1 -1
  91. package/esm/models/filters/FilterCollection.js +1 -4
  92. package/esm/models/filters/FilterCollection.js.map +1 -1
  93. package/esm/models/form/FormModel.js +3 -9
  94. package/esm/models/form/FormModel.js.map +1 -1
  95. package/esm/models/form/FormObjectModel.js +2 -4
  96. package/esm/models/form/FormObjectModel.js.map +1 -1
  97. package/esm/models/href/Href.js +3 -6
  98. package/esm/models/href/Href.js.map +1 -1
  99. package/esm/models/href/ListHref.js +1 -2
  100. package/esm/models/href/ListHref.js.map +1 -1
  101. package/esm/models/layouthint/LayoutHintCollection.js +3 -10
  102. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  103. package/esm/models/links/LinkCollection.js +6 -15
  104. package/esm/models/links/LinkCollection.js.map +1 -1
  105. package/esm/models/list/ListModel.js +2 -2
  106. package/esm/models/list/ListModel.js.map +1 -1
  107. package/esm/models/modelcatalog/ModelCategoryCollection.js +1 -2
  108. package/esm/models/modelcatalog/ModelCategoryCollection.js.map +1 -1
  109. package/esm/models/parameter/Parameter.js +2 -4
  110. package/esm/models/parameter/Parameter.js.map +1 -1
  111. package/esm/models/resolveModel.js +1 -2
  112. package/esm/models/resolveModel.js.map +1 -1
  113. package/esm/models/sorting/SortingModel.js +1 -2
  114. package/esm/models/sorting/SortingModel.js.map +1 -1
  115. package/esm/models/user/UserServicesModel.js +2 -2
  116. package/esm/models/user/UserServicesModel.js.map +1 -1
  117. package/esm/modularui/ModularUIRequest.js +1 -2
  118. package/esm/modularui/ModularUIRequest.js.map +1 -1
  119. package/esm/react/ErrorBoundary.js +2 -2
  120. package/esm/react/ErrorBoundary.js.map +1 -1
  121. package/esm/react/ErrorBoundaryFallback.js +13 -16
  122. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  123. package/esm/react/utils.js +1 -3
  124. package/esm/react/utils.js.map +1 -1
  125. package/esm/react-client/Init.js +20 -23
  126. package/esm/react-client/Init.js.map +1 -1
  127. package/esm/react-client/client.js +9 -13
  128. package/esm/react-client/client.js.map +1 -1
  129. package/esm/react-server/renderSSRComplete.js +9 -10
  130. package/esm/react-server/renderSSRComplete.js.map +1 -1
  131. package/esm/react-server/renderSSRMinimal.js +7 -8
  132. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  133. package/esm/react-server/serverNoSSR.js +11 -12
  134. package/esm/react-server/serverNoSSR.js.map +1 -1
  135. package/esm/react-server/serverSSR.js +11 -12
  136. package/esm/react-server/serverSSR.js.map +1 -1
  137. package/esm/react-server/serverUtil.js +1 -3
  138. package/esm/react-server/serverUtil.js.map +1 -1
  139. package/esm/react-theme/ThemeProvider.js +7 -11
  140. package/esm/react-theme/ThemeProvider.js.map +1 -1
  141. package/esm/react-theme/createTheme.js +3 -10
  142. package/esm/react-theme/createTheme.js.map +1 -1
  143. package/esm/react-theme/utils/background.js +3 -4
  144. package/esm/react-theme/utils/background.js.map +1 -1
  145. package/esm/react-theme/utils/colors.js +7 -16
  146. package/esm/react-theme/utils/colors.js.map +1 -1
  147. package/esm/react-theme/utils/contrast.js +11 -19
  148. package/esm/react-theme/utils/contrast.js.map +1 -1
  149. package/esm/react-theme/utils/corners.js +10 -16
  150. package/esm/react-theme/utils/corners.js.map +1 -1
  151. package/esm/react-theme/utils/spacers.js +15 -38
  152. package/esm/react-theme/utils/spacers.js.map +1 -1
  153. package/esm/react-theme/utils/themeProps.js +7 -22
  154. package/esm/react-theme/utils/themeProps.js.map +1 -1
  155. package/esm/redux/_i18n/I18nReducer.js +5 -8
  156. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  157. package/esm/redux/_modularui/ModularUIActions.js +19 -23
  158. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  159. package/esm/redux/_modularui/ModularUIConnector.js +4 -5
  160. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  161. package/esm/redux/_modularui/ModularUIReducer.js +14 -19
  162. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  163. package/esm/redux/_modularui/ModularUIUtils.js +1 -2
  164. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  165. package/esm/redux/_modularui/withModularUI.js +1 -2
  166. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  167. package/esm/redux/_router/RouterReducer.js +1 -3
  168. package/esm/redux/_router/RouterReducer.js.map +1 -1
  169. package/esm/redux/actions/FormAttributeSet.js +34 -37
  170. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  171. package/esm/redux/actions/FormAutosubmit.js +1 -2
  172. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  173. package/esm/redux/actions/Preferences.js +8 -15
  174. package/esm/redux/actions/Preferences.js.map +1 -1
  175. package/esm/redux/connectors/CaseView.js +3 -6
  176. package/esm/redux/connectors/CaseView.js.map +1 -1
  177. package/esm/redux/connectors/ConceptDetail.js +4 -7
  178. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  179. package/esm/redux/connectors/ContentBrowser.js +3 -6
  180. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  181. package/esm/redux/connectors/ContentDetail.js +4 -7
  182. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  183. package/esm/redux/connectors/ContentDetailSection.js +5 -8
  184. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  185. package/esm/redux/connectors/Form.js +4 -5
  186. package/esm/redux/connectors/Form.js.map +1 -1
  187. package/esm/redux/connectors/FormAttributeSet.js +5 -8
  188. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  189. package/esm/redux/connectors/ListDetail.js +3 -6
  190. package/esm/redux/connectors/ListDetail.js.map +1 -1
  191. package/esm/redux/connectors/ModelCatalog.js +3 -6
  192. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  193. package/esm/redux/connectors/PanelRenderer.js +5 -6
  194. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  195. package/esm/redux/connectors/QuickSearch.js +3 -6
  196. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  197. package/esm/redux/connectors/Tab.js +3 -6
  198. package/esm/redux/connectors/Tab.js.map +1 -1
  199. package/esm/redux/reducers/AuthReducer.js +1 -3
  200. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  201. package/esm/redux/reducers/ErrorReducer.js +1 -3
  202. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  203. package/esm/redux/reducers/ModalsReducer.js +1 -3
  204. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  205. package/esm/redux/reducers/ModelCatalogReducer.js +1 -3
  206. package/esm/redux/reducers/ModelCatalogReducer.js.map +1 -1
  207. package/esm/redux/reducers/NotificationReducer.js +1 -3
  208. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  209. package/esm/redux/reducers/PreferencesReducer.js +1 -3
  210. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  211. package/esm/redux/reducers/ProgressIndicatorReducer.js +1 -3
  212. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  213. package/esm/redux/store/beforeRenderHooks.js +1 -3
  214. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  215. package/esm/utils/browser/Cache.js +1 -5
  216. package/esm/utils/browser/Cache.js.map +1 -1
  217. package/esm/utils/datetime/DateTimeUtil.js +45 -91
  218. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  219. package/esm/utils/fetch/xhr.js +1 -2
  220. package/esm/utils/fetch/xhr.js.map +1 -1
  221. package/esm/utils/helpers/repositoryResource.js +1 -3
  222. package/esm/utils/helpers/repositoryResource.js.map +1 -1
  223. package/esm/utils/helpers/sanitizeHtml.js +3 -4
  224. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  225. package/esm/utils/number/DecimalFormat.js +1 -2
  226. package/esm/utils/number/DecimalFormat.js.map +1 -1
  227. package/esm/utils/number/formatValue.js +1 -4
  228. package/esm/utils/number/formatValue.js.map +1 -1
  229. package/esm/utils/number/parseNumbers.js +2 -6
  230. package/esm/utils/number/parseNumbers.js.map +1 -1
  231. package/lib/constants/Settings.js +3 -14
  232. package/lib/constants/Settings.js.map +1 -1
  233. package/lib/exceptions/NotFoundException.js +1 -2
  234. package/lib/exceptions/NotFoundException.js.map +1 -1
  235. package/lib/hooks/useI18n.js +1 -6
  236. package/lib/hooks/useI18n.js.map +1 -1
  237. package/lib/hooks/useModal.js +3 -4
  238. package/lib/hooks/useModal.js.map +1 -1
  239. package/lib/hooks/useModelCatalog.js +10 -30
  240. package/lib/hooks/useModelCatalog.js.map +1 -1
  241. package/lib/hooks/useModularUI.js +4 -5
  242. package/lib/hooks/useModularUI.js.map +1 -1
  243. package/lib/hooks/useModularUIBasic.js +7 -8
  244. package/lib/hooks/useModularUIBasic.js.map +1 -1
  245. package/lib/i18n/Locale.js +2 -5
  246. package/lib/i18n/Locale.js.map +1 -1
  247. package/lib/i18n/Locales.js +2 -5
  248. package/lib/i18n/Locales.js.map +1 -1
  249. package/lib/i18n/Message.js +9 -10
  250. package/lib/i18n/Message.js.map +1 -1
  251. package/lib/i18n/withMessage.js +1 -6
  252. package/lib/i18n/withMessage.js.map +1 -1
  253. package/lib/models/actions/ActionCollection.js +3 -6
  254. package/lib/models/actions/ActionCollection.js.map +1 -1
  255. package/lib/models/actions/ActionModel.js +1 -4
  256. package/lib/models/actions/ActionModel.js.map +1 -1
  257. package/lib/models/application/ApplicationModel.js +2 -2
  258. package/lib/models/application/ApplicationModel.js.map +1 -1
  259. package/lib/models/attributes/AttributeCollection.js +4 -14
  260. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  261. package/lib/models/attributes/AttributeDataHelper.js +1 -2
  262. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  263. package/lib/models/attributes/AttributeSetModel.js +1 -5
  264. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  265. package/lib/models/attributes/CaptchaAttributeModel.js +2 -2
  266. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  267. package/lib/models/attributes/ChoiceAttributeModel.js +1 -3
  268. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  269. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +3 -9
  270. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  271. package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -8
  272. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  273. package/lib/models/attributes/PasswordAttributeModel.js +2 -2
  274. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  275. package/lib/models/attributes/UploadAttributeModel.js +2 -2
  276. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  277. package/lib/models/attributes/input-constraints/ConstraintCollection.js +1 -2
  278. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  279. package/lib/models/attributes/input-constraints/ConstraintModel.js +1 -2
  280. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  281. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -4
  282. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  283. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -6
  284. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  285. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -4
  286. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  287. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
  288. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  289. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
  290. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  291. package/lib/models/base/BaseCollection.js +1 -2
  292. package/lib/models/base/BaseCollection.js.map +1 -1
  293. package/lib/models/base/BaseModel.js +6 -9
  294. package/lib/models/base/BaseModel.js.map +1 -1
  295. package/lib/models/base/ResourceModel.js +1 -2
  296. package/lib/models/base/ResourceModel.js.map +1 -1
  297. package/lib/models/concepts/BusinessScenarioModel.js +2 -2
  298. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  299. package/lib/models/concepts/ConceptDetailModel.js +1 -2
  300. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  301. package/lib/models/concepts/ConceptLinkModel.js +1 -3
  302. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  303. package/lib/models/concepts/ConceptRelationCollection.js +1 -4
  304. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  305. package/lib/models/concepts/ConceptRelationModel.js +1 -3
  306. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  307. package/lib/models/concepts/SourceReferenceCollection.js +1 -4
  308. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  309. package/lib/models/concepts/SourceReferenceModel.js +7 -3
  310. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  311. package/lib/models/content/ContentLinkModel.js +1 -3
  312. package/lib/models/content/ContentLinkModel.js.map +1 -1
  313. package/lib/models/content/ContentTOCModel.js +2 -2
  314. package/lib/models/content/ContentTOCModel.js.map +1 -1
  315. package/lib/models/contentconfiguration/ContentConfigurationElements.js +1 -2
  316. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  317. package/lib/models/error/ErrorModel.js +1 -3
  318. package/lib/models/error/ErrorModel.js.map +1 -1
  319. package/lib/models/filters/FilterCollection.js +1 -4
  320. package/lib/models/filters/FilterCollection.js.map +1 -1
  321. package/lib/models/form/FormModel.js +3 -9
  322. package/lib/models/form/FormModel.js.map +1 -1
  323. package/lib/models/form/FormObjectModel.js +2 -4
  324. package/lib/models/form/FormObjectModel.js.map +1 -1
  325. package/lib/models/href/Href.js +3 -6
  326. package/lib/models/href/Href.js.map +1 -1
  327. package/lib/models/href/ListHref.js +1 -2
  328. package/lib/models/href/ListHref.js.map +1 -1
  329. package/lib/models/layouthint/LayoutHintCollection.js +3 -10
  330. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  331. package/lib/models/links/LinkCollection.js +6 -15
  332. package/lib/models/links/LinkCollection.js.map +1 -1
  333. package/lib/models/list/ListModel.js +2 -2
  334. package/lib/models/list/ListModel.js.map +1 -1
  335. package/lib/models/modelcatalog/ModelCategoryCollection.js +1 -2
  336. package/lib/models/modelcatalog/ModelCategoryCollection.js.map +1 -1
  337. package/lib/models/parameter/Parameter.js +2 -4
  338. package/lib/models/parameter/Parameter.js.map +1 -1
  339. package/lib/models/resolveModel.js +1 -2
  340. package/lib/models/resolveModel.js.map +1 -1
  341. package/lib/models/sorting/SortingModel.js +1 -2
  342. package/lib/models/sorting/SortingModel.js.map +1 -1
  343. package/lib/models/user/UserServicesModel.js +2 -2
  344. package/lib/models/user/UserServicesModel.js.map +1 -1
  345. package/lib/modularui/ModularUIRequest.js +1 -2
  346. package/lib/modularui/ModularUIRequest.js.map +1 -1
  347. package/lib/react/ErrorBoundary.js +2 -2
  348. package/lib/react/ErrorBoundary.js.map +1 -1
  349. package/lib/react/ErrorBoundaryFallback.js +13 -16
  350. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  351. package/lib/react/utils.js +1 -3
  352. package/lib/react/utils.js.map +1 -1
  353. package/lib/react-client/Init.js +20 -23
  354. package/lib/react-client/Init.js.map +1 -1
  355. package/lib/react-client/client.js +9 -13
  356. package/lib/react-client/client.js.map +1 -1
  357. package/lib/react-server/renderSSRComplete.js +9 -10
  358. package/lib/react-server/renderSSRComplete.js.map +1 -1
  359. package/lib/react-server/renderSSRMinimal.js +7 -8
  360. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  361. package/lib/react-server/serverNoSSR.js +11 -12
  362. package/lib/react-server/serverNoSSR.js.map +1 -1
  363. package/lib/react-server/serverSSR.js +11 -12
  364. package/lib/react-server/serverSSR.js.map +1 -1
  365. package/lib/react-server/serverUtil.js +1 -3
  366. package/lib/react-server/serverUtil.js.map +1 -1
  367. package/lib/react-theme/ThemeProvider.js +7 -11
  368. package/lib/react-theme/ThemeProvider.js.map +1 -1
  369. package/lib/react-theme/createTheme.js +3 -10
  370. package/lib/react-theme/createTheme.js.map +1 -1
  371. package/lib/react-theme/utils/background.js +3 -4
  372. package/lib/react-theme/utils/background.js.map +1 -1
  373. package/lib/react-theme/utils/colors.js +7 -16
  374. package/lib/react-theme/utils/colors.js.map +1 -1
  375. package/lib/react-theme/utils/contrast.js +11 -19
  376. package/lib/react-theme/utils/contrast.js.map +1 -1
  377. package/lib/react-theme/utils/corners.js +10 -16
  378. package/lib/react-theme/utils/corners.js.map +1 -1
  379. package/lib/react-theme/utils/spacers.js +15 -38
  380. package/lib/react-theme/utils/spacers.js.map +1 -1
  381. package/lib/react-theme/utils/themeProps.js +7 -22
  382. package/lib/react-theme/utils/themeProps.js.map +1 -1
  383. package/lib/redux/_i18n/I18nReducer.js +5 -8
  384. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  385. package/lib/redux/_modularui/ModularUIActions.js +19 -23
  386. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  387. package/lib/redux/_modularui/ModularUIConnector.js +4 -5
  388. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  389. package/lib/redux/_modularui/ModularUIReducer.js +14 -19
  390. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  391. package/lib/redux/_modularui/ModularUIUtils.js +1 -2
  392. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  393. package/lib/redux/_modularui/withModularUI.js +1 -2
  394. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  395. package/lib/redux/_router/RouterReducer.js +1 -3
  396. package/lib/redux/_router/RouterReducer.js.map +1 -1
  397. package/lib/redux/actions/FormAttributeSet.js +34 -37
  398. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  399. package/lib/redux/actions/FormAutosubmit.js +1 -2
  400. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  401. package/lib/redux/actions/Preferences.js +8 -15
  402. package/lib/redux/actions/Preferences.js.map +1 -1
  403. package/lib/redux/connectors/CaseView.js +3 -6
  404. package/lib/redux/connectors/CaseView.js.map +1 -1
  405. package/lib/redux/connectors/ConceptDetail.js +4 -7
  406. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  407. package/lib/redux/connectors/ContentBrowser.js +3 -6
  408. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  409. package/lib/redux/connectors/ContentDetail.js +4 -7
  410. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  411. package/lib/redux/connectors/ContentDetailSection.js +5 -8
  412. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  413. package/lib/redux/connectors/Form.js +4 -5
  414. package/lib/redux/connectors/Form.js.map +1 -1
  415. package/lib/redux/connectors/FormAttributeSet.js +5 -8
  416. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  417. package/lib/redux/connectors/ListDetail.js +3 -6
  418. package/lib/redux/connectors/ListDetail.js.map +1 -1
  419. package/lib/redux/connectors/ModelCatalog.js +3 -6
  420. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  421. package/lib/redux/connectors/PanelRenderer.js +5 -6
  422. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  423. package/lib/redux/connectors/QuickSearch.js +3 -6
  424. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  425. package/lib/redux/connectors/Tab.js +3 -6
  426. package/lib/redux/connectors/Tab.js.map +1 -1
  427. package/lib/redux/reducers/AuthReducer.js +1 -3
  428. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  429. package/lib/redux/reducers/ErrorReducer.js +1 -3
  430. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  431. package/lib/redux/reducers/ModalsReducer.js +1 -3
  432. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  433. package/lib/redux/reducers/ModelCatalogReducer.js +1 -3
  434. package/lib/redux/reducers/ModelCatalogReducer.js.map +1 -1
  435. package/lib/redux/reducers/NotificationReducer.js +1 -3
  436. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  437. package/lib/redux/reducers/PreferencesReducer.js +1 -3
  438. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  439. package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -3
  440. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  441. package/lib/redux/store/beforeRenderHooks.js +1 -3
  442. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  443. package/lib/utils/browser/Cache.js +1 -5
  444. package/lib/utils/browser/Cache.js.map +1 -1
  445. package/lib/utils/datetime/DateTimeUtil.js +45 -91
  446. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  447. package/lib/utils/fetch/xhr.js +1 -2
  448. package/lib/utils/fetch/xhr.js.map +1 -1
  449. package/lib/utils/helpers/repositoryResource.js +1 -3
  450. package/lib/utils/helpers/repositoryResource.js.map +1 -1
  451. package/lib/utils/helpers/sanitizeHtml.js +3 -4
  452. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  453. package/lib/utils/number/DecimalFormat.js +1 -2
  454. package/lib/utils/number/DecimalFormat.js.map +1 -1
  455. package/lib/utils/number/formatValue.js +1 -4
  456. package/lib/utils/number/formatValue.js.map +1 -1
  457. package/lib/utils/number/parseNumbers.js +2 -6
  458. package/lib/utils/number/parseNumbers.js.map +1 -1
  459. package/package.json +22 -22
  460. package/src/models/concepts/SourceReferenceModel.js +6 -0
@@ -12,8 +12,8 @@ var _jsxRuntime = require("react/jsx-runtime");
12
12
  /**
13
13
  */
14
14
  class ErrorBoundary extends _react.Component {
15
- constructor() {
16
- super(...arguments);
15
+ constructor(...args) {
16
+ super(...args);
17
17
  (0, _defineProperty2.default)(this, "state", {
18
18
  error: null,
19
19
  errorInfo: null
@@ -1 +1 @@
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,CACd,CAAC;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,GAAAC,OAAA,CAAAf,OAAA,GAEhCL,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"ErrorBoundary.js","names":["_react","require","_ErrorBoundaryFallback","_interopRequireDefault","_jsxRuntime","ErrorBoundary","Component","constructor","args","_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,GAAAC,IAAA;IAAA,SAAAA,IAAA;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,CACd,CAAC;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,GAAAC,OAAA,CAAAf,OAAA,GAEhCL,aAAa","ignoreList":[]}
@@ -20,22 +20,19 @@ const StyledStack = /*#__PURE__*/_styledComponents.default.pre.withConfig({
20
20
 
21
21
  /**
22
22
  */
23
- const ErrorBoundaryFallback = _ref => {
24
- let {
25
- className,
26
- componentStack,
27
- error
28
- } = _ref;
29
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledBoundary, {
30
- className: className,
31
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
32
- children: error.toString()
33
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledStack, {
34
- className: "debug",
35
- children: componentStack
36
- })]
37
- });
38
- };
23
+ const ErrorBoundaryFallback = ({
24
+ className,
25
+ componentStack,
26
+ error
27
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledBoundary, {
28
+ className: className,
29
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
30
+ children: error.toString()
31
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledStack, {
32
+ className: "debug",
33
+ children: componentStack
34
+ })]
35
+ });
39
36
  ErrorBoundaryFallback.displayName = "BI.ErrorBoundaryFallback";
40
37
  var _default = exports.default = ErrorBoundaryFallback;
41
38
  //# sourceMappingURL=ErrorBoundaryFallback.js.map
@@ -1 +1 @@
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,CAAC;IAAC,CAAK,CAAC,eAC3B,IAAAlB,WAAA,CAAAiB,GAAA,EAACT,WAAW;MAACI,SAAS,EAAC,OAAO;MAAAI,QAAA,EAAEH;IAAc,CAAc,CAAC;EAAA,CAC/C,CAAC;AAAA,CAClB;AAEDH,qBAAqB,CAACS,WAAW,GAAG,0BAA0B;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEhDZ,qBAAqB","ignoreList":[]}
1
+ {"version":3,"file":"ErrorBoundaryFallback.js","names":["_styledComponents","_interopRequireDefault","require","_spacers","_jsxRuntime","StyledBoundary","styled","div","withConfig","componentId","spacers","spacer","StyledStack","pre","ErrorBoundaryFallback","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,GAAGA,CAAC;EAC7BC,SAAS;EACTC,cAAc;EACdC;AACK,CAAC,kBACN,IAAAb,WAAA,CAAAc,IAAA,EAACb,cAAc;EAACU,SAAS,EAAEA,SAAU;EAAAI,QAAA,gBACnC,IAAAf,WAAA,CAAAgB,GAAA;IAAAD,QAAA,EAAKF,KAAK,CAACI,QAAQ,CAAC;EAAC,CAAK,CAAC,eAC3B,IAAAjB,WAAA,CAAAgB,GAAA,EAACR,WAAW;IAACG,SAAS,EAAC,OAAO;IAAAI,QAAA,EAAEH;EAAc,CAAc,CAAC;AAAA,CAC/C,CACjB;AAEDF,qBAAqB,CAACQ,WAAW,GAAG,0BAA0B;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEhDX,qBAAqB","ignoreList":[]}
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.mergeRefs = exports.getDisplayName = void 0;
7
7
  /**
8
8
  */
9
- const getDisplayName = function (WrappedComponent) {
10
- let defaultName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Component";
11
- let contextId = arguments.length > 2 ? arguments[2] : undefined;
9
+ const getDisplayName = (WrappedComponent, defaultName = "Component", contextId) => {
12
10
  const componentName = WrappedComponent.displayName || WrappedComponent.name || defaultName;
13
11
  if (contextId) {
14
12
  return `${componentName}[${contextId}]`;
@@ -1 +1 @@
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,OAAO,GAAGC,aAAa,IAAID,SAAS,GAAG;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","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","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,GAAGA,CAC5BC,gBAAoC,EACpCC,WAAmB,GAAG,WAAW,EACjCC,SAAkB,KACP;EACX,MAAMC,aAAa,GACjBH,gBAAgB,CAACI,WAAW,IAAIJ,gBAAgB,CAACK,IAAI,IAAIJ,WAAW;EAEtE,IAAIC,SAAS,EAAE;IACb,OAAO,GAAGC,aAAa,IAAID,SAAS,GAAG;EACzC;EAEA,OAAOC,aAAa;AACtB,CAAC;;AAED;AACA;AADAG,OAAA,CAAAP,cAAA,GAAAA,cAAA;AAEO,MAAMQ,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","ignoreList":[]}
@@ -13,32 +13,29 @@ var _ErrorBoundary = _interopRequireDefault(require("../react/ErrorBoundary"));
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  /**
15
15
  */
16
- const Init = _ref => {
17
- let {
18
- store,
19
- routerHistory,
20
- contextPath,
21
- theme,
22
- children,
23
- ErrorFallbackComponent
24
- } = _ref;
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
26
- store: store,
27
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProvider.default, {
28
- theme: theme,
29
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHelmetAsync.HelmetProvider, {
30
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorBoundary.default, {
31
- FallbackComponent: ErrorFallbackComponent,
32
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouter.Router, {
33
- history: routerHistory,
34
- basename: contextPath,
35
- children: children
36
- })
16
+ const Init = ({
17
+ store,
18
+ routerHistory,
19
+ contextPath,
20
+ theme,
21
+ children,
22
+ ErrorFallbackComponent
23
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
24
+ store: store,
25
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProvider.default, {
26
+ theme: theme,
27
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHelmetAsync.HelmetProvider, {
28
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorBoundary.default, {
29
+ FallbackComponent: ErrorFallbackComponent,
30
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouter.Router, {
31
+ history: routerHistory,
32
+ basename: contextPath,
33
+ children: children
37
34
  })
38
35
  })
39
36
  })
40
- });
41
- };
37
+ })
38
+ });
42
39
  exports.Init = Init;
43
40
  Init.displayName = "BI.Init";
44
41
  //# sourceMappingURL=Init.js.map
@@ -1 +1 @@
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,CACH;QAAC,CACI;MAAC,CACF;IAAC,CACJ;EAAC,CACR,CAAC;AAAA,CACZ;AAACU,OAAA,CAAAhB,IAAA,GAAAA,IAAA;AACFA,IAAI,CAACiB,WAAW,GAAG,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"Init.js","names":["_reactRedux","require","_reactHelmetAsync","_reactRouter","_ThemeProvider","_interopRequireDefault","_ErrorBoundary","_jsxRuntime","Init","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,GAAGA,CAAC;EACnBC,KAAK;EACLC,aAAa;EACbC,WAAW;EACXC,KAAK;EACLC,QAAQ;EACRC;AACK,CAAC,kBACN,IAAAP,WAAA,CAAAQ,GAAA,EAACf,WAAA,CAAAgB,QAAQ;EAACP,KAAK,EAAEA,KAAM;EAAAI,QAAA,eACrB,IAAAN,WAAA,CAAAQ,GAAA,EAACX,cAAA,CAAAa,OAAa;IAACL,KAAK,EAAEA,KAAM;IAAAC,QAAA,eAC1B,IAAAN,WAAA,CAAAQ,GAAA,EAACb,iBAAA,CAAAgB,cAAc;MAAAL,QAAA,eACb,IAAAN,WAAA,CAAAQ,GAAA,EAACT,cAAA,CAAAW,OAAa;QAACE,iBAAiB,EAAEL,sBAAuB;QAAAD,QAAA,eACvD,IAAAN,WAAA,CAAAQ,GAAA,EAACZ,YAAA,CAAAiB,MAAM;UAACC,OAAO,EAAEX,aAAc;UAACY,QAAQ,EAAEX,WAAY;UAAAE,QAAA,EACnDA;QAAQ,CACH;MAAC,CACI;IAAC,CACF;EAAC,CACJ;AAAC,CACR,CACX;AAACU,OAAA,CAAAf,IAAA,GAAAA,IAAA;AACFA,IAAI,CAACgB,WAAW,GAAG,SAAS","ignoreList":[]}
@@ -120,10 +120,7 @@ const setModelCatalogEntryDate = store => {
120
120
  /**
121
121
  */
122
122
  exports.setModelCatalogEntryDate = setModelCatalogEntryDate;
123
- const setupClient = function () {
124
- let customReducers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
125
- let beforeRenderHooks = arguments.length > 1 ? arguments[1] : undefined;
126
- let theme = arguments.length > 2 ? arguments[2] : undefined;
123
+ const setupClient = (customReducers = {}, beforeRenderHooks, theme) => {
127
124
  if (typeof window.contextPath === "undefined") {
128
125
  throw new Error("Missing contextPath on window object");
129
126
  }
@@ -217,15 +214,14 @@ const mountClient = (applicationNode, element) => {
217
214
  /**
218
215
  * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.
219
216
  */
220
- const client = _ref => {
221
- let {
222
- customReducers,
223
- theme,
224
- render,
225
- beforeRenderHooks,
226
- ErrorFallbackComponent,
227
- mount
228
- } = _ref;
217
+ const client = ({
218
+ customReducers,
219
+ theme,
220
+ render,
221
+ beforeRenderHooks,
222
+ ErrorFallbackComponent,
223
+ mount
224
+ }) => {
229
225
  const {
230
226
  store,
231
227
  routerHistory
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":["_client","require","_objects","_setimmediate","_interopRequireDefault","_Cache","_xhr","_history","_configureStore","_rehydrate","_Settings","_Preferences","_Notification","_Error","_SignIn","_ModelCatalog","_RouterActions","_exceptions","_Init","_beforeRenderHooks","_createTheme","_redux","_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","initThemeSettings","state","theme","storedTheme","preferences","createTheme","handleLocale","locale","getState","i18n","receiveLocale","handleRedirectURI","urlParams","_urlSearchParams","location","search","redirectURI","get","xhr","url","getBasePathModularUI","catch","e","id","LOGIN_PATH","getSetting","replace","from","pathname","modal","setModelCatalogEntryDate","entryDateFromUrl","updateEntryDate","Cache","hasItem","getItem","setupClient","customReducers","arguments","length","undefined","beforeRenderHooks","contextPath","clear","browserHistory","createBrowserHistory","basename","getBasePathServer","routerHistory","configureStore","rehydrate","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","loadOtherBrowserTabs","loginSuccess","has","FetchException","response","handleError","listen","action","locationChange","body","className","handleBeforeRenderHooks","addContentLoadedEvent","render","ErrorFallbackComponent","mount","addEventListener","applicationNode","jsx","Init","children","mountClient","element","isSSR","hydrateRoot","root","createRoot","client","_ref"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\n// eslint-disable-next-line react/no-deprecated\nimport { hydrateRoot, createRoot } from \"react-dom/client\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport xhr from \"../utils/fetch/xhr\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport {\n getBasePathModularUI,\n getBasePathServer,\n getSetting,\n} from \"../constants/Settings\";\n\nimport {\n setAllContentInDataSetting,\n setDateTimeSettings,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\nimport { updateEntryDate } from \"../redux/actions/ModelCatalog\";\n\nimport { locationChange, replace } 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, ReduxState, 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\";\nimport createTheme from \"../react-theme/createTheme\";\nimport { receiveLocale } from \"../redux\";\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 */\nconst initThemeSettings = (state: ReduxState, theme?: Theme | Array<Theme>) => {\n const storedTheme = state.preferences.theme;\n // $FlowFixMe\n createTheme(storedTheme, theme); // on theme creation, the settings are set\n};\n\nconst handleLocale = (store: ReduxStore) => {\n const locale = store.getState().i18n.locale;\n if (locale) {\n store.dispatch(receiveLocale(locale));\n }\n};\n\n/**\n * The redirectURI querystring parameter is available when the server is redirecting an unauthorized deep link\n * @param store\n */\nconst handleRedirectURI = (store: ReduxStore) => {\n const urlParams = new URLSearchParams(window.location.search);\n const redirectURI = urlParams.get(\"redirectURI\");\n if (redirectURI) {\n xhr({ url: `${getBasePathModularUI()}${redirectURI}` }).catch((e) => {\n if (\n e.id === \"UnauthorizedException\" ||\n e.id === \"Error.NotAuthorized\" ||\n e.id === \"Error.Authentication.Required\" ||\n e.id === \"Error.Authentication.InvalidCredentials\"\n ) {\n const LOGIN_PATH = getSetting(\"LOGIN_PATH\", \"/signin\");\n store.dispatch(\n replace(LOGIN_PATH, {\n from: { pathname: redirectURI },\n modal: false,\n }),\n );\n }\n });\n }\n};\n\n/**\n */\nexport const setModelCatalogEntryDate = (store: ReduxStore) => {\n if (typeof window !== \"undefined\") {\n const entryDateFromUrl = new URLSearchParams(window.location?.search).get(\n \"entryDate\",\n );\n if (entryDateFromUrl) {\n store.dispatch(updateEntryDate(entryDateFromUrl));\n } else if (Cache.hasItem(\"ModelCatalogEntryDate\")) {\n store.dispatch(Cache.getItem(\"ModelCatalogEntryDate\"));\n }\n }\n};\n\n/**\n */\nexport const setupClient = (\n customReducers: CustomReducers = {},\n beforeRenderHooks: ?Array<BeforeRenderHook>,\n theme?: Theme | Array<Theme>,\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: getBasePathServer(),\n });\n const { routerHistory, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data),\n );\n\n initThemeSettings(store.getState(), theme);\n\n handleLocale(store);\n\n handleRedirectURI(store);\n setModelCatalogEntryDate(store);\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n setDateTimeSettings(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 hydrateRoot(element, applicationNode);\n } else {\n const root = createRoot(element);\n root.render(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":";;;;;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,IAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAEA,IAAAQ,UAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAMA,IAAAU,YAAA,GAAAV,OAAA;AAKA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AAEA,IAAAe,cAAA,GAAAf,OAAA;AAEA,IAAAgB,WAAA,GAAAhB,OAAA;AAEA,IAAAiB,KAAA,GAAAjB,OAAA;AAEA,IAAAkB,kBAAA,GAAAlB,OAAA;AAYA,IAAAmB,YAAA,GAAAhB,sBAAA,CAAAH,OAAA;AACA,IAAAoB,MAAA,GAAApB,OAAA;AAAyC,IAAAqB,WAAA,GAAArB,OAAA;AAjDzC;AAiEA;AACA;AACA;AACA,MAAMsB,eAAe,GAAIC,IAAY,IAAK;EACxC,IAAI;IACF,OAAOC,IAAI,CAACC,KAAK,CAACF,IAAI,CAAC;EACzB,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,MAAM,IAAIC,8BAAkB,CAAC,yBAAyBJ,IAAI,EAAE,CAAC;EAC/D;AACF,CAAC;AAED,MAAMK,iBAAiB,GAAGA,CAAA,KAAM;EAAA,IAAAC,QAAA;EAC9B,MAAMC,WAAW,GAA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Aa,IAAA;EACN,MAAM;IAAE/F,KAAK;IAAE6D;EAAc,CAAC,GAAGZ,WAAW,CAC1CC,cAAc,EACdI,iBACF,CAAC;EAEDyB,qBAAqB,CACnB/E,KAAK,EACL6D,aAAa,EACb9C,KAAK,EACLiE,MAAM,EACNC,sBAAsB,EACtBC,KAAK,IAAIM,WACX,CAAC;AACH,CAAC;AAAC5E,OAAA,CAAAkF,MAAA,GAAAA,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"client.js","names":["_client","require","_objects","_setimmediate","_interopRequireDefault","_Cache","_xhr","_history","_configureStore","_rehydrate","_Settings","_Preferences","_Notification","_Error","_SignIn","_ModelCatalog","_RouterActions","_exceptions","_Init","_beforeRenderHooks","_createTheme","_redux","_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","initThemeSettings","state","theme","storedTheme","preferences","createTheme","handleLocale","locale","getState","i18n","receiveLocale","handleRedirectURI","urlParams","_urlSearchParams","location","search","redirectURI","get","xhr","url","getBasePathModularUI","catch","e","id","LOGIN_PATH","getSetting","replace","from","pathname","modal","setModelCatalogEntryDate","entryDateFromUrl","updateEntryDate","Cache","hasItem","getItem","setupClient","customReducers","beforeRenderHooks","contextPath","clear","browserHistory","createBrowserHistory","basename","getBasePathServer","routerHistory","configureStore","rehydrate","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","loadOtherBrowserTabs","loginSuccess","has","FetchException","response","handleError","listen","action","locationChange","body","className","handleBeforeRenderHooks","addContentLoadedEvent","render","ErrorFallbackComponent","mount","addEventListener","applicationNode","jsx","Init","children","mountClient","element","isSSR","hydrateRoot","root","createRoot","client"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\n// eslint-disable-next-line react/no-deprecated\nimport { hydrateRoot, createRoot } from \"react-dom/client\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport xhr from \"../utils/fetch/xhr\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport {\n getBasePathModularUI,\n getBasePathServer,\n getSetting,\n} from \"../constants/Settings\";\n\nimport {\n setAllContentInDataSetting,\n setDateTimeSettings,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\nimport { updateEntryDate } from \"../redux/actions/ModelCatalog\";\n\nimport { locationChange, replace } 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, ReduxState, 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\";\nimport createTheme from \"../react-theme/createTheme\";\nimport { receiveLocale } from \"../redux\";\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 */\nconst initThemeSettings = (state: ReduxState, theme?: Theme | Array<Theme>) => {\n const storedTheme = state.preferences.theme;\n // $FlowFixMe\n createTheme(storedTheme, theme); // on theme creation, the settings are set\n};\n\nconst handleLocale = (store: ReduxStore) => {\n const locale = store.getState().i18n.locale;\n if (locale) {\n store.dispatch(receiveLocale(locale));\n }\n};\n\n/**\n * The redirectURI querystring parameter is available when the server is redirecting an unauthorized deep link\n * @param store\n */\nconst handleRedirectURI = (store: ReduxStore) => {\n const urlParams = new URLSearchParams(window.location.search);\n const redirectURI = urlParams.get(\"redirectURI\");\n if (redirectURI) {\n xhr({ url: `${getBasePathModularUI()}${redirectURI}` }).catch((e) => {\n if (\n e.id === \"UnauthorizedException\" ||\n e.id === \"Error.NotAuthorized\" ||\n e.id === \"Error.Authentication.Required\" ||\n e.id === \"Error.Authentication.InvalidCredentials\"\n ) {\n const LOGIN_PATH = getSetting(\"LOGIN_PATH\", \"/signin\");\n store.dispatch(\n replace(LOGIN_PATH, {\n from: { pathname: redirectURI },\n modal: false,\n }),\n );\n }\n });\n }\n};\n\n/**\n */\nexport const setModelCatalogEntryDate = (store: ReduxStore) => {\n if (typeof window !== \"undefined\") {\n const entryDateFromUrl = new URLSearchParams(window.location?.search).get(\n \"entryDate\",\n );\n if (entryDateFromUrl) {\n store.dispatch(updateEntryDate(entryDateFromUrl));\n } else if (Cache.hasItem(\"ModelCatalogEntryDate\")) {\n store.dispatch(Cache.getItem(\"ModelCatalogEntryDate\"));\n }\n }\n};\n\n/**\n */\nexport const setupClient = (\n customReducers: CustomReducers = {},\n beforeRenderHooks: ?Array<BeforeRenderHook>,\n theme?: Theme | Array<Theme>,\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: getBasePathServer(),\n });\n const { routerHistory, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data),\n );\n\n initThemeSettings(store.getState(), theme);\n\n handleLocale(store);\n\n handleRedirectURI(store);\n setModelCatalogEntryDate(store);\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n setDateTimeSettings(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 hydrateRoot(element, applicationNode);\n } else {\n const root = createRoot(element);\n root.render(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":";;;;;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,IAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAJ,sBAAA,CAAAH,OAAA;AAEA,IAAAQ,UAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AAMA,IAAAU,YAAA,GAAAV,OAAA;AAKA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,MAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AAEA,IAAAe,cAAA,GAAAf,OA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ACT,IAAAC,mBAAW,EAACF,OAAO,EAAEL,eAAe,CAAC;EACvC,CAAC,MAAM;IACL,MAAMQ,IAAI,GAAG,IAAAC,kBAAU,EAACJ,OAAO,CAAC;IAChCG,IAAI,CAACZ,MAAM,CAACI,eAAe,CAAC;EAC9B;AACF,CAAC;;AAED;AACA;AACA;AACO,MAAMU,MAAM,GAAGA,CAAC;EACrBzC,cAAc;EACdnC,KAAK;EACL8D,MAAM;EACN1B,iBAAiB;EACjB2B,sBAAsB;EACtBC;AACK,CAAC,KAAK;EACX,MAAM;IAAE/E,KAAK;IAAE0D;EAAc,CAAC,GAAGT,WAAW,CAC1CC,cAAc,EACdC,iBACF,CAAC;EAEDyB,qBAAqB,CACnB5E,KAAK,EACL0D,aAAa,EACb3C,KAAK,EACL8D,MAAM,EACNC,sBAAsB,EACtBC,KAAK,IAAIM,WACX,CAAC;AACH,CAAC;AAACzE,OAAA,CAAA+E,MAAA,GAAAA,MAAA","ignoreList":[]}
@@ -19,16 +19,15 @@ var _serverUtil = require("./serverUtil");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
20
  /**
21
21
  */
22
- const renderSSRComplete = _ref => {
23
- let {
24
- store,
25
- theme,
26
- UUID = "",
27
- requestHref,
28
- render,
29
- ErrorPage,
30
- template = _htmlpage.default
31
- } = _ref;
22
+ const renderSSRComplete = ({
23
+ store,
24
+ theme,
25
+ UUID = "",
26
+ requestHref,
27
+ render,
28
+ ErrorPage,
29
+ template = _htmlpage.default
30
+ }) => {
32
31
  const helmetContext = {
33
32
  helmet: {}
34
33
  };
@@ -1 +1 @@
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","getBasePathServer","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 { getBasePathServer } 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 = getBasePathServer();\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,SAAA,GAAAD,sBAAA,CAAAN,OAAA;AAEA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,cAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,cAAA,GAAAJ,sBAAA,CAAAN,OAAA;AAEA,IAAAW,WAAA,GAAAX,OAAA;AAAmE,IAAAY,WAAA,GAAAZ,OAAA;AAiBnE;AACA;AACA,MAAMa,iBAAiB,GAAGC,IAAA,IAQI;EAAA,IARH;IACzBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,WAAW;IACXC,MAAM;IACNC,SAAS;IACTC,QAAQ,GAAGC;EACN,CAAC,GAAAR,IAAA;EACN,MAAMS,aAAa,GAAG;IAAEC,MAAM,EAAE,CAAC;EAAE,CAAC;EACpC,MAAMC,aAAa,GAAG,CAAC,CAAC;E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ACrBoB,IAAI,EAAEL,OAAO;MACbE,IAAI;MACJI,KAAK,EAAE,IAAAC,qBAAS,EAACrC,KAAK,CAAC;MACvBE;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,CACDoC,KAAK,CAAEC,KAAK,IACXjC,QAAQ,CAAC;IACP4B,WAAW,EAAEnB,QAAQ;IACrBoB,IAAI,EAAE,IAAAjB,sBAAc,eAClB,IAAArB,WAAA,CAAAsB,GAAA,EAAC9B,iBAAA,CAAAiC,iBAAiB;MAACX,KAAK,EAAEA,KAAK,CAACY,QAAS;MAAAF,QAAA,eACvC,IAAAxB,WAAA,CAAAsB,GAAA,EAACzB,cAAA,CAAA8B,OAAa;QAACvB,KAAK,EAAEA,KAAM;QAAAoB,QAAA,eAC1B,IAAAxB,WAAA,CAAAsB,GAAA,EAACd,SAAS;UACRmC,YAAY,EAAED,KAAK,CAACE,OAAQ;UAC5BC,aAAa,EAAEH,KAAK,CAACI,QAAS;UAC9BC,SAAS,EAAEL,KAAK,CAACM,UAAW;UAC5BC,UAAU,EAAEP,KAAK,CAACQ;QAAM,CACzB;MAAC,CACW;IAAC,CACC,CACrB,CAAC;IACDf,IAAI,EAAExB,aAAa,CAACC,MAAM;IAC1B2B,KAAK,EAAE,EAAE;IACTlC;EACF,CAAC,CACH,CAAC;AACL,CAAC;AAAC,IAAA8C,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEa1B,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"renderSSRComplete.js","names":["_server","require","_reactRedux","_reactRouter","_reactHelmetAsync","_styledComponents","_createSSRComplete","_interopRequireDefault","_htmlpage","_Settings","_ThemeProvider","_ErrorBoundary","_serverUtil","_jsxRuntime","renderSSRComplete","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","helmet","routerContext","sheet","ServerStyleSheet","location","toLocation","basePath","getBasePathServer","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 { getBasePathServer } 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 = getBasePathServer();\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,SAAA,GAAAD,sBAAA,CAAAN,OAAA;AAEA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,cAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,cAAA,GAAAJ,sBAAA,CAAAN,OAAA;AAEA,IAAAW,WAAA,GAAAX,OAAA;AAAmE,IAAAY,WAAA,GAAAZ,OAAA;AAiBnE;AACA;AACA,MAAMa,iBAAiB,GAAGA,CAAC;EACzBC,KAAK;EACLC,KAAK;EACLC,IAAI,GAAG,EAAE;EACTC,WAAW;EACXC,MAAM;EACNC,SAAS;EACTC,QAAQ,GAAGC;AACN,CAAC,KAAsB;EAC5B,MAAMC,aAAa,GAAG;IAAEC,MAAM,EAAE,CAAC;EAAE,CAAC;EACpC,MAAMC,aAAa,GAAG,CAAC,CAAC;EAExB,MAAMC,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;;EAEpC;EACA;EACA,MAAMC,QAAkB,GAAGV,WAAW,CAACW,UAAU,CAAC,C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ACJ,CAAC,CAAC,CACDoC,KAAK,CAAEC,KAAK,IACXjC,QAAQ,CAAC;IACP4B,WAAW,EAAEnB,QAAQ;IACrBoB,IAAI,EAAE,IAAAjB,sBAAc,eAClB,IAAApB,WAAA,CAAAqB,GAAA,EAAC7B,iBAAA,CAAAgC,iBAAiB;MAACX,KAAK,EAAEA,KAAK,CAACY,QAAS;MAAAF,QAAA,eACvC,IAAAvB,WAAA,CAAAqB,GAAA,EAACxB,cAAA,CAAA6B,OAAa;QAACvB,KAAK,EAAEA,KAAM;QAAAoB,QAAA,eAC1B,IAAAvB,WAAA,CAAAqB,GAAA,EAACd,SAAS;UACRmC,YAAY,EAAED,KAAK,CAACE,OAAQ;UAC5BC,aAAa,EAAEH,KAAK,CAACI,QAAS;UAC9BC,SAAS,EAAEL,KAAK,CAACM,UAAW;UAC5BC,UAAU,EAAEP,KAAK,CAACQ;QAAM,CACzB;MAAC,CACW;IAAC,CACC,CACrB,CAAC;IACDf,IAAI,EAAExB,aAAa,CAACC,MAAM;IAC1B2B,KAAK,EAAE,EAAE;IACTlC;EACF,CAAC,CACH,CAAC;AACL,CAAC;AAAC,IAAA8C,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEazB,iBAAiB","ignoreList":[]}
@@ -15,14 +15,13 @@ var _htmlpage = _interopRequireDefault(require("./htmlpage"));
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  /**
17
17
  */
18
- const renderSSRMinimal = _ref => {
19
- let {
20
- store,
21
- theme,
22
- UUID = "",
23
- render,
24
- template = _htmlpage.default
25
- } = _ref;
18
+ const renderSSRMinimal = ({
19
+ store,
20
+ theme,
21
+ UUID = "",
22
+ render,
23
+ template = _htmlpage.default
24
+ }) => {
26
25
  const sheet = new _styledComponents.ServerStyleSheet();
27
26
  const appHTML = (0, _server.renderToString)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
28
27
  store: store,
@@ -1 +1 @@
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","getBasePathServer","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 { getBasePathServer } 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: getBasePathServer(),\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,CAAC,CAAC;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,eAC5B,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,CAAC;MAAC,CAAgB;IAAC,CACtC;EAAC,CACZ,CACZ,CAAC;EAED,MAAMa,IAAI,GAAG,IAAAC,sBAAU,EAACX,KAAK,EAAEJ,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdc,WAAW,EAAE,IAAAC,2BAAiB,EAAC,CAAC;IAChCC,IAAI,EAAEZ,OAAO;IACbQ,IAAI;IACJK,KAAK,EAAE,IAAAC,qBAAS,EAACtB,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqB,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEajB,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"renderSSRMinimal.js","names":["_server","require","_reactRedux","_styledComponents","_ThemeProvider","_interopRequireDefault","_Settings","_serverUtil","_htmlpage","_jsxRuntime","renderSSRMinimal","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","head","createHead","contextPath","getBasePathServer","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 { getBasePathServer } 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: getBasePathServer(),\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,GAAGA,CAAC;EACxBC,KAAK;EACLC,KAAK;EACLC,IAAI,GAAG,EAAE;EACTC,MAAM;EACNC,QAAQ,GAAGC;AACN,CAAC,KAAa;EACnB,MAAMC,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,eAC5B,IAAAX,WAAA,CAAAY,GAAA,EAACnB,WAAA,CAAAoB,QAAQ;IAACX,KAAK,EAAEA,KAAM;IAAAY,QAAA,eACrB,IAAAd,WAAA,CAAAY,GAAA,EAAClB,iBAAA,CAAAqB,iBAAiB;MAACP,KAAK,EAAEA,KAAK,CAACQ,QAAS;MAAAF,QAAA,eACvC,IAAAd,WAAA,CAAAY,GAAA,EAACjB,cAAA,CAAAsB,OAAa;QAACd,KAAK,EAAEA,KAAM;QAAAW,QAAA,EAAET,MAAM,CAAC;MAAC,CAAgB;IAAC,CACtC;EAAC,CACZ,CACZ,CAAC;EAED,MAAMa,IAAI,GAAG,IAAAC,sBAAU,EAACX,KAAK,EAAEJ,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdc,WAAW,EAAE,IAAAC,2BAAiB,EAAC,CAAC;IAChCC,IAAI,EAAEZ,OAAO;IACbQ,IAAI;IACJK,KAAK,EAAE,IAAAC,qBAAS,EAACtB,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqB,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEahB,gBAAgB","ignoreList":[]}
@@ -14,18 +14,17 @@ var _renderSSRMinimal = _interopRequireDefault(require("./renderSSRMinimal"));
14
14
  var _createTheme = _interopRequireDefault(require("../react-theme/createTheme"));
15
15
  /**
16
16
  */
17
- const serverNoSSR = _ref => {
18
- let {
19
- request,
20
- locales,
21
- customReducers,
22
- serverPreferences = [],
23
- theme,
24
- render,
25
- template,
26
- beforeRenderHooks,
27
- preloadApplication = true
28
- } = _ref;
17
+ const serverNoSSR = ({
18
+ request,
19
+ locales,
20
+ customReducers,
21
+ serverPreferences = [],
22
+ theme,
23
+ render,
24
+ template,
25
+ beforeRenderHooks,
26
+ preloadApplication = true
27
+ }) => {
29
28
  const isPreviewCheck = request.getHeader("X-BI-Preview-Available");
30
29
  if (isPreviewCheck) {
31
30
  return "<h1>Preview Available</h1>";
@@ -1 +1 @@
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","isPreviewCheck","getHeader","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 isPreviewCheck = request.getHeader(\"X-BI-Preview-Available\");\n if (isPreviewCheck) {\n return \"<h1>Preview Available</h1>\";\n }\n\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,GAAAL,sBAAA,CAAAF,OAAA;AAoBA;AACA;AACA,MAAMQ,WAAW,GAAGC,IAAA,IAUO;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,GAAAT,IAAA;EACZ,MAAMU,cAAc,GAAGT,OAAO,CAACU,SAAS,CAAC,wBAAwB,CAAC;EAClE,IAAID,cAAc,EAAE;IAClB,OAAO,4BAA4B;EACrC;EAEA,MAAME,IAAI,GAAG,IAAAC,mBAAU,EAAC,CAAC;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACf,OAAO,CAAC;EAE/C,MAAMgB,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEZ,cAAc,CAAC;EAE3D,IAAAgB,gCAAoB,EAACF,KAAK,EAAEb,iBAAiB,CAAC;EAC9C,IAAAgB,iCAAqB,EAACH,KAAK,CAAC;EAE5B,IAAIZ,KAAK,EAAE;IACT,MAAMgB,WAAW,GAAGJ,KAAK,CAACK,QAAQ,CAAC,CAAC,EAAEC,WAAW,EAAElB,KAAK;IACxD;IACA,IAAAmB,oBAAW,EAACH,WAAW,EAAEhB,KAAK,CAAC;EACjC;EAEA,IAAAoB,mBAAO,EAACR,KAAK,EAAEf,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtB,IAAAiB,0BAAc,EAACT,KAAK,CAAC;EACvB;EAEA,IAAAU,wBAAY,EAACV,KAAK,CAAC;EAEnB,IAAAW,0CAAuB,EAACpB,iBAAiB,EAAE;IAAES,KAAK;IAAEhB;EAAQ,CAAC,CAAC;EAE9D,OAAO,IAAA4B,yBAAgB,EAAC;IAAEZ,KAAK;IAAEZ,KAAK;IAAEO,IAAI;IAAEN,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAAC,IAAAuB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajC,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"serverNoSSR.js","names":["require","_createUUID","_interopRequireDefault","_requestInformation","_serverUtil","_beforeRenderHooks","_renderSSRMinimal","_createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","isPreviewCheck","getHeader","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 isPreviewCheck = request.getHeader(\"X-BI-Preview-Available\");\n if (isPreviewCheck) {\n return \"<h1>Preview Available</h1>\";\n }\n\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,GAAAL,sBAAA,CAAAF,OAAA;AAoBA;AACA;AACA,MAAMQ,WAAW,GAAGA,CAAC;EACnBC,OAAO;EACPC,OAAO;EACPC,cAAc;EACdC,iBAAiB,GAAG,EAAE;EACtBC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,iBAAiB;EACjBC,kBAAkB,GAAG;AACV,CAAC,KAAa;EACzB,MAAMC,cAAc,GAAGT,OAAO,CAACU,SAAS,CAAC,wBAAwB,CAAC;EAClE,IAAID,cAAc,EAAE;IAClB,OAAO,4BAA4B;EACrC;EAEA,MAAME,IAAI,GAAG,IAAAC,mBAAU,EAAC,CAAC;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACf,OAAO,CAAC;EAE/C,MAAMgB,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEZ,cAAc,CAAC;EAE3D,IAAAgB,gCAAoB,EAACF,KAAK,EAAEb,iBAAiB,CAAC;EAC9C,IAAAgB,iCAAqB,EAACH,KAAK,CAAC;EAE5B,IAAIZ,KAAK,EAAE;IACT,MAAMgB,WAAW,GAAGJ,KAAK,CAACK,QAAQ,CAAC,CAAC,EAAEC,WAAW,EAAElB,KAAK;IACxD;IACA,IAAAmB,oBAAW,EAACH,WAAW,EAAEhB,KAAK,CAAC;EACjC;EAEA,IAAAoB,mBAAO,EAACR,KAAK,EAAEf,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtB,IAAAiB,0BAAc,EAACT,KAAK,CAAC;EACvB;EAEA,IAAAU,wBAAY,EAACV,KAAK,CAAC;EAEnB,IAAAW,0CAAuB,EAACpB,iBAAiB,EAAE;IAAES,KAAK;IAAEhB;EAAQ,CAAC,CAAC;EAE9D,OAAO,IAAA4B,yBAAgB,EAAC;IAAEZ,KAAK;IAAEZ,KAAK;IAAEO,IAAI;IAAEN,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAAC,IAAAuB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahC,WAAW","ignoreList":[]}
@@ -13,18 +13,17 @@ var _beforeRenderHooks = require("../redux/store/beforeRenderHooks");
13
13
  var _renderSSRComplete = _interopRequireDefault(require("./renderSSRComplete"));
14
14
  /**
15
15
  */
16
- const serverSSR = _ref => {
17
- let {
18
- request,
19
- locales,
20
- customReducers,
21
- serverPreferences = [],
22
- theme = null,
23
- render,
24
- ErrorPage,
25
- template,
26
- beforeRenderHooks
27
- } = _ref;
16
+ const serverSSR = ({
17
+ request,
18
+ locales,
19
+ customReducers,
20
+ serverPreferences = [],
21
+ theme = null,
22
+ render,
23
+ ErrorPage,
24
+ template,
25
+ beforeRenderHooks
26
+ }) => {
28
27
  const UUID = (0, _createUUID.default)();
29
28
  __webpack_nonce__ = UUID; // NOSONAR
30
29
 
@@ -1 +1 @@
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,EAAC,CAAC;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,GAAAC,OAAA,CAAAC,OAAA,GAEazB,SAAS","ignoreList":[]}
1
+ {"version":3,"file":"serverSSR.js","names":["require","_createUUID","_interopRequireDefault","_requestInformation","_serverUtil","_beforeRenderHooks","_renderSSRComplete","serverSSR","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,GAAGA,CAAC;EACjBC,OAAO;EACPC,OAAO;EACPC,cAAc;EACdC,iBAAiB,GAAG,EAAE;EACtBC,KAAK,GAAG,IAAI;EACZC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC;AACW,CAAC,KAAsB;EAClC,MAAMC,IAAI,GAAG,IAAAC,mBAAU,EAAC,CAAC;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,GAAAC,OAAA,CAAAC,OAAA,GAEaxB,SAAS","ignoreList":[]}
@@ -43,9 +43,7 @@ const createReduxStore = (requestHref, customReducers, initialState) => {
43
43
  /**
44
44
  */
45
45
  exports.createReduxStore = createReduxStore;
46
- const setI18n = function (store) {
47
- let locales = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
48
- let request = arguments.length > 2 ? arguments[2] : undefined;
46
+ const setI18n = (store, locales = [], request) => {
49
47
  if (!Array.isArray(locales)) {
50
48
  throw new _exceptions.IllegalArgumentException("locales must be an array of objects");
51
49
  }