@eeacms/volto-cca-policy 0.2.71 → 0.2.72

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,20 @@ 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.72](https://github.com/eea/volto-cca-policy/compare/0.2.71...0.2.72) - 14 October 2024
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: file formatting, cleanup [kreafox - [`bd0ca50`](https://github.com/eea/volto-cca-policy/commit/bd0ca5096912d76c1d6cc7cc55adcaccf501d88a)]
12
+
13
+ #### :house: Internal changes
14
+
15
+ - style: Automated code fix [eea-jenkins - [`78293a1`](https://github.com/eea/volto-cca-policy/commit/78293a1562c33890e957ce3e1f5292b80beb68b8)]
16
+ - style: fix filter & legend styling for country profiles map; cleanup CSS - refs #277718 [kreafox - [`9847b6b`](https://github.com/eea/volto-cca-policy/commit/9847b6b48e0e898c328954af80dac4e708a8987d)]
17
+
18
+ #### :hammer_and_wrench: Others
19
+
20
+ - update README [kreafox - [`be8bb46`](https://github.com/eea/volto-cca-policy/commit/be8bb4608560436f5ea150733fe684435d9f2f4e)]
7
21
  ### [0.2.71](https://github.com/eea/volto-cca-policy/compare/0.2.70...0.2.71) - 9 October 2024
8
22
 
9
23
  #### :hammer_and_wrench: Others
@@ -1596,13 +1610,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1596
1610
  - Refs #260715 rast-block wip [Tripon Eugen - [`f19d54e`](https://github.com/eea/volto-cca-policy/commit/f19d54e0b9a6a86bf344eb85b6a1cda7f3de91bf)]
1597
1611
  - Refs #260715 rast-block wip [Tripon Eugen - [`2828537`](https://github.com/eea/volto-cca-policy/commit/2828537b6c084cd1a82162d552fb4ef025b71f9f)]
1598
1612
  - Refs #260715 rast-block updates [Tripon Eugen - [`1e803e5`](https://github.com/eea/volto-cca-policy/commit/1e803e5bd3d3fb7558f261c76c68866be7beb8b5)]
1599
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`0a15e1b`](https://github.com/eea/volto-cca-policy/commit/0a15e1b2ad081233685e80d5b3c60a8663f6b896)]
1600
- - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`9554e44`](https://github.com/eea/volto-cca-policy/commit/9554e44c92a621a52b2adb5a4830fb084ee5734b)]
1601
1613
  ### [0.1.49](https://github.com/eea/volto-cca-policy/compare/0.1.48...0.1.49) - 15 November 2023
1602
1614
 
1603
1615
  #### :house: Internal changes
1604
1616
 
1605
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7b820a6`](https://github.com/eea/volto-cca-policy/commit/7b820a6369c2ddd5203b1a4abe352cb4bb43db7a)]
1606
1617
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`f0a8061`](https://github.com/eea/volto-cca-policy/commit/f0a8061c275c236deb00087c23fac9860a073106)]
1607
1618
 
1608
1619
  #### :hammer_and_wrench: Others
@@ -1619,9 +1630,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1619
1630
  - Refs #259267 - jenkins test [Tripon Eugen - [`cacd31e`](https://github.com/eea/volto-cca-policy/commit/cacd31e7b1afe0983674ed5c7632d2e1d7fa752e)]
1620
1631
  - Refs #259267 - jenkins [Tripon Eugen - [`5b3affe`](https://github.com/eea/volto-cca-policy/commit/5b3affee8401239de10097884c1b7f2349d15ec0)]
1621
1632
  - Refs #259267 - add When, lead image and title to files [Tripon Eugen - [`2cedb23`](https://github.com/eea/volto-cca-policy/commit/2cedb237f898af9057e13fba94b615ef71077204)]
1622
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`4d607a5`](https://github.com/eea/volto-cca-policy/commit/4d607a576e9d0a5c34e48c41b409e7df616ee3d6)]
1623
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`b7f74d5`](https://github.com/eea/volto-cca-policy/commit/b7f74d53513a6edbfbca5cb6d19687929bb1e5db)]
1624
- - test: [JENKINS] Improve cypress time [valentinab25 - [`db65617`](https://github.com/eea/volto-cca-policy/commit/db656173391f65157098d95d388c25f6429753d8)]
1625
1633
  - Refs #259267 - cca event blocks attachments and check not mandatoty fields [Tripon Eugen - [`3138e5a`](https://github.com/eea/volto-cca-policy/commit/3138e5afb5bfbdbed14e27ed457b16867b7fa414)]
1626
1634
  - 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)]
1627
1635
  - Refs #161485 - Fix ECDE name conflict. [GhitaB - [`8bfd99f`](https://github.com/eea/volto-cca-policy/commit/8bfd99ff68bb82a04d1c0ed625fa514fcf46289e)]
@@ -1838,7 +1846,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1838
1846
 
1839
1847
  #### :house: Internal changes
1840
1848
 
1841
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`ad1ced0`](https://github.com/eea/volto-cca-policy/commit/ad1ced0971ba116c13a3b5fcc039172cc915c919)]
1842
1849
 
1843
1850
  #### :hammer_and_wrench: Others
1844
1851
 
@@ -2319,7 +2326,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2319
2326
  #### :hammer_and_wrench: Others
2320
2327
 
2321
2328
  - Refs #158294 - Update supported languages list. [GhitaB - [`0a4f91f`](https://github.com/eea/volto-cca-policy/commit/0a4f91f39b7edc367bd4c127d6a8f273c7788361)]
2322
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`8f1f9ce`](https://github.com/eea/volto-cca-policy/commit/8f1f9ce6c22805670cc0800d3c779b6d619d0f31)]
2323
2329
  ### [0.1.1](https://github.com/eea/volto-cca-policy/compare/0.1.0...0.1.1) - 13 December 2022
2324
2330
 
2325
2331
  #### :hammer_and_wrench: Others
package/README.md CHANGED
@@ -14,6 +14,8 @@
14
14
  [![Bugs](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-cca-policy-develop&metric=bugs)](https://sonarqube.eea.europa.eu/dashboard?id=volto-cca-policy-develop)
15
15
  [![Duplicated Lines (%)](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-cca-policy-develop&metric=duplicated_lines_density)](https://sonarqube.eea.europa.eu/dashboard?id=volto-cca-policy-develop)
16
16
 
17
+ Climate-ADAPT Frontend Policy
18
+
17
19
  [Volto](https://github.com/plone/volto) add-on
18
20
 
19
21
  ## Release
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-cca-policy",
3
- "version": "0.2.71",
3
+ "version": "0.2.72",
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,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import {
4
3
  euCountryNames,
5
4
  setTooltipVisibility,
@@ -9,14 +8,13 @@ import { openlayers as ol } from '@eeacms/volto-openlayers-map';
9
8
  import { useMapContext } from '@eeacms/volto-openlayers-map/api';
10
9
 
11
10
  export const Interactions = ({
12
- tooltipRef,
13
- // onFeatureClick,
14
- countries_metadata,
15
11
  baseUrl,
12
+ highlight,
13
+ tooltipRef,
16
14
  thematicMapMode,
17
15
  euCountryFeatures,
18
- highlight,
19
16
  setStateHighlight,
17
+ countries_metadata,
20
18
  }) => {
21
19
  const map = useMapContext().map;
22
20
 
@@ -44,19 +42,18 @@ export const Interactions = ({
44
42
  feature &&
45
43
  euCountryNames.includes(feature.get('na'))
46
44
  ) {
47
- // if (countries_metadata.length>0) {
48
45
  let countryName = feature.get('na');
49
46
  let noDataReportedMsg = `
50
- No data reported through the reporting mechanism of the Governance Regulation.
51
- Last information is available
52
- <a href="${baseUrl}/${countryName.toLowerCase()}">here</a>`;
47
+ No data reported through the reporting mechanism of the Governance Regulation.
48
+ Last information is available
49
+ <a href="${baseUrl}/${countryName.toLowerCase()}">here</a>`;
53
50
 
54
51
  if (countryName === 'Türkiye') {
55
52
  countryName = 'Turkiye';
56
53
  noDataReportedMsg = `
57
- Data reported in 2021 through the reporting mechanism of the Governance Regulation.
58
- Information is available
59
- <a href="${baseUrl}/${countryName.toLowerCase()}">here</a>`;
54
+ Data reported in 2021 through the reporting mechanism of the Governance Regulation.
55
+ Information is available
56
+ <a href="${baseUrl}/${countryName.toLowerCase()}">here</a>`;
60
57
  }
61
58
 
62
59
  if (!Object.hasOwn(countries_metadata[0], countryName)) {
@@ -78,29 +75,23 @@ Information is available
78
75
  tooltipContent =
79
76
  metadata[0]?.ccivportal_info ||
80
77
  '<span>No portal or platform reported</span>';
81
- // tooltipContent.split('<p style="font-weight:bold;"></p>').join('');
82
78
  }
83
- // overlaySource.addFeature(feature);
79
+
84
80
  map.getTargetElement().style.cursor = 'pointer';
85
81
  const node = tooltipRef.current;
86
82
  const flag = feature.get('flag').src;
87
83
  const cn = countryName.toLowerCase();
88
84
  let tooltipContentDiv = `
89
- <div class="country-tooltip">
90
- <div id="country-name">
91
- <a href="/en/countries-regions/countries/${cn}"><h3>${countryName}</h3></a>
92
- <img class="tooltip-country-flag" src="${flag}" height="33" width="54">
93
- </div>
94
- <div class="tooltip-content">${tooltipContent}</div>
95
- </div>
96
- `;
85
+ <div class="country-tooltip">
86
+ <div id="country-name">
87
+ <a href="/en/countries-regions/countries/${cn}"><h3>${countryName}</h3></a>
88
+ <img class="tooltip-country-flag" src="${flag}" height="33" width="54">
89
+ </div>
90
+ <div class="tooltip-content">${tooltipContent}</div>
91
+ </div>`;
97
92
 
98
93
  setTooltipVisibility(node, tooltipContentDiv, domEvt, true);
99
94
  }
100
-
101
- // if (feature) {
102
- // onFeatureClick(feature);
103
- // }
104
95
  });
105
96
 
106
97
  map.on('pointermove', function (evt) {
@@ -118,6 +109,6 @@ Information is available
118
109
  setStateHighlight(highlight.current);
119
110
  });
120
111
  });
121
- // }, [map, tooltipRef, onFeatureClick]);
112
+
122
113
  return null;
123
114
  };
@@ -1,25 +1,22 @@
1
1
  import React from 'react';
2
2
  import { compose } from 'redux';
3
- import { clientOnly } from '@eeacms/volto-cca-policy/helpers';
4
-
5
- import { Map, Layer, Layers, Controls } from '@eeacms/volto-openlayers-map/api';
6
- import { openlayers as ol } from '@eeacms/volto-openlayers-map';
3
+ import { Grid } from 'semantic-ui-react';
7
4
  import {
8
- euCountryNames as euCountryNamesRaw,
9
- tooltipStyle,
10
5
  getImageUrl,
6
+ tooltipStyle,
11
7
  adjustEuCountryNames,
8
+ euCountryNames as euCountryNamesRaw,
12
9
  } from '@eeacms/volto-cca-policy/helpers/country_map/countryMap';
13
10
  import { withGeoJsonData } from '@eeacms/volto-cca-policy/helpers/country_map/hocs';
14
-
15
- import withResponsiveContainer from '../withResponsiveContainer';
16
- import withVisibilitySensor from '../withVisibilitySensor';
11
+ import { clientOnly } from '@eeacms/volto-cca-policy/helpers';
12
+ import { openlayers as ol } from '@eeacms/volto-openlayers-map';
13
+ import { Map, Layer, Layers, Controls } from '@eeacms/volto-openlayers-map/api';
17
14
  import { makeStyles } from './mapstyle';
18
15
  import { Interactions } from './Interactions';
19
-
20
- import Filter from './Filter';
21
- import { Grid } from 'semantic-ui-react';
22
16
  import { useCountriesMetadata } from './hooks';
17
+ import Filter from './Filter';
18
+ import withResponsiveContainer from '../withResponsiveContainer';
19
+ import withVisibilitySensor from '../withVisibilitySensor';
23
20
  import { addAppURL } from '@plone/volto/helpers';
24
21
 
25
22
  import './styles.less';
@@ -1,4 +1,5 @@
1
1
  @height: 600px;
2
+ @fpHeight: 450px;
2
3
 
3
4
  .countryMapProfile {
4
5
  height: @height;
@@ -55,10 +56,6 @@
55
56
  stroke-width: 0.6;
56
57
  }
57
58
 
58
- .country-outline path {
59
- fill: #e9e9e9;
60
- }
61
-
62
59
  .country-outline path {
63
60
  fill: #f5f5f5;
64
61
  stroke: #d1d1d1;
@@ -69,24 +66,28 @@
69
66
  fill: #0170b7;
70
67
  }
71
68
 
69
+ label {
70
+ margin-bottom: 0.5em;
71
+ }
72
+
72
73
  .legend {
73
- .legend-text {
74
- width: 16em;
75
- }
74
+ margin-top: 1em;
76
75
 
77
76
  .legend-el {
78
77
  display: flex;
79
78
  flex-direction: row;
80
- padding: 0.8em 0;
79
+ padding: 0.6em 0;
81
80
  }
82
81
 
83
82
  .legend-box {
84
- width: 40px;
85
- height: 19px;
86
- margin-top: 3px;
83
+ position: relative;
84
+ top: 4px;
85
+ height: 17px;
86
+ flex: 0 0 17px;
87
87
  margin-right: 0.5em;
88
88
  }
89
89
 
90
+ // Legend color mapping
90
91
  .content-available {
91
92
  background-color: #0170b7;
92
93
  }
@@ -103,12 +104,9 @@
103
104
  background-color: #78d9fc;
104
105
  }
105
106
 
106
- .country-none {
107
- border: 1px solid #ddd;
108
- background-color: #fbfae6;
109
- }
110
-
107
+ .country-none,
111
108
  .country-outside {
109
+ border: 1px solid #ddd;
112
110
  background-color: #fbfae6;
113
111
  }
114
112
  }
@@ -154,10 +152,7 @@
154
152
  background-color: #fff3ac;
155
153
  }
156
154
 
157
- .country-none {
158
- background-color: #f5f5f5;
159
- }
160
-
155
+ .country-none,
161
156
  .country-outside {
162
157
  border: 1px solid #ddd;
163
158
  background-color: #fbfae6;
@@ -168,63 +163,55 @@
168
163
  }
169
164
  }
170
165
 
171
- .country-blue path {
166
+ // Country color mapping and cursor style
167
+ .country-blue path,
168
+ .country-notreported path,
169
+ .country-noportal path,
170
+ .country-nasnapsap path,
171
+ .country-nassap path,
172
+ .country-napsap path,
173
+ .country-nasnap path,
174
+ .country-nas path,
175
+ .country-nap path,
176
+ .country-none path,
177
+ .country-nodata path {
172
178
  cursor: pointer;
173
- // fill: @secondary-blue;
174
179
  }
175
180
 
176
181
  .country-notreported path {
177
- cursor: pointer;
178
182
  fill: #fed7da;
179
183
  }
180
184
 
181
- .country-noportal path {
182
- cursor: pointer;
185
+ .country-noportal path,
186
+ .country-none path {
183
187
  fill: #e0e0e0;
184
188
  }
185
189
 
186
190
  .country-nasnapsap path {
187
- cursor: pointer;
188
191
  fill: url(#nasnapsap);
189
192
  }
190
193
 
191
194
  .country-nassap path {
192
- cursor: pointer;
193
195
  fill: url(#nassap);
194
196
  }
195
197
 
196
198
  .country-napsap path {
197
- cursor: pointer;
198
199
  fill: url(#napsap);
199
200
  }
200
201
 
201
- .country-nasnapsap path {
202
- cursor: pointer;
203
- fill: url(#nasnapsap);
204
- }
205
-
206
202
  .country-nasnap path {
207
- cursor: pointer;
208
203
  fill: #007db6;
209
204
  }
210
205
 
211
206
  .country-nas path {
212
- cursor: pointer;
213
207
  fill: #78d9fc;
214
208
  }
215
209
 
216
210
  .country-nap path {
217
- cursor: pointer;
218
211
  fill: #11cbff;
219
212
  }
220
213
 
221
- .country-none path {
222
- cursor: pointer;
223
- fill: #e0e0e0;
224
- }
225
-
226
214
  .country-nodata path {
227
- cursor: pointer;
228
215
  fill: #f5f5f5;
229
216
  }
230
217
 
@@ -232,7 +219,9 @@
232
219
  fill: #8a9c3a;
233
220
  }
234
221
 
235
- #map-tooltip {
222
+ // Tooltip for countries
223
+ #map-tooltip,
224
+ .country-tooltip {
236
225
  position: absolute;
237
226
  width: 400px;
238
227
  padding: 1em;
@@ -241,12 +230,6 @@
241
230
  }
242
231
 
243
232
  .country-tooltip {
244
- position: absolute;
245
- width: 400px;
246
- padding: 1em;
247
- border: 1px solid #c7c7c7;
248
- background-color: #f7f7f7;
249
-
250
233
  span,
251
234
  li {
252
235
  color: #3a3a3a;
@@ -294,3 +277,37 @@
294
277
  }
295
278
  }
296
279
  }
280
+
281
+ .cca-main-homepage .tabs-block {
282
+ .countryMapProfile {
283
+ min-height: @fpHeight;
284
+
285
+ .ol-map-wrapper,
286
+ .ol-map {
287
+ height: @fpHeight;
288
+ }
289
+
290
+ #country-map-filter {
291
+ padding-right: 0;
292
+ padding-left: 0;
293
+ }
294
+
295
+ .legend-box {
296
+ top: 2px;
297
+ }
298
+
299
+ label,
300
+ .legend .legend-text {
301
+ font-size: 14px !important;
302
+ line-height: 17px;
303
+ }
304
+
305
+ .legend {
306
+ margin-top: 0.2em;
307
+
308
+ .legend-el {
309
+ padding: 1em 0 0 0;
310
+ }
311
+ }
312
+ }
313
+ }