@everymatrix/casino-games-category-section 1.31.2 → 1.32.1

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/index.html CHANGED
@@ -31,12 +31,15 @@
31
31
 
32
32
  <div class="webcomponent">
33
33
  <casino-games-category-section
34
- displayedgamecount=""
34
+ fetchviaevent="false"
35
+ displayedgamecount="12"
36
+ showallbuttongamescount="10"
37
+ actionevent="CategoryChange"
38
+ showallpage="casino"
35
39
  endpoint="https://demo-api.stage.norway.everymatrix.com"
36
40
  lang="en"
37
41
  datasource="RNG"
38
42
  categoryid="RNG$jacpots"
39
- fetchviaevent="false"
40
43
  gamepagemodalurl="true"
41
44
  integratedgameframedesktop="true"
42
45
  integratedgameframemobile="true">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-games-category-section",
3
- "version": "1.31.2",
3
+ "version": "1.32.1",
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": "ced96438778b5026f2dcfb9a87463aa4f1edaa62"
38
+ "gitHead": "7d04351ab1045c0938bb34d32d0c16c97b169e13"
39
39
  }
@@ -37,7 +37,10 @@
37
37
  export let filterbylogo:string = '';
38
38
  export let casinogamesgridslider:string = 'false';
39
39
  export let fetchviaevent:string = 'false';
40
+ export let showallpage:string = 'casino';
41
+ export let actionevent:string = 'CategoryChange';
40
42
  export let displayedgamecount:string = '10';
43
+ export let showallbuttongamescount: string = '10';
41
44
 
42
45
  //Revert manually
43
46
  // let livelobbyendpoint = `${endpoint}/lobby/tables`;
@@ -269,31 +272,30 @@
269
272
  }
270
273
 
271
274
  //Standalone fetching games using categoryid when fetchviaevent is false
272
- const fetchGamesByCategory = (categoryid, displayedgamecount) => {
273
- if(categoryid !== ''){
274
- searched = false;
275
- lobbyView = true;
276
- addfilterselector = 'false';
277
- addsortingselector = 'false';
278
- showLoadCategory = true;
279
- searchItem = false;
280
- validObservers = false;
281
-
282
- getData(categoryid, 0, +displayedgamecount).then((res:any) => {
283
- categoryData = res;
284
- shownCategoryData = categoryData.games.items;
285
- if (shownCategoryData) {
286
- shownCategoryData.forEach((item:any) => {
287
- item.isFavorite = checkFavorite(item.id);
288
- });
289
-
290
- }
291
- });
275
+ const fetchGamesByCategory = (categoryid, displayedgamecount, showallbuttongamescount) => {
276
+ if(categoryid !== ''){
277
+ searched = false;
278
+ lobbyView = true;
279
+ addfilterselector = 'false';
280
+ addsortingselector = 'false';
281
+ searchItem = false;
282
+ validObservers = false;
283
+
284
+ showLoadCategory = (+displayedgamecount > +showallbuttongamescount);
285
+
286
+ getData(categoryid, 0, +displayedgamecount).then((res:any) => {
287
+ categoryData = res;
288
+ shownCategoryData = categoryData.games.items;
289
+ if (shownCategoryData) {
290
+ shownCategoryData.forEach((item:any) => {
291
+ item.isFavorite = checkFavorite(item.id);
292
+ });
293
+ }
294
+ });
292
295
  }
293
296
  }
294
297
 
295
298
  const messageHandler = (e:any) => {
296
-
297
299
  if (e.data) {
298
300
  switch(e.data.type) {
299
301
  case 'MostPlayedData':
@@ -570,7 +572,7 @@
570
572
 
571
573
  // @TODO categoryId type fix
572
574
  const showCategory = (categoryId:any) => {
573
- window.postMessage({ type: "CategoryChange", itemId: categoryId }, window.location.href);
575
+ window.postMessage({ type: `${actionevent}`, itemId: categoryId, showallpage}, window.location.href);
574
576
  }
575
577
 
576
578
  const initialSetup = () => {
@@ -655,7 +657,7 @@
655
657
  });
656
658
 
657
659
  $: lang && setActiveLanguage();
658
- $: (fetchviaevent === 'false' || fetchviaevent === '') && endpoint && lang && categoryid && datasource && displayedgamecount && fetchGamesByCategory(categoryid, displayedgamecount);
660
+ $: (fetchviaevent === 'false' || fetchviaevent === '') && endpoint && lang && categoryid && datasource && displayedgamecount && showallbuttongamescount && fetchGamesByCategory(categoryid, displayedgamecount, showallbuttongamescount);
659
661
  $: dataloaded && thumbnailContainer && setupObserver();
660
662
  $: lang && categoryid && initialSetup();
661
663
  $: translationurl && setTranslationUrl();