@eeacms/volto-tableau 7.0.3 → 7.0.4
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 -0
- package/package.json +1 -1
- package/src/Blocks/EmbedTableauVisualization/__snapshots__/Edit.test.jsx.snap +5 -1
- package/src/Blocks/EmbedTableauVisualization/__snapshots__/View.test.jsx.snap +5 -1
- package/src/Tableau/Tableau.jsx +2 -2
- package/src/Views/VisualizationView.jsx +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +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
|
+
### [7.0.4](https://github.com/eea/volto-tableau/compare/7.0.3...7.0.4) - 5 December 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- fix tests [Miu Razvan - [`3a880ab`](https://github.com/eea/volto-tableau/commit/3a880aba0ff02bb568a1778e07b48b572472e44a)]
|
|
12
|
+
- fix default height [Miu Razvan - [`0eb7ebb`](https://github.com/eea/volto-tableau/commit/0eb7ebb7c5f702ffb3f0ae679b90f27ad7cbb080)]
|
|
7
13
|
### [7.0.3](https://github.com/eea/volto-tableau/compare/7.0.2...7.0.3) - 29 November 2023
|
|
8
14
|
|
|
9
15
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
package/src/Tableau/Tableau.jsx
CHANGED
|
@@ -34,7 +34,7 @@ function getHeight(height) {
|
|
|
34
34
|
if (asNumber) {
|
|
35
35
|
return `${height}px`;
|
|
36
36
|
}
|
|
37
|
-
return height;
|
|
37
|
+
return height || '700px';
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const TableauDebug = ({ mode, data, vizState, url, version, clearData }) => {
|
|
@@ -438,7 +438,7 @@ const Tableau = forwardRef((props, ref) => {
|
|
|
438
438
|
clearData={clearData}
|
|
439
439
|
/>
|
|
440
440
|
<div
|
|
441
|
-
style={
|
|
441
|
+
style={{ height: getHeight(tableau_height) }}
|
|
442
442
|
className={cx('tableau', `tableau-${version}`, {
|
|
443
443
|
'tableau-autoscale': autoScale,
|
|
444
444
|
})}
|
|
@@ -9,6 +9,17 @@ import Tableau from '@eeacms/volto-tableau/Tableau/Tableau';
|
|
|
9
9
|
const VisualizationView = (props) => {
|
|
10
10
|
const { content = {} } = props;
|
|
11
11
|
const { tableau_visualization = {} } = content;
|
|
12
|
+
const { staticParameters = [] } = tableau_visualization;
|
|
13
|
+
|
|
14
|
+
const extraOptions = React.useMemo(() => {
|
|
15
|
+
const options = {};
|
|
16
|
+
staticParameters.forEach((parameter) => {
|
|
17
|
+
if (parameter.field && parameter.value) {
|
|
18
|
+
options[parameter.field] = parameter.value;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return options;
|
|
22
|
+
}, [staticParameters]);
|
|
12
23
|
|
|
13
24
|
return (
|
|
14
25
|
<Container id="page-document">
|
|
@@ -22,10 +33,11 @@ const VisualizationView = (props) => {
|
|
|
22
33
|
with_notes: false,
|
|
23
34
|
with_sources: false,
|
|
24
35
|
with_more_info: false,
|
|
25
|
-
with_share:
|
|
26
|
-
with_enlarge:
|
|
36
|
+
with_share: true,
|
|
37
|
+
with_enlarge: true,
|
|
27
38
|
with_download: true,
|
|
28
39
|
}}
|
|
40
|
+
extraOptions={extraOptions}
|
|
29
41
|
breakpoints={
|
|
30
42
|
config.blocks.blocksConfig.embed_tableau_visualization.breakpoints
|
|
31
43
|
}
|