@eeacms/volto-cca-policy 0.3.131 → 1.0.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/.eslintrc.js +7 -7
- package/CHANGELOG.md +9 -14
- package/docker-compose.yml +16 -16
- package/jest-addon.config.js +25 -420
- package/package.json +1 -1
- package/src/components/MigrationButtons.jsx +5 -1
- package/src/components/manage/Blocks/ASTNavigation/ASTNavigationEdit.jsx +2 -1
- package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.jsx +10 -4
- package/src/components/manage/Blocks/ASTNavigation/ASTNavigationView.test.jsx +87 -35
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockView.test.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsListingBlock/C3SIndicatorsListingBlockView.test.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/C3SIndicatorsOverviewBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/schema.js +0 -20
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerEdit.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerView.js → CaseStudyExplorerView.jsx} +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyExplorerView.test.jsx +2 -2
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyFilters.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/CaseStudyMap.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.jsx +2 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/FeatureDisplay.test.jsx +1 -1
- package/src/components/manage/Blocks/CaseStudyExplorer/styles.less +0 -4
- package/src/components/manage/Blocks/CaseStudyExplorer/utils.js +0 -30
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsEdit.jsx +1 -1
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.jsx +3 -2
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsView.test.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/ContentLinksEdit.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/ContentLinksView.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/ContentLinksView.test.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/DropdownListView.jsx +1 -1
- package/src/components/manage/Blocks/ContentLinks/DropdownListView.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/Filter.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/{View.js → View.jsx} +14 -10
- package/src/components/manage/Blocks/CountryMapHeatIndex/mapstyle.js +1 -3
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryEdit.jsx +2 -1
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +4 -3
- package/src/components/manage/Blocks/CountryMapProfile/Filter.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +5 -12
- package/src/components/manage/Blocks/CountryProfileDetail/{CountryTabPane.js → CountryTabPane.jsx} +11 -4
- package/src/components/manage/Blocks/CountryProfileDetail/CountryTabPane.test.jsx +1 -1
- package/src/components/manage/Blocks/CountryProfileDetail/{View.js → View.jsx} +20 -15
- package/src/components/manage/Blocks/CountryProfileDetail/View.test.jsx +134 -20
- package/src/components/manage/Blocks/CountryProfileDetail/index.js +0 -1
- package/src/components/manage/Blocks/DataConnectedEmbedBlock/index.js +0 -2
- package/src/components/manage/Blocks/ECDEIndicators/ECDEIndicatorsView.jsx +1 -1
- package/src/components/manage/Blocks/FilterAceContent/FilterAceContentEdit.jsx +3 -3
- package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.jsx +2 -2
- package/src/components/manage/Blocks/FilterAceContent/FilterAceContentView.test.jsx +1 -1
- package/src/components/manage/Blocks/FlourishEmbedBlock/FlourishEmbedBlockEdit.jsx +1 -1
- package/src/components/manage/Blocks/Listing/DropdownListingView.jsx +1 -1
- package/src/components/manage/Blocks/Listing/EventAccordionListingView.jsx +1 -1
- package/src/components/manage/Blocks/Listing/EventAccordionListingView.test.jsx +5 -3
- package/src/components/manage/Blocks/Listing/EventCardsListingView.jsx +2 -1
- package/src/components/manage/Blocks/Listing/EventCardsListingView.test.jsx +10 -4
- package/src/components/manage/Blocks/Listing/IndicatorCardsListingView.jsx +2 -2
- package/src/components/manage/Blocks/Listing/OrganisationCardsListingView.jsx +3 -1
- package/src/components/manage/Blocks/Listing/SimpleCardsListingView.jsx +1 -1
- package/src/components/manage/Blocks/Listing/SimpleCardsListingView.test.jsx +5 -3
- package/src/components/manage/Blocks/Listing/SimpleItemListingView.jsx +2 -2
- package/src/components/manage/Blocks/Listing/SimpleItemListingView.test.jsx +6 -4
- package/src/components/manage/Blocks/RASTBlock/ContextNavigation.jsx +0 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordion.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordion.test.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTAccordionContent.jsx +2 -2
- package/src/components/manage/Blocks/RASTBlock/RASTEdit.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTMap.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTMap.test.jsx +1 -1
- package/src/components/manage/Blocks/RASTBlock/RASTView.jsx +1 -1
- package/src/components/manage/Blocks/ReadMore/ReadMoreEdit.jsx +1 -1
- package/src/components/manage/Blocks/ReadMore/ReadMoreView.jsx +1 -1
- package/src/components/manage/Blocks/ReadMore/ReadMoreView.test.jsx +1 -1
- package/src/components/manage/Blocks/RedirectBlock/{RedirectBlock.test.js → RedirectBlock.test.jsx} +1 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlockEdit.jsx +2 -1
- package/src/components/manage/Blocks/RedirectBlock/RedirectBlockView.jsx +2 -2
- package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentEdit.jsx +1 -1
- package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.jsx +1 -1
- package/src/components/manage/Blocks/RelevantAceContent/RelevantAceContentView.test.jsx +1 -1
- package/src/components/manage/Blocks/SearchAceContent/SearchAceContentEdit.jsx +1 -1
- package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.jsx +1 -1
- package/src/components/manage/Blocks/SearchAceContent/SearchAceContentView.test.jsx +1 -1
- package/src/components/manage/Blocks/TabsBlock/Spotlight.jsx +2 -2
- package/src/components/manage/Blocks/TabsBlock/Spotlight.test.jsx +7 -1
- package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectEdit.jsx +1 -1
- package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.jsx +1 -1
- package/src/components/manage/Blocks/TransRegionSelect/TransRegionSelectView.test.jsx +1 -1
- package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.jsx +5 -2
- package/src/components/manage/CreateArchivedCopyButton/CreateArchivedCopyButton.test.jsx +3 -6
- package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx +1 -1
- package/src/components/manage/Workflow/WorkflowLinkIntegrityModal.test.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTAccordion.test.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTLogoMap.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTLogoMap.test.jsx +1 -1
- package/src/components/theme/ASTNavigation/ASTNavigation.jsx +9 -5
- package/src/components/theme/ASTNavigation/ASTNavigation.test.jsx +323 -0
- package/src/components/theme/ASTNavigation/{utils.js → LinkWrap.jsx} +4 -9
- package/src/components/theme/ASTNavigation/UASTLogoMap.jsx +1 -1
- package/src/components/theme/ASTNavigation/UASTLogoMap.test.jsx +1 -1
- package/src/components/theme/Header/Header.jsx +5 -5
- package/src/components/theme/Header/LanguageSwitch.jsx +5 -5
- package/src/components/theme/MissionSignatoryProfile/MissionSignatoryProfileView.jsx +1 -1
- package/src/components/theme/TranslationDisclaimer/TranslationDisclaimer.jsx +1 -1
- package/src/components/theme/TranslationDisclaimer/TranslationInfo.jsx +1 -1
- package/src/components/theme/Views/AdaptationOptionView.jsx +1 -1
- package/src/components/theme/Views/AdaptationOptionView.test.jsx +5 -3
- package/src/components/theme/Views/ArchivedVersionListing.jsx +1 -1
- package/src/components/theme/Views/ArchivedVersionListing.test.jsx +2 -2
- package/src/components/theme/Views/ArchivedVersionNotice.jsx +1 -1
- package/src/components/theme/Views/ArchivedVersionNotice.test.jsx +1 -1
- package/src/components/theme/Views/BrokenLinks.jsx +1 -1
- package/src/components/theme/Views/BrokenLinks.test.jsx +1 -1
- package/src/components/theme/Views/CaseStudyView.test.jsx +1 -1
- package/src/components/theme/Views/DatabaseItemView.test.jsx +1 -1
- package/src/components/theme/Views/NewsItemView.jsx +1 -1
- package/src/components/theme/Views/ProjectView.test.jsx +1 -1
- package/src/components/theme/Views/VersionsGroup.jsx +1 -1
- package/src/components/theme/Views/VersionsGroup.test.jsx +1 -1
- package/src/components/theme/Widgets/GeocharsWidget.jsx +1 -1
- package/src/components/theme/Widgets/GeolocationWidget.jsx +1 -1
- package/src/components/theme/Widgets/GeolocationWidget.test.jsx +1 -1
- package/src/components/theme/Widgets/ImageWidget.jsx +7 -8
- package/src/components/theme/Widgets/ImageWidget.test.jsx +1 -1
- package/src/components/theme/Widgets/PromotionalImageWidget.jsx +6 -4
- package/src/components/theme/Widgets/utils.js +1 -1
- package/src/constants.js +538 -2
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/Header.jsx +1 -1
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderMenuPopUp.js +52 -24
- package/src/customizations/@eeacms/volto-eea-design-system/ui/Header/HeaderSearchPopUp.js +1 -0
- package/src/customizations/@eeacms/volto-eea-website-theme/components/theme/DraftBackground/DraftBackground.jsx +2 -1
- package/src/customizations/@eeacms/volto-listing-block/blocks/Listing/item-templates/SimpleItemTemplates.jsx +2 -2
- package/src/customizations/@eeacms/volto-listing-block/components/UniversalCard/fragments/CardTitle.jsx +1 -1
- package/src/customizations/@plone/volto-slate/blocks/Table/TableBlockView.jsx +3 -3
- package/src/customizations/@plone/volto-slate/blocks/Text/{index.js → index.jsx} +2 -21
- package/src/customizations/@plone/volto-slate/editor/extensions/normalizeNode.js +1 -1
- package/src/customizations/@plone/volto-slate/utils/blocks.js +11 -8
- package/src/customizations/@plone/volto-slate/utils/volto-blocks.js +2 -2
- package/src/customizations/@plone/volto-slate/widgets/HtmlSlateWidget.jsx +2 -2
- package/src/customizations/@plone-collective/volto-authomatic/components/Login/Login.jsx +7 -4
- package/src/customizations/@plone-collective/volto-rss-provider/components/RSSFeedView.jsx +5 -8
- package/src/customizations/@plone-collective/volto-rss-provider/express-middleware.js +2 -1
- package/src/customizations/volto/components/manage/AnchorPlugin/components/LinkButton/AddLinkForm.jsx +3 -3
- package/src/customizations/volto/components/manage/Blocks/Grid/templates.js +1 -1
- package/src/customizations/volto/components/manage/Contents/ContentsBreadcrumbs.jsx +1 -1
- package/src/customizations/volto/components/manage/Controlpanels/ContentTypeLayout.jsx +12 -14
- package/src/customizations/volto/components/manage/Display/Display.jsx +10 -5
- package/src/customizations/volto/components/manage/Multilingual/TranslationObject.jsx +7 -6
- package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +4 -1
- package/src/customizations/volto/components/manage/Workflow/Workflow.jsx +12 -8
- package/src/customizations/volto/components/theme/App/App.jsx +16 -23
- package/src/customizations/volto/components/theme/Sitemap/Sitemap.jsx +3 -2
- package/src/customizations/volto/components/theme/View/DefaultView.jsx +5 -4
- package/src/customizations/volto/components/theme/View/LinkView.jsx +2 -2
- package/src/customizations/volto/components/theme/View/View.jsx +10 -11
- package/src/customizations/volto/helpers/Url/Url-old.js +2 -1
- package/src/customizations/volto/middleware/api.js +6 -4
- package/src/customizations/volto/reducers/actions/actions.js +2 -5
- package/src/customizations/volto/reducers/breadcrumbs/breadcrumbs.js +3 -6
- package/src/customizations/volto/reducers/navigation/navigation.js +3 -6
- package/src/customizations/volto/server.jsx +9 -8
- package/src/express-middleware.js +1 -1
- package/src/helpers/ContentMetadata.jsx +4 -4
- package/src/helpers/Utils.jsx +5 -5
- package/src/helpers/index.js +1 -8
- package/src/hocs/index.js +2 -0
- package/src/index.js +9 -7
- package/src/search/common.js +4 -41
- package/src/search/utils.test.js +1 -1
- package/src/search/vocabulary.js +2 -2
- package/src/store/reducers/physical-breadcrumbs.js +2 -2
- package/src/utils.js +1 -1
- package/src/helpers/Constants.jsx +0 -535
- package/theme/assets/images/administrative_support_service.png +0 -0
- /package/src/components/manage/Blocks/CaseStudyExplorer/{CaseStudyExplorerEdit.js → CaseStudyExplorerEdit.jsx} +0 -0
- /package/src/components/manage/Blocks/CountryMapHeatIndex/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/manage/Blocks/CountryMapProfile/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/manage/Blocks/CountryProfileDetail/{Edit.js → Edit.jsx} +0 -0
- /package/src/components/manage/Blocks/ReadMore/{schema.js → schema.jsx} +0 -0
- /package/src/helpers/{clientOnly.js → clientOnly.jsx} +0 -0
- /package/src/{components/manage/Blocks/withResponsiveContainer.js → hocs/withResponsiveContainer.jsx} +0 -0
- /package/src/{components/manage/Blocks → hocs}/withVisibilitySensor.jsx +0 -0
|
@@ -7,13 +7,14 @@ import React, { Component } from 'react';
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { compose } from 'redux';
|
|
9
9
|
import { connect } from 'react-redux';
|
|
10
|
-
import { asyncConnect
|
|
10
|
+
import { asyncConnect } from '@plone/volto/helpers/AsyncConnect';
|
|
11
|
+
import Helmet from '@plone/volto/helpers/Helmet/Helmet';
|
|
11
12
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
12
13
|
import { Container } from 'semantic-ui-react';
|
|
13
14
|
import { Link } from 'react-router-dom';
|
|
14
15
|
import config from '@plone/volto/registry';
|
|
15
16
|
import { BannerTitle } from '@eeacms/volto-cca-policy/components';
|
|
16
|
-
import { getNavigation } from '@plone/volto/actions';
|
|
17
|
+
import { getNavigation } from '@plone/volto/actions/navigation/navigation';
|
|
17
18
|
|
|
18
19
|
const messages = defineMessages({
|
|
19
20
|
Sitemap: {
|
|
@@ -14,12 +14,13 @@ import {
|
|
|
14
14
|
Label,
|
|
15
15
|
} from 'semantic-ui-react';
|
|
16
16
|
import config from '@plone/volto/registry';
|
|
17
|
-
import { getSchema } from '@plone/volto/actions';
|
|
17
|
+
import { getSchema } from '@plone/volto/actions/schema/schema';
|
|
18
18
|
import { getWidget } from '@plone/volto/helpers/Widget/utils';
|
|
19
19
|
|
|
20
|
-
import { hasBlocksData
|
|
20
|
+
import { hasBlocksData } from '@plone/volto/helpers/Blocks/Blocks';
|
|
21
|
+
import { getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
21
22
|
import { useDispatch, useSelector } from 'react-redux';
|
|
22
|
-
import
|
|
23
|
+
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
23
24
|
import ContextNavigation from '@plone/volto/components/theme/Navigation/ContextNavigation';
|
|
24
25
|
import {
|
|
25
26
|
BannerTitle,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
PortalMessage,
|
|
28
29
|
} from '@eeacms/volto-cca-policy/components';
|
|
29
30
|
|
|
30
|
-
import
|
|
31
|
+
import isEqual from 'lodash/isEqual';
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Component to display the default view.
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { Component } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
8
|
+
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
9
9
|
import { Container as SemanticContainer } from 'semantic-ui-react';
|
|
10
|
-
import
|
|
10
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
11
11
|
import { Redirect } from 'react-router-dom';
|
|
12
12
|
import { FormattedMessage } from 'react-intl';
|
|
13
13
|
import config from '@plone/volto/registry';
|
|
@@ -12,22 +12,21 @@ import { Portal } from 'react-portal';
|
|
|
12
12
|
import { injectIntl } from 'react-intl';
|
|
13
13
|
import qs from 'query-string';
|
|
14
14
|
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Toolbar,
|
|
20
|
-
} from '@plone/volto/components';
|
|
15
|
+
import ContentMetadataTags from '@plone/volto/components/theme/ContentMetadataTags/ContentMetadataTags';
|
|
16
|
+
import Comments from '@plone/volto/components/theme/Comments/Comments';
|
|
17
|
+
import Tags from '@plone/volto/components/theme/Tags/Tags';
|
|
18
|
+
import Toolbar from '@plone/volto/components/manage/Toolbar/Toolbar';
|
|
21
19
|
import { AlternateHrefLangs } from '@plone/volto/components/theme/AlternateHrefLangs/AlternateHrefLangs';
|
|
22
|
-
import { listActions
|
|
20
|
+
import { listActions } from '@plone/volto/actions/actions/actions';
|
|
21
|
+
import { getContent } from '@plone/volto/actions/content/content';
|
|
22
|
+
import BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
|
|
23
23
|
import {
|
|
24
|
-
BodyClass,
|
|
25
24
|
getBaseUrl,
|
|
26
25
|
flattenToAppURL,
|
|
27
|
-
getLayoutFieldname,
|
|
28
|
-
hasApiExpander,
|
|
29
26
|
isInternalURL,
|
|
30
|
-
} from '@plone/volto/helpers';
|
|
27
|
+
} from '@plone/volto/helpers/Url/Url';
|
|
28
|
+
import { getLayoutFieldname } from '@plone/volto/helpers/Content/Content';
|
|
29
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
31
30
|
|
|
32
31
|
import config from '@plone/volto/registry';
|
|
33
32
|
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import Cookies from 'universal-cookie';
|
|
7
7
|
import jwtDecode from 'jwt-decode';
|
|
8
|
-
import
|
|
8
|
+
import compact from 'lodash/compact';
|
|
9
|
+
import flatten from 'lodash/flatten';
|
|
10
|
+
import union from 'lodash/union';
|
|
9
11
|
import { matchPath } from 'react-router';
|
|
10
12
|
import qs from 'query-string';
|
|
11
13
|
|
|
@@ -17,12 +19,12 @@ import {
|
|
|
17
19
|
RESET_APIERROR,
|
|
18
20
|
SET_APIERROR,
|
|
19
21
|
} from '@plone/volto/constants/ActionTypes';
|
|
20
|
-
import { changeLanguage } from '@plone/volto/actions';
|
|
22
|
+
import { changeLanguage } from '@plone/volto/actions/language/language';
|
|
21
23
|
import {
|
|
22
24
|
toGettextLang,
|
|
23
25
|
toReactIntlLang,
|
|
24
|
-
|
|
25
|
-
} from '@plone/volto/helpers';
|
|
26
|
+
} from '@plone/volto/helpers/Utils/Utils';
|
|
27
|
+
import { getCookieOptions } from '@plone/volto/helpers/Cookies/cookies';
|
|
26
28
|
let socket = null;
|
|
27
29
|
|
|
28
30
|
/**
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { GET_CONTENT, LIST_ACTIONS } from '@plone/volto/constants/ActionTypes';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
getBaseUrl,
|
|
10
|
-
hasApiExpander,
|
|
11
|
-
} from '@plone/volto/helpers';
|
|
7
|
+
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
8
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
12
9
|
|
|
13
10
|
const initialState = {
|
|
14
11
|
error: null,
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
* @module reducers/breadcrumbs/breadcrumbs
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
getBaseUrl,
|
|
10
|
-
hasApiExpander,
|
|
11
|
-
} from '@plone/volto/helpers';
|
|
6
|
+
import map from 'lodash/map';
|
|
7
|
+
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
8
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
12
9
|
|
|
13
10
|
import {
|
|
14
11
|
GET_BREADCRUMBS,
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
* @module reducers/navigation/navigation
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
getBaseUrl,
|
|
10
|
-
hasApiExpander,
|
|
11
|
-
} from '@plone/volto/helpers';
|
|
6
|
+
import map from 'lodash/map';
|
|
7
|
+
import { flattenToAppURL, getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
8
|
+
import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils';
|
|
12
9
|
|
|
13
10
|
import {
|
|
14
11
|
GET_CONTENT,
|
|
@@ -8,7 +8,7 @@ import express from 'express';
|
|
|
8
8
|
import { renderToString } from 'react-dom/server';
|
|
9
9
|
import { createMemoryHistory } from 'history';
|
|
10
10
|
import { parse as parseUrl } from 'url';
|
|
11
|
-
import
|
|
11
|
+
import keys from 'lodash/keys';
|
|
12
12
|
import locale from 'locale';
|
|
13
13
|
import { detect } from 'detect-browser';
|
|
14
14
|
import path from 'path';
|
|
@@ -22,22 +22,23 @@ import crypto from 'crypto';
|
|
|
22
22
|
import routes from '@plone/volto/routes';
|
|
23
23
|
import config from '@plone/volto/registry';
|
|
24
24
|
|
|
25
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
26
|
+
import Html from '@plone/volto/helpers/Html/Html';
|
|
27
|
+
import Api from '@plone/volto/helpers/Api/Api';
|
|
28
|
+
import { persistAuthToken } from '@plone/volto/helpers/AuthToken/AuthToken';
|
|
25
29
|
import {
|
|
26
|
-
flattenToAppURL,
|
|
27
|
-
Html,
|
|
28
|
-
Api,
|
|
29
|
-
persistAuthToken,
|
|
30
30
|
toBackendLang,
|
|
31
31
|
toGettextLang,
|
|
32
32
|
toReactIntlLang,
|
|
33
|
-
} from '@plone/volto/helpers';
|
|
34
|
-
import { changeLanguage } from '@plone/volto/actions';
|
|
33
|
+
} from '@plone/volto/helpers/Utils/Utils';
|
|
34
|
+
import { changeLanguage } from '@plone/volto/actions/language/language';
|
|
35
35
|
|
|
36
36
|
import userSession from '@plone/volto/reducers/userSession/userSession';
|
|
37
37
|
|
|
38
38
|
import ErrorPage from '@plone/volto/error';
|
|
39
39
|
|
|
40
|
-
import languages from '@plone/volto/constants/Languages';
|
|
40
|
+
// import languages from '@plone/volto/constants/Languages';
|
|
41
|
+
import languages from '@plone/volto/constants/Languages.cjs';
|
|
41
42
|
|
|
42
43
|
import configureStore from '@plone/volto/store';
|
|
43
44
|
import {
|
|
@@ -2,9 +2,6 @@ import { Fragment } from 'react';
|
|
|
2
2
|
import { Popup, Segment } from 'semantic-ui-react';
|
|
3
3
|
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
4
4
|
import {
|
|
5
|
-
ACE_COUNTRIES,
|
|
6
|
-
BIOREGIONS,
|
|
7
|
-
SUBNATIONAL_REGIONS,
|
|
8
5
|
MetadataItemList,
|
|
9
6
|
LinkedMetadataItemList,
|
|
10
7
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
@@ -14,9 +11,12 @@ import {
|
|
|
14
11
|
INDICATOR,
|
|
15
12
|
PUBLICATION_REPORT,
|
|
16
13
|
ADAPTATION_OPTION,
|
|
14
|
+
ACE_COUNTRIES,
|
|
15
|
+
BIOREGIONS,
|
|
16
|
+
SUBNATIONAL_REGIONS,
|
|
17
17
|
// CONTENT_TYPE_LABELS,
|
|
18
18
|
} from '@eeacms/volto-cca-policy/constants';
|
|
19
|
-
import
|
|
19
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
20
20
|
|
|
21
21
|
const messages = defineMessages({
|
|
22
22
|
default_info_tooltip: {
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
|
-
import { expandToBackendURL } from '@plone/volto/helpers';
|
|
2
|
+
import { expandToBackendURL } from '@plone/volto/helpers/Url/Url';
|
|
3
3
|
import { Link } from 'react-router-dom';
|
|
4
4
|
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
5
5
|
import {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
Label,
|
|
12
12
|
Button,
|
|
13
13
|
} from 'semantic-ui-react';
|
|
14
|
-
import
|
|
14
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
15
15
|
import config from '@plone/volto/registry';
|
|
16
16
|
import {
|
|
17
17
|
CASE_STUDY,
|
|
@@ -181,11 +181,11 @@ export const ReferenceInfo = (props) => {
|
|
|
181
181
|
<FormattedMessage id="Contributor:" defaultMessage="Contributor:" />
|
|
182
182
|
</h5>
|
|
183
183
|
{contributor_list
|
|
184
|
-
.map((item) => (
|
|
185
|
-
|
|
184
|
+
.map((item, contributorIndex) => (
|
|
185
|
+
<React.Fragment key={item.title}>
|
|
186
186
|
{item.title}
|
|
187
187
|
<br />
|
|
188
|
-
|
|
188
|
+
</React.Fragment>
|
|
189
189
|
))
|
|
190
190
|
.sort()}
|
|
191
191
|
{other_contributor}
|
package/src/helpers/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OBSERVATORY_PARTNERS } from '
|
|
1
|
+
import { OBSERVATORY_PARTNERS } from '@eeacms/volto-cca-policy/constants';
|
|
2
2
|
export {
|
|
3
3
|
HTMLField,
|
|
4
4
|
ExternalLink,
|
|
@@ -16,13 +16,6 @@ export {
|
|
|
16
16
|
LinkedMetadataItemList,
|
|
17
17
|
} from './Utils';
|
|
18
18
|
export { default as ContentMetadata } from './ContentMetadata';
|
|
19
|
-
export {
|
|
20
|
-
ACE_COUNTRIES,
|
|
21
|
-
BIOREGIONS,
|
|
22
|
-
OTHER_REGIONS,
|
|
23
|
-
SUBNATIONAL_REGIONS,
|
|
24
|
-
EU_COUNTRIES,
|
|
25
|
-
} from './Constants';
|
|
26
19
|
export { default as clientOnly } from './clientOnly';
|
|
27
20
|
|
|
28
21
|
export const capitalizeFirstLetter = (str) =>
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-filename-extension */
|
|
2
|
+
|
|
1
3
|
import { defineMessages, FormattedMessage } from 'react-intl';
|
|
2
4
|
import loadable from '@loadable/component';
|
|
3
5
|
import { compose } from 'redux';
|
|
4
|
-
import
|
|
6
|
+
import Sitemap from '@plone/volto/components/theme/Sitemap/Sitemap';
|
|
5
7
|
import DefaultView from '@plone/volto/components/theme/View/DefaultView';
|
|
6
8
|
import SelectAutoCompleteWidget from '@plone/volto/components/manage/Widgets/SelectAutoComplete';
|
|
7
9
|
import {
|
|
@@ -37,8 +39,8 @@ import {
|
|
|
37
39
|
MISSION_SIGNATORY_PROFILE,
|
|
38
40
|
NEWS_ITEM,
|
|
39
41
|
EVENT,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
EEA_LANGUAGES,
|
|
43
|
+
NON_EU_LANGS,
|
|
42
44
|
} from '@eeacms/volto-cca-policy/constants';
|
|
43
45
|
|
|
44
46
|
import GeocharsWidget from './components/theme/Widgets/GeocharsWidget';
|
|
@@ -119,8 +121,8 @@ const applyConfig = (config) => {
|
|
|
119
121
|
];
|
|
120
122
|
|
|
121
123
|
if (!config.settings.loadables.reactTable)
|
|
122
|
-
config.settings.loadables.reactTable = loadable.lib(
|
|
123
|
-
import('@tanstack/react-table'),
|
|
124
|
+
config.settings.loadables.reactTable = loadable.lib(
|
|
125
|
+
() => import('@tanstack/react-table'),
|
|
124
126
|
);
|
|
125
127
|
|
|
126
128
|
config.settings.dateLocale = 'en-gb';
|
|
@@ -162,8 +164,8 @@ const applyConfig = (config) => {
|
|
|
162
164
|
// EEA customizations
|
|
163
165
|
config.settings.eea = {
|
|
164
166
|
...(config.settings.eea || {}),
|
|
165
|
-
languages:
|
|
166
|
-
|
|
167
|
+
languages: EEA_LANGUAGES,
|
|
168
|
+
NON_EU_LANGS,
|
|
167
169
|
headerOpts: {
|
|
168
170
|
...(config.settings.eea?.headerOpts || {}),
|
|
169
171
|
logo: ccaLogo,
|
package/src/search/common.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable react/jsx-filename-extension */
|
|
2
|
+
|
|
3
|
+
import { EEA_LANGUAGES } from '@eeacms/volto-cca-policy/constants';
|
|
2
4
|
import { booleanFacet } from '@eeacms/search';
|
|
3
5
|
import { getTodayWithTime } from './utils';
|
|
4
6
|
|
|
@@ -186,51 +188,12 @@ export const language = {
|
|
|
186
188
|
isMulti: true,
|
|
187
189
|
default: (options) => {
|
|
188
190
|
const { language } = options || {};
|
|
189
|
-
// console.log('options', options);
|
|
190
|
-
|
|
191
191
|
return {
|
|
192
192
|
values: [language || 'en'],
|
|
193
193
|
type: 'any',
|
|
194
194
|
};
|
|
195
195
|
},
|
|
196
|
-
facetValues:
|
|
196
|
+
facetValues: EEA_LANGUAGES.map(({ code }) => code),
|
|
197
197
|
sortOn: 'custom',
|
|
198
198
|
sortOnCustomLabel: 'Alphabetical',
|
|
199
199
|
};
|
|
200
|
-
|
|
201
|
-
// [
|
|
202
|
-
// 'de',
|
|
203
|
-
// 'en',
|
|
204
|
-
// 'es',
|
|
205
|
-
// 'fr',
|
|
206
|
-
// 'it',
|
|
207
|
-
// 'pl',
|
|
208
|
-
// // 'ar',
|
|
209
|
-
// // 'bg',
|
|
210
|
-
// // 'bs',
|
|
211
|
-
// // 'cs',
|
|
212
|
-
// // 'da',
|
|
213
|
-
// // 'el',
|
|
214
|
-
// // 'et',
|
|
215
|
-
// // 'fi',
|
|
216
|
-
// // 'ga',
|
|
217
|
-
// // 'hr',
|
|
218
|
-
// // 'hu',
|
|
219
|
-
// // 'is',
|
|
220
|
-
// // 'lt',
|
|
221
|
-
// // 'lv',
|
|
222
|
-
// // 'mk',
|
|
223
|
-
// // 'mt',
|
|
224
|
-
// // 'nl',
|
|
225
|
-
// // 'no',
|
|
226
|
-
// // 'pt',
|
|
227
|
-
// // 'ro',
|
|
228
|
-
// // 'ru',
|
|
229
|
-
// // 'sh',
|
|
230
|
-
// // 'sk',
|
|
231
|
-
// // 'sl',
|
|
232
|
-
// // 'sq',
|
|
233
|
-
// // 'sr',
|
|
234
|
-
// // 'sv',
|
|
235
|
-
// // 'tr',
|
|
236
|
-
// ]
|
package/src/search/utils.test.js
CHANGED
package/src/search/vocabulary.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EEA_LANGUAGES } from '@eeacms/volto-cca-policy/constants';
|
|
2
2
|
import { defineMessages } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
defineMessages({
|
|
@@ -35,6 +35,6 @@ export const vocab = {
|
|
|
35
35
|
},
|
|
36
36
|
language: Object.assign(
|
|
37
37
|
{},
|
|
38
|
-
...
|
|
38
|
+
...EEA_LANGUAGES.map(({ name, code }) => ({ [code]: name })),
|
|
39
39
|
),
|
|
40
40
|
};
|
package/src/utils.js
CHANGED