@everymatrix/user-action-controller 1.61.0 → 1.62.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_2.cjs.entry.js +105 -56
- package/dist/cjs/user-action-controller.cjs.js +1 -1
- package/dist/collection/components/user-action-controller/user-action-controller.css +17 -6
- package/dist/collection/components/user-action-controller/user-action-controller.js +84 -41
- package/dist/collection/utils/locale.utils.js +37 -15
- package/dist/esm/loader.js +1 -1
- package/dist/esm/player-user-consents_2.entry.js +105 -56
- package/dist/esm/user-action-controller.js +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/user-action-controller/user-action-controller.d.ts +12 -3
- package/dist/types/components.d.ts +16 -0
- package/dist/user-action-controller/p-e132fb80.entry.js +1 -0
- package/dist/user-action-controller/user-action-controller.esm.js +1 -1
- package/package.json +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.dev.d.ts +0 -2
- package/dist/user-action-controller/p-a6c8de57.entry.js +0 -1
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/user-action-controller/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -6,7 +6,9 @@ const TRANSLATIONS = {
|
|
|
6
6
|
emailMarketingTitle: 'Email marketing',
|
|
7
7
|
privacyPolicyTitle: 'Privacy Policy',
|
|
8
8
|
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
9
|
-
submitButtonText: 'Submit'
|
|
9
|
+
submitButtonText: 'Submit',
|
|
10
|
+
rejectButtonText: 'Reject',
|
|
11
|
+
rejectText: 'Rejecting new consents will result in the inability to continue the login process and you will be logged out.'
|
|
10
12
|
},
|
|
11
13
|
'en-us': {
|
|
12
14
|
termsAndConditionsTitle: 'Terms and Conditions',
|
|
@@ -14,7 +16,9 @@ const TRANSLATIONS = {
|
|
|
14
16
|
emailMarketingTitle: 'Email marketing',
|
|
15
17
|
privacyPolicyTitle: 'Privacy Policy',
|
|
16
18
|
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
17
|
-
submitButtonText: 'Submit'
|
|
19
|
+
submitButtonText: 'Submit',
|
|
20
|
+
rejectButtonText: 'Reject',
|
|
21
|
+
rejectText: 'Rejecting new consents will result in the inability to continue the login process and you will be logged out.'
|
|
18
22
|
},
|
|
19
23
|
ro: {
|
|
20
24
|
termsAndConditionsTitle: 'Termeni și Condiții',
|
|
@@ -22,7 +26,9 @@ const TRANSLATIONS = {
|
|
|
22
26
|
emailMarketingTitle: 'Marketing prin Email',
|
|
23
27
|
privacyPolicyTitle: 'Politica de Confidențialitate',
|
|
24
28
|
userNoticeText: 'Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele',
|
|
25
|
-
submitButtonText: 'Trimite'
|
|
29
|
+
submitButtonText: 'Trimite',
|
|
30
|
+
rejectButtonText: 'Respinge',
|
|
31
|
+
rejectText: 'Respingerea noilor consimțăminte va duce la imposibilitatea de a continua procesul de autentificare și veți fi deconectat.'
|
|
26
32
|
},
|
|
27
33
|
hr: {
|
|
28
34
|
termsAndConditionsTitle: 'Opći uvjeti i odredbe',
|
|
@@ -30,7 +36,9 @@ const TRANSLATIONS = {
|
|
|
30
36
|
emailMarketingTitle: 'E-mail makretinški sadržaj',
|
|
31
37
|
privacyPolicyTitle: 'Politika Privatnosti',
|
|
32
38
|
userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
|
|
33
|
-
submitButtonText: 'Pošalji'
|
|
39
|
+
submitButtonText: 'Pošalji',
|
|
40
|
+
rejectButtonText: 'Odbij',
|
|
41
|
+
rejectText: 'Odbijanje novih pristanka rezultirat će nemogućnošću nastavka procesa prijave i bit ćete odjavljeni.'
|
|
34
42
|
},
|
|
35
43
|
fr: {
|
|
36
44
|
termsAndConditionsTitle: 'Termes et Conditions',
|
|
@@ -38,15 +46,19 @@ const TRANSLATIONS = {
|
|
|
38
46
|
emailMarketingTitle: 'Marketing par Email',
|
|
39
47
|
privacyPolicyTitle: 'Politique de Confidentialité',
|
|
40
48
|
userNoticeText: 'Avant de continuer, vous devez consentir aux éléments suivants',
|
|
41
|
-
submitButtonText: 'Soumettre'
|
|
49
|
+
submitButtonText: 'Soumettre',
|
|
50
|
+
rejectButtonText: 'Rejeter',
|
|
51
|
+
rejectText: 'Le rejet des nouveaux consentements entraînera l\'impossibilité de continuer le processus de connexion et vous serez déconnecté.'
|
|
42
52
|
},
|
|
43
53
|
cs: {
|
|
44
|
-
termsAndConditionsTitle: '
|
|
54
|
+
termsAndConditionsTitle: 'Podmínky a ujednání',
|
|
45
55
|
smsTitle: 'SMS marketing',
|
|
46
|
-
emailMarketingTitle: '
|
|
47
|
-
privacyPolicyTitle: '
|
|
48
|
-
userNoticeText: '
|
|
49
|
-
submitButtonText: '
|
|
56
|
+
emailMarketingTitle: 'Emailový marketing',
|
|
57
|
+
privacyPolicyTitle: 'Zásady ochrany osobních údajů',
|
|
58
|
+
userNoticeText: 'Než budete moci pokračovat, musíte souhlasit s následujícím',
|
|
59
|
+
submitButtonText: 'Odeslat',
|
|
60
|
+
rejectButtonText: 'Odmítnout',
|
|
61
|
+
rejectText: 'Odmítnutí nových souhlasů povede k nemožnosti pokračovat v procesu přihlášení a budete odhlášeni.'
|
|
50
62
|
},
|
|
51
63
|
de: {
|
|
52
64
|
termsAndConditionsTitle: 'Allgemeine Geschäftsbedingungen',
|
|
@@ -54,7 +66,9 @@ const TRANSLATIONS = {
|
|
|
54
66
|
emailMarketingTitle: 'E-Mail-Marketing',
|
|
55
67
|
privacyPolicyTitle: 'Datenschutzrichtlinie',
|
|
56
68
|
userNoticeText: 'Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen',
|
|
57
|
-
submitButtonText: 'Absenden'
|
|
69
|
+
submitButtonText: 'Absenden',
|
|
70
|
+
rejectButtonText: 'Ablehnen',
|
|
71
|
+
rejectText: 'Das Ablehnen neuer Zustimmungen führt dazu, dass der Anmeldevorgang nicht fortgesetzt werden kann und Sie abgemeldet werden.'
|
|
58
72
|
},
|
|
59
73
|
es: {
|
|
60
74
|
termsAndConditionsTitle: 'Términos y Condiciones',
|
|
@@ -62,7 +76,9 @@ const TRANSLATIONS = {
|
|
|
62
76
|
emailMarketingTitle: 'Marketing por Email',
|
|
63
77
|
privacyPolicyTitle: 'Política de Privacidad',
|
|
64
78
|
userNoticeText: 'Antes de continuar, debe dar su consentimiento a lo siguiente',
|
|
65
|
-
submitButtonText: 'Enviar'
|
|
79
|
+
submitButtonText: 'Enviar',
|
|
80
|
+
rejectButtonText: 'Rechazar',
|
|
81
|
+
rejectText: 'Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.'
|
|
66
82
|
},
|
|
67
83
|
pt: {
|
|
68
84
|
termsAndConditionsTitle: 'Termos e Condições',
|
|
@@ -70,7 +86,9 @@ const TRANSLATIONS = {
|
|
|
70
86
|
emailMarketingTitle: 'Marketing por Email',
|
|
71
87
|
privacyPolicyTitle: 'Política de Privacidade',
|
|
72
88
|
userNoticeText: 'Antes de continuar, você deve consentir com o seguinte',
|
|
73
|
-
submitButtonText: 'Enviar'
|
|
89
|
+
submitButtonText: 'Enviar',
|
|
90
|
+
rejectButtonText: 'Rejeitar',
|
|
91
|
+
rejectText: 'Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.'
|
|
74
92
|
},
|
|
75
93
|
'es-mx': {
|
|
76
94
|
termsAndConditionsTitle: 'Términos y Condiciones',
|
|
@@ -78,7 +96,9 @@ const TRANSLATIONS = {
|
|
|
78
96
|
emailMarketingTitle: 'Marketing por Email',
|
|
79
97
|
privacyPolicyTitle: 'Política de Privacidad',
|
|
80
98
|
userNoticeText: 'Antes de continuar, debe dar su consentimiento a lo siguiente',
|
|
81
|
-
submitButtonText: 'Enviar'
|
|
99
|
+
submitButtonText: 'Enviar',
|
|
100
|
+
rejectButtonText: 'Rechazar',
|
|
101
|
+
rejectText: 'Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.'
|
|
82
102
|
},
|
|
83
103
|
'pt-br': {
|
|
84
104
|
termsAndConditionsTitle: 'Termos e Condições',
|
|
@@ -86,7 +106,9 @@ const TRANSLATIONS = {
|
|
|
86
106
|
emailMarketingTitle: 'Marketing por Email',
|
|
87
107
|
privacyPolicyTitle: 'Política de Privacidade',
|
|
88
108
|
userNoticeText: 'Antes de continuar, você deve consentir com o seguinte',
|
|
89
|
-
submitButtonText: 'Enviar'
|
|
109
|
+
submitButtonText: 'Enviar',
|
|
110
|
+
rejectButtonText: 'Rejeitar',
|
|
111
|
+
rejectText: 'Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.'
|
|
90
112
|
}
|
|
91
113
|
};
|
|
92
114
|
export const getTranslations = (url) => {
|
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_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[
|
|
8
|
+
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"includeRejectButton":[516,"include-reject-button"],"includeRejectText":[516,"include-reject-text"],"gmVersion":[513,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[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"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -276,7 +276,9 @@ const TRANSLATIONS = {
|
|
|
276
276
|
emailMarketingTitle: 'Email marketing',
|
|
277
277
|
privacyPolicyTitle: 'Privacy Policy',
|
|
278
278
|
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
279
|
-
submitButtonText: 'Submit'
|
|
279
|
+
submitButtonText: 'Submit',
|
|
280
|
+
rejectButtonText: 'Reject',
|
|
281
|
+
rejectText: 'Rejecting new consents will result in the inability to continue the login process and you will be logged out.'
|
|
280
282
|
},
|
|
281
283
|
'en-us': {
|
|
282
284
|
termsAndConditionsTitle: 'Terms and Conditions',
|
|
@@ -284,7 +286,9 @@ const TRANSLATIONS = {
|
|
|
284
286
|
emailMarketingTitle: 'Email marketing',
|
|
285
287
|
privacyPolicyTitle: 'Privacy Policy',
|
|
286
288
|
userNoticeText: 'Before you can proceed you must consent to the following',
|
|
287
|
-
submitButtonText: 'Submit'
|
|
289
|
+
submitButtonText: 'Submit',
|
|
290
|
+
rejectButtonText: 'Reject',
|
|
291
|
+
rejectText: 'Rejecting new consents will result in the inability to continue the login process and you will be logged out.'
|
|
288
292
|
},
|
|
289
293
|
ro: {
|
|
290
294
|
termsAndConditionsTitle: 'Termeni și Condiții',
|
|
@@ -292,7 +296,9 @@ const TRANSLATIONS = {
|
|
|
292
296
|
emailMarketingTitle: 'Marketing prin Email',
|
|
293
297
|
privacyPolicyTitle: 'Politica de Confidențialitate',
|
|
294
298
|
userNoticeText: 'Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele',
|
|
295
|
-
submitButtonText: 'Trimite'
|
|
299
|
+
submitButtonText: 'Trimite',
|
|
300
|
+
rejectButtonText: 'Respinge',
|
|
301
|
+
rejectText: 'Respingerea noilor consimțăminte va duce la imposibilitatea de a continua procesul de autentificare și veți fi deconectat.'
|
|
296
302
|
},
|
|
297
303
|
hr: {
|
|
298
304
|
termsAndConditionsTitle: 'Opći uvjeti i odredbe',
|
|
@@ -300,7 +306,9 @@ const TRANSLATIONS = {
|
|
|
300
306
|
emailMarketingTitle: 'E-mail makretinški sadržaj',
|
|
301
307
|
privacyPolicyTitle: 'Politika Privatnosti',
|
|
302
308
|
userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
|
|
303
|
-
submitButtonText: 'Pošalji'
|
|
309
|
+
submitButtonText: 'Pošalji',
|
|
310
|
+
rejectButtonText: 'Odbij',
|
|
311
|
+
rejectText: 'Odbijanje novih pristanka rezultirat će nemogućnošću nastavka procesa prijave i bit ćete odjavljeni.'
|
|
304
312
|
},
|
|
305
313
|
fr: {
|
|
306
314
|
termsAndConditionsTitle: 'Termes et Conditions',
|
|
@@ -308,15 +316,19 @@ const TRANSLATIONS = {
|
|
|
308
316
|
emailMarketingTitle: 'Marketing par Email',
|
|
309
317
|
privacyPolicyTitle: 'Politique de Confidentialité',
|
|
310
318
|
userNoticeText: 'Avant de continuer, vous devez consentir aux éléments suivants',
|
|
311
|
-
submitButtonText: 'Soumettre'
|
|
319
|
+
submitButtonText: 'Soumettre',
|
|
320
|
+
rejectButtonText: 'Rejeter',
|
|
321
|
+
rejectText: 'Le rejet des nouveaux consentements entraînera l\'impossibilité de continuer le processus de connexion et vous serez déconnecté.'
|
|
312
322
|
},
|
|
313
323
|
cs: {
|
|
314
|
-
termsAndConditionsTitle: '
|
|
324
|
+
termsAndConditionsTitle: 'Podmínky a ujednání',
|
|
315
325
|
smsTitle: 'SMS marketing',
|
|
316
|
-
emailMarketingTitle: '
|
|
317
|
-
privacyPolicyTitle: '
|
|
318
|
-
userNoticeText: '
|
|
319
|
-
submitButtonText: '
|
|
326
|
+
emailMarketingTitle: 'Emailový marketing',
|
|
327
|
+
privacyPolicyTitle: 'Zásady ochrany osobních údajů',
|
|
328
|
+
userNoticeText: 'Než budete moci pokračovat, musíte souhlasit s následujícím',
|
|
329
|
+
submitButtonText: 'Odeslat',
|
|
330
|
+
rejectButtonText: 'Odmítnout',
|
|
331
|
+
rejectText: 'Odmítnutí nových souhlasů povede k nemožnosti pokračovat v procesu přihlášení a budete odhlášeni.'
|
|
320
332
|
},
|
|
321
333
|
de: {
|
|
322
334
|
termsAndConditionsTitle: 'Allgemeine Geschäftsbedingungen',
|
|
@@ -324,7 +336,9 @@ const TRANSLATIONS = {
|
|
|
324
336
|
emailMarketingTitle: 'E-Mail-Marketing',
|
|
325
337
|
privacyPolicyTitle: 'Datenschutzrichtlinie',
|
|
326
338
|
userNoticeText: 'Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen',
|
|
327
|
-
submitButtonText: 'Absenden'
|
|
339
|
+
submitButtonText: 'Absenden',
|
|
340
|
+
rejectButtonText: 'Ablehnen',
|
|
341
|
+
rejectText: 'Das Ablehnen neuer Zustimmungen führt dazu, dass der Anmeldevorgang nicht fortgesetzt werden kann und Sie abgemeldet werden.'
|
|
328
342
|
},
|
|
329
343
|
es: {
|
|
330
344
|
termsAndConditionsTitle: 'Términos y Condiciones',
|
|
@@ -332,7 +346,9 @@ const TRANSLATIONS = {
|
|
|
332
346
|
emailMarketingTitle: 'Marketing por Email',
|
|
333
347
|
privacyPolicyTitle: 'Política de Privacidad',
|
|
334
348
|
userNoticeText: 'Antes de continuar, debe dar su consentimiento a lo siguiente',
|
|
335
|
-
submitButtonText: 'Enviar'
|
|
349
|
+
submitButtonText: 'Enviar',
|
|
350
|
+
rejectButtonText: 'Rechazar',
|
|
351
|
+
rejectText: 'Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.'
|
|
336
352
|
},
|
|
337
353
|
pt: {
|
|
338
354
|
termsAndConditionsTitle: 'Termos e Condições',
|
|
@@ -340,7 +356,9 @@ const TRANSLATIONS = {
|
|
|
340
356
|
emailMarketingTitle: 'Marketing por Email',
|
|
341
357
|
privacyPolicyTitle: 'Política de Privacidade',
|
|
342
358
|
userNoticeText: 'Antes de continuar, você deve consentir com o seguinte',
|
|
343
|
-
submitButtonText: 'Enviar'
|
|
359
|
+
submitButtonText: 'Enviar',
|
|
360
|
+
rejectButtonText: 'Rejeitar',
|
|
361
|
+
rejectText: 'Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.'
|
|
344
362
|
},
|
|
345
363
|
'es-mx': {
|
|
346
364
|
termsAndConditionsTitle: 'Términos y Condiciones',
|
|
@@ -348,7 +366,9 @@ const TRANSLATIONS = {
|
|
|
348
366
|
emailMarketingTitle: 'Marketing por Email',
|
|
349
367
|
privacyPolicyTitle: 'Política de Privacidad',
|
|
350
368
|
userNoticeText: 'Antes de continuar, debe dar su consentimiento a lo siguiente',
|
|
351
|
-
submitButtonText: 'Enviar'
|
|
369
|
+
submitButtonText: 'Enviar',
|
|
370
|
+
rejectButtonText: 'Rechazar',
|
|
371
|
+
rejectText: 'Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión.'
|
|
352
372
|
},
|
|
353
373
|
'pt-br': {
|
|
354
374
|
termsAndConditionsTitle: 'Termos e Condições',
|
|
@@ -356,7 +376,9 @@ const TRANSLATIONS = {
|
|
|
356
376
|
emailMarketingTitle: 'Marketing por Email',
|
|
357
377
|
privacyPolicyTitle: 'Política de Privacidade',
|
|
358
378
|
userNoticeText: 'Antes de continuar, você deve consentir com o seguinte',
|
|
359
|
-
submitButtonText: 'Enviar'
|
|
379
|
+
submitButtonText: 'Enviar',
|
|
380
|
+
rejectButtonText: 'Rejeitar',
|
|
381
|
+
rejectText: 'Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado.'
|
|
360
382
|
}
|
|
361
383
|
};
|
|
362
384
|
const getTranslations = (url) => {
|
|
@@ -388,7 +410,26 @@ const translate = (key, customLang, values) => {
|
|
|
388
410
|
return translation;
|
|
389
411
|
};
|
|
390
412
|
|
|
391
|
-
|
|
413
|
+
/**
|
|
414
|
+
* @name dispatchCustomEvent
|
|
415
|
+
* @description dispatches the custom event CustomEventProcessor is listening for
|
|
416
|
+
* @param {string} type of the custom event
|
|
417
|
+
* @param {Object} data may contain additional information about the event, e.g. userId
|
|
418
|
+
*/
|
|
419
|
+
const dispatchCustomEvent = (type, data = {}) => {
|
|
420
|
+
const event = new CustomEvent('track-custom-event', {
|
|
421
|
+
detail: {
|
|
422
|
+
type,
|
|
423
|
+
data
|
|
424
|
+
},
|
|
425
|
+
bubbles: true,
|
|
426
|
+
composed: true
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
document.dispatchEvent(event);
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
const userActionControllerCss = ":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserConsentNotice{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserActionController{font-family:Arial, Helvetica, sans-serif;font-weight:100;height:100%;width:100%;padding:1rem 1.5rem 2rem;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;border-radius:5%}.ConsentSubmitButton,.ConsentRejectButton{font-size:1rem;font-family:var(--emw--button-typography);padding:0.4rem 1.4rem;background:var(--emw--button-background-color, #FFFFFF);border:var(--emw-button-border, 2px solid #000);color:var(--emw--button-text-color, #000000);border-radius:var(--emw--button-border-radius, 5px);align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled,.ConsentRejectButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}.ButtonsWrapper{display:flex;flex-direction:row;justify-content:space-between;margin-top:10px}.ButtonsWrapper button:only-child{margin-left:auto}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:blue}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";
|
|
392
433
|
const UserActionControllerStyle0 = userActionControllerCss;
|
|
393
434
|
|
|
394
435
|
const UserActionController = class {
|
|
@@ -403,11 +444,30 @@ const UserActionController = class {
|
|
|
403
444
|
emailmarketing: translate('emailMarketingTitle', this.lang),
|
|
404
445
|
privacypolicy: translate('privacyPolicyTitle', this.lang)
|
|
405
446
|
};
|
|
447
|
+
this.handleApplyClick = () => {
|
|
448
|
+
this.queryFired = true;
|
|
449
|
+
};
|
|
450
|
+
this.handleReject = () => {
|
|
451
|
+
const headers = new Headers();
|
|
452
|
+
headers.append('Content-type', 'application/json');
|
|
453
|
+
headers.append('X-SessionID', this.userSession);
|
|
454
|
+
const options = {
|
|
455
|
+
method: 'DELETE',
|
|
456
|
+
headers: headers
|
|
457
|
+
};
|
|
458
|
+
fetch(`${this.endpoint}/v1/player/session/player`, options)
|
|
459
|
+
.then(() => {
|
|
460
|
+
window.postMessage({ type: 'LogoutSuccessfull' }, window.location.href);
|
|
461
|
+
dispatchCustomEvent('logged_out', {});
|
|
462
|
+
});
|
|
463
|
+
};
|
|
406
464
|
this.endpoint = undefined;
|
|
407
465
|
this.userSession = undefined;
|
|
408
466
|
this.userId = undefined;
|
|
409
467
|
this.lang = 'en';
|
|
410
468
|
this.includeSubmitButton = undefined;
|
|
469
|
+
this.includeRejectButton = undefined;
|
|
470
|
+
this.includeRejectText = undefined;
|
|
411
471
|
this.gmVersion = '';
|
|
412
472
|
this.translationUrl = '';
|
|
413
473
|
this.clientStyling = '';
|
|
@@ -463,54 +523,52 @@ const UserActionController = class {
|
|
|
463
523
|
const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
|
|
464
524
|
const headers = new Headers();
|
|
465
525
|
headers.append('X-SessionId', this.userSession);
|
|
466
|
-
|
|
526
|
+
const options = {
|
|
467
527
|
method: 'GET',
|
|
468
528
|
headers
|
|
469
529
|
};
|
|
470
|
-
|
|
530
|
+
fetch(url.href, options)
|
|
471
531
|
.then(res => res.json())
|
|
472
532
|
.then(data => {
|
|
473
|
-
|
|
474
|
-
actionItems.forEach(element => {
|
|
533
|
+
data.items.forEach(element => {
|
|
475
534
|
if (element.status === 'Expired') {
|
|
476
535
|
this.activeUserActions.push(element.tagCode);
|
|
477
536
|
}
|
|
478
537
|
});
|
|
479
|
-
this.isLoading = false;
|
|
480
538
|
})
|
|
481
539
|
.catch(error => {
|
|
482
540
|
console.error('Error fetching data:', error);
|
|
483
|
-
|
|
484
|
-
|
|
541
|
+
})
|
|
542
|
+
.finally(() => {
|
|
485
543
|
this.calcMandatoryActions();
|
|
486
|
-
window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0
|
|
544
|
+
window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 }, window.location.href);
|
|
545
|
+
this.isLoading = false;
|
|
487
546
|
});
|
|
488
547
|
}
|
|
489
548
|
determineUserActions16() {
|
|
490
549
|
const url = new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
|
|
491
550
|
const headers = new Headers();
|
|
492
551
|
headers.append('X-SessionId', this.userSession);
|
|
493
|
-
|
|
552
|
+
const options = {
|
|
494
553
|
method: 'GET',
|
|
495
554
|
headers
|
|
496
555
|
};
|
|
497
|
-
|
|
556
|
+
fetch(url.href, options)
|
|
498
557
|
.then(res => res.json())
|
|
499
558
|
.then(data => {
|
|
500
|
-
|
|
501
|
-
actionItems.forEach(element => {
|
|
559
|
+
data.consents.forEach(element => {
|
|
502
560
|
if (element.status === 2 && element.tagCode !== 'pepconsent') {
|
|
503
561
|
this.activeUserActions.push(element.tagCode);
|
|
504
562
|
}
|
|
505
563
|
});
|
|
506
|
-
this.isLoading = false;
|
|
507
564
|
})
|
|
508
565
|
.catch(error => {
|
|
509
566
|
console.error('Error fetching data:', error);
|
|
510
|
-
|
|
511
|
-
|
|
567
|
+
})
|
|
568
|
+
.finally(() => {
|
|
512
569
|
this.calcMandatoryActions();
|
|
513
|
-
window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0
|
|
570
|
+
window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 }, window.location.href);
|
|
571
|
+
this.isLoading = false;
|
|
514
572
|
});
|
|
515
573
|
}
|
|
516
574
|
updateUserConsents() {
|
|
@@ -520,7 +578,7 @@ const UserActionController = class {
|
|
|
520
578
|
const body = {
|
|
521
579
|
consents: this.userActions
|
|
522
580
|
};
|
|
523
|
-
let
|
|
581
|
+
let options = {
|
|
524
582
|
method: 'POST',
|
|
525
583
|
headers: {
|
|
526
584
|
'Content-Type': 'application/json',
|
|
@@ -529,7 +587,7 @@ const UserActionController = class {
|
|
|
529
587
|
},
|
|
530
588
|
body: JSON.stringify(body)
|
|
531
589
|
};
|
|
532
|
-
fetch(url.href,
|
|
590
|
+
fetch(url.href, options)
|
|
533
591
|
.then(res => res.json())
|
|
534
592
|
.then(() => {
|
|
535
593
|
window.postMessage({
|
|
@@ -554,15 +612,14 @@ const UserActionController = class {
|
|
|
554
612
|
window.postMessage({ type: 'UserActionsCompleted' }, window.location.href);
|
|
555
613
|
});
|
|
556
614
|
}
|
|
557
|
-
handleApplyClick() {
|
|
558
|
-
this.queryFired = true;
|
|
559
|
-
}
|
|
560
615
|
async componentWillLoad() {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
616
|
+
switch (this.gmVersion) {
|
|
617
|
+
case 'gmcore':
|
|
618
|
+
this.determineUserActionsCore();
|
|
619
|
+
break;
|
|
620
|
+
case 'gm16':
|
|
621
|
+
this.determineUserActions16();
|
|
622
|
+
break;
|
|
566
623
|
}
|
|
567
624
|
if (this.translationUrl.length > 2) {
|
|
568
625
|
await getTranslations(this.translationUrl);
|
|
@@ -587,24 +644,16 @@ const UserActionController = class {
|
|
|
587
644
|
}
|
|
588
645
|
calcMandatoryActions() {
|
|
589
646
|
this.mandatoryItems = 0;
|
|
590
|
-
this.mandatoryActions.
|
|
591
|
-
const isPresent = this.activeUserActions.includes(action);
|
|
592
|
-
if (isPresent) {
|
|
593
|
-
this.mandatoryItems++;
|
|
594
|
-
}
|
|
595
|
-
});
|
|
647
|
+
this.mandatoryActions.forEach(action => this.activeUserActions.includes(action) && this.mandatoryItems++);
|
|
596
648
|
}
|
|
597
649
|
render() {
|
|
598
|
-
if (this.mandatoryItems
|
|
599
|
-
this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
|
|
600
|
-
return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("slot", { name: 'spinner' })
|
|
601
|
-
&&
|
|
602
|
-
h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
|
|
603
|
-
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
650
|
+
if (this.mandatoryItems === 0) {
|
|
606
651
|
return;
|
|
607
652
|
}
|
|
653
|
+
this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
|
|
654
|
+
return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("div", null, h("slot", { name: 'spinner' }), h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" })))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "client-styling": this.clientStyling }))))), h("div", { class: "ButtonsWrapper" }, this.includeRejectButton &&
|
|
655
|
+
h("button", { class: "ConsentRejectButton", onClick: this.handleReject }, translate('rejectButtonText', this.lang)), this.includeSubmitButton &&
|
|
656
|
+
h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: this.handleApplyClick }, translate('submitButtonText', this.lang))), this.includeRejectText && h("p", { class: "RejectText" }, translate('rejectText', this.lang))))));
|
|
608
657
|
}
|
|
609
658
|
static get watchers() { return {
|
|
610
659
|
"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_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[
|
|
19
|
+
return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"includeRejectButton":[516,"include-reject-button"],"includeRejectText":[516,"include-reject-text"],"gmVersion":[513,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[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"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -24,6 +24,14 @@ export declare class UserActionController {
|
|
|
24
24
|
* whether or not to include the submit button (in case we want to compose a different )
|
|
25
25
|
*/
|
|
26
26
|
includeSubmitButton: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* whether or not to include the reject button
|
|
29
|
+
*/
|
|
30
|
+
includeRejectButton: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* whether or not to include the reject desctiption text
|
|
33
|
+
*/
|
|
34
|
+
includeRejectText: boolean;
|
|
27
35
|
/**
|
|
28
36
|
* Select GM version
|
|
29
37
|
*/
|
|
@@ -62,10 +70,11 @@ export declare class UserActionController {
|
|
|
62
70
|
private stylingContainer;
|
|
63
71
|
private stylingSubscription;
|
|
64
72
|
private consentTitles;
|
|
65
|
-
determineUserActionsCore():
|
|
66
|
-
determineUserActions16():
|
|
73
|
+
determineUserActionsCore(): void;
|
|
74
|
+
determineUserActions16(): void;
|
|
67
75
|
updateUserConsents(): void;
|
|
68
|
-
handleApplyClick()
|
|
76
|
+
handleApplyClick: () => void;
|
|
77
|
+
handleReject: () => void;
|
|
69
78
|
componentWillLoad(): Promise<void>;
|
|
70
79
|
componentDidLoad(): void;
|
|
71
80
|
disconnectedCallback(): void;
|
|
@@ -23,6 +23,14 @@ export namespace Components {
|
|
|
23
23
|
* Select GM version
|
|
24
24
|
*/
|
|
25
25
|
"gmVersion": string;
|
|
26
|
+
/**
|
|
27
|
+
* whether or not to include the reject button
|
|
28
|
+
*/
|
|
29
|
+
"includeRejectButton": boolean;
|
|
30
|
+
/**
|
|
31
|
+
* whether or not to include the reject desctiption text
|
|
32
|
+
*/
|
|
33
|
+
"includeRejectText": boolean;
|
|
26
34
|
/**
|
|
27
35
|
* whether or not to include the submit button (in case we want to compose a different )
|
|
28
36
|
*/
|
|
@@ -75,6 +83,14 @@ declare namespace LocalJSX {
|
|
|
75
83
|
* Select GM version
|
|
76
84
|
*/
|
|
77
85
|
"gmVersion"?: string;
|
|
86
|
+
/**
|
|
87
|
+
* whether or not to include the reject button
|
|
88
|
+
*/
|
|
89
|
+
"includeRejectButton": boolean;
|
|
90
|
+
/**
|
|
91
|
+
* whether or not to include the reject desctiption text
|
|
92
|
+
*/
|
|
93
|
+
"includeRejectText": boolean;
|
|
78
94
|
/**
|
|
79
95
|
* whether or not to include the submit button (in case we want to compose a different )
|
|
80
96
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-21db0506.js";const n={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."}},s=e=>new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])n[t][i]=e[t][i]})),t(!0)}))})),o=(e,t,i)=>{let s=(o=n[t||"en"],e.split(".").reduce(((e,t)=>e&&void 0!==e[t]?e[t]:null),o));var o;if(null===s)return e;if(void 0!==i)for(const[e,t]of Object.entries(i)){const i=new RegExp(`{${e}}`,"g");s=s.replace(i,t)}return s};function r(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function a(e,t){const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function c(e,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,e&&e.appendChild(i)}))}}const d=class{constructor(i){e(this,i),this.userLegislationConsent=t(this,"userLegislationConsent",7),this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.mbSource=void 0,this.textContent=""}handleNewTranslations(){s(this.translationUrl)}handleStylingUrlChange(e,t){e!==t&&a(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?c(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,o("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},o("termsAndConditions.tcLink",this.lang)),o("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},o("privacyPolicy.privacyLink",this.lang)),o("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,o("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},o("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,o("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},o("privacyPolicy.privacyLink",this.lang)),o("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,o(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"aba04e96251f2f0febe96883b931193fb5ca8c94",ref:e=>this.stylingContainer=e},i("p",{key:"d3f0cbeb5b45b4538462a53c41ab041b176a7c26",class:"ConsentTitle"},this.consentTitle),i("label",{key:"800ab8d45e87b075402c3178e60a16866d0321d4",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"919c15c353a8146661eca2870e7a63f7c689953e",ref:e=>this.checkboxInput=e,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"f7126adee1ba5540837da4b852961d08a9eae857",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}}};d.style=':host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary), #52d004;font-weight:bold}#userConsent{appearance:none;width:18px;border-radius:3px;height:18px;border:1px solid var(--emw--color-black, #000000);background-color:var(--emw--color-primary), #52d004;cursor:pointer;position:relative}#userConsent:checked{background-color:var(--emw--color-primary), #52d004;background-color:#52d004;border:1px solid var(--emw--color-white, #000000)}#userConsent:checked::after{content:"";position:absolute;width:4px;height:8px;border:solid var(--emw--color-black, #000000);background-color:var(--emw--color-primary), #52d004;border-width:0 2px 2px 0;top:2px;left:5px;transform:rotate(45deg)}';const l={en:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit",rejectButtonText:"Reject",rejectText:"Rejecting new consents will result in the inability to continue the login process and you will be logged out."},"en-us":{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit",rejectButtonText:"Reject",rejectText:"Rejecting new consents will result in the inability to continue the login process and you will be logged out."},ro:{termsAndConditionsTitle:"Termeni și Condiții",smsTitle:"Marketing prin SMS",emailMarketingTitle:"Marketing prin Email",privacyPolicyTitle:"Politica de Confidențialitate",userNoticeText:"Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele",submitButtonText:"Trimite",rejectButtonText:"Respinge",rejectText:"Respingerea noilor consimțăminte va duce la imposibilitatea de a continua procesul de autentificare și veți fi deconectat."},hr:{termsAndConditionsTitle:"Opći uvjeti i odredbe",smsTitle:"SMS makretinški sadržaj",emailMarketingTitle:"E-mail makretinški sadržaj",privacyPolicyTitle:"Politika Privatnosti",userNoticeText:"Prije nego što možete nastaviti, morate pristati na sljedeće",submitButtonText:"Pošalji",rejectButtonText:"Odbij",rejectText:"Odbijanje novih pristanka rezultirat će nemogućnošću nastavka procesa prijave i bit ćete odjavljeni."},fr:{termsAndConditionsTitle:"Termes et Conditions",smsTitle:"Marketing par SMS",emailMarketingTitle:"Marketing par Email",privacyPolicyTitle:"Politique de Confidentialité",userNoticeText:"Avant de continuer, vous devez consentir aux éléments suivants",submitButtonText:"Soumettre",rejectButtonText:"Rejeter",rejectText:"Le rejet des nouveaux consentements entraînera l'impossibilité de continuer le processus de connexion et vous serez déconnecté."},cs:{termsAndConditionsTitle:"Podmínky a ujednání",smsTitle:"SMS marketing",emailMarketingTitle:"Emailový marketing",privacyPolicyTitle:"Zásady ochrany osobních údajů",userNoticeText:"Než budete moci pokračovat, musíte souhlasit s následujícím",submitButtonText:"Odeslat",rejectButtonText:"Odmítnout",rejectText:"Odmítnutí nových souhlasů povede k nemožnosti pokračovat v procesu přihlášení a budete odhlášeni."},de:{termsAndConditionsTitle:"Allgemeine Geschäftsbedingungen",smsTitle:"SMS-Marketing",emailMarketingTitle:"E-Mail-Marketing",privacyPolicyTitle:"Datenschutzrichtlinie",userNoticeText:"Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen",submitButtonText:"Absenden",rejectButtonText:"Ablehnen",rejectText:"Das Ablehnen neuer Zustimmungen führt dazu, dass der Anmeldevorgang nicht fortgesetzt werden kann und Sie abgemeldet werden."},es:{termsAndConditionsTitle:"Términos y Condiciones",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar",rejectButtonText:"Rechazar",rejectText:"Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión."},pt:{termsAndConditionsTitle:"Termos e Condições",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar",rejectButtonText:"Rejeitar",rejectText:"Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado."},"es-mx":{termsAndConditionsTitle:"Términos y Condiciones",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar",rejectButtonText:"Rechazar",rejectText:"Rechazar nuevos consentimientos resultará en la imposibilidad de continuar el proceso de inicio de sesión y se cerrará la sesión."},"pt-br":{termsAndConditionsTitle:"Termos e Condições",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar",rejectButtonText:"Rejeitar",rejectText:"Rejeitar novos consentimentos resultará na impossibilidade de continuar o processo de login e você será desconectado."}},h=e=>new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{l[t]||(l[t]={});for(let i in e[t])l[t][i]=e[t][i]})),t(!0)}))})),m=(e,t,i)=>{let n=l[void 0!==t&&t in l?t:"en"][e];if(void 0!==i)for(const[e,t]of Object.entries(i.values)){const i=new RegExp(`{${e}}`,"g");n=n.replace(i,t)}return n},u=class{constructor(t){e(this,t),this.mandatoryActions=["termsandconditions","privacypolicy"],this.userActions=[],this.consentTitles={termsandconditions:m("termsAndConditionsTitle",this.lang),sms:m("smsTitle",this.lang),emailmarketing:m("emailMarketingTitle",this.lang),privacypolicy:m("privacyPolicyTitle",this.lang)},this.handleApplyClick=()=>{this.queryFired=!0},this.handleReject=()=>{const e=new Headers;e.append("Content-type","application/json"),e.append("X-SessionID",this.userSession),fetch(`${this.endpoint}/v1/player/session/player`,{method:"DELETE",headers:e}).then((()=>{window.postMessage({type:"LogoutSuccessfull"},window.location.href),((e,t={})=>{const i=new CustomEvent("track-custom-event",{detail:{type:"logged_out",data:t},bubbles:!0,composed:!0});document.dispatchEvent(i)})(0,{})}))},this.endpoint=void 0,this.userSession=void 0,this.userId=void 0,this.lang="en",this.includeSubmitButton=void 0,this.includeRejectButton=void 0,this.includeRejectText=void 0,this.gmVersion="",this.translationUrl="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.queryFired=!1,this.readyActionsCount=0,this.activeUserActions=[],this.userActionsValidated=!0,this.receivedQueryResponses=0,this.isLoading=!0,this.mandatoryActionsChecked=0,this.mandatoryItems=void 0}handleNewTranslations(){h(this.translationUrl)}handleClientStylingChange(e,t){e!=t&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}handleQueryResponse(){this.receivedQueryResponses===this.activeUserActions.length&&this.updateUserConsents()}userLegislationConsentHandler(e){const t=e.detail.type,i=e.detail.value;this.mandatoryActions.includes(t)&&!1===this.queryFired&&(!0===i?this.mandatoryActionsChecked++:this.mandatoryActionsChecked--),this.queryFired&&(this.userActions.push(Object.assign({tagCode:t,status:(e=>"gm16"===this.gmVersion?e?1:0:e?"Accepted":"Denied")(i)},"gm16"===this.gmVersion&&{note:""})),this.receivedQueryResponses++)}determineUserActionsCore(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/consent`),t=new Headers;t.append("X-SessionId",this.userSession),fetch(e.href,{method:"GET",headers:t}).then((e=>e.json())).then((e=>{e.items.forEach((e=>{"Expired"===e.status&&this.activeUserActions.push(e.tagCode)}))})).catch((e=>{console.error("Error fetching data:",e)})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href),this.isLoading=!1}))}determineUserActions16(){const e=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),t=new Headers;t.append("X-SessionId",this.userSession),fetch(e.href,{method:"GET",headers:t}).then((e=>e.json())).then((e=>{e.consents.forEach((e=>{2===e.status&&"pepconsent"!==e.tagCode&&this.activeUserActions.push(e.tagCode)}))})).catch((e=>{console.error("Error fetching data:",e)})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href),this.isLoading=!1}))}updateUserConsents(){const e="gmcore"===this.gmVersion?new URL(`${this.endpoint}/v1/player/${this.userId}/consent`):new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);let t={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-SessionId":`${this.userSession}`},body:JSON.stringify({consents:this.userActions})};fetch(e.href,t).then((e=>e.json())).then((()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:"Consent update successful!"}},window.location.href)})).catch((e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Server might not be responding",err:e}},window.location.href)})).finally((()=>{window.postMessage({type:"UserActionsCompleted"},window.location.href)}))}async componentWillLoad(){switch(this.gmVersion){case"gmcore":this.determineUserActionsCore();break;case"gm16":this.determineUserActions16()}this.translationUrl.length>2&&await h(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?c(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}calcMandatoryActions(){this.mandatoryItems=0,this.mandatoryActions.forEach((e=>this.activeUserActions.includes(e)&&this.mandatoryItems++))}render(){if(0!==this.mandatoryItems)return this.userActionsValidated=this.mandatoryActionsChecked===this.mandatoryItems,i("div",{class:"QueryReferenceContainer",ref:e=>this.stylingContainer=e},this.isLoading?i("div",null,i("slot",{name:"spinner"}),i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"}))):i("div",{class:"UserActionController"},i("h2",{class:"UserConsentNotice"},m("userNoticeText",this.lang)),i("div",{class:"PlayerLegislationWrapper"},this.activeUserActions.map((e=>i("slot",{name:e},i("player-user-consents",{lang:this.lang,"gm-version":this.gmVersion,"translation-url":this.translationUrl,consentType:e,consentTitle:this.consentTitles[e],queried:this.queryFired,mandatory:this.mandatoryActions.includes(e),"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"client-styling":this.clientStyling}))))),i("div",{class:"ButtonsWrapper"},this.includeRejectButton&&i("button",{class:"ConsentRejectButton",onClick:this.handleReject},m("rejectButtonText",this.lang)),this.includeSubmitButton&&i("button",{class:"ConsentSubmitButton",disabled:!this.userActionsValidated,onClick:this.handleApplyClick},m("submitButtonText",this.lang))),this.includeRejectText&&i("p",{class:"RejectText"},m("rejectText",this.lang))))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],receivedQueryResponses:["handleQueryResponse"]}}};u.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserConsentNotice{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserActionController{font-family:Arial, Helvetica, sans-serif;font-weight:100;height:100%;width:100%;padding:1rem 1.5rem 2rem;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;border-radius:5%}.ConsentSubmitButton,.ConsentRejectButton{font-size:1rem;font-family:var(--emw--button-typography);padding:0.4rem 1.4rem;background:var(--emw--button-background-color, #FFFFFF);border:var(--emw-button-border, 2px solid #000);color:var(--emw--button-text-color, #000000);border-radius:var(--emw--button-border-radius, 5px);align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled,.ConsentRejectButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}.ButtonsWrapper{display:flex;flex-direction:row;justify-content:space-between;margin-top:10px}.ButtonsWrapper button:only-child{margin-left:auto}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:blue}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{d as player_user_consents,u as user_action_controller}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,b as n}from"./p-21db0506.js";export{s as setNonce}from"./p-21db0506.js";import{g as t}from"./p-e1255160.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((async e=>(await t(),n([["p-e132fb80",[[1,"user-action-controller",{endpoint:[513],userSession:[513,"user-session"],userId:[513,"user-id"],lang:[1537],includeSubmitButton:[516,"include-submit-button"],includeRejectButton:[516,"include-reject-button"],includeRejectText:[516,"include-reject-text"],gmVersion:[513,"gm-version"],translationUrl:[513,"translation-url"],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],queryFired:[32],readyActionsCount:[32],activeUserActions:[32],userActionsValidated:[32],receivedQueryResponses:[32],isLoading:[32],mandatoryActionsChecked:[32],mandatoryItems:[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],receivedQueryResponses:["handleQueryResponse"]}],[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"],mbSource:[513,"mb-source"],textContent:[32]},null,{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}]]]],e))));
|
package/package.json
CHANGED