@beinformed/ui 1.34.0 → 1.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js +29 -28
  3. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  4. package/esm/react-client/client.js +1 -2
  5. package/esm/react-client/client.js.map +1 -1
  6. package/lib/builder/__tests__/mergeLayoutHintConfigurations.spec.js.flow +23 -16
  7. package/lib/builder/mergeLayoutHintConfigurations.js +29 -28
  8. package/lib/builder/mergeLayoutHintConfigurations.js.flow +33 -37
  9. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  10. package/lib/constants/Constants.js +33 -66
  11. package/lib/constants/Constants.js.map +1 -1
  12. package/lib/constants/LayoutHintConfig.js +1 -2
  13. package/lib/constants/LayoutHintConfig.js.map +1 -1
  14. package/lib/constants/LayoutHints.js +18 -36
  15. package/lib/constants/LayoutHints.js.map +1 -1
  16. package/lib/constants/Settings.js +3 -6
  17. package/lib/constants/Settings.js.map +1 -1
  18. package/lib/exceptions/ConfigurationException.js +1 -2
  19. package/lib/exceptions/ConfigurationException.js.map +1 -1
  20. package/lib/exceptions/IllegalArgumentException.js +1 -2
  21. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  22. package/lib/exceptions/IllegalReturnException.js +1 -2
  23. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  24. package/lib/exceptions/IllegalStateException.js +1 -2
  25. package/lib/exceptions/IllegalStateException.js.map +1 -1
  26. package/lib/exceptions/JsonParseException.js +1 -2
  27. package/lib/exceptions/JsonParseException.js.map +1 -1
  28. package/lib/exceptions/MissingPropertyException.js +1 -2
  29. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  30. package/lib/exceptions/NetworkException.js +1 -2
  31. package/lib/exceptions/NetworkException.js.map +1 -1
  32. package/lib/exceptions/NotAllowedUriException.js +1 -2
  33. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  34. package/lib/exceptions/NotFoundException.js +1 -2
  35. package/lib/exceptions/NotFoundException.js.map +1 -1
  36. package/lib/exceptions/ServerRequestException.js +1 -2
  37. package/lib/exceptions/ServerRequestException.js.map +1 -1
  38. package/lib/exceptions/ThemePropertyException.js +1 -2
  39. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  40. package/lib/exceptions/TimeoutException.js +1 -2
  41. package/lib/exceptions/TimeoutException.js.map +1 -1
  42. package/lib/exceptions/UnauthorizedException.js +1 -2
  43. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  44. package/lib/exceptions/UnsupportedOperationException.js +1 -2
  45. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  46. package/lib/hooks/useDeepCompareEffect.js +1 -2
  47. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  48. package/lib/i18n/Locale.js +1 -2
  49. package/lib/i18n/Locale.js.map +1 -1
  50. package/lib/i18n/Locales.js +2 -4
  51. package/lib/i18n/Locales.js.map +1 -1
  52. package/lib/i18n/Message.js +1 -2
  53. package/lib/i18n/Message.js.map +1 -1
  54. package/lib/i18n/languages.js +1 -2
  55. package/lib/i18n/languages.js.map +1 -1
  56. package/lib/i18n/translations/beinformed_error_messages_en.nl.js +1 -2
  57. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  58. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js +1 -2
  59. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  60. package/lib/i18n/withMessage.js +1 -2
  61. package/lib/i18n/withMessage.js.map +1 -1
  62. package/lib/models/attributes/AttributeCollection.js +1 -2
  63. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  64. package/lib/models/attributes/AttributeContent.js +1 -2
  65. package/lib/models/attributes/AttributeContent.js.map +1 -1
  66. package/lib/models/attributes/AttributeDataHelper.js +1 -2
  67. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  68. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +1 -2
  69. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  70. package/lib/models/attributes/ChoiceAttributeOptionModel.js +1 -2
  71. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  72. package/lib/models/attributes/CompositeAttributeChildCollection.js +1 -2
  73. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  74. package/lib/models/attributes/CompositeAttributeModel.js +1 -2
  75. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  76. package/lib/models/attributes/DatetimeAttributeModel.js +1 -2
  77. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  78. package/lib/models/attributes/_createAttribute.js +1 -2
  79. package/lib/models/attributes/_createAttribute.js.map +1 -1
  80. package/lib/models/attributes/input-constraints/BSNConstraint.js +1 -2
  81. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  82. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -2
  83. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  84. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +1 -2
  85. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  86. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +1 -2
  87. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  88. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +1 -2
  89. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  90. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +1 -2
  91. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  92. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +1 -2
  93. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  94. package/lib/models/attributes/input-constraints/IBANConstraint.js +1 -2
  95. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  96. package/lib/models/attributes/input-constraints/MandatoryConstraint.js +1 -2
  97. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  98. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +1 -2
  99. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  100. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -2
  101. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  102. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +1 -2
  103. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  104. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -2
  105. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  106. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +1 -2
  107. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  108. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +1 -2
  109. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  110. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +1 -2
  111. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  112. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +1 -2
  113. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  114. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
  115. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  116. package/lib/models/attributes/input-constraints/RangeConstraint.js +1 -2
  117. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  118. package/lib/models/attributes/input-constraints/RegexConstraint.js +1 -2
  119. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  120. package/lib/models/attributes/input-constraints/StringLengthConstraint.js +1 -2
  121. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  122. package/lib/models/attributes/input-constraints/XMLConstraint.js +1 -2
  123. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  124. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +1 -2
  125. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  126. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +1 -2
  127. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  128. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +1 -2
  129. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  130. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +1 -2
  131. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  132. package/lib/models/base/BaseCollection.js +1 -2
  133. package/lib/models/base/BaseCollection.js.map +1 -1
  134. package/lib/models/base/BaseModel.js +1 -2
  135. package/lib/models/base/BaseModel.js.map +1 -1
  136. package/lib/models/base/ResourceCollection.js +1 -2
  137. package/lib/models/base/ResourceCollection.js.map +1 -1
  138. package/lib/models/base/ResourceModel.js +1 -2
  139. package/lib/models/base/ResourceModel.js.map +1 -1
  140. package/lib/models/concepts/BusinessScenarioModel.js +1 -2
  141. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  142. package/lib/models/concepts/ConceptTypeDetailModel.js +1 -2
  143. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  144. package/lib/models/concepts/SourceReferenceModel.js +1 -2
  145. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  146. package/lib/models/content/SectionModel.js +1 -2
  147. package/lib/models/content/SectionModel.js.map +1 -1
  148. package/lib/models/contentconfiguration/ContentConfigurationElements.js +1 -2
  149. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  150. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +1 -2
  151. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  152. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +1 -2
  153. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  154. package/lib/models/contentconfiguration/ContentConfigurationResults.js +1 -2
  155. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  156. package/lib/models/error/ErrorModel.js +1 -2
  157. package/lib/models/error/ErrorModel.js.map +1 -1
  158. package/lib/models/form/FormModel.js +1 -2
  159. package/lib/models/form/FormModel.js.map +1 -1
  160. package/lib/models/href/Href.js +1 -2
  161. package/lib/models/href/Href.js.map +1 -1
  162. package/lib/models/links/LinkModel.js +1 -2
  163. package/lib/models/links/LinkModel.js.map +1 -1
  164. package/lib/models/links/normalizeLinkJSON.js +1 -2
  165. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  166. package/lib/models/list/ListItemCollection.js +1 -2
  167. package/lib/models/list/ListItemCollection.js.map +1 -1
  168. package/lib/models/lookup/LookupOptionCollection.js +1 -2
  169. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  170. package/lib/models/parameter/Parameter.js +1 -2
  171. package/lib/models/parameter/Parameter.js.map +1 -1
  172. package/lib/models/resolveModel.js +1 -2
  173. package/lib/models/resolveModel.js.map +1 -1
  174. package/lib/models/sorting/SortOptionModel.js +1 -2
  175. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  176. package/lib/models/sorting/SortingModel.js +1 -2
  177. package/lib/models/sorting/SortingModel.js.map +1 -1
  178. package/lib/models/user/UserServicesModel.js +1 -2
  179. package/lib/models/user/UserServicesModel.js.map +1 -1
  180. package/lib/modularui/Authenticate.js +1 -2
  181. package/lib/modularui/Authenticate.js.map +1 -1
  182. package/lib/modularui/CaptchaRequest.js +1 -2
  183. package/lib/modularui/CaptchaRequest.js.map +1 -1
  184. package/lib/modularui/ModularUIError.js +1 -2
  185. package/lib/modularui/ModularUIError.js.map +1 -1
  186. package/lib/modularui/ModularUIRequest.js +1 -2
  187. package/lib/modularui/ModularUIRequest.js.map +1 -1
  188. package/lib/modularui/ModularUIResponse.js +1 -2
  189. package/lib/modularui/ModularUIResponse.js.map +1 -1
  190. package/lib/modularui/UploadRequest.js +1 -2
  191. package/lib/modularui/UploadRequest.js.map +1 -1
  192. package/lib/react/ErrorBoundary.js +1 -2
  193. package/lib/react/ErrorBoundary.js.map +1 -1
  194. package/lib/react/ErrorBoundaryFallback.js +1 -2
  195. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  196. package/lib/react-client/client.js +1 -2
  197. package/lib/react-client/client.js.flow +6 -3
  198. package/lib/react-client/client.js.map +1 -1
  199. package/lib/react-client/rehydrate.js +1 -2
  200. package/lib/react-client/rehydrate.js.map +1 -1
  201. package/lib/react-server/createSSRComplete.js +1 -2
  202. package/lib/react-server/createSSRComplete.js.map +1 -1
  203. package/lib/react-server/htmlpage.js +1 -2
  204. package/lib/react-server/htmlpage.js.map +1 -1
  205. package/lib/react-server/renderSSRComplete.js +1 -2
  206. package/lib/react-server/renderSSRComplete.js.map +1 -1
  207. package/lib/react-server/renderSSRMinimal.js +1 -2
  208. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  209. package/lib/react-server/serverNoSSR.js +1 -2
  210. package/lib/react-server/serverNoSSR.js.map +1 -1
  211. package/lib/react-server/serverSSR.js +1 -2
  212. package/lib/react-server/serverSSR.js.map +1 -1
  213. package/lib/react-theme/ThemeProvider.js +1 -2
  214. package/lib/react-theme/ThemeProvider.js.map +1 -1
  215. package/lib/react-theme/createTheme.js +1 -2
  216. package/lib/react-theme/createTheme.js.map +1 -1
  217. package/lib/redux/_modularui/ModularUIConnector.js +1 -2
  218. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  219. package/lib/redux/_modularui/ModularUISelectors.js +1 -2
  220. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  221. package/lib/redux/_modularui/withModularUI.js +1 -2
  222. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  223. package/lib/redux/_router/RouterConnectors.js +5 -10
  224. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  225. package/lib/redux/connectors/Application.js +1 -2
  226. package/lib/redux/connectors/Application.js.map +1 -1
  227. package/lib/redux/connectors/Breadcrumb.js +1 -2
  228. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  229. package/lib/redux/connectors/CaseView.js +1 -2
  230. package/lib/redux/connectors/CaseView.js.map +1 -1
  231. package/lib/redux/connectors/ConceptDetail.js +1 -2
  232. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  233. package/lib/redux/connectors/ContentBrowser.js +1 -2
  234. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  235. package/lib/redux/connectors/ContentDetail.js +1 -2
  236. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  237. package/lib/redux/connectors/ContentDetailSection.js +1 -2
  238. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  239. package/lib/redux/connectors/Form.js +1 -2
  240. package/lib/redux/connectors/Form.js.map +1 -1
  241. package/lib/redux/connectors/FormAttributeSet.js +1 -2
  242. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  243. package/lib/redux/connectors/ListDetail.js +1 -2
  244. package/lib/redux/connectors/ListDetail.js.map +1 -1
  245. package/lib/redux/connectors/Modal.js +1 -2
  246. package/lib/redux/connectors/Modal.js.map +1 -1
  247. package/lib/redux/connectors/ModelCatalog.js +1 -2
  248. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  249. package/lib/redux/connectors/Notification.js +1 -2
  250. package/lib/redux/connectors/Notification.js.map +1 -1
  251. package/lib/redux/connectors/PanelRenderer.js +1 -2
  252. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  253. package/lib/redux/connectors/Progress.js +1 -2
  254. package/lib/redux/connectors/Progress.js.map +1 -1
  255. package/lib/redux/connectors/ProgressIndicator.js +1 -2
  256. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  257. package/lib/redux/connectors/QuickSearch.js +1 -2
  258. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  259. package/lib/redux/connectors/SignIn.js +1 -2
  260. package/lib/redux/connectors/SignIn.js.map +1 -1
  261. package/lib/redux/connectors/SignOut.js +1 -2
  262. package/lib/redux/connectors/SignOut.js.map +1 -1
  263. package/lib/redux/connectors/Tab.js +1 -2
  264. package/lib/redux/connectors/Tab.js.map +1 -1
  265. package/lib/redux/reducers/AuthReducer.js +1 -2
  266. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  267. package/lib/redux/reducers/ErrorReducer.js +1 -2
  268. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  269. package/lib/redux/reducers/ModalsReducer.js +1 -2
  270. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  271. package/lib/redux/reducers/NotificationReducer.js +1 -2
  272. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  273. package/lib/redux/reducers/PreferencesReducer.js +1 -2
  274. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  275. package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -2
  276. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  277. package/lib/redux/store/configureStore.js +1 -2
  278. package/lib/redux/store/configureStore.js.map +1 -1
  279. package/lib/utils/browser/Cache.js +1 -2
  280. package/lib/utils/browser/Cache.js.map +1 -1
  281. package/lib/utils/datetime/DateTimeUtil.js +4 -8
  282. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  283. package/lib/utils/fetch/universalFetch.js +1 -2
  284. package/lib/utils/fetch/universalFetch.js.map +1 -1
  285. package/lib/utils/fetch/xhr.js +1 -2
  286. package/lib/utils/fetch/xhr.js.map +1 -1
  287. package/lib/utils/helpers/createUUID.js +1 -2
  288. package/lib/utils/helpers/createUUID.js.map +1 -1
  289. package/lib/utils/number/DecimalFormat.js +1 -2
  290. package/lib/utils/number/DecimalFormat.js.map +1 -1
  291. package/lib/utils/number/formatValue.js +1 -2
  292. package/lib/utils/number/formatValue.js.map +1 -1
  293. package/package.json +12 -13
  294. package/src/builder/__tests__/LayoutHintConfig.json +11 -0
  295. package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +23 -16
  296. package/src/builder/__tests__/subdir/LayoutHintConfig.json +11 -0
  297. package/src/builder/mergeLayoutHintConfigurations.js +33 -37
  298. package/src/react-client/client.js +6 -3
  299. package/types/models/filters/StringFilterModel.d.ts +15 -0
@@ -50,6 +50,5 @@ const htmlpage = props => {
50
50
  // these templates must be pure strings to make it possible to add the context path in all situations
51
51
  return (0, _trim.default)(_context3 = template.replace(/{CONTEXT_PATH}/g, props.contextPath)).call(_context3);
52
52
  };
53
- var _default = htmlpage;
54
- exports.default = _default;
53
+ var _default = exports.default = htmlpage;
55
54
  //# sourceMappingURL=htmlpage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"htmlpage.js","names":["_exceptions","require","htmlpage","props","_context","_context2","_context3","contextPath","undefined","IllegalArgumentException","html","head","template","htmlAttributes","toString","_map","default","_filter","_keys","call","key","join","UUID","state","_trim","replace","_default","exports"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = (props: TemplateProps): string => {\n if (props?.contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAUA;AACA;AACA,MAAMC,QAAQ,GAAIC,KAAoB,IAAa;EAAA,IAAAC,QAAA,EAAAC,SAAA,EAAAC,SAAA;EACjD,IAAIH,KAAK,EAAEI,WAAW,KAAKC,SAAS,EAAE;IACpC,MAAM,IAAIC,oCAAwB,CAAC,8BAA8B,CAAC;EACpE;EACA,IAAIN,KAAK,CAACO,IAAI,KAAKF,SAAS,EAAE;IAC5B,MAAM,IAAIC,oCAAwB,CAAC,yBAAyB,CAAC;EAC/D;EAEA,MAAM;IAAEE,IAAI,GAAG,CAAC;EAAE,CAAC,GAAGR,KAAK;EAE3B,MAAMS,QAAQ,GAAI;AACpB;AACA,UAAUD,IAAI,CAACE,cAAc,GAAGF,IAAI,CAACE,cAAc,CAACC,QAAQ,CAAC,CAAC,GAAG,EAAG;AACpE;AACA;AACA,QAAQ,IAAAC,IAAA,CAAAC,OAAA,EAAAZ,QAAA,OAAAa,OAAA,CAAAD,OAAA,EAAAX,SAAA,OAAAa,KAAA,CAAAF,OAAA,EAAYL,IAAI,CAAC,EAAAQ,IAAA,CAAAd,SAAA,EACRe,GAAG,IAAKA,GAAG,KAAK,gBAAgB,CAAC,EAAAD,IAAA,CAAAf,QAAA,EACpCgB,GAAG,IAAKT,IAAI,CAACS,GAAG,CAAC,CAACN,QAAQ,CAAC,CAAC,CAAC,CAClCO,IAAI,CAAC,EAAE,CAAE;AAClB;AACA;AACA;AACA,8BAA8BlB,KAAK,CAACO,IAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BP,KAAK,CAACmB,IAAI,IAAI,EAAG,KAAInB,KAAK,CAACoB,KAAK,IAAI,EAAG;AACjE;AACA;AACA;AACA,CAAC;;EAEC;EACA;EACA;EACA,OAAO,IAAAC,KAAA,CAAAR,OAAA,EAAAV,SAAA,GAAAM,QAAQ,CAACa,OAAO,CAAC,iBAAiB,EAAEtB,KAAK,CAACI,WAAW,CAAC,EAAAY,IAAA,CAAAb,SAAM,CAAC;AACtE,CAAC;AAAC,IAAAoB,QAAA,GAEaxB,QAAQ;AAAAyB,OAAA,CAAAX,OAAA,GAAAU,QAAA"}
1
+ {"version":3,"file":"htmlpage.js","names":["_exceptions","require","htmlpage","props","_context","_context2","_context3","contextPath","undefined","IllegalArgumentException","html","head","template","htmlAttributes","toString","_map","default","_filter","_keys","call","key","join","UUID","state","_trim","replace","_default","exports"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = (props: TemplateProps): string => {\n if (props?.contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAUA;AACA;AACA,MAAMC,QAAQ,GAAIC,KAAoB,IAAa;EAAA,IAAAC,QAAA,EAAAC,SAAA,EAAAC,SAAA;EACjD,IAAIH,KAAK,EAAEI,WAAW,KAAKC,SAAS,EAAE;IACpC,MAAM,IAAIC,oCAAwB,CAAC,8BAA8B,CAAC;EACpE;EACA,IAAIN,KAAK,CAACO,IAAI,KAAKF,SAAS,EAAE;IAC5B,MAAM,IAAIC,oCAAwB,CAAC,yBAAyB,CAAC;EAC/D;EAEA,MAAM;IAAEE,IAAI,GAAG,CAAC;EAAE,CAAC,GAAGR,KAAK;EAE3B,MAAMS,QAAQ,GAAI;AACpB;AACA,UAAUD,IAAI,CAACE,cAAc,GAAGF,IAAI,CAACE,cAAc,CAACC,QAAQ,CAAC,CAAC,GAAG,EAAG;AACpE;AACA;AACA,QAAQ,IAAAC,IAAA,CAAAC,OAAA,EAAAZ,QAAA,OAAAa,OAAA,CAAAD,OAAA,EAAAX,SAAA,OAAAa,KAAA,CAAAF,OAAA,EAAYL,IAAI,CAAC,EAAAQ,IAAA,CAAAd,SAAA,EACRe,GAAG,IAAKA,GAAG,KAAK,gBAAgB,CAAC,EAAAD,IAAA,CAAAf,QAAA,EACpCgB,GAAG,IAAKT,IAAI,CAACS,GAAG,CAAC,CAACN,QAAQ,CAAC,CAAC,CAAC,CAClCO,IAAI,CAAC,EAAE,CAAE;AAClB;AACA;AACA;AACA,8BAA8BlB,KAAK,CAACO,IAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BP,KAAK,CAACmB,IAAI,IAAI,EAAG,KAAInB,KAAK,CAACoB,KAAK,IAAI,EAAG;AACjE;AACA;AACA;AACA,CAAC;;EAEC;EACA;EACA;EACA,OAAO,IAAAC,KAAA,CAAAR,OAAA,EAAAV,SAAA,GAAAM,QAAQ,CAACa,OAAO,CAAC,iBAAiB,EAAEtB,KAAK,CAACI,WAAW,CAAC,EAAAY,IAAA,CAAAb,SAAM,CAAC;AACtE,CAAC;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEad,QAAQ"}
@@ -87,6 +87,5 @@ const renderSSRComplete = _ref => {
87
87
  UUID
88
88
  }));
89
89
  };
90
- var _default = renderSSRComplete;
91
- exports.default = _default;
90
+ var _default = exports.default = renderSSRComplete;
92
91
  //# sourceMappingURL=renderSSRComplete.js.map
@@ -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","getBasePath","createSSRComplete","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","HelmetProvider","context","StaticRouter","basename","then","appHTML","handleErrors","head","createHead","contextPath","html","state","dehydrate","catch","error","errorMessage","message","errorResource","fileName","errorLine","lineNumber","errorStack","stack","_default","exports"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme,\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = { helmet: {} };\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n const basePath = getBasePath();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>,\n ),\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>,\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n }),\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,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;EAExB,MAAMC,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;;EAEpC;EACA;EACA,MAAMC,QAAkB,GAAGV,WAAW,CAACW,UAAU,CAAC,CAAC;EAEnD,MAAMC,QAAQ,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAE9B,O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B,WAAW,EAAEnB,QAAQ;IACrBoB,IAAI,EAAE,IAAAjB,sBAAc,gBAClB,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,GAEalD,iBAAiB;AAAAmD,OAAA,CAAAzB,OAAA,GAAAwB,QAAA"}
1
+ {"version":3,"file":"renderSSRComplete.js","names":["_server","require","_reactRedux","_reactRouter","_reactHelmetAsync","_styledComponents","_createSSRComplete","_interopRequireDefault","_htmlpage","_Settings","_ThemeProvider","_ErrorBoundary","_serverUtil","_jsxRuntime","renderSSRComplete","_ref","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","helmet","routerContext","sheet","ServerStyleSheet","location","toLocation","basePath","getBasePath","createSSRComplete","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","HelmetProvider","context","StaticRouter","basename","then","appHTML","handleErrors","head","createHead","contextPath","html","state","dehydrate","catch","error","errorMessage","message","errorResource","fileName","errorLine","lineNumber","errorStack","stack","_default","exports"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme,\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = { helmet: {} };\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n const basePath = getBasePath();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>,\n ),\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>,\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n }),\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,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;EAExB,MAAMC,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;;EAEpC;EACA;EACA,MAAMC,QAAkB,GAAGV,WAAW,CAACW,UAAU,CAAC,CAAC;EAEnD,MAAMC,QAAQ,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAE9B,OAAO,IAAAC,0BAAiB,EAACjB,KAAK,EAAE,MAC9B,IAAAkB,sBAAc,gBACZ,IAAArB,WAAA,CAAAsB,G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A,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"}
@@ -43,6 +43,5 @@ const renderSSRMinimal = _ref => {
43
43
  UUID
44
44
  });
45
45
  };
46
- var _default = renderSSRMinimal;
47
- exports.default = _default;
46
+ var _default = exports.default = renderSSRMinimal;
48
47
  //# sourceMappingURL=renderSSRMinimal.js.map
@@ -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","getBasePath","html","state","dehydrate","_default","exports"],"sources":["../../src/react-server/renderSSRMinimal.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\n\nimport { Provider } from \"react-redux\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport { createHead, dehydrate } from \"./serverUtil\";\nimport htmlpage from \"./htmlpage\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { TemplateProps } from \"./htmlpage\";\ntype Props = {\n store: ReduxStore,\n theme?: Theme | Array<Theme>,\n UUID: string,\n render: Function,\n template?: (TemplateProps) => string,\n};\n\n/**\n */\nconst renderSSRMinimal = ({\n store,\n theme,\n UUID = \"\",\n render,\n template = htmlpage,\n}: Props): string => {\n const sheet = new ServerStyleSheet();\n\n const appHTML = renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>{render()}</ThemeProvider>\n </StyleSheetManager>\n </Provider>,\n );\n\n const head = createHead(sheet, UUID);\n return template({\n contextPath: getBasePath(),\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAH,sBAAA,CAAAJ,OAAA;AAAkC,IAAAQ,WAAA,GAAAR,OAAA;AAalC;AACA;AACA,MAAMS,gBAAgB,GAAGC,IAAA,IAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGC;EACN,CAAC,GAAAN,IAAA;EACN,MAAMO,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,gBAC5B,IAAAZ,WAAA,CAAAa,GAAA,EAACpB,WAAA,CAAAqB,QAAQ;IAACX,KAAK,EAAEA,KAAM;IAAAY,QAAA,eACrB,IAAAf,WAAA,CAAAa,GAAA,EAACnB,iBAAA,CAAAsB,iBAAiB;MAACP,KAAK,EAAEA,KAAK,CAACQ,QAAS;MAAAF,QAAA,eACvC,IAAAf,WAAA,CAAAa,GAAA,EAAClB,cAAA,CAAAuB,OAAa;QAACd,KAAK,EAAEA,KAAM;QAAAW,QAAA,EAAET,MAAM,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,qBAAW,EAAC,CAAC;IAC1BC,IAAI,EAAEZ,OAAO;IACbQ,IAAI;IACJK,KAAK,EAAE,IAAAC,qBAAS,EAACtB,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqB,QAAA,GAEazB,gBAAgB;AAAA0B,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
1
+ {"version":3,"file":"renderSSRMinimal.js","names":["_server","require","_reactRedux","_styledComponents","_ThemeProvider","_interopRequireDefault","_Settings","_serverUtil","_htmlpage","_jsxRuntime","renderSSRMinimal","_ref","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","head","createHead","contextPath","getBasePath","html","state","dehydrate","_default","exports"],"sources":["../../src/react-server/renderSSRMinimal.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\n\nimport { Provider } from \"react-redux\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport { createHead, dehydrate } from \"./serverUtil\";\nimport htmlpage from \"./htmlpage\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { TemplateProps } from \"./htmlpage\";\ntype Props = {\n store: ReduxStore,\n theme?: Theme | Array<Theme>,\n UUID: string,\n render: Function,\n template?: (TemplateProps) => string,\n};\n\n/**\n */\nconst renderSSRMinimal = ({\n store,\n theme,\n UUID = \"\",\n render,\n template = htmlpage,\n}: Props): string => {\n const sheet = new ServerStyleSheet();\n\n const appHTML = renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>{render()}</ThemeProvider>\n </StyleSheetManager>\n </Provider>,\n );\n\n const head = createHead(sheet, UUID);\n return template({\n contextPath: getBasePath(),\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAH,sBAAA,CAAAJ,OAAA;AAAkC,IAAAQ,WAAA,GAAAR,OAAA;AAalC;AACA;AACA,MAAMS,gBAAgB,GAAGC,IAAA,IAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGC;EACN,CAAC,GAAAN,IAAA;EACN,MAAMO,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,gBAC5B,IAAAZ,WAAA,CAAAa,GAAA,EAACpB,WAAA,CAAAqB,QAAQ;IAACX,KAAK,EAAEA,KAAM;IAAAY,QAAA,eACrB,IAAAf,WAAA,CAAAa,GAAA,EAACnB,iBAAA,CAAAsB,iBAAiB;MAACP,KAAK,EAAEA,KAAK,CAACQ,QAAS;MAAAF,QAAA,eACvC,IAAAf,WAAA,CAAAa,GAAA,EAAClB,cAAA,CAAAuB,OAAa;QAACd,KAAK,EAAEA,KAAM;QAAAW,QAAA,EAAET,MAAM,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,qBAAW,EAAC,CAAC;IAC1BC,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"}
@@ -55,6 +55,5 @@ const serverNoSSR = _ref => {
55
55
  template
56
56
  });
57
57
  };
58
- var _default = serverNoSSR;
59
- exports.default = _default;
58
+ var _default = exports.default = serverNoSSR;
60
59
  //# sourceMappingURL=serverNoSSR.js.map
@@ -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","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","storedTheme","getState","preferences","createTheme","setI18n","setApplication","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","_default","exports","default"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;AACAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AASA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,iBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,YAAA,GAAAL,sBAAA,CAAAF,OAAA;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UUID","_interopRequireDefault","_requestInformation","_serverUtil","_beforeRenderHooks","_renderSSRMinimal","_createTheme","serverNoSSR","_ref","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","createUUID","__webpack_nonce__","requestHref","getFullRequestHref","store","createReduxStore","setServerPreferences","setConfigurationTheme","storedTheme","getState","preferences","createTheme","setI18n","setApplication","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","_default","exports","default"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;AACAA,OAAA;AAEA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AASA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,iBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,YAAA,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,IAAI,GAAG,IAAAC,mBAAU,EAAC,CAAC;EACzBC,iBAAiB,GAAGF,IAAI,CAAC,CAAC;;EAE1B,MAAMG,WAAW,GAAG,IAAAC,sCAAkB,EAACb,OAAO,CAAC;EAE/C,MAAMc,KAAK,GAAG,IAAAC,4BAAgB,EAACH,WAAW,EAAEV,cAAc,CAAC;EAE3D,IAAAc,gCAAoB,EAACF,KAAK,EAAEX,iBAAiB,CAAC;EAC9C,IAAAc,iCAAqB,EAACH,KAAK,CAAC;EAE5B,IAAIV,KAAK,EAAE;IACT,MAAMc,WAAW,GAAGJ,KAAK,CAACK,QAAQ,CAAC,CAAC,EAAEC,WAAW,EAAEhB,KAAK;IACxD;IACA,IAAAiB,oBAAW,EAACH,WAAW,EAAEd,KAAK,CAAC;EACjC;EAEA,IAAAkB,mBAAO,EAACR,KAAK,EAAEb,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtB,IAAAe,0BAAc,EAACT,KAAK,CAAC;EACvB;EAEA,IAAAU,wBAAY,EAACV,KAAK,CAAC;EAEnB,IAAAW,0CAAuB,EAAClB,iBAAiB,EAAE;IAAEO,KAAK;IAAEd;EAAQ,CAAC,CAAC;EAE9D,OAAO,IAAA0B,yBAAgB,EAAC;IAAEZ,KAAK;IAAEV,KAAK;IAAEK,IAAI;IAAEJ,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAAC,IAAAqB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa/B,WAAW"}
@@ -47,6 +47,5 @@ const serverSSR = _ref => {
47
47
  template
48
48
  });
49
49
  };
50
- var _default = serverSSR;
51
- exports.default = _default;
50
+ var _default = exports.default = serverSSR;
52
51
  //# sourceMappingURL=serverSSR.js.map
@@ -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,GAEavB,SAAS;AAAAwB,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
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"}
@@ -29,6 +29,5 @@ const ThemeProvider = _ref => {
29
29
  });
30
30
  };
31
31
  ThemeProvider.displayName = "BI.ThemeProvider";
32
- var _default = ThemeProvider;
33
- exports.default = _default;
32
+ var _default = exports.default = ThemeProvider;
34
33
  //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","names":["_reactRedux","require","_styledComponents","_createTheme","_interopRequireDefault","_jsxRuntime","ThemeProvider","_ref","theme","children","storedTheme","useSelector","_ref2","preferences","finalTheme","createTheme","jsx","displayName","_default","exports","default"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAwC,IAAAI,WAAA,GAAAJ,OAAA;AAUxC;AACA;AACA,MAAMK,aAAa,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC,KAAK;IAAEC;EAAgB,CAAC,GAAAF,IAAA;EAC/C,MAAMG,WAAW,GAAG,IAAAC,uBAAW,EAACC,KAAA;IAAA,IAAC;MAAEC;IAAY,CAAC,GAAAD,KAAA;IAAA,OAAKC,WAAW,CAACL,KAAK;EAAA,EAAC;EACvE,MAAMM,UAAU,GAAG,IAAAC,oBAAW,EAACL,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAO,IAAAH,WAAA,CAAAW,GAAA,EAACd,iBAAA,CAAAI,aAAe;IAACE,KAAK,EAAEM,UAAW;IAAAL,QAAA,EAAEA;EAAQ,CAAkB,CAAC;AACzE,CAAC;AACDH,aAAa,CAACW,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAEhCZ,aAAa;AAAAa,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"ThemeProvider.js","names":["_reactRedux","require","_styledComponents","_createTheme","_interopRequireDefault","_jsxRuntime","ThemeProvider","_ref","theme","children","storedTheme","useSelector","_ref2","preferences","finalTheme","createTheme","jsx","displayName","_default","exports","default"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAwC,IAAAI,WAAA,GAAAJ,OAAA;AAUxC;AACA;AACA,MAAMK,aAAa,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC,KAAK;IAAEC;EAAgB,CAAC,GAAAF,IAAA;EAC/C,MAAMG,WAAW,GAAG,IAAAC,uBAAW,EAACC,KAAA;IAAA,IAAC;MAAEC;IAAY,CAAC,GAAAD,KAAA;IAAA,OAAKC,WAAW,CAACL,KAAK;EAAA,EAAC;EACvE,MAAMM,UAAU,GAAG,IAAAC,oBAAW,EAACL,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAO,IAAAH,WAAA,CAAAW,GAAA,EAACd,iBAAA,CAAAI,aAAe;IAACE,KAAK,EAAEM,UAAW;IAAAL,QAAA,EAAEA;EAAQ,CAAkB,CAAC;AACzE,CAAC;AACDH,aAAa,CAACW,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEhCd,aAAa"}
@@ -102,6 +102,5 @@ const createTheme = function (storedTheme) {
102
102
  }
103
103
  return customTheme;
104
104
  };
105
- var _default = createTheme;
106
- exports.default = _default;
105
+ var _default = exports.default = createTheme;
107
106
  //# sourceMappingURL=createTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createTheme.js","names":["_flattenDeep","_interopRequireDefault","require","_objects","_Settings","replacePlaceholders","inputTheme","_context","possibleKeys","_map","default","_keys","call","key","join","re","RegExp","_entries","forEach","_ref","value","replace","match","capture","generateTheme","storedTheme","generatedTheme","settings","_len","arguments","length","themeElements","Array","_key","element","isPlainObject","createTheme","_len2","themeConfigs","_key2","customTheme","flattenDeep","setSettings","_default","exports"],"sources":["../../src/react-theme/createTheme.js"],"sourcesContent":["// @flow\nimport flattenDeep from \"lodash/flattenDeep\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport { setSettings } from \"../constants/Settings\";\n\nimport type { Theme } from \"./types\";\n\nconst replacePlaceholders = (inputTheme: Theme) => {\n const possibleKeys = Object.keys(inputTheme)\n .map((key) => `\\\\b${key}\\\\b`)\n .join(\"|\");\n\n const re = new RegExp(`\\\\$(${possibleKeys})`, \"g\");\n Object.entries(inputTheme).forEach(([key, value]) => {\n if (key !== \"settings\" && typeof value === \"string\") {\n inputTheme[key] = value.replace(\n re,\n // $FlowIssue[incompatible-call]\n (match, capture) => inputTheme[capture],\n );\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (storedTheme: Theme, ...themeElements: Array<Theme>) => {\n let generatedTheme = { settings: {} };\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\n // $FlowFixMe[cannot-spread-indexer]\n generatedTheme = { ...generatedTheme, ...element, ...storedTheme };\n }\n }\n\n // final - replace any assignments inside the theme\n return replacePlaceholders(generatedTheme);\n};\n\n/**\n * Create a theme from multiple theme configuration objects.\n * Properties are overwriten by iterating the configuration objects from left to right.\n *\n * The first argument represents a stored theme part, this is optional. The stored theme part will overwrite every part in the collection of theme parts.\n * Thus a stored configuration is leading as it can be configured by a modeller through the repository.\n *\n * Placeholders can be used, they are replaced before calling a function theme part or at the end of the theme creation.\n *\n * Both objects and function can be used, where a function receives the previous objects as input arguments.\n * For example using the method createTheme(ThemeObject, ThemeObject2, ThemeFunction, ThemeFunction2), will be handled as:\n *\n * ThemeFunction2(ThemeFunction1({ ...ThemeObject, ...ThemeObject2 }))\n *\n * @example\n * Example where the primary color of the default theme is overwritten with a primary color of the custom theme,\n * but the button bg still uses the yiq function of the default theme:\n *\n * const DefaultTheme = {\n * PRIMARY_COLOR: \"#0000ff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * BUTTON_COLOR: \"$PRIMARY_COLOR\"\n * }\n *\n * const createDefaultTheme = (input) => ({\n * ...input,\n * BUTTON_BG: getContrastYIQ(input.BUTTON_COLOR)\n * })\n *\n * const CustomTheme = {\n * PRIMARY_COLOR: \"#ff0000\"\n * }\n *\n * createTheme(null, DefaultTheme, CustomTheme, createDefaultTheme);\n *\n * // Result:\n * {\n * PRIMARY_COLOR: \"#ff0000\",\n * BUTTON_COLOR: \"#ff0000\",\n * BUTTON_BG: \"#fff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * }\n */\nconst createTheme = (\n storedTheme: Theme,\n ...themeConfigs: Array<Theme | Array<Theme> | void>\n):\n | any\n | {}\n | {\n INPUT_FOCUS_BORDER_COLOR?: string,\n LINK_HOVER_COLOR?: string,\n PAGING_HOVER_COLOR?: string,\n settings?: { [settingName: string]: string },\n } => {\n const customTheme = generateTheme(storedTheme, ...flattenDeep(themeConfigs));\n\n if (customTheme) {\n setSettings(customTheme.settings);\n }\n\n return customTheme;\n};\n\nexport default createTheme;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAIA,MAAMG,mBAAmB,GAAIC,UAAiB,IAAK;EAAA,IAAAC,QAAA;EACjD,MAAMC,YAAY,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAH,QAAA,OAAAI,KAAA,CAAAD,OAAA,EAAYJ,UAAU,CAAC,EAAAM,IAAA,CAAAL,QAAA,EACpCM,GAAG,IAAM,MAAKA,GAAI,KAAI,CAAC,CAC5BC,IAAI,CAAC,GAAG,CAAC;EAEZ,MAAMC,EAAE,GAAG,IAAIC,MAAM,CAAE,OAAMR,YAAa,GAAE,EAAE,GAAG,CAAC;EAClD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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMU,WAAW,GAAG,SAAAA,CAClBX,WAAkB,EAUX;EAAA,SAAAY,KAAA,GAAAR,SAAA,CAAAC,MAAA,EATJQ,YAAY,OAAAN,KAAA,CAAAK,KAAA,OAAAA,KAAA,WAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAAZD,YAAY,CAAAC,KAAA,QAAAV,SAAA,CAAAU,KAAA;EAAA;EAUf,MAAMC,WAAW,GAAGhB,aAAa,CAACC,WAAW,EAAE,GAAG,IAAAgB,oBAAW,EAACH,YAAY,CAAC,CAAC;EAE5E,IAAIE,WAAW,EAAE;IACf,IAAAE,qBAAW,EAACF,WAAW,CAACb,QAAQ,CAAC;EACnC;EAEA,OAAOa,WAAW;AACpB,CAAC;AAAC,IAAAG,QAAA,GAEaP,WAAW;AAAAQ,OAAA,CAAAlC,OAAA,GAAAiC,QAAA"}
1
+ {"version":3,"file":"createTheme.js","names":["_flattenDeep","_interopRequireDefault","require","_objects","_Settings","replacePlaceholders","inputTheme","_context","possibleKeys","_map","default","_keys","call","key","join","re","RegExp","_entries","forEach","_ref","value","replace","match","capture","generateTheme","storedTheme","generatedTheme","settings","_len","arguments","length","themeElements","Array","_key","element","isPlainObject","createTheme","_len2","themeConfigs","_key2","customTheme","flattenDeep","setSettings","_default","exports"],"sources":["../../src/react-theme/createTheme.js"],"sourcesContent":["// @flow\nimport flattenDeep from \"lodash/flattenDeep\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport { setSettings } from \"../constants/Settings\";\n\nimport type { Theme } from \"./types\";\n\nconst replacePlaceholders = (inputTheme: Theme) => {\n const possibleKeys = Object.keys(inputTheme)\n .map((key) => `\\\\b${key}\\\\b`)\n .join(\"|\");\n\n const re = new RegExp(`\\\\$(${possibleKeys})`, \"g\");\n Object.entries(inputTheme).forEach(([key, value]) => {\n if (key !== \"settings\" && typeof value === \"string\") {\n inputTheme[key] = value.replace(\n re,\n // $FlowIssue[incompatible-call]\n (match, capture) => inputTheme[capture],\n );\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (storedTheme: Theme, ...themeElements: Array<Theme>) => {\n let generatedTheme = { settings: {} };\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\n // $FlowFixMe[cannot-spread-indexer]\n generatedTheme = { ...generatedTheme, ...element, ...storedTheme };\n }\n }\n\n // final - replace any assignments inside the theme\n return replacePlaceholders(generatedTheme);\n};\n\n/**\n * Create a theme from multiple theme configuration objects.\n * Properties are overwriten by iterating the configuration objects from left to right.\n *\n * The first argument represents a stored theme part, this is optional. The stored theme part will overwrite every part in the collection of theme parts.\n * Thus a stored configuration is leading as it can be configured by a modeller through the repository.\n *\n * Placeholders can be used, they are replaced before calling a function theme part or at the end of the theme creation.\n *\n * Both objects and function can be used, where a function receives the previous objects as input arguments.\n * For example using the method createTheme(ThemeObject, ThemeObject2, ThemeFunction, ThemeFunction2), will be handled as:\n *\n * ThemeFunction2(ThemeFunction1({ ...ThemeObject, ...ThemeObject2 }))\n *\n * @example\n * Example where the primary color of the default theme is overwritten with a primary color of the custom theme,\n * but the button bg still uses the yiq function of the default theme:\n *\n * const DefaultTheme = {\n * PRIMARY_COLOR: \"#0000ff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * BUTTON_COLOR: \"$PRIMARY_COLOR\"\n * }\n *\n * const createDefaultTheme = (input) => ({\n * ...input,\n * BUTTON_BG: getContrastYIQ(input.BUTTON_COLOR)\n * })\n *\n * const CustomTheme = {\n * PRIMARY_COLOR: \"#ff0000\"\n * }\n *\n * createTheme(null, DefaultTheme, CustomTheme, createDefaultTheme);\n *\n * // Result:\n * {\n * PRIMARY_COLOR: \"#ff0000\",\n * BUTTON_COLOR: \"#ff0000\",\n * BUTTON_BG: \"#fff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * }\n */\nconst createTheme = (\n storedTheme: Theme,\n ...themeConfigs: Array<Theme | Array<Theme> | void>\n):\n | any\n | {}\n | {\n INPUT_FOCUS_BORDER_COLOR?: string,\n LINK_HOVER_COLOR?: string,\n PAGING_HOVER_COLOR?: string,\n settings?: { [settingName: string]: string },\n } => {\n const customTheme = generateTheme(storedTheme, ...flattenDeep(themeConfigs));\n\n if (customTheme) {\n setSettings(customTheme.settings);\n }\n\n return customTheme;\n};\n\nexport default createTheme;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAIA,MAAMG,mBAAmB,GAAIC,UAAiB,IAAK;EAAA,IAAAC,QAAA;EACjD,MAAMC,YAAY,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAH,QAAA,OAAAI,KAAA,CAAAD,OAAA,EAAYJ,UAAU,CAAC,EAAAM,IAAA,CAAAL,QAAA,EACpCM,GAAG,IAAM,MAAKA,GAAI,KAAI,CAAC,CAC5BC,IAAI,CAAC,GAAG,CAAC;EAEZ,MAAMC,EAAE,GAAG,IAAIC,MAAM,CAAE,OAAMR,YAAa,GAAE,EAAE,GAAG,CAAC;EAClD,IAAAS,QAAA,CAAAP,OAAA,EAAeJ,UAAU,CAAC,CAACY,OAAO,CAACC,IAAA,IAAkB;IAAA,IAAjB,CAACN,GAAG,EAAEO,KAAK,CAAC,GAAAD,IAAA;IAC9C,IAAIN,GAAG,KAAK,UAAU,IAAI,OAAOO,KAAK,KAAK,QAAQ,EAAE;MACnDd,UAAU,CAACO,GAAG,CAAC,GAAGO,KAAK,CAACC,OAAO,CAC7BN,EAAE;MACF;MACA,CAACO,KAAK,EAAEC,OAAO,KAAKjB,UAAU,CAACiB,OAAO,CACxC,CAAC;IACH;EACF,CAAC,CAAC;EAEF,OAAOjB,UAAU;AAC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,WAAW,EAAE,GAAG,IAAAgB,oBAAW,EAACH,YAAY,CAAC,CAAC;EAE5E,IAAIE,WAAW,EAAE;IACf,IAAAE,qBAAW,EAACF,WAAW,CAACb,QAAQ,CAAC;EACnC;EAEA,OAAOa,WAAW;AACpB,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAlC,OAAA,GAEa0B,WAAW"}
@@ -95,6 +95,5 @@ const modularUIConnector = function (name, resource) {
95
95
  return WrappedComponent;
96
96
  };
97
97
  };
98
- var _default = modularUIConnector;
99
- exports.default = _default;
98
+ var _default = exports.default = modularUIConnector;
100
99
  //# sourceMappingURL=ModularUIConnector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIConnector.js","names":["_react","require","_reactRedux","_reactRouter","_ModularUIActions","_Href","_interopRequireDefault","_utils","_ModularUIUtils","_useModularUI","_useI18n","_jsxRuntime","modularUIConnector","name","resource","options","arguments","length","undefined","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","useDispatch","location","useLocation","url","useUrl","displayName","getDisplayName","contextId","modelEntry","useModularUI","modelKey","model","connectKey","handleManualReload","reloadOptions","reloadModel","handleFetch","href","fetchOptions","loadModularUI","reload","state","doReload","useReload","useEffect","isReload","removeModelByKey","locale","useLocale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI","jsx","_default","exports","default"],"sources":["../../../src/redux/_modularui/ModularUIConnector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport {\n loadModularUI,\n reloadModel,\n removeModelByKey,\n} from \"./ModularUIActions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./ModularUIUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst modularUIConnector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false },\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object,\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true }),\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name,\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default modularUIConnector;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAMA,IAAAI,KAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAAgD,IAAAU,WAAA,GAAAV,OAAA;AAmBhD;AACA;AACA,MAAMW,kBAAkB,GAAG,SAAAA,CACzBC,IAAY,EACZC,QAA2B,EAEmC;EAAA,IAD9DC,OAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IAAEG,QAAQ,EAAE,MAAM;IAAEC,eAAe,EAAE;EAAM,CAAC;EAExE,MAAM;IACJD,QAAQ,GAAG,MAAM;IACjBC,eAAe,GAAG,KAAK;IACvB,GAAGC;EACL,CAAC,GAAGN,OAAO;EAEX,OAAQO,SAA6B,IAAK;IACxC,MAAMC,gBAAgB,GAAIC,KAAU,IAAK;MACvC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;MAC9B,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAAC,CAAC;MAE9B,MAAMC,GAAG,GAAG,IAAAC,sBAAM,EAAChB,QAAQ,EAAE;QAAEa,QAAQ;QAAE,GAAGH;MAAM,CAAC,CAAC;MACpD,MAAMO,WAAW,GAAG,IAAAC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AAC,kBAAS,EAAC,CAAC;MAC1B,MAAMC,QAAuB,GAAG;QAC9BnB,QAAQ;QACR,CAACjB,QAAQ,GAAGe,UAAU,GAAGA,UAAU,CAACG,KAAK,GAAG,IAAI;QAChDV,QAAQ;QACR6B,MAAM,EAAEtB,UAAU,GAAGA,UAAU,CAACsB,MAAM,GAAG,IAAI;QAC7CC,gBAAgB,EAAEvB,UAAU,GAAGA,UAAU,CAACuB,gBAAgB,GAAG,IAAI;QACjEC,QAAQ,EAAEC,OAAO,CAACzB,UAAU,CAAC;QAC7BmB,MAAM;QACNO,cAAc,EAAElB,WAAW;QAC3BD,WAAW,EAAEF;MACf,CAAC;MAED,oBAAO,IAAA5B,WAAA,CAAAkD,GAAA,EAACvC,SAAS;QAAA,GAAKE,KAAK;QAAA,GAAM+B;MAAQ,CAAG,CAAC;IAC/C,CAAC;IAEDhC,gBAAgB,CAACQ,WAAW,GAAI,gBAAe,IAAAC,qBAAc,EAC3DT,gBAAgB,EAChBV,IACF,CAAE,EAAC;IAEH,OAAOU,gBAAgB;EACzB,CAAC;AACH,CAAC;AAAC,IAAAuC,QAAA,GAEalD,kBAAkB;AAAAmD,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"ModularUIConnector.js","names":["_react","require","_reactRedux","_reactRouter","_ModularUIActions","_Href","_interopRequireDefault","_utils","_ModularUIUtils","_useModularUI","_useI18n","_jsxRuntime","modularUIConnector","name","resource","options","arguments","length","undefined","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","useDispatch","location","useLocation","url","useUrl","displayName","getDisplayName","contextId","modelEntry","useModularUI","modelKey","model","connectKey","handleManualReload","reloadOptions","reloadModel","handleFetch","href","fetchOptions","loadModularUI","reload","state","doReload","useReload","useEffect","isReload","removeModelByKey","locale","useLocale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI","jsx","_default","exports","default"],"sources":["../../../src/redux/_modularui/ModularUIConnector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport {\n loadModularUI,\n reloadModel,\n removeModelByKey,\n} from \"./ModularUIActions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./ModularUIUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst modularUIConnector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false },\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object,\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true }),\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name,\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default modularUIConnector;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAMA,IAAAI,KAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAAgD,IAAAU,WAAA,GAAAV,OAAA;AAmBhD;AACA;AACA,MAAMW,kBAAkB,GAAG,SAAAA,CACzBC,IAAY,EACZC,QAA2B,EAEmC;EAAA,IAD9DC,OAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IAAEG,QAAQ,EAAE,MAAM;IAAEC,eAAe,EAAE;EAAM,CAAC;EAExE,MAAM;IACJD,QAAQ,GAAG,MAAM;IACjBC,eAAe,GAAG,KAAK;IACvB,GAAGC;EACL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,EAAE,CAAC1B,QAAQ,EAAEuB,QAAQ,EAAEnB,GAAG,EAAEO,QAAQ,CAAC,CAAC;;MAEvC;MACA,IAAAc,gBAAS,EAAC,MAAM;QACd,OAAO,MAAM;UACX,IAAI9B,eAAe,EAAE;YACnBK,QAAQ,CAAC,IAAA2B,kCAAgB,EAAChB,QAAQ,CAAC,CAAC;UACtC;QACF,CAAC;MACH,CAAC,EAAE,CAACX,QAAQ,EAAEW,QAAQ,CAAC,CAAC;;MAExB;MACA,MAAMiB,MAAM,GAAG,IAAAC,kBAAS,EAAC,CAAC;MAC1B,MAAMC,QAAuB,GAAG;QAC9BnB,QAAQ;QACR,CAACjB,QAAQ,GAAGe,UAAU,GAAGA,UAAU,CAACG,KAAK,GAAG,IAAI;QAChDV,QAAQ;QACR6B,MAAM,EAAEtB,UAAU,GAAGA,UAAU,CAACsB,MAAM,GAAG,IAAI;QAC7CC,gBAAgB,EAAEvB,UAAU,GAAGA,UAAU,CAACuB,gBAAgB,GAAG,IAAI;QACjEC,QAAQ,EAAEC,OAAO,CAACzB,UAAU,CAAC;QAC7BmB,MAAM;QACNO,cAAc,EAAElB,WAAW;QAC3BD,WAAW,EAAEF;MACf,CAAC;MAED,oBAAO,IAAA5B,WAAA,CAAAkD,GAAA,EAACvC,SAAS;QAAA,GAAKE,KAAK;QAAA,GAAM+B;MAAQ,CAAG,CAAC;IAC/C,CAAC;IAEDhC,gBAAgB,CAACQ,WAAW,GAAI,gBAAe,IAAAC,qBAAc,EAC3DT,gBAAgB,EAChBV,IACF,CAAE,EAAC;IAEH,OAAOU,gBAAgB;EACzB,CAAC;AACH,CAAC;AAAC,IAAAuC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEapD,kBAAkB"}
@@ -203,7 +203,7 @@ const getModels = state => {
203
203
  });
204
204
  return models;
205
205
  };
206
- const getActiveModels = (0, _reselect.createSelectorCreator)(_reselect.defaultMemoize, (value, other) => (0, _stringify.default)(value) === (0, _stringify.default)(other))([getLocation, getModels], (location, models) => {
206
+ const getActiveModels = exports.getActiveModels = (0, _reselect.createSelectorCreator)(_reselect.defaultMemoize, (value, other) => (0, _stringify.default)(value) === (0, _stringify.default)(other))([getLocation, getModels], (location, models) => {
207
207
  const contextModels = [];
208
208
  if (location) {
209
209
  const locationParts = location.split("/");
@@ -237,7 +237,6 @@ const getActiveModels = (0, _reselect.createSelectorCreator)(_reselect.defaultMe
237
237
 
238
238
  /**
239
239
  */
240
- exports.getActiveModels = getActiveModels;
241
240
  const getPreference = (state, preferenceName) => {
242
241
  if (state && state.preferences) {
243
242
  return state.preferences[preferenceName];
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUISelectors.js","names":["_reselect","require","_objects","_Href","_interopRequireDefault","_ContentModel","_ContentTOCModel","_ApplicationModel","_TabModel","_CaseViewModel","_FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_map","default","_filter","_keys","call","key","model","exports","getFirstModelByInstance","_context3","_find","getActiveModelByInstance","location","getLocation","_context4","_startsWith","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","_context5","findHref","Href","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","has","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","createSelectorCreator","defaultMemoize","value","other","_stringify","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType","_context8","_context9"],"sources":["../../../src/redux/_modularui/ModularUISelectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string,\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (\n state: ReduxState,\n href: Href | string,\n): Array<string> => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return [];\n};\n\n/**\n */\nconst getLocation = (state: ReduxState): string =>\n state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state: ReduxState) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other),\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath),\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string,\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string,\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type,\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,SAAA,GAAAJ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KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"ModularUISelectors.js","names":["_reselect","require","_objects","_Href","_interopRequireDefault","_ContentModel","_ContentTOCModel","_ApplicationModel","_TabModel","_CaseViewModel","_FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_map","default","_filter","_keys","call","key","model","exports","getFirstModelByInstance","_context3","_find","getActiveModelByInstance","location","getLocation","_context4","_startsWith","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","_context5","findHref","Href","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","has","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","createSelectorCreator","defaultMemoize","value","other","_stringify","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType","_context8","_context9"],"sources":["../../../src/redux/_modularui/ModularUISelectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string,\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (\n state: ReduxState,\n href: Href | string,\n): Array<string> => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return [];\n};\n\n/**\n */\nconst getLocation = (state: ReduxState): string =>\n state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state: ReduxState) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other),\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath),\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string,\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string,\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type,\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,SAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,cAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,UAAA,GAAAN,sBAAA,CAAAH,OAAA;AAKA;AACA;AACO,MAAMU,sBAAsB,GAAGA,CACpCC,KAAiB,EACjBC,QAAkB,KACQ;EAC1B,MAAMC,MAAM,GAAGF,KAAK,EAAEG,IAAI,EAAED,MAAM,IAAI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CAAC;MAChD;MAEA,OAAO7B,IAAI;IACb,CAAC,CAAC;EACJ;EAEA,OAAOyC,aAAa;AACtB,CAAC,CAAC;;AAEF;AACA;AACO,MAAMY,aAAa,GAAGA,CAC3B7E,KAAiB,EACjB8E,cAAsB,KACK;EAC3B,IAAI9E,KAAK,IAAIA,KAAK,CAAC+E,WAAW,EAAE;IAC9B,OAAO/E,KAAK,CAAC+E,WAAW,CAACD,cAAc,CAAC;EAC1C;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AAFAhE,OAAA,CAAA+D,aAAA,GAAAA,aAAA;AAGO,MAAMG,eAAe,GAAGA,CAC7BhF,KAAiB,EACjBqD,IAAY,KACc;EAC1B,IAAIrD,KAAK,IAAIA,KAAK,CAACI,SAAS,EAAE;IAAA,IAAA6E,SAAA,EAAAC,SAAA;IAC5B,OAAO,IAAA3E,IAAA,CAAAC,OAAA,EAAAyE,SAAA,OAAAxE,OAAA,CAAAD,OAAA,EAAA0E,SAAA,OAAAxE,KAAA,CAAAF,OAAA,EAAYR,KAAK,CAACI,SAAS,CAAC,EAAAO,IAAA,CAAAuE,SAAA,EAE9BtE,GAAG,IACFZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,IACpBZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,IAC1Bb,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAACwC,IAAI,KAAKA,IACxC,CAAC,EAAA1C,IAAA,CAAAsE,SAAA,EACKrE,GAAG,IAAKZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
@@ -37,6 +37,5 @@ const mapDispatchToProps = {
37
37
  * This can be used to request modular ui services inside react view components
38
38
  */
39
39
  const withModularui = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
40
- var _default = withModularui;
41
- exports.default = _default;
40
+ var _default = exports.default = withModularui;
42
41
  //# sourceMappingURL=withModularUI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withModularUI.js","names":["_reactRedux","require","_reselect","_ModularUIRequest","_interopRequireDefault","_ProgressIndicator","_Error","_i18n","_ModularUIActions","modularui","createSelector","getLocale","localeCode","href","options","arguments","length","undefined","modularuiRequest","ModularUIRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui","connect","_default","exports","default"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { getLocale } from \"../selectors/i18n\";\n\nimport { reloadModel } from \"./ModularUIActions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestModularUIOptions,\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst modularui = createSelector(\n [getLocale],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n },\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAkCA,MAAMQ,SAAS,GAAG,IAAAC,wBAAc,EAC9B,CAACC,eAAS,CAAC,EACVC,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjB,MAAMG,gBAAgB,GAAG,IAAIC,yBAAgB,CAACN,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACE,MAAM,GAAGR,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CACJ,CAAC;;AAED;AACA;AACA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1Db,SAAS,EAAEA,SAAS,CAACa,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCAAa;EACbC,cAAc,EAAdA,iCAAc;EACdC,WAAW,EAAXA,6BAAW;EACXC,WAAW,EAAXA;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAiC,GAAG,IAAAC,mBAAO,EAO/CT,eAAe,EAAEG,kBAAkB,CAAC;AAAC,IAAAO,QAAA,GAExBF,aAAa;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"withModularUI.js","names":["_reactRedux","require","_reselect","_ModularUIRequest","_interopRequireDefault","_ProgressIndicator","_Error","_i18n","_ModularUIActions","modularui","createSelector","getLocale","localeCode","href","options","arguments","length","undefined","modularuiRequest","ModularUIRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui","connect","_default","exports","default"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { getLocale } from \"../selectors/i18n\";\n\nimport { reloadModel } from \"./ModularUIActions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestModularUIOptions,\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst modularui = createSelector(\n [getLocale],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n },\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAkCA,MAAMQ,SAAS,GAAG,IAAAC,wBAAc,EAC9B,CAACC,eAAS,CAAC,EACVC,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjB,MAAMG,gBAAgB,GAAG,IAAIC,yBAAgB,CAACN,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACE,MAAM,GAAGR,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CACJ,CAAC;;AAED;AACA;AACA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1Db,SAAS,EAAEA,SAAS,CAACa,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCAAa;EACbC,cAAc,EAAdA,iCAAc;EACdC,WAAW,EAAXA,6BAAW;EACXC,WAAW,EAAXA;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAiC,GAAG,IAAAC,mBAAO,EAO/CT,eAAe,EAAEG,kBAAkB,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAExBJ,aAAa"}
@@ -8,40 +8,35 @@ var _reactRedux = require("react-redux");
8
8
  var _RouterActions = require("./RouterActions");
9
9
  /**
10
10
  */
11
- const withKey = (0, _reactRedux.connect)(state => ({
11
+ const withKey = exports.withKey = (0, _reactRedux.connect)(state => ({
12
12
  locationKey: state.router.location?.key ?? ""
13
13
  }));
14
14
 
15
15
  /**
16
16
  */
17
- exports.withKey = withKey;
18
- const withPathname = (0, _reactRedux.connect)(state => ({
17
+ const withPathname = exports.withPathname = (0, _reactRedux.connect)(state => ({
19
18
  pathname: state.router.location?.pathname
20
19
  }));
21
20
 
22
21
  /**
23
22
  */
24
- exports.withPathname = withPathname;
25
- const withLocation = (0, _reactRedux.connect)(state => ({
23
+ const withLocation = exports.withLocation = (0, _reactRedux.connect)(state => ({
26
24
  location: state.router.location
27
25
  }));
28
26
 
29
27
  /**
30
28
  */
31
- exports.withLocation = withLocation;
32
- const withQuerystring = (0, _reactRedux.connect)(state => ({
29
+ const withQuerystring = exports.withQuerystring = (0, _reactRedux.connect)(state => ({
33
30
  querystring: state.router.location?.search
34
31
  }));
35
32
 
36
33
  /**
37
34
  */
38
- exports.withQuerystring = withQuerystring;
39
- const withNavigation = (0, _reactRedux.connect)(null, {
35
+ const withNavigation = exports.withNavigation = (0, _reactRedux.connect)(null, {
40
36
  push: _RouterActions.push,
41
37
  replace: _RouterActions.replace,
42
38
  go: _RouterActions.go,
43
39
  goBack: _RouterActions.goBack,
44
40
  goForward: _RouterActions.goForward
45
41
  });
46
- exports.withNavigation = withNavigation;
47
42
  //# sourceMappingURL=RouterConnectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","connect","state","locationKey","router","location","key","exports","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/RouterConnectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./RouterActions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n }),\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _,\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AA6BA;AACA;AACA,MAAME,OAA2B,GAAG,IAAAC,mBAAO,EACxCC,KAAiB,KAAM;EACtBC,WAAW,EAAED,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEC,GAAG,IAAI;AAC7C,CAAC,CACH,CAAC;;AAED;AACA;AADAC,OAAA,CAAAP,OAAA,GAAAA,OAAA;AAEA,MAAMQ,YAAgC,GAAG,IAAAP,mBAAO,EAO7CC,KAAiB,KAAM;EACxBO,QAAQ,EAAEP,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEI;AACnC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAF,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEA,MAAME,YAAgC,GAAG,IAAAT,mBAAO,EAO7CC,KAAiB,KAAM;EACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAM,CAACC;AACzB,CAAC,CAAC,CAAC;;AAEH;AACA;AADAE,OAAA,CAAAG,YAAA,GAAAA,YAAA;AAEA,MAAMC,eAAmC,GAAG,IAAAV,mBAAO,EAOhDC,KAAiB,KAAM;EACxBU,WAAW,EAAEV,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEQ;AACtC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAN,OAAA,CAAAI,eAAA,GAAAA,eAAA;AAEA,MAAMG,cAAkC,GAAG,IAAAb,mBAAO,EAOhD,IAAI,EAAE;EACNc,IAAI,EAAJA,mBAAI;EACJC,OAAO,EAAPA,sBAAO;EACPC,EAAE,EAAFA,iBAAE;EACFC,MAAM,EAANA,qBAAM;EACNC,SAAS,EAATA;AACF,CAAC,CAAC;AAACZ,OAAA,CAAAO,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","exports","connect","state","locationKey","router","location","key","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/RouterConnectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./RouterActions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n }),\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _,\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AA6BA;AACA;AACA,MAAME,OAA2B,GAAAC,OAAA,CAAAD,OAAA,GAAG,IAAAE,mBAAO,EACxCC,KAAiB,KAAM;EACtBC,WAAW,EAAED,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEC,GAAG,IAAI;AAC7C,CAAC,CACH,CAAC;;AAED;AACA;AACA,MAAMC,YAAgC,GAAAP,OAAA,CAAAO,YAAA,GAAG,IAAAN,mBAAO,EAO7CC,KAAiB,KAAM;EACxBM,QAAQ,EAAEN,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEG;AACnC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,MAAMC,YAAgC,GAAAT,OAAA,CAAAS,YAAA,GAAG,IAAAR,mBAAO,EAO7CC,KAAiB,KAAM;EACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAM,CAACC;AACzB,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,MAAMK,eAAmC,GAAAV,OAAA,CAAAU,eAAA,GAAG,IAAAT,mBAAO,EAOhDC,KAAiB,KAAM;EACxBS,WAAW,EAAET,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEO;AACtC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,MAAMC,cAAkC,GAAAb,OAAA,CAAAa,cAAA,GAAG,IAAAZ,mBAAO,EAOhD,IAAI,EAAE;EACNa,IAAI,EAAJA,mBAAI;EACJC,OAAO,EAAPA,sBAAO;EACPC,EAAE,EAAFA,iBAAE;EACFC,MAAM,EAANA,qBAAM;EACNC,SAAS,EAATA;AACF,CAAC,CAAC"}
@@ -8,8 +8,7 @@ exports.connectApplication = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectApplication = (0, _ModularUIConnector.default)("Application", "/", {
11
+ const connectApplication = exports.connectApplication = (0, _ModularUIConnector.default)("Application", "/", {
12
12
  propName: "application"
13
13
  });
14
- exports.connectApplication = connectApplication;
15
14
  //# sourceMappingURL=Application.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","modularui","propName","exports"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,kBAAsC,GAAG,IAAAC,2BAAS,EAC7D,aAAa,EACb,GAAG,EACH;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAH,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","exports","modularui","propName"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,kBAAsC,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,2BAAS,EAC7D,aAAa,EACb,GAAG,EACH;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
@@ -12,6 +12,5 @@ const mapStateToProps = state => ({
12
12
 
13
13
  /**
14
14
  */
15
- const connectBreadcrumb = (0, _reactRedux.connect)(mapStateToProps);
16
- exports.connectBreadcrumb = connectBreadcrumb;
15
+ const connectBreadcrumb = exports.connectBreadcrumb = (0, _reactRedux.connect)(mapStateToProps);
17
16
  //# sourceMappingURL=Breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","names":["_reactRedux","require","_ModularUISelectors","mapStateToProps","state","items","getActiveModels","connectBreadcrumb","connect","exports"],"sources":["../../../src/redux/connectors/Breadcrumb.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { getActiveModels } from \"../_modularui/ModularUISelectors\";\n\nimport type { ReduxState } from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n items: Array<{ key: string, href: Href, label: string, type: string }>,\n};\ntype Props = { ...StateProps, ... };\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n items: getActiveModels(state),\n});\n\n/**\n */\nexport const connectBreadcrumb: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n _,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAWA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,KAAK,EAAE,IAAAC,mCAAe,EAACF,KAAK;AAC9B,CAAC,CAAC;;AAEF;AACA;AACO,MAAMG,iBAAqC,GAAG,IAAAC,mBAAO,EAO1DL,eAAe,CAAC;AAACM,OAAA,CAAAF,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"Breadcrumb.js","names":["_reactRedux","require","_ModularUISelectors","mapStateToProps","state","items","getActiveModels","connectBreadcrumb","exports","connect"],"sources":["../../../src/redux/connectors/Breadcrumb.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { getActiveModels } from \"../_modularui/ModularUISelectors\";\n\nimport type { ReduxState } from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n items: Array<{ key: string, href: Href, label: string, type: string }>,\n};\ntype Props = { ...StateProps, ... };\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n items: getActiveModels(state),\n});\n\n/**\n */\nexport const connectBreadcrumb: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n _,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAWA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,KAAK,EAAE,IAAAC,mCAAe,EAACF,KAAK;AAC9B,CAAC,CAAC;;AAEF;AACA;AACO,MAAMG,iBAAqC,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,mBAAO,EAO1DN,eAAe,CAAC"}
@@ -8,7 +8,7 @@ exports.connectCaseView = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
11
+ const connectCaseView = exports.connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
12
12
  let {
13
13
  match
14
14
  } = _ref;
@@ -16,5 +16,4 @@ const connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
16
16
  }, {
17
17
  propName: "caseview"
18
18
  });
19
- exports.connectCaseView = connectCaseView;
20
19
  //# sourceMappingURL=CaseView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","modularui","_ref","match","url","propName","exports"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,eAAmC,GAAG,IAAAC,2BAAS,EAC1D,UAAU,EACVC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAN,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","exports","modularui","_ref","match","url","propName"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,eAAmC,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,2BAAS,EAC1D,UAAU,EACVC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
@@ -8,7 +8,7 @@ exports.connectConceptDetail = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _ref => {
11
+ const connectConceptDetail = exports.connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _ref => {
12
12
  let {
13
13
  concept,
14
14
  location
@@ -17,5 +17,4 @@ const connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _
17
17
  }, {
18
18
  propName: "conceptDetail"
19
19
  });
20
- exports.connectConceptDetail = connectConceptDetail;
21
20
  //# sourceMappingURL=ConceptDetail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","modularui","_ref","concept","location","search","propName","exports"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OAAM,aAAYC,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAC9B,CAAC;AAACC,OAAA,CAAAP,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","exports","modularui","_ref","concept","location","search","propName"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OAAM,aAAYC,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAC9B,CAAC"}