@everymatrix/player-user-consents 1.45.13 → 1.46.0
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 +18 -1
- package/dist/cjs/player-user-consents.cjs.js +1 -1
- package/dist/collection/components/player-user-consents/player-user-consents.js +36 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-user-consents.entry.js +18 -1
- package/dist/esm/player-user-consents.js +1 -1
- package/dist/player-user-consents/{p-c5bf5548.entry.js → p-32f72393.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 +6 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.dev.d.ts +0 -0
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"]}]]]], 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;
|
|
@@ -172,6 +186,9 @@ const PlayerUserConsents = class {
|
|
|
172
186
|
componentDidRender() {
|
|
173
187
|
// start custom styling area
|
|
174
188
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
189
|
+
if (this.clientStylingUrl) {
|
|
190
|
+
this.setClientStylingURL();
|
|
191
|
+
}
|
|
175
192
|
if (this.clientStyling)
|
|
176
193
|
this.setClientStyling();
|
|
177
194
|
this.limitStylingAppends = true;
|
|
@@ -198,7 +215,7 @@ const PlayerUserConsents = class {
|
|
|
198
215
|
if (this.queried) {
|
|
199
216
|
this.userLegislationConsentHandler();
|
|
200
217
|
}
|
|
201
|
-
return (index.h("div", { key: '
|
|
218
|
+
return (index.h("div", { key: 'bf5aa8e28c600ce5551eb99c03244c3346c64496', ref: el => this.stylingContainer = el }, index.h("p", { key: '6dbe50feb78146fa6d238cba187dd93d5523997f', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '35cf191e5d94e2b455b53b5c1dac39f43dc2e3b9', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: '7549906b580ceee29adcae3fcb2042542999e1ac', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: '52a7d5db21aa3d378f6aab9739e826c2077e6c60', class: "MandatoryItem" }, "*"))));
|
|
202
219
|
}
|
|
203
220
|
static get watchers() { return {
|
|
204
221
|
"translationUrl": ["handleNewTranslations"]
|
|
@@ -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"]}]]]], 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;
|
|
@@ -37,6 +51,9 @@ export class PlayerUserConsents {
|
|
|
37
51
|
componentDidRender() {
|
|
38
52
|
// start custom styling area
|
|
39
53
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
54
|
+
if (this.clientStylingUrl) {
|
|
55
|
+
this.setClientStylingURL();
|
|
56
|
+
}
|
|
40
57
|
if (this.clientStyling)
|
|
41
58
|
this.setClientStyling();
|
|
42
59
|
this.limitStylingAppends = true;
|
|
@@ -63,7 +80,7 @@ export class PlayerUserConsents {
|
|
|
63
80
|
if (this.queried) {
|
|
64
81
|
this.userLegislationConsentHandler();
|
|
65
82
|
}
|
|
66
|
-
return (h("div", { key: '
|
|
83
|
+
return (h("div", { key: 'bf5aa8e28c600ce5551eb99c03244c3346c64496', ref: el => this.stylingContainer = el }, h("p", { key: '6dbe50feb78146fa6d238cba187dd93d5523997f', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '35cf191e5d94e2b455b53b5c1dac39f43dc2e3b9', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7549906b580ceee29adcae3fcb2042542999e1ac', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: '52a7d5db21aa3d378f6aab9739e826c2077e6c60', class: "MandatoryItem" }, "*"))));
|
|
67
84
|
}
|
|
68
85
|
static get is() { return "player-user-consents"; }
|
|
69
86
|
static get encapsulation() { return "shadow"; }
|
|
@@ -205,6 +222,24 @@ export class PlayerUserConsents {
|
|
|
205
222
|
"reflect": false,
|
|
206
223
|
"defaultValue": "''"
|
|
207
224
|
},
|
|
225
|
+
"clientStylingUrl": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "string",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Client custom styling via url"
|
|
238
|
+
},
|
|
239
|
+
"attribute": "client-styling-url",
|
|
240
|
+
"reflect": true,
|
|
241
|
+
"defaultValue": "''"
|
|
242
|
+
},
|
|
208
243
|
"translationUrl": {
|
|
209
244
|
"type": "string",
|
|
210
245
|
"mutable": false,
|
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"]}]]]], 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;
|
|
@@ -168,6 +182,9 @@ const PlayerUserConsents = class {
|
|
|
168
182
|
componentDidRender() {
|
|
169
183
|
// start custom styling area
|
|
170
184
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
185
|
+
if (this.clientStylingUrl) {
|
|
186
|
+
this.setClientStylingURL();
|
|
187
|
+
}
|
|
171
188
|
if (this.clientStyling)
|
|
172
189
|
this.setClientStyling();
|
|
173
190
|
this.limitStylingAppends = true;
|
|
@@ -194,7 +211,7 @@ const PlayerUserConsents = class {
|
|
|
194
211
|
if (this.queried) {
|
|
195
212
|
this.userLegislationConsentHandler();
|
|
196
213
|
}
|
|
197
|
-
return (h("div", { key: '
|
|
214
|
+
return (h("div", { key: 'bf5aa8e28c600ce5551eb99c03244c3346c64496', ref: el => this.stylingContainer = el }, h("p", { key: '6dbe50feb78146fa6d238cba187dd93d5523997f', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '35cf191e5d94e2b455b53b5c1dac39f43dc2e3b9', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7549906b580ceee29adcae3fcb2042542999e1ac', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: '52a7d5db21aa3d378f6aab9739e826c2077e6c60', class: "MandatoryItem" }, "*"))));
|
|
198
215
|
}
|
|
199
216
|
static get watchers() { return {
|
|
200
217
|
"translationUrl": ["handleNewTranslations"]
|
|
@@ -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"]}]]]], 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)}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:"bf5aa8e28c600ce5551eb99c03244c3346c64496",ref:t=>this.stylingContainer=t},i("p",{key:"6dbe50feb78146fa6d238cba187dd93d5523997f",class:"ConsentTitle"},this.consentTitle),i("label",{key:"35cf191e5d94e2b455b53b5c1dac39f43dc2e3b9",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"7549906b580ceee29adcae3fcb2042542999e1ac",ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"52a7d5db21aa3d378f6aab9739e826c2077e6c60",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};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-32f72393",[[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"]}]]]],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;
|
|
@@ -45,8 +49,9 @@ export declare class PlayerUserConsents {
|
|
|
45
49
|
goToPrivacyPolicy: () => void;
|
|
46
50
|
userLegislationConsent: EventEmitter<object>;
|
|
47
51
|
userLegislationConsentHandler(): void;
|
|
48
|
-
componentDidRender(): void;
|
|
49
52
|
setClientStyling: () => void;
|
|
53
|
+
setClientStylingURL: () => void;
|
|
54
|
+
componentDidRender(): void;
|
|
50
55
|
determineTextContent(): any;
|
|
51
56
|
render(): any;
|
|
52
57
|
}
|
|
@@ -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
|
*/
|
package/package.json
CHANGED
|
File without changes
|