@everymatrix/player-account-controller 0.0.234 → 0.0.238

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/index.html CHANGED
@@ -33,10 +33,10 @@
33
33
  <player-account-controller
34
34
  endpoint="https://demo-api.stage.norway.everymatrix.com/v1"
35
35
  cmsendpoint="https://wt1-stage.everymatrix.com/apijson"
36
- playerid="3976988"
37
- session="9f7275ee-5b16-40ba-b847-cfb7a14399c2"
36
+ playerid="3856617"
37
+ session="c053558b-da3f-4ef7-9a7d-50356995089e"
38
38
  customnotifications="#58586B,#2687F6,#D0046C"
39
- lang="en"
39
+ lang="ro"
40
40
  env="stage"
41
41
  ></player-account-controller>
42
42
  <!--<player-account-controller cmsendpoint="https://wp-one-widgets.everymatrix.com/wp-json/wpone-rest/v1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-controller",
3
- "version": "0.0.234",
3
+ "version": "0.0.238",
4
4
  "main": "dist/player-account-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -29,8 +29,8 @@
29
29
  "typescript": "^3.9.3"
30
30
  },
31
31
  "dependencies": {
32
- "@everymatrix/player-account-menu": "^0.0.234",
33
- "@everymatrix/player-account-notifications": "^0.0.234",
32
+ "@everymatrix/player-account-menu": "^0.0.238",
33
+ "@everymatrix/player-account-notifications": "^0.0.238",
34
34
  "cross-env": "^7.0.3",
35
35
  "sirv-cli": "^1.0.0",
36
36
  "svelte": "^3.0.0"
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "08eaa0b19a750324f294289553e7952903b5e82b"
41
+ "gitHead": "907a7c1dc6fa627973d37efccc906630b14f646a"
42
42
  }
@@ -55,6 +55,7 @@
55
55
  let storedRealityCheck:string = '';
56
56
  let errorPasswordChanged:string = '';
57
57
  let showErrorPasswordChanged:boolean = false;
58
+ let selected:string;
58
59
 
59
60
  const widgetTitle = ['Profile Info',
60
61
  'Change password',
@@ -70,27 +71,50 @@
70
71
  'Withdrawal',
71
72
  'Pending Withdrawals',
72
73
  'Transaction History'];
74
+ const widgetPath = ['/profile-info',
75
+ '/change-password',
76
+ '/reality-check',
77
+ '/timeout',
78
+ '/account-closure',
79
+ '/gaming-limits',
80
+ '/self-exclusion',
81
+ '/active-bonuses',
82
+ '/bonus-history',
83
+ '/gaming-history',
84
+ '/deposit',
85
+ '/withdrawal',
86
+ '/pending-withdrawals',
87
+ '/transaction-history'];
73
88
  const accountMenuEndpointURL:string = `${cmsendpoint}/${lang}/profile-menu?env=${env}`;
74
89
  const notificationsEndpointURL:string = `${cmsendpoint}/${lang}/support-information?env=${env}`;
75
90
 
76
91
  let switchContent:boolean = false;
77
92
 
78
- const messageHandler = (e:any) => {
93
+ const messageHandler = (e:any):void => {
94
+ let url:URL;
95
+
79
96
  if (e.data) {
80
97
  switch(e.data.type) {
81
98
  case 'AccountMenuDetails':
82
99
  // @TODO open after launch event is triggered from CMS menu
83
- break;
100
+ // @TODO what is dis?
101
+ break;
84
102
 
85
103
  case 'ChangeAccountPage':
86
104
  switchContent = true;
87
- pageName = e.data.page.label;
105
+ pageName = e.data.page.path;
88
106
  getUserProfileInfo();
89
107
  break;
90
108
 
91
109
  case 'SetActivePage':
92
110
  switchContent = true;
93
111
  pageName = e.data.pageName;
112
+
113
+ let aux:any = menuData.filter((item) => {
114
+ return item.label == pageName;
115
+ });
116
+
117
+ selected = aux[0].id;
94
118
  getUserProfileInfo();
95
119
  break;
96
120
 
@@ -102,20 +126,23 @@
102
126
  case 'UpdatePlayerInfo':
103
127
  let profileData = e.data.provisionalArray;
104
128
  let sentData = {
105
- mobile: {
106
- prefix: profileData.mobilePrefix,
107
- number: profileData.mobileNumber
108
- },
109
- address1: profileData.address,
110
- city: profileData.city,
111
- postalCode: profileData.postalCode,
112
- securityQuestion: profileData.securityQuestion,
113
- securityAnswer: profileData.securityAnswer,
114
- consents: {
115
- acceptNewsEmail: profileData.acceptNewsEmail,
116
- acceptSMSOffers: profileData.acceptSMSOffers
117
- }
118
- }
129
+ mobile: {
130
+ prefix: profileData.mobilePrefix,
131
+ number: profileData.mobileNumber
132
+ },
133
+ address1: profileData.address,
134
+ city: profileData.city,
135
+ postalCode: profileData.postalCode,
136
+ securityQuestion: profileData.securityQuestion,
137
+ securityAnswer: profileData.securityAnswer,
138
+ consents: {
139
+ acceptNewsEmail: profileData.acceptNewsEmail,
140
+ acceptSMSOffers: profileData.acceptSMSOffers
141
+ }
142
+ };
143
+
144
+ url = new URL(`${endpoint}/player/${userId}/profile`);
145
+
119
146
  let options = {
120
147
  method: "POST",
121
148
  headers: {
@@ -126,9 +153,13 @@
126
153
  body: JSON.stringify(sentData)
127
154
  };
128
155
 
129
- fetch(`${endpoint}/player/${userId}/profile`, options)
156
+ fetch(url.href, options)
130
157
  .then((res:any) => {
131
158
  if (res.status == 200) {
159
+ window.postMessage({ type: 'WidgetNotification', data: {
160
+ type: 'success',
161
+ message: 'Profile updated!'
162
+ }}, window.location.href);
132
163
  window.postMessage({ type: 'ConfirmProfileInfoSave' }, window.location.href);
133
164
  }
134
165
  });
@@ -139,6 +170,7 @@
139
170
  break;
140
171
 
141
172
  case 'SetPlayerAccountTimeout':
173
+ url = new URL(`${endpoint}/player/${userId}/limits`);
142
174
  let timeoutValue = e.data.timeoutSelected;
143
175
 
144
176
  let dataTimeout = {
@@ -157,10 +189,14 @@
157
189
  body: JSON.stringify(dataTimeout)
158
190
  };
159
191
 
160
- fetch(`${endpoint}/player/${userId}/limits`, setTimeout)
192
+ fetch(url.href, setTimeout)
161
193
  .then((res:any) => {
162
194
  if (res.status == 200) {
163
- window.postMessage({ type: 'LogoutSuccessfull'}, window.location.href);
195
+ window.postMessage({ type: 'WidgetNotification', data: {
196
+ type: 'success',
197
+ message: 'Timeout active'
198
+ }}, window.location.href);
199
+ window.postMessage({ type: 'LogoutSuccessfull' }, window.location.href);
164
200
  } else {
165
201
  // ERROR
166
202
  }
@@ -168,6 +204,8 @@
168
204
  break;
169
205
 
170
206
  case 'SetSelfExclusion':
207
+ url = new URL(`${endpoint}/player/${userId}/limits`);
208
+
171
209
  let selfExclusionPeriod = e.data.selfExclusionPeriod;
172
210
  let selfExclusionExpiryDate = e.data.selfExclusionExpiryDate;
173
211
 
@@ -189,17 +227,23 @@
189
227
  body: JSON.stringify(dataSelfExclusion)
190
228
  };
191
229
 
192
- fetch(`${endpoint}/player/${userId}/limits`, setSelfExclusion)
193
- .then((res:any) => {
194
- if (res.status == 200) {
195
- window.postMessage({ type: 'LogoutSuccessfull'}, window.location.href);
196
- } else {
197
- // ERROR
198
- }
199
- });
230
+ fetch(url.href, setSelfExclusion)
231
+ .then((res:any):void => {
232
+ if (res.status == 200) {
233
+ window.postMessage({ type: 'WidgetNotification', data: {
234
+ type: 'success',
235
+ message: 'Self exclusion active'
236
+ }}, window.location.href);
237
+ window.postMessage({ type: 'LogoutSuccessfull'}, window.location.href);
238
+ } else {
239
+ // ERROR
240
+ }
241
+ });
200
242
  break;
201
243
 
202
244
  case 'AccountClosure':
245
+ url = new URL(`${endpoint}/player/${userId}/limits`);
246
+
203
247
  let accountClosureData = 'UserRequest';
204
248
  let accountClosureSelection = {
205
249
  selfExclusion: {
@@ -220,9 +264,13 @@
220
264
  body: JSON.stringify(accountClosureSelection)
221
265
  };
222
266
 
223
- fetch(`${endpoint}/player/${userId}/limits`, optionsAccountClosure)
224
- .then((res:any) => {
267
+ fetch(url.href, optionsAccountClosure)
268
+ .then((res:any):void => {
225
269
  if (res.status == 200) {
270
+ window.postMessage({ type: 'WidgetNotification', data: {
271
+ type: 'success',
272
+ message: 'Account closed'
273
+ }}, window.location.href);
226
274
  window.postMessage({ type: 'LogoutSuccessfull'}, window.location.href);
227
275
  } else {
228
276
  // ERROR
@@ -238,6 +286,8 @@
238
286
  break;
239
287
 
240
288
  case 'PlayerAccountGamingLimitsUpdate':
289
+ url = new URL(`${endpoint}/player/${userId}/limits`);
290
+
241
291
  let limitsObject = e.data.payload;
242
292
  let limitsSectionTitle = e.data.limitsCategory;
243
293
  let limitsData = (limitsSectionTitle === 'cumulativeSessionLimits' || limitsSectionTitle === 'depositLimits') ? limitsObject : {[limitsSectionTitle]: limitsObject}
@@ -252,12 +302,17 @@
252
302
  body: JSON.stringify(limitsData)
253
303
  };
254
304
 
255
- fetch(`${endpoint}/player/${userId}/limits`, optionsEditLimits)
256
- .then((res:any) => {
305
+ fetch(url.href, optionsEditLimits)
306
+ .then((res:any):void => {
257
307
  if (res.status == 200) {
258
308
  showsuccessnotification = true;
259
309
 
260
- getGamingLimits(`${endpoint}/player/${playerid}/limits`);
310
+ window.postMessage({ type: 'WidgetNotification', data: {
311
+ type: 'success',
312
+ message: 'Limits updated'
313
+ }}, window.location.href);
314
+
315
+ getGamingLimits(new URL(`${endpoint}/player/${playerid}/limits`));
261
316
  } else {
262
317
  // ERROR
263
318
  }
@@ -304,7 +359,7 @@
304
359
  body: JSON.stringify(limitsDeleteData)
305
360
  };
306
361
 
307
- let url:any = new URL(`${endpoint}/player/${userId}/limits/${limitName}`);
362
+ url = new URL(`${endpoint}/player/${userId}/limits/${limitName}`);
308
363
 
309
364
  if (limitName === 'deposit' || limitName === 'cumulativeSession') {
310
365
  if (Array.isArray(deletedPeriodLimit)) {
@@ -316,11 +371,15 @@
316
371
  }
317
372
  }
318
373
 
319
- fetch(url, deleteOptions)
320
- .then((res:any) => {
374
+ fetch(url.href, deleteOptions)
375
+ .then((res:any):void => {
321
376
  if (res.status == 200) {
322
377
  showdeletenotification = true;
323
- getGamingLimits(`${endpoint}/player/${playerid}/limits`);
378
+ window.postMessage({ type: 'WidgetNotification', data: {
379
+ type: 'success',
380
+ message: 'Limits deleted'
381
+ }}, window.location.href);
382
+ getGamingLimits(new URL(`${endpoint}/player/${playerid}/limits`));
324
383
  } else {
325
384
  // ERROR
326
385
  }
@@ -328,26 +387,22 @@
328
387
  break;
329
388
 
330
389
  case 'GamingLimitsConfirmChanges':
331
- getGamingLimits(`${endpoint}/player/${playerid}/limits`);
390
+ getGamingLimits(new URL(`${endpoint}/player/${playerid}/limits`));
332
391
  break;
333
392
 
334
393
  case 'CancelGamingLimitsChanges':
335
- getGamingLimits(`${endpoint}/player/${playerid}/limits`);
394
+ getGamingLimits(new URL(`${endpoint}/player/${playerid}/limits`));
336
395
  break;
337
396
 
338
397
  case 'SubmittedRealityCheck':
339
398
  setRealityCheckValue(e.data.realityCheckUpdatedValue);
340
399
  break;
341
-
342
- default:
343
- // do nothing
344
- break;
345
400
  }
346
401
  }
347
402
  }
348
403
 
349
- const getAccountMenuDetails = (url:string) => {
350
- fetch(url)
404
+ const getAccountMenuDetails = (url:URL):void => {
405
+ fetch(url.href)
351
406
  .then((res:any) => res.json())
352
407
  .then((data:any) => {
353
408
  menuData = data;
@@ -357,20 +412,21 @@
357
412
  });
358
413
  }
359
414
 
360
- const getNotificationsDetails = (url:string) => {
361
- fetch(url)
415
+ const getNotificationsDetails = (url:URL):void => {
416
+ fetch(url.href)
362
417
  .then((res:any) => res.json())
363
- .then((data:any) => {
418
+ .then((data:any):void => {
364
419
  if(data.length) {
365
420
  notificationsData = data[0].children;
366
421
  window.postMessage({ type: 'NotificationsDetails', notificationsInfo: notificationsData }, window.location.href);
367
422
  }
368
- }, (err:any) => {
423
+ }, (err:any):void => {
369
424
  console.error(err);
370
425
  });
371
426
  }
372
427
 
373
- const getUserProfileInfo = () => {
428
+ const getUserProfileInfo = ():void => {
429
+ let url:URL = new URL(`${endpoint}/player/${userId}/profile`);
374
430
  let options = {
375
431
  method: "GET",
376
432
  headers: {
@@ -378,7 +434,7 @@
378
434
  }
379
435
  };
380
436
 
381
- fetch(`${endpoint}/player/${userId}/profile`, options)
437
+ fetch(url.href, options)
382
438
  .then((res:any) => { return res.json(); })
383
439
  .then((data:any) => {
384
440
  countrycode = data.country;
@@ -389,7 +445,8 @@
389
445
  });
390
446
  }
391
447
 
392
- const sendChangePassword = async (playerCurrentPassword:string, playerNewPassword:string) => {
448
+ const sendChangePassword = async (playerCurrentPassword:string, playerNewPassword:string):void => {
449
+ let url:URL = new URL(`${endpoint}/player/${userId}/password`)
393
450
  let data = {
394
451
  currentPassword: playerCurrentPassword,
395
452
  newPassword: playerNewPassword
@@ -404,27 +461,35 @@
404
461
  body: JSON.stringify(data)
405
462
  };
406
463
 
407
- let response:any = await fetch(`${endpoint}/player/${userId}/password`, optionsChangePassword);
464
+ let response:any = await fetch(url.href, optionsChangePassword);
408
465
 
409
466
  if (response.ok) {
410
467
  window.postMessage({ type: 'PasswordChangedSuccessfully' }, window.location.href);
468
+ window.postMessage({ type: 'WidgetNotification', data: {
469
+ type: 'success',
470
+ message: 'Password changed successfully'
471
+ }}, window.location.href);
411
472
  } else {
412
473
  let dataResponse:any = await response.json();
413
474
  // Parsing GMCore message 'cuz it's stupid and it doesn't know how to send error messages in 2021 ffs
414
475
  errorPasswordChanged = dataResponse.error.substring(dataResponse.error.indexOf('errorMessage') + 13, dataResponse.error.length);
415
476
  showErrorPasswordChanged = true;
416
477
  window.postMessage({ type: "ShowPasswordChangedError", showErrorPasswordChanged, errorPasswordChanged }, window.location.href);
478
+ window.postMessage({ type: 'WidgetNotification', data: {
479
+ type: 'error',
480
+ message: errorPasswordChanged
481
+ }}, window.location.href);
417
482
  }
418
483
  }
419
484
 
420
- const getRealityCheckData = (url:string) => {
485
+ const getRealityCheckData = (url:URL):void => {
421
486
  let options = {
422
487
  method: 'GET',
423
488
  headers: {
424
489
  'X-SessionID': sessionId,
425
490
  }
426
491
  }
427
- fetch(url, options)
492
+ fetch(url.href, options)
428
493
  .then((res:any) => { return res.json(); })
429
494
  .then((data:any) => {
430
495
  realityCheckData = data.UserRealityCheckValue;
@@ -433,8 +498,10 @@
433
498
  });
434
499
  }
435
500
 
436
- const setRealityCheckValue = (updatedData:string) => {
437
- if(updatedData) {
501
+ const setRealityCheckValue = (updatedData:string):void => {
502
+ let url:URL = new URL(`${endpoint}/player/${userId}/realitycheck`);
503
+
504
+ if (updatedData) {
438
505
  storedRealityCheck = updatedData;
439
506
  }
440
507
 
@@ -448,18 +515,22 @@
448
515
  }
449
516
  };
450
517
 
451
- fetch(`${endpoint}/player/${userId}/realitycheck`, optionsRealityCheck)
518
+ fetch(url.href, optionsRealityCheck)
452
519
  .then((res:any) => {
453
520
  if (res.status == 200) {
454
- getRealityCheckData(`${endpoint}/player/${playerid}/realitycheck`);
521
+ getRealityCheckData(new URL(`${endpoint}/player/${playerid}/realitycheck`));
455
522
  window.postMessage({ type: 'RealityCheckValueUpdated' }, window.location.href);
523
+ window.postMessage({ type: 'WidgetNotification', data: {
524
+ type: 'success',
525
+ message: 'Reality check options saved'
526
+ }}, window.location.href);
456
527
  }
457
528
  }, (err:any) => {
458
529
  console.error(err);
459
530
  });
460
531
  }
461
532
 
462
- const getGamingLimits = (url:string) => {
533
+ const getGamingLimits = (url:URL):void => {
463
534
  if (showsuccessnotification === true) {
464
535
  setTimeout(() => {showsuccessnotification = false; }, 3000);
465
536
  } else if(showdeletenotification === true) {
@@ -473,32 +544,31 @@
473
544
  }
474
545
  };
475
546
 
476
- fetch(url, options)
547
+ fetch(url.href, options)
477
548
  .then((res:any) => res.json())
478
- .then((data:any) => {
549
+ .then((data:any):void => {
479
550
  playerlimits = data;
480
551
  // add name property for info boxes
481
- if(Object.keys(playerlimits).length !== 0) {
482
-
483
- if(playerlimits.hasOwnProperty('depositLimits')) {
552
+ if (Object.keys(playerlimits).length !== 0) {
553
+ if (playerlimits.hasOwnProperty('depositLimits')) {
484
554
  depositlimit = playerlimits.depositLimits;
485
555
  } else {
486
556
  depositlimit = [];
487
557
  }
488
558
 
489
- if(playerlimits.hasOwnProperty('wageringLimit')) {
559
+ if (playerlimits.hasOwnProperty('wageringLimit')) {
490
560
  wageringlimit = playerlimits.wageringLimit;
491
561
  } else {
492
562
  wageringlimit = {};
493
563
  }
494
564
 
495
- if(playerlimits.hasOwnProperty('lossLimit')) {
565
+ if (playerlimits.hasOwnProperty('lossLimit')) {
496
566
  losslimit = playerlimits.lossLimit;
497
567
  } else {
498
568
  losslimit = {};
499
569
  }
500
570
 
501
- if(playerlimits.hasOwnProperty('cumulativeSessionLimits')) {
571
+ if (playerlimits.hasOwnProperty('cumulativeSessionLimits')) {
502
572
  timelimit = playerlimits.timeLimit;
503
573
  timelimit = playerlimits.cumulativeSessionLimits.map((item) => {
504
574
  item.amount = item.minutes;
@@ -522,20 +592,22 @@
522
592
  });
523
593
  }
524
594
 
525
-
526
- const getData = () => {
527
- getAccountMenuDetails(`${cmsendpoint}/${lang}/profile-menu?env=${env}`);
528
- getNotificationsDetails(`${cmsendpoint}/${lang}/support-information?env=${env}`);
595
+ const getData = ():void => {
596
+ getAccountMenuDetails(new URL(`${cmsendpoint}/${lang}/profile-menu?env=${env}`));
597
+ getNotificationsDetails(new URL(`${cmsendpoint}/${lang}/support-information?env=${env}`));
529
598
  getUserProfileInfo();
530
- getGamingLimits(`${endpoint}/player/${playerid}/limits`);
531
- getRealityCheckData(`${endpoint}/player/${playerid}/realitycheck`);
599
+ getGamingLimits(new URL(`${endpoint}/player/${playerid}/limits`));
600
+ getRealityCheckData(new URL(`${endpoint}/player/${playerid}/realitycheck`));
532
601
  }
533
602
 
534
- const initialLoad = () => {
603
+ const setActiveLanguage = ():void => {
535
604
  setLocale(lang);
605
+ }
606
+
607
+ const initialLoad = ():void => {
536
608
  userId = playerid;
537
609
  sessionId = session;
538
- pageName = widgetTitle[0];
610
+ pageName = widgetPath[0];
539
611
 
540
612
  if (!isMobile) {
541
613
  switchContent = true;
@@ -552,6 +624,7 @@
552
624
  }
553
625
  });
554
626
 
627
+ $: lang && setActiveLanguage();
555
628
  $: cmsendpoint && endpoint && customnotifications && playerid && session && lang && env && initialLoad();
556
629
  </script>
557
630
 
@@ -566,68 +639,68 @@
566
639
  <player-account-notifications customnotif={customnotifications}></player-account-notifications>
567
640
  </nav>
568
641
  {:else}
569
- {#if switchContent && pageName === widgetTitle[0]}
642
+ {#if switchContent && pageName === widgetPath[0]}
570
643
  <player-profile-info {endpoint} {lang} {countrycode}></player-profile-info>
571
- {:else if switchContent && pageName === widgetTitle[1]}
644
+ {:else if switchContent && pageName === widgetPath[1]}
572
645
  <player-change-password {lang}></player-change-password>
573
- {:else if switchContent && pageName === widgetTitle[2]}
646
+ {:else if switchContent && pageName === widgetPath[2]}
574
647
  <player-reality-check realitycheck={realityCheckData} {endpoint} {playerid} {session} {lang}></player-reality-check>
575
- {:else if switchContent && pageName === widgetTitle[3]}
648
+ {:else if switchContent && pageName === widgetPath[3]}
576
649
  <player-account-timeout {lang} {operator}></player-account-timeout>
577
- {:else if switchContent && pageName === widgetTitle[4]}
650
+ {:else if switchContent && pageName === widgetPath[4]}
578
651
  <player-account-closure {lang}></player-account-closure>
579
- {:else if switchContent && pageName === widgetTitle[5]}
652
+ {:else if switchContent && pageName === widgetPath[5]}
580
653
  <player-account-gaming-limits {depositlimit} {wageringlimit} {losslimit} {timelimit} {showsuccessnotification} {showdeletenotification} {lang}></player-account-gaming-limits>
581
- {:else if switchContent && pageName === widgetTitle[6]}
654
+ {:else if switchContent && pageName === widgetPath[6]}
582
655
  <player-account-self-exclusion {lang} {operator}></player-account-self-exclusion>
583
- {:else if switchContent && pageName === widgetTitle[7]}
656
+ {:else if switchContent && pageName === widgetPath[7]}
584
657
  <player-active-bonuses {endpoint} {session} {playerid} {lang}></player-active-bonuses>
585
- {:else if switchContent && pageName === widgetTitle[8]}
658
+ {:else if switchContent && pageName === widgetPath[8]}
586
659
  <player-bonus-history {endpoint} {session} {playerid} {lang}></player-bonus-history>
587
- {:else if switchContent && pageName === widgetTitle[9]}
660
+ {:else if switchContent && pageName === widgetPath[9]}
588
661
  <player-gaming-history {endpoint} {session} {playerid} {lang}></player-gaming-history>
589
- {:else if switchContent && pageName === widgetTitle[10]}
662
+ {:else if switchContent && pageName === widgetPath[10]}
590
663
  <player-deposit {endpoint} {session} {playerid} {lang}></player-deposit>
591
- {:else if switchContent && pageName === widgetTitle[11]}
664
+ {:else if switchContent && pageName === widgetPath[11]}
592
665
  <player-withdrawal {endpoint} {session} {playerid} {lang}></player-withdrawal>
593
- {:else if switchContent && pageName === widgetTitle[12]}
666
+ {:else if switchContent && pageName === widgetPath[12]}
594
667
  <player-pending-withdrawals {endpoint} {session} {playerid} {lang}></player-pending-withdrawals>
595
- {:else if switchContent && pageName === widgetTitle[13]}
668
+ {:else if switchContent && pageName === widgetPath[13]}
596
669
  <player-transaction-history {endpoint} {session} {playerid} {lang}></player-transaction-history>
597
670
  {/if}
598
671
  {/if}
599
672
  {:else}
600
673
  <nav>
601
- <player-account-menu {endpoint} {session} {playerid} {lang}></player-account-menu>
674
+ <player-account-menu {endpoint} {session} {playerid} {lang} selecteditem={selected}></player-account-menu>
602
675
  </nav>
603
676
  <main>
604
- {#if switchContent && pageName === widgetTitle[0]}
677
+ {#if switchContent && pageName === widgetPath[0]}
605
678
  <player-profile-info {endpoint} {lang} {countrycode}></player-profile-info>
606
- {:else if switchContent && pageName === widgetTitle[1]}
679
+ {:else if switchContent && pageName === widgetPath[1]}
607
680
  <player-change-password {lang}></player-change-password>
608
- {:else if switchContent && pageName === widgetTitle[2]}
681
+ {:else if switchContent && pageName === widgetPath[2]}
609
682
  <player-reality-check realitycheck={realityCheckData} {endpoint} {playerid} {session} {lang}></player-reality-check>
610
- {:else if switchContent && pageName === widgetTitle[3]}
683
+ {:else if switchContent && pageName === widgetPath[3]}
611
684
  <player-account-timeout {lang} {operator}></player-account-timeout>
612
- {:else if switchContent && pageName === widgetTitle[4]}
685
+ {:else if switchContent && pageName === widgetPath[4]}
613
686
  <player-account-closure {lang}></player-account-closure>
614
- {:else if switchContent && pageName === widgetTitle[5]}
687
+ {:else if switchContent && pageName === widgetPath[5]}
615
688
  <player-account-gaming-limits {depositlimit} {wageringlimit} {losslimit} {timelimit} {showsuccessnotification} {showdeletenotification} {lang}></player-account-gaming-limits>
616
- {:else if switchContent && pageName === widgetTitle[6]}
689
+ {:else if switchContent && pageName === widgetPath[6]}
617
690
  <player-account-self-exclusion {lang} {operator}></player-account-self-exclusion>
618
- {:else if switchContent && pageName === widgetTitle[7]}
691
+ {:else if switchContent && pageName === widgetPath[7]}
619
692
  <player-active-bonuses {endpoint} {session} {playerid} {lang}></player-active-bonuses>
620
- {:else if switchContent && pageName === widgetTitle[8]}
693
+ {:else if switchContent && pageName === widgetPath[8]}
621
694
  <player-bonus-history {endpoint} {session} {playerid} {lang}></player-bonus-history>
622
- {:else if switchContent && pageName === widgetTitle[9]}
695
+ {:else if switchContent && pageName === widgetPath[9]}
623
696
  <player-gaming-history {endpoint} {session} {playerid} {lang}></player-gaming-history>
624
- {:else if switchContent && pageName === widgetTitle[10]}
697
+ {:else if switchContent && pageName === widgetPath[10]}
625
698
  <player-deposit {endpoint} {session} {playerid} {lang}></player-deposit>
626
- {:else if switchContent && pageName === widgetTitle[11]}
699
+ {:else if switchContent && pageName === widgetPath[11]}
627
700
  <player-withdrawal {endpoint} {session} {playerid} {lang}></player-withdrawal>
628
- {:else if switchContent && pageName === widgetTitle[12]}
701
+ {:else if switchContent && pageName === widgetPath[12]}
629
702
  <player-pending-withdrawals {endpoint} {session} {playerid} {lang}></player-pending-withdrawals>
630
- {:else if switchContent && pageName === widgetTitle[13]}
703
+ {:else if switchContent && pageName === widgetPath[13]}
631
704
  <player-transaction-history {endpoint} {session} {playerid} {lang}></player-transaction-history>
632
705
  {/if}
633
706
  </main>