@eeacms/volto-arcgis-block 0.1.97 → 0.1.99
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,7 +4,15 @@ 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.
|
|
7
|
+
### [0.1.99](https://github.com/eea/volto-arcgis-block/compare/0.1.98...0.1.99) - 16 February 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- CLMS-1581 fix: Hotspot widget opens when a hotspot layer is checked and closes when a hotspot layer is unchecked. [ujbolivar - [`7c29869`](https://github.com/eea/volto-arcgis-block/commit/7c298698de9937754f447c3884082d930e676fd0)]
|
|
12
|
+
- CLMS-1581 fix: Filtered layer is taken off map when hotspot layers are unchecked. [ujbolivar - [`0ef5a08`](https://github.com/eea/volto-arcgis-block/commit/0ef5a08ef15335baf32dd93ee2aacfc323eadfb9)]
|
|
13
|
+
### [0.1.98](https://github.com/eea/volto-arcgis-block/compare/0.1.97...0.1.98) - 8 February 2023
|
|
14
|
+
|
|
15
|
+
### [0.1.97](https://github.com/eea/volto-arcgis-block/compare/0.1.96...0.1.97) - 6 February 2023
|
|
8
16
|
|
|
9
17
|
### [0.1.96](https://github.com/eea/volto-arcgis-block/compare/0.1.95...0.1.96) - 3 February 2023
|
|
10
18
|
|
package/package.json
CHANGED
|
@@ -64,18 +64,18 @@ export const AddCartItem = ({
|
|
|
64
64
|
let data = checkCartData(cartData, area);
|
|
65
65
|
addCartItem(data).then(() => {
|
|
66
66
|
setMessage('Added to cart');
|
|
67
|
-
showMessageTimer('Added to cart', 'Success');
|
|
67
|
+
showMessageTimer('Added to cart', 'success', 'Success');
|
|
68
68
|
});
|
|
69
69
|
} else {
|
|
70
70
|
setMessage('Please select an area');
|
|
71
|
-
showMessageTimer('Please select an area', 'Warning');
|
|
71
|
+
showMessageTimer('Please select an area', 'warning', 'Warning');
|
|
72
72
|
}
|
|
73
73
|
} else {
|
|
74
74
|
closeModal(e);
|
|
75
75
|
let data = checkCartData(cartData, area, dataset);
|
|
76
76
|
addCartItem(data).then(() => {
|
|
77
77
|
setMessage('Added to cart');
|
|
78
|
-
showMessageTimer('Added to cart', 'Success');
|
|
78
|
+
showMessageTimer('Added to cart', 'success', 'Success');
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
};
|
|
@@ -118,8 +118,8 @@ export const AddCartItem = ({
|
|
|
118
118
|
props.updateArea('');
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
const showMessageTimer = (msg, type) => {
|
|
122
|
-
toast[type](<Toast autoClose={4000} title={
|
|
121
|
+
const showMessageTimer = (msg, type, title) => {
|
|
122
|
+
toast[type](<Toast autoClose={4000} title={title} content={msg} />, {
|
|
123
123
|
position: 'top-center',
|
|
124
124
|
autoClose: 4000,
|
|
125
125
|
hideProgressBar: true,
|
|
@@ -1468,6 +1468,7 @@ class MenuWidget extends React.Component {
|
|
|
1468
1468
|
* Method to show/hide a layer. Update checkboxes from dataset and products
|
|
1469
1469
|
* @param {*} elem Is the checkbox
|
|
1470
1470
|
*/
|
|
1471
|
+
|
|
1471
1472
|
toggleLayer(elem) {
|
|
1472
1473
|
if (!this.visibleLayers) this.visibleLayers = {};
|
|
1473
1474
|
if (!this.timeLayers) this.timeLayers = {};
|
|
@@ -1506,6 +1507,7 @@ class MenuWidget extends React.Component {
|
|
|
1506
1507
|
}
|
|
1507
1508
|
} else {
|
|
1508
1509
|
this.deleteCheckedLayer(elem.id);
|
|
1510
|
+
this.deleteFilteredLayer();
|
|
1509
1511
|
this.layers[elem.id].opacity = 1;
|
|
1510
1512
|
this.layers[elem.id].visible = false;
|
|
1511
1513
|
let mapLayer = this.map.findLayerById(elem.id);
|
|
@@ -1516,6 +1518,7 @@ class MenuWidget extends React.Component {
|
|
|
1516
1518
|
delete this.timeLayers[elem.id];
|
|
1517
1519
|
}
|
|
1518
1520
|
this.updateCheckDataset(parentId);
|
|
1521
|
+
this.toggleHotspotWidget();
|
|
1519
1522
|
this.layersReorder();
|
|
1520
1523
|
this.checkInfoWidget();
|
|
1521
1524
|
|
|
@@ -1531,6 +1534,22 @@ class MenuWidget extends React.Component {
|
|
|
1531
1534
|
//this.activeLayersHandler(this.activeLayersAsArray);
|
|
1532
1535
|
}
|
|
1533
1536
|
|
|
1537
|
+
/**
|
|
1538
|
+
* Hide or show the hotspot widget for a hotspot layer
|
|
1539
|
+
*/
|
|
1540
|
+
|
|
1541
|
+
toggleHotspotWidget() {
|
|
1542
|
+
let hotspotButton = document.querySelector('#hotspot_button');
|
|
1543
|
+
let checkedLayers = JSON.parse(sessionStorage.getItem('checkedLayers'));
|
|
1544
|
+
checkedLayers.forEach((key) => {
|
|
1545
|
+
if (
|
|
1546
|
+
key.includes('all_present_lc_a_pol') ||
|
|
1547
|
+
key.includes('all_lcc_a_pol')
|
|
1548
|
+
) {
|
|
1549
|
+
hotspotButton.click();
|
|
1550
|
+
}
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1534
1553
|
/**
|
|
1535
1554
|
* Hide or show a legend image in the legend widget for a WMTS or a TMS layer
|
|
1536
1555
|
*
|
|
@@ -2369,6 +2388,17 @@ class MenuWidget extends React.Component {
|
|
|
2369
2388
|
}
|
|
2370
2389
|
}
|
|
2371
2390
|
|
|
2391
|
+
deleteFilteredLayer() {
|
|
2392
|
+
let layers = this.layers;
|
|
2393
|
+
if (layers['lcc_filter']) {
|
|
2394
|
+
layers['lcc_filter'].visible = false;
|
|
2395
|
+
delete layers['lcc_filter'];
|
|
2396
|
+
} else if (layers['lc_filter']) {
|
|
2397
|
+
layers['lc_filter'].visible = false;
|
|
2398
|
+
delete layers['lc_filter'];
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2372
2402
|
/**
|
|
2373
2403
|
* Method to load previously expanded dropdowns according to sessionStorage
|
|
2374
2404
|
*/
|
|
@@ -2488,9 +2518,10 @@ class MenuWidget extends React.Component {
|
|
|
2488
2518
|
if (sessionStorage.checkedLayers.includes('all_lcc_a_pol'))
|
|
2489
2519
|
document.querySelector('.landCoverChangeContainer').style.display =
|
|
2490
2520
|
'block';
|
|
2491
|
-
else
|
|
2521
|
+
else {
|
|
2492
2522
|
document.querySelector('.landCoverChangeContainer').style.display =
|
|
2493
2523
|
'none';
|
|
2524
|
+
}
|
|
2494
2525
|
}
|
|
2495
2526
|
}
|
|
2496
2527
|
|