@eeacms/volto-tableau 7.0.1 → 7.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
CHANGED
|
@@ -4,15 +4,21 @@ 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.2](https://github.com/eea/volto-tableau/compare/7.0.1...7.0.2) - 28 November 2023
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: fix error on missing value [kreafox - [`a19cf71`](https://github.com/eea/volto-tableau/commit/a19cf715a20b5b499436b98e09efdbc67ae9698b)]
|
|
12
|
+
- fix: pass static parameters to tableau in widget view [kreafox - [`88a1911`](https://github.com/eea/volto-tableau/commit/88a191179be1074688924389fd4303aa3ace4c2f)]
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- test: update tests [kreafox - [`7daa993`](https://github.com/eea/volto-tableau/commit/7daa9935518d16f0b609dc382ec220dbcb0253c2)]
|
|
7
17
|
### [7.0.1](https://github.com/eea/volto-tableau/compare/7.0.0...7.0.1) - 24 November 2023
|
|
8
18
|
|
|
9
19
|
#### :hammer_and_wrench: Others
|
|
10
20
|
|
|
11
|
-
- fix [Miu Razvan - [`4036e40`](https://github.com/eea/volto-tableau/commit/4036e4018bc0faf86aba7a330b52f0a975343be0)]
|
|
12
21
|
- update [Miu Razvan - [`e274b41`](https://github.com/eea/volto-tableau/commit/e274b416f65b446f0e2453e9f0ed6f4cdd27a3f6)]
|
|
13
|
-
- fix [Miu Razvan - [`da14168`](https://github.com/eea/volto-tableau/commit/da14168f40d161264488810e7b08facb265a2c00)]
|
|
14
|
-
- fix [Miu Razvan - [`faba267`](https://github.com/eea/volto-tableau/commit/faba267e7fde6a5b906fdcff010ed9d46ecea741)]
|
|
15
|
-
- fix [Miu Razvan - [`a772a85`](https://github.com/eea/volto-tableau/commit/a772a85e19b80a7202f23ad45e3aff6fa3ae9c3c)]
|
|
16
22
|
## [7.0.0](https://github.com/eea/volto-tableau/compare/6.0.6...7.0.0) - 23 November 2023
|
|
17
23
|
|
|
18
24
|
#### :bug: Bug Fixes
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ const View = React.forwardRef((props, ref) => {
|
|
|
29
29
|
const extraOptions = React.useMemo(() => {
|
|
30
30
|
const options = {};
|
|
31
31
|
staticParameters.forEach((parameter) => {
|
|
32
|
-
if (parameter.field) {
|
|
32
|
+
if (parameter.field && parameter.value) {
|
|
33
33
|
options[parameter.field] = parameter.value;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { connect } from 'react-redux';
|
|
2
3
|
import config from '@plone/volto/registry';
|
|
3
4
|
import { pickMetadata } from '@eeacms/volto-embed/helpers';
|
|
4
5
|
import Tableau from '@eeacms/volto-tableau/Tableau/Tableau';
|
|
5
6
|
|
|
6
7
|
function VisualizationViewWidget(props) {
|
|
8
|
+
const { staticParameters = [] } = props.value;
|
|
9
|
+
|
|
10
|
+
const extraOptions = React.useMemo(() => {
|
|
11
|
+
const options = {};
|
|
12
|
+
staticParameters.forEach((parameter) => {
|
|
13
|
+
if (parameter.field && parameter.value) {
|
|
14
|
+
options[parameter.field] = parameter.value;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return options;
|
|
18
|
+
}, [staticParameters]);
|
|
19
|
+
|
|
7
20
|
return (
|
|
8
21
|
<Tableau
|
|
9
22
|
data={{
|
|
@@ -16,6 +29,7 @@ function VisualizationViewWidget(props) {
|
|
|
16
29
|
with_enlarge: true,
|
|
17
30
|
with_download: true,
|
|
18
31
|
}}
|
|
32
|
+
extraOptions={extraOptions}
|
|
19
33
|
breakpoints={
|
|
20
34
|
config.blocks.blocksConfig?.embed_tableau_visualization?.breakpoints
|
|
21
35
|
}
|
|
@@ -29,9 +29,13 @@ describe('VisualizationViewWidget', () => {
|
|
|
29
29
|
with_share: true,
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
const value = {
|
|
33
|
+
staticParameters: [],
|
|
34
|
+
};
|
|
35
|
+
|
|
32
36
|
const { container } = render(
|
|
33
37
|
<Provider store={store}>
|
|
34
|
-
<VisualizationViewWidget data={data} />
|
|
38
|
+
<VisualizationViewWidget data={data} value={value} />
|
|
35
39
|
</Provider>,
|
|
36
40
|
);
|
|
37
41
|
expect(container.querySelector('.tableau-wrapper')).toBeInTheDocument();
|
|
@@ -24,7 +24,7 @@ const VisualizationWidget = (props) => {
|
|
|
24
24
|
const extraOptions = React.useMemo(() => {
|
|
25
25
|
const options = {};
|
|
26
26
|
(value.staticParameters || []).forEach((parameter) => {
|
|
27
|
-
if (parameter.field) {
|
|
27
|
+
if (parameter.field && parameter.value) {
|
|
28
28
|
options[parameter.field] = parameter.value;
|
|
29
29
|
}
|
|
30
30
|
});
|