@eeacms/volto-arcgis-block 0.1.58 → 0.1.60
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,29 @@ 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.60](https://github.com/eea/volto-arcgis-block/compare/0.1.59...0.1.60) - 19 September 2022
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- ESLint fix [rodriama - [`ca2e108`](https://github.com/eea/volto-arcgis-block/commit/ca2e1086b47be20dbf0858fe728de3ce6b3c91ba)]
|
|
12
|
+
- Update UseCasesMapViewer.jsx [Jose Asensio - [`75b72b9`](https://github.com/eea/volto-arcgis-block/commit/75b72b9018d9b8ec412d923f28e263bbc6cd803a)]
|
|
13
|
+
- Update UseCasesMapViewer.jsx [Jose Asensio - [`190f3a4`](https://github.com/eea/volto-arcgis-block/commit/190f3a46d7a14a647f88bfd84e40c78026e105e9)]
|
|
14
|
+
- Use Cases new country group EEA38 [Jose Asensio - [`d7bb1cc`](https://github.com/eea/volto-arcgis-block/commit/d7bb1cc8a97bc603d7d7be89a73bf29936968873)]
|
|
15
|
+
- Prettier fix [joewdavies - [`e6cb3cc`](https://github.com/eea/volto-arcgis-block/commit/e6cb3ccb53b66f01d503e6347d36ed513854a045)]
|
|
16
|
+
- Prettier fix [joewdavies - [`84f1e00`](https://github.com/eea/volto-arcgis-block/commit/84f1e00fd800d929c711aa7c123c53344bc45a32)]
|
|
17
|
+
- CLMS-1261 clear previously checked layers and expanded dropdowns when navigating from 'viewin the map viewer' [joewdavies - [`478754b`](https://github.com/eea/volto-arcgis-block/commit/478754b12a9a6c8ea005f27425639ff26592be9d)]
|
|
18
|
+
- CLMS-1240 Sublayer title fix in active on map [joewdavies - [`051a465`](https://github.com/eea/volto-arcgis-block/commit/051a465783b8049c8964a0cff02b3760dc7266bc)]
|
|
19
|
+
### [0.1.59](https://github.com/eea/volto-arcgis-block/compare/0.1.58...0.1.59) - 15 September 2022
|
|
20
|
+
|
|
21
|
+
#### :hammer_and_wrench: Others
|
|
22
|
+
|
|
23
|
+
- ESlint fix [joewdavies - [`048f62f`](https://github.com/eea/volto-arcgis-block/commit/048f62fb6f86dc62f08a6125eb42b2046a8c66fb)]
|
|
24
|
+
- ESlint fix [joewdavies - [`de6b471`](https://github.com/eea/volto-arcgis-block/commit/de6b471f57e04762c9e374becdb25bcfa78e0881)]
|
|
25
|
+
- ESlint fix [joewdavies - [`0c6564b`](https://github.com/eea/volto-arcgis-block/commit/0c6564bb13e495d2a6d70d31d203e68d9d10ff88)]
|
|
26
|
+
- CLMS-1294 CLMS-1240 CLMS-1293 correct the modal content text shown when adding to downloads. Fix handlingLevel layers in 'active on map' all sublayers are now shown and can be reordered. [joewdavies - [`0e54bc0`](https://github.com/eea/volto-arcgis-block/commit/0e54bc0f073506e6b6cb6b80af263f9801d76b18)]
|
|
27
|
+
- ESlint fix [joewdavies - [`ba69e87`](https://github.com/eea/volto-arcgis-block/commit/ba69e879e66cd7baabe9886067b8afeb53f3636f)]
|
|
28
|
+
- ESlint fix [joewdavies - [`2b62baf`](https://github.com/eea/volto-arcgis-block/commit/2b62bafee4d7baef3df8036db8b83980fec152a9)]
|
|
29
|
+
- CLMS-1312 timeslider close button was not working in the download map viewer [joewdavies - [`f67e78f`](https://github.com/eea/volto-arcgis-block/commit/f67e78f74b5cc3a8dbbf4b6b0fce274bcbe280ce)]
|
|
7
30
|
### [0.1.58](https://github.com/eea/volto-arcgis-block/compare/0.1.57...0.1.58) - 14 September 2022
|
|
8
31
|
|
|
9
32
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -239,10 +239,10 @@ export const AddCartItem = ({
|
|
|
239
239
|
<ul>
|
|
240
240
|
<li>
|
|
241
241
|
<p>
|
|
242
|
-
If you would like to download entire dataset
|
|
243
|
-
entire dataset (Note: download
|
|
244
|
-
|
|
245
|
-
default).
|
|
242
|
+
If you would like to download an entire dataset then
|
|
243
|
+
select 'Add entire dataset' (Note: the download
|
|
244
|
+
will take longer for large datasets and Europe is selected
|
|
245
|
+
as the area of interest by default).
|
|
246
246
|
</p>
|
|
247
247
|
</li>
|
|
248
248
|
<br />
|
|
@@ -250,12 +250,12 @@ export const AddCartItem = ({
|
|
|
250
250
|
<>
|
|
251
251
|
<li>
|
|
252
252
|
<p>
|
|
253
|
-
|
|
254
|
-
interest select
|
|
255
|
-
download button next to the dataset (Note:
|
|
256
|
-
range to download will be the first date of
|
|
257
|
-
dataset but if it is not
|
|
258
|
-
will be the last 10 days).
|
|
253
|
+
If you would like to download data for your area of
|
|
254
|
+
interest: first select an area of interest and then
|
|
255
|
+
click the download button next to the dataset (Note:
|
|
256
|
+
the time range to download will be the first date of
|
|
257
|
+
the dataset but if it is not included in the dataset's
|
|
258
|
+
metadata then it will be the last 10 days).
|
|
259
259
|
</p>
|
|
260
260
|
</li>
|
|
261
261
|
<br />
|
|
@@ -274,9 +274,9 @@ export const AddCartItem = ({
|
|
|
274
274
|
) : (
|
|
275
275
|
<li>
|
|
276
276
|
<p>
|
|
277
|
-
|
|
278
|
-
interest select
|
|
279
|
-
download button next to the dataset.
|
|
277
|
+
If you would like to download data for your area of
|
|
278
|
+
interest: first select an area of interest and then
|
|
279
|
+
click the download button next to the dataset.
|
|
280
280
|
</p>
|
|
281
281
|
</li>
|
|
282
282
|
)}
|
|
@@ -486,6 +486,15 @@ class MenuWidget extends React.Component {
|
|
|
486
486
|
let product = url.searchParams.get('product');
|
|
487
487
|
let dataset = url.searchParams.get('dataset');
|
|
488
488
|
if (product || dataset) {
|
|
489
|
+
// CLMS-1261 - clear any previously checked layers when navigating using 'view in the map viewer'
|
|
490
|
+
let expandedDropdowns = sessionStorage.getItem('expandedDropdowns');
|
|
491
|
+
let checkedLayers = sessionStorage.getItem('checkedLayers');
|
|
492
|
+
if (expandedDropdowns) {
|
|
493
|
+
sessionStorage.setItem('expandedDropdowns', JSON.stringify([]));
|
|
494
|
+
}
|
|
495
|
+
if (checkedLayers) {
|
|
496
|
+
sessionStorage.setItem('checkedLayers', JSON.stringify([]));
|
|
497
|
+
}
|
|
489
498
|
let event = new MouseEvent('click', {
|
|
490
499
|
view: window,
|
|
491
500
|
bubbles: true,
|
|
@@ -1020,11 +1029,7 @@ class MenuWidget extends React.Component {
|
|
|
1020
1029
|
});
|
|
1021
1030
|
}
|
|
1022
1031
|
}
|
|
1023
|
-
let style =
|
|
1024
|
-
? { display: 'none' }
|
|
1025
|
-
: this.props.download
|
|
1026
|
-
? { paddingLeft: '4rem' }
|
|
1027
|
-
: {};
|
|
1032
|
+
let style = this.props.download ? { paddingLeft: '4rem' } : {};
|
|
1028
1033
|
return (
|
|
1029
1034
|
<div
|
|
1030
1035
|
className="ccl-form-group map-menu-layer"
|
|
@@ -1076,7 +1081,8 @@ class MenuWidget extends React.Component {
|
|
|
1076
1081
|
let dataset = document
|
|
1077
1082
|
.querySelector('[datasetid="' + group + '"]')
|
|
1078
1083
|
.querySelector('input');
|
|
1079
|
-
elem.title =
|
|
1084
|
+
elem.title =
|
|
1085
|
+
dataset.title + ' - ' + this.getLayerTitle(this.layers[elem.id]);
|
|
1080
1086
|
let groupLayers = this.getGroupLayers(group);
|
|
1081
1087
|
if (groupLayers.length > 0 && groupLayers[0] in this.activeLayersJSON) {
|
|
1082
1088
|
elem.hide = true;
|
|
@@ -1158,8 +1164,10 @@ class MenuWidget extends React.Component {
|
|
|
1158
1164
|
layerChecks = document.querySelectorAll(`[parentid=${id}]`);
|
|
1159
1165
|
}
|
|
1160
1166
|
layerChecks.forEach((element) => {
|
|
1161
|
-
element
|
|
1162
|
-
|
|
1167
|
+
if (element) {
|
|
1168
|
+
element.checked = value;
|
|
1169
|
+
this.toggleLayer(element);
|
|
1170
|
+
}
|
|
1163
1171
|
});
|
|
1164
1172
|
}
|
|
1165
1173
|
|
|
@@ -1246,7 +1254,7 @@ class MenuWidget extends React.Component {
|
|
|
1246
1254
|
layer-id={elem.id}
|
|
1247
1255
|
layer-order={order}
|
|
1248
1256
|
draggable="true"
|
|
1249
|
-
{...(elem.hide && { style: { display: 'none' } })}
|
|
1257
|
+
// {...(elem.hide && { style: { display: 'none' } })}
|
|
1250
1258
|
onDrop={(e) => this.onDrop(e)}
|
|
1251
1259
|
onDragOver={(e) => this.onDragOver(e)}
|
|
1252
1260
|
onDragStart={(e) => this.onDragStart(e)}
|
|
@@ -1338,34 +1346,34 @@ class MenuWidget extends React.Component {
|
|
|
1338
1346
|
//First, we decide how to insert the element in the DOM
|
|
1339
1347
|
let init_ord = this.draggingElement.getAttribute('layer-order');
|
|
1340
1348
|
let dst_ord = dst.getAttribute('layer-order');
|
|
1341
|
-
let group = this.getGroup(
|
|
1342
|
-
|
|
1343
|
-
)
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
let groupLayers = this.getGroupLayers(group);
|
|
1349
|
+
// let group = this.getGroup(
|
|
1350
|
+
// document.getElementById(this.draggingElement.getAttribute('layer-id')),
|
|
1351
|
+
// )
|
|
1352
|
+
// ? this.getGroup(
|
|
1353
|
+
// document.getElementById(
|
|
1354
|
+
// this.draggingElement.getAttribute('layer-id'),
|
|
1355
|
+
// ),
|
|
1356
|
+
// )
|
|
1357
|
+
// : this.getGroup(document.getElementById(dst.getAttribute('layer-id')));
|
|
1358
|
+
//let groupLayers = this.getGroupLayers(group);
|
|
1351
1359
|
if (init_ord > dst_ord) {
|
|
1352
1360
|
dst.parentElement.insertBefore(this.draggingElement, dst.nextSibling);
|
|
1353
1361
|
} else {
|
|
1354
1362
|
dst.parentElement.insertBefore(this.draggingElement, dst);
|
|
1355
1363
|
}
|
|
1356
|
-
if (group && groupLayers.length > 1) {
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
}
|
|
1364
|
+
// if (group && groupLayers.length > 1) {
|
|
1365
|
+
// groupLayers.forEach((item, index) => {
|
|
1366
|
+
// if (
|
|
1367
|
+
// this.draggingElement.getAttribute('layer-id') !== item ||
|
|
1368
|
+
// dst.getAttribute('layer-id') !== item
|
|
1369
|
+
// ) {
|
|
1370
|
+
// dst.parentElement.insertBefore(
|
|
1371
|
+
// document.getElementById('active_' + item),
|
|
1372
|
+
// this.draggingElement.nextSibling,
|
|
1373
|
+
// );
|
|
1374
|
+
// }
|
|
1375
|
+
// });
|
|
1376
|
+
// }
|
|
1369
1377
|
this.layersReorder();
|
|
1370
1378
|
this.saveLayerOrder();
|
|
1371
1379
|
}
|
|
@@ -1535,10 +1543,7 @@ class MenuWidget extends React.Component {
|
|
|
1535
1543
|
.querySelector('#download_label')
|
|
1536
1544
|
.classList.remove('locked');
|
|
1537
1545
|
if (
|
|
1538
|
-
document.contains(
|
|
1539
|
-
document.querySelector('.timeslider-container'),
|
|
1540
|
-
) &&
|
|
1541
|
-
!this.props.download
|
|
1546
|
+
document.contains(document.querySelector('.timeslider-container'))
|
|
1542
1547
|
)
|
|
1543
1548
|
ReactDOM.unmountComponentAtNode(
|
|
1544
1549
|
document.querySelector('.esri-ui-bottom-right'),
|
|
@@ -1739,22 +1744,23 @@ class MenuWidget extends React.Component {
|
|
|
1739
1744
|
* @param {*} id id from elem
|
|
1740
1745
|
*/
|
|
1741
1746
|
deleteCrossEvent(elem) {
|
|
1742
|
-
let group = this.getGroup(elem);
|
|
1743
|
-
let groupLayers = this.getGroupLayers(group);
|
|
1744
|
-
if (group && groupLayers.length > 1) {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1747
|
+
// let group = this.getGroup(elem);
|
|
1748
|
+
// let groupLayers = this.getGroupLayers(group);
|
|
1749
|
+
// if (group && groupLayers.length > 1) {
|
|
1750
|
+
// // are we sure we want to delete all sublayers when one is deleted?
|
|
1751
|
+
// groupLayers.forEach((item) => {
|
|
1752
|
+
// elem = document.getElementById(item);
|
|
1753
|
+
// // elem has to be unchecked
|
|
1754
|
+
// elem.checked = false;
|
|
1755
|
+
// this.toggleLayer(elem);
|
|
1756
|
+
// delete this.activeLayersJSON[elem.id];
|
|
1757
|
+
// });
|
|
1758
|
+
// } else {
|
|
1759
|
+
// elem has to be unchecked
|
|
1760
|
+
elem.checked = false;
|
|
1761
|
+
this.toggleLayer(elem);
|
|
1762
|
+
delete this.activeLayersJSON[elem.id];
|
|
1763
|
+
// }
|
|
1758
1764
|
this.setState({});
|
|
1759
1765
|
}
|
|
1760
1766
|
|
|
@@ -1804,6 +1810,7 @@ class MenuWidget extends React.Component {
|
|
|
1804
1810
|
* Method to load previously expanded dropdowns according to sessionStorage
|
|
1805
1811
|
*/
|
|
1806
1812
|
expandDropdowns() {
|
|
1813
|
+
if (this.props.download) return;
|
|
1807
1814
|
let expandedDropdowns = JSON.parse(
|
|
1808
1815
|
sessionStorage.getItem('expandedDropdowns'),
|
|
1809
1816
|
);
|
|
@@ -370,6 +370,13 @@ class UseCasesMapViewer extends React.Component {
|
|
|
370
370
|
),
|
|
371
371
|
].length;
|
|
372
372
|
let data_eea = [
|
|
373
|
+
...new Set(
|
|
374
|
+
data.features
|
|
375
|
+
.filter((a) => a.attributes.Spatial_coverage === 'EEA38')
|
|
376
|
+
.map((item) => item.attributes.Use_case_id),
|
|
377
|
+
),
|
|
378
|
+
].length;
|
|
379
|
+
let data_eea_uk = [
|
|
373
380
|
...new Set(
|
|
374
381
|
data.features
|
|
375
382
|
.filter(
|
|
@@ -392,6 +399,7 @@ class UseCasesMapViewer extends React.Component {
|
|
|
392
399
|
(a) =>
|
|
393
400
|
a.attributes.Spatial_coverage !== 'EU' &&
|
|
394
401
|
a.attributes.Spatial_coverage !== 'EU 27+UK' &&
|
|
402
|
+
a.attributes.Spatial_coverage !== 'EEA38' &&
|
|
395
403
|
a.attributes.Spatial_coverage !== 'EEA38+UK' &&
|
|
396
404
|
a.attributes.Spatial_coverage !== 'GLOBAL',
|
|
397
405
|
)
|
|
@@ -407,6 +415,9 @@ class UseCasesMapViewer extends React.Component {
|
|
|
407
415
|
string += `<div>${data_eu_uk} Use cases with EU27+UK coverage</div>`;
|
|
408
416
|
}
|
|
409
417
|
if (data_eea > 0) {
|
|
418
|
+
string += `<div>${data_eea} Use cases with EEA38 coverage</div>`;
|
|
419
|
+
}
|
|
420
|
+
if (data_eea_uk > 0) {
|
|
410
421
|
string += `<div>${data_eea} Use cases with EEA38+UK coverage</div>`;
|
|
411
422
|
}
|
|
412
423
|
if (data_global > 0) {
|
|
@@ -104,6 +104,47 @@ const config = {
|
|
|
104
104
|
'PL',
|
|
105
105
|
'UK',
|
|
106
106
|
],
|
|
107
|
+
EEA38: [
|
|
108
|
+
'AT',
|
|
109
|
+
'BE',
|
|
110
|
+
'BG',
|
|
111
|
+
'CH',
|
|
112
|
+
'CY',
|
|
113
|
+
'CZ',
|
|
114
|
+
'DE',
|
|
115
|
+
'DK',
|
|
116
|
+
'EE',
|
|
117
|
+
'EL',
|
|
118
|
+
'ES',
|
|
119
|
+
'FI',
|
|
120
|
+
'FR',
|
|
121
|
+
'HR',
|
|
122
|
+
'HU',
|
|
123
|
+
'IE',
|
|
124
|
+
'IS',
|
|
125
|
+
'IT',
|
|
126
|
+
'LI',
|
|
127
|
+
'LT',
|
|
128
|
+
'LU',
|
|
129
|
+
'LV',
|
|
130
|
+
'MT',
|
|
131
|
+
'NL',
|
|
132
|
+
'NO',
|
|
133
|
+
'PL',
|
|
134
|
+
'PT',
|
|
135
|
+
'RO',
|
|
136
|
+
'SE',
|
|
137
|
+
'SI',
|
|
138
|
+
'SK',
|
|
139
|
+
'TR',
|
|
140
|
+
//COOPERATIVES
|
|
141
|
+
'AL',
|
|
142
|
+
'BA',
|
|
143
|
+
'XK',
|
|
144
|
+
'ME',
|
|
145
|
+
'MK',
|
|
146
|
+
'RS',
|
|
147
|
+
],
|
|
107
148
|
'EEA38+UK': [
|
|
108
149
|
'AT',
|
|
109
150
|
'BE',
|