@eeacms/volto-cca-policy 0.2.70 → 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 +19 -0
- package/README.md +2 -0
- package/package.json +2 -2
- package/src/components/manage/Blocks/CountryMapProfile/Interactions.jsx +18 -27
- package/src/components/manage/Blocks/CountryMapProfile/OLView.jsx +9 -12
- package/src/components/manage/Blocks/CountryMapProfile/styles.less +66 -49
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ 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)]
|
|
21
|
+
### [0.2.71](https://github.com/eea/volto-cca-policy/compare/0.2.70...0.2.71) - 9 October 2024
|
|
22
|
+
|
|
23
|
+
#### :hammer_and_wrench: Others
|
|
24
|
+
|
|
25
|
+
- core: update volto-datablocks version - refs #277718 [kreafox - [`a1dc7c7`](https://github.com/eea/volto-cca-policy/commit/a1dc7c768fe400406854cbc496545034748bad37)]
|
|
7
26
|
### [0.2.70](https://github.com/eea/volto-cca-policy/compare/0.2.69...0.2.70) - 7 October 2024
|
|
8
27
|
|
|
9
28
|
#### :hammer_and_wrench: Others
|
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-cca-policy-develop)
|
|
15
15
|
[](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.
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@eeacms/volto-block-style": "github:eea/volto-block-style#6.x.x",
|
|
31
|
-
"@eeacms/volto-datablocks": "^7.2.
|
|
31
|
+
"@eeacms/volto-datablocks": "^7.2.5",
|
|
32
32
|
"@eeacms/volto-eea-design-system": "*",
|
|
33
33
|
"@eeacms/volto-eea-website-theme": "^1.33.2",
|
|
34
34
|
"@eeacms/volto-embed": "^9.1.1",
|
|
@@ -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
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
|
16
|
-
import
|
|
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
|
-
|
|
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.
|
|
79
|
+
padding: 0.6em 0;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
.legend-box {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
+
}
|