@eeacms/volto-arcgis-block 0.1.325 → 0.1.327
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,10 @@ 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.327](https://github.com/eea/volto-arcgis-block/compare/0.1.326...0.1.327) - 8 January 2025
|
|
8
|
+
|
|
9
|
+
### [0.1.326](https://github.com/eea/volto-arcgis-block/compare/0.1.325...0.1.326) - 8 January 2025
|
|
10
|
+
|
|
7
11
|
### [0.1.325](https://github.com/eea/volto-arcgis-block/compare/0.1.324...0.1.325) - 20 December 2024
|
|
8
12
|
|
|
9
13
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -3957,6 +3957,13 @@ class MenuWidget extends React.Component {
|
|
|
3957
3957
|
if (tab.id === 'active_label') {
|
|
3958
3958
|
this.layersReorder();
|
|
3959
3959
|
}
|
|
3960
|
+
if (tab.id === 'products_label') {
|
|
3961
|
+
document.querySelector('.search-panel').removeAttribute('style');
|
|
3962
|
+
} else {
|
|
3963
|
+
document
|
|
3964
|
+
.querySelector('.search-panel')
|
|
3965
|
+
.setAttribute('style', 'display: none;');
|
|
3966
|
+
}
|
|
3960
3967
|
|
|
3961
3968
|
if (document.querySelector('.opacity-panel').style.display === 'block') {
|
|
3962
3969
|
this.closeOpacity();
|
|
@@ -4195,6 +4202,7 @@ class MenuWidget extends React.Component {
|
|
|
4195
4202
|
let componentFilter;
|
|
4196
4203
|
let productFilter;
|
|
4197
4204
|
//let familyFilter;
|
|
4205
|
+
let result = false;
|
|
4198
4206
|
if (document.querySelector('#menu-searchtext')) {
|
|
4199
4207
|
searchText = document
|
|
4200
4208
|
.querySelector('#menu-searchtext')
|
|
@@ -4212,19 +4220,52 @@ class MenuWidget extends React.Component {
|
|
|
4212
4220
|
for (let index = 0; index < this.compCfg.length; index++) {
|
|
4213
4221
|
let componentFound = false;
|
|
4214
4222
|
if (
|
|
4215
|
-
index.toString() === componentFilter ||
|
|
4223
|
+
this.compCfg[index].ComponentPosition.toString() === componentFilter ||
|
|
4216
4224
|
componentFilter === 'default'
|
|
4217
4225
|
) {
|
|
4218
|
-
this.compCfg[index].Products.
|
|
4226
|
+
for (let j = 0; j < this.compCfg[index].Products.length; j++) {
|
|
4227
|
+
const product = this.compCfg[index].Products[j];
|
|
4219
4228
|
let productFound = false;
|
|
4220
4229
|
if (
|
|
4221
4230
|
product.ProductId === productFilter ||
|
|
4222
4231
|
productFilter === 'default'
|
|
4223
4232
|
) {
|
|
4224
|
-
product.Datasets.
|
|
4225
|
-
|
|
4233
|
+
for (let k = 0; k < product.Datasets.length; k++) {
|
|
4234
|
+
const dataset = product.Datasets[k];
|
|
4235
|
+
|
|
4236
|
+
if (
|
|
4237
|
+
searchText === '' &&
|
|
4238
|
+
componentFilter === 'default' &&
|
|
4239
|
+
productFilter === 'default'
|
|
4240
|
+
) {
|
|
4226
4241
|
componentFound = true;
|
|
4227
4242
|
productFound = true;
|
|
4243
|
+
result = true;
|
|
4244
|
+
let componentElem = document.querySelector(
|
|
4245
|
+
'#component_' + index,
|
|
4246
|
+
);
|
|
4247
|
+
componentElem
|
|
4248
|
+
.querySelector('.ccl-expandable__button')
|
|
4249
|
+
.setAttribute('aria-expanded', 'false');
|
|
4250
|
+
|
|
4251
|
+
let productElem = document.querySelector(
|
|
4252
|
+
'[productid="' + product.ProductId + '"]',
|
|
4253
|
+
);
|
|
4254
|
+
productElem
|
|
4255
|
+
.querySelector('.ccl-expandable__button')
|
|
4256
|
+
.setAttribute('aria-expanded', 'false');
|
|
4257
|
+
let datasetElem = document.querySelector(
|
|
4258
|
+
'[datasetid="' + dataset.DatasetId + '"]',
|
|
4259
|
+
);
|
|
4260
|
+
datasetElem.removeAttribute('style');
|
|
4261
|
+
productElem.removeAttribute('style');
|
|
4262
|
+
componentElem.removeAttribute('style');
|
|
4263
|
+
} else if (
|
|
4264
|
+
dataset?.DatasetTitle?.toUpperCase().includes(searchText)
|
|
4265
|
+
) {
|
|
4266
|
+
componentFound = true;
|
|
4267
|
+
productFound = true;
|
|
4268
|
+
result = true;
|
|
4228
4269
|
let componentElem = document.querySelector(
|
|
4229
4270
|
'#component_' + index,
|
|
4230
4271
|
);
|
|
@@ -4250,7 +4291,7 @@ class MenuWidget extends React.Component {
|
|
|
4250
4291
|
);
|
|
4251
4292
|
datasetElem.setAttribute('style', 'display: none;');
|
|
4252
4293
|
}
|
|
4253
|
-
}
|
|
4294
|
+
}
|
|
4254
4295
|
}
|
|
4255
4296
|
if (!productFound) {
|
|
4256
4297
|
let productElem = document.querySelector(
|
|
@@ -4258,18 +4299,28 @@ class MenuWidget extends React.Component {
|
|
|
4258
4299
|
);
|
|
4259
4300
|
productElem.setAttribute('style', 'display: none;');
|
|
4260
4301
|
}
|
|
4261
|
-
}
|
|
4302
|
+
}
|
|
4303
|
+
this.compCfg[index].Products.forEach((product) => {});
|
|
4262
4304
|
}
|
|
4263
4305
|
if (!componentFound) {
|
|
4264
4306
|
let componentElem = document.querySelector('#component_' + index);
|
|
4265
4307
|
componentElem.setAttribute('style', 'display: none;');
|
|
4266
4308
|
}
|
|
4267
4309
|
}
|
|
4310
|
+
if (result) {
|
|
4311
|
+
document.querySelector('.no-filter-result-message').style.display =
|
|
4312
|
+
'none';
|
|
4313
|
+
} else {
|
|
4314
|
+
document.querySelector('.no-filter-result-message').style.display =
|
|
4315
|
+
'block';
|
|
4316
|
+
}
|
|
4268
4317
|
}
|
|
4269
4318
|
clearMenuText() {
|
|
4270
4319
|
if (document.querySelector('#menu-searchtext')) {
|
|
4271
4320
|
document.querySelector('#menu-searchtext').value = null;
|
|
4272
4321
|
}
|
|
4322
|
+
this.menuSearch();
|
|
4323
|
+
this.openClearButton();
|
|
4273
4324
|
}
|
|
4274
4325
|
openClearButton() {
|
|
4275
4326
|
if (document.querySelector('#menu-searchtext').value.length > 0) {
|
|
@@ -4395,6 +4446,11 @@ class MenuWidget extends React.Component {
|
|
|
4395
4446
|
maxlength="200"
|
|
4396
4447
|
placeholder="Search products and datasets"
|
|
4397
4448
|
onChange={() => this.openClearButton()}
|
|
4449
|
+
onKeyDown={(e) => {
|
|
4450
|
+
if (e.code === 'Enter') {
|
|
4451
|
+
this.menuSearch();
|
|
4452
|
+
}
|
|
4453
|
+
}}
|
|
4398
4454
|
/>
|
|
4399
4455
|
<div class="search-input-actions">
|
|
4400
4456
|
<button
|
|
@@ -4462,7 +4518,10 @@ class MenuWidget extends React.Component {
|
|
|
4462
4518
|
className="clear-filters"
|
|
4463
4519
|
tabIndex="0"
|
|
4464
4520
|
role="button"
|
|
4465
|
-
onClick={() =>
|
|
4521
|
+
onClick={() => {
|
|
4522
|
+
this.clearFilters();
|
|
4523
|
+
this.menuSearch();
|
|
4524
|
+
}}
|
|
4466
4525
|
onKeyDown={(e) => {
|
|
4467
4526
|
if (
|
|
4468
4527
|
!e.altKey &&
|
|
@@ -4473,6 +4532,7 @@ class MenuWidget extends React.Component {
|
|
|
4473
4532
|
!e.code.startsWith('F')
|
|
4474
4533
|
) {
|
|
4475
4534
|
this.clearFilters();
|
|
4535
|
+
this.menuSearch();
|
|
4476
4536
|
}
|
|
4477
4537
|
}}
|
|
4478
4538
|
>
|
|
@@ -4510,17 +4570,19 @@ class MenuWidget extends React.Component {
|
|
|
4510
4570
|
onBlur={() => {}}
|
|
4511
4571
|
onChange={() => {
|
|
4512
4572
|
this.loadProductFilters();
|
|
4573
|
+
this.menuSearch();
|
|
4513
4574
|
}}
|
|
4514
4575
|
></select>
|
|
4515
4576
|
</span>
|
|
4516
4577
|
<span className="menu-filter">
|
|
4517
|
-
Product
|
|
4578
|
+
Product groups
|
|
4518
4579
|
<select
|
|
4519
4580
|
id="select-product"
|
|
4520
4581
|
class="esri-select filter-select"
|
|
4521
4582
|
onBlur={() => {}}
|
|
4522
4583
|
onChange={() => {
|
|
4523
4584
|
this.loadFamilyFilters();
|
|
4585
|
+
this.menuSearch();
|
|
4524
4586
|
}}
|
|
4525
4587
|
></select>
|
|
4526
4588
|
</span>
|
|
@@ -4534,6 +4596,7 @@ class MenuWidget extends React.Component {
|
|
|
4534
4596
|
</div>
|
|
4535
4597
|
</div>
|
|
4536
4598
|
</div>
|
|
4599
|
+
<div className="no-filter-result-message">No data available</div>
|
|
4537
4600
|
<div
|
|
4538
4601
|
className="panels"
|
|
4539
4602
|
id="paneles"
|
|
@@ -455,6 +455,15 @@ label.ccl-form-radio-label span.nuts-menu-icon {
|
|
|
455
455
|
color: red;
|
|
456
456
|
font-size: 12px;
|
|
457
457
|
}
|
|
458
|
+
|
|
459
|
+
.no-filter-result-message {
|
|
460
|
+
display: none;
|
|
461
|
+
padding-top: 0.3rem;
|
|
462
|
+
padding-left: 0.5rem;
|
|
463
|
+
background-color: white;
|
|
464
|
+
color: red;
|
|
465
|
+
font-size: 15px;
|
|
466
|
+
}
|
|
458
467
|
/* Left menu */
|
|
459
468
|
.map-menu {
|
|
460
469
|
position: relative;
|