@everymatrix/casino-game-thumb-view 1.13.5 → 1.14.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 (33) 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-5e1c958a.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-eb23569d.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 +29 -20
  9. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +3 -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 +29 -20
  14. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +3 -2
  15. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +51 -2
  16. package/dist/components/casino-extrainfo-roulette.js +8 -7
  17. package/dist/components/casino-game-thumb-view.js +29 -20
  18. package/dist/components/casino-game-thumbnail-extrainfo2.js +3 -2
  19. package/dist/components/casino-normal-game-thumbnail.js +22 -3
  20. package/dist/esm/casino-extrainfo-roulette.entry.js +8 -7
  21. package/dist/esm/casino-game-thumb-view.js +1 -1
  22. package/dist/esm/casino-game-thumb-view_2.entry.js +29 -20
  23. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +3 -2
  24. package/dist/esm/casino-normal-game-thumbnail.entry.js +5 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +1 -0
  27. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -0
  28. package/dist/types/components.d.ts +3 -0
  29. package/package.json +1 -1
  30. package/dist/casino-game-thumb-view/p-33e707bf.entry.js +0 -1
  31. package/dist/casino-game-thumb-view/p-45836b67.entry.js +0 -7
  32. package/dist/casino-game-thumb-view/p-b153f943.entry.js +0 -1
  33. package/dist/casino-game-thumb-view/p-fc7672a9.entry.js +0 -1
@@ -1,7 +1,12 @@
1
- import { Component, Host, h } from '@stencil/core';
1
+ import { Component, Host, h, Method, Prop } from '@stencil/core';
2
2
  export class CasinoNormalGameThumbnail {
3
+ async onGameLoaded(gameInfo) {
4
+ var _a;
5
+ (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(gameInfo);
6
+ }
3
7
  render() {
4
- return h(Host, null);
8
+ return (h(Host, null,
9
+ h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language })));
5
10
  }
6
11
  static get is() { return "casino-normal-game-thumbnail"; }
7
12
  static get originalStyleUrls() { return {
@@ -10,4 +15,48 @@ export class CasinoNormalGameThumbnail {
10
15
  static get styleUrls() { return {
11
16
  "$": ["casino-normal-game-thumbnail.css"]
12
17
  }; }
18
+ static get properties() { return {
19
+ "language": {
20
+ "type": "string",
21
+ "mutable": false,
22
+ "complexType": {
23
+ "original": "string",
24
+ "resolved": "string",
25
+ "references": {}
26
+ },
27
+ "required": false,
28
+ "optional": false,
29
+ "docs": {
30
+ "tags": [],
31
+ "text": ""
32
+ },
33
+ "attribute": "language",
34
+ "reflect": false
35
+ }
36
+ }; }
37
+ static get methods() { return {
38
+ "onGameLoaded": {
39
+ "complexType": {
40
+ "signature": "(gameInfo: CasinoGameThumbnailInfo) => Promise<void>",
41
+ "parameters": [{
42
+ "tags": [],
43
+ "text": ""
44
+ }],
45
+ "references": {
46
+ "Promise": {
47
+ "location": "global"
48
+ },
49
+ "CasinoGameThumbnailInfo": {
50
+ "location": "import",
51
+ "path": "../../models/casino-game-thumb-view"
52
+ }
53
+ },
54
+ "return": "Promise<void>"
55
+ },
56
+ "docs": {
57
+ "text": "",
58
+ "tags": []
59
+ }
60
+ }
61
+ }; }
13
62
  }
@@ -17,7 +17,7 @@ const CasinoExtrainfoRoulette$1 = /*@__PURE__*/ proxyCustomElement(class extends
17
17
  async onGameLoaded(gameInfo) {
18
18
  var _a;
19
19
  this.gameInfo = Object.assign({}, gameInfo);
20
- this.gameDetails = Object.assign({}, this.gameInfo.details);
20
+ this.gameDetails = this.gameInfo.details ? Object.assign({}, this.gameInfo.details) : null;
21
21
  (_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(gameInfo);
22
22
  }
23
23
  async onGameDetailUpdated(details) {
@@ -29,13 +29,14 @@ const CasinoExtrainfoRoulette$1 = /*@__PURE__*/ proxyCustomElement(class extends
29
29
  return ROULETTE_COLOR_MAP[value];
30
30
  }
31
31
  render() {
32
- var _a, _b, _c, _d, _e;
33
- const isDouble = ((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.category.toLowerCase()) ===
34
- WIDGETTYPE_GAMECATEGORY.doubleballroulette;
32
+ var _a, _b, _c, _d;
33
+ const isDouble = this.gameDetails ?
34
+ this.gameDetails.category.toLowerCase() ===
35
+ WIDGETTYPE_GAMECATEGORY.doubleballroulette : false;
35
36
  let rouletteNumbers = (isDouble
36
- ? (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentDoubleBallRouletteNumbers
37
- : (_c = this.gameDetails) === null || _c === void 0 ? void 0 : _c.currentRouletteNumbers) || [];
38
- 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)))))));
37
+ ? (_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.currentDoubleBallRouletteNumbers
38
+ : (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentRouletteNumbers) || [];
39
+ 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)))))));
39
40
  }
40
41
  static get style() { return casinoExtrainfoRouletteCss; }
41
42
  }, [0, "casino-extrainfo-roulette", {
@@ -1143,7 +1143,6 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1143
1143
  * Game Property, Game lunch platform
1144
1144
  */
1145
1145
  this.platform = 'PC';
1146
- this.gameInfo = {};
1147
1146
  this.thumbnailLoaded = false;
1148
1147
  this.containerClassWhenDetailChange = '';
1149
1148
  this.isUserLoggedIn = false;
@@ -1219,6 +1218,7 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1219
1218
  let message = JSON.parse(e.data);
1220
1219
  if (message.needReconnect && this.liveLobbyConnection) {
1221
1220
  this.liveLobbyConnection.close();
1221
+ this.liveLobbyConnection = null;
1222
1222
  this.connectGameToLiveLobby();
1223
1223
  return;
1224
1224
  }
@@ -1263,10 +1263,12 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1263
1263
  window.postMessage({ messageType: MessageType, value: e.data });
1264
1264
  }
1265
1265
  messageHandler(e) {
1266
- if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` && !this.showFavoredCategory) {
1266
+ if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
1267
+ !this.showFavoredCategory) {
1267
1268
  this.gameInfo.isFavorite = true;
1268
1269
  }
1269
- if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` && !this.showFavoredCategory) {
1270
+ if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
1271
+ !this.showFavoredCategory) {
1270
1272
  this.gameInfo.isFavorite = false;
1271
1273
  }
1272
1274
  if (e.data.type === 'UserSessionID') {
@@ -1307,14 +1309,10 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1307
1309
  this.resetLiveProperties();
1308
1310
  }
1309
1311
  this.gameInfo = Object.assign({}, this.gameInfo);
1310
- setTimeout(() => {
1311
- var _a;
1312
- (_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(this.gameInfo);
1313
- window.postMessage({
1314
- type: 'casinoGameLoaded',
1315
- gameInfo: this.gameInfo,
1316
- });
1317
- }, 200);
1312
+ this.triggerExtraInfoLoad();
1313
+ if (this.isLiveCasino && this.connectLive === 'connect') {
1314
+ this.connectGameToLiveLobby();
1315
+ }
1318
1316
  }
1319
1317
  /**
1320
1318
  * Parse game info by game info api response
@@ -1376,7 +1374,8 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1376
1374
  if (this.visibilityConnect === 'disconnect') {
1377
1375
  this.disconnectGameFromLiveLobby();
1378
1376
  }
1379
- else if (this.visibilityConnect === 'connect' && this.connectLive === 'connect') {
1377
+ else if (this.visibilityConnect === 'connect' &&
1378
+ this.connectLive === 'connect') {
1380
1379
  this.connectGameToLiveLobby();
1381
1380
  }
1382
1381
  }
@@ -1465,6 +1464,16 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1465
1464
  liveCasinoCategory: this.gameCategory || '',
1466
1465
  };
1467
1466
  }
1467
+ triggerExtraInfoLoad() {
1468
+ var _a, _b;
1469
+ //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1470
+ this.extraInfoRef = this.extraInfoRef || ((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
1471
+ (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
1472
+ window.postMessage({
1473
+ type: 'casinoGameLoaded',
1474
+ gameInfo: this.gameInfo,
1475
+ });
1476
+ }
1468
1477
  componentDidRender() {
1469
1478
  // start custom styling area
1470
1479
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -1474,13 +1483,13 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1474
1483
  this.setClientStylingURL();
1475
1484
  this.limitStylingAppends = true;
1476
1485
  }
1477
- // end custom styling area
1486
+ // end custom styling area 500)
1487
+ if (this.gameInfo) {
1488
+ this.triggerExtraInfoLoad();
1489
+ }
1478
1490
  }
1479
1491
  componentDidLoad() {
1480
- var _a;
1481
- //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1482
- this.extraInfoRef = (_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType());
1483
- window.addEventListener("message", this.messageHandler);
1492
+ window.addEventListener('message', this.messageHandler);
1484
1493
  }
1485
1494
  componentWillLoad() {
1486
1495
  this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
@@ -1499,7 +1508,6 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1499
1508
  this.loadDetails &&
1500
1509
  this.gameId) {
1501
1510
  this.loadGameDetailInfo();
1502
- return;
1503
1511
  }
1504
1512
  return;
1505
1513
  }
@@ -1512,17 +1520,18 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
1512
1520
  if (this.liveLobbyConnection) {
1513
1521
  this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
1514
1522
  }
1515
- window.removeEventListener("message", this.messageHandler);
1523
+ window.removeEventListener('message', this.messageHandler);
1516
1524
  }
1517
1525
  // end custom styling area
1518
1526
  getWidgetTypeByGameCategory(gameCategory) {
1519
1527
  return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
1520
1528
  }
1521
1529
  getGameOverlayProps() {
1530
+ var _a, _b;
1522
1531
  return {
1523
1532
  gameName: this.gameInfo.name,
1524
1533
  gameId: this.gameInfo.gameId,
1525
- gameVendor: this.gameVendor || this.gameInfo.vendor.name,
1534
+ gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
1526
1535
  hasFunMode: this.gameInfo.hasFunMode,
1527
1536
  language: this.language,
1528
1537
  integratedGameFrameMobile: this.integratedGameFrameMobile,
@@ -16,17 +16,18 @@ const CasinoGameThumbnailExtrainfo = /*@__PURE__*/ proxyCustomElement(class exte
16
16
  async onGameLoaded(gameInfo) {
17
17
  var _a;
18
18
  this.gameInfo = gameInfo;
19
+ this.isNewGame = this.gameInfo.isNew;
20
+ this.gameTag = this.gameInfo.gameTag;
19
21
  if (!this.gameInfo.details) {
20
22
  return;
21
23
  }
22
24
  this.gameDetails = this.gameInfo.details;
23
- this.isNewGame = this.gameInfo.isNew;
24
25
  this.isDouble = !this.gameDetails
25
26
  ? false
26
27
  : this.gameInfo.details.category.toLowerCase() ===
27
28
  WIDGETTYPE_GAMECATEGORY.doubleballroulette;
28
29
  this.gameTag = !this.gameDetails
29
- ? ''
30
+ ? this.gameInfo.gameTag
30
31
  : ((_a = this.gameInfo.advancedTags) === null || _a === void 0 ? void 0 : _a.length) > 0
31
32
  ? addGameTag(this.gameInfo.advancedTags)
32
33
  : this.gameInfo.gameTag;
@@ -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-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);
17
17
  });
@@ -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;
@@ -1217,6 +1216,7 @@ const CasinoGameThumbView = class {
1217
1216
  let message = JSON.parse(e.data);
1218
1217
  if (message.needReconnect && this.liveLobbyConnection) {
1219
1218
  this.liveLobbyConnection.close();
1219
+ this.liveLobbyConnection = null;
1220
1220
  this.connectGameToLiveLobby();
1221
1221
  return;
1222
1222
  }
@@ -1261,10 +1261,12 @@ const CasinoGameThumbView = class {
1261
1261
  window.postMessage({ messageType: MessageType, value: e.data });
1262
1262
  }
1263
1263
  messageHandler(e) {
1264
- if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` && !this.showFavoredCategory) {
1264
+ if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
1265
+ !this.showFavoredCategory) {
1265
1266
  this.gameInfo.isFavorite = true;
1266
1267
  }
1267
- if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` && !this.showFavoredCategory) {
1268
+ if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
1269
+ !this.showFavoredCategory) {
1268
1270
  this.gameInfo.isFavorite = false;
1269
1271
  }
1270
1272
  if (e.data.type === 'UserSessionID') {
@@ -1305,14 +1307,10 @@ const CasinoGameThumbView = class {
1305
1307
  this.resetLiveProperties();
1306
1308
  }
1307
1309
  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);
1310
+ this.triggerExtraInfoLoad();
1311
+ if (this.isLiveCasino && this.connectLive === 'connect') {
1312
+ this.connectGameToLiveLobby();
1313
+ }
1316
1314
  }
1317
1315
  /**
1318
1316
  * Parse game info by game info api response
@@ -1374,7 +1372,8 @@ const CasinoGameThumbView = class {
1374
1372
  if (this.visibilityConnect === 'disconnect') {
1375
1373
  this.disconnectGameFromLiveLobby();
1376
1374
  }
1377
- else if (this.visibilityConnect === 'connect' && this.connectLive === 'connect') {
1375
+ else if (this.visibilityConnect === 'connect' &&
1376
+ this.connectLive === 'connect') {
1378
1377
  this.connectGameToLiveLobby();
1379
1378
  }
1380
1379
  }
@@ -1463,6 +1462,16 @@ const CasinoGameThumbView = class {
1463
1462
  liveCasinoCategory: this.gameCategory || '',
1464
1463
  };
1465
1464
  }
1465
+ triggerExtraInfoLoad() {
1466
+ var _a, _b;
1467
+ //Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
1468
+ this.extraInfoRef = this.extraInfoRef || ((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
1469
+ (_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
1470
+ window.postMessage({
1471
+ type: 'casinoGameLoaded',
1472
+ gameInfo: this.gameInfo,
1473
+ });
1474
+ }
1466
1475
  componentDidRender() {
1467
1476
  // start custom styling area
1468
1477
  if (!this.limitStylingAppends && this.stylingContainer) {
@@ -1472,13 +1481,13 @@ const CasinoGameThumbView = class {
1472
1481
  this.setClientStylingURL();
1473
1482
  this.limitStylingAppends = true;
1474
1483
  }
1475
- // end custom styling area
1484
+ // end custom styling area 500)
1485
+ if (this.gameInfo) {
1486
+ this.triggerExtraInfoLoad();
1487
+ }
1476
1488
  }
1477
1489
  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);
1490
+ window.addEventListener('message', this.messageHandler);
1482
1491
  }
1483
1492
  componentWillLoad() {
1484
1493
  this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
@@ -1497,7 +1506,6 @@ const CasinoGameThumbView = class {
1497
1506
  this.loadDetails &&
1498
1507
  this.gameId) {
1499
1508
  this.loadGameDetailInfo();
1500
- return;
1501
1509
  }
1502
1510
  return;
1503
1511
  }
@@ -1510,17 +1518,18 @@ const CasinoGameThumbView = class {
1510
1518
  if (this.liveLobbyConnection) {
1511
1519
  this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
1512
1520
  }
1513
- window.removeEventListener("message", this.messageHandler);
1521
+ window.removeEventListener('message', this.messageHandler);
1514
1522
  }
1515
1523
  // end custom styling area
1516
1524
  getWidgetTypeByGameCategory(gameCategory) {
1517
1525
  return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
1518
1526
  }
1519
1527
  getGameOverlayProps() {
1528
+ var _a, _b;
1520
1529
  return {
1521
1530
  gameName: this.gameInfo.name,
1522
1531
  gameId: this.gameInfo.gameId,
1523
- gameVendor: this.gameVendor || this.gameInfo.vendor.name,
1532
+ gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
1524
1533
  hasFunMode: this.gameInfo.hasFunMode,
1525
1534
  language: this.language,
1526
1535
  integratedGameFrameMobile: this.integratedGameFrameMobile,
@@ -219,17 +219,18 @@ const CasinoGameThumbnailExtrainfo = class {
219
219
  async onGameLoaded(gameInfo) {
220
220
  var _a;
221
221
  this.gameInfo = gameInfo;
222
+ this.isNewGame = this.gameInfo.isNew;
223
+ this.gameTag = this.gameInfo.gameTag;
222
224
  if (!this.gameInfo.details) {
223
225
  return;
224
226
  }
225
227
  this.gameDetails = this.gameInfo.details;
226
- this.isNewGame = this.gameInfo.isNew;
227
228
  this.isDouble = !this.gameDetails
228
229
  ? false
229
230
  : this.gameInfo.details.category.toLowerCase() ===
230
231
  WIDGETTYPE_GAMECATEGORY.doubleballroulette;
231
232
  this.gameTag = !this.gameDetails
232
- ? ''
233
+ ? this.gameInfo.gameTag
233
234
  : ((_a = this.gameInfo.advancedTags) === null || _a === void 0 ? void 0 : _a.length) > 0
234
235
  ? addGameTag(this.gameInfo.advancedTags)
235
236
  : 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-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);
14
14
  });
15
15
  };
16
16
 
@@ -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;
@@ -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
  }
@@ -200,6 +200,8 @@ export namespace Components {
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 {
@@ -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.14.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as i}from"./p-46dbb1cb.js";import{n as t,a,h as s}from"./p-6a6b2a78.js";import{t as n}from"./p-2b51ea79.js";import{W as o,c as r}from"./p-2d5f59fe.js";const l={AED:"د.إ",AFN:"؋",ALL:"L",AMD:"֏",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"ман",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"$b",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",ETH:"Ξ",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JOD:"JD",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"KD",KYD:"$",KZT:"лв",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTC:"Ł",LTL:"Lt",LVL:"Ls",LYD:"LD",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"},m=class{constructor(i){e(this,i),this.defaultCurrency="EUR",this.isBetLimitAvailable=!1}getCurrencySymbols(e){return l[e]}componentWillRender(){if(this.betLimit){const e=this.betLimit.max?this.betLimit.max:this.betLimit.min||{};this.isBetLimitAvailable=1===Object.keys(e).length,this.currency=this.isBetLimitAvailable?Object.keys(e)[0]:this.defaultCurrency}}render(){return this.isBetLimitAvailable?i("p",{class:"LiveLimits"},i("span",{class:"BetLimitLeft"},this.getCurrencySymbols(this.currency)," ",t(this.betLimit.min[this.currency])," -"," ",t(this.betLimit.max[this.currency])),(this.numberOfPlayers||0==this.numberOfPlayers)&&i("span",{class:"BetLimitRight"},i("svg",{fill:"white",width:"13",height:"13",viewBox:"0 0 13 14",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M4 8.2a4.6 4.6 0 0 0 5 0c2.7.8 4 2.6 4 4.8H0c0-2.2 1.3-4 4-4.8zM6.6 8c2 0 3.8-1.7 3.8-4 0-2.1-1.7-4-3.8-4a3.9 3.9 0 0 0-3.8 4c0 2.2 1.7 4 3.8 4z"})),i("span",{class:"NrOfPlayers"},this.numberOfPlayers))):""}};m.style=":host{display:block}";const c=class{constructor(i){e(this,i),this.language="en",this.isNewGame=!1}async onGameLoaded(e){var i;this.gameInfo=e,this.gameInfo.details&&(this.gameDetails=this.gameInfo.details,this.isNewGame=this.gameInfo.isNew,this.isDouble=!!this.gameDetails&&this.gameInfo.details.category.toLowerCase()===o.doubleballroulette,this.gameTag=this.gameDetails?(null===(i=this.gameInfo.advancedTags)||void 0===i?void 0:i.length)>0?a(this.gameInfo.advancedTags):this.gameInfo.gameTag:"",this.betLimit=this.gameDetails?this.gameDetails.betLimit:null,this.initTimeProperties())}initTimeProperties(){var e,i,t,a,s;"Bounded"===(null===(i=null===(e=this.gameDetails)||void 0===e?void 0:e.openHours)||void 0===i?void 0:i.type)&&(this.gameStartTime=null===(a=null===(t=this.gameDetails)||void 0===t?void 0:t.openHours)||void 0===a?void 0:a.value.startTime,this.gameTimeFormat=null===(s=this.gameDetails)||void 0===s?void 0:s.openHours.value.originalTimeFormat)}async onGameDetailUpdated(e){this.gameInfo.details=this.gameDetails=e,this.gameDetails=Object.assign({},this.gameDetails),this.initTimeProperties()}render(){var e,t,a;return this.gameInfo?i("div",{class:"GameExtraInfo",part:"GameExtraInfo"},this.isNewGame&&i("span",{class:"GameExtraInfoLabel NewGameTag",part:"GameExtraInfoLabel NewGameTag"},n("new",this.language)),this.gameTag&&i("span",{class:"GameExtraInfoLabel PopularGameTag",part:"GameExtraInfoLabel PopularGameTag"},this.gameTag),this.gameDetails&&i("div",{class:`GameProp LiveProps ${r[this.gameDetails.category.toLowerCase()]} ${this.isDouble?" Double":""}`,part:`GameProp LiveProps ${r[this.gameDetails.category.toLowerCase()]} ${this.isDouble?" Double":""}`},this.gameDetails.isOpen?i("slot",{name:"category-details"}):this.gameStartTime&&this.gameTimeFormat&&i("div",{class:"ClosedGame",part:"ClosedGame"},n("opens",this.language),i("span",null," ",s.utc(this.gameStartTime).local().format(this.gameTimeFormat)," ")),(null===(e=this.gameDetails.dealer)||void 0===e?void 0:e.DealerName)&&i("p",{class:"LiveLimits"},i("span",{class:"DealerName"},n("dealer",this.language),":"," ",null===(t=this.gameDetails)||void 0===t?void 0:t.dealer.DealerName," ")),i("casino-game-thumbnail-betlimit",{betLimit:this.betLimit,numberOfPlayers:null===(a=this.gameDetails)||void 0===a?void 0:a.numberOfPlayers}))):""}};c.style=':host{display:block;font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.LiveProps{display:flex;flex-direction:column;position:absolute;bottom:8px;left:-8px;right:0;width:100%;padding:0;background:linear-gradient(to top, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.3) 80%, rgba(0, 0, 0, 0.99) 100%);color:var(--emfe-w-color-white, #FFFFFF);opacity:1;font-size:14px}.GameExtraInfo{display:block;position:absolute;width:100%;height:100%;top:8px;left:8px;z-index:0}.GameExtraInfoLabel{font-size:11px;padding:3px;background-color:var(--emfe-w-color-primary, #D0046C);color:var(--emfe-w-color-primary-50, #FBECF4);font-weight:bold;text-transform:uppercase;border-radius:5px}.ListGame .GameInnerContainer .GameExtraInfo{z-index:10}.ListGame .GameInnerContainer .ClosedGame{opacity:1;z-index:10;padding:8px 10px;color:var(--emfe-w-color-white, #FFFFFF);font-size:18px}.ListGame .GameInnerContainer .ClosedGame span{font-size:18px}.ListGame .GameInnerContainer .LiveIcons{position:relative;display:flex;padding:0 10px;box-sizing:border-box;flex-direction:row;align-items:center;justify-content:flex-start;min-height:auto;margin-bottom:5px}.ListGame .GameInnerContainer .LiveIcons:first-child{margin-left:0}.ListGame .GameInnerContainer .LiveIcons:last-child{margin-right:0}.ListGame .GameInnerContainer .LiveIcons.Black,.ListGame .GameInnerContainer .LiveIcons.Red,.ListGame .GameInnerContainer .LiveIcons.Green{color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .LiveIcons .LatestResult{min-width:12px;padding:2px;margin:0 6px 0 1px;font-size:14px;text-align:center}.ListGame .GameInnerContainer .LiveIcons .LatestResult.FirstElementAnimated{animation:flip-open 2s both;-webkit-animation:flip-open 2s both;-webkit-backface-visibility:visible;backface-visibility:visible}.ListGame .GameInnerContainer .LiveIcons .LatestResult.First{min-width:24px;padding:4px}.ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Black,.ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Red,.ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Green{color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Black{background:var(--emfe-w-color-black, #000000)}.ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Red{background:red}.ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Green{background:#56A80A}.ListGame .GameInnerContainer .LiveIcons .Double{display:flex;flex-direction:column}.ListGame .GameInnerContainer .LiveIcons .Double .LatestResult:first-child{margin-bottom:10px}.ListGame .GameInnerContainer .LiveIcons .Double:first-child .LatestResult{margin-left:0;margin-bottom:0}.ListGame .GameInnerContainer .LiveIcons .Double:last-child .LatestResult{margin-right:0}.ListGame .GameInnerContainer .LiveIcons .Black,.ListGame .GameInnerContainer .LiveIcons .Red,.ListGame .GameInnerContainer .LiveIcons .Green{background-color:transparent}.ListGame .GameInnerContainer .LiveIcons .Black{color:var(--emfe-w-color-white, #FFFFFF)}.ListGame .GameInnerContainer .LiveIcons .Red{color:red}.ListGame .GameInnerContainer .LiveIcons .Green{color:#56A80A}.ListGame .GameInnerContainer .LiveLimits{opacity:1;display:flex;flex-direction:row;justify-content:space-between;padding:2px 10px 5px;background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #FFFFFF);font-weight:normal;font-size:12px}.ListGame .GameInnerContainer .LiveLimits span{font-size:12px;vertical-align:top}';export{m as casino_game_thumbnail_betlimit,c as casino_game_thumbnail_extrainfo}