@eeacms/volto-tableau 6.0.3 → 6.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 +13 -3
- package/package.json +1 -1
- package/src/Blocks/EmbedTableauVisualization/View.jsx +3 -1
- package/src/Blocks/EmbedTableauVisualization/schema.js +6 -0
- package/src/Blocks/TableauBlock/View.jsx +8 -1
- package/src/Blocks/TableauBlock/schema.js +6 -1
- package/src/Tableau/Tableau.jsx +20 -2
- package/src/Views/VisualizationView.jsx +1 -0
- package/src/Widgets/VisualizationViewWidget.jsx +2 -1
- package/src/Widgets/VisualizationWidget.jsx +2 -0
- package/src/Widgets/schema.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +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
|
-
### [6.0.
|
|
7
|
+
### [6.0.5](https://github.com/eea/volto-tableau/compare/6.0.4...6.0.5) - 15 November 2023
|
|
8
8
|
|
|
9
|
-
#### :
|
|
9
|
+
#### :rocket: New Features
|
|
10
|
+
|
|
11
|
+
- feat: add enlarge option for tableau [kreafox - [`4af7c29`](https://github.com/eea/volto-tableau/commit/4af7c29462302b318a5d24118288ef982cc1cd1c)]
|
|
12
|
+
|
|
13
|
+
### [6.0.4](https://github.com/eea/volto-tableau/compare/6.0.3...6.0.4) - 15 November 2023
|
|
14
|
+
|
|
15
|
+
#### :bug: Bug Fixes
|
|
16
|
+
|
|
17
|
+
- fix: disabled tableau url field [kreafox - [`3bb8273`](https://github.com/eea/volto-tableau/commit/3bb827306704541826090b2c718399b352e44feb)]
|
|
18
|
+
- fix: set default height [kreafox - [`586cbb3`](https://github.com/eea/volto-tableau/commit/586cbb3836fe1578ec0331d96b782dbce0b367f2)]
|
|
19
|
+
|
|
20
|
+
### [6.0.3](https://github.com/eea/volto-tableau/compare/6.0.2...6.0.3) - 10 November 2023
|
|
10
21
|
|
|
11
|
-
- fix tableau for real this time [Miu Razvan - [`a304c2c`](https://github.com/eea/volto-tableau/commit/a304c2cce2a68cfa6b1123a853cfda0b57501ab3)]
|
|
12
22
|
### [6.0.2](https://github.com/eea/volto-tableau/compare/6.0.1...6.0.2) - 10 November 2023
|
|
13
23
|
|
|
14
24
|
#### :rocket: New Features
|
package/package.json
CHANGED
|
@@ -14,7 +14,8 @@ const View = (props) => {
|
|
|
14
14
|
with_more_info = true,
|
|
15
15
|
with_download = true,
|
|
16
16
|
with_share = true,
|
|
17
|
-
|
|
17
|
+
with_enlarge = true,
|
|
18
|
+
tableau_height = 700,
|
|
18
19
|
} = data;
|
|
19
20
|
const { figure_note = [], data_provenance = {}, tableau_visualization } =
|
|
20
21
|
props.tableau_visualization_data || {};
|
|
@@ -51,6 +52,7 @@ const View = (props) => {
|
|
|
51
52
|
with_more_info,
|
|
52
53
|
with_download,
|
|
53
54
|
with_share,
|
|
55
|
+
with_enlarge,
|
|
54
56
|
tableau_height,
|
|
55
57
|
tableau_vis_url,
|
|
56
58
|
}}
|
|
@@ -58,6 +58,7 @@ export default () => {
|
|
|
58
58
|
'with_more_info',
|
|
59
59
|
'with_download',
|
|
60
60
|
'with_share',
|
|
61
|
+
'with_enlarge',
|
|
61
62
|
],
|
|
62
63
|
},
|
|
63
64
|
{
|
|
@@ -87,6 +88,11 @@ export default () => {
|
|
|
87
88
|
type: 'boolean',
|
|
88
89
|
defaultValue: true,
|
|
89
90
|
},
|
|
91
|
+
with_enlarge: {
|
|
92
|
+
title: 'Show enlarge button',
|
|
93
|
+
type: 'boolean',
|
|
94
|
+
defaultValue: true,
|
|
95
|
+
},
|
|
90
96
|
with_download: {
|
|
91
97
|
title: 'Show download button',
|
|
92
98
|
type: 'boolean',
|
|
@@ -22,6 +22,7 @@ const View = React.forwardRef((props, ref) => {
|
|
|
22
22
|
with_sources = true,
|
|
23
23
|
with_download = true,
|
|
24
24
|
with_share = true,
|
|
25
|
+
with_enlarge = true,
|
|
25
26
|
sources,
|
|
26
27
|
} = data;
|
|
27
28
|
|
|
@@ -75,7 +76,13 @@ const View = React.forwardRef((props, ref) => {
|
|
|
75
76
|
ref={viz}
|
|
76
77
|
mode={mode}
|
|
77
78
|
block={block}
|
|
78
|
-
data={{
|
|
79
|
+
data={{
|
|
80
|
+
...data,
|
|
81
|
+
with_sources,
|
|
82
|
+
with_download,
|
|
83
|
+
with_share,
|
|
84
|
+
with_enlarge,
|
|
85
|
+
}}
|
|
79
86
|
sources={sources}
|
|
80
87
|
extraFilters={extraFilters}
|
|
81
88
|
extraOptions={extraOptions}
|
|
@@ -100,6 +100,7 @@ export default (config, viz, vizState) => {
|
|
|
100
100
|
'with_sources',
|
|
101
101
|
'with_download',
|
|
102
102
|
'with_share',
|
|
103
|
+
'with_enlarge',
|
|
103
104
|
],
|
|
104
105
|
},
|
|
105
106
|
{
|
|
@@ -128,7 +129,6 @@ export default (config, viz, vizState) => {
|
|
|
128
129
|
url: {
|
|
129
130
|
title: 'Url',
|
|
130
131
|
widget: 'textarea',
|
|
131
|
-
isDisabled,
|
|
132
132
|
},
|
|
133
133
|
title: {
|
|
134
134
|
title: 'Title',
|
|
@@ -148,6 +148,11 @@ export default (config, viz, vizState) => {
|
|
|
148
148
|
type: 'boolean',
|
|
149
149
|
defaultValue: true,
|
|
150
150
|
},
|
|
151
|
+
with_enlarge: {
|
|
152
|
+
title: 'Show enlarge button',
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
defaultValue: true,
|
|
155
|
+
},
|
|
151
156
|
with_sources: {
|
|
152
157
|
title: 'Show sources',
|
|
153
158
|
type: 'boolean',
|
package/src/Tableau/Tableau.jsx
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
Sources,
|
|
20
20
|
MoreInfo,
|
|
21
21
|
Share,
|
|
22
|
+
Enlarge,
|
|
22
23
|
} from '@eeacms/volto-embed/Toolbar';
|
|
23
24
|
import { useTableau } from '@eeacms/volto-tableau/hooks';
|
|
24
25
|
import { JsonCodeSnippet, Download } from '@eeacms/volto-tableau/Utils';
|
|
@@ -107,7 +108,8 @@ const Tableau = forwardRef((props, ref) => {
|
|
|
107
108
|
with_more_info = true,
|
|
108
109
|
with_download = true,
|
|
109
110
|
with_share = true,
|
|
110
|
-
|
|
111
|
+
with_enlarge = true,
|
|
112
|
+
tableau_height = 700,
|
|
111
113
|
} = data;
|
|
112
114
|
const device = useMemo(
|
|
113
115
|
() => getDevice(breakpoints, screen.page?.width || Infinity),
|
|
@@ -430,7 +432,7 @@ const Tableau = forwardRef((props, ref) => {
|
|
|
430
432
|
clearData={clearData}
|
|
431
433
|
/>
|
|
432
434
|
<div
|
|
433
|
-
style={{ height: tableau_height
|
|
435
|
+
style={{ height: tableau_height + 'px' }}
|
|
434
436
|
className={cx('tableau', `tableau-${version}`, {
|
|
435
437
|
'tableau-autoscale': autoScale,
|
|
436
438
|
})}
|
|
@@ -444,6 +446,22 @@ const Tableau = forwardRef((props, ref) => {
|
|
|
444
446
|
{with_more_info && <MoreInfo href={tableau_vis_url || data.url} />}
|
|
445
447
|
</div>
|
|
446
448
|
<div className="right-col">
|
|
449
|
+
{with_enlarge && loaded && (
|
|
450
|
+
<Enlarge>
|
|
451
|
+
<Tableau
|
|
452
|
+
{...props}
|
|
453
|
+
data={{
|
|
454
|
+
...props.data,
|
|
455
|
+
with_notes: false,
|
|
456
|
+
with_sources: false,
|
|
457
|
+
with_more_info: false,
|
|
458
|
+
with_enlarge: false,
|
|
459
|
+
with_share: false,
|
|
460
|
+
with_download: false,
|
|
461
|
+
}}
|
|
462
|
+
/>
|
|
463
|
+
</Enlarge>
|
|
464
|
+
)}
|
|
447
465
|
{with_download && loaded && <Download viz={viz.current} />}
|
|
448
466
|
{with_share && loaded && (
|
|
449
467
|
<Share href={tableau_vis_url || data.url} />
|
|
@@ -10,8 +10,9 @@ export default function VisualizationViewWidget(props) {
|
|
|
10
10
|
...value,
|
|
11
11
|
with_notes: false,
|
|
12
12
|
with_sources: false,
|
|
13
|
-
with_more_info:
|
|
13
|
+
with_more_info: false,
|
|
14
14
|
with_share: true,
|
|
15
|
+
with_enlarge: true,
|
|
15
16
|
with_download: true,
|
|
16
17
|
}}
|
|
17
18
|
breakpoints={
|
|
@@ -78,6 +78,7 @@ const VisualizationWidget = (props) => {
|
|
|
78
78
|
with_sources: false,
|
|
79
79
|
with_more_info: false,
|
|
80
80
|
with_share: false,
|
|
81
|
+
with_enlarge: false,
|
|
81
82
|
with_download: false,
|
|
82
83
|
}}
|
|
83
84
|
mode="edit"
|
|
@@ -127,6 +128,7 @@ const VisualizationWidget = (props) => {
|
|
|
127
128
|
with_sources: false,
|
|
128
129
|
with_more_info: false,
|
|
129
130
|
with_share: false,
|
|
131
|
+
with_enlarge: false,
|
|
130
132
|
with_download: false,
|
|
131
133
|
}}
|
|
132
134
|
breakpoints={
|