@eeacms/volto-arcgis-block 0.1.462 → 0.1.464

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.464](https://github.com/eea/volto-arcgis-block/compare/0.1.463...0.1.464) - 3 August 2026
8
+
9
+ #### :house: Internal changes
10
+
11
+ - style: Automated code fix [eea-jenkins - [`223790e`](https://github.com/eea/volto-arcgis-block/commit/223790ead69bbd36d2f9e10b5f90bdfc428fe3b2)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - (bug): ensure time slider operates independently for each layer for CDSE datsets with multiple layers [Unai Bolivar - [`15d1c8e`](https://github.com/eea/volto-arcgis-block/commit/15d1c8eeda8cf59ed9bdff8de1bb01aa1e2ebb90)]
16
+ ### [0.1.463](https://github.com/eea/volto-arcgis-block/compare/0.1.462...0.1.463) - 16 July 2026
17
+
7
18
  ### [0.1.462](https://github.com/eea/volto-arcgis-block/compare/0.1.461...0.1.462) - 14 July 2026
8
19
 
9
20
  #### :bug: Bug Fixes
@@ -26,6 +37,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
26
37
 
27
38
  #### :house: Internal changes
28
39
 
40
+ - chore: [JENKINSFILE] sanitize sonarqube command [valentinab25 - [`773ec5d`](https://github.com/eea/volto-arcgis-block/commit/773ec5d35da8a1ba0c93c243ca5c11fc29145ab3)]
29
41
 
30
42
  #### :hammer_and_wrench: Others
31
43
 
@@ -140,6 +152,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
140
152
 
141
153
  #### :house: Internal changes
142
154
 
155
+ - chore: [JENKINSFILE] use sonarqube [valentinab25 - [`ec5e822`](https://github.com/eea/volto-arcgis-block/commit/ec5e8229c968e8cb5239e493537e0559435fe67e)]
143
156
 
144
157
  #### :hammer_and_wrench: Others
145
158
 
@@ -155,6 +168,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
155
168
 
156
169
  #### :house: Internal changes
157
170
 
171
+ - chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`78addd9`](https://github.com/eea/volto-arcgis-block/commit/78addd9908a5a16eb8b8c984b6d98fe992af4449)]
172
+ - chore: [JENKINSFILE] add package version in sonarqube [EEA Jenkins - [`3001a9d`](https://github.com/eea/volto-arcgis-block/commit/3001a9d84c1ceb2072d2c8fdf42b75b0fa2a36c7)]
173
+ - chore: [JENKINSFILE] add sonarqube branches Refs #293878 [EEA Jenkins - [`3430596`](https://github.com/eea/volto-arcgis-block/commit/34305966fc548b9213d2a914cdd61fdb4ef3a973)]
158
174
 
159
175
  ### [0.1.430](https://github.com/eea/volto-arcgis-block/compare/0.1.429...0.1.430) - 19 February 2026
160
176
 
@@ -464,6 +480,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
464
480
 
465
481
  #### :hammer_and_wrench: Others
466
482
 
483
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`fa8e13d`](https://github.com/eea/volto-arcgis-block/commit/fa8e13da184b9a9146cb65aca7a89c05fb0261ba)]
467
484
  ### [0.1.372](https://github.com/eea/volto-arcgis-block/compare/0.1.371...0.1.372) - 26 June 2025
468
485
 
469
486
  #### :hammer_and_wrench: Others
@@ -490,6 +507,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
490
507
 
491
508
  #### :house: Internal changes
492
509
 
510
+ - chore: [JENKINS] fix variable, uncomment tests [valentinab25 - [`00d88b5`](https://github.com/eea/volto-arcgis-block/commit/00d88b52265cba983d1d5e21a49c051004b705b5)]
511
+ - chore: [JENKINS] use clms-theme pipeline [valentinab25 - [`52b392c`](https://github.com/eea/volto-arcgis-block/commit/52b392cc993f3767099525ed39249e574ce2b421)]
512
+ - chore: [JENKINS] use volto 16 pipeline [valentinab25 - [`a676671`](https://github.com/eea/volto-arcgis-block/commit/a676671186aa227f4c77a766b9ca852028168b5c)]
513
+ - chore: [JENKINS] fix Dockerfile to use eea frontend-builder [valentinab25 - [`980608c`](https://github.com/eea/volto-arcgis-block/commit/980608cc867ace42896831791a55c535838250ee)]
514
+ - chore: [JENKINS] update Makefile for Jenkins [valentinab25 - [`021267e`](https://github.com/eea/volto-arcgis-block/commit/021267e620d6529327a730f122a39f7fec53b293)]
493
515
 
494
516
  #### :hammer_and_wrench: Others
495
517
 
@@ -534,6 +556,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
534
556
  - Merge pull request #945 from eea/CLMS-285178-ISOLATED-SWIPE-WIDGET-FIX [Unai Bolivar - [`617b4c4`](https://github.com/eea/volto-arcgis-block/commit/617b4c43ad4363267c4df34c72e64314ee42afb4)]
535
557
  - CLMS-285178 (bug): Separated swipe from other tickets and can push now going [Unai Bolivar - [`84efe24`](https://github.com/eea/volto-arcgis-block/commit/84efe24d964b79f54ddf17f69e389a3f57e3f867)]
536
558
  - CLMS-285178 (bug): Separated swipe from other tickets and can push [Unai Bolivar - [`3e94fd6`](https://github.com/eea/volto-arcgis-block/commit/3e94fd6d2f92817d6b0220155a7e8a0ed5d8dfdb)]
559
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`fdd39ce`](https://github.com/eea/volto-arcgis-block/commit/fdd39ce6c0d848b33f3b6d033e4b35e9bd4f2002)]
537
560
  ### [0.1.356](https://github.com/eea/volto-arcgis-block/compare/0.1.355...0.1.356) - 6 May 2025
538
561
 
539
562
  #### :hammer_and_wrench: Others
@@ -732,6 +755,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
732
755
 
733
756
  #### :house: Internal changes
734
757
 
758
+ - chore: [JENKINSFILE] remove unused code [valentinab25 - [`c62af37`](https://github.com/eea/volto-arcgis-block/commit/c62af37e5c81f7b6b1d204de8a724499d00420d9)]
735
759
 
736
760
  #### :house: Documentation changes
737
761
 
@@ -1050,10 +1074,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1050
1074
  #### :hammer_and_wrench: Others
1051
1075
 
1052
1076
  - 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)]
1077
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`8a0855d`](https://github.com/eea/volto-arcgis-block/commit/8a0855dfe47ec58a596ae0ec360ba8f8d075e991)]
1078
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`3cfe9be`](https://github.com/eea/volto-arcgis-block/commit/3cfe9be4c6d4ace0ef83b452ebdd5b06025123aa)]
1053
1079
  ### [0.1.245](https://github.com/eea/volto-arcgis-block/compare/0.1.244...0.1.245) - 4 January 2024
1054
1080
 
1055
1081
  #### :hammer_and_wrench: Others
1056
1082
 
1083
+ - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`a93b081`](https://github.com/eea/volto-arcgis-block/commit/a93b0819eaa765c92bc25cf195f7a43fcd1dddbd)]
1057
1084
  ### [0.1.244](https://github.com/eea/volto-arcgis-block/compare/0.1.243...0.1.244) - 19 December 2023
1058
1085
 
1059
1086
  ### [0.1.243](https://github.com/eea/volto-arcgis-block/compare/0.1.242...0.1.243) - 15 December 2023
@@ -1093,6 +1120,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1093
1120
 
1094
1121
  #### :hammer_and_wrench: Others
1095
1122
 
1123
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`f45d4bf`](https://github.com/eea/volto-arcgis-block/commit/f45d4bf42061d13d9c18554bef692cb40b3a6fb7)]
1096
1124
  ### [0.1.235](https://github.com/eea/volto-arcgis-block/compare/0.1.234...0.1.235) - 16 November 2023
1097
1125
 
1098
1126
  ### [0.1.234](https://github.com/eea/volto-arcgis-block/compare/0.1.233...0.1.234) - 15 November 2023
@@ -2166,10 +2194,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2166
2194
  #### :hammer_and_wrench: Others
2167
2195
 
2168
2196
  - Merge pull request #148 from eea/develop [KCarpinteroBM - [`24266fb`](https://github.com/eea/volto-arcgis-block/commit/24266fb3a0c1662d22ae0529dc1d5a25c711cf97)]
2197
+ - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`f751f69`](https://github.com/eea/volto-arcgis-block/commit/f751f69f652f0340ae55af6a4dab89d6bdc80906)]
2169
2198
  - Revert "Revert "Mapviewer menu and map viewer options persistence"" [Mikel Larreategi - [`ad6e440`](https://github.com/eea/volto-arcgis-block/commit/ad6e440cdc160cffb1e86e1b26e501dbe648476c)]
2170
2199
  - Revert "code coverage removal" [Mikel Larreategi - [`376f2d1`](https://github.com/eea/volto-arcgis-block/commit/376f2d1cd6e4e5110b3b63d5114af1bcfebe094b)]
2171
2200
  - Revert "Update cypress.json" [Mikel Larreategi - [`43d01a0`](https://github.com/eea/volto-arcgis-block/commit/43d01a0a95a58ef5215c6cbf18223ca30a11b9cc)]
2172
2201
  - Revert "Update cypress.json" [Mikel Larreategi - [`054c4ae`](https://github.com/eea/volto-arcgis-block/commit/054c4ae1767e1f26e6ec7e96a0e26a9711f29f04)]
2202
+ - 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)]
2203
+ - revert [JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967 [Mikel Larreategi - [`85ee194`](https://github.com/eea/volto-arcgis-block/commit/85ee1941e029df2b7dc910bf75231c75ffeca8c2)]
2173
2204
  - Update cypress.json [KCarpinteroBM - [`be285ff`](https://github.com/eea/volto-arcgis-block/commit/be285fff0c53e06a0180d5318cce81195eabcf80)]
2174
2205
  - Update cypress.json [KCarpinteroBM - [`a7f2118`](https://github.com/eea/volto-arcgis-block/commit/a7f2118acb7b048b4cef85aa9663c2244a1c9ca0)]
2175
2206
  - linting fix [KCarpinteroBM - [`27e969a`](https://github.com/eea/volto-arcgis-block/commit/27e969a7a411fd4646e0e742ce846efc0d79703e)]
@@ -2229,6 +2260,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2229
2260
  - UX improvements [rodriama - [`151dc4b`](https://github.com/eea/volto-arcgis-block/commit/151dc4b02d0a73fdd66de9d594620ac0fa5f1dbf)]
2230
2261
  - deleted failing tests [KCarpinteroBM - [`ddaa9e6`](https://github.com/eea/volto-arcgis-block/commit/ddaa9e6f06db6960a4c214d3be2420c48b26715d)]
2231
2262
  - cleaning unnecessary files [KCarpinteroBM - [`2c02199`](https://github.com/eea/volto-arcgis-block/commit/2c021990912beb02b603a1de89aecd62e0063769)]
2263
+ - Reverting to Automated release 0.1.39 [KCarpinteroBM - [`fb9f317`](https://github.com/eea/volto-arcgis-block/commit/fb9f3176ccdea18fceb329eaac13ced0566ee648)]
2232
2264
  - commands added [KCarpinteroBM - [`049e60b`](https://github.com/eea/volto-arcgis-block/commit/049e60b7d124d1c05abd0b2775b510795f4ed59f)]
2233
2265
  - Mapviewer testing implementation [KCarpinteroBM - [`0103002`](https://github.com/eea/volto-arcgis-block/commit/0103002869eea108e16e3b5ff2e77a725dcc7c4b)]
2234
2266
  ### [0.1.39](https://github.com/eea/volto-arcgis-block/compare/0.1.38...0.1.39) - 24 March 2022
@@ -2248,6 +2280,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2248
2280
  - ESLint fix [rodriama - [`75dae9b`](https://github.com/eea/volto-arcgis-block/commit/75dae9b5bba18ab6d9624f6c99714b4bd2179003)]
2249
2281
  - Remove section title [rodriama - [`ece860e`](https://github.com/eea/volto-arcgis-block/commit/ece860eae3519c7e611abac16e8d53c9a9408b34)]
2250
2282
  - Es-Lint [manuelmartinezbilbomatica - [`39d8d11`](https://github.com/eea/volto-arcgis-block/commit/39d8d11b9096fd603df8510c119d2e12817415d6)]
2283
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`bf9f683`](https://github.com/eea/volto-arcgis-block/commit/bf9f683dd35a9edb4cfd9111affcb8f8edbeae89)]
2251
2284
  - FEAT: Parser Time implemented [manuelmartinezbilbomatica - [`689c99e`](https://github.com/eea/volto-arcgis-block/commit/689c99e55221fee6c7c7fafc4ab95ae7a646d3dd)]
2252
2285
  ### [0.1.38](https://github.com/eea/volto-arcgis-block/compare/0.1.37...0.1.38) - 18 March 2022
2253
2286
 
@@ -2342,6 +2375,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2342
2375
  - ESLint fix [rodriama - [`5fd3772`](https://github.com/eea/volto-arcgis-block/commit/5fd3772f197a3a380067962a5638dbf901a4624e)]
2343
2376
  - Pixel info [rodriama - [`1ccef39`](https://github.com/eea/volto-arcgis-block/commit/1ccef39a9adcc3ee94655c77a5a166b613600a08)]
2344
2377
  - NUTS bug fix [rodriama - [`37fe7f3`](https://github.com/eea/volto-arcgis-block/commit/37fe7f3fad2c005e3b7c234b3b0564d5df92fa8c)]
2378
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ea5af8b`](https://github.com/eea/volto-arcgis-block/commit/ea5af8b02a5f2ee25b9b0be67cf3792bbbe84ed7)]
2345
2379
  ### [0.1.23](https://github.com/eea/volto-arcgis-block/compare/0.1.22...0.1.23) - 17 December 2021
2346
2380
 
2347
2381
  #### :hammer_and_wrench: Others
@@ -2586,6 +2620,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
2586
2620
  - Trying to delay ArcGIS modules load [gonzalezsd - [`ff16985`](https://github.com/eea/volto-arcgis-block/commit/ff169858e42d30bfcacc423ffc27762bb9ef05a4)]
2587
2621
  - Run bootstrap to fix files [valentinab25 - [`236893f`](https://github.com/eea/volto-arcgis-block/commit/236893f03314eb638b7667f81b1f91491a98ee17)]
2588
2622
  - fix git_name [valentinab25 - [`c7806c3`](https://github.com/eea/volto-arcgis-block/commit/c7806c312964425dc23e5d4c6973de8b81ddaeac)]
2623
+ - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`e3afb51`](https://github.com/eea/volto-arcgis-block/commit/e3afb515dda459ee03e2b5d4b56465d2d4ad1503)]
2589
2624
  - Trying to change imports [gonzalezsd - [`d83d7e2`](https://github.com/eea/volto-arcgis-block/commit/d83d7e2f68da4b2a284735847f93c0763a7e13b6)]
2590
2625
  - default design [bipoza - [`88fbe0b`](https://github.com/eea/volto-arcgis-block/commit/88fbe0b2bc73e732e2993324a567f53902e85506)]
2591
2626
  - 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.462",
3
+ "version": "0.1.464",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -2625,8 +2625,24 @@ class MenuWidget extends React.Component {
2625
2625
  }
2626
2626
  const matrixData = wmtsContextData.matrixData || {};
2627
2627
  const linkData = wmtsContextData.linkData;
2628
- for (let index = 0; index < linkData.length; index += 1) {
2629
- const matrixId = linkData[index];
2628
+ const preferredMatrixData = [
2629
+ 'PopularWebMercator512',
2630
+ 'popularwebmercator512',
2631
+ 'PopularWebMercator256',
2632
+ 'popularwebmercator256',
2633
+ ];
2634
+ const orderedLinkData = [
2635
+ ...linkData
2636
+ .filter((matrixId) => preferredMatrixData.includes(matrixId))
2637
+ .sort(
2638
+ (firstData, secondData) =>
2639
+ preferredMatrixData.indexOf(firstData) -
2640
+ preferredMatrixData.indexOf(secondData),
2641
+ ),
2642
+ ...linkData.filter((matrixId) => !preferredMatrixData.includes(matrixId)),
2643
+ ];
2644
+ for (let index = 0; index < orderedLinkData.length; index += 1) {
2645
+ const matrixId = orderedLinkData[index];
2630
2646
  const matrixWkid = matrixData[matrixId];
2631
2647
  if (!matrixWkid) {
2632
2648
  continue;
@@ -6747,155 +6763,137 @@ class MenuWidget extends React.Component {
6747
6763
  )
6748
6764
  this.setSliderTag(false);
6749
6765
  else this.setSliderTag(true);
6750
- let activeLayers = document.querySelectorAll('.active-layer');
6751
- let group = this.getGroup(elem);
6752
- let groupLayers = this.getGroupLayers(group);
6753
- if (this.timeLayers[elem.id][1] === 'clock') {
6754
- activeLayers.forEach((layer) => {
6755
- let layerId = layer.getAttribute('layer-id');
6756
- let order = this.activeLayersJSON[elem.id]?.props?.['layer-order'] || 0;
6757
- if (groupLayers && groupLayers.includes(layerId)) {
6758
- elem = document.getElementById(layerId);
6759
- }
6760
- if (elem && elem.id === layerId) {
6761
- this.timeLayers[elem.id] = ['fas', 'stop'];
6762
- if (
6763
- !this.visibleLayers[elem.id] ||
6764
- this.visibleLayers[elem.id][1] === 'eye-slash'
6765
- ) {
6766
- if (this.layers[elem.id]) this.layers[elem.id].visible = true;
6767
- this.visibleLayers[elem.id] = ['fas', 'eye'];
6768
- }
6769
- document
6770
- .querySelectorAll(
6771
- '.active-layer[layer-id="' +
6772
- elem.id +
6773
- '"] .map-menu-icon:not(.active-layer-time)',
6774
- )
6775
- .forEach((item) => {
6776
- item.classList.add('locked');
6777
- });
6778
- if (document.querySelector('#products_label'))
6779
- document.querySelector('#products_label').classList.add('locked');
6780
- if (document.querySelector('#map_remove_layers')) {
6781
- const mapRemoveBtn = document.querySelector('#map_remove_layers');
6782
- if (mapRemoveBtn) mapRemoveBtn.classList.add('locked');
6783
- }
6784
- if (this.props.download && document.querySelector('#download_label'))
6785
- document.querySelector('#download_label').classList.add('locked');
6786
- this.activeLayersJSON[elem.id] = this.addActiveLayer(
6787
- elem,
6788
- order,
6789
- fromDownload,
6790
- hideCalendar,
6791
- );
6792
- } else {
6793
- const node = document.getElementById(layerId);
6794
- if (
6795
- node &&
6796
- node.parentElement &&
6797
- node.parentElement.dataset &&
6798
- node.parentElement.dataset.timeseries === 'true'
6799
- ) {
6800
- if (!this.visibleLayers[layerId]) {
6801
- this.visibleLayers[layerId] = ['fas', 'eye'];
6802
- }
6803
- if (this.visibleLayers[layerId][1] === 'eye') {
6804
- if (this.layers[layerId]) this.layers[layerId].visible = false;
6805
- this.visibleLayers[layerId] = ['fas', 'eye-slash'];
6806
- }
6807
- const activeNode = document.querySelector(
6808
- '.active-layer[layer-id="' + layerId + '"]',
6809
- );
6810
- if (activeNode) activeNode.classList.add('locked');
6811
- }
6812
- this.activeLayersJSON[layerId] = this.addActiveLayer(
6813
- document.getElementById(layerId),
6814
- order,
6766
+ const selectedLayerId = elem.id;
6767
+ let activeTimeLayerId = null;
6768
+ Object.keys(this.timeLayers).forEach((layerId) => {
6769
+ if (this.timeLayers[layerId] && this.timeLayers[layerId][1] === 'stop') {
6770
+ activeTimeLayerId = layerId;
6771
+ }
6772
+ });
6773
+ if (this.timeLayers[selectedLayerId][1] === 'clock') {
6774
+ if (activeTimeLayerId && activeTimeLayerId !== selectedLayerId) {
6775
+ this.timeLayers[activeTimeLayerId] = ['far', 'clock'];
6776
+ const previousLayerNode = document.getElementById(activeTimeLayerId);
6777
+ const previousOrder =
6778
+ this.activeLayersJSON[activeTimeLayerId]?.props?.['layer-order'] || 0;
6779
+ if (previousLayerNode) {
6780
+ this.activeLayersJSON[activeTimeLayerId] = this.addActiveLayer(
6781
+ previousLayerNode,
6782
+ previousOrder,
6815
6783
  fromDownload,
6816
6784
  );
6817
6785
  }
6818
- });
6786
+ document
6787
+ .querySelectorAll(
6788
+ '.active-layer[layer-id="' +
6789
+ activeTimeLayerId +
6790
+ '"] .map-menu-icon:not(.active-layer-time)',
6791
+ )
6792
+ .forEach((item) => {
6793
+ item.classList.remove('locked');
6794
+ });
6795
+ }
6796
+ this.timeLayers[selectedLayerId] = ['fas', 'stop'];
6797
+ if (
6798
+ !this.visibleLayers[selectedLayerId] ||
6799
+ this.visibleLayers[selectedLayerId][1] === 'eye-slash'
6800
+ ) {
6801
+ if (this.layers[selectedLayerId])
6802
+ this.layers[selectedLayerId].visible = true;
6803
+ this.visibleLayers[selectedLayerId] = ['fas', 'eye'];
6804
+ }
6805
+ document
6806
+ .querySelectorAll(
6807
+ '.active-layer[layer-id="' +
6808
+ selectedLayerId +
6809
+ '"] .map-menu-icon:not(.active-layer-time)',
6810
+ )
6811
+ .forEach((item) => {
6812
+ item.classList.add('locked');
6813
+ });
6814
+ if (document.querySelector('#products_label'))
6815
+ document.querySelector('#products_label').classList.add('locked');
6816
+ if (document.querySelector('#map_remove_layers')) {
6817
+ const mapRemoveBtn = document.querySelector('#map_remove_layers');
6818
+ if (mapRemoveBtn) mapRemoveBtn.classList.add('locked');
6819
+ }
6820
+ if (this.props.download && document.querySelector('#download_label'))
6821
+ document.querySelector('#download_label').classList.add('locked');
6822
+ const selectedOrder =
6823
+ this.activeLayersJSON[selectedLayerId]?.props?.['layer-order'] || 0;
6824
+ this.activeLayersJSON[selectedLayerId] = this.addActiveLayer(
6825
+ elem,
6826
+ selectedOrder,
6827
+ fromDownload,
6828
+ hideCalendar,
6829
+ );
6819
6830
  const op = document.querySelector('.opacity-panel');
6820
6831
  if (op && op.style.display === 'block') {
6821
6832
  this.closeOpacity();
6822
6833
  }
6823
6834
  } else {
6824
- activeLayers.forEach((layer) => {
6825
- let layerId = layer.getAttribute('layer-id');
6826
- let order = this.activeLayersJSON[elem.id]?.props?.['layer-order'] || 0;
6827
- if (groupLayers && groupLayers.includes(layerId)) {
6828
- elem = document.getElementById(layerId);
6829
- }
6830
- if (elem && elem.id === layerId) {
6831
- this.timeLayers[elem.id] = ['far', 'clock'];
6832
- this.activeLayersJSON[elem.id] = this.addActiveLayer(
6833
- elem,
6834
- order,
6835
- fromDownload,
6835
+ this.timeLayers[selectedLayerId] = ['far', 'clock'];
6836
+ const selectedOrder =
6837
+ this.activeLayersJSON[selectedLayerId]?.props?.['layer-order'] || 0;
6838
+ this.activeLayersJSON[selectedLayerId] = this.addActiveLayer(
6839
+ elem,
6840
+ selectedOrder,
6841
+ fromDownload,
6842
+ );
6843
+ document
6844
+ .querySelectorAll(
6845
+ '.active-layer[layer-id="' +
6846
+ selectedLayerId +
6847
+ '"] .map-menu-icon:not(.active-layer-time)',
6848
+ )
6849
+ .forEach((item) => {
6850
+ item.classList.remove('locked');
6851
+ });
6852
+ let hasActiveTimeSlider = false;
6853
+ Object.keys(this.timeLayers).forEach((layerId) => {
6854
+ if (
6855
+ this.timeLayers[layerId] &&
6856
+ this.timeLayers[layerId][1] === 'stop'
6857
+ ) {
6858
+ hasActiveTimeSlider = true;
6859
+ }
6860
+ });
6861
+ if (!hasActiveTimeSlider) {
6862
+ const productsLabel = document.querySelector('#products_label');
6863
+ if (productsLabel) productsLabel.classList.remove('locked');
6864
+ const removeBtn = document.querySelector('#map_remove_layers');
6865
+ if (removeBtn) removeBtn.classList.remove('locked');
6866
+ if (this.props.download) {
6867
+ const dl = document.querySelector('#download_label');
6868
+ if (dl) dl.classList.remove('locked');
6869
+ const timeIcon = document.querySelector(
6870
+ '.active-layer[layer-id="' +
6871
+ selectedLayerId +
6872
+ '"] .map-menu-icon.active-layer-time',
6836
6873
  );
6837
- document
6838
- .querySelectorAll(
6839
- '.active-layer[layer-id="' +
6840
- elem.id +
6841
- '"] .map-menu-icon:not(.active-layer-time)',
6842
- )
6843
- .forEach((item) => {
6844
- item.classList.remove('locked');
6845
- });
6846
- const productsLabel = document.querySelector('#products_label');
6847
- if (productsLabel) productsLabel.classList.remove('locked');
6848
- const removeBtn = document.querySelector('#map_remove_layers');
6849
- if (removeBtn) removeBtn.classList.remove('locked');
6850
- if (this.props.download) {
6851
- const dl = document.querySelector('#download_label');
6852
- if (dl) dl.classList.remove('locked');
6853
- const timeIcon = document.querySelector(
6854
- '.active-layer[layer-id="' +
6855
- elem.id +
6856
- '"] .map-menu-icon.active-layer-time',
6857
- );
6858
- if (timeIcon && timeIcon.dataset.download === 'true') {
6859
- const dlBtn = document.getElementById('download_label');
6860
- if (dlBtn) dlBtn.click();
6861
- }
6862
- } else {
6863
- const timeIcon = document.querySelector(
6864
- '.active-layer[layer-id="' +
6865
- elem.id +
6866
- '"] .map-menu-icon.active-layer-time',
6867
- );
6868
- if (timeIcon && timeIcon.dataset.download === 'true') {
6869
- const prBtn = document.getElementById('products_label');
6870
- if (prBtn) prBtn.click();
6871
- }
6874
+ if (timeIcon && timeIcon.dataset.download === 'true') {
6875
+ const dlBtn = document.getElementById('download_label');
6876
+ if (dlBtn) dlBtn.click();
6872
6877
  }
6873
- const ts = document.querySelector('.timeslider-container');
6874
- if (ts && document.contains(ts))
6875
- ReactDOM.unmountComponentAtNode(
6876
- document.querySelector('.esri-ui-bottom-right'),
6877
- );
6878
- const warn = document.querySelector('.drawRectanglePopup-block');
6879
- if (warn) warn.style.display = 'block';
6880
6878
  } else {
6881
- if (!this.visibleLayers[layerId]) {
6882
- this.visibleLayers[layerId] = ['fas', 'eye'];
6883
- }
6884
- if (this.visibleLayers[layerId][1] === 'eye-slash') {
6885
- if (this.layers[layerId]) this.layers[layerId].visible = true;
6886
- this.visibleLayers[layerId] = ['fas', 'eye'];
6887
- this.activeLayersJSON[layerId] = this.addActiveLayer(
6888
- document.getElementById(layerId),
6889
- order,
6890
- fromDownload,
6891
- );
6892
- }
6893
- const activeNode = document.querySelector(
6894
- '.active-layer[layer-id="' + layerId + '"]',
6879
+ const timeIcon = document.querySelector(
6880
+ '.active-layer[layer-id="' +
6881
+ selectedLayerId +
6882
+ '"] .map-menu-icon.active-layer-time',
6895
6883
  );
6896
- if (activeNode) activeNode.classList.remove('locked');
6884
+ if (timeIcon && timeIcon.dataset.download === 'true') {
6885
+ const prBtn = document.getElementById('products_label');
6886
+ if (prBtn) prBtn.click();
6887
+ }
6897
6888
  }
6898
- });
6889
+ const ts = document.querySelector('.timeslider-container');
6890
+ if (ts && document.contains(ts))
6891
+ ReactDOM.unmountComponentAtNode(
6892
+ document.querySelector('.esri-ui-bottom-right'),
6893
+ );
6894
+ const warn = document.querySelector('.drawRectanglePopup-block');
6895
+ if (warn) warn.style.display = 'block';
6896
+ }
6899
6897
  }
6900
6898
  this.setState({});
6901
6899
  }