@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.
- package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
- package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-662bd2b5.entry.js +7 -0
- package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-ef53c961.entry.js +1 -0
- package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +8 -7
- package/dist/cjs/casino-game-thumb-view.cjs.js +1 -1
- package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +46 -32
- package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +6 -2
- package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +5 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +8 -7
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +48 -35
- package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +6 -2
- package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +24 -23
- package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +51 -2
- package/dist/components/casino-extrainfo-roulette.js +8 -7
- package/dist/components/casino-game-thumb-view.js +43 -30
- package/dist/components/casino-game-thumbnail-extrainfo2.js +6 -2
- package/dist/components/casino-game-thumbnail-overlay2.js +9 -8
- package/dist/components/casino-normal-game-thumbnail.js +22 -3
- package/dist/esm/casino-extrainfo-roulette.entry.js +8 -7
- package/dist/esm/casino-game-thumb-view.js +1 -1
- package/dist/esm/casino-game-thumb-view_2.entry.js +46 -32
- package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +6 -2
- package/dist/esm/casino-normal-game-thumbnail.entry.js +5 -1
- package/dist/esm/loader.js +1 -1
- 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
- package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +9 -8
- package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +7 -6
- package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -0
- package/dist/types/components.d.ts +25 -22
- package/package.json +1 -1
- package/dist/casino-game-thumb-view/p-33e707bf.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-45836b67.entry.js +0 -7
- package/dist/casino-game-thumb-view/p-b153f943.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-fc7672a9.entry.js +0 -1
- 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
|
-
*
|
|
13
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
14
14
|
*/
|
|
15
|
-
this.
|
|
15
|
+
this.integratedGameframeMobile = false;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
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.
|
|
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.
|
|
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
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
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
|
|
30
|
-
const isDouble =
|
|
31
|
-
|
|
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
|
-
? (
|
|
34
|
-
: (
|
|
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 ${((
|
|
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"],"
|
|
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.
|
|
1120
|
+
this.integratedGameframeMobile = false;
|
|
1121
1121
|
/**
|
|
1122
1122
|
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
|
|
1123
|
-
*
|
|
1123
|
+
* gamepageModalurl value should be set
|
|
1124
1124
|
*/
|
|
1125
|
-
this.
|
|
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 &&
|
|
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}` &&
|
|
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}` &&
|
|
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
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
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' &&
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
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
|
-
*
|
|
1574
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
1562
1575
|
*/
|
|
1563
|
-
this.
|
|
1576
|
+
this.integratedGameframeMobile = false;
|
|
1564
1577
|
/**
|
|
1565
|
-
*
|
|
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.
|
|
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.
|
|
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;
|
package/dist/esm/loader.js
CHANGED
|
@@ -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"],"
|
|
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
|
|
|
@@ -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
|
-
|
|
43
|
+
integratedGameframeMobile: boolean;
|
|
44
44
|
/**
|
|
45
45
|
* Widget Setting, show game in a frame when user clicked 'start'
|
|
46
|
-
* the frame url when
|
|
46
|
+
* the frame url when integratedGameframeDesktop is true
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
gamepageModalurl: string;
|
|
49
49
|
/**
|
|
50
50
|
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
|
|
51
|
-
*
|
|
51
|
+
* gamepageModalurl value should be set
|
|
52
52
|
*/
|
|
53
|
-
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
integratedGameframeMobile: boolean;
|
|
217
|
+
integratedGameframeDesktop: boolean;
|
|
218
|
+
gamepageModalurl: string;
|
|
218
219
|
};
|
|
219
220
|
render(): any;
|
|
220
221
|
}
|
package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts
CHANGED
|
@@ -5,17 +5,18 @@ export declare class CasinoGameThumbnailOverlay {
|
|
|
5
5
|
*/
|
|
6
6
|
playClicked: EventEmitter<string | number>;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Widget Setting, the frame url when integratedGameframeDesktop is true
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
gamepageModalurl: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
integratedGameframeMobile: boolean;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
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
|
-
|
|
19
|
+
integratedGameframeDesktop: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* Language
|
|
21
22
|
*/
|
|
@@ -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
|
|
85
|
+
* Widget Setting, show game in a frame when user clicked 'start' the frame url when integratedGameframeDesktop is true
|
|
86
86
|
*/
|
|
87
|
-
"
|
|
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,
|
|
97
|
+
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe, gamepageModalurl value should be set
|
|
98
98
|
*/
|
|
99
|
-
"
|
|
99
|
+
"integratedGameframeDesktop": boolean;
|
|
100
100
|
/**
|
|
101
101
|
* Widget Setting, show game in a frame when user clicked 'start'
|
|
102
102
|
*/
|
|
103
|
-
"
|
|
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
|
|
185
|
+
* Widget Setting, the frame url when integratedGameframeDesktop is true
|
|
186
186
|
*/
|
|
187
|
-
"
|
|
187
|
+
"gamepageModalurl": string;
|
|
188
188
|
"hasFunMode": boolean;
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
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
|
-
"
|
|
192
|
+
"integratedGameframeDesktop": boolean;
|
|
193
193
|
/**
|
|
194
|
-
*
|
|
194
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
195
195
|
*/
|
|
196
|
-
"
|
|
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
|
|
332
|
+
* Widget Setting, show game in a frame when user clicked 'start' the frame url when integratedGameframeDesktop is true
|
|
331
333
|
*/
|
|
332
|
-
"
|
|
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,
|
|
344
|
+
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe, gamepageModalurl value should be set
|
|
343
345
|
*/
|
|
344
|
-
"
|
|
346
|
+
"integratedGameframeDesktop"?: boolean;
|
|
345
347
|
/**
|
|
346
348
|
* Widget Setting, show game in a frame when user clicked 'start'
|
|
347
349
|
*/
|
|
348
|
-
"
|
|
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
|
|
431
|
+
* Widget Setting, the frame url when integratedGameframeDesktop is true
|
|
430
432
|
*/
|
|
431
|
-
"
|
|
433
|
+
"gamepageModalurl"?: string;
|
|
432
434
|
"hasFunMode"?: boolean;
|
|
433
435
|
/**
|
|
434
|
-
*
|
|
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
|
-
"
|
|
438
|
+
"integratedGameframeDesktop"?: boolean;
|
|
437
439
|
/**
|
|
438
|
-
*
|
|
440
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
439
441
|
*/
|
|
440
|
-
"
|
|
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;
|