@eeacms/volto-arcgis-block 0.1.353 → 0.1.354

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,8 @@ 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.354](https://github.com/eea/volto-arcgis-block/compare/0.1.353...0.1.354) - 24 April 2025
8
+
7
9
  ### [0.1.353](https://github.com/eea/volto-arcgis-block/compare/0.1.352...0.1.353) - 15 April 2025
8
10
 
9
11
  #### :hammer_and_wrench: Others
@@ -193,6 +195,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
193
195
 
194
196
  #### :house: Internal changes
195
197
 
198
+ - chore: [JENKINSFILE] remove unused code [valentinab25 - [`c62af37`](https://github.com/eea/volto-arcgis-block/commit/c62af37e5c81f7b6b1d204de8a724499d00420d9)]
196
199
 
197
200
  #### :house: Documentation changes
198
201
 
@@ -511,10 +514,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
511
514
  #### :hammer_and_wrench: Others
512
515
 
513
516
  - CLMS-2916 (bug): Map Viewer / Products and Datasets tab / Layer - The information icon links to localhost in demo environment [Unai Bolivar - [`eda000a`](https://github.com/eea/volto-arcgis-block/commit/eda000a72278ab073033e520b868ded75dcc2904)]
517
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`8a0855d`](https://github.com/eea/volto-arcgis-block/commit/8a0855dfe47ec58a596ae0ec360ba8f8d075e991)]
518
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`3cfe9be`](https://github.com/eea/volto-arcgis-block/commit/3cfe9be4c6d4ace0ef83b452ebdd5b06025123aa)]
514
519
  ### [0.1.245](https://github.com/eea/volto-arcgis-block/compare/0.1.244...0.1.245) - 4 January 2024
515
520
 
516
521
  #### :hammer_and_wrench: Others
517
522
 
523
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`a93b081`](https://github.com/eea/volto-arcgis-block/commit/a93b0819eaa765c92bc25cf195f7a43fcd1dddbd)]
518
524
  ### [0.1.244](https://github.com/eea/volto-arcgis-block/compare/0.1.243...0.1.244) - 19 December 2023
519
525
 
520
526
  ### [0.1.243](https://github.com/eea/volto-arcgis-block/compare/0.1.242...0.1.243) - 15 December 2023
@@ -554,6 +560,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
554
560
 
555
561
  #### :hammer_and_wrench: Others
556
562
 
563
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`f45d4bf`](https://github.com/eea/volto-arcgis-block/commit/f45d4bf42061d13d9c18554bef692cb40b3a6fb7)]
557
564
  ### [0.1.235](https://github.com/eea/volto-arcgis-block/compare/0.1.234...0.1.235) - 16 November 2023
558
565
 
559
566
  ### [0.1.234](https://github.com/eea/volto-arcgis-block/compare/0.1.233...0.1.234) - 15 November 2023
@@ -1627,10 +1634,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1627
1634
  #### :hammer_and_wrench: Others
1628
1635
 
1629
1636
  - Merge pull request #148 from eea/develop [KCarpinteroBM - [`24266fb`](https://github.com/eea/volto-arcgis-block/commit/24266fb3a0c1662d22ae0529dc1d5a25c711cf97)]
1637
+ - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`f751f69`](https://github.com/eea/volto-arcgis-block/commit/f751f69f652f0340ae55af6a4dab89d6bdc80906)]
1630
1638
  - Revert "Revert "Mapviewer menu and map viewer options persistence"" [Mikel Larreategi - [`ad6e440`](https://github.com/eea/volto-arcgis-block/commit/ad6e440cdc160cffb1e86e1b26e501dbe648476c)]
1631
1639
  - Revert "code coverage removal" [Mikel Larreategi - [`376f2d1`](https://github.com/eea/volto-arcgis-block/commit/376f2d1cd6e4e5110b3b63d5114af1bcfebe094b)]
1632
1640
  - Revert "Update cypress.json" [Mikel Larreategi - [`43d01a0`](https://github.com/eea/volto-arcgis-block/commit/43d01a0a95a58ef5215c6cbf18223ca30a11b9cc)]
1633
1641
  - Revert "Update cypress.json" [Mikel Larreategi - [`054c4ae`](https://github.com/eea/volto-arcgis-block/commit/054c4ae1767e1f26e6ec7e96a0e26a9711f29f04)]
1642
+ - Revert "revert [JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`64ab56e`](https://github.com/eea/volto-arcgis-block/commit/64ab56e0f1f8dddc26f26039509a028e34653e64)]
1643
+ - revert [JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967 [Mikel Larreategi - [`85ee194`](https://github.com/eea/volto-arcgis-block/commit/85ee1941e029df2b7dc910bf75231c75ffeca8c2)]
1634
1644
  - Update cypress.json [KCarpinteroBM - [`be285ff`](https://github.com/eea/volto-arcgis-block/commit/be285fff0c53e06a0180d5318cce81195eabcf80)]
1635
1645
  - Update cypress.json [KCarpinteroBM - [`a7f2118`](https://github.com/eea/volto-arcgis-block/commit/a7f2118acb7b048b4cef85aa9663c2244a1c9ca0)]
1636
1646
  - linting fix [KCarpinteroBM - [`27e969a`](https://github.com/eea/volto-arcgis-block/commit/27e969a7a411fd4646e0e742ce846efc0d79703e)]
@@ -1690,6 +1700,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1690
1700
  - UX improvements [rodriama - [`151dc4b`](https://github.com/eea/volto-arcgis-block/commit/151dc4b02d0a73fdd66de9d594620ac0fa5f1dbf)]
1691
1701
  - deleted failing tests [KCarpinteroBM - [`ddaa9e6`](https://github.com/eea/volto-arcgis-block/commit/ddaa9e6f06db6960a4c214d3be2420c48b26715d)]
1692
1702
  - cleaning unnecessary files [KCarpinteroBM - [`2c02199`](https://github.com/eea/volto-arcgis-block/commit/2c021990912beb02b603a1de89aecd62e0063769)]
1703
+ - Reverting to Automated release 0.1.39 [KCarpinteroBM - [`fb9f317`](https://github.com/eea/volto-arcgis-block/commit/fb9f3176ccdea18fceb329eaac13ced0566ee648)]
1693
1704
  - commands added [KCarpinteroBM - [`049e60b`](https://github.com/eea/volto-arcgis-block/commit/049e60b7d124d1c05abd0b2775b510795f4ed59f)]
1694
1705
  - Mapviewer testing implementation [KCarpinteroBM - [`0103002`](https://github.com/eea/volto-arcgis-block/commit/0103002869eea108e16e3b5ff2e77a725dcc7c4b)]
1695
1706
  ### [0.1.39](https://github.com/eea/volto-arcgis-block/compare/0.1.38...0.1.39) - 24 March 2022
@@ -1709,6 +1720,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1709
1720
  - ESLint fix [rodriama - [`75dae9b`](https://github.com/eea/volto-arcgis-block/commit/75dae9b5bba18ab6d9624f6c99714b4bd2179003)]
1710
1721
  - Remove section title [rodriama - [`ece860e`](https://github.com/eea/volto-arcgis-block/commit/ece860eae3519c7e611abac16e8d53c9a9408b34)]
1711
1722
  - Es-Lint [manuelmartinezbilbomatica - [`39d8d11`](https://github.com/eea/volto-arcgis-block/commit/39d8d11b9096fd603df8510c119d2e12817415d6)]
1723
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`bf9f683`](https://github.com/eea/volto-arcgis-block/commit/bf9f683dd35a9edb4cfd9111affcb8f8edbeae89)]
1712
1724
  - FEAT: Parser Time implemented [manuelmartinezbilbomatica - [`689c99e`](https://github.com/eea/volto-arcgis-block/commit/689c99e55221fee6c7c7fafc4ab95ae7a646d3dd)]
1713
1725
  ### [0.1.38](https://github.com/eea/volto-arcgis-block/compare/0.1.37...0.1.38) - 18 March 2022
1714
1726
 
@@ -1803,6 +1815,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1803
1815
  - ESLint fix [rodriama - [`5fd3772`](https://github.com/eea/volto-arcgis-block/commit/5fd3772f197a3a380067962a5638dbf901a4624e)]
1804
1816
  - Pixel info [rodriama - [`1ccef39`](https://github.com/eea/volto-arcgis-block/commit/1ccef39a9adcc3ee94655c77a5a166b613600a08)]
1805
1817
  - NUTS bug fix [rodriama - [`37fe7f3`](https://github.com/eea/volto-arcgis-block/commit/37fe7f3fad2c005e3b7c234b3b0564d5df92fa8c)]
1818
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ea5af8b`](https://github.com/eea/volto-arcgis-block/commit/ea5af8b02a5f2ee25b9b0be67cf3792bbbe84ed7)]
1806
1819
  ### [0.1.23](https://github.com/eea/volto-arcgis-block/compare/0.1.22...0.1.23) - 17 December 2021
1807
1820
 
1808
1821
  #### :hammer_and_wrench: Others
@@ -2047,6 +2060,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2047
2060
  - Trying to delay ArcGIS modules load [gonzalezsd - [`ff16985`](https://github.com/eea/volto-arcgis-block/commit/ff169858e42d30bfcacc423ffc27762bb9ef05a4)]
2048
2061
  - Run bootstrap to fix files [valentinab25 - [`236893f`](https://github.com/eea/volto-arcgis-block/commit/236893f03314eb638b7667f81b1f91491a98ee17)]
2049
2062
  - fix git_name [valentinab25 - [`c7806c3`](https://github.com/eea/volto-arcgis-block/commit/c7806c312964425dc23e5d4c6973de8b81ddaeac)]
2063
+ - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`e3afb51`](https://github.com/eea/volto-arcgis-block/commit/e3afb515dda459ee03e2b5d4b56465d2d4ad1503)]
2050
2064
  - Trying to change imports [gonzalezsd - [`d83d7e2`](https://github.com/eea/volto-arcgis-block/commit/d83d7e2f68da4b2a284735847f93c0763a7e13b6)]
2051
2065
  - default design [bipoza - [`88fbe0b`](https://github.com/eea/volto-arcgis-block/commit/88fbe0b2bc73e732e2993324a567f53902e85506)]
2052
2066
  - cleanup of unused code [bipoza - [`b167677`](https://github.com/eea/volto-arcgis-block/commit/b1676771f637f056cad50cb0bc186f2ea79e8517)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.353",
3
+ "version": "0.1.354",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -77,6 +77,7 @@ class MapViewer extends React.Component {
77
77
  this.uploadFileErrorHandler = this.uploadFileErrorHandler.bind(this);
78
78
  this.uploadUrlServiceHandler = this.uploadUrlServiceHandler.bind(this);
79
79
  this.getTaxonomy = this.props.getTaxonomy.bind(this);
80
+ this.tax = null;
80
81
  }
81
82
 
82
83
  mapLayersHandler(newLayers) {
@@ -232,6 +233,7 @@ class MapViewer extends React.Component {
232
233
  async componentDidMount() {
233
234
  loadCss();
234
235
  await this.loader();
236
+ this.tax = await this.getTaxonomy('collective.taxonomy.family');
235
237
  this.positronCompositeBasemap = new Basemap({
236
238
  title: 'Positron composite',
237
239
  thumbnailUrl: this.cfgUrls.positronCompositeThumbnail,
@@ -650,6 +652,7 @@ export const CheckUserID = ({ reference }) => {
650
652
  uploadFileErrorHandler={reference.uploadFileErrorHandler}
651
653
  userID={user_id}
652
654
  getTaxonomy={reference.getTaxonomy}
655
+ tax={reference.tax}
653
656
  />
654
657
  </>
655
658
  )}
@@ -502,6 +502,7 @@ class MenuWidget extends React.Component {
502
502
 
503
503
  this.activeLayersHandler = this.props.activeLayersHandler;
504
504
  this.getTaxonomy = this.props.getTaxonomy;
505
+ this.tax = this.props.tax;
505
506
  }
506
507
 
507
508
  loader() {
@@ -1251,6 +1252,7 @@ class MenuWidget extends React.Component {
1251
1252
  metodProcessProduct(product, prodIndex, inheritedIndex) {
1252
1253
  var dataset_def = [];
1253
1254
  var datasets = [];
1255
+ var families = [];
1254
1256
  var index = 0;
1255
1257
  var inheritedIndexProduct = inheritedIndex + '_' + prodIndex;
1256
1258
  var checkProduct = 'map_product_' + inheritedIndexProduct;
@@ -1260,33 +1262,62 @@ class MenuWidget extends React.Component {
1260
1262
  : product.ProductDescription;
1261
1263
 
1262
1264
  if (product.Datasets && Array.isArray(product.Datasets)) {
1263
- for (var i in product.Datasets) {
1264
- if (this.filtersApplied) {
1265
- dataset_def = document
1266
- .querySelector('#' + checkProduct)
1267
- ?.getAttribute('defcheck');
1268
- } else if (
1269
- product.Datasets[i] &&
1270
- product.Datasets[i].Default_active === true
1271
- ) {
1272
- var idDataset = 'map_dataset_' + inheritedIndexProduct + '_' + index;
1273
- dataset_def.push(idDataset);
1265
+ let familiesMap = new Map();
1266
+ familiesMap['noFamily'] = [];
1267
+ for (let index = 0; index < product.Datasets.length; index++) {
1268
+ if (familiesMap[product.Datasets[index].FamilyTitle]) {
1269
+ familiesMap[product.Datasets[index].FamilyTitle].push(
1270
+ product.Datasets[index],
1271
+ );
1272
+ } else if (product.Datasets[index].FamilyTitle) {
1273
+ familiesMap[product.Datasets[index].FamilyTitle] = [
1274
+ product.Datasets[index],
1275
+ ];
1276
+ } else {
1277
+ familiesMap['noFamily'].push(product.Datasets[index]);
1274
1278
  }
1279
+ }
1280
+ for (var j in familiesMap) {
1281
+ if (j === 'noFamily') {
1282
+ for (var i in familiesMap[j]) {
1283
+ if (this.filtersApplied) {
1284
+ dataset_def = document
1285
+ .querySelector('#' + checkProduct)
1286
+ ?.getAttribute('defcheck');
1287
+ } else if (
1288
+ product.Datasets[i] &&
1289
+ product.Datasets[i].Default_active === true
1290
+ ) {
1291
+ var idDataset =
1292
+ 'map_dataset_' + inheritedIndexProduct + '_' + index;
1293
+ dataset_def.push(idDataset);
1294
+ }
1275
1295
 
1276
- // CLMS-1545
1277
- // if (!product.Datasets[i].MarkAsDownloadableNoServiceToVisualize) {
1278
- if (product.Datasets[i]) {
1279
- datasets.push(
1280
- this.metodProcessDataset(
1281
- product.Datasets[i],
1282
- index,
1296
+ // CLMS-1545
1297
+ // if (!product.Datasets[i].MarkAsDownloadableNoServiceToVisualize) {
1298
+ if (product.Datasets[i]) {
1299
+ datasets.push(
1300
+ this.metodProcessDataset(
1301
+ product.Datasets[i],
1302
+ index,
1303
+ inheritedIndexProduct,
1304
+ checkProduct,
1305
+ ),
1306
+ );
1307
+ index++;
1308
+ }
1309
+ // }
1310
+ }
1311
+ } else {
1312
+ families.push(
1313
+ this.metodProcessFamily(
1314
+ familiesMap[j],
1315
+ j,
1283
1316
  inheritedIndexProduct,
1284
1317
  checkProduct,
1285
1318
  ),
1286
1319
  );
1287
- index++;
1288
1320
  }
1289
- // }
1290
1321
  }
1291
1322
  }
1292
1323
 
@@ -1361,6 +1392,131 @@ class MenuWidget extends React.Component {
1361
1392
  <div
1362
1393
  className="ccl-form map-menu-products-container"
1363
1394
  id={'datasets_container_' + inheritedIndexProduct}
1395
+ >
1396
+ {families}
1397
+ {datasets}
1398
+ </div>
1399
+ </fieldset>
1400
+ </div>
1401
+ );
1402
+ }
1403
+
1404
+ metodProcessFamily(family, familyTitle, inheritedIndex, checkProduct) {
1405
+ var dataset_def = [];
1406
+ var datasets = [];
1407
+ var index = 0;
1408
+ var familyId = familyTitle.replace(/\s+/g, '');
1409
+ var inheritedIndexProduct = inheritedIndex + '_' + familyId;
1410
+ checkProduct = 'map_product_' + inheritedIndexProduct;
1411
+ var familyTitleName = '';
1412
+ this.tax.tree.forEach((element) => {
1413
+ element.children.forEach((element) => {
1414
+ if (element.key === familyTitle) {
1415
+ familyTitleName = element.title;
1416
+ }
1417
+ });
1418
+ });
1419
+ if (family && Array.isArray(family)) {
1420
+ for (var i in family) {
1421
+ // if (this.filtersApplied) {
1422
+ // dataset_def = document
1423
+ // .querySelector('#' + checkProduct)
1424
+ // ?.getAttribute('defcheck');
1425
+ // } else if (
1426
+ // product.Datasets[i] &&
1427
+ // product.Datasets[i].Default_active === true
1428
+ // ) {
1429
+ // var idDataset = 'map_dataset_' + inheritedIndexProduct + '_' + index;
1430
+ // dataset_def.push(idDataset);
1431
+ // }
1432
+
1433
+ // CLMS-1545
1434
+ // if (!product.Datasets[i].MarkAsDownloadableNoServiceToVisualize) {
1435
+ if (family[i]) {
1436
+ datasets.push(
1437
+ this.metodProcessDataset(
1438
+ family[i],
1439
+ index,
1440
+ inheritedIndexProduct,
1441
+ checkProduct,
1442
+ ),
1443
+ );
1444
+ index++;
1445
+ }
1446
+ // }
1447
+ }
1448
+ }
1449
+
1450
+ // Empty vector, add the first dataset
1451
+ if (!dataset_def.length) {
1452
+ var idDatasetB = 'map_dataset_' + inheritedIndexProduct + '_0';
1453
+ dataset_def.push(idDatasetB);
1454
+ }
1455
+ let style = this.props.download ? { display: 'none' } : {};
1456
+
1457
+ return (
1458
+ <div
1459
+ className="map-menu-family-dropdown"
1460
+ id={'product_' + inheritedIndexProduct}
1461
+ productid={familyId}
1462
+ key={'a' + familyId}
1463
+ >
1464
+ <fieldset className="ccl-fieldset" key={'b' + familyId}>
1465
+ <div
1466
+ id={'dropdown_' + inheritedIndexProduct}
1467
+ className="ccl-expandable__button"
1468
+ aria-expanded="false"
1469
+ key={'c' + familyId}
1470
+ onClick={this.toggleDropdownContent.bind(this)}
1471
+ onKeyDown={this.toggleDropdownContent.bind(this)}
1472
+ tabIndex="0"
1473
+ role="button"
1474
+ style={style}
1475
+ >
1476
+ <div className="dropdown-icon">
1477
+ <FontAwesomeIcon icon={['fas', 'caret-right']} />
1478
+ </div>
1479
+ <div className="ccl-form map-product-checkbox" key={'d' + familyId}>
1480
+ <div className="ccl-form-group" key={'e' + familyId}>
1481
+ <input
1482
+ type="checkbox"
1483
+ id={checkProduct}
1484
+ name=""
1485
+ value="name"
1486
+ className="ccl-checkbox ccl-required ccl-form-check-input"
1487
+ key={'h' + familyId}
1488
+ defcheck={dataset_def}
1489
+ onChange={(e) =>
1490
+ this.toggleProduct(e.target.checked, checkProduct, e)
1491
+ }
1492
+ ></input>
1493
+ <label
1494
+ className="ccl-form-check-label"
1495
+ htmlFor={checkProduct}
1496
+ key={'f' + familyId}
1497
+ >
1498
+ <legend className="ccl-form-legend">
1499
+ {
1500
+ /* {description ? (
1501
+ <Popup
1502
+ trigger={<span>{familyTitle}</span>}
1503
+ content={description}
1504
+ basic
1505
+ className="custom"
1506
+ style={{ transform: 'translateX(-4rem)' }}
1507
+ />
1508
+ ) : (*/
1509
+ <span>{familyTitleName}</span>
1510
+ /*)} */
1511
+ }
1512
+ </legend>
1513
+ </label>
1514
+ </div>
1515
+ </div>
1516
+ </div>
1517
+ <div
1518
+ className="ccl-form map-menu-family-container"
1519
+ id={'family_container_' + inheritedIndexProduct}
1364
1520
  >
1365
1521
  {datasets}
1366
1522
  </div>
@@ -1532,7 +1688,11 @@ class MenuWidget extends React.Component {
1532
1688
 
1533
1689
  return (
1534
1690
  <div
1535
- className="map-menu-dataset-dropdown"
1691
+ className={
1692
+ dataset.FamilyTitle
1693
+ ? 'map-menu-family-dataset-dropdown'
1694
+ : 'map-menu-dataset-dropdown'
1695
+ }
1536
1696
  id={'dataset_' + inheritedIndexDataset}
1537
1697
  datasetid={dataset.DatasetId}
1538
1698
  key={'a' + datIndex}
@@ -5070,74 +5230,80 @@ class MenuWidget extends React.Component {
5070
5230
  let datasetElem = document.querySelector(
5071
5231
  '[datasetid="' + dataset.DatasetId + '"]',
5072
5232
  );
5073
- for (let l = 0; l < Object.keys(this.activeLayersJSON).length; l++) {
5074
- if (
5075
- dataset.DatasetTitle ===
5076
- this.layers[Object.keys(this.activeLayersJSON)[l]].DatasetTitle
5233
+ if (datasetElem) {
5234
+ for (
5235
+ let l = 0;
5236
+ l < Object.keys(this.activeLayersJSON).length;
5237
+ l++
5077
5238
  ) {
5078
- componentChecked = true;
5079
- productChecked = true;
5080
- datasetChecked = true;
5081
- }
5082
- }
5083
- if (
5084
- searchText === '' &&
5085
- componentFilter === 'default' &&
5086
- productFilter === 'default' &&
5087
- (familyFilter === 'default' || familyFilter === '')
5088
- ) {
5089
- this.filtersApplied = false;
5090
- componentFound = true;
5091
- productFound = true;
5092
- result = true;
5093
- componentElem
5094
- .querySelector('.ccl-expandable__button')
5095
- .setAttribute('aria-expanded', 'false');
5096
- productElem
5097
- .querySelector('.ccl-expandable__button')
5098
- .setAttribute('aria-expanded', 'false');
5099
- datasetElem.removeAttribute('style');
5100
- productElem.removeAttribute('style');
5101
- componentElem.removeAttribute('style');
5102
- if (!defaultActive) {
5103
- defaultActive = 'map_' + datasetElem.id;
5104
- }
5105
- if (dataset.Default_active) {
5106
- defaultActive = 'map_' + datasetElem.id;
5107
- }
5108
- } else if (
5109
- datasetChecked ||
5110
- (dataset?.DatasetTitle?.toUpperCase().includes(searchText) &&
5111
- (product.ProductId === productFilter ||
5112
- productFilter === 'default') &&
5113
- (this.compCfg[index].ComponentPosition.toString() ===
5114
- componentFilter ||
5115
- componentFilter === 'default') &&
5116
- (dataset?.FamilyTitle === familyFilter ||
5117
- familyFilter === 'default' ||
5118
- familyFilter === ''))
5119
- ) {
5120
- this.filtersApplied = true;
5121
- componentFound = true;
5122
- productFound = true;
5123
- result = true;
5124
- componentElem
5125
- .querySelector('.ccl-expandable__button')
5126
- .setAttribute('aria-expanded', 'true');
5127
- productElem
5128
- .querySelector('.ccl-expandable__button')
5129
- .setAttribute('aria-expanded', 'true');
5130
- datasetElem.removeAttribute('style');
5131
- productElem.removeAttribute('style');
5132
- componentElem.removeAttribute('style');
5133
- if (!defaultActive) {
5134
- defaultActive = 'map_' + datasetElem.id;
5239
+ if (
5240
+ dataset.DatasetTitle ===
5241
+ this.layers[Object.keys(this.activeLayersJSON)[l]].DatasetTitle
5242
+ ) {
5243
+ componentChecked = true;
5244
+ productChecked = true;
5245
+ datasetChecked = true;
5246
+ }
5135
5247
  }
5136
- if (dataset.Default_active) {
5137
- defaultActive = 'map_' + datasetElem.id;
5248
+ if (
5249
+ searchText === '' &&
5250
+ componentFilter === 'default' &&
5251
+ productFilter === 'default' &&
5252
+ (familyFilter === 'default' || familyFilter === '')
5253
+ ) {
5254
+ this.filtersApplied = false;
5255
+ componentFound = true;
5256
+ productFound = true;
5257
+ result = true;
5258
+ componentElem
5259
+ .querySelector('.ccl-expandable__button')
5260
+ .setAttribute('aria-expanded', 'false');
5261
+ productElem
5262
+ .querySelector('.ccl-expandable__button')
5263
+ .setAttribute('aria-expanded', 'false');
5264
+ datasetElem.removeAttribute('style');
5265
+ productElem.removeAttribute('style');
5266
+ componentElem.removeAttribute('style');
5267
+ if (!defaultActive) {
5268
+ defaultActive = 'map_' + datasetElem.id;
5269
+ }
5270
+ if (dataset.Default_active) {
5271
+ defaultActive = 'map_' + datasetElem.id;
5272
+ }
5273
+ } else if (
5274
+ datasetChecked ||
5275
+ (dataset?.DatasetTitle?.toUpperCase().includes(searchText) &&
5276
+ (product.ProductId === productFilter ||
5277
+ productFilter === 'default') &&
5278
+ (this.compCfg[index].ComponentPosition.toString() ===
5279
+ componentFilter ||
5280
+ componentFilter === 'default') &&
5281
+ (dataset?.FamilyTitle === familyFilter ||
5282
+ familyFilter === 'default' ||
5283
+ familyFilter === ''))
5284
+ ) {
5285
+ this.filtersApplied = true;
5286
+ componentFound = true;
5287
+ productFound = true;
5288
+ result = true;
5289
+ componentElem
5290
+ .querySelector('.ccl-expandable__button')
5291
+ .setAttribute('aria-expanded', 'true');
5292
+ productElem
5293
+ .querySelector('.ccl-expandable__button')
5294
+ .setAttribute('aria-expanded', 'true');
5295
+ datasetElem.removeAttribute('style');
5296
+ productElem.removeAttribute('style');
5297
+ componentElem.removeAttribute('style');
5298
+ if (!defaultActive) {
5299
+ defaultActive = 'map_' + datasetElem.id;
5300
+ }
5301
+ if (dataset.Default_active) {
5302
+ defaultActive = 'map_' + datasetElem.id;
5303
+ }
5304
+ } else {
5305
+ datasetElem.setAttribute('style', 'display: none;');
5138
5306
  }
5139
- } else {
5140
- datasetElem.setAttribute('style', 'display: none;');
5141
5307
  }
5142
5308
  }
5143
5309
  productCheckbox.setAttribute('defcheck', defaultActive);
@@ -742,6 +742,14 @@ div.upload-container.esri-component
742
742
  margin-bottom: 0.5rem;
743
743
  }
744
744
 
745
+ .map-menu-family-dataset-dropdown {
746
+ padding-left: 2rem;
747
+ }
748
+
749
+ .map-menu-family-dropdown {
750
+ padding-left: 2rem;
751
+ }
752
+
745
753
  .map-menu-dataset > div:first-of-type {
746
754
  display: flex;
747
755
  width: 100%;