@eeacms/volto-eea-map 2.0.1 → 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,26 @@ 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
|
+
|
|
17
|
+
### [2.0.2](https://github.com/eea/volto-eea-map/compare/2.0.1...2.0.2) - 14 August 2023
|
|
18
|
+
|
|
19
|
+
#### :bug: Bug Fixes
|
|
20
|
+
|
|
21
|
+
- fix: test use specif backend url for viz #256519 [andreiggr - [`198bdf8`](https://github.com/eea/volto-eea-map/commit/198bdf85f2f847305d08ffd93514f1086868bce9)]
|
|
22
|
+
|
|
23
|
+
#### :house: Internal changes
|
|
24
|
+
|
|
25
|
+
- chore: allow request to arcgis utility service #256519 [andreiggr - [`4c517a4`](https://github.com/eea/volto-eea-map/commit/4c517a4a86c7dce094513ce988d6e236f91fbd28)]
|
|
26
|
+
|
|
7
27
|
### [2.0.1](https://github.com/eea/volto-eea-map/compare/2.0.0...2.0.1) - 8 August 2023
|
|
8
28
|
|
|
9
29
|
#### :bug: Bug Fixes
|
|
@@ -28,14 +48,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
28
48
|
#### :hammer_and_wrench: Others
|
|
29
49
|
|
|
30
50
|
- Release 2.0.0 [Alin Voinea - [`7be280d`](https://github.com/eea/volto-eea-map/commit/7be280d4809186e663f422687aca3c33dd732904)]
|
|
31
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ba6ed22`](https://github.com/eea/volto-eea-map/commit/ba6ed22118406db979457384d4739cced2096137)]
|
|
32
51
|
### [1.0.2](https://github.com/eea/volto-eea-map/compare/1.0.1...1.0.2) - 21 July 2023
|
|
33
52
|
|
|
34
53
|
#### :hammer_and_wrench: Others
|
|
35
54
|
|
|
36
55
|
- Allow blocks in content type [Tiberiu Ichim - [`2ac09a6`](https://github.com/eea/volto-eea-map/commit/2ac09a613aba07f6cbaf42c386660f2d7d09bd13)]
|
|
37
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`403b4c0`](https://github.com/eea/volto-eea-map/commit/403b4c009e5aaded58203bc292ba3baa4631488b)]
|
|
38
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aedb654`](https://github.com/eea/volto-eea-map/commit/aedb6544fd45b147a3385425aba46ffba108f5ca)]
|
|
39
56
|
### [1.0.1](https://github.com/eea/volto-eea-map/compare/1.0.0...1.0.1) - 22 June 2023
|
|
40
57
|
|
|
41
58
|
#### :rocket: New Features
|
|
@@ -96,7 +113,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
96
113
|
|
|
97
114
|
- chore: clear unused #254131 [andreiggr - [`ccec2ea`](https://github.com/eea/volto-eea-map/commit/ccec2eaab173c905cd4ea0190a9c6cfd630250f9)]
|
|
98
115
|
- chore: clear block style #254131 [andreiggr - [`af500bc`](https://github.com/eea/volto-eea-map/commit/af500bc10a5f280eff0335f45bae1596d66a7e6b)]
|
|
99
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`76b29e5`](https://github.com/eea/volto-eea-map/commit/76b29e510f5156590723831a524bc39dfba6deba)]
|
|
100
116
|
|
|
101
117
|
#### :hammer_and_wrench: Others
|
|
102
118
|
|
|
@@ -106,7 +122,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
106
122
|
- * versions [andreiggr - [`6d9ff2b`](https://github.com/eea/volto-eea-map/commit/6d9ff2b26a236b6445678e3d84698d1c3c0826f4)]
|
|
107
123
|
- add razzle-plugin-scss dep [andreiggr - [`d74cee5`](https://github.com/eea/volto-eea-map/commit/d74cee51d30c866afe55730e5b25e0bf11d2caea)]
|
|
108
124
|
- volto-object-widget [andreiggr - [`18d0ed7`](https://github.com/eea/volto-eea-map/commit/18d0ed72c1ba7b0f7159a0eefc09ccea9acee5cb)]
|
|
109
|
-
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`5911d01`](https://github.com/eea/volto-eea-map/commit/5911d01f7f3bc79a2c834fab75a9a4ac05d2d042)]
|
|
110
125
|
### [0.1.32](https://github.com/eea/volto-eea-map/compare/0.1.31...0.1.32) - 20 February 2023
|
|
111
126
|
|
|
112
127
|
#### :hammer_and_wrench: Others
|
|
@@ -114,7 +129,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
114
129
|
- remove console.log [tedw87 - [`3aeb3e8`](https://github.com/eea/volto-eea-map/commit/3aeb3e8ec5474387f3cd22eb9b387c6681e17120)]
|
|
115
130
|
- refactor code [tedw87 - [`6d7830e`](https://github.com/eea/volto-eea-map/commit/6d7830eb934f56c255eea5642bdefba30d892946)]
|
|
116
131
|
- add Blossom basemap layer [tedw87 - [`5226ee2`](https://github.com/eea/volto-eea-map/commit/5226ee218df3401cf467afbc7a4d720dc30719e1)]
|
|
117
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`1dad5c6`](https://github.com/eea/volto-eea-map/commit/1dad5c6617096ff85223165a6dd2b1d5d7deea6a)]
|
|
118
132
|
### [0.1.31](https://github.com/eea/volto-eea-map/compare/0.1.30...0.1.31) - 11 November 2022
|
|
119
133
|
|
|
120
134
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -8,6 +8,8 @@ import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
|
|
|
8
8
|
import Webmap from '@eeacms/volto-eea-map/components/Webmap';
|
|
9
9
|
import ExtraViews from '@eeacms/volto-eea-map/components/ExtraViews';
|
|
10
10
|
|
|
11
|
+
import { expandToBackendURL } from '@plone/volto/helpers';
|
|
12
|
+
|
|
11
13
|
import { Schema } from './Schema';
|
|
12
14
|
import { applyQueriesToMapLayers } from '@eeacms/volto-eea-map/utils';
|
|
13
15
|
|
|
@@ -19,9 +21,13 @@ const Edit = (props) => {
|
|
|
19
21
|
const [mapData, setMapData] = React.useState('');
|
|
20
22
|
const data = React.useMemo(() => props.data, [props.data]);
|
|
21
23
|
const { height = '' } = data;
|
|
22
|
-
|
|
23
24
|
React.useEffect(() => {
|
|
24
|
-
|
|
25
|
+
if (props.data.vis_url) {
|
|
26
|
+
props.getVisualization(expandToBackendURL(props.data.vis_url));
|
|
27
|
+
}
|
|
28
|
+
if (!props.data.vis_url) {
|
|
29
|
+
setMapData('');
|
|
30
|
+
}
|
|
25
31
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26
32
|
}, [props.data.vis_url]);
|
|
27
33
|
|
|
@@ -76,10 +82,12 @@ export default compose(
|
|
|
76
82
|
(state, props) => ({
|
|
77
83
|
data_query: state.content.data.data_query,
|
|
78
84
|
map_visualization: props.data.vis_url
|
|
79
|
-
? state.map_visualizations?.data[props.data.vis_url]
|
|
85
|
+
? state.map_visualizations?.data[expandToBackendURL(props.data.vis_url)]
|
|
86
|
+
?.data
|
|
80
87
|
: '',
|
|
81
88
|
data_provenance: props.data.vis_url
|
|
82
|
-
? state.map_visualizations?.data[props.data.vis_url]
|
|
89
|
+
? state.map_visualizations?.data[expandToBackendURL(props.data.vis_url)]
|
|
90
|
+
?.data_provenance
|
|
83
91
|
: '',
|
|
84
92
|
}),
|
|
85
93
|
{
|
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
4
|
import { compose } from 'redux';
|
|
5
5
|
|
|
6
|
+
import { expandToBackendURL } from '@plone/volto/helpers';
|
|
7
|
+
|
|
6
8
|
import { PrivacyProtection } from '@eeacms/volto-embed';
|
|
7
9
|
|
|
8
10
|
import Webmap from '@eeacms/volto-eea-map/components/Webmap';
|
|
@@ -17,7 +19,12 @@ const View = (props) => {
|
|
|
17
19
|
const [mapData, setMapData] = React.useState('');
|
|
18
20
|
|
|
19
21
|
React.useEffect(() => {
|
|
20
|
-
|
|
22
|
+
if (props.data.vis_url) {
|
|
23
|
+
props.getVisualization(expandToBackendURL(props.data.vis_url));
|
|
24
|
+
}
|
|
25
|
+
if (!props.data.vis_url) {
|
|
26
|
+
setMapData('');
|
|
27
|
+
}
|
|
21
28
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22
29
|
}, [props.data.vis_url]);
|
|
23
30
|
|
|
@@ -61,10 +68,12 @@ export default compose(
|
|
|
61
68
|
connect(
|
|
62
69
|
(state, props) => ({
|
|
63
70
|
map_visualization: props.data.vis_url
|
|
64
|
-
? state.map_visualizations?.data[props.data.vis_url]
|
|
71
|
+
? state.map_visualizations?.data[expandToBackendURL(props.data.vis_url)]
|
|
72
|
+
?.data
|
|
65
73
|
: '',
|
|
66
74
|
data_provenance: props.data.vis_url
|
|
67
|
-
? state.map_visualizations?.data[props.data.vis_url]
|
|
75
|
+
? state.map_visualizations?.data[expandToBackendURL(props.data.vis_url)]
|
|
76
|
+
?.data_provenance
|
|
68
77
|
: '',
|
|
69
78
|
}),
|
|
70
79
|
{
|
|
@@ -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
|
-
<
|
|
340
|
-
|
|
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
|
};
|