@everymatrix/casino-game-thumbnail 1.2.0 → 1.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-game-thumbnail",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"main": "dist/casino-game-thumbnail.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "02dbae5b4d167acdb57c72905b756343a318870a"
|
|
40
40
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
export let lang:string = 'en';
|
|
14
14
|
export let clientstyling:string = ''
|
|
15
15
|
export let clientstylingurl:string = '';
|
|
16
|
-
export let
|
|
16
|
+
export let translationurl:string = '';
|
|
17
17
|
|
|
18
18
|
export let favorites:string = '';
|
|
19
19
|
export let gamethumbnail:string = '';
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
export let gamevendor:string = '';
|
|
22
22
|
export let gameid:string = '';
|
|
23
23
|
export let gameisnew:string = '';
|
|
24
|
-
export let
|
|
24
|
+
export let gametag:string = '';
|
|
25
25
|
export let gamefunmode:boolean = false;
|
|
26
26
|
export let searchitem:boolean = false;
|
|
27
27
|
export let gamefavorite:boolean = false;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
const setTranslationUrl = ():void => {
|
|
142
|
-
let url:string =
|
|
142
|
+
let url:string = translationurl;
|
|
143
143
|
|
|
144
144
|
fetch(url).then((res:any) => res.json())
|
|
145
145
|
.then((res) => {
|
|
@@ -155,10 +155,10 @@
|
|
|
155
155
|
addNewMessages(item, GameThumbnailTranslations[item]);
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
-
const enter = () => {
|
|
158
|
+
const enter = ():void => {
|
|
159
159
|
hover = true;
|
|
160
160
|
}
|
|
161
|
-
const leave = () => {
|
|
161
|
+
const leave = ():void => {
|
|
162
162
|
hover = false;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -263,12 +263,12 @@
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
const getLiveLobbyURL = (vendorName, id) => {
|
|
266
|
+
const getLiveLobbyURL = (vendorName, id):string => {
|
|
267
267
|
return `${endpoint}/encoder/lobby/updates/${vendorName}/${id}`;
|
|
268
268
|
}
|
|
269
|
-
const connectGameToLiveLobby = () => {
|
|
269
|
+
const connectGameToLiveLobby = ():void => {
|
|
270
270
|
if (livelobbyendpoint && EventSource && !liveLobbyConnection) {
|
|
271
|
-
|
|
271
|
+
if (gamevendor && gameid) {
|
|
272
272
|
liveLobbyConnection = new EventSource(getLiveLobbyURL(gamevendor, gameid)),
|
|
273
273
|
liveLobbyConnection.addEventListener('message', liveLobbyMessageHandler);
|
|
274
274
|
}
|
|
@@ -360,28 +360,34 @@
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
|
|
364
|
-
const setLiveLobbyData = () => {
|
|
363
|
+
//Revert manually, commented changes are the current ones, will undo after deploy
|
|
364
|
+
const setLiveLobbyData = ():void => {
|
|
365
365
|
let url:any = new URL(`${livelobbyendpoint.split('?')[0]}`);
|
|
366
366
|
url.searchParams.append("platform", getDevice(userAgent));
|
|
367
367
|
url.searchParams.append('language', lang);
|
|
368
|
+
// let url:URL = new URL(`${endpoint}${livelobbyendpoint}`);
|
|
369
|
+
|
|
368
370
|
fetch(url)
|
|
369
|
-
|
|
371
|
+
.then((res:any) => res.json())
|
|
370
372
|
.then((data:any) => {
|
|
371
373
|
const { details } = data[0];
|
|
372
374
|
livegamedata = details;
|
|
373
375
|
});
|
|
376
|
+
// .then(res => res.json())
|
|
377
|
+
// .then(data => {
|
|
378
|
+
// livegamedata = data.items.find(gameDetails => gameDetails.id == gameid);
|
|
379
|
+
// });
|
|
374
380
|
}
|
|
375
|
-
const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR) => {
|
|
381
|
+
const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR):string => {
|
|
376
382
|
if (value !== undefined && value !== null) {
|
|
377
383
|
return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
|
|
378
384
|
}
|
|
379
385
|
return '';
|
|
380
386
|
}
|
|
381
|
-
const contains = (array, value) => {
|
|
387
|
+
const contains = (array, value):any[] => {
|
|
382
388
|
return array.some(item => item === value);
|
|
383
389
|
}
|
|
384
|
-
const getGameComponent = (livegamedata) => {
|
|
390
|
+
const getGameComponent = (livegamedata):any => {
|
|
385
391
|
let GameComponent = null;
|
|
386
392
|
if (livegamedata) {
|
|
387
393
|
const { vendorCategory } = livegamedata;
|
|
@@ -401,7 +407,7 @@
|
|
|
401
407
|
}
|
|
402
408
|
return GameComponent;
|
|
403
409
|
};
|
|
404
|
-
const renderBetLimits = (min, max, currencySymbol) => {
|
|
410
|
+
const renderBetLimits = (min, max, currencySymbol):string => {
|
|
405
411
|
let rightSideContent;
|
|
406
412
|
let leftSideContent;
|
|
407
413
|
if (min !== undefined && min !== null && max !== undefined && max !== null) {
|
|
@@ -588,7 +594,7 @@
|
|
|
588
594
|
$: clientstyling && customStylingContainer && setClientStyling();
|
|
589
595
|
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
590
596
|
$: favorites && setFavorites();
|
|
591
|
-
$:
|
|
597
|
+
$: translationurl && setTranslationUrl();
|
|
592
598
|
$: gamecellsize && clientstylingurl && setClientStylingURL();
|
|
593
599
|
$: endpoint && livelobbyendpoint && setLiveLobbyData();
|
|
594
600
|
$: livegamedata && updateComponent();
|
|
@@ -643,8 +649,8 @@
|
|
|
643
649
|
{#if gameisnew}
|
|
644
650
|
<span class="GameExtraInfoLabel NewGameTag" part="GameExtraInfoLabel NewGameTag">{$_('gameThumbnail.new')}</span>
|
|
645
651
|
{/if}
|
|
646
|
-
{#if
|
|
647
|
-
<span class="GameExtraInfoLabel PopularGameTag" part="GameExtraInfoLabel PopularGameTag">{
|
|
652
|
+
{#if gametag}
|
|
653
|
+
<span class="GameExtraInfoLabel PopularGameTag" part="GameExtraInfoLabel PopularGameTag">{gametag}</span>
|
|
648
654
|
{/if}
|
|
649
655
|
{#if livegamedata}
|
|
650
656
|
{#if !isopen && starttime && timeformat}
|