@eeacms/volto-arcgis-block 0.1.474 → 0.1.476

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,13 @@ 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.476](https://github.com/eea/volto-arcgis-block/compare/0.1.475...0.1.476) - 31 August 2026
8
+
9
+ ### [0.1.475](https://github.com/eea/volto-arcgis-block/compare/0.1.474...0.1.475) - 19 August 2026
10
+
11
+ #### :hammer_and_wrench: Others
12
+
13
+ - CLMS-303602 (bug): Family checkbox solved, checked layers saved when coming from catalogue [Urkorue - [`55af373`](https://github.com/eea/volto-arcgis-block/commit/55af3739469bbb8a738f32d15d975e06b4631cad)]
7
14
  ### [0.1.474](https://github.com/eea/volto-arcgis-block/compare/0.1.473...0.1.474) - 17 August 2026
8
15
 
9
16
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.474",
3
+ "version": "0.1.476",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -1512,7 +1512,7 @@ class MapViewer extends React.Component {
1512
1512
  let toc_panel_scrolls = sessionStorage.getItem('toc_panel_scrolls');
1513
1513
  let checkedLayers = sessionStorage.getItem('checkedLayers');
1514
1514
  if (!sessionStorage.getItem('TMSLayerObj')) {
1515
- sessionStorage.clear();
1515
+ //sessionStorage.clear();
1516
1516
  }
1517
1517
  sessionStorage.setItem('toc_panel_scrolls', toc_panel_scrolls);
1518
1518
  sessionStorage.setItem('checkedLayers', checkedLayers);
@@ -1935,7 +1935,7 @@ class MenuWidget extends React.Component {
1935
1935
  key={'h' + familyId}
1936
1936
  defcheck={familyDatasetDef}
1937
1937
  onChange={(e) =>
1938
- this.toggleFamily(e.target.checked, checkFamily, e)
1938
+ this.toggleFamily(e.target.checked, checkFamily, e.target)
1939
1939
  }
1940
1940
  ></input>
1941
1941
  <label
@@ -5738,18 +5738,25 @@ class MenuWidget extends React.Component {
5738
5738
  'expandedDropdowns',
5739
5739
  JSON.stringify(expandedDropdowns),
5740
5740
  );
5741
- const userKey = this.userID ? 'user_' + this.userID : 'user_anonymous';
5742
- const existing = localStorage.getItem(userKey);
5743
- let storeObj = {};
5744
- if (existing) {
5745
- try {
5746
- storeObj = JSON.parse(existing) || {};
5747
- } catch (e) {
5748
- storeObj = {};
5741
+ if (
5742
+ !this.location.search.includes('product=') &&
5743
+ !this.location.search.includes('dataset=')
5744
+ ) {
5745
+ const userKey = this.userID
5746
+ ? 'user_' + this.userID
5747
+ : 'user_anonymous';
5748
+ const existing = localStorage.getItem(userKey);
5749
+ let storeObj = {};
5750
+ if (existing) {
5751
+ try {
5752
+ storeObj = JSON.parse(existing) || {};
5753
+ } catch (e) {
5754
+ storeObj = {};
5755
+ }
5749
5756
  }
5757
+ storeObj.expandedDropdowns = expandedDropdowns;
5758
+ localStorage.setItem(userKey, JSON.stringify(storeObj));
5750
5759
  }
5751
- storeObj.expandedDropdowns = expandedDropdowns;
5752
- localStorage.setItem(userKey, JSON.stringify(storeObj));
5753
5760
  }
5754
5761
  } catch (e) {}
5755
5762
  }
@@ -8135,7 +8142,7 @@ class MenuWidget extends React.Component {
8135
8142
  }
8136
8143
  } catch (e) {}
8137
8144
  }
8138
- if (layers && !this.props.download && Array.isArray(expandedDropdowns)) {
8145
+ if (layers && !this.props.download) {
8139
8146
  for (var i = layers.length - 1; i >= 0; i--) {
8140
8147
  let layer = layers[i];
8141
8148
  let node = document.getElementById(layer);
@@ -8157,43 +8164,45 @@ class MenuWidget extends React.Component {
8157
8164
  delete node.dataset.preserveCheckedLayerState;
8158
8165
  }
8159
8166
  }
8160
- let dropdown = node.closest('.map-menu-dropdown');
8161
- if (dropdown) {
8162
- let button = dropdown.querySelector('.ccl-expandable__button');
8163
- if (button && expandedDropdowns.includes(button.id)) {
8164
- button.setAttribute('aria-expanded', 'true');
8165
- }
8166
- }
8167
- let productDropdown = node.closest('.map-menu-product-dropdown');
8168
- if (productDropdown) {
8169
- let familyDropdown = node.closest('.map-menu-family-dropdown');
8170
- if (familyDropdown) {
8171
- let button = familyDropdown.querySelector(
8172
- '.ccl-expandable__button',
8173
- );
8167
+ if (Array.isArray(expandedDropdowns)) {
8168
+ let dropdown = node.closest('.map-menu-dropdown');
8169
+ if (dropdown) {
8170
+ let button = dropdown.querySelector('.ccl-expandable__button');
8174
8171
  if (button && expandedDropdowns.includes(button.id)) {
8175
8172
  button.setAttribute('aria-expanded', 'true');
8176
8173
  }
8177
8174
  }
8178
- let datasetDropdown = node.closest('.map-menu-product-dropdown');
8179
- if (datasetDropdown) {
8180
- let button = datasetDropdown.querySelector(
8181
- '.ccl-expandable__button',
8182
- );
8183
- if (button && expandedDropdowns.includes(button.id)) {
8184
- button.setAttribute('aria-expanded', 'true');
8175
+ let productDropdown = node.closest('.map-menu-product-dropdown');
8176
+ if (productDropdown) {
8177
+ let familyDropdown = node.closest('.map-menu-family-dropdown');
8178
+ if (familyDropdown) {
8179
+ let button = familyDropdown.querySelector(
8180
+ '.ccl-expandable__button',
8181
+ );
8182
+ if (button && expandedDropdowns.includes(button.id)) {
8183
+ button.setAttribute('aria-expanded', 'true');
8184
+ }
8185
+ }
8186
+ let datasetDropdown = node.closest('.map-menu-product-dropdown');
8187
+ if (datasetDropdown) {
8188
+ let button = datasetDropdown.querySelector(
8189
+ '.ccl-expandable__button',
8190
+ );
8191
+ if (button && expandedDropdowns.includes(button.id)) {
8192
+ button.setAttribute('aria-expanded', 'true');
8193
+ }
8185
8194
  }
8186
8195
  }
8187
- }
8188
- // set scroll position
8189
- dropdown = node.closest('.map-menu-dropdown');
8190
- productDropdown = node.closest('.map-menu-product-dropdown');
8191
- let scrollPosition = productDropdown
8192
- ? productDropdown.offsetTop
8193
- : dropdown.offsetTop;
8194
- let panelsElem = document.querySelector('.panels');
8195
- if (panelsElem) {
8196
- panelsElem.scrollTop = scrollPosition;
8196
+ // set scroll position
8197
+ dropdown = node.closest('.map-menu-dropdown');
8198
+ productDropdown = node.closest('.map-menu-product-dropdown');
8199
+ let scrollPosition = productDropdown
8200
+ ? productDropdown.offsetTop
8201
+ : dropdown.offsetTop;
8202
+ let panelsElem = document.querySelector('.panels');
8203
+ if (panelsElem) {
8204
+ panelsElem.scrollTop = scrollPosition;
8205
+ }
8197
8206
  }
8198
8207
  }
8199
8208
  }