@everymatrix/player-user-consents 1.0.69
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-69db8b9e.js +1229 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/player-user-consents.cjs.entry.js +209 -0
- package/dist/cjs/player-user-consents.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/player-user-consents/index.js +1 -0
- package/dist/collection/components/player-user-consents/player-user-consents.css +28 -0
- package/dist/collection/components/player-user-consents/player-user-consents.js +258 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +125 -0
- package/dist/collection/utils/utils.js +0 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-cea90c73.js +1202 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/player-user-consents.entry.js +205 -0
- package/dist/esm/player-user-consents.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/player-user-consents/index.esm.js +0 -0
- package/dist/player-user-consents/p-1e483854.js +2 -0
- package/dist/player-user-consents/p-c528b18d.entry.js +1 -0
- package/dist/player-user-consents/p-e1255160.js +1 -0
- package/dist/player-user-consents/player-user-consents.esm.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-user-consents/index.d.ts +1 -0
- package/dist/types/components/player-user-consents/player-user-consents.d.ts +52 -0
- package/dist/types/components.d.ts +117 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +0 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-69db8b9e.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
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);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-69db8b9e.js');
|
|
6
|
+
|
|
7
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
+
const TRANSLATIONS = {
|
|
9
|
+
en: {
|
|
10
|
+
termsAndConditions: {
|
|
11
|
+
acceptPart1: "I accept the ",
|
|
12
|
+
acceptPart2: ", I have read and understood the ",
|
|
13
|
+
acceptPart3: " as published on this site and confirm that I am over 18 years old.",
|
|
14
|
+
tc: "Terms and Conditions"
|
|
15
|
+
},
|
|
16
|
+
privacyPolicy: {
|
|
17
|
+
readUnderstandPart1: "I have read and understood the ",
|
|
18
|
+
readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
|
|
19
|
+
privacy: "Privacy Policy"
|
|
20
|
+
},
|
|
21
|
+
sms: "I consent to receive marketing communication via SMS.",
|
|
22
|
+
emailmarketing: "I consent to receive marketing communication via Email."
|
|
23
|
+
},
|
|
24
|
+
ro: {
|
|
25
|
+
termsAndConditions: {
|
|
26
|
+
acceptPart1: "Accept ",
|
|
27
|
+
acceptPart2: " platformei. Am citit şi înţeles ",
|
|
28
|
+
acceptPart3: " publicată pe acest site şi confirm că am vârstă peste 18 ani.",
|
|
29
|
+
tc: "Termenii şi condiţiile"
|
|
30
|
+
},
|
|
31
|
+
privacyPolicy: {
|
|
32
|
+
readUnderstandPart1: "Am citit şi înţeles ",
|
|
33
|
+
readUnderstandPart2: " publicată pe acest site şi confirm că am vârstă peste 18 ani.",
|
|
34
|
+
privacy: "Politica de confidenţialitate"
|
|
35
|
+
},
|
|
36
|
+
sms: "Sunt de acord să primesc promoţii de marketing prin SMS.",
|
|
37
|
+
emailmarketing: "Sunt de acord să primesc promoţii de marketing pe e-mail."
|
|
38
|
+
},
|
|
39
|
+
hr: {
|
|
40
|
+
termsAndConditions: {
|
|
41
|
+
acceptPart1: "I accept the ",
|
|
42
|
+
acceptPart2: ", I have read and understood the ",
|
|
43
|
+
acceptPart3: " as published on this site and confirm that I am over 18 years old.",
|
|
44
|
+
tc: "Terms and Conditions"
|
|
45
|
+
},
|
|
46
|
+
privacyPolicy: {
|
|
47
|
+
readUnderstandPart1: "I have read and understood the ",
|
|
48
|
+
readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
|
|
49
|
+
privacy: "Privacy Policy"
|
|
50
|
+
},
|
|
51
|
+
sms: "I consent to receive marketing communication via SMS.",
|
|
52
|
+
emailmarketing: "I consent to receive marketing communication via Email."
|
|
53
|
+
},
|
|
54
|
+
fr: {
|
|
55
|
+
termsAndConditions: {
|
|
56
|
+
acceptPart1: "I accept the ",
|
|
57
|
+
acceptPart2: ", I have read and understood the ",
|
|
58
|
+
acceptPart3: " as published on this site and confirm that I am over 18 years old.",
|
|
59
|
+
tc: "Terms and Conditions"
|
|
60
|
+
},
|
|
61
|
+
privacyPolicy: {
|
|
62
|
+
readUnderstandPart1: "I have read and understood the ",
|
|
63
|
+
readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
|
|
64
|
+
privacy: "Privacy Policy"
|
|
65
|
+
},
|
|
66
|
+
sms: "I consent to receive marketing communication via SMS.",
|
|
67
|
+
emailmarketing: "I consent to receive marketing communication via Email."
|
|
68
|
+
},
|
|
69
|
+
cs: {
|
|
70
|
+
termsAndConditions: {
|
|
71
|
+
acceptPart1: "I accept the ",
|
|
72
|
+
acceptPart2: ", I have read and understood the ",
|
|
73
|
+
acceptPart3: " as published on this site and confirm that I am over 18 years old.",
|
|
74
|
+
tc: "Terms and Conditions"
|
|
75
|
+
},
|
|
76
|
+
privacyPolicy: {
|
|
77
|
+
readUnderstandPart1: "I have read and understood the ",
|
|
78
|
+
readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
|
|
79
|
+
privacy: "Privacy Policy"
|
|
80
|
+
},
|
|
81
|
+
sms: "I consent to receive marketing communication via SMS.",
|
|
82
|
+
emailmarketing: "I consent to receive marketing communication via Email."
|
|
83
|
+
},
|
|
84
|
+
de: {
|
|
85
|
+
termsAndConditions: {
|
|
86
|
+
acceptPart1: "I accept the ",
|
|
87
|
+
acceptPart2: ", I have read and understood the ",
|
|
88
|
+
acceptPart3: " as published on this site and confirm that I am over 18 years old.",
|
|
89
|
+
tc: "Terms and Conditions"
|
|
90
|
+
},
|
|
91
|
+
privacyPolicy: {
|
|
92
|
+
readUnderstandPart1: "I have read and understood the ",
|
|
93
|
+
readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
|
|
94
|
+
privacy: "Privacy Policy"
|
|
95
|
+
},
|
|
96
|
+
sms: "I consent to receive marketing communication via SMS.",
|
|
97
|
+
emailmarketing: "I consent to receive marketing communication via Email."
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
const getTranslations = (url) => {
|
|
101
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
102
|
+
return new Promise((resolve) => {
|
|
103
|
+
fetch(url)
|
|
104
|
+
.then((res) => res.json())
|
|
105
|
+
.then((data) => {
|
|
106
|
+
Object.keys(data).forEach((item) => {
|
|
107
|
+
for (let key in data[item]) {
|
|
108
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
resolve(true);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
const translate = (key, customLang, values) => {
|
|
116
|
+
const lang = customLang || DEFAULT_LANGUAGE;
|
|
117
|
+
const getNestedTranslation = (obj, path) => {
|
|
118
|
+
return path.split('.').reduce((o, k) => (o && o[k] !== undefined ? o[k] : null), obj);
|
|
119
|
+
};
|
|
120
|
+
let translation = getNestedTranslation(TRANSLATIONS[lang], key);
|
|
121
|
+
if (translation === null) {
|
|
122
|
+
return key;
|
|
123
|
+
}
|
|
124
|
+
if (values !== undefined) {
|
|
125
|
+
for (const [k, v] of Object.entries(values)) {
|
|
126
|
+
const regex = new RegExp(`{${k}}`, 'g');
|
|
127
|
+
translation = translation.replace(regex, v);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return translation;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const playerUserConsentsCss = ":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}";
|
|
134
|
+
const PlayerUserConsentsStyle0 = playerUserConsentsCss;
|
|
135
|
+
|
|
136
|
+
const PlayerUserConsents = class {
|
|
137
|
+
constructor(hostRef) {
|
|
138
|
+
index.registerInstance(this, hostRef);
|
|
139
|
+
this.userLegislationConsent = index.createEvent(this, "userLegislationConsent", 7);
|
|
140
|
+
this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
|
|
141
|
+
this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
|
|
142
|
+
this.setClientStyling = () => {
|
|
143
|
+
let sheet = document.createElement('style');
|
|
144
|
+
sheet.innerHTML = this.clientStyling;
|
|
145
|
+
this.stylingContainer.prepend(sheet);
|
|
146
|
+
};
|
|
147
|
+
this.lang = 'en';
|
|
148
|
+
this.queried = false;
|
|
149
|
+
this.consentType = '';
|
|
150
|
+
this.mandatory = false;
|
|
151
|
+
this.gmVersion = '';
|
|
152
|
+
this.consentTitle = '';
|
|
153
|
+
this.clientStyling = '';
|
|
154
|
+
this.translationUrl = '';
|
|
155
|
+
this.textContent = '';
|
|
156
|
+
this.limitStylingAppends = false;
|
|
157
|
+
}
|
|
158
|
+
handleNewTranslations() {
|
|
159
|
+
getTranslations(this.translationUrl);
|
|
160
|
+
}
|
|
161
|
+
async componentWillLoad() {
|
|
162
|
+
if (this.translationUrl.length > 2) {
|
|
163
|
+
await getTranslations(this.translationUrl);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
userLegislationConsentHandler() {
|
|
167
|
+
this.userLegislationConsent.emit({
|
|
168
|
+
type: this.consentType,
|
|
169
|
+
value: this.checkboxInput.checked
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
componentDidRender() {
|
|
173
|
+
// start custom styling area
|
|
174
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
175
|
+
if (this.clientStyling)
|
|
176
|
+
this.setClientStyling();
|
|
177
|
+
this.limitStylingAppends = true;
|
|
178
|
+
}
|
|
179
|
+
// end custom styling area
|
|
180
|
+
}
|
|
181
|
+
determineTextContent() {
|
|
182
|
+
if (this.gmVersion === 'gmcore') {
|
|
183
|
+
if (this.consentType === 'termsandconditions') {
|
|
184
|
+
return index.h("p", null, translate('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.tcLink', this.lang)), translate('termsAndConditions.acceptPart2', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.privacyLink', this.lang)), translate('termsAndConditions.acceptPart3', this.lang));
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (this.gmVersion === 'gm16') {
|
|
188
|
+
if (this.consentType === 'termsandconditions') {
|
|
189
|
+
return index.h("p", null, translate('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.tcLink', this.lang)));
|
|
190
|
+
}
|
|
191
|
+
if (this.consentType === 'privacypolicy') {
|
|
192
|
+
return index.h("p", null, translate('privacyPolicy.readUnderstandPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.privacyLink', this.lang)), translate('privacyPolicy.readUnderstandPart2', this.lang));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return index.h("p", null, translate(this.consentType, this.lang));
|
|
196
|
+
}
|
|
197
|
+
render() {
|
|
198
|
+
if (this.queried) {
|
|
199
|
+
this.userLegislationConsentHandler();
|
|
200
|
+
}
|
|
201
|
+
return (index.h("div", { key: 'e3c5e7d280de637fd8297dd59c170479d6142372', ref: el => this.stylingContainer = el }, index.h("p", { key: '8d103ef2eda5fd078a46a7d818eadd07dade5277', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '6a333af5b8585e609285f9f172bf8ddb3b0d4b4b', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: 'c003a2ef7219e4c5442730432dffcaef4a16b947', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: '0bc4b24a85b76763af5e691f126e8ee8ae90e447', class: "MandatoryItem" }, "*"))));
|
|
202
|
+
}
|
|
203
|
+
static get watchers() { return {
|
|
204
|
+
"translationUrl": ["handleNewTranslations"]
|
|
205
|
+
}; }
|
|
206
|
+
};
|
|
207
|
+
PlayerUserConsents.style = PlayerUserConsentsStyle0;
|
|
208
|
+
|
|
209
|
+
exports.player_user_consents = PlayerUserConsents;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-69db8b9e.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('player-user-consents.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
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);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PlayerUserConsents } from './player-user-consents';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ConsentTitle {
|
|
6
|
+
margin-bottom: 0.2rem;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.UserConsent:hover {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.UserConsent {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: baseline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.MandatoryItem {
|
|
20
|
+
color: #f00;
|
|
21
|
+
font-size: 1.2rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ConsentLink {
|
|
25
|
+
text-decoration: underline;
|
|
26
|
+
color: var(--emfe-w-color-primary);
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { getTranslations, translate } from "../../utils/locale.utils";
|
|
3
|
+
export class PlayerUserConsents {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
|
|
6
|
+
this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
|
|
7
|
+
this.setClientStyling = () => {
|
|
8
|
+
let sheet = document.createElement('style');
|
|
9
|
+
sheet.innerHTML = this.clientStyling;
|
|
10
|
+
this.stylingContainer.prepend(sheet);
|
|
11
|
+
};
|
|
12
|
+
this.lang = 'en';
|
|
13
|
+
this.queried = false;
|
|
14
|
+
this.consentType = '';
|
|
15
|
+
this.mandatory = false;
|
|
16
|
+
this.gmVersion = '';
|
|
17
|
+
this.consentTitle = '';
|
|
18
|
+
this.clientStyling = '';
|
|
19
|
+
this.translationUrl = '';
|
|
20
|
+
this.textContent = '';
|
|
21
|
+
this.limitStylingAppends = false;
|
|
22
|
+
}
|
|
23
|
+
handleNewTranslations() {
|
|
24
|
+
getTranslations(this.translationUrl);
|
|
25
|
+
}
|
|
26
|
+
async componentWillLoad() {
|
|
27
|
+
if (this.translationUrl.length > 2) {
|
|
28
|
+
await getTranslations(this.translationUrl);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
userLegislationConsentHandler() {
|
|
32
|
+
this.userLegislationConsent.emit({
|
|
33
|
+
type: this.consentType,
|
|
34
|
+
value: this.checkboxInput.checked
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
componentDidRender() {
|
|
38
|
+
// start custom styling area
|
|
39
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
40
|
+
if (this.clientStyling)
|
|
41
|
+
this.setClientStyling();
|
|
42
|
+
this.limitStylingAppends = true;
|
|
43
|
+
}
|
|
44
|
+
// end custom styling area
|
|
45
|
+
}
|
|
46
|
+
determineTextContent() {
|
|
47
|
+
if (this.gmVersion === 'gmcore') {
|
|
48
|
+
if (this.consentType === 'termsandconditions') {
|
|
49
|
+
return h("p", null, translate('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.tcLink', this.lang)), translate('termsAndConditions.acceptPart2', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.privacyLink', this.lang)), translate('termsAndConditions.acceptPart3', this.lang));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (this.gmVersion === 'gm16') {
|
|
53
|
+
if (this.consentType === 'termsandconditions') {
|
|
54
|
+
return h("p", null, translate('termsAndConditions.acceptPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate('termsAndConditions.tcLink', this.lang)));
|
|
55
|
+
}
|
|
56
|
+
if (this.consentType === 'privacypolicy') {
|
|
57
|
+
return h("p", null, translate('privacyPolicy.readUnderstandPart1', this.lang), h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate('privacyPolicy.privacyLink', this.lang)), translate('privacyPolicy.readUnderstandPart2', this.lang));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return h("p", null, translate(this.consentType, this.lang));
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
if (this.queried) {
|
|
64
|
+
this.userLegislationConsentHandler();
|
|
65
|
+
}
|
|
66
|
+
return (h("div", { key: 'e3c5e7d280de637fd8297dd59c170479d6142372', ref: el => this.stylingContainer = el }, h("p", { key: '8d103ef2eda5fd078a46a7d818eadd07dade5277', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '6a333af5b8585e609285f9f172bf8ddb3b0d4b4b', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: 'c003a2ef7219e4c5442730432dffcaef4a16b947', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: '0bc4b24a85b76763af5e691f126e8ee8ae90e447', class: "MandatoryItem" }, "*"))));
|
|
67
|
+
}
|
|
68
|
+
static get is() { return "player-user-consents"; }
|
|
69
|
+
static get encapsulation() { return "shadow"; }
|
|
70
|
+
static get originalStyleUrls() {
|
|
71
|
+
return {
|
|
72
|
+
"$": ["player-user-consents.scss"]
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
static get styleUrls() {
|
|
76
|
+
return {
|
|
77
|
+
"$": ["player-user-consents.css"]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get properties() {
|
|
81
|
+
return {
|
|
82
|
+
"lang": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": true,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Language"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "lang",
|
|
97
|
+
"reflect": true,
|
|
98
|
+
"defaultValue": "'en'"
|
|
99
|
+
},
|
|
100
|
+
"queried": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "boolean",
|
|
105
|
+
"resolved": "boolean",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "'true' when parent expects component to emit it's current value"
|
|
113
|
+
},
|
|
114
|
+
"attribute": "queried",
|
|
115
|
+
"reflect": true,
|
|
116
|
+
"defaultValue": "false"
|
|
117
|
+
},
|
|
118
|
+
"consentType": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "string",
|
|
123
|
+
"resolved": "string",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "the type of the consent, used to determine render details"
|
|
131
|
+
},
|
|
132
|
+
"attribute": "consent-type",
|
|
133
|
+
"reflect": true,
|
|
134
|
+
"defaultValue": "''"
|
|
135
|
+
},
|
|
136
|
+
"mandatory": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "boolean",
|
|
141
|
+
"resolved": "boolean",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": "wether or not this consent is mandatory. Used for render details"
|
|
149
|
+
},
|
|
150
|
+
"attribute": "mandatory",
|
|
151
|
+
"reflect": true,
|
|
152
|
+
"defaultValue": "false"
|
|
153
|
+
},
|
|
154
|
+
"gmVersion": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "string",
|
|
159
|
+
"resolved": "string",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": false,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": "Select GM version"
|
|
167
|
+
},
|
|
168
|
+
"attribute": "gm-version",
|
|
169
|
+
"reflect": false,
|
|
170
|
+
"defaultValue": "''"
|
|
171
|
+
},
|
|
172
|
+
"consentTitle": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "string",
|
|
177
|
+
"resolved": "string",
|
|
178
|
+
"references": {}
|
|
179
|
+
},
|
|
180
|
+
"required": false,
|
|
181
|
+
"optional": false,
|
|
182
|
+
"docs": {
|
|
183
|
+
"tags": [],
|
|
184
|
+
"text": "the title of the consent to be displayed"
|
|
185
|
+
},
|
|
186
|
+
"attribute": "consent-title",
|
|
187
|
+
"reflect": true,
|
|
188
|
+
"defaultValue": "''"
|
|
189
|
+
},
|
|
190
|
+
"clientStyling": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "Client custom styling via inline style"
|
|
203
|
+
},
|
|
204
|
+
"attribute": "client-styling",
|
|
205
|
+
"reflect": false,
|
|
206
|
+
"defaultValue": "''"
|
|
207
|
+
},
|
|
208
|
+
"translationUrl": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"mutable": false,
|
|
211
|
+
"complexType": {
|
|
212
|
+
"original": "string",
|
|
213
|
+
"resolved": "string",
|
|
214
|
+
"references": {}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [],
|
|
220
|
+
"text": "Translation url"
|
|
221
|
+
},
|
|
222
|
+
"attribute": "translation-url",
|
|
223
|
+
"reflect": true,
|
|
224
|
+
"defaultValue": "''"
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
static get states() {
|
|
229
|
+
return {
|
|
230
|
+
"textContent": {},
|
|
231
|
+
"limitStylingAppends": {}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
static get events() {
|
|
235
|
+
return [{
|
|
236
|
+
"method": "userLegislationConsent",
|
|
237
|
+
"name": "userLegislationConsent",
|
|
238
|
+
"bubbles": true,
|
|
239
|
+
"cancelable": true,
|
|
240
|
+
"composed": true,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": ""
|
|
244
|
+
},
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "object",
|
|
247
|
+
"resolved": "object",
|
|
248
|
+
"references": {}
|
|
249
|
+
}
|
|
250
|
+
}];
|
|
251
|
+
}
|
|
252
|
+
static get watchers() {
|
|
253
|
+
return [{
|
|
254
|
+
"propName": "translationUrl",
|
|
255
|
+
"methodName": "handleNewTranslations"
|
|
256
|
+
}];
|
|
257
|
+
}
|
|
258
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|