@everymatrix/casino-page-nd 1.43.4 → 1.45.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/components/CasinoCalendar-BaOBa8QA.cjs +6 -0
- package/components/CasinoCalendar-Cy33jV__.js +4944 -0
- package/components/CasinoCalendarDailyDetails-DQQpSkBs.js +605 -0
- package/components/CasinoCalendarDailyDetails-GkvtCgJ7.cjs +1 -0
- package/components/CasinoCalendarDailyItem-CLTZq-09.cjs +1 -0
- package/components/CasinoCalendarDailyItem-DRjYmQvY.js +220 -0
- package/components/CasinoCollectionsProviders-BRMP9Loe.js +659 -0
- package/components/CasinoCollectionsProviders-BVrM9_-J.cjs +1 -0
- package/components/CasinoFavoritesSectionNd-AXQ2JUS4.cjs +1 -0
- package/components/CasinoFavoritesSectionNd-lR4QQgd8.js +418 -0
- package/components/CasinoFilter-CoIMk2Uk.js +628 -0
- package/components/CasinoFilter-Dtfc6EDd.cjs +1 -0
- package/components/CasinoGameThumbnailNd-DqBttZLW.cjs +39 -0
- package/components/CasinoGameThumbnailNd-ibSrwQHV.js +4403 -0
- package/components/CasinoGamesCategorySectionNd-D0S49tBe.js +3022 -0
- package/components/CasinoGamesCategorySectionNd-gNimye8Z.cjs +1 -0
- package/components/CasinoJackpotBanner-C1PFzuTK.js +619 -0
- package/components/CasinoJackpotBanner-CLzxeM6r.cjs +1 -0
- package/components/CasinoLastPlayedSectionNd-BDeLZhj5.js +563 -0
- package/components/CasinoLastPlayedSectionNd-BW2xLmkm.cjs +1 -0
- package/components/CasinoMostPlayedSectionNd-B-MVHU_k.cjs +1 -0
- package/components/CasinoMostPlayedSectionNd-D_44BcJt.js +580 -0
- package/components/CasinoMyGamesNd-CBKbxt--.js +1312 -0
- package/components/CasinoMyGamesNd-D6CSTig2.cjs +1 -0
- package/components/CasinoPageNd-BTu3kJYN.js +3524 -0
- package/components/CasinoPageNd-DdncSxLp.cjs +1 -0
- package/components/CasinoRandomGame-DjPEoghb.js +641 -0
- package/components/CasinoRandomGame-Dpvg_Gex.cjs +2 -0
- package/components/CasinoSearchNd-BuG6WXHV.cjs +1 -0
- package/components/CasinoSearchNd-CEBR6Dyh.js +1066 -0
- package/components/CasinoSort-C_BKJyhx.js +425 -0
- package/components/CasinoSort-xGpk7scM.cjs +1 -0
- package/components/CasinoWinners-BOUVtu8N.cjs +1 -0
- package/components/CasinoWinners-DcIZJcp-.js +884 -0
- package/components/GeneralAnimationLoading-CEONZ0El.cjs +1 -0
- package/components/GeneralAnimationLoading-Ci69lr1N.js +75 -0
- package/es2015/casino-page-nd.cjs +1 -0
- package/es2015/casino-page-nd.js +16 -0
- package/package.json +25 -32
- package/CHANGELOG.md +0 -13
- package/README.md +0 -30
- package/dist/casino-page-nd.js +0 -31
- package/dist/casino-page-nd.js.map +0 -1
- package/index.html +0 -37
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -67
- package/src/CasinoPage.svelte +0 -850
- package/src/CasinoPage.types.ts +0 -92
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -214
- package/stories/CasinoPage.stories.js +0 -13
- package/tsconfig.json +0 -6
package/src/CasinoPage.svelte
DELETED
|
@@ -1,850 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { onMount } from "svelte";
|
|
5
|
-
import { isMobile, getDevice } from 'rvhelper';
|
|
6
|
-
import { _, addNewMessages, setupI18n, setLocale } from './i18n';
|
|
7
|
-
import { TRANSLATIONS } from './translations';
|
|
8
|
-
import type {
|
|
9
|
-
CategoriesData,
|
|
10
|
-
CategoriesItems,
|
|
11
|
-
} from './CasinoPage.types';
|
|
12
|
-
|
|
13
|
-
import '@everymatrix/casino-games-category-section-nd';
|
|
14
|
-
import '@everymatrix/casino-random-game';
|
|
15
|
-
import '@everymatrix/casino-winners';
|
|
16
|
-
import '@everymatrix/casino-jackpot-banner';
|
|
17
|
-
import '@everymatrix/casino-collections-providers';
|
|
18
|
-
import '@everymatrix/casino-my-games-nd';
|
|
19
|
-
import '@everymatrix/casino-search-nd';
|
|
20
|
-
import '@everymatrix/casino-calendar';
|
|
21
|
-
|
|
22
|
-
export let endpoint:string = '';
|
|
23
|
-
export let env:string = '';
|
|
24
|
-
export let datasource:string = '';
|
|
25
|
-
export let currency:string = '';
|
|
26
|
-
export let lang:string = ''; // Language
|
|
27
|
-
export let session:string = ''; // Value for sessionID
|
|
28
|
-
export let userid:string = ''; // Value for UserID;
|
|
29
|
-
export let clientstyling:string = '';
|
|
30
|
-
export let userroles:string = '';
|
|
31
|
-
export let clientstylingurl:string = '';
|
|
32
|
-
export let translationurl:string = '';
|
|
33
|
-
export let cmsendpoint:string = '';
|
|
34
|
-
|
|
35
|
-
export let categorybackground:string = '';
|
|
36
|
-
export let visiblegames:string;
|
|
37
|
-
export let favorites:string = '';
|
|
38
|
-
export let haspanicbutton:string = 'false';
|
|
39
|
-
export let filteredcategories:string = '';
|
|
40
|
-
export let activecategory:string = '';
|
|
41
|
-
export let showgamename:string = '';
|
|
42
|
-
export let livecasino:string = 'false';
|
|
43
|
-
export let playrandomgame:string = 'false';
|
|
44
|
-
export let randomgameslider:string = 'false';
|
|
45
|
-
export let filteredrandomgamecategories:string = '';
|
|
46
|
-
export let gamepagemodalurl:string = 'false';
|
|
47
|
-
export let casinogamesgridslider: string = 'false';
|
|
48
|
-
//Casino Winners
|
|
49
|
-
export let positionwinnerswidget:string ='';
|
|
50
|
-
export let tabsorder:string = '';
|
|
51
|
-
export let enableautoscroll:string = '';
|
|
52
|
-
export let istopavailable:string = '';
|
|
53
|
-
export let isrecentavailable:string = '';
|
|
54
|
-
export let integratedgameframedesktop:string = 'false';
|
|
55
|
-
export let integratedgameframemobile:string = 'false';
|
|
56
|
-
export let periodrecent:string = '';
|
|
57
|
-
export let periodtop:string = '';
|
|
58
|
-
export let numberusersrecent:string = '';
|
|
59
|
-
export let numberuserstop:string = '';
|
|
60
|
-
export let amountlimit:string = '';
|
|
61
|
-
export let defaultcurrency:string = '';
|
|
62
|
-
export let showsubgroups:string = '';
|
|
63
|
-
//Jackpot Banners
|
|
64
|
-
export let positionjackpotbanners:string = '';
|
|
65
|
-
export let caticon0:string = '';
|
|
66
|
-
export let caticon1:string = '';
|
|
67
|
-
export let caticon2:string = '';
|
|
68
|
-
export let caticon3:string = '';
|
|
69
|
-
export let backgroundsrc:string='';
|
|
70
|
-
export let backgroundsrcmobile:string='';
|
|
71
|
-
export let titlelogopath = '';
|
|
72
|
-
export let iconlabels:string = '';
|
|
73
|
-
export let visualstructure:string = '';
|
|
74
|
-
//Casino Collections Providers
|
|
75
|
-
export let positioncollections:string = '';
|
|
76
|
-
export let type:string = '';
|
|
77
|
-
export let titletype:string = '';
|
|
78
|
-
export let collectionprovidersgamenames:string = '';
|
|
79
|
-
export let addfilterselector:string = 'false';
|
|
80
|
-
export let addsortingselector:string = 'false';
|
|
81
|
-
export let filterbylogo:string = '';
|
|
82
|
-
//Casino Calendar
|
|
83
|
-
export let positioncasinocalendar = '';
|
|
84
|
-
//Casino My Games
|
|
85
|
-
export let casinomygames:string = 'false';
|
|
86
|
-
export let mostplayed:string = '';
|
|
87
|
-
export let lastplayed:string = '';
|
|
88
|
-
export let lastplayedperiod:string = 'Last30Days';
|
|
89
|
-
export let mostplayedperiod:string = 'Last30Days';
|
|
90
|
-
export let lastplayedorder:string = '';
|
|
91
|
-
export let lastplayedlimit:string = '';
|
|
92
|
-
export let lastplayedunique: string = 'true';
|
|
93
|
-
export let mostplayedrounds:string = '';
|
|
94
|
-
export let winnersdatasources:string = '';
|
|
95
|
-
export let fetchviaevent:string = 'true';
|
|
96
|
-
//Je lobby widget
|
|
97
|
-
export let positionjelobbywidget:string = '';
|
|
98
|
-
//Casino Random Game Slider
|
|
99
|
-
export let specificcategory:string = '';
|
|
100
|
-
export let launchbygamecard:string = '';
|
|
101
|
-
export let iconvisible:string = '';
|
|
102
|
-
export let iconvisibleonanim:string = '';
|
|
103
|
-
|
|
104
|
-
// Button icon for random game widget
|
|
105
|
-
export let randombuttonicon:string = '';
|
|
106
|
-
|
|
107
|
-
let userAgent:any = window.navigator.userAgent;
|
|
108
|
-
let gameevent:string;
|
|
109
|
-
|
|
110
|
-
if (!isMobile(userAgent)) {
|
|
111
|
-
gameevent = 'ShowGameModal';
|
|
112
|
-
} else {
|
|
113
|
-
gameevent = 'OpenGameFrame';
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// CasinoPage loading state
|
|
117
|
-
let isLoading:boolean = false;
|
|
118
|
-
let hasErrors:boolean = false;
|
|
119
|
-
let isLoggedIn:boolean = false;
|
|
120
|
-
let error:string = '';
|
|
121
|
-
let playerID:string;
|
|
122
|
-
let sessionID:string;
|
|
123
|
-
let panicButton:HTMLElement;
|
|
124
|
-
let panicLoading:boolean = false;
|
|
125
|
-
let timer: number = 0;
|
|
126
|
-
let timerInterval:any;
|
|
127
|
-
|
|
128
|
-
// CasinoPage state
|
|
129
|
-
let myGamesSection:boolean = false;
|
|
130
|
-
let searchFocus:boolean = false;
|
|
131
|
-
let lobbyScreen:boolean = true;
|
|
132
|
-
let adjustingScroll:boolean = false;
|
|
133
|
-
let searchIsOn:boolean = false;
|
|
134
|
-
|
|
135
|
-
// Needs to be checked if there are relevant
|
|
136
|
-
let shownCategories:Array<CategoriesItems> = [];
|
|
137
|
-
let activeCategory:string;
|
|
138
|
-
let allCategoriesIds:string[] = [];
|
|
139
|
-
let searchWrapper:HTMLElement;
|
|
140
|
-
let searchElementWrapper:HTMLElement;
|
|
141
|
-
let searchPositionTop:number;
|
|
142
|
-
let searchedGamesCache:Object = {};
|
|
143
|
-
|
|
144
|
-
const scrollOffset:number = 0;
|
|
145
|
-
|
|
146
|
-
let scrollTop:boolean = false;
|
|
147
|
-
let activeRecentSearches:boolean = false;
|
|
148
|
-
let categoriesData;
|
|
149
|
-
let receivedFavoriteResults:Object;
|
|
150
|
-
let currentCategoryId:string = '';
|
|
151
|
-
let customStylingContainer:HTMLElement;
|
|
152
|
-
let firstLoad:boolean = false;
|
|
153
|
-
|
|
154
|
-
setupI18n({ withLocale: 'en', translations: {}});
|
|
155
|
-
|
|
156
|
-
const setTranslationUrl = ():void => {
|
|
157
|
-
let url:URL = new URL(translationurl);
|
|
158
|
-
|
|
159
|
-
fetch(url.href).then((res:any) => res.json())
|
|
160
|
-
.then((res) => {
|
|
161
|
-
Object.keys(res).forEach((item:any):void => {
|
|
162
|
-
addNewMessages(item, res[item]);
|
|
163
|
-
});
|
|
164
|
-
}).catch((err:any) => {
|
|
165
|
-
console.log(err);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
Object.keys(TRANSLATIONS).forEach((item):void => {
|
|
170
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
const CategoryChangeHandler = (categoryEvent:any):void => {
|
|
174
|
-
scrollTop = true;
|
|
175
|
-
casinomygames = 'false';
|
|
176
|
-
|
|
177
|
-
// needs to be executed after the page has been populated
|
|
178
|
-
setTimeout(() => {
|
|
179
|
-
window.postMessage({ type: 'WidgetTopReference', scrollTop }, window.location.href);
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
switch(categoryEvent.data.itemId) {
|
|
183
|
-
case 'LOBBY':
|
|
184
|
-
lobbyScreen = true;
|
|
185
|
-
myGamesSection = false;
|
|
186
|
-
activeCategory = '';
|
|
187
|
-
break;
|
|
188
|
-
|
|
189
|
-
case 'MYGAMES':
|
|
190
|
-
casinomygames = 'true';
|
|
191
|
-
lobbyScreen = false;
|
|
192
|
-
myGamesSection = true;
|
|
193
|
-
activeCategory = '';
|
|
194
|
-
break;
|
|
195
|
-
|
|
196
|
-
case 'FAVORITES':
|
|
197
|
-
lobbyScreen = false;
|
|
198
|
-
myGamesSection = true;
|
|
199
|
-
activeCategory = '';
|
|
200
|
-
break;
|
|
201
|
-
|
|
202
|
-
case 'MOSTPLAYED':
|
|
203
|
-
if (mostplayed == 'true') {
|
|
204
|
-
activeCategory = '';
|
|
205
|
-
lobbyScreen = false;
|
|
206
|
-
myGamesSection = true;
|
|
207
|
-
}
|
|
208
|
-
break;
|
|
209
|
-
|
|
210
|
-
case 'LASTPLAYED':
|
|
211
|
-
if (lastplayed == 'true') {
|
|
212
|
-
activeCategory = '';
|
|
213
|
-
lobbyScreen = false;
|
|
214
|
-
myGamesSection = true;
|
|
215
|
-
}
|
|
216
|
-
break;
|
|
217
|
-
|
|
218
|
-
default:
|
|
219
|
-
lobbyScreen = false;
|
|
220
|
-
myGamesSection = false;
|
|
221
|
-
activeCategory = categoryEvent.data.itemId;
|
|
222
|
-
break;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const messageHandler = (e:any):void => {
|
|
227
|
-
if (e.data) {
|
|
228
|
-
switch(e.data.type) {
|
|
229
|
-
// @TODO: removed and tested, but kept in case unforeseen issues occur - reason: multiple calls on category change
|
|
230
|
-
case 'CategoryChange':
|
|
231
|
-
CategoryChangeHandler(e);
|
|
232
|
-
break;
|
|
233
|
-
|
|
234
|
-
case 'UserSessionID':
|
|
235
|
-
sessionID = e.data.session;
|
|
236
|
-
playerID = e.data.userID;
|
|
237
|
-
|
|
238
|
-
break;
|
|
239
|
-
|
|
240
|
-
case 'ApplyFilters':
|
|
241
|
-
window.postMessage({ type: 'CategoryUpdate', itemId: currentCategoryId, origin: e.data.origin }, window.location.href);
|
|
242
|
-
break;
|
|
243
|
-
|
|
244
|
-
case 'CategoryVendors':
|
|
245
|
-
currentCategoryId = e.data.categoryid;
|
|
246
|
-
break;
|
|
247
|
-
|
|
248
|
-
case "searchCancelled":
|
|
249
|
-
searchIsOn = false;
|
|
250
|
-
if(activeCategory){
|
|
251
|
-
CategoryChangeHandler({ data: { itemId: activeCategory }});
|
|
252
|
-
}
|
|
253
|
-
break;
|
|
254
|
-
|
|
255
|
-
case "searchActive":
|
|
256
|
-
searchIsOn = true;
|
|
257
|
-
break;
|
|
258
|
-
|
|
259
|
-
case 'ModalClosed':
|
|
260
|
-
if(activeRecentSearches){
|
|
261
|
-
activeRecentSearches = false;
|
|
262
|
-
}
|
|
263
|
-
break;
|
|
264
|
-
|
|
265
|
-
case 'SubgroupsIds':
|
|
266
|
-
//Add subgroups ids fetched in the slider to the list of categories ids
|
|
267
|
-
if(!allCategoriesIds.some(categoryId => e.data.subGroupsIds.includes(categoryId))) {
|
|
268
|
-
allCategoriesIds.push(...e.data.subGroupsIds);
|
|
269
|
-
}
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
const getCategories = (url:any):Promise<any> => {
|
|
276
|
-
return new Promise((resolve, reject) => {
|
|
277
|
-
isLoading = true;
|
|
278
|
-
|
|
279
|
-
fetch(url)
|
|
280
|
-
.then((res:any) => res.json())
|
|
281
|
-
.then((data:CategoriesData) => {
|
|
282
|
-
isLoading = false;
|
|
283
|
-
|
|
284
|
-
resolve(data);
|
|
285
|
-
}).catch((err:any) => {
|
|
286
|
-
hasErrors = true;
|
|
287
|
-
isLoading = false;
|
|
288
|
-
|
|
289
|
-
console.error(err);
|
|
290
|
-
|
|
291
|
-
reject(err);
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
//
|
|
297
|
-
// --- START of communication with other widgets
|
|
298
|
-
//
|
|
299
|
-
|
|
300
|
-
const sendCategoryData = (node:any, categoryId:string):void => {
|
|
301
|
-
currentCategoryId = categoryId;
|
|
302
|
-
window.postMessage({ type: `CategoryData_${categoryId}`, categoryId, visiblegames, receivedFavoriteResults }, window.location.href);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
//
|
|
306
|
-
// --- END of communication with other widgets
|
|
307
|
-
//
|
|
308
|
-
|
|
309
|
-
/* Listen for scroll */
|
|
310
|
-
const scrollHandler = ():void => {
|
|
311
|
-
if (searchElementWrapper) {
|
|
312
|
-
searchPositionTop = searchElementWrapper.getBoundingClientRect().top + document.body.getBoundingClientRect().top;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
if (document.documentElement.scrollTop > searchPositionTop || searchPositionTop > 130) {
|
|
316
|
-
adjustingScroll = true;
|
|
317
|
-
} else {
|
|
318
|
-
adjustingScroll = false;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
const checkAttrs = ():boolean => {
|
|
323
|
-
if (!endpoint) {
|
|
324
|
-
error = "Endpoint is missing! Please provide a valid endpointURL.";
|
|
325
|
-
hasErrors = true;
|
|
326
|
-
isLoading = false;
|
|
327
|
-
|
|
328
|
-
console.error(error);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
if (!datasource) {
|
|
332
|
-
error = "Datasource is missing! Please provide a valid datasource.";
|
|
333
|
-
hasErrors = true;
|
|
334
|
-
isLoading = false;
|
|
335
|
-
|
|
336
|
-
console.error(error);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
if (!lang || lang.length < 2) {
|
|
340
|
-
error = "Language is missing! Please provide a valid language (alpha2code)";
|
|
341
|
-
hasErrors = true;
|
|
342
|
-
isLoading = false;
|
|
343
|
-
|
|
344
|
-
console.error(error);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
return hasErrors;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
const updateCategoriesLanguage = ():void => {
|
|
351
|
-
if (firstLoad) {
|
|
352
|
-
setTimeout(() => {
|
|
353
|
-
window.postMessage({ type: 'CategoryUpdate', itemId: activeCategory}, window.location.href);
|
|
354
|
-
}, 500);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
firstLoad = false;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
const initialSetup = ():void => {
|
|
361
|
-
if (!checkAttrs()) {
|
|
362
|
-
isLoading = true;
|
|
363
|
-
|
|
364
|
-
setLocale(lang);
|
|
365
|
-
|
|
366
|
-
let categoriesUrl:URL = new URL(`${endpoint}/v1/casino/groups/${datasource}`);
|
|
367
|
-
|
|
368
|
-
categoriesUrl.searchParams.append('language', lang);
|
|
369
|
-
categoriesUrl.searchParams.append('platform', getDevice(userAgent));
|
|
370
|
-
|
|
371
|
-
getCategories(categoriesUrl).then((data:CategoriesData) => {
|
|
372
|
-
// create an array of filtered categories
|
|
373
|
-
let arrayFilteredCategories = filteredcategories.split(',');
|
|
374
|
-
|
|
375
|
-
if (data) {
|
|
376
|
-
categoriesData = data.items.filter((item:any) => {
|
|
377
|
-
let filtered:boolean;
|
|
378
|
-
if( item.games.total > 0 ) {
|
|
379
|
-
filtered = true;
|
|
380
|
-
|
|
381
|
-
// exclude filtered categories
|
|
382
|
-
if( filteredcategories ){
|
|
383
|
-
for (let element of arrayFilteredCategories){
|
|
384
|
-
if( item.flags == element ) filtered = false;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
return filtered;
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
shownCategories = categoriesData.filter(category => {
|
|
392
|
-
if (category?.subGroups?.count > 0 && showsubgroups == 'true') {
|
|
393
|
-
return false;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
return true;
|
|
397
|
-
}).map((category) => category.id);
|
|
398
|
-
// Create a list of all categories to check the activecategory against.
|
|
399
|
-
allCategoriesIds = data.items.map(category => category.id.toString());
|
|
400
|
-
isLoading = false;
|
|
401
|
-
}
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
searchElementWrapper = searchWrapper;
|
|
405
|
-
|
|
406
|
-
if (searchElementWrapper) {
|
|
407
|
-
searchPositionTop = searchElementWrapper.getBoundingClientRect().top - document.body.getBoundingClientRect().top;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
const setActiveCategory = ():void => {
|
|
413
|
-
activeCategory = activecategory;
|
|
414
|
-
CategoryChangeHandler({ data: { itemId: activeCategory }});
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
const checkExistentCategory = ():void => {
|
|
418
|
-
// Check if the active category is found in the list of available categories. IF not send event to the state manager.
|
|
419
|
-
if (allCategoriesIds && !allCategoriesIds.includes(decodeURI(activeCategory)) && activeCategory != '') {
|
|
420
|
-
window.postMessage({type: 'NonExistentCategory'}, window.location.href);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
const setSession = ():void => {
|
|
425
|
-
isLoggedIn = true;
|
|
426
|
-
sessionID = session;
|
|
427
|
-
playerID = userid;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
const startInterval = (e:any):void => {
|
|
431
|
-
timer = 0;
|
|
432
|
-
|
|
433
|
-
timerInterval = setInterval(() => {
|
|
434
|
-
timer += 1;
|
|
435
|
-
panicLoading = true;
|
|
436
|
-
|
|
437
|
-
if (timer >= 3) {
|
|
438
|
-
window.postMessage({type: 'PanicButtonClicked'}, window.location.href);
|
|
439
|
-
clearInterval(timerInterval)
|
|
440
|
-
}
|
|
441
|
-
}, 1000);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
const endInterval = (e:any):void => {
|
|
445
|
-
if (timer < 3) {
|
|
446
|
-
panicLoading = false;
|
|
447
|
-
}
|
|
448
|
-
clearInterval(timerInterval);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
const addEventsToDisplayedElements = ():void => {
|
|
452
|
-
panicButton?.addEventListener("mousedown", startInterval, false);
|
|
453
|
-
panicButton?.addEventListener('touchstart', startInterval, false);
|
|
454
|
-
|
|
455
|
-
// on mouseup stop interval count
|
|
456
|
-
panicButton?.addEventListener("mouseup", endInterval, false);
|
|
457
|
-
panicButton?.addEventListener("touchend", endInterval, false);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
const removeEventsToDisplayedElements = ():void => {
|
|
461
|
-
panicLoading = false;
|
|
462
|
-
panicButton?.removeEventListener("mousedown", startInterval);
|
|
463
|
-
panicButton?.removeEventListener('touchstart', startInterval);
|
|
464
|
-
|
|
465
|
-
// on mouseup stop interval count
|
|
466
|
-
panicButton?.removeEventListener("mouseup", endInterval);
|
|
467
|
-
panicButton?.removeEventListener("touchend", endInterval);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
const setClientStyling = ():void => {
|
|
471
|
-
let sheet = document.createElement('style');
|
|
472
|
-
sheet.innerHTML = clientstyling;
|
|
473
|
-
customStylingContainer.appendChild(sheet);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
const setClientStylingURL = ():void => {
|
|
477
|
-
let cssFile:HTMLElement = document.createElement('style');
|
|
478
|
-
|
|
479
|
-
fetch(new URL(clientstylingurl))
|
|
480
|
-
.then((res:any) => res.text())
|
|
481
|
-
.then((data:any) => {
|
|
482
|
-
cssFile.innerHTML = data
|
|
483
|
-
|
|
484
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile); }, 1);
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
onMount(() => {
|
|
489
|
-
window.addEventListener('scroll', scrollHandler, false);
|
|
490
|
-
window.addEventListener('message', messageHandler, false);
|
|
491
|
-
|
|
492
|
-
return () => {
|
|
493
|
-
window.removeEventListener('scroll', scrollHandler);
|
|
494
|
-
window.removeEventListener('message', messageHandler);
|
|
495
|
-
|
|
496
|
-
removeEventsToDisplayedElements();
|
|
497
|
-
}
|
|
498
|
-
});
|
|
499
|
-
|
|
500
|
-
$: lang && activecategory && setActiveCategory();
|
|
501
|
-
$: session && userid && endpoint && setSession();
|
|
502
|
-
$: activeCategory && allCategoriesIds && checkExistentCategory();
|
|
503
|
-
$: endpoint && datasource && lang && initialSetup();
|
|
504
|
-
$: lang && updateCategoriesLanguage();
|
|
505
|
-
$: translationurl && setTranslationUrl();
|
|
506
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
|
507
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
508
|
-
$: panicButton && addEventsToDisplayedElements();
|
|
509
|
-
</script>
|
|
510
|
-
|
|
511
|
-
<svelte:head>
|
|
512
|
-
<script type="module" src="https://unpkg.com/@everymatrix/casino-play-random-game"></script>
|
|
513
|
-
</svelte:head>
|
|
514
|
-
|
|
515
|
-
<div bind:this={customStylingContainer}>
|
|
516
|
-
{#if hasErrors}
|
|
517
|
-
<p class="SearchLoading">{$_('500')}</p>
|
|
518
|
-
{:else}
|
|
519
|
-
<section class="CategoriesLobby">
|
|
520
|
-
|
|
521
|
-
<casino-search-nd
|
|
522
|
-
{endpoint} {datasource} {showgamename} {lang} {clientstyling} {clientstylingurl} {integratedgameframedesktop} {integratedgameframemobile} {translationurl} showfavorites = {favorites}
|
|
523
|
-
></casino-search-nd>
|
|
524
|
-
|
|
525
|
-
{#if playrandomgame == 'true' && searchFocus == false && !searchIsOn}
|
|
526
|
-
<casino-random-game {datasource} {filteredrandomgamecategories} {endpoint} {lang} {gameevent} {randombuttonicon} {clientstyling} {clientstylingurl}>
|
|
527
|
-
</casino-random-game>
|
|
528
|
-
{/if}
|
|
529
|
-
|
|
530
|
-
{#if randomgameslider == 'true' && searchFocus == false && !searchIsOn}
|
|
531
|
-
<casino-play-random-game {datasource} {endpoint} language={lang} specific-category={specificcategory} icon-visible={iconvisible} icon-visible-on-anim={iconvisibleonanim} launch-by-game-card={launchbygamecard} client-styling={clientstyling} client-styling-url={clientstylingurl} translation-url={translationurl}></casino-play-random-game>
|
|
532
|
-
{/if}
|
|
533
|
-
|
|
534
|
-
{#if isLoading}
|
|
535
|
-
<p class="SearchLoading">{$_('loading')}</p>
|
|
536
|
-
{:else if !searchIsOn}
|
|
537
|
-
{#if lobbyScreen}
|
|
538
|
-
{#each shownCategories as category, index}
|
|
539
|
-
{#if positionwinnerswidget && index == +positionwinnerswidget}
|
|
540
|
-
<div class="CasinoWinners">
|
|
541
|
-
<casino-winners
|
|
542
|
-
{session}
|
|
543
|
-
{userid}
|
|
544
|
-
{periodrecent}
|
|
545
|
-
{periodtop}
|
|
546
|
-
{numberusersrecent}
|
|
547
|
-
{numberuserstop}
|
|
548
|
-
{amountlimit}
|
|
549
|
-
{isrecentavailable}
|
|
550
|
-
{istopavailable}
|
|
551
|
-
{defaultcurrency}
|
|
552
|
-
usercurrency={currency}
|
|
553
|
-
{enableautoscroll}
|
|
554
|
-
{tabsorder}
|
|
555
|
-
{lang}
|
|
556
|
-
{clientstyling}
|
|
557
|
-
{clientstylingurl}
|
|
558
|
-
{endpoint}
|
|
559
|
-
{winnersdatasources}
|
|
560
|
-
/>
|
|
561
|
-
</div>
|
|
562
|
-
{/if}
|
|
563
|
-
{#if positioncasinocalendar && index == +positioncasinocalendar}
|
|
564
|
-
<br>
|
|
565
|
-
<casino-calendar
|
|
566
|
-
{userroles}
|
|
567
|
-
{cmsendpoint}
|
|
568
|
-
{env}
|
|
569
|
-
{lang}
|
|
570
|
-
{clientstyling}
|
|
571
|
-
{clientstylingurl}
|
|
572
|
-
/>
|
|
573
|
-
{/if}
|
|
574
|
-
{#if positionjelobbywidget && index == +positionjelobbywidget}
|
|
575
|
-
<br>
|
|
576
|
-
<slot name="je-jackpots-widget" class="{isMobile(userAgent) ? '' : 'JackpotsContainer'}"></slot>
|
|
577
|
-
{/if}
|
|
578
|
-
{#if positionjackpotbanners && index == (positionjackpotbanners.split(',')[0] == '' ? shownCategories.length : +positionjackpotbanners.split(',')[0])}
|
|
579
|
-
<br>
|
|
580
|
-
<casino-jackpot-banner
|
|
581
|
-
title="Egypt Quest"
|
|
582
|
-
currency = {currency || 'RON'}
|
|
583
|
-
gameid = "998"
|
|
584
|
-
{endpoint}
|
|
585
|
-
{lang}
|
|
586
|
-
{backgroundsrc}
|
|
587
|
-
{backgroundsrcmobile}
|
|
588
|
-
{titlelogopath}
|
|
589
|
-
{caticon0}
|
|
590
|
-
{caticon1}
|
|
591
|
-
{caticon2}
|
|
592
|
-
{caticon3}
|
|
593
|
-
{iconlabels}
|
|
594
|
-
{visualstructure}
|
|
595
|
-
{clientstyling}
|
|
596
|
-
{clientstylingurl}
|
|
597
|
-
/>
|
|
598
|
-
{:else if positionjackpotbanners && index == (positionjackpotbanners.split(',')[1] == '' ? shownCategories.length : +positionjackpotbanners.split(',')[1])}
|
|
599
|
-
<br>
|
|
600
|
-
<casino-jackpot-banner
|
|
601
|
-
title="Jackpot Cards"
|
|
602
|
-
currency = {currency || 'RON'}
|
|
603
|
-
gameid = "999"
|
|
604
|
-
{endpoint}
|
|
605
|
-
{lang}
|
|
606
|
-
backgroundsrc="/assets/background0.jpg"
|
|
607
|
-
backgroundsrcmobile="/assets/background0.jpg"
|
|
608
|
-
titlelogopath = "/assets/jackpots_logo.svg"
|
|
609
|
-
caticon0="/assets/icon0.svg"
|
|
610
|
-
caticon1="/assets/icon1.svg"
|
|
611
|
-
caticon2="/assets/icon2.svg"
|
|
612
|
-
caticon3="/assets/icon3.svg"
|
|
613
|
-
visualstructure="typeSpread"
|
|
614
|
-
{clientstyling}
|
|
615
|
-
{clientstylingurl}
|
|
616
|
-
/>
|
|
617
|
-
{/if}
|
|
618
|
-
{#if positioncollections && index ==(positioncollections.split(',')[0] == '' ? shownCategories.length : +positioncollections.split(',')[0])}
|
|
619
|
-
<casino-collections-providers
|
|
620
|
-
{endpoint}
|
|
621
|
-
{datasource}
|
|
622
|
-
{lang}
|
|
623
|
-
{type}
|
|
624
|
-
{collectionprovidersgamenames}
|
|
625
|
-
{titletype}
|
|
626
|
-
{clientstyling}
|
|
627
|
-
{clientstylingurl}>
|
|
628
|
-
</casino-collections-providers>
|
|
629
|
-
{:else if positioncollections && index == (positioncollections.split(',')[1] == '' ? shownCategories.length : +positioncollections.split(',')[1])}
|
|
630
|
-
<casino-collections-providers
|
|
631
|
-
{endpoint}
|
|
632
|
-
{datasource}
|
|
633
|
-
{lang}
|
|
634
|
-
type='vendor'
|
|
635
|
-
titletype="logo"
|
|
636
|
-
{collectionprovidersgamenames}
|
|
637
|
-
{clientstyling}
|
|
638
|
-
{clientstylingurl}>
|
|
639
|
-
</casino-collections-providers>
|
|
640
|
-
{/if}
|
|
641
|
-
<casino-games-category-section-nd
|
|
642
|
-
session={session}
|
|
643
|
-
userid={userid}
|
|
644
|
-
endpoint={endpoint}
|
|
645
|
-
datasource={datasource}
|
|
646
|
-
lang={lang}
|
|
647
|
-
currency={currency}
|
|
648
|
-
use:sendCategoryData={category}
|
|
649
|
-
categoryid={category}
|
|
650
|
-
categoryindex={index}
|
|
651
|
-
categorygames="9"
|
|
652
|
-
fetchviaevent={fetchviaevent}
|
|
653
|
-
favorites={favorites}
|
|
654
|
-
{showgamename}
|
|
655
|
-
{translationurl}
|
|
656
|
-
class="CategoryContainer"
|
|
657
|
-
style="background-color: {(index % 2 !== 0) ? categorybackground : 'transparent'}"
|
|
658
|
-
{clientstyling}
|
|
659
|
-
{clientstylingurl}
|
|
660
|
-
{livecasino}
|
|
661
|
-
{visiblegames}
|
|
662
|
-
{gamepagemodalurl}
|
|
663
|
-
{integratedgameframedesktop}
|
|
664
|
-
{integratedgameframemobile}
|
|
665
|
-
{casinomygames}
|
|
666
|
-
{filterbylogo}
|
|
667
|
-
{addfilterselector}
|
|
668
|
-
{addsortingselector}
|
|
669
|
-
{casinogamesgridslider}
|
|
670
|
-
/>
|
|
671
|
-
{/each}
|
|
672
|
-
{:else if myGamesSection}
|
|
673
|
-
<casino-my-games-nd
|
|
674
|
-
userid={userid}
|
|
675
|
-
session={session}
|
|
676
|
-
endpoint={endpoint}
|
|
677
|
-
datasource={datasource}
|
|
678
|
-
lang={lang}
|
|
679
|
-
currency={currency}
|
|
680
|
-
favorites={favorites}
|
|
681
|
-
{clientstyling}
|
|
682
|
-
{clientstylingurl}
|
|
683
|
-
{livecasino}
|
|
684
|
-
{visiblegames}
|
|
685
|
-
{gamepagemodalurl}
|
|
686
|
-
{showgamename}
|
|
687
|
-
{integratedgameframedesktop}
|
|
688
|
-
{integratedgameframemobile}
|
|
689
|
-
{translationurl}
|
|
690
|
-
{mostplayed}
|
|
691
|
-
{lastplayed}
|
|
692
|
-
{filteredcategories}
|
|
693
|
-
{activecategory}
|
|
694
|
-
{lastplayedunique}
|
|
695
|
-
categoryindex="0"
|
|
696
|
-
categoryid="MYGAMES"
|
|
697
|
-
{casinomygames}
|
|
698
|
-
{lastplayedperiod}
|
|
699
|
-
{mostplayedperiod}
|
|
700
|
-
{lastplayedorder}
|
|
701
|
-
{lastplayedlimit}
|
|
702
|
-
{mostplayedrounds}/>
|
|
703
|
-
{:else}
|
|
704
|
-
<casino-games-category-section-nd
|
|
705
|
-
userid={userid}
|
|
706
|
-
endpoint={endpoint}
|
|
707
|
-
datasource={datasource}
|
|
708
|
-
favorites={favorites}
|
|
709
|
-
lang={lang}
|
|
710
|
-
currency={currency}
|
|
711
|
-
session={session}
|
|
712
|
-
categoryid={activeCategory}
|
|
713
|
-
categorygames="9"
|
|
714
|
-
fetchviaevent={fetchviaevent}
|
|
715
|
-
class="CategoryContainer"
|
|
716
|
-
{showgamename}
|
|
717
|
-
{translationurl}
|
|
718
|
-
{clientstyling}
|
|
719
|
-
{clientstylingurl}
|
|
720
|
-
{livecasino}
|
|
721
|
-
{visiblegames}
|
|
722
|
-
{gamepagemodalurl}
|
|
723
|
-
{integratedgameframedesktop}
|
|
724
|
-
{integratedgameframemobile}
|
|
725
|
-
{casinomygames}
|
|
726
|
-
{filterbylogo}
|
|
727
|
-
{addfilterselector}
|
|
728
|
-
{addsortingselector}
|
|
729
|
-
{casinogamesgridslider}/>
|
|
730
|
-
{/if}
|
|
731
|
-
{/if}
|
|
732
|
-
{#if isLoggedIn && haspanicbutton == "true"}
|
|
733
|
-
<div class="PanicSection {(getDevice(userAgent) !== 'PC') ? 'PanicSectionMobile' : ''}">
|
|
734
|
-
<button class="PanicButton {(getDevice(userAgent) !== 'PC') ? 'PanicButtonMobile ' : ''}" class:PanicButtonAnimation={panicLoading} bind:this={panicButton} >{$_('breakButton')}</button>
|
|
735
|
-
</div>
|
|
736
|
-
{/if}
|
|
737
|
-
</section>
|
|
738
|
-
{/if}
|
|
739
|
-
</div>
|
|
740
|
-
<style lang="scss">
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
*, *::before, *::after {
|
|
745
|
-
margin: 0;
|
|
746
|
-
padding: 0;
|
|
747
|
-
box-sizing: border-box;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
.CategoriesLobby {
|
|
751
|
-
margin: 0 auto;
|
|
752
|
-
max-width: 1300px;
|
|
753
|
-
position: relative;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.CasinoWinners {
|
|
757
|
-
background: transparent;
|
|
758
|
-
width: 100%;
|
|
759
|
-
min-height: 200px;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.PanicSectionMobile {
|
|
763
|
-
flex-direction: column;
|
|
764
|
-
margin: 20px 0;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
.PanicSection {
|
|
768
|
-
display: flex;
|
|
769
|
-
justify-content: center;
|
|
770
|
-
align-items: center;
|
|
771
|
-
gap: 10px;
|
|
772
|
-
margin-top: 20px;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
.PanicButton {
|
|
776
|
-
border-radius: 5px;
|
|
777
|
-
border: 1px solid var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
778
|
-
background-color: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
779
|
-
width: 280px;
|
|
780
|
-
height: 48px;
|
|
781
|
-
line-height: 18px;
|
|
782
|
-
color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
783
|
-
cursor: pointer;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
.PanicButtonAnimation {
|
|
787
|
-
background: -webkit-linear-gradient(
|
|
788
|
-
135deg,
|
|
789
|
-
rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%
|
|
790
|
-
);
|
|
791
|
-
|
|
792
|
-
background: -moz-linear-gradient(
|
|
793
|
-
135deg,
|
|
794
|
-
rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%
|
|
795
|
-
);
|
|
796
|
-
|
|
797
|
-
background: -o-linear-gradient(
|
|
798
|
-
135deg,
|
|
799
|
-
rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.3) 100%
|
|
800
|
-
);
|
|
801
|
-
|
|
802
|
-
background-color: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
803
|
-
width: 280px;
|
|
804
|
-
color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
805
|
-
|
|
806
|
-
-webkit-animation: bar-animation 2s linear;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
.PanicButtonMobile {
|
|
810
|
-
width: 280px;
|
|
811
|
-
padding: 0 5px;
|
|
812
|
-
|
|
813
|
-
// Remove text selection for panic button on mobile
|
|
814
|
-
-webkit-touch-callout: none; /* iOS Safari */
|
|
815
|
-
-webkit-user-select: none; /* Safari */
|
|
816
|
-
-moz-user-select: none; /* Old versions of Firefox */
|
|
817
|
-
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
818
|
-
user-select: none;
|
|
819
|
-
// End of removing selection properties
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
@-webkit-keyframes bar-animation {
|
|
823
|
-
0% {
|
|
824
|
-
background-position: 0;
|
|
825
|
-
}
|
|
826
|
-
100% {
|
|
827
|
-
background-position: 280px;
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
[type="search"] {
|
|
833
|
-
appearance: none;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.CategoryContainer, .JackpotsContainer {
|
|
837
|
-
display: block;
|
|
838
|
-
|
|
839
|
-
@media screen and (max-width: 1300px) {
|
|
840
|
-
padding: 0 2.4%
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
.SearchLoading {
|
|
845
|
-
color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
846
|
-
font-size: 14px;
|
|
847
|
-
margin-top: 16px;
|
|
848
|
-
text-align: center;
|
|
849
|
-
}
|
|
850
|
-
</style>
|