@eeacms/volto-cca-policy 1.0.6 → 1.0.7
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 +23 -0
- package/locales/bg/LC_MESSAGES/volto.po +63 -63
- package/locales/cs/LC_MESSAGES/volto.po +63 -63
- package/locales/da/LC_MESSAGES/volto.po +63 -63
- package/locales/de/LC_MESSAGES/volto.po +63 -63
- package/locales/el/LC_MESSAGES/volto.po +63 -63
- package/locales/en/LC_MESSAGES/volto.po +63 -63
- package/locales/es/LC_MESSAGES/volto.po +63 -63
- package/locales/et/LC_MESSAGES/volto.po +63 -63
- package/locales/fi/LC_MESSAGES/volto.po +63 -63
- package/locales/fr/LC_MESSAGES/volto.po +63 -63
- package/locales/ga/LC_MESSAGES/volto.po +63 -63
- package/locales/hr/LC_MESSAGES/volto.po +63 -63
- package/locales/hu/LC_MESSAGES/volto.po +63 -63
- package/locales/is/LC_MESSAGES/volto.po +63 -63
- package/locales/it/LC_MESSAGES/volto.po +63 -63
- package/locales/lt/LC_MESSAGES/volto.po +63 -63
- package/locales/lv/LC_MESSAGES/volto.po +63 -63
- package/locales/mt/LC_MESSAGES/volto.po +63 -63
- package/locales/nl/LC_MESSAGES/volto.po +63 -63
- package/locales/nn/LC_MESSAGES/volto.po +63 -63
- package/locales/pl/LC_MESSAGES/volto.po +63 -63
- package/locales/pt/LC_MESSAGES/volto.po +63 -63
- package/locales/ro/LC_MESSAGES/volto.po +63 -63
- package/locales/sk/LC_MESSAGES/volto.po +63 -63
- package/locales/sl/LC_MESSAGES/volto.po +63 -63
- package/locales/sv/LC_MESSAGES/volto.po +63 -63
- package/locales/tr/LC_MESSAGES/volto.po +63 -63
- package/locales/volto.pot +64 -64
- package/package.json +2 -2
- package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.jsx +3 -2
- package/src/components/index.js +26 -10
- package/src/components/manage/Blocks/CollectionStatistics/CollectionStatsEdit.jsx +1 -1
- package/src/components/manage/Blocks/CountryMapHeatIndex/View.jsx +2 -2
- package/src/components/manage/Blocks/CountryMapObservatory/CountryMapObservatoryOLView.jsx +2 -2
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +2 -2
- package/src/components/{theme → manage}/Widgets/GeolocationWidget.jsx +1 -1
- package/src/components/{theme → manage}/Widgets/GeolocationWidget.test.jsx +1 -1
- package/src/components/{theme → manage}/Widgets/ImageWidget.jsx +2 -2
- package/src/components/manage/Widgets/ImageWidget.test.jsx +187 -0
- package/src/components/{theme → manage}/Widgets/PromotionalImageWidget.test.jsx +9 -3
- package/src/components/theme/Content/Fields/BooleanField.jsx +7 -0
- package/src/components/theme/Content/Fields/HTMLField.jsx +14 -0
- package/src/components/theme/Content/Fields/TextField.jsx +12 -0
- package/src/components/theme/Content/Fields/VocabularyField.jsx +26 -0
- package/src/components/theme/Content/Fields/index.js +4 -0
- package/src/components/theme/Content/Sections/ContentBannerTitle.jsx +26 -0
- package/src/{helpers → components/theme/Content/Sections}/ContentMetadata.jsx +11 -312
- package/src/components/theme/Content/Sections/ContentRelatedItems.jsx +35 -0
- package/src/components/theme/Content/Sections/DocumentsList.jsx +80 -0
- package/src/components/theme/Content/Sections/EventDetails.jsx +90 -0
- package/src/components/theme/Content/Sections/GeographicMetadata.jsx +83 -0
- package/src/components/theme/Content/Sections/ImageGallery/index.js +1 -0
- package/src/components/theme/Content/Sections/ItemLogo.jsx +29 -0
- package/src/components/theme/Content/Sections/LinkedMetadataItemList.jsx +63 -0
- package/src/components/theme/Content/Sections/LinksList.jsx +48 -0
- package/src/components/theme/Content/Sections/MetadataItemList.jsx +43 -0
- package/src/components/theme/Content/Sections/PublicationDateInfo.jsx +62 -0
- package/src/components/theme/Content/Sections/PublishedModifiedInfo.jsx +33 -0
- package/src/components/theme/Content/Sections/ReferenceInfo.jsx +137 -0
- package/src/components/theme/Content/Sections/ShareInfoButton.jsx +24 -0
- package/src/components/theme/Content/Sections/SubjectTags.jsx +19 -0
- package/src/components/theme/Content/Sections/Versioning/index.js +3 -0
- package/src/components/theme/Content/Sections/geographicMetadataUtils.js +177 -0
- package/src/components/theme/Content/Sections/index.js +17 -0
- package/src/components/theme/Content/index.js +20 -0
- package/src/components/theme/Views/AdaptationOptionView.jsx +6 -8
- package/src/components/theme/Views/AdaptationOptionView.test.jsx +5 -8
- package/src/components/theme/Views/C3SIndicatorView.jsx +5 -5
- package/src/components/theme/Views/CaseStudyView.jsx +6 -8
- package/src/components/theme/Views/CcaEventView.jsx +4 -4
- package/src/components/theme/Views/DatabaseItemView.jsx +14 -18
- package/src/components/theme/Views/EventView.jsx +3 -3
- package/src/components/theme/Views/ExtendedToolView.jsx +6 -8
- package/src/components/theme/Views/ExtendedToolView.test.jsx +10 -16
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/MissionSignatoryProfileView.jsx +5 -2
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/MissionSignatoryProfileView.test.jsx +2 -2
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/ActionTab.jsx +1 -2
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/ActionTab.test.jsx +3 -0
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/AssessmentTab.jsx +1 -2
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/AssessmentTab.test.jsx +11 -1
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/GovernanceTab.jsx +1 -2
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/PlanningTab.jsx +1 -2
- package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/PlanningTab.test.jsx +11 -1
- package/src/components/theme/Views/NewsItemView.jsx +5 -2
- package/src/components/theme/Views/ProjectView.jsx +4 -6
- package/src/constants.js +7 -0
- package/src/helpers/countryMap.js +1 -4
- package/src/helpers/embed.js +11 -0
- package/src/helpers/index.js +13 -101
- package/src/helpers/string.js +4 -0
- package/src/hocs/index.js +1 -0
- package/src/{helpers/clientOnly.jsx → hocs/withClientOnly.jsx} +1 -1
- package/src/index.js +3 -3
- package/src/search/queryUtils.js +64 -0
- package/src/components/theme/ShareInfoButton/ShareInfoButton.jsx +0 -26
- package/src/components/theme/Widgets/ImageWidget.test.jsx +0 -90
- package/src/helpers/Utils.jsx +0 -620
- /package/src/components/manage/{TransparentOverlay.jsx → Blocks/CollectionStatistics/TransparentOverlay.jsx} +0 -0
- /package/src/components/{theme → manage}/Widgets/GeocharsWidget.jsx +0 -0
- /package/src/components/{theme → manage}/Widgets/GeolocationWidgetMapContainer.jsx +0 -0
- /package/src/components/{theme → manage}/Widgets/PromotionalImageWidget.jsx +0 -0
- /package/src/components/{theme → manage}/Widgets/RASTWidgetView.jsx +0 -0
- /package/src/components/{theme → manage}/Widgets/__mocks__/GeolocationWidgetMapContainer.jsx +0 -0
- /package/src/components/{theme → manage}/Widgets/utils.js +0 -0
- /package/src/components/theme/{ImageGallery → Content/Sections/ImageGallery}/ImageGallery.jsx +0 -0
- /package/src/components/theme/{ImageGallery → Content/Sections/ImageGallery}/ImageGallery.test.jsx +0 -0
- /package/src/components/theme/{ImageGallery → Content/Sections/ImageGallery}/styles.less +0 -0
- /package/src/components/theme/{Views → Content/Sections/Versioning}/ArchivedVersionListing.jsx +0 -0
- /package/src/components/theme/{Views → Content/Sections/Versioning}/ArchivedVersionListing.test.jsx +0 -0
- /package/src/components/theme/{Views → Content/Sections/Versioning}/ArchivedVersionNotice.jsx +0 -0
- /package/src/components/theme/{Views → Content/Sections/Versioning}/ArchivedVersionNotice.test.jsx +0 -0
- /package/src/components/theme/{Views → Content/Sections/Versioning}/VersionsGroup.jsx +0 -0
- /package/src/components/theme/{Views → Content/Sections/Versioning}/VersionsGroup.test.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/ItemsSection.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/ItemsSection.test.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/NoDataReported.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/NoDataReported.test.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/StatisticSection.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/StatisticSection.test.jsx +0 -0
- /package/src/components/theme/{MissionSignatoryProfile → Views/MissionSignatoryProfile}/TabSections/GovernanceTab.test.jsx +0 -0
|
@@ -19,22 +19,19 @@ jest.mock('@eeacms/volto-cca-policy/components', () => ({
|
|
|
19
19
|
))}
|
|
20
20
|
</div>
|
|
21
21
|
),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
jest.mock('@eeacms/volto-cca-policy/helpers', () => ({
|
|
22
|
+
ContentBannerTitle: () => <div data-testid="banner-title" />,
|
|
23
|
+
ContentMetadata: () => <div data-testid="content-metadata" />,
|
|
27
24
|
HTMLField: ({ value, className }) => (
|
|
28
25
|
<div data-testid={className ? `html-${className}` : 'html-field'}>
|
|
29
26
|
{value?.data ?? value ?? ''}
|
|
30
27
|
</div>
|
|
31
28
|
),
|
|
32
|
-
ContentMetadata: () => <div data-testid="content-metadata" />,
|
|
33
|
-
PublishedModifiedInfo: () => <div data-testid="published-modified" />,
|
|
34
|
-
BannerTitle: () => <div data-testid="banner-title" />,
|
|
35
29
|
LinksList: ({ value }) => (
|
|
36
30
|
<div data-testid="links-list">{(value || []).join(',')}</div>
|
|
37
31
|
),
|
|
32
|
+
PortalMessage: () => <div data-testid="portal-message" />,
|
|
33
|
+
PublishedModifiedInfo: () => <div data-testid="published-modified" />,
|
|
34
|
+
ShareInfoButton: () => <div data-testid="share-info" />,
|
|
38
35
|
}));
|
|
39
36
|
|
|
40
37
|
jest.mock('@eeacms/volto-eea-design-system/ui', () => ({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import spinner from '@eeacms/volto-cca-policy/../theme//assets/images/spinner.svg';
|
|
3
3
|
import {
|
|
4
|
+
ContentBannerTitle,
|
|
5
|
+
ContentMetadata,
|
|
4
6
|
HTMLField,
|
|
5
|
-
BannerTitle,
|
|
6
7
|
LogoWrapper,
|
|
7
|
-
|
|
8
|
-
} from '@eeacms/volto-cca-policy/
|
|
8
|
+
PortalMessage,
|
|
9
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
9
10
|
import {
|
|
10
11
|
Icon,
|
|
11
12
|
Grid,
|
|
@@ -15,7 +16,6 @@ import {
|
|
|
15
16
|
Container,
|
|
16
17
|
Accordion,
|
|
17
18
|
} from 'semantic-ui-react';
|
|
18
|
-
import { PortalMessage } from '@eeacms/volto-cca-policy/components';
|
|
19
19
|
import { Link } from 'react-router-dom';
|
|
20
20
|
import { FormattedMessage } from 'react-intl';
|
|
21
21
|
import { useSelector } from 'react-redux';
|
|
@@ -215,7 +215,7 @@ function C3SIndicatorView(props) {
|
|
|
215
215
|
|
|
216
216
|
return (
|
|
217
217
|
<div className="db-item-view c3sindicator-view">
|
|
218
|
-
<
|
|
218
|
+
<ContentBannerTitle
|
|
219
219
|
content={{ ...content, image: '' }}
|
|
220
220
|
data={{
|
|
221
221
|
info: [{ description: '' }],
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
PortalMessage,
|
|
4
|
-
ShareInfoButton,
|
|
5
|
-
} from '@eeacms/volto-cca-policy/components';
|
|
6
|
-
import {
|
|
7
|
-
BannerTitle,
|
|
2
|
+
ContentBannerTitle,
|
|
8
3
|
ContentMetadata,
|
|
9
4
|
DocumentsList,
|
|
10
5
|
HTMLField,
|
|
6
|
+
ImageGallery,
|
|
11
7
|
LinksList,
|
|
8
|
+
PortalMessage,
|
|
12
9
|
PublishedModifiedInfo,
|
|
13
|
-
|
|
10
|
+
ShareInfoButton,
|
|
11
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
14
12
|
import React, { Fragment } from 'react';
|
|
15
13
|
import AnchorLink from 'react-anchor-link-smooth-scroll';
|
|
16
14
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
@@ -360,7 +358,7 @@ function CaseStudyView(props) {
|
|
|
360
358
|
|
|
361
359
|
return (
|
|
362
360
|
<div className="db-item-view case-study-view">
|
|
363
|
-
<
|
|
361
|
+
<ContentBannerTitle
|
|
364
362
|
content={{ ...content, image: '' }}
|
|
365
363
|
data={{
|
|
366
364
|
info: [{ description: '' }],
|
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { useIntl, defineMessages, FormattedMessage } from 'react-intl';
|
|
3
3
|
import { Grid, Container, Segment } from 'semantic-ui-react';
|
|
4
4
|
import {
|
|
5
|
-
HTMLField,
|
|
6
|
-
EventDetails,
|
|
7
5
|
DocumentsList,
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
EventDetails,
|
|
7
|
+
HTMLField,
|
|
8
|
+
PortalMessage,
|
|
9
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
10
10
|
import { filterBlocks } from '@eeacms/volto-cca-policy/utils';
|
|
11
11
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
12
12
|
|
|
@@ -3,8 +3,20 @@ import { FormattedMessage } from 'react-intl';
|
|
|
3
3
|
import { PrivacyProtection } from '@eeacms/volto-embed';
|
|
4
4
|
import { Container, Divider, Grid } from 'semantic-ui-react';
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
ArchivedVersionListing,
|
|
7
|
+
ArchivedVersionNotice,
|
|
8
|
+
ContentBannerTitle,
|
|
9
|
+
ContentMetadata,
|
|
10
|
+
ContentRelatedItems,
|
|
11
|
+
DocumentsList,
|
|
12
|
+
ExternalLink,
|
|
13
|
+
HTMLField,
|
|
14
|
+
ItemLogo,
|
|
7
15
|
PortalMessage,
|
|
16
|
+
PublishedModifiedInfo,
|
|
17
|
+
ReferenceInfo,
|
|
18
|
+
ShareInfoButton,
|
|
19
|
+
// VersionsGroup, // commented out - relatedItems already shows versions
|
|
8
20
|
} from '@eeacms/volto-cca-policy/components';
|
|
9
21
|
import { fixEmbedURL } from '@eeacms/volto-cca-policy/helpers';
|
|
10
22
|
import {
|
|
@@ -17,22 +29,6 @@ import {
|
|
|
17
29
|
INDICATOR,
|
|
18
30
|
CONTENT_TYPE_LABELS,
|
|
19
31
|
} from '@eeacms/volto-cca-policy/constants';
|
|
20
|
-
import {
|
|
21
|
-
HTMLField,
|
|
22
|
-
ReferenceInfo,
|
|
23
|
-
ContentMetadata,
|
|
24
|
-
PublishedModifiedInfo,
|
|
25
|
-
ItemLogo,
|
|
26
|
-
ContentRelatedItems,
|
|
27
|
-
DocumentsList,
|
|
28
|
-
ExternalLink,
|
|
29
|
-
BannerTitle,
|
|
30
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
31
|
-
import {
|
|
32
|
-
ArchivedVersionNotice,
|
|
33
|
-
ArchivedVersionListing,
|
|
34
|
-
// VersionsGroup, // commented out - relatedItems already shows versions
|
|
35
|
-
} from '@eeacms/volto-cca-policy/components';
|
|
36
32
|
|
|
37
33
|
const SHARE_EEA = ['https://cmshare.eea.eu', 'shareit.eea.europa.eu'];
|
|
38
34
|
|
|
@@ -171,7 +167,7 @@ const DatabaseItemView = (props) => {
|
|
|
171
167
|
|
|
172
168
|
return (
|
|
173
169
|
<div className="db-item-view">
|
|
174
|
-
<
|
|
170
|
+
<ContentBannerTitle
|
|
175
171
|
content={{ ...content, image: '', title: item_title }}
|
|
176
172
|
data={{
|
|
177
173
|
info: [{ description: '' }],
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { Grid, Container, Segment } from 'semantic-ui-react';
|
|
3
3
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
4
4
|
import {
|
|
5
|
-
SubjectTags,
|
|
6
5
|
EventDetails,
|
|
7
6
|
HTMLField,
|
|
8
|
-
|
|
7
|
+
PortalMessage,
|
|
8
|
+
SubjectTags,
|
|
9
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
9
10
|
import { filterBlocks } from '@eeacms/volto-cca-policy/utils';
|
|
10
|
-
import { PortalMessage } from '@eeacms/volto-cca-policy/components';
|
|
11
11
|
|
|
12
12
|
function EventView(props) {
|
|
13
13
|
const { content } = props;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { Button, Container, Grid, Icon } from 'semantic-ui-react';
|
|
2
2
|
import {
|
|
3
|
+
BooleanField,
|
|
3
4
|
CompareToolsPanel,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
5
|
+
ContentMetadata,
|
|
6
|
+
DocumentsList,
|
|
7
7
|
HTMLField,
|
|
8
|
+
ItemLogo,
|
|
9
|
+
PortalMessage,
|
|
8
10
|
TextField,
|
|
9
|
-
BooleanField,
|
|
10
11
|
VocabularyField,
|
|
11
|
-
|
|
12
|
-
ItemLogo,
|
|
13
|
-
DocumentsList,
|
|
14
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
12
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
15
13
|
import { defineMessages, useIntl } from 'react-intl';
|
|
16
14
|
import config from '@plone/volto/registry';
|
|
17
15
|
import { useCompareTools } from '../CompareTools/utils';
|
|
@@ -12,14 +12,19 @@ jest.mock('../CompareTools/utils', () => ({
|
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
14
|
jest.mock('@eeacms/volto-cca-policy/components', () => ({
|
|
15
|
+
BooleanField: ({ label, value, yesLabel, noLabel }) => (
|
|
16
|
+
<div>
|
|
17
|
+
<span>{label}</span>
|
|
18
|
+
<span>{value ? yesLabel : noLabel}</span>
|
|
19
|
+
</div>
|
|
20
|
+
),
|
|
15
21
|
CompareToolsPanel: () => <div data-testid="compare-tools-panel" />,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
jest.mock('@eeacms/volto-cca-policy/helpers', () => ({
|
|
22
|
+
ContentMetadata: () => <div data-testid="content-metadata" />,
|
|
23
|
+
DocumentsList: () => <div data-testid="documents-list" />,
|
|
20
24
|
HTMLField: ({ value }) =>
|
|
21
25
|
value ? <div dangerouslySetInnerHTML={{ __html: value }} /> : null,
|
|
22
|
-
|
|
26
|
+
ItemLogo: () => <div data-testid="item-logo" />,
|
|
27
|
+
PortalMessage: () => <div data-testid="portal-message" />,
|
|
23
28
|
TextField: ({ label, value }) =>
|
|
24
29
|
value !== null && value !== undefined && value !== '' ? (
|
|
25
30
|
<div>
|
|
@@ -28,13 +33,6 @@ jest.mock('@eeacms/volto-cca-policy/helpers', () => ({
|
|
|
28
33
|
</div>
|
|
29
34
|
) : null,
|
|
30
35
|
|
|
31
|
-
BooleanField: ({ label, value, yesLabel, noLabel }) => (
|
|
32
|
-
<div>
|
|
33
|
-
<span>{label}</span>
|
|
34
|
-
<span>{value ? yesLabel : noLabel}</span>
|
|
35
|
-
</div>
|
|
36
|
-
),
|
|
37
|
-
|
|
38
36
|
VocabularyField: ({ label, values = [], asList }) =>
|
|
39
37
|
values.length > 0 ? (
|
|
40
38
|
<div>
|
|
@@ -50,10 +48,6 @@ jest.mock('@eeacms/volto-cca-policy/helpers', () => ({
|
|
|
50
48
|
)}
|
|
51
49
|
</div>
|
|
52
50
|
) : null,
|
|
53
|
-
|
|
54
|
-
ContentMetadata: () => <div data-testid="content-metadata" />,
|
|
55
|
-
ItemLogo: () => <div data-testid="item-logo" />,
|
|
56
|
-
DocumentsList: () => <div data-testid="documents-list" />,
|
|
57
51
|
}));
|
|
58
52
|
|
|
59
53
|
jest.mock('@plone/volto/registry', () => ({
|
|
@@ -2,7 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import { Tab, Container, Divider, Button, Icon } from 'semantic-ui-react';
|
|
4
4
|
import { formatTextToHTML } from '@eeacms/volto-cca-policy/utils';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ContentBannerTitle,
|
|
7
|
+
HTMLField,
|
|
8
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
6
9
|
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
7
10
|
|
|
8
11
|
import GovernanceTab from './TabSections/GovernanceTab';
|
|
@@ -55,7 +58,7 @@ const MissionSignatoryProfileView = ({ content }) => {
|
|
|
55
58
|
|
|
56
59
|
return (
|
|
57
60
|
<Container>
|
|
58
|
-
<
|
|
61
|
+
<ContentBannerTitle
|
|
59
62
|
content={{ ...content, image: signatoryData?.image }}
|
|
60
63
|
data={{
|
|
61
64
|
info: [{ description: '' }],
|
|
@@ -12,8 +12,8 @@ jest.mock('./TabSections/AssessmentTab', () => () => (
|
|
|
12
12
|
jest.mock('./TabSections/PlanningTab', () => () => <div>Mocked Planning</div>);
|
|
13
13
|
jest.mock('./TabSections/ActionTab', () => () => <div>Mocked Action</div>);
|
|
14
14
|
|
|
15
|
-
jest.mock('@eeacms/volto-cca-policy/
|
|
16
|
-
|
|
15
|
+
jest.mock('@eeacms/volto-cca-policy/components', () => ({
|
|
16
|
+
ContentBannerTitle: ({ children }) => <div>{children}</div>,
|
|
17
17
|
HTMLField: ({ value }) => (
|
|
18
18
|
<div dangerouslySetInnerHTML={{ __html: value?.data }} />
|
|
19
19
|
),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Tab, Grid } from 'semantic-ui-react';
|
|
2
2
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
3
|
-
import { HTMLField } from '@eeacms/volto-cca-policy/
|
|
4
|
-
import { AccordionList } from '@eeacms/volto-cca-policy/components';
|
|
3
|
+
import { AccordionList, HTMLField } from '@eeacms/volto-cca-policy/components';
|
|
5
4
|
import { formatTextToHTML, isEmpty } from '@eeacms/volto-cca-policy/utils';
|
|
6
5
|
import NoDataReported from '../NoDataReported';
|
|
7
6
|
import ItemsSection from '../ItemsSection';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Tab, Segment } from 'semantic-ui-react';
|
|
2
2
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
3
|
-
import { HTMLField } from '@eeacms/volto-cca-policy/
|
|
4
|
-
import { AccordionList } from '@eeacms/volto-cca-policy/components';
|
|
3
|
+
import { AccordionList, HTMLField } from '@eeacms/volto-cca-policy/components';
|
|
5
4
|
import { isEmpty, formatTextToHTML } from '@eeacms/volto-cca-policy/utils';
|
|
6
5
|
import NoDataReported from '../NoDataReported';
|
|
7
6
|
import ItemsSection from '../ItemsSection';
|
|
@@ -6,7 +6,17 @@ jest.mock('@eeacms/volto-eea-design-system/ui', () => ({
|
|
|
6
6
|
Callout: ({ children }) => <div>{children}</div>,
|
|
7
7
|
}));
|
|
8
8
|
|
|
9
|
-
jest.mock('@eeacms/volto-cca-policy/
|
|
9
|
+
jest.mock('@eeacms/volto-cca-policy/components', () => ({
|
|
10
|
+
AccordionList: ({ accordions }) => (
|
|
11
|
+
<div>
|
|
12
|
+
{accordions.map((item, index) => (
|
|
13
|
+
<div key={index}>
|
|
14
|
+
<div>{item.title}</div>
|
|
15
|
+
<div>{item.content}</div>
|
|
16
|
+
</div>
|
|
17
|
+
))}
|
|
18
|
+
</div>
|
|
19
|
+
),
|
|
10
20
|
HTMLField: ({ value }) => <div>{value.data}</div>,
|
|
11
21
|
}));
|
|
12
22
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Tab } from 'semantic-ui-react';
|
|
2
2
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
3
|
-
import { HTMLField } from '@eeacms/volto-cca-policy/helpers';
|
|
4
3
|
import { formatTextToHTML } from '@eeacms/volto-cca-policy/utils';
|
|
5
|
-
import { AccordionList } from '@eeacms/volto-cca-policy/components';
|
|
4
|
+
import { AccordionList, HTMLField } from '@eeacms/volto-cca-policy/components';
|
|
6
5
|
import StatisticSection from '../StatisticSection';
|
|
7
6
|
|
|
8
7
|
const GovernanceTab = ({ result, general_text }) => {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Tab, Message, Segment, Grid } from 'semantic-ui-react';
|
|
3
3
|
import { Callout } from '@eeacms/volto-eea-design-system/ui';
|
|
4
|
-
import { HTMLField } from '@eeacms/volto-cca-policy/helpers';
|
|
5
4
|
import {
|
|
6
5
|
isEmpty,
|
|
7
6
|
formatTextToHTML,
|
|
8
7
|
extractPlanNameAndURL,
|
|
9
8
|
} from '@eeacms/volto-cca-policy/utils';
|
|
10
|
-
import { AccordionList } from '@eeacms/volto-cca-policy/components';
|
|
9
|
+
import { AccordionList, HTMLField } from '@eeacms/volto-cca-policy/components';
|
|
11
10
|
import NoDataReported from '../NoDataReported';
|
|
12
11
|
import ItemsSection from '../ItemsSection';
|
|
13
12
|
|
|
@@ -2,7 +2,17 @@ import '@testing-library/jest-dom';
|
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import PlanningTab from './PlanningTab';
|
|
4
4
|
|
|
5
|
-
jest.mock('@eeacms/volto-cca-policy/
|
|
5
|
+
jest.mock('@eeacms/volto-cca-policy/components', () => ({
|
|
6
|
+
AccordionList: ({ accordions }) => (
|
|
7
|
+
<div>
|
|
8
|
+
{accordions.map((item, index) => (
|
|
9
|
+
<div key={index}>
|
|
10
|
+
<div>{item.title}</div>
|
|
11
|
+
<div>{item.content}</div>
|
|
12
|
+
</div>
|
|
13
|
+
))}
|
|
14
|
+
</div>
|
|
15
|
+
),
|
|
6
16
|
HTMLField: ({ value }) => (
|
|
7
17
|
<div dangerouslySetInnerHTML={{ __html: value.data }} />
|
|
8
18
|
),
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Container } from 'semantic-ui-react';
|
|
3
3
|
import { filterBlocks } from '@eeacms/volto-cca-policy/utils';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
HTMLField,
|
|
6
|
+
PortalMessage,
|
|
7
|
+
SubjectTags,
|
|
8
|
+
} from '@eeacms/volto-cca-policy/components';
|
|
6
9
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
7
10
|
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
8
11
|
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Container, Divider, Grid } from 'semantic-ui-react';
|
|
2
3
|
import {
|
|
3
|
-
HTMLField,
|
|
4
4
|
ContentMetadata,
|
|
5
|
-
|
|
5
|
+
HTMLField,
|
|
6
6
|
ItemLogo,
|
|
7
|
+
PortalMessage,
|
|
8
|
+
PublishedModifiedInfo,
|
|
7
9
|
ReferenceInfo,
|
|
8
|
-
} from '@eeacms/volto-cca-policy/helpers';
|
|
9
|
-
import { Container, Divider, Grid } from 'semantic-ui-react';
|
|
10
|
-
import {
|
|
11
10
|
ShareInfoButton,
|
|
12
|
-
PortalMessage,
|
|
13
11
|
} from '@eeacms/volto-cca-policy/components';
|
|
14
12
|
|
|
15
13
|
import { FormattedMessage } from 'react-intl';
|
package/src/constants.js
CHANGED
|
@@ -43,10 +43,17 @@ export const DOWNLOAD_FIELDS = [
|
|
|
43
43
|
{ field: 'cca_keywords', name: 'Keywords' },
|
|
44
44
|
{ field: 'cca_adaptation_sectors', name: 'Sectors' },
|
|
45
45
|
{ field: 'cca_climate_impacts', name: 'Climate impact' },
|
|
46
|
+
{ field: 'cca_governance_level_list', name: 'Governance level' },
|
|
47
|
+
{
|
|
48
|
+
field: 'cca_geographic_characterisation',
|
|
49
|
+
name: 'Geographic characterization',
|
|
50
|
+
},
|
|
46
51
|
{
|
|
47
52
|
field: 'cca_geographic_transnational_region',
|
|
48
53
|
name: 'Transnational regions',
|
|
49
54
|
},
|
|
55
|
+
{ field: 'cca_sub_nationals', name: 'Sub national regions' },
|
|
56
|
+
{ field: 'cca_city', name: 'City' },
|
|
50
57
|
{ field: 'cca_adaptation_elements', name: 'Adaptation Approaches' },
|
|
51
58
|
{ field: 'cca_funding_programme', name: 'Funding programme' },
|
|
52
59
|
{ field: 'cca_key_type_measure', name: 'Key type measure' },
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// import React, { useEffect } from 'react';
|
|
2
|
-
// import flags from './flags.js';
|
|
3
|
-
|
|
4
1
|
export const euCountryNames = [
|
|
5
2
|
'Austria',
|
|
6
3
|
'Belgium',
|
|
@@ -38,7 +35,7 @@ export const euCountryNames = [
|
|
|
38
35
|
'Turkey',
|
|
39
36
|
];
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
const euCountryNamesEnergy = [
|
|
42
39
|
'Albania',
|
|
43
40
|
'Bosnia-Herzegovina',
|
|
44
41
|
'Bosnia and Herzegovina',
|
package/src/helpers/index.js
CHANGED
|
@@ -1,102 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
export { fixEmbedURL } from './embed';
|
|
2
|
+
export { capitalizeFirstLetter } from './string';
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ContentRelatedItems,
|
|
15
|
-
ItemLogo,
|
|
16
|
-
SubjectTags,
|
|
17
|
-
EventDetails,
|
|
18
|
-
MetadataItemList,
|
|
19
|
-
LinkedMetadataItemList,
|
|
20
|
-
} from './Utils';
|
|
21
|
-
export { default as ContentMetadata } from './ContentMetadata';
|
|
22
|
-
export { default as clientOnly } from './clientOnly';
|
|
23
|
-
|
|
24
|
-
export const capitalizeFirstLetter = (str) =>
|
|
25
|
-
str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
26
|
-
|
|
27
|
-
export const addFilterParams = (params, filters) => {
|
|
28
|
-
filters.forEach((f, i) => {
|
|
29
|
-
params.set(`filters[${i}][field]`, f.field);
|
|
30
|
-
params.set(`filters[${i}][type]`, f.type);
|
|
31
|
-
(f.values || []).forEach((val, vi) => {
|
|
32
|
-
params.set(`filters[${i}][values][${vi}]`, val);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const makeContributionsSearchQuery = ({ id } = {}) => {
|
|
38
|
-
const organisation = OBSERVATORY_PARTNERS?.[id];
|
|
39
|
-
const base = '/en/observatory/advanced-search';
|
|
40
|
-
|
|
41
|
-
// If partner is missing, fall back to base (or return null if you prefer)
|
|
42
|
-
if (!organisation) return `${base}?size=n_10_n`;
|
|
43
|
-
|
|
44
|
-
const params = new URLSearchParams();
|
|
45
|
-
params.set('size', 'n_10_n');
|
|
46
|
-
|
|
47
|
-
addFilterParams(params, [
|
|
48
|
-
{
|
|
49
|
-
field: 'cca_partner_contributors.keyword',
|
|
50
|
-
type: 'any',
|
|
51
|
-
values: [organisation],
|
|
52
|
-
},
|
|
53
|
-
{ field: 'issued.date', type: 'any', values: ['All time'] },
|
|
54
|
-
{ field: 'language', type: 'any', values: ['en'] },
|
|
55
|
-
]);
|
|
56
|
-
|
|
57
|
-
params.set('sort-field', 'issued.date');
|
|
58
|
-
params.set('sort-direction', 'desc');
|
|
59
|
-
|
|
60
|
-
return `${base}?${params.toString()}`;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const makeAdvancedSearchQuery = ({ field, value }) => {
|
|
64
|
-
const base = '/en/data-and-downloads/';
|
|
65
|
-
const params = new URLSearchParams();
|
|
66
|
-
params.set('size', 'n_10_n');
|
|
67
|
-
|
|
68
|
-
const filters = [
|
|
69
|
-
{ field: 'issued.date', values: ['All time'], type: 'any' },
|
|
70
|
-
{ field: 'language', values: ['en'], type: 'any' },
|
|
71
|
-
// { field: 'objectProvides', values: [contentType], type: 'any' },
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
if (field) {
|
|
75
|
-
filters.push({ field, values: [value], type: 'all' });
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
addFilterParams(params, filters);
|
|
79
|
-
|
|
80
|
-
params.set('sort-field', 'issued.date');
|
|
81
|
-
params.set('sort-direction', 'desc');
|
|
82
|
-
|
|
83
|
-
if (!field) {
|
|
84
|
-
params.set('q', value ?? '');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return `${base}?${params.toString()}`;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const fixEmbedURL = (url, is_cmshare_video) => {
|
|
91
|
-
const suffix = '/download';
|
|
92
|
-
|
|
93
|
-
if (!is_cmshare_video) return url;
|
|
94
|
-
|
|
95
|
-
const base = url.split('?')[0];
|
|
96
|
-
|
|
97
|
-
if (base.endsWith(suffix)) return base;
|
|
98
|
-
|
|
99
|
-
return base + suffix;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export * from './countryMap';
|
|
4
|
+
adjustEuCountryNames,
|
|
5
|
+
euCountryNames,
|
|
6
|
+
euCountryNamesIncludingEnergy,
|
|
7
|
+
getClosestFeatureToCoordinate,
|
|
8
|
+
getFocusCountriesFeature,
|
|
9
|
+
getFocusCountryNames,
|
|
10
|
+
getImageUrl,
|
|
11
|
+
removeTooltip,
|
|
12
|
+
setTooltipVisibility,
|
|
13
|
+
tooltipStyle,
|
|
14
|
+
} from './countryMap';
|
package/src/hocs/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { default as withClientOnly } from './withClientOnly';
|
|
1
2
|
export { default as withResponsiveContainer } from './withResponsiveContainer';
|
|
2
3
|
export { default as withVisibilitySensor } from './withVisibilitySensor';
|
|
3
4
|
export { withGeoJsonData } from './withGeoJsonData';
|
package/src/index.js
CHANGED
|
@@ -46,8 +46,8 @@ import {
|
|
|
46
46
|
NON_EU_LANGS,
|
|
47
47
|
} from '@eeacms/volto-cca-policy/constants';
|
|
48
48
|
|
|
49
|
-
import GeocharsWidget from './components/
|
|
50
|
-
import PromotionalImageWidget from './components/
|
|
49
|
+
import GeocharsWidget from './components/manage/Widgets/GeocharsWidget';
|
|
50
|
+
import PromotionalImageWidget from './components/manage/Widgets/PromotionalImageWidget';
|
|
51
51
|
import HealthHorizontalCardItem from './components/Search/Result/HealthHorizontalCardItem';
|
|
52
52
|
import ClusterHorizontalCardItem from './components/Search/Result/ClusterHorizontalCardItem';
|
|
53
53
|
import NavigatorCatalogueCardItem from './components/Search/NavigatorCatalogue/NavigatorCatalogueCardItem';
|
|
@@ -71,7 +71,7 @@ import eeaWhiteLogo from '@eeacms/volto-eea-design-system/../theme/themes/eea/as
|
|
|
71
71
|
import './slate-styles.less';
|
|
72
72
|
import BrokenLinks from './components/theme/Views/BrokenLinks';
|
|
73
73
|
|
|
74
|
-
import GeolocationWidget from './components/
|
|
74
|
+
import GeolocationWidget from './components/manage/Widgets/GeolocationWidget';
|
|
75
75
|
// import MigrationButtons from './components/MigrationButtons';
|
|
76
76
|
|
|
77
77
|
const getEnv = () => (typeof window !== 'undefined' ? window.env : process.env);
|