@everymatrix/casino-lobby 1.0.16 → 1.0.69
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/es2015/casino-lobby.cjs +1 -0
- package/es2015/casino-lobby.js +16 -0
- package/package.json +19 -33
- package/README.md +0 -0
- package/dist/casino-lobby.js +0 -33
- package/dist/casino-lobby.js.map +0 -1
- package/documentation.md +0 -173
- package/index.html +0 -55
- 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/CasinoLobby.svelte +0 -408
- package/src/i18n.js +0 -25
- package/src/index.ts +0 -4
- package/stories/CasinoLobby.stories.js +0 -13
- package/tsconfig.json +0 -6
package/src/CasinoLobby.svelte
DELETED
|
@@ -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,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({});
|