@eeacms/volto-eea-map 3.0.0 → 3.0.2

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,7 +4,20 @@ 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.0.0](https://github.com/eea/volto-eea-map/compare/2.0.7...3.0.0) - 23 November 2023
7
+ ### [3.0.2](https://github.com/eea/volto-eea-map/compare/3.0.1...3.0.2) - 28 November 2023
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: handle error when map_layers has no value [laszlocseh - [`0412974`](https://github.com/eea/volto-eea-map/commit/041297417dc1f1fd077983faedba90260e1616d7)]
12
+
13
+ ### [3.0.1](https://github.com/eea/volto-eea-map/compare/3.0.0...3.0.1) - 24 November 2023
14
+
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - fix [Miu Razvan - [`d9267ec`](https://github.com/eea/volto-eea-map/commit/d9267eca557518241ba30f5d525ebd30a606bf94)]
18
+ - fix [Miu Razvan - [`0ad99a6`](https://github.com/eea/volto-eea-map/commit/0ad99a60a3edfd19ad11b0023b456e82bb335dc5)]
19
+ - fix [Miu Razvan - [`fd0260d`](https://github.com/eea/volto-eea-map/commit/fd0260d46e356377ce388b967e78651da8cfa543)]
20
+ ## [3.0.0](https://github.com/eea/volto-eea-map/compare/2.0.7...3.0.0) - 23 November 2023
8
21
 
9
22
  #### :hammer_and_wrench: Others
10
23
 
@@ -17,6 +30,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
17
30
  - fix prettier [Dobricean Ioan Dorian - [`78fc2ba`](https://github.com/eea/volto-eea-map/commit/78fc2baa2f5264ca1bba61b70bc0bdc5b2788e67)]
18
31
  - Fix Sonorqube [dobri1408 - [`e04011a`](https://github.com/eea/volto-eea-map/commit/e04011aa811422f865d0bbb1e66af558a4310e77)]
19
32
  - adapt embedeeamap to use serialized data [Dobricean Ioan Dorian - [`005965c`](https://github.com/eea/volto-eea-map/commit/005965c6793a9a9977fef52c08ba9a3173eec348)]
33
+ - test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`de2f4f6`](https://github.com/eea/volto-eea-map/commit/de2f4f6f516c2c9f7c2b4ea84373f4b1a21cd0af)]
34
+ - test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`4722984`](https://github.com/eea/volto-eea-map/commit/47229842132b406101c340ab200c193925b784ad)]
20
35
  ### [2.0.7](https://github.com/eea/volto-eea-map/compare/2.0.6...2.0.7) - 10 November 2023
21
36
 
22
37
  #### :rocket: New Features
@@ -33,6 +48,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
33
48
 
34
49
  #### :house: Internal changes
35
50
 
51
+ - chore: [JENKINS] Refactor automated testing [valentinab25 - [`7afd81a`](https://github.com/eea/volto-eea-map/commit/7afd81a76bf407b07a94228daf3ab0415fbe4621)]
36
52
  - chore: husky, lint-staged use fixed versions [valentinab25 - [`0ee38a7`](https://github.com/eea/volto-eea-map/commit/0ee38a7bee84694a5e0230e2d17083fbc071f0c8)]
37
53
  - chore:volto 16 in tests, update docs, fix stylelint overrides [valentinab25 - [`8efeb44`](https://github.com/eea/volto-eea-map/commit/8efeb4423da70e421a88cabdeb559eb3613fb96e)]
38
54
  - 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)]
@@ -42,7 +58,10 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
42
58
 
43
59
  #### :hammer_and_wrench: Others
44
60
 
61
+ - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`335133d`](https://github.com/eea/volto-eea-map/commit/335133dc5186a53c1077bbead36100101bd9af45)]
45
62
  - Refs #260203: make background_image required [laszlocseh - [`baa5c4f`](https://github.com/eea/volto-eea-map/commit/baa5c4fa2fe618af51df12d48b4512ecafc357a8)]
63
+ - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`4874649`](https://github.com/eea/volto-eea-map/commit/48746492a2b32a82d33d1c6415eab8a6f6b9f5be)]
64
+ - test: [JENKINS] Improve cypress time [valentinab25 - [`7fa0b83`](https://github.com/eea/volto-eea-map/commit/7fa0b837b24f41a01285fd1b17daeefde99a9c76)]
46
65
  - use toolbar from volto-embed [Miu Razvan - [`29b73fb`](https://github.com/eea/volto-eea-map/commit/29b73fb8378ca56b3634bf1f7d57ce69a242b18e)]
47
66
  ### [2.0.6](https://github.com/eea/volto-eea-map/compare/2.0.5...2.0.6) - 29 September 2023
48
67
 
@@ -59,6 +78,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
59
78
 
60
79
  - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`4c6d141`](https://github.com/eea/volto-eea-map/commit/4c6d1413b67ffc3fe27a7d09dcc99ef98867cec9)]
61
80
  - test: Fix package.json scripts to use makefile [Alin Voinea - [`1cd6751`](https://github.com/eea/volto-eea-map/commit/1cd675118165d8631c41d35c00a8c902c7edd803)]
81
+ - test: Fix eslint and yarn i18n [Alin Voinea - [`0184641`](https://github.com/eea/volto-eea-map/commit/018464116ba5b86b2c1e0a4ebc9b2fd95b772b66)]
62
82
  - i18n: Add en [Alin Voinea - [`1d29304`](https://github.com/eea/volto-eea-map/commit/1d293049a21e138fa933cd5ed9a04cceac1a5cff)]
63
83
  ### [2.0.5](https://github.com/eea/volto-eea-map/compare/2.0.4...2.0.5) - 23 August 2023
64
84
 
@@ -115,11 +135,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
115
135
  #### :hammer_and_wrench: Others
116
136
 
117
137
  - Release 2.0.0 [Alin Voinea - [`7be280d`](https://github.com/eea/volto-eea-map/commit/7be280d4809186e663f422687aca3c33dd732904)]
138
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`ba6ed22`](https://github.com/eea/volto-eea-map/commit/ba6ed22118406db979457384d4739cced2096137)]
118
139
  ### [1.0.2](https://github.com/eea/volto-eea-map/compare/1.0.1...1.0.2) - 21 July 2023
119
140
 
120
141
  #### :hammer_and_wrench: Others
121
142
 
122
143
  - Allow blocks in content type [Tiberiu Ichim - [`2ac09a6`](https://github.com/eea/volto-eea-map/commit/2ac09a613aba07f6cbaf42c386660f2d7d09bd13)]
144
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`403b4c0`](https://github.com/eea/volto-eea-map/commit/403b4c009e5aaded58203bc292ba3baa4631488b)]
145
+ - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`aedb654`](https://github.com/eea/volto-eea-map/commit/aedb6544fd45b147a3385425aba46ffba108f5ca)]
123
146
  ### [1.0.1](https://github.com/eea/volto-eea-map/compare/1.0.0...1.0.1) - 22 June 2023
124
147
 
125
148
  #### :rocket: New Features
@@ -180,6 +203,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
180
203
 
181
204
  - chore: clear unused #254131 [andreiggr - [`ccec2ea`](https://github.com/eea/volto-eea-map/commit/ccec2eaab173c905cd4ea0190a9c6cfd630250f9)]
182
205
  - chore: clear block style #254131 [andreiggr - [`af500bc`](https://github.com/eea/volto-eea-map/commit/af500bc10a5f280eff0335f45bae1596d66a7e6b)]
206
+ - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`76b29e5`](https://github.com/eea/volto-eea-map/commit/76b29e510f5156590723831a524bc39dfba6deba)]
183
207
 
184
208
  #### :hammer_and_wrench: Others
185
209
 
@@ -189,6 +213,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
189
213
  - * versions [andreiggr - [`6d9ff2b`](https://github.com/eea/volto-eea-map/commit/6d9ff2b26a236b6445678e3d84698d1c3c0826f4)]
190
214
  - add razzle-plugin-scss dep [andreiggr - [`d74cee5`](https://github.com/eea/volto-eea-map/commit/d74cee51d30c866afe55730e5b25e0bf11d2caea)]
191
215
  - volto-object-widget [andreiggr - [`18d0ed7`](https://github.com/eea/volto-eea-map/commit/18d0ed72c1ba7b0f7159a0eefc09ccea9acee5cb)]
216
+ - Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`5911d01`](https://github.com/eea/volto-eea-map/commit/5911d01f7f3bc79a2c834fab75a9a4ac05d2d042)]
192
217
  ### [0.1.32](https://github.com/eea/volto-eea-map/compare/0.1.31...0.1.32) - 20 February 2023
193
218
 
194
219
  #### :hammer_and_wrench: Others
@@ -196,6 +221,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
196
221
  - remove console.log [tedw87 - [`3aeb3e8`](https://github.com/eea/volto-eea-map/commit/3aeb3e8ec5474387f3cd22eb9b387c6681e17120)]
197
222
  - refactor code [tedw87 - [`6d7830e`](https://github.com/eea/volto-eea-map/commit/6d7830eb934f56c255eea5642bdefba30d892946)]
198
223
  - add Blossom basemap layer [tedw87 - [`5226ee2`](https://github.com/eea/volto-eea-map/commit/5226ee218df3401cf467afbc7a4d720dc30719e1)]
224
+ - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`1dad5c6`](https://github.com/eea/volto-eea-map/commit/1dad5c6617096ff85223165a6dd2b1d5d7deea6a)]
199
225
  ### [0.1.31](https://github.com/eea/volto-eea-map/compare/0.1.30...0.1.31) - 11 November 2022
200
226
 
201
227
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-map",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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",
@@ -81,4 +81,4 @@
81
81
  "cypress:open": "make cypress-open",
82
82
  "prepare": "husky install"
83
83
  }
84
- }
84
+ }
@@ -7,13 +7,23 @@ import { applyQueriesToMapLayers } from '@eeacms/volto-eea-map/utils';
7
7
  import { getMapVisualizationData } from './helpers';
8
8
 
9
9
  const View = (props) => {
10
- const { data_query_params, enable_queries, height = '' } = props.data;
10
+ const { data } = props;
11
+ const {
12
+ data_query_params,
13
+ enable_queries,
14
+ show_legend = true,
15
+ show_note = true,
16
+ show_sources = true,
17
+ show_more_info = true,
18
+ show_share = true,
19
+ dataprotection = { enabled: true },
20
+ height = '',
21
+ } = data;
11
22
 
12
23
  const map_visualization_data = useMemo(() => getMapVisualizationData(props), [
13
24
  props,
14
25
  ]);
15
26
 
16
- const { data_provenance = {}, figure_note = [] } = map_visualization_data;
17
27
  const [mapData, setMapData] = React.useState('');
18
28
 
19
29
  React.useEffect(() => {
@@ -27,7 +37,7 @@ const View = (props) => {
27
37
 
28
38
  return (
29
39
  <PrivacyProtection
30
- data={props.data}
40
+ data={data}
31
41
  className="embed-map-visualization"
32
42
  {...props}
33
43
  >
@@ -36,11 +46,14 @@ const View = (props) => {
36
46
  <Webmap data={mapData} height={height} />
37
47
  <ExtraViews
38
48
  data={{
39
- ...props.data,
40
- data_provenance,
41
- figure_note,
42
- map_data: map_visualization_data,
43
- '@id': props['@id'],
49
+ ...data,
50
+ show_legend,
51
+ show_note,
52
+ show_sources,
53
+ show_more_info,
54
+ show_share,
55
+ dataprotection,
56
+ map_visualization_data,
44
57
  }}
45
58
  />
46
59
  </>
@@ -47,12 +47,12 @@ const ExtraViews = ({ data, screen }) => {
47
47
  )}
48
48
  <div className={cx('visualization-toolbar', { mobile })} ref={toolbar}>
49
49
  <div className="left-col">
50
- {show_note && <FigureNote note={figure_note || []} />}
50
+ {show_note && <FigureNote notes={figure_note || []} />}
51
51
  {show_sources && <Sources sources={data_provenance?.data} />}
52
- {show_more_info && <MoreInfo href={data['@id']} />}
52
+ {show_more_info && <MoreInfo href={map_visualization_data['@id']} />}
53
53
  </div>
54
54
  <div className="right-col">
55
- {show_share && <Share href={data['@id']} />}
55
+ {show_share && <Share href={map_visualization_data['@id']} />}
56
56
  </div>
57
57
  </div>
58
58
  {description && serializeNodes(description)}
@@ -128,13 +128,15 @@ const LegendView = (props) => {
128
128
  </p>
129
129
  </Grid.Column>
130
130
  )}
131
- {map_layers?.map((l, i) => (
132
- <LayerLegend
133
- key={i}
134
- data={l.map_layer}
135
- show_viewer={show_viewer}
136
- />
137
- ))}
131
+ {map_layers &&
132
+ map_layers.length > 0 &&
133
+ map_layers?.map((l, i) => (
134
+ <LayerLegend
135
+ key={i}
136
+ data={l.map_layer}
137
+ show_viewer={show_viewer}
138
+ />
139
+ ))}
138
140
  </Grid.Row>
139
141
  </Grid>
140
142
  )}
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import Webmap from '../Webmap';
3
- import LegendView from '../LegendView';
4
2
  import { hasBlocksData } from '@plone/volto/helpers';
5
3
  import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
4
+ import { pickMetadata } from '@eeacms/volto-embed/helpers';
5
+ import Webmap from '../Webmap';
6
+ import ExtraViews from '../ExtraViews';
6
7
 
7
8
  const VisualizationView = (props) => {
8
9
  const { content = {} } = props;
@@ -16,7 +17,20 @@ const VisualizationView = (props) => {
16
17
  ) : (
17
18
  <>
18
19
  <Webmap data={map_visualization_data} />
19
- <LegendView data={map_visualization_data} show_viewer={true} />
20
+ <ExtraViews
21
+ data={{
22
+ show_viewer: true,
23
+ show_legend: true,
24
+ show_note: false,
25
+ show_sources: false,
26
+ show_more_info: false,
27
+ show_share: true,
28
+ map_visualization_data: {
29
+ ...map_visualization_data,
30
+ ...pickMetadata(content),
31
+ },
32
+ }}
33
+ />
20
34
  </>
21
35
  )}
22
36
  </div>
@@ -1,12 +1,32 @@
1
+ import { connect } from 'react-redux';
2
+ import { pickMetadata } from '@eeacms/volto-embed/helpers';
1
3
  import Webmap from '../Webmap';
2
- import LegendView from '../LegendView';
4
+ import ExtraViews from '../ExtraViews';
3
5
 
4
- export default function VisualizationViewWidget(props) {
6
+ function VisualizationViewWidget(props) {
5
7
  const { value: map_visualization_data = {} } = props;
8
+
6
9
  return (
7
10
  <>
8
11
  <Webmap data={map_visualization_data} />
9
- <LegendView data={map_visualization_data} show_viewer={true} />
12
+ <ExtraViews
13
+ data={{
14
+ show_viewer: true,
15
+ show_legend: true,
16
+ show_note: false,
17
+ show_sources: false,
18
+ show_more_info: false,
19
+ show_share: true,
20
+ map_visualization_data: {
21
+ ...map_visualization_data,
22
+ ...pickMetadata(props.content),
23
+ },
24
+ }}
25
+ />
10
26
  </>
11
27
  );
12
28
  }
29
+
30
+ export default connect((state) => ({
31
+ content: state.content.data,
32
+ }))(VisualizationViewWidget);