@eeacms/volto-arcgis-block 0.1.101 → 0.1.102

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,14 @@ 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.102](https://github.com/eea/volto-arcgis-block/compare/0.1.101...0.1.102) - 21 February 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - SPRINT-42 FIX: Passed linting and precommit [ujbolivar - [`d79f9c1`](https://github.com/eea/volto-arcgis-block/commit/d79f9c105082f5d78a2982fd815ed981f65c7d94)]
12
+ - SPRINT-42 FIX: final touches before first commit for testing in development env [ujbolivar - [`ae24c5e`](https://github.com/eea/volto-arcgis-block/commit/ae24c5e02296f32f6a21ae88c1eca3377a58c3c3)]
13
+ - SPRINT-42 FIX: Solution to be uploaded for testing in development environment [ujbolivar - [`2d0b377`](https://github.com/eea/volto-arcgis-block/commit/2d0b37786cc17bedbd65fca1224518a43e738af4)]
14
+ - FIX: If user has selected the time slider, and has had to log in, when returning, timeslider should open automatically [ujbolivar - [`46ad898`](https://github.com/eea/volto-arcgis-block/commit/46ad89838768bc659303d7fdaeb6bb2a30606fd3)]
7
15
  ### [0.1.101](https://github.com/eea/volto-arcgis-block/compare/0.1.100...0.1.101) - 20 February 2023
8
16
 
9
17
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.101",
3
+ "version": "0.1.102",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -482,6 +482,35 @@ class MenuWidget extends React.Component {
482
482
  this.loadVisibility();
483
483
  }
484
484
 
485
+ /**
486
+ * Active on map is tab and time slider widget is opened by default if the user selected time slider and is coming back from the EU pass login
487
+ */
488
+
489
+ componentDidUpdate(prevProps) {
490
+ if (this.props !== prevProps) {
491
+ let isLoggedIn = document
492
+ .querySelector('[defcheck=' + this.props.elem.id + ']')
493
+ .parentElement.querySelector('.map-menu-icon-login')
494
+ .classList.contains('logged');
495
+ if (this.props.sliderIsActive && isLoggedIn) {
496
+ let event = new MouseEvent('click', {
497
+ view: window,
498
+ bubbles: true,
499
+ cancelable: false,
500
+ });
501
+ let el = document.getElementById('active_label');
502
+ el.dispatchEvent(event);
503
+ this.showTimeSlider();
504
+ }
505
+ }
506
+ }
507
+
508
+ setActiveSlider(val) {
509
+ if (!sessionStorage.key('sliderIsActive'))
510
+ sessionStorage.setItem('sliderIsActive', 'false');
511
+ sessionStorage.setItem('sliderIsActive', val);
512
+ }
513
+
485
514
  /**
486
515
  * Close opacity panel if user clicks outside
487
516
  */
@@ -1851,7 +1880,14 @@ class MenuWidget extends React.Component {
1851
1880
  * @param {*} e From the click event
1852
1881
  * @param {*} id id from elem
1853
1882
  */
1883
+
1854
1884
  showTimeSlider(elem, fromDownload) {
1885
+ if (
1886
+ sessionStorage.key('sliderIsActive') &&
1887
+ sessionStorage.getItem('sliderIsActive') === 'false'
1888
+ )
1889
+ this.setActiveSlider(true);
1890
+ else this.setActiveSlider(false);
1855
1891
  let activeLayers = document.querySelectorAll('.active-layer');
1856
1892
  let group = this.getGroup(elem);
1857
1893
  let groupLayers = this.getGroupLayers(group);