@eeacms/volto-arcgis-block 0.1.297 → 0.1.299

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,13 @@ 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.299](https://github.com/eea/volto-arcgis-block/compare/0.1.298...0.1.299) - 5 August 2024
8
+
9
+ ### [0.1.298](https://github.com/eea/volto-arcgis-block/compare/0.1.297...0.1.298) - 18 July 2024
10
+
11
+ #### :hammer_and_wrench: Others
12
+
13
+ - CLMS-271329 (bug): Fixed site crash when leaving data viewer without waiting for menu loading to be completed [Unai Bolivar - [`b72d0bc`](https://github.com/eea/volto-arcgis-block/commit/b72d0bc1c1399eceabe7a4b679dba58ff1f2ba9c)]
7
14
  ### [0.1.297](https://github.com/eea/volto-arcgis-block/compare/0.1.296...0.1.297) - 16 July 2024
8
15
 
9
16
  #### :hammer_and_wrench: Others
@@ -278,13 +285,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
278
285
  #### :hammer_and_wrench: Others
279
286
 
280
287
  - 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)]
281
- - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`8a0855d`](https://github.com/eea/volto-arcgis-block/commit/8a0855dfe47ec58a596ae0ec360ba8f8d075e991)]
282
- - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`3cfe9be`](https://github.com/eea/volto-arcgis-block/commit/3cfe9be4c6d4ace0ef83b452ebdd5b06025123aa)]
283
288
  ### [0.1.245](https://github.com/eea/volto-arcgis-block/compare/0.1.244...0.1.245) - 4 January 2024
284
289
 
285
290
  #### :hammer_and_wrench: Others
286
291
 
287
- - test: [JENKINS] fix jest config, fail with logs on coverage [valentinab25 - [`a93b081`](https://github.com/eea/volto-arcgis-block/commit/a93b0819eaa765c92bc25cf195f7a43fcd1dddbd)]
288
292
  ### [0.1.244](https://github.com/eea/volto-arcgis-block/compare/0.1.243...0.1.244) - 19 December 2023
289
293
 
290
294
  ### [0.1.243](https://github.com/eea/volto-arcgis-block/compare/0.1.242...0.1.243) - 15 December 2023
@@ -324,7 +328,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
324
328
 
325
329
  #### :hammer_and_wrench: Others
326
330
 
327
- - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`f45d4bf`](https://github.com/eea/volto-arcgis-block/commit/f45d4bf42061d13d9c18554bef692cb40b3a6fb7)]
328
331
  ### [0.1.235](https://github.com/eea/volto-arcgis-block/compare/0.1.234...0.1.235) - 16 November 2023
329
332
 
330
333
  ### [0.1.234](https://github.com/eea/volto-arcgis-block/compare/0.1.233...0.1.234) - 15 November 2023
@@ -1398,13 +1401,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1398
1401
  #### :hammer_and_wrench: Others
1399
1402
 
1400
1403
  - Merge pull request #148 from eea/develop [KCarpinteroBM - [`24266fb`](https://github.com/eea/volto-arcgis-block/commit/24266fb3a0c1662d22ae0529dc1d5a25c711cf97)]
1401
- - Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`f751f69`](https://github.com/eea/volto-arcgis-block/commit/f751f69f652f0340ae55af6a4dab89d6bdc80906)]
1402
1404
  - Revert "Revert "Mapviewer menu and map viewer options persistence"" [Mikel Larreategi - [`ad6e440`](https://github.com/eea/volto-arcgis-block/commit/ad6e440cdc160cffb1e86e1b26e501dbe648476c)]
1403
1405
  - Revert "code coverage removal" [Mikel Larreategi - [`376f2d1`](https://github.com/eea/volto-arcgis-block/commit/376f2d1cd6e4e5110b3b63d5114af1bcfebe094b)]
1404
1406
  - Revert "Update cypress.json" [Mikel Larreategi - [`43d01a0`](https://github.com/eea/volto-arcgis-block/commit/43d01a0a95a58ef5215c6cbf18223ca30a11b9cc)]
1405
1407
  - Revert "Update cypress.json" [Mikel Larreategi - [`054c4ae`](https://github.com/eea/volto-arcgis-block/commit/054c4ae1767e1f26e6ec7e96a0e26a9711f29f04)]
1406
- - 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)]
1407
- - revert [JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967 [Mikel Larreategi - [`85ee194`](https://github.com/eea/volto-arcgis-block/commit/85ee1941e029df2b7dc910bf75231c75ffeca8c2)]
1408
1408
  - Update cypress.json [KCarpinteroBM - [`be285ff`](https://github.com/eea/volto-arcgis-block/commit/be285fff0c53e06a0180d5318cce81195eabcf80)]
1409
1409
  - Update cypress.json [KCarpinteroBM - [`a7f2118`](https://github.com/eea/volto-arcgis-block/commit/a7f2118acb7b048b4cef85aa9663c2244a1c9ca0)]
1410
1410
  - linting fix [KCarpinteroBM - [`27e969a`](https://github.com/eea/volto-arcgis-block/commit/27e969a7a411fd4646e0e742ce846efc0d79703e)]
@@ -1464,7 +1464,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1464
1464
  - UX improvements [rodriama - [`151dc4b`](https://github.com/eea/volto-arcgis-block/commit/151dc4b02d0a73fdd66de9d594620ac0fa5f1dbf)]
1465
1465
  - deleted failing tests [KCarpinteroBM - [`ddaa9e6`](https://github.com/eea/volto-arcgis-block/commit/ddaa9e6f06db6960a4c214d3be2420c48b26715d)]
1466
1466
  - cleaning unnecessary files [KCarpinteroBM - [`2c02199`](https://github.com/eea/volto-arcgis-block/commit/2c021990912beb02b603a1de89aecd62e0063769)]
1467
- - Reverting to Automated release 0.1.39 [KCarpinteroBM - [`fb9f317`](https://github.com/eea/volto-arcgis-block/commit/fb9f3176ccdea18fceb329eaac13ced0566ee648)]
1468
1467
  - commands added [KCarpinteroBM - [`049e60b`](https://github.com/eea/volto-arcgis-block/commit/049e60b7d124d1c05abd0b2775b510795f4ed59f)]
1469
1468
  - Mapviewer testing implementation [KCarpinteroBM - [`0103002`](https://github.com/eea/volto-arcgis-block/commit/0103002869eea108e16e3b5ff2e77a725dcc7c4b)]
1470
1469
  ### [0.1.39](https://github.com/eea/volto-arcgis-block/compare/0.1.38...0.1.39) - 24 March 2022
@@ -1484,7 +1483,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1484
1483
  - ESLint fix [rodriama - [`75dae9b`](https://github.com/eea/volto-arcgis-block/commit/75dae9b5bba18ab6d9624f6c99714b4bd2179003)]
1485
1484
  - Remove section title [rodriama - [`ece860e`](https://github.com/eea/volto-arcgis-block/commit/ece860eae3519c7e611abac16e8d53c9a9408b34)]
1486
1485
  - Es-Lint [manuelmartinezbilbomatica - [`39d8d11`](https://github.com/eea/volto-arcgis-block/commit/39d8d11b9096fd603df8510c119d2e12817415d6)]
1487
- - Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`bf9f683`](https://github.com/eea/volto-arcgis-block/commit/bf9f683dd35a9edb4cfd9111affcb8f8edbeae89)]
1488
1486
  - FEAT: Parser Time implemented [manuelmartinezbilbomatica - [`689c99e`](https://github.com/eea/volto-arcgis-block/commit/689c99e55221fee6c7c7fafc4ab95ae7a646d3dd)]
1489
1487
  ### [0.1.38](https://github.com/eea/volto-arcgis-block/compare/0.1.37...0.1.38) - 18 March 2022
1490
1488
 
@@ -1579,7 +1577,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1579
1577
  - ESLint fix [rodriama - [`5fd3772`](https://github.com/eea/volto-arcgis-block/commit/5fd3772f197a3a380067962a5638dbf901a4624e)]
1580
1578
  - Pixel info [rodriama - [`1ccef39`](https://github.com/eea/volto-arcgis-block/commit/1ccef39a9adcc3ee94655c77a5a166b613600a08)]
1581
1579
  - NUTS bug fix [rodriama - [`37fe7f3`](https://github.com/eea/volto-arcgis-block/commit/37fe7f3fad2c005e3b7c234b3b0564d5df92fa8c)]
1582
- - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`ea5af8b`](https://github.com/eea/volto-arcgis-block/commit/ea5af8b02a5f2ee25b9b0be67cf3792bbbe84ed7)]
1583
1580
  ### [0.1.23](https://github.com/eea/volto-arcgis-block/compare/0.1.22...0.1.23) - 17 December 2021
1584
1581
 
1585
1582
  #### :hammer_and_wrench: Others
@@ -1824,7 +1821,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
1824
1821
  - Trying to delay ArcGIS modules load [gonzalezsd - [`ff16985`](https://github.com/eea/volto-arcgis-block/commit/ff169858e42d30bfcacc423ffc27762bb9ef05a4)]
1825
1822
  - Run bootstrap to fix files [valentinab25 - [`236893f`](https://github.com/eea/volto-arcgis-block/commit/236893f03314eb638b7667f81b1f91491a98ee17)]
1826
1823
  - fix git_name [valentinab25 - [`c7806c3`](https://github.com/eea/volto-arcgis-block/commit/c7806c312964425dc23e5d4c6973de8b81ddaeac)]
1827
- - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`e3afb51`](https://github.com/eea/volto-arcgis-block/commit/e3afb515dda459ee03e2b5d4b56465d2d4ad1503)]
1828
1824
  - Trying to change imports [gonzalezsd - [`d83d7e2`](https://github.com/eea/volto-arcgis-block/commit/d83d7e2f68da4b2a284735847f93c0763a7e13b6)]
1829
1825
  - default design [bipoza - [`88fbe0b`](https://github.com/eea/volto-arcgis-block/commit/88fbe0b2bc73e732e2993324a567f53902e85506)]
1830
1826
  - 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.297",
3
+ "version": "0.1.299",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -1,7 +1,7 @@
1
1
  import React, { createRef } from 'react';
2
2
  import { loadModules } from 'esri-loader';
3
- // import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
4
+ // import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
5
 
6
6
  var Graphic,
7
7
  Extent,
@@ -816,29 +816,10 @@ class AreaWidget extends React.Component {
816
816
 
817
817
  removeNutsLayers() {
818
818
  //find all the radio buttons
819
-
820
- let radioButtons = document.querySelectorAll('fieldset.ccl-fieldset');
821
- let rectangleRadioButton = document.querySelector(
822
- '#download_area_select_rectangle',
823
- );
824
- // Isolate the the checked radio button
825
-
826
- let selectedRadioButton = Array.from(radioButtons).find((radioButton) => {
827
- let input = radioButton.querySelector('input');
828
- return input && input.type === 'radio' && input.checked;
819
+ let radioButtons = document.querySelectorAll('.area-radio');
820
+ radioButtons.forEach((button) => {
821
+ button.checked = false;
829
822
  });
830
-
831
- //Uncheck the selected radio button
832
-
833
- if (selectedRadioButton) {
834
- selectedRadioButton.querySelector('input').checked = false;
835
- }
836
- if (rectangleRadioButton.checked) {
837
- rectangleRadioButton.checked = false;
838
- }
839
-
840
- //Remove the layers in this.nutsGroupLayer from the map
841
-
842
823
  this.clearWidget();
843
824
  }
844
825
 
@@ -1250,7 +1231,7 @@ class AreaWidget extends React.Component {
1250
1231
  id="download_prepackage"
1251
1232
  name="downloadAreaSelect"
1252
1233
  value="prepackage"
1253
- className="ccl-checkbox ccl-required ccl-form-check-input"
1234
+ className="ccl-checkbox ccl-required ccl-form-check-input area-radio"
1254
1235
  onClick={this.prepackageButton.bind(this)}
1255
1236
  ></input>
1256
1237
  <label
@@ -1281,7 +1262,7 @@ class AreaWidget extends React.Component {
1281
1262
  id="download_area_select_nuts0"
1282
1263
  name="downloadAreaSelect"
1283
1264
  value="nuts0"
1284
- className="ccl-checkbox cl-required ccl-form-check-input"
1265
+ className="ccl-checkbox cl-required ccl-form-check-input area-radio"
1285
1266
  defaultChecked
1286
1267
  onClick={this.nuts0handler.bind(this)}
1287
1268
  ></input>
@@ -1298,7 +1279,7 @@ class AreaWidget extends React.Component {
1298
1279
  id="download_area_select_nuts"
1299
1280
  name="downloadAreaSelect"
1300
1281
  value="nuts"
1301
- className="ccl-checkbox cl-required ccl-form-check-input"
1282
+ className="ccl-checkbox cl-required ccl-form-check-input area-radio"
1302
1283
  onClick={this.nutsRadioButtonGeneral.bind(this)}
1303
1284
  ></input>
1304
1285
  <label
@@ -1328,7 +1309,7 @@ class AreaWidget extends React.Component {
1328
1309
  id="download_area_select_nuts1"
1329
1310
  name="downloadAreaSelectNuts"
1330
1311
  value="nuts1"
1331
- className="ccl-checkbox ccl-required ccl-form-check-input"
1312
+ className="ccl-checkbox ccl-required ccl-form-check-input area-radio"
1332
1313
  onClick={this.nuts1handler.bind(this)}
1333
1314
  ></input>
1334
1315
  <label
@@ -1344,7 +1325,7 @@ class AreaWidget extends React.Component {
1344
1325
  id="download_area_select_nuts2"
1345
1326
  name="downloadAreaSelectNuts"
1346
1327
  value="nuts2"
1347
- className="ccl-checkbox ccl-required ccl-form-check-input"
1328
+ className="ccl-checkbox ccl-required ccl-form-check-input area-radio"
1348
1329
  onClick={this.nuts2handler.bind(this)}
1349
1330
  ></input>
1350
1331
  <label
@@ -1360,7 +1341,7 @@ class AreaWidget extends React.Component {
1360
1341
  id="download_area_select_nuts3"
1361
1342
  name="downloadAreaSelectNuts"
1362
1343
  value="nuts3"
1363
- className="ccl-radio ccl-required ccl-form-check-input"
1344
+ className="ccl-radio ccl-required ccl-form-check-input area-radio"
1364
1345
  onClick={this.nuts3handler.bind(this)}
1365
1346
  ></input>
1366
1347
  <label
@@ -1376,7 +1357,7 @@ class AreaWidget extends React.Component {
1376
1357
  </div>
1377
1358
  <div className="area-header2">
1378
1359
  <div className="area-dot">·</div>
1379
- Type country or region code:
1360
+ Type country code or region code:
1380
1361
  </div>
1381
1362
  <div className="area-search-block">
1382
1363
  <input
@@ -1417,7 +1398,7 @@ class AreaWidget extends React.Component {
1417
1398
  id="download_area_select_rectangle"
1418
1399
  name="downloadAreaSelect"
1419
1400
  value="area"
1420
- className="ccl-radio ccl-required ccl-form-check-input"
1401
+ className="ccl-radio ccl-required ccl-form-check-input area-radio"
1421
1402
  onClick={this.rectanglehandler.bind(this)}
1422
1403
  ></input>
1423
1404
  <label
@@ -3,8 +3,8 @@ import { loadModules } from 'esri-loader';
3
3
  import { Loader } from 'semantic-ui-react';
4
4
  import loadable from '@loadable/component';
5
5
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
6
- // import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
7
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
6
+ import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
7
+ // import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
8
 
9
9
  var GeometryEngine, Graphic, esriRequest;
10
10
 
@@ -1,7 +1,7 @@
1
1
  import ReactDOM from 'react-dom';
2
2
  import React, { createRef } from 'react';
3
- // import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
4
+ // import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
5
  import { loadModules, loadCss } from 'esri-loader';
6
6
  import useCartState from '@eeacms/volto-clms-utils/cart/useCartState';
7
7
  import { Modal, Popup } from 'semantic-ui-react';
@@ -593,18 +593,28 @@ class MenuWidget extends React.Component {
593
593
  storePanelScroll() {
594
594
  let paneles = document.querySelector('#paneles');
595
595
  var selected_tab = document.querySelector('.tab-selected');
596
- let toc_panel_scrolls =
597
- JSON.parse(sessionStorage.getItem('toc_panel_scrolls')) || {};
598
- toc_panel_scrolls[selected_tab.id] = paneles.scrollTop;
599
- sessionStorage.setItem(
600
- 'toc_panel_scrolls',
601
- JSON.stringify(toc_panel_scrolls),
602
- );
596
+
597
+ if (!paneles || !selected_tab) {
598
+ return;
599
+ } else if (paneles && selected_tab) {
600
+ let toc_panel_scrolls =
601
+ JSON.parse(sessionStorage.getItem('toc_panel_scrolls')) || {};
602
+ toc_panel_scrolls[selected_tab.id] = paneles.scrollTop;
603
+ sessionStorage.setItem(
604
+ 'toc_panel_scrolls',
605
+ JSON.stringify(toc_panel_scrolls),
606
+ );
607
+ }
603
608
  }
604
609
 
605
610
  restorePanelScroll() {
606
611
  let paneles = document.querySelector('#paneles');
607
612
  var selected_tab = document.querySelector('.tab-selected');
613
+
614
+ if (!paneles || !selected_tab) {
615
+ return;
616
+ }
617
+
608
618
  let toc_panel_scrolls =
609
619
  JSON.parse(sessionStorage.getItem('toc_panel_scrolls')) || {};
610
620
  let scroll = toc_panel_scrolls[selected_tab.id];
@@ -644,16 +654,35 @@ class MenuWidget extends React.Component {
644
654
  // and ensure that the component is rendered again
645
655
  this.setState({ showMapMenu: false });
646
656
  } else {
647
- this.container.current.querySelector('#tabcontainer').style.display =
648
- 'block';
649
- this.container.current.querySelector('#paneles').style.display =
650
- 'block';
651
- this.container.current
652
- .querySelector('.esri-widget--button')
653
- .classList.replace('esri-icon-drag-horizontal', 'esri-icon-close');
654
- if (document.contains(document.querySelector('.timeslider-container')))
655
- document.querySelector('.timeslider-container').style.display =
656
- 'block';
657
+ const container = this.container.current;
658
+ const tabContainer = container.querySelector('#tabcontainer');
659
+ const paneles = container.querySelector('#paneles');
660
+ const esriWidgetButton = container.querySelector(
661
+ '.esri-widget--button',
662
+ );
663
+ const timeSliderContainer = document.querySelector(
664
+ '.timeslider-container',
665
+ );
666
+
667
+ if (tabContainer) {
668
+ tabContainer.style.display = 'block';
669
+ }
670
+
671
+ if (paneles) {
672
+ paneles.style.display = 'block';
673
+ }
674
+
675
+ if (esriWidgetButton) {
676
+ esriWidgetButton.classList.replace(
677
+ 'esri-icon-drag-horizontal',
678
+ 'esri-icon-close',
679
+ );
680
+ }
681
+
682
+ if (timeSliderContainer && document.contains(timeSliderContainer)) {
683
+ timeSliderContainer.style.display = 'block';
684
+ }
685
+
657
686
  this.restorePanelScroll();
658
687
 
659
688
  // By invoking the setState, we notify the state we want to reach
@@ -1,7 +1,7 @@
1
1
  import React, { createRef } from 'react';
2
2
  import { Loader } from 'semantic-ui-react';
3
- // import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
+ import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
4
+ // import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
5
 
6
6
  let layerControl,
7
7
  navigationControl,
@@ -536,7 +536,7 @@ class UseCasesMapViewer extends React.Component {
536
536
  }
537
537
  });
538
538
  } else if (this.state.useCaseLevel === 2) {
539
- if (document.querySelector('.esri-popup').hasChildNodes()) {
539
+ if (document.querySelector('.esri-popup')?.hasChildNodes()) {
540
540
  view.popup.close();
541
541
  }
542
542
  view.hitTest(screenPoint).then((response) => {