@everymatrix/casino-lobby 1.0.16 → 1.0.70

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 (63) hide show
  1. package/components/CasinoCalendar-1k0BBA2l.js +5133 -0
  2. package/components/CasinoCalendar-BWBvGSII.cjs +9 -0
  3. package/components/CasinoCalendarDailyDetails-BJKIAkbG.js +605 -0
  4. package/components/CasinoCalendarDailyDetails-DgCaDV2E.cjs +1 -0
  5. package/components/CasinoCalendarDailyItem-C_l5_Cbi.cjs +1 -0
  6. package/components/CasinoCalendarDailyItem-TzcXj_xp.js +228 -0
  7. package/components/CasinoCategoriesSlider-DOK-1TsD.cjs +1 -0
  8. package/components/CasinoCategoriesSlider-H9kgmTPC.js +597 -0
  9. package/components/CasinoCollectionsProviders-CTMcJfG2.cjs +1 -0
  10. package/components/CasinoCollectionsProviders-DcAD0Be0.js +624 -0
  11. package/components/CasinoFavoritesSection-BZ_XLRmR.cjs +1 -0
  12. package/components/CasinoFavoritesSection-DH6BKL3S.js +418 -0
  13. package/components/CasinoFilter-D7CEXK-l.cjs +1 -0
  14. package/components/CasinoFilter-ud_GEK1c.js +628 -0
  15. package/components/CasinoGamePage-CCUgU-We.js +4282 -0
  16. package/components/CasinoGamePage-DWdj6K_K.cjs +18 -0
  17. package/components/CasinoGameThumbnail-C1lv7WRh.js +1823 -0
  18. package/components/CasinoGameThumbnail-d4TgneFz.cjs +38 -0
  19. package/components/CasinoGamesCategorySection-BHD5W6Ng.cjs +1 -0
  20. package/components/CasinoGamesCategorySection-Exr1MKB1.js +3018 -0
  21. package/components/CasinoJackpotBanner-BFf1l5SE.cjs +1 -0
  22. package/components/CasinoJackpotBanner-CQopUNVw.js +619 -0
  23. package/components/CasinoLastPlayedSection-CT0J4KWo.cjs +1 -0
  24. package/components/CasinoLastPlayedSection-Cg5CoSZQ.js +563 -0
  25. package/components/CasinoLobby-CQ5QQCC5.js +2341 -0
  26. package/components/CasinoLobby-CeXBQomU.cjs +1 -0
  27. package/components/CasinoModal-DRQwRcHh.cjs +1 -0
  28. package/components/CasinoModal-tGpCX8AS.js +372 -0
  29. package/components/CasinoMostPlayedSection-DxHuPS1x.js +580 -0
  30. package/components/CasinoMostPlayedSection-mR65chYs.cjs +1 -0
  31. package/components/CasinoMyGames-BEQmLbuR.js +1313 -0
  32. package/components/CasinoMyGames-fIZN6Hwx.cjs +1 -0
  33. package/components/CasinoPage-B3P3Beyx.js +3525 -0
  34. package/components/CasinoPage-CV3pXWvT.cjs +1 -0
  35. package/components/CasinoRandomGame-BHTCDUvy.cjs +2 -0
  36. package/components/CasinoRandomGame-DVAINYig.js +641 -0
  37. package/components/CasinoSearch-CEyowN7y.cjs +1 -0
  38. package/components/CasinoSearch-DhJUhsQG.js +1066 -0
  39. package/components/CasinoSlider-C9caYXJM.js +803 -0
  40. package/components/CasinoSlider-CeyUOxE1.cjs +1 -0
  41. package/components/CasinoSort-BKpaIJVo.js +425 -0
  42. package/components/CasinoSort-C_BR2AM6.cjs +1 -0
  43. package/components/CasinoWinners-OIwhz7Uv.cjs +1 -0
  44. package/components/CasinoWinners-osa_wAsU.js +878 -0
  45. package/components/GeneralAnimationLoading-Bn_rjnZO.cjs +1 -0
  46. package/components/GeneralAnimationLoading-hP0Vi1pK.js +75 -0
  47. package/es2015/casino-lobby.cjs +1 -0
  48. package/es2015/casino-lobby.js +16 -0
  49. package/package.json +20 -33
  50. package/README.md +0 -0
  51. package/dist/casino-lobby.js +0 -33
  52. package/dist/casino-lobby.js.map +0 -1
  53. package/documentation.md +0 -173
  54. package/index.html +0 -55
  55. package/index.js +0 -1
  56. package/public/favicon.png +0 -0
  57. package/public/reset.css +0 -48
  58. package/rollup.config.js +0 -67
  59. package/src/CasinoLobby.svelte +0 -408
  60. package/src/i18n.js +0 -25
  61. package/src/index.ts +0 -4
  62. package/stories/CasinoLobby.stories.js +0 -13
  63. package/tsconfig.json +0 -6
@@ -1,408 +0,0 @@
1
- <svelte:options tag={null} />
2
-
3
- <script lang="ts">
4
- import { onMount } from "svelte";
5
- import { getDevice, 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
- import '@everymatrix/casino-filter-modal';
13
- import '@everymatrix/casino-filter-page';
14
- import '@everymatrix/casino-integrated-game-page';
15
-
16
- export let endpoint:string = '';
17
- export let datasource:string = '';
18
- export let lang:string = ''; // Language
19
- export let session:string = ''; // Value for sessionID
20
- export let userid:string = '';
21
- export let opsession:string = '';
22
- export let clientstyling:string = '';
23
- export let clientstylingurl:string = '';
24
- export let clockformat:string = '';
25
- export let lobbyid:string = '';
26
- export let currency:string = '';
27
- export let filteredcategories:string = '';
28
-
29
- export let loginurl:string = '';
30
- export let registerurl:string = '';
31
- export let depositurl:string = '';
32
- export let loginevent:string = '';
33
- export let registerevent:string = '';
34
- export let depositevent:string = '';
35
-
36
- export let mostplayed:string = '';
37
- export let mostplayedrounds:string = '';
38
- export let lastplayed:string = 'false';
39
- export let lastplayedperiod:string = 'Last30Days';
40
- export let favorites:string = '';
41
-
42
- export let desktopoffset:string = '0';
43
- export let mobileoffset:string = '0';
44
- export let alternativesearch:string = 'false';
45
-
46
- export let containermaxwidth:string = '';
47
- export let haspanicbutton:string = 'false';
48
-
49
- export let activecategory:string = 'LOBBY';
50
- export let actionevent:string = 'CategoryChange';
51
- export let livecasino:string = 'false';
52
- export let playforfun:string = 'true';
53
- export let gamemodal:string = 'true';
54
- export let playrandomgame:string = 'false';
55
- export let visiblegames:string = '10';
56
- export let integratedgameframedesktop:string = 'false';
57
- export let integratedgameframemobile:string = 'false';
58
- export let gamepagemodalurl:string = 'false';
59
- //Casino Winners
60
- export let enablecasinowinners: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 enablejackpotbanner: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 visualstructure:string = '';
82
- export let showsubgroups:string = 'false';
83
- //Casino Collections Providers
84
- export let enablecollections:string = '';
85
- export let type:string = '';
86
- export let titletype:string = '';
87
-
88
- // Button icon for random game widget
89
- export let randombuttonicon:string = '';
90
-
91
- let endpointURL:string;
92
- let DS:string;
93
- let language:string;
94
- let displayNone:boolean = false;
95
- let hasErrors:boolean = false;
96
- let error:string = 'Loading, please wait ...';
97
- let isLoggedIn:boolean = false;
98
- let sessionID:string = '';
99
- let playerID:string = '';
100
- let userAgent:string = window.navigator.userAgent;
101
- let isLoading:boolean = true;
102
-
103
- let headerPlaceholderSize:number = 0;
104
- let scrollTop:boolean = false;
105
- let customStylingContainer:HTMLElement;
106
- let mostPlayed;
107
- let lastPlayed;
108
- let fav;
109
-
110
- setupI18n({ withLocale: 'en', translations: {}});
111
-
112
- const messageHandler = (e:any):void => {
113
- if (e.data) {
114
- switch(e.data.type) {
115
- case 'WidgetTopReference':
116
- scrollTop = e.data.scrollTop;
117
- // check if the category has been changed and the scroll top
118
- if (scrollTop) {
119
- if (!headerPlaceholderSize) {
120
- headerPlaceholderSize = (getDevice(userAgent) === 'PC') ? parseInt(desktopoffset) : parseInt(mobileoffset);
121
- }
122
- window.scrollTo({ top: headerPlaceholderSize });
123
- }
124
- break;
125
-
126
- case 'UserSessionID':
127
- sessionID = e.data.session;
128
- playerID = e.data.userID;
129
- break;
130
-
131
- case 'CategoryChange':
132
- activecategory = e.data.itemId;
133
- break;
134
- }
135
- }
136
- }
137
-
138
- const checkAttrs = ():boolean => {
139
- if (!endpoint) {
140
- error = "Endpoint is missing! Please provide a valid endpointURL.";
141
- hasErrors = true;
142
-
143
- console.error(error);
144
- }
145
-
146
- if (!datasource) {
147
- error = "Datasource is missing! Please provide a valid datasource.";
148
- hasErrors = true;
149
-
150
- console.error(error);
151
- }
152
-
153
- if (!lang || lang.length < 2) {
154
- error = "Language is missing! Please provide a valid language (alpha2code)";
155
- hasErrors = true;
156
-
157
- console.error(error);
158
- }
159
-
160
- return hasErrors;
161
- }
162
-
163
- const setActiveLanguage = ():void => {
164
- setLocale(lang);
165
- }
166
-
167
- const initialSetup = ():void => {
168
- checkAttrs();
169
- setLocale(lang);
170
- endpointURL = endpoint;
171
- DS = datasource;
172
- language = lang;
173
-
174
- mostPlayed = mostplayed;
175
- lastPlayed = lastplayed;
176
- fav = favorites;
177
-
178
- hasErrors = false;
179
- isLoading = false;
180
- }
181
-
182
- const setSession = ():void => {
183
- checkSession(endpoint, session).then((res:any) => {
184
- sessionID = res.Guid;
185
- playerID = res.UserID;
186
- currency = res.Currency;
187
- isLoggedIn = true;
188
- }, (err:any) => {
189
- isLoggedIn = false;
190
- console.error('Error while checking the session - ', err)
191
- });
192
- }
193
-
194
- const setOpSession = ():void => {
195
- isLoggedIn = true;
196
- sessionID = opsession;
197
- }
198
-
199
- const setClientStyling = ():void => {
200
- let sheet = document.createElement('style');
201
- sheet.innerHTML = clientstyling;
202
- customStylingContainer.appendChild(sheet);
203
- }
204
-
205
- const setClientStylingURL = ():void => {
206
- displayNone = true;
207
-
208
- let url:URL = new URL(clientstylingurl);
209
- let cssFile:HTMLElement = document.createElement('style');
210
-
211
- fetch(url.href)
212
- .then((res:any) => res.text())
213
- .then((data:any) => {
214
- cssFile.innerHTML = data
215
-
216
- if (customStylingContainer) {
217
- setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
218
- setTimeout(() => { displayNone = false; }, 500);
219
- }
220
- });
221
- }
222
-
223
- onMount(() => {
224
- window.addEventListener('message', messageHandler, false);
225
-
226
- headerPlaceholderSize = (getDevice(userAgent) === 'PC') ? parseInt(desktopoffset) : parseInt(mobileoffset);
227
-
228
- return () => {
229
- window.removeEventListener('message', messageHandler);
230
- }
231
- });
232
-
233
- $: lang && setActiveLanguage();
234
- $: session && userid && endpoint && setSession();
235
- $: endpoint && datasource && lang && mostplayed && lastplayed && favorites && initialSetup();
236
- $: opsession && setOpSession();
237
- $: clientstyling && customStylingContainer && setClientStyling();
238
- $: clientstylingurl && customStylingContainer && setClientStylingURL();
239
-
240
- </script>
241
-
242
- <div bind:this={customStylingContainer} class={displayNone ? 'DisplayNone' : ''} part="{displayNone ? 'DisplayNone' : ''}">
243
- {#if hasErrors}
244
- <p style="color:var(--emfe-w-color-white, #FFFFFF)">{error}</p>
245
- {:else}
246
- <div class="CasinoLobby" part="CasinoLobby">
247
- <div class="WidgetsSection" part="WidgetsSection">
248
- <div class="HeaderPlaceholder" part="HeaderPlaceholder" style="height:{headerPlaceholderSize}px"></div>
249
- <div class="ScrollTop" part="ScrollTop"></div>
250
- <casino-categories-slider
251
- endpoint={endpointURL}
252
- datasource={DS}
253
- lang={language}
254
- session={sessionID}
255
- userid={userid}
256
- sessioncheck="false"
257
- {actionevent}
258
- {filteredcategories}
259
- {mostplayed}
260
- {mostplayedrounds}
261
- {lastplayed}
262
- {lastplayedperiod}
263
- {favorites}
264
- {activecategory}
265
- {clientstyling}
266
- {clientstylingurl}
267
- {containermaxwidth}
268
- location="secondaryMenu"
269
- {showsubgroups}
270
- ></casino-categories-slider>
271
- <casino-page
272
- session={sessionID}
273
- userid={userid}
274
- endpoint={endpointURL}
275
- datasource={DS}
276
- lang={language}
277
- {visiblegames}
278
- {playrandomgame}
279
- {activecategory}
280
- {alternativesearch}
281
- {favorites}
282
- {mostplayedrounds}
283
- {mostplayed}
284
- {lastplayed}
285
- {lastplayedperiod}
286
- {clientstyling}
287
- {clientstylingurl}
288
- {lobbyid}
289
- {containermaxwidth}
290
- {haspanicbutton}
291
- {livecasino}
292
- {currency}
293
- {filteredcategories}
294
- {gamepagemodalurl}
295
- {randombuttonicon}
296
- {enablejackpotbanner}
297
- {enablecasinowinners}
298
- {periodrecent}
299
- {periodtop}
300
- {numberusersrecent}
301
- {numberuserstop}
302
- {amountlimit}
303
- {isrecentavailable}
304
- {istopavailable}
305
- {integratedgameframedesktop}
306
- {integratedgameframemobile}
307
- {defaultcurrency}
308
- {enableautoscroll}
309
- {tabsorder}
310
- {backgroundsrc}
311
- {backgroundsrcmobile}
312
- {titlelogopath}
313
- {caticon0}
314
- {caticon1}
315
- {caticon2}
316
- {caticon3}
317
- {iconlabels}
318
- {enablecollections}
319
- {type}
320
- {titletype}>
321
- </casino-page>
322
- {#if gamemodal == 'true'}
323
- <casino-modal
324
- session={sessionID}
325
- userid={userid}
326
- endpoint={endpointURL}
327
- datasource={DS}
328
- lang={language}
329
- sessioncheck="false"
330
- {clientstyling}
331
- {clientstylingurl}
332
- {gamepagemodalurl}
333
- {haspanicbutton}
334
- >
335
- <casino-game-page
336
- session={sessionID}
337
- userid={userid}
338
- endpoint={endpointURL}
339
- datasource={DS}
340
- lang={language}
341
- loginevent={loginevent}
342
- registerevent={registerevent}
343
- depositevent={depositevent}
344
- checksession="false"
345
- {playforfun}
346
- {favorites}
347
- {clientstyling}
348
- {clientstylingurl}
349
- {clockformat}
350
- {haspanicbutton}
351
- {currency}
352
- {integratedgameframedesktop}
353
- {integratedgameframemobile}
354
- />
355
- </casino-modal>
356
- {/if}
357
- <casino-filter-modal
358
- {clientstylingurl}
359
- {clientstyling}
360
- session={sessionID}
361
- userid={userid}
362
- endpoint={endpointURL}
363
- datasource={DS}
364
- lang={language}
365
- sessioncheck="false">
366
- <casino-filter-page
367
- {clientstyling}
368
- {clientstylingurl}
369
- session={sessionID}
370
- userid={userid}
371
- endpoint={endpointURL}
372
- datasource={DS}
373
- lang={language}>
374
- </casino-filter-page>
375
- </casino-filter-modal>
376
- </div>
377
- </div>
378
- {/if}
379
- </div>
380
-
381
- <style lang="scss">
382
- * {
383
- /* Display & Box Model */
384
- margin: 0;
385
- padding: 0;
386
- box-sizing: border-box;
387
- }
388
-
389
- :host {
390
- font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
391
- }
392
-
393
- .CasinoLobby {
394
- background-color: var(--emfe-w-color-contrast, #07072A);
395
- width: 100%;
396
- margin: 0 auto;
397
- min-height: 100vh;
398
- /*padding: 0 1em;*/
399
- }
400
-
401
- .DisplayNone {
402
- display: none;
403
- }
404
-
405
- .WidgetsSection {
406
- padding-bottom: 40px;
407
- }
408
- </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
- }