@everymatrix/player-account-controller 1.22.9 → 1.22.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-account-controller",
3
- "version": "1.22.9",
3
+ "version": "1.22.11",
4
4
  "main": "dist/player-account-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "a02c1965e69c8e94cbd3ab9a0dc6a4f9a42ed3fc"
38
+ "gitHead": "1ec5c9d222dc5546dc0ef485ea93807daa2bb50c"
39
39
  }
@@ -68,6 +68,7 @@
68
68
  export let casinourl:string = '';
69
69
  export let contacturl:string = '';
70
70
  export let homeurl:string = '';
71
+ export let depositurl:string = '';
71
72
 
72
73
  setupI18n({ withLocale: 'en', translations: {}});
73
74
 
@@ -165,16 +166,6 @@
165
166
  switchContent = true;
166
167
  pagePath = e.data.page.path;
167
168
 
168
- if (e.data.page.id) {
169
- selected = e.data.page.id;
170
- } else {
171
- menuData.forEach(element => {
172
- if (element.path.includes(e.data.page.path)) {
173
- selected = element.id;
174
- }
175
- })
176
- }
177
-
178
169
  if(pagePath == '/profile-info') {
179
170
  getUserProfileInfo();
180
171
  getUserProfileConsent();
@@ -202,6 +193,7 @@
202
193
  case 'SetActivePage':
203
194
  switchContent = true;
204
195
  pagePath = e.data.pagePath;
196
+ findPageId();
205
197
 
206
198
  if (pagePath == '/profile-info') {
207
199
  getUserProfileInfo();
@@ -730,10 +722,19 @@
730
722
  });
731
723
  }
732
724
 
725
+ const findPageId = ():void => {
726
+ menuData.forEach(element => {
727
+ if (element.path.includes(pagePath)) {
728
+ selected = element.id;
729
+ }
730
+ })
731
+ }
732
+
733
733
  const getData = ():void => {
734
734
  getAccountMenuDetails(new URL(`${cmsendpoint}/${lang}/profile-menu?env=${env}`))
735
735
  .then((data:any):void => {
736
736
  menuData = data;
737
+ findPageId();
737
738
  window.postMessage({ type: 'AccountMenuDetails', accountMenuInfo: menuData }, window.location.href);
738
739
  });
739
740
 
@@ -857,9 +858,9 @@
857
858
  {:else if switchContent && pagePath === widgetPath[16]}
858
859
  <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>
859
860
  {:else if switchContent && pagePath === widgetPath[17] }
860
- <user-deposit-withdrawal {endpoint} type="deposit" channel="Mobile" language={lang} 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} ></user-deposit-withdrawal>
861
+ <user-deposit-withdrawal {endpoint} type="deposit" channel="Mobile" language={lang} 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} ></user-deposit-withdrawal>
861
862
  {:else if switchContent && pagePath === widgetPath[18] }
862
- <user-deposit-withdrawal {endpoint} type="withdraw" channel="Mobile" language={lang} 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} ></user-deposit-withdrawal>
863
+ <user-deposit-withdrawal {endpoint} type="withdraw" channel="Mobile" language={lang} 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}></user-deposit-withdrawal>
863
864
  {:else if switchContent && pagePath === widgetPath[19] }
864
865
  <user-transaction-history endpoint={endpoint} user-id={playerid} session={session} mobile={isMobile} translation-url={translationurl} language={lang}></user-transaction-history>
865
866
  {/if}
@@ -904,9 +905,9 @@
904
905
  {:else if switchContent && pagePath === widgetPath[16]}
905
906
  <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>
906
907
  {:else if switchContent && pagePath === widgetPath[17] }
907
- <user-deposit-withdrawal endpoint={endpoint} type="deposit" channel="Desktop" language={lang} 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} ></user-deposit-withdrawal>
908
+ <user-deposit-withdrawal endpoint={endpoint} type="deposit" channel="Desktop" language={lang} 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}></user-deposit-withdrawal>
908
909
  {:else if switchContent && pagePath === widgetPath[18] }
909
- <user-deposit-withdrawal endpoint={endpoint} type="withdraw" channel="Desktop" language={lang} 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} ></user-deposit-withdrawal>
910
+ <user-deposit-withdrawal endpoint={endpoint} type="withdraw" channel="Desktop" language={lang} 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}></user-deposit-withdrawal>
910
911
  {:else if switchContent && pagePath === widgetPath[19] }
911
912
  <user-transaction-history endpoint={endpoint} user-id={playerid} session={session} mobile={isMobile} translation-url={translationurl} language={lang}></user-transaction-history>
912
913
  {/if}