@eeacms/volto-tableau 9.0.1 → 9.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 +6 -1
- package/package.json +1 -1
- package/src/Widgets/VisualizationWidget.jsx +1 -41
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,12 @@ 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
|
+
### [9.0.2](https://github.com/eea/volto-tableau/compare/9.0.1...9.0.2) - 20 May 2026
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Remove screenshot service usage from volto-embed [Teodor Voicu - [`b649079`](https://github.com/eea/volto-tableau/commit/b6490790b27c6a98a3873991a6a0aa23cd3f420b)]
|
|
12
|
+
### [9.0.1](https://github.com/eea/volto-tableau/compare/9.0.0...9.0.1) - 9 April 2026
|
|
8
13
|
|
|
9
14
|
#### :hammer_and_wrench: Others
|
|
10
15
|
|
package/package.json
CHANGED
|
@@ -18,21 +18,9 @@ import {
|
|
|
18
18
|
} from '@eeacms/volto-tableau/Tableau/helpers';
|
|
19
19
|
|
|
20
20
|
import '@eeacms/volto-tableau/less/tableau.less';
|
|
21
|
-
import { getBaseUrl } from '@plone/volto/helpers/Url/Url';
|
|
22
|
-
|
|
23
|
-
function blobToBase64(blob) {
|
|
24
|
-
return new Promise((resolve, reject) => {
|
|
25
|
-
const reader = new FileReader();
|
|
26
|
-
reader.onloadend = () => {
|
|
27
|
-
resolve(reader.result);
|
|
28
|
-
};
|
|
29
|
-
reader.onerror = reject;
|
|
30
|
-
reader.readAsDataURL(blob);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
21
|
|
|
34
22
|
const VisualizationWidget = (props) => {
|
|
35
|
-
const { location, content
|
|
23
|
+
const { location, content } = props;
|
|
36
24
|
const ogValue = props.value || {};
|
|
37
25
|
const inAddForm = props.location.pathname.split('/').pop() === 'add';
|
|
38
26
|
const viz = React.useRef();
|
|
@@ -167,34 +155,6 @@ const VisualizationWidget = (props) => {
|
|
|
167
155
|
);
|
|
168
156
|
}, [vizState, value, tableauData, props.intl]);
|
|
169
157
|
|
|
170
|
-
React.useEffect(() => {
|
|
171
|
-
if (value && value.url && value.preview_url_loaded !== value.url) {
|
|
172
|
-
fetch(
|
|
173
|
-
`${getBaseUrl(
|
|
174
|
-
'',
|
|
175
|
-
)}/cors-proxy/https://screenshot.eea.europa.eu/api/v1/retrieve_image_for_url?url=${encodeURIComponent(
|
|
176
|
-
value.url,
|
|
177
|
-
)}&w=1920&h=1000&waitfor=8000`,
|
|
178
|
-
)
|
|
179
|
-
.then((e) => e.blob())
|
|
180
|
-
.then((myBlob) => {
|
|
181
|
-
blobToBase64(myBlob).then((base64String) => {
|
|
182
|
-
setValue({
|
|
183
|
-
...value,
|
|
184
|
-
preview: base64String,
|
|
185
|
-
preview_url_loaded: value.url,
|
|
186
|
-
});
|
|
187
|
-
props.onChange(props.id, {
|
|
188
|
-
...value,
|
|
189
|
-
preview: base64String,
|
|
190
|
-
preview_url_loaded: value.url,
|
|
191
|
-
});
|
|
192
|
-
});
|
|
193
|
-
})
|
|
194
|
-
.catch(() => {});
|
|
195
|
-
}
|
|
196
|
-
}, [props, value, onChange, id]);
|
|
197
|
-
|
|
198
158
|
return (
|
|
199
159
|
<FormFieldWrapper {...props}>
|
|
200
160
|
<Modal id="tableau-editor-modal" open={open}>
|