@eeacms/volto-tableau 7.1.0 → 7.2.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 +14 -0
- package/package.json +1 -1
- package/src/Blocks/EmbedTableauVisualization/View.jsx +14 -3
- package/src/Blocks/EmbedTableauVisualization/__snapshots__/Edit.test.jsx.snap +0 -8
- package/src/Blocks/EmbedTableauVisualization/schema.js +0 -1
- package/src/Tableau/Tableau.jsx +1 -0
- package/src/Tableau/helpers.js +12 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +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
|
+
### [7.2.0](https://github.com/eea/volto-tableau/compare/7.1.0...7.2.0) - 17 January 2024
|
|
8
|
+
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: show embed error + always show sources [Razvan - [`c1df7a2`](https://github.com/eea/volto-tableau/commit/c1df7a221c427705e29bcd45d621666973e12edb)]
|
|
12
|
+
|
|
13
|
+
#### :bug: Bug Fixes
|
|
14
|
+
|
|
15
|
+
- fix: infinit requests patch [Razvan - [`9a9afa2`](https://github.com/eea/volto-tableau/commit/9a9afa2d73821c61d66044d5c44806ab060d3bd3)]
|
|
16
|
+
|
|
17
|
+
#### :hammer_and_wrench: Others
|
|
18
|
+
|
|
19
|
+
- Release 7.2.0 [Alin Voinea - [`7c0af33`](https://github.com/eea/volto-tableau/commit/7c0af336f63abfe5e25058a1ff1b07000a9a8c87)]
|
|
20
|
+
- fix tests [Razvan - [`48f255a`](https://github.com/eea/volto-tableau/commit/48f255a7a437a909e018604fe81db8987b6bfe87)]
|
|
7
21
|
### [7.1.0](https://github.com/eea/volto-tableau/compare/7.0.5...7.1.0) - 13 December 2023
|
|
8
22
|
|
|
9
23
|
#### :rocket: New Features
|
package/package.json
CHANGED
|
@@ -41,7 +41,6 @@ const View = (props) => {
|
|
|
41
41
|
} = props;
|
|
42
42
|
const {
|
|
43
43
|
with_notes = true,
|
|
44
|
-
with_sources = true,
|
|
45
44
|
with_more_info = true,
|
|
46
45
|
with_download = true,
|
|
47
46
|
with_share = true,
|
|
@@ -135,7 +134,13 @@ const View = (props) => {
|
|
|
135
134
|
* tableau visualization
|
|
136
135
|
*/
|
|
137
136
|
const tableauVisId = flattenToAppURL(tableauVisualization['@id'] || '');
|
|
138
|
-
if (
|
|
137
|
+
if (
|
|
138
|
+
mode === 'edit' &&
|
|
139
|
+
!tableauVisualization.error &&
|
|
140
|
+
isBlock &&
|
|
141
|
+
tableau_vis_url &&
|
|
142
|
+
tableau_vis_url !== tableauVisId
|
|
143
|
+
) {
|
|
139
144
|
getContent(tableau_vis_url, null, id);
|
|
140
145
|
}
|
|
141
146
|
}, [id, isBlock, getContent, mode, tableau_vis_url, tableauVisualization]);
|
|
@@ -144,6 +149,12 @@ const View = (props) => {
|
|
|
144
149
|
return <Message>Please select a tableau from block editor.</Message>;
|
|
145
150
|
}
|
|
146
151
|
|
|
152
|
+
if (tableauVisualization?.error) {
|
|
153
|
+
return (
|
|
154
|
+
<p dangerouslySetInnerHTML={{ __html: tableauVisualization.error }} />
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
147
158
|
return (
|
|
148
159
|
<div className="embed-tableau">
|
|
149
160
|
<PrivacyProtection
|
|
@@ -157,7 +168,7 @@ const View = (props) => {
|
|
|
157
168
|
tableau_height:
|
|
158
169
|
tableau_height || tableauVisualization.tableau_height,
|
|
159
170
|
with_notes,
|
|
160
|
-
with_sources,
|
|
171
|
+
with_sources: true,
|
|
161
172
|
with_more_info,
|
|
162
173
|
with_download,
|
|
163
174
|
with_share,
|
|
@@ -154,14 +154,6 @@ Array [
|
|
|
154
154
|
-
|
|
155
155
|
No description
|
|
156
156
|
</div>
|
|
157
|
-
<div
|
|
158
|
-
className="mocked-boolean-widget"
|
|
159
|
-
id="mocked-field-with_sources"
|
|
160
|
-
>
|
|
161
|
-
Show sources
|
|
162
|
-
-
|
|
163
|
-
Will show sources set in this page Data provenance
|
|
164
|
-
</div>
|
|
165
157
|
<div
|
|
166
158
|
className="mocked-boolean-widget"
|
|
167
159
|
id="mocked-field-with_more_info"
|
package/src/Tableau/Tableau.jsx
CHANGED
package/src/Tableau/helpers.js
CHANGED
|
@@ -31,16 +31,21 @@ export function getTableauVisualization({
|
|
|
31
31
|
tableauContent,
|
|
32
32
|
content,
|
|
33
33
|
}) {
|
|
34
|
-
const mergedContent =
|
|
35
|
-
const tableau_visualization =
|
|
34
|
+
const mergedContent =
|
|
36
35
|
(isBlock
|
|
37
|
-
? tableauContent
|
|
38
|
-
:
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
? tableauContent
|
|
37
|
+
: {
|
|
38
|
+
...content,
|
|
39
|
+
tableau_visualization: {
|
|
40
|
+
...(content?.tableau_visualization || {}),
|
|
41
|
+
...pickMetadata(content),
|
|
42
|
+
},
|
|
43
|
+
}) || {};
|
|
44
|
+
const tableau_visualization =
|
|
45
|
+
mergedContent?.tableau_visualization || data?.tableau_visualization || {};
|
|
41
46
|
return {
|
|
42
|
-
...pickMetadata(mergedContent),
|
|
43
47
|
...tableau_visualization,
|
|
48
|
+
...(isBlock ? pickMetadata(mergedContent) : {}),
|
|
44
49
|
};
|
|
45
50
|
}
|
|
46
51
|
|