@everymatrix/player-user-consents 1.45.14 → 1.46.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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-user-consents.cjs.entry.js +24 -2
- package/dist/cjs/player-user-consents.cjs.js +1 -1
- package/dist/collection/components/player-user-consents/player-user-consents.js +43 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-user-consents.entry.js +24 -2
- package/dist/esm/player-user-consents.js +1 -1
- package/dist/player-user-consents/{p-c5bf5548.entry.js → p-0060d123.entry.js} +1 -1
- package/dist/player-user-consents/player-user-consents.esm.js +1 -1
- package/dist/types/components/player-user-consents/player-user-consents.d.ts +7 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -144,6 +144,19 @@ const PlayerUserConsents = class {
|
|
|
144
144
|
sheet.innerHTML = this.clientStyling;
|
|
145
145
|
this.stylingContainer.prepend(sheet);
|
|
146
146
|
};
|
|
147
|
+
this.setClientStylingURL = () => {
|
|
148
|
+
let url = new URL(this.clientStylingUrl);
|
|
149
|
+
let cssFile = document.createElement('style');
|
|
150
|
+
fetch(url.href)
|
|
151
|
+
.then((res) => res.text())
|
|
152
|
+
.then((data) => {
|
|
153
|
+
cssFile.innerHTML = data;
|
|
154
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
155
|
+
})
|
|
156
|
+
.catch((err) => {
|
|
157
|
+
console.log('error ', err);
|
|
158
|
+
});
|
|
159
|
+
};
|
|
147
160
|
this.lang = 'en';
|
|
148
161
|
this.queried = false;
|
|
149
162
|
this.consentType = '';
|
|
@@ -151,6 +164,7 @@ const PlayerUserConsents = class {
|
|
|
151
164
|
this.gmVersion = '';
|
|
152
165
|
this.consentTitle = '';
|
|
153
166
|
this.clientStyling = '';
|
|
167
|
+
this.clientStylingUrl = '';
|
|
154
168
|
this.translationUrl = '';
|
|
155
169
|
this.textContent = '';
|
|
156
170
|
this.limitStylingAppends = false;
|
|
@@ -158,6 +172,10 @@ const PlayerUserConsents = class {
|
|
|
158
172
|
handleNewTranslations() {
|
|
159
173
|
getTranslations(this.translationUrl);
|
|
160
174
|
}
|
|
175
|
+
handleStylingUrlChange(newValue, oldValue) {
|
|
176
|
+
if (newValue !== oldValue)
|
|
177
|
+
this.setClientStylingURL();
|
|
178
|
+
}
|
|
161
179
|
async componentWillLoad() {
|
|
162
180
|
if (this.translationUrl.length > 2) {
|
|
163
181
|
await getTranslations(this.translationUrl);
|
|
@@ -172,6 +190,9 @@ const PlayerUserConsents = class {
|
|
|
172
190
|
componentDidRender() {
|
|
173
191
|
// start custom styling area
|
|
174
192
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
193
|
+
if (this.clientStylingUrl) {
|
|
194
|
+
this.setClientStylingURL();
|
|
195
|
+
}
|
|
175
196
|
if (this.clientStyling)
|
|
176
197
|
this.setClientStyling();
|
|
177
198
|
this.limitStylingAppends = true;
|
|
@@ -198,10 +219,11 @@ const PlayerUserConsents = class {
|
|
|
198
219
|
if (this.queried) {
|
|
199
220
|
this.userLegislationConsentHandler();
|
|
200
221
|
}
|
|
201
|
-
return (index.h("div", { key: '
|
|
222
|
+
return (index.h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, index.h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
|
|
202
223
|
}
|
|
203
224
|
static get watchers() { return {
|
|
204
|
-
"translationUrl": ["handleNewTranslations"]
|
|
225
|
+
"translationUrl": ["handleNewTranslations"],
|
|
226
|
+
"clientStylingUrl": ["handleStylingUrlChange"]
|
|
205
227
|
}; }
|
|
206
228
|
};
|
|
207
229
|
PlayerUserConsents.style = PlayerUserConsentsStyle0;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -9,6 +9,19 @@ export class PlayerUserConsents {
|
|
|
9
9
|
sheet.innerHTML = this.clientStyling;
|
|
10
10
|
this.stylingContainer.prepend(sheet);
|
|
11
11
|
};
|
|
12
|
+
this.setClientStylingURL = () => {
|
|
13
|
+
let url = new URL(this.clientStylingUrl);
|
|
14
|
+
let cssFile = document.createElement('style');
|
|
15
|
+
fetch(url.href)
|
|
16
|
+
.then((res) => res.text())
|
|
17
|
+
.then((data) => {
|
|
18
|
+
cssFile.innerHTML = data;
|
|
19
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
20
|
+
})
|
|
21
|
+
.catch((err) => {
|
|
22
|
+
console.log('error ', err);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
12
25
|
this.lang = 'en';
|
|
13
26
|
this.queried = false;
|
|
14
27
|
this.consentType = '';
|
|
@@ -16,6 +29,7 @@ export class PlayerUserConsents {
|
|
|
16
29
|
this.gmVersion = '';
|
|
17
30
|
this.consentTitle = '';
|
|
18
31
|
this.clientStyling = '';
|
|
32
|
+
this.clientStylingUrl = '';
|
|
19
33
|
this.translationUrl = '';
|
|
20
34
|
this.textContent = '';
|
|
21
35
|
this.limitStylingAppends = false;
|
|
@@ -23,6 +37,10 @@ export class PlayerUserConsents {
|
|
|
23
37
|
handleNewTranslations() {
|
|
24
38
|
getTranslations(this.translationUrl);
|
|
25
39
|
}
|
|
40
|
+
handleStylingUrlChange(newValue, oldValue) {
|
|
41
|
+
if (newValue !== oldValue)
|
|
42
|
+
this.setClientStylingURL();
|
|
43
|
+
}
|
|
26
44
|
async componentWillLoad() {
|
|
27
45
|
if (this.translationUrl.length > 2) {
|
|
28
46
|
await getTranslations(this.translationUrl);
|
|
@@ -37,6 +55,9 @@ export class PlayerUserConsents {
|
|
|
37
55
|
componentDidRender() {
|
|
38
56
|
// start custom styling area
|
|
39
57
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
58
|
+
if (this.clientStylingUrl) {
|
|
59
|
+
this.setClientStylingURL();
|
|
60
|
+
}
|
|
40
61
|
if (this.clientStyling)
|
|
41
62
|
this.setClientStyling();
|
|
42
63
|
this.limitStylingAppends = true;
|
|
@@ -63,7 +84,7 @@ export class PlayerUserConsents {
|
|
|
63
84
|
if (this.queried) {
|
|
64
85
|
this.userLegislationConsentHandler();
|
|
65
86
|
}
|
|
66
|
-
return (h("div", { key: '
|
|
87
|
+
return (h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
|
|
67
88
|
}
|
|
68
89
|
static get is() { return "player-user-consents"; }
|
|
69
90
|
static get encapsulation() { return "shadow"; }
|
|
@@ -205,6 +226,24 @@ export class PlayerUserConsents {
|
|
|
205
226
|
"reflect": false,
|
|
206
227
|
"defaultValue": "''"
|
|
207
228
|
},
|
|
229
|
+
"clientStylingUrl": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "string",
|
|
234
|
+
"resolved": "string",
|
|
235
|
+
"references": {}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [],
|
|
241
|
+
"text": "Client custom styling via url"
|
|
242
|
+
},
|
|
243
|
+
"attribute": "client-styling-url",
|
|
244
|
+
"reflect": true,
|
|
245
|
+
"defaultValue": "''"
|
|
246
|
+
},
|
|
208
247
|
"translationUrl": {
|
|
209
248
|
"type": "string",
|
|
210
249
|
"mutable": false,
|
|
@@ -253,6 +292,9 @@ export class PlayerUserConsents {
|
|
|
253
292
|
return [{
|
|
254
293
|
"propName": "translationUrl",
|
|
255
294
|
"methodName": "handleNewTranslations"
|
|
295
|
+
}, {
|
|
296
|
+
"propName": "clientStylingUrl",
|
|
297
|
+
"methodName": "handleStylingUrlChange"
|
|
256
298
|
}];
|
|
257
299
|
}
|
|
258
300
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -140,6 +140,19 @@ const PlayerUserConsents = class {
|
|
|
140
140
|
sheet.innerHTML = this.clientStyling;
|
|
141
141
|
this.stylingContainer.prepend(sheet);
|
|
142
142
|
};
|
|
143
|
+
this.setClientStylingURL = () => {
|
|
144
|
+
let url = new URL(this.clientStylingUrl);
|
|
145
|
+
let cssFile = document.createElement('style');
|
|
146
|
+
fetch(url.href)
|
|
147
|
+
.then((res) => res.text())
|
|
148
|
+
.then((data) => {
|
|
149
|
+
cssFile.innerHTML = data;
|
|
150
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
151
|
+
})
|
|
152
|
+
.catch((err) => {
|
|
153
|
+
console.log('error ', err);
|
|
154
|
+
});
|
|
155
|
+
};
|
|
143
156
|
this.lang = 'en';
|
|
144
157
|
this.queried = false;
|
|
145
158
|
this.consentType = '';
|
|
@@ -147,6 +160,7 @@ const PlayerUserConsents = class {
|
|
|
147
160
|
this.gmVersion = '';
|
|
148
161
|
this.consentTitle = '';
|
|
149
162
|
this.clientStyling = '';
|
|
163
|
+
this.clientStylingUrl = '';
|
|
150
164
|
this.translationUrl = '';
|
|
151
165
|
this.textContent = '';
|
|
152
166
|
this.limitStylingAppends = false;
|
|
@@ -154,6 +168,10 @@ const PlayerUserConsents = class {
|
|
|
154
168
|
handleNewTranslations() {
|
|
155
169
|
getTranslations(this.translationUrl);
|
|
156
170
|
}
|
|
171
|
+
handleStylingUrlChange(newValue, oldValue) {
|
|
172
|
+
if (newValue !== oldValue)
|
|
173
|
+
this.setClientStylingURL();
|
|
174
|
+
}
|
|
157
175
|
async componentWillLoad() {
|
|
158
176
|
if (this.translationUrl.length > 2) {
|
|
159
177
|
await getTranslations(this.translationUrl);
|
|
@@ -168,6 +186,9 @@ const PlayerUserConsents = class {
|
|
|
168
186
|
componentDidRender() {
|
|
169
187
|
// start custom styling area
|
|
170
188
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
189
|
+
if (this.clientStylingUrl) {
|
|
190
|
+
this.setClientStylingURL();
|
|
191
|
+
}
|
|
171
192
|
if (this.clientStyling)
|
|
172
193
|
this.setClientStyling();
|
|
173
194
|
this.limitStylingAppends = true;
|
|
@@ -194,10 +215,11 @@ const PlayerUserConsents = class {
|
|
|
194
215
|
if (this.queried) {
|
|
195
216
|
this.userLegislationConsentHandler();
|
|
196
217
|
}
|
|
197
|
-
return (h("div", { key: '
|
|
218
|
+
return (h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
|
|
198
219
|
}
|
|
199
220
|
static get watchers() { return {
|
|
200
|
-
"translationUrl": ["handleNewTranslations"]
|
|
221
|
+
"translationUrl": ["handleNewTranslations"],
|
|
222
|
+
"clientStylingUrl": ["handleStylingUrlChange"]
|
|
201
223
|
}; }
|
|
202
224
|
};
|
|
203
225
|
PlayerUserConsents.style = PlayerUserConsentsStyle0;
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
19
|
+
return bootstrapLazy([["player-user-consents",[[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-1e483854.js";const a={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},n=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),s=(t,e,i)=>{let n=(s=a[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),s));var s;if(null===n)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},r=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1}handleNewTranslations(){n(this.translationUrl)}async componentWillLoad(){this.translationUrl.length>2&&await n(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)),s("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,s("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,s(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-1e483854.js";const a={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},n=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])a[e][i]=t[e][i]})),e(!0)}))})),s=(t,e,i)=>{let n=(s=a[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),s));var s;if(null===n)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},r=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1}handleNewTranslations(){n(this.translationUrl)}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}async componentWillLoad(){this.translationUrl.length>2&&await n(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStylingUrl&&this.setClientStylingURL(),this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)),s("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,s("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},s("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,s("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},s("privacyPolicy.privacyLink",this.lang)),s("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,s(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"54601e536a075b95277641c2d123f21fb5b9a9e8",ref:t=>this.stylingContainer=t},i("p",{key:"8cceca5a2a2e69a4180e10848d0fea081fe7a78a",class:"ConsentTitle"},this.consentTitle),i("label",{key:"80f41a7876f3831c1030cba896282290f33c14b3",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"7db0bada1af6d9df763f63a4eb92e79615322801",ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"ce67fcdf09cfefb48df87d043950fd4fba7fdb00",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}}};r.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emfe-w-color-primary);font-weight:bold}";export{r as player_user_consents}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as t}from"./p-1e483854.js";export{s as setNonce}from"./p-1e483854.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-
|
|
1
|
+
import{p as n,b as t}from"./p-1e483854.js";export{s as setNonce}from"./p-1e483854.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-0060d123",[[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],gmVersion:[1,"gm-version"],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],textContent:[32],limitStylingAppends:[32]},null,{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}]]]],n))));
|
|
@@ -29,6 +29,10 @@ export declare class PlayerUserConsents {
|
|
|
29
29
|
*/
|
|
30
30
|
clientStyling: string;
|
|
31
31
|
/**
|
|
32
|
+
* Client custom styling via url
|
|
33
|
+
*/
|
|
34
|
+
clientStylingUrl: string;
|
|
35
|
+
/**
|
|
32
36
|
* Translation url
|
|
33
37
|
*/
|
|
34
38
|
translationUrl: string;
|
|
@@ -40,13 +44,15 @@ export declare class PlayerUserConsents {
|
|
|
40
44
|
private checkboxInput;
|
|
41
45
|
private stylingContainer;
|
|
42
46
|
handleNewTranslations(): void;
|
|
47
|
+
handleStylingUrlChange(newValue: string, oldValue: string): void;
|
|
43
48
|
componentWillLoad(): Promise<void>;
|
|
44
49
|
goToTermsAndConditions: () => void;
|
|
45
50
|
goToPrivacyPolicy: () => void;
|
|
46
51
|
userLegislationConsent: EventEmitter<object>;
|
|
47
52
|
userLegislationConsentHandler(): void;
|
|
48
|
-
componentDidRender(): void;
|
|
49
53
|
setClientStyling: () => void;
|
|
54
|
+
setClientStylingURL: () => void;
|
|
55
|
+
componentDidRender(): void;
|
|
50
56
|
determineTextContent(): any;
|
|
51
57
|
render(): any;
|
|
52
58
|
}
|
|
@@ -11,6 +11,10 @@ export namespace Components {
|
|
|
11
11
|
* Client custom styling via inline style
|
|
12
12
|
*/
|
|
13
13
|
"clientStyling": string;
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via url
|
|
16
|
+
*/
|
|
17
|
+
"clientStylingUrl": string;
|
|
14
18
|
/**
|
|
15
19
|
* the title of the consent to be displayed
|
|
16
20
|
*/
|
|
@@ -73,6 +77,10 @@ declare namespace LocalJSX {
|
|
|
73
77
|
* Client custom styling via inline style
|
|
74
78
|
*/
|
|
75
79
|
"clientStyling"?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Client custom styling via url
|
|
82
|
+
*/
|
|
83
|
+
"clientStylingUrl"?: string;
|
|
76
84
|
/**
|
|
77
85
|
* the title of the consent to be displayed
|
|
78
86
|
*/
|