@everymatrix/casino-search 1.44.0 → 1.45.2
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/CasinoGameThumbnail-Ddb3PiAI.cjs +51 -0
- package/components/CasinoGameThumbnail-MxWJOgVs.js +8713 -0
- package/components/CasinoSearch-CkuPFU0F.js +1076 -0
- package/components/CasinoSearch-CnVMRafe.cjs +1 -0
- package/es2015/casino-search.cjs +1 -0
- package/es2015/casino-search.js +16 -0
- package/package.json +17 -32
- package/CHANGELOG.md +0 -9
- package/README.md +0 -30
- package/dist/casino-search.js +0 -17351
- package/dist/casino-search.js.map +0 -1
- package/index.html +0 -101
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -59
- package/src/CasinoSearch.svelte +0 -732
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -173
- package/stories/CasinoSearch.stories.js +0 -13
- package/tsconfig.json +0 -6
package/src/CasinoSearch.svelte
DELETED
|
@@ -1,732 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import { _, addNewMessages, setLocale } from './i18n';
|
|
5
|
-
import { TRANSLATIONS } from './translations.js';
|
|
6
|
-
import { getDevice } from 'rvhelper';
|
|
7
|
-
import { onMount } from 'svelte';
|
|
8
|
-
|
|
9
|
-
import '@everymatrix/casino-game-thumbnail';
|
|
10
|
-
import moment from 'moment';
|
|
11
|
-
|
|
12
|
-
export let endpoint:string = '';
|
|
13
|
-
export let datasource:string = '';
|
|
14
|
-
export let session:string = '';
|
|
15
|
-
export let userid:string = '';
|
|
16
|
-
export let lang:string = 'en';
|
|
17
|
-
export let clientstyling:string = '';
|
|
18
|
-
export let clientstylingurl:string = '';
|
|
19
|
-
export let integratedgameframedesktop:string = 'false';
|
|
20
|
-
export let integratedgameframemobile:string = 'false';
|
|
21
|
-
export let showgamename:string = '';
|
|
22
|
-
export let gamepagemodalurl:string = 'true';
|
|
23
|
-
export let translationurl:string = '';
|
|
24
|
-
export let showfavorites:string = '';
|
|
25
|
-
export let cancelbutton:string = 'true';
|
|
26
|
-
export let notfoundicon:string = 'false';
|
|
27
|
-
|
|
28
|
-
let userAgent:any = window.navigator.userAgent;
|
|
29
|
-
let searchArray:Array<any> = [];
|
|
30
|
-
let searchedValues:any = [];
|
|
31
|
-
let gamesCache:Object = {};
|
|
32
|
-
|
|
33
|
-
let searchValue:string = '';
|
|
34
|
-
let searchElement:HTMLElement;
|
|
35
|
-
let searchCancelled:boolean = true;
|
|
36
|
-
let searchActive:boolean = false;
|
|
37
|
-
let searchInputMaxLength:number = 50;
|
|
38
|
-
|
|
39
|
-
let isLoading:boolean = false;
|
|
40
|
-
let customStylingContainer:HTMLElement;
|
|
41
|
-
|
|
42
|
-
let isLoggedIn:boolean = false;
|
|
43
|
-
let sessionID:string;
|
|
44
|
-
let playerID:string;
|
|
45
|
-
let favoriteGamesIds: string[] = [];
|
|
46
|
-
|
|
47
|
-
const setTranslationUrl = ():void => {
|
|
48
|
-
let url:string = translationurl;
|
|
49
|
-
|
|
50
|
-
fetch(url).then((res:any) => res.json())
|
|
51
|
-
.then((res) => {
|
|
52
|
-
Object.keys(res).forEach((item:any):void => {
|
|
53
|
-
addNewMessages(item, res[item]);
|
|
54
|
-
});
|
|
55
|
-
}).catch((err:any) => {
|
|
56
|
-
console.log(err);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
Object.keys(TRANSLATIONS).forEach((item:any):void => {
|
|
61
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
const messageHandler = (e:any):void => {
|
|
65
|
-
|
|
66
|
-
if (e.data && e.data.type == 'SearchedItemClicked') {
|
|
67
|
-
addSearchedItem(e.data.gameId);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (e.data.type == 'UserSessionID') {
|
|
71
|
-
sessionID = e.data.session;
|
|
72
|
-
playerID = e.data.userid;
|
|
73
|
-
isLoggedIn = true;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (e.data.type == 'CategoryChange') {
|
|
77
|
-
cancelSearch();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
const onFocus = ():void => {
|
|
82
|
-
searchCancelled = false;
|
|
83
|
-
searchActive = true;
|
|
84
|
-
|
|
85
|
-
if (endpoint && datasource && lang) {
|
|
86
|
-
if (searchValue.length < 2) {
|
|
87
|
-
searchArray = [];
|
|
88
|
-
let recentSearchedGames = localStorage.getItem(`searchedGamesWds_casino`);
|
|
89
|
-
let recentSearchedGamesArray:Array<any> = [];
|
|
90
|
-
|
|
91
|
-
if (recentSearchedGames) {
|
|
92
|
-
recentSearchedGamesArray = recentSearchedGames.split(',');
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
let promises:Array<Promise<any>> = [];
|
|
96
|
-
let index = 0;
|
|
97
|
-
let length = recentSearchedGamesArray.length;
|
|
98
|
-
|
|
99
|
-
if (length > 0) {
|
|
100
|
-
for (index = 0; index < length; index++) {
|
|
101
|
-
let url:any = new URL(`${endpoint}/v1/casino/games/${recentSearchedGamesArray[index]}`);
|
|
102
|
-
|
|
103
|
-
url.searchParams.append('language', lang);
|
|
104
|
-
url.searchParams.append('datasource', datasource);
|
|
105
|
-
url.searchParams.append('platform', getDevice(userAgent));
|
|
106
|
-
|
|
107
|
-
promises.push(getGame(url, recentSearchedGamesArray[index]));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
Promise.all(promises).then((res:any):void => {
|
|
111
|
-
res = res.filter(function( element ) {
|
|
112
|
-
return !!element;
|
|
113
|
-
});
|
|
114
|
-
searchArray = res.map((item) => {
|
|
115
|
-
item.isFavorite = checkFavorite(item.id);
|
|
116
|
-
|
|
117
|
-
return item;
|
|
118
|
-
});
|
|
119
|
-
if(searchArray.length){
|
|
120
|
-
handleGtag('searchSuccess', 'SearchWidget');
|
|
121
|
-
} else {
|
|
122
|
-
handleGtag('searchFail', 'SearchWidget');
|
|
123
|
-
}
|
|
124
|
-
}).catch(e=>{
|
|
125
|
-
handleGtag('searchError', 'SearchWidget');
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
sendSearchStatus(searchActive);
|
|
131
|
-
|
|
132
|
-
handleGtag('searchAttempt', 'SearchWidget');
|
|
133
|
-
|
|
134
|
-
//Analytics event
|
|
135
|
-
handleGtag('SearchInitialized', 'SearchWidget');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// function handle for google Analytics
|
|
139
|
-
const handleGtag = (event, context) => {
|
|
140
|
-
if(typeof gtag == 'function'){
|
|
141
|
-
gtag('event', event, {
|
|
142
|
-
context
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// function handle for overlay onClick to cancleSearch
|
|
148
|
-
const handleOverlay = () => {
|
|
149
|
-
if(cancelbutton != 'true'){
|
|
150
|
-
cancelSearch()
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const getGames = (url:URL):Promise<any> => {
|
|
155
|
-
return new Promise((resolve, reject):void => {
|
|
156
|
-
isLoading = true;
|
|
157
|
-
|
|
158
|
-
fetch(url.href)
|
|
159
|
-
.then((res:any) => res.json())
|
|
160
|
-
.then((games:any) => {
|
|
161
|
-
isLoading = false;
|
|
162
|
-
|
|
163
|
-
resolve(games);
|
|
164
|
-
}).catch((err:any) => {
|
|
165
|
-
isLoading = false;
|
|
166
|
-
|
|
167
|
-
console.error(err);
|
|
168
|
-
|
|
169
|
-
reject(err);
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const getGame = (url:any, gameId?:string):Promise<any> => {
|
|
175
|
-
return new Promise((resolve, reject) => {
|
|
176
|
-
isLoading = true;
|
|
177
|
-
|
|
178
|
-
if (gameId && Object.keys(gamesCache).indexOf(gameId) >= 0) {
|
|
179
|
-
isLoading = false;
|
|
180
|
-
|
|
181
|
-
resolve(gamesCache[gameId]);
|
|
182
|
-
} else {
|
|
183
|
-
fetch(url)
|
|
184
|
-
.then(fetchRes => fetchRes.json())
|
|
185
|
-
.then(gameData => {
|
|
186
|
-
isLoading = false;
|
|
187
|
-
|
|
188
|
-
if(!gameData.error){
|
|
189
|
-
gamesCache[gameData[0].gameId] = gameData[0];
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
resolve(gameData[0]);
|
|
193
|
-
}).catch((err:any) => {
|
|
194
|
-
isLoading = false;
|
|
195
|
-
|
|
196
|
-
console.error(err);
|
|
197
|
-
|
|
198
|
-
reject(err);
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const getFavoriteGames = ():void => {
|
|
205
|
-
|
|
206
|
-
const url:URL = new URL(`${endpoint}/v1/player/${playerID}/favorites/`);
|
|
207
|
-
|
|
208
|
-
isLoading = true;
|
|
209
|
-
|
|
210
|
-
let options = {
|
|
211
|
-
method: "GET",
|
|
212
|
-
headers: {
|
|
213
|
-
'X-SessionID': sessionID,
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
fetch(url.href, options)
|
|
218
|
-
.then((res:any) => res.json())
|
|
219
|
-
.then((favoriteGames:any) => {
|
|
220
|
-
isLoading = false;
|
|
221
|
-
|
|
222
|
-
favoriteGamesIds = favoriteGames.items.map(favoriteGame => favoriteGame.id);
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const setSession = ():void => {
|
|
227
|
-
isLoggedIn = true;
|
|
228
|
-
sessionID = session;
|
|
229
|
-
playerID = userid;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
const checkFavorite = (gameId:string):boolean => {
|
|
233
|
-
if (favoriteGamesIds.findIndex((favGameId:any) => favGameId == gameId) !== -1) {
|
|
234
|
-
return true;
|
|
235
|
-
} else {
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
const addGameTag = (tags:any[]):string => {
|
|
241
|
-
if(tags?.length === 0) return '';
|
|
242
|
-
|
|
243
|
-
let tagName:string;
|
|
244
|
-
let differenceOfTime = 99999999999;
|
|
245
|
-
let firstToExpire:number;
|
|
246
|
-
|
|
247
|
-
const currentDate = new Date(Date.now());
|
|
248
|
-
|
|
249
|
-
tags.forEach((tag, index)=> {
|
|
250
|
-
const startDateOfTag = new Date(tag.schedules[0].startTime);
|
|
251
|
-
const endDateOfTag = new Date(tag.schedules[0].endTime);
|
|
252
|
-
|
|
253
|
-
if (moment(endDateOfTag).diff(currentDate) < differenceOfTime) {
|
|
254
|
-
differenceOfTime = moment(endDateOfTag).diff(currentDate)
|
|
255
|
-
firstToExpire = index;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (moment(currentDate).isAfter(startDateOfTag) && moment(currentDate).isBefore(endDateOfTag)) {
|
|
259
|
-
tagName = tags[firstToExpire].name;
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
return tagName;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
const addSearchedItem = (gameID:any):void => {
|
|
266
|
-
searchedValues = localStorage.getItem('searchedGamesWds_casino');
|
|
267
|
-
|
|
268
|
-
if (searchedValues) {
|
|
269
|
-
searchedValues = searchedValues.split(',');
|
|
270
|
-
} else {
|
|
271
|
-
searchedValues = [];
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (searchedValues.indexOf(gameID) === -1) {
|
|
275
|
-
let value;
|
|
276
|
-
|
|
277
|
-
searchedValues.unshift(gameID);
|
|
278
|
-
value = searchedValues.join(',');
|
|
279
|
-
localStorage.setItem(`searchedGamesWds_casino`, value);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
const cancelSearch = ():void => {
|
|
284
|
-
searchValue = '';
|
|
285
|
-
searchCancelled = true;
|
|
286
|
-
isLoading = false;
|
|
287
|
-
searchArray = [];
|
|
288
|
-
searchActive = false;
|
|
289
|
-
|
|
290
|
-
sendSearchStatus(searchActive);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
const clearSearch = ():void => {
|
|
294
|
-
searchValue = '';
|
|
295
|
-
searchElement.focus();
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// --- Communication with other widgets
|
|
299
|
-
|
|
300
|
-
const sendSearchStatus = (searchStatus):void => {
|
|
301
|
-
window.postMessage({ type: searchStatus === true ? 'searchActive' : 'searchCancelled', searchStatus}, window.location.href);
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
const setActiveLanguage = ():void => {
|
|
305
|
-
setLocale(lang);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
const setClientStyling = ():void => {
|
|
309
|
-
let sheet = document.createElement('style');
|
|
310
|
-
sheet.innerHTML = clientstyling;
|
|
311
|
-
customStylingContainer.appendChild(sheet);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
const setClientStylingURL = ():void => {
|
|
315
|
-
let url:URL = new URL(clientstylingurl);
|
|
316
|
-
let cssFile:HTMLElement = document.createElement('style');
|
|
317
|
-
|
|
318
|
-
fetch(url.href)
|
|
319
|
-
.then((res:any) => res.text())
|
|
320
|
-
.then((data:any) => {
|
|
321
|
-
cssFile.innerHTML = data
|
|
322
|
-
|
|
323
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
$: if (searchValue.length >= 2) {
|
|
328
|
-
const searchUrl:URL = new URL(`${endpoint}/v1/casino/games`);
|
|
329
|
-
|
|
330
|
-
searchUrl.searchParams.append("datasource", datasource);
|
|
331
|
-
searchUrl.searchParams.append("expand", "vendor");
|
|
332
|
-
searchUrl.searchParams.append("platform", getDevice(userAgent));
|
|
333
|
-
searchUrl.searchParams.append("language", lang);
|
|
334
|
-
searchUrl.searchParams.append("pagination", "offset=0,limit=30");
|
|
335
|
-
searchUrl.searchParams.append("filter", `name=${searchValue}`);
|
|
336
|
-
|
|
337
|
-
getGames(searchUrl).then((searchData:any) => {
|
|
338
|
-
searchArray = searchData.items.map((item) => {
|
|
339
|
-
item.isFavorite = checkFavorite(item.id);
|
|
340
|
-
return item;
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
} else {
|
|
344
|
-
if (!searchCancelled) {
|
|
345
|
-
onFocus();
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
onMount(()=> {
|
|
350
|
-
window.addEventListener('message', messageHandler, false);
|
|
351
|
-
|
|
352
|
-
return () => {
|
|
353
|
-
window.removeEventListener('message', messageHandler);
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
$: lang && setActiveLanguage();
|
|
358
|
-
$: translationurl && setTranslationUrl();
|
|
359
|
-
$: session && userid && setSession();
|
|
360
|
-
$: showfavorites && isLoggedIn && getFavoriteGames();
|
|
361
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
|
362
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
363
|
-
|
|
364
|
-
</script>
|
|
365
|
-
<div class="{(getDevice(userAgent) !== 'PC') ? '' : 'Desktop'} CasinoSearch" bind:this={customStylingContainer}>
|
|
366
|
-
<div class="SearchWrap">
|
|
367
|
-
<div class="Search {searchCancelled ? '' : 'SearchAnimation'}">
|
|
368
|
-
<div class="SearchIcon">
|
|
369
|
-
<svg width="14" height="15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
370
|
-
<path stroke="#212121" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="m10.48 10.985 2.21 2.373"/>
|
|
371
|
-
<circle cx="6.5" cy="6.5" r="5.75" stroke="#212121" stroke-width="1.5"/>
|
|
372
|
-
</svg>
|
|
373
|
-
</div>
|
|
374
|
-
<input class="SearchInput" type="search" placeholder="{$_('placeHolderSearchGames')}" bind:value={searchValue} on:focus={onFocus} bind:this={searchElement} maxlength={searchInputMaxLength}>
|
|
375
|
-
<span on:click={() => clearSearch()} class="SearchClearButton { cancelbutton != 'true' ? 'WithoutCancel' : ''} { searchValue.length != 0 ? '' : 'NotVisible'}">
|
|
376
|
-
<svg width="11" height="11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
377
|
-
<path d="m1.45 1.5 8.1 8M1.45 9.5l8.1-8" stroke="#717171" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
378
|
-
</svg>
|
|
379
|
-
</span>
|
|
380
|
-
{#if cancelbutton === 'true'}
|
|
381
|
-
<small on:click={() => cancelSearch()} class="SearchCancelButton {searchCancelled ? 'NotVisible' : ''}">
|
|
382
|
-
{$_('cancel')}
|
|
383
|
-
</small>
|
|
384
|
-
{/if}
|
|
385
|
-
</div>
|
|
386
|
-
</div>
|
|
387
|
-
<div class="{(cancelbutton != 'true') ? 'OverlayCancel' : ''}" on:click={handleOverlay}></div>
|
|
388
|
-
{#if isLoading}
|
|
389
|
-
<p class="LoadingContent">{$_('loading')}</p>
|
|
390
|
-
{:else}
|
|
391
|
-
{#if searchActive == true && searchValue.length < 2}
|
|
392
|
-
{#if searchArray.length !== 0}
|
|
393
|
-
<p class="SearchMessage">{$_('recentSearch')}</p>
|
|
394
|
-
{/if}
|
|
395
|
-
{#if searchArray.length == 0}
|
|
396
|
-
<div class="ResultsContainerError {notfoundicon == 'true' ? 'WithIcon': ''}">
|
|
397
|
-
{#if notfoundicon === 'true'}
|
|
398
|
-
<div class="SearchErrorIcon">
|
|
399
|
-
<svg width="" height="" viewBox="0 0 240 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
400
|
-
<rect x="40" width="160" height="160" rx="80" fill="var(--emfe-w-color-contrast, #E6E6E6)" fill-opacity="0.6"/>
|
|
401
|
-
<path d="M152 112L136 96" stroke="var(--emfe-w-color-contrast, #131313)" stroke-width="3" stroke-linecap="square" stroke-linejoin="round"/>
|
|
402
|
-
<path d="M116 104C131.464 104 144 91.464 144 76C144 60.536 131.464 48 116 48C100.536 48 88 60.536 88 76C88 91.464 100.536 104 116 104Z" stroke="var(--emfe-w-color-contrast, #131313)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
403
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M116.001 78.1221L121.88 84.0009L124.001 81.8796L118.122 76.0008L124.002 70.1214L121.88 68L116.001 73.8795L110.121 68L108 70.1214L113.879 76.0008L108.001 81.8796L110.122 84.0009L116.001 78.1221Z" fill="var(--emfe-w-color-contrast, #131313)"/>
|
|
404
|
-
</svg>
|
|
405
|
-
</div>
|
|
406
|
-
{/if}
|
|
407
|
-
<p class="SearchMessage">{$_('noRecentSearches')}</p>
|
|
408
|
-
</div>
|
|
409
|
-
{/if}
|
|
410
|
-
{:else if searchArray.length != 0}
|
|
411
|
-
<p class="SearchMessage">{$_('searchResult')}</p>
|
|
412
|
-
{/if}
|
|
413
|
-
<div class="SearchResultsContainer {searchActive == true ? '': 'NotVisible'}">
|
|
414
|
-
{#if searchCancelled === false}
|
|
415
|
-
{#each searchArray as game}
|
|
416
|
-
<casino-game-thumbnail
|
|
417
|
-
endpoint={endpoint}
|
|
418
|
-
session = {sessionID}
|
|
419
|
-
userid = {playerID}
|
|
420
|
-
favorites = {showfavorites}
|
|
421
|
-
lang={lang}
|
|
422
|
-
gamethumbnail={game.thumbnail}
|
|
423
|
-
gamename={game.name}
|
|
424
|
-
gamevendor={game.vendor.displayName}
|
|
425
|
-
gameLaunchUrl={game.launchUrl}
|
|
426
|
-
gameisnew={game.isNew}
|
|
427
|
-
gametag={game.advancedTags?.length > 0 && addGameTag(game.advancedTags)}
|
|
428
|
-
gamecellsize={game.cellSize}
|
|
429
|
-
gameid={game.id}
|
|
430
|
-
{showgamename}
|
|
431
|
-
gamefunmode={game.hasFunMode}
|
|
432
|
-
gamefavorite={game.isFavorite}
|
|
433
|
-
livelobbyendpoint={game.details ? game.launchUrl : ''}
|
|
434
|
-
{integratedgameframedesktop}
|
|
435
|
-
{integratedgameframemobile}
|
|
436
|
-
{clientstyling}
|
|
437
|
-
{clientstylingurl}
|
|
438
|
-
{gamepagemodalurl}
|
|
439
|
-
></casino-game-thumbnail>
|
|
440
|
-
{/each}
|
|
441
|
-
{/if}
|
|
442
|
-
{#if searchValue.length >= 2 && searchArray.length == 0}
|
|
443
|
-
<div class="ResultsContainerError {notfoundicon == 'true' ? 'WithIcon': ''}">
|
|
444
|
-
{#if notfoundicon === 'true'}
|
|
445
|
-
<div class="SearchErrorIcon">
|
|
446
|
-
<svg width="" height="" viewBox="0 0 240 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
447
|
-
<rect x="40" width="160" height="160" rx="80" fill="var(--emfe-w-color-contrast, #E6E6E6)" fill-opacity="0.6"/>
|
|
448
|
-
<path d="M152 112L136 96" stroke="var(--emfe-w-color-contrast, #131313)" stroke-width="3" stroke-linecap="square" stroke-linejoin="round"/>
|
|
449
|
-
<path d="M116 104C131.464 104 144 91.464 144 76C144 60.536 131.464 48 116 48C100.536 48 88 60.536 88 76C88 91.464 100.536 104 116 104Z" stroke="var(--emfe-w-color-contrast, #131313)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
|
|
450
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M116.001 78.1221L121.88 84.0009L124.001 81.8796L118.122 76.0008L124.002 70.1214L121.88 68L116.001 73.8795L110.121 68L108 70.1214L113.879 76.0008L108.001 81.8796L110.122 84.0009L116.001 78.1221Z" fill="var(--emfe-w-color-contrast, #131313)"/>
|
|
451
|
-
</svg>
|
|
452
|
-
</div>
|
|
453
|
-
{/if}
|
|
454
|
-
<p class="SearchMessage">{$_('notFound')}</p>
|
|
455
|
-
<p>{$_('notFoundText')}</p>
|
|
456
|
-
</div>
|
|
457
|
-
{/if}
|
|
458
|
-
</div>
|
|
459
|
-
{/if}
|
|
460
|
-
</div>
|
|
461
|
-
|
|
462
|
-
<style lang="scss">
|
|
463
|
-
$grid-gap: 16px;
|
|
464
|
-
$grid-cell-size: 192px;
|
|
465
|
-
$grid-cell-size-small: 110px;
|
|
466
|
-
$grid-cell-size-medium: 122px;
|
|
467
|
-
|
|
468
|
-
*,
|
|
469
|
-
*::before,
|
|
470
|
-
*::after {
|
|
471
|
-
margin: 0;
|
|
472
|
-
padding: 0;
|
|
473
|
-
box-sizing: border-box;
|
|
474
|
-
font-family: inherit
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
:host {
|
|
478
|
-
font-family: inherit;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
input,
|
|
482
|
-
textarea,
|
|
483
|
-
button {font-family: inherit}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
.CasinoSearch {
|
|
487
|
-
margin: 30px 16px;
|
|
488
|
-
position: relative;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.SearchWrap {
|
|
492
|
-
width: 100%;
|
|
493
|
-
margin: auto;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.OverlayCancel {
|
|
497
|
-
width: 100%;
|
|
498
|
-
height: 100vh;
|
|
499
|
-
position: absolute;
|
|
500
|
-
translate: 0 -100px;
|
|
501
|
-
z-index: 2;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.LoadingContent {
|
|
505
|
-
color: var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
.Search {
|
|
509
|
-
display: flex;
|
|
510
|
-
align-items: center;
|
|
511
|
-
position: relative;
|
|
512
|
-
margin-bottom: 20px;
|
|
513
|
-
z-index: 5;
|
|
514
|
-
|
|
515
|
-
&Icon{
|
|
516
|
-
position: absolute;
|
|
517
|
-
left: 15px;
|
|
518
|
-
top: 50%;
|
|
519
|
-
z-index: 1;
|
|
520
|
-
transform: translateY(-50%);
|
|
521
|
-
|
|
522
|
-
svg {
|
|
523
|
-
height: 14px;
|
|
524
|
-
width: 13px;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
&Input {
|
|
529
|
-
border-radius: 4px;
|
|
530
|
-
border: 1px solid var(--emfe-w-color-gray-300, #58586B);
|
|
531
|
-
color: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
532
|
-
display: block;
|
|
533
|
-
font-size: 16px;
|
|
534
|
-
font-weight: 300;
|
|
535
|
-
padding: 14px 5px 14px 46px;
|
|
536
|
-
width:100%;
|
|
537
|
-
&::placeholder {
|
|
538
|
-
color: var(--emfe-w-color-gray-150, #828282);
|
|
539
|
-
font-size: 16px;
|
|
540
|
-
font-weight: 300;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
&:focus {
|
|
544
|
-
outline: 1px solid var(--emfe-w-color-gray-300, #58586B);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
&::-webkit-search-decoration,
|
|
548
|
-
&::-webkit-search-cancel-button,
|
|
549
|
-
&::-webkit-search-results-button,
|
|
550
|
-
&::-webkit-search-results-decoration {
|
|
551
|
-
-webkit-appearance:none;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
&ClearButton{
|
|
556
|
-
position: absolute;
|
|
557
|
-
top: 30%;
|
|
558
|
-
right: 65px;
|
|
559
|
-
cursor: pointer;
|
|
560
|
-
&.WithoutCancel{
|
|
561
|
-
right: 18px;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
&CancelButton {
|
|
566
|
-
color: var(--emfe-w-color-contrast, #E6E6E6);
|
|
567
|
-
font-weight: 300;
|
|
568
|
-
margin-left: 8px;
|
|
569
|
-
cursor: pointer;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
&Message {
|
|
573
|
-
font-size: 18px;
|
|
574
|
-
font-weight: 600;
|
|
575
|
-
margin: 24px 0;
|
|
576
|
-
color: var(--emfe-w-color-contrast, #000000);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
&ErrorIcon {
|
|
580
|
-
height: 170px;
|
|
581
|
-
filter: drop-shadow(1px 5px 5px rgb(0 0 0 / 0.1));
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
&ResultsContainer {
|
|
585
|
-
display: grid;
|
|
586
|
-
gap: $grid-gap + 12;
|
|
587
|
-
grid-template-columns: repeat(auto-fill, minmax(Min($grid-cell-size, 46%), 1fr));
|
|
588
|
-
grid-template-rows: repeat(auto-fill, $grid-cell-size);
|
|
589
|
-
grid-auto-rows: $grid-cell-size;
|
|
590
|
-
grid-auto-columns: $grid-cell-size;
|
|
591
|
-
grid-auto-flow: row dense;
|
|
592
|
-
|
|
593
|
-
@media screen and (max-width: 480px) {
|
|
594
|
-
display: grid;
|
|
595
|
-
gap: $grid-gap;
|
|
596
|
-
grid-template-columns: repeat(auto-fill, minmax(Min($grid-cell-size-medium, 46%), 1fr));
|
|
597
|
-
grid-template-rows: repeat(auto-fill, $grid-cell-size-medium);
|
|
598
|
-
grid-auto-rows: $grid-cell-size-medium;
|
|
599
|
-
grid-auto-columns: $grid-cell-size-medium;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
@media screen and (max-width: 385px) {
|
|
603
|
-
display: grid;
|
|
604
|
-
gap: $grid-gap;
|
|
605
|
-
grid-template-columns: repeat(auto-fill, minmax(Min($grid-cell-size-small, 46%), 1fr));
|
|
606
|
-
grid-template-rows: repeat(auto-fill, $grid-cell-size-small);
|
|
607
|
-
grid-auto-rows: $grid-cell-size-small;
|
|
608
|
-
grid-auto-columns: $grid-cell-size-small;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
@media screen and (min-width: 1100px) {
|
|
612
|
-
grid-template-rows: repeat(auto-fill, 142px);
|
|
613
|
-
grid-auto-rows: 142px;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
@media screen and (max-width: 1300px) {
|
|
617
|
-
padding: 0 2.4%
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
.ResultsContainerError {
|
|
623
|
-
text-align: center;
|
|
624
|
-
width: 300px;
|
|
625
|
-
color: var(--emfe-w-color-contrast, #828282);
|
|
626
|
-
font-weight: 300;
|
|
627
|
-
position: absolute;
|
|
628
|
-
top: 50%;
|
|
629
|
-
left: 50%;
|
|
630
|
-
transform: translate(-50%, -50%);
|
|
631
|
-
z-index: 1;
|
|
632
|
-
margin-top: 120px;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
casino-game-thumbnail-nd {
|
|
636
|
-
z-index: 5;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
.NotVisible {
|
|
640
|
-
display: none;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
.Desktop {
|
|
644
|
-
|
|
645
|
-
.NotVisible {
|
|
646
|
-
opacity: 0;
|
|
647
|
-
visibility: hidden;
|
|
648
|
-
display: inline;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
.SearchWrap {
|
|
652
|
-
width: 50%;
|
|
653
|
-
margin: auto;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
&.CasinoSearch {
|
|
657
|
-
margin: 30px auto;
|
|
658
|
-
position: relative;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.ResultsContainerError {
|
|
662
|
-
text-align: center;
|
|
663
|
-
width: 300px;
|
|
664
|
-
color: var(--emfe-w-color-contrast, #828282);
|
|
665
|
-
font-weight: 300;
|
|
666
|
-
position: absolute;
|
|
667
|
-
top: 50%;
|
|
668
|
-
left: 50%;
|
|
669
|
-
transform: translate(-50%, -50%);
|
|
670
|
-
z-index: 1;
|
|
671
|
-
margin-top: 120px;
|
|
672
|
-
|
|
673
|
-
&.WithIcon {
|
|
674
|
-
top: 60%;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.Search {
|
|
679
|
-
display: flex;
|
|
680
|
-
align-items: center;
|
|
681
|
-
justify-content: center;
|
|
682
|
-
transition: all 0.2s cubic-bezier(1, 0, 0.46, 1.03);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
&Icon {
|
|
686
|
-
position: relative;
|
|
687
|
-
top: 0;
|
|
688
|
-
left: 0;
|
|
689
|
-
transform: translateY(0);
|
|
690
|
-
margin-right: -28px;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
&ClearButton{
|
|
694
|
-
position: relative;
|
|
695
|
-
top: 0;
|
|
696
|
-
right: 0;
|
|
697
|
-
margin-left: -23px;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
&CancelButton {
|
|
701
|
-
margin-left: 20px;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
&Animation {
|
|
705
|
-
transform: scaleX(110%);
|
|
706
|
-
& Input {
|
|
707
|
-
outline: none;
|
|
708
|
-
box-shadow: 0 5px 7px rgba(0,0,0,0.25);
|
|
709
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
&Message {
|
|
714
|
-
font-size: 18px;
|
|
715
|
-
font-weight: 600;
|
|
716
|
-
margin: 24px 0;
|
|
717
|
-
margin-top:90px
|
|
718
|
-
}
|
|
719
|
-
&ErrorIcon {
|
|
720
|
-
height: 190px;
|
|
721
|
-
margin-bottom: -70px;
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
.OverlayCancel {
|
|
726
|
-
height: 90vh;
|
|
727
|
-
z-index: 2;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
</style>
|