@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
|
@@ -21,12 +21,12 @@ export class CasinoGameThumbView {
|
|
|
21
21
|
/**
|
|
22
22
|
* Widget Setting, show game in a frame when user clicked 'start'
|
|
23
23
|
*/
|
|
24
|
-
this.
|
|
24
|
+
this.integratedGameframeMobile = false;
|
|
25
25
|
/**
|
|
26
26
|
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
|
|
27
|
-
*
|
|
27
|
+
* gamepageModalurl value should be set
|
|
28
28
|
*/
|
|
29
|
-
this.
|
|
29
|
+
this.integratedGameframeDesktop = false;
|
|
30
30
|
/**
|
|
31
31
|
* Widget Setting, Load game details when set it as true, default value: false
|
|
32
32
|
* When loadDetails is true and type=='live-casino-tables',
|
|
@@ -45,7 +45,6 @@ export class CasinoGameThumbView {
|
|
|
45
45
|
* Game Property, Game lunch platform
|
|
46
46
|
*/
|
|
47
47
|
this.platform = 'PC';
|
|
48
|
-
this.gameInfo = {};
|
|
49
48
|
this.thumbnailLoaded = false;
|
|
50
49
|
this.containerClassWhenDetailChange = '';
|
|
51
50
|
this.isUserLoggedIn = false;
|
|
@@ -73,7 +72,9 @@ export class CasinoGameThumbView {
|
|
|
73
72
|
});
|
|
74
73
|
};
|
|
75
74
|
this.getGameCategoryType = () => {
|
|
76
|
-
if (this.isLiveCasino &&
|
|
75
|
+
if (this.isLiveCasino &&
|
|
76
|
+
this.gameCategory &&
|
|
77
|
+
this.getWidgetTypeByGameCategory(this.gameCategory)) {
|
|
77
78
|
return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
|
|
78
79
|
}
|
|
79
80
|
return `casino-normal-game-thumbnail`;
|
|
@@ -121,6 +122,7 @@ export class CasinoGameThumbView {
|
|
|
121
122
|
let message = JSON.parse(e.data);
|
|
122
123
|
if (message.needReconnect && this.liveLobbyConnection) {
|
|
123
124
|
this.liveLobbyConnection.close();
|
|
125
|
+
this.liveLobbyConnection = null;
|
|
124
126
|
this.connectGameToLiveLobby();
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
@@ -165,10 +167,12 @@ export class CasinoGameThumbView {
|
|
|
165
167
|
window.postMessage({ messageType: MessageType, value: e.data });
|
|
166
168
|
}
|
|
167
169
|
messageHandler(e) {
|
|
168
|
-
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
|
170
|
+
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
|
171
|
+
!this.showFavoredCategory) {
|
|
169
172
|
this.gameInfo.isFavorite = true;
|
|
170
173
|
}
|
|
171
|
-
if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
|
|
174
|
+
if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
|
|
175
|
+
!this.showFavoredCategory) {
|
|
172
176
|
this.gameInfo.isFavorite = false;
|
|
173
177
|
}
|
|
174
178
|
if (e.data.type === 'UserSessionID') {
|
|
@@ -209,14 +213,10 @@ export class CasinoGameThumbView {
|
|
|
209
213
|
this.resetLiveProperties();
|
|
210
214
|
}
|
|
211
215
|
this.gameInfo = Object.assign({}, this.gameInfo);
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
type: 'casinoGameLoaded',
|
|
217
|
-
gameInfo: this.gameInfo,
|
|
218
|
-
});
|
|
219
|
-
}, 200);
|
|
216
|
+
this.triggerExtraInfoLoad();
|
|
217
|
+
if (this.isLiveCasino && this.connectLive === 'connect') {
|
|
218
|
+
this.connectGameToLiveLobby();
|
|
219
|
+
}
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
222
|
* Parse game info by game info api response
|
|
@@ -278,7 +278,8 @@ export class CasinoGameThumbView {
|
|
|
278
278
|
if (this.visibilityConnect === 'disconnect') {
|
|
279
279
|
this.disconnectGameFromLiveLobby();
|
|
280
280
|
}
|
|
281
|
-
else if (this.visibilityConnect === 'connect' &&
|
|
281
|
+
else if (this.visibilityConnect === 'connect' &&
|
|
282
|
+
this.connectLive === 'connect') {
|
|
282
283
|
this.connectGameToLiveLobby();
|
|
283
284
|
}
|
|
284
285
|
}
|
|
@@ -367,6 +368,18 @@ export class CasinoGameThumbView {
|
|
|
367
368
|
liveCasinoCategory: this.gameCategory || '',
|
|
368
369
|
};
|
|
369
370
|
}
|
|
371
|
+
triggerExtraInfoLoad() {
|
|
372
|
+
var _a, _b;
|
|
373
|
+
//Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
|
|
374
|
+
this.extraInfoRef =
|
|
375
|
+
this.extraInfoRef ||
|
|
376
|
+
((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
|
|
377
|
+
(_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
|
|
378
|
+
window.postMessage({
|
|
379
|
+
type: 'casinoGameLoaded',
|
|
380
|
+
gameInfo: this.gameInfo,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
370
383
|
componentDidRender() {
|
|
371
384
|
// start custom styling area
|
|
372
385
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
@@ -376,13 +389,13 @@ export class CasinoGameThumbView {
|
|
|
376
389
|
this.setClientStylingURL();
|
|
377
390
|
this.limitStylingAppends = true;
|
|
378
391
|
}
|
|
379
|
-
// end custom styling area
|
|
392
|
+
// end custom styling area 500)
|
|
393
|
+
if (this.gameInfo) {
|
|
394
|
+
this.triggerExtraInfoLoad();
|
|
395
|
+
}
|
|
380
396
|
}
|
|
381
397
|
componentDidLoad() {
|
|
382
|
-
|
|
383
|
-
//Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
|
|
384
|
-
this.extraInfoRef = (_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType());
|
|
385
|
-
window.addEventListener("message", this.messageHandler);
|
|
398
|
+
window.addEventListener('message', this.messageHandler);
|
|
386
399
|
}
|
|
387
400
|
componentWillLoad() {
|
|
388
401
|
this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
|
|
@@ -401,7 +414,6 @@ export class CasinoGameThumbView {
|
|
|
401
414
|
this.loadDetails &&
|
|
402
415
|
this.gameId) {
|
|
403
416
|
this.loadGameDetailInfo();
|
|
404
|
-
return;
|
|
405
417
|
}
|
|
406
418
|
return;
|
|
407
419
|
}
|
|
@@ -414,22 +426,23 @@ export class CasinoGameThumbView {
|
|
|
414
426
|
if (this.liveLobbyConnection) {
|
|
415
427
|
this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
|
|
416
428
|
}
|
|
417
|
-
window.removeEventListener(
|
|
429
|
+
window.removeEventListener('message', this.messageHandler);
|
|
418
430
|
}
|
|
419
431
|
// end custom styling area
|
|
420
432
|
getWidgetTypeByGameCategory(gameCategory) {
|
|
421
433
|
return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
|
|
422
434
|
}
|
|
423
435
|
getGameOverlayProps() {
|
|
436
|
+
var _a, _b;
|
|
424
437
|
return {
|
|
425
438
|
gameName: this.gameInfo.name,
|
|
426
439
|
gameId: this.gameInfo.gameId,
|
|
427
|
-
gameVendor: this.gameVendor || this.gameInfo.vendor.name,
|
|
440
|
+
gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
|
|
428
441
|
hasFunMode: this.gameInfo.hasFunMode,
|
|
429
442
|
language: this.language,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
443
|
+
integratedGameframeMobile: this.integratedGameframeMobile,
|
|
444
|
+
integratedGameframeDesktop: this.integratedGameframeDesktop,
|
|
445
|
+
gamepageModalurl: this.gamepageModalurl,
|
|
433
446
|
};
|
|
434
447
|
}
|
|
435
448
|
render() {
|
|
@@ -605,7 +618,7 @@ export class CasinoGameThumbView {
|
|
|
605
618
|
"reflect": false,
|
|
606
619
|
"defaultValue": "''"
|
|
607
620
|
},
|
|
608
|
-
"
|
|
621
|
+
"integratedGameframeMobile": {
|
|
609
622
|
"type": "boolean",
|
|
610
623
|
"mutable": false,
|
|
611
624
|
"complexType": {
|
|
@@ -619,11 +632,11 @@ export class CasinoGameThumbView {
|
|
|
619
632
|
"tags": [],
|
|
620
633
|
"text": "Widget Setting, show game in a frame when user clicked 'start'"
|
|
621
634
|
},
|
|
622
|
-
"attribute": "integrated-
|
|
635
|
+
"attribute": "integrated-gameframe-mobile",
|
|
623
636
|
"reflect": false,
|
|
624
637
|
"defaultValue": "false"
|
|
625
638
|
},
|
|
626
|
-
"
|
|
639
|
+
"gamepageModalurl": {
|
|
627
640
|
"type": "string",
|
|
628
641
|
"mutable": false,
|
|
629
642
|
"complexType": {
|
|
@@ -635,12 +648,12 @@ export class CasinoGameThumbView {
|
|
|
635
648
|
"optional": false,
|
|
636
649
|
"docs": {
|
|
637
650
|
"tags": [],
|
|
638
|
-
"text": "Widget Setting, show game in a frame when user clicked 'start'\nthe frame url when
|
|
651
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start'\nthe frame url when integratedGameframeDesktop is true"
|
|
639
652
|
},
|
|
640
|
-
"attribute": "gamepage-
|
|
653
|
+
"attribute": "gamepage-modalurl",
|
|
641
654
|
"reflect": false
|
|
642
655
|
},
|
|
643
|
-
"
|
|
656
|
+
"integratedGameframeDesktop": {
|
|
644
657
|
"type": "boolean",
|
|
645
658
|
"mutable": false,
|
|
646
659
|
"complexType": {
|
|
@@ -652,9 +665,9 @@ export class CasinoGameThumbView {
|
|
|
652
665
|
"optional": false,
|
|
653
666
|
"docs": {
|
|
654
667
|
"tags": [],
|
|
655
|
-
"text": "Widget Setting, show game in a frame when user clicked 'start', Open game aframe,\
|
|
668
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start', Open game aframe,\ngamepageModalurl value should be set"
|
|
656
669
|
},
|
|
657
|
-
"attribute": "integrated-
|
|
670
|
+
"attribute": "integrated-gameframe-desktop",
|
|
658
671
|
"reflect": false,
|
|
659
672
|
"defaultValue": "false"
|
|
660
673
|
},
|
|
@@ -11,17 +11,21 @@ export class CasinoGameThumbnailExtrainfo {
|
|
|
11
11
|
async onGameLoaded(gameInfo) {
|
|
12
12
|
var _a;
|
|
13
13
|
this.gameInfo = gameInfo;
|
|
14
|
+
this.isNewGame = this.gameInfo.isNew;
|
|
15
|
+
if (this.gameInfo.gameTag === 'false') {
|
|
16
|
+
this.gameInfo.gameTag = null;
|
|
17
|
+
}
|
|
18
|
+
this.gameTag = this.gameInfo.gameTag;
|
|
14
19
|
if (!this.gameInfo.details) {
|
|
15
20
|
return;
|
|
16
21
|
}
|
|
17
22
|
this.gameDetails = this.gameInfo.details;
|
|
18
|
-
this.isNewGame = this.gameInfo.isNew;
|
|
19
23
|
this.isDouble = !this.gameDetails
|
|
20
24
|
? false
|
|
21
25
|
: this.gameInfo.details.category.toLowerCase() ===
|
|
22
26
|
WIDGETTYPE_GAMECATEGORY.doubleballroulette;
|
|
23
27
|
this.gameTag = !this.gameDetails
|
|
24
|
-
?
|
|
28
|
+
? this.gameInfo.gameTag
|
|
25
29
|
: ((_a = this.gameInfo.advancedTags) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
26
30
|
? addGameTag(this.gameInfo.advancedTags)
|
|
27
31
|
: this.gameInfo.gameTag;
|
package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js
CHANGED
|
@@ -4,13 +4,14 @@ import { translate } from '../../utils/locale.utils';
|
|
|
4
4
|
export class CasinoGameThumbnailOverlay {
|
|
5
5
|
constructor() {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
8
8
|
*/
|
|
9
|
-
this.
|
|
9
|
+
this.integratedGameframeMobile = false;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Widget Setting, show game in a frame when user clicked 'start', default: false
|
|
12
|
+
* Open game in a frame, gamepageModalurl value should be set
|
|
12
13
|
*/
|
|
13
|
-
this.
|
|
14
|
+
this.integratedGameframeDesktop = false;
|
|
14
15
|
/**
|
|
15
16
|
* Language
|
|
16
17
|
*/
|
|
@@ -23,7 +24,7 @@ export class CasinoGameThumbnailOverlay {
|
|
|
23
24
|
gameId: this.gameId,
|
|
24
25
|
isMobile: isMobile(this.userAgent),
|
|
25
26
|
};
|
|
26
|
-
let isFrameMode = this.
|
|
27
|
+
let isFrameMode = this.integratedGameframeMobile || this.integratedGameframeDesktop;
|
|
27
28
|
window.postMessage({
|
|
28
29
|
type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
|
|
29
30
|
eventData: isFrameMode
|
|
@@ -49,42 +50,42 @@ export class CasinoGameThumbnailOverlay {
|
|
|
49
50
|
"$": ["casino-game-thumbnail-overlay.css"]
|
|
50
51
|
}; }
|
|
51
52
|
static get properties() { return {
|
|
52
|
-
"
|
|
53
|
-
"type": "
|
|
53
|
+
"gamepageModalurl": {
|
|
54
|
+
"type": "string",
|
|
54
55
|
"mutable": false,
|
|
55
56
|
"complexType": {
|
|
56
|
-
"original": "
|
|
57
|
-
"resolved": "
|
|
57
|
+
"original": "string",
|
|
58
|
+
"resolved": "string",
|
|
58
59
|
"references": {}
|
|
59
60
|
},
|
|
60
61
|
"required": false,
|
|
61
62
|
"optional": false,
|
|
62
63
|
"docs": {
|
|
63
64
|
"tags": [],
|
|
64
|
-
"text": "
|
|
65
|
+
"text": "Widget Setting, the frame url when integratedGameframeDesktop is true"
|
|
65
66
|
},
|
|
66
|
-
"attribute": "
|
|
67
|
-
"reflect": false
|
|
68
|
-
"defaultValue": "false"
|
|
67
|
+
"attribute": "gamepage-modalurl",
|
|
68
|
+
"reflect": false
|
|
69
69
|
},
|
|
70
|
-
"
|
|
71
|
-
"type": "
|
|
70
|
+
"integratedGameframeMobile": {
|
|
71
|
+
"type": "boolean",
|
|
72
72
|
"mutable": false,
|
|
73
73
|
"complexType": {
|
|
74
|
-
"original": "
|
|
75
|
-
"resolved": "
|
|
74
|
+
"original": "boolean",
|
|
75
|
+
"resolved": "boolean",
|
|
76
76
|
"references": {}
|
|
77
77
|
},
|
|
78
78
|
"required": false,
|
|
79
79
|
"optional": false,
|
|
80
80
|
"docs": {
|
|
81
81
|
"tags": [],
|
|
82
|
-
"text": "
|
|
82
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start', default: false"
|
|
83
83
|
},
|
|
84
|
-
"attribute": "
|
|
85
|
-
"reflect": false
|
|
84
|
+
"attribute": "integrated-gameframe-mobile",
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"defaultValue": "false"
|
|
86
87
|
},
|
|
87
|
-
"
|
|
88
|
+
"integratedGameframeDesktop": {
|
|
88
89
|
"type": "boolean",
|
|
89
90
|
"mutable": false,
|
|
90
91
|
"complexType": {
|
|
@@ -96,9 +97,9 @@ export class CasinoGameThumbnailOverlay {
|
|
|
96
97
|
"optional": false,
|
|
97
98
|
"docs": {
|
|
98
99
|
"tags": [],
|
|
99
|
-
"text": "
|
|
100
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start', default: false\nOpen game in a frame, gamepageModalurl value should be set"
|
|
100
101
|
},
|
|
101
|
-
"attribute": "integrated-
|
|
102
|
+
"attribute": "integrated-gameframe-desktop",
|
|
102
103
|
"reflect": false,
|
|
103
104
|
"defaultValue": "false"
|
|
104
105
|
},
|
package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js
CHANGED
|
@@ -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
|
|
33
|
-
const isDouble =
|
|
34
|
-
|
|
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
|
-
? (
|
|
37
|
-
: (
|
|
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 ${((
|
|
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", {
|
|
@@ -1119,12 +1119,12 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1119
1119
|
/**
|
|
1120
1120
|
* Widget Setting, show game in a frame when user clicked 'start'
|
|
1121
1121
|
*/
|
|
1122
|
-
this.
|
|
1122
|
+
this.integratedGameframeMobile = false;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
|
|
1125
|
-
*
|
|
1125
|
+
* gamepageModalurl value should be set
|
|
1126
1126
|
*/
|
|
1127
|
-
this.
|
|
1127
|
+
this.integratedGameframeDesktop = false;
|
|
1128
1128
|
/**
|
|
1129
1129
|
* Widget Setting, Load game details when set it as true, default value: false
|
|
1130
1130
|
* When loadDetails is true and type=='live-casino-tables',
|
|
@@ -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;
|
|
@@ -1171,7 +1170,9 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1171
1170
|
});
|
|
1172
1171
|
};
|
|
1173
1172
|
this.getGameCategoryType = () => {
|
|
1174
|
-
if (this.isLiveCasino &&
|
|
1173
|
+
if (this.isLiveCasino &&
|
|
1174
|
+
this.gameCategory &&
|
|
1175
|
+
this.getWidgetTypeByGameCategory(this.gameCategory)) {
|
|
1175
1176
|
return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
|
|
1176
1177
|
}
|
|
1177
1178
|
return `casino-normal-game-thumbnail`;
|
|
@@ -1219,6 +1220,7 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1219
1220
|
let message = JSON.parse(e.data);
|
|
1220
1221
|
if (message.needReconnect && this.liveLobbyConnection) {
|
|
1221
1222
|
this.liveLobbyConnection.close();
|
|
1223
|
+
this.liveLobbyConnection = null;
|
|
1222
1224
|
this.connectGameToLiveLobby();
|
|
1223
1225
|
return;
|
|
1224
1226
|
}
|
|
@@ -1263,10 +1265,12 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1263
1265
|
window.postMessage({ messageType: MessageType, value: e.data });
|
|
1264
1266
|
}
|
|
1265
1267
|
messageHandler(e) {
|
|
1266
|
-
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
|
1268
|
+
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
|
1269
|
+
!this.showFavoredCategory) {
|
|
1267
1270
|
this.gameInfo.isFavorite = true;
|
|
1268
1271
|
}
|
|
1269
|
-
if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
|
|
1272
|
+
if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
|
|
1273
|
+
!this.showFavoredCategory) {
|
|
1270
1274
|
this.gameInfo.isFavorite = false;
|
|
1271
1275
|
}
|
|
1272
1276
|
if (e.data.type === 'UserSessionID') {
|
|
@@ -1307,14 +1311,10 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1307
1311
|
this.resetLiveProperties();
|
|
1308
1312
|
}
|
|
1309
1313
|
this.gameInfo = Object.assign({}, this.gameInfo);
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
type: 'casinoGameLoaded',
|
|
1315
|
-
gameInfo: this.gameInfo,
|
|
1316
|
-
});
|
|
1317
|
-
}, 200);
|
|
1314
|
+
this.triggerExtraInfoLoad();
|
|
1315
|
+
if (this.isLiveCasino && this.connectLive === 'connect') {
|
|
1316
|
+
this.connectGameToLiveLobby();
|
|
1317
|
+
}
|
|
1318
1318
|
}
|
|
1319
1319
|
/**
|
|
1320
1320
|
* Parse game info by game info api response
|
|
@@ -1376,7 +1376,8 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1376
1376
|
if (this.visibilityConnect === 'disconnect') {
|
|
1377
1377
|
this.disconnectGameFromLiveLobby();
|
|
1378
1378
|
}
|
|
1379
|
-
else if (this.visibilityConnect === 'connect' &&
|
|
1379
|
+
else if (this.visibilityConnect === 'connect' &&
|
|
1380
|
+
this.connectLive === 'connect') {
|
|
1380
1381
|
this.connectGameToLiveLobby();
|
|
1381
1382
|
}
|
|
1382
1383
|
}
|
|
@@ -1465,6 +1466,18 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1465
1466
|
liveCasinoCategory: this.gameCategory || '',
|
|
1466
1467
|
};
|
|
1467
1468
|
}
|
|
1469
|
+
triggerExtraInfoLoad() {
|
|
1470
|
+
var _a, _b;
|
|
1471
|
+
//Init this.extraInfoRef, prepare for data loader, this.gameInfo did not inited might
|
|
1472
|
+
this.extraInfoRef =
|
|
1473
|
+
this.extraInfoRef ||
|
|
1474
|
+
((_a = this.extraInfoSlotRef) === null || _a === void 0 ? void 0 : _a.querySelector(this.getGameCategoryType()));
|
|
1475
|
+
(_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameLoaded(this.gameInfo);
|
|
1476
|
+
window.postMessage({
|
|
1477
|
+
type: 'casinoGameLoaded',
|
|
1478
|
+
gameInfo: this.gameInfo,
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1468
1481
|
componentDidRender() {
|
|
1469
1482
|
// start custom styling area
|
|
1470
1483
|
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
@@ -1474,13 +1487,13 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1474
1487
|
this.setClientStylingURL();
|
|
1475
1488
|
this.limitStylingAppends = true;
|
|
1476
1489
|
}
|
|
1477
|
-
// end custom styling area
|
|
1490
|
+
// end custom styling area 500)
|
|
1491
|
+
if (this.gameInfo) {
|
|
1492
|
+
this.triggerExtraInfoLoad();
|
|
1493
|
+
}
|
|
1478
1494
|
}
|
|
1479
1495
|
componentDidLoad() {
|
|
1480
|
-
|
|
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);
|
|
1496
|
+
window.addEventListener('message', this.messageHandler);
|
|
1484
1497
|
}
|
|
1485
1498
|
componentWillLoad() {
|
|
1486
1499
|
this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
|
|
@@ -1499,7 +1512,6 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1499
1512
|
this.loadDetails &&
|
|
1500
1513
|
this.gameId) {
|
|
1501
1514
|
this.loadGameDetailInfo();
|
|
1502
|
-
return;
|
|
1503
1515
|
}
|
|
1504
1516
|
return;
|
|
1505
1517
|
}
|
|
@@ -1512,22 +1524,23 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1512
1524
|
if (this.liveLobbyConnection) {
|
|
1513
1525
|
this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
|
|
1514
1526
|
}
|
|
1515
|
-
window.removeEventListener(
|
|
1527
|
+
window.removeEventListener('message', this.messageHandler);
|
|
1516
1528
|
}
|
|
1517
1529
|
// end custom styling area
|
|
1518
1530
|
getWidgetTypeByGameCategory(gameCategory) {
|
|
1519
1531
|
return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
|
|
1520
1532
|
}
|
|
1521
1533
|
getGameOverlayProps() {
|
|
1534
|
+
var _a, _b;
|
|
1522
1535
|
return {
|
|
1523
1536
|
gameName: this.gameInfo.name,
|
|
1524
1537
|
gameId: this.gameInfo.gameId,
|
|
1525
|
-
gameVendor: this.gameVendor || this.gameInfo.vendor.name,
|
|
1538
|
+
gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
|
|
1526
1539
|
hasFunMode: this.gameInfo.hasFunMode,
|
|
1527
1540
|
language: this.language,
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1541
|
+
integratedGameframeMobile: this.integratedGameframeMobile,
|
|
1542
|
+
integratedGameframeDesktop: this.integratedGameframeDesktop,
|
|
1543
|
+
gamepageModalurl: this.gamepageModalurl,
|
|
1531
1544
|
};
|
|
1532
1545
|
}
|
|
1533
1546
|
render() {
|
|
@@ -1560,9 +1573,9 @@ const CasinoGameThumbView$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
1560
1573
|
"showFavoredCategory": [4, "show-favored-category"],
|
|
1561
1574
|
"clientStyling": [1, "client-styling"],
|
|
1562
1575
|
"clientStylingUrl": [1, "client-styling-url"],
|
|
1563
|
-
"
|
|
1564
|
-
"
|
|
1565
|
-
"
|
|
1576
|
+
"integratedGameframeMobile": [4, "integrated-gameframe-mobile"],
|
|
1577
|
+
"gamepageModalurl": [1, "gamepage-modalurl"],
|
|
1578
|
+
"integratedGameframeDesktop": [4, "integrated-gameframe-desktop"],
|
|
1566
1579
|
"loadDetails": [4, "load-details"],
|
|
1567
1580
|
"showRoundBoard": [4, "show-round-board"],
|
|
1568
1581
|
"visibilityConnect": [1, "visibility-connect"],
|
|
@@ -16,17 +16,21 @@ 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
|
+
if (this.gameInfo.gameTag === 'false') {
|
|
21
|
+
this.gameInfo.gameTag = null;
|
|
22
|
+
}
|
|
23
|
+
this.gameTag = this.gameInfo.gameTag;
|
|
19
24
|
if (!this.gameInfo.details) {
|
|
20
25
|
return;
|
|
21
26
|
}
|
|
22
27
|
this.gameDetails = this.gameInfo.details;
|
|
23
|
-
this.isNewGame = this.gameInfo.isNew;
|
|
24
28
|
this.isDouble = !this.gameDetails
|
|
25
29
|
? false
|
|
26
30
|
: this.gameInfo.details.category.toLowerCase() ===
|
|
27
31
|
WIDGETTYPE_GAMECATEGORY.doubleballroulette;
|
|
28
32
|
this.gameTag = !this.gameDetails
|
|
29
|
-
?
|
|
33
|
+
? this.gameInfo.gameTag
|
|
30
34
|
: ((_a = this.gameInfo.advancedTags) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
31
35
|
? addGameTag(this.gameInfo.advancedTags)
|
|
32
36
|
: this.gameInfo.gameTag;
|