@eeacms/volto-tableau 7.0.4 → 7.0.5

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,12 +4,16 @@ 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.5](https://github.com/eea/volto-tableau/compare/7.0.4...7.0.5) - 6 December 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - pass down static parameters in embed tableau as well [kreafox - [`11e46cc`](https://github.com/eea/volto-tableau/commit/11e46ccf07e83d9722790a8596375adb930b96c3)]
7
12
  ### [7.0.4](https://github.com/eea/volto-tableau/compare/7.0.3...7.0.4) - 5 December 2023
8
13
 
9
14
  #### :hammer_and_wrench: Others
10
15
 
11
16
  - 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)]
13
17
  ### [7.0.3](https://github.com/eea/volto-tableau/compare/7.0.2...7.0.3) - 29 November 2023
14
18
 
15
19
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-tableau",
3
- "version": "7.0.4",
3
+ "version": "7.0.5",
4
4
  "description": "@eeacms/volto-tableau: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -39,6 +39,18 @@ const View = (props) => {
39
39
 
40
40
  const tableau_visualization = getTableauVisualization(props);
41
41
 
42
+ const { staticParameters = [] } = tableau_visualization;
43
+
44
+ const extraOptions = React.useMemo(() => {
45
+ const options = {};
46
+ staticParameters.forEach((parameter) => {
47
+ if (parameter.field && parameter.value) {
48
+ options[parameter.field] = parameter.value;
49
+ }
50
+ });
51
+ return options;
52
+ }, [staticParameters]);
53
+
42
54
  useEffect(() => {
43
55
  const tableauVisId = flattenToAppURL(tableau_visualization['@id'] || '');
44
56
  if (
@@ -75,6 +87,7 @@ const View = (props) => {
75
87
  with_enlarge,
76
88
  tableau_vis_url,
77
89
  }}
90
+ extraOptions={extraOptions}
78
91
  />
79
92
  </PrivacyProtection>
80
93
  </div>