@eeacms/volto-eea-map 2.0.2 → 2.0.3

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,16 @@ 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
+ ### [2.0.3](https://github.com/eea/volto-eea-map/compare/2.0.2...2.0.3) - 16 August 2023
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: fullscreen changes parent height #256519 [andreiggr - [`f4c4183`](https://github.com/eea/volto-eea-map/commit/f4c4183a2f7523dd2fc6957e4cc967d100be2b45)]
12
+
13
+ #### :house: Internal changes
14
+
15
+ - chore: add map fullscreen widget #256519 [andreiggr - [`f9a2d63`](https://github.com/eea/volto-eea-map/commit/f9a2d63ddd7e09187874339f90fb18833d3f0230)]
16
+
7
17
  ### [2.0.2](https://github.com/eea/volto-eea-map/compare/2.0.1...2.0.2) - 14 August 2023
8
18
 
9
19
  #### :bug: Bug Fixes
@@ -38,14 +48,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
38
48
  #### :hammer_and_wrench: Others
39
49
 
40
50
  - Release 2.0.0 [Alin Voinea - [`7be280d`](https://github.com/eea/volto-eea-map/commit/7be280d4809186e663f422687aca3c33dd732904)]
41
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ba6ed22`](https://github.com/eea/volto-eea-map/commit/ba6ed22118406db979457384d4739cced2096137)]
42
51
  ### [1.0.2](https://github.com/eea/volto-eea-map/compare/1.0.1...1.0.2) - 21 July 2023
43
52
 
44
53
  #### :hammer_and_wrench: Others
45
54
 
46
55
  - Allow blocks in content type [Tiberiu Ichim - [`2ac09a6`](https://github.com/eea/volto-eea-map/commit/2ac09a613aba07f6cbaf42c386660f2d7d09bd13)]
47
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`403b4c0`](https://github.com/eea/volto-eea-map/commit/403b4c009e5aaded58203bc292ba3baa4631488b)]
48
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aedb654`](https://github.com/eea/volto-eea-map/commit/aedb6544fd45b147a3385425aba46ffba108f5ca)]
49
56
  ### [1.0.1](https://github.com/eea/volto-eea-map/compare/1.0.0...1.0.1) - 22 June 2023
50
57
 
51
58
  #### :rocket: New Features
@@ -106,7 +113,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
106
113
 
107
114
  - chore: clear unused #254131 [andreiggr - [`ccec2ea`](https://github.com/eea/volto-eea-map/commit/ccec2eaab173c905cd4ea0190a9c6cfd630250f9)]
108
115
  - chore: clear block style #254131 [andreiggr - [`af500bc`](https://github.com/eea/volto-eea-map/commit/af500bc10a5f280eff0335f45bae1596d66a7e6b)]
109
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`76b29e5`](https://github.com/eea/volto-eea-map/commit/76b29e510f5156590723831a524bc39dfba6deba)]
110
116
 
111
117
  #### :hammer_and_wrench: Others
112
118
 
@@ -116,7 +122,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
116
122
  - * versions [andreiggr - [`6d9ff2b`](https://github.com/eea/volto-eea-map/commit/6d9ff2b26a236b6445678e3d84698d1c3c0826f4)]
117
123
  - add razzle-plugin-scss dep [andreiggr - [`d74cee5`](https://github.com/eea/volto-eea-map/commit/d74cee51d30c866afe55730e5b25e0bf11d2caea)]
118
124
  - volto-object-widget [andreiggr - [`18d0ed7`](https://github.com/eea/volto-eea-map/commit/18d0ed72c1ba7b0f7159a0eefc09ccea9acee5cb)]
119
- - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`5911d01`](https://github.com/eea/volto-eea-map/commit/5911d01f7f3bc79a2c834fab75a9a4ac05d2d042)]
120
125
  ### [0.1.32](https://github.com/eea/volto-eea-map/compare/0.1.31...0.1.32) - 20 February 2023
121
126
 
122
127
  #### :hammer_and_wrench: Others
@@ -124,7 +129,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
124
129
  - remove console.log [tedw87 - [`3aeb3e8`](https://github.com/eea/volto-eea-map/commit/3aeb3e8ec5474387f3cd22eb9b387c6681e17120)]
125
130
  - refactor code [tedw87 - [`6d7830e`](https://github.com/eea/volto-eea-map/commit/6d7830eb934f56c255eea5642bdefba30d892946)]
126
131
  - add Blossom basemap layer [tedw87 - [`5226ee2`](https://github.com/eea/volto-eea-map/commit/5226ee218df3401cf467afbc7a4d720dc30719e1)]
127
- - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`1dad5c6`](https://github.com/eea/volto-eea-map/commit/1dad5c6617096ff85223165a6dd2b1d5d7deea6a)]
128
132
  ### [0.1.31](https://github.com/eea/volto-eea-map/compare/0.1.30...0.1.31) - 11 November 2022
129
133
 
130
134
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-map",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "@eeacms/volto-eea-map: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -17,6 +17,7 @@ const MODULES = [
17
17
  'esri/widgets/Print',
18
18
  'esri/widgets/Zoom',
19
19
  'esri/widgets/ScaleBar',
20
+ 'esri/widgets/Fullscreen',
20
21
  ];
21
22
 
22
23
  const Webmap = (props) => {
@@ -71,6 +72,7 @@ const Webmap = (props) => {
71
72
  Print,
72
73
  Zoom,
73
74
  ScaleBar,
75
+ Fullscreen,
74
76
  ] = modules;
75
77
  setModules({
76
78
  Map,
@@ -85,6 +87,7 @@ const Webmap = (props) => {
85
87
  Print,
86
88
  Zoom,
87
89
  ScaleBar,
90
+ Fullscreen,
88
91
  });
89
92
  });
90
93
  }
@@ -134,6 +137,7 @@ const Webmap = (props) => {
134
137
  Print,
135
138
  Zoom,
136
139
  ScaleBar,
140
+ Fullscreen,
137
141
  } = modules;
138
142
  let layers =
139
143
  map_layers && map_layers.length > 0
@@ -281,6 +285,14 @@ const Webmap = (props) => {
281
285
  });
282
286
  }
283
287
 
288
+ const fullscreenWidget = new Fullscreen({
289
+ view: view,
290
+ });
291
+
292
+ view.ui.add(fullscreenWidget, 'top-right');
293
+
294
+ //detect when fullscreen is on
295
+
284
296
  if (layers && layers[0] && general && general.centerOnExtent) {
285
297
  const firstLayer = layers[0];
286
298
  if (firstLayer.type === 'feature') {
@@ -334,20 +346,23 @@ const Webmap = (props) => {
334
346
  return { view, map };
335
347
  }, [modules, data, data.layers, map_layers]);
336
348
 
349
+ const heightPx =
350
+ height && !editMode
351
+ ? `${height}px`
352
+ : device === 'tablet' || device === 'mobile'
353
+ ? '300px'
354
+ : '500px';
355
+
356
+ const dynamicStyle = `
357
+ .esri-map {
358
+ height: ${heightPx} !important
359
+ }
360
+ `;
361
+
337
362
  return (
338
363
  <div>
339
- <div
340
- style={{
341
- height:
342
- height && !editMode
343
- ? `${height}px`
344
- : device === 'tablet' || device === 'mobile'
345
- ? '300px'
346
- : '500px',
347
- }}
348
- ref={mapRef}
349
- className="esri-map"
350
- ></div>
364
+ <style>{dynamicStyle}</style>
365
+ <div ref={mapRef} className="esri-map"></div>
351
366
  </div>
352
367
  );
353
368
  };