@beinformed/ui 1.28.3 → 1.28.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (550) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  3. package/esm/constants/LayoutHints.js.map +1 -1
  4. package/esm/constants/Settings.js.map +1 -1
  5. package/esm/exceptions/ConfigurationException.js.map +1 -1
  6. package/esm/exceptions/FetchException.js.map +1 -1
  7. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  8. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  9. package/esm/exceptions/IllegalStateException.js.map +1 -1
  10. package/esm/exceptions/JsonParseException.js.map +1 -1
  11. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  12. package/esm/exceptions/NetworkException.js.map +1 -1
  13. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  14. package/esm/exceptions/NotFoundException.js.map +1 -1
  15. package/esm/exceptions/ServerRequestException.js.map +1 -1
  16. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  17. package/esm/exceptions/TimeoutException.js.map +1 -1
  18. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  19. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  20. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  21. package/esm/hooks/useAuthentication.js.map +1 -1
  22. package/esm/hooks/useContent.js.map +1 -1
  23. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  24. package/esm/hooks/useForm.js.map +1 -1
  25. package/esm/hooks/useI18n.js.map +1 -1
  26. package/esm/hooks/useModal.js.map +1 -1
  27. package/esm/hooks/useModelCatalog.js.map +1 -1
  28. package/esm/hooks/useModels.js.map +1 -1
  29. package/esm/hooks/useModularUI.js.map +1 -1
  30. package/esm/hooks/useModularUIBasic.js.map +1 -1
  31. package/esm/hooks/useModularUIModel.js.map +1 -1
  32. package/esm/hooks/useModularUIRequest.js.map +1 -1
  33. package/esm/hooks/useNotification.js.map +1 -1
  34. package/esm/hooks/useProgressIndicator.js.map +1 -1
  35. package/esm/hooks/useRouter.js.map +1 -1
  36. package/esm/i18n/Locale.js.map +1 -1
  37. package/esm/i18n/Locales.js.map +1 -1
  38. package/esm/i18n/Message.js.map +1 -1
  39. package/esm/i18n/withMessage.js.map +1 -1
  40. package/esm/models/actions/ActionCollection.js.map +1 -1
  41. package/esm/models/actions/ActionModel.js.map +1 -1
  42. package/esm/models/application/ApplicationModel.js.map +1 -1
  43. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  44. package/esm/models/attributes/AttributeContent.js.map +1 -1
  45. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  46. package/esm/models/attributes/AttributeModel.js.map +1 -1
  47. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  48. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  49. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  50. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  51. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  52. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  53. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  54. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  55. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  56. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  57. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  58. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  59. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  60. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  61. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  62. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  63. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  64. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  65. package/esm/models/attributes/_createAttribute.js.map +1 -1
  66. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  67. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  68. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  69. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  70. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  71. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  72. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  73. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  74. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  75. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  76. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  77. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  78. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  79. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  80. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  81. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  82. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  83. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  84. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  85. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  86. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  87. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  88. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  89. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  90. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  91. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  92. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  93. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  94. package/esm/models/base/BaseCollection.js.map +1 -1
  95. package/esm/models/base/BaseModel.js.map +1 -1
  96. package/esm/models/base/ResourceCollection.js.map +1 -1
  97. package/esm/models/base/ResourceModel.js.map +1 -1
  98. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  99. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  100. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  101. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  102. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  103. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  104. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  105. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  106. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  107. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  108. package/esm/models/content/ContentIndexModel.js.map +1 -1
  109. package/esm/models/content/ContentLinkModel.js.map +1 -1
  110. package/esm/models/content/ContentModel.js.map +1 -1
  111. package/esm/models/content/ContentTOCModel.js.map +1 -1
  112. package/esm/models/content/ContentTypeModel.js.map +1 -1
  113. package/esm/models/content/SectionModel.js.map +1 -1
  114. package/esm/models/content/SubSectionModel.js.map +1 -1
  115. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  116. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  117. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  118. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  119. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  120. package/esm/models/detail/DetailModel.js.map +1 -1
  121. package/esm/models/error/ErrorCollection.js.map +1 -1
  122. package/esm/models/error/ErrorModel.js.map +1 -1
  123. package/esm/models/error/ErrorResponse.js.map +1 -1
  124. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  125. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  126. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  127. package/esm/models/filters/FilterCollection.js.map +1 -1
  128. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  129. package/esm/models/form/FormModel.js.map +1 -1
  130. package/esm/models/form/FormObjectModel.js.map +1 -1
  131. package/esm/models/grouping/GroupingModel.js.map +1 -1
  132. package/esm/models/href/Href.js.map +1 -1
  133. package/esm/models/href/ListHref.js.map +1 -1
  134. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  135. package/esm/models/links/LinkCollection.js.map +1 -1
  136. package/esm/models/links/LinkModel.js.map +1 -1
  137. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  138. package/esm/models/list/ListDetailModel.js.map +1 -1
  139. package/esm/models/list/ListHeaderModel.js.map +1 -1
  140. package/esm/models/list/ListItemCollection.js.map +1 -1
  141. package/esm/models/list/ListItemModel.js.map +1 -1
  142. package/esm/models/list/ListModel.js.map +1 -1
  143. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  144. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  145. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  146. package/esm/models/paging/PagesizeModel.js.map +1 -1
  147. package/esm/models/paging/PagingModel.js.map +1 -1
  148. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  149. package/esm/models/parameter/Parameter.js.map +1 -1
  150. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  151. package/esm/models/resolveModel.js.map +1 -1
  152. package/esm/models/search/CaseSearchModel.js.map +1 -1
  153. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  154. package/esm/models/sorting/SortingModel.js.map +1 -1
  155. package/esm/models/tab/TabModel.js.map +1 -1
  156. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  157. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  158. package/esm/models/user/UserModel.js.map +1 -1
  159. package/esm/models/user/UserProfileModel.js.map +1 -1
  160. package/esm/models/user/UserServicesModel.js.map +1 -1
  161. package/esm/modularui/Authenticate.js.map +1 -1
  162. package/esm/modularui/CaptchaRequest.js.map +1 -1
  163. package/esm/modularui/ModularUIError.js.map +1 -1
  164. package/esm/modularui/ModularUIRequest.js.map +1 -1
  165. package/esm/modularui/ModularUIResponse.js.map +1 -1
  166. package/esm/modularui/UploadRequest.js.map +1 -1
  167. package/esm/react/ErrorBoundary.js.map +1 -1
  168. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  169. package/esm/react/utils.js.map +1 -1
  170. package/esm/react-client/Init.js.map +1 -1
  171. package/esm/react-client/client.js +6 -5
  172. package/esm/react-client/client.js.map +1 -1
  173. package/esm/react-client/contextPath.js.map +1 -1
  174. package/esm/react-client/rehydrate.js.map +1 -1
  175. package/esm/react-server/contextPath.js.map +1 -1
  176. package/esm/react-server/createSSRComplete.js.map +1 -1
  177. package/esm/react-server/htmlpage.js.map +1 -1
  178. package/esm/react-server/renderSSRComplete.js.map +1 -1
  179. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  180. package/esm/react-server/requestInformation.js.map +1 -1
  181. package/esm/react-server/serverNoSSR.js.map +1 -1
  182. package/esm/react-server/serverSSR.js.map +1 -1
  183. package/esm/react-server/serverUtil.js.map +1 -1
  184. package/esm/react-theme/ThemeProvider.js.map +1 -1
  185. package/esm/react-theme/createTheme.js.map +1 -1
  186. package/esm/react-theme/useTheme.js.map +1 -1
  187. package/esm/react-theme/utils/background.js.map +1 -1
  188. package/esm/react-theme/utils/colors.js.map +1 -1
  189. package/esm/react-theme/utils/contrast.js.map +1 -1
  190. package/esm/react-theme/utils/corners.js.map +1 -1
  191. package/esm/react-theme/utils/spacers.js.map +1 -1
  192. package/esm/react-theme/utils/themeProps.js.map +1 -1
  193. package/esm/redux/_i18n/I18nActions.js.map +1 -1
  194. package/esm/redux/_i18n/I18nReducer.js.map +1 -1
  195. package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
  196. package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
  197. package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  198. package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
  199. package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
  200. package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
  201. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  202. package/esm/redux/_router/RouterActions.js.map +1 -1
  203. package/esm/redux/_router/RouterReducer.js.map +1 -1
  204. package/esm/redux/actions/Application.js.map +1 -1
  205. package/esm/redux/actions/Error.js.map +1 -1
  206. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  207. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  208. package/esm/redux/actions/FormAutosave.js.map +1 -1
  209. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  210. package/esm/redux/actions/FormValidations.js.map +1 -1
  211. package/esm/redux/actions/Notification.js.map +1 -1
  212. package/esm/redux/actions/Preferences.js.map +1 -1
  213. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  214. package/esm/redux/actions/SignIn.js.map +1 -1
  215. package/esm/redux/actions/SignOut.js.map +1 -1
  216. package/esm/redux/connectors/CaseView.js.map +1 -1
  217. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  218. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  219. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  220. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  221. package/esm/redux/connectors/Form.js.map +1 -1
  222. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  223. package/esm/redux/connectors/ListDetail.js.map +1 -1
  224. package/esm/redux/connectors/Modal.js.map +1 -1
  225. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  226. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  227. package/esm/redux/connectors/Preferences.js.map +1 -1
  228. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  229. package/esm/redux/connectors/Tab.js.map +1 -1
  230. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  231. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  232. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  233. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  234. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  235. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  236. package/esm/redux/reducers/createReducer.js.map +1 -1
  237. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  238. package/esm/redux/store/configureStore.js.map +1 -1
  239. package/esm/utils/browser/Cache.js.map +1 -1
  240. package/esm/utils/browser/Cookies.js.map +1 -1
  241. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  242. package/esm/utils/fetch/serverFetch.js.map +1 -1
  243. package/esm/utils/fetch/universalFetch.js.map +1 -1
  244. package/esm/utils/fetch/xhr.js.map +1 -1
  245. package/esm/utils/helpers/checkResource.js.map +1 -1
  246. package/esm/utils/helpers/createUUID.js.map +1 -1
  247. package/esm/utils/helpers/objects.js.map +1 -1
  248. package/esm/utils/helpers/repositoryResource.js.map +1 -1
  249. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  250. package/esm/utils/number/DecimalFormat.js.map +1 -1
  251. package/esm/utils/number/formatValue.js.map +1 -1
  252. package/esm/utils/number/parseNumbers.js.map +1 -1
  253. package/lib/builder/index.js.map +1 -1
  254. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  255. package/lib/constants/Constants.js.map +1 -1
  256. package/lib/constants/LayoutHintConfig.js.map +1 -1
  257. package/lib/constants/LayoutHints.js.map +1 -1
  258. package/lib/constants/Settings.js.map +1 -1
  259. package/lib/constants/index.js.map +1 -1
  260. package/lib/exceptions/ConfigurationException.js.map +1 -1
  261. package/lib/exceptions/FetchException.js.map +1 -1
  262. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  263. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  264. package/lib/exceptions/IllegalStateException.js.map +1 -1
  265. package/lib/exceptions/JsonParseException.js.map +1 -1
  266. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  267. package/lib/exceptions/NetworkException.js.map +1 -1
  268. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  269. package/lib/exceptions/NotFoundException.js.map +1 -1
  270. package/lib/exceptions/ServerRequestException.js.map +1 -1
  271. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  272. package/lib/exceptions/TimeoutException.js.map +1 -1
  273. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  274. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  275. package/lib/exceptions/index.js.map +1 -1
  276. package/lib/hooks/index.js.map +1 -1
  277. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  278. package/lib/hooks/useAuthentication.js.map +1 -1
  279. package/lib/hooks/useContent.js.map +1 -1
  280. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  281. package/lib/hooks/useForm.js.map +1 -1
  282. package/lib/hooks/useI18n.js.map +1 -1
  283. package/lib/hooks/useModal.js.map +1 -1
  284. package/lib/hooks/useModelCatalog.js.map +1 -1
  285. package/lib/hooks/useModels.js.map +1 -1
  286. package/lib/hooks/useModularUI.js.map +1 -1
  287. package/lib/hooks/useModularUIBasic.js.map +1 -1
  288. package/lib/hooks/useModularUIModel.js.map +1 -1
  289. package/lib/hooks/useModularUIRequest.js.map +1 -1
  290. package/lib/hooks/useNotification.js.map +1 -1
  291. package/lib/hooks/usePreference.js.map +1 -1
  292. package/lib/hooks/useProgressIndicator.js.map +1 -1
  293. package/lib/hooks/useRouter.js.map +1 -1
  294. package/lib/i18n/Locale.js.map +1 -1
  295. package/lib/i18n/Locales.js.map +1 -1
  296. package/lib/i18n/Message.js.map +1 -1
  297. package/lib/i18n/index.js.map +1 -1
  298. package/lib/i18n/languages.js.map +1 -1
  299. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  300. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  301. package/lib/i18n/withMessage.js.map +1 -1
  302. package/lib/index.js.map +1 -1
  303. package/lib/models/actions/ActionCollection.js.map +1 -1
  304. package/lib/models/actions/ActionModel.js.map +1 -1
  305. package/lib/models/application/ApplicationModel.js.map +1 -1
  306. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  307. package/lib/models/attributes/AttributeContent.js.map +1 -1
  308. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  309. package/lib/models/attributes/AttributeModel.js.map +1 -1
  310. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  311. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  312. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  313. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  314. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  315. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  316. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  317. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  318. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  319. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  320. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  321. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  322. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  323. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  324. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  325. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  326. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  327. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  328. package/lib/models/attributes/_createAttribute.js.map +1 -1
  329. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  330. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  331. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  332. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  333. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  334. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  335. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  336. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  337. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  338. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  339. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  340. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  341. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  342. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  343. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  344. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  345. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  346. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  347. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  348. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  349. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  350. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  351. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  352. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  353. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  354. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  355. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  356. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  357. package/lib/models/base/BaseCollection.js.map +1 -1
  358. package/lib/models/base/BaseModel.js.map +1 -1
  359. package/lib/models/base/ResourceCollection.js.map +1 -1
  360. package/lib/models/base/ResourceModel.js.map +1 -1
  361. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  362. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  363. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  364. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  365. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  366. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  367. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  368. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  369. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  370. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  371. package/lib/models/content/ContentIndexModel.js.map +1 -1
  372. package/lib/models/content/ContentLinkModel.js.map +1 -1
  373. package/lib/models/content/ContentModel.js.map +1 -1
  374. package/lib/models/content/ContentTOCModel.js.map +1 -1
  375. package/lib/models/content/ContentTypeModel.js.map +1 -1
  376. package/lib/models/content/SectionModel.js.map +1 -1
  377. package/lib/models/content/SubSectionModel.js.map +1 -1
  378. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  379. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  380. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  381. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  382. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  383. package/lib/models/detail/DetailModel.js.map +1 -1
  384. package/lib/models/error/ErrorCollection.js.map +1 -1
  385. package/lib/models/error/ErrorModel.js.map +1 -1
  386. package/lib/models/error/ErrorResponse.js.map +1 -1
  387. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  388. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  389. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  390. package/lib/models/filters/FilterCollection.js.map +1 -1
  391. package/lib/models/filters/FilterModel.js.map +1 -1
  392. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  393. package/lib/models/form/FormModel.js.map +1 -1
  394. package/lib/models/form/FormObjectModel.js.map +1 -1
  395. package/lib/models/grouping/GroupingModel.js.map +1 -1
  396. package/lib/models/href/Href.js.map +1 -1
  397. package/lib/models/href/ListHref.js.map +1 -1
  398. package/lib/models/index.js.map +1 -1
  399. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  400. package/lib/models/links/LinkCollection.js.map +1 -1
  401. package/lib/models/links/LinkModel.js.map +1 -1
  402. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  403. package/lib/models/list/ListDetailModel.js.map +1 -1
  404. package/lib/models/list/ListHeaderModel.js.map +1 -1
  405. package/lib/models/list/ListItemCollection.js.map +1 -1
  406. package/lib/models/list/ListItemModel.js.map +1 -1
  407. package/lib/models/list/ListModel.js.map +1 -1
  408. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  409. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  410. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  411. package/lib/models/paging/PagesizeModel.js.map +1 -1
  412. package/lib/models/paging/PagingModel.js.map +1 -1
  413. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  414. package/lib/models/parameter/Parameter.js.map +1 -1
  415. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  416. package/lib/models/resolveModel.js.map +1 -1
  417. package/lib/models/search/CaseSearchModel.js.map +1 -1
  418. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  419. package/lib/models/sorting/SortingModel.js.map +1 -1
  420. package/lib/models/tab/TabModel.js.map +1 -1
  421. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  422. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  423. package/lib/models/user/UserModel.js.map +1 -1
  424. package/lib/models/user/UserProfileModel.js.map +1 -1
  425. package/lib/models/user/UserServicesModel.js.map +1 -1
  426. package/lib/modularui/Authenticate.js.map +1 -1
  427. package/lib/modularui/CaptchaRequest.js.map +1 -1
  428. package/lib/modularui/ModularUIError.js.map +1 -1
  429. package/lib/modularui/ModularUIRequest.js.map +1 -1
  430. package/lib/modularui/ModularUIResponse.js.map +1 -1
  431. package/lib/modularui/UploadRequest.js.map +1 -1
  432. package/lib/modularui/index.js.map +1 -1
  433. package/lib/react/ErrorBoundary.js.map +1 -1
  434. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  435. package/lib/react/index.js.map +1 -1
  436. package/lib/react/utils.js.map +1 -1
  437. package/lib/react-client/Init.js.map +1 -1
  438. package/lib/react-client/client.js +6 -5
  439. package/lib/react-client/client.js.flow +14 -7
  440. package/lib/react-client/client.js.map +1 -1
  441. package/lib/react-client/contextPath.js.map +1 -1
  442. package/lib/react-client/index.js.map +1 -1
  443. package/lib/react-client/rehydrate.js.map +1 -1
  444. package/lib/react-server/contextPath.js.map +1 -1
  445. package/lib/react-server/createSSRComplete.js.map +1 -1
  446. package/lib/react-server/htmlpage.js.map +1 -1
  447. package/lib/react-server/index.js.map +1 -1
  448. package/lib/react-server/renderSSRComplete.js.map +1 -1
  449. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  450. package/lib/react-server/requestInformation.js.map +1 -1
  451. package/lib/react-server/serverNoSSR.js.map +1 -1
  452. package/lib/react-server/serverSSR.js.map +1 -1
  453. package/lib/react-server/serverUtil.js.map +1 -1
  454. package/lib/react-theme/ThemeProvider.js.map +1 -1
  455. package/lib/react-theme/createTheme.js.map +1 -1
  456. package/lib/react-theme/index.js.map +1 -1
  457. package/lib/react-theme/useTheme.js.map +1 -1
  458. package/lib/react-theme/utils/background.js.map +1 -1
  459. package/lib/react-theme/utils/colors.js.map +1 -1
  460. package/lib/react-theme/utils/contrast.js.map +1 -1
  461. package/lib/react-theme/utils/corners.js.map +1 -1
  462. package/lib/react-theme/utils/spacers.js.map +1 -1
  463. package/lib/react-theme/utils/themeProps.js.map +1 -1
  464. package/lib/redux/_i18n/I18nActions.js.map +1 -1
  465. package/lib/redux/_i18n/I18nReducer.js.map +1 -1
  466. package/lib/redux/_i18n/index.js.map +1 -1
  467. package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
  468. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  469. package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
  470. package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
  471. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  472. package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
  473. package/lib/redux/_modularui/index.js.map +1 -1
  474. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  475. package/lib/redux/_router/RouterActions.js.map +1 -1
  476. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  477. package/lib/redux/_router/RouterMiddleware.js.map +1 -1
  478. package/lib/redux/_router/RouterReducer.js.map +1 -1
  479. package/lib/redux/_router/index.js.map +1 -1
  480. package/lib/redux/actions/Application.js.map +1 -1
  481. package/lib/redux/actions/Authorization.js.map +1 -1
  482. package/lib/redux/actions/Error.js.map +1 -1
  483. package/lib/redux/actions/Form.js.map +1 -1
  484. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  485. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  486. package/lib/redux/actions/FormAutosave.js.map +1 -1
  487. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  488. package/lib/redux/actions/FormValidations.js.map +1 -1
  489. package/lib/redux/actions/Modals.js.map +1 -1
  490. package/lib/redux/actions/Notification.js.map +1 -1
  491. package/lib/redux/actions/Preferences.js.map +1 -1
  492. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  493. package/lib/redux/actions/SignIn.js.map +1 -1
  494. package/lib/redux/actions/SignOut.js.map +1 -1
  495. package/lib/redux/actions/index.js.map +1 -1
  496. package/lib/redux/connectors/Application.js.map +1 -1
  497. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  498. package/lib/redux/connectors/CaseView.js.map +1 -1
  499. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  500. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  501. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  502. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  503. package/lib/redux/connectors/Form.js.map +1 -1
  504. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  505. package/lib/redux/connectors/ListDetail.js.map +1 -1
  506. package/lib/redux/connectors/Modal.js.map +1 -1
  507. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  508. package/lib/redux/connectors/Notification.js.map +1 -1
  509. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  510. package/lib/redux/connectors/Preferences.js.map +1 -1
  511. package/lib/redux/connectors/Progress.js.map +1 -1
  512. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  513. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  514. package/lib/redux/connectors/SignIn.js.map +1 -1
  515. package/lib/redux/connectors/SignOut.js.map +1 -1
  516. package/lib/redux/connectors/Tab.js.map +1 -1
  517. package/lib/redux/connectors/index.js.map +1 -1
  518. package/lib/redux/index.js.map +1 -1
  519. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  520. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  521. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  522. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  523. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  524. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  525. package/lib/redux/reducers/createReducer.js.map +1 -1
  526. package/lib/redux/reducers/index.js.map +1 -1
  527. package/lib/redux/selectors/i18n.js.map +1 -1
  528. package/lib/redux/selectors/index.js.map +1 -1
  529. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  530. package/lib/redux/store/configureStore.js.map +1 -1
  531. package/lib/utils/browser/Cache.js.map +1 -1
  532. package/lib/utils/browser/Cookies.js.map +1 -1
  533. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  534. package/lib/utils/fetch/serverFetch.js.map +1 -1
  535. package/lib/utils/fetch/universalFetch.js.map +1 -1
  536. package/lib/utils/fetch/xhr.js.map +1 -1
  537. package/lib/utils/helpers/checkResource.js.map +1 -1
  538. package/lib/utils/helpers/createHash.js.map +1 -1
  539. package/lib/utils/helpers/createUUID.js.map +1 -1
  540. package/lib/utils/helpers/index.js.map +1 -1
  541. package/lib/utils/helpers/objects.js.map +1 -1
  542. package/lib/utils/helpers/repositoryResource.js.map +1 -1
  543. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  544. package/lib/utils/helpers/text.js.map +1 -1
  545. package/lib/utils/index.js.map +1 -1
  546. package/lib/utils/number/DecimalFormat.js.map +1 -1
  547. package/lib/utils/number/formatValue.js.map +1 -1
  548. package/lib/utils/number/parseNumbers.js.map +1 -1
  549. package/package.json +5 -5
  550. package/src/react-client/client.js +14 -7
@@ -1 +1 @@
1
- {"version":3,"file":"createSSRComplete.js","names":["MODULARUI_STATUS","noLoading","state","modularui","key","status","LOADING","length","loadingCounter","createSSRComplete","store","render","loadingCount","getState","html","resolve","reject","unsubscribe","subscribe","previousCount","error"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore, ReduxState } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length;\n\n/**\n */\nconst createSSRComplete = (\n store: ReduxStore,\n render: Function\n): Promise<string> => {\n let loadingCount = loadingCounter(store.getState());\n let html = \"<div>Nothing to render</div>\";\n\n return new Promise((resolve, reject) => {\n const unsubscribe = store.subscribe(() => {\n const previousCount = loadingCount;\n loadingCount = loadingCounter(store.getState());\n\n if (previousCount !== loadingCount && noLoading(store.getState())) {\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n }\n });\n\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n });\n};\n\nexport default createSSRComplete;\n"],"mappings":";;;AACA,SAASA,gBAAgB,QAAQ,wBAAwB;AAIzD;AACA;AACA,MAAMC,SAAS,GAAIC,KAAiB;EAAA;EAAA,OAClC,gDAAYA,KAAK,CAACC,SAAS,CAAC,iBACzBC,GAAG,IAAKF,KAAK,CAACC,SAAS,CAACC,GAAG,CAAC,CAACC,MAAM,KAAKL,gBAAgB,CAACM,OAAO,CAClE,CAACC,MAAM,KAAK,CAAC;AAAA;;AAEhB;AACA;AACA,MAAMC,cAAc,GAAIN,KAAiB;EAAA;EAAA,OACvC,iDAAYA,KAAK,CAACC,SAAS,CAAC,kBACzBC,GAAG,IAAKF,KAAK,CAACC,SAAS,CAACC,GAAG,CAAC,CAACC,MAAM,KAAKL,gBAAgB,CAACM,OAAO,CAClE,CAACC,MAAM;AAAA;;AAEV;AACA;AACA,MAAME,iBAAiB,GAAG,CACxBC,KAAiB,EACjBC,MAAgB,KACI;EACpB,IAAIC,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAQ,EAAE,CAAC;EACnD,IAAIC,IAAI,GAAG,8BAA8B;EAEzC,OAAO,aAAY,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtC,MAAMC,WAAW,GAAGP,KAAK,CAACQ,SAAS,CAAC,MAAM;MACxC,MAAMC,aAAa,GAAGP,YAAY;MAClCA,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAQ,EAAE,CAAC;MAE/C,IAAIM,aAAa,KAAKP,YAAY,IAAIX,SAAS,CAACS,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;QACjE,IAAI;UACFC,IAAI,GAAGH,MAAM,EAAE;QACjB,CAAC,CAAC,OAAOS,KAAK,EAAE;UACdJ,MAAM,CAACI,KAAK,CAAC;UACb;QACF;QAEA,IAAInB,SAAS,CAACS,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;UAC/BI,WAAW,EAAE;UACbF,OAAO,CAACD,IAAI,CAAC;QACf;MACF;IACF,CAAC,CAAC;IAEF,IAAI;MACFA,IAAI,GAAGH,MAAM,EAAE;IACjB,CAAC,CAAC,OAAOS,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb;IACF;IAEA,IAAInB,SAAS,CAACS,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;MAC/BI,WAAW,EAAE;MACbF,OAAO,CAACD,IAAI,CAAC;IACf;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeL,iBAAiB"}
1
+ {"version":3,"file":"createSSRComplete.js","names":["MODULARUI_STATUS","noLoading","state","_context","_filterInstanceProperty","_Object$keys","modularui","call","key","status","LOADING","length","loadingCounter","_context2","createSSRComplete","store","render","loadingCount","getState","html","_Promise","resolve","reject","unsubscribe","subscribe","previousCount","error"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore, ReduxState } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length;\n\n/**\n */\nconst createSSRComplete = (\n store: ReduxStore,\n render: Function\n): Promise<string> => {\n let loadingCount = loadingCounter(store.getState());\n let html = \"<div>Nothing to render</div>\";\n\n return new Promise((resolve, reject) => {\n const unsubscribe = store.subscribe(() => {\n const previousCount = loadingCount;\n loadingCount = loadingCounter(store.getState());\n\n if (previousCount !== loadingCount && noLoading(store.getState())) {\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n }\n });\n\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n });\n};\n\nexport default createSSRComplete;\n"],"mappings":";;;AACA,SAASA,gBAAgB,QAAQ,wBAAwB;AAIzD;AACA;AACA,MAAMC,SAAS,GAAIC,KAAiB;EAAA,IAAAC,QAAA;EAAA,OAClCC,uBAAA,CAAAD,QAAA,GAAAE,YAAA,CAAYH,KAAK,CAACI,SAAS,CAAC,EAAAC,IAAA,CAAAJ,QAAA,EACzBK,GAAG,IAAKN,KAAK,CAACI,SAAS,CAACE,GAAG,CAAC,CAACC,MAAM,KAAKT,gBAAgB,CAACU,OAAO,CAClE,CAACC,MAAM,KAAK,CAAC;AAAA;;AAEhB;AACA;AACA,MAAMC,cAAc,GAAIV,KAAiB;EAAA,IAAAW,SAAA;EAAA,OACvCT,uBAAA,CAAAS,SAAA,GAAAR,YAAA,CAAYH,KAAK,CAACI,SAAS,CAAC,EAAAC,IAAA,CAAAM,SAAA,EACzBL,GAAG,IAAKN,KAAK,CAACI,SAAS,CAACE,GAAG,CAAC,CAACC,MAAM,KAAKT,gBAAgB,CAACU,OAAO,CAClE,CAACC,MAAM;AAAA;;AAEV;AACA;AACA,MAAMG,iBAAiB,GAAGA,CACxBC,KAAiB,EACjBC,MAAgB,KACI;EACpB,IAAIC,YAAY,GAAGL,cAAc,CAACG,KAAK,CAACG,QAAQ,EAAE,CAAC;EACnD,IAAIC,IAAI,GAAG,8BAA8B;EAEzC,OAAO,IAAAC,QAAA,CAAY,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtC,MAAMC,WAAW,GAAGR,KAAK,CAACS,SAAS,CAAC,MAAM;MACxC,MAAMC,aAAa,GAAGR,YAAY;MAClCA,YAAY,GAAGL,cAAc,CAACG,KAAK,CAACG,QAAQ,EAAE,CAAC;MAE/C,IAAIO,aAAa,KAAKR,YAAY,IAAIhB,SAAS,CAACc,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;QACjE,IAAI;UACFC,IAAI,GAAGH,MAAM,EAAE;QACjB,CAAC,CAAC,OAAOU,KAAK,EAAE;UACdJ,MAAM,CAACI,KAAK,CAAC;UACb;QACF;QAEA,IAAIzB,SAAS,CAACc,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;UAC/BK,WAAW,EAAE;UACbF,OAAO,CAACF,IAAI,CAAC;QACf;MACF;IACF,CAAC,CAAC;IAEF,IAAI;MACFA,IAAI,GAAGH,MAAM,EAAE;IACjB,CAAC,CAAC,OAAOU,KAAK,EAAE;MACdJ,MAAM,CAACI,KAAK,CAAC;MACb;IACF;IAEA,IAAIzB,SAAS,CAACc,KAAK,CAACG,QAAQ,EAAE,CAAC,EAAE;MAC/BK,WAAW,EAAE;MACbF,OAAO,CAACF,IAAI,CAAC;IACf;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeL,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"htmlpage.js","names":["IllegalArgumentException","htmlpage","props","contextPath","undefined","html","head","template","htmlAttributes","toString","key","join","UUID","state","replace"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = (props: TemplateProps): string => {\n if (props?.contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;AACA,SAASA,wBAAwB,QAAQ,eAAe;AAUxD;AACA;AACA,MAAMC,QAAQ,GAAIC,KAAoB,IAAa;EAAA;EACjD,IAAIA,KAAK,EAAEC,WAAW,KAAKC,SAAS,EAAE;IACpC,MAAM,IAAIJ,wBAAwB,CAAC,8BAA8B,CAAC;EACpE;EACA,IAAIE,KAAK,CAACG,IAAI,KAAKD,SAAS,EAAE;IAC5B,MAAM,IAAIJ,wBAAwB,CAAC,yBAAyB,CAAC;EAC/D;EAEA,MAAM;IAAEM,IAAI,GAAG,CAAC;EAAE,CAAC,GAAGJ,KAAK;EAE3B,MAAMK,QAAQ,GAAI;AACpB;AACA,UAAUD,IAAI,CAACE,cAAc,GAAGF,IAAI,CAACE,cAAc,CAACC,QAAQ,EAAE,GAAG,EAAG;AACpE;AACA;AACA,QAAQ,iFAAYH,IAAI,CAAC,kBACRI,GAAG,IAAKA,GAAG,KAAK,gBAAgB,CAAC,iBACpCA,GAAG,IAAKJ,IAAI,CAACI,GAAG,CAAC,CAACD,QAAQ,EAAE,CAAC,CAClCE,IAAI,CAAC,EAAE,CAAE;AAClB;AACA;AACA;AACA,8BAA8BT,KAAK,CAACG,IAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BH,KAAK,CAACU,IAAI,IAAI,EAAG,KAAIV,KAAK,CAACW,KAAK,IAAI,EAAG;AACjE;AACA;AACA;AACA,CAAC;;EAEC;EACA;EACA;EACA,OAAO,kCAAAN,QAAQ,CAACO,OAAO,CAAC,iBAAiB,EAAEZ,KAAK,CAACC,WAAW,CAAC,iBAAO;AACtE,CAAC;AAED,eAAeF,QAAQ"}
1
+ {"version":3,"file":"htmlpage.js","names":["IllegalArgumentException","htmlpage","props","_context","_context2","_context3","contextPath","undefined","html","head","template","htmlAttributes","toString","_mapInstanceProperty","_filterInstanceProperty","_Object$keys","call","key","join","UUID","state","_trimInstanceProperty","replace"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = (props: TemplateProps): string => {\n if (props?.contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;AACA,SAASA,wBAAwB,QAAQ,eAAe;AAUxD;AACA;AACA,MAAMC,QAAQ,GAAIC,KAAoB,IAAa;EAAA,IAAAC,QAAA,EAAAC,SAAA,EAAAC,SAAA;EACjD,IAAIH,KAAK,EAAEI,WAAW,KAAKC,SAAS,EAAE;IACpC,MAAM,IAAIP,wBAAwB,CAAC,8BAA8B,CAAC;EACpE;EACA,IAAIE,KAAK,CAACM,IAAI,KAAKD,SAAS,EAAE;IAC5B,MAAM,IAAIP,wBAAwB,CAAC,yBAAyB,CAAC;EAC/D;EAEA,MAAM;IAAES,IAAI,GAAG,CAAC;EAAE,CAAC,GAAGP,KAAK;EAE3B,MAAMQ,QAAQ,GAAI;AACpB;AACA,UAAUD,IAAI,CAACE,cAAc,GAAGF,IAAI,CAACE,cAAc,CAACC,QAAQ,EAAE,GAAG,EAAG;AACpE;AACA;AACA,QAAQC,oBAAA,CAAAV,QAAA,GAAAW,uBAAA,CAAAV,SAAA,GAAAW,YAAA,CAAYN,IAAI,CAAC,EAAAO,IAAA,CAAAZ,SAAA,EACRa,GAAG,IAAKA,GAAG,KAAK,gBAAgB,CAAC,EAAAD,IAAA,CAAAb,QAAA,EACpCc,GAAG,IAAKR,IAAI,CAACQ,GAAG,CAAC,CAACL,QAAQ,EAAE,CAAC,CAClCM,IAAI,CAAC,EAAE,CAAE;AAClB;AACA;AACA;AACA,8BAA8BhB,KAAK,CAACM,IAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0BN,KAAK,CAACiB,IAAI,IAAI,EAAG,KAAIjB,KAAK,CAACkB,KAAK,IAAI,EAAG;AACjE;AACA;AACA;AACA,CAAC;;EAEC;EACA;EACA;EACA,OAAOC,qBAAA,CAAAhB,SAAA,GAAAK,QAAQ,CAACY,OAAO,CAAC,iBAAiB,EAAEpB,KAAK,CAACI,WAAW,CAAC,EAAAU,IAAA,CAAAX,SAAA,CAAO;AACtE,CAAC;AAED,eAAeJ,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderSSRComplete.js","names":["renderToString","Provider","StaticRouter","Router","HelmetProvider","ServerStyleSheet","StyleSheetManager","createSSRComplete","htmlpage","getBasePath","ThemeProvider","ErrorBoundary","createHead","handleErrors","dehydrate","renderSSRComplete","store","theme","UUID","requestHref","render","ErrorPage","template","helmetContext","helmet","routerContext","sheet","location","toLocation","basePath","instance","then","appHTML","head","contextPath","html","state","catch","error","message","fileName","lineNumber","stack"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme,\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = { helmet: {} };\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n const basePath = getBasePath();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>\n )\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n })\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,kBAAkB;AACjD,SAASC,QAAQ,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UACF;QACK;MACD;IACH;EACE,EACX,CACZ,CACF,CACEW,IAAI,CAAEC,OAAO,IAAK;IACjBnB,YAAY,CAACG,KAAK,CAAC;IACnB,MAAMiB,IAAI,GAAGrB,UAAU,CAACc,KAAK,EAAER,IAAI,EAAEK,aAAa,CAAC;IACnD,OAAOD,QAAQ,CAAC;MACdY,WAAW,EAAEL,QAAQ;MACrBM,IAAI,EAAEH,OAAO;MACbC,IAAI;MACJG,KAAK,EAAEtB,SAAS,CAACE,KAAK,CAAC;MACvBE;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,CACDmB,KAAK,CAAEC,KAAK,IACXhB,QAAQ,CAAC;IACPY,WAAW,EAAEL,QAAQ;IACrBM,IAAI,EAAEnC,cAAc,eAClB,KAAC,iBAAiB;MAAC,KAAK,EAAE0B,KAAK,CAACI,QAAS;MAAA,uBACvC,KAAC,aAAa;QAAC,KAAK,EAAEb,KAAM;QAAA,uBAC1B,KAAC,SAAS;UACR,YAAY,EAAEqB,KAAK,CAACC,OAAQ;UAC5B,aAAa,EAAED,KAAK,CAACE,QAAS;UAC9B,SAAS,EAAEF,KAAK,CAACG,UAAW;UAC5B,UAAU,EAAEH,KAAK,CAACI;QAAM;MACxB;IACY,EACE,CACrB;IACDT,IAAI,EAAEV,aAAa,CAACC,MAAM;IAC1BY,KAAK,EAAE,EAAE;IACTlB;EACF,CAAC,CAAC,CACH;AACL,CAAC;AAED,eAAeH,iBAAiB"}
1
+ {"version":3,"file":"renderSSRComplete.js","names":["renderToString","Provider","StaticRouter","Router","HelmetProvider","ServerStyleSheet","StyleSheetManager","createSSRComplete","htmlpage","getBasePath","ThemeProvider","ErrorBoundary","createHead","handleErrors","dehydrate","jsx","_jsx","renderSSRComplete","_ref","store","theme","UUID","requestHref","render","ErrorPage","template","helmetContext","helmet","routerContext","sheet","location","toLocation","basePath","children","instance","context","basename","then","appHTML","head","contextPath","html","state","catch","error","errorMessage","message","errorResource","fileName","errorLine","lineNumber","errorStack","stack"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { getBasePath } from \"../constants/Settings\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme,\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = { helmet: {} };\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n const basePath = getBasePath();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>\n )\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n })\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":"AACA,SAASA,cAAc,QAAQ,kBAAkB;AACjD,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,YAAY,IAAIC,MAAM,QAAQ,cAAc;AAErD,SAASC,cAAc,QAAQ,oBAAoB;AAEnD,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,mBAAmB;AAEvE,OAAOC,iBAAiB,MAAM,qBAAqB;AACnD,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,WAAW,QAAQ,uBAAuB;AAEnD,OAAOC,aAAa,MAAM,8BAA8B;AACxD,OAAOC,aAAa,MAAM,wBAAwB;AAElD,SAASC,UAAU,EAAEC,YAAY,EAAEC,SAAS,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiBnE;AACA;AACA,MAAMC,iBAAiB,GAAGC,IAAA,IAQI;EAAA,IARH;IACzBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,WAAW;IACXC,MAAM;IACNC,SAAS;IACTC,QAAQ,GAAGjB;EACN,CAAC,GAAAU,IAAA;EACN,MAAMQ,aAAa,GAAG;IAAEC,MAAM,EAAE,CAAC;EAAE,CAAC;EACpC,MAAMC,aAAa,GAAG,CAAC,CAAC;EAExB,MAAMC,KAAK,GAAG,IAAIxB,gBAAgB,EAAE;;EAEpC;EACA;EACA,MAAMyB,QAAkB,GAAGR,WAAW,CAACS,UAAU,EAAE;EAEnD,MAAMC,QAAQ,GAAGvB,WAAW,EAAE;EAE9B,OAAOF,iBAAiB,CAACY,KAAK,EAAE,MAC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C,UAAU,EAAEP,KAAK,CAACQ;QAAM;MACxB;IACY,EACE,CACrB;IACDb,IAAI,EAAEb,aAAa,CAACC,MAAM;IAC1Be,KAAK,EAAE,EAAE;IACTrB;EACF,CAAC,CAAC,CACH;AACL,CAAC;AAED,eAAeJ,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderSSRMinimal.js","names":["renderToString","Provider","ServerStyleSheet","StyleSheetManager","ThemeProvider","getBasePath","createHead","dehydrate","htmlpage","renderSSRMinimal","store","theme","UUID","render","template","sheet","appHTML","instance","head","contextPath","html","state"],"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,SAASA,cAAc,QAAQ,kBAAkB;AAEjD,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,mBAAmB;AACvE,OAAOC,aAAa,MAAM,8BAA8B;AAExD,SAASC,WAAW,QAAQ,uBAAuB;AAEnD,SAASC,UAAU,EAAEC,SAAS,QAAQ,cAAc;AACpD,OAAOC,QAAQ,MAAM,YAAY;AAAC;AAalC;AACA;AACA,MAAMC,gBAAgB,GAAG,QAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGN;EACN,CAAC;EACN,MAAMO,KAAK,GAAG,IAAIb,gBAAgB,EAAE;EAEpC,MAAMc,OAAO,GAAGhB,cAAc,eAC5B,KAAC,QAAQ;IAAC,KAAK,EAAEU,KAAM;IAAA,uBACrB,KAAC,iBAAiB;MAAC,KAAK,EAAEK,KAAK,CAACE,QAAS;MAAA,uBACvC,KAAC,aAAa;QAAC,KAAK,EAAEN,KAAM;QAAA,UAAEE,MAAM;MAAE;IAAiB;EACrC,EACX,CACZ;EAED,MAAMK,IAAI,GAAGZ,UAAU,CAACS,KAAK,EAAEH,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdK,WAAW,EAAEd,WAAW,EAAE;IAC1Be,IAAI,EAAEJ,OAAO;IACbE,IAAI;IACJG,KAAK,EAAEd,SAAS,CAACG,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeH,gBAAgB"}
1
+ {"version":3,"file":"renderSSRMinimal.js","names":["renderToString","Provider","ServerStyleSheet","StyleSheetManager","ThemeProvider","getBasePath","createHead","dehydrate","htmlpage","jsx","_jsx","renderSSRMinimal","_ref","store","theme","UUID","render","template","sheet","appHTML","children","instance","head","contextPath","html","state"],"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,SAASA,cAAc,QAAQ,kBAAkB;AAEjD,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,mBAAmB;AACvE,OAAOC,aAAa,MAAM,8BAA8B;AAExD,SAASC,WAAW,QAAQ,uBAAuB;AAEnD,SAASC,UAAU,EAAEC,SAAS,QAAQ,cAAc;AACpD,OAAOC,QAAQ,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAalC;AACA;AACA,MAAMC,gBAAgB,GAAGC,IAAA,IAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGT;EACN,CAAC,GAAAI,IAAA;EACN,MAAMM,KAAK,GAAG,IAAIhB,gBAAgB,EAAE;EAEpC,MAAMiB,OAAO,GAAGnB,cAAc,eAC5BU,IAAA,CAACT,QAAQ;IAACY,KAAK,EAAEA,KAAM;IAAAO,QAAA,eACrBV,IAAA,CAACP,iBAAiB;MAACe,KAAK,EAAEA,KAAK,CAACG,QAAS;MAAAD,QAAA,eACvCV,IAAA,CAACN,aAAa;QAACU,KAAK,EAAEA,KAAM;QAAAM,QAAA,EAAEJ,MAAM;MAAE;IAAiB;EACrC,EACX,CACZ;EAED,MAAMM,IAAI,GAAGhB,UAAU,CAACY,KAAK,EAAEH,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdM,WAAW,EAAElB,WAAW,EAAE;IAC1BmB,IAAI,EAAEL,OAAO;IACbG,IAAI;IACJG,KAAK,EAAElB,SAAS,CAACM,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeJ,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"requestInformation.js","names":["Href","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n const pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n if (queryString) {\n return `${pathInfo}?${queryString}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":"AACA,OAAOA,IAAI,MAAM,qBAAqB;AAItC;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAIC,OAA+B,IAAa;EAC5E,MAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAW,EAAE,IAAI,GAAG;EAC7C,MAAMC,WAAW,GAAGH,OAAO,CAACI,cAAc,EAAE;EAE5C,IAAID,WAAW,EAAE;IACf,OAAQ,GAAEF,QAAS,IAAGE,WAAY,EAAC;EACrC;EAEA,OAAOF,QAAQ;AACjB,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,kBAAkB,GAAIL,OAA+B,IAChE,IAAIF,IAAI,CAACC,iBAAiB,CAACC,OAAO,CAAC,CAAC;;AAEtC;AACA;AACA,OAAO,MAAMM,oBAAoB,GAAG,CAClCN,OAA+B,EAC/BO,UAAkB,KACA;EAClB,OAAOP,OAAO,CAACQ,eAAe,CAACD,UAAU,CAAC;AAC5C,CAAC;;AAED;AACA;AACA,OAAO,MAAME,kBAAkB,GAAG,CAChCT,OAA+B,EAC/BU,OAAgB,KACE;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACN,OAAO,EAAE,QAAQ,CAAC;EAClE,MAAMY,oBAAoB,GACxBD,kBAAkB,IAAIX,OAAO,CAACa,SAAS,CAAC,iBAAiB,CAAC;;EAE5D;EACA,IAAID,oBAAoB,KAAK,IAAI,EAAE;IACjC,OAAOF,OAAO,CAACI,oBAAoB,CAAC,CAAC,CAAC;EACxC;EAEA,OAAOJ,OAAO,CAACD,kBAAkB,CAACG,oBAAoB,CAAC;AACzD,CAAC"}
1
+ {"version":3,"file":"requestInformation.js","names":["Href","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n const pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n if (queryString) {\n return `${pathInfo}?${queryString}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":"AACA,OAAOA,IAAI,MAAM,qBAAqB;AAItC;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAIC,OAA+B,IAAa;EAC5E,MAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAW,EAAE,IAAI,GAAG;EAC7C,MAAMC,WAAW,GAAGH,OAAO,CAACI,cAAc,EAAE;EAE5C,IAAID,WAAW,EAAE;IACf,OAAQ,GAAEF,QAAS,IAAGE,WAAY,EAAC;EACrC;EAEA,OAAOF,QAAQ;AACjB,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,kBAAkB,GAAIL,OAA+B,IAChE,IAAIF,IAAI,CAACC,iBAAiB,CAACC,OAAO,CAAC,CAAC;;AAEtC;AACA;AACA,OAAO,MAAMM,oBAAoB,GAAGA,CAClCN,OAA+B,EAC/BO,UAAkB,KACA;EAClB,OAAOP,OAAO,CAACQ,eAAe,CAACD,UAAU,CAAC;AAC5C,CAAC;;AAED;AACA;AACA,OAAO,MAAME,kBAAkB,GAAGA,CAChCT,OAA+B,EAC/BU,OAAgB,KACE;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACN,OAAO,EAAE,QAAQ,CAAC;EAClE,MAAMY,oBAAoB,GACxBD,kBAAkB,IAAIX,OAAO,CAACa,SAAS,CAAC,iBAAiB,CAAC;;EAE5D;EACA,IAAID,oBAAoB,KAAK,IAAI,EAAE;IACjC,OAAOF,OAAO,CAACI,oBAAoB,CAAC,CAAC,CAAC;EACxC;EAEA,OAAOJ,OAAO,CAACD,kBAAkB,CAACG,oBAAoB,CAAC;AACzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setApplication","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,cAAc,EACdC,oBAAoB,EACpBC,qBAAqB,EACrBC,YAAY,QACP,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,WAAW,MAAM,4BAA4B;AAoBpD;AACA;AACA,MAAMC,WAAW,GAAG,QAUO;EAAA,IAVN;IACnBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,iBAAiB;IACjBC,kBAAkB,GAAG;EACV,CAAC;EACZ,MAAMC,IAAI,GAAGrB,UAAU,EAAE;EACzBsB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGtB,kBAAkB,CAACW,OAAO,CAAC;EAE/C,MAAMY,KAAK,GAAGtB,gBAAgB,CAACqB,WAAW,EAAET,cAAc,CAAC;EAE3DT,oBAAoB,CAACmB,KAAK,EAAET,iBAAiB,CAAC;EAC9CT,qBAAqB,CAACkB,KAAK,CAAC;EAE5B,IAAIR,KAAK,EAAE;IACT,MAAMS,WAAW,GAAGD,KAAK,CAACE,QAAQ,EAAE,EAAEC,WAAW,EAAEX,KAAK;IACxD;IACAN,WAAW,CAACe,WAAW,EAAET,KAAK,CAAC;EACjC;EAEAb,OAAO,CAACqB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtBhB,cAAc,CAACoB,KAAK,CAAC;EACvB;EAEAjB,YAAY,CAACiB,KAAK,CAAC;EAEnBhB,uBAAuB,CAACW,iBAAiB,EAAE;IAAEK,KAAK;IAAEZ;EAAQ,CAAC,CAAC;EAE9D,OAAOH,gBAAgB,CAAC;IAAEe,KAAK;IAAER,KAAK;IAAEK,IAAI;IAAEJ,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAED,eAAeP,WAAW"}
1
+ {"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setApplication","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","_ref","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\n\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n preloadApplication?: boolean,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n if (preloadApplication) {\n setApplication(store);\n }\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,cAAc,EACdC,oBAAoB,EACpBC,qBAAqB,EACrBC,YAAY,QACP,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,WAAW,MAAM,4BAA4B;AAoBpD;AACA;AACA,MAAMC,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,GAAGtB,UAAU,EAAE;EACzBuB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGvB,kBAAkB,CAACY,OAAO,CAAC;EAE/C,MAAMY,KAAK,GAAGvB,gBAAgB,CAACsB,WAAW,EAAET,cAAc,CAAC;EAE3DV,oBAAoB,CAACoB,KAAK,EAAET,iBAAiB,CAAC;EAC9CV,qBAAqB,CAACmB,KAAK,CAAC;EAE5B,IAAIR,KAAK,EAAE;IACT,MAAMS,WAAW,GAAGD,KAAK,CAACE,QAAQ,EAAE,EAAEC,WAAW,EAAEX,KAAK;IACxD;IACAP,WAAW,CAACgB,WAAW,EAAET,KAAK,CAAC;EACjC;EAEAd,OAAO,CAACsB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhC,IAAIQ,kBAAkB,EAAE;IACtBjB,cAAc,CAACqB,KAAK,CAAC;EACvB;EAEAlB,YAAY,CAACkB,KAAK,CAAC;EAEnBjB,uBAAuB,CAACY,iBAAiB,EAAE;IAAEK,KAAK;IAAEZ;EAAQ,CAAC,CAAC;EAE9D,OAAOJ,gBAAgB,CAAC;IAAEgB,KAAK;IAAER,KAAK;IAAEK,IAAI;IAAEJ,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAED,eAAeR,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"serverSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleBeforeRenderHooks","renderSSRComplete","serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,iBAAiB,MAAM,qBAAqB;AAkBnD;AACA;AACA,MAAMC,SAAS,GAAG,QAUkB;EAAA,IAVjB;IACjBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK,GAAG,IAAI;IACZC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGlB,UAAU,EAAE;EACzBmB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGnB,kBAAkB,CAACQ,OAAO,CAAC;EAC/C,MAAMY,KAAK,GAAGnB,gBAAgB,CAACkB,WAAW,EAAET,cAAc,CAAC;EAE3DP,oBAAoB,CAACiB,KAAK,EAAET,iBAAiB,CAAC;EAC9CP,qBAAqB,CAACgB,KAAK,CAAC;EAC5BlB,OAAO,CAACkB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhCH,uBAAuB,CAACW,iBAAiB,EAAE;IAAER,OAAO;IAAEY;EAAM,CAAC,CAAC;EAE9D,OAAOd,iBAAiB,CAAC;IACvBc,KAAK;IACLR,KAAK;IACLK,IAAI;IACJE,WAAW;IACXN,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeR,SAAS"}
1
+ {"version":3,"file":"serverSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleBeforeRenderHooks","renderSSRComplete","serverSSR","_ref","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,iBAAiB,MAAM,qBAAqB;AAkBnD;AACA;AACA,MAAMC,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,GAAGnB,UAAU,EAAE;EACzBoB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGpB,kBAAkB,CAACS,OAAO,CAAC;EAC/C,MAAMY,KAAK,GAAGpB,gBAAgB,CAACmB,WAAW,EAAET,cAAc,CAAC;EAE3DR,oBAAoB,CAACkB,KAAK,EAAET,iBAAiB,CAAC;EAC9CR,qBAAqB,CAACiB,KAAK,CAAC;EAC5BnB,OAAO,CAACmB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhCJ,uBAAuB,CAACY,iBAAiB,EAAE;IAAER,OAAO;IAAEY;EAAM,CAAC,CAAC;EAE9D,OAAOf,iBAAiB,CAAC;IACvBe,KAAK;IACLR,KAAK;IACLK,IAAI;IACJE,WAAW;IACXN,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeT,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"serverUtil.js","names":["createMemoryHistory","has","deepmerge","configureStore","availableLocales","Locales","getPreferredLocale","setLocales","setServerPreference","setThemePreference","setPreference","setAllContentInDataSetting","setLoginPreferences","getSetting","IllegalArgumentException","initModels","getLocale","ModularUIRequest","createReduxStore","requestHref","customReducers","initialState","history","initialEntries","toString","store","setI18n","locales","request","Array","isArray","mergedLocales","locale","code","customLocale","custLocale","forEach","some","push","enabledLocales","localesInstance","preferredLocale","dispatch","setServerPreferencesFromArray","serverPreferences","serverPreference","name","defaultValue","type","setServerPreferences","preferencesProvider","isStudioContext","setConfigurationTheme","configTheme","configFileLocation","getLayoutConfigFileLocation","configFilePath","dataFetcher","fetch","Error","setApplication","getState","application","fetchSync","connectKey","key","model","e","console","info","handleErrors","state","error","shouldThrowOnServer","dehydrate","modularui","status","lastModification","undefined","filteredState","replace","createHead","sheet","UUID","helmetContext","style","getStyleTags","meta","helmet"],"sources":["../../src/react-server/serverUtil.js"],"sourcesContent":["// @flow\nimport { createMemoryHistory } from \"history\";\nimport { has } from \"../utils/helpers/objects\";\nimport deepmerge from \"deepmerge\";\n\nimport configureStore from \"../redux/store/configureStore\";\n\nimport { availableLocales } from \"../i18n/Locales\";\nimport Locales from \"../i18n/Locales\";\n\nimport { getPreferredLocale } from \"./requestInformation\";\nimport { setLocales } from \"../redux/_i18n/I18nActions\";\n\nimport {\n setServerPreference,\n setThemePreference,\n setPreference,\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport { IllegalArgumentException } from \"../exceptions\";\n\nimport { initModels } from \"../redux\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { ReduxState, ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { RouterHistory } from \"react-router\";\n\nexport type PreferenceValue = {\n name: string,\n defaultValue?: string | null,\n type?: string,\n};\n\n/**\n */\nconst createReduxStore = (\n requestHref: Href,\n customReducers: Object,\n initialState?: $Shape<ReduxState>\n): ReduxStore => {\n // $FlowExpectedError\n const history: RouterHistory = createMemoryHistory({\n initialEntries: [requestHref.toString()],\n });\n\n const { store } = configureStore(history, customReducers, initialState);\n\n return store;\n};\n\n/**\n */\nconst setI18n = (\n store: ReduxStore,\n locales: Array<LocaleConfiguration> = [],\n request: HttpServletRequestJava\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getSetting(\"ENABLED_LOCALES\").includes(locale.code)\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n\nconst setServerPreferencesFromArray = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>\n) => {\n serverPreferences.forEach((serverPreference) => {\n if (typeof serverPreference === \"object\") {\n const { name, defaultValue, type } = serverPreference;\n store.dispatch(setServerPreference(name, defaultValue, type));\n } else {\n store.dispatch(setServerPreference(serverPreference, null));\n }\n });\n};\n\n/**\n * Server preferences can be suplied by an array of preference names,\n * or an array of objects which has the name, an optional default value and an optional type.<br>\n * When the type is set to string, a comma separated value is not converted to an array:\n *\n * @example\n * // value becomes an array [default1, default2]\n * { name: \"prefName\", defaultValue: \"default1, default2\" }\n * // value remains a string \"default1, default2\"\n * { name: \"prefName\", defaultValue: \"default1, default2\", type: \"string\" }\n *\n * @param store\n * @param serverPreferences\n */\nconst setServerPreferences = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>\n) => {\n if (Array.isArray(serverPreferences)) {\n setServerPreferencesFromArray(store, serverPreferences);\n }\n\n store.dispatch(setAllContentInDataSetting());\n store.dispatch(setLoginPreferences());\n\n if (\n preferencesProvider &&\n preferencesProvider.isStudioContext &&\n preferencesProvider.isStudioContext()\n ) {\n store.dispatch(setPreference(\"isStudioContext\", true));\n }\n};\n\n/**\n */\nconst setConfigurationTheme = (store: ReduxStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`\n );\n }\n }\n};\n\n/**\n */\nconst setApplication = (store: ReduxStore) => {\n try {\n const locale = getLocale(store.getState());\n const application = new ModularUIRequest(\"/\", {\n locale: locale,\n }).fetchSync();\n\n application.connectKey = `application(/)(${locale})`;\n\n store.dispatch(\n initModels([\n {\n key: `application(/)(${locale})`,\n model: application,\n },\n ])\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.info(\"Could not load webapplication on server\");\n }\n};\n\n/**\n */\nconst handleErrors = (store: ReduxStore) => {\n const state = store.getState();\n\n if (\n state.error &&\n (state.error.shouldThrowOnServer ||\n !has(state.error, \"shouldThrowOnServer\"))\n ) {\n throw state.error;\n }\n};\n\n/**\n */\nconst dehydrate = (store: ReduxStore): string => {\n const state = store.getState();\n\n const modularui: {\n [key: string]: { status: string, lastModification: number, model: ?Object },\n } = {};\n\n for (const key in state.modularui) {\n const { status, model, lastModification } = state.modularui[key];\n\n if (model) {\n modularui[key] = {\n status,\n lastModification,\n model: model.dehydrate(),\n };\n } else {\n modularui[key] = {\n status,\n lastModification,\n model: undefined,\n };\n }\n }\n\n const filteredState = {\n ...state,\n modularui,\n };\n\n return JSON.stringify(filteredState).replace(/</g, \"\\\\u003c\");\n};\n\n/**\n */\nconst createHead = (\n sheet: any,\n UUID: string,\n helmetContext?: Object\n): Object => {\n const style = sheet.getStyleTags();\n const meta = helmetContext ? [...helmetContext.helmet.meta] : [];\n\n if (helmetContext) {\n return {\n ...helmetContext.helmet,\n style,\n meta,\n };\n }\n\n return {\n style,\n meta,\n };\n};\n\nexport {\n createReduxStore,\n setI18n,\n setApplication,\n setServerPreferences,\n setConfigurationTheme,\n createHead,\n handleErrors,\n dehydrate,\n};\n"],"mappings":";;;;;;AACA,SAASA,mBAAmB,QAAQ,SAAS;AAC7C,SAASC,GAAG,QAAQ,0BAA0B;AAC9C,OAAOC,SAAS,MAAM,WAAW;AAEjC,OAAOC,cAAc,MAAM,+BAA+B;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AC,MAAM;MACLC,SAAS,CAACV,GAAG,CAAC,GAAG;QACfW,MAAM;QACNC,gBAAgB;QAChBX,KAAK,EAAEY;MACT,CAAC;IACH;EACF;EAEA,MAAMC,aAAa,GAAG;IACpB,GAAGR,KAAK;IACRI;EACF,CAAC;EAED,OAAO,gBAAeI,aAAa,CAAC,CAACC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;AAC/D,CAAC;;AAED;AACA;AACA,MAAMC,UAAU,GAAG,CACjBC,KAAU,EACVC,IAAY,EACZC,aAAsB,KACX;EACX,MAAMC,KAAK,GAAGH,KAAK,CAACI,YAAY,EAAE;EAClC,MAAMC,IAAI,GAAGH,aAAa,GAAG,CAAC,GAAGA,aAAa,CAACI,MAAM,CAACD,IAAI,CAAC,GAAG,EAAE;EAEhE,IAAIH,aAAa,EAAE;IACjB,OAAO;MACL,GAAGA,aAAa,CAACI,MAAM;MACvBH,KAAK;MACLE;IACF,CAAC;EACH;EAEA,OAAO;IACLF,KAAK;IACLE;EACF,CAAC;AACH,CAAC;AAED,SACErE,gBAAgB,EAChBQ,OAAO,EACPkC,cAAc,EACdX,oBAAoB,EACpBG,qBAAqB,EACrB6B,UAAU,EACVX,YAAY,EACZI,SAAS"}
1
+ {"version":3,"file":"serverUtil.js","names":["createMemoryHistory","has","deepmerge","configureStore","availableLocales","Locales","getPreferredLocale","setLocales","setServerPreference","setThemePreference","setPreference","setAllContentInDataSetting","setLoginPreferences","getSetting","IllegalArgumentException","initModels","getLocale","ModularUIRequest","createReduxStore","requestHref","customReducers","initialState","history","initialEntries","toString","store","setI18n","locales","arguments","length","undefined","request","Array","isArray","mergedLocales","_mapInstanceProperty","call","locale","code","customLocale","_findInstanceProperty","custLocale","forEach","some","push","enabledLocales","_filterInstanceProperty","_context","_includesInstanceProperty","localesInstance","preferredLocale","dispatch","setServerPreferencesFromArray","serverPreferences","serverPreference","name","defaultValue","type","setServerPreferences","preferencesProvider","isStudioContext","setConfigurationTheme","configTheme","configFileLocation","getLayoutConfigFileLocation","configFilePath","_startsWithInstanceProperty","dataFetcher","fetch","Error","setApplication","getState","application","fetchSync","connectKey","key","model","e","console","info","handleErrors","state","error","shouldThrowOnServer","dehydrate","modularui","status","lastModification","filteredState","_JSON$stringify","replace","createHead","sheet","UUID","helmetContext","style","getStyleTags","meta","helmet"],"sources":["../../src/react-server/serverUtil.js"],"sourcesContent":["// @flow\nimport { createMemoryHistory } from \"history\";\nimport { has } from \"../utils/helpers/objects\";\nimport deepmerge from \"deepmerge\";\n\nimport configureStore from \"../redux/store/configureStore\";\n\nimport { availableLocales } from \"../i18n/Locales\";\nimport Locales from \"../i18n/Locales\";\n\nimport { getPreferredLocale } from \"./requestInformation\";\nimport { setLocales } from \"../redux/_i18n/I18nActions\";\n\nimport {\n setServerPreference,\n setThemePreference,\n setPreference,\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport { IllegalArgumentException } from \"../exceptions\";\n\nimport { initModels } from \"../redux\";\nimport { getLocale } from \"../redux/selectors/i18n\";\n\nimport ModularUIRequest from \"../modularui/ModularUIRequest\";\n\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { ReduxState, ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { RouterHistory } from \"react-router\";\n\nexport type PreferenceValue = {\n name: string,\n defaultValue?: string | null,\n type?: string,\n};\n\n/**\n */\nconst createReduxStore = (\n requestHref: Href,\n customReducers: Object,\n initialState?: $Shape<ReduxState>\n): ReduxStore => {\n // $FlowExpectedError\n const history: RouterHistory = createMemoryHistory({\n initialEntries: [requestHref.toString()],\n });\n\n const { store } = configureStore(history, customReducers, initialState);\n\n return store;\n};\n\n/**\n */\nconst setI18n = (\n store: ReduxStore,\n locales: Array<LocaleConfiguration> = [],\n request: HttpServletRequestJava\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getSetting(\"ENABLED_LOCALES\").includes(locale.code)\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n\nconst setServerPreferencesFromArray = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>\n) => {\n serverPreferences.forEach((serverPreference) => {\n if (typeof serverPreference === \"object\") {\n const { name, defaultValue, type } = serverPreference;\n store.dispatch(setServerPreference(name, defaultValue, type));\n } else {\n store.dispatch(setServerPreference(serverPreference, null));\n }\n });\n};\n\n/**\n * Server preferences can be suplied by an array of preference names,\n * or an array of objects which has the name, an optional default value and an optional type.<br>\n * When the type is set to string, a comma separated value is not converted to an array:\n *\n * @example\n * // value becomes an array [default1, default2]\n * { name: \"prefName\", defaultValue: \"default1, default2\" }\n * // value remains a string \"default1, default2\"\n * { name: \"prefName\", defaultValue: \"default1, default2\", type: \"string\" }\n *\n * @param store\n * @param serverPreferences\n */\nconst setServerPreferences = (\n store: ReduxStore,\n serverPreferences: Array<string | PreferenceValue>\n) => {\n if (Array.isArray(serverPreferences)) {\n setServerPreferencesFromArray(store, serverPreferences);\n }\n\n store.dispatch(setAllContentInDataSetting());\n store.dispatch(setLoginPreferences());\n\n if (\n preferencesProvider &&\n preferencesProvider.isStudioContext &&\n preferencesProvider.isStudioContext()\n ) {\n store.dispatch(setPreference(\"isStudioContext\", true));\n }\n};\n\n/**\n */\nconst setConfigurationTheme = (store: ReduxStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`\n );\n }\n }\n};\n\n/**\n */\nconst setApplication = (store: ReduxStore) => {\n try {\n const locale = getLocale(store.getState());\n const application = new ModularUIRequest(\"/\", {\n locale: locale,\n }).fetchSync();\n\n application.connectKey = `application(/)(${locale})`;\n\n store.dispatch(\n initModels([\n {\n key: `application(/)(${locale})`,\n model: application,\n },\n ])\n );\n } catch (e) {\n // eslint-disable-next-line no-console\n console.info(\"Could not load webapplication on server\");\n }\n};\n\n/**\n */\nconst handleErrors = (store: ReduxStore) => {\n const state = store.getState();\n\n if (\n state.error &&\n (state.error.shouldThrowOnServer ||\n !has(state.error, \"shouldThrowOnServer\"))\n ) {\n throw state.error;\n }\n};\n\n/**\n */\nconst dehydrate = (store: ReduxStore): string => {\n const state = store.getState();\n\n const modularui: {\n [key: string]: { status: string, lastModification: number, model: ?Object },\n } = {};\n\n for (const key in state.modularui) {\n const { status, model, lastModification } = state.modularui[key];\n\n if (model) {\n modularui[key] = {\n status,\n lastModification,\n model: model.dehydrate(),\n };\n } else {\n modularui[key] = {\n status,\n lastModification,\n model: undefined,\n };\n }\n }\n\n const filteredState = {\n ...state,\n modularui,\n };\n\n return JSON.stringify(filteredState).replace(/</g, \"\\\\u003c\");\n};\n\n/**\n */\nconst createHead = (\n sheet: any,\n UUID: string,\n helmetContext?: Object\n): Object => {\n const style = sheet.getStyleTags();\n const meta = helmetContext ? [...helmetContext.helmet.meta] : [];\n\n if (helmetContext) {\n return {\n ...helmetContext.helmet,\n style,\n meta,\n };\n }\n\n return {\n style,\n meta,\n };\n};\n\nexport {\n createReduxStore,\n setI18n,\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BAAoB,EACpBG,qBAAqB,EACrB8B,UAAU,EACVX,YAAY,EACZI,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"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,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,IAAIC,eAAe,QAAQ,mBAAmB;AAEpE,OAAOC,WAAW,MAAM,eAAe;AAAC;AAUxC;AACA;AACA,MAAMF,aAAa,GAAG,QAAsC;EAAA,IAArC;IAAEG,KAAK;IAAEC;EAAgB,CAAC;EAC/C,MAAMC,WAAW,GAAGN,WAAW,CAAC;IAAA,IAAC;MAAEO;IAAY,CAAC;IAAA,OAAKA,WAAW,CAACH,KAAK;EAAA,EAAC;EACvE,MAAMI,UAAU,GAAGL,WAAW,CAACG,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAO,KAAC,eAAe;IAAC,KAAK,EAAEI,UAAW;IAAA,UAAEH;EAAQ,EAAmB;AACzE,CAAC;AACDJ,aAAa,CAACQ,WAAW,GAAG,kBAAkB;AAE9C,eAAeR,aAAa"}
1
+ {"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","jsx","_jsx","_ref","theme","children","storedTheme","_ref2","preferences","finalTheme","displayName"],"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,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,IAAIC,eAAe,QAAQ,mBAAmB;AAEpE,OAAOC,WAAW,MAAM,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUxC;AACA;AACA,MAAMJ,aAAa,GAAGK,IAAA,IAAsC;EAAA,IAArC;IAAEC,KAAK;IAAEC;EAAgB,CAAC,GAAAF,IAAA;EAC/C,MAAMG,WAAW,GAAGT,WAAW,CAACU,KAAA;IAAA,IAAC;MAAEC;IAAY,CAAC,GAAAD,KAAA;IAAA,OAAKC,WAAW,CAACJ,KAAK;EAAA,EAAC;EACvE,MAAMK,UAAU,GAAGT,WAAW,CAACM,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAOF,IAAA,CAACH,eAAe;IAACK,KAAK,EAAEK,UAAW;IAAAJ,QAAA,EAAEA;EAAQ,EAAmB;AACzE,CAAC;AACDP,aAAa,CAACY,WAAW,GAAG,kBAAkB;AAE9C,eAAeZ,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"createTheme.js","names":["flattenDeep","isPlainObject","setSettings","replacePlaceholders","inputTheme","possibleKeys","key","join","re","RegExp","forEach","value","replace","match","capture","generateTheme","storedTheme","generatedTheme","settings","themeElements","element","createTheme","themeConfigs","customTheme"],"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,OAAOA,WAAW,MAAM,oBAAoB;AAE5C,SAASC,aAAa,QAAQ,0BAA0B;AAExD,SAASC,WAAW,QAAQ,uBAAuB;AAInD,MAAMC,mBAAmB,GAAIC,UAAiB,IAAK;EAAA;EACjD,MAAMC,YAAY,GAAG,6CAAYD,UAAU,CAAC,iBACpCE,GAAG,IAAM,MAAKA,GAAI,KAAI,CAAC,CAC5BC,IAAI,CAAC,GAAG,CAAC;EAEZ,MAAMC,EAAE,GAAG,IAAIC,MAAM,CAAE,OAAMJ,YAAa,GAAE,EAAE,GAAG,CAAC;EAClD,gBAAeD,UAAU,CAAC,CAACM,OAAO,CAAC,QAAkB;IAAA,IAAjB,CAACJ,GAAG,EAAEK,KAAK,CAAC;IAC9C,IAAIL,GAAG,KAAK,UAAU,IAAI,OAAOK,KAAK,KAAK,QAAQ,E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
1
+ {"version":3,"file":"createTheme.js","names":["flattenDeep","isPlainObject","setSettings","replacePlaceholders","inputTheme","_context","possibleKeys","_mapInstanceProperty","_Object$keys","call","key","join","re","RegExp","_Object$entries","forEach","_ref","value","replace","match","capture","generateTheme","storedTheme","generatedTheme","settings","_len","arguments","length","themeElements","Array","_key","element","createTheme","_len2","themeConfigs","_key2","customTheme"],"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,OAAOA,WAAW,MAAM,oBAAoB;AAE5C,SAASC,aAAa,QAAQ,0BAA0B;AAExD,SAASC,WAAW,QAAQ,uBAAuB;AAInD,MAAMC,mBAAmB,GAAIC,UAAiB,IAAK;EAAA,IAAAC,QAAA;EACjD,MAAMC,YAAY,GAAGC,oBAAA,CAAAF,QAAA,GAAAG,YAAA,CAAYJ,UAAU,CAAC,EAAAK,IAAA,CAAAJ,QAAA,EACpCK,GAAG,IAAM,MAAKA,GAAI,KAAI,CAAC,CAC5BC,IA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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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMS,WAAW,GAAG,SAAAA,CAClBV,WAAkB,EAUX;EAAA,SAAAW,KAAA,GAAAP,SAAA,CAAAC,MAAA,EATJO,YAAY,OAAAL,KAAA,CAAAI,KAAA,OAAAA,KAAA,WAAAE,KAAA,MAAAA,KAAA,GAAAF,KAAA,EAAAE,KAAA;IAAZD,YAAY,CAAAC,KAAA,QAAAT,SAAA,CAAAS,KAAA;EAAA;EAUf,MAAMC,WAAW,GAAGf,aAAa,CAACC,WAAW,EAAE,GAAGtB,WAAW,CAACkC,YAAY,CAAC,CAAC;EAE5E,IAAIE,WAAW,EAAE;IACflC,WAAW,CAACkC,WAAW,CAACZ,QAAQ,CAAC;EACnC;EAEA,OAAOY,WAAW;AACpB,CAAC;AAED,eAAeJ,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTheme.js","names":["useContext","ThemeContext","useTheme"],"sources":["../../src/react-theme/useTheme.js"],"sourcesContent":["// @flow\nimport { useContext } from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\n/**\n */\nconst useTheme = (): Theme => {\n return useContext(ThemeContext);\n};\n\nexport { useTheme };\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,YAAY,QAAQ,mBAAmB;AAIhD;AACA;AACA,MAAMC,QAAQ,GAAG,MAAa;EAC5B,OAAOF,UAAU,CAACC,YAAY,CAAC;AACjC,CAAC;AAED,SAASC,QAAQ"}
1
+ {"version":3,"file":"useTheme.js","names":["useContext","ThemeContext","useTheme"],"sources":["../../src/react-theme/useTheme.js"],"sourcesContent":["// @flow\nimport { useContext } from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\n/**\n */\nconst useTheme = (): Theme => {\n return useContext(ThemeContext);\n};\n\nexport { useTheme };\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,YAAY,QAAQ,mBAAmB;AAIhD;AACA;AACA,MAAMC,QAAQ,GAAGA,CAAA,KAAa;EAC5B,OAAOF,UAAU,CAACC,YAAY,CAAC;AACjC,CAAC;AAED,SAASC,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"background.js","names":["getThemeProp","renderBackground","path","defaultValue","theme","value"],"sources":["../../../src/react-theme/utils/background.js"],"sourcesContent":["// @flow\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n */\nconst renderBackground =\n (path: string, defaultValue?: string): ((UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA,MAAMC,gBAAgB,GACpB,CAACC,IAAY,EAAEC,YAAqB,KACpC,QAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC;EACxB,MAAMC,KAAK,GAAGL,YAAY,CAACI,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC;EAErD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAQ,eAAcA,KAAM,EAAC;EAC/B;EAEA,OAAOA,KAAK;AACd,CAAC;AAEH,SAASJ,gBAAgB"}
1
+ {"version":3,"file":"background.js","names":["getThemeProp","renderBackground","path","defaultValue","_ref","theme","value"],"sources":["../../../src/react-theme/utils/background.js"],"sourcesContent":["// @flow\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n */\nconst renderBackground =\n (path: string, defaultValue?: string): ((UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA,MAAMC,gBAAgB,GACpBA,CAACC,IAAY,EAAEC,YAAqB,KACpCC,IAAA,IAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EACxB,MAAME,KAAK,GAAGN,YAAY,CAACK,KAAK,EAAEH,IAAI,EAAEC,YAAY,CAAC;EAErD,IAAI,OAAOG,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAQ,eAAcA,KAAM,EAAC;EAC/B;EAEA,OAAOA,KAAK;AACd,CAAC;AAEH,SAASL,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"colors.js","names":["darken","hsl","lighten","parseToHsl","getThemeProp","darkenColor","amount","path","defaultValue","theme","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","hue"],"sources":["../../../src/react-theme/utils/colors.js"],"sourcesContent":["// @flow\nimport { darken, hsl, lighten, parseToHsl } from \"polished\";\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\n/**\n */\nconst darkenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Themed color x amount lightened\n */\n/**\n */\nconst lightenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Make a color lighter or darker in the same color family\n */\n/**\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment: number = 0\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n"],"mappings":"AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,UAAU,QAAQ,UAAU;AAC3D,SAASC,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GACf,CACEC,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBT,MAAM,CAACM,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE3D;AACA;AACA;AACA;AACA;AACA,MAAME,YAAY,GAChB,CACEJ,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBP,OAAO,CAACI,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE5D;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAG,UAChBC,KAAa,EACbC,UAAmB,EACnBC,SAAkB;EAAA,IAClBC,aAAqB,uEAAG,CAAC;EAAA,OACdd,GAAG,CAACE,UAAU,CAACS,KAAK,CAAC,CAACI,GAAG,GAAGD,aAAa,EAAEF,UAAU,EAAEC,SAAS,CAAC;AAAA;AAE9E,SAAST,WAAW,EAAEK,YAAY,EAAEC,SAAS"}
1
+ {"version":3,"file":"colors.js","names":["darken","hsl","lighten","parseToHsl","getThemeProp","darkenColor","amount","path","defaultValue","_ref","theme","lightenColor","_ref2","changeHSL","color","saturation","lightness","hueAdjustment","arguments","length","undefined","hue"],"sources":["../../../src/react-theme/utils/colors.js"],"sourcesContent":["// @flow\nimport { darken, hsl, lighten, parseToHsl } from \"polished\";\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\n/**\n */\nconst darkenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Themed color x amount lightened\n */\n/**\n */\nconst lightenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Make a color lighter or darker in the same color family\n */\n/**\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment: number = 0\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n"],"mappings":"AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,UAAU,QAAQ,UAAU;AAC3D,SAASC,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GACfA,CACEC,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvBC,IAAA;EAAA,IAAC;IAAEC;EAAsB,CAAC,GAAAD,IAAA;EAAA,OACxBT,MAAM,CAACM,MAAM,EAAEF,YAAY,CAACM,KAAK,EAAEH,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE3D;AACA;AACA;AACA;AACA;AACA,MAAMG,YAAY,GAChBA,CACEL,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvBI,KAAA;EAAA,IAAC;IAAEF;EAAsB,CAAC,GAAAE,KAAA;EAAA,OACxBV,OAAO,CAACI,MAAM,EAAEF,YAAY,CAACM,KAAK,EAAEH,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE5D;AACA;AACA;AACA;AACA;AACA,MAAMK,SAAS,GAAG,SAAAA,CAChBC,KAAa,EACbC,UAAmB,EACnBC,SAAkB;EAAA,IAClBC,aAAqB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAAA,OACdjB,GAAG,CAACE,UAAU,CAACW,KAAK,CAAC,CAACO,GAAG,GAAGJ,aAAa,EAAEF,UAAU,EAAEC,SAAS,CAAC;AAAA;AAE9E,SAASX,WAAW,EAAEM,YAAY,EAAEE,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"contrast.js","names":["getLuminance","parseToRgb","getThemeStringProp","getProp","ThemePropertyException","getColorContrast","color1","color2","luminance1","luminance2","parseFloat","toFixed","getYIQ","color","rgb","red","green","blue","getContrastYIQ","dark","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty","settings"],"sources":["../../../src/react-theme/utils/contrast.js"],"sourcesContent":["// @flow\nimport { getLuminance, parseToRgb } from \"polished\";\n\nimport { getThemeStringProp, getProp } from \"./themeProps\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string): number => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2)\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\n/**\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: string,\n dark: string = \"#212529\",\n light: string = \"#fff\",\n preferredColor?: string\n): string => {\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\n/**\n */\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string\n) => {\n let bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (typeof bgColor === \"object\") {\n bgColor = bgColor?.backgroundColor ?? defaultValue;\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n throw new ThemePropertyException(\n `${bgColorProperty} is not a string, but: ${typeof bgColor}`\n );\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty: string,\n preferredColorProperty?: string,\n standardDarkProperty: string = \"YIQ_DARK_COLOR\",\n standardLightProperty: string = \"YIQ_LIGHT_COLOR\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\"\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,QAAQ,UAAU;AAEnD,SAASC,kBAAkB,EAAEC,OAAO,QAAQ,cAAc;AAE1D,SAASC,sBAAsB,QAAQ,kBAAkB;A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E,OAAOhB,cAAc,CAACW,OAAO,EAAEN,SAAS,EAAEC,UAAU,EAAEH,cAAc,CAAC;EACvE,CAAC;AAAA;AAEH,SAAShB,gBAAgB,EAAEO,MAAM,EAAEM,cAAc,EAAEa,mBAAmB"}
1
+ {"version":3,"file":"contrast.js","names":["getLuminance","parseToRgb","getThemeStringProp","getProp","ThemePropertyException","getColorContrast","color1","color2","luminance1","luminance2","parseFloat","toFixed","getYIQ","color","rgb","red","green","blue","getContrastYIQ","dark","arguments","length","undefined","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty","_ref","settings"],"sources":["../../../src/react-theme/utils/contrast.js"],"sourcesContent":["// @flow\nimport { getLuminance, parseToRgb } from \"polished\";\n\nimport { getThemeStringProp, getProp } from \"./themeProps\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string): number => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2)\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\n/**\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: string,\n dark: string = \"#212529\",\n light: string = \"#fff\",\n preferredColor?: string\n): string => {\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\n/**\n */\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string\n) => {\n let bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (typeof bgColor === \"object\") {\n bgColor = bgColor?.backgroundColor ?? defaultValue;\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n throw new ThemePropertyException(\n `${bgColorProperty} is not a string, but: ${typeof bgColor}`\n );\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty: string,\n preferredColorProperty?: string,\n standardDarkProperty: string = \"YIQ_DARK_COLOR\",\n standardLightProperty: string = \"YIQ_LIGHT_COLOR\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\"\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,QAAQ,UAAU;AAEnD,SAASC,kBAAkB,EAAEC,OAAO,QAAQ,cAAc;AAE1D,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGA,CAACC,MAAc,EA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J,kBAAkB,CAACC,KAAK,EAAEC,eAAe,EAAE,SAAS,CAAC;IACrE,MAAMN,cAAc,GAAGtB,kBAAkB,CAAC2B,KAAK,EAAEM,sBAAsB,CAAC;IACxE,MAAMT,SAAS,GAAGxB,kBAAkB,CAClC2B,KAAK,EACLO,oBAAoB,EACpB,SAAS,CACV;IACD,MAAMT,UAAU,GAAGzB,kBAAkB,CAAC2B,KAAK,EAAEQ,qBAAqB,EAAE,MAAM,CAAC;IAE3E,OAAOnB,cAAc,CAACc,OAAO,EAAEN,SAAS,EAAEC,UAAU,EAAEH,cAAc,CAAC;EACvE,CAAC;AAAA;AAEH,SAASnB,gBAAgB,EAAEO,MAAM,EAAEM,cAAc,EAAEgB,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"corners.js","names":["getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","settings","ROUNDED_CORNERS","propertyName"],"sources":["../../../src/react-theme/utils/corners.js"],"sourcesContent":["// @flow\nimport { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\n/**\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path: string = \"BORDER_RADIUS\",\n defaultValue: string = \"0.25rem\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,cAAc;AAIjD,MAAMC,uBAAuB,GAAG,eAAe;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAClB;EAAA,IACEC,QAAgB,uEAAGF,uBAAuB;EAAA,IAC1CG,IAAY,uEAAG,eAAe;EAAA,IAC9BC,YAAoB,uEAAG,SAAS;EAAA,OAElC,QAAkD;IAAA,IAAjD;MAAEC,KAAK,GAAG;QAAEC,QAAQ,EAAE,CAAC;MAAE;IAAkB,CAAC;IAC3C,IAAID,KAAK,CAACE,eAAe,EAAE;MACzB,MAAMC,YAAY,GAChBN,QAAQ,IAAIA,QAAQ,KAAKF,uBAAuB,GAC3C,UAASE,QAAS,SAAQ,GAC3BF,uBAAuB;MAE7B,OAAQ,GAAEQ,YAAa,KAAIT,kBAAkB,CAC3CM,KAAK,EACLF,IAAI,EACJC,YAAY,CACZ,EAAC;IACL;IAEA,OAAO,EAAE;EACX,CAAC;AAAA;AAEH,SAASH,cAAc"}
1
+ {"version":3,"file":"corners.js","names":["getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","arguments","length","undefined","path","defaultValue","_ref","theme","settings","ROUNDED_CORNERS","propertyName"],"sources":["../../../src/react-theme/utils/corners.js"],"sourcesContent":["// @flow\nimport { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\n/**\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path: string = \"BORDER_RADIUS\",\n defaultValue: string = \"0.25rem\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,cAAc;AAIjD,MAAMC,uBAAuB,GAAG,eAAe;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAClB,SAAAA,CAAA;EAAA,IACEC,QAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,uBAAuB;EAAA,IAC1CM,IAAY,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,eAAe;EAAA,IAC9BI,YAAoB,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,SAAS;EAAA,OAElCK,IAAA,IAAkD;IAAA,IAAjD;MAAEC,KAAK,GAAG;QAAEC,QAAQ,EAAE,CAAC;MAAE;IAAkB,CAAC,GAAAF,IAAA;IAC3C,IAAIC,KAAK,CAACE,eAAe,EAAE;MACzB,MAAMC,YAAY,GAChBV,QAAQ,IAAIA,QAAQ,KAAKF,uBAAuB,GAC3C,UAASE,QAAS,SAAQ,GAC3BF,uBAAuB;MAE7B,OAAQ,GAAEY,YAAa,KAAIb,kBAAkB,CAC3CU,KAAK,EACLH,IAAI,EACJC,YAAY,CACZ,EAAC;IACL;IAEA,OAAO,EAAE;EACX,CAAC;AAAA;AAEH,SAASN,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"spacers.js","names":["Big","IllegalArgumentException","IllegalStateException","getSize","theme","ratio","path","unit","size","times","spacer","settings","spacers","ratios","join","gutter"],"sources":["../../../src/react-theme/utils/spacers.js"],"sourcesContent":["// @flow\nimport Big from \"big.js\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\nimport IllegalStateException from \"../../exceptions/IllegalStateException\";\n\n/**\n */\nconst getSize = (\n theme: Theme,\n ratio: number | string = 1,\n path: string = \"SPACER\",\n unit: string = \"rem\"\n) => {\n if (typeof ratio === \"string\") {\n return ratio;\n }\n\n if (typeof ratio === \"number\") {\n if (typeof theme[path] === \"number\") {\n const size = Big(ratio).times(theme[path]);\n return `${size}${unit}`;\n }\n throw new IllegalStateException(`Size ${path} must be a number`);\n }\n\n throw new IllegalArgumentException(\n `Ratio ${JSON.stringify(ratio)} must be a string or number`\n );\n};\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n */\n/**\n */\nconst spacer =\n (ratio: number = 1): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) =>\n getSize(theme, ratio);\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n * Ratio's can be given clockwise with shorthand,\n * spacers(0.5, 1) with a spacer of 0.8 will give \"0.4rem 1rem\";\n */\n/**\n */\nconst spacers =\n (...ratios: Array<number | \"auto\">): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) =>\n ratios.map((ratio) => getSize(theme, ratio)).join(\" \");\n\n/*\n * Render a gutter based on GUTTER property\n */\n/**\n */\nconst gutter =\n (ratio: number = 1): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) =>\n getSize(theme, ratio, \"GRID_GUTTER\", \"px\");\n\nexport { spacer, spacers, gutter };\n"],"mappings":";;AACA,OAAOA,GAAG,MAAM,QAAQ;AAGxB,OAAOC,wBAAwB,MAAM,2CAA2C;AAChF,OAAOC,qBAAqB,MAAM,wCAAwC;;AAE1E;AACA;AACA,MAAMC,OAAO,GAAG,UACdC,KAAY,EAIT;EAAA,IAHHC,KAAsB,uEAAG,CAAC;EAAA,IAC1BC,IAAY,uEAAG,QAAQ;EAAA,IACvBC,IAAY,uEAAG,KAAK;EAEpB,IAAI,OAAOF,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,IAAI,OAAOD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"spacers.js","names":["Big","IllegalArgumentException","IllegalStateException","getSize","theme","ratio","arguments","length","undefined","path","unit","size","times","_JSON$stringify","spacer","_ref","settings","spacers","_len","ratios","Array","_key","_ref2","_mapInstanceProperty","call","join","gutter","_ref3"],"sources":["../../../src/react-theme/utils/spacers.js"],"sourcesContent":["// @flow\nimport Big from \"big.js\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\nimport IllegalArgumentException from \"../../exceptions/IllegalArgumentException\";\nimport IllegalStateException from \"../../exceptions/IllegalStateException\";\n\n/**\n */\nconst getSize = (\n theme: Theme,\n ratio: number | string = 1,\n path: string = \"SPACER\",\n unit: string = \"rem\"\n) => {\n if (typeof ratio === \"string\") {\n return ratio;\n }\n\n if (typeof ratio === \"number\") {\n if (typeof theme[path] === \"number\") {\n const size = Big(ratio).times(theme[path]);\n return `${size}${unit}`;\n }\n throw new IllegalStateException(`Size ${path} must be a number`);\n }\n\n throw new IllegalArgumentException(\n `Ratio ${JSON.stringify(ratio)} must be a string or number`\n );\n};\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n */\n/**\n */\nconst spacer =\n (ratio: number = 1): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) =>\n getSize(theme, ratio);\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n * Ratio's can be given clockwise with shorthand,\n * spacers(0.5, 1) with a spacer of 0.8 will give \"0.4rem 1rem\";\n */\n/**\n */\nconst spacers =\n (...ratios: Array<number | \"auto\">): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) =>\n ratios.map((ratio) => getSize(theme, ratio)).join(\" \");\n\n/*\n * Render a gutter based on GUTTER property\n */\n/**\n */\nconst gutter =\n (ratio: number = 1): ((UtilThemeProps) => string) =>\n ({ theme = { settings: {} } }: UtilThemeProps) =>\n getSize(theme, ratio, \"GRID_GUTTER\", \"px\");\n\nexport { spacer, spacers, gutter };\n"],"mappings":";;AACA,OAAOA,GAAG,MAAM,QAA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,KAAK,CAAC;EAAA;AAAA;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMY,OAAO,GACX,SAAAA,CAAA;EAAA,SAAAC,IAAA,GAAAZ,SAAA,CAAAC,MAAA,EAAIY,MAAM,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;IAANF,MAAM,CAAAE,IAAA,IAAAf,SAAA,CAAAe,IAAA;EAAA;EAAA,OACVC,KAAA;IAAA,IAAC;MAAElB,KAAK,GAAG;QAAEY,QAAQ,EAAE,CAAC;MAAE;IAAkB,CAAC,GAAAM,KAAA;IAAA,OAC3CC,oBAAA,CAAAJ,MAAM,EAAAK,IAAA,CAANL,MAAM,EAAMd,KAAK,IAAKF,OAAO,CAACC,KAAK,EAAEC,KAAK,CAAC,CAAC,CAACoB,IAAI,CAAC,GAAG,CAAC;EAAA;AAAA;;AAE1D;AACA;AACA;AACA;AACA;AACA,MAAMC,MAAM,GACV,SAAAA,CAAA;EAAA,IAACrB,KAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAAA,OAClBqB,KAAA;IAAA,IAAC;MAAEvB,KAAK,GAAG;QAAEY,QAAQ,EAAE,CAAC;MAAE;IAAkB,CAAC,GAAAW,KAAA;IAAA,OAC3CxB,OAAO,CAACC,KAAK,EAAEC,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC;EAAA;AAAA;AAE9C,SAASS,MAAM,EAAEG,OAAO,EAAES,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"themeProps.js","names":["get","ThemePropertyException","getProp","theme","path","defaultValue","getThemeProp","value","getThemeStringProp","toString","getThemeNumberProp","themeProp"],"sources":["../../../src/react-theme/utils/themeProps.js"],"sourcesContent":["// @flow\nimport { get } from \"../../utils/helpers/objects\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\n/**\n */\nexport const getProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ?ThemePropValue => {\n return path === \"\" ? defaultValue : get(theme, path, defaultValue);\n};\n\n/**\n */\nexport const getThemeProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ThemePropValue => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, number or plain object, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeStringProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: string = \"\"\n): string => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeNumberProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: number = 0\n): number => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a number, but: ${typeof value}`\n );\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\n/**\n */\nexport const themeProp =\n (\n path: string,\n defaultValue?: ThemePropValue\n ): (({ theme: Theme }) => ThemePropValue) =>\n ({ theme }: { theme: Theme }) =>\n getThemeProp(theme, path, defaultValue);\n"],"mappings":"AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,YAID;EAAA,IAHpBC,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAA4B,uEAAG,EAAE;EAEjC,OAAOD,IAA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C;EAExB,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIN,sBAAsB,CAC7B,GAAEG,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,SAAS,GACpB,CACEP,IAAY,EACZC,YAA6B,KAE/B;EAAA,IAAC;IAAEF;EAAwB,CAAC;EAAA,OAC1BG,YAAY,CAACH,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;AAAA"}
1
+ {"version":3,"file":"themeProps.js","names":["get","ThemePropertyException","getProp","theme","arguments","length","undefined","path","defaultValue","getThemeProp","value","getThemeStringProp","toString","getThemeNumberProp","themeProp","_ref"],"sources":["../../../src/react-theme/utils/themeProps.js"],"sourcesContent":["// @flow\nimport { get } from \"../../utils/helpers/objects\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\n/**\n */\nexport const getProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ?ThemePropValue => {\n return path === \"\" ? defaultValue : get(theme, path, defaultValue);\n};\n\n/**\n */\nexport const getThemeProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ThemePropValue => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, number or plain object, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeStringProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: string = \"\"\n): string => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeNumberProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: number = 0\n): number => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a number, but: ${typeof value}`\n );\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\n/**\n */\nexport const themeProp =\n (\n path: string,\n defaultValue?: ThemePropValue\n ): (({ theme: Theme }) => ThemePropValue) =>\n ({ theme }: { theme: Theme }) =>\n getThemeProp(theme, path, defaultValue);\n"],"mappings":"AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,SAAAA,CAAA,EAID;EAAA,IAHpBC,KAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IACzBG,IAAY,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACjBI,YAA4B,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAEjC,OAAOG,IAAI,KAAK,EAAE,GAAGC,YAAY,GAAGR,GAAG,CAACG,KAAK,EAAEI,IAAI,EAAEC,YAAY,CAAC;AACpE,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,YAAY,GAAG,SAAAA,CAAA,EAIP;EAAA,IAHnBN,KAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IACzBG,IAAY,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAA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AA,IAHXV,KAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,IACzBG,IAAY,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IACjBI,YAAoB,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAExB,MAAMM,KAAK,GAAGR,OAAO,CAACC,KAAK,EAAEI,IAAI,EAAEC,YAAY,CAAC;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIT,sBAAsB,CAC7B,GAAEM,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,SAAS,GACpBA,CACEP,IAAY,EACZC,YAA6B,KAE/BO,IAAA;EAAA,IAAC;IAAEZ;EAAwB,CAAC,GAAAY,IAAA;EAAA,OAC1BN,YAAY,CAACN,KAAK,EAAEI,IAAI,EAAEC,YAAY,CAAC;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"I18nActions.js","names":["startProgress","finishProgress","receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/I18nActions.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport type Locales from \"../../i18n/Locales\";\nimport type { SetLocalesAction, UpdateLocaleAction } from \"./types\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n * Update current locale\n */\nexport const receiveLocale = (locale: string): UpdateLocaleAction => ({\n type: \"UPDATE_LOCALE\",\n payload: locale,\n});\n\n/**\n * Change locale of application and redirect\n */\nexport const updateLocale =\n (locale: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n dispatch(receiveLocale(locale));\n\n dispatch(finishProgress());\n };\n\n/**\n */\nexport const setLocales = (\n locales: Locales,\n locale: string\n): SetLocalesAction => ({\n type: \"SET_LOCALES\",\n payload: {\n locales,\n locale,\n },\n});\n"],"mappings":"AACA,SAASA,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAM5E;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,MAAc,KAA0B;EACpEC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,YAAY,GACtBH,MAAc,IACdI,QAAQ,IAAK;EACZA,QAAQ,CAACP,aAAa,EAAE,CAAC;EACzBO,QAAQ,CAACL,aAAa,CAACC,MAAM,CAAC,CAAC;EAE/BI,QAAQ,CAACN,cAAc,EAAE,CAAC;AAC5B,CAAC;;AAEH;AACA;AACA,OAAO,MAAMO,UAAU,GAAG,CACxBC,OAAgB,EAChBN,MAAc,MACQ;EACtBC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPI,OAAO;IACPN;EACF;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"I18nActions.js","names":["startProgress","finishProgress","receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/I18nActions.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport type Locales from \"../../i18n/Locales\";\nimport type { SetLocalesAction, UpdateLocaleAction } from \"./types\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n * Update current locale\n */\nexport const receiveLocale = (locale: string): UpdateLocaleAction => ({\n type: \"UPDATE_LOCALE\",\n payload: locale,\n});\n\n/**\n * Change locale of application and redirect\n */\nexport const updateLocale =\n (locale: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n dispatch(receiveLocale(locale));\n\n dispatch(finishProgress());\n };\n\n/**\n */\nexport const setLocales = (\n locales: Locales,\n locale: string\n): SetLocalesAction => ({\n type: \"SET_LOCALES\",\n payload: {\n locales,\n locale,\n },\n});\n"],"mappings":"AACA,SAASA,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAM5E;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,MAAc,KAA0B;EACpEC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,YAAY,GACtBH,MAAc,IACdI,QAAQ,IAAK;EACZA,QAAQ,CAACP,aAAa,EAAE,CAAC;EACzBO,QAAQ,CAACL,aAAa,CAACC,MAAM,CAAC,CAAC;EAE/BI,QAAQ,CAACN,cAAc,EAAE,CAAC;AAC5B,CAAC;;AAEH;AACA;AACA,OAAO,MAAMO,UAAU,GAAGA,CACxBC,OAAgB,EAChBN,MAAc,MACQ;EACtBC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPI,OAAO;IACPN;EACF;AACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"I18nReducer.js","names":["Cache","setCookie","Locales","updateLocale","state","locale","clear","setLocales","locales","initialState","I18nReducer","action","type","payload"],"sources":["../../../src/redux/_i18n/I18nReducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport { setCookie } from \"../../utils/browser/Cookies\";\n\nimport Locales from \"../../i18n/Locales\";\n\nimport type { Reducer } from \"redux\";\nimport type { I18nState } from \"./types\";\nimport type { ReduxAction } from \"../types\";\n\n/**\n */\nconst updateLocale = (state: I18nState, locale: string) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n // clear cache because of cached contributions\n Cache.clear();\n\n return {\n ...state,\n locale,\n };\n};\n\n/**\n */\nconst setLocales = (\n state: I18nState,\n { locale, locales }: { locale: string, locales: Locales }\n) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n if (locale) {\n return {\n ...state,\n locales,\n locale,\n };\n }\n\n return {\n ...state,\n locales,\n };\n};\n\n// REDUCER\nconst initialState: I18nState = {\n locales: new Locales(),\n locale: \"en\",\n};\n\n/**\n * Form reducer\n */\nexport const I18nReducer: Reducer<I18nState, ReduxAction> = (\n state = initialState,\n action = void 0\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_LOCALES\":\n return setLocales(state, action.payload);\n\n case \"UPDATE_LOCALE\":\n return updateLocale(state, action.payload);\n\n default:\n return state;\n }\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAOC,OAAO,MAAM,oBAAoB;AAMxC;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAgB,EAAEC,MAAc,KAAK;EACzD;EACAJ,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;;EAE3B;EACAL,KAAK,CAACM,KAAK,EAAE;EAEb,OAAO;IACL,GAAGF,KAAK;IACRC;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAME,UAAU,GAAG,CACjBH,KAAgB,WAEb;EAAA,IADH;IAAEC,MAAM;IAAEG;EAA8C,CAAC;EAEzD;EACAP,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;EAE3B,IAAIA,MAAM,EAAE;IACV,OAAO;MACL,GAAGD,KAAK;MACRI,OAAO;MACPH;IACF,CAAC;EACH;EAEA,OAAO;IACL,GAAGD,KAAK;IACRI;EACF,CAAC;AACH,CAAC;;AAED;AACA,MAAMC,YAAuB,GAAG;EAC9BD,OAAO,EAAE,IAAIN,OAAO,EAAE;EACtBG,MAAM,EAAE;AACV,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMK,WAA4C,GAAG,YAGvD;EAAA,IAFHN,KAAK,uEAAGK,YAAY;EAAA,IACpBE,MAAM,uEAAG,KAAK,CAAC;EAEf,IAAI,CAACA,MAAM,EAAE;IACX,OAAOP,KAAK;EACd;EAEA,QAAQO,MAAM,CAACC,IAAI;IACjB,KAAK,aAAa;MAChB,OAAOL,UAAU,CAACH,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE1C,KAAK,eAAe;MAClB,OAAOV,YAAY,CAACC,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE5C;MACE,OAAOT,KAAK;EAAC;AAEnB,CAAC"}
1
+ {"version":3,"file":"I18nReducer.js","names":["Cache","setCookie","Locales","updateLocale","state","locale","clear","setLocales","_ref","locales","initialState","I18nReducer","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/_i18n/I18nReducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport { setCookie } from \"../../utils/browser/Cookies\";\n\nimport Locales from \"../../i18n/Locales\";\n\nimport type { Reducer } from \"redux\";\nimport type { I18nState } from \"./types\";\nimport type { ReduxAction } from \"../types\";\n\n/**\n */\nconst updateLocale = (state: I18nState, locale: string) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n // clear cache because of cached contributions\n Cache.clear();\n\n return {\n ...state,\n locale,\n };\n};\n\n/**\n */\nconst setLocales = (\n state: I18nState,\n { locale, locales }: { locale: string, locales: Locales }\n) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n if (locale) {\n return {\n ...state,\n locales,\n locale,\n };\n }\n\n return {\n ...state,\n locales,\n };\n};\n\n// REDUCER\nconst initialState: I18nState = {\n locales: new Locales(),\n locale: \"en\",\n};\n\n/**\n * Form reducer\n */\nexport const I18nReducer: Reducer<I18nState, ReduxAction> = (\n state = initialState,\n action = void 0\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_LOCALES\":\n return setLocales(state, action.payload);\n\n case \"UPDATE_LOCALE\":\n return updateLocale(state, action.payload);\n\n default:\n return state;\n }\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAOC,OAAO,MAAM,oBAAoB;AAMxC;AACA;AACA,MAAMC,YAAY,GAAGA,CAACC,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STATUS","Href","ErrorResponse","finishProgress","startProgress","handleError","setModel","key","model","connectKey","type","payload","initModels","models","updateModel","updateForm","removeModelByKey","resetModularUI","updateStatus","status","loadModelSuccessAction","modelToUpdate","clonedModel","clone","update","Error","loadModel","href","options","method","GET","data","locale","childmodels","targetModel","forceTargetModel","successAction","errorAction","error","errorResponse","isChangePassword","isResourceNotFoundAfterReload","ERROR","loadModularUI","dispatch","LOADING","loadModelPromise","resolve","then","response","FINISHED","catch","reloadModel","selfhref","isReload"],"sources":["../../../src/redux/_modularui/ModularUIActions.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS, MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { Dispatch, ThunkAction } from \"../types\";\nimport type {\n ModularUIAction,\n SetModelAction,\n InitModelAction,\n UpdateModelAction,\n UpdateFormAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n UpdateStatusAction,\n} from \"./types\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\n/**\n */\nexport const setModel = (\n key: string,\n model: ModularUIModel\n): SetModelAction => {\n // set key on model for later reference\n model.connectKey = key;\n return {\n type: \"MODULARUI/SET\",\n payload: {\n key,\n model,\n },\n };\n};\n\n/**\n */\nexport const initModels = (\n models: Array<{ key: string, model: ModularUIModel }>\n): InitModelAction => ({\n type: \"MODULARUI/INIT\",\n payload: models,\n});\n\n/**\n */\nexport const updateModel = (model: ModularUIModel): UpdateModelAction => ({\n type: \"MODULARUI/UPDATE\",\n payload: model,\n});\n\n/**\n */\nexport const updateForm = (model: ModularUIModel): UpdateFormAction => ({\n type: \"MODULARUI/UPDATE_FORM\",\n payload: model,\n});\n\n/**\n */\nexport const removeModelByKey = (key: string): RemoveModelByKeyAction => ({\n type: \"MODULARUI/REMOVE_KEY\",\n payload: key,\n});\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = (): ResetModularUIAction => ({\n type: \"MODULARUI/RESET\",\n});\n\n/**\n */\nexport const updateStatus = (\n key: string,\n status: $Keys<typeof MODULARUI_STATUS>\n): UpdateStatusAction => ({\n type: \"MODULARUI/STATUS\",\n payload: { key, status },\n});\n\n/**\n */\nconst loadModelSuccessAction = (\n key: string,\n model: ModularUIModel,\n modelToUpdate: ?ModularUIModel\n): UpdateModelAction | SetModelAction => {\n if (modelToUpdate) {\n // $FlowFixMe[prop-missing]\n if (typeof modelToUpdate[\"update\"] === \"function\") {\n const clonedModel = modelToUpdate.clone();\n clonedModel.update(model);\n\n return updateModel(clonedModel);\n }\n\n throw new Error(\n `loadModel action: updateModel is set as option for ${key}, but the model is missing an update methode`\n );\n }\n\n return setModel(key, model);\n};\n\n/**\n * This action is handled by the modularui middleware\n */\nexport const loadModel = (\n key: string,\n href: Href | string,\n options?: RequestModularUIOptions\n): ModularUIAction => ({\n type: \"MODULARUI/FETCH\",\n payload: {\n href: href instanceof Href ? href : new Href(href),\n method: options?.method ?? HTTP_METHODS.GET,\n data: options?.data,\n locale: options?.locale ?? \"en\",\n childmodels: options?.childmodels,\n targetModel: options?.targetModel,\n forceTargetModel: options?.forceTargetModel,\n /**\n */\n successAction: (model) =>\n loadModelSuccessAction(key, model, options?.updateModel),\n /**\n */\n errorAction: (error) => {\n const errorResponse = new ErrorResponse(error, key);\n if (errorResponse.isChangePassword) {\n return {\n type: \"NO_ACTION\",\n };\n } else if (errorResponse.isResourceNotFoundAfterReload) {\n return removeModelByKey(key);\n }\n\n return updateStatus(key, MODULARUI_STATUS.ERROR);\n },\n },\n});\n\n/**\n */\nexport const loadModularUI =\n (\n key: string,\n href: Href | string,\n options?: RequestModularUIOptions\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(updateStatus(key, MODULARUI_STATUS.LOADING));\n dispatch(startProgress());\n\n const loadModelPromise = dispatch(loadModel(key, href, options));\n\n return Promise.resolve(loadModelPromise)\n .then((response) => {\n if (response?.type === \"FINISH_PROGRESS\") {\n dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));\n }\n\n return dispatch(finishProgress());\n })\n .catch((error) => dispatch(handleError(error)));\n };\n\n/**\n */\nexport const reloadModel = (\n model: ModularUIModel,\n options?: RequestModularUIOptions\n): ThunkAction =>\n loadModularUI(model.connectKey, model.selfhref, {\n ...options,\n isReload: true,\n });\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,gBAAgB,QAAQ,2BAA2B;AAC1E,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,8BAA8B;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAgB9C;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CACtBC,GAAW,EACXC,KAAqB,KACF;EACnB;EACAA,KAAK,CAACC,UAAU,GAAGF,GAAG;EACtB,OAAO;IACLG,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE;MACPJ,GAAG;MACHC;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,UAAU,GACrBC,MAAqD,KAChC;EACrBH,IAAI,EAAE,gBAAgB;EACtBC,OAAO,EAAEE;AACX,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,WAAW,GAAIN,KAAqB,KAAyB;EACxEE,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAEH;AACX,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMO,UAAU,GAAIP,KAAqB,KAAwB;EACtEE,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAEH;AACX,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMQ,gBAAgB,GAAIT,GAAW,KAA8B;EACxEG,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEJ;AACX,CAAC,C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ACnD,CAAC;;AAEH;AACA;AACA,OAAO,MAAMc,WAAW,GAAG,CACzB5C,KAAqB,EACrBoB,OAAiC,KAEjCe,aAAa,CAACnC,KAAK,CAACC,UAAU,EAAED,KAAK,CAAC6C,QAAQ,EAAE;EAC9C,GAAGzB,OAAO;EACV0B,QAAQ,EAAE;AACZ,CAAC,CAAC"}
1
+ {"version":3,"file":"ModularUIActions.js","names":["HTTP_METHODS","MODULARUI_STATUS","Href","ErrorResponse","finishProgress","startProgress","handleError","setModel","key","model","connectKey","type","payload","initModels","models","updateModel","updateForm","removeModelByKey","resetModularUI","updateStatus","status","loadModelSuccessAction","modelToUpdate","clonedModel","clone","update","Error","loadModel","href","options","method","GET","data","locale","childmodels","targetModel","forceTargetModel","successAction","errorAction","error","errorResponse","isChangePassword","isResourceNotFoundAfterReload","ERROR","loadModularUI","dispatch","LOADING","loadModelPromise","_Promise","resolve","then","response","FINISHED","catch","reloadModel","selfhref","isReload"],"sources":["../../../src/redux/_modularui/ModularUIActions.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS, MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { Dispatch, ThunkAction } from \"../types\";\nimport type {\n ModularUIAction,\n SetModelAction,\n InitModelAction,\n UpdateModelAction,\n UpdateFormAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n UpdateStatusAction,\n} from \"./types\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\n/**\n */\nexport const setModel = (\n key: string,\n model: ModularUIModel\n): SetModelAction => {\n // set key on model for later reference\n model.connectKey = key;\n return {\n type: \"MODULARUI/SET\",\n payload: {\n key,\n model,\n },\n };\n};\n\n/**\n */\nexport const initModels = (\n models: Array<{ key: string, model: ModularUIModel }>\n): InitModelAction => ({\n type: \"MODULARUI/INIT\",\n payload: models,\n});\n\n/**\n */\nexport const updateModel = (model: ModularUIModel): UpdateModelAction => ({\n type: \"MODULARUI/UPDATE\",\n payload: model,\n});\n\n/**\n */\nexport const updateForm = (model: ModularUIModel): UpdateFormAction => ({\n type: \"MODULARUI/UPDATE_FORM\",\n payload: model,\n});\n\n/**\n */\nexport const removeModelByKey = (key: string): RemoveModelByKeyAction => ({\n type: \"MODULARUI/REMOVE_KEY\",\n payload: key,\n});\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = (): ResetModularUIAction => ({\n type: \"MODULARUI/RESET\",\n});\n\n/**\n */\nexport const updateStatus = (\n key: string,\n status: $Keys<typeof MODULARUI_STATUS>\n): UpdateStatusAction => ({\n type: \"MODULARUI/STATUS\",\n payload: { key, status },\n});\n\n/**\n */\nconst loadModelSuccessAction = (\n key: string,\n model: ModularUIModel,\n modelToUpdate: ?ModularUIModel\n): UpdateModelAction | SetModelAction => {\n if (modelToUpdate) {\n // $FlowFixMe[prop-missing]\n if (typeof modelToUpdate[\"update\"] === \"function\") {\n const clonedModel = modelToUpdate.clone();\n clonedModel.update(model);\n\n return updateModel(clonedModel);\n }\n\n throw new Error(\n `loadModel action: updateModel is set as option for ${key}, but the model is missing an update methode`\n );\n }\n\n return setModel(key, model);\n};\n\n/**\n * This action is handled by the modularui middleware\n */\nexport const loadModel = (\n key: string,\n href: Href | string,\n options?: RequestModularUIOptions\n): ModularUIAction => ({\n type: \"MODULARUI/FETCH\",\n payload: {\n href: href instanceof Href ? href : new Href(href),\n method: options?.method ?? HTTP_METHODS.GET,\n data: options?.data,\n locale: options?.locale ?? \"en\",\n childmodels: options?.childmodels,\n targetModel: options?.targetModel,\n forceTargetModel: options?.forceTargetModel,\n /**\n */\n successAction: (model) =>\n loadModelSuccessAction(key, model, options?.updateModel),\n /**\n */\n errorAction: (error) => {\n const errorResponse = new ErrorResponse(error, key);\n if (errorResponse.isChangePassword) {\n return {\n type: \"NO_ACTION\",\n };\n } else if (errorResponse.isResourceNotFoundAfterReload) {\n return removeModelByKey(key);\n }\n\n return updateStatus(key, MODULARUI_STATUS.ERROR);\n },\n },\n});\n\n/**\n */\nexport const loadModularUI =\n (\n key: string,\n href: Href | string,\n options?: RequestModularUIOptions\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(updateStatus(key, MODULARUI_STATUS.LOADING));\n dispatch(startProgress());\n\n const loadModelPromise = dispatch(loadModel(key, href, options));\n\n return Promise.resolve(loadModelPromise)\n .then((response) => {\n if (response?.type === \"FINISH_PROGRESS\") {\n dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));\n }\n\n return dispatch(finishProgress());\n })\n .catch((error) => dispatch(handleError(error)));\n };\n\n/**\n */\nexport const reloadModel = (\n model: ModularUIModel,\n options?: RequestModularUIOptions\n): ThunkAction =>\n loadModularUI(model.connectKey, model.selfhref, {\n ...options,\n isReload: true,\n });\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,gBAAgB,QAAQ,2BAA2B;AAC1E,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,8BAA8B;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAgB9C;AACA;AACA,OAAO,MAAMC,QAAQ,GAAGA,CACtBC,GAAW,EACXC,KAAqB,KACF;EACnB;EACAA,KAAK,CAACC,UAAU,GAAGF,GAAG;EACtB,OAAO;IACLG,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE;MACPJ,GAAG;MACHC;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,UAAU,GACrBC,MAAqD,KAChC;EACrBH,IAAI,EAAE,gBAAgB;EACtBC,OAAO,EAAEE;AACX,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,WAAW,GAAIN,KAAqB,KAAyB;EACxEE,IAAI,EAAE,kBAAkB;EACx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AAK;IAClB,IAAIA,QAAQ,EAAExC,IAAI,KAAK,iBAAiB,EAAE;MACxCkC,QAAQ,CAAC1B,YAAY,CAACX,GAAG,EAAEP,gBAAgB,CAACmD,QAAQ,CAAC,CAAC;IACxD;IAEA,OAAOP,QAAQ,CAACzC,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC,CACDiD,KAAK,CAAEd,KAAK,IAAKM,QAAQ,CAACvC,WAAW,CAACiC,KAAK,CAAC,CAAC,CAAC;AACnD,CAAC;;AAEH;AACA;AACA,OAAO,MAAMe,WAAW,GAAGA,CACzB7C,KAAqB,EACrBoB,OAAiC,KAEjCe,aAAa,CAACnC,KAAK,CAACC,UAAU,EAAED,KAAK,CAAC8C,QAAQ,EAAE;EAC9C,GAAG1B,OAAO;EACV2B,QAAQ,EAAE;AACZ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIConnector.js","names":["useEffect","useDispatch","useLocation","loadModularUI","reloadModel","removeModelByKey","Href","getDisplayName","useUrl","useReload","useModularUI","useLocale","modularUIConnector","name","resource","options","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","location","url","displayName","contextId","modelEntry","modelKey","model","connectKey","handleManualReload","reloadOptions","handleFetch","href","fetchOptions","reload","state","doReload","isReload","locale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI"],"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,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,cAAc;AAE1C,SACEC,aAAa,EACbC,WAAW,EACXC,gBAAgB,QACX,oBAAoB;AAE3B,OAAOC,IAAI,MAAM,wBAAwB;AACzC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAASC,MAAM,EAAEC,SAAS,QAAQ,kBAAkB;AACpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,SAAS,QAAQ,qBAAqB;AAAC;AAmBhD;AACA;AACA,MAAMC,kBAAkB,GAAG,UACzBC,IAAY,EACZC,QAA2B,EAEmC;EAAA,IAD9DC,OAAyB,uEAAG;IAAEC,QAAQ,EAAE,MAAM;IAAEC,eAAe,EAAE;EAAM,CAAC;EAExE,MAAM;IACJD,QAAQ,GAAG,MAAM;IACjBC,eAAe,GAAG,KAAK;IACvB,GAAGC;EACL,CAAC,GAAGH,OAAO;EAEX,OAAQI,SAA6B,IAAK;IACxC,MAAMC,gBAAgB,GAAIC,KAAU,IAAK;MACvC,MAAMC,QAAQ,GAAGrB,WAAW,EAAE;MAC9B,MAAMsB,QAAQ,GAAGrB,WAAW,EAAE;MAE9B,MAAMsB,GAAG,GAAGhB,MAAM,CAACM,QAAQ,EAAE;QAAES,QAAQ;QAAE,GAAGF;MAAM,CAAC,CAAC;MACpD,MAAMI,WAAW,GAAGlB,cAAc,CAACY,SAAS,EAAEN,IAAI,EAAEQ,KAAK,CAACK,SAAS,CAAC;;MAEpE;MACA,MAAMC,UAAU,GAAGjB,YAAY,CAACe,WAAW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,UAAU,CAACe,MAAM,GAAG,IAAI;QAC7CC,gBAAgB,EAAEhB,UAAU,GAAGA,UAAU,CAACgB,gBAAgB,GAAG,IAAI;QACjEC,QAAQ,EAAEC,OAAO,CAAClB,UAAU,CAAC;QAC7Ba,MAAM;QACNM,cAAc,EAAEb,WAAW;QAC3B7B,WAAW,EAAE2B;MACf,CAAC;MAED,oBAAO,KAAC,SAAS;QAAA,GAAKV,KAAK;QAAA,GAAMoB;MAAQ,EAAI;IAC/C,CAAC;IAEDrB,gBAAgB,CAACK,WAAW,GAAI,gBAAelB,cAAc,CAC3Da,gBAAgB,EAChBP,IAAI,CACJ,EAAC;IAEH,OAAOO,gBAAgB;EACzB,CAAC;AACH,CAAC;AAED,eAAeR,kBAAkB"}
1
+ {"version":3,"file":"ModularUIConnector.js","names":["useEffect","useDispatch","useLocation","loadModularUI","reloadModel","removeModelByKey","Href","getDisplayName","useUrl","useReload","useModularUI","useLocale","jsx","_jsx","modularUIConnector","name","resource","options","arguments","length","undefined","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","location","url","displayName","contextId","modelEntry","modelKey","model","connectKey","handleManualReload","reloadOptions","handleFetch","href","fetchOptions","reload","state","doReload","isReload","locale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI"],"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,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,cAAc;AAE1C,SACEC,aAAa,EACbC,WAAW,EACXC,gBAAgB,QACX,oBAAoB;AAE3B,OAAOC,IAAI,MAAM,wBAAwB;AACzC,SAASC,cAAc,QAAQ,mBAAmB;AAElD,SAASC,MAAM,EAAEC,SAAS,QAAQ,kBAAkB;AACpD,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,SAAS,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAmBhD;AACA;AACA,MAAMC,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,GAAG1B,WAAW,EAAE;MAC9B,MAAM2B,QAAQ,GAAG1B,WAAW,EAAE;MAE9B,MAAM2B,GAAG,GAAGrB,MAAM,CAACQ,QAAQ,EAAE;QAAEY,QAAQ;QAAE,GAAGF;MAAM,CAAC,CAAC;MACpD,MAAMI,WAAW,GAAGvB,cAAc,CAACiB,SAAS,EAAET,IAAI,EAAEW,KAAK,CAACK,SAAS,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