@eeacms/volto-arcgis-block 0.1.114 → 0.1.116

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,18 @@ 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.116](https://github.com/eea/volto-arcgis-block/compare/0.1.115...0.1.116) - 21 March 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - CLMS-1634 (fix): Ran linting scripts [ujbolivar - [`87a909c`](https://github.com/eea/volto-arcgis-block/commit/87a909cf4d1fa77b0abe6d818de9bddb199a9e63)]
12
+ - CLMS-1634 (bug): fixed the watch zoom for legend function from breaking the map. [ujbolivar - [`a14cf06`](https://github.com/eea/volto-arcgis-block/commit/a14cf06543735b20b85f4ba27c18f75521aa47e4)]
13
+ ### [0.1.115](https://github.com/eea/volto-arcgis-block/compare/0.1.114...0.1.115) - 20 March 2023
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - CLMS-1920 (lint):Ran linting scripts before push [Urkorue - [`e4f2f03`](https://github.com/eea/volto-arcgis-block/commit/e4f2f03be739a8fa4db5dfcc8f88b28f98a5242b)]
18
+ - CLMS-1920 (bug):filters clean when deselecting layers [uorue - [`860ff61`](https://github.com/eea/volto-arcgis-block/commit/860ff61603f0335a7565bef8d7e87afdb2e068d3)]
7
19
  ### [0.1.114](https://github.com/eea/volto-arcgis-block/compare/0.1.113...0.1.114) - 20 March 2023
8
20
 
9
21
  #### :hammer_and_wrench: Others
@@ -468,10 +480,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
468
480
  #### :hammer_and_wrench: Others
469
481
 
470
482
  - Merge pull request #148 from eea/develop [KCarpinteroBM - [`24266fb`](https://github.com/eea/volto-arcgis-block/commit/24266fb3a0c1662d22ae0529dc1d5a25c711cf97)]
483
+ - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`f751f69`](https://github.com/eea/volto-arcgis-block/commit/f751f69f652f0340ae55af6a4dab89d6bdc80906)]
471
484
  - Revert "Revert "Mapviewer menu and map viewer options persistence"" [Mikel Larreategi - [`ad6e440`](https://github.com/eea/volto-arcgis-block/commit/ad6e440cdc160cffb1e86e1b26e501dbe648476c)]
472
485
  - Revert "code coverage removal" [Mikel Larreategi - [`376f2d1`](https://github.com/eea/volto-arcgis-block/commit/376f2d1cd6e4e5110b3b63d5114af1bcfebe094b)]
473
486
  - Revert "Update cypress.json" [Mikel Larreategi - [`43d01a0`](https://github.com/eea/volto-arcgis-block/commit/43d01a0a95a58ef5215c6cbf18223ca30a11b9cc)]
474
487
  - Revert "Update cypress.json" [Mikel Larreategi - [`054c4ae`](https://github.com/eea/volto-arcgis-block/commit/054c4ae1767e1f26e6ec7e96a0e26a9711f29f04)]
488
+ - 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)]
489
+ - revert [JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967 [Mikel Larreategi - [`85ee194`](https://github.com/eea/volto-arcgis-block/commit/85ee1941e029df2b7dc910bf75231c75ffeca8c2)]
475
490
  - Update cypress.json [KCarpinteroBM - [`be285ff`](https://github.com/eea/volto-arcgis-block/commit/be285fff0c53e06a0180d5318cce81195eabcf80)]
476
491
  - Update cypress.json [KCarpinteroBM - [`a7f2118`](https://github.com/eea/volto-arcgis-block/commit/a7f2118acb7b048b4cef85aa9663c2244a1c9ca0)]
477
492
  - linting fix [KCarpinteroBM - [`27e969a`](https://github.com/eea/volto-arcgis-block/commit/27e969a7a411fd4646e0e742ce846efc0d79703e)]
@@ -531,6 +546,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
531
546
  - UX improvements [rodriama - [`151dc4b`](https://github.com/eea/volto-arcgis-block/commit/151dc4b02d0a73fdd66de9d594620ac0fa5f1dbf)]
532
547
  - deleted failing tests [KCarpinteroBM - [`ddaa9e6`](https://github.com/eea/volto-arcgis-block/commit/ddaa9e6f06db6960a4c214d3be2420c48b26715d)]
533
548
  - cleaning unnecessary files [KCarpinteroBM - [`2c02199`](https://github.com/eea/volto-arcgis-block/commit/2c021990912beb02b603a1de89aecd62e0063769)]
549
+ - Reverting to Automated release 0.1.39 [KCarpinteroBM - [`fb9f317`](https://github.com/eea/volto-arcgis-block/commit/fb9f3176ccdea18fceb329eaac13ced0566ee648)]
534
550
  - commands added [KCarpinteroBM - [`049e60b`](https://github.com/eea/volto-arcgis-block/commit/049e60b7d124d1c05abd0b2775b510795f4ed59f)]
535
551
  - Mapviewer testing implementation [KCarpinteroBM - [`0103002`](https://github.com/eea/volto-arcgis-block/commit/0103002869eea108e16e3b5ff2e77a725dcc7c4b)]
536
552
  ### [0.1.39](https://github.com/eea/volto-arcgis-block/compare/0.1.38...0.1.39) - 24 March 2022
@@ -550,6 +566,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
550
566
  - ESLint fix [rodriama - [`75dae9b`](https://github.com/eea/volto-arcgis-block/commit/75dae9b5bba18ab6d9624f6c99714b4bd2179003)]
551
567
  - Remove section title [rodriama - [`ece860e`](https://github.com/eea/volto-arcgis-block/commit/ece860eae3519c7e611abac16e8d53c9a9408b34)]
552
568
  - Es-Lint [manuelmartinezbilbomatica - [`39d8d11`](https://github.com/eea/volto-arcgis-block/commit/39d8d11b9096fd603df8510c119d2e12817415d6)]
569
+ - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`bf9f683`](https://github.com/eea/volto-arcgis-block/commit/bf9f683dd35a9edb4cfd9111affcb8f8edbeae89)]
553
570
  - FEAT: Parser Time implemented [manuelmartinezbilbomatica - [`689c99e`](https://github.com/eea/volto-arcgis-block/commit/689c99e55221fee6c7c7fafc4ab95ae7a646d3dd)]
554
571
  ### [0.1.38](https://github.com/eea/volto-arcgis-block/compare/0.1.37...0.1.38) - 18 March 2022
555
572
 
@@ -644,6 +661,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
644
661
  - ESLint fix [rodriama - [`5fd3772`](https://github.com/eea/volto-arcgis-block/commit/5fd3772f197a3a380067962a5638dbf901a4624e)]
645
662
  - Pixel info [rodriama - [`1ccef39`](https://github.com/eea/volto-arcgis-block/commit/1ccef39a9adcc3ee94655c77a5a166b613600a08)]
646
663
  - NUTS bug fix [rodriama - [`37fe7f3`](https://github.com/eea/volto-arcgis-block/commit/37fe7f3fad2c005e3b7c234b3b0564d5df92fa8c)]
664
+ - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ea5af8b`](https://github.com/eea/volto-arcgis-block/commit/ea5af8b02a5f2ee25b9b0be67cf3792bbbe84ed7)]
647
665
  ### [0.1.23](https://github.com/eea/volto-arcgis-block/compare/0.1.22...0.1.23) - 17 December 2021
648
666
 
649
667
  #### :hammer_and_wrench: Others
@@ -888,6 +906,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
888
906
  - Trying to delay ArcGIS modules load [gonzalezsd - [`ff16985`](https://github.com/eea/volto-arcgis-block/commit/ff169858e42d30bfcacc423ffc27762bb9ef05a4)]
889
907
  - Run bootstrap to fix files [valentinab25 - [`236893f`](https://github.com/eea/volto-arcgis-block/commit/236893f03314eb638b7667f81b1f91491a98ee17)]
890
908
  - fix git_name [valentinab25 - [`c7806c3`](https://github.com/eea/volto-arcgis-block/commit/c7806c312964425dc23e5d4c6973de8b81ddaeac)]
909
+ - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`e3afb51`](https://github.com/eea/volto-arcgis-block/commit/e3afb515dda459ee03e2b5d4b56465d2d4ad1503)]
891
910
  - Trying to change imports [gonzalezsd - [`d83d7e2`](https://github.com/eea/volto-arcgis-block/commit/d83d7e2f68da4b2a284735847f93c0763a7e13b6)]
892
911
  - default design [bipoza - [`88fbe0b`](https://github.com/eea/volto-arcgis-block/commit/88fbe0b2bc73e732e2993324a567f53902e85506)]
893
912
  - 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.114",
3
+ "version": "0.1.116",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -22,7 +22,9 @@ class HotspotWidget extends React.Component {
22
22
  'esri-icon-filter esri-widget--button esri-widget esri-interactive';
23
23
  this.dataKlc_code = null;
24
24
  this.esriLayer_lcc = null;
25
+ this.esriLayer_lcc2 = null;
25
26
  this.esriLayer_lc = null;
27
+ this.esriLayer_lc2 = null;
26
28
  this.subscribedLayers = sessionStorage;
27
29
  this.checkedLayers = this.props.layers
28
30
  ? this.props.layers.checkedLayers
@@ -36,6 +38,7 @@ class HotspotWidget extends React.Component {
36
38
  this.layerModelInit = this.layerModelInit.bind(this);
37
39
  this.handleApplyFilter = this.handleApplyFilter.bind(this);
38
40
  //this.getLayerParameters();
41
+ this.selectedArea = null;
39
42
  }
40
43
 
41
44
  loader() {
@@ -125,6 +128,10 @@ class HotspotWidget extends React.Component {
125
128
  ? 'all_lcc_a_pol'
126
129
  : 'all_lcc_b_pol';
127
130
  if (this.esriLayer_lcc !== null) {
131
+ if (this.esriLayer_lcc2 != null) {
132
+ this.props.map.remove(this.esriLayer_lcc2);
133
+ }
134
+
128
135
  this.esriLayer_lcc.sublayers.items[0].name = this.addLegendName(
129
136
  typeLegend,
130
137
  );
@@ -141,6 +148,7 @@ class HotspotWidget extends React.Component {
141
148
  this.props.map.add(this.esriLayer_lcc);
142
149
  this.props.selectedLayers['lcc_filter'] = this.esriLayer_lcc;
143
150
  this.props.selectedLayers['lcc_filter'].visible = true;
151
+ this.esriLayer_lcc2 = this.esriLayer_lcc;
144
152
  this.layerModelInit();
145
153
  }
146
154
  }
@@ -155,6 +163,9 @@ class HotspotWidget extends React.Component {
155
163
  .value.match(/\d+/g)
156
164
  .map(Number)[0];
157
165
  if (this.esriLayer_lc !== null) {
166
+ if (this.esriLayer_lc2 != null) {
167
+ this.props.map.remove(this.esriLayer_lc2);
168
+ }
158
169
  this.esriLayer_lc.sublayers.items[0].name = this.addLegendName(
159
170
  typeLegend,
160
171
  );
@@ -171,6 +182,7 @@ class HotspotWidget extends React.Component {
171
182
  this.props.map.add(this.esriLayer_lc);
172
183
  this.props.selectedLayers['lc_filter'] = this.esriLayer_lc;
173
184
  this.props.selectedLayers['lc_filter'].visible = true;
185
+ this.esriLayer_lc2 = this.esriLayer_lc;
174
186
  this.layerModelInit();
175
187
  }
176
188
  }
@@ -196,7 +208,7 @@ class HotspotWidget extends React.Component {
196
208
 
197
209
  openMenu() {
198
210
  if (this.state.showMapMenu) {
199
- this.getKLCNames(this.dataJSONNames, this.dataJSONNames[0].node.klc_name);
211
+ this.getKLCNames(this.dataJSONNames, this.selectedArea);
200
212
  this.props.mapViewer.setActiveWidget();
201
213
  this.container.current.querySelector('.right-panel').style.display =
202
214
  'none';
@@ -212,10 +224,7 @@ class HotspotWidget extends React.Component {
212
224
  } else {
213
225
  this.getLayerParameters();
214
226
  if (this.getLayerParameters.length !== 0)
215
- this.getKLCNames(
216
- this.dataJSONNames,
217
- this.dataJSONNames[0].node.klc_name,
218
- );
227
+ this.getKLCNames(this.dataJSONNames, this.selectedArea);
219
228
  this.props.mapViewer.setActiveWidget(this);
220
229
  this.container.current.querySelector('.right-panel').style.display =
221
230
  'flex';
@@ -242,7 +251,10 @@ class HotspotWidget extends React.Component {
242
251
  })
243
252
  .then((data) => {
244
253
  this.dataJSONNames = data.nodes;
245
- this.getKLCNames(data.nodes, data.nodes[0].node.klc_name);
254
+ if (this.selectedArea == null) {
255
+ this.selectedArea = data.nodes[0].node.klc_name;
256
+ }
257
+ this.getKLCNames(data.nodes, this.selectedArea);
246
258
  })
247
259
  .catch(function (error) {
248
260
  /* console.log('error while getting data'); */
@@ -315,6 +327,7 @@ class HotspotWidget extends React.Component {
315
327
  var selectBoxLcTime;
316
328
  var selectBoxHighlightsLcc;
317
329
  var selectBoxLccTime;
330
+ this.selectedArea = selectedOption;
318
331
 
319
332
  selectBox = document.getElementById('select-klc-area');
320
333
  selectBoxHighlightsLcc = document.getElementById(
@@ -323,7 +336,6 @@ class HotspotWidget extends React.Component {
323
336
  selectBoxLccTime = document.getElementById('select-klc-lccTime');
324
337
  selectBoxHighlightsLc = document.getElementById('select-klc-highlights-lc');
325
338
  selectBoxLcTime = document.getElementById('select-klc-lcTime');
326
-
327
339
  for (let i = 0; i < data.length; i++) {
328
340
  var option = data[i].node.klc_name;
329
341
  if (option === selectedOption) {
@@ -332,20 +332,34 @@ class MenuWidget extends React.Component {
332
332
 
333
333
  // add zoomend listener to map to show/hide zoom in message
334
334
  this.view.watch('stationary', (isStationary) => {
335
- if (isStationary) {
336
- let node = document.getElementById('snow-and-ice-zoom-message');
337
- let nodes = document.querySelectorAll('.zoom-in-message-dataset');
335
+ let dropDownActive = sessionStorage.getItem('expandedDropdowns');
336
+ if (isStationary && dropDownActive) {
338
337
  let zoom = this.view.get('zoom');
339
- if (node !== null) {
340
- node.style.display = zoom > 6 ? 'none' : 'block';
338
+ if (dropDownActive.includes('dropdown_2')) {
339
+ let node = document.getElementById('snow-and-ice-zoom-message');
340
+ if (node && node !== null) {
341
+ node.style.display = zoom > 6 ? 'none' : 'block';
342
+ }
341
343
  }
342
- if (nodes !== null) {
343
- nodes.forEach((node) => {
344
- let isChecked = node.parentElement.offsetParent.offsetParent.querySelector(
345
- 'input',
346
- ).checked;
347
- if (isChecked) node.style.display = zoom > 6 ? 'none' : 'block';
348
- });
344
+ if (dropDownActive.includes('dropdown_2_0')) {
345
+ let checks = document
346
+ .getElementById('dropdown_2_0')
347
+ .nextSibling.querySelectorAll('[parentid="map_product_2_0"]');
348
+ let checksList = Array.prototype.slice.call(checks);
349
+ if (checksList && checksList !== null) {
350
+ checksList.forEach((check) => {
351
+ if (check !== null) {
352
+ if (check.checked) {
353
+ let node = Array.prototype.slice.call(
354
+ check.nextSibling.getElementsByClassName(
355
+ 'zoom-in-message-dataset',
356
+ ),
357
+ )[0];
358
+ node.style.display = zoom > 6 ? 'none' : 'block';
359
+ }
360
+ }
361
+ });
362
+ }
349
363
  }
350
364
  }
351
365
  });
@@ -744,7 +758,7 @@ class MenuWidget extends React.Component {
744
758
  });
745
759
  }
746
760
 
747
- /**
761
+ /**elem
748
762
  * Processes the JSON file containing layers info
749
763
  * @returns
750
764
  */
@@ -1568,7 +1582,7 @@ class MenuWidget extends React.Component {
1568
1582
  sessionStorage.removeItem('downloadButtonClicked');
1569
1583
  sessionStorage.removeItem('timeSliderTag');
1570
1584
  this.deleteCheckedLayer(elem.id);
1571
- this.deleteFilteredLayer();
1585
+ this.deleteFilteredLayer(elem.id);
1572
1586
  this.layers[elem.id].opacity = 1;
1573
1587
  this.layers[elem.id].visible = false;
1574
1588
  let mapLayer = this.map.findLayerById(elem.id);
@@ -1582,7 +1596,6 @@ class MenuWidget extends React.Component {
1582
1596
  this.toggleHotspotWidget();
1583
1597
  this.layersReorder();
1584
1598
  this.checkInfoWidget();
1585
-
1586
1599
  // toggle custom legend for WMTS and TMS
1587
1600
  if (
1588
1601
  this.layers[elem.id].ViewService.toLowerCase().includes('wmts') ||
@@ -2506,12 +2519,12 @@ class MenuWidget extends React.Component {
2506
2519
  }
2507
2520
  }
2508
2521
 
2509
- deleteFilteredLayer() {
2522
+ deleteFilteredLayer(layer) {
2510
2523
  let layers = this.layers;
2511
- if (layers['lcc_filter']) {
2524
+ if (layers['lcc_filter'] && layer.includes('all_lcc')) {
2512
2525
  layers['lcc_filter'].visible = false;
2513
2526
  delete layers['lcc_filter'];
2514
- } else if (layers['lc_filter']) {
2527
+ } else if (layers['lc_filter'] && layer.includes('all_present_lc')) {
2515
2528
  layers['lc_filter'].visible = false;
2516
2529
  delete layers['lc_filter'];
2517
2530
  }