@internetstiftelsen/styleguide 5.0.14-beta.0.9 → 5.0.14

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.
@@ -18,6 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
18
 
19
19
  // TODO: Should probably implement a way to localize texts in the styleguide
20
20
  var consent = (0, _hasCookieConsent2.default)('C0004');
21
+
21
22
  var missingConsentMessage = 'För att spela Youtubefilmer krävs att "Riktade kakor" tillåts. Tryck för att "Anpassa kakor"';
22
23
 
23
24
  function loadYoutubeAPI() {
@@ -71,6 +72,7 @@ function createConsentWarning(el) {
71
72
  }
72
73
 
73
74
  function destroyConsentWarning(el) {
75
+ loadYoutubeAPI();
74
76
  var div = el.querySelector('[data-youtube-consent-warning]');
75
77
 
76
78
  if (div) {
@@ -146,7 +148,6 @@ function delegateClick(e) {
146
148
  }
147
149
 
148
150
  if (!el.youtube) {
149
- loadYoutubeAPI();
150
151
  setupYoutubePlayer(el);
151
152
 
152
153
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "5.0.14-beta.0.9",
3
+ "version": "5.0.14",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
@@ -3,6 +3,7 @@ import className from './className';
3
3
  import hasCookieConsent from './hasCookieConsent';
4
4
 
5
5
  let consent = hasCookieConsent('C0004');
6
+
6
7
  const missingConsentMessage = 'För att spela Youtubefilmer krävs att "Riktade kakor" tillåts. Tryck för att "Anpassa kakor"';
7
8
 
8
9
  function loadYoutubeAPI() {
@@ -56,6 +57,7 @@ function createConsentWarning(el) {
56
57
  }
57
58
 
58
59
  function destroyConsentWarning(el) {
60
+ loadYoutubeAPI();
59
61
  const div = el.querySelector('[data-youtube-consent-warning]');
60
62
 
61
63
  if (div) {
@@ -129,7 +131,6 @@ function delegateClick(e) {
129
131
  }
130
132
 
131
133
  if (!el.youtube) {
132
- loadYoutubeAPI();
133
134
  setupYoutubePlayer(el);
134
135
 
135
136
  return;