@eeacms/volto-tableau 3.0.0 → 3.0.1
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 +7 -1
- package/package.json +1 -1
- package/src/helpers.js +21 -8
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,13 @@ 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
|
-
### [3.0.
|
|
7
|
+
### [3.0.1](https://github.com/eea/volto-tableau/compare/3.0.0...3.0.1) - 13 January 2023
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- helper comments [andreiggr - [`b13abfd`](https://github.com/eea/volto-tableau/commit/b13abfd3fe5813f872b98de66de63c98f4721c62)]
|
|
12
|
+
- wait for client before document get [andreiggr - [`e12a3db`](https://github.com/eea/volto-tableau/commit/e12a3dbd302a33e446cc01da914d90b8cf54a024)]
|
|
13
|
+
## [3.0.0](https://github.com/eea/volto-tableau/compare/2.0.0...3.0.0) - 13 January 2023
|
|
8
14
|
|
|
9
15
|
#### :hammer_and_wrench: Others
|
|
10
16
|
|
package/package.json
CHANGED
package/src/helpers.js
CHANGED
|
@@ -25,16 +25,29 @@ const loadTableauScript = (callback, version) => {
|
|
|
25
25
|
|
|
26
26
|
const isMyScriptLoaded = (version) => {
|
|
27
27
|
//check for loaded Tableau script in dom scripts
|
|
28
|
-
var scripts = document.getElementsByTagName('script');
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
var scripts = __CLIENT__ && document.getElementsByTagName('script');
|
|
29
|
+
if (scripts) {
|
|
30
|
+
for (var i = scripts.length; i--; ) {
|
|
31
|
+
// eslint-disable-next-line eqeqeq
|
|
32
|
+
if (
|
|
33
|
+
scripts[i].src ===
|
|
34
|
+
`https://public.tableau.com/javascripts/api/tableau-${version}.min.js`
|
|
35
|
+
)
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
return false;
|
|
38
40
|
};
|
|
39
41
|
|
|
40
42
|
export { loadTableauScript, isMyScriptLoaded };
|
|
43
|
+
|
|
44
|
+
//script url for each version. In case you might need to add them in the load balancer
|
|
45
|
+
// https://public.tableau.com/javascripts/api/tableau-2.8.0.min.js
|
|
46
|
+
// https://public.tableau.com/javascripts/api/tableau-2.7.0.min.js
|
|
47
|
+
// https://public.tableau.com/javascripts/api/tableau-2.6.0.min.js
|
|
48
|
+
// https://public.tableau.com/javascripts/api/tableau-2.5.0.min.js
|
|
49
|
+
// https://public.tableau.com/javascripts/api/tableau-2.4.0.min.js
|
|
50
|
+
// https://public.tableau.com/javascripts/api/tableau-2.3.0.min.js
|
|
51
|
+
// https://public.tableau.com/javascripts/api/tableau-2.2.2.min.js
|
|
52
|
+
// https://public.tableau.com/javascripts/api/tableau-2.1.2.min.js
|
|
53
|
+
// https://public.tableau.com/javascripts/api/tableau-2.0.3.min.js
|