@everymatrix/user-action-controller 1.0.0 → 1.0.70

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 (57) 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 +504 -0
  5. package/dist/cjs/user-action-controller.cjs.js +17 -11
  6. package/dist/collection/collection-manifest.json +5 -11
  7. package/dist/collection/components/user-action-controller/index.js +1 -0
  8. package/dist/collection/components/user-action-controller/user-action-controller.css +37 -0
  9. package/dist/collection/components/user-action-controller/user-action-controller.js +418 -328
  10. package/dist/collection/utils/locale.utils.js +66 -0
  11. package/dist/collection/utils/utils.js +1 -1
  12. package/dist/esm/app-globals-0f993ce5.js +3 -0
  13. package/dist/esm/index-02b86e76.js +1288 -0
  14. package/dist/esm/loader.js +7 -13
  15. package/dist/esm/player-user-consents_2.entry.js +499 -0
  16. package/dist/esm/user-action-controller.js +14 -11
  17. package/dist/stencil.config.dev.js +17 -0
  18. package/dist/stencil.config.js +14 -19
  19. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.d.ts +2 -0
  20. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.dev.d.ts +2 -0
  21. package/dist/types/components/user-action-controller/index.d.ts +1 -0
  22. package/dist/types/components/user-action-controller/user-action-controller.d.ts +68 -68
  23. package/dist/types/components.d.ts +28 -40
  24. package/dist/types/stencil-public-runtime.d.ts +142 -33
  25. package/dist/types/utils/locale.utils.d.ts +2 -0
  26. package/dist/user-action-controller/p-4bd71dba.entry.js +1 -0
  27. package/dist/user-action-controller/p-b996e8b8.js +2 -0
  28. package/dist/user-action-controller/p-e1255160.js +1 -0
  29. package/dist/user-action-controller/user-action-controller.esm.js +1 -1
  30. package/loader/cdn.js +1 -3
  31. package/loader/index.cjs.js +1 -3
  32. package/loader/index.d.ts +13 -1
  33. package/loader/index.es2017.js +1 -3
  34. package/loader/index.js +1 -3
  35. package/loader/package.json +1 -0
  36. package/package.json +16 -3
  37. package/dist/cjs/generic-user-consent_3.cjs.entry.js +0 -210
  38. package/dist/cjs/index-5b463836.js +0 -1285
  39. package/dist/components/generic-user-consent.js +0 -6
  40. package/dist/components/generic-user-consent2.js +0 -93
  41. package/dist/components/index.d.ts +0 -26
  42. package/dist/components/index.js +0 -1
  43. package/dist/components/legislation-wrapper.js +0 -6
  44. package/dist/components/legislation-wrapper2.js +0 -33
  45. package/dist/components/user-action-controller.d.ts +0 -11
  46. package/dist/components/user-action-controller.js +0 -168
  47. package/dist/esm/generic-user-consent_3.entry.js +0 -204
  48. package/dist/esm/index-e34db4b0.js +0 -1259
  49. package/dist/esm/polyfills/core-js.js +0 -11
  50. package/dist/esm/polyfills/css-shim.js +0 -1
  51. package/dist/esm/polyfills/dom.js +0 -79
  52. package/dist/esm/polyfills/es5-html-element.js +0 -1
  53. package/dist/esm/polyfills/index.js +0 -34
  54. package/dist/esm/polyfills/system.js +0 -6
  55. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/user-action-controller/.stencil/packages/user-action-controller/stencil.config.d.ts +0 -2
  56. package/dist/user-action-controller/p-20213f37.js +0 -1
  57. package/dist/user-action-controller/p-2a14a5fe.entry.js +0 -1
@@ -1,335 +1,425 @@
1
- import { Component, h, Prop, Listen, State, Watch, Event } from '@stencil/core';
2
- import '@everymatrix/legislation-wrapper';
3
- import '@everymatrix/generic-user-consent';
1
+ import { h } from "@stencil/core";
2
+ import { getTranslations, translate } from "../../utils/locale.utils";
3
+ import "../../../../../player-user-consents/dist/types/index";
4
4
  export class UserActionController {
5
- constructor() {
6
- /**
7
- * Event name to be sent when the button is clicked
8
- */
9
- this.postMessageEvent = 'closeButtonClicked';
10
- this.consentTitles = {
11
- termsandconditions: "Terms and Conditions",
12
- sms: "SMS marketing",
13
- emailmarketing: "Email marketing"
14
- };
15
- /**
16
- * Which actions are required in order to activate the "Apply" button. Other actions are considered optional.
17
- */
18
- this.queryFired = false;
19
- this.readyActionsCount = 0;
20
- this.receivedQueryResponses = 0;
21
- this.mandatoryActions = ['termsandconditions'];
22
- this.requiredActionsCount = 0;
23
- this.expectedQueryResponses = 0;
24
- this.userActions = [];
25
- }
26
- determineMandatoryActions() {
27
- let url = new URL(`${this.endpoint}v1/player/consentRequirements`);
28
- return fetch(url.href)
29
- .then(res => res.json())
30
- .then(data => {
31
- data.items.forEach(action => {
32
- action.mustAccept && this.mandatoryActions.push(action.tagCode);
33
- });
34
- });
35
- }
36
- handleQueryResponse() {
37
- if (this.receivedQueryResponses === this.expectedQueryResponses) {
38
- this.updateUserConsents();
5
+ constructor() {
6
+ //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
7
+ this.mandatoryActions = ['termsandconditions', 'privacypolicy'];
8
+ this.userActions = [];
9
+ this.consentTitles = {
10
+ termsandconditions: translate('termsAndConditionsTitle', this.lang),
11
+ sms: translate('smsTitle', this.lang),
12
+ emailmarketing: translate('emailMarketingTitle', this.lang),
13
+ privacypolicy: translate('privacyPolicyTitle', this.lang)
14
+ };
15
+ this.setClientStyling = () => {
16
+ let sheet = document.createElement('style');
17
+ sheet.innerHTML = this.clientStyling;
18
+ this.stylingContainer.prepend(sheet);
19
+ };
20
+ this.setClientStylingURL = () => {
21
+ let url = new URL(this.clientStylingUrl);
22
+ let cssFile = document.createElement('style');
23
+ fetch(url.href)
24
+ .then((res) => res.text())
25
+ .then((data) => {
26
+ this.clientStyling = data;
27
+ cssFile.innerHTML = data;
28
+ setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
29
+ })
30
+ .catch((err) => {
31
+ console.log('error ', err);
32
+ });
33
+ };
34
+ this.endpoint = undefined;
35
+ this.userSession = undefined;
36
+ this.userId = undefined;
37
+ this.lang = 'en';
38
+ this.includeSubmitButton = undefined;
39
+ this.gmVersion = '';
40
+ this.translationUrl = '';
41
+ this.clientStyling = '';
42
+ this.clientStylingUrl = '';
43
+ this.queryFired = false;
44
+ this.readyActionsCount = 0;
45
+ this.activeUserActions = [];
46
+ this.userActionsValidated = true;
47
+ this.receivedQueryResponses = 0;
48
+ this.limitStylingAppends = false;
49
+ this.isLoading = true;
50
+ this.mandatoryActionsChecked = 0;
51
+ this.mandatoryItems = undefined;
39
52
  }
40
- }
41
- updateUserConsents() {
42
- const url = new URL(`${this.endpoint}v1/player/${this.userId}/consent`);
43
- let body = {
44
- items: this.userActions
45
- };
46
- let options = {
47
- method: 'POST',
48
- headers: {
49
- 'Content-Type': 'application/json',
50
- 'Accept': 'application/json',
51
- 'X-SessionId': `${this.userSession}`,
52
- },
53
- body: JSON.stringify(body)
54
- };
55
- fetch(url.href, options)
56
- .then(res => res.json())
57
- .then(() => {
58
- /**
59
- * @TODO document this
60
- */
61
- window.postMessage({ type: 'WidgetNotification', data: {
62
- type: 'success',
63
- message: 'Consent update successfull!'
64
- } }, window.location.href);
65
- })
66
- .catch((err) => {
67
- /**
68
- * @TODO document this
69
- */
70
- window.postMessage({ type: 'WidgetNotification', data: {
71
- type: 'error',
72
- message: 'Server might not be responding',
73
- err
74
- } }, window.location.href);
75
- })
76
- .finally(() => {
77
- window.postMessage({ type: "UserActionsCompleted" }, window.location.href);
78
- });
79
- }
80
- handleApplyClick() {
81
- this.queryFired = true;
82
- }
83
- handleClose() {
84
- if (this.usePostmessage) {
85
- window.postMessage({ type: this.postMessageEvent });
53
+ handleNewTranslations() {
54
+ getTranslations(this.translationUrl);
86
55
  }
87
- this.closeButtonEvent.emit();
88
- }
89
- userLegislationConsentHandler(event) {
90
- // Increase / Decrease the amount of mandatory actions taken
91
- if (this.mandatoryActions.includes(event.detail.type)) {
92
- if (event.detail.value)
93
- this.readyActionsCount++;
94
- else
95
- this.readyActionsCount--;
56
+ handleQueryResponse() {
57
+ if (this.receivedQueryResponses === this.activeUserActions.length) {
58
+ this.updateUserConsents();
59
+ }
96
60
  }
97
- // Register final user choices only if we're ready to update
98
- if (this.queryFired) {
99
- this.userActions.push({ tagCode: event.detail.type, status: event.detail.value ? 'Accepted' : 'Denied' });
100
- this.receivedQueryResponses++;
61
+ userLegislationConsentHandler(event) {
62
+ const actionType = event.detail.type;
63
+ const actionTypeChecked = event.detail.value;
64
+ if (this.mandatoryActions.includes(actionType) && this.queryFired === false) {
65
+ actionTypeChecked === true ? this.mandatoryActionsChecked++ : this.mandatoryActionsChecked--;
66
+ }
67
+ // Register final user choices only if we're ready to update
68
+ if (this.queryFired) {
69
+ const determineStatus = (checked, version) => {
70
+ if (version === 'gm16') {
71
+ return checked ? 1 : 0;
72
+ }
73
+ return checked ? 'Accepted' : 'Denied';
74
+ };
75
+ this.userActions.push(Object.assign({ tagCode: actionType, status: determineStatus(actionTypeChecked, this.gmVersion) }, (this.gmVersion === 'gm16' && { note: '' })));
76
+ this.receivedQueryResponses++;
77
+ }
101
78
  }
102
- }
103
- // Returning a promise here will ensure that the fetch completes before we render the component
104
- componentWillLoad() {
105
- return this.determineMandatoryActions();
106
- }
107
- render() {
108
- const activeUAList = this.activeUserActions.replace(/ /g, '').split(',');
109
- this.requiredActionsCount = activeUAList.filter(action => this.mandatoryActions.includes(action)).length;
110
- this.expectedQueryResponses = activeUAList.length;
111
- return (h("div", { class: "QueryReferenceContainer" },
112
- h("div", { class: "UserActionController" },
113
- this.showCloseButton &&
114
- h("div", { class: "CloseButton", onClick: () => this.handleClose() },
115
- h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", fill: "currentColor", viewBox: "0 0 16 16" },
116
- h("path", { d: "M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" }))),
117
- h("h2", { class: "UserConsentNotice" }, this.userNoticeText),
118
- h("legislation-wrapper", { "active-user-actions": this.activeUserActions }, activeUAList.map(item => (h("generic-user-consent", { slot: item, consentType: item, consentTitle: this.consentTitles[item], queried: this.queryFired, mandatory: this.mandatoryActions.includes(item) })))),
119
- this.includeSubmitButton &&
120
- h("button", { class: "ConsentSubmitButton", disabled: this.readyActionsCount === this.requiredActionsCount ? false : true, onClick: () => this.handleApplyClick() }, this.submitButtonText))));
121
- }
122
- static get is() { return "user-action-controller"; }
123
- static get encapsulation() { return "shadow"; }
124
- static get originalStyleUrls() { return {
125
- "$": ["user-action-controller.scss"]
126
- }; }
127
- static get styleUrls() { return {
128
- "$": ["user-action-controller.css"]
129
- }; }
130
- static get properties() { return {
131
- "endpoint": {
132
- "type": "string",
133
- "mutable": false,
134
- "complexType": {
135
- "original": "string",
136
- "resolved": "string",
137
- "references": {}
138
- },
139
- "required": true,
140
- "optional": false,
141
- "docs": {
142
- "tags": [],
143
- "text": "the endpoint required for the update call"
144
- },
145
- "attribute": "endpoint",
146
- "reflect": false
147
- },
148
- "userSession": {
149
- "type": "string",
150
- "mutable": false,
151
- "complexType": {
152
- "original": "string",
153
- "resolved": "string",
154
- "references": {}
155
- },
156
- "required": true,
157
- "optional": false,
158
- "docs": {
159
- "tags": [],
160
- "text": "user session required for the update call"
161
- },
162
- "attribute": "user-session",
163
- "reflect": false
164
- },
165
- "userId": {
166
- "type": "string",
167
- "mutable": false,
168
- "complexType": {
169
- "original": "string",
170
- "resolved": "string",
171
- "references": {}
172
- },
173
- "required": true,
174
- "optional": false,
175
- "docs": {
176
- "tags": [],
177
- "text": "user id required for the update call"
178
- },
179
- "attribute": "user-id",
180
- "reflect": false
181
- },
182
- "includeSubmitButton": {
183
- "type": "boolean",
184
- "mutable": false,
185
- "complexType": {
186
- "original": "boolean",
187
- "resolved": "boolean",
188
- "references": {}
189
- },
190
- "required": true,
191
- "optional": false,
192
- "docs": {
193
- "tags": [],
194
- "text": "wether or not to include the submit button (in case we want to compose a different )"
195
- },
196
- "attribute": "include-submit-button",
197
- "reflect": false
198
- },
199
- "submitButtonText": {
200
- "type": "string",
201
- "mutable": false,
202
- "complexType": {
203
- "original": "string",
204
- "resolved": "string",
205
- "references": {}
206
- },
207
- "required": false,
208
- "optional": false,
209
- "docs": {
210
- "tags": [],
211
- "text": "the text of the button, if button is enabled"
212
- },
213
- "attribute": "submit-button-text",
214
- "reflect": false
215
- },
216
- "userNoticeText": {
217
- "type": "string",
218
- "mutable": false,
219
- "complexType": {
220
- "original": "string",
221
- "resolved": "string",
222
- "references": {}
223
- },
224
- "required": false,
225
- "optional": false,
226
- "docs": {
227
- "tags": [],
228
- "text": "the title of the action group"
229
- },
230
- "attribute": "user-notice-text",
231
- "reflect": false
232
- },
233
- "activeUserActions": {
234
- "type": "string",
235
- "mutable": false,
236
- "complexType": {
237
- "original": "string",
238
- "resolved": "string",
239
- "references": {}
240
- },
241
- "required": true,
242
- "optional": false,
243
- "docs": {
244
- "tags": [],
245
- "text": "which user action widgets are included"
246
- },
247
- "attribute": "active-user-actions",
248
- "reflect": false
249
- },
250
- "showCloseButton": {
251
- "type": "boolean",
252
- "mutable": false,
253
- "complexType": {
254
- "original": "boolean",
255
- "resolved": "boolean",
256
- "references": {}
257
- },
258
- "required": true,
259
- "optional": false,
260
- "docs": {
261
- "tags": [],
262
- "text": "Property used to display the close/cancel button"
263
- },
264
- "attribute": "show-close-button",
265
- "reflect": false
266
- },
267
- "usePostmessage": {
268
- "type": "boolean",
269
- "mutable": false,
270
- "complexType": {
271
- "original": "boolean",
272
- "resolved": "boolean",
273
- "references": {}
274
- },
275
- "required": true,
276
- "optional": false,
277
- "docs": {
278
- "tags": [],
279
- "text": "Use postMessage event to communicate"
280
- },
281
- "attribute": "use-postmessage",
282
- "reflect": false
283
- },
284
- "postMessageEvent": {
285
- "type": "string",
286
- "mutable": false,
287
- "complexType": {
288
- "original": "string",
289
- "resolved": "string",
290
- "references": {}
291
- },
292
- "required": false,
293
- "optional": false,
294
- "docs": {
295
- "tags": [],
296
- "text": "Event name to be sent when the button is clicked"
297
- },
298
- "attribute": "post-message-event",
299
- "reflect": false,
300
- "defaultValue": "'closeButtonClicked'"
79
+ determineUserActionsCore() {
80
+ const url = new URL(`${this.endpoint}/v1/player/${this.userId}/consent`);
81
+ const headers = new Headers();
82
+ headers.append('X-SessionId', this.userSession);
83
+ let requestOptions = {
84
+ method: 'GET',
85
+ headers
86
+ };
87
+ return fetch(url.href, requestOptions)
88
+ .then(res => res.json())
89
+ .then(data => {
90
+ const actionItems = data.items;
91
+ actionItems.forEach(element => {
92
+ if (element.status === 'Expired') {
93
+ this.activeUserActions.push(element.tagCode);
94
+ }
95
+ });
96
+ this.isLoading = false;
97
+ })
98
+ .catch(error => {
99
+ console.error('Error fetching data:', error);
100
+ this.isLoading = false;
101
+ }).finally(() => {
102
+ this.calcMandatoryActions();
103
+ window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 ? true : false }, window.location.href);
104
+ });
105
+ }
106
+ determineUserActions16() {
107
+ const url = new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
108
+ const headers = new Headers();
109
+ headers.append('X-SessionId', this.userSession);
110
+ let requestOptions = {
111
+ method: 'GET',
112
+ headers
113
+ };
114
+ return fetch(url.href, requestOptions)
115
+ .then(res => res.json())
116
+ .then(data => {
117
+ const actionItems = data.consents;
118
+ actionItems.forEach(element => {
119
+ if (element.status === 2 && element.tagCode !== 'pepconsent') {
120
+ this.activeUserActions.push(element.tagCode);
121
+ }
122
+ });
123
+ this.isLoading = false;
124
+ })
125
+ .catch(error => {
126
+ console.error('Error fetching data:', error);
127
+ this.isLoading = false;
128
+ }).finally(() => {
129
+ this.calcMandatoryActions();
130
+ window.postMessage({ type: 'UserActionsExists', displayUserActions: this.mandatoryItems > 0 ? true : false }, window.location.href);
131
+ });
132
+ }
133
+ updateUserConsents() {
134
+ const url = (this.gmVersion === 'gmcore')
135
+ ? new URL(`${this.endpoint}/v1/player/${this.userId}/consent`)
136
+ : new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
137
+ const body = {
138
+ consents: this.userActions
139
+ };
140
+ let requestOptions = {
141
+ method: 'POST',
142
+ headers: {
143
+ 'Content-Type': 'application/json',
144
+ 'Accept': 'application/json',
145
+ 'X-SessionId': `${this.userSession}`,
146
+ },
147
+ body: JSON.stringify(body)
148
+ };
149
+ fetch(url.href, requestOptions)
150
+ .then(res => res.json())
151
+ .then(() => {
152
+ window.postMessage({
153
+ type: 'WidgetNotification',
154
+ data: {
155
+ type: 'success',
156
+ message: 'Consent update successful!'
157
+ }
158
+ }, window.location.href);
159
+ })
160
+ .catch((err) => {
161
+ window.postMessage({
162
+ type: 'WidgetNotification',
163
+ data: {
164
+ type: 'error',
165
+ message: 'Server might not be responding',
166
+ err
167
+ }
168
+ }, window.location.href);
169
+ })
170
+ .finally(() => {
171
+ window.postMessage({ type: 'UserActionsCompleted' }, window.location.href);
172
+ });
173
+ }
174
+ handleApplyClick() {
175
+ this.queryFired = true;
176
+ }
177
+ async componentWillLoad() {
178
+ if (this.gmVersion === 'gmcore') {
179
+ this.determineUserActionsCore();
180
+ }
181
+ if (this.gmVersion === 'gm16') {
182
+ this.determineUserActions16();
183
+ }
184
+ if (this.translationUrl.length > 2) {
185
+ await getTranslations(this.translationUrl);
186
+ }
187
+ }
188
+ componentDidRender() {
189
+ // start custom styling area
190
+ if (!this.limitStylingAppends && this.stylingContainer) {
191
+ if (this.clientStyling)
192
+ this.setClientStyling();
193
+ if (this.clientStylingUrl)
194
+ this.setClientStylingURL();
195
+ this.limitStylingAppends = true;
196
+ }
197
+ // end custom styling area
198
+ }
199
+ calcMandatoryActions() {
200
+ this.mandatoryItems = 0;
201
+ this.mandatoryActions.map(action => {
202
+ const isPresent = this.activeUserActions.includes(action);
203
+ if (isPresent) {
204
+ this.mandatoryItems++;
205
+ }
206
+ });
207
+ }
208
+ render() {
209
+ if (this.mandatoryItems > 0) {
210
+ this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
211
+ return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("slot", { name: 'spinner' })
212
+ &&
213
+ 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": this.clientStyling }))))), this.includeSubmitButton &&
214
+ h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
215
+ }
216
+ else {
217
+ return;
218
+ }
219
+ }
220
+ static get is() { return "user-action-controller"; }
221
+ static get encapsulation() { return "shadow"; }
222
+ static get originalStyleUrls() {
223
+ return {
224
+ "$": ["user-action-controller.scss"]
225
+ };
226
+ }
227
+ static get styleUrls() {
228
+ return {
229
+ "$": ["user-action-controller.css"]
230
+ };
231
+ }
232
+ static get properties() {
233
+ return {
234
+ "endpoint": {
235
+ "type": "string",
236
+ "mutable": false,
237
+ "complexType": {
238
+ "original": "string",
239
+ "resolved": "string",
240
+ "references": {}
241
+ },
242
+ "required": true,
243
+ "optional": false,
244
+ "docs": {
245
+ "tags": [],
246
+ "text": "the endpoint required for the update call"
247
+ },
248
+ "attribute": "endpoint",
249
+ "reflect": true
250
+ },
251
+ "userSession": {
252
+ "type": "string",
253
+ "mutable": false,
254
+ "complexType": {
255
+ "original": "string",
256
+ "resolved": "string",
257
+ "references": {}
258
+ },
259
+ "required": true,
260
+ "optional": false,
261
+ "docs": {
262
+ "tags": [],
263
+ "text": "user session required for the update call"
264
+ },
265
+ "attribute": "user-session",
266
+ "reflect": true
267
+ },
268
+ "userId": {
269
+ "type": "string",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "string",
273
+ "resolved": "string",
274
+ "references": {}
275
+ },
276
+ "required": true,
277
+ "optional": false,
278
+ "docs": {
279
+ "tags": [],
280
+ "text": "user id required for the update call"
281
+ },
282
+ "attribute": "user-id",
283
+ "reflect": true
284
+ },
285
+ "lang": {
286
+ "type": "string",
287
+ "mutable": true,
288
+ "complexType": {
289
+ "original": "string",
290
+ "resolved": "string",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "Language"
298
+ },
299
+ "attribute": "lang",
300
+ "reflect": true,
301
+ "defaultValue": "'en'"
302
+ },
303
+ "includeSubmitButton": {
304
+ "type": "boolean",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "boolean",
308
+ "resolved": "boolean",
309
+ "references": {}
310
+ },
311
+ "required": true,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "whether or not to include the submit button (in case we want to compose a different )"
316
+ },
317
+ "attribute": "include-submit-button",
318
+ "reflect": true
319
+ },
320
+ "gmVersion": {
321
+ "type": "string",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "string",
325
+ "resolved": "string",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "Select GM version"
333
+ },
334
+ "attribute": "gm-version",
335
+ "reflect": false,
336
+ "defaultValue": "''"
337
+ },
338
+ "translationUrl": {
339
+ "type": "string",
340
+ "mutable": false,
341
+ "complexType": {
342
+ "original": "string",
343
+ "resolved": "string",
344
+ "references": {}
345
+ },
346
+ "required": false,
347
+ "optional": false,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": "Translation url"
351
+ },
352
+ "attribute": "translation-url",
353
+ "reflect": true,
354
+ "defaultValue": "''"
355
+ },
356
+ "clientStyling": {
357
+ "type": "string",
358
+ "mutable": true,
359
+ "complexType": {
360
+ "original": "string",
361
+ "resolved": "string",
362
+ "references": {}
363
+ },
364
+ "required": false,
365
+ "optional": false,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "Client custom styling via inline style"
369
+ },
370
+ "attribute": "client-styling",
371
+ "reflect": true,
372
+ "defaultValue": "''"
373
+ },
374
+ "clientStylingUrl": {
375
+ "type": "string",
376
+ "mutable": false,
377
+ "complexType": {
378
+ "original": "string",
379
+ "resolved": "string",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": false,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "Client custom styling via url"
387
+ },
388
+ "attribute": "client-styling-url",
389
+ "reflect": true,
390
+ "defaultValue": "''"
391
+ }
392
+ };
393
+ }
394
+ static get states() {
395
+ return {
396
+ "queryFired": {},
397
+ "readyActionsCount": {},
398
+ "activeUserActions": {},
399
+ "userActionsValidated": {},
400
+ "receivedQueryResponses": {},
401
+ "limitStylingAppends": {},
402
+ "isLoading": {},
403
+ "mandatoryActionsChecked": {},
404
+ "mandatoryItems": {}
405
+ };
406
+ }
407
+ static get watchers() {
408
+ return [{
409
+ "propName": "translationUrl",
410
+ "methodName": "handleNewTranslations"
411
+ }, {
412
+ "propName": "receivedQueryResponses",
413
+ "methodName": "handleQueryResponse"
414
+ }];
415
+ }
416
+ static get listeners() {
417
+ return [{
418
+ "name": "userLegislationConsent",
419
+ "method": "userLegislationConsentHandler",
420
+ "target": undefined,
421
+ "capture": false,
422
+ "passive": false
423
+ }];
301
424
  }
302
- }; }
303
- static get states() { return {
304
- "queryFired": {},
305
- "readyActionsCount": {},
306
- "receivedQueryResponses": {}
307
- }; }
308
- static get events() { return [{
309
- "method": "closeButtonEvent",
310
- "name": "closeButtonClicked",
311
- "bubbles": true,
312
- "cancelable": true,
313
- "composed": true,
314
- "docs": {
315
- "tags": [],
316
- "text": "Event emitted when the close button is clicked"
317
- },
318
- "complexType": {
319
- "original": "any",
320
- "resolved": "any",
321
- "references": {}
322
- }
323
- }]; }
324
- static get watchers() { return [{
325
- "propName": "receivedQueryResponses",
326
- "methodName": "handleQueryResponse"
327
- }]; }
328
- static get listeners() { return [{
329
- "name": "userLegislationConsent",
330
- "method": "userLegislationConsentHandler",
331
- "target": undefined,
332
- "capture": false,
333
- "passive": false
334
- }]; }
335
425
  }