@eeacms/volto-cca-policy 0.1.47 → 0.1.49
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 +34 -0
- package/cypress.config.js +3 -3
- package/package.json +5 -3
- package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockView.jsx +1 -1
- package/src/components/manage/Blocks/C3SIndicatorsOverviewBlock/C3SIndicatorsOverviewBlockView.jsx +1 -1
- package/src/components/theme/Header.jsx +1 -1
- package/src/components/theme/Views/CcaEventView.jsx +113 -0
- package/src/customizations/@plone/volto-slate/utils/blocks.js +7 -0
- package/src/helpers/Utils.jsx +8 -1
- package/src/index.js +4 -0
- package/theme/globals/site.overrides +25 -22
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ 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.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
|
|
12
|
+
- chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- Refs #259267 - test volto-slate blocks add createParagraph [Tripon Eugen - [`c855b41`](https://github.com/eea/volto-cca-policy/commit/c855b41cb925767a45e1b16e6f79cd7e9c602fc7)]
|
|
17
|
+
- Refs #259267 - test cypress config set multilingual default [Tripon Eugen - [`1d4fd5a`](https://github.com/eea/volto-cca-policy/commit/1d4fd5a712c4f3edcf9cd208b759c2a6d75eefb2)]
|
|
18
|
+
- Refs #259267 - jenkins cypress e2e [Tripon Eugen - [`08ea88e`](https://github.com/eea/volto-cca-policy/commit/08ea88e1e3fcf6b53c347c4a99b0c80a972f17fd)]
|
|
19
|
+
- Refs #259267 - backend_profiles multiple addons separated by space [Tripon Eugen - [`a2e3a85`](https://github.com/eea/volto-cca-policy/commit/a2e3a85992c5513e6d0a2c697e8770f709d70d45)]
|
|
20
|
+
- Refs #259267 - test cypress config [Tripon Eugen - [`1434f26`](https://github.com/eea/volto-cca-policy/commit/1434f2624035572056633c0eb2598585c7e04722)]
|
|
21
|
+
- Refs #259267 - remove multilingual testing version [Tripon Eugen - [`86fd752`](https://github.com/eea/volto-cca-policy/commit/86fd7524680174ac7e34aa415798427dd44b890a)]
|
|
22
|
+
- Refs #259267 - jenkins test add multilingual and set version [Tripon Eugen - [`9611e95`](https://github.com/eea/volto-cca-policy/commit/9611e954879e03b0ebcf95da4ea580e26e3eb765)]
|
|
23
|
+
- Refs #259267 - jenkins test change className condition [Tripon Eugen - [`402832a`](https://github.com/eea/volto-cca-policy/commit/402832a29a83116cd8daa30a1e5296ca54742f02)]
|
|
24
|
+
- Refs #259267 - jenkins test volto version and longer timeout [Tripon Eugen - [`94b042d`](https://github.com/eea/volto-cca-policy/commit/94b042de785baebd1644d5aede93908dbe2035d2)]
|
|
25
|
+
- Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
|
|
26
|
+
- Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
|
|
27
|
+
- Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
|
|
28
|
+
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
|
|
29
|
+
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
|
|
30
|
+
- test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
|
|
31
|
+
- Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
|
|
32
|
+
- 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)]
|
|
33
|
+
- Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
|
|
34
|
+
### [0.1.48](https://github.com/eea/volto-cca-policy/compare/0.1.47...0.1.48) - 16 October 2023
|
|
35
|
+
|
|
36
|
+
#### :house: Internal changes
|
|
37
|
+
|
|
38
|
+
- style: don't apply icon on empty links [kreafox - [`81670eb`](https://github.com/eea/volto-cca-policy/commit/81670ebd6d095d98c19ddffb323486518c3588d3)]
|
|
39
|
+
- style: make external link icon selector more specific [kreafox - [`7a52b81`](https://github.com/eea/volto-cca-policy/commit/7a52b81029842192d7ec2cdfdd5d814b7601d219)]
|
|
40
|
+
|
|
7
41
|
### [0.1.47](https://github.com/eea/volto-cca-policy/compare/0.1.46...0.1.47) - 13 October 2023
|
|
8
42
|
|
|
9
43
|
#### :bug: Bug Fixes
|
package/cypress.config.js
CHANGED
|
@@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');
|
|
|
2
2
|
|
|
3
3
|
module.exports = defineConfig({
|
|
4
4
|
viewportWidth: 1280,
|
|
5
|
-
defaultCommandTimeout:
|
|
5
|
+
defaultCommandTimeout: 8888,
|
|
6
6
|
chromeWebSecurity: false,
|
|
7
7
|
reporter: 'junit',
|
|
8
|
-
video:
|
|
8
|
+
video: false,
|
|
9
9
|
retries: {
|
|
10
|
-
runMode:
|
|
10
|
+
runMode: 2,
|
|
11
11
|
openMode: 0,
|
|
12
12
|
},
|
|
13
13
|
reporterOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-cca-policy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
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",
|
|
@@ -24,11 +24,13 @@
|
|
|
24
24
|
"@eeacms/volto-accordion-block",
|
|
25
25
|
"@eeacms/volto-slate-label",
|
|
26
26
|
"@eeacms/volto-eea-design-system",
|
|
27
|
+
"@eeacms/volto-eea-website-theme",
|
|
27
28
|
"@eeacms/volto-globalsearch"
|
|
28
29
|
],
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@eeacms/volto-accordion-block": "*",
|
|
31
32
|
"@eeacms/volto-eea-design-system": "*",
|
|
33
|
+
"@eeacms/volto-eea-website-theme": "*",
|
|
32
34
|
"@eeacms/volto-globalsearch": "*",
|
|
33
35
|
"@eeacms/volto-openlayers-map": "*",
|
|
34
36
|
"@eeacms/volto-slate-label": "*",
|
|
@@ -43,8 +45,8 @@
|
|
|
43
45
|
"@plone/scripts": "*",
|
|
44
46
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
45
47
|
"cypress-fail-fast": "^5.0.1",
|
|
46
|
-
"husky": "
|
|
47
|
-
"lint-staged": "
|
|
48
|
+
"husky": "^8.0.3",
|
|
49
|
+
"lint-staged": "^14.0.1",
|
|
48
50
|
"md5": "^2.3.0"
|
|
49
51
|
},
|
|
50
52
|
"lint-staged": {
|
package/src/components/manage/Blocks/C3SIndicatorsGlossaryBlock/C3SIndicatorsGlossaryBlockView.jsx
CHANGED
|
@@ -6,7 +6,7 @@ export default function C3SIndicatorsGlossaryBlockView(props) {
|
|
|
6
6
|
|
|
7
7
|
const getIndicatorsData = () => {
|
|
8
8
|
const url =
|
|
9
|
-
'/++api++/en/knowledge/european-climate-data-explorer/@
|
|
9
|
+
'/++api++/en/knowledge/european-climate-data-explorer/@c3s_indicators_glossary_table_api';
|
|
10
10
|
|
|
11
11
|
axios
|
|
12
12
|
.get(url)
|
|
@@ -239,7 +239,7 @@ const EEAHeader = ({ pathname, token, items, history, subsite }) => {
|
|
|
239
239
|
inverted={isHomePageInverse ? true : false}
|
|
240
240
|
transparency={isHomePageInverse ? true : false}
|
|
241
241
|
logo={
|
|
242
|
-
<div className={isSubsite
|
|
242
|
+
<div className={isSubsite ? 'logo-wrapper' : ''}>
|
|
243
243
|
{subsite?.title ? (
|
|
244
244
|
<>
|
|
245
245
|
{subsite.subsite_logo ? (
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DocumentsList, HTMLField } from '@eeacms/volto-cca-policy/helpers';
|
|
3
|
+
import { When } from '@plone/volto/components/theme/View/EventDatesInfo';
|
|
4
|
+
import { Grid } from 'semantic-ui-react';
|
|
5
|
+
import config from '@plone/volto/registry';
|
|
6
|
+
|
|
7
|
+
function CcaEventView(props) {
|
|
8
|
+
const {
|
|
9
|
+
blocks: { blocksConfig },
|
|
10
|
+
} = config;
|
|
11
|
+
const TitleBlockView = blocksConfig.title.view;
|
|
12
|
+
const { content } = props;
|
|
13
|
+
// cca_files: [content.agenda_file]}
|
|
14
|
+
if (content.agenda_file) {
|
|
15
|
+
content.agenda_file['url'] = content.agenda_file['download'];
|
|
16
|
+
content.agenda_file['title'] = content.agenda_file['filename'];
|
|
17
|
+
}
|
|
18
|
+
if (content.background_documents) {
|
|
19
|
+
content.background_documents['url'] =
|
|
20
|
+
content.background_documents['download'];
|
|
21
|
+
content.background_documents['title'] =
|
|
22
|
+
content.background_documents['filename'];
|
|
23
|
+
}
|
|
24
|
+
const agenda_files = {
|
|
25
|
+
section_title: 'Download the detailed agenda',
|
|
26
|
+
cca_files: [content.agenda_file],
|
|
27
|
+
show_counter: false,
|
|
28
|
+
};
|
|
29
|
+
const background_documents = {
|
|
30
|
+
section_title: 'A background document for the event is available ',
|
|
31
|
+
cca_files: [content.background_documents],
|
|
32
|
+
show_counter: false,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div className="cca-event-view">
|
|
37
|
+
{content?.image !== null && (
|
|
38
|
+
<TitleBlockView
|
|
39
|
+
{...props}
|
|
40
|
+
data={{ info: [{ description: '' }] }}
|
|
41
|
+
metadata={content}
|
|
42
|
+
/>
|
|
43
|
+
)}
|
|
44
|
+
<div className="ui container">
|
|
45
|
+
<Grid columns="12">
|
|
46
|
+
<div className="row">
|
|
47
|
+
<Grid.Column
|
|
48
|
+
mobile={12}
|
|
49
|
+
tablet={12}
|
|
50
|
+
computer={9}
|
|
51
|
+
className="col-left"
|
|
52
|
+
>
|
|
53
|
+
{content?.image === null && (
|
|
54
|
+
<>
|
|
55
|
+
<div className="ui label">Climate adapt event</div>
|
|
56
|
+
<h1>{content.title}</h1>
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
59
|
+
<HTMLField value={content.text} className="long_description" />
|
|
60
|
+
<h2>Agenda and supporting documents</h2>
|
|
61
|
+
<HTMLField value={content.agenda} className="long_description" />
|
|
62
|
+
{content?.agenda_file && <DocumentsList content={agenda_files} />}
|
|
63
|
+
{content?.background_documents && (
|
|
64
|
+
<DocumentsList content={background_documents} />
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
<h2>Practical information</h2>
|
|
68
|
+
<h3>Participation</h3>
|
|
69
|
+
<HTMLField
|
|
70
|
+
value={content.participation}
|
|
71
|
+
className="long_description"
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
<h2>Contact</h2>
|
|
75
|
+
<p>
|
|
76
|
+
If you have any further questions you can contact{' '}
|
|
77
|
+
<a href="mailto:{content.contact_email}">
|
|
78
|
+
{content.contact_email}
|
|
79
|
+
</a>
|
|
80
|
+
</p>
|
|
81
|
+
</Grid.Column>
|
|
82
|
+
<Grid.Column
|
|
83
|
+
mobile={12}
|
|
84
|
+
tablet={12}
|
|
85
|
+
computer={3}
|
|
86
|
+
className="col-right"
|
|
87
|
+
>
|
|
88
|
+
<h3>When</h3>
|
|
89
|
+
<When
|
|
90
|
+
start={content.start}
|
|
91
|
+
end={content.end}
|
|
92
|
+
whole_day={content.whole_day}
|
|
93
|
+
open_end={content.open_end}
|
|
94
|
+
/>
|
|
95
|
+
{content?.location !== null && (
|
|
96
|
+
<>
|
|
97
|
+
<h3>Where</h3>
|
|
98
|
+
<p>{content.location}</p>
|
|
99
|
+
</>
|
|
100
|
+
)}
|
|
101
|
+
<h3>Language</h3>
|
|
102
|
+
<p>{content.language}</p>
|
|
103
|
+
<h3>Info</h3>
|
|
104
|
+
<p>{content.contact_email}</p>
|
|
105
|
+
</Grid.Column>
|
|
106
|
+
</div>
|
|
107
|
+
</Grid>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default CcaEventView;
|
|
@@ -125,6 +125,13 @@ export function createEmptyParagraph() {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
export function createParagraph(text) {
|
|
129
|
+
return {
|
|
130
|
+
type: config.settings.slate.defaultBlockType,
|
|
131
|
+
children: [{ text }],
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
128
135
|
export const isSingleBlockTypeActive = (editor, format) => {
|
|
129
136
|
const [match] = Editor.nodes(editor, {
|
|
130
137
|
match: (n) => n.type === format,
|
package/src/helpers/Utils.jsx
CHANGED
|
@@ -124,9 +124,16 @@ export const DocumentsList = (props) => {
|
|
|
124
124
|
if (!files || files.length === 0) {
|
|
125
125
|
return null;
|
|
126
126
|
}
|
|
127
|
+
if (!content.hasOwnProperty('show_counter')) {
|
|
128
|
+
content.show_counter = true;
|
|
129
|
+
}
|
|
127
130
|
|
|
128
131
|
let section_title = 'Documents';
|
|
129
132
|
|
|
133
|
+
if (content['section_title']) {
|
|
134
|
+
section_title = content['section_title'];
|
|
135
|
+
}
|
|
136
|
+
|
|
130
137
|
if (content['@type'] === 'eea.climateadapt.casestudy') {
|
|
131
138
|
section_title = 'Case Studies Documents';
|
|
132
139
|
}
|
|
@@ -137,7 +144,7 @@ export const DocumentsList = (props) => {
|
|
|
137
144
|
return (
|
|
138
145
|
<>
|
|
139
146
|
<h5>
|
|
140
|
-
{section_title} ({files.length})
|
|
147
|
+
{section_title} {content.show_counter && <>({files.length})</>}
|
|
141
148
|
</h5>
|
|
142
149
|
<ul className="documents-list">
|
|
143
150
|
{files.map((file, index) => (
|
package/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import loadable from '@loadable/component';
|
|
|
4
4
|
import { Sitemap } from '@plone/volto/components';
|
|
5
5
|
import AdaptationOptionView from './components/theme/Views/AdaptationOptionView';
|
|
6
6
|
import CaseStudyView from './components/theme/Views/CaseStudyView';
|
|
7
|
+
import CcaEventView from './components/theme/Views/CcaEventView';
|
|
7
8
|
import GuidanceView from './components/theme/Views/GuidanceView';
|
|
8
9
|
import IndicatorView from './components/theme/Views/IndicatorView';
|
|
9
10
|
import InformationPortalView from './components/theme/Views/InformationPortalView';
|
|
@@ -220,6 +221,7 @@ const applyConfig = (config) => {
|
|
|
220
221
|
...config.views.contentTypesViews,
|
|
221
222
|
'eea.climateadapt.adaptationoption': AdaptationOptionView,
|
|
222
223
|
'eea.climateadapt.casestudy': CaseStudyView,
|
|
224
|
+
'cca-event': CcaEventView,
|
|
223
225
|
'eea.climateadapt.guidancedocument': GuidanceView,
|
|
224
226
|
'eea.climateadapt.indicator': IndicatorView,
|
|
225
227
|
'eea.climateadapt.informationportal': InformationPortalView,
|
|
@@ -231,6 +233,8 @@ const applyConfig = (config) => {
|
|
|
231
233
|
'eea.climateadapt.c3sindicator': C3SIndicatorView,
|
|
232
234
|
};
|
|
233
235
|
|
|
236
|
+
config.views.layoutViewsNamesMapping.view_cca_event = 'CCA Event View';
|
|
237
|
+
|
|
234
238
|
config.settings.contextNavigationLocations = [
|
|
235
239
|
// {
|
|
236
240
|
// title: 'Regional Adaptation Support Tool',
|
|
@@ -25,31 +25,33 @@ p.has--clear--both:empty {
|
|
|
25
25
|
|
|
26
26
|
// Add icon for external links
|
|
27
27
|
#page-document {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
position: relative;
|
|
32
|
-
top: 2px;
|
|
33
|
-
margin-right: 3px;
|
|
34
|
-
color: inherit;
|
|
35
|
-
content: '\ecaf';
|
|
36
|
-
font-family: remixicon;
|
|
37
|
-
font-size: 1em;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:visited {
|
|
28
|
+
p {
|
|
29
|
+
a[rel='noopener noreferrer']:not(.ui.button):not(:empty),
|
|
30
|
+
a[target='_blank']:not(.ui.button):not(:empty) {
|
|
41
31
|
&:before {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
position: relative;
|
|
33
|
+
top: 2px;
|
|
34
|
+
margin-right: 3px;
|
|
35
|
+
color: inherit;
|
|
36
|
+
content: '\ecaf';
|
|
37
|
+
font-family: remixicon;
|
|
38
|
+
font-size: 1em;
|
|
45
39
|
}
|
|
46
|
-
}
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
&:visited {
|
|
42
|
+
&:before {
|
|
43
|
+
// fix visited link icon color
|
|
44
|
+
// doesn't work with color: inherit
|
|
45
|
+
color: @linkVisitedColor;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:active {
|
|
50
|
+
&:before {
|
|
51
|
+
// fix active link icon color
|
|
52
|
+
// doesn't work with color: inherit
|
|
53
|
+
color: @linkActiveColor;
|
|
54
|
+
}
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
}
|
|
@@ -296,6 +298,7 @@ body.subsite-root.section-mission {
|
|
|
296
298
|
div.items {
|
|
297
299
|
div.listing-item {
|
|
298
300
|
border: none;
|
|
301
|
+
margin: 0;
|
|
299
302
|
}
|
|
300
303
|
|
|
301
304
|
.listing-body {
|