@everymatrix/player-account-controller 0.0.217 → 0.0.221

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
@@ -32,11 +32,11 @@
32
32
  <div class="webcomponent">
33
33
  <player-account-controller
34
34
  endpoint="https://demo-api.stage.norway.everymatrix.com/v1"
35
- cmsendpoint="https://wp-one-widgets.everymatrix.com/wp-json/wpone-rest/v1"
36
- playerid="3903441"
37
- session="467babdb-03dc-4ba6-a30d-ef7678471562"
38
- accountpath="/menu-locations/profile-menu"
39
- notificationpath="/support_information"
35
+ cmsendpoint="https://widgets.everymatrix.com/apijson"
36
+ playerid="3657535"
37
+ session="e518be84-5441-4905-ba97-7834c6a955a1"
38
+ accountpath="/profile-menu"
39
+ notificationpath="/support-information"
40
40
  customnotifications="#58586B,#2687F6,#D0046C"
41
41
  lang="en"
42
42
  ></player-account-controller>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-controller",
3
- "version": "0.0.217",
3
+ "version": "0.0.221",
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.217",
33
- "@everymatrix/player-account-notifications": "^0.0.217",
32
+ "@everymatrix/player-account-menu": "^0.0.221",
33
+ "@everymatrix/player-account-notifications": "^0.0.221",
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": "eece4cbb47122ec254298d89beb7fdb184124cdc"
41
+ "gitHead": "015e13b1638624ecac8f0cc2a0f210cbbac4910e"
42
42
  }
@@ -30,7 +30,7 @@
30
30
  export let playerid:string = '';
31
31
  export let session:string = '';
32
32
  export let endpoint:string = '';
33
- export let lang:string = 'en';
33
+ export let lang:string = '';
34
34
  export let operator:string = 'Everymatrix';
35
35
 
36
36
  setupI18n({ withLocale: 'en', translations: {}});
@@ -70,8 +70,8 @@
70
70
  'Withdrawal',
71
71
  'Pending Withdrawals',
72
72
  'Transaction History'];
73
- const accountMenuEndpointURL:string = cmsendpoint + accountpath;
74
- const notificationsEndpointURL:string = cmsendpoint + notificationpath;
73
+ const accountMenuEndpointURL:string = cmsendpoint + `/${lang}` + accountpath;
74
+ const notificationsEndpointURL:string = cmsendpoint + `/${lang}` + notificationpath;
75
75
 
76
76
  let switchContent:boolean = false;
77
77
 
@@ -84,7 +84,7 @@
84
84
 
85
85
  case 'ChangeAccountPage':
86
86
  switchContent = true;
87
- pageName = e.data.page.post_title;
87
+ pageName = e.data.page.label;
88
88
  getUserProfileInfo();
89
89
  break;
90
90
 
@@ -129,7 +129,7 @@
129
129
  fetch(`${endpoint}/player/${userId}/profile`, options)
130
130
  .then((res:any) => {
131
131
  if (res.status == 200) {
132
- window.postMessage({ type: 'ConfirmProfileInfoSave'}, window.location.href);
132
+ window.postMessage({ type: 'ConfirmProfileInfoSave' }, window.location.href);
133
133
  }
134
134
  });
135
135
  break;
@@ -350,7 +350,7 @@
350
350
  fetch(url)
351
351
  .then((res:any) => res.json())
352
352
  .then((data:any) => {
353
- menuData = data.items;
353
+ menuData = data;
354
354
  window.postMessage({ type: 'AccountMenuDetails', accountMenuInfo: menuData }, window.location.href);
355
355
  }, (err:any) => {
356
356
  console.error(err);
@@ -362,7 +362,7 @@
362
362
  .then((res:any) => res.json())
363
363
  .then((data:any) => {
364
364
  if(data.length) {
365
- notificationsData = data[0].acf.support_info_item;
365
+ notificationsData = data[0].children;
366
366
  window.postMessage({ type: 'NotificationsDetails', notificationsInfo: notificationsData }, window.location.href);
367
367
  }
368
368
  }, (err:any) => {
@@ -522,8 +522,8 @@
522
522
 
523
523
 
524
524
  const getData = () => {
525
- getAccountMenuDetails(cmsendpoint + accountpath);
526
- getNotificationsDetails(cmsendpoint + notificationpath);
525
+ getAccountMenuDetails(cmsendpoint + `/${lang}` + accountpath);
526
+ getNotificationsDetails(cmsendpoint + `/${lang}` + notificationpath);
527
527
  getUserProfileInfo();
528
528
  getGamingLimits(`${endpoint}/player/${playerid}/limits`);
529
529
  getRealityCheckData(`${endpoint}/player/${playerid}/realitycheck`);