@beinformed/ui 1.34.2 → 1.35.0
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.
- package/CHANGELOG.md +12 -0
- package/esm/models/filters/StringFilterModel.js +3 -2
- package/esm/models/filters/StringFilterModel.js.map +1 -1
- package/esm/react-server/serverNoSSR.js +4 -0
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/lib/constants/Constants.js +66 -33
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/LayoutHintConfig.js +2 -1
- package/lib/constants/LayoutHintConfig.js.map +1 -1
- package/lib/constants/LayoutHints.js +36 -18
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js +6 -3
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js +2 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js +2 -1
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js +2 -1
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js +2 -1
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js +2 -1
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js +2 -1
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js +2 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js +2 -1
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js +2 -1
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js +2 -1
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js +2 -1
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js +2 -1
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js +2 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js +2 -1
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js +2 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/i18n/Locale.js +2 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js +4 -2
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js +2 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/languages.js +2 -1
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js +2 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js +2 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/i18n/withMessage.js +2 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js +2 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js +2 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +2 -1
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +2 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js +2 -1
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js +2 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js +2 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js +2 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +2 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +2 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +2 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/base/BaseCollection.js +2 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js +2 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceCollection.js +2 -1
- package/lib/models/base/ResourceCollection.js.map +1 -1
- package/lib/models/base/ResourceModel.js +2 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js +2 -1
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js +2 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js +2 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/SectionModel.js +2 -1
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js +2 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +2 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +2 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js +2 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/error/ErrorModel.js +2 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/filters/StringFilterModel.js +2 -2
- package/lib/models/filters/StringFilterModel.js.flow +2 -2
- package/lib/models/filters/StringFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +2 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/href/Href.js +2 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/links/LinkModel.js +2 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/normalizeLinkJSON.js +2 -1
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListItemCollection.js +2 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionCollection.js +2 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/parameter/Parameter.js +2 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/resolveModel.js +2 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortOptionModel.js +2 -1
- package/lib/models/sorting/SortOptionModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js +2 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js +2 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +2 -1
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/CaptchaRequest.js +2 -1
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIError.js +2 -1
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +2 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js +2 -1
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/modularui/UploadRequest.js +2 -1
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/react/ErrorBoundary.js +2 -1
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js +2 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react-client/rehydrate.js +2 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/createSSRComplete.js +2 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js +2 -1
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js +2 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js +2 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/serverNoSSR.js +6 -1
- package/lib/react-server/serverNoSSR.js.flow +5 -0
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js +2 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js +2 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js +2 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js +2 -1
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js +2 -1
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js +2 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js +10 -5
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/connectors/Application.js +2 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js +2 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js +2 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js +2 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js +2 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js +2 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js +2 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js +2 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js +2 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js +2 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js +2 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js +2 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js +2 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js +2 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Progress.js +2 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js +2 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js +2 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js +2 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js +2 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js +2 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js +2 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js +2 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js +2 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js +2 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js +2 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js +2 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/store/configureStore.js +2 -1
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cache.js +2 -1
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js +8 -4
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js +2 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js +2 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/createUUID.js +2 -1
- package/lib/utils/helpers/createUUID.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js +2 -1
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/formatValue.js +2 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/package.json +1 -1
- package/src/models/filters/StringFilterModel.js +2 -2
- package/src/react-server/serverNoSSR.js +5 -0
|
@@ -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,I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AK,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,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AC7C;EAEA,OAAO,EAAE;AACX,CAAC;AAACC,OAAA,CAAAkE,eAAA,GAAAA,eAAA"}
|
|
@@ -37,5 +37,6 @@ 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 =
|
|
40
|
+
var _default = withModularui;
|
|
41
|
+
exports.default = _default;
|
|
41
42
|
//# 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,
|
|
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"}
|
|
@@ -8,35 +8,40 @@ var _reactRedux = require("react-redux");
|
|
|
8
8
|
var _RouterActions = require("./RouterActions");
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const withKey =
|
|
11
|
+
const withKey = (0, _reactRedux.connect)(state => ({
|
|
12
12
|
locationKey: state.router.location?.key ?? ""
|
|
13
13
|
}));
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
exports.withKey = withKey;
|
|
18
|
+
const withPathname = (0, _reactRedux.connect)(state => ({
|
|
18
19
|
pathname: state.router.location?.pathname
|
|
19
20
|
}));
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
exports.withPathname = withPathname;
|
|
25
|
+
const withLocation = (0, _reactRedux.connect)(state => ({
|
|
24
26
|
location: state.router.location
|
|
25
27
|
}));
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
30
|
*/
|
|
29
|
-
|
|
31
|
+
exports.withLocation = withLocation;
|
|
32
|
+
const withQuerystring = (0, _reactRedux.connect)(state => ({
|
|
30
33
|
querystring: state.router.location?.search
|
|
31
34
|
}));
|
|
32
35
|
|
|
33
36
|
/**
|
|
34
37
|
*/
|
|
35
|
-
|
|
38
|
+
exports.withQuerystring = withQuerystring;
|
|
39
|
+
const withNavigation = (0, _reactRedux.connect)(null, {
|
|
36
40
|
push: _RouterActions.push,
|
|
37
41
|
replace: _RouterActions.replace,
|
|
38
42
|
go: _RouterActions.go,
|
|
39
43
|
goBack: _RouterActions.goBack,
|
|
40
44
|
goForward: _RouterActions.goForward
|
|
41
45
|
});
|
|
46
|
+
exports.withNavigation = withNavigation;
|
|
42
47
|
//# sourceMappingURL=RouterConnectors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouterConnectors.js","names":["_reactRedux","require","_RouterActions","withKey","
|
|
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"}
|
|
@@ -8,7 +8,8 @@ exports.connectApplication = void 0;
|
|
|
8
8
|
var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const connectApplication =
|
|
11
|
+
const connectApplication = (0, _ModularUIConnector.default)("Application", "/", {
|
|
12
12
|
propName: "application"
|
|
13
13
|
});
|
|
14
|
+
exports.connectApplication = connectApplication;
|
|
14
15
|
//# sourceMappingURL=Application.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Application.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectApplication","
|
|
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"}
|
|
@@ -12,5 +12,6 @@ const mapStateToProps = state => ({
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
*/
|
|
15
|
-
const connectBreadcrumb =
|
|
15
|
+
const connectBreadcrumb = (0, _reactRedux.connect)(mapStateToProps);
|
|
16
|
+
exports.connectBreadcrumb = connectBreadcrumb;
|
|
16
17
|
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","names":["_reactRedux","require","_ModularUISelectors","mapStateToProps","state","items","getActiveModels","connectBreadcrumb","
|
|
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"}
|
|
@@ -8,7 +8,7 @@ exports.connectCaseView = void 0;
|
|
|
8
8
|
var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const connectCaseView =
|
|
11
|
+
const connectCaseView = (0, _ModularUIConnector.default)("CaseView", _ref => {
|
|
12
12
|
let {
|
|
13
13
|
match
|
|
14
14
|
} = _ref;
|
|
@@ -16,4 +16,5 @@ const connectCaseView = exports.connectCaseView = (0, _ModularUIConnector.defaul
|
|
|
16
16
|
}, {
|
|
17
17
|
propName: "caseview"
|
|
18
18
|
});
|
|
19
|
+
exports.connectCaseView = connectCaseView;
|
|
19
20
|
//# sourceMappingURL=CaseView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectCaseView","
|
|
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"}
|
|
@@ -8,7 +8,7 @@ exports.connectConceptDetail = void 0;
|
|
|
8
8
|
var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const connectConceptDetail =
|
|
11
|
+
const connectConceptDetail = (0, _ModularUIConnector.default)("ConceptDetail", _ref => {
|
|
12
12
|
let {
|
|
13
13
|
concept,
|
|
14
14
|
location
|
|
@@ -17,4 +17,5 @@ const connectConceptDetail = exports.connectConceptDetail = (0, _ModularUIConnec
|
|
|
17
17
|
}, {
|
|
18
18
|
propName: "conceptDetail"
|
|
19
19
|
});
|
|
20
|
+
exports.connectConceptDetail = connectConceptDetail;
|
|
20
21
|
//# sourceMappingURL=ConceptDetail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConceptDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectConceptDetail","
|
|
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"}
|
|
@@ -8,7 +8,7 @@ exports.connectContentBrowser = void 0;
|
|
|
8
8
|
var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const connectContentBrowser =
|
|
11
|
+
const connectContentBrowser = (0, _ModularUIConnector.default)("ContentBrowser", _ref => {
|
|
12
12
|
let {
|
|
13
13
|
href
|
|
14
14
|
} = _ref;
|
|
@@ -16,4 +16,5 @@ const connectContentBrowser = exports.connectContentBrowser = (0, _ModularUIConn
|
|
|
16
16
|
}, {
|
|
17
17
|
propName: "contentindex"
|
|
18
18
|
});
|
|
19
|
+
exports.connectContentBrowser = connectContentBrowser;
|
|
19
20
|
//# sourceMappingURL=ContentBrowser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBrowser.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentBrowser","
|
|
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"}
|
|
@@ -8,7 +8,7 @@ exports.connectContentDetail = void 0;
|
|
|
8
8
|
var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const connectContentDetail =
|
|
11
|
+
const connectContentDetail = (0, _ModularUIConnector.default)("ContentDetail", _ref => {
|
|
12
12
|
let {
|
|
13
13
|
content,
|
|
14
14
|
location
|
|
@@ -17,4 +17,5 @@ const connectContentDetail = exports.connectContentDetail = (0, _ModularUIConnec
|
|
|
17
17
|
}, {
|
|
18
18
|
propName: "contentTOC"
|
|
19
19
|
});
|
|
20
|
+
exports.connectContentDetail = connectContentDetail;
|
|
20
21
|
//# sourceMappingURL=ContentDetail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectContentDetail","
|
|
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"}
|
|
@@ -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 =
|
|
12
|
+
const connectContentDetailSection = (0, _ModularUIConnector.default)("ContentDetailSection", _ref => {
|
|
13
13
|
let {
|
|
14
14
|
sectioncontent,
|
|
15
15
|
section,
|
|
@@ -19,4 +19,5 @@ const connectContentDetailSection = exports.connectContentDetailSection = (0, _M
|
|
|
19
19
|
}, {
|
|
20
20
|
propName: "content"
|
|
21
21
|
});
|
|
22
|
+
exports.connectContentDetailSection = connectContentDetailSection;
|
|
22
23
|
//# sourceMappingURL=ContentDetailSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDetailSection.js","names":["_Href","_interopRequireDefault","require","_ModularUIConnector","connectContentDetailSection","
|
|
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"}
|
|
@@ -39,5 +39,6 @@ const moduiConnectedForm = (0, _ModularUIConnector.default)("Form", _ref => {
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
*/
|
|
42
|
-
const connectForm =
|
|
42
|
+
const connectForm = (0, _redux.compose)(moduiConnectedForm, reduxConnectedForm);
|
|
43
|
+
exports.connectForm = connectForm;
|
|
43
44
|
//# 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","
|
|
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;AAC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ormAttributeSet = (0, _reactRedux.connect)(null, mapDispatchToProps);
|
|
26
|
+
exports.connectFormAttributeSet = connectFormAttributeSet;
|
|
26
27
|
//# 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","
|
|
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"}
|
|
@@ -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 =
|
|
12
|
+
const connectListDetail = (0, _ModularUIConnector.default)("ListDetail", _ref => {
|
|
13
13
|
let {
|
|
14
14
|
href
|
|
15
15
|
} = _ref;
|
|
@@ -18,4 +18,5 @@ const connectListDetail = exports.connectListDetail = (0, _ModularUIConnector.de
|
|
|
18
18
|
propName: "detail",
|
|
19
19
|
targetModel: _ListDetailModel.default
|
|
20
20
|
});
|
|
21
|
+
exports.connectListDetail = connectListDetail;
|
|
21
22
|
//# sourceMappingURL=ListDetail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListDetail.js","names":["_ModularUIConnector","_interopRequireDefault","require","_ListDetailModel","connectListDetail","
|
|
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"}
|
|
@@ -23,5 +23,6 @@ const mapDispatchToProps = {
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*/
|
|
26
|
-
const connectModal =
|
|
26
|
+
const connectModal = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
|
|
27
|
+
exports.connectModal = connectModal;
|
|
27
28
|
//# 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","
|
|
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"}
|
|
@@ -8,7 +8,7 @@ exports.connectModelCatalog = void 0;
|
|
|
8
8
|
var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularUIConnector"));
|
|
9
9
|
/**
|
|
10
10
|
*/
|
|
11
|
-
const connectModelCatalog =
|
|
11
|
+
const connectModelCatalog = (0, _ModularUIConnector.default)("ModelCatalog", _ref => {
|
|
12
12
|
let {
|
|
13
13
|
match
|
|
14
14
|
} = _ref;
|
|
@@ -16,4 +16,5 @@ const connectModelCatalog = exports.connectModelCatalog = (0, _ModularUIConnecto
|
|
|
16
16
|
}, {
|
|
17
17
|
propName: "modelcatalog"
|
|
18
18
|
});
|
|
19
|
+
exports.connectModelCatalog = connectModelCatalog;
|
|
19
20
|
//# sourceMappingURL=ModelCatalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelCatalog.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectModelCatalog","
|
|
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"}
|
|
@@ -18,5 +18,6 @@ const mapDispatchToProps = {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
*/
|
|
21
|
-
const connectNotification =
|
|
21
|
+
const connectNotification = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps);
|
|
22
|
+
exports.connectNotification = connectNotification;
|
|
22
23
|
//# 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","
|
|
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"}
|
|
@@ -9,7 +9,7 @@ var _ModularUIConnector = _interopRequireDefault(require("../_modularui/ModularU
|
|
|
9
9
|
var _Href = _interopRequireDefault(require("../../models/href/Href"));
|
|
10
10
|
/**
|
|
11
11
|
*/
|
|
12
|
-
const connectPanel =
|
|
12
|
+
const connectPanel = (0, _ModularUIConnector.default)("PanelRenderer", _ref => {
|
|
13
13
|
let {
|
|
14
14
|
href,
|
|
15
15
|
match,
|
|
@@ -26,4 +26,5 @@ const connectPanel = exports.connectPanel = (0, _ModularUIConnector.default)("Pa
|
|
|
26
26
|
}, {
|
|
27
27
|
propName: "panel"
|
|
28
28
|
});
|
|
29
|
+
exports.connectPanel = connectPanel;
|
|
29
30
|
//# sourceMappingURL=PanelRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelRenderer.js","names":["_ModularUIConnector","_interopRequireDefault","require","_Href","connectPanel","
|
|
1
|
+
{"version":3,"file":"PanelRenderer.js","names":["_ModularUIConnector","_interopRequireDefault","require","_Href","connectPanel","modularui","_ref","href","match","querystring","Error","panelHref","Href","url","isExact","addParametersFromString","propName","exports"],"sources":["../../../src/redux/connectors/PanelRenderer.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectPanel: ModularUIConnector = modularui(\n \"PanelRenderer\",\n ({ href, match, querystring = \"\" }) => {\n if (!href && !match) {\n throw new Error(\n \"Cannot determine panel url because of missing href and match\",\n );\n }\n\n const panelHref = href ? new Href(href) : new Href(match.url);\n\n if (match && match.isExact) {\n panelHref.addParametersFromString(querystring);\n }\n\n return panelHref;\n },\n {\n propName: \"panel\",\n },\n);\n"],"mappings":";;;;;;;AACA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAME,YAAgC,GAAG,IAAAC,2BAAS,EACvD,eAAe,EACfC,IAAA,IAAuC;EAAA,IAAtC;IAAEC,IAAI;IAAEC,KAAK;IAAEC,WAAW,GAAG;EAAG,CAAC,GAAAH,IAAA;EAChC,IAAI,CAACC,IAAI,IAAI,CAACC,KAAK,EAAE;IACnB,MAAM,IAAIE,KAAK,CACb,8DACF,CAAC;EACH;EAEA,MAAMC,SAAS,GAAGJ,IAAI,GAAG,IAAIK,aAAI,CAACL,IAAI,CAAC,GAAG,IAAIK,aAAI,CAACJ,KAAK,CAACK,GAAG,CAAC;EAE7D,IAAIL,KAAK,IAAIA,KAAK,CAACM,OAAO,EAAE;IAC1BH,SAAS,CAACI,uBAAuB,CAACN,WAAW,CAAC;EAChD;EAEA,OAAOE,SAAS;AAClB,CAAC,EACD;EACEK,QAAQ,EAAE;AACZ,CACF,CAAC;AAACC,OAAA,CAAAb,YAAA,GAAAA,YAAA"}
|
|
@@ -15,5 +15,6 @@ const mapDispatchToProps = {
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*/
|
|
18
|
-
const connectProgress =
|
|
18
|
+
const connectProgress = (0, _reactRedux.connect)(null, mapDispatchToProps);
|
|
19
|
+
exports.connectProgress = connectProgress;
|
|
19
20
|
//# sourceMappingURL=Progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","names":["_reactRedux","require","_ProgressIndicator","_Error","mapDispatchToProps","onStartProgress","startProgress","onFinishProgress","finishProgress","onError","handleError","connectProgress","
|
|
1
|
+
{"version":3,"file":"Progress.js","names":["_reactRedux","require","_ProgressIndicator","_Error","mapDispatchToProps","onStartProgress","startProgress","onFinishProgress","finishProgress","onError","handleError","connectProgress","connect","exports"],"sources":["../../../src/redux/connectors/Progress.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type {\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\n\ntype DispatchProps = {\n onStartProgress: () => StartProgressAction,\n onFinishProgress: () => FinishProgressAction,\n onError: (error: Error | FetchException) => ThunkAction,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n onStartProgress: startProgress,\n onFinishProgress: finishProgress,\n onError: handleError,\n};\n\n/**\n */\nexport const connectProgress: ComponentType<any> = connect<\n DispatchProps,\n {},\n _,\n _,\n _,\n _,\n>(null, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAgBA,MAAMG,kBAAiC,GAAG;EACxCC,eAAe,EAAEC,gCAAa;EAC9BC,gBAAgB,EAAEC,iCAAc;EAChCC,OAAO,EAAEC;AACX,CAAC;;AAED;AACA;AACO,MAAMC,eAAmC,GAAG,IAAAC,mBAAO,EAOxD,IAAI,EAAER,kBAAkB,CAAC;AAACS,OAAA,CAAAF,eAAA,GAAAA,eAAA"}
|
|
@@ -15,5 +15,6 @@ const mapStateToProps = state => ({
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*/
|
|
18
|
-
const connectProgressIndicator =
|
|
18
|
+
const connectProgressIndicator = (0, _reactRedux.connect)(mapStateToProps);
|
|
19
|
+
exports.connectProgressIndicator = connectProgressIndicator;
|
|
19
20
|
//# sourceMappingURL=ProgressIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicator.js","names":["_reactRedux","require","mapStateToProps","state","count","progressindicator","timestamp","percentComplete","connectProgressIndicator","
|
|
1
|
+
{"version":3,"file":"ProgressIndicator.js","names":["_reactRedux","require","mapStateToProps","state","count","progressindicator","timestamp","percentComplete","connectProgressIndicator","connect","exports"],"sources":["../../../src/redux/connectors/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { ReduxState } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n count: number,\n timestamp: number,\n percentComplete: number,\n};\n\ntype Props = {\n ...StateProps,\n ...\n};\n\n/**\n */\nconst mapStateToProps = (state: ReduxState) => ({\n count: state.progressindicator.count,\n timestamp: state.progressindicator.timestamp,\n percentComplete: state.progressindicator.percentComplete,\n});\n\n/**\n */\nexport const connectProgressIndicator: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n void,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAgBA;AACA;AACA,MAAMC,eAAe,GAAIC,KAAiB,KAAM;EAC9CC,KAAK,EAAED,KAAK,CAACE,iBAAiB,CAACD,KAAK;EACpCE,SAAS,EAAEH,KAAK,CAACE,iBAAiB,CAACC,SAAS;EAC5CC,eAAe,EAAEJ,KAAK,CAACE,iBAAiB,CAACE;AAC3C,CAAC,CAAC;;AAEF;AACA;AACO,MAAMC,wBAA4C,GAAG,IAAAC,mBAAO,EAOjEP,eAAe,CAAC;AAACQ,OAAA,CAAAF,wBAAA,GAAAA,wBAAA"}
|