@beinformed/ui 1.18.1 → 1.18.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 (624) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/esm/builder/index.js.map +1 -1
  3. package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
  4. package/esm/constants/Constants.js +1 -0
  5. package/esm/constants/Constants.js.map +1 -1
  6. package/esm/constants/LayoutHintConfig.js.map +1 -1
  7. package/esm/constants/LayoutHints.js.map +1 -1
  8. package/esm/constants/Settings.js +10 -3
  9. package/esm/constants/Settings.js.map +1 -1
  10. package/esm/constants/index.js.map +1 -1
  11. package/esm/exceptions/ConfigurationException.js.map +1 -1
  12. package/esm/exceptions/FetchException.js.map +1 -1
  13. package/esm/exceptions/IllegalArgumentException.js.map +1 -1
  14. package/esm/exceptions/IllegalReturnException.js.map +1 -1
  15. package/esm/exceptions/IllegalStateException.js.map +1 -1
  16. package/esm/exceptions/JsonParseException.js.map +1 -1
  17. package/esm/exceptions/MissingPropertyException.js.map +1 -1
  18. package/esm/exceptions/NetworkException.js.map +1 -1
  19. package/esm/exceptions/NotAllowedUriException.js.map +1 -1
  20. package/esm/exceptions/NotFoundException.js.map +1 -1
  21. package/esm/exceptions/ServerRequestException.js.map +1 -1
  22. package/esm/exceptions/ThemePropertyException.js.map +1 -1
  23. package/esm/exceptions/TimeoutException.js.map +1 -1
  24. package/esm/exceptions/UnauthorizedException.js.map +1 -1
  25. package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
  26. package/esm/exceptions/index.js.map +1 -1
  27. package/esm/hooks/index.js.map +1 -1
  28. package/esm/hooks/useAllFormsOnModel.js.map +1 -1
  29. package/esm/hooks/useAuthentication.js.map +1 -1
  30. package/esm/hooks/useContent.js.map +1 -1
  31. package/esm/hooks/useDeepCompareEffect.js.map +1 -1
  32. package/esm/hooks/useForm.js.map +1 -1
  33. package/esm/hooks/useI18n.js.map +1 -1
  34. package/esm/hooks/useModal.js.map +1 -1
  35. package/esm/hooks/useModelCatalog.js.map +1 -1
  36. package/esm/hooks/useModels.js.map +1 -1
  37. package/esm/hooks/useModularUI.js.map +1 -1
  38. package/esm/hooks/useModularUIBasic.js.map +1 -1
  39. package/esm/hooks/useModularUIModel.js.map +1 -1
  40. package/esm/hooks/useModularUIRequest.js.map +1 -1
  41. package/esm/hooks/useNotification.js.map +1 -1
  42. package/esm/hooks/usePreference.js.map +1 -1
  43. package/esm/hooks/useProgressIndicator.js.map +1 -1
  44. package/esm/hooks/useRouter.js.map +1 -1
  45. package/esm/i18n/Locale.js.map +1 -1
  46. package/esm/i18n/Locales.js.map +1 -1
  47. package/esm/i18n/Message.js.map +1 -1
  48. package/esm/i18n/index.js.map +1 -1
  49. package/esm/i18n/languages.js.map +1 -1
  50. package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  51. package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  52. package/esm/i18n/types.js.map +1 -1
  53. package/esm/i18n/withMessage.js.map +1 -1
  54. package/esm/index.js.map +1 -1
  55. package/esm/models/actions/ActionCollection.js.map +1 -1
  56. package/esm/models/actions/ActionModel.js.map +1 -1
  57. package/esm/models/application/ApplicationModel.js.map +1 -1
  58. package/esm/models/attributes/AttributeCollection.js.map +1 -1
  59. package/esm/models/attributes/AttributeContent.js.map +1 -1
  60. package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
  61. package/esm/models/attributes/AttributeModel.js.map +1 -1
  62. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  63. package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
  64. package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
  65. package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
  66. package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  67. package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  68. package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  69. package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
  70. package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
  71. package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
  72. package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
  73. package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
  74. package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
  75. package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
  76. package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
  77. package/esm/models/attributes/StringAttributeModel.js.map +1 -1
  78. package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
  79. package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
  80. package/esm/models/attributes/_createAttribute.js.map +1 -1
  81. package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  82. package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  83. package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  84. package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  85. package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  86. package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  87. package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  88. package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  89. package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  90. package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  91. package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  92. package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  93. package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  94. package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  95. package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  96. package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  97. package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  98. package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  99. package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  100. package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  101. package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  102. package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  103. package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  104. package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  105. package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  106. package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  107. package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  108. package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  109. package/esm/models/base/BaseCollection.js.map +1 -1
  110. package/esm/models/base/BaseModel.js.map +1 -1
  111. package/esm/models/base/ResourceCollection.js.map +1 -1
  112. package/esm/models/base/ResourceModel.js.map +1 -1
  113. package/esm/models/caseview/CaseViewModel.js.map +1 -1
  114. package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
  115. package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
  116. package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
  117. package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
  118. package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
  119. package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
  120. package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  121. package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
  122. package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
  123. package/esm/models/content/ContentIndexModel.js.map +1 -1
  124. package/esm/models/content/ContentLinkModel.js.map +1 -1
  125. package/esm/models/content/ContentModel.js.map +1 -1
  126. package/esm/models/content/ContentTOCModel.js.map +1 -1
  127. package/esm/models/content/ContentTypeModel.js.map +1 -1
  128. package/esm/models/content/SectionModel.js.map +1 -1
  129. package/esm/models/content/SubSectionModel.js.map +1 -1
  130. package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  131. package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  132. package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  133. package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  134. package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  135. package/esm/models/detail/DetailModel.js.map +1 -1
  136. package/esm/models/error/ErrorCollection.js.map +1 -1
  137. package/esm/models/error/ErrorModel.js.map +1 -1
  138. package/esm/models/error/ErrorResponse.js.map +1 -1
  139. package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
  140. package/esm/models/filters/BaseFilterModel.js.map +1 -1
  141. package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
  142. package/esm/models/filters/FilterCollection.js.map +1 -1
  143. package/esm/models/filters/FilterModel.js.map +1 -1
  144. package/esm/models/filters/RangeFilterModel.js.map +1 -1
  145. package/esm/models/form/FormModel.js +3 -1
  146. package/esm/models/form/FormModel.js.map +1 -1
  147. package/esm/models/form/FormObjectModel.js.map +1 -1
  148. package/esm/models/grouping/GroupingModel.js.map +1 -1
  149. package/esm/models/href/Href.js.map +1 -1
  150. package/esm/models/href/ListHref.js.map +1 -1
  151. package/esm/models/index.js.map +1 -1
  152. package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
  153. package/esm/models/links/LinkCollection.js.map +1 -1
  154. package/esm/models/links/LinkModel.js.map +1 -1
  155. package/esm/models/links/normalizeLinkJSON.js.map +1 -1
  156. package/esm/models/list/ListDetailModel.js.map +1 -1
  157. package/esm/models/list/ListHeaderModel.js.map +1 -1
  158. package/esm/models/list/ListItemCollection.js.map +1 -1
  159. package/esm/models/list/ListItemModel.js.map +1 -1
  160. package/esm/models/list/ListModel.js +2 -2
  161. package/esm/models/list/ListModel.js.map +1 -1
  162. package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
  163. package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
  164. package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  165. package/esm/models/paging/PagesizeModel.js.map +1 -1
  166. package/esm/models/paging/PagingModel.js.map +1 -1
  167. package/esm/models/panels/GroupingPanelModel.js.map +1 -1
  168. package/esm/models/parameter/Parameter.js.map +1 -1
  169. package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
  170. package/esm/models/resolveModel.js.map +1 -1
  171. package/esm/models/search/CaseSearchModel.js.map +1 -1
  172. package/esm/models/sorting/SortOptionModel.js.map +1 -1
  173. package/esm/models/sorting/SortingModel.js.map +1 -1
  174. package/esm/models/tab/TabModel.js.map +1 -1
  175. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  176. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  177. package/esm/models/types.js.map +1 -1
  178. package/esm/models/user/UserModel.js.map +1 -1
  179. package/esm/models/user/UserProfileModel.js.map +1 -1
  180. package/esm/models/user/UserServicesModel.js.map +1 -1
  181. package/esm/modularui/Authenticate.js +98 -20
  182. package/esm/modularui/Authenticate.js.map +1 -1
  183. package/esm/modularui/ModularUIError.js.map +1 -1
  184. package/esm/modularui/ModularUIRequest.js.map +1 -1
  185. package/esm/modularui/ModularUIResponse.js.map +1 -1
  186. package/esm/modularui/index.js.map +1 -1
  187. package/esm/react/ErrorBoundary.js.map +1 -1
  188. package/esm/react/ErrorBoundaryFallback.js.map +1 -1
  189. package/esm/react/index.js.map +1 -1
  190. package/esm/react/utils.js.map +1 -1
  191. package/esm/react-client/Init.js.map +1 -1
  192. package/esm/react-client/client.js.map +1 -1
  193. package/esm/react-client/contextPath.js.map +1 -1
  194. package/esm/react-client/index.js.map +1 -1
  195. package/esm/react-client/rehydrate.js.map +1 -1
  196. package/esm/react-server/contextPath.js.map +1 -1
  197. package/esm/react-server/createSSRComplete.js.map +1 -1
  198. package/esm/react-server/htmlpage.js.map +1 -1
  199. package/esm/react-server/index.js.map +1 -1
  200. package/esm/react-server/renderSSRComplete.js.map +1 -1
  201. package/esm/react-server/renderSSRMinimal.js.map +1 -1
  202. package/esm/react-server/requestInformation.js.map +1 -1
  203. package/esm/react-server/serverNoSSR.js.map +1 -1
  204. package/esm/react-server/serverSSR.js.map +1 -1
  205. package/esm/react-server/serverUtil.js.map +1 -1
  206. package/esm/react-theme/ThemeProvider.js.map +1 -1
  207. package/esm/react-theme/createTheme.js.map +1 -1
  208. package/esm/react-theme/index.js.map +1 -1
  209. package/esm/react-theme/types.js.map +1 -1
  210. package/esm/react-theme/useTheme.js.map +1 -1
  211. package/esm/react-theme/utils/background.js.map +1 -1
  212. package/esm/react-theme/utils/colors.js.map +1 -1
  213. package/esm/react-theme/utils/contrast.js.map +1 -1
  214. package/esm/react-theme/utils/corners.js.map +1 -1
  215. package/esm/react-theme/utils/spacers.js.map +1 -1
  216. package/esm/react-theme/utils/themeProps.js.map +1 -1
  217. package/esm/redux/_i18n/actions.js.map +1 -1
  218. package/esm/redux/_i18n/index.js.map +1 -1
  219. package/esm/redux/_i18n/reducer.js.map +1 -1
  220. package/esm/redux/_i18n/types.js.map +1 -1
  221. package/esm/redux/_modularui/actions.js.map +1 -1
  222. package/esm/redux/_modularui/connector.js.map +1 -1
  223. package/esm/redux/_modularui/index.js.map +1 -1
  224. package/esm/redux/_modularui/middleware.js.map +1 -1
  225. package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
  226. package/esm/redux/_modularui/reducer.js.map +1 -1
  227. package/esm/redux/_modularui/selectors.js.map +1 -1
  228. package/esm/redux/_modularui/types.js.map +1 -1
  229. package/esm/redux/_modularui/withModularUI.js.map +1 -1
  230. package/esm/redux/_router/actions.js.map +1 -1
  231. package/esm/redux/_router/connectors.js.map +1 -1
  232. package/esm/redux/_router/index.js.map +1 -1
  233. package/esm/redux/_router/middleware.js.map +1 -1
  234. package/esm/redux/_router/reducer.js.map +1 -1
  235. package/esm/redux/_router/types.js.map +1 -1
  236. package/esm/redux/actions/Application.js.map +1 -1
  237. package/esm/redux/actions/Authorization.js.map +1 -1
  238. package/esm/redux/actions/Error.js.map +1 -1
  239. package/esm/redux/actions/Form.js.map +1 -1
  240. package/esm/redux/actions/FormAttributeSet.js.map +1 -1
  241. package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  242. package/esm/redux/actions/FormAutosave.js.map +1 -1
  243. package/esm/redux/actions/FormAutosubmit.js.map +1 -1
  244. package/esm/redux/actions/FormValidations.js.map +1 -1
  245. package/esm/redux/actions/Modals.js.map +1 -1
  246. package/esm/redux/actions/Notification.js.map +1 -1
  247. package/esm/redux/actions/Preferences.js +2 -2
  248. package/esm/redux/actions/Preferences.js.map +1 -1
  249. package/esm/redux/actions/ProgressIndicator.js.map +1 -1
  250. package/esm/redux/actions/SignIn.js.map +1 -1
  251. package/esm/redux/actions/SignOut.js.map +1 -1
  252. package/esm/redux/actions/index.js.map +1 -1
  253. package/esm/redux/connectors/Application.js.map +1 -1
  254. package/esm/redux/connectors/Breadcrumb.js.map +1 -1
  255. package/esm/redux/connectors/CaseView.js.map +1 -1
  256. package/esm/redux/connectors/ConceptDetail.js.map +1 -1
  257. package/esm/redux/connectors/ContentBrowser.js.map +1 -1
  258. package/esm/redux/connectors/ContentDetail.js.map +1 -1
  259. package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
  260. package/esm/redux/connectors/Form.js.map +1 -1
  261. package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
  262. package/esm/redux/connectors/ListDetail.js.map +1 -1
  263. package/esm/redux/connectors/Modal.js.map +1 -1
  264. package/esm/redux/connectors/ModelCatalog.js.map +1 -1
  265. package/esm/redux/connectors/Notification.js.map +1 -1
  266. package/esm/redux/connectors/PanelRenderer.js.map +1 -1
  267. package/esm/redux/connectors/Preferences.js.map +1 -1
  268. package/esm/redux/connectors/Progress.js.map +1 -1
  269. package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
  270. package/esm/redux/connectors/QuickSearch.js.map +1 -1
  271. package/esm/redux/connectors/SignIn.js.map +1 -1
  272. package/esm/redux/connectors/SignOut.js.map +1 -1
  273. package/esm/redux/connectors/Tab.js.map +1 -1
  274. package/esm/redux/connectors/index.js.map +1 -1
  275. package/esm/redux/index.js.map +1 -1
  276. package/esm/redux/reducers/AuthReducer.js.map +1 -1
  277. package/esm/redux/reducers/ErrorReducer.js.map +1 -1
  278. package/esm/redux/reducers/ModalsReducer.js.map +1 -1
  279. package/esm/redux/reducers/NotificationReducer.js.map +1 -1
  280. package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
  281. package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  282. package/esm/redux/reducers/createReducer.js.map +1 -1
  283. package/esm/redux/reducers/index.js.map +1 -1
  284. package/esm/redux/store/beforeRenderHooks.js.map +1 -1
  285. package/esm/redux/store/configureStore.js.map +1 -1
  286. package/esm/redux/types.js.map +1 -1
  287. package/esm/utils/browser/Cache.js.map +1 -1
  288. package/esm/utils/browser/Cookies.js.map +1 -1
  289. package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
  290. package/esm/utils/fetch/serverFetch.js.map +1 -1
  291. package/esm/utils/fetch/types.js.map +1 -1
  292. package/esm/utils/fetch/universalFetch.js.map +1 -1
  293. package/esm/utils/fetch/xhr.js.map +1 -1
  294. package/esm/utils/helpers/checkResource.js.map +1 -1
  295. package/esm/utils/helpers/createHash.js.map +1 -1
  296. package/esm/utils/helpers/createUUID.js.map +1 -1
  297. package/esm/utils/helpers/objects.js.map +1 -1
  298. package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
  299. package/esm/utils/helpers/text.js.map +1 -1
  300. package/esm/utils/index.js.map +1 -1
  301. package/esm/utils/number/DecimalFormat.js.map +1 -1
  302. package/esm/utils/number/formatValue.js.map +1 -1
  303. package/esm/utils/number/parseNumbers.js.map +1 -1
  304. package/lib/builder/index.js.map +1 -1
  305. package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
  306. package/lib/constants/Constants.js +3 -1
  307. package/lib/constants/Constants.js.flow +1 -0
  308. package/lib/constants/Constants.js.map +1 -1
  309. package/lib/constants/LayoutHintConfig.js.map +1 -1
  310. package/lib/constants/LayoutHints.js.map +1 -1
  311. package/lib/constants/Settings.js +13 -3
  312. package/lib/constants/Settings.js.flow +8 -3
  313. package/lib/constants/Settings.js.map +1 -1
  314. package/lib/constants/index.js.map +1 -1
  315. package/lib/exceptions/ConfigurationException.js.map +1 -1
  316. package/lib/exceptions/FetchException.js.map +1 -1
  317. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  318. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  319. package/lib/exceptions/IllegalStateException.js.map +1 -1
  320. package/lib/exceptions/JsonParseException.js.map +1 -1
  321. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  322. package/lib/exceptions/NetworkException.js.map +1 -1
  323. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  324. package/lib/exceptions/NotFoundException.js.map +1 -1
  325. package/lib/exceptions/ServerRequestException.js.map +1 -1
  326. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  327. package/lib/exceptions/TimeoutException.js.map +1 -1
  328. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  329. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  330. package/lib/exceptions/index.js.map +1 -1
  331. package/lib/hooks/index.js.map +1 -1
  332. package/lib/hooks/useAllFormsOnModel.js.map +1 -1
  333. package/lib/hooks/useAuthentication.js.map +1 -1
  334. package/lib/hooks/useContent.js.map +1 -1
  335. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  336. package/lib/hooks/useForm.js.map +1 -1
  337. package/lib/hooks/useI18n.js.map +1 -1
  338. package/lib/hooks/useModal.js.map +1 -1
  339. package/lib/hooks/useModelCatalog.js.map +1 -1
  340. package/lib/hooks/useModels.js.map +1 -1
  341. package/lib/hooks/useModularUI.js.map +1 -1
  342. package/lib/hooks/useModularUIBasic.js.map +1 -1
  343. package/lib/hooks/useModularUIModel.js.map +1 -1
  344. package/lib/hooks/useModularUIRequest.js.map +1 -1
  345. package/lib/hooks/useNotification.js.map +1 -1
  346. package/lib/hooks/usePreference.js.map +1 -1
  347. package/lib/hooks/useProgressIndicator.js.map +1 -1
  348. package/lib/hooks/useRouter.js.map +1 -1
  349. package/lib/i18n/Locale.js.map +1 -1
  350. package/lib/i18n/Locales.js.map +1 -1
  351. package/lib/i18n/Message.js.map +1 -1
  352. package/lib/i18n/index.js.map +1 -1
  353. package/lib/i18n/languages.js.map +1 -1
  354. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  355. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  356. package/lib/i18n/types.js.map +1 -1
  357. package/lib/i18n/withMessage.js.map +1 -1
  358. package/lib/index.js.map +1 -1
  359. package/lib/models/actions/ActionCollection.js.map +1 -1
  360. package/lib/models/actions/ActionModel.js.map +1 -1
  361. package/lib/models/application/ApplicationModel.js.map +1 -1
  362. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  363. package/lib/models/attributes/AttributeContent.js.map +1 -1
  364. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  365. package/lib/models/attributes/AttributeModel.js.map +1 -1
  366. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  367. package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
  368. package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
  369. package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
  370. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  371. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  372. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  373. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  374. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  375. package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
  376. package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
  377. package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
  378. package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
  379. package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
  380. package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
  381. package/lib/models/attributes/StringAttributeModel.js.map +1 -1
  382. package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
  383. package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
  384. package/lib/models/attributes/_createAttribute.js.map +1 -1
  385. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  386. package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
  387. package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
  388. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  389. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  390. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  391. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  392. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  393. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  394. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  395. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  396. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  397. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  398. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  399. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  400. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  401. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  402. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  403. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  404. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  405. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  406. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  407. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  408. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  409. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  410. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  411. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  412. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  413. package/lib/models/base/BaseCollection.js.map +1 -1
  414. package/lib/models/base/BaseModel.js.map +1 -1
  415. package/lib/models/base/ResourceCollection.js.map +1 -1
  416. package/lib/models/base/ResourceModel.js.map +1 -1
  417. package/lib/models/caseview/CaseViewModel.js.map +1 -1
  418. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  419. package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
  420. package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
  421. package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
  422. package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
  423. package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
  424. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  425. package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
  426. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  427. package/lib/models/content/ContentIndexModel.js.map +1 -1
  428. package/lib/models/content/ContentLinkModel.js.map +1 -1
  429. package/lib/models/content/ContentModel.js.map +1 -1
  430. package/lib/models/content/ContentTOCModel.js.map +1 -1
  431. package/lib/models/content/ContentTypeModel.js.map +1 -1
  432. package/lib/models/content/SectionModel.js.map +1 -1
  433. package/lib/models/content/SubSectionModel.js.map +1 -1
  434. package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
  435. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  436. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  437. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  438. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  439. package/lib/models/detail/DetailModel.js.map +1 -1
  440. package/lib/models/error/ErrorCollection.js.map +1 -1
  441. package/lib/models/error/ErrorModel.js.map +1 -1
  442. package/lib/models/error/ErrorResponse.js.map +1 -1
  443. package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
  444. package/lib/models/filters/BaseFilterModel.js.map +1 -1
  445. package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
  446. package/lib/models/filters/FilterCollection.js.map +1 -1
  447. package/lib/models/filters/FilterModel.js.map +1 -1
  448. package/lib/models/filters/RangeFilterModel.js.map +1 -1
  449. package/lib/models/form/FormModel.js +3 -1
  450. package/lib/models/form/FormModel.js.flow +1 -1
  451. package/lib/models/form/FormModel.js.map +1 -1
  452. package/lib/models/form/FormObjectModel.js.map +1 -1
  453. package/lib/models/grouping/GroupingModel.js.map +1 -1
  454. package/lib/models/href/Href.js.map +1 -1
  455. package/lib/models/href/ListHref.js.map +1 -1
  456. package/lib/models/index.js.map +1 -1
  457. package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
  458. package/lib/models/links/LinkCollection.js.map +1 -1
  459. package/lib/models/links/LinkModel.js.map +1 -1
  460. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  461. package/lib/models/list/ListDetailModel.js.map +1 -1
  462. package/lib/models/list/ListHeaderModel.js.map +1 -1
  463. package/lib/models/list/ListItemCollection.js.map +1 -1
  464. package/lib/models/list/ListItemModel.js.map +1 -1
  465. package/lib/models/list/ListModel.js +2 -2
  466. package/lib/models/list/ListModel.js.flow +1 -2
  467. package/lib/models/list/ListModel.js.map +1 -1
  468. package/lib/models/list/__tests__/ListModel.spec.js.flow +13 -0
  469. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  470. package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
  471. package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
  472. package/lib/models/paging/PagesizeModel.js.map +1 -1
  473. package/lib/models/paging/PagingModel.js.map +1 -1
  474. package/lib/models/panels/GroupingPanelModel.js.map +1 -1
  475. package/lib/models/parameter/Parameter.js.map +1 -1
  476. package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
  477. package/lib/models/resolveModel.js.map +1 -1
  478. package/lib/models/search/CaseSearchModel.js.map +1 -1
  479. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  480. package/lib/models/sorting/SortingModel.js.map +1 -1
  481. package/lib/models/tab/TabModel.js.map +1 -1
  482. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  483. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  484. package/lib/models/types.js.map +1 -1
  485. package/lib/models/user/UserModel.js.map +1 -1
  486. package/lib/models/user/UserProfileModel.js.map +1 -1
  487. package/lib/models/user/UserServicesModel.js.map +1 -1
  488. package/lib/modularui/Authenticate.js +99 -20
  489. package/lib/modularui/Authenticate.js.flow +72 -18
  490. package/lib/modularui/Authenticate.js.map +1 -1
  491. package/lib/modularui/ModularUIError.js.map +1 -1
  492. package/lib/modularui/ModularUIRequest.js.map +1 -1
  493. package/lib/modularui/ModularUIResponse.js.map +1 -1
  494. package/lib/modularui/index.js.map +1 -1
  495. package/lib/react/ErrorBoundary.js.map +1 -1
  496. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  497. package/lib/react/index.js.map +1 -1
  498. package/lib/react/utils.js.map +1 -1
  499. package/lib/react-client/Init.js.map +1 -1
  500. package/lib/react-client/client.js.map +1 -1
  501. package/lib/react-client/contextPath.js.map +1 -1
  502. package/lib/react-client/index.js.map +1 -1
  503. package/lib/react-client/rehydrate.js.map +1 -1
  504. package/lib/react-server/__tests__/serverUtil.spec.js.flow +6 -4
  505. package/lib/react-server/contextPath.js.map +1 -1
  506. package/lib/react-server/createSSRComplete.js.map +1 -1
  507. package/lib/react-server/htmlpage.js.map +1 -1
  508. package/lib/react-server/index.js.map +1 -1
  509. package/lib/react-server/renderSSRComplete.js.map +1 -1
  510. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  511. package/lib/react-server/requestInformation.js.map +1 -1
  512. package/lib/react-server/serverNoSSR.js.map +1 -1
  513. package/lib/react-server/serverSSR.js.map +1 -1
  514. package/lib/react-server/serverUtil.js.map +1 -1
  515. package/lib/react-theme/ThemeProvider.js.map +1 -1
  516. package/lib/react-theme/createTheme.js.map +1 -1
  517. package/lib/react-theme/index.js.map +1 -1
  518. package/lib/react-theme/types.js.map +1 -1
  519. package/lib/react-theme/useTheme.js.map +1 -1
  520. package/lib/react-theme/utils/background.js.map +1 -1
  521. package/lib/react-theme/utils/colors.js.map +1 -1
  522. package/lib/react-theme/utils/contrast.js.map +1 -1
  523. package/lib/react-theme/utils/corners.js.map +1 -1
  524. package/lib/react-theme/utils/spacers.js.map +1 -1
  525. package/lib/react-theme/utils/themeProps.js.map +1 -1
  526. package/lib/redux/_i18n/actions.js.map +1 -1
  527. package/lib/redux/_i18n/index.js.map +1 -1
  528. package/lib/redux/_i18n/reducer.js.map +1 -1
  529. package/lib/redux/_i18n/types.js.map +1 -1
  530. package/lib/redux/_modularui/actions.js.map +1 -1
  531. package/lib/redux/_modularui/connector.js.map +1 -1
  532. package/lib/redux/_modularui/index.js.map +1 -1
  533. package/lib/redux/_modularui/middleware.js.map +1 -1
  534. package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
  535. package/lib/redux/_modularui/reducer.js.map +1 -1
  536. package/lib/redux/_modularui/selectors.js.map +1 -1
  537. package/lib/redux/_modularui/types.js.map +1 -1
  538. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  539. package/lib/redux/_router/actions.js.map +1 -1
  540. package/lib/redux/_router/connectors.js.map +1 -1
  541. package/lib/redux/_router/index.js.map +1 -1
  542. package/lib/redux/_router/middleware.js.map +1 -1
  543. package/lib/redux/_router/reducer.js.map +1 -1
  544. package/lib/redux/_router/types.js.map +1 -1
  545. package/lib/redux/actions/Application.js.map +1 -1
  546. package/lib/redux/actions/Authorization.js.map +1 -1
  547. package/lib/redux/actions/Error.js.map +1 -1
  548. package/lib/redux/actions/Form.js.map +1 -1
  549. package/lib/redux/actions/FormAttributeSet.js.map +1 -1
  550. package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
  551. package/lib/redux/actions/FormAutosave.js.map +1 -1
  552. package/lib/redux/actions/FormAutosubmit.js.map +1 -1
  553. package/lib/redux/actions/FormValidations.js.map +1 -1
  554. package/lib/redux/actions/Modals.js.map +1 -1
  555. package/lib/redux/actions/Notification.js.map +1 -1
  556. package/lib/redux/actions/Preferences.js +1 -1
  557. package/lib/redux/actions/Preferences.js.flow +7 -3
  558. package/lib/redux/actions/Preferences.js.map +1 -1
  559. package/lib/redux/actions/ProgressIndicator.js.map +1 -1
  560. package/lib/redux/actions/SignIn.js.map +1 -1
  561. package/lib/redux/actions/SignOut.js.map +1 -1
  562. package/lib/redux/actions/index.js.map +1 -1
  563. package/lib/redux/connectors/Application.js.map +1 -1
  564. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  565. package/lib/redux/connectors/CaseView.js.map +1 -1
  566. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  567. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  568. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  569. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  570. package/lib/redux/connectors/Form.js.map +1 -1
  571. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  572. package/lib/redux/connectors/ListDetail.js.map +1 -1
  573. package/lib/redux/connectors/Modal.js.map +1 -1
  574. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  575. package/lib/redux/connectors/Notification.js.map +1 -1
  576. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  577. package/lib/redux/connectors/Preferences.js.map +1 -1
  578. package/lib/redux/connectors/Progress.js.map +1 -1
  579. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  580. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  581. package/lib/redux/connectors/SignIn.js.map +1 -1
  582. package/lib/redux/connectors/SignOut.js.map +1 -1
  583. package/lib/redux/connectors/Tab.js.map +1 -1
  584. package/lib/redux/connectors/index.js.map +1 -1
  585. package/lib/redux/index.js.map +1 -1
  586. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  587. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  588. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  589. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  590. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  591. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  592. package/lib/redux/reducers/createReducer.js.map +1 -1
  593. package/lib/redux/reducers/index.js.map +1 -1
  594. package/lib/redux/store/beforeRenderHooks.js.map +1 -1
  595. package/lib/redux/store/configureStore.js.map +1 -1
  596. package/lib/redux/types.js.map +1 -1
  597. package/lib/utils/browser/Cache.js.map +1 -1
  598. package/lib/utils/browser/Cookies.js.map +1 -1
  599. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  600. package/lib/utils/fetch/serverFetch.js.map +1 -1
  601. package/lib/utils/fetch/types.js.map +1 -1
  602. package/lib/utils/fetch/universalFetch.js.map +1 -1
  603. package/lib/utils/fetch/xhr.js.map +1 -1
  604. package/lib/utils/helpers/checkResource.js.map +1 -1
  605. package/lib/utils/helpers/createHash.js.map +1 -1
  606. package/lib/utils/helpers/createUUID.js.map +1 -1
  607. package/lib/utils/helpers/objects.js.map +1 -1
  608. package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
  609. package/lib/utils/helpers/text.js.map +1 -1
  610. package/lib/utils/index.js.map +1 -1
  611. package/lib/utils/number/DecimalFormat.js.map +1 -1
  612. package/lib/utils/number/formatValue.js.map +1 -1
  613. package/lib/utils/number/parseNumbers.js.map +1 -1
  614. package/package.json +10 -10
  615. package/src/constants/Constants.js +1 -0
  616. package/src/constants/Settings.js +8 -3
  617. package/src/models/form/FormModel.js +1 -1
  618. package/src/models/list/ListModel.js +1 -2
  619. package/src/models/list/__tests__/ListModel.spec.js +13 -0
  620. package/src/models/list/__tests__/related-contributions.json +42 -0
  621. package/src/models/list/__tests__/related-data.json +32 -0
  622. package/src/modularui/Authenticate.js +72 -18
  623. package/src/react-server/__tests__/serverUtil.spec.js +6 -4
  624. package/src/redux/actions/Preferences.js +7 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-client/client.js"],"names":["window","parseDataToJSON","data","JSON","parse","error","JsonParseException","client","customReducers","theme","render","beforeRenderHooks","ErrorFallbackComponent","contextPath","Error","dataElement","document","querySelector","textContent","Cache","clear","browserHistory","basename","BASE","history","store","getState","loadOtherBrowserTabs","getItem","dispatch","FetchException","response","listen","location","action","onunhandledrejection","event","detail","errorMessage","reason","message","toString","body","className","addContentLoadedEvent","addEventListener","applicationNode","isSSR","mount","hydrate","reactRender"],"mappings":";;;;;;;;;;;AAEA;;AAIA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAIA;;AAEA;;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAnCA;AAEA,6BAAeA,MAAf;AAEA;;AA+CA;AACA;AACA;;AACA;AACA;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACC,IAAD,EAAU;AAChC,MAAI;AACF,WAAOC,IAAI,CAACC,KAAL,CAA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,EAAAA,qBAAqB,CAACnB,KAAD,EAAQD,OAAR,EAAiBf,KAAjB,EAAwBC,MAAxB,EAAgCE,sBAAhC,CAArB;AACD,CAjFD;AAmFA;AACA;;;AACA,IAAMgC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAC5BnB,KAD4B,EAE5BD,OAF4B,EAG5Bf,KAH4B,EAI5BC,MAJ4B,EAK5BE,sBAL4B,EAMzB;AACHZ,EAAAA,MAAM,CAAC6C,gBAAP,CAAwB,kBAAxB,EAA4C,YAAM;AAChD,QAAMC,eAAe,GAAG9B,QAAQ,CAACC,aAAT,CAAuB,cAAvB,CAAxB;;AACA,QAAI6B,eAAJ,EAAqB;AACnB,UAAMC,KAAK,GAAGD,eAAe,CAAC7B,aAAhB,CAA8B,cAA9B,CAAd;AACA,UAAM+B,KAAK,GAAGD,KAAK,GAAGE,iBAAH,GAAaC,gBAAhC;AACAF,MAAAA,KAAK,eACH,qBAAC,aAAD;AACE,QAAA,KAAK,EAAEvB,KADT;AAEE,QAAA,OAAO,EAAED,OAFX;AAGE,QAAA,WAAW,EAAExB,MAAM,CAACa,WAHtB;AAIE,QAAA,KAAK,EAAEJ,KAJT;AAKE,QAAA,sBAAsB,EAAEG,sBAL1B;AAAA,kBAOGF,MAAM;AAPT,QADG,EAUHoC,eAVG,CAAL;AAYD,KAfD,MAeO;AACL,YAAM,IAAIhC,KAAJ,CACJ,8DADI,CAAN;AAGD;AACF,GAtBD;AAuBD,CA9BD;;eAgCeP,M","sourcesContent":["// @flow\n/* polyfills needed for ie11 */\nimport elementClosest from \"element-closest\";\nelementClosest(window);\n\n/* polyfill for focus-visible */\nimport \"focus-visible\";\n\nimport { hydrate, render as reactRender } from \"react-dom\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport { BASE } from \"../constants/Constants\";\n\nimport {\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\n\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\n\nimport { locationChange } from \"../redux/_router/actions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport Init from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type { ComponentType } from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\nexport type Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: Function,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\n/**\n */\nconst parseDataToJSON = (data) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, used client side when JavaScript is enabled.\n */\nconst client = ({\n customReducers = {},\n theme = {},\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n}: Props = {}) => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement.textContent.trim() === \"\") {\n return;\n }\n\n const data = parseDataToJSON(dataElement.textContent);\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: BASE,\n });\n const { history, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data)\n );\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n });\n\n if (has(data, \"error.name\")) {\n const error = new FetchException(data.error.response);\n store.dispatch(handleError(error));\n }\n\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n history.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n /**\n */\n window.onunhandledrejection = (event) => {\n if (event.detail) {\n return setImmediate(() => {\n const errorMessage = event.detail.reason.message.toString();\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.detail.reason;\n });\n }\n\n return event;\n };\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n\n addContentLoadedEvent(store, history, theme, render, ErrorFallbackComponent);\n};\n\n/**\n */\nconst addContentLoadedEvent = (\n store,\n history,\n theme,\n render,\n ErrorFallbackComponent\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (applicationNode) {\n const isSSR = applicationNode.querySelector(\".application\");\n const mount = isSSR ? hydrate : reactRender;\n mount(\n <Init\n store={store}\n history={history}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n applicationNode\n );\n } else {\n throw new Error(\n \"No DOM element with id application found to attach client to\"\n );\n }\n });\n};\n\nexport default client;\n"],"file":"client.js"}
1
+ {"version":3,"file":"client.js","names":["window","parseDataToJSON","data","JSON","parse","error","JsonParseException","client","customReducers","theme","render","beforeRenderHooks","ErrorFallbackComponent","contextPath","Error","dataElement","document","querySelector","textContent","Cache","clear","browserHistory","basename","BASE","history","store","getState","loadOtherBrowserTabs","getItem","dispatch","FetchException","response","listen","location","action","onunhandledrejection","event","detail","errorMessage","reason","message","toString","body","className","addContentLoadedEvent","addEventListener","applicationNode","isSSR","mount","hydrate","reactRender"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\n/* polyfills needed for ie11 */\nimport elementClosest from \"element-closest\";\nelementClosest(window);\n\n/* polyfill for focus-visible */\nimport \"focus-visible\";\n\nimport { hydrate, render as reactRender } from \"react-dom\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport { BASE } from \"../constants/Constants\";\n\nimport {\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\n\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\n\nimport { locationChange } from \"../redux/_router/actions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport Init from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type { ComponentType } from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\nexport type Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: Function,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\n/**\n */\nconst parseDataToJSON = (data) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, used client side when JavaScript is enabled.\n */\nconst client = ({\n customReducers = {},\n theme = {},\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n}: Props = {}) => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement.textContent.trim() === \"\") {\n return;\n }\n\n const data = parseDataToJSON(dataElement.textContent);\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: BASE,\n });\n const { history, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data)\n );\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n });\n\n if (has(data, \"error.name\")) {\n const error = new FetchException(data.error.response);\n store.dispatch(handleError(error));\n }\n\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n history.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n /**\n */\n window.onunhandledrejection = (event) => {\n if (event.detail) {\n return setImmediate(() => {\n const errorMessage = event.detail.reason.message.toString();\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.detail.reason;\n });\n }\n\n return event;\n };\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n\n addContentLoadedEvent(store, history, theme, render, ErrorFallbackComponent);\n};\n\n/**\n */\nconst addContentLoadedEvent = (\n store,\n history,\n theme,\n render,\n ErrorFallbackComponent\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (applicationNode) {\n const isSSR = applicationNode.querySelector(\".application\");\n const mount = isSSR ? hydrate : reactRender;\n mount(\n <Init\n store={store}\n history={history}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n applicationNode\n );\n } else {\n throw new Error(\n \"No DOM element with id application found to attach client to\"\n );\n }\n });\n};\n\nexport default client;\n"],"mappings":";;;;;;;;;;;AAEA;;AAIA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAIA;;AAEA;;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;AAnCA;AAEA,6BAAeA,MAAf;AAEA;;AA+CA;AACA;AACA;;AACA;AACA;AACA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,CAACC,IAAD,EAAU;EAChC,IAAI;IACF,OAAOC,IAAI,CAACC,KAAL,CAAWF,IAAX,CAAP;EACD,CAFD,CAEE,OAAOG,KAAP,EAAc;IACd,MAAM,IAAIC,8BAAJ,iCAAgDJ,IAAhD,EAAN;EACD;AACF,CAND;AAQA;AACA;AACA;;;AACA,IAAMK,MAAM,GAAG,SAATA,MAAS,GAMG;EAAA;;EAAA,+EAAP,EAAO;EAAA,+BALhBC,cAKgB;EAAA,IALhBA,cAKgB,oCALC,EAKD;EAAA,sBAJhBC,KAIgB;EAAA,IAJhBA,KAIgB,2BAJR,EAIQ;EAAA,IAHhBC,MAGgB,QAHhBA,MAGgB;EAAA,IAFhBC,iBAEgB,QAFhBA,iBAEgB;EAAA,IADhBC,sBACgB,QADhBA,sBACgB;;EAChB,IAAI,OAAOZ,MAAM,CAACa,WAAd,KAA8B,WAAlC,EAA+C;IAC7C,MAAM,IAAIC,KAAJ,CAAU,sCAAV,CAAN;EACD;;EAED,IAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAT,CAClB,4DADkB,CAApB;;EAGA,IAAI,CAACF,WAAL,EAAkB;IAChB,MAAM,IAAID,KAAJ,CAAU,qCAAV,CAAN;EACD,CAFD,MAEO,IAAI,8BAAAC,WAAW,CAACG,WAAZ,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J,8DADI,CAAN;IAGD;EACF,CAtBD;AAuBD,CA9BD;;eAgCeP,M"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-client/contextPath.js"],"names":["x","dataElement","document","querySelector","Error","contextPath","getAttribute","window","filePath","__webpack_public_path__","nonce","__webpack_nonce__"],"mappings":";;;;;;AACA,CAAC,SAASA,CAAT,GAAa;AACZ,MAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAT,CAClB,4DADkB,CAApB;;AAGA,MAAI,CAACF,WAAL,EAAkB;AAChB,UAAM,IAAIG,KAAJ,CACJ,uEADI,CAAN;AAGD;;AAED,MAAMC,WAAW,GAAGJ,WAAW,CAACK,YAAZ,CAAyB,sBAAzB,CAApB;;AACA,MAAID,WAAJ,EAAiB;AACfE,IAAAA,MAAM,CAACF,WAAP,GAAqBA,WAArB;AACD;;AAED,MAAMG,QAAQ,GAAGP,WAAW,CAACK,YAAZ,CAAyB,mBAAzB,CAAjB;;AACA,MAAIE,QAAQ,IAAIA,QAAQ,KAAK,YAA7B,EAA2C;AACzCC,IAAAA,uBAAuB,aAAMD,QAAN,MAAvB,CADyC,CACC;AAC3C,GAFD,MAEO,IAAIH,WAAJ,EAAiB;AACtBI,IAAAA,uBAAuB,aAAMJ,WAAN,MAAvB,CADsB,CACuB;AAC9C;;AAED,MAAMK,KAAK,GAAGT,WAAW,CAACK,YAAZ,CAAyB,gBAAzB,CAAd;;AACA,MAAII,KAAJ,EAAW;AACTC,IAAAA,iBAAiB,GAAGD,KAApB,CADS,CACkB;AAC5B;AACF,CA1BD","sourcesContent":["// @flow\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path\"\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n window.contextPath = contextPath;\n }\n\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"file":"contextPath.js"}
1
+ {"version":3,"file":"contextPath.js","names":["x","dataElement","document","querySelector","Error","contextPath","getAttribute","window","filePath","__webpack_public_path__","nonce","__webpack_nonce__"],"sources":["../../src/react-client/contextPath.js"],"sourcesContent":["// @flow\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path\"\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n window.contextPath = contextPath;\n }\n\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"mappings":";;;;;;AACA,CAAC,SAASA,CAAT,GAAa;EACZ,IAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAT,CAClB,4DADkB,CAApB;;EAGA,IAAI,CAACF,WAAL,EAAkB;IAChB,MAAM,IAAIG,KAAJ,CACJ,uEADI,CAAN;EAGD;;EAED,IAAMC,WAAW,GAAGJ,WAAW,CAACK,YAAZ,CAAyB,sBAAzB,CAApB;;EACA,IAAID,WAAJ,EAAiB;IACfE,MAAM,CAACF,WAAP,GAAqBA,WAArB;EACD;;EAED,IAAMG,QAAQ,GAAGP,WAAW,CAACK,YAAZ,CAAyB,mBAAzB,CAAjB;;EACA,IAAIE,QAAQ,IAAIA,QAAQ,KAAK,YAA7B,EAA2C;IACzCC,uBAAuB,aAAMD,QAAN,MAAvB,CADyC,CACC;EAC3C,CAFD,MAEO,IAAIH,WAAJ,EAAiB;IACtBI,uBAAuB,aAAMJ,WAAN,MAAvB,CADsB,CACuB;EAC9C;;EAED,IAAMK,KAAK,GAAGT,WAAW,CAACK,YAAZ,CAAyB,gBAAzB,CAAd;;EACA,IAAII,KAAJ,EAAW;IACTC,iBAAiB,GAAGD,KAApB,CADS,CACkB;EAC5B;AACF,CA1BD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-client/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA","sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as Init } from \"./Init\";\n\nexport { default as client } from \"./client\";\nexport type { Props } from \"./client\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/react-client/index.js"],"sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as Init } from \"./Init\";\n\nexport { default as client } from \"./client\";\nexport type { Props } from \"./client\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-client/rehydrate.js"],"names":["recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","model","childModels","childModel","addChildModels","isModularUIModelData","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","state","mappedState","forEach"],"mappings":";;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,IAAD,EAAkB;AACtC,MAAMC,SAAS,GAAGC,2BAAkBC,SAAlB,CAA4BH,IAA5B,CAAlB;;AAEA,MAAMI,KAAK,GAAG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UAAF,aAAEA,UAAF,uBAAEA,UAAU,CAAEM;AAFf,KAAP;AAID;;AAED,MAAMC,oBAAoB,GAAG,CAAC,aAAD,EAAgB,QAAhB,EAA0B,mBAA1B,CAA7B;;AACA,MAAI,uBAAAA,oBAAoB,MAApB,CAAAA,oBAAoB,EAAUR,QAAV,CAAxB,EAA6C;AAC3C,WAAOC,UAAP;AACD;;AAED,MAAIA,UAAU,KAAK,IAAf,IAAuB,sBAAOA,UAAP,MAAsB,QAAjD,EAA2D;AACzD,WAAOT,SAAS,CAACS,UAAD,CAAhB,CADyD,CAC3B;AAC/B;;AAED,SAAOA,UAAP;AACD,CA9BD;AAgCA;AACA;AACA;;;AACA,IAAMT,SAAS,GAAG,SAAZA,SAAY,CAACiB,KAAD,EAA4B;AAC5C,MAAMC,WAAW,GAAG,EAApB;AAEA,qBAAYD,KAAZ,EAAmBE,OAAnB,CAA2B,UAACX,QAAD,EAAc;AACvC,QAAMC,UAAU,GAAGQ,KAAK,CAACT,QAAD,CAAxB;AACAU,IAAAA,WAAW,CAACV,QAAD,CAAX,GAAwBD,eAAe,CAACC,QAAD,EAAWC,UAAX,CAAvC;AACD,GAHD;AAKA,SAAOS,WAAP;AACD,CATD;;eAWelB,S","sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel)\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey, stateValue) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"file":"rehydrate.js"}
1
+ {"version":3,"file":"rehydrate.js","names":["recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","model","childModels","childModel","addChildModels","isModularUIModelData","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","state","mappedState","forEach"],"sources":["../../src/react-client/rehydrate.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel)\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey, stateValue) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,IAAD,EAAkB;EACtC,IAAMC,SAAS,GAAGC,2BAAkBC,SAAlB,CAA4BH,IAA5B,CAAlB;;EAEA,IAAMI,KAAK,GAAG,2BAAaH,SAAb,CAAd;;EAEA,IAAIG,KAAJ,EAAW;IAAA;;IACT,IAAMC,KAAK,GAAG,IAAID,KAAJ,CAAUH,SAAV,CAAd;IACAI,KAAK,CAACF,SAAN,CAAgBH,IAAhB;IAEA,IAAMM,WAAW,GAAG,6BAAAN,IAAI,CAACM,WAAL,iBAAqB,UAACC,UAAD;MAAA,OACvCR,aAAa,CAACQ,UAAD,C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AP,MAAsB,QAAjD,EAA2D;IACzD,OAAOT,SAAS,CAACS,UAAD,CAAhB,CADyD,CAC3B;EAC/B;;EAED,OAAOA,UAAP;AACD,CA9BD;AAgCA;AACA;AACA;;;AACA,IAAMT,SAAS,GAAG,SAAZA,SAAY,CAACiB,KAAD,EAA4B;EAC5C,IAAMC,WAAW,GAAG,EAApB;EAEA,mBAAYD,KAAZ,EAAmBE,OAAnB,CAA2B,UAACX,QAAD,EAAc;IACvC,IAAMC,UAAU,GAAGQ,KAAK,CAACT,QAAD,CAAxB;IACAU,WAAW,CAACV,QAAD,CAAX,GAAwBD,eAAe,CAACC,QAAD,EAAWC,UAAX,CAAvC;EACD,CAHD;EAKA,OAAOS,WAAP;AACD,CATD;;eAWelB,S"}
@@ -112,10 +112,11 @@ describe("serverUtil", () => {
112
112
  {
113
113
  type: "SET_PREFERENCES",
114
114
  payload: {
115
- "FormClient.login_url": "/BeInformed/j_security_check",
116
- "FormClient.logout_url": "/BeInformed/Logoff",
115
+ "FormClient.login_url": "/j_security_check",
116
+ "FormClient.logout_url": "/Logoff",
117
117
  "FormClient.password_field_name": "j_password",
118
118
  "FormClient.username_field_name": "j_username",
119
+ "security.clients": null,
119
120
  },
120
121
  },
121
122
  ]);
@@ -158,10 +159,11 @@ describe("serverUtil", () => {
158
159
  {
159
160
  type: "SET_PREFERENCES",
160
161
  payload: {
161
- "FormClient.login_url": "/BeInformed/j_security_check",
162
- "FormClient.logout_url": "/BeInformed/Logoff",
162
+ "FormClient.login_url": "/j_security_check",
163
+ "FormClient.logout_url": "/Logoff",
163
164
  "FormClient.password_field_name": "j_password",
164
165
  "FormClient.username_field_name": "j_username",
166
+ "security.clients": null,
165
167
  },
166
168
  },
167
169
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/contextPath.js"],"names":["x","__webpack_public_path__","BASE"],"mappings":";;;;;;AACA;;AAEA,CAAC,SAASA,CAAT,GAAa;AACZC,EAAAA,uBAAuB,aAAMC,eAAN,MAAvB,CADY,CAC0B;AACvC,CAFD","sourcesContent":["// @flow\nimport { BASE } from \"../constants/Constants\";\n\n(function x() {\n __webpack_public_path__ = `${BASE}/`; // NOSONAR\n})();\n\nexport {};\n"],"file":"contextPath.js"}
1
+ {"version":3,"file":"contextPath.js","names":["x","__webpack_public_path__","BASE"],"sources":["../../src/react-server/contextPath.js"],"sourcesContent":["// @flow\nimport { BASE } from \"../constants/Constants\";\n\n(function x() {\n __webpack_public_path__ = `${BASE}/`; // NOSONAR\n})();\n\nexport {};\n"],"mappings":";;;;;;AACA;;AAEA,CAAC,SAASA,CAAT,GAAa;EACZC,uBAAuB,aAAMC,eAAN,MAAvB,CADY,CAC0B;AACvC,CAFD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/createSSRComplete.js"],"names":["noLoading","state","modularui","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","createSSRComplete","store","render","loadingCount","getState","html","resolve","reject","unsubscribe","subscribe","previousCount","error"],"mappings":";;;;;;;;;;;;;;;AACA;;AAIA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;AAAA;;AAAA,SAChB,mDAAYA,KAAK,CAACC,SAAlB,kBACE,UAACC,GAAD;AAAA,WAASF,KAAK,CAACC,SAAN,CAAgBC,GAAhB,EAAqBC,MAArB,KAAgCC,4BAAiBC,OAA1D;AAAA,GADF,EAEEC,MAFF,KAEa,CAHG;AAAA,CAAlB;AAKA;AACA;;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACP,KAAD;AAAA;;AAAA,SACrB,oDAAYA,KAAK,CAACC,SAAlB,mBACE,UAACC,GAAD;AAAA,WAASF,KAAK,CAACC,SAAN,CAAgBC,GAAhB,EAAqBC,MAArB,KAAgCC,4BAAiBC,OAA1D;AAAA,GADF,EAEEC,MAHmB;AAAA,CAAvB;AAKA;AACA;;;AACA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CACxBC,KADwB,EAExBC,MAFwB,EAGJ;AACpB,MAAIC,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAN,EAAD,CAAjC;AACA,MAAIC,IAAI,GAAG,8BAAX;AAEA,SAAO,qBAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;AACtC,QAAMC,WAAW,GAAGP,KAAK,CAACQ,SAAN,CAAgB,YAAM;AACxC,UAAMC,aAAa,GAAGP,YAAtB;AACAA,MAAAA,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAN,EAAD,CAA7B;;AAEA,UAAIM,aAAa,KAAKP,YAAlB,IAAkCZ,SAAS,CAACU,KAAK,CAACG,QAAN,EAAD,CAA/C,EAAmE;AACjE,YAAI;AACFC,UAAAA,IAAI,GAAGH,MAAM,EAAb;AACD,SAFD,CAEE,OAAOS,KAAP,EAAc;AACdJ,UAAAA,MAAM,CAACI,KAAD,CAAN;AACA;AACD;;AAED,YAAIpB,SAAS,CAACU,KAAK,CAACG,QAAN,EAAD,CAAb,EAAiC;AAC/BI,UAAAA,WAAW;AACXF,UAAAA,OAAO,CAACD,IAAD,CAAP;AACD;AACF;AACF,KAjBmB,CAApB;;AAmBA,QAAI;AACFA,MAAAA,IAAI,GAAGH,MAAM,EAAb;AACD,KAFD,CAEE,OAAOS,KAAP,EAAc;AACdJ,MAAAA,MAAM,CAACI,KAAD,CAAN;AACA;AACD;;AAED,QAAIpB,SAAS,CAACU,KAAK,CAACG,QAAN,EAAD,CAAb,EAAiC;AAC/BI,MAAAA,WAAW;AACXF,MAAAA,OAAO,CAACD,IAAD,CAAP;AACD;AACF,GA/BM,CAAP;AAgCD,CAvCD;;eAyCeL,iB","sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state) =>\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"],"file":"createSSRComplete.js"}
1
+ {"version":3,"file":"createSSRComplete.js","names":["noLoading","state","modularui","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","createSSRComplete","store","render","loadingCount","getState","html","resolve","reject","unsubscribe","subscribe","previousCount","error"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length;\n\n/**\n */\nconst createSSRComplete = (\n store: ReduxStore,\n render: Function\n): Promise<string> => {\n let loadingCount = loadingCounter(store.getState());\n let html = \"<div>Nothing to render</div>\";\n\n return new Promise((resolve, reject) => {\n const unsubscribe = store.subscribe(() => {\n const previousCount = loadingCount;\n loadingCount = loadingCounter(store.getState());\n\n if (previousCount !== loadingCount && noLoading(store.getState())) {\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n }\n });\n\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n });\n};\n\nexport default createSSRComplete;\n"],"mappings":";;;;;;;;;;;;;;;AACA;;AAIA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;EAAA;;EAAA,OAChB,mDAAYA,KAAK,CAACC,SAAlB,kBACE,UAACC,GAAD;IAAA,OAASF,KAAK,CAACC,SAAN,CAAgBC,GAAhB,EAAqBC,MAArB,KAAgCC,4BAAiBC,OAA1D;EAAA,CADF,EAEEC,MAFF,KAEa,CAHG;AAAA,CAAlB;AAKA;AACA;;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAACP,KAAD;EAAA;;EAAA,OACrB,oDAAYA,KAAK,CAACC,SAAlB,mBACE,UAACC,GAAD;IAAA,OAASF,KAAK,CAACC,SAAN,CAAgBC,GAAhB,EAAqBC,MAArB,KAAgCC,4BAAiBC,OAA1D;EAAA,CADF,EAEEC,MAHmB;AAAA,CAAvB;AAKA;AACA;;;AACA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB,CACxBC,KADwB,EAExBC,MAFwB,EAGJ;EACpB,IAAIC,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAN,EAAD,CAAjC;EACA,IAAIC,IAAI,GAAG,8BAAX;EAEA,OAAO,qBAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;IACtC,IAAMC,WAAW,GAAGP,KAAK,CAACQ,SAAN,CAAgB,YAAM;MACxC,IAAMC,aAAa,GAAGP,YAAtB;MACAA,YAAY,GAAGJ,cAAc,CAACE,KAAK,CAACG,QAAN,EAAD,CAA7B;;MAEA,IAAIM,aAAa,KAAKP,YAAlB,IAAkCZ,SAAS,CAACU,KAAK,CAACG,QAAN,EAAD,CAA/C,EAAmE;QACjE,IAAI;UACFC,IAAI,GAAGH,MAAM,EAAb;QACD,CAFD,CAEE,OAAOS,KAAP,EAAc;UACdJ,MAAM,CAACI,KAAD,CAAN;UACA;QACD;;QAED,IAAIpB,SAAS,CAACU,KAAK,CAACG,QAAN,EAAD,CAAb,EAAiC;UAC/BI,WAAW;UACXF,OAAO,CAACD,IAAD,CAAP;QACD;MACF;IACF,CAjBmB,CAApB;;IAmBA,IAAI;MACFA,IAAI,GAAGH,MAAM,EAAb;IACD,CAFD,CAEE,OAAOS,KAAP,EAAc;MACdJ,MAAM,CAACI,KAAD,CAAN;MACA;IACD;;IAED,IAAIpB,SAAS,CAACU,KAAK,CAACG,QAAN,EAAD,CAAb,EAAiC;MAC/BI,WAAW;MACXF,OAAO,CAACD,IAAD,CAAP;IACD;EACF,CA/BM,CAAP;AAgCD,CAvCD;;eAyCeL,iB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/htmlpage.js"],"names":["htmlpage","contextPath","html","head","state","UUID","undefined","IllegalArgumentException","template","htmlAttributes","toString","key","join","replace"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;;AAUA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAMiB;AAAA;;AAAA,iFAAf,EAAe;AAAA,MALhCC,WAKgC,QALhCA,WAKgC;AAAA,MAJhCC,IAIgC,QAJhCA,IAIgC;AAAA,uBAHhCC,IAGgC;AAAA,MAHhCA,IAGgC,0BAHzB,EAGyB;AAAA,wBAFhCC,KAEgC;AAAA,MAFhCA,KAEgC,2BAFxB,EAEwB;AAAA,uBADhCC,IACgC;AAAA,MADhCA,IACgC,0BADzB,EACyB;;AAChC,MAAIJ,WAAW,KAAKK,SAApB,EAA+B;AAC7B,UAAM,IAAIC,oCAAJ,CAA6B,8BAA7B,CAAN;AACD;;AACD,MAAIL,IAAI,KAAKI,SAAb,EAAwB;AACtB,UAAM,IAAIC,oCAAJ,CAA6B,yBAA7B,CAAN;AACD;;AAED,MAAMC,QAAQ,6KAENL,IAAI,IAAIA,IAAI,CAACM,cAAb,GAA8BN,IAAI,CAACM,cAAL,CAAoBC,QAApB,EAA9B,GAA+D,EAFzD,8EAKR,kFAAYP,IAAZ,mBACQ,UAACQ,GAAD;AAAA,WAASA,GAAG,KAAK,gBAAjB;AAAA,GADR,mBAEK,UAACA,GAAD;AAAA,WAASR,IAAI,CAACQ,GAAD,CAAJ,CAAUD,QAAV,EAAT;AAAA,GAFL,EAGCE,IAHD,CAGM,EAHN,CALQ,yMAYcV,IAZd,2QAmBUG,IAnBV,yBAmBmBD,KAnBnB,mHAAd,CARgC,CAiChC;AACA;AACA;;AACA,SAAO,+BAAAI,QAAQ,CAACK,OAAT,CAAiB,iBAAjB,EAAoCZ,WAApC,kBAAP;AACD,CA3CD;;eA6CeD,Q","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 = ({\n contextPath,\n html,\n head = {},\n state = \"\",\n UUID = \"\",\n}: TemplateProps = {}): string => {\n if (contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const template = `\n <!doctype html>\n <html ${head && 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\">${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=\"${UUID}\">${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, contextPath).trim();\n};\n\nexport default htmlpage;\n"],"file":"htmlpage.js"}
1
+ {"version":3,"file":"htmlpage.js","names":["htmlpage","contextPath","html","head","state","UUID","undefined","IllegalArgumentException","template","htmlAttributes","toString","key","join","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 = ({\n contextPath,\n html,\n head = {},\n state = \"\",\n UUID = \"\",\n}: TemplateProps = {}): string => {\n if (contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const template = `\n <!doctype html>\n <html ${head && 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\">${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=\"${UUID}\">${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, contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;;AAUA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAMiB;EAAA;;EAAA,+EAAf,EAAe;EAAA,IALhCC,WAKgC,QALhCA,WAKgC;EAAA,IAJhCC,IAIgC,QAJhCA,IAIgC;EAAA,qBAHhCC,IAGgC;EAAA,IAHhCA,IAGgC,0BAHzB,EAGyB;EAAA,sBAFhCC,KAEgC;EAAA,IAFhCA,KAEgC,2BAFxB,EAEwB;EAAA,qBADhCC,IACgC;EAAA,IADhCA,IACgC,0BADzB,EACyB;;EAChC,IAAIJ,WAAW,KAAKK,SAApB,EAA+B;IAC7B,MAAM,IAAIC,oCAAJ,CAA6B,8BAA7B,CAAN;EACD;;EACD,IAAIL,IAAI,KAAKI,SAAb,EAAwB;IACtB,MAAM,IAAIC,oCAAJ,CAA6B,yBAA7B,CAAN;EACD;;EAED,IAAMC,QAAQ,6KAENL,IAAI,IAAIA,IAAI,CAACM,cAAb,GAA8BN,IAAI,CAACM,cAAL,CAAoBC,QAApB,EAA9B,GAA+D,EAFzD,8EAKR,kFAAYP,IAAZ,mBACQ,UAACQ,GAAD;IAAA,OAASA,GAAG,KAAK,gBAAjB;EAAA,CADR,mBAEK,UAACA,GAAD;IAAA,OAASR,IAAI,CAACQ,GAAD,CAAJ,CAAUD,QAAV,EAAT;EAAA,CAFL,EAGCE,IAHD,CAGM,EAHN,CALQ,yMAYcV,IAZd,2QAmBUG,IAnBV,yBAmBmBD,KAnBnB,mHAAd,CARgC,CAiChC;EACA;EACA;;EACA,OAAO,+BAAAI,QAAQ,CAACK,OAAT,CAAiB,iBAAjB,EAAoCZ,WAApC,kBAAP;AACD,CA3CD;;eA6CeD,Q"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as renderSSRComplete } from \"./renderSSRComplete\";\nexport { default as renderSSRMinimal } from \"./renderSSRMinimal\";\n\nexport { default as serverNoSSR } from \"./serverNoSSR\";\nexport { default as serverSSR } from \"./serverSSR\";\n\nexport { default as htmlpage } from \"./htmlpage\";\n\nexport * from \"./requestInformation\";\nexport * from \"./serverUtil\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/react-server/index.js"],"sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as renderSSRComplete } from \"./renderSSRComplete\";\nexport { default as renderSSRMinimal } from \"./renderSSRMinimal\";\n\nexport { default as serverNoSSR } from \"./serverNoSSR\";\nexport { default as serverSSR } from \"./serverSSR\";\n\nexport { default as htmlpage } from \"./htmlpage\";\n\nexport * from \"./requestInformation\";\nexport * from \"./serverUtil\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/renderSSRComplete.js"],"names":["renderSSRComplete","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","routerContext","sheet","ServerStyleSheet","location","toLocation","instance","BASE","then","appHTML","head","contextPath","html","state","catch","error","message","fileName","lineNumber","stack","helmet"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;;;AAiBA;AACA;AACA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,OAQI;AAAA,MAP5BC,KAO4B,QAP5BA,KAO4B;AAAA,wBAN5BC,KAM4B;AAAA,MAN5BA,KAM4B,2BANpB,EAMoB;AAAA,uBAL5BC,IAK4B;AAAA,MAL5BA,IAK4B,0BALrB,EAKqB;AAAA,MAJ5BC,WAI4B,QAJ5BA,WAI4B;AAAA,MAH5BC,MAG4B,QAH5BA,MAG4B;AAAA,MAF5BC,SAE4B,QAF5BA,SAE4B;AAAA,2BAD5BC,QAC4B;AAAA,MAD5BA,QAC4B,8BADjBC,iBACiB;AAC5B,MAAMC,aAAa,GAAG,EAAtB;AACA,MAAMC,aAAa,GAAG,EAAtB;AAEA,MAAMC,KAAK,GAAG,IAAIC,kCAAJ,EAAd,CAJ4B,CAM5B;AACA;;AACA,MAAMC,QAAkB,GAAGT,WAAW,CAACU,UAAZ,EAA3B;AAEA,SAAO,gCAAkBb,KAAlB,EAAyB;AAAA,WAC9B,0CACE,qBAAC,oBAAD;AAAU,MAAA,KAAK,EAAEA,KAAjB;AAAA,6BACE,qBAAC,mCAAD;AAAmB,QAAA,KAAK,EAAEU,KAAK,CAACI,QAAhC;AAAA,+BACE,qBAAC,sBAAD;AAAe,UAAA,KAAK,EAAEb,KAAtB;AAAA,iCACE,qBAAC,gCAAD;AAAgB,YAAA,OAAO,EAAEO,aAAzB;AAAA,mCACE,qBAAC,sBAAD;AAAA,qCACE,qBAAC,yBAAD;AACE,gBAAA,QAAQ,EAAEO,eADZ;AAEE,gBAAA,QAAQ,EAAEH,QAFZ;AAGE,gBAAA,OAAO,EAAEH,aAHX;AAAA,0BAKGL,MAAM;AALT;AADF;AADF;AADF;AADF;AADF,MADF,CAD8B;AAAA,GAAzB,EAqBJY,IArBI,CAqBC,UAACC,OAAD,EAAa;AACjB,kCAAajB,KAAb;AACA,QAAMkB,IAAI,GAAG,4BAAWR,KAAX,EAAkBR,IAAlB,EAAwBM,aAAxB,CAAb;AACA,WAAOF,QAAQ,CAAC;AACda,MAAAA,WAAW,EAAEJ,eADC;AAEdK,MAAAA,IAAI,EAAEH,OAFQ;AAGdC,MAAAA,IAAI,EAAJA,IAHc;AAIdG,MAAAA,KAAK,EAAE,2BAAUrB,KAAV,CAJO;AAKdE,MAAAA,IAAI,EAAJA;AALc,KAAD,CAAf;AAOD,GA/BI,EAgCJoB,KAhCI,CAgCE,UAACC,KAAD;AAAA,WACLjB,QAAQ,CAAC;AACPa,MAAAA,WAAW,EAAEJ,eADN;AAEPK,MAAAA,IAAI,EAAE,0CACJ,qBAAC,mCAAD;AAAmB,QAAA,KAAK,EAAEV,KAAK,CAACI,QAAhC;AAAA,+BACE,qBAAC,sBAAD;AAAe,UAAA,KAAK,EAAEb,KAAtB;AAAA,iCACE,qBAAC,SAAD;AACE,YAAA,YAAY,EAAEsB,KAAK,CAACC,OADtB;AAEE,YAAA,aAAa,EAAED,KAAK,CAACE,QAFvB;AAGE,YAAA,SAAS,EAAEF,KAAK,CAACG,UAHnB;AAIE,YAAA,UAAU,EAAEH,KAAK,CAACI;AAJpB;AADF;AADF,QADI,CAFC;AAcPT,MAAAA,IAAI,EAAEV,aAAa,CAACoB,MAdb;AAePP,MAAAA,KAAK,EAAE,EAfA;AAgBPnB,MAAAA,IAAI,EAAJA;AAhBO,KAAD,CADH;AAAA,GAhCF,CAAP;AAoDD,CAtED;;eAwEeH,iB","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 { BASE } from \"../constants/Constants\";\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 = {};\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 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={BASE}\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: BASE,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: BASE,\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"],"file":"renderSSRComplete.js"}
1
+ {"version":3,"file":"renderSSRComplete.js","names":["renderSSRComplete","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","routerContext","sheet","ServerStyleSheet","location","toLocation","instance","BASE","then","appHTML","head","contextPath","html","state","catch","error","message","fileName","lineNumber","stack","helmet"],"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 { BASE } from \"../constants/Constants\";\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 = {};\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 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={BASE}\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: BASE,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: BASE,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n })\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;;;AAiBA;AACA;AACA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,OAQI;EAAA,IAP5BC,KAO4B,QAP5BA,KAO4B;EAAA,sBAN5BC,KAM4B;EAAA,IAN5BA,KAM4B,2BANpB,EAMoB;EAAA,qBAL5BC,IAK4B;EAAA,IAL5BA,IAK4B,0BALrB,EAKqB;EAAA,IAJ5BC,WAI4B,QAJ5BA,WAI4B;EAAA,IAH5BC,MAG4B,QAH5BA,MAG4B;EAAA,IAF5BC,SAE4B,QAF5BA,SAE4B;EAAA,yBAD5BC,QAC4B;EAAA,IAD5BA,QAC4B,8BADjBC,iBACiB;EAC5B,IAAMC,aAAa,GAAG,EAAtB;EACA,IAAMC,aAAa,GAAG,EAAtB;EAEA,IAAMC,KAAK,GAAG,IAAIC,kCAAJ,EAAd,CAJ4B,CAM5B;EACA;;EACA,IAAMC,QAAkB,GAAGT,WAAW,CAACU,UAAZ,EAA3B;EAEA,OAAO,gCAAkBb,KAAlB,EAAyB;IAAA,OAC9B,0CACE,qBAAC,oBAAD;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,IAAI,EAAJA;IAhBO,CAAD,CADH;EAAA,CAhCF,CAAP;AAoDD,CAtED;;eAwEeH,iB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/renderSSRMinimal.js"],"names":["renderSSRMinimal","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","instance","head","contextPath","BASE","html","state"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;;;AAaA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,OAMJ;AAAA,MALnBC,KAKmB,QALnBA,KAKmB;AAAA,wBAJnBC,KAImB;AAAA,MAJnBA,KAImB,2BAJX,EAIW;AAAA,uBAHnBC,IAGmB;AAAA,MAHnBA,IAGmB,0BAHZ,EAGY;AAAA,MAFnBC,MAEmB,QAFnBA,MAEmB;AAAA,2BADnBC,QACmB;AAAA,MADnBA,QACmB,8BADRC,iBACQ;AACnB,MAAMC,KAAK,GAAG,IAAIC,kCAAJ,EAAd;AAEA,MAAMC,OAAO,GAAG,0CACd,qBAAC,oBAAD;AAAU,IAAA,KAAK,EAAER,KAAjB;AAAA,2BACE,qBAAC,mCAAD;AAAmB,MAAA,KAAK,EAAEM,KAAK,CAACG,QAAhC;AAAA,6BACE,qBAAC,sBAAD;AAAe,QAAA,KAAK,EAAER,KAAtB;AAAA,kBAA8BE,MAAM;AAApC;AADF;AADF,IADc,CAAhB;AAQA,MAAMO,IAAI,GAAG,4BAAWJ,KAAX,EAAkBJ,IAAlB,CAAb;AACA,SAAOE,QAAQ,CAAC;AACdO,IAAAA,WAAW,EAAEC,eADC;AAEdC,IAAAA,IAAI,EAAEL,OAFQ;AAGdE,IAAAA,IAAI,EAAJA,IAHc;AAIdI,IAAAA,KAAK,EAAE,2BAAUd,KAAV,CAJO;AAKdE,IAAAA,IAAI,EAAJA;AALc,GAAD,CAAf;AAOD,CAzBD;;eA2BeH,gB","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 { BASE } from \"../constants/Constants\";\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,\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: BASE,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"file":"renderSSRMinimal.js"}
1
+ {"version":3,"file":"renderSSRMinimal.js","names":["renderSSRMinimal","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","instance","head","contextPath","BASE","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 { BASE } from \"../constants/Constants\";\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,\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: BASE,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;;;AAaA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,OAMJ;EAAA,IALnBC,KAKmB,QALnBA,KAKmB;EAAA,sBAJnBC,KAImB;EAAA,IAJnBA,KAImB,2BAJX,EAIW;EAAA,qBAHnBC,IAGmB;EAAA,IAHnBA,IAGmB,0BAHZ,EAGY;EAAA,IAFnBC,MAEmB,QAFnBA,MAEmB;EAAA,yBADnBC,QACmB;EAAA,IADnBA,QACmB,8BADRC,iBACQ;EACnB,IAAMC,KAAK,GAAG,IAAIC,kCAAJ,EAAd;EAEA,IAAMC,OAAO,GAAG,0CACd,qBAAC,oBAAD;IAAU,KAAK,EAAER,KAAjB;IAAA,uBACE,qBAAC,mCAAD;MAAmB,KAAK,EAAEM,KAAK,CAACG,QAAhC;MAAA,uBACE,qBAAC,sBAAD;QAAe,KAAK,EAAER,KAAtB;QAAA,UAA8BE,MAAM;MAApC;IADF;EADF,EADc,CAAhB;EAQA,IAAMO,IAAI,GAAG,4BAAWJ,KAAX,EAAkBJ,IAAlB,CAAb;EACA,OAAOE,QAAQ,CAAC;IACdO,WAAW,EAAEC,eADC;IAEdC,IAAI,EAAEL,OAFQ;IAGdE,IAAI,EAAJA,IAHc;IAIdI,KAAK,EAAE,2BAAUd,KAAV,CAJO;IAKdE,IAAI,EAAJA;EALc,CAAD,CAAf;AAOD,CAzBD;;eA2BeH,gB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/requestInformation.js"],"names":["getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,OAAD,EAA6C;AAC5E,MAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAR,MAAyB,GAA1C;AACA,MAAMC,WAAW,GAAGH,OAAO,CAACI,cAAR,EAApB;;AAEA,MAAID,WAAJ,EAAiB;AAAA;;AACf,qDAAUF,QAAV,uBAAsBE,WAAtB;AACD;;AAED,SAAOF,QAAP;AACD,CATM;AAWP;AACA;;;;;AACO,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAACL,OAAD;AAAA,SAChC,IAAIM,aAAJ,CAASP,iBAAiB,CAACC,OAAD,CAA1B,CADgC;AAAA,CAA3B;AAGP;AACA;;;;;AACO,IAAMO,oBAAoB,GAAG,SAAvBA,oBAAuB,CAClCP,OADkC,EAElCQ,UAFkC,EAGhB;AAClB,SAAOR,OAAO,CAACS,eAAR,CAAwBD,UAAxB,CAAP;AACD,CALM;AAOP;AACA;;;;;AACO,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCV,OADgC,EAEhCW,OAFgC,EAGd;AAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACP,OAAD,EAAU,QAAV,CAA/C;AACA,MAAMa,oBAAoB,GACxBD,kBAAkB,IAAIZ,OAAO,CAACc,SAAR,CAAkB,iBAAlB,CADxB,CAFkB,CAKlB;;AACA,MAAID,oBAAoB,KAAK,IAA7B,EAAmC;AACjC,WAAOF,OAAO,CAACI,oBAAR,CAA6B,CAA7B,CAAP;AACD;;AAED,SAAOJ,OAAO,CAACD,kBAAR,CAA2BG,oBAA3B,CAAP;AACD,CAdM","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"],"file":"requestInformation.js"}
1
+ {"version":3,"file":"requestInformation.js","names":["getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n const pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n if (queryString) {\n return `${pathInfo}?${queryString}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,OAAD,EAA6C;EAC5E,IAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAR,MAAyB,GAA1C;EACA,IAAMC,WAAW,GAAGH,OAAO,CAACI,cAAR,EAApB;;EAEA,IAAID,WAAJ,EAAiB;IAAA;;IACf,iDAAUF,QAAV,uBAAsBE,WAAtB;EACD;;EAED,OAAOF,QAAP;AACD,CATM;AAWP;AACA;;;;;AACO,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAACL,OAAD;EAAA,OAChC,IAAIM,aAAJ,CAASP,iBAAiB,CAACC,OAAD,CAA1B,CADgC;AAAA,CAA3B;AAGP;AACA;;;;;AACO,IAAMO,oBAAoB,GAAG,SAAvBA,oBAAuB,CAClCP,OADkC,EAElCQ,UAFkC,EAGhB;EAClB,OAAOR,OAAO,CAACS,eAAR,CAAwBD,UAAxB,CAAP;AACD,CALM;AAOP;AACA;;;;;AACO,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCV,OADgC,EAEhCW,OAFgC,EAGd;EAClB,IAAMC,kBAAkB,GAAGL,oBAAoB,CAACP,OAAD,EAAU,QAAV,CAA/C;EACA,IAAMa,oBAAoB,GACxBD,kBAAkB,IAAIZ,OAAO,CAACc,SAAR,CAAkB,iBAAlB,CADxB,CAFkB,CAKlB;;EACA,IAAID,oBAAoB,KAAK,IAA7B,EAAmC;IACjC,OAAOF,OAAO,CAACI,oBAAR,CAA6B,CAA7B,CAAP;EACD;;EAED,OAAOJ,OAAO,CAACD,kBAAR,CAA2BG,oBAA3B,CAAP;AACD,CAdM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/serverNoSSR.js"],"names":["serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AAQA;;AAEA;;AAEA;;AAiBA;AACA;AACA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OASO;AAAA,MARzBC,OAQyB,QARzBA,OAQyB;AAAA,MAPzBC,OAOyB,QAPzBA,OAOyB;AAAA,MANzBC,cAMyB,QANzBA,cAMyB;AAAA,mCALzBC,iBAKyB;AAAA,MALzBA,iBAKyB,sCALL,EAKK;AAAA,wBAJzBC,KAIyB;AAAA,MAJzBA,KAIyB,2BAJjB,IAIiB;AAAA,MAHzBC,MAGyB,QAHzBA,MAGyB;AAAA,MAFzBC,QAEyB,QAFzBA,QAEyB;AAAA,MADzBC,iBACyB,QADzBA,iBACyB;AACzB,MAAMC,IAAI,GAAG,0BAAb;AACAC,EAAAA,iBAAiB,GAAGD,IAApB,CAFyB,CAEC;;AAE1B,MAAME,WAAW,GAAG,4CAAmBV,OAAnB,CAApB;AACA,MAAMW,KAAK,GAAG,kCAAiBD,WAAjB,EAA8BR,cAA9B,CAAd;AAEA,wCAAqBS,KAArB,EAA4BR,iBAA5B;AACA,yCAAsBQ,KAAtB;;AAEA,MAAIP,KAAJ,EAAW;AAAA;;AACT,QAAMQ,WAAW,sBAAGD,KAAK,CAACE,QAAN,EAAH,6EAAG,gBAAkBC,WAArB,0DAAG,sBAA+BV,KAAnD,CADS,CAET;;AACA,8BAAYQ,WAAZ,EAAyBR,KAAzB;AACD;;AAED,2BAAQO,KAAR,EAAeV,OAAf,EAAwBD,OAAxB;AAEA,gCAAaW,KAAb;AAEA,kDAAwBJ,iBAAxB,EAA2C;AAAEI,IAAAA,KAAK,EAALA,KAAF;AAASX,IAAAA,OAAO,EAAPA;AAAT,GAA3C;AAEA,SAAO,+BAAiB;AAAEW,IAAAA,KAAK,EAALA,KAAF;AAASP,IAAAA,KAAK,EAALA,KAAT;AAAgBI,IAAAA,IAAI,EAAJA,IAAhB;AAAsBH,IAAAA,MAAM,EAANA,MAAtB;AAA8BC,IAAAA,QAAQ,EAARA;AAA9B,GAAjB,CAAP;AACD,CAhCD;;eAkCeP,W","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 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\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): 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\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 handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"file":"serverNoSSR.js"}
1
+ {"version":3,"file":"serverNoSSR.js","names":["serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","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 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\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): 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\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 handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AAQA;;AAEA;;AAEA;;AAiBA;AACA;AACA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OASO;EAAA,IARzBC,OAQyB,QARzBA,OAQyB;EAAA,IAPzBC,OAOyB,QAPzBA,OAOyB;EAAA,IANzBC,cAMyB,QANzBA,cAMyB;EAAA,iCALzBC,iBAKyB;EAAA,IALzBA,iBAKyB,sCALL,EAKK;EAAA,sBAJzBC,KAIyB;EAAA,IAJzBA,KAIyB,2BAJjB,IAIiB;EAAA,IAHzBC,MAGyB,QAHzBA,MAGyB;EAAA,IAFzBC,QAEyB,QAFzBA,QAEyB;EAAA,IADzBC,iBACyB,QADzBA,iBACyB;EACzB,IAAMC,IAAI,GAAG,0BAAb;EACAC,iBAAiB,GAAGD,IAApB,CAFyB,CAEC;;EAE1B,IAAME,WAAW,GAAG,4CAAmBV,OAAnB,CAApB;EACA,IAAMW,KAAK,GAAG,kCAAiBD,WAAjB,EAA8BR,cAA9B,CAAd;EAEA,sCAAqBS,KAArB,EAA4BR,iBAA5B;EACA,uCAAsBQ,KAAtB;;EAEA,IAAIP,KAAJ,EAAW;IAAA;;IACT,IAAMQ,WAAW,sBAAGD,KAAK,CAACE,QAAN,EAAH,6EAAG,gBAAkBC,WAArB,0DAAG,sBAA+BV,KAAnD,CADS,CAET;;IACA,0BAAYQ,WAAZ,EAAyBR,KAAzB;EACD;;EAED,yBAAQO,KAAR,EAAeV,OAAf,EAAwBD,OAAxB;EAEA,8BAAaW,KAAb;EAEA,gDAAwBJ,iBAAxB,EAA2C;IAAEI,KAAK,EAALA,KAAF;IAASX,OAAO,EAAPA;EAAT,CAA3C;EAEA,OAAO,+BAAiB;IAAEW,KAAK,EAALA,KAAF;IAASP,KAAK,EAALA,KAAT;IAAgBI,IAAI,EAAJA,IAAhB;IAAsBH,MAAM,EAANA,MAAtB;IAA8BC,QAAQ,EAARA;EAA9B,CAAjB,CAAP;AACD,CAhCD;;eAkCeP,W"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/serverSSR.js"],"names":["serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AAOA;;AAEA;;AAkBA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAAY,OAUkB;AAAA,MATlCC,OASkC,QATlCA,OASkC;AAAA,MARlCC,OAQkC,QARlCA,OAQkC;AAAA,MAPlCC,cAOkC,QAPlCA,cAOkC;AAAA,mCANlCC,iBAMkC;AAAA,MANlCA,iBAMkC,sCANd,EAMc;AAAA,wBALlCC,KAKkC;AAAA,MALlCA,KAKkC,2BAL1B,IAK0B;AAAA,MAJlCC,MAIkC,QAJlCA,MAIkC;AAAA,MAHlCC,SAGkC,QAHlCA,SAGkC;AAAA,MAFlCC,QAEkC,QAFlCA,QAEkC;AAAA,MADlCC,iBACkC,QADlCA,iBACkC;AAClC,MAAMC,IAAI,GAAG,0BAAb;AACAC,EAAAA,iBAAiB,GAAGD,IAApB,CAFkC,CAER;;AAE1B,MAAME,WAAW,GAAG,4CAAmBX,OAAnB,CAApB;AACA,MAAMY,KAAK,GAAG,kCAAiBD,WAAjB,EAA8BT,cAA9B,CAAd;AAEA,wCAAqBU,KAArB,EAA4BT,iBAA5B;AACA,yCAAsBS,KAAtB;AACA,2BAAQA,KAAR,EAAeX,OAAf,EAAwBD,OAAxB;AAEA,kDAAwBQ,iBAAxB,EAA2C;AAAER,IAAAA,OAAO,EAAPA,OAAF;AAAWY,IAAAA,KAAK,EAALA;AAAX,GAA3C;AAEA,SAAO,gCAAkB;AACvBA,IAAAA,KAAK,EAALA,KADuB;AAEvBR,IAAAA,KAAK,EAALA,KAFuB;AAGvBK,IAAAA,IAAI,EAAJA,IAHuB;AAIvBE,IAAAA,WAAW,EAAXA,WAJuB;AAKvBN,IAAAA,MAAM,EAANA,MALuB;AAMvBC,IAAAA,SAAS,EAATA,SANuB;AAOvBC,IAAAA,QAAQ,EAARA;AAPuB,GAAlB,CAAP;AASD,CAhCD;;eAkCeR,S","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"],"file":"serverSSR.js"}
1
+ {"version":3,"file":"serverSSR.js","names":["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;;AAEA;;AACA;;AAEA;;AAOA;;AAEA;;AAkBA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAAY,OAUkB;EAAA,IATlCC,OASkC,QATlCA,OASkC;EAAA,IARlCC,OAQkC,QARlCA,OAQkC;EAAA,IAPlCC,cAOkC,QAPlCA,cAOkC;EAAA,iCANlCC,iBAMkC;EAAA,IANlCA,iBAMkC,sCANd,EAMc;EAAA,sBALlCC,KAKkC;EAAA,IALlCA,KAKkC,2BAL1B,IAK0B;EAAA,IAJlCC,MAIkC,QAJlCA,MAIkC;EAAA,IAHlCC,SAGkC,QAHlCA,SAGkC;EAAA,IAFlCC,QAEkC,QAFlCA,QAEkC;EAAA,IADlCC,iBACkC,QADlCA,iBACkC;EAClC,IAAMC,IAAI,GAAG,0BAAb;EACAC,iBAAiB,GAAGD,IAApB,CAFkC,CAER;;EAE1B,IAAME,WAAW,GAAG,4CAAmBX,OAAnB,CAApB;EACA,IAAMY,KAAK,GAAG,kCAAiBD,WAAjB,EAA8BT,cAA9B,CAAd;EAEA,sCAAqBU,KAArB,EAA4BT,iBAA5B;EACA,uCAAsBS,KAAtB;EACA,yBAAQA,KAAR,EAAeX,OAAf,EAAwBD,OAAxB;EAEA,gDAAwBQ,iBAAxB,EAA2C;IAAER,OAAO,EAAPA,OAAF;IAAWY,KAAK,EAALA;EAAX,CAA3C;EAEA,OAAO,gCAAkB;IACvBA,KAAK,EAALA,KADuB;IAEvBR,KAAK,EAALA,KAFuB;IAGvBK,IAAI,EAAJA,IAHuB;IAIvBE,WAAW,EAAXA,WAJuB;IAKvBN,MAAM,EAANA,MALuB;IAMvBC,SAAS,EAATA,SANuB;IAOvBC,QAAQ,EAARA;EAPuB,CAAlB,CAAP;AASD,CAhCD;;eAkCeR,S"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-server/serverUtil.js"],"names":["createReduxStore","requestHref","customReducers","history","initialEntries","toString","store","setI18n","locales","request","Array","isArray","IllegalArgumentException","mergedLocales","locale","code","customLocale","custLocale","forEach","some","push","enabledLocales","localesInstance","Locales","preferredLocale","dispatch","setServerPreferencesFromArray","serverPreferences","serverPreference","name","defaultValue","type","setServerPreferences","preferencesProvider","isStudioContext","setConfigurationTheme","configTheme","configFileLocation","getLayoutConfigFileLocation","configFilePath","dataFetcher","fetch","Error","handleErrors","state","getState","error","shouldThrowOnServer","dehydrate","filteredState","modularui","reduce","obj","key","status","model","replace","createHead","sheet","UUID","helmetContext","style","getStyleTags","meta","helmet"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AAGA;;AACA;;AAEA;;AAQA;;AAEA;;;;;;;;;;AAaA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CACvBC,WADuB,EAEvBC,cAFuB,EAGR;AACf;AACA,MAAMC,OAAsB,GAAG,kCAAoB;AACjDC,IAAAA,cAAc,EAAE,CAACH,WAAW,CAACI,QAAZ,EAAD;AADiC,GAApB,CAA/B;;AAIA,wBAAkB,8BAAeF,OAAf,EAAwBD,cAAxB,CAAlB;AAAA,MAAQI,KAAR,mBAAQA,KAAR;;AAEA,SAAOA,KAAP;AACD,CAZD;AAcA;AACA;;;;;AACA,IAAMC,OAAO,GAAG,SAAVA,OAAU,CACdD,KADc,EAIX;AAAA,MAFHE,OAEG,uEAFmC,EAEnC;AAAA,MADHC,OACG;;AACH,MAAI,CAACC,KAAK,CAACC,OAAN,CAAcH,OAAd,CAAL,EAA6B;AAC3B,UAAM,IAAII,oCAAJ,CAA6B,qCAA7B,CAAN;AACD;;AACD,MAAI,CAACH,OAAL,EAAc;AACZ,UAAM,IAAIG,oCAAJ,CAA6B,0BAA7B,CAAN;AACD;;AAED,MAAMC,aAAa,GAAG,6EAAqB,UAACC,MAAD,EAAY;AACrD,QAAMC,IAAI,GAAGD,MAAM,CAACC,IAApB;AACA,QAAMC,YAAY,GAAG,mBAAAR,OAAO,MAAP,CAAAA,OAAO,EAAM,UAACS,UAAD;AAAA,aAAgBA,UAAU,C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N;AACX,MAAMC,KAAK,GAAGH,KAAK,CAACI,YAAN,EAAd;AACA,MAAMC,IAAI,GAAGH,aAAa,oCAAOA,aAAa,CAACI,MAAd,CAAqBD,IAA5B,IAAoC,EAA9D;;AAEA,MAAIH,aAAJ,EAAmB;AACjB,2CACKA,aAAa,CAACI,MADnB;AAEEH,MAAAA,KAAK,EAALA,KAFF;AAGEE,MAAAA,IAAI,EAAJA;AAHF;AAKD;;AAED,SAAO;AACLF,IAAAA,KAAK,EAALA,KADK;AAELE,IAAAA,IAAI,EAAJA;AAFK,GAAP;AAID,CApBD","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/actions\";\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 type { LocaleConfiguration } from \"../i18n/types\";\nimport type { 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): ReduxStore => {\n // $FlowExpectedError\n const history: RouterHistory = createMemoryHistory({\n initialEntries: [requestHref.toString()],\n });\n\n const { store } = configureStore(history, customReducers);\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 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 filteredState = {\n ...state,\n modularui: Object.keys(state.modularui).reduce((obj, key) => {\n obj[key] = {\n status: state.modularui[key].status,\n model: state.modularui[key].model\n ? state.modularui[key].model.dehydrate()\n : void 0,\n };\n\n return obj;\n }, {}),\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 setServerPreferences,\n setConfigurationTheme,\n createHead,\n handleErrors,\n dehydrate,\n};\n"],"file":"serverUtil.js"}
1
+ {"version":3,"file":"serverUtil.js","names":["createReduxStore","requestHref","customReducers","history","initialEntries","toString","store","setI18n","locales","request","Array","isArray","IllegalArgumentException","mergedLocales","locale","code","customLocale","custLocale","forEach","some","push","enabledLocales","localesInstance","Locales","preferredLocale","dispatch","setServerPreferencesFromArray","serverPreferences","serverPreference","name","defaultValue","type","setServerPreferences","preferencesProvider","isStudioContext","setConfigurationTheme","configTheme","configFileLocation","getLayoutConfigFileLocation","configFilePath","dataFetcher","fetch","Error","handleErrors","state","getState","error","shouldThrowOnServer","dehydrate","filteredState","modularui","reduce","obj","key","status","model","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/actions\";\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 type { LocaleConfiguration } from \"../i18n/types\";\nimport type { 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): ReduxStore => {\n // $FlowExpectedError\n const history: RouterHistory = createMemoryHistory({\n initialEntries: [requestHref.toString()],\n });\n\n const { store } = configureStore(history, customReducers);\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 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 filteredState = {\n ...state,\n modularui: Object.keys(state.modularui).reduce((obj, key) => {\n obj[key] = {\n status: state.modularui[key].status,\n model: state.modularui[key].model\n ? state.modularui[key].model.dehydrate()\n : void 0,\n };\n\n return obj;\n }, {}),\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 setServerPreferences,\n setConfigurationTheme,\n createHead,\n handleErrors,\n dehydrate,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AAGA;;AACA;;AAEA;;AAQA;;AAEA;;;;;;;;;;AAaA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CACvBC,WADuB,EAEvBC,cAFuB,EAGR;EACf;EACA,IAAMC,OAAsB,GAAG,kCAAoB;IACjDC,cAAc,EAAE,CAACH,WAAW,CAACI,QAAZ,EAAD;EADiC,CAApB,CAA/B;;EAIA,sBAAkB,8BAAeF,OAAf,EAAwBD,cAAxB,CAAlB;EAAA,IAAQI,KAAR,mBAAQA,KAAR;;EAEA,OAAOA,KAAP;AACD,CAZD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K,EAAEX,KAAK,CAACM,SAAN,CAAgBG,GAAhB,EAAqBE,KAArB,GACHX,KAAK,CAACM,SAAN,CAAgBG,GAAhB,EAAqBE,KAArB,CAA2BP,SAA3B,EADG,GAEH,KAAK;MAJA,CAAX;MAOA,OAAOI,GAAP;IACD,CATU,EASR,EATQ;EAFM,EAAnB;;EAcA,OAAO,wBAAeH,aAAf,EAA8BO,OAA9B,CAAsC,IAAtC,EAA4C,SAA5C,CAAP;AACD,CAlBD;AAoBA;AACA;;;;;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAa,CACjBC,KADiB,EAEjBC,IAFiB,EAGjBC,aAHiB,EAIN;EACX,IAAMC,KAAK,GAAGH,KAAK,CAACI,YAAN,EAAd;EACA,IAAMC,IAAI,GAAGH,aAAa,oCAAOA,aAAa,CAACI,MAAd,CAAqBD,IAA5B,IAAoC,EAA9D;;EAEA,IAAIH,aAAJ,EAAmB;IACjB,uCACKA,aAAa,CAACI,MADnB;MAEEH,KAAK,EAALA,KAFF;MAGEE,IAAI,EAAJA;IAHF;EAKD;;EAED,OAAO;IACLF,KAAK,EAALA,KADK;IAELE,IAAI,EAAJA;EAFK,CAAP;AAID,CApBD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-theme/ThemeProvider.js"],"names":["ThemeProvider","theme","children","storedTheme","preferences","finalTheme","displayName"],"mappings":";;;;;;;;;AACA;;AACA;;AAEA;;;;AAUA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,OAAsC;AAAA,MAAnCC,KAAmC,QAAnCA,KAAmC;AAAA,MAA5BC,QAA4B,QAA5BA,QAA4B;AAC1D,MAAMC,WAAW,GAAG,6BAAY;AAAA,QAAGC,WAAH,SAAGA,WAAH;AAAA,WAAqBA,WAAW,CAACH,KAAjC;AAAA,GAAZ,CAApB;AACA,MAAMI,UAAU,GAAG,0BAAYF,WAAZ,EAAyBF,KAAzB,CAAnB;AAEA,sBAAO,qBAAC,+BAAD;AAAiB,IAAA,KAAK,EAAEI,UAAxB;AAAA,cAAqCH;AAArC,IAAP;AACD,CALD;;AAMAF,aAAa,CAACM,WAAd,GAA4B,kBAA5B;eAEeN,a","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"],"file":"ThemeProvider.js"}
1
+ {"version":3,"file":"ThemeProvider.js","names":["ThemeProvider","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;;AACA;;AAEA;;;;AAUA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,OAAsC;EAAA,IAAnCC,KAAmC,QAAnCA,KAAmC;EAAA,IAA5BC,QAA4B,QAA5BA,QAA4B;EAC1D,IAAMC,WAAW,GAAG,6BAAY;IAAA,IAAGC,WAAH,SAAGA,WAAH;IAAA,OAAqBA,WAAW,CAACH,KAAjC;EAAA,CAAZ,CAApB;EACA,IAAMI,UAAU,GAAG,0BAAYF,WAAZ,EAAyBF,KAAzB,CAAnB;EAEA,oBAAO,qBAAC,+BAAD;IAAiB,KAAK,EAAEI,UAAxB;IAAA,UAAqCH;EAArC,EAAP;AACD,CALD;;AAMAF,aAAa,CAACM,WAAd,GAA4B,kBAA5B;eAEeN,a"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-theme/createTheme.js"],"names":["replacePlaceholders","inputTheme","possibleKeys","key","join","re","RegExp","forEach","value","replace","match","capture","generateTheme","storedTheme","generatedTheme","themeElements","element","createTheme","themeConfigs","customTheme","settings"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA;;;;;;AAIA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,UAAD,EAAgB;AAAA;;AAC1C,MAAMC,YAAY,GAAG,gDAAYD,UAAZ,kBACd,UAACE,GAAD;AAAA,wBAAeA,GAAf;AAAA,GADc,EAElBC,IAFkB,CAEb,GAFa,CAArB;AAIA,MAAMC,EAAE,GAAG,IAAIC,MAAJ,eAAkBJ,YAAlB,QAAmC,GAAnC,CAAX;AACA,wBAAeD,UAAf,EAA2BM,OAA3B,CAAmC,gBAAkB;AAAA;AAAA,QAAhBJ,GAAgB;AAAA,QAAXK,KAAW;;AACnD,QAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AAC7BP,MAAAA,UAAU,CAACE,GAAD,CAAV,GAAkBK,KAAK,CAACC,OAAN,CAChBJ,EADgB,EAEhB,UAACK,KAAD,EAAQC,OAAR;AAAA,eAAoBV,UAAU,CAACU,OAAD,CAA9B;AAAA,OAFgB,CAAlB;AAID;AACF,GAPD;AASA,SAAOV,UAAP;AACD,CAhBD;;AAkBA,IAAMW,aAAa,GAAG,SAAhBA,aAAgB,CAACC,WAAD,EAAmC;AACvD,MAAIC,cAAc,GAAG,EAArB;;AADuD,oCAAlBC,aAAkB;AAAlBA,IAAAA,aAAkB;AAAA;;AAEvD,oCAAsBA,aAAtB,oCAAqC;AAAhC,QAAMC,OAAO,qBAAb;;AACH,QAAI,OAAOA,OAAP,KAAmB,UAAvB,EAAmC;AACjCF,MAAAA,cAAc,GAAGE,OAAO,CAAChB,mBAAmB,CAACc,cAAD,CAApB,CAAxB;AACD,KAFD,MAEO,IAAI,4BAAcE,OAAd,CAAJ,EAA4B;AACjCF,MAAAA,cAAc,iDAAQA,cAAR,GAA2BE,OAA3B,GAAuCH,WAAvC,CAAd;AACD;AACF,GARsD,CAUvD;;;AACA,SAAOb,mBAAmB,CAACc,cAAD,CAA1B;AACD,CAZD;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;AACA;AACA;AACA;AACA;;;AACA,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAClBJ,WADkB,EAWX;AAAA;;AAAA,qCATJK,YASI;AATJA,IAAAA,YASI;AAAA;;AACP,MAAMC,WAAW,GAAGP,aAAa,MAAb,2CAAcC,WAAd,oDAA8B,0BAAYK,YAAZ,CAA9B,GAApB;;AAEA,MAAIC,WAAJ,EAAiB;AACf,+BAAYA,WAAW,CAACC,QAAxB;AACD;;AAED,SAAOD,WAAP;AACD,CAnBD;;eAqBeF,W","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) => {\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 (typeof value === \"string\") {\n inputTheme[key] = value.replace(\n re,\n (match, capture) => inputTheme[capture]\n );\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (storedTheme, ...themeElements) => {\n let generatedTheme = {};\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\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>>\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"],"file":"createTheme.js"}
1
+ {"version":3,"file":"createTheme.js","names":["replacePlaceholders","inputTheme","possibleKeys","key","join","re","RegExp","forEach","value","replace","match","capture","generateTheme","storedTheme","generatedTheme","themeElements","element","createTheme","themeConfigs","customTheme","settings"],"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) => {\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 (typeof value === \"string\") {\n inputTheme[key] = value.replace(\n re,\n (match, capture) => inputTheme[capture]\n );\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (storedTheme, ...themeElements) => {\n let generatedTheme = {};\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\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>>\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;;AAEA;;AAEA;;;;;;AAIA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,UAAD,EAAgB;EAAA;;EAC1C,IAAMC,YAAY,GAAG,gDAAYD,UAAZ,kBACd,UAACE,GA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WAAW,GAAG,SAAdA,WAAc,CAClBJ,WADkB,EAWX;EAAA;;EAAA,mCATJK,YASI;IATJA,YASI;EAAA;;EACP,IAAMC,WAAW,GAAGP,aAAa,MAAb,2CAAcC,WAAd,oDAA8B,0BAAYK,YAAZ,CAA9B,GAApB;;EAEA,IAAIC,WAAJ,EAAiB;IACf,2BAAYA,WAAW,CAACC,QAAxB;EACD;;EAED,OAAOD,WAAP;AACD,CAnBD;;eAqBeF,W"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-theme/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// @flow\nexport { default as createTheme } from \"./createTheme\";\nexport { default as ThemeProvider } from \"./ThemeProvider\";\n\nexport * from \"./useTheme\";\n\nexport * from \"./utils/themeProps\";\n\nexport * from \"./utils/background\";\nexport * from \"./utils/colors\";\nexport * from \"./utils/contrast\";\nexport * from \"./utils/corners\";\nexport * from \"./utils/spacers\";\n\nexport type * from \"./types\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/react-theme/index.js"],"sourcesContent":["// @flow\nexport { default as createTheme } from \"./createTheme\";\nexport { default as ThemeProvider } from \"./ThemeProvider\";\n\nexport * from \"./useTheme\";\n\nexport * from \"./utils/themeProps\";\n\nexport * from \"./utils/background\";\nexport * from \"./utils/colors\";\nexport * from \"./utils/contrast\";\nexport * from \"./utils/corners\";\nexport * from \"./utils/spacers\";\n\nexport type * from \"./types\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/react-theme/types.js"],"sourcesContent":["// @flow\nexport type ThemePropValue =\n | string\n | number\n | { [key: string]: ThemePropValue, ... };\n\nexport type UtilThemeProps = {\n theme: Theme,\n ...\n};\n\nexport type Theme = {\n settings: { [settingName: string]: string },\n [key: string]: ThemePropValue,\n ...\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react-theme/useTheme.js"],"names":["useTheme","ThemeContext"],"mappings":";;;;;;;AACA;;AACA;;AAIA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAAa;AAC5B,SAAO,uBAAWC,8BAAX,CAAP;AACD,CAFD","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"],"file":"useTheme.js"}
1
+ {"version":3,"file":"useTheme.js","names":["useTheme","ThemeContext"],"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;;AACA;;AAIA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAAa;EAC5B,OAAO,uBAAWC,8BAAX,CAAP;AACD,CAFD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/react-theme/utils/background.js"],"names":["renderBackground","path","defaultValue","theme","value"],"mappings":";;;;;;;AACA;;AAIA;AACA;AACA,IAAMA,gBAAgB,GACpB,SADIA,gBACJ,CAACC,IAAD,EAAeC,YAAf;AAAA,SACA,gBAA+B;AAAA,QAA5BC,KAA4B,QAA5BA,KAA4B;AAC7B,QAAMC,KAAK,GAAG,8BAAaD,KAAb,EAAoBF,IAApB,EAA0BC,YAA1B,CAAd;;AAEA,QAAI,OAAOE,KAAP,KAAiB,QAArB,EAA+B;AAC7B,mCAAsBA,KAAtB;AACD;;AAED,WAAOA,KAAP;AACD,GATD;AAAA,CADF","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"],"file":"background.js"}
1
+ {"version":3,"file":"background.js","names":["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;;AAIA;AACA;AACA,IAAMA,gBAAgB,GACpB,SADIA,gBACJ,CAACC,IAAD,EAAeC,YAAf;EAAA,OACA,gBAA+B;IAAA,IAA5BC,KAA4B,QAA5BA,KAA4B;IAC7B,IAAMC,KAAK,GAAG,8BAAaD,KAAb,EAAoBF,IAApB,EAA0BC,YAA1B,CAAd;;IAEA,IAAI,OAAOE,KAAP,KAAiB,QAArB,EAA+B;MAC7B,6BAAsBA,KAAtB;IACD;;IAED,OAAOA,KAAP;EACD,CATD;AAAA,CADF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/react-theme/utils/colors.js"],"names":["darkenColor","amount","path","defaultValue","theme","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","hue"],"mappings":";;;;;;;AACA;;AACA;;AAIA;AACA;AACA;;AACA;AACA;AACA,IAAMA,WAAW,GACf,SADIA,WACJ,CACEC,MADF,EAEEC,IAFF,EAGEC,YAHF;AAAA,SAKA;AAAA,QAAGC,KAAH,QAAGA,KAAH;AAAA,WACE,sBAAOH,MAAP,EAAe,8BAAaG,KAAb,EAAoBF,IAApB,EAA0BC,YAA1B,CAAf,CADF;AAAA,GALA;AAAA,CADF;AASA;AACA;AACA;;AACA;AACA;;;;;AACA,IAAME,YAAY,GAChB,SADIA,YACJ,CACEJ,MADF,EAEEC,IAFF,EAGEC,YAHF;AAAA,SAKA;AAAA,QAAGC,KAAH,SAAGA,KAAH;AAAA,WACE,uBAAQH,MAAR,EAAgB,8BAAaG,KAAb,EAAoBF,IAApB,EAA0BC,YAA1B,CAAhB,CADF;AAAA,GALA;AAAA,CADF;AASA;AACA;AACA;;AACA;AACA;;;;;AACA,IAAMG,SAAS,GAAG,SAAZA,SAAY,CAChBC,KADgB,EAEhBC,UAFgB,EAGhBC,SAHgB;AAAA,MAIhBC,aAJgB,uEAIQ,CAJR;AAAA,SAKL,mBAAI,0BAAWH,KAAX,EAAkBI,GAAlB,GAAwBD,aAA5B,EAA2CF,UAA3C,EAAuDC,SAAvD,CALK;AAAA,CAAlB","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"],"file":"colors.js"}
1
+ {"version":3,"file":"colors.js","names":["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;;AACA;;AAIA;AACA;AACA;;AACA;AACA;AACA,IAAMA,WAAW,GACf,SADIA,WACJ,CACEC,MADF,EAEEC,IAFF,EAGEC,YAHF;EAAA,OAKA;IAAA,IAAGC,KAAH,QAAGA,KAAH;IAAA,OACE,sBAAOH,MAAP,EAAe,8BAAaG,KAAb,EAAoBF,IAApB,EAA0BC,YAA1B,CAAf,CADF;EAAA,CALA;AAAA,CADF;AASA;AACA;AACA;;AACA;AACA;;;;;AACA,IAAME,YAAY,GAChB,SADIA,YACJ,CACEJ,MADF,EAEEC,IAFF,EAGEC,YAHF;EAAA,OAKA;IAAA,IAAGC,KAAH,SAAGA,KAAH;IAAA,OACE,uBAAQH,MAAR,EAAgB,8BAAaG,KAAb,EAAoBF,IAApB,EAA0BC,YAA1B,CAAhB,CADF;EAAA,CALA;AAAA,CADF;AASA;AACA;AACA;;AACA;AACA;;;;;AACA,IAAMG,SAAS,GAAG,SAAZA,SAAY,CAChBC,KADgB,EAEhBC,UAFgB,EAGhBC,SAHgB;EAAA,IAIhBC,aAJgB,uEAIQ,CAJR;EAAA,OAKL,mBAAI,0BAAWH,KAAX,EAAkBI,GAAlB,GAAwBD,aAA5B,EAA2CF,UAA3C,EAAuDC,SAAvD,CALK;AAAA,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/react-theme/utils/contrast.js"],"names":["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","ThemePropertyException","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty"],"mappings":";;;;;;;;;;;;;AACA;;AAEA;;AAEA;;AAIA;AACA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,MAAD,EAAiBC,MAAjB,EAA4C;AACnE,MAAMC,UAAU,GAAG,4BAAaF,MAAb,CAAnB;AACA,MAAMG,UAAU,GAAG,4BAAaF,MAAb,CAAnB;AACA,SAAOG,UAAU,CACf,CAACF,UAAU,GAAGC,UAAb,GACG,CAACD,UAAU,GAAG,IAAd,KAAuBC,UAAU,GAAG,IAApC,CADH,GAEG,CAACA,UAAU,GAAG,IAAd,KAAuBD,UAAU,GAAG,IAApC,CAFJ,EAGEG,OAHF,CAGU,CAHV,CADe,CAAjB;AAMD,CATD;AAWA;AACA;AACA;AACA;AACA;;AACA;AACA;;;;;AACA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD,EAA2B;AACxC,MAAMC,GAAG,GAAG,0BAAWD,KAAX,CAAZ;AAEA,SAAO,CAACC,GAAG,CAACC,GAAJ,GAAU,GAAV,GAAgBD,GAAG,CAACE,KAAJ,GAAY,GAA5B,GAAkCF,GAAG,CAACG,IAAJ,GAAW,GAA9C,IAAqD,IAA5D;AACD,CAJD;AAMA;AACA;AACA;AACA;AACA;;;;;AACA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB,CACrBL,KADqB,EAKV;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;AACA;;;AACA,IAAMG,mBAAmB,GACvB,SADIA,mBACJ,CACEL,eADF,EAEEM,sBAFF;AAAA,MAGEC,oBAHF,uEAGiC,gBAHjC;AAAA,MAIEC,qBAJF,uEAIkC,iBAJlC;AAAA,SAMA,gBAAoC;AAAA,0BAAjCT,KAAiC;AAAA,QAAjCA,KAAiC,2BAAzB,EAAyB;AAClC,QAAMG,OAAO,GAAGJ,kBAAkB,CAACC,KAAD,EAAQC,eAAR,EAAyB,SAAzB,CAAlC;AACA,QAAMN,cAAc,GAAG,oCAAmBK,KAAnB,EAA0BO,sBAA1B,CAAvB;AACA,QAAMV,SAAS,GAAG,oCAChBG,KADgB,EAEhBQ,oBAFgB,EAGhB,SAHgB,CAAlB;AAKA,QAAMV,UAAU,GAAG,oCAAmBE,KAAnB,EAA0BS,qBAA1B,EAAiD,MAAjD,CAAnB;AAEA,WAAOjB,cAAc,CAACW,OAAD,EAAUN,SAAV,EAAqBC,UAArB,EAAiCH,cAAjC,CAArB;AACD,GAjBD;AAAA,CADF","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 = {} }: 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"],"file":"contrast.js"}
1
+ {"version":3,"file":"contrast.js","names":["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","ThemePropertyException","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty"],"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 = {} }: 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;;AAEA;;AAEA;;AAIA;AACA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,MAAD,EAAiBC,MAAjB,EAA4C;EACnE,IAAMC,UAAU,GAAG,4BAAaF,MAAb,CAAnB;EACA,IAAMG,UAAU,GAAG,4BAAaF,MAAb,CAAnB;EACA,OAAOG,UAAU,CACf,CAACF,UAAU,GAAGC,UAAb,GACG,CAACD,UAAU,GAAG,IAAd,KAAuBC,UAAU,GAAG,IAApC,CADH,GAEG,CAACA,UAAU,GAAG,IAAd,KAAuBD,UAAU,GAAG,IAApC,CAFJ,EAGEG,OAHF,CAGU,CAHV,CADe,CA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B,EAGzBC,YAHyB,EAItB;EAAA;;EACH,IAAIC,OAAO,GAAG,yBAAQH,KAAR,EAAeC,eAAf,EAAgCC,YAAhC,CAAd;;EAEA,IAAI,sBAAOC,OAAP,MAAmB,QAAvB,EAAiC;IAAA;;IAC/BA,OAAO,wCAAGA,OAAH,6CAAG,SAASC,eAAZ,yEAA+BF,YAAtC;EACD;;EAED,IAAI,OAAOC,OAAP,KAAmB,QAAvB,EAAiC;IAC/B,OAAOA,OAAP;EACD;;EAED,MAAM,IAAIE,kCAAJ,2CACDJ,eADC,mEAC+CE,OAD/C,GAAN;AAGD,CAlBD;AAoBA;AACA;AACA;AACA;;;AACA,IAAMG,mBAAmB,GACvB,SADIA,mBACJ,CACEL,eADF,EAEEM,sBAFF;EAAA,IAGEC,oBAHF,uEAGiC,gBAHjC;EAAA,IAIEC,qBAJF,uEAIkC,iBAJlC;EAAA,OAMA,gBAAoC;IAAA,sBAAjCT,KAAiC;IAAA,IAAjCA,KAAiC,2BAAzB,EAAyB;IAClC,IAAMG,OAAO,GAAGJ,kBAAkB,CAACC,KAAD,EAAQC,eAAR,EAAyB,SAAzB,CAAlC;IACA,IAAMN,cAAc,GAAG,oCAAmBK,KAAnB,EAA0BO,sBAA1B,CAAvB;IACA,IAAMV,SAAS,GAAG,oCAChBG,KADgB,EAEhBQ,oBAFgB,EAGhB,SAHgB,CAAlB;IAKA,IAAMV,UAAU,GAAG,oCAAmBE,KAAnB,EAA0BS,qBAA1B,EAAiD,MAAjD,CAAnB;IAEA,OAAOjB,cAAc,CAACW,OAAD,EAAUN,SAAV,EAAqBC,UAArB,EAAiCH,cAAjC,CAArB;EACD,CAjBD;AAAA,CADF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/react-theme/utils/corners.js"],"names":["DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","ROUNDED_CORNERS","propertyName"],"mappings":";;;;;;;;;;;AACA;;AAIA,IAAMA,uBAAuB,GAAG,eAAhC;AAEA;AACA;AACA;AACA;;AACA;AACA;;AACA,IAAMC,cAAc,GAClB,SADIA,cACJ;AAAA,MACEC,QADF,uEACqBF,uBADrB;AAAA,MAEEG,IAFF,uEAEiB,eAFjB;AAAA,MAGEC,YAHF,uEAGyB,SAHzB;AAAA,SAKA,gBAAoC;AAAA,0BAAjCC,KAAiC;AAAA,QAAjCA,KAAiC,2BAAzB,EAAyB;;AAClC,QAAIA,KAAK,CAACC,eAAV,EAA2B;AAAA;;AACzB,UAAMC,YAAY,GAChBL,QAAQ,IAAIA,QAAQ,KAAKF,uBAAzB,oBACcE,QADd,eAEIF,uBAHN;AAKA,uDAAUO,YAAV,wBAA2B,oCACzBF,KADyB,EAEzBF,IAFyB,EAGzBC,YAHyB,CAA3B;AAKD;;AAED,WAAO,EAAP;AACD,GApBD;AAAA,CADF","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 = {} }: 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"],"file":"corners.js"}
1
+ {"version":3,"file":"corners.js","names":["DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","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 = {} }: 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;;AAIA,IAAMA,uBAAuB,GAAG,eAAhC;AAEA;AACA;AACA;AACA;;AACA;AACA;;AACA,IAAMC,cAAc,GAClB,SADIA,cACJ;EAAA,IACEC,QADF,uEACqBF,uBADrB;EAAA,IAEEG,IAFF,uEAEiB,eAFjB;EAAA,IAGEC,YAHF,uEAGyB,SAHzB;EAAA,OAKA,gBAAoC;IAAA,sBAAjCC,KAAiC;IAAA,IAAjCA,KAAiC,2BAAzB,EAAyB;;IAClC,IAAIA,KAAK,CAACC,eAAV,EAA2B;MAAA;;MACzB,IAAMC,YAAY,GAChBL,QAAQ,IAAIA,QAAQ,KAAKF,uBAAzB,oBACcE,QADd,eAEIF,uBAHN;MAKA,iDAAUO,YAAV,wBAA2B,oCACzBF,KADyB,EAEzBF,IAFyB,EAGzBC,YAHyB,CAA3B;IAKD;;IAED,OAAO,EAAP;EACD,CApBD;AAAA,CADF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/react-theme/utils/spacers.js"],"names":["getSize","theme","ratio","path","unit","size","times","IllegalStateException","IllegalArgumentException","spacer","spacers","ratios","join","gutter"],"mappings":";;;;;;;;;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;AAAA,GADA;AAAA,CADF;AAKA;AACA;AACA;;AACA;AACA;;;;;AACA,IAAMC,MAAM,GACV,SADIA,MACJ;AAAA,MAACX,KAAD,uEAAiB,CAAjB;AAAA,SACA;AAAA,4BAAGD,KAAH;AAAA,QAAGA,KAAH,4BAAW,EAAX;AAAA,WACED,OAAO,CAACC,KAAD,EAAQC,KAAR,EAAe,aAAf,EAA8B,IAA9B,CADT;AAAA,GADA;AAAA,CADF","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 = {} }: 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 = {} }: 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 = {} }: UtilThemeProps) =>\n getSize(theme, ratio, \"GRID_GUTTER\", \"px\");\n\nexport { spacer, spacers, gutter };\n"],"file":"spacers.js"}
1
+ {"version":3,"file":"spacers.js","names":["getSize","theme","ratio","path","unit","size","times","IllegalStateException","IllegalArgumentException","spacer","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 = {} }: 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 = {} }: 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 = {} }: UtilThemeProps) =>\n getSize(theme, ratio, \"GRID_GUTTER\", \"px\");\n\nexport { spacer, spacers, gutter };\n"],"mappings":";;;;;;;;;;;;;;;AACA;;AAGA;;AACA;;AAEA;AACA;A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ACA;;;;;AACA,IAAMC,MAAM,GACV,SADIA,MACJ;EAAA,IAACX,KAAD,uEAAiB,CAAjB;EAAA,OACA;IAAA,wBAAGD,KAAH;IAAA,IAAGA,KAAH,4BAAW,EAAX;IAAA,OACED,OAAO,CAACC,KAAD,EAAQC,KAAR,EAAe,aAAf,EAA8B,IAA9B,CADT;EAAA,CADA;AAAA,CADF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/react-theme/utils/themeProps.js"],"names":["getProp","theme","path","defaultValue","getThemeProp","value","ThemePropertyException","getThemeStringProp","toString","getThemeNumberProp","themeProp"],"mappings":";;;;;;;;;;;;;AACA;;AAEA;;AAIA;AACA;AACO,IAAMA,OAAO,GAAG,SAAVA,OAAU,GAID;AAAA,MAHpBC,KAGoB,uEAHG,EAGH;AAAA,MAFpBC,IAEoB,uEAFL,EAEK;AAAA,MADpBC,YACoB,uEADW,EACX;AACpB,SAAOD,IAAI,KAAK,EAAT,GAAcC,YAAd,GAA6B,kBAAIF,KAAJ,EAAWC,IAAX,EAAiBC,YAAjB,CAApC;AACD,CANM;AAQP;AACA;;;;;AACO,IAAMC,YAAY,GAAG,SAAfA,YAAe,GAIP;AAAA;;AAAA,MAHnBH,KAGmB,uEAHI,EAGJ;AAAA,MAFnBC,IAEmB,uEAFJ,EAEI;AAAA,MADnBC,YACmB,uEADY,EACZ;AACnB,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAD,EAAQC,IAAR,EAAcC,YAAd,CAArB;;AAEA,MACEE,KAAK,IAAI,IAAT,KACC,OAAOA,KAAP,KAAiB,QAAjB,IACC,OAAOA,KAAP,KAAiB,QADlB,IAEC,sBAAOA,KAAP,MAAiB,QAHnB,CADF,EAKE;AACA,WAAOA,KAAP;AACD;;AAED,QAAM,IAAIC,kCAAJ,2CACDJ,IADC,2FAC4DG,KAD5D,GAAN;AAGD,CAnBM;AAqBP;AACA;;;;;AACO,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB,GAIrB;AAAA;;AAAA,MAHXN,KAGW,uEAHY,EAGZ;AAAA,MAFXC,IAEW,uEAFI,EAEJ;AAAA,MADXC,YACW,uEADY,EACZ;AACX,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAD,EAAQC,IAAR,EAAcC,YAAd,CAArB;;AAEA,MAAI,OAAOE,KAAP,KAAiB,QAArB,EAA+B;AAC7B,WAAOA,KAAP;AACD,GAFD,MAEO,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AACpC,WAAOA,KAAK,CAACG,QAAN,EAAP;AACD;;AAED,QAAM,IAAIF,kCAAJ,4CACDJ,IADC,oEACoCG,KADpC,GAAN;AAGD,CAhBM;AAkBP;AACA;;;;;AACO,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,GAIrB;AAAA;;AAAA,MAHXR,KAGW,uEAHY,EAGZ;AAAA,MAFXC,IAEW,uEAFI,EAEJ;AAAA,MADXC,YACW,uEADY,CACZ;AACX,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAD,EAAQC,IAAR,EAAcC,YAAd,CAArB;;AAEA,MAAI,OAAOE,KAAP,KAAiB,QAArB,EAA+B;AAC7B,WAAOA,KAAP;AACD;;AAED,QAAM,IAAIC,kCAAJ,4CACDJ,IADC,oEACoCG,KADpC,GAAN;AAGD,CAdM;AAgBP;AACA;AACA;;AACA;AACA;;;;;AACO,IAAMK,SAAS,GACpB,SADWA,SACX,CACER,IADF,EAEEC,YAFF;AAAA,SAIA;AAAA,QAAGF,KAAH,QAAGA,KAAH;AAAA,WACEG,YAAY,CAACH,KAAD,EAAQC,IAAR,EAAcC,YAAd,CADd;AAAA,GAJA;AAAA,CADK","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"],"file":"themeProps.js"}
1
+ {"version":3,"file":"themeProps.js","names":["getProp","theme","path","defaultValue","getThemeProp","value","ThemePropertyException","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;;AAEA;;AAIA;AACA;AACO,IAAMA,OAAO,GAAG,SAAVA,OAAU,GAID;EAAA,IAHpBC,KAGoB,uEAHG,EAGH;EAAA,IAFpBC,IAEoB,uEAFL,EAEK;EAAA,IADpBC,YACoB,uEADW,EACX;EACpB,OAAOD,IAAI,KAAK,EAAT,GAAcC,YAAd,GAA6B,kBAAIF,KAAJ,EAAWC,IAAX,EAAiBC,YAAjB,CAApC;AACD,CANM;AAQP;AACA;;;;;AACO,IAAMC,YAAY,GAAG,SAAfA,YAAe,GAIP;EA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AAM,IAAIC,kCAAJ,4CACDJ,IADC,oEACoCG,KADpC,GAAN;AAGD,CAdM;AAgBP;AACA;AACA;;AACA;AACA;;;;;AACO,IAAMK,SAAS,GACpB,SADWA,SACX,CACER,IADF,EAEEC,YAFF;EAAA,OAIA;IAAA,IAAGF,KAAH,QAAGA,KAAH;IAAA,OACEG,YAAY,CAACH,KAAD,EAAQC,IAAR,EAAcC,YAAd,CADd;EAAA,CAJA;AAAA,CADK"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/redux/_i18n/actions.js"],"names":["receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"mappings":";;;;;;;AACA;;AAMA;AACA;AACA;AACO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,MAAD;AAAA,SAAyC;AACpEC,IAAAA,IAAI,EAAE,eAD8D;AAEpEC,IAAAA,OAAO,EAAEF;AAF2D,GAAzC;AAAA,CAAtB;AAKP;AACA;AACA;;;;;AACO,IAAMG,YAAY,GACvB,SADWA,YACX,CAACH,MAAD;AAAA,SACA,UAACI,QAAD,EAAc;AACZA,IAAAA,QAAQ,CAAC,uCAAD,CAAR;AACAA,IAAAA,QAAQ,CAACL,aAAa,CAACC,MAAD,CAAd,CAAR;AAEAI,IAAAA,QAAQ,CAAC,wCAAD,CAAR;AACD,GAND;AAAA,CADK;AASP;AACA;;;;;AACO,IAAMC,UAAU,GAAG,SAAbA,UAAa,CACxBC,OADwB,EAExBN,MAFwB;AAAA,SAGF;AACtBC,IAAAA,IAAI,EAAE,aADgB;AAEtBC,IAAAA,OAAO,EAAE;AACPI,MAAAA,OAAO,EAAPA,OADO;AAEPN,MAAAA,MAAM,EAANA;AAFO;AAFa,GAHE;AAAA,CAAnB","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"],"file":"actions.js"}
1
+ {"version":3,"file":"actions.js","names":["receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/actions.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;;AAMA;AACA;AACA;AACO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,MAAD;EAAA,OAAyC;IACpEC,IAAI,EAAE,eAD8D;IAEpEC,OAAO,EAAEF;EAF2D,CAAzC;AAAA,CAAtB;AAKP;AACA;AACA;;;;;AACO,IAAMG,YAAY,GACvB,SADWA,YACX,CAACH,MAAD;EAAA,OACA,UAACI,QAAD,EAAc;IACZA,QAAQ,CAAC,uCAAD,CAAR;IACAA,QAAQ,CAACL,aAAa,CAACC,MAAD,CAAd,CAAR;IAEAI,QAAQ,CAAC,wCAAD,CAAR;EACD,CAND;AAAA,CADK;AASP;AACA;;;;;AACO,IAAMC,UAAU,GAAG,SAAbA,UAAa,CACxBC,OADwB,EAExBN,MAFwB;EAAA,OAGF;IACtBC,IAAI,EAAE,aADgB;IAEtBC,OAAO,EAAE;MACPI,OAAO,EAAPA,OADO;MAEPN,MAAM,EAANA;IAFO;EAFa,CAHE;AAAA,CAAnB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/redux/_i18n/index.js"],"names":[],"mappings":";;;;;;;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// @flow\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\n\nexport type * from \"./types\";\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/redux/_i18n/index.js"],"sourcesContent":["// @flow\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\n\nexport type * from \"./types\";\n"],"mappings":";;;;;;;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/redux/_i18n/reducer.js"],"names":["updateLocale","state","locale","Cache","clear","setLocales","locales","initialState","Locales","I18nReducer","action","type","payload"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;;;;;AAMA;AACA;AACA,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAQC,MAAR,EAAmB;AACtC;AACA,0BAAU,QAAV,EAAoBA,MAApB,EAFsC,CAItC;;AACAC,iBAAMC,KAAN;;AAEA,yCACKH,KADL;AAEEC,IAAAA,MAAM,EAANA;AAFF;AAID,CAXD;AAaA;AACA;;;AACA,IAAMG,UAAU,GAAG,SAAbA,UAAa,CAACJ,KAAD,QAAgC;AAAA,MAAtBC,MAAsB,QAAtBA,MAAsB;AAAA,MAAdI,OAAc,QAAdA,OAAc;AACjD;AACA,0BAAU,QAAV,EAAoBJ,MAApB;;AAEA,MAAIA,MAAJ,EAAY;AACV,2CACKD,KADL;AAEEK,MAAAA,OAAO,EAAPA,OAFF;AAGEJ,MAAAA,MAAM,EAANA;AAHF;AAKD;;AAED,yCACKD,KADL;AAEEK,IAAAA,OAAO,EAAPA;AAFF;AAID,CAhBD,C,CAkBA;;;AACA,IAAMC,YAAuB,GAAG;AAC9BD,EAAAA,OAAO,EAAE,IAAIE,gBAAJ,EADqB;AAE9BN,EAAAA,MAAM,EAAE;AAFsB,CAAhC;AAKA;AACA;AACA;;AACO,IAAMO,WAA4C,GAAG,SAA/CA,WAA+C,GAGvD;AAAA,MAFHR,KAEG,uEAFKM,YAEL;AAAA,MADHG,MACG,uEADM,KAAK,CACX;;AACH,MAAI,CAACA,MAAL,EAAa;AACX,WAAOT,KAAP;AACD;;AAED,UAAQS,MAAM,CAACC,IAAf;AACE,SAAK,aAAL;AACE,aAAON,UAAU,CAACJ,KAAD,EAAQS,MAAM,CAACE,OAAf,CAAjB;;AAEF,SAAK,eAAL;AACE,aAAOZ,YAAY,CAACC,KAAD,EAAQS,MAAM,CAACE,OAAf,CAAnB;;AAEF;AACE,aAAOX,KAAP;AARJ;AAUD,CAlBM","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, locale) => {\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 = (state, { locale, locales }) => {\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"],"file":"reducer.js"}
1
+ {"version":3,"file":"reducer.js","names":["updateLocale","state","locale","Cache","clear","setLocales","locales","initialState","Locales","I18nReducer","action","type","payload"],"sources":["../../../src/redux/_i18n/reducer.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, locale) => {\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 = (state, { locale, locales }) => {\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;;AACA;;AAEA;;;;;;AAMA;AACA;AACA,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAAQC,MAAR,EAAmB;EACtC;EACA,wBAAU,QAAV,EAAoBA,MAApB,EAFsC,CAItC;;EACAC,eAAMC,KAAN;;EAEA,uCACKH,KADL;IAEEC,MAAM,EAANA;EAFF;AAID,CAXD;AAaA;AACA;;;AACA,IAAMG,UAAU,GAAG,SAAbA,UAAa,CAACJ,KAAD,QAAgC;EAAA,IAAtBC,MAAsB,QAAtBA,MAAsB;EAAA,IAAdI,OAAc,QAAdA,OAAc;EACjD;EACA,wBAAU,QAAV,EAAoBJ,MAApB;;EAEA,IAAIA,MAAJ,EAAY;IACV,uCACKD,KADL;MAEEK,OAAO,EAAPA,OAFF;MAGEJ,MAAM,EAANA;IAHF;EAKD;;EAED,uCACKD,KADL;IAEEK,OAAO,EAAPA;EAFF;AAID,CAhBD,C,CAkBA;;;AACA,IAAMC,YAAuB,GAAG;EAC9BD,OAAO,EAAE,IAAIE,gBAAJ,EADqB;EAE9BN,MAAM,EAAE;AAFsB,CAAhC;AAKA;AACA;AACA;;AACO,IAAMO,WAA4C,GAAG,SAA/CA,WAA+C,GAGvD;EAAA,IAFHR,KAEG,uEAFKM,YAEL;EAAA,IADHG,MACG,uEADM,KAAK,CACX;;EACH,IAAI,CAACA,MAAL,EAAa;IACX,OAAOT,KAAP;EACD;;EAED,QAAQS,MAAM,CAACC,IAAf;IACE,KAAK,aAAL;MACE,OAAON,UAAU,CAACJ,KAAD,EAAQS,MAAM,CAACE,OAAf,CAAjB;;IAEF,KAAK,eAAL;MACE,OAAOZ,YAAY,CAACC,KAAD,EAAQS,MAAM,CAACE,OAAf,CAAnB;;IAEF;MACE,OAAOX,KAAP;EARJ;AAUD,CAlBM"}