@eeacms/volto-tableau 6.0.2 → 6.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 CHANGED
@@ -4,18 +4,25 @@ 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.4](https://github.com/eea/volto-tableau/compare/6.0.3...6.0.4) - 15 November 2023
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: disabled tableau url field [kreafox - [`3bb8273`](https://github.com/eea/volto-tableau/commit/3bb827306704541826090b2c718399b352e44feb)]
12
+ - fix: set default height [kreafox - [`586cbb3`](https://github.com/eea/volto-tableau/commit/586cbb3836fe1578ec0331d96b782dbce0b367f2)]
13
+
14
+ ### [6.0.3](https://github.com/eea/volto-tableau/compare/6.0.2...6.0.3) - 10 November 2023
15
+
7
16
  ### [6.0.2](https://github.com/eea/volto-tableau/compare/6.0.1...6.0.2) - 10 November 2023
8
17
 
9
18
  #### :rocket: New Features
10
19
 
11
20
  - feat: fix tableau not loading on hard reload [Miu Razvan - [`f37867f`](https://github.com/eea/volto-tableau/commit/f37867f3d07c5dd05b91ea0b758eced631afd458)]
12
- - feat: mobile toolbar [Miu Razvan - [`d4f0812`](https://github.com/eea/volto-tableau/commit/d4f08122a743f4787177d6d2bc3aabeebf6bf311)]
13
21
 
14
22
  ### [6.0.1](https://github.com/eea/volto-tableau/compare/6.0.0...6.0.1) - 10 November 2023
15
23
 
16
24
  #### :house: Internal changes
17
25
 
18
- - chore: [JENKINS] Refactor automated testing [valentinab25 - [`903b90a`](https://github.com/eea/volto-tableau/commit/903b90a2df0abc183aa68d99a89bb688de3a0c73)]
19
26
 
20
27
  #### :hammer_and_wrench: Others
21
28
 
@@ -25,9 +32,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
25
32
  - tests: increase coverage [kreafox - [`ecb9262`](https://github.com/eea/volto-tableau/commit/ecb92625a44365faf4c39f0ff3f02ccc4ca21656)]
26
33
  - Fix tableau height [kreafox - [`6194c24`](https://github.com/eea/volto-tableau/commit/6194c2405e2bd93aba9865caed76292cd55193d3)]
27
34
  - Show share & download button on widget view [kreafox - [`a66e253`](https://github.com/eea/volto-tableau/commit/a66e2537d08dc7129e249c28e1daa27246c88815)]
28
- - test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`9d2189d`](https://github.com/eea/volto-tableau/commit/9d2189d4edb13dd449d75cd6dd9052bbed67304d)]
29
- - test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`f2fa3f9`](https://github.com/eea/volto-tableau/commit/f2fa3f9ccabab918586179ac16ead44e2eba8498)]
30
- - test: [JENKINS] Improve cypress time [valentinab25 - [`5748183`](https://github.com/eea/volto-tableau/commit/5748183c27dae18a4ebbc067d659cbc24cad8f71)]
31
35
  - use toolbar from volto-embed [Miu Razvan - [`1a232a1`](https://github.com/eea/volto-tableau/commit/1a232a15f2bbe05da75307800590d0a0a1c4996b)]
32
36
  ## [6.0.0](https://github.com/eea/volto-tableau/compare/5.0.2...6.0.0) - 30 October 2023
33
37
 
@@ -85,7 +89,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
85
89
  - test: change volto version in Jenkinsfile [ana-oprea - [`347aceb`](https://github.com/eea/volto-tableau/commit/347aceb07d152fddeebbf3a7e7a6ac9c55dc21ba)]
86
90
  - test: increase cypress timeout [ana-oprea - [`bdf4408`](https://github.com/eea/volto-tableau/commit/bdf44083cd84c96b4914d3f8a3bb17c5187f191c)]
87
91
  - test: EN locales, pre-commit fix, feature PRs checks Refs #257193 [valentinab25 - [`caff974`](https://github.com/eea/volto-tableau/commit/caff9742a703b224133a8dd2a969629e70c9fd33)]
88
- - test: Fix eslint and yarn i18n [Alin Voinea - [`b8be7fb`](https://github.com/eea/volto-tableau/commit/b8be7fb9ab10faed0a1be8ce7e3d4e7c78ebe020)]
89
92
  - i18n: Add en [Alin Voinea - [`c5e20dd`](https://github.com/eea/volto-tableau/commit/c5e20ddea25c830ac80665ee9a71e557e8cd117d)]
90
93
  - test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`2116ff9`](https://github.com/eea/volto-tableau/commit/2116ff95c6454e813bdca44e6c3aa81fa0a916b8)]
91
94
  ## [5.0.0](https://github.com/eea/volto-tableau/compare/4.1.1...5.0.0) - 25 July 2023
@@ -97,21 +100,17 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
97
100
  #### :hammer_and_wrench: Others
98
101
 
99
102
  - Release 5.0.0 [Alin Voinea - [`97c98e9`](https://github.com/eea/volto-tableau/commit/97c98e98b1295a4ad45756326dc20cd59517515f)]
100
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`2acb3a5`](https://github.com/eea/volto-tableau/commit/2acb3a5490f62ce0a95ebbd03c32874ac3a42603)]
101
103
  ### [4.1.1](https://github.com/eea/volto-tableau/compare/4.1.0...4.1.1) - 21 July 2023
102
104
 
103
105
  #### :hammer_and_wrench: Others
104
106
 
105
107
  - Add VisualizationViewWidget [Tiberiu Ichim - [`fa881cb`](https://github.com/eea/volto-tableau/commit/fa881cbc3643a46697fb16d1c86ada1d4121a46a)]
106
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`cbcbad2`](https://github.com/eea/volto-tableau/commit/cbcbad26f7aa3683122199c8d5cbd142903df93b)]
107
- - Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`51abe6d`](https://github.com/eea/volto-tableau/commit/51abe6d4db80825fe2e396e04c7003c6ad79b480)]
108
108
  ### [4.1.0](https://github.com/eea/volto-tableau/compare/4.0.0...4.1.0) - 15 June 2023
109
109
 
110
110
  ## [4.0.0](https://github.com/eea/volto-tableau/compare/3.0.8...4.0.0) - 13 June 2023
111
111
 
112
112
  #### :house: Internal changes
113
113
 
114
- - chore: [JENKINS] Remove alpha testing version [valentinab25 - [`e33bb21`](https://github.com/eea/volto-tableau/commit/e33bb21eb429c33e3a15d771487a1c9af8ccb0d5)]
115
114
 
116
115
  #### :hammer_and_wrench: Others
117
116
 
@@ -143,7 +142,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
143
142
 
144
143
  #### :hammer_and_wrench: Others
145
144
 
146
- - Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`f5deccd`](https://github.com/eea/volto-tableau/commit/f5deccd84372752908b300c5cfd78134818e5ce4)]
147
145
  ### [3.0.6](https://github.com/eea/volto-tableau/compare/3.0.5...3.0.6) - 30 January 2023
148
146
 
149
147
  ### [3.0.5](https://github.com/eea/volto-tableau/compare/3.0.4...3.0.5) - 26 January 2023
@@ -215,7 +213,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
215
213
  - Update commands.js [Nilesh - [`7c48437`](https://github.com/eea/volto-tableau/commit/7c4843780efb9b85a4728de73c00d831c1d8fdcf)]
216
214
  - Update e2e.js [Nilesh - [`f67b45c`](https://github.com/eea/volto-tableau/commit/f67b45c170f58f8d0301192994226f173e4cb00a)]
217
215
  - latest volto compatibility refs #154757 [nileshgulia1 - [`881ba48`](https://github.com/eea/volto-tableau/commit/881ba482dc9b82e7fdac16549d41e80a6d26b3de)]
218
- - Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`58e25df`](https://github.com/eea/volto-tableau/commit/58e25df2291add09670143bee54cde103ee835b9)]
219
216
  ### [1.3.0](https://github.com/eea/volto-tableau/compare/1.2.5...1.3.0) - 28 September 2022
220
217
 
221
218
  #### :hammer_and_wrench: Others
@@ -229,15 +226,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
229
226
  - Use volto 16 alpha 14 [Miu Razvan - [`93641be`](https://github.com/eea/volto-tableau/commit/93641be4c2393f49008aff789400cf7c947949fd)]
230
227
  - Revert volto-tableau group to common [Andrei Grigore - [`9d24c6d`](https://github.com/eea/volto-tableau/commit/9d24c6d2767fed6a840cddaee55dbd5cecb544b5)]
231
228
  - Tableaugroup typo fix [Andrei Grigore - [`b0b5378`](https://github.com/eea/volto-tableau/commit/b0b5378a437043120a96c9e5e8802584145daa22)]
232
- - Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`3234347`](https://github.com/eea/volto-tableau/commit/3234347e524cc0ed4918242f503fe9e7dba266b2)]
233
229
  - Refs #142010 - Optimize Volto-addons gitflow pipelines [valentinab25 - [`d237e1c`](https://github.com/eea/volto-tableau/commit/d237e1c72817d7e68a3eb698563674d1514db24f)]
234
230
  ### [1.2.4](https://github.com/eea/volto-tableau/compare/1.2.3...1.2.4) - 25 October 2021
235
231
 
236
232
  #### :hammer_and_wrench: Others
237
233
 
238
- - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`2b19679`](https://github.com/eea/volto-tableau/commit/2b19679e2c7bcdc83082d1c73a595eea8b86d14f)]
239
- - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`384ccae`](https://github.com/eea/volto-tableau/commit/384ccaebed8c414a5c90eb96c6ce0a2b091f249c)]
240
- - Add Sonarqube tag using frontend addons list [EEA Jenkins - [`589258e`](https://github.com/eea/volto-tableau/commit/589258e9b3cbba9cee37c57bb85ca5b707bc65d7)]
241
234
  ### [1.2.3](https://github.com/eea/volto-tableau/compare/1.2.2...1.2.3) - 14 June 2021
242
235
 
243
236
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-tableau",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "description": "@eeacms/volto-tableau: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -14,7 +14,7 @@ const View = (props) => {
14
14
  with_more_info = true,
15
15
  with_download = true,
16
16
  with_share = true,
17
- tableau_height,
17
+ tableau_height = 700,
18
18
  } = data;
19
19
  const { figure_note = [], data_provenance = {}, tableau_visualization } =
20
20
  props.tableau_visualization_data || {};
@@ -128,7 +128,6 @@ export default (config, viz, vizState) => {
128
128
  url: {
129
129
  title: 'Url',
130
130
  widget: 'textarea',
131
- isDisabled,
132
131
  },
133
132
  title: {
134
133
  title: 'Title',
@@ -107,7 +107,7 @@ const Tableau = forwardRef((props, ref) => {
107
107
  with_more_info = true,
108
108
  with_download = true,
109
109
  with_share = true,
110
- tableau_height,
110
+ tableau_height = 700,
111
111
  } = data;
112
112
  const device = useMemo(
113
113
  () => getDevice(breakpoints, screen.page?.width || Infinity),
@@ -333,7 +333,6 @@ const Tableau = forwardRef((props, ref) => {
333
333
  }, [data]);
334
334
 
335
335
  useEffect(() => {
336
- // console.log('HERE trigger initiateViz', tableau, url);
337
336
  if (!tableau) return;
338
337
  if (url) {
339
338
  disposeViz();
@@ -431,7 +430,7 @@ const Tableau = forwardRef((props, ref) => {
431
430
  clearData={clearData}
432
431
  />
433
432
  <div
434
- style={{ height: tableau_height ? tableau_height + 'px' : '100%' }}
433
+ style={{ height: tableau_height + 'px' }}
435
434
  className={cx('tableau', `tableau-${version}`, {
436
435
  'tableau-autoscale': autoScale,
437
436
  })}
@@ -93,7 +93,6 @@ export default (config, viz, vizState) => {
93
93
  url: {
94
94
  title: 'Url',
95
95
  widget: 'textarea',
96
- isDisabled,
97
96
  },
98
97
  sheetname: {
99
98
  title: 'Sheetname',
package/src/hooks.js CHANGED
@@ -1,11 +1,10 @@
1
- import { useEffect, useState } from 'react';
1
+ import { useEffect, useState, useRef } from 'react';
2
2
  import { loadTableauScript } from './helpers';
3
3
 
4
- let clock;
5
-
6
4
  const TIMEOUT = 10000;
7
5
 
8
6
  export const useTableau = (version) => {
7
+ const clock = useRef();
9
8
  const [tableau, setTableau] = useState();
10
9
 
11
10
  useEffect(() => {
@@ -13,20 +12,20 @@ export const useTableau = (version) => {
13
12
 
14
13
  const startTime = new Date().getTime();
15
14
 
16
- clock = setInterval(() => {
15
+ clock.current = setInterval(() => {
17
16
  const tableauApi = window[`tableau_${version}`];
18
17
  if (tableauApi) {
19
18
  setTableau(tableauApi);
20
- clearInterval(clock);
19
+ clearInterval(clock.current);
21
20
  return;
22
21
  }
23
22
  if (new Date().getTime() - startTime > TIMEOUT) {
24
- clearInterval(clock);
23
+ clearInterval(clock.current);
25
24
  }
26
25
  }, 100);
27
26
 
28
27
  return () => {
29
- clearInterval(clock);
28
+ clearInterval(clock.current);
30
29
  };
31
30
  }, [version]);
32
31