@eeacms/volto-eea-map 3.2.1 → 3.3.0
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 +15 -15
- package/package.json +1 -1
- package/src/components/Blocks/EmbedEEAMap/Edit.jsx +2 -3
- package/src/components/Blocks/EmbedEEAMap/Schema.js +0 -1
- package/src/components/Blocks/EmbedEEAMap/View.jsx +13 -3
- package/src/components/LegendView.jsx +7 -4
- package/src/components/Webmap.jsx +15 -20
- package/src/components/visualization/VisualizationView.jsx +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,24 @@ 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
|
-
### [3.
|
|
7
|
+
### [3.3.0](https://github.com/eea/volto-eea-map/compare/3.2.1...3.3.0) - 17 January 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: show embed error + always show sources [Razvan - [`35f5465`](https://github.com/eea/volto-eea-map/commit/35f546574d347716ce043a482e7eda55a0180d44)]
|
|
12
|
+
|
|
13
|
+
#### :house: Internal changes
|
|
14
|
+
|
|
8
15
|
|
|
9
16
|
#### :hammer_and_wrench: Others
|
|
10
17
|
|
|
11
|
-
-
|
|
18
|
+
- Release 3.3.0 [Alin Voinea - [`8b21828`](https://github.com/eea/volto-eea-map/commit/8b2182871b3d13d0e9164d99d2964e3999e8cc48)]
|
|
19
|
+
- use arcgis map for screenshot [andreiggr - [`94cc865`](https://github.com/eea/volto-eea-map/commit/94cc8651667ab351fc761b810634f3b124d6e6bb)]
|
|
20
|
+
- update checks to support older javascript engines(screenshoter) [andreiggr - [`7b58516`](https://github.com/eea/volto-eea-map/commit/7b5851628160a8ff474c6405a0285014eb7da05f)]
|
|
21
|
+
- better check map layers [andreiggr - [`d3e7d6b`](https://github.com/eea/volto-eea-map/commit/d3e7d6bfaa2e06b5de40c1e13bf9d39241d2c0c0)]
|
|
22
|
+
- PP screenshot to mapserver jsapi app [andreiggr - [`a0b4dd4`](https://github.com/eea/volto-eea-map/commit/a0b4dd4033e43bc34b11ede95435a7c76a0cb6b8)]
|
|
23
|
+
### [3.2.1](https://github.com/eea/volto-eea-map/compare/3.2.0...3.2.1) - 13 December 2023
|
|
24
|
+
|
|
12
25
|
### [3.2.0](https://github.com/eea/volto-eea-map/compare/3.1.0...3.2.0) - 13 December 2023
|
|
13
26
|
|
|
14
27
|
#### :bug: Bug Fixes
|
|
@@ -54,8 +67,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
54
67
|
- fix prettier [Dobricean Ioan Dorian - [`78fc2ba`](https://github.com/eea/volto-eea-map/commit/78fc2baa2f5264ca1bba61b70bc0bdc5b2788e67)]
|
|
55
68
|
- Fix Sonorqube [dobri1408 - [`e04011a`](https://github.com/eea/volto-eea-map/commit/e04011aa811422f865d0bbb1e66af558a4310e77)]
|
|
56
69
|
- adapt embedeeamap to use serialized data [Dobricean Ioan Dorian - [`005965c`](https://github.com/eea/volto-eea-map/commit/005965c6793a9a9977fef52c08ba9a3173eec348)]
|
|
57
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`de2f4f6`](https://github.com/eea/volto-eea-map/commit/de2f4f6f516c2c9f7c2b4ea84373f4b1a21cd0af)]
|
|
58
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`4722984`](https://github.com/eea/volto-eea-map/commit/47229842132b406101c340ab200c193925b784ad)]
|
|
59
70
|
### [2.0.7](https://github.com/eea/volto-eea-map/compare/2.0.6...2.0.7) - 10 November 2023
|
|
60
71
|
|
|
61
72
|
#### :rocket: New Features
|
|
@@ -72,7 +83,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
72
83
|
|
|
73
84
|
#### :house: Internal changes
|
|
74
85
|
|
|
75
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`7afd81a`](https://github.com/eea/volto-eea-map/commit/7afd81a76bf407b07a94228daf3ab0415fbe4621)]
|
|
76
86
|
- chore: husky, lint-staged use fixed versions [valentinab25 - [`0ee38a7`](https://github.com/eea/volto-eea-map/commit/0ee38a7bee84694a5e0230e2d17083fbc071f0c8)]
|
|
77
87
|
- chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`8efeb44`](https://github.com/eea/volto-eea-map/commit/8efeb4423da70e421a88cabdeb559eb3613fb96e)]
|
|
78
88
|
- chore: display legend for content type item, fix case when no note is set [dana-cfc4 - [`ae630a8`](https://github.com/eea/volto-eea-map/commit/ae630a88cffa2a8ef60e0bbfead392508b015497)]
|
|
@@ -82,10 +92,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
82
92
|
|
|
83
93
|
#### :hammer_and_wrench: Others
|
|
84
94
|
|
|
85
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`335133d`](https://github.com/eea/volto-eea-map/commit/335133dc5186a53c1077bbead36100101bd9af45)]
|
|
86
95
|
- Refs #260203: make background_image required [laszlocseh - [`baa5c4f`](https://github.com/eea/volto-eea-map/commit/baa5c4fa2fe618af51df12d48b4512ecafc357a8)]
|
|
87
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`4874649`](https://github.com/eea/volto-eea-map/commit/48746492a2b32a82d33d1c6415eab8a6f6b9f5be)]
|
|
88
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`7fa0b83`](https://github.com/eea/volto-eea-map/commit/7fa0b837b24f41a01285fd1b17daeefde99a9c76)]
|
|
89
96
|
- use toolbar from volto-embed [Miu Razvan - [`29b73fb`](https://github.com/eea/volto-eea-map/commit/29b73fb8378ca56b3634bf1f7d57ce69a242b18e)]
|
|
90
97
|
### [2.0.6](https://github.com/eea/volto-eea-map/compare/2.0.5...2.0.6) - 29 September 2023
|
|
91
98
|
|
|
@@ -102,7 +109,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
102
109
|
|
|
103
110
|
- test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c6d141`](https://github.com/eea/volto-eea-map/commit/4c6d1413b67ffc3fe27a7d09dcc99ef98867cec9)]
|
|
104
111
|
- test: Fix package.json scripts to use makefile [Alin Voinea - [`1cd6751`](https://github.com/eea/volto-eea-map/commit/1cd675118165d8631c41d35c00a8c902c7edd803)]
|
|
105
|
-
- test: Fix eslint and yarn i18n [Alin Voinea - [`0184641`](https://github.com/eea/volto-eea-map/commit/018464116ba5b86b2c1e0a4ebc9b2fd95b772b66)]
|
|
106
112
|
- i18n: Add en [Alin Voinea - [`1d29304`](https://github.com/eea/volto-eea-map/commit/1d293049a21e138fa933cd5ed9a04cceac1a5cff)]
|
|
107
113
|
### [2.0.5](https://github.com/eea/volto-eea-map/compare/2.0.4...2.0.5) - 23 August 2023
|
|
108
114
|
|
|
@@ -159,14 +165,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
159
165
|
#### :hammer_and_wrench: Others
|
|
160
166
|
|
|
161
167
|
- Release 2.0.0 [Alin Voinea - [`7be280d`](https://github.com/eea/volto-eea-map/commit/7be280d4809186e663f422687aca3c33dd732904)]
|
|
162
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ba6ed22`](https://github.com/eea/volto-eea-map/commit/ba6ed22118406db979457384d4739cced2096137)]
|
|
163
168
|
### [1.0.2](https://github.com/eea/volto-eea-map/compare/1.0.1...1.0.2) - 21 July 2023
|
|
164
169
|
|
|
165
170
|
#### :hammer_and_wrench: Others
|
|
166
171
|
|
|
167
172
|
- Allow blocks in content type [Tiberiu Ichim - [`2ac09a6`](https://github.com/eea/volto-eea-map/commit/2ac09a613aba07f6cbaf42c386660f2d7d09bd13)]
|
|
168
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`403b4c0`](https://github.com/eea/volto-eea-map/commit/403b4c009e5aaded58203bc292ba3baa4631488b)]
|
|
169
|
-
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aedb654`](https://github.com/eea/volto-eea-map/commit/aedb6544fd45b147a3385425aba46ffba108f5ca)]
|
|
170
173
|
### [1.0.1](https://github.com/eea/volto-eea-map/compare/1.0.0...1.0.1) - 22 June 2023
|
|
171
174
|
|
|
172
175
|
#### :rocket: New Features
|
|
@@ -227,7 +230,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
227
230
|
|
|
228
231
|
- chore: clear unused #254131 [andreiggr - [`ccec2ea`](https://github.com/eea/volto-eea-map/commit/ccec2eaab173c905cd4ea0190a9c6cfd630250f9)]
|
|
229
232
|
- chore: clear block style #254131 [andreiggr - [`af500bc`](https://github.com/eea/volto-eea-map/commit/af500bc10a5f280eff0335f45bae1596d66a7e6b)]
|
|
230
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`76b29e5`](https://github.com/eea/volto-eea-map/commit/76b29e510f5156590723831a524bc39dfba6deba)]
|
|
231
233
|
|
|
232
234
|
#### :hammer_and_wrench: Others
|
|
233
235
|
|
|
@@ -237,7 +239,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
237
239
|
- * versions [andreiggr - [`6d9ff2b`](https://github.com/eea/volto-eea-map/commit/6d9ff2b26a236b6445678e3d84698d1c3c0826f4)]
|
|
238
240
|
- add razzle-plugin-scss dep [andreiggr - [`d74cee5`](https://github.com/eea/volto-eea-map/commit/d74cee51d30c866afe55730e5b25e0bf11d2caea)]
|
|
239
241
|
- volto-object-widget [andreiggr - [`18d0ed7`](https://github.com/eea/volto-eea-map/commit/18d0ed72c1ba7b0f7159a0eefc09ccea9acee5cb)]
|
|
240
|
-
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`5911d01`](https://github.com/eea/volto-eea-map/commit/5911d01f7f3bc79a2c834fab75a9a4ac05d2d042)]
|
|
241
242
|
### [0.1.32](https://github.com/eea/volto-eea-map/compare/0.1.31...0.1.32) - 20 February 2023
|
|
242
243
|
|
|
243
244
|
#### :hammer_and_wrench: Others
|
|
@@ -245,7 +246,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
245
246
|
- remove console.log [tedw87 - [`3aeb3e8`](https://github.com/eea/volto-eea-map/commit/3aeb3e8ec5474387f3cd22eb9b387c6681e17120)]
|
|
246
247
|
- refactor code [tedw87 - [`6d7830e`](https://github.com/eea/volto-eea-map/commit/6d7830eb934f56c255eea5642bdefba30d892946)]
|
|
247
248
|
- add Blossom basemap layer [tedw87 - [`5226ee2`](https://github.com/eea/volto-eea-map/commit/5226ee218df3401cf467afbc7a4d720dc30719e1)]
|
|
248
|
-
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`1dad5c6`](https://github.com/eea/volto-eea-map/commit/1dad5c6617096ff85223165a6dd2b1d5d7deea6a)]
|
|
249
249
|
### [0.1.31](https://github.com/eea/volto-eea-map/compare/0.1.30...0.1.31) - 11 November 2022
|
|
250
250
|
|
|
251
251
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -33,7 +33,6 @@ const Edit = (props) => {
|
|
|
33
33
|
enable_queries,
|
|
34
34
|
show_legend = true,
|
|
35
35
|
show_note = true,
|
|
36
|
-
show_sources = true,
|
|
37
36
|
show_more_info = true,
|
|
38
37
|
show_share = true,
|
|
39
38
|
dataprotection = { enabled: true },
|
|
@@ -66,7 +65,7 @@ const Edit = (props) => {
|
|
|
66
65
|
|
|
67
66
|
useEffect(() => {
|
|
68
67
|
const mapVisId = flattenToAppURL(map_visualization_data['@id'] || '');
|
|
69
|
-
if (vis_url && vis_url !== mapVisId) {
|
|
68
|
+
if (!map_visualization_data?.error && vis_url && vis_url !== mapVisId) {
|
|
70
69
|
getContent(vis_url, null, id);
|
|
71
70
|
}
|
|
72
71
|
if (!vis_url) {
|
|
@@ -118,7 +117,7 @@ const Edit = (props) => {
|
|
|
118
117
|
...data,
|
|
119
118
|
show_legend,
|
|
120
119
|
show_note,
|
|
121
|
-
show_sources,
|
|
120
|
+
show_sources: true,
|
|
122
121
|
show_more_info,
|
|
123
122
|
show_share,
|
|
124
123
|
dataprotection,
|
|
@@ -13,7 +13,6 @@ const View = (props) => {
|
|
|
13
13
|
enable_queries,
|
|
14
14
|
show_legend = true,
|
|
15
15
|
show_note = true,
|
|
16
|
-
show_sources = true,
|
|
17
16
|
show_more_info = true,
|
|
18
17
|
show_share = true,
|
|
19
18
|
dataprotection = { enabled: true },
|
|
@@ -35,11 +34,22 @@ const View = (props) => {
|
|
|
35
34
|
setMapData(updatedMapData);
|
|
36
35
|
}, [map_visualization_data, data_query_params, enable_queries]);
|
|
37
36
|
|
|
37
|
+
const mapUrl = map_visualization_data?.layers?.map_layers[0]?.map_layer
|
|
38
|
+
?.map_service_url
|
|
39
|
+
? `${map_visualization_data.layers.map_layers[0].map_layer.map_service_url}?f=jsapi`
|
|
40
|
+
: '';
|
|
41
|
+
|
|
42
|
+
if (map_visualization_data?.error) {
|
|
43
|
+
return (
|
|
44
|
+
<p dangerouslySetInnerHTML={{ __html: map_visualization_data.error }} />
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
38
48
|
return (
|
|
39
49
|
<PrivacyProtection
|
|
40
|
-
data={data}
|
|
41
50
|
className="embed-map-visualization"
|
|
42
51
|
{...props}
|
|
52
|
+
data={mapUrl ? { ...data, url: mapUrl } : data}
|
|
43
53
|
>
|
|
44
54
|
{!!mapData && (
|
|
45
55
|
<>
|
|
@@ -49,7 +59,7 @@ const View = (props) => {
|
|
|
49
59
|
...data,
|
|
50
60
|
show_legend,
|
|
51
61
|
show_note,
|
|
52
|
-
show_sources,
|
|
62
|
+
show_sources: true,
|
|
53
63
|
show_more_info,
|
|
54
64
|
show_share,
|
|
55
65
|
dataprotection,
|
|
@@ -11,7 +11,10 @@ import codeSVG from '@eeacms/volto-eea-map/static/code-line.svg';
|
|
|
11
11
|
const LayerLegend = ({ data, show_viewer }) => {
|
|
12
12
|
const [legendRows, setLegendRows] = React.useState([]);
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const map_service_url =
|
|
15
|
+
data && data.map_service_url ? data.map_service_url : '';
|
|
16
|
+
|
|
17
|
+
const layer = data && data.layer ? data.layer : {};
|
|
15
18
|
const { id, name } = layer || {};
|
|
16
19
|
|
|
17
20
|
const fetchLegend = async (url, activeLayerID) => {
|
|
@@ -23,11 +26,11 @@ const LayerLegend = ({ data, show_viewer }) => {
|
|
|
23
26
|
};
|
|
24
27
|
|
|
25
28
|
React.useEffect(() => {
|
|
26
|
-
if (data
|
|
29
|
+
if (data?.map_service_url && id !== undefined) {
|
|
27
30
|
fetchLegend(`${data.map_service_url}/legend`, id);
|
|
28
31
|
}
|
|
29
32
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
30
|
-
}, [id, data
|
|
33
|
+
}, [id, data]);
|
|
31
34
|
|
|
32
35
|
return (
|
|
33
36
|
<Grid.Column>
|
|
@@ -61,7 +64,7 @@ const LayerLegend = ({ data, show_viewer }) => {
|
|
|
61
64
|
</a>
|
|
62
65
|
)}
|
|
63
66
|
</div>
|
|
64
|
-
{data
|
|
67
|
+
{data?.description && serializeNodes(data.description)}
|
|
65
68
|
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
|
66
69
|
{legendRows.length > 0 &&
|
|
67
70
|
legendRows.map((item, i) => {
|
|
@@ -21,25 +21,20 @@ const MODULES = [
|
|
|
21
21
|
];
|
|
22
22
|
|
|
23
23
|
const Webmap = (props) => {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const data =
|
|
29
|
-
|
|
30
|
-
const layers =
|
|
31
|
-
props.data
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
props.data
|
|
37
|
-
|
|
38
|
-
const styles = React.useMemo(() => props?.data?.styles || {}, [
|
|
39
|
-
props.data?.styles,
|
|
40
|
-
]);
|
|
41
|
-
|
|
42
|
-
const { base_layer = '' } = base;
|
|
24
|
+
const editMode = props && props.editMode ? props.editMode : false;
|
|
25
|
+
const height = props && props.height ? props.height : '';
|
|
26
|
+
const id = props && props.id ? props.id : '';
|
|
27
|
+
const device = props && props.device ? props.device : {};
|
|
28
|
+
const data = props && props.data ? props.data : {};
|
|
29
|
+
|
|
30
|
+
const layers =
|
|
31
|
+
props && props.data && props.data.layers ? props.data.layers : {};
|
|
32
|
+
const base = props && props.data && props.data.base ? props.data.base : {};
|
|
33
|
+
const general =
|
|
34
|
+
props && props.data && props.data.general ? props.data.general : {};
|
|
35
|
+
const styles =
|
|
36
|
+
props && props.data && props.data.styles ? props.data.styles : {};
|
|
37
|
+
const base_layer = base && base.base_layer ? base.base_layer : '';
|
|
43
38
|
|
|
44
39
|
const map_layers =
|
|
45
40
|
layers &&
|
|
@@ -146,7 +141,7 @@ const Webmap = (props) => {
|
|
|
146
141
|
.map(
|
|
147
142
|
(
|
|
148
143
|
{
|
|
149
|
-
map_service_url,
|
|
144
|
+
map_service_url = '',
|
|
150
145
|
layer,
|
|
151
146
|
fullLayer,
|
|
152
147
|
query = '',
|
|
@@ -6,9 +6,12 @@ import Webmap from '../Webmap';
|
|
|
6
6
|
import ExtraViews from '../ExtraViews';
|
|
7
7
|
|
|
8
8
|
const VisualizationView = (props) => {
|
|
9
|
-
const
|
|
9
|
+
const content = props && props.content ? props.content : {};
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const map_visualization_data =
|
|
12
|
+
content && content.map_visualization_data
|
|
13
|
+
? content.map_visualization_data
|
|
14
|
+
: {};
|
|
12
15
|
|
|
13
16
|
return (
|
|
14
17
|
<div id="page-document" className="view-viewarcgismap">
|