@eeacms/volto-cca-policy 0.3.17 → 0.3.19

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,34 @@ 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.3.19](https://github.com/eea/volto-cca-policy/compare/0.3.18...0.3.19) - 21 March 2025
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: stylelint [kreafox - [`1337dee`](https://github.com/eea/volto-cca-policy/commit/1337dee1acd7f239c605c89536ddd4915c89409b)]
12
+ - fix: stylelint [kreafox - [`bae43eb`](https://github.com/eea/volto-cca-policy/commit/bae43ebbba20085f04a37741962ce93e6a16b006)]
13
+ - fix: stylelint [kreafox - [`118510b`](https://github.com/eea/volto-cca-policy/commit/118510be22b732779c4090143e0ffb27c7e6d3ed)]
14
+ - fix: stylelint [kreafox - [`22d0850`](https://github.com/eea/volto-cca-policy/commit/22d08500f566acceaf8f1cf80f4f720f988cf085)]
15
+ - fix: stylelint [kreafox - [`54efc0b`](https://github.com/eea/volto-cca-policy/commit/54efc0b7048d81071ae1f8fff85faad9b7aa646d)]
16
+ - fix: ast navigation for AdaptationSupportTool [laszlocseh - [`94a58dc`](https://github.com/eea/volto-cca-policy/commit/94a58dc30c7b5339a814c714c1e982bea8e08727)]
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - Tweaks to functionality of case study explorer [Tiberiu Ichim - [`e7cad8a`](https://github.com/eea/volto-cca-policy/commit/e7cad8aa932373b255c875f14f59a18ef3aa51c0)]
21
+ ### [0.3.18](https://github.com/eea/volto-cca-policy/compare/0.3.17...0.3.18) - 21 March 2025
22
+
23
+ #### :rocket: New Features
24
+
25
+ - feat: improve statistic section, add assessment section (WIP) - refs #285361 [kreafox - [`3a1ca18`](https://github.com/eea/volto-cca-policy/commit/3a1ca18aad31813e55c298c4160bd5092eb8303b)]
26
+
27
+ #### :nail_care: Enhancements
28
+
29
+ - change: improve mission signatories profile view - refs #285361 [kreafox - [`e3a2de9`](https://github.com/eea/volto-cca-policy/commit/e3a2de94b3bb329012380b33695f1f976cd6611e)]
30
+
31
+ #### :house: Internal changes
32
+
33
+ - style: Automated code fix [eea-jenkins - [`7bfbc5c`](https://github.com/eea/volto-cca-policy/commit/7bfbc5cc9ab0489e5dbb9dd35eca77a1ee83d089)]
34
+
7
35
  ### [0.3.17](https://github.com/eea/volto-cca-policy/compare/0.3.16...0.3.17) - 19 March 2025
8
36
 
9
37
  #### :rocket: New Features
@@ -2019,10 +2047,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2019
2047
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
2020
2048
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
2021
2049
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
2050
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
2051
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
2022
2052
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
2023
2053
 
2024
2054
  #### :house: Internal changes
2025
2055
 
2056
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
2026
2057
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
2027
2058
 
2028
2059
  #### :hammer_and_wrench: Others
@@ -2039,6 +2070,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2039
2070
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
2040
2071
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
2041
2072
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
2073
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
2074
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
2075
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
2042
2076
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
2043
2077
  - 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)]
2044
2078
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -2255,6 +2289,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2255
2289
 
2256
2290
  #### :house: Internal changes
2257
2291
 
2292
+ - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
2258
2293
 
2259
2294
  #### :hammer_and_wrench: Others
2260
2295
 
@@ -2735,6 +2770,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2735
2770
  #### :hammer_and_wrench: Others
2736
2771
 
2737
2772
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
2773
+ - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
2738
2774
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
2739
2775
 
2740
2776
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.3.17",
3
+ "version": "0.3.19",
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",
@@ -1,9 +1,19 @@
1
1
  import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl';
3
+ import { Icon } from 'semantic-ui-react';
3
4
 
4
- export default function FeatureDisplay({ feature }) {
5
+ export default function FeatureDisplay({ feature, onClose }) {
5
6
  return feature ? (
6
7
  <div id="csepopup">
8
+ <div
9
+ className="close"
10
+ role="button"
11
+ onClick={onClose}
12
+ tabIndex={-1}
13
+ onKeyDown={onClose}
14
+ >
15
+ <Icon className="ri-close-circle-line" />
16
+ </div>
7
17
  <p>
8
18
  <strong>
9
19
  <a className="dbitem" href={feature.url} target="_blank">
@@ -121,15 +121,6 @@ export default function FeatureInteraction({
121
121
 
122
122
  function handleClick(evt) {
123
123
  if (evt.originalEvent.target.tagName === 'A') return;
124
- if (selectedFeature) {
125
- onFeatureSelect(null);
126
-
127
- const view = map.getView();
128
- view.animate({
129
- ...mapCenter,
130
- duration: 1000,
131
- });
132
- }
133
124
  }
134
125
 
135
126
  function handlePointerMove(e) {
@@ -158,6 +149,20 @@ export default function FeatureInteraction({
158
149
  clusterCirclesLayer,
159
150
  ]);
160
151
 
152
+ function onClosePopup(evt) {
153
+ evt.preventDefault();
154
+
155
+ if (selectedFeature) {
156
+ onFeatureSelect(null);
157
+
158
+ const view = map.getView();
159
+ view.animate({
160
+ ...mapCenter,
161
+ duration: 2000,
162
+ });
163
+ }
164
+ }
165
+
161
166
  return isClient ? (
162
167
  <div
163
168
  id="popup-overlay"
@@ -169,7 +174,9 @@ export default function FeatureInteraction({
169
174
  visibility: selectedFeature ? 'visible' : 'hidden',
170
175
  }}
171
176
  >
172
- {selectedFeature ? <FeatureDisplay feature={selectedFeature} /> : null}
177
+ {selectedFeature ? (
178
+ <FeatureDisplay feature={selectedFeature} onClose={onClosePopup} />
179
+ ) : null}
173
180
  </div>
174
181
  ) : null;
175
182
  }
@@ -6,6 +6,15 @@
6
6
  border-bottom: 6px solid #005c96;
7
7
  background-color: white;
8
8
 
9
+ .close {
10
+ position: relative;
11
+ top: -8px;
12
+ width: 20px;
13
+ height: 20px;
14
+ cursor: pointer;
15
+ float: right;
16
+ }
17
+
9
18
  a.dbitem {
10
19
  font-size: 14px;
11
20
  text-decoration: none;
@@ -10,7 +10,7 @@ function getStyle(size, haveAdaptecca) {
10
10
  size === 1
11
11
  ? new ol.style.Style({
12
12
  image: new ol.style.Circle({
13
- radius: 5,
13
+ radius: 7,
14
14
  stroke: new ol.style.Stroke({
15
15
  color: '#fff',
16
16
  }),
@@ -1,19 +1,22 @@
1
1
  import React from 'react';
2
2
 
3
+ import {
4
+ Statistic,
5
+ StatisticValue,
6
+ StatisticLabel,
7
+ StatisticGroup,
8
+ } from 'semantic-ui-react';
9
+
3
10
  const StatisticsSection = ({ statistics }) => {
4
11
  return (
5
- <div className="ui small two statistics center">
12
+ <StatisticGroup widths="two" size="small">
6
13
  {statistics.map((stat, index) => (
7
- <div key={index} className="ui statistic">
8
- <div className="value slate text-center secondary">
9
- <p>{stat.value}</p>
10
- </div>
11
- <div className="label slate text-center primary">
12
- <p>{stat.label}</p>
13
- </div>
14
- </div>
14
+ <Statistic key={index}>
15
+ <StatisticValue>{stat.value}</StatisticValue>
16
+ <StatisticLabel>{stat.label}</StatisticLabel>
17
+ </Statistic>
15
18
  ))}
16
- </div>
19
+ </StatisticGroup>
17
20
  );
18
21
  };
19
22
 
@@ -1,8 +1,22 @@
1
1
  import React from 'react';
2
- import { Tab } from 'semantic-ui-react';
2
+ import {
3
+ Tab,
4
+ Image,
5
+ Button,
6
+ Segment,
7
+ Grid,
8
+ GridColumn,
9
+ Item,
10
+ ItemGroup,
11
+ ItemContent,
12
+ } from 'semantic-ui-react';
3
13
  import { Callout } from '@eeacms/volto-eea-design-system/ui';
14
+ import AccordionList from './../AccordionList';
15
+
16
+ import image from '@eeacms/volto-cca-policy/../theme//assets/images/image-narrow.svg';
4
17
 
5
18
  const AssessmentTab = () => {
19
+ const [activeIndex, setActiveIndex] = React.useState(0);
6
20
  return (
7
21
  <Tab.Pane>
8
22
  <h2>Assessment</h2>
@@ -12,17 +26,158 @@ const AssessmentTab = () => {
12
26
  eiusmod tempor incididunt ut labore et dolore magna aliqua.
13
27
  </p>
14
28
  </Callout>
29
+
30
+ <div className="profile-content-box">
31
+ <h3>Climate Risk Assessment</h3>
32
+ <div className="profile-content-box-info">
33
+ <ItemGroup unstackable className="row">
34
+ <Item>
35
+ <Image size="miny" src={image} />
36
+ <ItemContent
37
+ verticalAlign="middle"
38
+ style={{ paddingLeft: '5px' }}
39
+ >
40
+ Lorem ipsum dolor sit amet
41
+ </ItemContent>
42
+ </Item>
43
+ </ItemGroup>
44
+
45
+ <div className="date">
46
+ <p>Year of publication: 2022</p>
47
+ </div>
48
+ </div>
49
+
50
+ <h4>The CRA conducted considers the following factors</h4>
51
+
52
+ <div className="items-wrapper">
53
+ <Grid className="column-grid">
54
+ <GridColumn width={6} className="column-blocks-wrapper">
55
+ <ItemGroup unstackable className="row">
56
+ <Item>
57
+ <Image size="small" src={image} />
58
+ <ItemContent verticalAlign="middle">
59
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
60
+ </ItemContent>
61
+ </Item>
62
+
63
+ <Item>
64
+ <Image size="small" src={image} />
65
+ <ItemContent verticalAlign="middle">
66
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
67
+ </ItemContent>
68
+ </Item>
69
+
70
+ <Item>
71
+ <Image size="small" src={image} />
72
+ <ItemContent verticalAlign="middle">
73
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
74
+ </ItemContent>
75
+ </Item>
76
+ </ItemGroup>
77
+ </GridColumn>
78
+
79
+ <GridColumn width={6}>
80
+ <ItemGroup unstackable className="row">
81
+ <Item>
82
+ <Image size="small" src={image} />
83
+ <ItemContent verticalAlign="middle">
84
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
85
+ </ItemContent>
86
+ </Item>
87
+
88
+ <Item>
89
+ <Image size="small" src={image} />
90
+ <ItemContent verticalAlign="middle">
91
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
92
+ </ItemContent>
93
+ </Item>
94
+
95
+ <Item>
96
+ <Image size="small" src={image} />
97
+ <ItemContent verticalAlign="middle">
98
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
99
+ </ItemContent>
100
+ </Item>
101
+ </ItemGroup>
102
+ </GridColumn>
103
+ </Grid>
104
+ </div>
105
+
106
+ <h4>Further details</h4>
107
+ <Segment>
108
+ Nam tempor finibus lorem, nec varius arcu convallis sed. Nunc id orci
109
+ a neque vehicula malesuada. Donec vehicula libero vel leo convallis,
110
+ nec tincidunt felis tincidunt. Maecenas euismod tristique leo, vel
111
+ malesuada ligula malesuada sed. Donec eget libero id leo congue
112
+ venenatis.
113
+ </Segment>
114
+ <Button primary inverted>
115
+ Download
116
+ </Button>
117
+ </div>
118
+
119
+ <h3>Climate related hazards & sectors most exposed</h3>
15
120
  <p>
16
- Nam tempor finibus lorem, nec varius arcu convallis sed. Nunc id orci a
17
- neque vehicula malesuada. Donec vehicula libero vel leo convallis, nec
18
- tincidunt felis tincidunt. Maecenas euismod tristique leo, vel malesuada
19
- ligula malesuada sed. Donec eget libero id leo congue venenatis. Ut enim
20
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
21
- aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
22
- in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
23
- Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
24
- officia deserunt mollit anim id est laborum.
121
+ Donec eget libero id leo congue venenatis. Ut enim ad minim veniam, quis
122
+ nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
123
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit
124
+ esse cillum dolore eu fugiat nulla pariatur.
25
125
  </p>
126
+
127
+ <br />
128
+
129
+ <Tab
130
+ menu={{
131
+ fluid: true,
132
+ className: 'secondary',
133
+ vertical: true,
134
+ pointing: true,
135
+ }}
136
+ grid={{ paneWidth: 9, tabWidth: 3, stackable: true }}
137
+ activeIndex={activeIndex}
138
+ onTabChange={(e, { activeIndex }) => setActiveIndex(activeIndex)}
139
+ panes={[
140
+ {
141
+ menuItem: 'Water related',
142
+ render: () => (
143
+ <AccordionList
144
+ accordions={[
145
+ {
146
+ title: 'Vestibulum ante ipsum primis',
147
+ content: 'No additional details provided.',
148
+ },
149
+ {
150
+ title: 'Etiam accumsan urna a mauris',
151
+ content: 'No additional details provided.',
152
+ },
153
+ ]}
154
+ />
155
+ ),
156
+ },
157
+ {
158
+ menuItem: 'Heat related',
159
+ render: () => (
160
+ <div>
161
+ Nam tempor finibus lorem, nec varius arcu convallis sed. Nunc id
162
+ orci a neque vehicula malesuada. Donec vehicula libero vel leo
163
+ convallis, nec tincidunt felis tincidunt. Maecenas euismod
164
+ tristique leo, vel malesuada ligula malesuada sed.
165
+ </div>
166
+ ),
167
+ },
168
+ {
169
+ menuItem: 'Other hazards',
170
+ render: () => (
171
+ <div>
172
+ Nam tempor finibus lorem, nec varius arcu convallis sed. Nunc id
173
+ orci a neque vehicula malesuada. Donec vehicula libero vel leo
174
+ convallis, nec tincidunt felis tincidunt. Maecenas euismod
175
+ tristique leo, vel malesuada ligula malesuada sed.
176
+ </div>
177
+ ),
178
+ },
179
+ ]}
180
+ />
26
181
  </Tab.Pane>
27
182
  );
28
183
  };
@@ -12,12 +12,26 @@ const IntroductionTab = () => {
12
12
  tristique senectus et netus et malesuada fames ac turpis egestas.
13
13
  </p>
14
14
  </Callout>
15
+ <h3>The Mission on Adaptation</h3>
15
16
  <p>
16
17
  Nulla facilisi. Donec fringilla urna id ligula ullamcorper, vel
17
18
  tristique lorem posuere. Donec et orci mauris. Nullam tempor velit id mi
18
19
  luctus, a scelerisque libero accumsan. In hac habitasse platea dictumst.
19
20
  Cras ac nunc nec massa tristique fringilla.
20
21
  </p>
22
+ <h3>Data source</h3>
23
+ <p>
24
+ Donec eget libero id leo congue venenatis. Ut enim ad minim veniam, quis
25
+ nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
26
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit
27
+ esse cillum dolore eu fugiat nulla pariatur.
28
+ </p>
29
+ <p>
30
+ Donec eget libero id leo congue venenatis. Ut enim ad minim veniam, quis
31
+ nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
32
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit
33
+ esse cillum dolore eu fugiat nulla pariatur.
34
+ </p>
21
35
  </Tab.Pane>
22
36
  );
23
37
  };
@@ -1,5 +1,22 @@
1
1
  .signatories-profile {
2
- .ui.accordion {
2
+ .profile-content-box {
3
+ padding: 1.5em;
3
4
  margin: 2em 0;
5
+ background-color: #f9f9f9;
6
+
7
+ .items-wrapper {
8
+ margin: 2em 0;
9
+ }
10
+
11
+ .profile-content-box-info {
12
+ display: flex;
13
+ justify-content: space-between;
14
+ font-size: 14px;
15
+
16
+ .date {
17
+ position: relative;
18
+ top: 5px;
19
+ }
20
+ }
4
21
  }
5
22
  }
@@ -29,7 +29,8 @@ const ASTNavigation = (props) => {
29
29
  rootPath,
30
30
  {
31
31
  'path.depth': 1,
32
- portal_type: ['collective.cover.content'],
32
+ portal_type: ['Folder'],
33
+ object_provides: 'eea.climateadapt.interfaces.ICover',
33
34
  review_state: 'published',
34
35
  b_size: 100,
35
36
  },
@@ -0,0 +1,5 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10 13L11.9333 11V25L10 23H26L24.0667 25V11L26 13H10ZM26 11V18V21.5V23.5V25H10V11H26Z" fill="#007B6C"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 31H29V29H7V31Z" fill="#007B6C"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7 7H29V5H7V7Z" fill="#007B6C"/>
5
+ </svg>