@everymatrix/casino-header-controller 1.22.10 → 1.23.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/casino-header-controller",
3
- "version": "1.22.10",
3
+ "version": "1.23.0",
4
4
  "main": "dist/casino-header-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "38495c8b7fed86d85f3362fe6419369936e0a28a"
40
+ "gitHead": "e1f96f1273bd4af5ca8e311c90006f51ca00a642"
41
41
  }
@@ -9,6 +9,8 @@
9
9
  import '@everymatrix/casino-slider';
10
10
  import '@everymatrix/casino-hamburger-menu';
11
11
  import '@everymatrix/player-account-balance-modal';
12
+ import '@everymatrix/player-deposit';
13
+
12
14
  import everymatrixLogo from './images/everymatrix-logo-white.png';
13
15
 
14
16
  export let session:string = '';
@@ -25,6 +27,9 @@
25
27
  export let countryflagheader:string = 'false';
26
28
  export let displaybalanceoption:string = 'All';
27
29
  export let countryflaghamburger:string = 'false';
30
+ export let shortcashierenabled:string = '';
31
+ export let hasdefaultamount:string = '';
32
+ export let playercurrency: string ='';
28
33
 
29
34
  export let actionevent:string = '';
30
35
 
@@ -91,7 +96,8 @@
91
96
  let language:string = '';
92
97
  let languagesArray:Array<string> = [];
93
98
  let hamburgerMenuActive:boolean = false;
94
- let logoPath:string = '';
99
+ let logoPath:string = '';
100
+ let shortCashierActivated:boolean = false;
95
101
 
96
102
  const menuAction = (data: any) => {
97
103
  switch (data) {
@@ -100,7 +106,7 @@
100
106
  window.postMessage({type: 'OpenLoginRegisterModal', transition: 'Login' }, window.location.href);
101
107
 
102
108
  //Analytics event
103
- if(typeof gtag == 'function'){
109
+ if (typeof gtag == 'function'){
104
110
  gtag('event', 'OpenLoginModal', {
105
111
  'context': 'HeaderController'
106
112
  });
@@ -112,7 +118,7 @@
112
118
  window.postMessage({type: 'OpenLoginRegisterModal', transition: 'Register'}, window.location.href);
113
119
 
114
120
  //Analytics event
115
- if(typeof gtag == 'function'){
121
+ if (typeof gtag == 'function'){
116
122
  gtag('event', 'OpenRegisterModal', {
117
123
  'context': 'HeaderController'
118
124
  });
@@ -128,10 +134,15 @@
128
134
  break;
129
135
 
130
136
  case 'deposit':
131
- window.postMessage({type: 'GoToDeposit'}, window.location.href);
137
+ if (shortcashierenabled) {
138
+ shortCashierActivated = true;
139
+ window.postMessage({ type: 'DisableScroll' }, window.location.href);
140
+ } else {
141
+ window.postMessage({type: 'GoToDeposit'}, window.location.href);
142
+ }
132
143
 
133
144
  //Analytics event
134
- if(typeof gtag == 'function'){
145
+ if (typeof gtag == 'function'){
135
146
  gtag('event', 'GoToDeposit', {
136
147
  'context': 'HeaderController'
137
148
  });
@@ -173,6 +184,19 @@
173
184
  createCMSUrls();
174
185
  getHeaderMenusData(headerURL);
175
186
  break;
187
+
188
+ case 'OpenShortCashier':
189
+ menuAction('deposit');
190
+ break;
191
+
192
+ case 'RequestHeaderHeight':
193
+ window.postMessage({ type: 'HeaderHeight', headerHeight: customStylingContainer.clientHeight }, window.location.href);
194
+ break;
195
+ }
196
+ switch(e.data.redirect) {
197
+ case 'mm-wm-hc-init-deposit-quick':
198
+ closeShortCashier();
199
+ break;
176
200
  }
177
201
  }
178
202
  }
@@ -182,6 +206,12 @@
182
206
  sessionID = session;
183
207
  }
184
208
 
209
+ const closeShortCashier = (event?) => {
210
+ shortCashierActivated = false;
211
+ window.postMessage({ type: 'EnableScroll' }, window.location.href);
212
+ event.stopPropagation();
213
+ }
214
+
185
215
  const createCMSUrls = () => {
186
216
  headerURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/menu`)
187
217
  hamburgerURL = new URL(`${cmsendpoint}/${selectedLanguage.toLowerCase()}/hamburger-menu`);
@@ -266,6 +296,7 @@
266
296
 
267
297
  const getHeaderMenusData = (url:any):Promise<any> => {
268
298
  isLoading = true;
299
+
269
300
  return new Promise((resolve, reject) => {
270
301
  fetch(url)
271
302
  .then((res: any) => res.json())
@@ -403,7 +434,33 @@
403
434
  <div class="HeaderTopActions" part="HeaderTopActions">
404
435
  <div class="HeaderItemsMenu PrimaryMenu" part="HeaderItemsMenu PrimaryMenu">
405
436
  <player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl} {customlocaleidentifier} {gmversion} {displaybalanceoption} {currencyseparator} {currencydecimal} {currencyprecision} />
406
- <div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('deposit')}</div>
437
+ <div>
438
+ <div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('deposit')}</div>
439
+ {#if shortCashierActivated}
440
+ <div class="ShortCashierWindow" on:click={(event) => closeShortCashier(event)}></div>
441
+ <div class="ShortCashierContainerWrapperMobile">
442
+ <div class="ShortCashierContainerMobile">
443
+ <div class="ClosePopUpButtonShortCashier" on:click={(event) => closeShortCashier(event)}>
444
+ <svg width="20" height="20" xmlns="http://www.w3.org/2000/svg">
445
+ <line x1="2" y1="2" x2="18" y2="18" stroke="black" stroke-width="2"/>
446
+ <line x1="18" y1="2" x2="2" y2="18" stroke="black" stroke-width="2"/>
447
+ </svg>
448
+ </div>
449
+ <player-deposit
450
+ {endpoint}
451
+ {session}
452
+ playerid={userid}
453
+ {lang}
454
+ {hasdefaultamount}
455
+ {playercurrency}
456
+ {shortcashierenabled}
457
+ {clientstyling}
458
+ {clientstylingurl}
459
+ ></player-deposit>
460
+ </div>
461
+ </div>
462
+ {/if}
463
+ </div>
407
464
  <div class="Item ItemAccount" part="Item ItemAccount" on:click={() => menuAction('myaccount')}>
408
465
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">
409
466
  <defs>
@@ -456,7 +513,33 @@
456
513
  <div class="HeaderTopActions">
457
514
  <div class="HeaderItemsMenu PrimaryMenu">
458
515
  <player-account-balance-modal {session} {userid} {endpoint} {lang} {clientstyling} {clientstylingurl} {customlocaleidentifier} {gmversion} {displaybalanceoption} {currencyseparator} {currencydecimal} {currencyprecision}/>
459
- <div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('deposit')}</div>
516
+ <div>
517
+ <div class="Item ItemDeposit" part="Item ItemDeposit" on:click={() => menuAction('deposit')}>{$_('deposit')}</div>
518
+ {#if shortCashierActivated}
519
+ <div class="ShortCashierWindow" on:click={(event) => closeShortCashier(event)}></div>
520
+ <div class="ShortCashierContainerWrapper">
521
+ <div class="ShortCashierContainer">
522
+ <div class="ClosePopUpButtonShortCashier" on:click={(event) => closeShortCashier(event)}>
523
+ <svg width="20" height="20" xmlns="http://www.w3.org/2000/svg">
524
+ <line x1="2" y1="2" x2="18" y2="18" stroke="black" stroke-width="2"/>
525
+ <line x1="18" y1="2" x2="2" y2="18" stroke="black" stroke-width="2"/>
526
+ </svg>
527
+ </div>
528
+ <player-deposit
529
+ {endpoint}
530
+ {session}
531
+ playerid={userid}
532
+ {lang}
533
+ {hasdefaultamount}
534
+ {playercurrency}
535
+ {shortcashierenabled}
536
+ {clientstyling}
537
+ {clientstylingurl}
538
+ ></player-deposit>
539
+ </div>
540
+ </div>
541
+ {/if}
542
+ </div>
460
543
  <div class="Item ItemAccount" part="Item ItemAccount" on:click={() => menuAction('myaccount')}>
461
544
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16.429" viewBox="0 0 15 16.429">
462
545
  <defs>
@@ -656,6 +739,22 @@
656
739
  font-family: inherit;
657
740
  }
658
741
 
742
+ @keyframes ModalBounce {
743
+ 0% {
744
+ opacity: 0;
745
+ transform: translateY(20px);
746
+ }
747
+ 50% {
748
+ transform: translateY(-6px);
749
+ opacity: 0.8;
750
+ }
751
+ 100% {
752
+ transform: translateY(0);
753
+ opacity: 1;
754
+ }
755
+ }
756
+
757
+
659
758
  input,
660
759
  textarea,
661
760
  button {font-family: inherit}
@@ -672,6 +771,88 @@
672
771
  display: inline-block;
673
772
  }
674
773
 
774
+ .ClosePopUpButtonShortCashier{
775
+ margin-left: auto;
776
+ cursor: pointer;
777
+ svg {
778
+ position: absolute;
779
+ top: 10px;
780
+ right: 10px;
781
+ }
782
+ }
783
+
784
+ .ShortCashierWindow{
785
+ background-color: rgba(0, 0, 0, 0.7);
786
+ position: fixed;
787
+ top: 0;
788
+ bottom: 0;
789
+ left: 0;
790
+ right: 0;
791
+ z-index: 16;
792
+ }
793
+
794
+ .ShortCashierContainerWrapper{
795
+ position: relative;
796
+ animation: ModalBounce .5s forwards;
797
+ z-index: 17;
798
+ right: 60%;
799
+ }
800
+ .ShortCashierContainer{
801
+ background-color: var(--emfe-w-color-white, #FFFFFF);
802
+ position: absolute;
803
+ width: 360px;
804
+ top: 16px;
805
+ transform: translateX(-60%);
806
+ box-shadow: 0px 30px 30px var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
807
+ border-radius: 5px;
808
+ z-index: 17;
809
+ box-shadow: 0px 5px 20px 0px #191919;
810
+ &:before {
811
+ content: "";
812
+ background: var(--emfe-w-color-white, #FFFFFF);
813
+ clip-path: polygon(50% 0, 0% 100%, 100% 100%);
814
+ position: absolute;
815
+ top: -8px;
816
+ left: 84%;
817
+ width: 25px;
818
+ height: 10px;
819
+ transform: translateX(-50%);
820
+ z-index: 1;
821
+ }
822
+ }
823
+
824
+ .ShortCashierContainerWrapperMobile{
825
+ position: relative;
826
+ animation: ModalBounce .5s forwards;
827
+ right: 110%;
828
+ z-index: 17;
829
+ }
830
+ .ShortCashierContainerMobile {
831
+ background-color: var(--emfe-w-color-white, #FFFFFF);
832
+ position: absolute;
833
+ width: 80vw;
834
+ top: 14px;
835
+ left: 50%;
836
+ transform: translateX(-60%);
837
+ padding: 10px;
838
+ box-shadow: 0px 30px 30px var(--emfe-w-header-color-primary, var(--emfe-w-color-primary, #D0046C));
839
+ border-radius: 5px;
840
+ z-index: 17;
841
+ box-shadow: 0px 5px 20px 0px #191919;
842
+ &:before {
843
+ content: "";
844
+ background: var(--emfe-w-color-white, #FFFFFF);
845
+ clip-path: polygon(50% 0, 0% 100%, 100% 100%);
846
+ position: absolute;
847
+ top: -8px;
848
+ left: 84%;
849
+ width: 25px;
850
+ height: 10px;
851
+ transform: translateX(-50%);
852
+ z-index: 1;
853
+ }
854
+ }
855
+
675
856
  .SelectedOption,
676
857
  .OptionList {
677
858
  border: 1px solid var(--emfe-w-header-color-primary);