@eeacms/volto-arcgis-block 0.1.329 → 0.1.331
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 +5 -0
- package/package.json +1 -1
- package/src/components/MapViewer/MenuWidget.jsx +77 -79
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +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.331](https://github.com/eea/volto-arcgis-block/compare/0.1.330...0.1.331) - 17 January 2025
|
|
8
|
+
|
|
9
|
+
### [0.1.330](https://github.com/eea/volto-arcgis-block/compare/0.1.329...0.1.330) - 16 January 2025
|
|
10
|
+
|
|
7
11
|
### [0.1.329](https://github.com/eea/volto-arcgis-block/compare/0.1.328...0.1.329) - 14 January 2025
|
|
8
12
|
|
|
9
13
|
#### :hammer_and_wrench: Others
|
|
10
14
|
|
|
15
|
+
- Merge pull request #881 from eea/develop [Unai Bolivar - [`c2bef1e`](https://github.com/eea/volto-arcgis-block/commit/c2bef1e50a2c6a1058ce542b888dca0118f4d61b)]
|
|
11
16
|
- CLMS-270893 (bug): Fixed scroll positioning of checked dataset in dataviewer when coming from dataset catalogue result [Unai Bolivar - [`8a2cf7f`](https://github.com/eea/volto-arcgis-block/commit/8a2cf7f3184b81c653d3ba420921d481bc5619fa)]
|
|
12
17
|
### [0.1.328](https://github.com/eea/volto-arcgis-block/compare/0.1.327...0.1.328) - 9 January 2025
|
|
13
18
|
|
package/package.json
CHANGED
|
@@ -4221,93 +4221,91 @@ class MenuWidget extends React.Component {
|
|
|
4221
4221
|
// if (document.getElementById('select-family')) {
|
|
4222
4222
|
// familyFilter = document.getElementById('select-family').text;
|
|
4223
4223
|
// }
|
|
4224
|
+
let checkedLayers = JSON.parse(sessionStorage.getItem('checkedLayers'));
|
|
4224
4225
|
for (let index = 0; index < this.compCfg.length; index++) {
|
|
4225
4226
|
let componentFound = false;
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4227
|
+
let componentChecked = false;
|
|
4228
|
+
let componentElem = document.querySelector('#component_' + index);
|
|
4229
|
+
for (let j = 0; j < this.compCfg[index].Products.length; j++) {
|
|
4230
|
+
const product = this.compCfg[index].Products[j];
|
|
4231
|
+
let productFound = false;
|
|
4232
|
+
let productChecked = false;
|
|
4233
|
+
let productElem = document.querySelector(
|
|
4234
|
+
'[productid="' + product.ProductId + '"]',
|
|
4235
|
+
);
|
|
4236
|
+
for (let k = 0; k < product.Datasets.length; k++) {
|
|
4237
|
+
const dataset = product.Datasets[k];
|
|
4238
|
+
let datasetChecked = false;
|
|
4239
|
+
let datasetElem = document.querySelector(
|
|
4240
|
+
'[datasetid="' + dataset.DatasetId + '"]',
|
|
4241
|
+
);
|
|
4242
|
+
for (let l = 0; l < checkedLayers?.length; l++) {
|
|
4243
|
+
if (
|
|
4244
|
+
dataset.DatasetTitle ===
|
|
4245
|
+
this.layers[checkedLayers[l]].DatasetTitle
|
|
4246
|
+
) {
|
|
4247
|
+
componentChecked = true;
|
|
4248
|
+
productChecked = true;
|
|
4249
|
+
datasetChecked = true;
|
|
4250
|
+
}
|
|
4251
|
+
}
|
|
4233
4252
|
if (
|
|
4234
|
-
|
|
4253
|
+
searchText === '' &&
|
|
4254
|
+
componentFilter === 'default' &&
|
|
4235
4255
|
productFilter === 'default'
|
|
4236
4256
|
) {
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
)
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
result = true;
|
|
4273
|
-
let componentElem = document.querySelector(
|
|
4274
|
-
'#component_' + index,
|
|
4275
|
-
);
|
|
4276
|
-
componentElem
|
|
4277
|
-
.querySelector('.ccl-expandable__button')
|
|
4278
|
-
.setAttribute('aria-expanded', 'true');
|
|
4279
|
-
|
|
4280
|
-
let productElem = document.querySelector(
|
|
4281
|
-
'[productid="' + product.ProductId + '"]',
|
|
4282
|
-
);
|
|
4283
|
-
productElem
|
|
4284
|
-
.querySelector('.ccl-expandable__button')
|
|
4285
|
-
.setAttribute('aria-expanded', 'true');
|
|
4286
|
-
let datasetElem = document.querySelector(
|
|
4287
|
-
'[datasetid="' + dataset.DatasetId + '"]',
|
|
4288
|
-
);
|
|
4289
|
-
datasetElem.removeAttribute('style');
|
|
4290
|
-
productElem.removeAttribute('style');
|
|
4291
|
-
componentElem.removeAttribute('style');
|
|
4292
|
-
} else {
|
|
4293
|
-
let datasetElem = document.querySelector(
|
|
4294
|
-
'[datasetid="' + dataset.DatasetId + '"]',
|
|
4295
|
-
);
|
|
4296
|
-
datasetElem.setAttribute('style', 'display: none;');
|
|
4297
|
-
}
|
|
4298
|
-
}
|
|
4299
|
-
}
|
|
4300
|
-
if (!productFound) {
|
|
4301
|
-
let productElem = document.querySelector(
|
|
4302
|
-
'[productid="' + product.ProductId + '"]',
|
|
4303
|
-
);
|
|
4304
|
-
productElem.setAttribute('style', 'display: none;');
|
|
4257
|
+
componentFound = true;
|
|
4258
|
+
productFound = true;
|
|
4259
|
+
result = true;
|
|
4260
|
+
componentElem
|
|
4261
|
+
.querySelector('.ccl-expandable__button')
|
|
4262
|
+
.setAttribute('aria-expanded', 'false');
|
|
4263
|
+
productElem
|
|
4264
|
+
.querySelector('.ccl-expandable__button')
|
|
4265
|
+
.setAttribute('aria-expanded', 'false');
|
|
4266
|
+
datasetElem.removeAttribute('style');
|
|
4267
|
+
productElem.removeAttribute('style');
|
|
4268
|
+
componentElem.removeAttribute('style');
|
|
4269
|
+
} else if (
|
|
4270
|
+
datasetChecked ||
|
|
4271
|
+
(dataset?.DatasetTitle?.toUpperCase().includes(searchText) &&
|
|
4272
|
+
(product.ProductId === productFilter ||
|
|
4273
|
+
productFilter === 'default') &&
|
|
4274
|
+
(this.compCfg[index].ComponentPosition.toString() ===
|
|
4275
|
+
componentFilter ||
|
|
4276
|
+
componentFilter === 'default'))
|
|
4277
|
+
) {
|
|
4278
|
+
componentFound = true;
|
|
4279
|
+
productFound = true;
|
|
4280
|
+
result = true;
|
|
4281
|
+
componentElem
|
|
4282
|
+
.querySelector('.ccl-expandable__button')
|
|
4283
|
+
.setAttribute('aria-expanded', 'true');
|
|
4284
|
+
productElem
|
|
4285
|
+
.querySelector('.ccl-expandable__button')
|
|
4286
|
+
.setAttribute('aria-expanded', 'true');
|
|
4287
|
+
datasetElem.removeAttribute('style');
|
|
4288
|
+
productElem.removeAttribute('style');
|
|
4289
|
+
componentElem.removeAttribute('style');
|
|
4290
|
+
} else {
|
|
4291
|
+
datasetElem.setAttribute('style', 'display: none;');
|
|
4305
4292
|
}
|
|
4306
4293
|
}
|
|
4307
|
-
|
|
4294
|
+
if (productChecked) {
|
|
4295
|
+
productElem
|
|
4296
|
+
.querySelector('.ccl-expandable__button')
|
|
4297
|
+
.setAttribute('aria-expanded', 'true');
|
|
4298
|
+
}
|
|
4299
|
+
if (!productFound && !productChecked) {
|
|
4300
|
+
productElem.setAttribute('style', 'display: none;');
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
if (componentChecked) {
|
|
4304
|
+
componentElem
|
|
4305
|
+
.querySelector('.ccl-expandable__button')
|
|
4306
|
+
.setAttribute('aria-expanded', 'true');
|
|
4308
4307
|
}
|
|
4309
|
-
if (!componentFound) {
|
|
4310
|
-
let componentElem = document.querySelector('#component_' + index);
|
|
4308
|
+
if (!componentFound && !componentChecked) {
|
|
4311
4309
|
componentElem.setAttribute('style', 'display: none;');
|
|
4312
4310
|
}
|
|
4313
4311
|
}
|