@everymatrix/casino-game-thumb-view 1.13.5 → 1.15.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.
Files changed (38) hide show
  1. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
  2. package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +1 -0
  3. package/dist/casino-game-thumb-view/p-662bd2b5.entry.js +7 -0
  4. package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +1 -0
  5. package/dist/casino-game-thumb-view/p-ef53c961.entry.js +1 -0
  6. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +8 -7
  7. package/dist/cjs/casino-game-thumb-view.cjs.js +1 -1
  8. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +46 -32
  9. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +6 -2
  10. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +5 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +8 -7
  13. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +48 -35
  14. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +6 -2
  15. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +24 -23
  16. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +51 -2
  17. package/dist/components/casino-extrainfo-roulette.js +8 -7
  18. package/dist/components/casino-game-thumb-view.js +43 -30
  19. package/dist/components/casino-game-thumbnail-extrainfo2.js +6 -2
  20. package/dist/components/casino-game-thumbnail-overlay2.js +9 -8
  21. package/dist/components/casino-normal-game-thumbnail.js +22 -3
  22. package/dist/esm/casino-extrainfo-roulette.entry.js +8 -7
  23. package/dist/esm/casino-game-thumb-view.js +1 -1
  24. package/dist/esm/casino-game-thumb-view_2.entry.js +46 -32
  25. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +6 -2
  26. package/dist/esm/casino-normal-game-thumbnail.entry.js +5 -1
  27. package/dist/esm/loader.js +1 -1
  28. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +2 -0
  29. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +9 -8
  30. package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +7 -6
  31. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -0
  32. package/dist/types/components.d.ts +25 -22
  33. package/package.json +1 -1
  34. package/dist/casino-game-thumb-view/p-33e707bf.entry.js +0 -1
  35. package/dist/casino-game-thumb-view/p-45836b67.entry.js +0 -7
  36. package/dist/casino-game-thumb-view/p-b153f943.entry.js +0 -1
  37. package/dist/casino-game-thumb-view/p-fc7672a9.entry.js +0 -1
  38. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
@@ -10,13 +10,14 @@ const CasinoGameThumbnailOverlay = /*@__PURE__*/ proxyCustomElement(class extend
10
10
  this.__registerHost();
11
11
  this.playClicked = createEvent(this, "playCasinoGame", 7);
12
12
  /**
13
- * integratedGameFrameMobile
13
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
14
14
  */
15
- this.integratedGameFrameMobile = false;
15
+ this.integratedGameframeMobile = false;
16
16
  /**
17
- * Open game a a frame, gamepagemodalurl value should be set
17
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
18
+ * Open game in a frame, gamepageModalurl value should be set
18
19
  */
19
- this.integratedGameFrameDesktop = false;
20
+ this.integratedGameframeDesktop = false;
20
21
  /**
21
22
  * Language
22
23
  */
@@ -29,7 +30,7 @@ const CasinoGameThumbnailOverlay = /*@__PURE__*/ proxyCustomElement(class extend
29
30
  gameId: this.gameId,
30
31
  isMobile: isMobile(this.userAgent),
31
32
  };
32
- let isFrameMode = this.integratedGameFrameMobile || this.integratedGameFrameDesktop;
33
+ let isFrameMode = this.integratedGameframeMobile || this.integratedGameframeDesktop;
33
34
  window.postMessage({
34
35
  type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
35
36
  eventData: isFrameMode
@@ -41,9 +42,9 @@ const CasinoGameThumbnailOverlay = /*@__PURE__*/ proxyCustomElement(class extend
41
42
  }
42
43
  static get style() { return casinoGameThumbnailOverlayCss; }
43
44
  }, [4, "casino-game-thumbnail-overlay", {
44
- "integratedGameFrameMobile": [4, "integrated-game-frame-mobile"],
45
- "gamepageModalUrl": [1, "gamepage-modal-url"],
46
- "integratedGameFrameDesktop": [4, "integrated-game-frame-desktop"],
45
+ "gamepageModalurl": [1, "gamepage-modalurl"],
46
+ "integratedGameframeMobile": [4, "integrated-gameframe-mobile"],
47
+ "integratedGameframeDesktop": [4, "integrated-gameframe-desktop"],
47
48
  "language": [1],
48
49
  "gameName": [1, "game-name"],
49
50
  "gameVendor": [1, "game-vendor"],
@@ -1,4 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$3 } from './casino-game-thumbnail-betlimit2.js';
3
+ import { d as defineCustomElement$2 } from './casino-game-thumbnail-extrainfo2.js';
2
4
 
3
5
  const casinoNormalGameThumbnailCss = ":host{display:block}";
4
6
 
@@ -7,22 +9,39 @@ const CasinoNormalGameThumbnail$1 = /*@__PURE__*/ proxyCustomElement(class exten
7
9
  super();
8
10
  this.__registerHost();
9
11
  }
12
+ async onGameLoaded(gameInfo) {
13
+ var _a;
14
+ (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(gameInfo);
15
+ }
10
16
  render() {
11
- return h(Host, null);
17
+ return (h(Host, null, h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language })));
12
18
  }
13
19
  static get style() { return casinoNormalGameThumbnailCss; }
14
- }, [0, "casino-normal-game-thumbnail"]);
20
+ }, [0, "casino-normal-game-thumbnail", {
21
+ "language": [1],
22
+ "onGameLoaded": [64]
23
+ }]);
15
24
  function defineCustomElement$1() {
16
25
  if (typeof customElements === "undefined") {
17
26
  return;
18
27
  }
19
- const components = ["casino-normal-game-thumbnail"];
28
+ const components = ["casino-normal-game-thumbnail", "casino-game-thumbnail-betlimit", "casino-game-thumbnail-extrainfo"];
20
29
  components.forEach(tagName => { switch (tagName) {
21
30
  case "casino-normal-game-thumbnail":
22
31
  if (!customElements.get(tagName)) {
23
32
  customElements.define(tagName, CasinoNormalGameThumbnail$1);
24
33
  }
25
34
  break;
35
+ case "casino-game-thumbnail-betlimit":
36
+ if (!customElements.get(tagName)) {
37
+ defineCustomElement$3();
38
+ }
39
+ break;
40
+ case "casino-game-thumbnail-extrainfo":
41
+ if (!customElements.get(tagName)) {
42
+ defineCustomElement$2();
43
+ }
44
+ break;
26
45
  } });
27
46
  }
28
47
  defineCustomElement$1();
@@ -14,7 +14,7 @@ const CasinoExtrainfoRoulette = class {
14
14
  async onGameLoaded(gameInfo) {
15
15
  var _a;
16
16
  this.gameInfo = Object.assign({}, gameInfo);
17
- this.gameDetails = Object.assign({}, this.gameInfo.details);
17
+ this.gameDetails = this.gameInfo.details ? Object.assign({}, this.gameInfo.details) : null;
18
18
  (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(gameInfo);
19
19
  }
20
20
  async onGameDetailUpdated(details) {
@@ -26,13 +26,14 @@ const CasinoExtrainfoRoulette = class {
26
26
  return ROULETTE_COLOR_MAP[value];
27
27
  }
28
28
  render() {
29
- var _a, _b, _c, _d, _e;
30
- const isDouble = ((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.category.toLowerCase()) ===
31
- WIDGETTYPE_GAMECATEGORY.doubleballroulette;
29
+ var _a, _b, _c, _d;
30
+ const isDouble = this.gameDetails ?
31
+ this.gameDetails.category.toLowerCase() ===
32
+ WIDGETTYPE_GAMECATEGORY.doubleballroulette : false;
32
33
  let rouletteNumbers = (isDouble
33
- ? (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentDoubleBallRouletteNumbers
34
- : (_c = this.gameDetails) === null || _c === void 0 ? void 0 : _c.currentRouletteNumbers) || [];
35
- return (h(Host, null, h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language }, h("div", { slot: "category-details", class: `LiveIcons ${((_d = this.gameDetails) === null || _d === void 0 ? void 0 : _d.isOpen) ? 'GameBackdrop' : ''}`, part: `LiveIcons ${((_e = this.gameDetails) === null || _e === void 0 ? void 0 : _e.isOpen) ? 'GameBackdrop' : ''}` }, rouletteNumbers.slice(0, 5).map((rNum, idx) => isDouble === true ? (h("div", { class: "Double", part: "Double" }, h("span", { id: `s${idx}0`, class: `LatestResult ${idx == 0 ? 'First' : ''} ${this.showLiveClass ? 'FirstElementAnimated' : ''} ${this.getRouletteNumberColor(rNum[0])}` }, ' ', rNum[0]), h("span", { id: `s${idx}1`, class: `LatestResult ${idx == 0 ? 'First' : ''} ${this.showLiveClass ? 'FirstElementAnimated' : ''} ${this.getRouletteNumberColor(rNum[1])}` }, ' ', rNum[1]))) : (h("span", { id: `s${idx}`, class: `LatestResult ${idx == 0 ? 'First' : ''} ${this.showLiveClass ? 'FirstElementAnimated' : ''} ${this.getRouletteNumberColor(rNum)}` }, ' ', rNum)))))));
34
+ ? (_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.currentDoubleBallRouletteNumbers
35
+ : (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentRouletteNumbers) || [];
36
+ return (h(Host, null, h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language }, h("div", { slot: "category-details", class: `LiveIcons ${((_c = this.gameDetails) === null || _c === void 0 ? void 0 : _c.isOpen) ? 'GameBackdrop' : ''}`, part: `LiveIcons ${((_d = this.gameDetails) === null || _d === void 0 ? void 0 : _d.isOpen) ? 'GameBackdrop' : ''}` }, rouletteNumbers.slice(0, 5).map((rNum, idx) => isDouble === true ? (h("div", { class: "Double", part: "Double" }, h("span", { id: `s${idx}0`, class: `LatestResult ${idx == 0 ? 'First' : ''} ${this.showLiveClass ? 'FirstElementAnimated' : ''} ${this.getRouletteNumberColor(rNum[0])}` }, ' ', rNum[0]), h("span", { id: `s${idx}1`, class: `LatestResult ${idx == 0 ? 'First' : ''} ${this.showLiveClass ? 'FirstElementAnimated' : ''} ${this.getRouletteNumberColor(rNum[1])}` }, ' ', rNum[1]))) : (h("span", { id: `s${idx}`, class: `LatestResult ${idx == 0 ? 'First' : ''} ${this.showLiveClass ? 'FirstElementAnimated' : ''} ${this.getRouletteNumberColor(rNum)}` }, ' ', rNum)))))));
36
37
  }
37
38
  };
38
39
  CasinoExtrainfoRoulette.style = casinoExtrainfoRouletteCss;
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["casino-game-thumbnail-betlimit_2",[[4,"casino-game-thumbnail-extrainfo",{"language":[1],"betLimit":[32],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}],[0,"casino-game-thumbnail-betlimit",{"betLimit":[16],"numberOfPlayers":[2,"number-of-players"]}]]],["casino-extrainfo-baccarat",[[0,"casino-extrainfo-baccarat",{"language":[1],"showRoundBoard":[4,"show-round-board"],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64],"onBaccaratResultChanged":[64]}]]],["casino-extrainfo-blackjack",[[0,"casino-extrainfo-blackjack",{"language":[1],"gameInfo":[32],"gameDetails":[32],"seatsStatus":[32],"isTableFull":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-extrainfo-roulette",[[0,"casino-extrainfo-roulette",{"language":[1],"gameInfo":[32],"gameDetails":[32],"showLiveClass":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-normal-game-thumbnail",[[0,"casino-normal-game-thumbnail"]]],["casino-game-thumb-view_2",[[1,"casino-game-thumb-view",{"language":[1],"endpoint":[1],"userId":[8,"user-id"],"showGameName":[4,"show-game-name"],"session":[1],"showFavoredCategory":[4,"show-favored-category"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"integratedGameFrameMobile":[4,"integrated-game-frame-mobile"],"gamepageModalUrl":[1,"gamepage-modal-url"],"integratedGameFrameDesktop":[4,"integrated-game-frame-desktop"],"loadDetails":[4,"load-details"],"showRoundBoard":[4,"show-round-board"],"visibilityConnect":[1,"visibility-connect"],"connectLive":[1,"connect-live"],"gameCategory":[1,"game-category"],"livelobbyEndpoint":[1,"livelobby-endpoint"],"gameId":[8,"game-id"],"gameName":[1,"game-name"],"subVendor":[1,"sub-vendor"],"gameVendor":[1,"game-vendor"],"hasFunMode":[4,"has-fun-mode"],"hasAnonymousFunMode":[4,"has-anonymous-fun-mode"],"platform":[1],"thumbnail":[1],"isFavorite":[4,"is-favorite"],"isNew":[4,"is-new"],"cellSize":[1,"cell-size"],"gameTag":[1,"game-tag"],"type":[1],"gameInfo":[32],"isTableFull":[32],"hover":[32]},[[1,"mouseenter","handleMouseOver"],[1,"mouseleave","handleMouseOver"],[4,"gameFavorited","gameFavoritedHandler"],[0,"gameDetailChange","gameDetailChangeHandler"]]],[4,"casino-game-thumbnail-overlay",{"integratedGameFrameMobile":[4,"integrated-game-frame-mobile"],"gamepageModalUrl":[1,"gamepage-modal-url"],"integratedGameFrameDesktop":[4,"integrated-game-frame-desktop"],"language":[1],"gameName":[1,"game-name"],"gameVendor":[1,"game-vendor"],"gameId":[8,"game-id"],"hasFunMode":[4,"has-fun-mode"]}]]]], options);
16
+ return bootstrapLazy([["casino-game-thumbnail-betlimit_2",[[4,"casino-game-thumbnail-extrainfo",{"language":[1],"betLimit":[32],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}],[0,"casino-game-thumbnail-betlimit",{"betLimit":[16],"numberOfPlayers":[2,"number-of-players"]}]]],["casino-extrainfo-baccarat",[[0,"casino-extrainfo-baccarat",{"language":[1],"showRoundBoard":[4,"show-round-board"],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64],"onBaccaratResultChanged":[64]}]]],["casino-extrainfo-blackjack",[[0,"casino-extrainfo-blackjack",{"language":[1],"gameInfo":[32],"gameDetails":[32],"seatsStatus":[32],"isTableFull":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-extrainfo-roulette",[[0,"casino-extrainfo-roulette",{"language":[1],"gameInfo":[32],"gameDetails":[32],"showLiveClass":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-normal-game-thumbnail",[[0,"casino-normal-game-thumbnail",{"language":[1],"onGameLoaded":[64]}]]],["casino-game-thumb-view_2",[[1,"casino-game-thumb-view",{"language":[1],"endpoint":[1],"userId":[8,"user-id"],"showGameName":[4,"show-game-name"],"session":[1],"showFavoredCategory":[4,"show-favored-category"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"integratedGameframeMobile":[4,"integrated-gameframe-mobile"],"gamepageModalurl":[1,"gamepage-modalurl"],"integratedGameframeDesktop":[4,"integrated-gameframe-desktop"],"loadDetails":[4,"load-details"],"showRoundBoard":[4,"show-round-board"],"visibilityConnect":[1,"visibility-connect"],"connectLive":[1,"connect-live"],"gameCategory":[1,"game-category"],"livelobbyEndpoint":[1,"livelobby-endpoint"],"gameId":[8,"game-id"],"gameName":[1,"game-name"],"subVendor":[1,"sub-vendor"],"gameVendor":[1,"game-vendor"],"hasFunMode":[4,"has-fun-mode"],"hasAnonymousFunMode":[4,"has-anonymous-fun-mode"],"platform":[1],"thumbnail":[1],"isFavorite":[4,"is-favorite"],"isNew":[4,"is-new"],"cellSize":[1,"cell-size"],"gameTag":[1,"game-tag"],"type":[1],"gameInfo":[32],"isTableFull":[32],"hover":[32]},[[1,"mouseenter","handleMouseOver"],[1,"mouseleave","handleMouseOver"],[4,"gameFavorited","gameFavoritedHandler"],[0,"gameDetailChange","gameDetailChangeHandler"]]],[4,"casino-game-thumbnail-overlay",{"gamepageModalurl":[1,"gamepage-modalurl"],"integratedGameframeMobile":[4,"integrated-gameframe-mobile"],"integratedGameframeDesktop":[4,"integrated-gameframe-desktop"],"language":[1],"gameName":[1,"game-name"],"gameVendor":[1,"game-vendor"],"gameId":[8,"game-id"],"hasFunMode":[4,"has-fun-mode"]}]]]], options);
17
17
  });
@@ -1117,12 +1117,12 @@ const CasinoGameThumbView = class {
1117
1117
  /**
1118
1118
  * Widget Setting, show game in a frame when user clicked 'start'
1119
1119
  */
1120
- this.integratedGameFrameMobile = false;
1120
+ this.integratedGameframeMobile = false;
1121
1121
  /**
1122
1122
  * Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
1123
- * gamepageModalUrl value should be set
1123
+ * gamepageModalurl value should be set
1124
1124
  */
1125
- this.integratedGameFrameDesktop = false;
1125
+ this.integratedGameframeDesktop = false;
1126
1126
  /**
1127
1127
  * Widget Setting, Load game details when set it as true, default value: false
1128
1128
  * When loadDetails is true and type=='live-casino-tables',
@@ -1141,7 +1141,6 @@ const CasinoGameThumbView = class {
1141
1141
  * Game Property, Game lunch platform
1142
1142
  */
1143
1143
  this.platform = 'PC';
1144
- this.gameInfo = {};
1145
1144
  this.thumbnailLoaded = false;
1146
1145
  this.containerClassWhenDetailChange = '';
1147
1146
  this.isUserLoggedIn = false;
@@ -1169,7 +1168,9 @@ const CasinoGameThumbView = class {
1169
1168
  });
1170
1169
  };
1171
1170
  this.getGameCategoryType = () => {
1172
- if (this.isLiveCasino && this.gameCategory) {
1171
+ if (this.isLiveCasino &&
1172
+ this.gameCategory &&
1173
+ this.getWidgetTypeByGameCategory(this.gameCategory)) {
1173
1174
  return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
1174
1175
  }
1175
1176
  return `casino-normal-game-thumbnail`;
@@ -1217,6 +1218,7 @@ const CasinoGameThumbView = class {
1217
1218
  let message = JSON.parse(e.data);
1218
1219
  if (message.needReconnect && this.liveLobbyConnection) {
1219
1220
  this.liveLobbyConnection.close();
1221
+ this.liveLobbyConnection = null;
1220
1222
  this.connectGameToLiveLobby();
1221
1223
  return;
1222
1224
  }
@@ -1261,10 +1263,12 @@ const CasinoGameThumbView = class {
1261
1263
  window.postMessage({ messageType: MessageType, value: e.data });
1262
1264
  }
1263
1265
  messageHandler(e) {
1264
- if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` && !this.showFavoredCategory) {
1266
+ if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
1267
+ !this.showFavoredCategory) {
1265
1268
  this.gameInfo.isFavorite = true;
1266
1269
  }
1267
- if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` && !this.showFavoredCategory) {
1270
+ if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
1271
+ !this.showFavoredCategory) {
1268
1272
  this.gameInfo.isFavorite = false;
1269
1273
  }
1270
1274
  if (e.data.type === 'UserSessionID') {
@@ -1305,14 +1309,10 @@ const CasinoGameThumbView = class {
1305
1309
  this.resetLiveProperties();
1306
1310
  }
1307
1311
  this.gameInfo = Object.assign({}, this.gameInfo);
1308
- setTimeout(() => {
1309
- var _a;
1310
- (_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(this.gameInfo);
1311
- window.postMessage({
1312
- type: 'casinoGameLoaded',
1313
- gameInfo: this.gameInfo,
1314
- });
1315
- }, 200);
1312
+ this.triggerExtraInfoLoad();
1313
+ if (this.isLiveCasino && this.connectLive === 'connect') {
1314
+ this.connectGameToLiveLobby();
1315
+ }
1316
1316
  }
1317
1317
  /**
1318
1318
  * Parse game info by game info api response
@@ -1374,7 +1374,8 @@ const CasinoGameThumbView = class {
1374
1374
  if (this.visibilityConnect === 'disconnect') {
1375
1375
  this.disconnectGameFromLiveLobby();
1376
1376
  }
1377
- else if (this.visibilityConnect === 'connect' && this.connectLive === 'connect') {
1377
+ else if (this.visibilityConnect === 'connect' &&
1378
+ this.connectLive === 'connect') {
1378
1379
  this.connectGameToLiveLobby();
1379
1380
  }
1380
1381
  }
@@ -1463,6 +1464,18 @@ const CasinoGameThumbView = class {
1463
1464
  liveCasinoCategory: this.gameCategory || '',
1464
1465
  };
1465
1466
  }
1467
+ triggerExtraInfoLoad() {
1468
+ var _a, _b;
1469
+ //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1470
+ this.extraInfoRef =
1471
+ this.extraInfoRef ||
1472
+ ((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
1473
+ (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
1474
+ window.postMessage({
1475
+ type: 'casinoGameLoaded',
1476
+ gameInfo: this.gameInfo,
1477
+ });
1478
+ }
1466
1479
  componentDidRender() {
1467
1480
  // start custom styling area
1468
1481
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -1472,13 +1485,13 @@ const CasinoGameThumbView = class {
1472
1485
  this.setClientStylingURL();
1473
1486
  this.limitStylingAppends = true;
1474
1487
  }
1475
- // end custom styling area
1488
+ // end custom styling area 500)
1489
+ if (this.gameInfo) {
1490
+ this.triggerExtraInfoLoad();
1491
+ }
1476
1492
  }
1477
1493
  componentDidLoad() {
1478
- var _a;
1479
- //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1480
- this.extraInfoRef = (_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType());
1481
- window.addEventListener("message", this.messageHandler);
1494
+ window.addEventListener('message', this.messageHandler);
1482
1495
  }
1483
1496
  componentWillLoad() {
1484
1497
  this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
@@ -1497,7 +1510,6 @@ const CasinoGameThumbView = class {
1497
1510
  this.loadDetails &&
1498
1511
  this.gameId) {
1499
1512
  this.loadGameDetailInfo();
1500
- return;
1501
1513
  }
1502
1514
  return;
1503
1515
  }
@@ -1510,22 +1522,23 @@ const CasinoGameThumbView = class {
1510
1522
  if (this.liveLobbyConnection) {
1511
1523
  this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
1512
1524
  }
1513
- window.removeEventListener("message", this.messageHandler);
1525
+ window.removeEventListener('message', this.messageHandler);
1514
1526
  }
1515
1527
  // end custom styling area
1516
1528
  getWidgetTypeByGameCategory(gameCategory) {
1517
1529
  return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
1518
1530
  }
1519
1531
  getGameOverlayProps() {
1532
+ var _a, _b;
1520
1533
  return {
1521
1534
  gameName: this.gameInfo.name,
1522
1535
  gameId: this.gameInfo.gameId,
1523
- gameVendor: this.gameVendor || this.gameInfo.vendor.name,
1536
+ gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
1524
1537
  hasFunMode: this.gameInfo.hasFunMode,
1525
1538
  language: this.language,
1526
- integratedGameFrameMobile: this.integratedGameFrameMobile,
1527
- integratedGameFrameDesktop: this.integratedGameFrameDesktop,
1528
- gamepageModalUrl: this.gamepageModalUrl,
1539
+ integratedGameframeMobile: this.integratedGameframeMobile,
1540
+ integratedGameframeDesktop: this.integratedGameframeDesktop,
1541
+ gamepageModalurl: this.gamepageModalurl,
1529
1542
  };
1530
1543
  }
1531
1544
  render() {
@@ -1558,13 +1571,14 @@ const CasinoGameThumbnailOverlay = class {
1558
1571
  registerInstance(this, hostRef);
1559
1572
  this.playClicked = createEvent(this, "playCasinoGame", 7);
1560
1573
  /**
1561
- * integratedGameFrameMobile
1574
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
1562
1575
  */
1563
- this.integratedGameFrameMobile = false;
1576
+ this.integratedGameframeMobile = false;
1564
1577
  /**
1565
- * Open game a a frame, gamepagemodalurl value should be set
1578
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
1579
+ * Open game in a frame, gamepageModalurl value should be set
1566
1580
  */
1567
- this.integratedGameFrameDesktop = false;
1581
+ this.integratedGameframeDesktop = false;
1568
1582
  /**
1569
1583
  * Language
1570
1584
  */
@@ -1577,7 +1591,7 @@ const CasinoGameThumbnailOverlay = class {
1577
1591
  gameId: this.gameId,
1578
1592
  isMobile: isMobile(this.userAgent),
1579
1593
  };
1580
- let isFrameMode = this.integratedGameFrameMobile || this.integratedGameFrameDesktop;
1594
+ let isFrameMode = this.integratedGameframeMobile || this.integratedGameframeDesktop;
1581
1595
  window.postMessage({
1582
1596
  type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
1583
1597
  eventData: isFrameMode
@@ -219,17 +219,21 @@ const CasinoGameThumbnailExtrainfo = class {
219
219
  async onGameLoaded(gameInfo) {
220
220
  var _a;
221
221
  this.gameInfo = gameInfo;
222
+ this.isNewGame = this.gameInfo.isNew;
223
+ if (this.gameInfo.gameTag === 'false') {
224
+ this.gameInfo.gameTag = null;
225
+ }
226
+ this.gameTag = this.gameInfo.gameTag;
222
227
  if (!this.gameInfo.details) {
223
228
  return;
224
229
  }
225
230
  this.gameDetails = this.gameInfo.details;
226
- this.isNewGame = this.gameInfo.isNew;
227
231
  this.isDouble = !this.gameDetails
228
232
  ? false
229
233
  : this.gameInfo.details.category.toLowerCase() ===
230
234
  WIDGETTYPE_GAMECATEGORY.doubleballroulette;
231
235
  this.gameTag = !this.gameDetails
232
- ? ''
236
+ ? this.gameInfo.gameTag
233
237
  : ((_a = this.gameInfo.advancedTags) === null || _a === void 0 ? void 0 : _a.length) > 0
234
238
  ? addGameTag(this.gameInfo.advancedTags)
235
239
  : this.gameInfo.gameTag;
@@ -6,8 +6,12 @@ const CasinoNormalGameThumbnail = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
8
  }
9
+ async onGameLoaded(gameInfo) {
10
+ var _a;
11
+ (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(gameInfo);
12
+ }
9
13
  render() {
10
- return h(Host, null);
14
+ return (h(Host, null, h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language })));
11
15
  }
12
16
  };
13
17
  CasinoNormalGameThumbnail.style = casinoNormalGameThumbnailCss;
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["casino-game-thumbnail-betlimit_2",[[4,"casino-game-thumbnail-extrainfo",{"language":[1],"betLimit":[32],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}],[0,"casino-game-thumbnail-betlimit",{"betLimit":[16],"numberOfPlayers":[2,"number-of-players"]}]]],["casino-extrainfo-baccarat",[[0,"casino-extrainfo-baccarat",{"language":[1],"showRoundBoard":[4,"show-round-board"],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64],"onBaccaratResultChanged":[64]}]]],["casino-extrainfo-blackjack",[[0,"casino-extrainfo-blackjack",{"language":[1],"gameInfo":[32],"gameDetails":[32],"seatsStatus":[32],"isTableFull":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-extrainfo-roulette",[[0,"casino-extrainfo-roulette",{"language":[1],"gameInfo":[32],"gameDetails":[32],"showLiveClass":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-normal-game-thumbnail",[[0,"casino-normal-game-thumbnail"]]],["casino-game-thumb-view_2",[[1,"casino-game-thumb-view",{"language":[1],"endpoint":[1],"userId":[8,"user-id"],"showGameName":[4,"show-game-name"],"session":[1],"showFavoredCategory":[4,"show-favored-category"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"integratedGameFrameMobile":[4,"integrated-game-frame-mobile"],"gamepageModalUrl":[1,"gamepage-modal-url"],"integratedGameFrameDesktop":[4,"integrated-game-frame-desktop"],"loadDetails":[4,"load-details"],"showRoundBoard":[4,"show-round-board"],"visibilityConnect":[1,"visibility-connect"],"connectLive":[1,"connect-live"],"gameCategory":[1,"game-category"],"livelobbyEndpoint":[1,"livelobby-endpoint"],"gameId":[8,"game-id"],"gameName":[1,"game-name"],"subVendor":[1,"sub-vendor"],"gameVendor":[1,"game-vendor"],"hasFunMode":[4,"has-fun-mode"],"hasAnonymousFunMode":[4,"has-anonymous-fun-mode"],"platform":[1],"thumbnail":[1],"isFavorite":[4,"is-favorite"],"isNew":[4,"is-new"],"cellSize":[1,"cell-size"],"gameTag":[1,"game-tag"],"type":[1],"gameInfo":[32],"isTableFull":[32],"hover":[32]},[[1,"mouseenter","handleMouseOver"],[1,"mouseleave","handleMouseOver"],[4,"gameFavorited","gameFavoritedHandler"],[0,"gameDetailChange","gameDetailChangeHandler"]]],[4,"casino-game-thumbnail-overlay",{"integratedGameFrameMobile":[4,"integrated-game-frame-mobile"],"gamepageModalUrl":[1,"gamepage-modal-url"],"integratedGameFrameDesktop":[4,"integrated-game-frame-desktop"],"language":[1],"gameName":[1,"game-name"],"gameVendor":[1,"game-vendor"],"gameId":[8,"game-id"],"hasFunMode":[4,"has-fun-mode"]}]]]], options);
13
+ return bootstrapLazy([["casino-game-thumbnail-betlimit_2",[[4,"casino-game-thumbnail-extrainfo",{"language":[1],"betLimit":[32],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}],[0,"casino-game-thumbnail-betlimit",{"betLimit":[16],"numberOfPlayers":[2,"number-of-players"]}]]],["casino-extrainfo-baccarat",[[0,"casino-extrainfo-baccarat",{"language":[1],"showRoundBoard":[4,"show-round-board"],"gameInfo":[32],"gameDetails":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64],"onBaccaratResultChanged":[64]}]]],["casino-extrainfo-blackjack",[[0,"casino-extrainfo-blackjack",{"language":[1],"gameInfo":[32],"gameDetails":[32],"seatsStatus":[32],"isTableFull":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-extrainfo-roulette",[[0,"casino-extrainfo-roulette",{"language":[1],"gameInfo":[32],"gameDetails":[32],"showLiveClass":[32],"onGameLoaded":[64],"onGameDetailUpdated":[64]}]]],["casino-normal-game-thumbnail",[[0,"casino-normal-game-thumbnail",{"language":[1],"onGameLoaded":[64]}]]],["casino-game-thumb-view_2",[[1,"casino-game-thumb-view",{"language":[1],"endpoint":[1],"userId":[8,"user-id"],"showGameName":[4,"show-game-name"],"session":[1],"showFavoredCategory":[4,"show-favored-category"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"integratedGameframeMobile":[4,"integrated-gameframe-mobile"],"gamepageModalurl":[1,"gamepage-modalurl"],"integratedGameframeDesktop":[4,"integrated-gameframe-desktop"],"loadDetails":[4,"load-details"],"showRoundBoard":[4,"show-round-board"],"visibilityConnect":[1,"visibility-connect"],"connectLive":[1,"connect-live"],"gameCategory":[1,"game-category"],"livelobbyEndpoint":[1,"livelobby-endpoint"],"gameId":[8,"game-id"],"gameName":[1,"game-name"],"subVendor":[1,"sub-vendor"],"gameVendor":[1,"game-vendor"],"hasFunMode":[4,"has-fun-mode"],"hasAnonymousFunMode":[4,"has-anonymous-fun-mode"],"platform":[1],"thumbnail":[1],"isFavorite":[4,"is-favorite"],"isNew":[4,"is-new"],"cellSize":[1,"cell-size"],"gameTag":[1,"game-tag"],"type":[1],"gameInfo":[32],"isTableFull":[32],"hover":[32]},[[1,"mouseenter","handleMouseOver"],[1,"mouseleave","handleMouseOver"],[4,"gameFavorited","gameFavoritedHandler"],[0,"gameDetailChange","gameDetailChangeHandler"]]],[4,"casino-game-thumbnail-overlay",{"gamepageModalurl":[1,"gamepage-modalurl"],"integratedGameframeMobile":[4,"integrated-gameframe-mobile"],"integratedGameframeDesktop":[4,"integrated-gameframe-desktop"],"language":[1],"gameName":[1,"game-name"],"gameVendor":[1,"game-vendor"],"gameId":[8,"game-id"],"hasFunMode":[4,"has-fun-mode"]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -40,17 +40,17 @@ export declare class CasinoGameThumbView {
40
40
  /**
41
41
  * Widget Setting, show game in a frame when user clicked 'start'
42
42
  */
43
- integratedGameFrameMobile: boolean;
43
+ integratedGameframeMobile: boolean;
44
44
  /**
45
45
  * Widget Setting, show game in a frame when user clicked 'start'
46
- * the frame url when integratedGameFrameDesktop is true
46
+ * the frame url when integratedGameframeDesktop is true
47
47
  */
48
- gamepageModalUrl: string;
48
+ gamepageModalurl: string;
49
49
  /**
50
50
  * Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
51
- * gamepageModalUrl value should be set
51
+ * gamepageModalurl value should be set
52
52
  */
53
- integratedGameFrameDesktop: boolean;
53
+ integratedGameframeDesktop: boolean;
54
54
  /**
55
55
  * Widget Setting, Load game details when set it as true, default value: false
56
56
  * When loadDetails is true and type=='live-casino-tables',
@@ -197,6 +197,7 @@ export declare class CasinoGameThumbView {
197
197
  * @private
198
198
  */
199
199
  private generateGameInfoByProps;
200
+ triggerExtraInfoLoad(): void;
200
201
  componentDidRender(): void;
201
202
  componentDidLoad(): void;
202
203
  componentWillLoad(): void;
@@ -212,9 +213,9 @@ export declare class CasinoGameThumbView {
212
213
  gameVendor: string;
213
214
  hasFunMode: boolean;
214
215
  language: string;
215
- integratedGameFrameMobile: boolean;
216
- integratedGameFrameDesktop: boolean;
217
- gamepageModalUrl: string;
216
+ integratedGameframeMobile: boolean;
217
+ integratedGameframeDesktop: boolean;
218
+ gamepageModalurl: string;
218
219
  };
219
220
  render(): any;
220
221
  }
@@ -5,17 +5,18 @@ export declare class CasinoGameThumbnailOverlay {
5
5
  */
6
6
  playClicked: EventEmitter<string | number>;
7
7
  /**
8
- * integratedGameFrameMobile
8
+ * Widget Setting, the frame url when integratedGameframeDesktop is true
9
9
  */
10
- integratedGameFrameMobile: boolean;
10
+ gamepageModalurl: string;
11
11
  /**
12
- * the frame url when integratedGameFrameDesktop is true
12
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
13
13
  */
14
- gamepageModalUrl: string;
14
+ integratedGameframeMobile: boolean;
15
15
  /**
16
- * Open game a a frame, gamepagemodalurl value should be set
16
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
17
+ * Open game in a frame, gamepageModalurl value should be set
17
18
  */
18
- integratedGameFrameDesktop: boolean;
19
+ integratedGameframeDesktop: boolean;
19
20
  /**
20
21
  * Language
21
22
  */
@@ -1,3 +1,7 @@
1
+ import { CasinoGameThumbnailInfo } from '../../models/casino-game-thumb-view';
1
2
  export declare class CasinoNormalGameThumbnail {
3
+ infoWrapperRef: any;
4
+ language: string;
5
+ onGameLoaded(gameInfo: CasinoGameThumbnailInfo): Promise<void>;
2
6
  render(): any;
3
7
  }
@@ -82,9 +82,9 @@ export namespace Components {
82
82
  */
83
83
  "gameVendor": string;
84
84
  /**
85
- * Widget Setting, show game in a frame when user clicked 'start' the frame url when integratedGameFrameDesktop is true
85
+ * Widget Setting, show game in a frame when user clicked 'start' the frame url when integratedGameframeDesktop is true
86
86
  */
87
- "gamepageModalUrl": string;
87
+ "gamepageModalurl": string;
88
88
  /**
89
89
  * Game Property, hasAnonymousFunMode
90
90
  */
@@ -94,13 +94,13 @@ export namespace Components {
94
94
  */
95
95
  "hasFunMode": boolean;
96
96
  /**
97
- * Widget Setting, show game in a frame when user clicked 'start', Open game aframe, gamepageModalUrl value should be set
97
+ * Widget Setting, show game in a frame when user clicked 'start', Open game aframe, gamepageModalurl value should be set
98
98
  */
99
- "integratedGameFrameDesktop": boolean;
99
+ "integratedGameframeDesktop": boolean;
100
100
  /**
101
101
  * Widget Setting, show game in a frame when user clicked 'start'
102
102
  */
103
- "integratedGameFrameMobile": boolean;
103
+ "integratedGameframeMobile": boolean;
104
104
  /**
105
105
  * Game Property, is Game Favorited
106
106
  */
@@ -182,24 +182,26 @@ export namespace Components {
182
182
  "gameName": string;
183
183
  "gameVendor": string;
184
184
  /**
185
- * the frame url when integratedGameFrameDesktop is true
185
+ * Widget Setting, the frame url when integratedGameframeDesktop is true
186
186
  */
187
- "gamepageModalUrl": string;
187
+ "gamepageModalurl": string;
188
188
  "hasFunMode": boolean;
189
189
  /**
190
- * Open game a a frame, gamepagemodalurl value should be set
190
+ * Widget Setting, show game in a frame when user clicked 'start', default: false Open game in a frame, gamepageModalurl value should be set
191
191
  */
192
- "integratedGameFrameDesktop": boolean;
192
+ "integratedGameframeDesktop": boolean;
193
193
  /**
194
- * integratedGameFrameMobile
194
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
195
195
  */
196
- "integratedGameFrameMobile": boolean;
196
+ "integratedGameframeMobile": boolean;
197
197
  /**
198
198
  * Language
199
199
  */
200
200
  "language": string;
201
201
  }
202
202
  interface CasinoNormalGameThumbnail {
203
+ "language": string;
204
+ "onGameLoaded": (gameInfo: CasinoGameThumbnailInfo) => Promise<void>;
203
205
  }
204
206
  }
205
207
  declare global {
@@ -327,9 +329,9 @@ declare namespace LocalJSX {
327
329
  */
328
330
  "gameVendor"?: string;
329
331
  /**
330
- * Widget Setting, show game in a frame when user clicked 'start' the frame url when integratedGameFrameDesktop is true
332
+ * Widget Setting, show game in a frame when user clicked 'start' the frame url when integratedGameframeDesktop is true
331
333
  */
332
- "gamepageModalUrl"?: string;
334
+ "gamepageModalurl"?: string;
333
335
  /**
334
336
  * Game Property, hasAnonymousFunMode
335
337
  */
@@ -339,13 +341,13 @@ declare namespace LocalJSX {
339
341
  */
340
342
  "hasFunMode"?: boolean;
341
343
  /**
342
- * Widget Setting, show game in a frame when user clicked 'start', Open game aframe, gamepageModalUrl value should be set
344
+ * Widget Setting, show game in a frame when user clicked 'start', Open game aframe, gamepageModalurl value should be set
343
345
  */
344
- "integratedGameFrameDesktop"?: boolean;
346
+ "integratedGameframeDesktop"?: boolean;
345
347
  /**
346
348
  * Widget Setting, show game in a frame when user clicked 'start'
347
349
  */
348
- "integratedGameFrameMobile"?: boolean;
350
+ "integratedGameframeMobile"?: boolean;
349
351
  /**
350
352
  * Game Property, is Game Favorited
351
353
  */
@@ -426,18 +428,18 @@ declare namespace LocalJSX {
426
428
  "gameName"?: string;
427
429
  "gameVendor"?: string;
428
430
  /**
429
- * the frame url when integratedGameFrameDesktop is true
431
+ * Widget Setting, the frame url when integratedGameframeDesktop is true
430
432
  */
431
- "gamepageModalUrl"?: string;
433
+ "gamepageModalurl"?: string;
432
434
  "hasFunMode"?: boolean;
433
435
  /**
434
- * Open game a a frame, gamepagemodalurl value should be set
436
+ * Widget Setting, show game in a frame when user clicked 'start', default: false Open game in a frame, gamepageModalurl value should be set
435
437
  */
436
- "integratedGameFrameDesktop"?: boolean;
438
+ "integratedGameframeDesktop"?: boolean;
437
439
  /**
438
- * integratedGameFrameMobile
440
+ * Widget Setting, show game in a frame when user clicked 'start', default: false
439
441
  */
440
- "integratedGameFrameMobile"?: boolean;
442
+ "integratedGameframeMobile"?: boolean;
441
443
  /**
442
444
  * Language
443
445
  */
@@ -448,6 +450,7 @@ declare namespace LocalJSX {
448
450
  "onPlayCasinoGame"?: (event: CustomEvent<string | number>) => void;
449
451
  }
450
452
  interface CasinoNormalGameThumbnail {
453
+ "language"?: string;
451
454
  }
452
455
  interface IntrinsicElements {
453
456
  "casino-extrainfo-baccarat": CasinoExtrainfoBaccarat;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-game-thumb-view",
3
- "version": "1.13.5",
3
+ "version": "1.15.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",