@everymatrix/user-actions 1.90.27 → 1.90.29
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/{index-04ccb420.js → index-66cfb45f.js} +460 -12
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-actions.cjs.js +2 -2
- package/dist/cjs/user-actions_2.cjs.entry.js +723 -0
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/user-actions/user-actions.js +337 -3
- package/dist/esm/{index-2b2bb7fc.js → index-ec24e8d4.js} +460 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/user-actions.js +3 -3
- package/dist/esm/user-actions_2.entry.js +718 -0
- package/dist/types/components/user-actions/user-actions.d.ts +47 -1
- package/dist/types/components.d.ts +82 -0
- package/dist/user-actions/index-ec24e8d4.js +2 -0
- package/dist/user-actions/user-actions.esm.js +1 -1
- package/dist/user-actions/user-actions_2.entry.js +1 -0
- package/package.json +1 -1
- package/dist/cjs/user-actions.cjs.entry.js +0 -91
- package/dist/esm/user-actions.entry.js +0 -87
- package/dist/user-actions/index-2b2bb7fc.js +0 -2
- package/dist/user-actions/user-actions.entry.js +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
1
2
|
import { actionsMapping } from "../../utils/utils";
|
|
3
|
+
import "../../../../../user-funds-acknowledgment/dist/types/index";
|
|
2
4
|
export class UserActions {
|
|
3
5
|
constructor() {
|
|
4
6
|
this.emitCurrentActionEvent = () => {
|
|
@@ -7,9 +9,27 @@ export class UserActions {
|
|
|
7
9
|
this.shiftActionStack = () => {
|
|
8
10
|
this.actionStack = this.actionStack.slice(1);
|
|
9
11
|
};
|
|
12
|
+
this.mbSource = undefined;
|
|
10
13
|
this.endpoint = undefined;
|
|
11
14
|
this.userid = undefined;
|
|
15
|
+
this.operatorid = undefined;
|
|
16
|
+
this.playercurrency = 'EUR';
|
|
17
|
+
this.hasfundsacknowledgment = 'false';
|
|
18
|
+
this.session = "";
|
|
19
|
+
this.language = 'en';
|
|
20
|
+
this.clientStyling = undefined;
|
|
21
|
+
this.clientStylingUrl = undefined;
|
|
22
|
+
this.translationUrl = '';
|
|
23
|
+
this.currencylocale = 'en';
|
|
24
|
+
this.currencydisplay = 'symbol';
|
|
25
|
+
this.maximumfractiondigits = '2';
|
|
26
|
+
this.minimumfractiondigits = '0';
|
|
27
|
+
this.customdisplayformat = '';
|
|
28
|
+
this.alwaysshowdecimals = 'true';
|
|
29
|
+
this.gmversion = 'gm16';
|
|
30
|
+
this.totalcalculationmode = 'totalCashAmount';
|
|
12
31
|
this.actionStack = [];
|
|
32
|
+
this.customerFundsProtectionActive = false;
|
|
13
33
|
}
|
|
14
34
|
handleEvent(e) {
|
|
15
35
|
var _a, _b;
|
|
@@ -24,18 +44,29 @@ export class UserActions {
|
|
|
24
44
|
return fetch(url.href)
|
|
25
45
|
.then((response) => response.json())
|
|
26
46
|
.then(data => {
|
|
47
|
+
var _a, _b;
|
|
27
48
|
// filtering necessary to prevent widget from throwing "cannot read properties of 'undefined'"
|
|
28
|
-
//
|
|
49
|
+
// when the actions received are not part of actionsMapping
|
|
29
50
|
this.actionStack = data.actions.filter(action => actionsMapping[action.action]);
|
|
30
51
|
if (this.actionStack.length > 0)
|
|
31
52
|
this.emitCurrentActionEvent();
|
|
53
|
+
this.customerFundsProtectionActive = (_b = (_a = data.actions) === null || _a === void 0 ? void 0 : _a.some((item) => item.action === "customer-funds-protection")) !== null && _b !== void 0 ? _b : false;
|
|
54
|
+
// signal to prompt modal
|
|
55
|
+
if (this.customerFundsProtectionActive) {
|
|
56
|
+
window.postMessage({ type: 'ProtectionFundsActive' }, window.location.href);
|
|
57
|
+
}
|
|
32
58
|
});
|
|
33
59
|
}
|
|
34
60
|
componentWillLoad() {
|
|
35
61
|
return this.fetchUserActions();
|
|
36
62
|
}
|
|
37
63
|
render() {
|
|
38
|
-
|
|
64
|
+
if (!this.customerFundsProtectionActive || this.hasfundsacknowledgment === 'false') {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return (h("user-funds-acknowledgment", { endpoint: this.endpoint, session: this.session, operatorid: this.operatorid, language: this.language, "mb-source": this.mbSource, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl, currencylocale: this.currencylocale, currencydisplay: this.currencydisplay, maximumfractiondigits: this.maximumfractiondigits, minimumfractiondigits: this.minimumfractiondigits, playercurrency: this.playercurrency, userid: this.userid, gmversion: this.gmversion, totalcalculationmode: this.totalcalculationmode }));
|
|
69
|
+
}
|
|
39
70
|
}
|
|
40
71
|
static get is() { return "user-actions"; }
|
|
41
72
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,6 +82,23 @@ export class UserActions {
|
|
|
51
82
|
}
|
|
52
83
|
static get properties() {
|
|
53
84
|
return {
|
|
85
|
+
"mbSource": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"mutable": false,
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "string",
|
|
90
|
+
"resolved": "string",
|
|
91
|
+
"references": {}
|
|
92
|
+
},
|
|
93
|
+
"required": false,
|
|
94
|
+
"optional": false,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": ""
|
|
98
|
+
},
|
|
99
|
+
"attribute": "mb-source",
|
|
100
|
+
"reflect": true
|
|
101
|
+
},
|
|
54
102
|
"endpoint": {
|
|
55
103
|
"type": "string",
|
|
56
104
|
"mutable": false,
|
|
@@ -84,12 +132,298 @@ export class UserActions {
|
|
|
84
132
|
},
|
|
85
133
|
"attribute": "userid",
|
|
86
134
|
"reflect": false
|
|
135
|
+
},
|
|
136
|
+
"operatorid": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "string",
|
|
141
|
+
"resolved": "string",
|
|
142
|
+
"references": {}
|
|
143
|
+
},
|
|
144
|
+
"required": false,
|
|
145
|
+
"optional": false,
|
|
146
|
+
"docs": {
|
|
147
|
+
"tags": [],
|
|
148
|
+
"text": ""
|
|
149
|
+
},
|
|
150
|
+
"attribute": "operatorid",
|
|
151
|
+
"reflect": false
|
|
152
|
+
},
|
|
153
|
+
"playercurrency": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string",
|
|
158
|
+
"resolved": "string",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": ""
|
|
166
|
+
},
|
|
167
|
+
"attribute": "playercurrency",
|
|
168
|
+
"reflect": true,
|
|
169
|
+
"defaultValue": "'EUR'"
|
|
170
|
+
},
|
|
171
|
+
"hasfundsacknowledgment": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "string",
|
|
176
|
+
"resolved": "string",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "The userid required for for the call"
|
|
184
|
+
},
|
|
185
|
+
"attribute": "hasfundsacknowledgment",
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"defaultValue": "'false'"
|
|
188
|
+
},
|
|
189
|
+
"session": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "string",
|
|
194
|
+
"resolved": "string",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "The sessionid"
|
|
202
|
+
},
|
|
203
|
+
"attribute": "session",
|
|
204
|
+
"reflect": true,
|
|
205
|
+
"defaultValue": "\"\""
|
|
206
|
+
},
|
|
207
|
+
"language": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"mutable": true,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "string",
|
|
212
|
+
"resolved": "string",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": false,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Language"
|
|
220
|
+
},
|
|
221
|
+
"attribute": "language",
|
|
222
|
+
"reflect": true,
|
|
223
|
+
"defaultValue": "'en'"
|
|
224
|
+
},
|
|
225
|
+
"clientStyling": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "string",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Client custom styling via inline style"
|
|
238
|
+
},
|
|
239
|
+
"attribute": "client-styling",
|
|
240
|
+
"reflect": true
|
|
241
|
+
},
|
|
242
|
+
"clientStylingUrl": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "string",
|
|
247
|
+
"resolved": "string",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Client custom styling via url"
|
|
255
|
+
},
|
|
256
|
+
"attribute": "client-styling-url",
|
|
257
|
+
"reflect": true
|
|
258
|
+
},
|
|
259
|
+
"translationUrl": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "string",
|
|
264
|
+
"resolved": "string",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "Translation url"
|
|
272
|
+
},
|
|
273
|
+
"attribute": "translation-url",
|
|
274
|
+
"reflect": true,
|
|
275
|
+
"defaultValue": "''"
|
|
276
|
+
},
|
|
277
|
+
"currencylocale": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"mutable": false,
|
|
280
|
+
"complexType": {
|
|
281
|
+
"original": "string",
|
|
282
|
+
"resolved": "string",
|
|
283
|
+
"references": {}
|
|
284
|
+
},
|
|
285
|
+
"required": false,
|
|
286
|
+
"optional": false,
|
|
287
|
+
"docs": {
|
|
288
|
+
"tags": [],
|
|
289
|
+
"text": "These props are used only by Intl.NumberFormat and have no effect if customdisplayformat is passed, as it will be used instead"
|
|
290
|
+
},
|
|
291
|
+
"attribute": "currencylocale",
|
|
292
|
+
"reflect": true,
|
|
293
|
+
"defaultValue": "'en'"
|
|
294
|
+
},
|
|
295
|
+
"currencydisplay": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"mutable": false,
|
|
298
|
+
"complexType": {
|
|
299
|
+
"original": "string",
|
|
300
|
+
"resolved": "string",
|
|
301
|
+
"references": {}
|
|
302
|
+
},
|
|
303
|
+
"required": false,
|
|
304
|
+
"optional": false,
|
|
305
|
+
"docs": {
|
|
306
|
+
"tags": [],
|
|
307
|
+
"text": ""
|
|
308
|
+
},
|
|
309
|
+
"attribute": "currencydisplay",
|
|
310
|
+
"reflect": true,
|
|
311
|
+
"defaultValue": "'symbol'"
|
|
312
|
+
},
|
|
313
|
+
"maximumfractiondigits": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"mutable": false,
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "string",
|
|
318
|
+
"resolved": "string",
|
|
319
|
+
"references": {}
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": false,
|
|
323
|
+
"docs": {
|
|
324
|
+
"tags": [],
|
|
325
|
+
"text": ""
|
|
326
|
+
},
|
|
327
|
+
"attribute": "maximumfractiondigits",
|
|
328
|
+
"reflect": true,
|
|
329
|
+
"defaultValue": "'2'"
|
|
330
|
+
},
|
|
331
|
+
"minimumfractiondigits": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"mutable": false,
|
|
334
|
+
"complexType": {
|
|
335
|
+
"original": "string",
|
|
336
|
+
"resolved": "string",
|
|
337
|
+
"references": {}
|
|
338
|
+
},
|
|
339
|
+
"required": false,
|
|
340
|
+
"optional": false,
|
|
341
|
+
"docs": {
|
|
342
|
+
"tags": [],
|
|
343
|
+
"text": ""
|
|
344
|
+
},
|
|
345
|
+
"attribute": "minimumfractiondigits",
|
|
346
|
+
"reflect": true,
|
|
347
|
+
"defaultValue": "'0'"
|
|
348
|
+
},
|
|
349
|
+
"customdisplayformat": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"mutable": false,
|
|
352
|
+
"complexType": {
|
|
353
|
+
"original": "string",
|
|
354
|
+
"resolved": "string",
|
|
355
|
+
"references": {}
|
|
356
|
+
},
|
|
357
|
+
"required": false,
|
|
358
|
+
"optional": false,
|
|
359
|
+
"docs": {
|
|
360
|
+
"tags": [],
|
|
361
|
+
"text": "Example value: '{amount|,.2} {currency}'. The {} blocks are replaced by their respective values.\nEverything else in the string is left as it is. The \"amount\" block also accepts arguments that must be placed after \"|\".\nFirst char is the Thousands Separator, second is the Decimal Separator, third is Decimal Precision.\nAn empty value (' ') indicates that the default values should be used for that specific arg."
|
|
362
|
+
},
|
|
363
|
+
"attribute": "customdisplayformat",
|
|
364
|
+
"reflect": true,
|
|
365
|
+
"defaultValue": "''"
|
|
366
|
+
},
|
|
367
|
+
"alwaysshowdecimals": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"mutable": false,
|
|
370
|
+
"complexType": {
|
|
371
|
+
"original": "string",
|
|
372
|
+
"resolved": "string",
|
|
373
|
+
"references": {}
|
|
374
|
+
},
|
|
375
|
+
"required": false,
|
|
376
|
+
"optional": false,
|
|
377
|
+
"docs": {
|
|
378
|
+
"tags": [],
|
|
379
|
+
"text": ""
|
|
380
|
+
},
|
|
381
|
+
"attribute": "alwaysshowdecimals",
|
|
382
|
+
"reflect": true,
|
|
383
|
+
"defaultValue": "'true'"
|
|
384
|
+
},
|
|
385
|
+
"gmversion": {
|
|
386
|
+
"type": "string",
|
|
387
|
+
"mutable": false,
|
|
388
|
+
"complexType": {
|
|
389
|
+
"original": "string",
|
|
390
|
+
"resolved": "string",
|
|
391
|
+
"references": {}
|
|
392
|
+
},
|
|
393
|
+
"required": false,
|
|
394
|
+
"optional": false,
|
|
395
|
+
"docs": {
|
|
396
|
+
"tags": [],
|
|
397
|
+
"text": ""
|
|
398
|
+
},
|
|
399
|
+
"attribute": "gmversion",
|
|
400
|
+
"reflect": true,
|
|
401
|
+
"defaultValue": "'gm16'"
|
|
402
|
+
},
|
|
403
|
+
"totalcalculationmode": {
|
|
404
|
+
"type": "string",
|
|
405
|
+
"mutable": false,
|
|
406
|
+
"complexType": {
|
|
407
|
+
"original": "string",
|
|
408
|
+
"resolved": "string",
|
|
409
|
+
"references": {}
|
|
410
|
+
},
|
|
411
|
+
"required": false,
|
|
412
|
+
"optional": false,
|
|
413
|
+
"docs": {
|
|
414
|
+
"tags": [],
|
|
415
|
+
"text": ""
|
|
416
|
+
},
|
|
417
|
+
"attribute": "totalcalculationmode",
|
|
418
|
+
"reflect": true,
|
|
419
|
+
"defaultValue": "'totalCashAmount'"
|
|
87
420
|
}
|
|
88
421
|
};
|
|
89
422
|
}
|
|
90
423
|
static get states() {
|
|
91
424
|
return {
|
|
92
|
-
"actionStack": {}
|
|
425
|
+
"actionStack": {},
|
|
426
|
+
"customerFundsProtectionActive": {}
|
|
93
427
|
};
|
|
94
428
|
}
|
|
95
429
|
static get listeners() {
|