@everymatrix/casino-games-category-section 0.0.257 → 0.0.260
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": "0.0.
|
|
3
|
+
"version": "0.0.260",
|
|
4
4
|
"main": "dist/casino-games-category-section.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": "a30fdd6f6180c69aabbc0daf1bf2a2e1342bf0e2"
|
|
40
40
|
}
|
|
@@ -65,12 +65,8 @@
|
|
|
65
65
|
let favoriteGames:Array<Object>;
|
|
66
66
|
let showFavGamesCategory:boolean = false;
|
|
67
67
|
let receivedFavoriteResults:Object;
|
|
68
|
-
let activeCategory:String;
|
|
69
|
-
let operatorConfig:any = window.widgetConfig;
|
|
70
|
-
let favoredGamesCollection:Array<string> = [];
|
|
71
68
|
let sessionId:string = '';
|
|
72
69
|
let userId:string = '';
|
|
73
|
-
let getFavoredGamesCache:any = undefined;
|
|
74
70
|
let mostPlayedScreen:Boolean = false;
|
|
75
71
|
let customStylingContainer:HTMLElement;
|
|
76
72
|
let validObservers:boolean = false;
|
|
@@ -105,7 +101,7 @@
|
|
|
105
101
|
}
|
|
106
102
|
|
|
107
103
|
// IntersectionObserver used for loading more games
|
|
108
|
-
let observer = new IntersectionObserver((entries
|
|
104
|
+
let observer = new IntersectionObserver((entries) => {
|
|
109
105
|
entries.forEach(async (entry) => {
|
|
110
106
|
let gameid = entry.target.gameid; // eslint-disable-line
|
|
111
107
|
let index = entry.target.elems_index; // eslint-disable-line
|
|
@@ -383,7 +379,7 @@
|
|
|
383
379
|
}
|
|
384
380
|
}
|
|
385
381
|
}
|
|
386
|
-
|
|
382
|
+
|
|
387
383
|
// @TODO categoryId type fix
|
|
388
384
|
const loadMoreGames = (categoryId:any) => {
|
|
389
385
|
limit += 1;
|
|
@@ -400,15 +396,6 @@
|
|
|
400
396
|
}
|
|
401
397
|
}
|
|
402
398
|
|
|
403
|
-
// construct favorite array used to check if game id is not already present in fav list
|
|
404
|
-
const getGamesIds = (favoritesArray:any) => {
|
|
405
|
-
favoredGamesCollection = [];
|
|
406
|
-
favoritesArray.items.forEach((fav:any) => {
|
|
407
|
-
favoredGamesCollection.push(fav.id);
|
|
408
|
-
});
|
|
409
|
-
return favoredGamesCollection;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
399
|
const checkFavorite = (gameId:string) => {
|
|
413
400
|
if (favoriteGames) {
|
|
414
401
|
if (favoriteGames.findIndex(obj => obj.id == gameId) !== -1) {
|
|
@@ -471,18 +458,14 @@
|
|
|
471
458
|
}
|
|
472
459
|
}
|
|
473
460
|
|
|
474
|
-
// const setupVisibility = (customStylingContainer, dataloaded) => {
|
|
475
|
-
// if (customStylingContainer && dataloaded && hidden) {
|
|
476
|
-
// document.addEventListener(visibilityChange, handleVisibilityChange, false);
|
|
477
|
-
// }
|
|
478
|
-
// }
|
|
479
|
-
|
|
480
461
|
onMount(() => {
|
|
462
|
+
window.addEventListener('visibilitychange', (e) => handleVisibilityChange())
|
|
481
463
|
window.addEventListener('message', messageHandler, false);
|
|
482
464
|
window.postMessage({ type: 'GetFavoredGame' }, window.location.href);
|
|
483
465
|
|
|
484
466
|
return () => {
|
|
485
467
|
window.removeEventListener('message', messageHandler);
|
|
468
|
+
window.removeEventListener('visibilitychange', messageHandler);
|
|
486
469
|
}
|
|
487
470
|
});
|
|
488
471
|
|
|
@@ -714,13 +697,6 @@
|
|
|
714
697
|
|
|
715
698
|
|
|
716
699
|
<style lang="scss">
|
|
717
|
-
//This function does a multiplication
|
|
718
|
-
// in order to work with px the
|
|
719
|
-
// same way as working with em
|
|
720
|
-
@function ttp($value) {
|
|
721
|
-
$multiplicator: 16px;
|
|
722
|
-
@return $value * $multiplicator;
|
|
723
|
-
}
|
|
724
700
|
|
|
725
701
|
:host {
|
|
726
702
|
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
@@ -732,8 +708,8 @@
|
|
|
732
708
|
box-sizing: border-box;
|
|
733
709
|
}
|
|
734
710
|
|
|
735
|
-
$grid-gap:
|
|
736
|
-
$grid-cell-size:
|
|
711
|
+
$grid-gap: 16px;
|
|
712
|
+
$grid-cell-size: 192px;
|
|
737
713
|
|
|
738
714
|
.CategoryName,
|
|
739
715
|
.StatusText {
|
|
@@ -752,11 +728,11 @@
|
|
|
752
728
|
text-align: center;
|
|
753
729
|
width: 100%;
|
|
754
730
|
padding-left: 5px;
|
|
755
|
-
font-size:
|
|
731
|
+
font-size: 16px;
|
|
756
732
|
}
|
|
757
733
|
|
|
758
734
|
.NoRecentSearches {
|
|
759
|
-
padding-bottom:
|
|
735
|
+
padding-bottom: 30px;
|
|
760
736
|
}
|
|
761
737
|
|
|
762
738
|
.NoRecentSearchesCenter {
|
|
@@ -765,7 +741,7 @@
|
|
|
765
741
|
|
|
766
742
|
.NoFavoriteGames {
|
|
767
743
|
color: var(--emfe-w-color-white, #FFFFFF);
|
|
768
|
-
font-size:
|
|
744
|
+
font-size: 16px;
|
|
769
745
|
display: flex;
|
|
770
746
|
flex-direction: column;
|
|
771
747
|
align-items: center;
|
|
@@ -793,7 +769,7 @@
|
|
|
793
769
|
.SearchWaiting {
|
|
794
770
|
grid-column: 1/-1;
|
|
795
771
|
color: var(--emfe-w-color-white, #FFFFFF);
|
|
796
|
-
font-size:
|
|
772
|
+
font-size: 13px;
|
|
797
773
|
text-align: center;
|
|
798
774
|
}
|
|
799
775
|
|
|
@@ -802,8 +778,8 @@
|
|
|
802
778
|
display: flex;
|
|
803
779
|
align-items: center;
|
|
804
780
|
justify-content: space-between;
|
|
805
|
-
padding:
|
|
806
|
-
margin-bottom:
|
|
781
|
+
padding: 8px 5px 0;
|
|
782
|
+
margin-bottom: 16px;
|
|
807
783
|
.CategoryNameLink {
|
|
808
784
|
display: block;
|
|
809
785
|
cursor: pointer;
|
|
@@ -820,8 +796,8 @@
|
|
|
820
796
|
|
|
821
797
|
.CasinoGamesContainer {
|
|
822
798
|
width: 100%;
|
|
823
|
-
margin-top:
|
|
824
|
-
padding-bottom:
|
|
799
|
+
margin-top: 24px;
|
|
800
|
+
padding-bottom: 16px;
|
|
825
801
|
}
|
|
826
802
|
|
|
827
803
|
.CasinoGamesGrid {
|