@everymatrix/casino-lobby 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.
Files changed (64) hide show
  1. package/components/CasinoCalendar-3HRZGpnG.js +5134 -0
  2. package/components/CasinoCalendar-9cVNHt1-.cjs +9 -0
  3. package/components/CasinoCalendarDailyDetails-Dcf0TKzH.cjs +1 -0
  4. package/components/CasinoCalendarDailyDetails-MwTyCObT.js +605 -0
  5. package/components/CasinoCalendarDailyItem-B-h-76yh.js +220 -0
  6. package/components/CasinoCalendarDailyItem-Cahte_IM.cjs +1 -0
  7. package/components/CasinoCategoriesSlider-AAgG2_xb.cjs +1 -0
  8. package/components/CasinoCategoriesSlider-B3Aneyii.js +597 -0
  9. package/components/CasinoCollectionsProviders-BvEenHqO.cjs +1 -0
  10. package/components/CasinoCollectionsProviders-D-DgSMvu.js +659 -0
  11. package/components/CasinoFavoritesSection-CxQ69OwL.cjs +1 -0
  12. package/components/CasinoFavoritesSection-DE0M_xZ_.js +418 -0
  13. package/components/CasinoFilter-BWEtfBml.js +628 -0
  14. package/components/CasinoFilter-Bdc0mE0X.cjs +1 -0
  15. package/components/CasinoGamePage-C4x_GUg3.cjs +18 -0
  16. package/components/CasinoGamePage-r1xLmvzf.js +4282 -0
  17. package/components/CasinoGameThumbnail-BG_6FsqW.cjs +38 -0
  18. package/components/CasinoGameThumbnail-wQFR0AuM.js +1822 -0
  19. package/components/CasinoGamesCategorySection-BGgw1sdg.cjs +1 -0
  20. package/components/CasinoGamesCategorySection-Cbto2aD4.js +3018 -0
  21. package/components/CasinoJackpotBanner-BftFjZpI.cjs +1 -0
  22. package/components/CasinoJackpotBanner-D1RCyJGt.js +615 -0
  23. package/components/CasinoLastPlayedSection-CAirOYgJ.js +563 -0
  24. package/components/CasinoLastPlayedSection-Dm6f8H02.cjs +1 -0
  25. package/components/CasinoLobby-Cq0Hm2md.js +2337 -0
  26. package/components/CasinoLobby-CvaYUpUV.cjs +1 -0
  27. package/components/CasinoModal-CZbdtmLm.js +372 -0
  28. package/components/CasinoModal-DqBbtAjA.cjs +1 -0
  29. package/components/CasinoMostPlayedSection-DTXKjmPl.cjs +1 -0
  30. package/components/CasinoMostPlayedSection-k3_ln2SB.js +580 -0
  31. package/components/CasinoMyGames-CVTzyBkk.cjs +1 -0
  32. package/components/CasinoMyGames-DcJpzIEq.js +1313 -0
  33. package/components/CasinoPage-BbRpHGEc.js +3514 -0
  34. package/components/CasinoPage-srXwB6ik.cjs +1 -0
  35. package/components/CasinoRandomGame-BSD5DYtt.js +641 -0
  36. package/components/CasinoRandomGame-CNdoKY0C.cjs +2 -0
  37. package/components/CasinoSearch-BsgUvsbs.js +1062 -0
  38. package/components/CasinoSearch-CMn_5Aa4.cjs +1 -0
  39. package/components/CasinoSlider-D5B-CjPM.js +803 -0
  40. package/components/CasinoSlider-kzZxK81G.cjs +1 -0
  41. package/components/CasinoSort-9pQqbHyF.cjs +1 -0
  42. package/components/CasinoSort-T6UQhFka.js +425 -0
  43. package/components/CasinoWinners-CD5HS4Gb.cjs +1 -0
  44. package/components/CasinoWinners-auSd-4D9.js +884 -0
  45. package/components/GeneralAnimationLoading-CIYgtCsE.cjs +1 -0
  46. package/components/GeneralAnimationLoading-DRiG33XR.js +75 -0
  47. package/es2015/casino-lobby.cjs +1 -0
  48. package/es2015/casino-lobby.js +16 -0
  49. package/package.json +20 -32
  50. package/CHANGELOG.md +0 -39
  51. package/README.md +0 -0
  52. package/dist/casino-lobby.js +0 -33
  53. package/dist/casino-lobby.js.map +0 -1
  54. package/documentation.md +0 -176
  55. package/index.html +0 -50
  56. package/index.js +0 -1
  57. package/public/favicon.png +0 -0
  58. package/public/reset.css +0 -48
  59. package/rollup.config.js +0 -67
  60. package/src/CasinoLobby.svelte +0 -454
  61. package/src/i18n.js +0 -25
  62. package/src/index.ts +0 -4
  63. package/stories/CasinoLobby.stories.js +0 -13
  64. package/tsconfig.json +0 -6
@@ -1,454 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- import { onMount } from "svelte";
5
- import { getDevice, isMobile, checkSession } from 'rvhelper';
6
- import { setupI18n, setLocale } from './i18n';
7
-
8
- import '@everymatrix/casino-categories-slider';
9
- import '@everymatrix/casino-page';
10
- import '@everymatrix/casino-modal';
11
- import '@everymatrix/casino-game-page';
12
-
13
- export let endpoint:string = '';
14
- export let cmsendpoint: string = 'https://wt1-stage.everymatrix.com/apijson';
15
- export let env:string = '';
16
- export let datasource:string = '';
17
- export let lang:string = ''; // Language
18
- export let session:string = ''; // Value for sessionID
19
- export let userid:string = '';
20
- export let opsession:string = '';
21
- export let clientstyling:string = '';
22
- export let clientstylingurl:string = '';
23
- export let clockformat:string = '';
24
- export let lobbyid:string = '';
25
- export let currency:string = '';
26
- export let filteredcategories:string = '';
27
- export let userroles: string = '';
28
- export let translationurl:string = '';
29
-
30
- export let loginevent:string = '';
31
- export let registerevent:string = '';
32
- export let depositevent:string = '';
33
- export let shortcashierenabled: string = '';
34
-
35
- export let favorites:string = '';
36
-
37
- export let desktopoffset:string = '0';
38
- export let mobileoffset:string = '0';
39
-
40
- export let haspanicbutton:string = 'false';
41
-
42
- export let activecategory:string = 'LOBBY';
43
- export let actionevent:string = 'CategoryChange';
44
- export let livecasino:string = 'false';
45
- export let playforfun:string = 'true';
46
- export let showgamename:string = 'false';
47
- export let gamemodal:string = 'true';
48
- export let playrandomgame:string = 'false';
49
- export let randomgameslider:string = 'false';
50
- export let visiblegames:string = '10';
51
- export let integratedgameframedesktop:string = 'false';
52
- export let integratedgameframemobile:string = 'false';
53
- export let gamepagemodalurl:string = 'false';
54
- export let casinogamesgridslider: string = 'false';
55
- export let categoriesicon: string = 'false';
56
- export let lobbyiconimage: string = '';
57
- export let mygamesiconimage: string = '';
58
-
59
- //Casino Winners
60
- export let positionwinnerswidget:string = '';
61
- export let tabsorder:string = '';
62
- export let enableautoscroll:string = '';
63
- export let istopavailable:string = '';
64
- export let isrecentavailable:string = '';
65
- export let periodrecent:string = '';
66
- export let periodtop:string = '';
67
- export let numberusersrecent:string = '';
68
- export let numberuserstop:string = '';
69
- export let amountlimit:string = '';
70
- export let defaultcurrency:string = '';
71
- //Jackpot Banners
72
- export let positionjackpotbanners:string = '';
73
- export let caticon0:string = '';
74
- export let caticon1:string = '';
75
- export let caticon2:string = '';
76
- export let caticon3:string = '';
77
- export let backgroundsrc:string='';
78
- export let backgroundsrcmobile:string='';
79
- export let titlelogopath = '';
80
- export let iconlabels:string = '';
81
- export let showsubgroups:string = 'false';
82
- //Casino Collections Providers
83
- export let positioncollections:string = '';
84
- export let type:string = '';
85
- export let titletype:string = '';
86
- export let collectionprovidersgamenames:string = '';
87
- //Casino Calendar
88
- export let positioncasinocalendar = '';
89
- //Casino My Games
90
- export let lastplayedperiod:string = 'Last30Days';
91
- export let mostplayedperiod:string = 'Last30Days';
92
- export let lastplayedorder:string = '';
93
- export let lastplayedlimit:string = '';
94
- export let lastplayedunique: string = 'true';
95
- export let mostplayed:string = '';
96
- export let mostplayedrounds:string = '';
97
- export let lastplayed:string = 'false';
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
- //Je lobby widget
105
- export let positionjelobbywidget:string = '';
106
-
107
- // Button icon for random game widget
108
- export let randombuttonicon:string = '';
109
- export let filteredrandomgamecategories:string = '';
110
- export let addfilterselector:string = 'false';
111
- export let addsortingselector:string = 'false';
112
- export let filterbylogo:string = 'false';
113
- export let winnersdatasources:string = '';
114
-
115
- let casinomygames:string = 'false';
116
-
117
- let endpointURL:string;
118
- let DS:string;
119
- let language:string;
120
- let displayNone:boolean = false;
121
- let hasErrors:boolean = false;
122
- let error:string = 'Loading, please wait ...';
123
- let isLoggedIn:boolean = false;
124
- let sessionID:string = '';
125
- let playerID:string = '';
126
- let userAgent:string = window.navigator.userAgent;
127
- let isLoading:boolean = true;
128
- let searchClosed:boolean = false;
129
-
130
- let headerPlaceholderSize:number = 0;
131
- let scrollTop:boolean = false;
132
- let customStylingContainer:HTMLElement;
133
- let mostPlayed;
134
- let lastPlayed;
135
- let fav;
136
-
137
- setupI18n({ withLocale: 'en', translations: {}});
138
-
139
- const messageHandler = (e:any):void => {
140
- if (e.data) {
141
- switch(e.data.type) {
142
- case 'searchCancelled':
143
- searchClosed = true;
144
- break;
145
-
146
- case 'WidgetTopReference':
147
- scrollTop = e.data.scrollTop;
148
- // check if the category has been changed and the scroll top
149
- if (scrollTop) {
150
- if (!headerPlaceholderSize) {
151
- headerPlaceholderSize = (getDevice(userAgent) === 'PC') ? parseInt(desktopoffset) : parseInt(mobileoffset);
152
- }
153
- // do not scroll if the casino page was changed because searchInput was closed
154
- !searchClosed && window.scrollTo({ top: headerPlaceholderSize });
155
- searchClosed = false;
156
- }
157
- break;
158
-
159
- case 'OpenGameFrame':
160
- window.postMessage({ type: 'ShowGameModal', gameId: e.data.gameId, isMobile: isMobile(userAgent), gamefunmode: e.data.gamefunmode, gamepagemodalurl: e.data.gamepagemodalurl, identifier: 'Lobby' }, window.location.href);
161
- break;
162
-
163
- case 'UserSessionID':
164
- sessionID = e.data.session;
165
- playerID = e.data.userID;
166
- break;
167
-
168
- case 'CategoryChange':
169
- activecategory = e.data.itemId;
170
- break;
171
- }
172
- }
173
- }
174
-
175
- const checkAttrs = ():boolean => {
176
- if (!endpoint) {
177
- error = "Endpoint is missing! Please provide a valid endpointURL.";
178
- hasErrors = true;
179
-
180
- console.error(error);
181
- }
182
-
183
- if (!datasource) {
184
- error = "Datasource is missing! Please provide a valid datasource.";
185
- hasErrors = true;
186
-
187
- console.error(error);
188
- }
189
-
190
- if (!lang || lang.length < 2) {
191
- error = "Language is missing! Please provide a valid language (alpha2code)";
192
- hasErrors = true;
193
-
194
- console.error(error);
195
- }
196
-
197
- return hasErrors;
198
- }
199
-
200
- const setActiveLanguage = ():void => {
201
- setLocale(lang);
202
- }
203
-
204
- const initialSetup = ():void => {
205
- checkAttrs();
206
- setLocale(lang);
207
- endpointURL = endpoint;
208
- DS = datasource;
209
- language = lang;
210
-
211
- mostPlayed = mostplayed;
212
- lastPlayed = lastplayed;
213
- fav = favorites;
214
-
215
- hasErrors = false;
216
- isLoading = false;
217
- }
218
-
219
- const setSession = ():void => {
220
- checkSession(endpoint, session).then((res:any) => {
221
- sessionID = res.Guid;
222
- playerID = res.UserID;
223
- currency = res.Currency;
224
- isLoggedIn = true;
225
- }, (err:any) => {
226
- isLoggedIn = false;
227
- console.error('Error while checking the session - ', err)
228
- });
229
- }
230
-
231
- const setOpSession = ():void => {
232
- isLoggedIn = true;
233
- sessionID = opsession;
234
- }
235
-
236
- const setClientStyling = ():void => {
237
- let sheet = document.createElement('style');
238
- sheet.innerHTML = clientstyling;
239
- customStylingContainer.appendChild(sheet);
240
- }
241
-
242
- const setClientStylingURL = ():void => {
243
- displayNone = true;
244
-
245
- let url:URL = new URL(clientstylingurl);
246
- let cssFile:HTMLElement = document.createElement('style');
247
-
248
- fetch(url.href)
249
- .then((res:any) => res.text())
250
- .then((data:any) => {
251
- cssFile.innerHTML = data
252
-
253
- if (customStylingContainer) {
254
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
255
- setTimeout(() => { displayNone = false; }, 500);
256
- }
257
- });
258
- }
259
-
260
- onMount(() => {
261
- window.addEventListener('message', messageHandler, false);
262
-
263
- headerPlaceholderSize = (getDevice(userAgent) === 'PC') ? parseInt(desktopoffset) : parseInt(mobileoffset);
264
-
265
- return () => {
266
- window.removeEventListener('message', messageHandler);
267
- }
268
- });
269
-
270
- $: lang && setActiveLanguage();
271
- $: session && userid && endpoint && setSession();
272
- $: endpoint && datasource && lang && mostplayed && lastplayed && favorites && initialSetup();
273
- $: opsession && setOpSession();
274
- $: clientstyling && customStylingContainer && setClientStyling();
275
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
276
- </script>
277
-
278
- <div bind:this={customStylingContainer} class={displayNone ? 'DisplayNone' : ''}>
279
- {#if hasErrors}
280
- <p style="color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))">{error}</p>
281
- {:else}
282
- <div class="CasinoLobby">
283
- <div class="WidgetsSection">
284
- <div class="HeaderPlaceholder" style="height:{headerPlaceholderSize}px"></div>
285
- <div class="ScrollTop"></div>
286
- <casino-categories-slider
287
- endpoint={endpointURL}
288
- datasource={DS}
289
- lang={language}
290
- session={sessionID}
291
- userid={userid}
292
- sessioncheck="false"
293
- {actionevent}
294
- {filteredcategories}
295
- {mostplayed}
296
- {lastplayed}
297
- {favorites}
298
- {activecategory}
299
- {translationurl}
300
- {clientstyling}
301
- {clientstylingurl}
302
- location="secondaryMenu"
303
- {showsubgroups}
304
- {categoriesicon}
305
- {lobbyiconimage}
306
- {mygamesiconimage}
307
- ></casino-categories-slider>
308
- <casino-page
309
- session={sessionID}
310
- userid={userid}
311
- endpoint={endpointURL}
312
- datasource={DS}
313
- lang={language}
314
- {showgamename}
315
- {cmsendpoint}
316
- {env}
317
- {translationurl}
318
- {visiblegames}
319
- {playrandomgame}
320
- {randomgameslider}
321
- {specificcategory}
322
- {launchbygamecard}
323
- {iconvisible}
324
- {iconvisibleonanim}
325
- {activecategory}
326
- {favorites}
327
- {clientstyling}
328
- {clientstylingurl}
329
- {lobbyid}
330
- {haspanicbutton}
331
- {livecasino}
332
- {currency}
333
- {filteredcategories}
334
- {gamepagemodalurl}
335
- {randombuttonicon}
336
- {positioncasinocalendar}
337
- {filteredrandomgamecategories}
338
- {positionwinnerswidget}
339
- {periodrecent}
340
- {periodtop}
341
- {userroles}
342
- {numberusersrecent}
343
- {numberuserstop}
344
- {amountlimit}
345
- {isrecentavailable}
346
- {istopavailable}
347
- {integratedgameframedesktop}
348
- {integratedgameframemobile}
349
- {defaultcurrency}
350
- {enableautoscroll}
351
- {collectionprovidersgamenames}
352
- {tabsorder}
353
- {positionjackpotbanners}
354
- {backgroundsrc}
355
- {backgroundsrcmobile}
356
- {titlelogopath}
357
- {caticon0}
358
- {caticon1}
359
- {caticon2}
360
- {caticon3}
361
- {iconlabels}
362
- {positioncollections}
363
- {type}
364
- {titletype}
365
- {casinomygames}
366
- {filterbylogo}
367
- {addfilterselector}
368
- {addsortingselector}
369
- {lastplayedunique}
370
- {lastplayedlimit}
371
- {lastplayedorder}
372
- {mostplayedrounds}
373
- {mostplayed}
374
- {lastplayed}
375
- {lastplayedperiod}
376
- {mostplayedperiod}
377
- {showsubgroups}
378
- {winnersdatasources}
379
- {casinogamesgridslider}
380
- {positionjelobbywidget}>
381
- <div slot="je-jackpots-widget">
382
- <slot name="content"></slot>
383
- </div>
384
- </casino-page>
385
- {#if gamemodal == 'true'}
386
- <casino-modal
387
- session={sessionID}
388
- userid={userid}
389
- endpoint={endpointURL}
390
- datasource={DS}
391
- lang={language}
392
- sessioncheck="false"
393
- {translationurl}
394
- {clientstyling}
395
- {clientstylingurl}
396
- {gamepagemodalurl}
397
- {haspanicbutton}
398
- {integratedgameframedesktop}
399
- identifier='Lobby'
400
- >
401
- <casino-game-page
402
- session={sessionID}
403
- userid={userid}
404
- endpoint={endpointURL}
405
- datasource={DS}
406
- lang={language}
407
- loginevent={loginevent}
408
- registerevent={registerevent}
409
- depositevent={depositevent}
410
- checksession="false"
411
- {playforfun}
412
- {translationurl}
413
- {shortcashierenabled}
414
- {favorites}
415
- {clientstyling}
416
- {clientstylingurl}
417
- {clockformat}
418
- {haspanicbutton}
419
- {currency}
420
- {integratedgameframedesktop}
421
- {integratedgameframemobile}
422
- />
423
- </casino-modal>
424
- {/if}
425
- </div>
426
- </div>
427
- {/if}
428
- </div>
429
-
430
- <style lang="scss">
431
- * {
432
- /* Display & Box Model */
433
- margin: 0;
434
- padding: 0;
435
- box-sizing: border-box;
436
- }
437
-
438
-
439
-
440
- .CasinoLobby {
441
- background-color: var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));
442
- width: 100%;
443
- margin: 0 auto;
444
- min-height: 100vh;
445
- }
446
-
447
- .DisplayNone {
448
- display: none;
449
- }
450
-
451
- .WidgetsSection {
452
- padding-bottom: 40px;
453
- }
454
- </style>
package/src/i18n.js DELETED
@@ -1,25 +0,0 @@
1
- import {
2
- dictionary,
3
- locale,
4
- addMessages,
5
- _,
6
- } from 'svelte-i18n';
7
-
8
- function setupI18n({ withLocale: _locale, translations }) {
9
- locale.subscribe((data) => {
10
- if (data == null) {
11
- dictionary.set(translations);
12
- locale.set(_locale);
13
- }
14
- });
15
- }
16
-
17
- function addNewMessages(lang, dict) {
18
- addMessages(lang, dict);
19
- }
20
-
21
- function setLocale(_locale) {
22
- locale.set(_locale);
23
- }
24
-
25
- export { _, setupI18n, addNewMessages, setLocale };
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import CasinoLobby from './CasinoLobby.svelte';
2
-
3
- !customElements.get('casino-lobby') && customElements.define('casino-lobby', CasinoLobby);
4
- export default CasinoLobby;
@@ -1,13 +0,0 @@
1
- import { html } from 'lit-element';
2
-
3
- import CasinoLobby from '../src/CasinoLobby';
4
-
5
- // This default export determines where your story goes in the story list
6
- export default {
7
- title: 'CasinoLobby',
8
- };
9
-
10
- // 👇 We create a “template” of how args map to rendering
11
- const CasinoLobby = ({ aProperty }) => html`<casino-lobby></casino-lobby>`;
12
-
13
- export const FirstStory = CasinoLobby.bind({});
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "@tsconfig/svelte/tsconfig.json",
3
-
4
- "include": ["src/**/*"],
5
- "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
6
- }