@everymatrix/user-action-controller 1.43.4 → 1.45.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.
Files changed (50) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-c5061e5a.js +1315 -0
  3. package/dist/cjs/loader.cjs.js +7 -13
  4. package/dist/cjs/player-user-consents_2.cjs.entry.js +457 -495
  5. package/dist/cjs/user-action-controller.cjs.js +17 -11
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/user-action-controller/index.js +1 -0
  8. package/dist/collection/components/user-action-controller/user-action-controller.js +408 -414
  9. package/dist/collection/utils/locale.utils.js +70 -70
  10. package/dist/collection/utils/utils.js +1 -1
  11. package/dist/esm/app-globals-0f993ce5.js +3 -0
  12. package/dist/esm/index-02b86e76.js +1288 -0
  13. package/dist/esm/loader.js +7 -13
  14. package/dist/esm/player-user-consents_2.entry.js +457 -495
  15. package/dist/esm/user-action-controller.js +14 -11
  16. package/dist/stencil.config.dev.js +17 -0
  17. package/dist/stencil.config.js +14 -19
  18. 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 +2 -0
  19. 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 +2 -0
  20. package/dist/types/components/user-action-controller/index.d.ts +1 -0
  21. package/dist/types/components/user-action-controller/user-action-controller.d.ts +68 -68
  22. package/dist/types/stencil-public-runtime.d.ts +142 -33
  23. package/dist/user-action-controller/p-b996e8b8.js +2 -0
  24. package/dist/user-action-controller/p-d7fbd383.entry.js +1 -0
  25. package/dist/user-action-controller/p-e1255160.js +1 -0
  26. package/dist/user-action-controller/user-action-controller.esm.js +1 -1
  27. package/loader/cdn.js +1 -3
  28. package/loader/index.cjs.js +1 -3
  29. package/loader/index.d.ts +13 -1
  30. package/loader/index.es2017.js +1 -3
  31. package/loader/index.js +1 -3
  32. package/loader/package.json +1 -0
  33. package/package.json +9 -2
  34. package/dist/cjs/index-87049e21.js +0 -1300
  35. package/dist/components/index.d.ts +0 -26
  36. package/dist/components/index.js +0 -1
  37. package/dist/components/player-user-consents.js +0 -6
  38. package/dist/components/player-user-consents2.js +0 -257
  39. package/dist/components/user-action-controller.d.ts +0 -11
  40. package/dist/components/user-action-controller.js +0 -365
  41. package/dist/esm/index-71f14530.js +0 -1274
  42. package/dist/esm/polyfills/core-js.js +0 -11
  43. package/dist/esm/polyfills/css-shim.js +0 -1
  44. package/dist/esm/polyfills/dom.js +0 -79
  45. package/dist/esm/polyfills/es5-html-element.js +0 -1
  46. package/dist/esm/polyfills/index.js +0 -34
  47. package/dist/esm/polyfills/system.js +0 -6
  48. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/user-action-controller/.stencil/packages/user-action-controller/stencil.config.d.ts +0 -2
  49. package/dist/user-action-controller/p-2dc9103a.entry.js +0 -1
  50. package/dist/user-action-controller/p-ba444709.js +0 -1
@@ -2,554 +2,516 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-87049e21.js');
5
+ const index = require('./index-c5061e5a.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE$1 = 'en';
8
8
  const TRANSLATIONS$1 = {
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"
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."
15
23
  },
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"
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."
20
38
  },
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"
39
+ hr: {
40
+ termsAndConditions: {
41
+ acceptPart1: "Prihvaćam Opće uvjete i odredbe ",
42
+ acceptPart2: "",
43
+ acceptPart3: "",
44
+ tcLink: "Opći uvjeti i odredbe"
45
+ },
46
+ privacyPolicy: {
47
+ readUnderstandPart1: "Pročitao sam i razumijem Politiku Privatnosti ",
48
+ readUnderstandPart2: ", i potvrđujem da imam više od 18 godina",
49
+ privacyLink: "Politika Privatnosti"
50
+ },
51
+ sms: "Želim dobivati marketinški sadržaj putem sms",
52
+ emailmarketing: "Želim dobivati marketinški sadržaj putem e-maila"
30
53
  },
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"
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."
35
68
  },
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: "Prihvaćam Opće uvjete i odredbe ",
42
- acceptPart2: "",
43
- acceptPart3: "",
44
- tcLink: "Opći uvjeti i odredbe"
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."
45
83
  },
46
- privacyPolicy: {
47
- readUnderstandPart1: "Pročitao sam i razumijem Politiku Privatnosti ",
48
- readUnderstandPart2: ", i potvrđujem da imam više od 18 godina",
49
- privacyLink: "Politika Privatnosti"
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."
50
98
  },
51
- sms: "Želim dobivati marketinški sadržaj putem sms",
52
- emailmarketing: "Želim dobivati marketinški sadržaj putem e-maila"
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
99
  };
100
100
  const getTranslations$1 = (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$1[item][key] = data[item][key];
109
- }
110
- });
111
- resolve(true);
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$1[item][key] = data[item][key];
109
+ }
110
+ });
111
+ resolve(true);
112
+ });
112
113
  });
113
- });
114
114
  };
115
115
  const translate$1 = (key, customLang, values) => {
116
- const lang = customLang || DEFAULT_LANGUAGE$1;
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$1[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);
116
+ const lang = customLang || DEFAULT_LANGUAGE$1;
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$1[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
+ }
128
129
  }
129
- }
130
- return translation;
130
+ return translation;
131
131
  };
132
132
 
133
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;
134
135
 
135
136
  const PlayerUserConsents = class {
136
- constructor(hostRef) {
137
- index.registerInstance(this, hostRef);
138
- this.userLegislationConsent = index.createEvent(this, "userLegislationConsent", 7);
139
- /**
140
- * Language
141
- */
142
- this.lang = 'en';
143
- /**
144
- * 'true' when parent expects component to emit it's current value
145
- */
146
- this.queried = false;
147
- /**
148
- * the type of the consent, used to determine render details
149
- */
150
- this.consentType = '';
151
- /**
152
- * wether or not this consent is mandatory. Used for render details
153
- */
154
- this.mandatory = false;
155
- /**
156
- * Select GM version
157
- */
158
- this.gmVersion = '';
159
- /**
160
- * the title of the consent to be displayed
161
- */
162
- this.consentTitle = '';
163
- /**
164
- * Client custom styling via inline style
165
- */
166
- this.clientStyling = '';
167
- /**
168
- * Translation url
169
- */
170
- this.translationUrl = '';
171
- /**
172
- * the text content to be rendered by the component. Determined at runtime
173
- */
174
- this.textContent = '';
175
- this.limitStylingAppends = false;
176
- this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
177
- this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
178
- this.setClientStyling = () => {
179
- let sheet = document.createElement('style');
180
- sheet.innerHTML = this.clientStyling;
181
- this.stylingContainer.prepend(sheet);
182
- };
183
- }
184
- handleNewTranslations() {
185
- getTranslations$1(this.translationUrl);
186
- }
187
- async componentWillLoad() {
188
- if (this.translationUrl.length > 2) {
189
- await getTranslations$1(this.translationUrl);
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;
190
157
  }
191
- }
192
- userLegislationConsentHandler() {
193
- this.userLegislationConsent.emit({
194
- type: this.consentType,
195
- value: this.checkboxInput.checked
196
- });
197
- }
198
- componentDidRender() {
199
- // start custom styling area
200
- if (!this.limitStylingAppends && this.stylingContainer) {
201
- if (this.clientStyling)
202
- this.setClientStyling();
203
- this.limitStylingAppends = true;
158
+ handleNewTranslations() {
159
+ getTranslations$1(this.translationUrl);
204
160
  }
205
- // end custom styling area
206
- }
207
- determineTextContent() {
208
- if (this.gmVersion === 'gmcore') {
209
- if (this.consentType === 'termsandconditions') {
210
- return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)), translate$1('termsAndConditions.acceptPart2', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('termsAndConditions.acceptPart3', this.lang));
211
- }
161
+ async componentWillLoad() {
162
+ if (this.translationUrl.length > 2) {
163
+ await getTranslations$1(this.translationUrl);
164
+ }
212
165
  }
213
- if (this.gmVersion === 'gm16') {
214
- if (this.consentType === 'termsandconditions') {
215
- return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)));
216
- }
217
- if (this.consentType === 'privacypolicy') {
218
- return index.h("p", null, translate$1('privacyPolicy.readUnderstandPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('privacyPolicy.readUnderstandPart2', this.lang));
219
- }
166
+ userLegislationConsentHandler() {
167
+ this.userLegislationConsent.emit({
168
+ type: this.consentType,
169
+ value: this.checkboxInput.checked
170
+ });
220
171
  }
221
- return index.h("p", null, translate$1(this.consentType, this.lang));
222
- }
223
- render() {
224
- if (this.queried) {
225
- this.userLegislationConsentHandler();
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$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)), translate$1('termsAndConditions.acceptPart2', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('termsAndConditions.acceptPart3', this.lang));
185
+ }
186
+ }
187
+ if (this.gmVersion === 'gm16') {
188
+ if (this.consentType === 'termsandconditions') {
189
+ return index.h("p", null, translate$1('termsAndConditions.acceptPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToTermsAndConditions }, translate$1('termsAndConditions.tcLink', this.lang)));
190
+ }
191
+ if (this.consentType === 'privacypolicy') {
192
+ return index.h("p", null, translate$1('privacyPolicy.readUnderstandPart1', this.lang), index.h("span", { class: "ConsentLink", onClick: this.goToPrivacyPolicy }, translate$1('privacyPolicy.privacyLink', this.lang)), translate$1('privacyPolicy.readUnderstandPart2', this.lang));
193
+ }
194
+ }
195
+ return index.h("p", null, translate$1(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" }, "*"))));
226
202
  }
227
- return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("p", { class: "ConsentTitle" }, this.consentTitle), index.h("label", { class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { class: "MandatoryItem" }, "*"))));
228
- }
229
- static get watchers() { return {
230
- "translationUrl": ["handleNewTranslations"]
231
- }; }
203
+ static get watchers() { return {
204
+ "translationUrl": ["handleNewTranslations"]
205
+ }; }
232
206
  };
233
- PlayerUserConsents.style = playerUserConsentsCss;
207
+ PlayerUserConsents.style = PlayerUserConsentsStyle0;
234
208
 
235
209
  const DEFAULT_LANGUAGE = 'en';
236
210
  const TRANSLATIONS = {
237
- en: {
238
- termsAndConditionsTitle: 'Terms and Conditions',
239
- smsTitle: 'SMS marketing',
240
- emailMarketingTitle: 'Email marketing',
241
- privacyPolicyTitle: 'Privacy Policy',
242
- userNoticeText: 'Before you can proceed you must consent to the following',
243
- submitButtonText: 'Submit'
244
- },
245
- ro: {
246
- termsAndConditionsTitle: 'Termeni şi condiţii',
247
- smsTitle: 'SMS marketing',
248
- emailMarketingTitle: 'Email marketing',
249
- privacyPolicyTitle: 'Privacy Policy',
250
- userNoticeText: 'Before you can proceed you must consent to the following',
251
- submitButtonText: 'Submit'
252
- },
253
- hr: {
254
- termsAndConditionsTitle: 'Opći uvjeti i odredbe',
255
- smsTitle: 'SMS makretinški sadržaj',
256
- emailMarketingTitle: 'E-mail makretinški sadržaj',
257
- privacyPolicyTitle: 'Politika Privatnosti',
258
- userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
259
- submitButtonText: 'Pošalji'
260
- },
261
- fr: {
262
- termsAndConditionsTitle: 'Terms and Conditions',
263
- smsTitle: 'SMS marketing',
264
- emailMarketingTitle: 'Email marketing',
265
- privacyPolicyTitle: 'Privacy Policy',
266
- userNoticeText: 'Before you can proceed you must consent to the following',
267
- submitButtonText: 'Submit'
268
- },
269
- cs: {
270
- termsAndConditionsTitle: 'Terms and Conditions',
271
- smsTitle: 'SMS marketing',
272
- emailMarketingTitle: 'Email marketing',
273
- privacyPolicyTitle: 'Privacy Policy',
274
- userNoticeText: 'Before you can proceed you must consent to the following',
275
- submitButtonText: 'Submit'
276
- },
277
- de: {
278
- termsAndConditionsTitle: 'Terms and Conditions',
279
- smsTitle: 'SMS marketing',
280
- emailMarketingTitle: 'Email marketing',
281
- privacyPolicyTitle: 'Privacy Policy',
282
- userNoticeText: 'Before you can proceed you must consent to the following',
283
- submitButtonText: 'Submit'
284
- },
211
+ en: {
212
+ termsAndConditionsTitle: 'Terms and Conditions',
213
+ smsTitle: 'SMS marketing',
214
+ emailMarketingTitle: 'Email marketing',
215
+ privacyPolicyTitle: 'Privacy Policy',
216
+ userNoticeText: 'Before you can proceed you must consent to the following',
217
+ submitButtonText: 'Submit'
218
+ },
219
+ ro: {
220
+ termsAndConditionsTitle: 'Termeni şi condiţii',
221
+ smsTitle: 'SMS marketing',
222
+ emailMarketingTitle: 'Email marketing',
223
+ privacyPolicyTitle: 'Privacy Policy',
224
+ userNoticeText: 'Before you can proceed you must consent to the following',
225
+ submitButtonText: 'Submit'
226
+ },
227
+ hr: {
228
+ termsAndConditionsTitle: 'Opći uvjeti i odredbe',
229
+ smsTitle: 'SMS makretinški sadržaj',
230
+ emailMarketingTitle: 'E-mail makretinški sadržaj',
231
+ privacyPolicyTitle: 'Politika Privatnosti',
232
+ userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
233
+ submitButtonText: 'Pošalji'
234
+ },
235
+ fr: {
236
+ termsAndConditionsTitle: 'Terms and Conditions',
237
+ smsTitle: 'SMS marketing',
238
+ emailMarketingTitle: 'Email marketing',
239
+ privacyPolicyTitle: 'Privacy Policy',
240
+ userNoticeText: 'Before you can proceed you must consent to the following',
241
+ submitButtonText: 'Submit'
242
+ },
243
+ cs: {
244
+ termsAndConditionsTitle: 'Terms and Conditions',
245
+ smsTitle: 'SMS marketing',
246
+ emailMarketingTitle: 'Email marketing',
247
+ privacyPolicyTitle: 'Privacy Policy',
248
+ userNoticeText: 'Before you can proceed you must consent to the following',
249
+ submitButtonText: 'Submit'
250
+ },
251
+ de: {
252
+ termsAndConditionsTitle: 'Terms and Conditions',
253
+ smsTitle: 'SMS marketing',
254
+ emailMarketingTitle: 'Email marketing',
255
+ privacyPolicyTitle: 'Privacy Policy',
256
+ userNoticeText: 'Before you can proceed you must consent to the following',
257
+ submitButtonText: 'Submit'
258
+ },
285
259
  };
286
260
  const getTranslations = (url) => {
287
- return new Promise((resolve) => {
288
- fetch(url)
289
- .then((res) => res.json())
290
- .then((data) => {
291
- Object.keys(data).forEach((lang) => {
292
- if (!TRANSLATIONS[lang]) {
293
- TRANSLATIONS[lang] = {};
294
- }
295
- for (let key in data[lang]) {
296
- TRANSLATIONS[lang][key] = data[lang][key];
297
- }
298
- });
299
- resolve(true);
261
+ return new Promise((resolve) => {
262
+ fetch(url)
263
+ .then((res) => res.json())
264
+ .then((data) => {
265
+ Object.keys(data).forEach((lang) => {
266
+ if (!TRANSLATIONS[lang]) {
267
+ TRANSLATIONS[lang] = {};
268
+ }
269
+ for (let key in data[lang]) {
270
+ TRANSLATIONS[lang][key] = data[lang][key];
271
+ }
272
+ });
273
+ resolve(true);
274
+ });
300
275
  });
301
- });
302
276
  };
303
277
  const translate = (key, customLang, values) => {
304
- const lang = customLang;
305
- let translation = TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
306
- if (values !== undefined) {
307
- for (const [key, value] of Object.entries(values.values)) {
308
- const regex = new RegExp(`{${key}}`, 'g');
309
- translation = translation.replace(regex, value);
278
+ const lang = customLang;
279
+ let translation = TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
280
+ if (values !== undefined) {
281
+ for (const [key, value] of Object.entries(values.values)) {
282
+ const regex = new RegExp(`{${key}}`, 'g');
283
+ translation = translation.replace(regex, value);
284
+ }
310
285
  }
311
- }
312
- return translation;
286
+ return translation;
313
287
  };
314
288
 
315
289
  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{font-size:1rem;padding:0.4rem 1.4rem;background:#fff;border:2px solid #000;color:#000;border-radius:5px;align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}@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(--emfe-w-login-color-primary, var(--emfe-w-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}}";
290
+ const UserActionControllerStyle0 = userActionControllerCss;
316
291
 
317
292
  const UserActionController = class {
318
- constructor(hostRef) {
319
- index.registerInstance(this, hostRef);
320
- /**
321
- * Language
322
- */
323
- this.lang = 'en';
324
- /**
325
- * Select GM version
326
- */
327
- this.gmVersion = '';
328
- /**
329
- * Translation url
330
- */
331
- this.translationUrl = '';
332
- /**
333
- * Client custom styling via inline style
334
- */
335
- this.clientStyling = '';
336
- /**
337
- * Client custom styling via url
338
- */
339
- this.clientStylingUrl = '';
340
- /**
341
- * Which actions are required in order to activate the "Apply" button. Other actions are considered optional.
342
- */
343
- this.queryFired = false;
344
- this.readyActionsCount = 0;
345
- this.activeUserActions = [];
346
- this.userActionsValidated = true;
347
- this.receivedQueryResponses = 0;
348
- this.limitStylingAppends = false;
349
- this.isLoading = true;
350
- this.mandatoryActionsChecked = 0;
351
- //for now this variable is hardcoded bcs we have terms and conditions and privacy policy mandatory and we dont receive with these new functionality the mandatory actions
352
- this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
353
- this.userActions = [];
354
- this.consentTitles = {
355
- termsandconditions: translate('termsAndConditionsTitle', this.lang),
356
- sms: translate('smsTitle', this.lang),
357
- emailmarketing: translate('emailMarketingTitle', this.lang),
358
- privacypolicy: translate('privacyPolicyTitle', this.lang)
359
- };
360
- this.setClientStyling = () => {
361
- let sheet = document.createElement('style');
362
- sheet.innerHTML = this.clientStyling;
363
- this.stylingContainer.prepend(sheet);
364
- };
365
- this.setClientStylingURL = () => {
366
- let url = new URL(this.clientStylingUrl);
367
- let cssFile = document.createElement('style');
368
- fetch(url.href)
369
- .then((res) => res.text())
370
- .then((data) => {
371
- this.clientStyling = data;
372
- cssFile.innerHTML = data;
373
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
374
- })
375
- .catch((err) => {
376
- console.log('error ', err);
377
- });
378
- };
379
- }
380
- handleNewTranslations() {
381
- getTranslations(this.translationUrl);
382
- }
383
- handleQueryResponse() {
384
- if (this.receivedQueryResponses === this.activeUserActions.length) {
385
- this.updateUserConsents();
293
+ constructor(hostRef) {
294
+ index.registerInstance(this, hostRef);
295
+ //for now this variable is hardcoded bcs we have terms and conditions and privacy policy mandatory and we dont receive with these new functionality the mandatory actions
296
+ this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
297
+ this.userActions = [];
298
+ this.consentTitles = {
299
+ termsandconditions: translate('termsAndConditionsTitle', this.lang),
300
+ sms: translate('smsTitle', this.lang),
301
+ emailmarketing: translate('emailMarketingTitle', this.lang),
302
+ privacypolicy: translate('privacyPolicyTitle', this.lang)
303
+ };
304
+ this.setClientStyling = () => {
305
+ let sheet = document.createElement('style');
306
+ sheet.innerHTML = this.clientStyling;
307
+ this.stylingContainer.prepend(sheet);
308
+ };
309
+ this.setClientStylingURL = () => {
310
+ let url = new URL(this.clientStylingUrl);
311
+ let cssFile = document.createElement('style');
312
+ fetch(url.href)
313
+ .then((res) => res.text())
314
+ .then((data) => {
315
+ this.clientStyling = data;
316
+ cssFile.innerHTML = data;
317
+ setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
318
+ })
319
+ .catch((err) => {
320
+ console.log('error ', err);
321
+ });
322
+ };
323
+ this.endpoint = undefined;
324
+ this.userSession = undefined;
325
+ this.userId = undefined;
326
+ this.lang = 'en';
327
+ this.includeSubmitButton = undefined;
328
+ this.gmVersion = '';
329
+ this.translationUrl = '';
330
+ this.clientStyling = '';
331
+ this.clientStylingUrl = '';
332
+ this.queryFired = false;
333
+ this.readyActionsCount = 0;
334
+ this.activeUserActions = [];
335
+ this.userActionsValidated = true;
336
+ this.receivedQueryResponses = 0;
337
+ this.limitStylingAppends = false;
338
+ this.isLoading = true;
339
+ this.mandatoryActionsChecked = 0;
340
+ this.mandatoryItems = undefined;
386
341
  }
387
- }
388
- userLegislationConsentHandler(event) {
389
- const actionType = event.detail.type;
390
- const actionTypeChecked = event.detail.value;
391
- if (this.mandatoryActions.includes(actionType) && this.queryFired === false) {
392
- actionTypeChecked === true ? this.mandatoryActionsChecked++ : this.mandatoryActionsChecked--;
342
+ handleNewTranslations() {
343
+ getTranslations(this.translationUrl);
393
344
  }
394
- // Register final user choices only if we're ready to update
395
- if (this.queryFired) {
396
- const determineStatus = (checked, version) => {
397
- if (version === 'gm16') {
398
- return checked ? 1 : 0;
345
+ handleQueryResponse() {
346
+ if (this.receivedQueryResponses === this.activeUserActions.length) {
347
+ this.updateUserConsents();
399
348
  }
400
- return checked ? 'Accepted' : 'Denied';
401
- };
402
- this.userActions.push(Object.assign({ tagCode: actionType, status: determineStatus(actionTypeChecked, this.gmVersion) }, (this.gmVersion === 'gm16' && { note: '' })));
403
- this.receivedQueryResponses++;
404
349
  }
405
- }
406
- determineUserActionsCore() {
407
- const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
408
- const headers = new Headers();
409
- headers.append('X-SessionId', this.userSession);
410
- let requestOptions = {
411
- method: 'GET',
412
- headers
413
- };
414
- return fetch(url.href, requestOptions)
415
- .then(res => res.json())
416
- .then(data => {
417
- const actionItems = data.items;
418
- actionItems.forEach(element => {
419
- if (element.status === 'Expired') {
420
- this.activeUserActions.push(element.tagCode);
350
+ userLegislationConsentHandler(event) {
351
+ const actionType = event.detail.type;
352
+ const actionTypeChecked = event.detail.value;
353
+ if (this.mandatoryActions.includes(actionType) && this.queryFired === false) {
354
+ actionTypeChecked === true ? this.mandatoryActionsChecked++ : this.mandatoryActionsChecked--;
421
355
  }
422
- });
423
- this.isLoading = false;
424
- })
425
- .catch(error => {
426
- console.error('Error fetching data:', error);
427
- this.isLoading = false;
428
- }).finally(() => {
429
- this.calcMandatoryActions();
430
- window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 ? true : false }, window.location.href);
431
- });
432
- }
433
- determineUserActions16() {
434
- const url = new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
435
- const headers = new Headers();
436
- headers.append('X-SessionId', this.userSession);
437
- let requestOptions = {
438
- method: 'GET',
439
- headers
440
- };
441
- return fetch(url.href, requestOptions)
442
- .then(res => res.json())
443
- .then(data => {
444
- const actionItems = data.consents;
445
- actionItems.forEach(element => {
446
- if (element.status === 2 && element.tagCode !== 'pepconsent') {
447
- this.activeUserActions.push(element.tagCode);
448
- }
449
- });
450
- this.isLoading = false;
451
- })
452
- .catch(error => {
453
- console.error('Error fetching data:', error);
454
- this.isLoading = false;
455
- }).finally(() => {
456
- this.calcMandatoryActions();
457
- window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 ? true : false }, window.location.href);
458
- });
459
- }
460
- updateUserConsents() {
461
- const url = (this.gmVersion === 'gmcore')
462
- ? new URL(`${this.endpoint}/v1/player/${this.userId}/consent`)
463
- : new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
464
- const body = {
465
- consents: this.userActions
466
- };
467
- let requestOptions = {
468
- method: 'POST',
469
- headers: {
470
- 'Content-Type': 'application/json',
471
- 'Accept': 'application/json',
472
- 'X-SessionId': `${this.userSession}`,
473
- },
474
- body: JSON.stringify(body)
475
- };
476
- fetch(url.href, requestOptions)
477
- .then(res => res.json())
478
- .then(() => {
479
- window.postMessage({
480
- type: 'WidgetNotification',
481
- data: {
482
- type: 'success',
483
- message: 'Consent update successful!'
356
+ // Register final user choices only if we're ready to update
357
+ if (this.queryFired) {
358
+ const determineStatus = (checked, version) => {
359
+ if (version === 'gm16') {
360
+ return checked ? 1 : 0;
361
+ }
362
+ return checked ? 'Accepted' : 'Denied';
363
+ };
364
+ this.userActions.push(Object.assign({ tagCode: actionType, status: determineStatus(actionTypeChecked, this.gmVersion) }, (this.gmVersion === 'gm16' && { note: '' })));
365
+ this.receivedQueryResponses++;
484
366
  }
485
- }, window.location.href);
486
- })
487
- .catch((err) => {
488
- window.postMessage({
489
- type: 'WidgetNotification',
490
- data: {
491
- type: 'error',
492
- message: 'Server might not be responding',
493
- err
494
- }
495
- }, window.location.href);
496
- })
497
- .finally(() => {
498
- window.postMessage({ type: 'UserActionsCompleted' }, window.location.href);
499
- });
500
- }
501
- handleApplyClick() {
502
- this.queryFired = true;
503
- }
504
- async componentWillLoad() {
505
- if (this.gmVersion === 'gmcore') {
506
- this.determineUserActionsCore();
507
367
  }
508
- if (this.gmVersion === 'gm16') {
509
- this.determineUserActions16();
368
+ determineUserActionsCore() {
369
+ const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
370
+ const headers = new Headers();
371
+ headers.append('X-SessionId', this.userSession);
372
+ let requestOptions = {
373
+ method: 'GET',
374
+ headers
375
+ };
376
+ return fetch(url.href, requestOptions)
377
+ .then(res => res.json())
378
+ .then(data => {
379
+ const actionItems = data.items;
380
+ actionItems.forEach(element => {
381
+ if (element.status === 'Expired') {
382
+ this.activeUserActions.push(element.tagCode);
383
+ }
384
+ });
385
+ this.isLoading = false;
386
+ })
387
+ .catch(error => {
388
+ console.error('Error fetching data:', error);
389
+ this.isLoading = false;
390
+ }).finally(() => {
391
+ this.calcMandatoryActions();
392
+ window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 ? true : false }, window.location.href);
393
+ });
510
394
  }
511
- if (this.translationUrl.length > 2) {
512
- await getTranslations(this.translationUrl);
395
+ determineUserActions16() {
396
+ const url = new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
397
+ const headers = new Headers();
398
+ headers.append('X-SessionId', this.userSession);
399
+ let requestOptions = {
400
+ method: 'GET',
401
+ headers
402
+ };
403
+ return fetch(url.href, requestOptions)
404
+ .then(res => res.json())
405
+ .then(data => {
406
+ const actionItems = data.consents;
407
+ actionItems.forEach(element => {
408
+ if (element.status === 2 && element.tagCode !== 'pepconsent') {
409
+ this.activeUserActions.push(element.tagCode);
410
+ }
411
+ });
412
+ this.isLoading = false;
413
+ })
414
+ .catch(error => {
415
+ console.error('Error fetching data:', error);
416
+ this.isLoading = false;
417
+ }).finally(() => {
418
+ this.calcMandatoryActions();
419
+ window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 ? true : false }, window.location.href);
420
+ });
513
421
  }
514
- }
515
- componentDidRender() {
516
- // start custom styling area
517
- if (!this.limitStylingAppends && this.stylingContainer) {
518
- if (this.clientStyling)
519
- this.setClientStyling();
520
- if (this.clientStylingUrl)
521
- this.setClientStylingURL();
522
- this.limitStylingAppends = true;
422
+ updateUserConsents() {
423
+ const url = (this.gmVersion === 'gmcore')
424
+ ? new URL(`${this.endpoint}/v1/player/${this.userId}/consent`)
425
+ : new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
426
+ const body = {
427
+ consents: this.userActions
428
+ };
429
+ let requestOptions = {
430
+ method: 'POST',
431
+ headers: {
432
+ 'Content-Type': 'application/json',
433
+ 'Accept': 'application/json',
434
+ 'X-SessionId': `${this.userSession}`,
435
+ },
436
+ body: JSON.stringify(body)
437
+ };
438
+ fetch(url.href, requestOptions)
439
+ .then(res => res.json())
440
+ .then(() => {
441
+ window.postMessage({
442
+ type: 'WidgetNotification',
443
+ data: {
444
+ type: 'success',
445
+ message: 'Consent update successful!'
446
+ }
447
+ }, window.location.href);
448
+ })
449
+ .catch((err) => {
450
+ window.postMessage({
451
+ type: 'WidgetNotification',
452
+ data: {
453
+ type: 'error',
454
+ message: 'Server might not be responding',
455
+ err
456
+ }
457
+ }, window.location.href);
458
+ })
459
+ .finally(() => {
460
+ window.postMessage({ type: 'UserActionsCompleted' }, window.location.href);
461
+ });
523
462
  }
524
- // end custom styling area
525
- }
526
- calcMandatoryActions() {
527
- this.mandatoryItems = 0;
528
- this.mandatoryActions.map(action => {
529
- const isPresent = this.activeUserActions.includes(action);
530
- if (isPresent) {
531
- this.mandatoryItems++;
532
- }
533
- });
534
- }
535
- render() {
536
- if (this.mandatoryItems > 0) {
537
- this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
538
- return (index.h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (index.h("slot", { name: 'spinner' })
539
- &&
540
- index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (index.h("div", { class: "UserActionController" }, index.h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), index.h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (index.h("slot", { name: action }, index.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": this.clientStyling }))))), this.includeSubmitButton &&
541
- index.h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
463
+ handleApplyClick() {
464
+ this.queryFired = true;
465
+ }
466
+ async componentWillLoad() {
467
+ if (this.gmVersion === 'gmcore') {
468
+ this.determineUserActionsCore();
469
+ }
470
+ if (this.gmVersion === 'gm16') {
471
+ this.determineUserActions16();
472
+ }
473
+ if (this.translationUrl.length > 2) {
474
+ await getTranslations(this.translationUrl);
475
+ }
476
+ }
477
+ componentDidRender() {
478
+ // start custom styling area
479
+ if (!this.limitStylingAppends && this.stylingContainer) {
480
+ if (this.clientStyling)
481
+ this.setClientStyling();
482
+ if (this.clientStylingUrl)
483
+ this.setClientStylingURL();
484
+ this.limitStylingAppends = true;
485
+ }
486
+ // end custom styling area
542
487
  }
543
- else {
544
- return;
488
+ calcMandatoryActions() {
489
+ this.mandatoryItems = 0;
490
+ this.mandatoryActions.map(action => {
491
+ const isPresent = this.activeUserActions.includes(action);
492
+ if (isPresent) {
493
+ this.mandatoryItems++;
494
+ }
495
+ });
496
+ }
497
+ render() {
498
+ if (this.mandatoryItems > 0) {
499
+ this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
500
+ return (index.h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (index.h("slot", { name: 'spinner' })
501
+ &&
502
+ index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (index.h("div", { class: "UserActionController" }, index.h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), index.h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (index.h("slot", { name: action }, index.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": this.clientStyling }))))), this.includeSubmitButton &&
503
+ index.h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
504
+ }
505
+ else {
506
+ return;
507
+ }
545
508
  }
546
- }
547
- static get watchers() { return {
548
- "translationUrl": ["handleNewTranslations"],
549
- "receivedQueryResponses": ["handleQueryResponse"]
550
- }; }
509
+ static get watchers() { return {
510
+ "translationUrl": ["handleNewTranslations"],
511
+ "receivedQueryResponses": ["handleQueryResponse"]
512
+ }; }
551
513
  };
552
- UserActionController.style = userActionControllerCss;
514
+ UserActionController.style = UserActionControllerStyle0;
553
515
 
554
516
  exports.player_user_consents = PlayerUserConsents;
555
517
  exports.user_action_controller = UserActionController;