@everymatrix/player-account-controller 1.35.0 → 1.36.0

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.35.0",
3
+ "version": "1.36.0",
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": "cad27ef6706d0e17f1eda3810fee31f1ec373fa9"
38
+ "gitHead": "09be81de9c66446d0062303022d5f036d874d153"
39
39
  }
@@ -25,7 +25,6 @@
25
25
  import '@everymatrix/player-account-betting-history';
26
26
  import '@everymatrix/player-account-gaming-limits-wrapper-2';
27
27
  import '@everymatrix/player-account-biometrics';
28
- import type { OmWidgets } from './PlayerAccountController.types';
29
28
 
30
29
  export let cmsendpoint:string = '';
31
30
  export let env:string = '';
@@ -67,6 +66,7 @@
67
66
  export let depositurl:string = '';
68
67
  export let showcashierbonus:string = '';
69
68
  export let biometricsenabled:string = 'false';
69
+ export let activepage:string = '';
70
70
 
71
71
 
72
72
  setupI18n({ withLocale: 'en', translations: {}});
@@ -79,7 +79,6 @@
79
79
  let notificationsData:any = [];
80
80
  let userId:string = '';
81
81
  let sessionId:string = '';
82
- let pagePath:string = '';
83
82
  let countrycode:string = '';
84
83
  let playercurrency: string = null;
85
84
  // limits variables
@@ -96,7 +95,6 @@
96
95
  let errorPasswordChanged:string = '';
97
96
  let showErrorPasswordChanged:boolean = false;
98
97
  let selected:string;
99
- let omWebWidgets: OmWidgets;
100
98
  let ChangePasswordEvent: CustomEvent;
101
99
 
102
100
  const widgetPath = ['/profile-info',
@@ -121,8 +119,6 @@
121
119
  '/transactions-history',
122
120
  '/biometrics'];
123
121
 
124
- let switchContent:boolean = false;
125
-
126
122
  const setDevice = ():void => {
127
123
  let device = getDevice(userAgent);
128
124
 
@@ -164,15 +160,14 @@
164
160
  break;
165
161
 
166
162
  case 'ChangeAccountPage':
167
- switchContent = true;
168
- pagePath = e.data.page.path;
163
+ activepage = e.data.page.path;
169
164
 
170
- if(pagePath == '/profile-info') {
165
+ if(activepage == '/profile-info') {
171
166
  getUserProfileInfo();
172
167
  getUserProfileConsent();
173
168
  }
174
169
 
175
- if(pagePath == '/deposit'){
170
+ if(activepage == '/deposit'){
176
171
  //Analytics event
177
172
  if(typeof gtag == 'function'){
178
173
  gtag('event', 'GoToDeposit', {
@@ -181,7 +176,7 @@
181
176
  }
182
177
  }
183
178
 
184
- if(pagePath == '/withdrawal'){
179
+ if(activepage == '/withdrawal'){
185
180
  //Analytics event
186
181
  if(typeof gtag == 'function'){
187
182
  gtag('event', 'GoToWithdrawal', {
@@ -191,35 +186,10 @@
191
186
  }
192
187
  break;
193
188
 
194
- case 'SetActivePage':
195
- switchContent = true;
196
- pagePath = e.data.pagePath;
197
- findPageId();
198
-
199
- if (pagePath == '/profile-info') {
200
- getUserProfileInfo();
201
- getUserProfileConsent();
202
- }
203
-
204
- let accountDetailsURL:URL = new URL(`${cmsendpoint}/${lang}/profile-menu?env=${env}`);
205
- accountDetailsURL.searchParams.append('device', deviceSegregationValue)
206
-
207
- getAccountMenuDetails(accountDetailsURL).then((menuData:any):void => {
208
- let aux:Array<any> = menuData.filter((item) => {
209
- return item.label == e.data.pageName;
210
- });
211
-
212
- if (aux.length > 0) {
213
- selected = aux[0].id;
214
- }
215
- });
216
-
217
- break;
218
-
219
189
  case 'PlayerAccountMenuActive':
220
190
  case 'GoToPreviousRoute':
221
191
  if (e.data.isMobile) {
222
- switchContent = false;
192
+ activepage = '';
223
193
  initialLoad();
224
194
  }
225
195
  break;
@@ -725,7 +695,7 @@
725
695
 
726
696
  const findPageId = ():void => {
727
697
  menuData.forEach(element => {
728
- if (element.path.includes(pagePath)) {
698
+ if (element.path.includes(activepage)) {
729
699
  selected = element.id;
730
700
  }
731
701
  })
@@ -757,19 +727,9 @@
757
727
  setDevice()
758
728
  userId = playerid;
759
729
  sessionId = session;
760
- if (!isMobile) {
761
- switchContent = true;
762
- }
763
730
  getData();
764
731
  }
765
732
 
766
- const updateOMSession = (session: string) => {
767
- omWebWidgets.updateAuthMethod({
768
- type: 'EmSession',
769
- sessionId: session
770
- })
771
- }
772
-
773
733
  const setClientStyling = ():void => {
774
734
  let sheet = document.createElement('style');
775
735
  sheet.innerHTML = clientstyling;
@@ -797,13 +757,12 @@
797
757
  }
798
758
  });
799
759
 
800
- $: lang && switchContent && pagePath && setActiveLanguage();
760
+ $: lang && setActiveLanguage();
801
761
  $: cmsendpoint && endpoint && customnotifications && playerid && session && lang && env && userroles && initialLoad();
802
762
  $: depositlimit && wageringlimit && losslimit && timelimit;
803
763
  $: clientstyling && customStylingContainer && setClientStyling();
804
764
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
805
765
  $: translationurl && setTranslationUrl();
806
-
807
766
  </script>
808
767
 
809
768
  <svelte:head>
@@ -813,58 +772,59 @@
813
772
  </svelte:head>
814
773
 
815
774
  <div bind:this={customStylingContainer}>
775
+
816
776
  {#if isLoading}
817
777
  <div class="ModalLoader"></div>
818
778
  {:else}
819
779
  <section class="PlayerAccountPage {isMobile ? 'PlayerAccountMobilePage' : ''}">
820
780
  {#if isMobile}
821
- {#if !switchContent}
781
+ {#if !activepage}
822
782
  <nav class="PlayerAccountMobile">
823
783
  <player-account-menu {endpoint} {session} {playerid} {lang} {userroles} {clientstyling} {clientstylingurl}></player-account-menu>
824
784
  <player-account-notifications customnotif={customnotifications} {clientstyling} {clientstylingurl}></player-account-notifications>
825
785
  </nav>
826
786
  {:else}
827
- {#if switchContent && pagePath === widgetPath[0]}
787
+ {#if activepage === widgetPath[0]}
828
788
  <player-profile-info {endpoint} {lang} {countrycode} {clientstyling} {clientstylingurl} {custominputtextswitch}></player-profile-info>
829
- {:else if switchContent && pagePath === widgetPath[1]}
789
+ {:else if activepage === widgetPath[1]}
830
790
  <player-change-password {simplepasswordvalidation} {lang} {clientstyling} {clientstylingurl}></player-change-password>
831
- {:else if switchContent && pagePath === widgetPath[2]}
791
+ {:else if activepage === widgetPath[2]}
832
792
  <player-reality-check realitycheck={realityCheckData} {endpoint} {playerid} {session} {lang} {clientstyling} {clientstylingurl}></player-reality-check>
833
- {:else if switchContent && pagePath === widgetPath[3]}
793
+ {:else if activepage === widgetPath[3]}
834
794
  <player-account-timeout {lang} {operator} {supportemail} {clientstyling} {clientstylingurl}></player-account-timeout>
835
- {:else if switchContent && pagePath === widgetPath[4]}
795
+ {:else if activepage === widgetPath[4]}
836
796
  <player-account-closure {lang} {clientstyling} {clientstylingurl}></player-account-closure>
837
- {:else if switchContent && pagePath === widgetPath[5]}
797
+ {:else if activepage === widgetPath[5]}
838
798
  <player-account-gaming-limits use:sendLimitsData {playercurrency} {separatelimits} {clientstyling} {clientstylingurl}></player-account-gaming-limits>
839
- {:else if switchContent && pagePath === widgetPath[6]}
799
+ {:else if activepage === widgetPath[6]}
840
800
  <player-account-self-exclusion {lang} {operator} {supportemail} {clientstyling} {clientstylingurl}></player-account-self-exclusion>
841
- {:else if switchContent && pagePath === widgetPath[7]}
801
+ {:else if activepage === widgetPath[7]}
842
802
  <player-active-bonuses {endpoint} {session} {playerid} {lang} {playercurrency} {clientstyling} {clientstylingurl}></player-active-bonuses>
843
- {:else if switchContent && pagePath === widgetPath[8]}
803
+ {:else if activepage === widgetPath[8]}
844
804
  <player-bonus-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-bonus-history>
845
- {:else if switchContent && pagePath === widgetPath[9]}
805
+ {:else if activepage === widgetPath[9]}
846
806
  <player-gaming-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl} {gmversion}></player-gaming-history>
847
- {:else if switchContent && pagePath === widgetPath[10]}
807
+ {:else if activepage === widgetPath[10]}
848
808
  <player-deposit {endpoint} {session} {playerid} {lang} {hasdefaultamount} {clientstyling} {clientstylingurl} {playercurrency}></player-deposit>
849
- {:else if switchContent && pagePath === widgetPath[11]}
809
+ {:else if activepage === widgetPath[11]}
850
810
  <player-withdrawal {endpoint} {session} {playerid} {lang} {hasdefaultamount} {clientstyling} {clientstylingurl} {playercurrency}></player-withdrawal>
851
- {:else if switchContent && pagePath === widgetPath[12]}
811
+ {:else if activepage === widgetPath[12]}
852
812
  <player-pending-withdrawals {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-pending-withdrawals>
853
- {:else if switchContent && pagePath === widgetPath[13]}
813
+ {:else if activepage === widgetPath[13]}
854
814
  <player-transaction-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-transaction-history>
855
- {:else if switchContent && pagePath === widgetPath[14]}
815
+ {:else if activepage === widgetPath[14]}
856
816
  <player-account-betting-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-account-betting-history>
857
- {:else if switchContent && pagePath === widgetPath[15]}
817
+ {:else if activepage === widgetPath[15]}
858
818
  <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>
859
- {:else if switchContent && pagePath === widgetPath[16]}
819
+ {:else if activepage === widgetPath[16]}
860
820
  <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>
861
- {:else if switchContent && pagePath === widgetPath[17] }
821
+ {:else if activepage === widgetPath[17] }
862
822
  <user-deposit-withdrawal {endpoint} type="deposit" channel="Mobile" language={lang} {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} ></user-deposit-withdrawal>
863
- {:else if switchContent && pagePath === widgetPath[18] }
823
+ {:else if activepage === widgetPath[18] }
864
824
  <user-deposit-withdrawal {endpoint} type="withdraw" channel="Mobile" language={lang} {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}></user-deposit-withdrawal>
865
- {:else if switchContent && pagePath === widgetPath[19] }
825
+ {:else if activepage === widgetPath[19] }
866
826
  <user-transaction-history endpoint={endpoint} user-id={playerid} session={session} mobile={isMobile} translation-url={translationurl} language={lang}></user-transaction-history>
867
- {:else if switchContent && pagePath === widgetPath[20] }
827
+ {:else if activepage === widgetPath[20] }
868
828
  <player-account-biometrics {biometricsenabled} {lang} {clientstyling} {clientstylingurl} {translationurl}></player-account-biometrics>
869
829
  {/if}
870
830
  {/if}
@@ -873,45 +833,45 @@
873
833
  <player-account-menu {endpoint} {session} {playerid} {lang} selecteditem={selected} {userroles} {clientstyling} {clientstylingurl}></player-account-menu>
874
834
  </nav>
875
835
  <main>
876
- {#if switchContent && pagePath === widgetPath[0]}
836
+ {#if activepage === widgetPath[0]}
877
837
  <player-profile-info {endpoint} {lang} {countrycode} {clientstyling} {clientstylingurl} {custominputtextswitch}></player-profile-info>
878
- {:else if switchContent && pagePath === widgetPath[1]}
838
+ {:else if activepage === widgetPath[1]}
879
839
  <player-change-password {simplepasswordvalidation}{lang} {clientstyling} {clientstylingurl}></player-change-password>
880
- {:else if switchContent && pagePath === widgetPath[2]}
840
+ {:else if activepage === widgetPath[2]}
881
841
  <player-reality-check realitycheck={realityCheckData} {endpoint} {playerid} {session} {lang} {clientstyling} {clientstylingurl}></player-reality-check>
882
- {:else if switchContent && pagePath === widgetPath[3]}
842
+ {:else if activepage === widgetPath[3]}
883
843
  <player-account-timeout {lang} {operator} {supportemail} {clientstyling} {clientstylingurl}></player-account-timeout>
884
- {:else if switchContent && pagePath === widgetPath[4]}
844
+ {:else if activepage === widgetPath[4]}
885
845
  <player-account-closure {lang} {clientstyling} {clientstylingurl}></player-account-closure>
886
- {:else if switchContent && pagePath == widgetPath[5]}
846
+ {:else if activepage == widgetPath[5]}
887
847
  <player-account-gaming-limits use:sendLimitsData {playercurrency} {separatelimits} {clientstyling} {clientstylingurl}></player-account-gaming-limits>
888
- {:else if switchContent && pagePath === widgetPath[6]}
848
+ {:else if activepage === widgetPath[6]}
889
849
  <player-account-self-exclusion {lang} {operator} {supportemail} {clientstyling} {clientstylingurl}></player-account-self-exclusion>
890
- {:else if switchContent && pagePath === widgetPath[7]}
850
+ {:else if activepage === widgetPath[7]}
891
851
  <player-active-bonuses {endpoint} {session} {playerid} {lang} {playercurrency} {clientstyling} {clientstylingurl}></player-active-bonuses>
892
- {:else if switchContent && pagePath === widgetPath[8]}
852
+ {:else if activepage === widgetPath[8]}
893
853
  <player-bonus-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-bonus-history>
894
- {:else if switchContent && pagePath === widgetPath[9]}
854
+ {:else if activepage === widgetPath[9]}
895
855
  <player-gaming-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl} {gmversion}></player-gaming-history>
896
- {:else if switchContent && pagePath === widgetPath[10]}
856
+ {:else if activepage === widgetPath[10]}
897
857
  <player-deposit {endpoint} {session} {playerid} {lang} {hasdefaultamount} {clientstyling} {clientstylingurl} {playercurrency}></player-deposit>
898
- {:else if switchContent && pagePath === widgetPath[11]}
858
+ {:else if activepage === widgetPath[11]}
899
859
  <player-withdrawal {endpoint} {session} {playerid} {lang} {hasdefaultamount} {clientstyling} {clientstylingurl} {playercurrency}></player-withdrawal>
900
- {:else if switchContent && pagePath === widgetPath[12]}
860
+ {:else if activepage === widgetPath[12]}
901
861
  <player-pending-withdrawals {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-pending-withdrawals>
902
- {:else if switchContent && pagePath === widgetPath[13]}
862
+ {:else if activepage === widgetPath[13]}
903
863
  <player-transaction-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-transaction-history>
904
- {:else if switchContent && pagePath === widgetPath[14]}
864
+ {:else if activepage === widgetPath[14]}
905
865
  <player-account-betting-history {endpoint} {session} {playerid} {lang} {clientstyling} {clientstylingurl}></player-account-betting-history>
906
- {:else if switchContent && pagePath === widgetPath[15]}
866
+ {:else if activepage === widgetPath[15]}
907
867
  <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>
908
- {:else if switchContent && pagePath === widgetPath[16]}
868
+ {:else if activepage === widgetPath[16]}
909
869
  <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>
910
- {:else if switchContent && pagePath === widgetPath[17] }
870
+ {:else if activepage === widgetPath[17] }
911
871
  <user-deposit-withdrawal endpoint={endpoint} type="deposit" channel="Desktop" language={lang} {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}></user-deposit-withdrawal>
912
- {:else if switchContent && pagePath === widgetPath[18] }
872
+ {:else if activepage === widgetPath[18] }
913
873
  <user-deposit-withdrawal endpoint={endpoint} type="withdraw" channel="Desktop" language={lang} {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}></user-deposit-withdrawal>
914
- {:else if switchContent && pagePath === widgetPath[19] }
874
+ {:else if activepage === widgetPath[19] }
915
875
  <user-transaction-history endpoint={endpoint} user-id={playerid} session={session} mobile={isMobile} translation-url={translationurl} language={lang}></user-transaction-history>
916
876
  {/if}
917
877
  </main>
@@ -88,5 +88,15 @@ export const TRANSLATIONS = {
88
88
  "limitsDeleteSuccess": "Límites borrados",
89
89
  "PasswordChangedSuccess": "Password cambiada con éxito",
90
90
  "realityCheckSuccess": "Opciones de control de realidad guardadas"
91
+ },
92
+ "tr": {
93
+ "profileUpdateSuccess": "Profil güncellendi!",
94
+ "timeoutSuccess": "Zaman aşımı etkin",
95
+ "selfExclusionSuccess": "Kendini dışlama etkin",
96
+ "accountClosureSuccess": "Hesap kapatıldı",
97
+ "limitsUpdateSuccess": "Sınırlar güncellendi",
98
+ "limitsDeleteSuccess": "Sınırlar silindi",
99
+ "passwordChangedSuccess": "parola başarıyla değiştirildi",
100
+ "realityCheckSuccess": "Gerçeklik kontrolü seçenekleri kaydedildi"
91
101
  }
92
102
  }