@eeacms/volto-embed 9.0.7 → 9.1.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 CHANGED
@@ -4,7 +4,17 @@ 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
- ### [9.0.7](https://github.com/eea/volto-embed/compare/9.0.6...9.0.7) - 11 January 2024
7
+ ### [9.1.0](https://github.com/eea/volto-embed/compare/9.0.7...9.1.0) - 17 January 2024
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat: show embed error + always show sources [Razvan - [`105d620`](https://github.com/eea/volto-embed/commit/105d6207b244df85eea6d6b9b3bd8e03da0a439b)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - Release 9.1.0 [Alin Voinea - [`b9921a5`](https://github.com/eea/volto-embed/commit/b9921a52564c7a1ca5664ca26d10f429c32f0e71)]
16
+ - fix tests [Razvan - [`5c75f20`](https://github.com/eea/volto-embed/commit/5c75f20483de681ff5c8dd39e7f0016771dc4472)]
17
+ ### [9.0.7](https://github.com/eea/volto-embed/compare/9.0.6...9.0.7) - 16 January 2024
8
18
 
9
19
  #### :hammer_and_wrench: Others
10
20
 
@@ -15,7 +25,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
15
25
  - tests update [andreiggr - [`c2483e1`](https://github.com/eea/volto-embed/commit/c2483e1fd2e788f5d990c5a0791beb43dd8ef4cf)]
16
26
  - clean console [andreiggr - [`a2da2be`](https://github.com/eea/volto-embed/commit/a2da2beb10ebb00ab257f5992a75c2fedce0f094)]
17
27
  - set publicUrl in tests [andreiggr - [`fb9e209`](https://github.com/eea/volto-embed/commit/fb9e209c67745c7053f8f08efe5d4f77d66721a8)]
18
- - screenshot url should be absolute [andreiggr - [`78e4a11`](https://github.com/eea/volto-embed/commit/78e4a1123d2ce7169f87b1e2a2be6411dca1f041)]
19
28
  ### [9.0.6](https://github.com/eea/volto-embed/compare/9.0.5...9.0.6) - 10 January 2024
20
29
 
21
30
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-embed",
3
- "version": "9.0.7",
3
+ "version": "9.1.0",
4
4
  "description": "Embed external content",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -65,7 +65,6 @@ function View(props) {
65
65
  parameters,
66
66
  useVisibilitySensor = true,
67
67
  with_notes = true,
68
- with_sources = true,
69
68
  with_more_info = true,
70
69
  with_share = true,
71
70
  with_enlarge = true,
@@ -92,7 +91,7 @@ function View(props) {
92
91
 
93
92
  useEffect(() => {
94
93
  const mapsId = maps['@id'] ? flattenToAppURL(maps['@id']) : undefined;
95
- if (url && url !== mapsId) {
94
+ if (mode === 'edit' && !maps.error && url && url !== mapsId) {
96
95
  getContent(url, null, id);
97
96
  }
98
97
  }, [id, getContent, mode, url, maps]);
@@ -101,6 +100,10 @@ function View(props) {
101
100
  return <Message>Please select a map from block editor.</Message>;
102
101
  }
103
102
 
103
+ if (maps?.error) {
104
+ return <p dangerouslySetInnerHTML={{ __html: maps.error }} />;
105
+ }
106
+
104
107
  if (!maps) {
105
108
  return null;
106
109
  }
@@ -114,7 +117,7 @@ function View(props) {
114
117
  parameters: queryParams,
115
118
  height: height || maps.height,
116
119
  with_notes,
117
- with_sources,
120
+ with_sources: true,
118
121
  with_more_info,
119
122
  with_share,
120
123
  with_enlarge,
@@ -39,13 +39,7 @@ export default (props) => {
39
39
  {
40
40
  id: 'toolbar',
41
41
  title: 'Toolbar',
42
- fields: [
43
- 'with_notes',
44
- 'with_sources',
45
- 'with_more_info',
46
- 'with_share',
47
- 'with_enlarge',
48
- ],
42
+ fields: ['with_notes', 'with_more_info', 'with_share', 'with_enlarge'],
49
43
  },
50
44
  {
51
45
  id: 'parameters',