@eeacms/volto-cca-policy 0.2.39 → 0.2.41
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
CHANGED
|
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [0.2.41](https://github.com/eea/volto-cca-policy/compare/0.2.40...0.2.41) - 4 June 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: Dependency updates
|
|
10
|
+
|
|
11
|
+
- Release @eeacms/volto-embed@10.0.1 [EEA Jenkins - [`7e807f4`](https://github.com/eea/volto-cca-policy/commit/7e807f45151eb7335a9f690a038bef8a9f1add80)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Tweak default expands [Tiberiu Ichim - [`e721114`](https://github.com/eea/volto-cca-policy/commit/e7211143178f25279541cf974ce41e8b4ae2c3b3)]
|
|
16
|
+
### [0.2.40](https://github.com/eea/volto-cca-policy/compare/0.2.39...0.2.40) - 31 May 2024
|
|
17
|
+
|
|
18
|
+
#### :bug: Bug Fixes
|
|
19
|
+
|
|
20
|
+
- fix: wrong tooltip for date info; simplify code [kreafox - [`2aa1bdb`](https://github.com/eea/volto-cca-policy/commit/2aa1bdb0fe380e8f3d0559c215ae0f3006cb2e76)]
|
|
21
|
+
- fix: typo in constants [kreafox - [`2372a2c`](https://github.com/eea/volto-cca-policy/commit/2372a2c0c61c7dd360e74f3cdd997d2afa577c4d)]
|
|
22
|
+
- fix: add missing region to constants [kreafox - [`a89d899`](https://github.com/eea/volto-cca-policy/commit/a89d899e72ae49e655e4ef518b7a1e55f973335b)]
|
|
23
|
+
|
|
24
|
+
#### :hammer_and_wrench: Others
|
|
25
|
+
|
|
26
|
+
- test: update snapshots [kreafox - [`9eb9a6c`](https://github.com/eea/volto-cca-policy/commit/9eb9a6c3bdf7db07c07a0472550e71ed314fc4cd)]
|
|
7
27
|
### [0.2.39](https://github.com/eea/volto-cca-policy/compare/0.2.38...0.2.39) - 30 May 2024
|
|
8
28
|
|
|
9
29
|
#### :bug: Bug Fixes
|
|
@@ -1343,13 +1363,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1343
1363
|
- Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
|
|
1344
1364
|
- Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
|
|
1345
1365
|
- Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
|
|
1346
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
|
|
1347
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
|
|
1348
1366
|
### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
|
|
1349
1367
|
|
|
1350
1368
|
#### :house: Internal changes
|
|
1351
1369
|
|
|
1352
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
|
|
1353
1370
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
|
|
1354
1371
|
|
|
1355
1372
|
#### :hammer_and_wrench: Others
|
|
@@ -1366,9 +1383,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1366
1383
|
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
|
|
1367
1384
|
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
|
|
1368
1385
|
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
|
|
1369
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
|
|
1370
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
|
|
1371
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
|
|
1372
1386
|
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
|
|
1373
1387
|
- Refs #256681 - Fix error in CCA Event view menu. ([React Intl] An id must be provided to format a message.) [GhitaB - [`517eeb8`](https://github.com/eea/volto-cca-policy/commit/517eeb817264a47bbfd6b9b7d22aaf22d44ed224)]
|
|
1374
1388
|
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
|
|
@@ -1585,7 +1599,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
1585
1599
|
|
|
1586
1600
|
#### :house: Internal changes
|
|
1587
1601
|
|
|
1588
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
|
|
1589
1602
|
|
|
1590
1603
|
#### :hammer_and_wrench: Others
|
|
1591
1604
|
|
|
@@ -2066,7 +2079,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2066
2079
|
#### :hammer_and_wrench: Others
|
|
2067
2080
|
|
|
2068
2081
|
- Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
|
|
2069
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
|
|
2070
2082
|
### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
|
|
2071
2083
|
|
|
2072
2084
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-cca-policy",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
4
4
|
"description": "@eeacms/volto-cca-policy: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: IDM2 A-Team",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@eeacms/volto-datablocks": "*",
|
|
32
32
|
"@eeacms/volto-eea-design-system": "*",
|
|
33
33
|
"@eeacms/volto-eea-website-theme": "^1.33.2",
|
|
34
|
-
"@eeacms/volto-embed": "
|
|
34
|
+
"@eeacms/volto-embed": "10.0.1",
|
|
35
35
|
"@eeacms/volto-globalsearch": "^1.1.0",
|
|
36
36
|
"@eeacms/volto-openlayers-map": "*",
|
|
37
37
|
"@eeacms/volto-searchlib": "^0.9.3",
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
GUIDANCE,
|
|
17
17
|
INDICATOR,
|
|
18
18
|
INFORMATION_PORTAL,
|
|
19
|
-
|
|
19
|
+
PUBLICATION_REPORT,
|
|
20
20
|
ORGANISATION,
|
|
21
21
|
VIDEO,
|
|
22
22
|
} from '@eeacms/volto-cca-policy/helpers/Constants';
|
|
@@ -76,7 +76,7 @@ const DatabaseItemView = (props) => {
|
|
|
76
76
|
case TOOL:
|
|
77
77
|
subtitle = 'Tools';
|
|
78
78
|
break;
|
|
79
|
-
case
|
|
79
|
+
case PUBLICATION_REPORT:
|
|
80
80
|
subtitle = 'Publications and Report';
|
|
81
81
|
break;
|
|
82
82
|
case GUIDANCE:
|
|
@@ -5,7 +5,7 @@ export const INDICATOR = 'eea.climateadapt.indicator';
|
|
|
5
5
|
export const INFORMATION_PORTAL = 'eea.climateadapt.informationportal';
|
|
6
6
|
export const ORGANISATION = 'eea.climateadapt.organisation';
|
|
7
7
|
export const ACE_PROJECT = 'eea.climateadapt.aceproject';
|
|
8
|
-
export const
|
|
8
|
+
export const PUBLICATION_REPORT = 'eea.climateadapt.publicationreport';
|
|
9
9
|
export const TOOL = 'eea.climateadapt.tool';
|
|
10
10
|
export const VIDEO = 'eea.climateadapt.video';
|
|
11
11
|
export const C3S_INDICATOR = 'eea.climateadapt.c3sindicator';
|
|
@@ -95,6 +95,7 @@ export const BIOREGIONS = {
|
|
|
95
95
|
COUNTRIES: 'Countries',
|
|
96
96
|
SUBNATIONAL: 'Subnational Regions',
|
|
97
97
|
CITY: 'Municipality Name',
|
|
98
|
+
TRANS_MACRO_OUTERMOST: 'Outermost Regions',
|
|
98
99
|
TRANS_MACRO_NORTHPERI: 'Northern Periphery and Arctic',
|
|
99
100
|
TRANS_MACRO_BACLITC: 'Baltic Sea',
|
|
100
101
|
TRANS_MACRO_NW_EUROPE: 'North West Europe',
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
VIDEO,
|
|
12
12
|
GUIDANCE,
|
|
13
13
|
INDICATOR,
|
|
14
|
-
|
|
14
|
+
PUBLICATION_REPORT,
|
|
15
15
|
} from '@eeacms/volto-cca-policy/helpers/Constants';
|
|
16
16
|
import {
|
|
17
17
|
isObservatoryMetadataURL,
|
|
@@ -19,30 +19,34 @@ import {
|
|
|
19
19
|
} from '@eeacms/volto-cca-policy/helpers';
|
|
20
20
|
|
|
21
21
|
const messages = defineMessages({
|
|
22
|
-
|
|
22
|
+
default_info_tooltip: {
|
|
23
23
|
id:
|
|
24
|
-
'The date refers to the moment in which the item has been prepared
|
|
24
|
+
'The date refers to the moment in which the item has been prepared ' +
|
|
25
|
+
'or updated by contributing experts to be submitted for the publication ' +
|
|
26
|
+
'in Climate ADAPT',
|
|
25
27
|
defaultMessage:
|
|
26
|
-
'The date refers to the moment in which the item has been prepared
|
|
28
|
+
'The date refers to the moment in which the item has been prepared ' +
|
|
29
|
+
'or updated by contributing experts to be submitted for the publication ' +
|
|
30
|
+
'in Climate ADAPT',
|
|
27
31
|
},
|
|
28
|
-
|
|
32
|
+
release_info_tooltip: {
|
|
29
33
|
id: 'The date refers to the date of release of the video',
|
|
30
34
|
defaultMessage: 'The date refers to the date of release of the video',
|
|
31
35
|
},
|
|
32
|
-
|
|
36
|
+
publication_info_tooltip: {
|
|
33
37
|
id: 'The date refers to the latest date of publication of the item',
|
|
34
38
|
defaultMessage:
|
|
35
39
|
'The date refers to the latest date of publication of the item',
|
|
36
40
|
},
|
|
37
|
-
|
|
41
|
+
release_date: {
|
|
38
42
|
id: 'Date of release:',
|
|
39
43
|
defaultMessage: 'Date of release:',
|
|
40
44
|
},
|
|
41
|
-
|
|
45
|
+
publication_date: {
|
|
42
46
|
id: 'Date of publication:',
|
|
43
47
|
defaultMessage: 'Date of publication:',
|
|
44
48
|
},
|
|
45
|
-
|
|
49
|
+
creation_date: {
|
|
46
50
|
id: 'Date of creation:',
|
|
47
51
|
defaultMessage: 'Date of creation:',
|
|
48
52
|
},
|
|
@@ -266,13 +270,7 @@ function GeoChar(props) {
|
|
|
266
270
|
section.value && (
|
|
267
271
|
<Fragment key={index}>
|
|
268
272
|
{section.title && (
|
|
269
|
-
<h5>
|
|
270
|
-
{intl.formatMessage(messages[section.title])}
|
|
271
|
-
{/* <FormattedMessage
|
|
272
|
-
id="{section.title}"
|
|
273
|
-
defaultMessage="Countries2344:"
|
|
274
|
-
/> */}
|
|
275
|
-
</h5>
|
|
273
|
+
<h5>{intl.formatMessage(messages[section.title])}</h5>
|
|
276
274
|
)}
|
|
277
275
|
<p>{section.value.join(', ')}</p>
|
|
278
276
|
</Fragment>
|
|
@@ -282,37 +280,34 @@ function GeoChar(props) {
|
|
|
282
280
|
);
|
|
283
281
|
}
|
|
284
282
|
|
|
285
|
-
function PublicationDateInfo(
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
'The date refers to the moment in which the item has been prepared or updated by contributing experts to be submitted for the publication in Climate ADAPT';
|
|
283
|
+
function PublicationDateInfo({ value, portaltype, title }) {
|
|
284
|
+
const intl = useIntl();
|
|
285
|
+
const publicationYear = new Date(value).getFullYear();
|
|
289
286
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
) {
|
|
298
|
-
tooltipText =
|
|
299
|
-
'The date refers to the latest date of publication of the item';
|
|
300
|
-
}
|
|
287
|
+
const tooltipMessages = {
|
|
288
|
+
[VIDEO]: intl.formatMessage(messages.release_info_tooltip),
|
|
289
|
+
[GUIDANCE]: intl.formatMessage(messages.publication_info_tooltip),
|
|
290
|
+
[INDICATOR]: intl.formatMessage(messages.publication_info_tooltip),
|
|
291
|
+
[PUBLICATION_REPORT]: intl.formatMessage(messages.publication_info_tooltip),
|
|
292
|
+
default: intl.formatMessage(messages.default_info_tooltip),
|
|
293
|
+
};
|
|
301
294
|
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
|
|
295
|
+
const tooltipText = tooltipMessages[portaltype] || tooltipMessages.default;
|
|
296
|
+
|
|
297
|
+
if (publicationYear <= 1970) return null;
|
|
298
|
+
|
|
299
|
+
return (
|
|
305
300
|
<>
|
|
306
301
|
<h5>{title}</h5>
|
|
307
302
|
<p>
|
|
308
303
|
{publicationYear}
|
|
309
304
|
<Popup
|
|
310
|
-
content={
|
|
305
|
+
content={tooltipText}
|
|
311
306
|
trigger={<i className="ri-question-fill"></i>}
|
|
312
307
|
/>
|
|
313
308
|
</p>
|
|
314
309
|
</>
|
|
315
|
-
)
|
|
310
|
+
);
|
|
316
311
|
}
|
|
317
312
|
|
|
318
313
|
function ContentMetadata(props) {
|
|
@@ -337,26 +332,23 @@ function ContentMetadata(props) {
|
|
|
337
332
|
const isObservatoryItem = isObservatoryMetadataURL(location.pathname);
|
|
338
333
|
const hasGeoChars = geochars !== null || spatial_layer.length > 0;
|
|
339
334
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
} else {
|
|
350
|
-
date_title = intl.formatMessage(messages['Date of creation:']);
|
|
351
|
-
}
|
|
335
|
+
const dateTitles = {
|
|
336
|
+
[VIDEO]: intl.formatMessage(messages.release_date),
|
|
337
|
+
[PUBLICATION_REPORT]: intl.formatMessage(messages.publication_date),
|
|
338
|
+
[INDICATOR]: intl.formatMessage(messages.publication_date),
|
|
339
|
+
[GUIDANCE]: intl.formatMessage(messages.publication_date),
|
|
340
|
+
default: intl.formatMessage(messages.creation_date),
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
const dateTitle = dateTitles[type] || dateTitles.default;
|
|
352
344
|
|
|
353
345
|
return (
|
|
354
346
|
<Segment>
|
|
355
347
|
<div className="content-metadata">
|
|
356
348
|
<PublicationDateInfo
|
|
357
|
-
title={
|
|
349
|
+
title={dateTitle}
|
|
358
350
|
value={content?.publication_date}
|
|
359
|
-
portaltype={
|
|
351
|
+
portaltype={type}
|
|
360
352
|
/>
|
|
361
353
|
|
|
362
354
|
{isObservatoryItem && (
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from 'semantic-ui-react';
|
|
15
15
|
import {
|
|
16
16
|
CASE_STUDY,
|
|
17
|
-
|
|
17
|
+
PUBLICATION_REPORT,
|
|
18
18
|
ORGANISATION,
|
|
19
19
|
ADAPTATION_OPTION,
|
|
20
20
|
ACE_PROJECT,
|
|
@@ -341,7 +341,7 @@ export const DocumentsList = (props) => {
|
|
|
341
341
|
section_title = intl.formatMessage(messages.caseStudiesDocuments);
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
if (type ===
|
|
344
|
+
if (type === PUBLICATION_REPORT) {
|
|
345
345
|
section_title = intl.formatMessage(
|
|
346
346
|
messages.publicationsAndReportsDocuments,
|
|
347
347
|
);
|
package/src/index.js
CHANGED
|
@@ -392,6 +392,12 @@ const applyConfig = (config) => {
|
|
|
392
392
|
},
|
|
393
393
|
GET_CONTENT: ['siblings'],
|
|
394
394
|
},
|
|
395
|
+
|
|
396
|
+
{
|
|
397
|
+
match: '',
|
|
398
|
+
GET_CONTENT: ['navigation', 'breadcrumbs', 'actions'],
|
|
399
|
+
querystring: { 'expand.navigation.depth': '3' },
|
|
400
|
+
},
|
|
395
401
|
];
|
|
396
402
|
|
|
397
403
|
// plug custom redux middleware
|