@eeacms/volto-arcgis-block 0.1.414 → 0.1.416
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,17 @@ 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.416](https://github.com/eea/volto-arcgis-block/compare/0.1.415...0.1.416) - 3 December 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- (lint): lint and prettified [Unai Bolivar - [`f9f26fc`](https://github.com/eea/volto-arcgis-block/commit/f9f26fcd4bacea6e822ad9ae1236403ae2789719)]
|
|
12
|
+
- (bug): TOC Menu loads with open selections if user has previous localstorage data for TOC menu [Unai Bolivar - [`6feaa72`](https://github.com/eea/volto-arcgis-block/commit/6feaa7296f27813391ab63510d3291cc437b69e5)]
|
|
13
|
+
### [0.1.415](https://github.com/eea/volto-arcgis-block/compare/0.1.414...0.1.415) - 3 December 2025
|
|
14
|
+
|
|
15
|
+
#### :hammer_and_wrench: Others
|
|
16
|
+
|
|
17
|
+
- (bug): In the TOC menu, when a level is selected, the lower level is now displayed [Unai Bolivar - [`ec66304`](https://github.com/eea/volto-arcgis-block/commit/ec6630453964d3f82c5277ddf43a976c3b1c72c3)]
|
|
7
18
|
### [0.1.414](https://github.com/eea/volto-arcgis-block/compare/0.1.413...0.1.414) - 1 December 2025
|
|
8
19
|
|
|
9
20
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1097,6 +1097,18 @@ class MenuWidget extends React.Component {
|
|
|
1097
1097
|
let checkedLayers = sessionStorage.getItem('checkedLayers');
|
|
1098
1098
|
if (expandedDropdowns) {
|
|
1099
1099
|
sessionStorage.setItem('expandedDropdowns', JSON.stringify([]));
|
|
1100
|
+
const userKey = this.userID ? 'user_' + this.userID : 'user_anonymous';
|
|
1101
|
+
const existing = localStorage.getItem(userKey);
|
|
1102
|
+
let storeObj = {};
|
|
1103
|
+
if (existing) {
|
|
1104
|
+
try {
|
|
1105
|
+
storeObj = JSON.parse(existing) || {};
|
|
1106
|
+
} catch (e) {
|
|
1107
|
+
storeObj = {};
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
storeObj.expandedDropdowns = [];
|
|
1111
|
+
localStorage.setItem(userKey, JSON.stringify(storeObj));
|
|
1100
1112
|
}
|
|
1101
1113
|
if (checkedLayers) {
|
|
1102
1114
|
sessionStorage.setItem('checkedLayers', JSON.stringify([]));
|
|
@@ -3292,6 +3304,26 @@ class MenuWidget extends React.Component {
|
|
|
3292
3304
|
let splitdefCheck = layerdef.split(',');
|
|
3293
3305
|
let layerChecks = [];
|
|
3294
3306
|
let selector = [];
|
|
3307
|
+
if (value) {
|
|
3308
|
+
let productDropdown = e.closest('.map-menu-product-dropdown');
|
|
3309
|
+
let datasetDropdown = e.closest('.map-menu-dropdown');
|
|
3310
|
+
let familyDropdown = e.closest('.map-menu-family-dropdown');
|
|
3311
|
+
if (productDropdown) {
|
|
3312
|
+
let btn = productDropdown.querySelector('.ccl-expandable__button');
|
|
3313
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3314
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3315
|
+
}
|
|
3316
|
+
if (familyDropdown) {
|
|
3317
|
+
let btn = familyDropdown.querySelector('.ccl-expandable__button');
|
|
3318
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3319
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3320
|
+
}
|
|
3321
|
+
if (datasetDropdown) {
|
|
3322
|
+
let btn = datasetDropdown.querySelector('.ccl-expandable__button');
|
|
3323
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3324
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3295
3327
|
if (value) {
|
|
3296
3328
|
for (let i = 0; i < splitdefCheck.length; i++) {
|
|
3297
3329
|
selector = document.querySelector(`[id="${splitdefCheck[i]}"]`);
|
|
@@ -3356,9 +3388,23 @@ class MenuWidget extends React.Component {
|
|
|
3356
3388
|
let selector = [];
|
|
3357
3389
|
|
|
3358
3390
|
if (value) {
|
|
3391
|
+
let productContainer = document.querySelector('[productid="' + id + '"]');
|
|
3392
|
+
if (productContainer) {
|
|
3393
|
+
let btn = productContainer.querySelector('.ccl-expandable__button');
|
|
3394
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3395
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3396
|
+
}
|
|
3359
3397
|
for (let i = 0; i < splitdefCheck.length; i++) {
|
|
3360
3398
|
selector = document.querySelector(`[id="${splitdefCheck[i]}"]`);
|
|
3361
3399
|
datasetChecks.push(selector);
|
|
3400
|
+
if (selector) {
|
|
3401
|
+
let datasetDropdown = selector.closest('.map-menu-dropdown');
|
|
3402
|
+
if (datasetDropdown) {
|
|
3403
|
+
let btn = datasetDropdown.querySelector('.ccl-expandable__button');
|
|
3404
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3405
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3362
3408
|
}
|
|
3363
3409
|
} else {
|
|
3364
3410
|
datasetChecks = document.querySelectorAll(`[parentid=${id}]`);
|
|
@@ -3380,9 +3426,23 @@ class MenuWidget extends React.Component {
|
|
|
3380
3426
|
let selector = [];
|
|
3381
3427
|
|
|
3382
3428
|
if (value) {
|
|
3429
|
+
let familyContainer = document.querySelector('[productid="' + id + '"]');
|
|
3430
|
+
if (familyContainer) {
|
|
3431
|
+
let btn = familyContainer.querySelector('.ccl-expandable__button');
|
|
3432
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3433
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3434
|
+
}
|
|
3383
3435
|
for (let i = 0; i < splitdefCheck.length; i++) {
|
|
3384
3436
|
selector = document.querySelector(`[id="${splitdefCheck[i]}"]`);
|
|
3385
3437
|
datasetChecks.push(selector);
|
|
3438
|
+
if (selector) {
|
|
3439
|
+
let datasetDropdown = selector.closest('.map-menu-dropdown');
|
|
3440
|
+
if (datasetDropdown) {
|
|
3441
|
+
let btn = datasetDropdown.querySelector('.ccl-expandable__button');
|
|
3442
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3443
|
+
if (btn) this.addExpandedDropdown(btn.id);
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3386
3446
|
}
|
|
3387
3447
|
} else {
|
|
3388
3448
|
datasetChecks = document.querySelectorAll(`[parentid=${id}]`);
|
|
@@ -3436,6 +3496,47 @@ class MenuWidget extends React.Component {
|
|
|
3436
3496
|
JSON.stringify(expandedDropdowns),
|
|
3437
3497
|
);
|
|
3438
3498
|
}
|
|
3499
|
+
const userKey = this.userID ? 'user_' + this.userID : 'user_anonymous';
|
|
3500
|
+
const existing = localStorage.getItem(userKey);
|
|
3501
|
+
let storeObj = {};
|
|
3502
|
+
if (existing) {
|
|
3503
|
+
try {
|
|
3504
|
+
storeObj = JSON.parse(existing) || {};
|
|
3505
|
+
} catch (e) {
|
|
3506
|
+
storeObj = {};
|
|
3507
|
+
}
|
|
3508
|
+
}
|
|
3509
|
+
storeObj.expandedDropdowns = expandedDropdowns;
|
|
3510
|
+
localStorage.setItem(userKey, JSON.stringify(storeObj));
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
addExpandedDropdown(id) {
|
|
3514
|
+
if (!id || this.props.download) return;
|
|
3515
|
+
try {
|
|
3516
|
+
let expandedDropdowns = JSON.parse(
|
|
3517
|
+
sessionStorage.getItem('expandedDropdowns'),
|
|
3518
|
+
);
|
|
3519
|
+
if (!Array.isArray(expandedDropdowns)) expandedDropdowns = [];
|
|
3520
|
+
if (!expandedDropdowns.includes(id)) {
|
|
3521
|
+
expandedDropdowns.push(id);
|
|
3522
|
+
sessionStorage.setItem(
|
|
3523
|
+
'expandedDropdowns',
|
|
3524
|
+
JSON.stringify(expandedDropdowns),
|
|
3525
|
+
);
|
|
3526
|
+
const userKey = this.userID ? 'user_' + this.userID : 'user_anonymous';
|
|
3527
|
+
const existing = localStorage.getItem(userKey);
|
|
3528
|
+
let storeObj = {};
|
|
3529
|
+
if (existing) {
|
|
3530
|
+
try {
|
|
3531
|
+
storeObj = JSON.parse(existing) || {};
|
|
3532
|
+
} catch (e) {
|
|
3533
|
+
storeObj = {};
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
storeObj.expandedDropdowns = expandedDropdowns;
|
|
3537
|
+
localStorage.setItem(userKey, JSON.stringify(storeObj));
|
|
3538
|
+
}
|
|
3539
|
+
} catch (e) {}
|
|
3439
3540
|
}
|
|
3440
3541
|
findCheckedDatasetNoServiceToVisualize(elem) {
|
|
3441
3542
|
let parentId = elem.getAttribute('parentid');
|
|
@@ -5607,10 +5708,31 @@ class MenuWidget extends React.Component {
|
|
|
5607
5708
|
*/
|
|
5608
5709
|
expandDropdowns() {
|
|
5609
5710
|
if (this.props.download) return;
|
|
5610
|
-
let expandedDropdowns =
|
|
5611
|
-
|
|
5612
|
-
);
|
|
5613
|
-
if (
|
|
5711
|
+
let expandedDropdowns = null;
|
|
5712
|
+
const userKey = this.userID ? 'user_' + this.userID : 'user_anonymous';
|
|
5713
|
+
const existing = localStorage.getItem(userKey);
|
|
5714
|
+
if (existing) {
|
|
5715
|
+
try {
|
|
5716
|
+
const storeObj = JSON.parse(existing) || {};
|
|
5717
|
+
const stored = storeObj ? storeObj.expandedDropdowns : null;
|
|
5718
|
+
if (Array.isArray(stored)) {
|
|
5719
|
+
expandedDropdowns = stored;
|
|
5720
|
+
} else if (typeof stored === 'string') {
|
|
5721
|
+
const parsed = JSON.parse(stored);
|
|
5722
|
+
if (Array.isArray(parsed)) expandedDropdowns = parsed;
|
|
5723
|
+
}
|
|
5724
|
+
} catch (e) {}
|
|
5725
|
+
}
|
|
5726
|
+
if (!Array.isArray(expandedDropdowns)) {
|
|
5727
|
+
try {
|
|
5728
|
+
const fromSession = sessionStorage.getItem('expandedDropdowns');
|
|
5729
|
+
if (fromSession) {
|
|
5730
|
+
const parsed = JSON.parse(fromSession);
|
|
5731
|
+
if (Array.isArray(parsed)) expandedDropdowns = parsed;
|
|
5732
|
+
}
|
|
5733
|
+
} catch (e) {}
|
|
5734
|
+
}
|
|
5735
|
+
if (Array.isArray(expandedDropdowns)) {
|
|
5614
5736
|
expandedDropdowns.forEach((id) => {
|
|
5615
5737
|
let dd = document.getElementById(id);
|
|
5616
5738
|
if (dd) {
|
|
@@ -1379,8 +1379,10 @@ div.upload-container.esri-component
|
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
1381
|
.calendar-button:hover {
|
|
1382
|
-
|
|
1383
|
-
|
|
1382
|
+
border-width: 1px;
|
|
1383
|
+
border-style: solid;
|
|
1384
|
+
border-color: #a0b128;
|
|
1385
|
+
border-radius: 2px;
|
|
1384
1386
|
}
|
|
1385
1387
|
|
|
1386
1388
|
.datepicker {
|