@everymatrix/casino-page 1.5.2 → 1.5.4

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-page",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "main": "dist/casino-page.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "c0184ad3edaaa8f9ce54289cf544bb0589ef1fbe"
39
+ "gitHead": "0515078fefc5290a183afcfb2608cf265f2322c7"
40
40
  }
@@ -22,6 +22,7 @@
22
22
  import '@everymatrix/casino-most-played-section';
23
23
  import '@everymatrix/casino-my-games';
24
24
  import '@everymatrix/casino-search';
25
+ import '@everymatrix/casino-calendar';
25
26
 
26
27
  export let endpoint:string = '';
27
28
  export let datasource:string = '';
@@ -32,6 +33,7 @@
32
33
  export let clientstyling:string = '';
33
34
  export let clientstylingurl:string = '';
34
35
  export let translationurl:string = '';
36
+ export let cmsendpoint:string = '';
35
37
 
36
38
  export let categorybackground:string = '';
37
39
  export let visiblegames:string;
@@ -83,6 +85,8 @@
83
85
  export let titletype:string = '';
84
86
  export let casinomygames:string = 'false';
85
87
  export let collectionprovidersgamenames:string = '';
88
+ //Casino Calendar
89
+ export let positioncasinocalendar = '';
86
90
 
87
91
  // Button icon for random game widget
88
92
  export let randombuttonicon:string = '';
@@ -112,12 +116,8 @@
112
116
 
113
117
  // CasinoPage state
114
118
  let myGamesSection:boolean = false;
115
- let recentSearches:boolean = false;
116
- let searched:boolean = false;
117
119
  let searchFocus:boolean = false;
118
120
  let lobbyScreen:boolean = true;
119
- let mostPlayedScreen:boolean = false;
120
- let lastPlayedScreen:boolean = false;
121
121
  let adjustingScroll:boolean = false;
122
122
  let searchIsOn:boolean = false;
123
123
 
@@ -172,7 +172,6 @@
172
172
  });
173
173
 
174
174
  const CategoryChangeHandler = (categoryEvent:any) => {
175
- searched = false;
176
175
  searchValue = '';
177
176
  scrollTop = true;
178
177
  casinomygames = 'false';
@@ -185,24 +184,18 @@
185
184
  lobbyScreen = true;
186
185
  myGamesSection = false;
187
186
  activeCategory = '';
188
- mostPlayedScreen = false;
189
- lastPlayedScreen = false;
190
187
  break;
191
188
 
192
189
  case 'MYGAMES':
193
190
  casinomygames = 'true';
194
191
  lobbyScreen = false;
195
192
  myGamesSection = true;
196
- mostPlayedScreen = false;
197
- lastPlayedScreen = false;
198
193
  activeCategory = '';
199
194
  break;
200
195
 
201
196
  case 'FAVORITES':
202
197
  lobbyScreen = false;
203
198
  myGamesSection = true;
204
- mostPlayedScreen = false;
205
- lastPlayedScreen = false;
206
199
  activeCategory = '';
207
200
  break;
208
201
 
@@ -211,7 +204,6 @@
211
204
  activeCategory = '';
212
205
  lobbyScreen = false;
213
206
  myGamesSection = true;
214
- mostPlayedScreen = true;
215
207
  }
216
208
  break;
217
209
 
@@ -219,17 +211,13 @@
219
211
  if (lastplayed == 'true') {
220
212
  activeCategory = '';
221
213
  lobbyScreen = false;
222
- lastPlayedScreen = true;
223
214
  myGamesSection = true;
224
- mostPlayedScreen = false;
225
215
  }
226
216
  break;
227
217
 
228
218
  default:
229
219
  lobbyScreen = false;
230
220
  myGamesSection = false;
231
- mostPlayedScreen = false;
232
- lastPlayedScreen = false;
233
221
  activeCategory = categoryEvent.data.itemId;
234
222
  //@TODO: if we remove the settimeout, the postmessage does not execute, at all - weird behaviour
235
223
  setTimeout(() => {
@@ -294,6 +282,9 @@
294
282
 
295
283
  case "searchCancelled":
296
284
  searchIsOn = false;
285
+ if(activeCategory){
286
+ CategoryChangeHandler({ data: { itemId: activeCategory }});
287
+ }
297
288
  break;
298
289
 
299
290
  case "searchActive":
@@ -375,6 +366,14 @@
375
366
  });
376
367
  }
377
368
 
369
+ const openFiltersModal = () => {
370
+ window.postMessage({ type: "ShowFilterModal" }, window.location.href);
371
+ }
372
+
373
+ const clearVendorFilter = () => {
374
+ window.postMessage({ type: "ClearVendorFilters" }, window.location.href);
375
+ }
376
+
378
377
  const getGamesIds = (favoritesArray:any = []) => {
379
378
  // construct favorite array used to check if game id is not already present in fav list
380
379
  favoredGamesCollection = [];
@@ -788,6 +787,33 @@
788
787
  </casino-random-game>
789
788
  {/if}
790
789
 
790
+ {#if !lobbyScreen}
791
+ <div class="FiltersButtonsContainer" part="FiltersButtonsContainer">
792
+ {#if numberOfFilters}
793
+ <div class="ClearFilterButtonWrapper" part="ClearFilterButtonWrapper" on:click="{() => clearVendorFilter()}">
794
+ <div class="ClearButton" part="ClearButton">{$_('casinoPage.clear')}
795
+ <span class="ClearIcon" part="ClearIcon">
796
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
797
+ viewBox="0 0 378.303 378.303" style="enable-background:new 0 0 378.303 378.303;" xml:space="preserve">
798
+ <polygon style="fill:var(--emfe-w-color-secondary, #FD2839);" points="378.303,28.285 350.018,0 189.151,160.867 28.285,0 0,28.285 160.867,189.151 0,350.018
799
+ 28.285,378.302 189.151,217.436 350.018,378.302 378.303,350.018 217.436,189.151 "/>
800
+ </svg>
801
+ </span>
802
+ </div>
803
+ </div>
804
+ {/if}
805
+ <div class="FilterButtonWrapper" part="FilterButtonWrapper" on:click='{() => {openFiltersModal()}}'>
806
+ <div class="FilterButton" part="FilterButton">{$_('casinoPage.filters')}</div>
807
+ <div class="FilterIconContainer" part="FilterIconContainer">
808
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 26 26"><defs><style>.a{fill:var(--emfe-w-color-white, #FFFFFF);}</style></defs><path class="a" d="M16.7,32.2a1.654,1.654,0,0,1-.636-.148,1.526,1.526,0,0,1-.867-1.393V20.578L5.433,10.588A1.543,1.543,0,0,1,5,9.491V7.742A1.512,1.512,0,0,1,6.5,6.2h23A1.512,1.512,0,0,1,31,7.742V9.491a1.543,1.543,0,0,1-.433,1.1L20.8,20.578v7.738a1.594,1.594,0,0,1-.52,1.156l-2.6,2.312A1.461,1.461,0,0,1,16.7,32.2ZM6.618,9.431l9.764,10.02a1.543,1.543,0,0,1,.433,1.1v9.813l2.34-2.075V20.519a1.543,1.543,0,0,1,.433-1.1L29.353,9.4V7.831H6.618Z" transform="translate(-5 -6.2)"/></svg>
809
+ <div class="NumberOfFiltersContainer" part="NumberOfFiltersContainer">
810
+ <span class="NumberOfFilters" part="NumberOfFilters">{numberOfFilters}</span>
811
+ </div>
812
+ </div>
813
+ </div>
814
+ </div>
815
+ {/if}
816
+
791
817
  {#if isLoading}
792
818
  <p class="SearchLoading" part="SearchLoading">{$_('casinoPage.loading')}</p>
793
819
  {:else if !searchIsOn}
@@ -816,6 +842,13 @@
816
842
  />
817
843
  </div>
818
844
  {/if}
845
+ {#if positioncasinocalendar && index == +positioncasinocalendar}
846
+ <br>
847
+ <casino-calendar
848
+ {cmsendpoint}
849
+ {lang}
850
+ />
851
+ {/if}
819
852
  {#if positionjackpotbanners && index == (positionjackpotbanners.split(',')[0] == '' ? shownCategories.length : +positionjackpotbanners.split(',')[0])}
820
853
  <br>
821
854
  <jackpot-banner
@@ -930,161 +963,26 @@
930
963
  {casinomygames}
931
964
  />
932
965
  {:else}
933
- {#if lobbyScreen}
934
- {#each shownCategories as category, index}
935
- {#if (enablecasinowinners === 'true') && index === 1}
936
- <div class="CasinoWinners">
937
- <casino-winners
938
- {session}
939
- {periodrecent}
940
- {periodtop}
941
- {numberusersrecent}
942
- {numberuserstop}
943
- {amountlimit}
944
- {isrecentavailable}
945
- {istopavailable}
946
- {defaultcurrency}
947
- {enableautoscroll}
948
- {tabsorder}
949
- {lang}
950
- {clientstyling}
951
- {clientstylingurl}
952
- {endpoint}
953
- />
954
- </div>
955
- {/if}
956
- {#if index === 4 && enablejackpotbanner == 'true'}
957
- <br>
958
- <jackpot-banner
959
- title="Egypt Quest"
960
- currency = {currency || 'RON'}
961
- gameid = "999"
962
- {endpoint}
963
- {lang}
964
- {backgroundsrc}
965
- {backgroundsrcmobile}
966
- {titlelogopath}
967
- {caticon0}
968
- {caticon1}
969
- {caticon2}
970
- {caticon3}
971
- {iconlabels}
972
- {visualstructure}
973
- {clientstyling}
974
- {clientstylingurl}
975
- />
976
- {:else if index === 6 && enablejackpotbanner == 'true'}
977
- <br>
978
- <jackpot-banner
979
- title="Jackpot Cards"
980
- currency = {currency || 'RON'}
981
- gameid = "998"
982
- {endpoint}
983
- {lang}
984
- backgroundsrc="/assets/background0.jpg"
985
- backgroundsrcmobile="/assets/background0.jpg"
986
- titlelogopath = "/assets/jackpots_logo.svg"
987
- caticon0="/assets/icon0.svg"
988
- caticon1="/assets/icon1.svg"
989
- caticon2="/assets/icon2.svg"
990
- caticon3="/assets/icon3.svg"
991
- {iconlabels}
992
- visualstructure="typeSpread"
993
- {clientstyling}
994
- {clientstylingurl}
995
- />
996
- {/if}
997
- {#if index == 7 && enablecollections == 'true'}
998
- <casino-collections-providers
999
- endpoint = {endpoint.slice(0, -2)}
1000
- {datasource}
1001
- {lang}
1002
- {type}
1003
- {titletype}
1004
- {clientstyling}
1005
- {clientstylingurl}>
1006
- </casino-collections-providers>
1007
- {:else if index == (shownCategories.length - 1) && enablecollections == 'true'}
1008
- <casino-collections-providers
1009
- endpoint = {endpoint.slice(0, -2)}
1010
- {datasource}
1011
- {lang}
1012
- type='vendor'
1013
- titletype="logo"
1014
- {clientstyling}
1015
- {clientstylingurl}>
1016
- </casino-collections-providers>
1017
- {/if}
1018
- <casino-games-category-section
1019
- session={session}
1020
- userid={userid}
1021
- endpoint={endpoint}
1022
- datasource={datasource}
1023
- lang={lang}
1024
- currency={currency}
1025
- use:sendCategoryData={category}
1026
- categoryid={category}
1027
- categoryindex={index}
1028
- categorygames="9"
1029
- favorites={favorites}
1030
- class="CategoryContainer"
1031
- style="background-color: {(index % 2 !== 0) ? categorybackground : 'transparent'}"
1032
- {clientstyling}
1033
- {clientstylingurl}
1034
- {livecasino}
1035
- {visiblegames}
1036
- {gamepagemodalurl}
1037
- {integratedgameframedesktop}
1038
- {integratedgameframemobile}
1039
- {casinomygames}
1040
- />
1041
- {/each}
1042
- {:else if myGamesSection}
1043
- <casino-my-games
1044
- userid={userid}
1045
- session={session}
1046
- endpoint={endpoint}
1047
- datasource={datasource}
1048
- lang={lang}
1049
- currency={currency}
1050
- favorites={favorites}
1051
- {clientstyling}
1052
- {clientstylingurl}
1053
- {livecasino}
1054
- {visiblegames}
1055
- {gamepagemodalurl}
1056
- {integratedgameframedesktop}
1057
- {integratedgameframemobile}
1058
- {translationurl}
1059
- {mostplayed}
1060
- {lastplayed}
1061
- {filteredcategories}
1062
- {activecategory}
1063
- categoryindex="0"
1064
- categoryid="MYGAMES"
1065
- />
1066
- {:else}
1067
- <casino-games-category-section
1068
- userid={userid}
1069
- endpoint={endpoint}
1070
- datasource={datasource}
1071
- favorites={favorites}
1072
- lang={lang}
1073
- currency={currency}
1074
- session={session}
1075
- categoryid={activeCategory}
1076
- categorygames="9"
1077
- class="CategoryContainer"
1078
- {clientstyling}
1079
- {clientstylingurl}
1080
- {livecasino}
1081
- {visiblegames}
1082
- {gamepagemodalurl}
1083
- {integratedgameframedesktop}
1084
- {integratedgameframemobile}
1085
- {casinomygames}
1086
- />
1087
- {/if}
966
+ <casino-games-category-section
967
+ userid={userid}
968
+ endpoint={endpoint}
969
+ datasource={datasource}
970
+ favorites={favorites}
971
+ lang={lang}
972
+ currency={currency}
973
+ session={session}
974
+ categoryid="RNG$popular-games"
975
+ categorygames="9"
976
+ class="CategoryContainer"
977
+ {clientstyling}
978
+ {clientstylingurl}
979
+ {livecasino}
980
+ {visiblegames}
981
+ {gamepagemodalurl}
982
+ {integratedgameframedesktop}
983
+ {integratedgameframemobile}
984
+ {casinomygames}
985
+ />
1088
986
  {/if}
1089
987
  {/if}
1090
988
  {#if isLoggedIn && haspanicbutton == "true"}
@@ -1296,8 +1194,7 @@
1296
1194
  }
1297
1195
 
1298
1196
  .FiltersButtonsContainer {
1299
- display: inline-flex;
1300
- flex-direction: row-reverse;
1197
+ display: flex;
1301
1198
  flex: 1;
1302
1199
  grid-gap: 20px;
1303
1200
  flex-direction: row-reverse;