@everymatrix/player-account-controller-nd 1.37.5
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/CHANGELOG.md +14 -0
- package/README.md +0 -0
- package/assets/arrow-down.svg +3 -0
- package/dist/player-account-controller-nd.js +2597 -0
- package/dist/player-account-controller-nd.js.map +1 -0
- package/dist/player-account-controller.js +77673 -0
- package/dist/player-account-controller.js.map +1 -0
- package/documentation.md +166 -0
- package/index.html +49 -0
- package/index.js +1 -0
- package/package.json +39 -0
- package/public/favicon.png +0 -0
- package/public/reset.css +48 -0
- package/rollup.config.js +67 -0
- package/src/PlayerAccountController.svelte +919 -0
- package/src/PlayerAccountController.types.ts +5 -0
- package/src/i18n.js +27 -0
- package/src/index.ts +4 -0
- package/src/translations.js +102 -0
- package/stories/PlayerAccountPage.stories.js +13 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
<svelte:options tag={null} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { onMount, tick } from 'svelte';
|
|
5
|
+
import { getDevice } from 'rvhelper';
|
|
6
|
+
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
|
7
|
+
import { TRANSLATIONS } from './translations';
|
|
8
|
+
|
|
9
|
+
import '@everymatrix/player-account-menu-nd';
|
|
10
|
+
import '@everymatrix/player-account-notifications';
|
|
11
|
+
import '@everymatrix/player-account-timeout';
|
|
12
|
+
import '@everymatrix/player-account-self-exclusion-nd';
|
|
13
|
+
import '@everymatrix/player-account-closure-nd';
|
|
14
|
+
import '@everymatrix/player-account-gaming-limits';
|
|
15
|
+
import '@everymatrix/player-active-bonuses';
|
|
16
|
+
import '@everymatrix/player-profile-info';
|
|
17
|
+
import '@everymatrix/player-change-password';
|
|
18
|
+
import '@everymatrix/player-reality-check';
|
|
19
|
+
import '@everymatrix/player-bonus-history';
|
|
20
|
+
import '@everymatrix/player-deposit';
|
|
21
|
+
import '@everymatrix/player-withdrawal';
|
|
22
|
+
import '@everymatrix/player-pending-withdrawals';
|
|
23
|
+
import '@everymatrix/player-transaction-history';
|
|
24
|
+
import '@everymatrix/player-gaming-history';
|
|
25
|
+
import '@everymatrix/player-account-betting-history';
|
|
26
|
+
import '@everymatrix/player-account-gaming-limits-wrapper-2-nd';
|
|
27
|
+
import '@everymatrix/player-account-biometrics';
|
|
28
|
+
|
|
29
|
+
export let cmsendpoint:string = '';
|
|
30
|
+
export let env:string = '';
|
|
31
|
+
export let customnotifications:string = '';
|
|
32
|
+
export let playerid:string = '';
|
|
33
|
+
export let session:string = '';
|
|
34
|
+
export let endpoint:string = '';
|
|
35
|
+
export let lang:string = '';
|
|
36
|
+
export let operator:string = 'Everymatrix';
|
|
37
|
+
export let supportemail:string = '';
|
|
38
|
+
export let separatelimits:string = 'true';
|
|
39
|
+
export let hasdefaultamount:string = 'false';
|
|
40
|
+
export let userroles:string = '';
|
|
41
|
+
export let simplepasswordvalidation:string = 'false';
|
|
42
|
+
export let tablabels:string = '';
|
|
43
|
+
export let historyenabled:string = '';
|
|
44
|
+
export let deletelimit:string = '';
|
|
45
|
+
export let limitsamount:string = '';
|
|
46
|
+
export let limitsperiods:string = '';
|
|
47
|
+
export let numberofentries:string = '';
|
|
48
|
+
export let customcurrencysymbols:string = '';
|
|
49
|
+
export let currency:string = '';
|
|
50
|
+
export let apiversion:string = '';
|
|
51
|
+
export let clientstyling:string = '';
|
|
52
|
+
export let clientstylingurl:string = '';
|
|
53
|
+
export let translationurl:string = '';
|
|
54
|
+
export let custominputtextswitch:string = 'false'; // used by playzonbet for switching input field texts and validation for register and player profile widgets: security question, answer, error messages and validation
|
|
55
|
+
export let gmversion:string = '';
|
|
56
|
+
export let producttype:string = '';
|
|
57
|
+
export let successurl:string = '';
|
|
58
|
+
export let failurl:string = '';
|
|
59
|
+
export let cancelurl:string = '';
|
|
60
|
+
export let sportsurl:string = '';
|
|
61
|
+
export let casinourl:string = '';
|
|
62
|
+
export let contacturl:string = '';
|
|
63
|
+
export let homeurl:string = '';
|
|
64
|
+
export let depositurl:string = '';
|
|
65
|
+
export let showcashierbonus:string = '';
|
|
66
|
+
export let biometricsenabled:string = 'false';
|
|
67
|
+
export let activepage:string = '';
|
|
68
|
+
|
|
69
|
+
setupI18n({ withLocale: 'en', translations: {}});
|
|
70
|
+
|
|
71
|
+
let customStylingContainer:HTMLElement;
|
|
72
|
+
let isLoading:boolean = false;
|
|
73
|
+
let userAgent:string = window.navigator.userAgent;
|
|
74
|
+
let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;
|
|
75
|
+
let menuData:any = [];
|
|
76
|
+
let notificationsData:any = [];
|
|
77
|
+
let userId:string = '';
|
|
78
|
+
let sessionId:string = '';
|
|
79
|
+
let countrycode:string = '';
|
|
80
|
+
let playercurrency: string = null;
|
|
81
|
+
// limits variables
|
|
82
|
+
let deviceSegregationValue: string = '';
|
|
83
|
+
let playerlimits: any = {};
|
|
84
|
+
let depositlimit:any;
|
|
85
|
+
let wageringlimit:any;
|
|
86
|
+
let losslimit:any;
|
|
87
|
+
let timelimit:any;
|
|
88
|
+
let showsuccessnotification:boolean = false;
|
|
89
|
+
let showdeletenotification:boolean = false;
|
|
90
|
+
let realityCheckData:any;
|
|
91
|
+
let storedRealityCheck:string = '';
|
|
92
|
+
let errorPasswordChanged:string = '';
|
|
93
|
+
let showErrorPasswordChanged:boolean = false;
|
|
94
|
+
let selected:string;
|
|
95
|
+
let ChangePasswordEvent: CustomEvent;
|
|
96
|
+
let activeMenuItem:string = '/profile-info';
|
|
97
|
+
|
|
98
|
+
const widgetPath = ['/profile-info',
|
|
99
|
+
'/change-password',
|
|
100
|
+
'/reality-check',
|
|
101
|
+
'/timeout',
|
|
102
|
+
'/account-closure',
|
|
103
|
+
'/gaming-limits',
|
|
104
|
+
'/self-exclusion',
|
|
105
|
+
'/active-bonuses',
|
|
106
|
+
'/bonus-history',
|
|
107
|
+
'/gaming-history',
|
|
108
|
+
'/deposit',
|
|
109
|
+
'/withdrawal',
|
|
110
|
+
'/pending-withdrawals',
|
|
111
|
+
'/transaction-history',
|
|
112
|
+
'/betting-history',
|
|
113
|
+
'/limits',
|
|
114
|
+
'/account-verification',
|
|
115
|
+
'/cashier-deposit',
|
|
116
|
+
'/cashier-withdrawal',
|
|
117
|
+
'/transactions-history',
|
|
118
|
+
'/biometrics'];
|
|
119
|
+
|
|
120
|
+
const initialLoad = ():void => {
|
|
121
|
+
setDevice();
|
|
122
|
+
|
|
123
|
+
userId = playerid;
|
|
124
|
+
sessionId = session;
|
|
125
|
+
|
|
126
|
+
getData(); //For now we will let it here until we move all the datas to other widgets
|
|
127
|
+
setActivePage();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const setDevice = ():void => {
|
|
131
|
+
let device = getDevice(userAgent);
|
|
132
|
+
|
|
133
|
+
if (device){
|
|
134
|
+
if (device === 'PC'){
|
|
135
|
+
deviceSegregationValue = 'dk';
|
|
136
|
+
} else if (device === 'iPad' || device === 'iPhone') {
|
|
137
|
+
deviceSegregationValue = 'mtWeb'; // replace with ios when we will have a native ios up for this
|
|
138
|
+
} else {
|
|
139
|
+
deviceSegregationValue = 'mtWeb';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const setActivePage = ():void => {
|
|
145
|
+
if(!activepage && !isMobile) { activepage = widgetPath[0]; }
|
|
146
|
+
|
|
147
|
+
activeMenuItem = activepage;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const setTranslationUrl = ():void => {
|
|
151
|
+
let url:string = translationurl;
|
|
152
|
+
|
|
153
|
+
fetch(url).then((res:any) => res.json())
|
|
154
|
+
.then((res) => {
|
|
155
|
+
Object.keys(res).forEach((item:any):void => {
|
|
156
|
+
addNewMessages(item, res[item]);
|
|
157
|
+
});
|
|
158
|
+
}).catch((err:any) => {
|
|
159
|
+
console.log(err);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
Object.keys(TRANSLATIONS).forEach((item:any) => {
|
|
164
|
+
addNewMessages(item, TRANSLATIONS[item]);
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
const messageHandler = (e:any):void => {
|
|
169
|
+
let url:URL;
|
|
170
|
+
if (e.data) {
|
|
171
|
+
switch(e.data.type) {
|
|
172
|
+
case 'AccountMenuDetails':
|
|
173
|
+
// @TODO open after launch event is triggered from CMS menu
|
|
174
|
+
// @TODO what is dis?
|
|
175
|
+
break;
|
|
176
|
+
|
|
177
|
+
case 'ChangeAccountPage':
|
|
178
|
+
activepage = e.data.page.path;
|
|
179
|
+
|
|
180
|
+
if(activepage == '/profile-info') {
|
|
181
|
+
getUserProfileInfo();
|
|
182
|
+
getUserProfileConsent();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if(activepage == '/deposit'){
|
|
186
|
+
//Analytics event
|
|
187
|
+
if(typeof gtag == 'function'){
|
|
188
|
+
gtag('event', 'GoToDeposit', {
|
|
189
|
+
'context': 'PlayerAccountController'
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if(activepage == '/withdrawal'){
|
|
195
|
+
//Analytics event
|
|
196
|
+
if(typeof gtag == 'function'){
|
|
197
|
+
gtag('event', 'GoToWithdrawal', {
|
|
198
|
+
'context': 'PlayerAccountController'
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
break;
|
|
203
|
+
|
|
204
|
+
case 'PlayerAccountMenuActive':
|
|
205
|
+
case 'GoToPreviousRoute':
|
|
206
|
+
if (e.data.isMobile) {
|
|
207
|
+
activepage = '';
|
|
208
|
+
initialLoad();
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
|
|
212
|
+
case 'UpdatePlayerInfo':
|
|
213
|
+
let profileData = e.data.provisionalArray;
|
|
214
|
+
let sentData = {
|
|
215
|
+
mobile: {
|
|
216
|
+
prefix: profileData.mobilePrefix,
|
|
217
|
+
number: profileData.mobileNumber
|
|
218
|
+
},
|
|
219
|
+
address1: profileData.address,
|
|
220
|
+
city: profileData.city,
|
|
221
|
+
postalCode: profileData.postalCode,
|
|
222
|
+
securityQuestion: profileData.securityQuestion,
|
|
223
|
+
securityAnswer: profileData.securityAnswer,
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
url = new URL(`${endpoint}/v1/player/${userId}/profile`);
|
|
227
|
+
|
|
228
|
+
let options = {
|
|
229
|
+
method: "POST",
|
|
230
|
+
headers: {
|
|
231
|
+
'X-SessionID': sessionId,
|
|
232
|
+
'Content-Type': "application/json",
|
|
233
|
+
'Accept': 'application/json',
|
|
234
|
+
},
|
|
235
|
+
body: JSON.stringify(sentData)
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
fetch(url.href, options)
|
|
239
|
+
.then((res:any) => {
|
|
240
|
+
if (res.status == 200) {
|
|
241
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
242
|
+
type: 'success',
|
|
243
|
+
message: $_('profileUpdateSuccess')
|
|
244
|
+
}}, window.location.href);
|
|
245
|
+
window.postMessage({ type: 'ConfirmProfileInfoSave' }, window.location.href);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
break;
|
|
249
|
+
|
|
250
|
+
case 'UpdatePlayerConsent':
|
|
251
|
+
url = new URL(`${endpoint}/v1/player/${userId}/consent`);
|
|
252
|
+
|
|
253
|
+
let optionsConsent = {
|
|
254
|
+
method: "POST",
|
|
255
|
+
headers: {
|
|
256
|
+
'X-SessionID': sessionId,
|
|
257
|
+
'Content-Type': "application/json",
|
|
258
|
+
'Accept': 'application/json',
|
|
259
|
+
},
|
|
260
|
+
body: JSON.stringify(e.data.consentArray)
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
fetch(url.href, optionsConsent)
|
|
264
|
+
.then((res:any) => {
|
|
265
|
+
if (res.status == 200) {
|
|
266
|
+
window.postMessage({ type: 'ConfirmProfileInfoSave' }, window.location.href);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
break;
|
|
270
|
+
|
|
271
|
+
case 'ChangePassword':
|
|
272
|
+
sendChangePassword(e.data.userCurrentPassword, e.data.userNewPassword);
|
|
273
|
+
break;
|
|
274
|
+
|
|
275
|
+
case 'SetPlayerAccountTimeout':
|
|
276
|
+
url = new URL(`/v2/player/${userId}/limits${gmversion === 'gm16' ? '/session' : ''}`, endpoint);
|
|
277
|
+
|
|
278
|
+
let timeoutValue = e.data.timeoutSelected;
|
|
279
|
+
|
|
280
|
+
let dataTimeout = {
|
|
281
|
+
coolOff: {
|
|
282
|
+
period: timeoutValue
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
let setTimeout = {
|
|
286
|
+
method: "PUT",
|
|
287
|
+
headers: {
|
|
288
|
+
'X-SessionID': sessionId,
|
|
289
|
+
'Content-Type': "application/json",
|
|
290
|
+
'Accept': 'application/json',
|
|
291
|
+
},
|
|
292
|
+
body: JSON.stringify(dataTimeout)
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
fetch(url.href, setTimeout)
|
|
296
|
+
.then((res:any) => {
|
|
297
|
+
if (res.status == 200) {
|
|
298
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
299
|
+
type: 'success',
|
|
300
|
+
message: $_('timeoutSuccess')
|
|
301
|
+
}}, window.location.href);
|
|
302
|
+
window.postMessage({ type: 'LogoutSuccessfull' }, window.location.href);
|
|
303
|
+
} else {
|
|
304
|
+
throw new Error('Failed to fetch')
|
|
305
|
+
}
|
|
306
|
+
}).catch((err) => console.error(err))
|
|
307
|
+
break;
|
|
308
|
+
|
|
309
|
+
case 'SetSelfExclusion':
|
|
310
|
+
url = new URL(`/v2/player/${userId}/limits${gmversion === 'gm16' ? '/session' : ''}`, endpoint);
|
|
311
|
+
|
|
312
|
+
let selfExclusionPeriod = e.data.selfExclusionPeriod;
|
|
313
|
+
let selfExclusionExpiryDate = e.data.selfExclusionExpiryDate;
|
|
314
|
+
|
|
315
|
+
let dataSelfExclusion = {
|
|
316
|
+
selfExclusion: {
|
|
317
|
+
period: selfExclusionPeriod,
|
|
318
|
+
expiryDate: selfExclusionExpiryDate,
|
|
319
|
+
selfExclusionReason: 'UserRequest',
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
let setSelfExclusion = {
|
|
323
|
+
method: "PUT",
|
|
324
|
+
headers: {
|
|
325
|
+
'X-SessionID': sessionId,
|
|
326
|
+
'Content-Type': "application/json",
|
|
327
|
+
'Accept': 'application/json',
|
|
328
|
+
},
|
|
329
|
+
body: JSON.stringify(dataSelfExclusion)
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
fetch(url.href, setSelfExclusion)
|
|
333
|
+
.then((res:any):void => {
|
|
334
|
+
if (res.status == 200) {
|
|
335
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
336
|
+
type: 'success',
|
|
337
|
+
message: $_('selfExclusionSuccess')
|
|
338
|
+
}}, window.location.href);
|
|
339
|
+
window.postMessage({ type: 'LogoutSuccessfull'}, window.location.href);
|
|
340
|
+
} else {
|
|
341
|
+
// ERROR
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
break;
|
|
345
|
+
|
|
346
|
+
case 'AccountClosure':
|
|
347
|
+
url = new URL(`/v2/player/${userId}/limits${gmversion === 'gm16' ? '/session' : ''}`, endpoint)
|
|
348
|
+
|
|
349
|
+
let accountClosureData = 'UserRequest';
|
|
350
|
+
let accountClosureSelection = {
|
|
351
|
+
selfExclusion: {
|
|
352
|
+
period: "SelfExclusionPermanent",
|
|
353
|
+
sendNotificationEmail: true,
|
|
354
|
+
selfExclusionReason: accountClosureData
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
let optionsAccountClosure = {
|
|
359
|
+
method: "PUT",
|
|
360
|
+
headers: {
|
|
361
|
+
'X-SessionID': sessionId,
|
|
362
|
+
'Content-Type': "application/json",
|
|
363
|
+
'Accept': 'application/json',
|
|
364
|
+
},
|
|
365
|
+
body: JSON.stringify(accountClosureSelection)
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
fetch(url.href, optionsAccountClosure)
|
|
369
|
+
.then((res:any):void => {
|
|
370
|
+
if (res.status == 200) {
|
|
371
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
372
|
+
type: 'success',
|
|
373
|
+
message: $_('accountClosureSuccess')
|
|
374
|
+
}}, window.location.href);
|
|
375
|
+
window.postMessage({ type: 'LogoutSuccessfull'}, window.location.href);
|
|
376
|
+
} else {
|
|
377
|
+
// ERROR
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
break;
|
|
381
|
+
|
|
382
|
+
case 'UserSessionID':
|
|
383
|
+
sessionId = e.data.session;
|
|
384
|
+
userId = e.data.userid;
|
|
385
|
+
|
|
386
|
+
getData();
|
|
387
|
+
break;
|
|
388
|
+
|
|
389
|
+
case 'PlayerAccountGamingLimitsUpdate':
|
|
390
|
+
url = new URL(`/v2/player/${userId}/limits`, endpoint);
|
|
391
|
+
|
|
392
|
+
let limitsData = e.data.payload;
|
|
393
|
+
let optionsEditLimits = {
|
|
394
|
+
method: "PUT",
|
|
395
|
+
headers: {
|
|
396
|
+
'X-SessionID': sessionId,
|
|
397
|
+
'Content-Type': "application/json",
|
|
398
|
+
'Accept': 'application/json',
|
|
399
|
+
},
|
|
400
|
+
body: JSON.stringify(limitsData)
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
fetch(url.href, optionsEditLimits)
|
|
404
|
+
.then((res:any):void => {
|
|
405
|
+
if (res.status == 200) {
|
|
406
|
+
showsuccessnotification = true;
|
|
407
|
+
|
|
408
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
409
|
+
type: 'success',
|
|
410
|
+
message: $_('limitsUpdateSuccess')
|
|
411
|
+
}}, window.location.href);
|
|
412
|
+
getGamingLimits(new URL(`/v2/player/${userId}/limits`, endpoint));
|
|
413
|
+
} else {
|
|
414
|
+
// ERROR
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
break;
|
|
418
|
+
|
|
419
|
+
case 'PlayerAccountGamingLimitDelete':
|
|
420
|
+
let limitsDeleteData:any = e.data.limit ? e.data.limit : {};
|
|
421
|
+
let deletedPeriodLimit:any;
|
|
422
|
+
|
|
423
|
+
if (Array.isArray(limitsDeleteData)) {
|
|
424
|
+
deletedPeriodLimit = limitsDeleteData.map((item) => item.period);
|
|
425
|
+
} else {
|
|
426
|
+
deletedPeriodLimit = limitsDeleteData.period;
|
|
427
|
+
}
|
|
428
|
+
let limitsCategoryTitle = e.data.name;
|
|
429
|
+
let limitName:string = '';
|
|
430
|
+
|
|
431
|
+
switch (limitsCategoryTitle) {
|
|
432
|
+
case 'depositLimits':
|
|
433
|
+
limitName = 'deposit';
|
|
434
|
+
break;
|
|
435
|
+
|
|
436
|
+
case 'cumulativeSessionLimits':
|
|
437
|
+
limitName = 'cumulativeSession';
|
|
438
|
+
break;
|
|
439
|
+
|
|
440
|
+
case 'wageringLimit':
|
|
441
|
+
limitName = 'wagering';
|
|
442
|
+
break;
|
|
443
|
+
|
|
444
|
+
case 'lossLimit':
|
|
445
|
+
limitName = 'loss';
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
let deleteOptions = {
|
|
450
|
+
method: "DELETE",
|
|
451
|
+
headers: {
|
|
452
|
+
'X-SessionID': sessionId,
|
|
453
|
+
},
|
|
454
|
+
body: JSON.stringify(limitsDeleteData)
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
url = new URL(`/v2/player/${userId}/limits/${limitName}`, endpoint)
|
|
458
|
+
|
|
459
|
+
//if single limit send string
|
|
460
|
+
if (Array.isArray(deletedPeriodLimit)) {
|
|
461
|
+
deletedPeriodLimit.forEach((item) => {
|
|
462
|
+
url.searchParams.append('periods', item);
|
|
463
|
+
});
|
|
464
|
+
} else {
|
|
465
|
+
url.searchParams.append('periods', deletedPeriodLimit);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
fetch(url.href, deleteOptions)
|
|
469
|
+
.then((res:any):void => {
|
|
470
|
+
if (res.status == 200) {
|
|
471
|
+
showdeletenotification = true;
|
|
472
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
473
|
+
type: 'success',
|
|
474
|
+
message: $_('limitsDeleteSuccess')
|
|
475
|
+
}}, window.location.href);
|
|
476
|
+
} else {
|
|
477
|
+
// ERROR
|
|
478
|
+
}
|
|
479
|
+
}).then((res:any):void => {
|
|
480
|
+
getGamingLimits(new URL(`/v2/player/${userId}/limits`, endpoint));
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
break;
|
|
485
|
+
|
|
486
|
+
case 'GamingLimitsConfirmChanges':
|
|
487
|
+
getGamingLimits(new URL(`/v2/player/${userId}/limits`, endpoint));
|
|
488
|
+
break;
|
|
489
|
+
|
|
490
|
+
case 'CancelGamingLimitsChanges':
|
|
491
|
+
getGamingLimits(new URL(`/v2/player/${userId}/limits`, endpoint));
|
|
492
|
+
break;
|
|
493
|
+
|
|
494
|
+
case 'SubmittedRealityCheck':
|
|
495
|
+
setRealityCheckValue(e.data.realityCheckUpdatedValue);
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
const getNotificationsDetails = (url:URL):void => {
|
|
502
|
+
|
|
503
|
+
url.searchParams.append('userRoles', userroles);
|
|
504
|
+
url.searchParams.append('device', deviceSegregationValue)
|
|
505
|
+
|
|
506
|
+
fetch(url.href)
|
|
507
|
+
.then((res:any) => res.json())
|
|
508
|
+
.then((data:any):void => {
|
|
509
|
+
if(data.length) {
|
|
510
|
+
notificationsData = data[0].children;
|
|
511
|
+
window.postMessage({ type: 'NotificationsDetails', notificationsInfo: notificationsData }, window.location.href);
|
|
512
|
+
}
|
|
513
|
+
}, (err:any):void => {
|
|
514
|
+
console.error(err);
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
const getUserProfileInfo = ():void => {
|
|
519
|
+
let url:URL = new URL(`${endpoint}/v1/player/${userId}/profile`);
|
|
520
|
+
let options = {
|
|
521
|
+
method: "GET",
|
|
522
|
+
headers: {
|
|
523
|
+
'X-SessionID': sessionId,
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
fetch(url.href, options)
|
|
528
|
+
.then((res:any) => { return res.json(); })
|
|
529
|
+
.then((data:any) => {
|
|
530
|
+
countrycode = data.country;
|
|
531
|
+
playercurrency = data.currency;
|
|
532
|
+
|
|
533
|
+
window.postMessage({ type: 'ProfileDetailsData', profileDetails: data }, window.location.href);
|
|
534
|
+
}, (err:any) => {
|
|
535
|
+
console.error(err);
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const getUserProfileConsent = ():void => {
|
|
540
|
+
let url:URL = new URL(`${endpoint}/v1/player/${userId}/consent`);
|
|
541
|
+
let options = {
|
|
542
|
+
method: "GET",
|
|
543
|
+
headers: {
|
|
544
|
+
'X-SessionID': sessionId,
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
fetch(url.href, options)
|
|
549
|
+
.then((res:any) => { return res.json(); })
|
|
550
|
+
.then((data:any) => {
|
|
551
|
+
window.postMessage({ type: 'ProfileConsentData', consent: data }, window.location.href);
|
|
552
|
+
}, (err:any) => {
|
|
553
|
+
console.error(err);
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
const sendChangePassword = async (playerCurrentPassword:string, playerNewPassword:string) => {
|
|
558
|
+
let url:URL = new URL(`${endpoint}/v1/player/${userId}/password`)
|
|
559
|
+
let data = {
|
|
560
|
+
currentPassword: playerCurrentPassword,
|
|
561
|
+
newPassword: playerNewPassword
|
|
562
|
+
};
|
|
563
|
+
let optionsChangePassword = {
|
|
564
|
+
method: "POST",
|
|
565
|
+
headers: {
|
|
566
|
+
'X-SessionID': sessionId,
|
|
567
|
+
'Content-Type': "application/json",
|
|
568
|
+
'Accept': 'application/json',
|
|
569
|
+
},
|
|
570
|
+
body: JSON.stringify(data)
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
let response:any = await fetch(url.href, optionsChangePassword);
|
|
574
|
+
|
|
575
|
+
if (response.ok) {
|
|
576
|
+
window.postMessage({ type: 'PasswordChangedSuccessfully' }, window.location.href);
|
|
577
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
578
|
+
type: 'success',
|
|
579
|
+
message: $_('passwordChangedSuccess')
|
|
580
|
+
}}, window.location.href);
|
|
581
|
+
|
|
582
|
+
ChangePasswordEvent = new CustomEvent('ChangePassword', { detail: { userPassword: data.newPassword }});
|
|
583
|
+
window.dispatchEvent(ChangePasswordEvent);
|
|
584
|
+
|
|
585
|
+
} else {
|
|
586
|
+
let dataResponse:any = await response.json();
|
|
587
|
+
// Parsing GMCore message 'cuz it's stupid and it doesn't know how to send error messages in 2021 ffs
|
|
588
|
+
errorPasswordChanged = dataResponse.error.substring(dataResponse.error.indexOf('errorMessage') + 13, dataResponse.error.length);
|
|
589
|
+
showErrorPasswordChanged = true;
|
|
590
|
+
window.postMessage({ type: "ShowPasswordChangedError", showErrorPasswordChanged, errorPasswordChanged }, window.location.href);
|
|
591
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
592
|
+
type: 'error',
|
|
593
|
+
message: errorPasswordChanged
|
|
594
|
+
}}, window.location.href);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
const getRealityCheckData = (url:URL):void => {
|
|
599
|
+
let options = {
|
|
600
|
+
method: 'GET',
|
|
601
|
+
headers: {
|
|
602
|
+
'X-SessionID': sessionId,
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
fetch(url.href, options)
|
|
606
|
+
.then((res:any) => { return res.json(); })
|
|
607
|
+
.then((data:any) => {
|
|
608
|
+
realityCheckData = data.UserRealityCheckValue;
|
|
609
|
+
}, (err:any) => {
|
|
610
|
+
console.error(err);
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
const setRealityCheckValue = (updatedData:string):void => {
|
|
615
|
+
let url:URL = new URL(`${endpoint}/v1/player/${userId}/realitycheck`);
|
|
616
|
+
|
|
617
|
+
if (updatedData) {
|
|
618
|
+
storedRealityCheck = updatedData;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
let optionsRealityCheck = {
|
|
622
|
+
method: "POST",
|
|
623
|
+
headers: {
|
|
624
|
+
'X-SessionID': sessionId,
|
|
625
|
+
'Content-Type': "application/json",
|
|
626
|
+
'Accept': 'application/json',
|
|
627
|
+
'realityCheckValue': parseInt(storedRealityCheck, 10)
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
fetch(url.href, optionsRealityCheck)
|
|
632
|
+
.then((res:any) => {
|
|
633
|
+
if (res.status == 200) {
|
|
634
|
+
getRealityCheckData(new URL(`${endpoint}/v1/player/${playerid}/realitycheck`));
|
|
635
|
+
window.postMessage({ type: 'RealityCheckValueUpdated' }, window.location.href);
|
|
636
|
+
window.postMessage({ type: 'WidgetNotification', data: {
|
|
637
|
+
type: 'success',
|
|
638
|
+
message: $_('realityCheckSuccess')
|
|
639
|
+
}}, window.location.href);
|
|
640
|
+
}
|
|
641
|
+
}, (err:any) => {
|
|
642
|
+
console.error(err);
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
const getGamingLimits = (url:URL):void => {
|
|
647
|
+
if (showsuccessnotification === true) {
|
|
648
|
+
setTimeout(() => {showsuccessnotification = false; }, 3000);
|
|
649
|
+
} else if(showdeletenotification === true) {
|
|
650
|
+
setTimeout(() => {showdeletenotification = false; }, 3000);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
let options = {
|
|
654
|
+
method: "GET",
|
|
655
|
+
headers: {
|
|
656
|
+
'X-SessionID': sessionId,
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
fetch(url.href, options)
|
|
661
|
+
.then((res:any) => res.json())
|
|
662
|
+
.then((data:any):void => {
|
|
663
|
+
playerlimits = data;
|
|
664
|
+
// add name property for info boxes
|
|
665
|
+
if (Object.keys(playerlimits).length !== 0) {
|
|
666
|
+
depositlimit = playerlimits.depositLimits ?? [];
|
|
667
|
+
wageringlimit = playerlimits.wageringLimits ?? [];
|
|
668
|
+
losslimit = playerlimits.lossLimits ?? [];
|
|
669
|
+
|
|
670
|
+
if (playerlimits.hasOwnProperty('cumulativeSessionLimits')) {
|
|
671
|
+
timelimit = playerlimits.timeLimit;
|
|
672
|
+
timelimit = playerlimits.cumulativeSessionLimits.map((item) => {
|
|
673
|
+
item.amount = item.minutes;
|
|
674
|
+
return item;
|
|
675
|
+
});
|
|
676
|
+
} else {
|
|
677
|
+
timelimit = [];
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
window.postMessage({ type: 'PlayerLimitsData', limits: {
|
|
681
|
+
playercurrency,
|
|
682
|
+
depositlimit,
|
|
683
|
+
wageringlimit,
|
|
684
|
+
losslimit,
|
|
685
|
+
timelimit,
|
|
686
|
+
showsuccessnotification,
|
|
687
|
+
showdeletenotification,
|
|
688
|
+
lang,
|
|
689
|
+
}}, window.location.href);
|
|
690
|
+
|
|
691
|
+
} else {
|
|
692
|
+
depositlimit = [];
|
|
693
|
+
wageringlimit = [];
|
|
694
|
+
losslimit = [];
|
|
695
|
+
timelimit = [];
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
tick();
|
|
699
|
+
}, (err:any) => {
|
|
700
|
+
console.error(err);
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
const getData = ():void => {
|
|
705
|
+
getNotificationsDetails(new URL(`${cmsendpoint}/${lang}/support-information?env=${env}`));
|
|
706
|
+
getUserProfileInfo();
|
|
707
|
+
getUserProfileConsent();
|
|
708
|
+
getRealityCheckData(new URL(`${endpoint}/v1/player/${playerid}/realitycheck`));
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
const setActiveLanguage = ():void => {
|
|
712
|
+
setLocale(lang);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
const sendLimitsData = (e:any):void => {
|
|
716
|
+
getGamingLimits(new URL(`/v2/player/${userId}/limits`, endpoint));
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
const setClientStyling = ():void => {
|
|
720
|
+
let sheet = document.createElement('style');
|
|
721
|
+
sheet.innerHTML = clientstyling;
|
|
722
|
+
customStylingContainer.appendChild(sheet);
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
const setClientStylingURL = ():void => {
|
|
726
|
+
let url:URL = new URL(clientstylingurl);
|
|
727
|
+
let cssFile:HTMLElement = document.createElement('style');
|
|
728
|
+
|
|
729
|
+
fetch(url.href)
|
|
730
|
+
.then((res:any) => res.text())
|
|
731
|
+
.then((data:any) => {
|
|
732
|
+
cssFile.innerHTML = data
|
|
733
|
+
|
|
734
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
onMount(() => {
|
|
739
|
+
window.addEventListener('message', messageHandler, false);
|
|
740
|
+
|
|
741
|
+
return () => {
|
|
742
|
+
window.removeEventListener('message', messageHandler);
|
|
743
|
+
}
|
|
744
|
+
});
|
|
745
|
+
|
|
746
|
+
$: lang && setActiveLanguage();
|
|
747
|
+
$: cmsendpoint && endpoint && customnotifications && playerid && session && lang && env && userroles && initialLoad();
|
|
748
|
+
$: depositlimit && wageringlimit && losslimit && timelimit;
|
|
749
|
+
$: clientstyling && customStylingContainer && setClientStyling();
|
|
750
|
+
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
751
|
+
$: translationurl && setTranslationUrl();
|
|
752
|
+
$: activepage && setActivePage();
|
|
753
|
+
</script>
|
|
754
|
+
|
|
755
|
+
<svelte:head>
|
|
756
|
+
<script type="module" src="https://unpkg.com/@everymatrix/user-deposit-withdrawal"></script>
|
|
757
|
+
<script type="module" src="https://unpkg.com/@everymatrix/player-kyc-verification"></script>
|
|
758
|
+
<script type="module" src="https://unpkg.com/@everymatrix/user-transaction-history"></script>
|
|
759
|
+
</svelte:head>
|
|
760
|
+
|
|
761
|
+
<div bind:this={customStylingContainer}>
|
|
762
|
+
|
|
763
|
+
{#if isLoading}
|
|
764
|
+
<div class="ModalLoader"></div>
|
|
765
|
+
{:else}
|
|
766
|
+
<section class="PlayerAccountPage {isMobile ? 'PlayerAccountMobilePage' : ''}">
|
|
767
|
+
{#if isMobile}
|
|
768
|
+
{#if !activeMenuItem}
|
|
769
|
+
<nav class="PlayerAccountMobile">
|
|
770
|
+
<player-account-menu {endpoint} {session} {playerid} {lang} {translationurl} {userroles} {clientstyling} {clientstylingurl}></player-account-menu>
|
|
771
|
+
<player-account-notifications customnotif={customnotifications} {translationurl} {clientstyling} {clientstylingurl}></player-account-notifications>
|
|
772
|
+
</nav>
|
|
773
|
+
{:else}
|
|
774
|
+
{#if activeMenuItem === widgetPath[0]}
|
|
775
|
+
<player-profile-info {endpoint} {lang} {countrycode} {translationurl} {clientstyling} {clientstylingurl} {custominputtextswitch}></player-profile-info>
|
|
776
|
+
{:else if activeMenuItem === widgetPath[1]}
|
|
777
|
+
<player-change-password {simplepasswordvalidation} {translationurl} {lang} {clientstyling} {clientstylingurl}></player-change-password>
|
|
778
|
+
{:else if activeMenuItem === widgetPath[2]}
|
|
779
|
+
<player-reality-check realitycheck={realityCheckData} {endpoint} {translationurl} {playerid} {session} {lang} {clientstyling} {clientstylingurl}></player-reality-check>
|
|
780
|
+
{:else if activeMenuItem === widgetPath[3]}
|
|
781
|
+
<player-account-timeout {lang} {operator} {supportemail} {translationurl} {clientstyling} {clientstylingurl}></player-account-timeout>
|
|
782
|
+
{:else if activeMenuItem === widgetPath[4]}
|
|
783
|
+
<player-account-closure {lang} {clientstyling} {clientstylingurl} {translationurl}></player-account-closure>
|
|
784
|
+
{:else if activeMenuItem === widgetPath[5]}
|
|
785
|
+
<player-account-gaming-limits use:sendLimitsData {playercurrency} {separatelimits} {translationurl} {clientstyling} {clientstylingurl}></player-account-gaming-limits>
|
|
786
|
+
{:else if activeMenuItem === widgetPath[6]}
|
|
787
|
+
<player-account-self-exclusion {lang} {operator} {supportemail} {clientstyling} {clientstylingurl} {translationurl}></player-account-self-exclusion>
|
|
788
|
+
{:else if activeMenuItem === widgetPath[7]}
|
|
789
|
+
<player-active-bonuses {endpoint} {session} {playerid} {lang} {translationurl} {playercurrency} {clientstyling} {clientstylingurl}></player-active-bonuses>
|
|
790
|
+
{:else if activeMenuItem === widgetPath[8]}
|
|
791
|
+
<player-bonus-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-bonus-history>
|
|
792
|
+
{:else if activeMenuItem === widgetPath[9]}
|
|
793
|
+
<player-gaming-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl} {gmversion}></player-gaming-history>
|
|
794
|
+
{:else if activeMenuItem === widgetPath[10]}
|
|
795
|
+
<player-deposit {endpoint} {session} {playerid} {lang} {hasdefaultamount} {translationurl} {clientstyling} {clientstylingurl} {playercurrency}></player-deposit>
|
|
796
|
+
{:else if activeMenuItem === widgetPath[11]}
|
|
797
|
+
<player-withdrawal {endpoint} {session} {playerid} {lang} {hasdefaultamount} {translationurl} {clientstyling} {clientstylingurl} {playercurrency}></player-withdrawal>
|
|
798
|
+
{:else if activeMenuItem === widgetPath[12]}
|
|
799
|
+
<player-pending-withdrawals {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-pending-withdrawals>
|
|
800
|
+
{:else if activeMenuItem === widgetPath[13]}
|
|
801
|
+
<player-transaction-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-transaction-history>
|
|
802
|
+
{:else if activeMenuItem === widgetPath[14]}
|
|
803
|
+
<player-account-betting-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-account-betting-history>
|
|
804
|
+
{:else if activeMenuItem === widgetPath[15]}
|
|
805
|
+
<player-account-gaming-limits-wrapper-2 {endpoint} userid={playerid} {session} {lang} {tablabels} {historyenabled} {deletelimit} {limitsamount} {limitsperiods} {numberofentries} {customcurrencysymbols} {currency} {apiversion} {translationurl} {clientstyling} {clientstylingurl}></player-account-gaming-limits-wrapper-2>
|
|
806
|
+
{:else if activeMenuItem === widgetPath[16]}
|
|
807
|
+
<player-kyc-verification {endpoint} {session} user-id={playerid} language={lang} kyc-title={kyctitle} description={kycdescription} translation-url={translationurl} client-styling={clientstyling} client-styling-url={clientstylingurl}></player-kyc-verification>
|
|
808
|
+
{:else if activeMenuItem === widgetPath[17] }
|
|
809
|
+
<user-deposit-withdrawal {endpoint} type="deposit" channel="Mobile" language={lang} {translationurl} {currency} show-bonus-selection-input={showcashierbonus} product-type={producttype} user-id={playerid} {session} success-url={'https://' + window.location.hostname + '/' + lang + successurl} cancel-url={'https://' + window.location.hostname + '/' + lang + cancelurl} fail-url={'https://' + window.location.hostname + '/' + lang + failurl} sports-url={'https://' + window.location.hostname + '/' + lang + sportsurl} casino-url={'https://' + window.location.hostname + '/' + lang + casinourl} contact-url={'https://' + window.location.hostname + '/' + lang + contacturl} home-url={'https://' + window.location.hostname + '/' + lang + homeurl} deposit-url={'https://' + window.location.hostname + '/' + lang + depositurl} client-styling={clientstyling} client-styling-url={clientstylingurl}></user-deposit-withdrawal>
|
|
810
|
+
{:else if activeMenuItem === widgetPath[18] }
|
|
811
|
+
<user-deposit-withdrawal {endpoint} type="withdraw" channel="Mobile" language={lang} {translationurl} {currency} show-bonus-selection-input={showcashierbonus} product-type={producttype} user-id={playerid} {session} success-url={'https://' + window.location.hostname + '/' + lang + successurl} cancel-url={'https://' + window.location.hostname + '/' + lang + cancelurl} fail-url={'https://' + window.location.hostname + '/' + lang + failurl} sports-url={'https://' + window.location.hostname + '/' + lang + sportsurl} casino-url={'https://' + window.location.hostname + '/' + lang + casinourl} contact-url={'https://' + window.location.hostname + '/' + lang + contacturl} home-url={'https://' + window.location.hostname + '/' + lang + homeurl} deposit-url={'https://' + window.location.hostname + '/' + lang + depositurl} client-styling={clientstyling} client-styling-url={clientstylingurl}></user-deposit-withdrawal>
|
|
812
|
+
{:else if activeMenuItem === widgetPath[19] }
|
|
813
|
+
<user-transaction-history endpoint={endpoint} user-id={playerid} session={session} mobile={isMobile} translation-url={translationurl} language={lang}></user-transaction-history>
|
|
814
|
+
{:else if activeMenuItem === widgetPath[20] }
|
|
815
|
+
<player-account-biometrics {biometricsenabled} {lang} {clientstyling} {clientstylingurl} {translationurl}></player-account-biometrics>
|
|
816
|
+
{/if}
|
|
817
|
+
{/if}
|
|
818
|
+
{:else}
|
|
819
|
+
<nav>
|
|
820
|
+
<player-account-menu {endpoint} {session} {playerid} {lang} {env} activemenuitem={activeMenuItem} {cmsendpoint} selecteditem={selected} {userroles} {clientstyling} {clientstylingurl}></player-account-menu>
|
|
821
|
+
</nav>
|
|
822
|
+
<main>
|
|
823
|
+
{#if activeMenuItem === widgetPath[0]}
|
|
824
|
+
<player-profile-info {endpoint} {lang} {countrycode} {translationurl} {clientstyling} {clientstylingurl} {custominputtextswitch}></player-profile-info>
|
|
825
|
+
{:else if activeMenuItem === widgetPath[1]}
|
|
826
|
+
<player-change-password {simplepasswordvalidation}{lang} {translationurl} {clientstyling} {clientstylingurl}></player-change-password>
|
|
827
|
+
{:else if activeMenuItem === widgetPath[2]}
|
|
828
|
+
<player-reality-check realitycheck={realityCheckData} {endpoint} {translationurl} {playerid} {session} {lang} {clientstyling} {clientstylingurl}></player-reality-check>
|
|
829
|
+
{:else if activeMenuItem === widgetPath[3]}
|
|
830
|
+
<player-account-timeout {lang} {operator} {supportemail} {translationurl} {clientstyling} {clientstylingurl}></player-account-timeout>
|
|
831
|
+
{:else if activeMenuItem === widgetPath[4]}
|
|
832
|
+
<player-account-closure {lang} {clientstyling} {translationurl} {clientstylingurl}></player-account-closure>
|
|
833
|
+
{:else if activeMenuItem == widgetPath[5]}
|
|
834
|
+
<player-account-gaming-limits use:sendLimitsData {playercurrency} {translationurl} {separatelimits} {clientstyling} {clientstylingurl}></player-account-gaming-limits>
|
|
835
|
+
{:else if activeMenuItem === widgetPath[6]}
|
|
836
|
+
<player-account-self-exclusion {lang} {operator} {supportemail} {translationurl} {clientstyling} {clientstylingurl}></player-account-self-exclusion>
|
|
837
|
+
{:else if activeMenuItem === widgetPath[7]}
|
|
838
|
+
<player-active-bonuses {endpoint} {session} {playerid} {lang} {translationurl} {playercurrency} {clientstyling} {clientstylingurl}></player-active-bonuses>
|
|
839
|
+
{:else if activeMenuItem === widgetPath[8]}
|
|
840
|
+
<player-bonus-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-bonus-history>
|
|
841
|
+
{:else if activeMenuItem === widgetPath[9]}
|
|
842
|
+
<player-gaming-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl} {gmversion}></player-gaming-history>
|
|
843
|
+
{:else if activeMenuItem === widgetPath[10]}
|
|
844
|
+
<player-deposit {endpoint} {session} {playerid} {lang} {hasdefaultamount} {translationurl} {clientstyling} {clientstylingurl} {playercurrency}></player-deposit>
|
|
845
|
+
{:else if activeMenuItem === widgetPath[11]}
|
|
846
|
+
<player-withdrawal {endpoint} {session} {playerid} {lang} {hasdefaultamount} {translationurl} {clientstyling} {clientstylingurl} {playercurrency}></player-withdrawal>
|
|
847
|
+
{:else if activeMenuItem === widgetPath[12]}
|
|
848
|
+
<player-pending-withdrawals {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-pending-withdrawals>
|
|
849
|
+
{:else if activeMenuItem === widgetPath[13]}
|
|
850
|
+
<player-transaction-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-transaction-history>
|
|
851
|
+
{:else if activeMenuItem === widgetPath[14]}
|
|
852
|
+
<player-account-betting-history {endpoint} {session} {playerid} {lang} {translationurl} {clientstyling} {clientstylingurl}></player-account-betting-history>
|
|
853
|
+
{:else if activeMenuItem === widgetPath[15]}
|
|
854
|
+
<player-account-gaming-limits-wrapper-2 {endpoint} userid={playerid} {session} {tablabels} {lang} {historyenabled} {deletelimit} {limitsamount} {limitsperiods} {numberofentries} {customcurrencysymbols} {currency} {apiversion} {translationurl} {clientstyling} {clientstylingurl}></player-account-gaming-limits-wrapper-2>
|
|
855
|
+
{:else if activeMenuItem === widgetPath[16]}
|
|
856
|
+
<player-kyc-verification {endpoint} {session} user-id={playerid} language={lang} translation-url={translationurl} kyc-title={kyctitle} description={kycdescription} client-styling={clientstyling} client-styling-url={clientstylingurl}></player-kyc-verification>
|
|
857
|
+
{:else if activeMenuItem === widgetPath[17] }
|
|
858
|
+
<user-deposit-withdrawal endpoint={endpoint} type="deposit" channel="Desktop" language={lang} {translationurl} {currency} show-bonus-selection-input={showcashierbonus} product-type={producttype} user-id={playerid} {session} success-url={'https://' + window.location.hostname + '/' + lang + successurl} cancel-url={'https://' + window.location.hostname + '/' + lang + cancelurl} fail-url={'https://' + window.location.hostname + '/' + lang + failurl} sports-url={'https://' + window.location.hostname + '/' + lang + sportsurl} casino-url={'https://' + window.location.hostname + '/' + lang + casinourl} contact-url={'https://' + window.location.hostname + '/' + lang + contacturl} home-url={'https://' + window.location.hostname + '/' + lang + homeurl} deposit-url={'https://' + window.location.hostname + '/' + lang + depositurl} client-styling={clientstyling} client-styling-url={clientstylingurl}></user-deposit-withdrawal>
|
|
859
|
+
{:else if activeMenuItem === widgetPath[18] }
|
|
860
|
+
<user-deposit-withdrawal endpoint={endpoint} type="withdraw" channel="Desktop" language={lang} {translationurl} {currency} show-bonus-selection-input={showcashierbonus} product-type={producttype} user-id={playerid} {session} success-url={'https://' + window.location.hostname + '/' + lang + successurl} cancel-url={'https://' + window.location.hostname + '/' + lang + cancelurl} fail-url={'https://' + window.location.hostname + '/' + lang + failurl} sports-url={'https://' + window.location.hostname + '/' + lang + sportsurl} casino-url={'https://' + window.location.hostname + '/' + lang + casinourl} contact-url={'https://' + window.location.hostname + '/' + lang + contacturl} home-url={'https://' + window.location.hostname + '/' + lang + homeurl} deposit-url={'https://' + window.location.hostname + '/' + lang + depositurl} client-styling={clientstyling} client-styling-url={clientstylingurl}></user-deposit-withdrawal>
|
|
861
|
+
{:else if activeMenuItem === widgetPath[19] }
|
|
862
|
+
<user-transaction-history endpoint={endpoint} user-id={playerid} session={session} mobile={isMobile} translation-url={translationurl} language={lang}></user-transaction-history>
|
|
863
|
+
{/if}
|
|
864
|
+
</main>
|
|
865
|
+
<aside>
|
|
866
|
+
<player-account-notifications customnotif={customnotifications} {translationurl} {clientstyling} {clientstylingurl}></player-account-notifications>
|
|
867
|
+
</aside>
|
|
868
|
+
{/if}
|
|
869
|
+
</section>
|
|
870
|
+
{/if}
|
|
871
|
+
</div>
|
|
872
|
+
|
|
873
|
+
<style lang="scss">
|
|
874
|
+
*, *::before, *::after, body {
|
|
875
|
+
margin: 0;
|
|
876
|
+
padding: 0;
|
|
877
|
+
box-sizing: border-box;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.PlayerAccountPage {
|
|
881
|
+
display: grid;
|
|
882
|
+
gap: 10px;
|
|
883
|
+
width: 100%;
|
|
884
|
+
grid-template-areas: "nav main aside";
|
|
885
|
+
grid-template-rows: auto;
|
|
886
|
+
grid-template-columns: 300px 1fr 300px;
|
|
887
|
+
background: var(--emfe-w-pam-color-bg, var(--emfe-w-color-gray-50, #F9F8F8));
|
|
888
|
+
// padding-right: 30px;
|
|
889
|
+
&.PlayerAccountMobilePage {
|
|
890
|
+
display: block;
|
|
891
|
+
background: linear-gradient(to right, var(--emw--color-primary-variant, #184026), var(--emw--color-secondary-variant, #013E5C));
|
|
892
|
+
padding-right: 0px;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
.PlayerAccountPage > nav {
|
|
896
|
+
grid-area: nav;
|
|
897
|
+
background: linear-gradient(to right, var(--emw--color-primary-variant, #184026), var(--emw--color-secondary-variant, #013E5C));
|
|
898
|
+
// border: 5px solid transparent;
|
|
899
|
+
box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.3);
|
|
900
|
+
background-clip: padding-box;
|
|
901
|
+
border-radius: var(--emw--border-radius-medium, 20px);
|
|
902
|
+
&.PlayerAccountMobile {
|
|
903
|
+
background: linear-gradient(to right, var(--emw--color-primary-variant, #184026), var(--emw--color-secondary-variant, #013E5C));
|
|
904
|
+
color: var(--emfe-w-pam-typography-color-nav-bg, var(--emfe-w-color-contrast, #FFFFFF));
|
|
905
|
+
border-radius: 0px;
|
|
906
|
+
padding: 0;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
.PlayerAccountPage > main {
|
|
910
|
+
grid-area: main;
|
|
911
|
+
}
|
|
912
|
+
.PlayerAccountPage > aside {
|
|
913
|
+
grid-area: aside;
|
|
914
|
+
background: linear-gradient(to bottom, var(--emw--color-primary-variant, #184026), var(--emw--color-aside-pam-variant, #453D68));
|
|
915
|
+
border-radius: var(--emw--border-radius-medium, 20px);
|
|
916
|
+
padding: 15px;
|
|
917
|
+
}
|
|
918
|
+
</style>
|
|
919
|
+
|