@eeacms/volto-arcgis-block 0.1.119 → 0.1.120

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,11 @@ 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.120](https://github.com/eea/volto-arcgis-block/compare/0.1.119...0.1.120) - 23 March 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - CLMS-1765 (fix):TOC menu for datasets with no service but downloadable takes into account the settings [Urkorue - [`cf4949a`](https://github.com/eea/volto-arcgis-block/commit/cf4949a98b0c181760fbcf6044532c599450781e)]
7
12
  ### [0.1.119](https://github.com/eea/volto-arcgis-block/compare/0.1.118...0.1.119) - 22 March 2023
8
13
 
9
14
  #### :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.119",
3
+ "version": "0.1.120",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -819,11 +819,7 @@ class MenuWidget extends React.Component {
819
819
  // CLMS-1544
820
820
  // dont show the product if all of its datasets has the auxiliary service as its ViewService URL
821
821
  const isAuxiliary = (dataset) =>
822
- dataset.ViewService.toLowerCase() ===
823
- 'https://trial.discomap.eea.europa.eu/arcgis/services/clms/worldcountries/mapserver/wmsserver' ||
824
- dataset.ViewService.toLowerCase() ===
825
- 'https://trial.discomap.eea.europa.eu/arcgis/services/clms/worldcountries/mapserver/wmsserver?';
826
-
822
+ !dataset.MarkAsDownloadableNoServiceToVisualize;
827
823
  if (!component.Products[i].Datasets.every(isAuxiliary)) {
828
824
  products.push(
829
825
  this.metodProcessProduct(
@@ -898,14 +894,8 @@ class MenuWidget extends React.Component {
898
894
  var idDataset = 'map_dataset_' + inheritedIndexProduct + '_' + index;
899
895
  dataset_def.push(idDataset);
900
896
  }
901
-
902
897
  // CLMS-1545
903
- if (
904
- product.Datasets[i].ViewService.toLowerCase() !==
905
- 'https://trial.discomap.eea.europa.eu/arcgis/services/clms/worldcountries/mapserver/wmsserver' &&
906
- product.Datasets[i].ViewService.toLowerCase() !==
907
- 'https://trial.discomap.eea.europa.eu/arcgis/services/clms/worldcountries/mapserver/wmsserver?'
908
- ) {
898
+ if (product.Datasets[i].MarkAsDownloadableNoServiceToVisualize) {
909
899
  datasets.push(
910
900
  this.metodProcessDataset(
911
901
  product.Datasets[i],
@@ -1901,7 +1891,7 @@ class MenuWidget extends React.Component {
1901
1891
  * Method to show Active Layers of the map
1902
1892
  * @param {*} elem From the click event
1903
1893
  */
1904
- addActiveLayer(elem, order, fromDownload) {
1894
+ addActiveLayer(elem, order, fromDownload, hideCalendar) {
1905
1895
  return (
1906
1896
  <div
1907
1897
  className="active-layer"
@@ -1992,7 +1982,12 @@ class MenuWidget extends React.Component {
1992
1982
  />
1993
1983
  </span>
1994
1984
  {this.timeLayers[elem.id][1] === 'stop' &&
1995
- this.renderTimeslider(elem, this.layers[elem.id], fromDownload)}
1985
+ this.renderTimeslider(
1986
+ elem,
1987
+ this.layers[elem.id],
1988
+ fromDownload,
1989
+ hideCalendar,
1990
+ )}
1996
1991
  </div>
1997
1992
  </div>
1998
1993
  );
@@ -2128,7 +2123,7 @@ class MenuWidget extends React.Component {
2128
2123
  * @param {*} id id from elem
2129
2124
  */
2130
2125
 
2131
- showTimeSlider(elem, fromDownload) {
2126
+ showTimeSlider(elem, fromDownload, hideCalendar) {
2132
2127
  if (
2133
2128
  sessionStorage.key('timeSliderTag') &&
2134
2129
  sessionStorage.getItem('timeSliderTag') === 'true'
@@ -2168,6 +2163,7 @@ class MenuWidget extends React.Component {
2168
2163
  elem,
2169
2164
  order,
2170
2165
  fromDownload,
2166
+ hideCalendar,
2171
2167
  );
2172
2168
  } else {
2173
2169
  if (
@@ -2741,7 +2737,7 @@ class MenuWidget extends React.Component {
2741
2737
  }
2742
2738
  }
2743
2739
 
2744
- renderTimeslider(elem, layer, fromDownload) {
2740
+ renderTimeslider(elem, layer, fromDownload, hideCalendar) {
2745
2741
  if (this.props.view && layer) {
2746
2742
  let activeLayer = document.querySelector('#active_' + elem.id);
2747
2743
  let time = { elem: activeLayer };
@@ -2765,6 +2761,7 @@ class MenuWidget extends React.Component {
2765
2761
  logged={isLoggedIn}
2766
2762
  fromDownload={fromDownload}
2767
2763
  area={this.props.area}
2764
+ hideCalendar={hideCalendar}
2768
2765
  />,
2769
2766
  document.querySelector('.esri-ui-bottom-right'),
2770
2767
  );
@@ -2785,7 +2782,7 @@ class MenuWidget extends React.Component {
2785
2782
  .querySelector('[datasetid="' + id + '"] input')
2786
2783
  .getAttribute('defcheck');
2787
2784
  setTimeout(() => {
2788
- this.showTimeSlider(document.getElementById(layerId), false);
2785
+ this.showTimeSlider(document.getElementById(layerId), true, true);
2789
2786
  }, 100);
2790
2787
  }
2791
2788
  }
@@ -26,7 +26,8 @@ class TimesliderWidget extends React.Component {
26
26
  timeSelectedValuesC: [], //To compare time slider stored values with new selected values
27
27
  showDatePanel: false,
28
28
  lockDatePanel: true,
29
- showCalendar: this.props.fromDownload ? true : false,
29
+ showCalendar:
30
+ this.props.fromDownload && !this.props.hideCalendar ? true : false,
30
31
  dateStart: this.props.time.start ? new Date(this.props.time.start) : null,
31
32
  dateEnd: this.props.time.end ? new Date(this.props.time.end) : null,
32
33
  periodicity: null,