@eeacms/volto-arcgis-block 0.1.444 → 0.1.445

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.445](https://github.com/eea/volto-arcgis-block/compare/0.1.444...0.1.445) - 28 April 2026
8
+
7
9
  ### [0.1.444](https://github.com/eea/volto-arcgis-block/compare/0.1.443...0.1.444) - 17 April 2026
8
10
 
9
11
  ### [0.1.443](https://github.com/eea/volto-arcgis-block/compare/0.1.442...0.1.443) - 10 April 2026
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.444",
3
+ "version": "0.1.445",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -286,28 +286,30 @@ class BasemapWidget extends React.Component {
286
286
  return (
287
287
  <>
288
288
  <div ref={this.container} className="basemap-container">
289
- <div tooltip="Basemap gallery" direction="left" type="widget">
290
- <div
291
- // ref={this.basemaps}
292
- className={this.menuClass}
293
- id="map_basemap_button"
294
- aria-label="Basemap gallery"
295
- onClick={this.openMenu.bind(this)}
296
- onKeyDown={(e) => {
297
- if (
298
- !e.altKey &&
299
- e.code !== 'Tab' &&
300
- !e.ctrlKey &&
301
- e.code !== 'Delete' &&
302
- !e.shiftKey &&
303
- !e.code.startsWith('F')
304
- ) {
305
- this.openMenu(this);
306
- }
307
- }}
308
- tabIndex="0"
309
- role="button"
310
- ></div>
289
+ <div className="analysis-group">
290
+ <div tooltip="Basemap gallery" direction="left" type="widget">
291
+ <div
292
+ // ref={this.basemaps}
293
+ className={this.menuClass}
294
+ id="map_basemap_button"
295
+ aria-label="Basemap gallery"
296
+ onClick={this.openMenu.bind(this)}
297
+ onKeyDown={(e) => {
298
+ if (
299
+ !e.altKey &&
300
+ e.code !== 'Tab' &&
301
+ !e.ctrlKey &&
302
+ e.code !== 'Delete' &&
303
+ !e.shiftKey &&
304
+ !e.code.startsWith('F')
305
+ ) {
306
+ this.openMenu(this);
307
+ }
308
+ }}
309
+ tabIndex="0"
310
+ role="button"
311
+ ></div>
312
+ </div>
311
313
  </div>
312
314
  <div className="right-panel">
313
315
  <div className="right-panel-header">
@@ -1291,27 +1291,29 @@ class BookmarkWidget extends React.Component {
1291
1291
  return (
1292
1292
  <>
1293
1293
  <div ref={this.container} className="bookmark-container">
1294
- <div tooltip="Bookmark" direction="left" type="widget">
1295
- <div
1296
- className={this.menuClass}
1297
- id="bookmark_button"
1298
- aria-label="Bookmark"
1299
- onClick={this.openMenu.bind(this)}
1300
- onKeyDown={(e) => {
1301
- if (
1302
- !e.altKey &&
1303
- e.code !== 'Tab' &&
1304
- !e.ctrlKey &&
1305
- e.code !== 'Delete' &&
1306
- !e.shiftKey &&
1307
- !e.code.startsWith('F')
1308
- ) {
1309
- this.openMenu(this);
1310
- }
1311
- }}
1312
- tabIndex="0"
1313
- role="button"
1314
- ></div>
1294
+ <div className="tools-group">
1295
+ <div tooltip="Bookmark" direction="left" type="widget">
1296
+ <div
1297
+ className={this.menuClass}
1298
+ id="bookmark_button"
1299
+ aria-label="Bookmark"
1300
+ onClick={this.openMenu.bind(this)}
1301
+ onKeyDown={(e) => {
1302
+ if (
1303
+ !e.altKey &&
1304
+ e.code !== 'Tab' &&
1305
+ !e.ctrlKey &&
1306
+ e.code !== 'Delete' &&
1307
+ !e.shiftKey &&
1308
+ !e.code.startsWith('F')
1309
+ ) {
1310
+ this.openMenu(this);
1311
+ }
1312
+ }}
1313
+ tabIndex="0"
1314
+ role="button"
1315
+ ></div>
1316
+ </div>
1315
1317
  </div>
1316
1318
  <div className="right-panel">
1317
1319
  <div className="right-panel-header">
@@ -1,5 +1,6 @@
1
1
  import React, { createRef } from 'react';
2
2
  import { loadModules } from 'esri-loader';
3
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
4
 
4
5
  class ErrorReport extends React.Component {
5
6
  constructor(props) {
@@ -14,7 +15,7 @@ class ErrorReport extends React.Component {
14
15
  instructionsText: 'First select a pixel in the data viewer',
15
16
  };
16
17
  this.menuClass =
17
- 'esri-icon-notice-round esri-widget--button esri-widget esri-interactive';
18
+ 'errorreport esri-widget--button esri-widget esri-interactive';
18
19
  this.helpdeskUrl = 'https://land.copernicus.eu/en/contact-service-helpdesk';
19
20
  }
20
21
 
@@ -251,27 +252,31 @@ class ErrorReport extends React.Component {
251
252
  return (
252
253
  <>
253
254
  <div ref={this.container} className="error-report-container">
254
- <div tooltip="Report an issue" direction="left" type="widget">
255
- <div
256
- className={this.menuClass}
257
- id="map_error_report_button"
258
- aria-label="Report an issue"
259
- onClick={this.openMenu.bind(this)}
260
- onKeyDown={(e) => {
261
- if (
262
- !e.altKey &&
263
- e.code !== 'Tab' &&
264
- !e.ctrlKey &&
265
- e.code !== 'Delete' &&
266
- !e.shiftKey &&
267
- !e.code.startsWith('F')
268
- ) {
269
- this.openMenu(this);
270
- }
271
- }}
272
- tabIndex="0"
273
- role="button"
274
- ></div>
255
+ <div className="tools-group">
256
+ <div tooltip="Report an issue" direction="left" type="widget">
257
+ <div
258
+ className={this.menuClass}
259
+ id="map_error_report_button"
260
+ aria-label="Report an issue"
261
+ onClick={this.openMenu.bind(this)}
262
+ onKeyDown={(e) => {
263
+ if (
264
+ !e.altKey &&
265
+ e.code !== 'Tab' &&
266
+ !e.ctrlKey &&
267
+ e.code !== 'Delete' &&
268
+ !e.shiftKey &&
269
+ !e.code.startsWith('F')
270
+ ) {
271
+ this.openMenu(this);
272
+ }
273
+ }}
274
+ tabIndex="0"
275
+ role="button"
276
+ >
277
+ <FontAwesomeIcon icon={['fa', 'comment-dots']} />
278
+ </div>
279
+ </div>
275
280
  </div>
276
281
  <div className="right-panel">
277
282
  <div className="right-panel-header">
@@ -35,6 +35,7 @@ import ErrorReportWidget from './ErrorReportWidget';
35
35
  import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
36
36
  import { getTaxonomy } from '@eeacms/volto-taxonomy/actions';
37
37
  import { fetchCatalogApiDates } from '../../actions';
38
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
38
39
 
39
40
  //import "isomorphic-fetch"; <-- Necessary to use fetch?
40
41
  var Map, MapView, SceneView, Zoom, intl, Basemap, WebTileLayer, Extent;
@@ -647,6 +648,8 @@ class MapViewer extends React.Component {
647
648
  { selector: '.upload-container', position: 'top-right' },
648
649
  { selector: '.viewmode-container', position: 'top-right' },
649
650
  { selector: '.error-report-container', position: 'top-right' },
651
+ { selector: '.analysis-container', position: 'top-right' },
652
+ { selector: '.tools-container', position: 'top-right' },
650
653
  ];
651
654
 
652
655
  uiContainerConfig.forEach(({ selector, position }) => {
@@ -774,6 +777,8 @@ class MapViewer extends React.Component {
774
777
  '.esri-swipe',
775
778
  '.viewmode-container',
776
779
  '#loader',
780
+ '.analysis-container',
781
+ '.tools-container',
777
782
  ];
778
783
 
779
784
  widgetSelectorList.forEach((selector) => {
@@ -1594,6 +1599,20 @@ class MapViewer extends React.Component {
1594
1599
  this.activeWidget = null;
1595
1600
  return;
1596
1601
  }
1602
+ if (
1603
+ !widget.menuClass?.includes('measure') &&
1604
+ !widget.menuClass?.includes('basemap') &&
1605
+ !widget.menuClass?.includes('swap')
1606
+ ) {
1607
+ this.closeAnalysis();
1608
+ }
1609
+ if (
1610
+ !widget.menuClass?.includes('bookmark') &&
1611
+ !widget.menuClass?.includes('errorreport') &&
1612
+ !widget.menuClass?.includes('printer')
1613
+ ) {
1614
+ this.closeTools();
1615
+ }
1597
1616
  if (this.activeWidget === widget) return;
1598
1617
  this.closeActiveWidget();
1599
1618
  this.activeWidget = widget;
@@ -1865,6 +1884,130 @@ class MapViewer extends React.Component {
1865
1884
  );
1866
1885
  }
1867
1886
 
1887
+ renderAnalysis() {
1888
+ if (this.view)
1889
+ return (
1890
+ <div className="analysis-container">
1891
+ <div tooltip="Analysis" direction="left" type="widget">
1892
+ <div
1893
+ tabIndex="0"
1894
+ role="button"
1895
+ className="analysis-widget-button esri-widget--button esri-widget esri-interactive"
1896
+ onClick={this.openAnalysis.bind(this)}
1897
+ onKeyDown={(e) => {
1898
+ if (
1899
+ !e.altKey &&
1900
+ e.code !== 'Tab' &&
1901
+ !e.ctrlKey &&
1902
+ e.code !== 'Delete' &&
1903
+ !e.shiftKey &&
1904
+ !e.code.startsWith('F')
1905
+ ) {
1906
+ this.openAnalysis(this);
1907
+ }
1908
+ }}
1909
+ >
1910
+ <FontAwesomeIcon icon={['fas', 'vial']} />
1911
+ </div>
1912
+ </div>
1913
+ </div>
1914
+ );
1915
+ }
1916
+
1917
+ openAnalysis() {
1918
+ let analysisIcon = document.querySelector('.analysis-widget-button');
1919
+ if (analysisIcon.classList.contains('active-widget')) {
1920
+ this.closeAnalysis();
1921
+ } else {
1922
+ document.querySelector('#map_basemap_button').click();
1923
+ analysisIcon.classList.add('active-widget');
1924
+ document.querySelectorAll('.analysis-group').forEach((widget) => {
1925
+ widget.style.display = 'block';
1926
+ });
1927
+ if (
1928
+ document
1929
+ .querySelector('.tools-widget-button')
1930
+ .classList.contains('active-widget')
1931
+ ) {
1932
+ this.closeTools();
1933
+ }
1934
+ }
1935
+ }
1936
+
1937
+ closeAnalysis() {
1938
+ let analysisIcon = document.querySelector('.analysis-widget-button');
1939
+ analysisIcon.classList.remove('active-widget');
1940
+ document.querySelectorAll('.analysis-group').forEach((widget) => {
1941
+ widget.style.display = 'none';
1942
+ });
1943
+ let button = document.querySelector('#map_basemap_button');
1944
+ if (button.classList.contains('active-widget')) {
1945
+ button.click();
1946
+ }
1947
+ }
1948
+
1949
+ renderTools() {
1950
+ if (this.view)
1951
+ return (
1952
+ <div className="tools-container">
1953
+ <div tooltip="Tools" direction="left" type="widget">
1954
+ <div
1955
+ tabIndex="0"
1956
+ role="button"
1957
+ className="tools-widget-button esri-widget--button esri-widget esri-interactive"
1958
+ onClick={this.openTools.bind(this)}
1959
+ onKeyDown={(e) => {
1960
+ if (
1961
+ !e.altKey &&
1962
+ e.code !== 'Tab' &&
1963
+ !e.ctrlKey &&
1964
+ e.code !== 'Delete' &&
1965
+ !e.shiftKey &&
1966
+ !e.code.startsWith('F')
1967
+ ) {
1968
+ this.openTools(this);
1969
+ }
1970
+ }}
1971
+ >
1972
+ <FontAwesomeIcon icon={['fa', 'toolbox']} />
1973
+ </div>
1974
+ </div>
1975
+ </div>
1976
+ );
1977
+ }
1978
+
1979
+ openTools() {
1980
+ let toolsIcon = document.querySelector('.tools-widget-button');
1981
+ if (toolsIcon.classList.contains('active-widget')) {
1982
+ this.closeTools();
1983
+ } else {
1984
+ document.querySelector('#bookmark_button').click();
1985
+ toolsIcon.classList.add('active-widget');
1986
+ document.querySelectorAll('.tools-group').forEach((widget) => {
1987
+ widget.style.display = 'block';
1988
+ });
1989
+ if (
1990
+ document
1991
+ .querySelector('.analysis-widget-button')
1992
+ .classList.contains('active-widget')
1993
+ ) {
1994
+ this.closeAnalysis();
1995
+ }
1996
+ }
1997
+ }
1998
+
1999
+ closeTools() {
2000
+ let toolsIcon = document.querySelector('.tools-widget-button');
2001
+ toolsIcon.classList.remove('active-widget');
2002
+ document.querySelectorAll('.tools-group').forEach((widget) => {
2003
+ widget.style.display = 'none';
2004
+ });
2005
+ let button = document.querySelector('#bookmark_button');
2006
+ if (button.classList.contains('active-widget')) {
2007
+ button.click();
2008
+ }
2009
+ }
2010
+
1868
2011
  renderViewModeSwitcher() {
1869
2012
  if (!this.view) return null;
1870
2013
 
@@ -1937,6 +2080,8 @@ class MapViewer extends React.Component {
1937
2080
  <CheckUserID reference={this} />
1938
2081
  {this.renderUploadService()}
1939
2082
  {this.renderErrorReport()}
2083
+ {this.renderAnalysis()}
2084
+ {this.renderTools()}
1940
2085
  </>
1941
2086
  )}
1942
2087
  </div>
@@ -358,27 +358,29 @@ class MeasurementWidget extends React.Component {
358
358
  return (
359
359
  <>
360
360
  <div ref={this.container} className="measurement-container">
361
- <div tooltip="Measurement" direction="left" type="widget">
362
- <div
363
- className={this.menuClass}
364
- id="map_measurement_button"
365
- aria-label="Measurement"
366
- onClick={this.openMenu.bind(this)}
367
- onKeyDown={(e) => {
368
- if (
369
- !e.altKey &&
370
- e.code !== 'Tab' &&
371
- !e.ctrlKey &&
372
- e.code !== 'Delete' &&
373
- !e.shiftKey &&
374
- !e.code.startsWith('F')
375
- ) {
376
- this.openMenu(this);
377
- }
378
- }}
379
- tabIndex="0"
380
- role="button"
381
- ></div>
361
+ <div className="analysis-group">
362
+ <div tooltip="Measurement" direction="left" type="widget">
363
+ <div
364
+ className={this.menuClass}
365
+ id="map_measurement_button"
366
+ aria-label="Measurement"
367
+ onClick={this.openMenu.bind(this)}
368
+ onKeyDown={(e) => {
369
+ if (
370
+ !e.altKey &&
371
+ e.code !== 'Tab' &&
372
+ !e.ctrlKey &&
373
+ e.code !== 'Delete' &&
374
+ !e.shiftKey &&
375
+ !e.code.startsWith('F')
376
+ ) {
377
+ this.openMenu(this);
378
+ }
379
+ }}
380
+ tabIndex="0"
381
+ role="button"
382
+ ></div>
383
+ </div>
382
384
  </div>
383
385
  <div className="right-panel">
384
386
  <div className="right-panel-header">
@@ -252,27 +252,29 @@ class PrintWidget extends React.Component {
252
252
  return (
253
253
  <>
254
254
  <div ref={this.container} className="print-container">
255
- <div tooltip="Print" direction="left" type="widget">
256
- <div
257
- className={this.menuClass}
258
- id="map_print_button"
259
- aria-label="Print"
260
- onClick={this.openMenu.bind(this)}
261
- onKeyDown={(e) => {
262
- if (
263
- !e.altKey &&
264
- e.code !== 'Tab' &&
265
- !e.ctrlKey &&
266
- e.code !== 'Delete' &&
267
- !e.shiftKey &&
268
- !e.code.startsWith('F')
269
- ) {
270
- this.openMenu(this);
271
- }
272
- }}
273
- tabIndex="0"
274
- role="button"
275
- ></div>
255
+ <div className="tools-group">
256
+ <div tooltip="Print" direction="left" type="widget">
257
+ <div
258
+ className={this.menuClass}
259
+ id="map_print_button"
260
+ aria-label="Print"
261
+ onClick={this.openMenu.bind(this)}
262
+ onKeyDown={(e) => {
263
+ if (
264
+ !e.altKey &&
265
+ e.code !== 'Tab' &&
266
+ !e.ctrlKey &&
267
+ e.code !== 'Delete' &&
268
+ !e.shiftKey &&
269
+ !e.code.startsWith('F')
270
+ ) {
271
+ this.openMenu(this);
272
+ }
273
+ }}
274
+ tabIndex="0"
275
+ role="button"
276
+ ></div>
277
+ </div>
276
278
  </div>
277
279
  <div className="right-panel">
278
280
  <div className="right-panel-header">
@@ -512,27 +512,29 @@ class SwipeWidget extends React.Component {
512
512
  return (
513
513
  <>
514
514
  <div ref={this.container} className="swipe-container">
515
- <div tooltip="Swipe" direction="left" type="widget">
516
- <div
517
- className={this.menuClass}
518
- id="map_swipe_button"
519
- aria-label="Swipe"
520
- onClick={this.openMenu.bind(this)} //aqui deberían ir ocultar panel y mas abajo cerrar (pasar a 3d)
521
- onKeyDown={(e) => {
522
- if (
523
- !e.altKey &&
524
- e.code !== 'Tab' &&
525
- !e.ctrlKey &&
526
- e.code !== 'Delete' &&
527
- !e.shiftKey &&
528
- !e.code.startsWith('F')
529
- ) {
530
- this.openMenu(this);
531
- }
532
- }}
533
- tabIndex="0"
534
- role="button"
535
- ></div>
515
+ <div className="analysis-group">
516
+ <div tooltip="Swipe" direction="left" type="widget">
517
+ <div
518
+ className={this.menuClass}
519
+ id="map_swipe_button"
520
+ aria-label="Swipe"
521
+ onClick={this.openMenu.bind(this)} //aqui deberían ir ocultar panel y mas abajo cerrar (pasar a 3d)
522
+ onKeyDown={(e) => {
523
+ if (
524
+ !e.altKey &&
525
+ e.code !== 'Tab' &&
526
+ !e.ctrlKey &&
527
+ e.code !== 'Delete' &&
528
+ !e.shiftKey &&
529
+ !e.code.startsWith('F')
530
+ ) {
531
+ this.openMenu(this);
532
+ }
533
+ }}
534
+ tabIndex="0"
535
+ role="button"
536
+ ></div>
537
+ </div>
536
538
  </div>
537
539
  {/* Al final el IF lo añadiremos aqui en estos OpenMenu */}
538
540
  <div className="right-panel">
@@ -81,34 +81,56 @@
81
81
  order: 2;
82
82
  }
83
83
 
84
- .measurement-container {
84
+ .viewmode-container {
85
+ display: flex;
85
86
  order: 3;
87
+ padding: 0;
86
88
  }
87
89
 
88
- .print-container {
90
+ .upload-container {
89
91
  order: 4;
90
92
  }
91
93
 
92
- .basemap-container {
94
+ .info-container {
93
95
  order: 5;
94
96
  }
95
97
 
96
- .info-container {
98
+ .hotspot-container {
97
99
  order: 6;
98
100
  }
99
101
 
100
- .bookmark-container {
102
+ .analysis-container {
101
103
  order: 7;
102
104
  }
103
105
 
104
- .upload-container {
106
+ .tools-container {
105
107
  order: 8;
106
108
  }
107
109
 
108
- .viewmode-container {
109
- display: flex;
110
+ .basemap-container {
110
111
  order: 9;
111
- padding: 0;
112
+ }
113
+
114
+ .measurement-container {
115
+ order: 10;
116
+ }
117
+
118
+ .swipe-container {
119
+ order: 11;
120
+ }
121
+
122
+ .bookmark-container {
123
+ order: 12;
124
+ box-shadow: none !important;
125
+ }
126
+
127
+ .print-container {
128
+ order: 13;
129
+ }
130
+
131
+ .error-report-container {
132
+ order: 14;
133
+ box-shadow: none !important;
112
134
  }
113
135
 
114
136
  .viewmode-floating-container {
@@ -175,6 +197,20 @@
175
197
  margin: 0;
176
198
  }
177
199
 
200
+ .analysis-group {
201
+ position: relative;
202
+ right: 3rem !important;
203
+ bottom: 8.6rem !important;
204
+ display: none;
205
+ }
206
+
207
+ .tools-group {
208
+ position: relative;
209
+ right: 3rem !important;
210
+ bottom: 10.5rem !important;
211
+ display: none;
212
+ }
213
+
178
214
  /* Measure */
179
215
  .measurement-panel {
180
216
  margin-top: -1rem;
@@ -1940,6 +1976,9 @@ div.map-container.popup-block {
1940
1976
  */
1941
1977
 
1942
1978
  /*Swipe*/
1979
+ .swipe-container {
1980
+ box-shadow: none !important;
1981
+ }
1943
1982
 
1944
1983
  .swipe-container .esri-button {
1945
1984
  border: none;