@everymatrix/casino-games-category-section 1.39.2 → 1.40.0
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-games-category-section",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.40.0",
|
|
4
4
|
"main": "dist/casino-games-category-section.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "ca3bc98c22d89e64f9d025debb2e59e3e4f22f4c"
|
|
39
39
|
}
|
|
@@ -441,32 +441,7 @@
|
|
|
441
441
|
break;
|
|
442
442
|
|
|
443
443
|
case 'CategoryUpdate':
|
|
444
|
-
|
|
445
|
-
lobbyView = false;
|
|
446
|
-
searchItem = false;
|
|
447
|
-
validObservers = true;
|
|
448
|
-
isLazyLoading = false;
|
|
449
|
-
categoryid = e.data.itemId;
|
|
450
|
-
if (categoryid !== 'MOSTPLAYED') {
|
|
451
|
-
showLoadCategory = false;
|
|
452
|
-
}
|
|
453
|
-
if(casinomygames !== 'true') {
|
|
454
|
-
getData(categoryid, 0, limit).then((res:any) => {
|
|
455
|
-
categoryData = res;
|
|
456
|
-
categoryData.games.items.forEach((item:any) => {
|
|
457
|
-
item.isFavorite = checkFavorite(item.id);
|
|
458
|
-
});
|
|
459
|
-
shownCategoryData = categoryData.games.items;
|
|
460
|
-
showLoadCategory = false;
|
|
461
|
-
// @TODO: replace this quick fix - when there are only a few category games, the view scrolls to the footer
|
|
462
|
-
if(shownCategoryData.length < 10 && e.data.origin ==! 'filters') {
|
|
463
|
-
scrollTop = true;
|
|
464
|
-
setTimeout(() => {
|
|
465
|
-
window.postMessage({ type: 'WidgetTopReference', scrollTop }, window.location.href);
|
|
466
|
-
}, 500);
|
|
467
|
-
}
|
|
468
|
-
});
|
|
469
|
-
}
|
|
444
|
+
categoryUpdateHandler(e.data.itemId);
|
|
470
445
|
break;
|
|
471
446
|
|
|
472
447
|
case `SetUnfavoredGame${categoryid}`:
|
|
@@ -498,6 +473,35 @@
|
|
|
498
473
|
}
|
|
499
474
|
}
|
|
500
475
|
|
|
476
|
+
const categoryUpdateHandler = (itemId:string):void => {
|
|
477
|
+
searched = false;
|
|
478
|
+
lobbyView = false;
|
|
479
|
+
searchItem = false;
|
|
480
|
+
validObservers = true;
|
|
481
|
+
isLazyLoading = false;
|
|
482
|
+
categoryid = itemId;
|
|
483
|
+
if (categoryid !== 'MOSTPLAYED') {
|
|
484
|
+
showLoadCategory = false;
|
|
485
|
+
}
|
|
486
|
+
if(casinomygames !== 'true') {
|
|
487
|
+
getData(categoryid, 0, limit).then((res:any) => {
|
|
488
|
+
categoryData = res;
|
|
489
|
+
categoryData.games.items.forEach((item:any) => {
|
|
490
|
+
item.isFavorite = checkFavorite(item.id);
|
|
491
|
+
});
|
|
492
|
+
shownCategoryData = categoryData.games.items;
|
|
493
|
+
showLoadCategory = false;
|
|
494
|
+
// @TODO: replace this quick fix - when there are only a few category games, the view scrolls to the footer
|
|
495
|
+
if(shownCategoryData.length < 10 && e.data.origin ==! 'filters') {
|
|
496
|
+
scrollTop = true;
|
|
497
|
+
setTimeout(() => {
|
|
498
|
+
window.postMessage({ type: 'WidgetTopReference', scrollTop }, window.location.href);
|
|
499
|
+
}, 500);
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
501
505
|
const addFavoriteState = () => {
|
|
502
506
|
if(categoryData) {
|
|
503
507
|
shownCategoryData = categoryData.games.items;
|
|
@@ -686,6 +690,7 @@
|
|
|
686
690
|
}
|
|
687
691
|
break;
|
|
688
692
|
default:
|
|
693
|
+
categoryUpdateHandler(categoryid);
|
|
689
694
|
break;
|
|
690
695
|
}
|
|
691
696
|
}
|