@beinformed/ui 1.34.1 → 1.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/esm/react-client/client.js +1 -2
  3. package/esm/react-client/client.js.map +1 -1
  4. package/lib/builder/__tests__/mergeLayoutHintConfigurations.spec.js.flow +1 -1
  5. package/lib/constants/Constants.js +33 -66
  6. package/lib/constants/Constants.js.map +1 -1
  7. package/lib/constants/LayoutHintConfig.js +1 -2
  8. package/lib/constants/LayoutHintConfig.js.map +1 -1
  9. package/lib/constants/LayoutHints.js +18 -36
  10. package/lib/constants/LayoutHints.js.map +1 -1
  11. package/lib/constants/Settings.js +3 -6
  12. package/lib/constants/Settings.js.map +1 -1
  13. package/lib/exceptions/ConfigurationException.js +1 -2
  14. package/lib/exceptions/ConfigurationException.js.map +1 -1
  15. package/lib/exceptions/IllegalArgumentException.js +1 -2
  16. package/lib/exceptions/IllegalArgumentException.js.map +1 -1
  17. package/lib/exceptions/IllegalReturnException.js +1 -2
  18. package/lib/exceptions/IllegalReturnException.js.map +1 -1
  19. package/lib/exceptions/IllegalStateException.js +1 -2
  20. package/lib/exceptions/IllegalStateException.js.map +1 -1
  21. package/lib/exceptions/JsonParseException.js +1 -2
  22. package/lib/exceptions/JsonParseException.js.map +1 -1
  23. package/lib/exceptions/MissingPropertyException.js +1 -2
  24. package/lib/exceptions/MissingPropertyException.js.map +1 -1
  25. package/lib/exceptions/NetworkException.js +1 -2
  26. package/lib/exceptions/NetworkException.js.map +1 -1
  27. package/lib/exceptions/NotAllowedUriException.js +1 -2
  28. package/lib/exceptions/NotAllowedUriException.js.map +1 -1
  29. package/lib/exceptions/NotFoundException.js +1 -2
  30. package/lib/exceptions/NotFoundException.js.map +1 -1
  31. package/lib/exceptions/ServerRequestException.js +1 -2
  32. package/lib/exceptions/ServerRequestException.js.map +1 -1
  33. package/lib/exceptions/ThemePropertyException.js +1 -2
  34. package/lib/exceptions/ThemePropertyException.js.map +1 -1
  35. package/lib/exceptions/TimeoutException.js +1 -2
  36. package/lib/exceptions/TimeoutException.js.map +1 -1
  37. package/lib/exceptions/UnauthorizedException.js +1 -2
  38. package/lib/exceptions/UnauthorizedException.js.map +1 -1
  39. package/lib/exceptions/UnsupportedOperationException.js +1 -2
  40. package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
  41. package/lib/hooks/useDeepCompareEffect.js +1 -2
  42. package/lib/hooks/useDeepCompareEffect.js.map +1 -1
  43. package/lib/i18n/Locale.js +1 -2
  44. package/lib/i18n/Locale.js.map +1 -1
  45. package/lib/i18n/Locales.js +2 -4
  46. package/lib/i18n/Locales.js.map +1 -1
  47. package/lib/i18n/Message.js +1 -2
  48. package/lib/i18n/Message.js.map +1 -1
  49. package/lib/i18n/languages.js +1 -2
  50. package/lib/i18n/languages.js.map +1 -1
  51. package/lib/i18n/translations/beinformed_error_messages_en.nl.js +1 -2
  52. package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
  53. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js +1 -2
  54. package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
  55. package/lib/i18n/withMessage.js +1 -2
  56. package/lib/i18n/withMessage.js.map +1 -1
  57. package/lib/models/attributes/AttributeCollection.js +1 -2
  58. package/lib/models/attributes/AttributeCollection.js.map +1 -1
  59. package/lib/models/attributes/AttributeContent.js +1 -2
  60. package/lib/models/attributes/AttributeContent.js.map +1 -1
  61. package/lib/models/attributes/AttributeDataHelper.js +1 -2
  62. package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
  63. package/lib/models/attributes/ChoiceAttributeOptionCollection.js +1 -2
  64. package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
  65. package/lib/models/attributes/ChoiceAttributeOptionModel.js +1 -2
  66. package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
  67. package/lib/models/attributes/CompositeAttributeChildCollection.js +1 -2
  68. package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
  69. package/lib/models/attributes/CompositeAttributeModel.js +1 -2
  70. package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
  71. package/lib/models/attributes/DatetimeAttributeModel.js +1 -2
  72. package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
  73. package/lib/models/attributes/_createAttribute.js +1 -2
  74. package/lib/models/attributes/_createAttribute.js.map +1 -1
  75. package/lib/models/attributes/input-constraints/BSNConstraint.js +1 -2
  76. package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
  77. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -2
  78. package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
  79. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +1 -2
  80. package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
  81. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +1 -2
  82. package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
  83. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +1 -2
  84. package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
  85. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +1 -2
  86. package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
  87. package/lib/models/attributes/input-constraints/FileSizeConstraint.js +1 -2
  88. package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
  89. package/lib/models/attributes/input-constraints/IBANConstraint.js +1 -2
  90. package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
  91. package/lib/models/attributes/input-constraints/MandatoryConstraint.js +1 -2
  92. package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
  93. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +1 -2
  94. package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
  95. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -2
  96. package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
  97. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +1 -2
  98. package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
  99. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -2
  100. package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
  101. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +1 -2
  102. package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
  103. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +1 -2
  104. package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
  105. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +1 -2
  106. package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
  107. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +1 -2
  108. package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
  109. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
  110. package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
  111. package/lib/models/attributes/input-constraints/RangeConstraint.js +1 -2
  112. package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
  113. package/lib/models/attributes/input-constraints/RegexConstraint.js +1 -2
  114. package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
  115. package/lib/models/attributes/input-constraints/StringLengthConstraint.js +1 -2
  116. package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
  117. package/lib/models/attributes/input-constraints/XMLConstraint.js +1 -2
  118. package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
  119. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +1 -2
  120. package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
  121. package/lib/models/attributes/layouthint-rules/DependentAttribute.js +1 -2
  122. package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
  123. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +1 -2
  124. package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
  125. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +1 -2
  126. package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
  127. package/lib/models/base/BaseCollection.js +1 -2
  128. package/lib/models/base/BaseCollection.js.map +1 -1
  129. package/lib/models/base/BaseModel.js +1 -2
  130. package/lib/models/base/BaseModel.js.map +1 -1
  131. package/lib/models/base/ResourceCollection.js +1 -2
  132. package/lib/models/base/ResourceCollection.js.map +1 -1
  133. package/lib/models/base/ResourceModel.js +1 -2
  134. package/lib/models/base/ResourceModel.js.map +1 -1
  135. package/lib/models/concepts/BusinessScenarioModel.js +1 -2
  136. package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
  137. package/lib/models/concepts/ConceptTypeDetailModel.js +1 -2
  138. package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
  139. package/lib/models/concepts/SourceReferenceModel.js +1 -2
  140. package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
  141. package/lib/models/content/SectionModel.js +1 -2
  142. package/lib/models/content/SectionModel.js.map +1 -1
  143. package/lib/models/contentconfiguration/ContentConfigurationElements.js +1 -2
  144. package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
  145. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +1 -2
  146. package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
  147. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +1 -2
  148. package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
  149. package/lib/models/contentconfiguration/ContentConfigurationResults.js +1 -2
  150. package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
  151. package/lib/models/error/ErrorModel.js +1 -2
  152. package/lib/models/error/ErrorModel.js.map +1 -1
  153. package/lib/models/form/FormModel.js +1 -2
  154. package/lib/models/form/FormModel.js.map +1 -1
  155. package/lib/models/href/Href.js +1 -2
  156. package/lib/models/href/Href.js.map +1 -1
  157. package/lib/models/links/LinkModel.js +1 -2
  158. package/lib/models/links/LinkModel.js.map +1 -1
  159. package/lib/models/links/normalizeLinkJSON.js +1 -2
  160. package/lib/models/links/normalizeLinkJSON.js.map +1 -1
  161. package/lib/models/list/ListItemCollection.js +1 -2
  162. package/lib/models/list/ListItemCollection.js.map +1 -1
  163. package/lib/models/lookup/LookupOptionCollection.js +1 -2
  164. package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
  165. package/lib/models/parameter/Parameter.js +1 -2
  166. package/lib/models/parameter/Parameter.js.map +1 -1
  167. package/lib/models/resolveModel.js +1 -2
  168. package/lib/models/resolveModel.js.map +1 -1
  169. package/lib/models/sorting/SortOptionModel.js +1 -2
  170. package/lib/models/sorting/SortOptionModel.js.map +1 -1
  171. package/lib/models/sorting/SortingModel.js +1 -2
  172. package/lib/models/sorting/SortingModel.js.map +1 -1
  173. package/lib/models/user/UserServicesModel.js +1 -2
  174. package/lib/models/user/UserServicesModel.js.map +1 -1
  175. package/lib/modularui/Authenticate.js +1 -2
  176. package/lib/modularui/Authenticate.js.map +1 -1
  177. package/lib/modularui/CaptchaRequest.js +1 -2
  178. package/lib/modularui/CaptchaRequest.js.map +1 -1
  179. package/lib/modularui/ModularUIError.js +1 -2
  180. package/lib/modularui/ModularUIError.js.map +1 -1
  181. package/lib/modularui/ModularUIRequest.js +1 -2
  182. package/lib/modularui/ModularUIRequest.js.map +1 -1
  183. package/lib/modularui/ModularUIResponse.js +1 -2
  184. package/lib/modularui/ModularUIResponse.js.map +1 -1
  185. package/lib/modularui/UploadRequest.js +1 -2
  186. package/lib/modularui/UploadRequest.js.map +1 -1
  187. package/lib/react/ErrorBoundary.js +1 -2
  188. package/lib/react/ErrorBoundary.js.map +1 -1
  189. package/lib/react/ErrorBoundaryFallback.js +1 -2
  190. package/lib/react/ErrorBoundaryFallback.js.map +1 -1
  191. package/lib/react-client/client.js +1 -2
  192. package/lib/react-client/client.js.flow +6 -3
  193. package/lib/react-client/client.js.map +1 -1
  194. package/lib/react-client/rehydrate.js +1 -2
  195. package/lib/react-client/rehydrate.js.map +1 -1
  196. package/lib/react-server/createSSRComplete.js +1 -2
  197. package/lib/react-server/createSSRComplete.js.map +1 -1
  198. package/lib/react-server/htmlpage.js +1 -2
  199. package/lib/react-server/htmlpage.js.map +1 -1
  200. package/lib/react-server/renderSSRComplete.js +1 -2
  201. package/lib/react-server/renderSSRComplete.js.map +1 -1
  202. package/lib/react-server/renderSSRMinimal.js +1 -2
  203. package/lib/react-server/renderSSRMinimal.js.map +1 -1
  204. package/lib/react-server/serverNoSSR.js +1 -2
  205. package/lib/react-server/serverNoSSR.js.map +1 -1
  206. package/lib/react-server/serverSSR.js +1 -2
  207. package/lib/react-server/serverSSR.js.map +1 -1
  208. package/lib/react-theme/ThemeProvider.js +1 -2
  209. package/lib/react-theme/ThemeProvider.js.map +1 -1
  210. package/lib/react-theme/createTheme.js +1 -2
  211. package/lib/react-theme/createTheme.js.map +1 -1
  212. package/lib/redux/_modularui/ModularUIConnector.js +1 -2
  213. package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
  214. package/lib/redux/_modularui/ModularUISelectors.js +1 -2
  215. package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
  216. package/lib/redux/_modularui/withModularUI.js +1 -2
  217. package/lib/redux/_modularui/withModularUI.js.map +1 -1
  218. package/lib/redux/_router/RouterConnectors.js +5 -10
  219. package/lib/redux/_router/RouterConnectors.js.map +1 -1
  220. package/lib/redux/connectors/Application.js +1 -2
  221. package/lib/redux/connectors/Application.js.map +1 -1
  222. package/lib/redux/connectors/Breadcrumb.js +1 -2
  223. package/lib/redux/connectors/Breadcrumb.js.map +1 -1
  224. package/lib/redux/connectors/CaseView.js +1 -2
  225. package/lib/redux/connectors/CaseView.js.map +1 -1
  226. package/lib/redux/connectors/ConceptDetail.js +1 -2
  227. package/lib/redux/connectors/ConceptDetail.js.map +1 -1
  228. package/lib/redux/connectors/ContentBrowser.js +1 -2
  229. package/lib/redux/connectors/ContentBrowser.js.map +1 -1
  230. package/lib/redux/connectors/ContentDetail.js +1 -2
  231. package/lib/redux/connectors/ContentDetail.js.map +1 -1
  232. package/lib/redux/connectors/ContentDetailSection.js +1 -2
  233. package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
  234. package/lib/redux/connectors/Form.js +1 -2
  235. package/lib/redux/connectors/Form.js.map +1 -1
  236. package/lib/redux/connectors/FormAttributeSet.js +1 -2
  237. package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
  238. package/lib/redux/connectors/ListDetail.js +1 -2
  239. package/lib/redux/connectors/ListDetail.js.map +1 -1
  240. package/lib/redux/connectors/Modal.js +1 -2
  241. package/lib/redux/connectors/Modal.js.map +1 -1
  242. package/lib/redux/connectors/ModelCatalog.js +1 -2
  243. package/lib/redux/connectors/ModelCatalog.js.map +1 -1
  244. package/lib/redux/connectors/Notification.js +1 -2
  245. package/lib/redux/connectors/Notification.js.map +1 -1
  246. package/lib/redux/connectors/PanelRenderer.js +1 -2
  247. package/lib/redux/connectors/PanelRenderer.js.map +1 -1
  248. package/lib/redux/connectors/Progress.js +1 -2
  249. package/lib/redux/connectors/Progress.js.map +1 -1
  250. package/lib/redux/connectors/ProgressIndicator.js +1 -2
  251. package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
  252. package/lib/redux/connectors/QuickSearch.js +1 -2
  253. package/lib/redux/connectors/QuickSearch.js.map +1 -1
  254. package/lib/redux/connectors/SignIn.js +1 -2
  255. package/lib/redux/connectors/SignIn.js.map +1 -1
  256. package/lib/redux/connectors/SignOut.js +1 -2
  257. package/lib/redux/connectors/SignOut.js.map +1 -1
  258. package/lib/redux/connectors/Tab.js +1 -2
  259. package/lib/redux/connectors/Tab.js.map +1 -1
  260. package/lib/redux/reducers/AuthReducer.js +1 -2
  261. package/lib/redux/reducers/AuthReducer.js.map +1 -1
  262. package/lib/redux/reducers/ErrorReducer.js +1 -2
  263. package/lib/redux/reducers/ErrorReducer.js.map +1 -1
  264. package/lib/redux/reducers/ModalsReducer.js +1 -2
  265. package/lib/redux/reducers/ModalsReducer.js.map +1 -1
  266. package/lib/redux/reducers/NotificationReducer.js +1 -2
  267. package/lib/redux/reducers/NotificationReducer.js.map +1 -1
  268. package/lib/redux/reducers/PreferencesReducer.js +1 -2
  269. package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
  270. package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -2
  271. package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
  272. package/lib/redux/store/configureStore.js +1 -2
  273. package/lib/redux/store/configureStore.js.map +1 -1
  274. package/lib/utils/browser/Cache.js +1 -2
  275. package/lib/utils/browser/Cache.js.map +1 -1
  276. package/lib/utils/datetime/DateTimeUtil.js +4 -8
  277. package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
  278. package/lib/utils/fetch/universalFetch.js +1 -2
  279. package/lib/utils/fetch/universalFetch.js.map +1 -1
  280. package/lib/utils/fetch/xhr.js +1 -2
  281. package/lib/utils/fetch/xhr.js.map +1 -1
  282. package/lib/utils/helpers/createUUID.js +1 -2
  283. package/lib/utils/helpers/createUUID.js.map +1 -1
  284. package/lib/utils/number/DecimalFormat.js +1 -2
  285. package/lib/utils/number/DecimalFormat.js.map +1 -1
  286. package/lib/utils/number/formatValue.js +1 -2
  287. package/lib/utils/number/formatValue.js.map +1 -1
  288. package/package.json +12 -12
  289. package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +1 -1
  290. package/src/react-client/client.js +6 -3
  291. package/types/models/filters/StringFilterModel.d.ts +15 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUIConnector.js","names":["_react","require","_reactRedux","_reactRouter","_ModularUIActions","_Href","_interopRequireDefault","_utils","_ModularUIUtils","_useModularUI","_useI18n","_jsxRuntime","modularUIConnector","name","resource","options","arguments","length","undefined","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","useDispatch","location","useLocation","url","useUrl","displayName","getDisplayName","contextId","modelEntry","useModularUI","modelKey","model","connectKey","handleManualReload","reloadOptions","reloadModel","handleFetch","href","fetchOptions","loadModularUI","reload","state","doReload","useReload","useEffect","isReload","removeModelByKey","locale","useLocale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI","jsx","_default","exports","default"],"sources":["../../../src/redux/_modularui/ModularUIConnector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport {\n loadModularUI,\n reloadModel,\n removeModelByKey,\n} from \"./ModularUIActions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./ModularUIUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst modularUIConnector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false },\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object,\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true }),\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name,\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default modularUIConnector;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAMA,IAAAI,KAAA,GAAAC,sBA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C;MAED,oBAAO,IAAA5B,WAAA,CAAAkD,GAAA,EAACvC,SAAS;QAAA,GAAKE,KAAK;QAAA,GAAM+B;MAAQ,CAAG,CAAC;IAC/C,CAAC;IAEDhC,gBAAgB,CAACQ,WAAW,GAAI,gBAAe,IAAAC,qBAAc,EAC3DT,gBAAgB,EAChBV,IACF,CAAE,EAAC;IAEH,OAAOU,gBAAgB;EACzB,CAAC;AACH,CAAC;AAAC,IAAAuC,QAAA,GAEalD,kBAAkB;AAAAmD,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"ModularUIConnector.js","names":["_react","require","_reactRedux","_reactRouter","_ModularUIActions","_Href","_interopRequireDefault","_utils","_ModularUIUtils","_useModularUI","_useI18n","_jsxRuntime","modularUIConnector","name","resource","options","arguments","length","undefined","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","useDispatch","location","useLocation","url","useUrl","displayName","getDisplayName","contextId","modelEntry","useModularUI","modelKey","model","connectKey","handleManualReload","reloadOptions","reloadModel","handleFetch","href","fetchOptions","loadModularUI","reload","state","doReload","useReload","useEffect","isReload","removeModelByKey","locale","useLocale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI","jsx","_default","exports","default"],"sources":["../../../src/redux/_modularui/ModularUIConnector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport {\n loadModularUI,\n reloadModel,\n removeModelByKey,\n} from \"./ModularUIActions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./ModularUIUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst modularUIConnector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false },\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object,\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true }),\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name,\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default modularUIConnector;\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAMA,IAAAI,KAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAAgD,IAAAU,WAAA,GAAAV,OAAA;AAmBhD;AACA;AACA,MAAMW,kBAAkB,GAAG,SAAAA,CACzBC,IAAY,EACZC,QAA2B,EAEmC;EAAA,IAD9DC,OAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;IAAEG,QAAQ,EAAE,MAAM;IAAEC,eAAe,EAAE;EAAM,CAAC;EAExE,MAAM;IACJD,QAAQ,GAAG,MAAM;IACjBC,eAAe,GAAG,KAAK;IACvB,GAAGC;EACL,CAAC,GAAGN,OAAO;EAEX,OAAQO,SAA6B,IAAK;IACxC,MAAMC,gBAAgB,GAAIC,KAAU,IAAK;MACvC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;MAC9B,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAAC,CAAC;MAE9B,MAAMC,GAAG,GAAG,IAAAC,sBAAM,EAAChB,QAAQ,EAAE;QAAEa,QAAQ;QAAE,GAAGH;MAAM,CAAC,CAAC;MACpD,MAAMO,WAAW,GAAG,IAAAC,qBAAc,EAACV,SAAS,EAAET,IAAI,EAAEW,KAAK,CAACS,SAAS,CAAC;;MAEpE;MACA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ACjB,QAAQ,GAAGe,UAAU,GAAGA,UAAU,CAACG,KAAK,GAAG,IAAI;QAChDV,QAAQ;QACR6B,MAAM,EAAEtB,UAAU,GAAGA,UAAU,CAACsB,MAAM,GAAG,IAAI;QAC7CC,gBAAgB,EAAEvB,UAAU,GAAGA,UAAU,CAACuB,gBAAgB,GAAG,IAAI;QACjEC,QAAQ,EAAEC,OAAO,CAACzB,UAAU,CAAC;QAC7BmB,MAAM;QACNO,cAAc,EAAElB,WAAW;QAC3BD,WAAW,EAAEF;MACf,CAAC;MAED,oBAAO,IAAA5B,WAAA,CAAAkD,GAAA,EAACvC,SAAS;QAAA,GAAKE,KAAK;QAAA,GAAM+B;MAAQ,CAAG,CAAC;IAC/C,CAAC;IAEDhC,gBAAgB,CAACQ,WAAW,GAAI,gBAAe,IAAAC,qBAAc,EAC3DT,gBAAgB,EAChBV,IACF,CAAE,EAAC;IAEH,OAAOU,gBAAgB;EACzB,CAAC;AACH,CAAC;AAAC,IAAAuC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEapD,kBAAkB"}
@@ -203,7 +203,7 @@ const getModels = state => {
203
203
  });
204
204
  return models;
205
205
  };
206
- const getActiveModels = (0, _reselect.createSelectorCreator)(_reselect.defaultMemoize, (value, other) => (0, _stringify.default)(value) === (0, _stringify.default)(other))([getLocation, getModels], (location, models) => {
206
+ const getActiveModels = exports.getActiveModels = (0, _reselect.createSelectorCreator)(_reselect.defaultMemoize, (value, other) => (0, _stringify.default)(value) === (0, _stringify.default)(other))([getLocation, getModels], (location, models) => {
207
207
  const contextModels = [];
208
208
  if (location) {
209
209
  const locationParts = location.split("/");
@@ -237,7 +237,6 @@ const getActiveModels = (0, _reselect.createSelectorCreator)(_reselect.defaultMe
237
237
 
238
238
  /**
239
239
  */
240
- exports.getActiveModels = getActiveModels;
241
240
  const getPreference = (state, preferenceName) => {
242
241
  if (state && state.preferences) {
243
242
  return state.preferences[preferenceName];
@@ -1 +1 @@
1
- {"version":3,"file":"ModularUISelectors.js","names":["_reselect","require","_objects","_Href","_interopRequireDefault","_ContentModel","_ContentTOCModel","_ApplicationModel","_TabModel","_CaseViewModel","_FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_map","default","_filter","_keys","call","key","model","exports","getFirstModelByInstance","_context3","_find","getActiveModelByInstance","location","getLocation","_context4","_startsWith","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","_context5","findHref","Href","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","has","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","createSelectorCreator","defaultMemoize","value","other","_stringify","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType","_context8","_context9"],"sources":["../../../src/redux/_modularui/ModularUISelectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string,\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (\n state: ReduxState,\n href: Href | string,\n): Array<string> => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return [];\n};\n\n/**\n */\nconst getLocation = (state: ReduxState): string =>\n state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state: ReduxState) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other),\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath),\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string,\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string,\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type,\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,SAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,cAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,UAAA,GAAAN,sBAAA,CAAAH,OAAA;AAKA;AACA;AACO,MAAMU,sBAAsB,GAAGA,CACpCC,KAAiB,EACjBC,QAAkB,KACQ;EAC1B,MAAMC,MAAM,GAAGF,KAAK,EAAEG,IAAI,EAAED,MAAM,IAAI,IAAI;EAC1C,MAAME,SAAS,GAAGJ,KAAK,EAAEI,SAAS;EAElC,IAAIA,SAAS,EAAE;IAAA,IAAAC,QAAA,EAAAC,SAAA;IACb,OAAO,IAAAC,IAAA,CAAAC,OAAA,EAAAH,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AAiB,EACjB8E,cAAsB,KACK;EAC3B,IAAI9E,KAAK,IAAIA,KAAK,CAAC+E,WAAW,EAAE;IAC9B,OAAO/E,KAAK,CAAC+E,WAAW,CAACD,cAAc,CAAC;EAC1C;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AAFAhE,OAAA,CAAA+D,aAAA,GAAAA,aAAA;AAGO,MAAMG,eAAe,GAAGA,CAC7BhF,KAAiB,EACjBqD,IAAY,KACc;EAC1B,IAAIrD,KAAK,IAAIA,KAAK,CAACI,SAAS,EAAE;IAAA,IAAA6E,SAAA,EAAAC,SAAA;IAC5B,OAAO,IAAA3E,IAAA,CAAAC,OAAA,EAAAyE,SAAA,OAAAxE,OAAA,CAAAD,OAAA,EAAA0E,SAAA,OAAAxE,KAAA,CAAAF,OAAA,EAAYR,KAAK,CAACI,SAAS,CAAC,EAAAO,IAAA,CAAAuE,SAAA,EAE9BtE,GAAG,IACFZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,IACpBZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,IAC1Bb,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAACwC,IAAI,KAAKA,IACxC,CAAC,EAAA1C,IAAA,CAAAsE,SAAA,EACKrE,GAAG,IAAKZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"ModularUISelectors.js","names":["_reselect","require","_objects","_Href","_interopRequireDefault","_ContentModel","_ContentTOCModel","_ApplicationModel","_TabModel","_CaseViewModel","_FormModel","getAllModelsByInstance","state","instance","locale","i18n","modularui","_context","_context2","_map","default","_filter","_keys","call","key","model","exports","getFirstModelByInstance","_context3","_find","getActiveModelByInstance","location","getLocation","_context4","_startsWith","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","_context5","findHref","Href","modelConfigKey","equals","keyByHref","_context6","allKeysByHref","_context7","router","pathname","getModels","models","forEach","modelKey","modelEntry","has","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","createSelectorCreator","defaultMemoize","value","other","_stringify","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType","_context8","_context9"],"sources":["../../../src/redux/_modularui/ModularUISelectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>,\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string,\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (\n state: ReduxState,\n href: Href | string,\n): Array<string> => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const { model } = state.modularui[key];\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return [];\n};\n\n/**\n */\nconst getLocation = (state: ReduxState): string =>\n state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state: ReduxState) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other),\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\",\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath),\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string,\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string,\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type,\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,gBAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,iBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,SAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,cAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,UAAA,GAAAN,sBAAA,CAAAH,OAAA;AAKA;AACA;AACO,MAAMU,sBAAsB,GAAGA,CACpCC,KAAiB,EACjBC,QAAkB,KACQ;EAC1B,MAAMC,MAAM,GAAGF,KAAK,EAAEG,IAAI,EAAED,MAAM,IAAI,IAAI;EAC1C,MAAME,SAAS,GAAGJ,KAAK,EAAEI,SAAS;EAElC,IAAIA,SAAS,EAAE;IAAA,IAAAC,QAAA,EAAAC,SAAA;IACb,OAAO,IAAAC,IAAA,CAAAC,OAAA,EAAAH,QAAA,OAAAI,OAAA,CAAAD,OAAA,EAAAF,SAAA,OAAAI,KAAA,CAAAF,OAAA,EAAYJ,SAAS,CAAC,EAAAO,IAAA,CAAAL,SAAA,EAClBM,GAAG,IAAK;MACf,MAAM;QAAEC;MAAM,CAAC,GAAGT,SAAS,CAACQ,GAAG,CAAC;MAChC,OAAOC,KAAK,YAAYZ,QAAQ,IAAIY,KAAK,CAAC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AAiB,EACjBqD,IAAY,KACc;EAC1B,IAAIrD,KAAK,IAAIA,KAAK,CAACI,SAAS,EAAE;IAAA,IAAA6E,SAAA,EAAAC,SAAA;IAC5B,OAAO,IAAA3E,IAAA,CAAAC,OAAA,EAAAyE,SAAA,OAAAxE,OAAA,CAAAD,OAAA,EAAA0E,SAAA,OAAAxE,KAAA,CAAAF,OAAA,EAAYR,KAAK,CAACI,SAAS,CAAC,EAAAO,IAAA,CAAAuE,SAAA,EAE9BtE,GAAG,IACFZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,IACpBZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,IAC1Bb,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAACwC,IAAI,KAAKA,IACxC,CAAC,EAAA1C,IAAA,CAAAsE,SAAA,EACKrE,GAAG,IAAKZ,KAAK,CAACI,SAAS,CAACQ,GAAG,CAAC,CAACC,KAAK,CAAC;EAC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
@@ -37,6 +37,5 @@ const mapDispatchToProps = {
37
37
  * This can be used to request modular ui services inside react view components
38
38
  */
39
39
  const withModularui = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
40
- var _default = withModularui;
41
- exports.default = _default;
40
+ var _default = exports.default = withModularui;
42
41
  //# sourceMappingURL=withModularUI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"withModularUI.js","names":["_reactRedux","require","_reselect","_ModularUIRequest","_interopRequireDefault","_ProgressIndicator","_Error","_i18n","_ModularUIActions","modularui","createSelector","getLocale","localeCode","href","options","arguments","length","undefined","modularuiRequest","ModularUIRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui","connect","_default","exports","default"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { getLocale } from \"../selectors/i18n\";\n\nimport { reloadModel } from \"./ModularUIActions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestModularUIOptions,\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst modularui = createSelector(\n [getLocale],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n },\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAkCA,MAAMQ,SAAS,GAAG,IAAAC,wBAAc,EAC9B,CAACC,eAAS,CAAC,EACVC,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjB,MAAMG,gBAAgB,GAAG,IAAIC,yBAAgB,CAACN,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACE,MAAM,GAAGR,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CACJ,CAAC;;AAED;AACA;AACA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1Db,SAAS,EAAEA,SAAS,CAACa,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCAAa;EACbC,cAAc,EAAdA,iCAAc;EACdC,WAAW,EAAXA,6BAAW;EACXC,WAAW,EAAXA;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAiC,GAAG,IAAAC,mBAAO,EAO/CT,eAAe,EAAEG,kBAAkB,CAAC;AAAC,IAAAO,QAAA,GAExBF,aAAa;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"withModularUI.js","names":["_reactRedux","require","_reselect","_ModularUIRequest","_interopRequireDefault","_ProgressIndicator","_Error","_i18n","_ModularUIActions","modularui","createSelector","getLocale","localeCode","href","options","arguments","length","undefined","modularuiRequest","ModularUIRequest","locale","mapStateToProps","state","i18n","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui","connect","_default","exports","default"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { getLocale } from \"../selectors/i18n\";\n\nimport { reloadModel } from \"./ModularUIActions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\nimport type { RequestModularUIOptions } from \"../../utils/fetch/types\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestModularUIOptions,\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst modularui = createSelector(\n [getLocale],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n },\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,iBAAA,GAAAP,OAAA;AAkCA,MAAMQ,SAAS,GAAG,IAAAC,wBAAc,EAC9B,CAACC,eAAS,CAAC,EACVC,UAAU,IACT,UAACC,IAAI,EAAmB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjB,MAAMG,gBAAgB,GAAG,IAAIC,yBAAgB,CAACN,IAAI,EAAEC,OAAO,CAAC;EAC5DI,gBAAgB,CAACE,MAAM,GAAGR,UAAU;EACpC,OAAOM,gBAAgB;AACzB,CACJ,CAAC;;AAED;AACA;AACA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1Db,SAAS,EAAEA,SAAS,CAACa,KAAK,CAAC;EAC3BF,MAAM,EAAEE,KAAK,CAACC,IAAI,CAACH;AACrB,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCAAa;EACbC,cAAc,EAAdA,iCAAc;EACdC,WAAW,EAAXA,6BAAW;EACXC,WAAW,EAAXA;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,aAAiC,GAAG,IAAAC,mBAAO,EAO/CT,eAAe,EAAEG,kBAAkB,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAExBJ,aAAa"}
@@ -8,40 +8,35 @@ var _reactRedux = require("react-redux");
8
8
  var _RouterActions = require("./RouterActions");
9
9
  /**
10
10
  */
11
- const withKey = (0, _reactRedux.connect)(state => ({
11
+ const withKey = exports.withKey = (0, _reactRedux.connect)(state => ({
12
12
  locationKey: state.router.location?.key ?? ""
13
13
  }));
14
14
 
15
15
  /**
16
16
  */
17
- exports.withKey = withKey;
18
- const withPathname = (0, _reactRedux.connect)(state => ({
17
+ const withPathname = exports.withPathname = (0, _reactRedux.connect)(state => ({
19
18
  pathname: state.router.location?.pathname
20
19
  }));
21
20
 
22
21
  /**
23
22
  */
24
- exports.withPathname = withPathname;
25
- const withLocation = (0, _reactRedux.connect)(state => ({
23
+ const withLocation = exports.withLocation = (0, _reactRedux.connect)(state => ({
26
24
  location: state.router.location
27
25
  }));
28
26
 
29
27
  /**
30
28
  */
31
- exports.withLocation = withLocation;
32
- const withQuerystring = (0, _reactRedux.connect)(state => ({
29
+ const withQuerystring = exports.withQuerystring = (0, _reactRedux.connect)(state => ({
33
30
  querystring: state.router.location?.search
34
31
  }));
35
32
 
36
33
  /**
37
34
  */
38
- exports.withQuerystring = withQuerystring;
39
- const withNavigation = (0, _reactRedux.connect)(null, {
35
+ const withNavigation = exports.withNavigation = (0, _reactRedux.connect)(null, {
40
36
  push: _RouterActions.push,
41
37
  replace: _RouterActions.replace,
42
38
  go: _RouterActions.go,
43
39
  goBack: _RouterActions.goBack,
44
40
  goForward: _RouterActions.goForward
45
41
  });
46
- exports.withNavigation = withNavigation;
47
42
  //# sourceMappingURL=RouterConnectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","connect","state","locationKey","router","location","key","exports","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/RouterConnectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./RouterActions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n }),\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _,\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AA6BA;AACA;AACA,MAAME,OAA2B,GAAG,IAAAC,mBAAO,EACxCC,KAAiB,KAAM;EACtBC,WAAW,EAAED,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEC,GAAG,IAAI;AAC7C,CAAC,CACH,CAAC;;AAED;AACA;AADAC,OAAA,CAAAP,OAAA,GAAAA,OAAA;AAEA,MAAMQ,YAAgC,GAAG,IAAAP,mBAAO,EAO7CC,KAAiB,KAAM;EACxBO,QAAQ,EAAEP,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEI;AACnC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAF,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAEA,MAAME,YAAgC,GAAG,IAAAT,mBAAO,EAO7CC,KAAiB,KAAM;EACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAM,CAACC;AACzB,CAAC,CAAC,CAAC;;AAEH;AACA;AADAE,OAAA,CAAAG,YAAA,GAAAA,YAAA;AAEA,MAAMC,eAAmC,GAAG,IAAAV,mBAAO,EAOhDC,KAAiB,KAAM;EACxBU,WAAW,EAAEV,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEQ;AACtC,CAAC,CAAC,CAAC;;AAEH;AACA;AADAN,OAAA,CAAAI,eAAA,GAAAA,eAAA;AAEA,MAAMG,cAAkC,GAAG,IAAAb,mBAAO,EAOhD,IAAI,EAAE;EACNc,IAAI,EAAJA,mBAAI;EACJC,OAAO,EAAPA,sBAAO;EACPC,EAAE,EAAFA,iBAAE;EACFC,MAAM,EAANA,qBAAM;EACNC,SAAS,EAATA;AACF,CAAC,CAAC;AAACZ,OAAA,CAAAO,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","exports","connect","state","locationKey","router","location","key","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/RouterConnectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./RouterActions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n }),\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _,\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _,\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AA6BA;AACA;AACA,MAAME,OAA2B,GAAAC,OAAA,CAAAD,OAAA,GAAG,IAAAE,mBAAO,EACxCC,KAAiB,KAAM;EACtBC,WAAW,EAAED,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEC,GAAG,IAAI;AAC7C,CAAC,CACH,CAAC;;AAED;AACA;AACA,MAAMC,YAAgC,GAAAP,OAAA,CAAAO,YAAA,GAAG,IAAAN,mBAAO,EAO7CC,KAAiB,KAAM;EACxBM,QAAQ,EAAEN,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEG;AACnC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,MAAMC,YAAgC,GAAAT,OAAA,CAAAS,YAAA,GAAG,IAAAR,mBAAO,EAO7CC,KAAiB,KAAM;EACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAM,CAACC;AACzB,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,MAAMK,eAAmC,GAAAV,OAAA,CAAAU,eAAA,GAAG,IAAAT,mBAAO,EAOhDC,KAAiB,KAAM;EACxBS,WAAW,EAAET,KAAK,CAACE,MAAM,CAACC,QAAQ,EAAEO;AACtC,CAAC,CAAC,CAAC;;AAEH;AACA;AACA,MAAMC,cAAkC,GAAAb,OAAA,CAAAa,cAAA,GAAG,IAAAZ,mBAAO,EAOhD,IAAI,EAAE;EACNa,IAAI,EAAJA,mBAAI;EACJC,OAAO,EAAPA,sBAAO;EACPC,EAAE,EAAFA,iBAAE;EACFC,MAAM,EAANA,qBAAM;EACNC,SAAS,EAATA;AACF,CAAC,CAAC"}
@@ -8,8 +8,7 @@ exports.connectApplication = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectApplication = (0, _ModularUIConnector.default)("Application", "/", {
11
+ const connectApplication = exports.connectApplication = (0, _ModularUIConnector.default)("Application", "/", {
12
12
  propName: "application"
13
13
  });
14
- exports.connectApplication = connectApplication;
15
14
  //# sourceMappingURL=Application.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","modularui","propName","exports"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,kBAAsC,GAAG,IAAAC,2BAAS,EAC7D,aAAa,EACb,GAAG,EACH;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAH,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","exports","modularui","propName"],"sources":["../../../src/redux/connectors/Application.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectApplication: ModularUIConnector = modularui(\n \"Application\",\n \"/\",\n {\n propName: \"application\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,kBAAsC,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,2BAAS,EAC7D,aAAa,EACb,GAAG,EACH;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
@@ -12,6 +12,5 @@ const mapStateToProps = state => ({
12
12
 
13
13
  /**
14
14
  */
15
- const connectBreadcrumb = (0, _reactRedux.connect)(mapStateToProps);
16
- exports.connectBreadcrumb = connectBreadcrumb;
15
+ const connectBreadcrumb = exports.connectBreadcrumb = (0, _reactRedux.connect)(mapStateToProps);
17
16
  //# sourceMappingURL=Breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","names":["_reactRedux","require","_ModularUISelectors","mapStateToProps","state","items","getActiveModels","connectBreadcrumb","connect","exports"],"sources":["../../../src/redux/connectors/Breadcrumb.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { getActiveModels } from \"../_modularui/ModularUISelectors\";\n\nimport type { ReduxState } from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n items: Array<{ key: string, href: Href, label: string, type: string }>,\n};\ntype Props = { ...StateProps, ... };\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n items: getActiveModels(state),\n});\n\n/**\n */\nexport const connectBreadcrumb: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n _,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAWA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,KAAK,EAAE,IAAAC,mCAAe,EAACF,KAAK;AAC9B,CAAC,CAAC;;AAEF;AACA;AACO,MAAMG,iBAAqC,GAAG,IAAAC,mBAAO,EAO1DL,eAAe,CAAC;AAACM,OAAA,CAAAF,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"Breadcrumb.js","names":["_reactRedux","require","_ModularUISelectors","mapStateToProps","state","items","getActiveModels","connectBreadcrumb","exports","connect"],"sources":["../../../src/redux/connectors/Breadcrumb.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { getActiveModels } from \"../_modularui/ModularUISelectors\";\n\nimport type { ReduxState } from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n items: Array<{ key: string, href: Href, label: string, type: string }>,\n};\ntype Props = { ...StateProps, ... };\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n items: getActiveModels(state),\n});\n\n/**\n */\nexport const connectBreadcrumb: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n _,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AAWA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,KAAK,EAAE,IAAAC,mCAAe,EAACF,KAAK;AAC9B,CAAC,CAAC;;AAEF;AACA;AACO,MAAMG,iBAAqC,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,mBAAO,EAO1DN,eAAe,CAAC"}
@@ -8,7 +8,7 @@ exports.connectCaseView = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
11
+ const connectCaseView = exports.connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
12
12
  let {
13
13
  match
14
14
  } = _ref;
@@ -16,5 +16,4 @@ const connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
16
16
  }, {
17
17
  propName: "caseview"
18
18
  });
19
- exports.connectCaseView = connectCaseView;
20
19
  //# sourceMappingURL=CaseView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","modularui","_ref","match","url","propName","exports"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,eAAmC,GAAG,IAAAC,2BAAS,EAC1D,UAAU,EACVC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAN,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","exports","modularui","_ref","match","url","propName"],"sources":["../../../src/redux/connectors/CaseView.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectCaseView: ModularUIConnector = modularui(\n \"CaseView\",\n ({ match }) => match.url,\n {\n propName: \"caseview\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,eAAmC,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,2BAAS,EAC1D,UAAU,EACVC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
@@ -8,7 +8,7 @@ exports.connectConceptDetail = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _ref => {
11
+ const connectConceptDetail = exports.connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _ref => {
12
12
  let {
13
13
  concept,
14
14
  location
@@ -17,5 +17,4 @@ const connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _
17
17
  }, {
18
18
  propName: "conceptDetail"
19
19
  });
20
- exports.connectConceptDetail = connectConceptDetail;
21
20
  //# sourceMappingURL=ConceptDetail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","modularui","_ref","concept","location","search","propName","exports"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OAAM,aAAYC,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAC9B,CAAC;AAACC,OAAA,CAAAP,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","exports","modularui","_ref","concept","location","search","propName"],"sources":["../../../src/redux/connectors/ConceptDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectConceptDetail: ModularUIConnector = modularui(\n \"ConceptDetail\",\n ({ concept, location }) => `/concepts/${concept}${location.search}`,\n { propName: \"conceptDetail\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OAAM,aAAYC,OAAQ,GAAEC,QAAQ,CAACC,MAAO,EAAC;AAAA,GACnE;EAAEC,QAAQ,EAAE;AAAgB,CAC9B,CAAC"}
@@ -8,7 +8,7 @@ exports.connectContentBrowser = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectContentBrowser = (0, _ModularUIConnector.default)("ContentBrowser", _ref => {
11
+ const connectContentBrowser = exports.connectContentBrowser = (0, _ModularUIConnector.default)("ContentBrowser", _ref => {
12
12
  let {
13
13
  href
14
14
  } = _ref;
@@ -16,5 +16,4 @@ const connectContentBrowser = (0, _ModularUIConnector.default)("ContentBrowser",
16
16
  }, {
17
17
  propName: "contentindex"
18
18
  });
19
- exports.connectContentBrowser = connectContentBrowser;
20
19
  //# sourceMappingURL=ContentBrowser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentBrowser.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentBrowser","modularui","_ref","href","propName","exports"],"sources":["../../../src/redux/connectors/ContentBrowser.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentBrowser: ModularUIConnector = modularui(\n \"ContentBrowser\",\n ({ href }) => href,\n {\n propName: \"contentindex\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,qBAAyC,GAAG,IAAAC,2BAAS,EAChE,gBAAgB,EAChBC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"file":"ContentBrowser.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentBrowser","exports","modularui","_ref","href","propName"],"sources":["../../../src/redux/connectors/ContentBrowser.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentBrowser: ModularUIConnector = modularui(\n \"ContentBrowser\",\n ({ href }) => href,\n {\n propName: \"contentindex\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,qBAAyC,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAAE,2BAAS,EAChE,gBAAgB,EAChBC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
@@ -8,7 +8,7 @@ exports.connectContentDetail = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectContentDetail = (0, _ModularUIConnector.default)("ContentDetail", _ref => {
11
+ const connectContentDetail = exports.connectContentDetail = (0, _ModularUIConnector.default)("ContentDetail", _ref => {
12
12
  let {
13
13
  content,
14
14
  location
@@ -17,5 +17,4 @@ const connectContentDetail = (0, _ModularUIConnector.default)("ContentDetail", _
17
17
  }, {
18
18
  propName: "contentTOC"
19
19
  });
20
- exports.connectContentDetail = connectContentDetail;
21
20
  //# sourceMappingURL=ContentDetail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentDetail","modularui","_ref","content","location","decodeURIComponent","search","propName","exports"],"sources":["../../../src/redux/connectors/ContentDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetail: ModularUIConnector = modularui(\n \"ContentDetail\",\n ({ content, location }) =>\n `/content/${decodeURIComponent(content)}${location.search}`,\n { propName: \"contentTOC\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAG,IAAAC,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OACnB,YAAWG,kBAAkB,CAACF,OAAO,CAAE,GAAEC,QAAQ,CAACE,MAAO,EAAC;AAAA,GAC7D;EAAEC,QAAQ,EAAE;AAAa,CAC3B,CAAC;AAACC,OAAA,CAAAR,oBAAA,GAAAA,oBAAA"}
1
+ {"version":3,"file":"ContentDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentDetail","exports","modularui","_ref","content","location","decodeURIComponent","search","propName"],"sources":["../../../src/redux/connectors/ContentDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetail: ModularUIConnector = modularui(\n \"ContentDetail\",\n ({ content, location }) =>\n `/content/${decodeURIComponent(content)}${location.search}`,\n { propName: \"contentTOC\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,oBAAwC,GAAAC,OAAA,CAAAD,oBAAA,GAAG,IAAAE,2BAAS,EAC/D,eAAe,EACfC,IAAA;EAAA,IAAC;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAAF,IAAA;EAAA,OACnB,YAAWG,kBAAkB,CAACF,OAAO,CAAE,GAAEC,QAAQ,CAACE,MAAO,EAAC;AAAA,GAC7D;EAAEC,QAAQ,EAAE;AAAa,CAC3B,CAAC"}
@@ -9,7 +9,7 @@ var _Href = _interopRequireDefault(require("../../models/href/Href"));
9
9
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
10
10
  /**
11
11
  */
12
- const connectContentDetailSection = (0, _ModularUIConnector.default)("ContentDetailSection", _ref => {
12
+ const connectContentDetailSection = exports.connectContentDetailSection = (0, _ModularUIConnector.default)("ContentDetailSection", _ref => {
13
13
  let {
14
14
  sectioncontent,
15
15
  section,
@@ -19,5 +19,4 @@ const connectContentDetailSection = (0, _ModularUIConnector.default)("ContentDet
19
19
  }, {
20
20
  propName: "content"
21
21
  });
22
- exports.connectContentDetailSection = connectContentDetailSection;
23
22
  //# sourceMappingURL=ContentDetailSection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentDetailSection.js","names":["_Href","_interopRequireDefault","require","_ModularUIConnector","connectContentDetailSection","modularui","_ref","sectioncontent","section","entryDate","Href","decodeURIComponent","addParameter","propName","exports"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`,\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,2BAA+C,GAAG,IAAAC,2BAAS,EACtE,sBAAsB,EACtBC,IAAA;EAAA,IAAC;IAAEC,cAAc;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAAH,IAAA;EAAA,OACrC,IAAII,aAAI,CACL,YAAWC,kBAAkB,CAACJ,cAAc,CAAE,IAAGC,OAAQ,EAC5D,CAAC,CAACI,YAAY,CAAC,WAAW,EAAEH,SAAS,CAAC;AAAA,GACxC;EAAEI,QAAQ,EAAE;AAAU,CACxB,CAAC;AAACC,OAAA,CAAAV,2BAAA,GAAAA,2BAAA"}
1
+ {"version":3,"file":"ContentDetailSection.js","names":["_Href","_interopRequireDefault","require","_ModularUIConnector","connectContentDetailSection","exports","modularui","_ref","sectioncontent","section","entryDate","Href","decodeURIComponent","addParameter","propName"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`,\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,2BAA+C,GAAAC,OAAA,CAAAD,2BAAA,GAAG,IAAAE,2BAAS,EACtE,sBAAsB,EACtBC,IAAA;EAAA,IAAC;IAAEC,cAAc;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAAH,IAAA;EAAA,OACrC,IAAII,aAAI,CACL,YAAWC,kBAAkB,CAACJ,cAAc,CAAE,IAAGC,OAAQ,EAC5D,CAAC,CAACI,YAAY,CAAC,WAAW,EAAEH,SAAS,CAAC;AAAA,GACxC;EAAEI,QAAQ,EAAE;AAAU,CACxB,CAAC"}
@@ -39,6 +39,5 @@ const moduiConnectedForm = (0, _ModularUIConnector.default)("Form", _ref => {
39
39
 
40
40
  /**
41
41
  */
42
- const connectForm = (0, _redux.compose)(moduiConnectedForm, reduxConnectedForm);
43
- exports.connectForm = connectForm;
42
+ const connectForm = exports.connectForm = (0, _redux.compose)(moduiConnectedForm, reduxConnectedForm);
44
43
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","names":["_redux","require","_reactRedux","_ModularUIConnector","_interopRequireDefault","_Constants","_Settings","_Form","_Notification","_Href","mapStateToProps","state","ownProps","isModal","router","location","modal","mapDispatchToProps","onPrevious","previousObject","onCancel","cancelForm","showFormNotification","reduxConnectedForm","connect","moduiConnectedForm","modularui","_ref","href","formHref","Href","pathname","search","getSetting","addParameter","propName","method","HTTP_METHODS","POST","connectForm","compose","exports"],"sources":["../../../src/redux/connectors/Form.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { cancelForm, previousObject } from \"../actions/Form\";\nimport { showFormNotification } from \"../actions/Notification\";\n\nimport Href from \"../../models/href/Href\";\n\nimport type { AbstractComponent } from \"react\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ContextRouter } from \"react-router\";\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ModularUIConnector, UpdateFormAction } from \"../_modularui/types\";\n\ntype OwnProps = {\n ...?ContextRouter,\n href?: Href,\n isModal?: boolean,\n redirectTo?: string,\n};\n\ntype StateProps = {\n isModal: boolean,\n};\n\ntype DispatchProps = {\n onPrevious: (form: FormModel) => UpdateFormAction,\n onCancel: (form: FormModel) => ThunkAction,\n showFormNotification: (form: FormModel) => ThunkAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (\n state: ReduxState,\n ownProps: OwnProps,\n): StateProps => ({\n isModal: state.router.location?.state?.modal || ownProps.isModal || false,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n onPrevious: previousObject,\n onCancel: cancelForm,\n showFormNotification,\n};\n\nconst reduxConnectedForm = connect<Props, OwnProps, StateProps, _, _, _>(\n mapStateToProps,\n mapDispatchToProps,\n);\n\nconst moduiConnectedForm: ModularUIConnector = modularui(\n \"Form\",\n ({ href, location }) => {\n const formHref = href || new Href(`${location.pathname}${location.search}`);\n\n if (getSetting(\"ALWAYS_COMMIT_FORM\")) {\n return formHref;\n }\n\n return formHref.addParameter(\"commit\", \"false\");\n },\n { propName: \"form\", method: HTTP_METHODS.POST },\n);\n\n/**\n */\nexport const connectForm: (\n Component: AbstractComponent<Props>,\n) => AbstractComponent<OwnProps> = compose(\n moduiConnectedForm,\n reduxConnectedForm,\n);\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AAEA,IAAAQ,KAAA,GAAAL,sBAAA,CAAAH,OAAA;AA+BA,MAAMS,eAAe,GAAGA,CACtBC,KAAiB,EACjBC,QAAkB,MACF;EAChBC,OAAO,EAAEF,KAAK,CAACG,MAAM,CAACC,QAAQ,EAAEJ,KAAK,EAAEK,KAAK,IAAIJ,QAAQ,CAACC,OAAO,IAAI;AACtE,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,UAAU,EAAEC,oBAAc;EAC1BC,QAAQ,EAAEC,gBAAU;EACpBC,oBAAoB,EAApBA;AACF,CAAC;AAED,MAAMC,kBAAkB,GAAG,IAAAC,mBAAO,EAChCd,eAAe,EACfO,kBACF,CAAC;AAED,MAAMQ,kBAAsC,GAAG,IAAAC,2BAAS,EACtD,MAAM,EACNC,IAAA,IAAwB;EAAA,IAAvB;IAAEC,IAAI;IAAEb;EAAS,CAAC,GAAAY,IAAA;EACjB,MAAME,QAAQ,GAAGD,IAAI,IAAI,IAAIE,aAAI,CAAE,GAAEf,QAAQ,CAACgB,QAAS,GAAEhB,QAAQ,CAACiB,MAAO,EAAC,CAAC;EAE3E,IAAI,IAAAC,oBAAU,EAAC,oBAAoB,CAAC,EAAE;IACpC,OAAOJ,QAAQ;EACjB;EAEA,OAAOA,QAAQ,CAACK,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;AACjD,CAAC,EACD;EAAEC,QAAQ,EAAE,MAAM;EAAEC,MAAM,EAAEC,uBAAY,CAACC;AAAK,CAChD,CAAC;;AAED;AACA;AACO,MAAMC,WAEmB,GAAG,IAAAC,cAAO,EACxCf,kBAAkB,EAClBF,kBACF,CAAC;AAACkB,OAAA,CAAAF,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"Form.js","names":["_redux","require","_reactRedux","_ModularUIConnector","_interopRequireDefault","_Constants","_Settings","_Form","_Notification","_Href","mapStateToProps","state","ownProps","isModal","router","location","modal","mapDispatchToProps","onPrevious","previousObject","onCancel","cancelForm","showFormNotification","reduxConnectedForm","connect","moduiConnectedForm","modularui","_ref","href","formHref","Href","pathname","search","getSetting","addParameter","propName","method","HTTP_METHODS","POST","connectForm","exports","compose"],"sources":["../../../src/redux/connectors/Form.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { cancelForm, previousObject } from \"../actions/Form\";\nimport { showFormNotification } from \"../actions/Notification\";\n\nimport Href from \"../../models/href/Href\";\n\nimport type { AbstractComponent } from \"react\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ContextRouter } from \"react-router\";\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ModularUIConnector, UpdateFormAction } from \"../_modularui/types\";\n\ntype OwnProps = {\n ...?ContextRouter,\n href?: Href,\n isModal?: boolean,\n redirectTo?: string,\n};\n\ntype StateProps = {\n isModal: boolean,\n};\n\ntype DispatchProps = {\n onPrevious: (form: FormModel) => UpdateFormAction,\n onCancel: (form: FormModel) => ThunkAction,\n showFormNotification: (form: FormModel) => ThunkAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (\n state: ReduxState,\n ownProps: OwnProps,\n): StateProps => ({\n isModal: state.router.location?.state?.modal || ownProps.isModal || false,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n onPrevious: previousObject,\n onCancel: cancelForm,\n showFormNotification,\n};\n\nconst reduxConnectedForm = connect<Props, OwnProps, StateProps, _, _, _>(\n mapStateToProps,\n mapDispatchToProps,\n);\n\nconst moduiConnectedForm: ModularUIConnector = modularui(\n \"Form\",\n ({ href, location }) => {\n const formHref = href || new Href(`${location.pathname}${location.search}`);\n\n if (getSetting(\"ALWAYS_COMMIT_FORM\")) {\n return formHref;\n }\n\n return formHref.addParameter(\"commit\", \"false\");\n },\n { propName: \"form\", method: HTTP_METHODS.POST },\n);\n\n/**\n */\nexport const connectForm: (\n Component: AbstractComponent<Props>,\n) => AbstractComponent<OwnProps> = compose(\n moduiConnectedForm,\n reduxConnectedForm,\n);\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AAEA,IAAAQ,KAAA,GAAAL,sBAAA,CAAAH,OAAA;AA+BA,MAAMS,eAAe,GAAGA,CACtBC,KAAiB,EACjBC,QAAkB,MACF;EAChBC,OAAO,EAAEF,KAAK,CAACG,MAAM,CAACC,QAAQ,EAAEJ,KAAK,EAAEK,KAAK,IAAIJ,QAAQ,CAACC,OAAO,IAAI;AACtE,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,UAAU,EAAEC,oBAAc;EAC1BC,QAAQ,EAAEC,gBAAU;EACpBC,oBAAoB,EAApBA;AACF,CAAC;AAED,MAAMC,kBAAkB,GAAG,IAAAC,mBAAO,EAChCd,eAAe,EACfO,kBACF,CAAC;AAED,MAAMQ,kBAAsC,GAAG,IAAAC,2BAAS,EACtD,MAAM,EACNC,IAAA,IAAwB;EAAA,IAAvB;IAAEC,IAAI;IAAEb;EAAS,CAAC,GAAAY,IAAA;EACjB,MAAME,QAAQ,GAAGD,IAAI,IAAI,IAAIE,aAAI,CAAE,GAAEf,QAAQ,CAACgB,QAAS,GAAEhB,QAAQ,CAACiB,MAAO,EAAC,CAAC;EAE3E,IAAI,IAAAC,oBAAU,EAAC,oBAAoB,CAAC,EAAE;IACpC,OAAOJ,QAAQ;EACjB;EAEA,OAAOA,QAAQ,CAACK,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;AACjD,CAAC,EACD;EAAEC,QAAQ,EAAE,MAAM;EAAEC,MAAM,EAAEC,uBAAY,CAACC;AAAK,CAChD,CAAC;;AAED;AACA;AACO,MAAMC,WAEmB,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,cAAO,EACxChB,kBAAkB,EAClBF,kBACF,CAAC"}
@@ -22,6 +22,5 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
22
22
 
23
23
  /**
24
24
  */
25
- const connectFormAttributeSet = (0, _reactRedux.connect)(null, mapDispatchToProps);
26
- exports.connectFormAttributeSet = connectFormAttributeSet;
25
+ const connectFormAttributeSet = exports.connectFormAttributeSet = (0, _reactRedux.connect)(null, mapDispatchToProps);
27
26
  //# sourceMappingURL=FormAttributeSet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormAttributeSet.js","names":["_reactRedux","require","_FormAttributeSet","_FormAttributeSetRepeatable","mapDispatchToProps","dispatch","ownProps","onAttributeChange","attribute","value","options","arguments","length","undefined","autosubmit","autosave","updateFormAttribute","form","object","onAddAttributeSetClick","addRepeatableAttributeSet","onCancelAttributeSetClick","formObject","cancelRepeatableAttributeSet","onRemoveAttributeSetClick","removeRepeatableAttributeSet","connectFormAttributeSet","connect","exports"],"sources":["../../../src/redux/connectors/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { updateFormAttribute } from \"../actions/FormAttributeSet\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../actions/FormAttributeSetRepeatable\";\n\nimport type { ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { DispatchAPI } from \"redux\";\nimport type { ComponentType } from \"react\";\n\ntype Dispatch = DispatchAPI<UpdateFormAction> & DispatchAPI<ThunkAction>;\n\ntype OwnProps = {\n form: FormModel,\n object: FormObjectModel,\n formLayout?: \"vertical\" | \"horizontal\" | \"compact\",\n autosubmit?: boolean,\n autosave?: boolean,\n};\n\ntype DispatchProps = {\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions,\n ) => ThunkAction,\n onAddAttributeSetClick: () => UpdateFormAction,\n onCancelAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n onRemoveAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps = (\n dispatch: Dispatch,\n ownProps: OwnProps,\n): DispatchProps => ({\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions = {\n autosubmit: ownProps.autosubmit || false,\n autosave: ownProps.autosave || false,\n },\n ) =>\n dispatch(\n updateFormAttribute(\n ownProps.form,\n ownProps.object,\n attribute,\n value,\n options,\n ),\n ),\n onAddAttributeSetClick: () =>\n dispatch(addRepeatableAttributeSet(ownProps.form)),\n onCancelAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(ownProps.form, formObject)),\n onRemoveAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(ownProps.form, formObject)),\n});\n\n/**\n */\nexport const connectFormAttributeSet: ComponentType<any> = connect<\n Props,\n OwnProps,\n _,\n DispatchProps,\n _,\n _,\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAwCA,MAAMG,kBAAkB,GAAGA,CACzBC,QAAkB,EAClBC,QAAkB,MACC;EACnBC,iBAAiB,EAAE,SAAAA,CACjBC,SAAwB,EACxBC,KAAa;IAAA,IACbC,OAA0B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;MAC3BG,UAAU,EAAER,QAAQ,CAACQ,UAAU,IAAI,KAAK;MACxCC,QAAQ,EAAET,QAAQ,CAACS,QAAQ,IAAI;IACjC,CAAC;IAAA,OAEDV,QAAQ,CACN,IAAAW,qCAAmB,EACjBV,QAAQ,CAACW,IAAI,EACbX,QAAQ,CAACY,MAAM,EACfV,SAAS,EACTC,KAAK,EACLC,OACF,CACF,CAAC;EAAA;EACHS,sBAAsB,EAAEA,CAAA,KACtBd,QAAQ,CAAC,IAAAe,qDAAyB,EAACd,QAAQ,CAACW,IAAI,CAAC,CAAC;EACpDI,yBAAyB,EAAGC,UAA2B,IACrDjB,QAAQ,CAAC,IAAAkB,wDAA4B,EAACjB,QAAQ,CAACW,IAAI,EAAEK,UAAU,CAAC,CAAC;EACnEE,yBAAyB,EAAGF,UAA2B,IACrDjB,QAAQ,CAAC,IAAAoB,wDAA4B,EAACnB,QAAQ,CAACW,IAAI,EAAEK,UAAU,CAAC;AACpE,CAAC,CAAC;;AAEF;AACA;AACO,MAAMI,uBAA2C,GAAG,IAAAC,mBAAO,EAOhE,IAAI,EAAEvB,kBAAkB,CAAC;AAACwB,OAAA,CAAAF,uBAAA,GAAAA,uBAAA"}
1
+ {"version":3,"file":"FormAttributeSet.js","names":["_reactRedux","require","_FormAttributeSet","_FormAttributeSetRepeatable","mapDispatchToProps","dispatch","ownProps","onAttributeChange","attribute","value","options","arguments","length","undefined","autosubmit","autosave","updateFormAttribute","form","object","onAddAttributeSetClick","addRepeatableAttributeSet","onCancelAttributeSetClick","formObject","cancelRepeatableAttributeSet","onRemoveAttributeSetClick","removeRepeatableAttributeSet","connectFormAttributeSet","exports","connect"],"sources":["../../../src/redux/connectors/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { updateFormAttribute } from \"../actions/FormAttributeSet\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../actions/FormAttributeSetRepeatable\";\n\nimport type { ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { DispatchAPI } from \"redux\";\nimport type { ComponentType } from \"react\";\n\ntype Dispatch = DispatchAPI<UpdateFormAction> & DispatchAPI<ThunkAction>;\n\ntype OwnProps = {\n form: FormModel,\n object: FormObjectModel,\n formLayout?: \"vertical\" | \"horizontal\" | \"compact\",\n autosubmit?: boolean,\n autosave?: boolean,\n};\n\ntype DispatchProps = {\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions,\n ) => ThunkAction,\n onAddAttributeSetClick: () => UpdateFormAction,\n onCancelAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n onRemoveAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps = (\n dispatch: Dispatch,\n ownProps: OwnProps,\n): DispatchProps => ({\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions = {\n autosubmit: ownProps.autosubmit || false,\n autosave: ownProps.autosave || false,\n },\n ) =>\n dispatch(\n updateFormAttribute(\n ownProps.form,\n ownProps.object,\n attribute,\n value,\n options,\n ),\n ),\n onAddAttributeSetClick: () =>\n dispatch(addRepeatableAttributeSet(ownProps.form)),\n onCancelAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(ownProps.form, formObject)),\n onRemoveAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(ownProps.form, formObject)),\n});\n\n/**\n */\nexport const connectFormAttributeSet: ComponentType<any> = connect<\n Props,\n OwnProps,\n _,\n DispatchProps,\n _,\n _,\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAwCA,MAAMG,kBAAkB,GAAGA,CACzBC,QAAkB,EAClBC,QAAkB,MACC;EACnBC,iBAAiB,EAAE,SAAAA,CACjBC,SAAwB,EACxBC,KAAa;IAAA,IACbC,OAA0B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;MAC3BG,UAAU,EAAER,QAAQ,CAACQ,UAAU,IAAI,KAAK;MACxCC,QAAQ,EAAET,QAAQ,CAACS,QAAQ,IAAI;IACjC,CAAC;IAAA,OAEDV,QAAQ,CACN,IAAAW,qCAAmB,EACjBV,QAAQ,CAACW,IAAI,EACbX,QAAQ,CAACY,MAAM,EACfV,SAAS,EACTC,KAAK,EACLC,OACF,CACF,CAAC;EAAA;EACHS,sBAAsB,EAAEA,CAAA,KACtBd,QAAQ,CAAC,IAAAe,qDAAyB,EAACd,QAAQ,CAACW,IAAI,CAAC,CAAC;EACpDI,yBAAyB,EAAGC,UAA2B,IACrDjB,QAAQ,CAAC,IAAAkB,wDAA4B,EAACjB,QAAQ,CAACW,IAAI,EAAEK,UAAU,CAAC,CAAC;EACnEE,yBAAyB,EAAGF,UAA2B,IACrDjB,QAAQ,CAAC,IAAAoB,wDAA4B,EAACnB,QAAQ,CAACW,IAAI,EAAEK,UAAU,CAAC;AACpE,CAAC,CAAC;;AAEF;AACA;AACO,MAAMI,uBAA2C,GAAAC,OAAA,CAAAD,uBAAA,GAAG,IAAAE,mBAAO,EAOhE,IAAI,EAAExB,kBAAkB,CAAC"}
@@ -9,7 +9,7 @@ var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularU
9
9
  var _ListDetailModel = _interopRequireDefault(require("../../models/list/ListDetailModel"));
10
10
  /**
11
11
  */
12
- const connectListDetail = (0, _ModularUIConnector.default)("ListDetail", _ref => {
12
+ const connectListDetail = exports.connectListDetail = (0, _ModularUIConnector.default)("ListDetail", _ref => {
13
13
  let {
14
14
  href
15
15
  } = _ref;
@@ -18,5 +18,4 @@ const connectListDetail = (0, _ModularUIConnector.default)("ListDetail", _ref =>
18
18
  propName: "detail",
19
19
  targetModel: _ListDetailModel.default
20
20
  });
21
- exports.connectListDetail = connectListDetail;
22
21
  //# sourceMappingURL=ListDetail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","_ListDetailModel","connectListDetail","modularui","_ref","href","propName","targetModel","ListDetailModel","exports"],"sources":["../../../src/redux/connectors/ListDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport ListDetailModel from \"../../models/list/ListDetailModel\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectListDetail: ModularUIConnector = modularui(\n \"ListDetail\",\n ({ href }) => href,\n {\n propName: \"detail\",\n targetModel: ListDetailModel,\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,iBAAqC,GAAG,IAAAC,2BAAS,EAC5D,YAAY,EACZC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE,QAAQ;EAClBC,WAAW,EAAEC;AACf,CACF,CAAC;AAACC,OAAA,CAAAP,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"ListDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","_ListDetailModel","connectListDetail","exports","modularui","_ref","href","propName","targetModel","ListDetailModel"],"sources":["../../../src/redux/connectors/ListDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport ListDetailModel from \"../../models/list/ListDetailModel\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectListDetail: ModularUIConnector = modularui(\n \"ListDetail\",\n ({ href }) => href,\n {\n propName: \"detail\",\n targetModel: ListDetailModel,\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,iBAAqC,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,2BAAS,EAC5D,YAAY,EACZC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE,QAAQ;EAClBC,WAAW,EAAEC;AACf,CACF,CAAC"}
@@ -23,6 +23,5 @@ const mapDispatchToProps = {
23
23
 
24
24
  /**
25
25
  */
26
- const connectModal = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
27
- exports.connectModal = connectModal;
26
+ const connectModal = exports.connectModal = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
28
27
  //# sourceMappingURL=Modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","names":["_reactRedux","require","_Modals","mapStateToProps","state","_context","visibleModal","_find","default","modals","call","modal","visible","visibleModalKey","key","visibleModalSize","size","mapDispatchToProps","onShowModal","showModal","onCloseModal","closeModal","connectModal","connect","exports"],"sources":["../../../src/redux/connectors/Modal.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../actions/Modals\";\n\nimport type { ReduxState, ShowModalAction, CloseModalAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n visibleModalKey: string | null,\n visibleModalSize?: string | null,\n};\n\ntype DispatchProps = {\n onShowModal: (modalKey: string) => ShowModalAction,\n onCloseModal: (modalKey: string) => CloseModalAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const visibleModal = state.modals.modals.find((modal) => modal.visible);\n\n return {\n visibleModalKey: visibleModal ? visibleModal.key : null,\n visibleModalSize: visibleModal ? visibleModal.size : null,\n };\n};\n\nconst mapDispatchToProps = {\n onShowModal: showModal,\n onCloseModal: closeModal,\n};\n\n/**\n */\nexport const connectModal: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAoBA,MAAME,eAAe,GAAIC,KAAiB,IAAiB;EAAA,IAAAC,QAAA;EACzD,MAAMC,YAAY,GAAG,IAAAC,KAAA,CAAAC,OAAA,EAAAH,QAAA,GAAAD,KAAK,CAACK,MAAM,CAACA,MAAM,EAAAC,IAAA,CAAAL,QAAA,EAAOM,KAAK,IAAKA,KAAK,CAACC,OAAO,CAAC;EAEvE,OAAO;IACLC,eAAe,EAAEP,YAAY,GAAGA,YAAY,CAACQ,GAAG,GAAG,IAAI;IACvDC,gBAAgB,EAAET,YAAY,GAAGA,YAAY,CAACU,IAAI,GAAG;EACvD,CAAC;AACH,CAAC;AAED,MAAMC,kBAAkB,GAAG;EACzBC,WAAW,EAAEC,iBAAS;EACtBC,YAAY,EAAEC;AAChB,CAAC;;AAED;AACA;AACO,MAAMC,YAAgC,GAAG,IAAAC,mBAAO,EAOrDpB,eAAe,EAAEc,kBAAkB,CAAC;AAACO,OAAA,CAAAF,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"file":"Modal.js","names":["_reactRedux","require","_Modals","mapStateToProps","state","_context","visibleModal","_find","default","modals","call","modal","visible","visibleModalKey","key","visibleModalSize","size","mapDispatchToProps","onShowModal","showModal","onCloseModal","closeModal","connectModal","exports","connect"],"sources":["../../../src/redux/connectors/Modal.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../actions/Modals\";\n\nimport type { ReduxState, ShowModalAction, CloseModalAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n visibleModalKey: string | null,\n visibleModalSize?: string | null,\n};\n\ntype DispatchProps = {\n onShowModal: (modalKey: string) => ShowModalAction,\n onCloseModal: (modalKey: string) => CloseModalAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const visibleModal = state.modals.modals.find((modal) => modal.visible);\n\n return {\n visibleModalKey: visibleModal ? visibleModal.key : null,\n visibleModalSize: visibleModal ? visibleModal.size : null,\n };\n};\n\nconst mapDispatchToProps = {\n onShowModal: showModal,\n onCloseModal: closeModal,\n};\n\n/**\n */\nexport const connectModal: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAoBA,MAAME,eAAe,GAAIC,KAAiB,IAAiB;EAAA,IAAAC,QAAA;EACzD,MAAMC,YAAY,GAAG,IAAAC,KAAA,CAAAC,OAAA,EAAAH,QAAA,GAAAD,KAAK,CAACK,MAAM,CAACA,MAAM,EAAAC,IAAA,CAAAL,QAAA,EAAOM,KAAK,IAAKA,KAAK,CAACC,OAAO,CAAC;EAEvE,OAAO;IACLC,eAAe,EAAEP,YAAY,GAAGA,YAAY,CAACQ,GAAG,GAAG,IAAI;IACvDC,gBAAgB,EAAET,YAAY,GAAGA,YAAY,CAACU,IAAI,GAAG;EACvD,CAAC;AACH,CAAC;AAED,MAAMC,kBAAkB,GAAG;EACzBC,WAAW,EAAEC,iBAAS;EACtBC,YAAY,EAAEC;AAChB,CAAC;;AAED;AACA;AACO,MAAMC,YAAgC,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAO,EAOrDrB,eAAe,EAAEc,kBAAkB,CAAC"}
@@ -8,7 +8,7 @@ exports.connectModelCatalog = void 0;
8
8
  var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
9
9
  /**
10
10
  */
11
- const connectModelCatalog = (0, _ModularUIConnector.default)("ModelCatalog", _ref => {
11
+ const connectModelCatalog = exports.connectModelCatalog = (0, _ModularUIConnector.default)("ModelCatalog", _ref => {
12
12
  let {
13
13
  match
14
14
  } = _ref;
@@ -16,5 +16,4 @@ const connectModelCatalog = (0, _ModularUIConnector.default)("ModelCatalog", _re
16
16
  }, {
17
17
  propName: "modelcatalog"
18
18
  });
19
- exports.connectModelCatalog = connectModelCatalog;
20
19
  //# sourceMappingURL=ModelCatalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModelCatalog.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectModelCatalog","modularui","_ref","match","url","propName","exports"],"sources":["../../../src/redux/connectors/ModelCatalog.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectModelCatalog: ModularUIConnector = modularui(\n \"ModelCatalog\",\n ({ match }) => match.url,\n {\n propName: \"modelcatalog\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,mBAAuC,GAAG,IAAAC,2BAAS,EAC9D,cAAc,EACdC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAN,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"file":"ModelCatalog.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectModelCatalog","exports","modularui","_ref","match","url","propName"],"sources":["../../../src/redux/connectors/ModelCatalog.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectModelCatalog: ModularUIConnector = modularui(\n \"ModelCatalog\",\n ({ match }) => match.url,\n {\n propName: \"modelcatalog\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,mBAAuC,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,2BAAS,EAC9D,cAAc,EACdC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
@@ -18,6 +18,5 @@ const mapDispatchToProps = {
18
18
 
19
19
  /**
20
20
  */
21
- const connectNotification = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
22
- exports.connectNotification = connectNotification;
21
+ const connectNotification = exports.connectNotification = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
23
22
  //# sourceMappingURL=Notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.js","names":["_reactRedux","require","_Notification","mapStateToProps","state","messageType","notification","message","error","render","mapDispatchToProps","onDismiss","dismissNotification","connectNotification","connect","exports"],"sources":["../../../src/redux/connectors/Notification.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { dismissNotification } from \"../actions/Notification\";\n\nimport type { ReduxState, DismissNotificationAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n messageType: string | null,\n message: MessageObject | null,\n error: ?ErrorResponse,\n render: boolean,\n};\n\ntype DispatchProps = {\n onDismiss: () => DismissNotificationAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n messageType: state.notification.messageType,\n message: state.notification.message,\n error: state.notification.error,\n render: state.notification.render,\n});\n\nconst mapDispatchToProps = {\n onDismiss: dismissNotification,\n};\n\n/**\n */\nexport const connectNotification: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAuBA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,WAAW,EAAED,KAAK,CAACE,YAAY,CAACD,WAAW;EAC3CE,OAAO,EAAEH,KAAK,CAACE,YAAY,CAACC,OAAO;EACnCC,KAAK,EAAEJ,KAAK,CAACE,YAAY,CAACE,KAAK;EAC/BC,MAAM,EAAEL,KAAK,CAACE,YAAY,CAACG;AAC7B,CAAC,CAAC;AAEF,MAAMC,kBAAkB,GAAG;EACzBC,SAAS,EAAEC;AACb,CAAC;;AAED;AACA;AACO,MAAMC,mBAAuC,GAAG,IAAAC,mBAAO,EAO5DX,eAAe,EAAEO,kBAAkB,CAAC;AAACK,OAAA,CAAAF,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"file":"Notification.js","names":["_reactRedux","require","_Notification","mapStateToProps","state","messageType","notification","message","error","render","mapDispatchToProps","onDismiss","dismissNotification","connectNotification","exports","connect"],"sources":["../../../src/redux/connectors/Notification.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { dismissNotification } from \"../actions/Notification\";\n\nimport type { ReduxState, DismissNotificationAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n messageType: string | null,\n message: MessageObject | null,\n error: ?ErrorResponse,\n render: boolean,\n};\n\ntype DispatchProps = {\n onDismiss: () => DismissNotificationAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n messageType: state.notification.messageType,\n message: state.notification.message,\n error: state.notification.error,\n render: state.notification.render,\n});\n\nconst mapDispatchToProps = {\n onDismiss: dismissNotification,\n};\n\n/**\n */\nexport const connectNotification: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAuBA,MAAME,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,WAAW,EAAED,KAAK,CAACE,YAAY,CAACD,WAAW;EAC3CE,OAAO,EAAEH,KAAK,CAACE,YAAY,CAACC,OAAO;EACnCC,KAAK,EAAEJ,KAAK,CAACE,YAAY,CAACE,KAAK;EAC/BC,MAAM,EAAEL,KAAK,CAACE,YAAY,CAACG;AAC7B,CAAC,CAAC;AAEF,MAAMC,kBAAkB,GAAG;EACzBC,SAAS,EAAEC;AACb,CAAC;;AAED;AACA;AACO,MAAMC,mBAAuC,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,mBAAO,EAO5DZ,eAAe,EAAEO,kBAAkB,CAAC"}