@everymatrix/casino-game-thumb-view 1.32.4 → 1.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/baccarat.svg +43 -0
- package/dist/assets/fav.svg +9 -0
- package/dist/assets/favorite.svg +12 -0
- package/dist/assets/seat.svg +6 -0
- package/dist/assets/unfav.svg +20 -0
- package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -0
- package/dist/casino-game-thumb-view/index.esm.js +0 -0
- package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-1e63a1ab.js +1 -0
- package/dist/casino-game-thumb-view/p-2d5f59fe.js +1 -0
- package/dist/casino-game-thumb-view/p-42bf2034.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-46dbb1cb.js +1 -0
- package/dist/casino-game-thumb-view/p-6a6b2a78.js +8 -0
- package/dist/casino-game-thumb-view/p-7ae107ed.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-d961aec4.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-db43bb56.entry.js +7 -0
- package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +366 -0
- package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +58 -0
- package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +45 -0
- package/dist/cjs/casino-game-thumb-view.cjs.js +19 -0
- package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +1612 -0
- package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +278 -0
- package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +23 -0
- package/dist/cjs/game-thumbnail-31d518f0.js +78 -0
- package/dist/cjs/index-65a1d768.js +1796 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/locale.utils-aa160787.js +132 -0
- package/dist/cjs/utils-a0afc0a9.js +5745 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.css +116 -0
- package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +240 -0
- package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.css +64 -0
- package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +119 -0
- package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.css +40 -0
- package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +123 -0
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +361 -0
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1064 -0
- package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.css +3 -0
- package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +86 -0
- package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.css +154 -0
- package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +158 -0
- package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.css +58 -0
- package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +209 -0
- package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.css +3 -0
- package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +62 -0
- package/dist/collection/constants/game-thumbnail.js +85 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/models/casino-game-thumb-view.js +12 -0
- package/dist/collection/models/currency-symbols.js +173 -0
- package/dist/collection/static/baccarat.svg +43 -0
- package/dist/collection/static/fav.svg +9 -0
- package/dist/collection/static/favorite.svg +12 -0
- package/dist/collection/static/seat.svg +6 -0
- package/dist/collection/static/unfav.svg +20 -0
- package/dist/collection/utils/baccarat-board-svg.js +234 -0
- package/dist/collection/utils/locale.utils.js +128 -0
- package/dist/collection/utils/utils.js +65 -0
- package/dist/components/casino-extrainfo-baccarat.d.ts +11 -0
- package/dist/components/casino-extrainfo-baccarat.js +400 -0
- package/dist/components/casino-extrainfo-blackjack.d.ts +11 -0
- package/dist/components/casino-extrainfo-blackjack.js +92 -0
- package/dist/components/casino-extrainfo-roulette.d.ts +11 -0
- package/dist/components/casino-extrainfo-roulette.js +78 -0
- package/dist/components/casino-game-thumb-view.d.ts +11 -0
- package/dist/components/casino-game-thumb-view.js +1625 -0
- package/dist/components/casino-game-thumbnail-betlimit.d.ts +11 -0
- package/dist/components/casino-game-thumbnail-betlimit.js +6 -0
- package/dist/components/casino-game-thumbnail-betlimit2.js +227 -0
- package/dist/components/casino-game-thumbnail-extrainfo.d.ts +11 -0
- package/dist/components/casino-game-thumbnail-extrainfo.js +6 -0
- package/dist/components/casino-game-thumbnail-extrainfo2.js +96 -0
- package/dist/components/casino-game-thumbnail-overlay.d.ts +11 -0
- package/dist/components/casino-game-thumbnail-overlay.js +6 -0
- package/dist/components/casino-game-thumbnail-overlay2.js +69 -0
- package/dist/components/casino-normal-game-thumbnail.d.ts +11 -0
- package/dist/components/casino-normal-game-thumbnail.js +52 -0
- package/dist/components/game-thumbnail.js +72 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/locale.utils.js +130 -0
- package/dist/components/utils.js +5739 -0
- package/dist/esm/casino-extrainfo-baccarat.entry.js +362 -0
- package/dist/esm/casino-extrainfo-blackjack.entry.js +54 -0
- package/dist/esm/casino-extrainfo-roulette.entry.js +41 -0
- package/dist/esm/casino-game-thumb-view.js +17 -0
- package/dist/esm/casino-game-thumb-view_2.entry.js +1607 -0
- package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +273 -0
- package/dist/esm/casino-normal-game-thumbnail.entry.js +19 -0
- package/dist/esm/game-thumbnail-0a56ee03.js +72 -0
- package/dist/esm/index-1e44dd9f.js +1769 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/locale.utils-e0cf897e.js +130 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/utils-e9314132.js +5739 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +40 -0
- 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-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +40 -0
- package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +36 -0
- package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +21 -0
- package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +221 -0
- package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +17 -0
- package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +16 -0
- package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +31 -0
- package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +7 -0
- package/dist/types/components.d.ts +480 -0
- package/dist/types/constants/game-thumbnail.d.ts +83 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/casino-game-thumb-view.d.ts +132 -0
- package/dist/types/models/currency-symbols.d.ts +172 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/baccarat-board-svg.d.ts +31 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +19 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +2 -3
- package/LICENSE +0 -21
@@ -0,0 +1,1064 @@
|
|
1
|
+
import { Component, h, Prop, State, Event, Watch, Listen, } from '@stencil/core';
|
2
|
+
import { isMobile, convertGicBaccaratUpdateItem } from '../../utils/utils';
|
3
|
+
import { WIDGETTYPE_GAMECATEGORY, GAME_CATEGORY, GAME_TYPE, } from '../../constants/game-thumbnail';
|
4
|
+
import { EventSourcePolyfill } from 'event-source-polyfill';
|
5
|
+
import Fav from '../../static/fav.svg';
|
6
|
+
import UnFavSvg from '../../static/unfav.svg';
|
7
|
+
export class CasinoGameThumbView {
|
8
|
+
constructor() {
|
9
|
+
/**
|
10
|
+
* Widget Setting, Game language
|
11
|
+
*/
|
12
|
+
this.language = 'en';
|
13
|
+
/**
|
14
|
+
* Widget Setting, Client custom styling via string
|
15
|
+
*/
|
16
|
+
this.clientStyling = '';
|
17
|
+
/**
|
18
|
+
* Widget Setting, Client custom styling via url content
|
19
|
+
*/
|
20
|
+
this.clientStylingUrl = '';
|
21
|
+
/**
|
22
|
+
* Widget Setting, show game in a frame when user clicked 'start'
|
23
|
+
*/
|
24
|
+
this.integratedGameframeMobile = false;
|
25
|
+
/**
|
26
|
+
* Widget Setting, show game in a frame when user clicked 'start', Open game aframe,
|
27
|
+
* gamepageModalurl value should be set
|
28
|
+
*/
|
29
|
+
this.integratedGameframeDesktop = false;
|
30
|
+
/**
|
31
|
+
* Widget Setting, Load game details when set it as true, default value: false
|
32
|
+
* When loadDetails is true and type=='live-casino-tables',
|
33
|
+
* Load gameDetails by endpoint/vendor/gameId if livelobbyEndpoint is null
|
34
|
+
*/
|
35
|
+
this.loadDetails = false;
|
36
|
+
/**
|
37
|
+
* Widget Setting, showRoundBoard, default value: false
|
38
|
+
*/
|
39
|
+
this.showRoundBoard = false;
|
40
|
+
/**
|
41
|
+
* Game Property, default ''
|
42
|
+
*/
|
43
|
+
this.gameCategory = '';
|
44
|
+
/**
|
45
|
+
* Game Property, Game lunch platform
|
46
|
+
*/
|
47
|
+
this.platform = 'PC';
|
48
|
+
this.thumbnailLoaded = false;
|
49
|
+
this.containerClassWhenDetailChange = '';
|
50
|
+
this.isUserLoggedIn = false;
|
51
|
+
this.limitStylingAppends = false;
|
52
|
+
//customize style setting
|
53
|
+
this.setClientStyling = () => {
|
54
|
+
let sheet = document.createElement('style');
|
55
|
+
sheet.innerHTML = this.clientStyling;
|
56
|
+
this.stylingContainer.prepend(sheet);
|
57
|
+
};
|
58
|
+
//customize style setting
|
59
|
+
this.setClientStylingURL = () => {
|
60
|
+
let url = new URL(this.clientStylingUrl);
|
61
|
+
let cssFile = document.createElement('style');
|
62
|
+
fetch(url.href)
|
63
|
+
.then((res) => res.text())
|
64
|
+
.then((data) => {
|
65
|
+
cssFile.innerHTML = data;
|
66
|
+
setTimeout(() => {
|
67
|
+
this.stylingContainer.prepend(cssFile);
|
68
|
+
}, 1);
|
69
|
+
})
|
70
|
+
.catch((err) => {
|
71
|
+
console.error('error ', err);
|
72
|
+
});
|
73
|
+
};
|
74
|
+
this.getGameCategoryType = () => {
|
75
|
+
if (this.isLiveCasino &&
|
76
|
+
this.gameCategory &&
|
77
|
+
this.getWidgetTypeByGameCategory(this.gameCategory)) {
|
78
|
+
return `casino-extrainfo-${this.getWidgetTypeByGameCategory(this.gameCategory).toLowerCase()}`;
|
79
|
+
}
|
80
|
+
return `casino-normal-game-thumbnail`;
|
81
|
+
};
|
82
|
+
this.getGameContainerClass = () => {
|
83
|
+
let gameContainerClass = `GameContainer `;
|
84
|
+
if (this.gameInfo) {
|
85
|
+
if (this.gameInfo && this.gameInfo.details) {
|
86
|
+
gameContainerClass += ' ListGame ';
|
87
|
+
if (this.gameInfo.details.isOpen &&
|
88
|
+
this.gameInfo.details.currentRouletteNumbers) {
|
89
|
+
gameContainerClass += ' GameBackdrop ';
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
return gameContainerClass;
|
94
|
+
};
|
95
|
+
}
|
96
|
+
onSessionChanged() {
|
97
|
+
this.isUserLoggedIn = !!(this.session && this.userId);
|
98
|
+
}
|
99
|
+
onTableFullChanged(newVal, oldVal) {
|
100
|
+
if (oldVal == undefined) {
|
101
|
+
return;
|
102
|
+
}
|
103
|
+
this.containerClassWhenDetailChange =
|
104
|
+
newVal && !oldVal ? 'PulsatingRedShadow' : 'PulsatingGreenShadow';
|
105
|
+
}
|
106
|
+
handleMouseOver(event) {
|
107
|
+
this.hover = event.type === 'mouseenter';
|
108
|
+
}
|
109
|
+
gameFavoritedHandler(event) {
|
110
|
+
let eventDetail = event.detail;
|
111
|
+
this.gameInfo.isFavorite = eventDetail[this.gameId];
|
112
|
+
this.gameInfo = Object.assign({}, this.gameInfo);
|
113
|
+
}
|
114
|
+
connectLiveHandler() {
|
115
|
+
this.toggleConnect();
|
116
|
+
}
|
117
|
+
visibilityConnectHandler() {
|
118
|
+
this.toggleVisibilityConnect();
|
119
|
+
}
|
120
|
+
gameDetailChangeHandler(e) {
|
121
|
+
var _a, _b;
|
122
|
+
let message = JSON.parse(e.data);
|
123
|
+
if (message.needReconnect && this.liveLobbyConnection) {
|
124
|
+
this.liveLobbyConnection.close();
|
125
|
+
this.liveLobbyConnection = null;
|
126
|
+
this.connectGameToLiveLobby();
|
127
|
+
return;
|
128
|
+
}
|
129
|
+
if (!(message && message.InternalTableId == this.gameId)) {
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
let MessageType = message.MessageType;
|
133
|
+
switch (MessageType) {
|
134
|
+
case 'TableOpened':
|
135
|
+
case 'TableClosed':
|
136
|
+
this.gameInfo.details.isOpen = message.Open;
|
137
|
+
break;
|
138
|
+
case 'PlayersUpdated':
|
139
|
+
this.gameInfo.details.numberOfPlayers = message.Players;
|
140
|
+
break;
|
141
|
+
case 'RouletteResultsUpdated':
|
142
|
+
this.gameInfo.details.currentRouletteNumbers = message.Results;
|
143
|
+
break;
|
144
|
+
case 'DoubleBallRouletteResultsUpdated':
|
145
|
+
this.gameInfo.details.currentDoubleBallRouletteNumbers =
|
146
|
+
message.Results;
|
147
|
+
break;
|
148
|
+
case 'SeatsUpdated':
|
149
|
+
this.gameInfo.details.currentOccupiedSeats = message.Seats;
|
150
|
+
break;
|
151
|
+
case 'DealerChanged':
|
152
|
+
this.gameInfo.details.dealer = message.Dealer;
|
153
|
+
break;
|
154
|
+
case 'BaccaratResultsUpdated':
|
155
|
+
if (this.showRoundBoard) {
|
156
|
+
const Results = message.Results;
|
157
|
+
this.gameInfo.details.results = [];
|
158
|
+
Results.forEach((item) => {
|
159
|
+
this.gameInfo.details.results.push(convertGicBaccaratUpdateItem(item));
|
160
|
+
});
|
161
|
+
(_a = this.extraInfoRef) === null || _a === void 0 ? void 0 : _a.onBaccaratResultChanged(this.gameInfo.details.results);
|
162
|
+
}
|
163
|
+
break;
|
164
|
+
}
|
165
|
+
this.resetLiveProperties();
|
166
|
+
(_b = this.extraInfoRef) === null || _b === void 0 ? void 0 : _b.onGameDetailUpdated(this.gameInfo.details);
|
167
|
+
window.postMessage({ messageType: MessageType, value: e.data });
|
168
|
+
}
|
169
|
+
messageHandler(e) {
|
170
|
+
if (e.data.type === `AddFavoriteThumbnail_${this.gameId}` &&
|
171
|
+
!this.showFavoredCategory) {
|
172
|
+
this.gameInfo.isFavorite = true;
|
173
|
+
}
|
174
|
+
if (e.data.type === `RemoveFavoriteThumbnail_${this.gameId}` &&
|
175
|
+
!this.showFavoredCategory) {
|
176
|
+
this.gameInfo.isFavorite = false;
|
177
|
+
}
|
178
|
+
if (e.data.type === 'UserSessionID') {
|
179
|
+
this.isUserLoggedIn = true;
|
180
|
+
this.session = e.data.session;
|
181
|
+
this.userId = e.data.userID;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
resetLiveProperties() {
|
185
|
+
var _a, _b;
|
186
|
+
const details = this.gameInfo.details;
|
187
|
+
if (this.isBlackJack(this.gameCategory.toLowerCase())) {
|
188
|
+
this.isTableFull =
|
189
|
+
details.totalSeats == ((_a = details.currentOccupiedSeats) === null || _a === void 0 ? void 0 : _a.length);
|
190
|
+
}
|
191
|
+
else if (this.isBaccarat(this.gameCategory.toLowerCase()) &&
|
192
|
+
((_b = details.baccaratResults) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
193
|
+
this.gameInfo.details.results = [];
|
194
|
+
details.baccaratResults.forEach((item) => {
|
195
|
+
this.gameInfo.details.results.push(convertGicBaccaratUpdateItem(item));
|
196
|
+
});
|
197
|
+
delete details.baccaratResults;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
isBlackJack(gameCategory) {
|
201
|
+
return gameCategory.toLowerCase() === GAME_CATEGORY.BLACKJACK;
|
202
|
+
}
|
203
|
+
isBaccarat(gameCategory) {
|
204
|
+
return gameCategory.toLowerCase() === GAME_CATEGORY.BACCARAT;
|
205
|
+
}
|
206
|
+
/**
|
207
|
+
* Calculate component properties by game info,
|
208
|
+
* eg: isLiveCasino, gameInfo, isTableFull
|
209
|
+
*/
|
210
|
+
initCtrlProperties() {
|
211
|
+
var _a;
|
212
|
+
if (this.isLiveCasino && ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.details)) {
|
213
|
+
this.resetLiveProperties();
|
214
|
+
}
|
215
|
+
this.gameInfo = Object.assign({}, this.gameInfo);
|
216
|
+
this.triggerExtraInfoLoad();
|
217
|
+
if (this.isLiveCasino && this.connectLive === 'connect') {
|
218
|
+
this.connectGameToLiveLobby();
|
219
|
+
}
|
220
|
+
}
|
221
|
+
/**
|
222
|
+
* Parse game info by game info api response
|
223
|
+
* @param data
|
224
|
+
*/
|
225
|
+
parseGameResponse(data) {
|
226
|
+
if (data.length == 1) {
|
227
|
+
this.gameInfo = data[0];
|
228
|
+
if (this.isLiveCasino) {
|
229
|
+
if (!this.gameInfo.details) {
|
230
|
+
this.loadGameDetailInfo();
|
231
|
+
}
|
232
|
+
else {
|
233
|
+
this.parseGameDetailsResponse();
|
234
|
+
}
|
235
|
+
}
|
236
|
+
else {
|
237
|
+
this.initCtrlProperties();
|
238
|
+
}
|
239
|
+
}
|
240
|
+
}
|
241
|
+
/**
|
242
|
+
* Parse game detail info, set it to game info
|
243
|
+
*/
|
244
|
+
parseGameDetailsResponse() {
|
245
|
+
this.initCtrlProperties();
|
246
|
+
}
|
247
|
+
connectGameToLiveLobby() {
|
248
|
+
if (EventSource && !this.liveLobbyConnection) {
|
249
|
+
const updateUrl = `${this.endpoint}/v1/encoder/lobby/updates/${this.gameInfo.vendor.name}/${this.gameInfo.id}`;
|
250
|
+
this.liveLobbyConnection = new EventSourcePolyfill(updateUrl);
|
251
|
+
this.liveLobbyConnection.addEventListener('message', (evt) => {
|
252
|
+
this.gameDetailChangeHandler(evt);
|
253
|
+
});
|
254
|
+
}
|
255
|
+
}
|
256
|
+
disconnectGameFromLiveLobby() {
|
257
|
+
if (this.liveLobbyConnection) {
|
258
|
+
this.liveLobbyConnection.removeEventListener('message');
|
259
|
+
this.liveLobbyConnection.close();
|
260
|
+
this.liveLobbyConnection = undefined;
|
261
|
+
}
|
262
|
+
}
|
263
|
+
toggleConnect() {
|
264
|
+
if (!this.isLiveCasino) {
|
265
|
+
return;
|
266
|
+
}
|
267
|
+
if (this.connectLive === 'disconnect') {
|
268
|
+
this.disconnectGameFromLiveLobby();
|
269
|
+
}
|
270
|
+
else if (this.connectLive === 'connect') {
|
271
|
+
this.connectGameToLiveLobby();
|
272
|
+
}
|
273
|
+
}
|
274
|
+
toggleVisibilityConnect() {
|
275
|
+
if (!this.isLiveCasino) {
|
276
|
+
return;
|
277
|
+
}
|
278
|
+
if (this.visibilityConnect === 'disconnect') {
|
279
|
+
this.disconnectGameFromLiveLobby();
|
280
|
+
}
|
281
|
+
else if (this.visibilityConnect === 'connect' &&
|
282
|
+
this.connectLive === 'connect') {
|
283
|
+
this.connectGameToLiveLobby();
|
284
|
+
}
|
285
|
+
}
|
286
|
+
/**
|
287
|
+
* Get game base info from game api(casino/games/{id})
|
288
|
+
* @private
|
289
|
+
*/
|
290
|
+
loadGameById() {
|
291
|
+
let url = `${this.endpoint}/v1/casino/games/${this.gameId}?expand=vendor&platform=${this.platform}&language=${this.language}`;
|
292
|
+
fetch(url)
|
293
|
+
.then((res) => res.json())
|
294
|
+
.then((data) => this.parseGameResponse(data))
|
295
|
+
.catch((err) => {
|
296
|
+
console.error(err);
|
297
|
+
});
|
298
|
+
}
|
299
|
+
/*
|
300
|
+
* Load game info when widget property 'livelobbyEndpoint' set
|
301
|
+
* @private
|
302
|
+
*/
|
303
|
+
loadGameInfoByLobbyEndpoint() {
|
304
|
+
let url = new URL(`${this.livelobbyEndpoint.split('?')[0]}`);
|
305
|
+
url.searchParams.append('expand', 'vendor');
|
306
|
+
url.searchParams.append('platform', this.platform);
|
307
|
+
url.searchParams.append('language', this.language);
|
308
|
+
fetch(url.toString())
|
309
|
+
.then((res) => res.json())
|
310
|
+
.then((data) => this.parseGameResponse(data))
|
311
|
+
.catch((error) => console.error(error));
|
312
|
+
}
|
313
|
+
/*
|
314
|
+
* load game info when widget property 'livelobbyEndpoint' setted
|
315
|
+
* @private
|
316
|
+
*/
|
317
|
+
loadGameDetailInfo() {
|
318
|
+
let url = new URL(`${this.endpoint}/v1/lobby/tables/${this.gameId}`);
|
319
|
+
url.searchParams.append('platform', this.platform);
|
320
|
+
url.searchParams.append('language', this.language);
|
321
|
+
fetch(url.toString())
|
322
|
+
.then((res) => res.json())
|
323
|
+
.then((data) => {
|
324
|
+
if (!(data === null || data === void 0 ? void 0 : data.category)) {
|
325
|
+
return;
|
326
|
+
}
|
327
|
+
this.gameInfo.details = data;
|
328
|
+
this.parseGameDetailsResponse();
|
329
|
+
})
|
330
|
+
.catch((err) => {
|
331
|
+
console.error(err);
|
332
|
+
setTimeout(() => this.loadGameDetailInfo(), 1000);
|
333
|
+
});
|
334
|
+
}
|
335
|
+
/**
|
336
|
+
* Toggle game favorite property
|
337
|
+
* @param gameId
|
338
|
+
* @private
|
339
|
+
*/
|
340
|
+
toggleFavoriteGame(gameId) {
|
341
|
+
let triggerFactor = 'thumbnail';
|
342
|
+
if (this.gameInfo.isFavorite) {
|
343
|
+
window.postMessage({ type: 'SetUnfavoredGame', gameId, triggerFactor }, window.location.href);
|
344
|
+
}
|
345
|
+
else {
|
346
|
+
window.postMessage({ type: 'SetFavoredGame', gameId, triggerFactor }, window.location.href);
|
347
|
+
}
|
348
|
+
this.toggleFavoriteCasinoGameEvent.emit(gameId);
|
349
|
+
}
|
350
|
+
/**
|
351
|
+
* Generate gameInfo obj by props
|
352
|
+
* @private
|
353
|
+
*/
|
354
|
+
generateGameInfoByProps() {
|
355
|
+
return {
|
356
|
+
id: this.gameId,
|
357
|
+
name: this.gameName,
|
358
|
+
subVendor: this.subVendor,
|
359
|
+
hasFunMode: this.hasFunMode,
|
360
|
+
hasAnonymousFunMode: this.hasAnonymousFunMode,
|
361
|
+
thumbnail: this.thumbnail,
|
362
|
+
cellSize: this.cellSize,
|
363
|
+
gameTag: this.gameTag,
|
364
|
+
vendor: { href: '', name: this.gameVendor },
|
365
|
+
isFavorite: this.isFavorite,
|
366
|
+
isNew: this.isNew,
|
367
|
+
type: this.type,
|
368
|
+
liveCasinoCategory: this.gameCategory || '',
|
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
|
+
}
|
383
|
+
componentDidRender() {
|
384
|
+
// start custom styling area
|
385
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
386
|
+
if (this.clientStyling)
|
387
|
+
this.setClientStyling();
|
388
|
+
if (this.clientStylingUrl)
|
389
|
+
this.setClientStylingURL();
|
390
|
+
this.limitStylingAppends = true;
|
391
|
+
}
|
392
|
+
// end custom styling area 500)
|
393
|
+
if (this.gameInfo) {
|
394
|
+
this.triggerExtraInfoLoad();
|
395
|
+
}
|
396
|
+
}
|
397
|
+
componentDidLoad() {
|
398
|
+
window.addEventListener('message', this.messageHandler);
|
399
|
+
}
|
400
|
+
componentWillLoad() {
|
401
|
+
this.isLiveCasino = this.type == GAME_TYPE.LIVE_CASINO;
|
402
|
+
this.extraInfoWidget = this.getGameCategoryType();
|
403
|
+
this.isUserLoggedIn = !!(this.session && this.userId);
|
404
|
+
if (this.isLiveCasino && this.livelobbyEndpoint) {
|
405
|
+
this.loadGameInfoByLobbyEndpoint();
|
406
|
+
return;
|
407
|
+
}
|
408
|
+
//generate gameInfo obj by props
|
409
|
+
if (this.thumbnail) {
|
410
|
+
this.gameInfo = this.generateGameInfoByProps();
|
411
|
+
// loadLiveDetails if game is live casino
|
412
|
+
if (this.isLiveCasino &&
|
413
|
+
this.endpoint &&
|
414
|
+
this.loadDetails &&
|
415
|
+
this.gameId) {
|
416
|
+
this.loadGameDetailInfo();
|
417
|
+
}
|
418
|
+
return;
|
419
|
+
}
|
420
|
+
//fetch data from api if no game properties set except gameId
|
421
|
+
if (this.gameId && this.endpoint) {
|
422
|
+
this.loadGameById();
|
423
|
+
}
|
424
|
+
}
|
425
|
+
disconnectedCallback() {
|
426
|
+
if (this.liveLobbyConnection) {
|
427
|
+
this.liveLobbyConnection.removeEventListener('message', this.gameDetailChangeHandler);
|
428
|
+
}
|
429
|
+
window.removeEventListener('message', this.messageHandler);
|
430
|
+
}
|
431
|
+
// end custom styling area
|
432
|
+
getWidgetTypeByGameCategory(gameCategory) {
|
433
|
+
return WIDGETTYPE_GAMECATEGORY[gameCategory.toLowerCase()];
|
434
|
+
}
|
435
|
+
getGameOverlayProps() {
|
436
|
+
var _a, _b;
|
437
|
+
return {
|
438
|
+
gameName: this.gameInfo.name,
|
439
|
+
gameId: this.gameInfo.gameId,
|
440
|
+
gameVendor: this.gameVendor || ((_b = (_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.vendor) === null || _b === void 0 ? void 0 : _b.name),
|
441
|
+
hasFunMode: this.gameInfo.hasFunMode,
|
442
|
+
language: this.language,
|
443
|
+
integratedGameframeMobile: this.integratedGameframeMobile,
|
444
|
+
integratedGameframeDesktop: this.integratedGameframeDesktop,
|
445
|
+
gamepageModalurl: this.gamepageModalurl,
|
446
|
+
};
|
447
|
+
}
|
448
|
+
render() {
|
449
|
+
var _a, _b;
|
450
|
+
if (!this.gameInfo) {
|
451
|
+
return (h("div", { class: "GameInnerContainer", part: "GameInnerContainer", slot: "Game-Inner" },
|
452
|
+
h("img", { src: this.thumbnail, alt: "", loading: "lazy", part: "GameContainer", class: "GameContainer", onLoad: () => (this.thumbnailLoaded = true) })));
|
453
|
+
}
|
454
|
+
const gameOverlayProps = this.getGameOverlayProps();
|
455
|
+
const gameThumbnail = ((_a = this.gameInfo) === null || _a === void 0 ? void 0 : _a.thumbnail) || ((_b = this.gameInfo) === null || _b === void 0 ? void 0 : _b.defaultThumbnail);
|
456
|
+
const gameContainerClass = this.getGameContainerClass();
|
457
|
+
const gameThumbnailClass = `GameBg ${this.cellSize ? 'GameBg-' + this.cellSize : ''}
|
458
|
+
${this.hover ? ' GameContainerHovered' : ''} ${this.thumbnailLoaded ? ' Loaded' : ''}`;
|
459
|
+
return (h("div", { class: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, part: `${gameContainerClass} ${this.containerClassWhenDetailChange}`, ref: (el) => (this.stylingContainer = el), "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrl },
|
460
|
+
h("div", { class: `GameInnerContainer ${this.hover ? 'Hovered' : ''}`, part: `GameInnerContainer ${this.hover ? 'Hovered' : ''}` },
|
461
|
+
h("img", { src: gameThumbnail, alt: "Game Thumbnail ", loading: "lazy", part: gameThumbnailClass, class: gameThumbnailClass, onLoad: () => (this.thumbnailLoaded = true) }),
|
462
|
+
this.isUserLoggedIn && (h("div", { class: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, part: `FavIconContainer ${this.gameInfo.isFavorite ? 'Favorited' : ''}`, onClick: () => this.toggleFavoriteGame(this.gameId) }, this.gameInfo.isFavorite ? (h("slot", { name: "fav-icon" },
|
463
|
+
h("span", { class: "FavoredIcon", part: "FavoredIcon", innerHTML: Fav }))) : (h("slot", { name: "UnFavIcon" }, !isMobile(window.navigator.userAgent) && (h("span", { class: "UnfavoredIcon", part: "UnfavoredIcon", innerHTML: UnFavSvg })))))),
|
464
|
+
h("slot", { name: "game-overlay" },
|
465
|
+
h("casino-game-thumbnail-overlay", Object.assign({ language: this.language }, gameOverlayProps))),
|
466
|
+
h("slot", { name: "extra-info", ref: (el) => (this.extraInfoSlotRef = el) },
|
467
|
+
h(this.extraInfoWidget, { language: this.language, "show-round-board": this.showRoundBoard })),
|
468
|
+
h("slot", { name: "game-property-slot" })),
|
469
|
+
this.showGameName && (h("slot", { name: "game-name" },
|
470
|
+
h("p", { class: "GameNameBelow", part: "GameNameBelow", title: gameOverlayProps.gameName }, gameOverlayProps.gameName)))));
|
471
|
+
}
|
472
|
+
static get is() { return "casino-game-thumb-view"; }
|
473
|
+
static get encapsulation() { return "shadow"; }
|
474
|
+
static get originalStyleUrls() { return {
|
475
|
+
"$": ["casino-game-thumb-view.scss"]
|
476
|
+
}; }
|
477
|
+
static get styleUrls() { return {
|
478
|
+
"$": ["casino-game-thumb-view.css"]
|
479
|
+
}; }
|
480
|
+
static get assetsDirs() { return ["static"]; }
|
481
|
+
static get properties() { return {
|
482
|
+
"language": {
|
483
|
+
"type": "string",
|
484
|
+
"mutable": false,
|
485
|
+
"complexType": {
|
486
|
+
"original": "string",
|
487
|
+
"resolved": "string",
|
488
|
+
"references": {}
|
489
|
+
},
|
490
|
+
"required": false,
|
491
|
+
"optional": false,
|
492
|
+
"docs": {
|
493
|
+
"tags": [],
|
494
|
+
"text": "Widget Setting, Game language"
|
495
|
+
},
|
496
|
+
"attribute": "language",
|
497
|
+
"reflect": false,
|
498
|
+
"defaultValue": "'en'"
|
499
|
+
},
|
500
|
+
"endpoint": {
|
501
|
+
"type": "string",
|
502
|
+
"mutable": false,
|
503
|
+
"complexType": {
|
504
|
+
"original": "string",
|
505
|
+
"resolved": "string",
|
506
|
+
"references": {}
|
507
|
+
},
|
508
|
+
"required": false,
|
509
|
+
"optional": false,
|
510
|
+
"docs": {
|
511
|
+
"tags": [],
|
512
|
+
"text": "Widget Setting, Api endpoint for loading game details"
|
513
|
+
},
|
514
|
+
"attribute": "endpoint",
|
515
|
+
"reflect": false
|
516
|
+
},
|
517
|
+
"userId": {
|
518
|
+
"type": "any",
|
519
|
+
"mutable": false,
|
520
|
+
"complexType": {
|
521
|
+
"original": "string | number",
|
522
|
+
"resolved": "number | string",
|
523
|
+
"references": {}
|
524
|
+
},
|
525
|
+
"required": false,
|
526
|
+
"optional": false,
|
527
|
+
"docs": {
|
528
|
+
"tags": [],
|
529
|
+
"text": "Widget Setting, User id"
|
530
|
+
},
|
531
|
+
"attribute": "user-id",
|
532
|
+
"reflect": false
|
533
|
+
},
|
534
|
+
"showGameName": {
|
535
|
+
"type": "boolean",
|
536
|
+
"mutable": false,
|
537
|
+
"complexType": {
|
538
|
+
"original": "boolean",
|
539
|
+
"resolved": "boolean",
|
540
|
+
"references": {}
|
541
|
+
},
|
542
|
+
"required": false,
|
543
|
+
"optional": false,
|
544
|
+
"docs": {
|
545
|
+
"tags": [],
|
546
|
+
"text": "Widget Setting, Show game name if set it as true"
|
547
|
+
},
|
548
|
+
"attribute": "show-game-name",
|
549
|
+
"reflect": false
|
550
|
+
},
|
551
|
+
"session": {
|
552
|
+
"type": "string",
|
553
|
+
"mutable": false,
|
554
|
+
"complexType": {
|
555
|
+
"original": "string",
|
556
|
+
"resolved": "string",
|
557
|
+
"references": {}
|
558
|
+
},
|
559
|
+
"required": false,
|
560
|
+
"optional": false,
|
561
|
+
"docs": {
|
562
|
+
"tags": [],
|
563
|
+
"text": "Widget Setting, User session"
|
564
|
+
},
|
565
|
+
"attribute": "session",
|
566
|
+
"reflect": false
|
567
|
+
},
|
568
|
+
"showFavoredCategory": {
|
569
|
+
"type": "boolean",
|
570
|
+
"mutable": false,
|
571
|
+
"complexType": {
|
572
|
+
"original": "boolean",
|
573
|
+
"resolved": "boolean",
|
574
|
+
"references": {}
|
575
|
+
},
|
576
|
+
"required": false,
|
577
|
+
"optional": false,
|
578
|
+
"docs": {
|
579
|
+
"tags": [],
|
580
|
+
"text": "Widget Setting, game showed in favorited category"
|
581
|
+
},
|
582
|
+
"attribute": "show-favored-category",
|
583
|
+
"reflect": false
|
584
|
+
},
|
585
|
+
"clientStyling": {
|
586
|
+
"type": "string",
|
587
|
+
"mutable": false,
|
588
|
+
"complexType": {
|
589
|
+
"original": "string",
|
590
|
+
"resolved": "string",
|
591
|
+
"references": {}
|
592
|
+
},
|
593
|
+
"required": false,
|
594
|
+
"optional": false,
|
595
|
+
"docs": {
|
596
|
+
"tags": [],
|
597
|
+
"text": "Widget Setting, Client custom styling via string"
|
598
|
+
},
|
599
|
+
"attribute": "client-styling",
|
600
|
+
"reflect": false,
|
601
|
+
"defaultValue": "''"
|
602
|
+
},
|
603
|
+
"clientStylingUrl": {
|
604
|
+
"type": "string",
|
605
|
+
"mutable": false,
|
606
|
+
"complexType": {
|
607
|
+
"original": "string",
|
608
|
+
"resolved": "string",
|
609
|
+
"references": {}
|
610
|
+
},
|
611
|
+
"required": false,
|
612
|
+
"optional": false,
|
613
|
+
"docs": {
|
614
|
+
"tags": [],
|
615
|
+
"text": "Widget Setting, Client custom styling via url content"
|
616
|
+
},
|
617
|
+
"attribute": "client-styling-url",
|
618
|
+
"reflect": false,
|
619
|
+
"defaultValue": "''"
|
620
|
+
},
|
621
|
+
"integratedGameframeMobile": {
|
622
|
+
"type": "boolean",
|
623
|
+
"mutable": false,
|
624
|
+
"complexType": {
|
625
|
+
"original": "boolean",
|
626
|
+
"resolved": "boolean",
|
627
|
+
"references": {}
|
628
|
+
},
|
629
|
+
"required": false,
|
630
|
+
"optional": false,
|
631
|
+
"docs": {
|
632
|
+
"tags": [],
|
633
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start'"
|
634
|
+
},
|
635
|
+
"attribute": "integrated-gameframe-mobile",
|
636
|
+
"reflect": false,
|
637
|
+
"defaultValue": "false"
|
638
|
+
},
|
639
|
+
"gamepageModalurl": {
|
640
|
+
"type": "string",
|
641
|
+
"mutable": false,
|
642
|
+
"complexType": {
|
643
|
+
"original": "string",
|
644
|
+
"resolved": "string",
|
645
|
+
"references": {}
|
646
|
+
},
|
647
|
+
"required": false,
|
648
|
+
"optional": false,
|
649
|
+
"docs": {
|
650
|
+
"tags": [],
|
651
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start'\nthe frame url when integratedGameframeDesktop is true"
|
652
|
+
},
|
653
|
+
"attribute": "gamepage-modalurl",
|
654
|
+
"reflect": false
|
655
|
+
},
|
656
|
+
"integratedGameframeDesktop": {
|
657
|
+
"type": "boolean",
|
658
|
+
"mutable": false,
|
659
|
+
"complexType": {
|
660
|
+
"original": "boolean",
|
661
|
+
"resolved": "boolean",
|
662
|
+
"references": {}
|
663
|
+
},
|
664
|
+
"required": false,
|
665
|
+
"optional": false,
|
666
|
+
"docs": {
|
667
|
+
"tags": [],
|
668
|
+
"text": "Widget Setting, show game in a frame when user clicked 'start', Open game aframe,\ngamepageModalurl value should be set"
|
669
|
+
},
|
670
|
+
"attribute": "integrated-gameframe-desktop",
|
671
|
+
"reflect": false,
|
672
|
+
"defaultValue": "false"
|
673
|
+
},
|
674
|
+
"loadDetails": {
|
675
|
+
"type": "boolean",
|
676
|
+
"mutable": false,
|
677
|
+
"complexType": {
|
678
|
+
"original": "boolean",
|
679
|
+
"resolved": "boolean",
|
680
|
+
"references": {}
|
681
|
+
},
|
682
|
+
"required": false,
|
683
|
+
"optional": false,
|
684
|
+
"docs": {
|
685
|
+
"tags": [],
|
686
|
+
"text": "Widget Setting, Load game details when set it as true, default value: false\nWhen loadDetails is true and type=='live-casino-tables',\nLoad gameDetails by endpoint/vendor/gameId if livelobbyEndpoint is null"
|
687
|
+
},
|
688
|
+
"attribute": "load-details",
|
689
|
+
"reflect": false,
|
690
|
+
"defaultValue": "false"
|
691
|
+
},
|
692
|
+
"showRoundBoard": {
|
693
|
+
"type": "boolean",
|
694
|
+
"mutable": false,
|
695
|
+
"complexType": {
|
696
|
+
"original": "boolean",
|
697
|
+
"resolved": "boolean",
|
698
|
+
"references": {}
|
699
|
+
},
|
700
|
+
"required": false,
|
701
|
+
"optional": false,
|
702
|
+
"docs": {
|
703
|
+
"tags": [],
|
704
|
+
"text": "Widget Setting, showRoundBoard, default value: false"
|
705
|
+
},
|
706
|
+
"attribute": "show-round-board",
|
707
|
+
"reflect": false,
|
708
|
+
"defaultValue": "false"
|
709
|
+
},
|
710
|
+
"visibilityConnect": {
|
711
|
+
"type": "string",
|
712
|
+
"mutable": false,
|
713
|
+
"complexType": {
|
714
|
+
"original": "string",
|
715
|
+
"resolved": "string",
|
716
|
+
"references": {}
|
717
|
+
},
|
718
|
+
"required": false,
|
719
|
+
"optional": false,
|
720
|
+
"docs": {
|
721
|
+
"tags": [],
|
722
|
+
"text": "Widget Setting\nValid value: 'disconnect'/'connect'\nFlag to start a updater when a live game show in visible area\nwhen visibilityConnect='connect' && connectLive = 'connect'"
|
723
|
+
},
|
724
|
+
"attribute": "visibility-connect",
|
725
|
+
"reflect": false
|
726
|
+
},
|
727
|
+
"connectLive": {
|
728
|
+
"type": "string",
|
729
|
+
"mutable": false,
|
730
|
+
"complexType": {
|
731
|
+
"original": "string",
|
732
|
+
"resolved": "string",
|
733
|
+
"references": {}
|
734
|
+
},
|
735
|
+
"required": false,
|
736
|
+
"optional": false,
|
737
|
+
"docs": {
|
738
|
+
"tags": [],
|
739
|
+
"text": "Widget Setting, flag to start a updater when a live game show in visible area\nValid value: 'disconnect'/'connect'\nFlag to start a updater when a live game show in visible area\nwhen 'connectLive'= 'connect'"
|
740
|
+
},
|
741
|
+
"attribute": "connect-live",
|
742
|
+
"reflect": false
|
743
|
+
},
|
744
|
+
"gameCategory": {
|
745
|
+
"type": "string",
|
746
|
+
"mutable": false,
|
747
|
+
"complexType": {
|
748
|
+
"original": "string",
|
749
|
+
"resolved": "string",
|
750
|
+
"references": {}
|
751
|
+
},
|
752
|
+
"required": false,
|
753
|
+
"optional": false,
|
754
|
+
"docs": {
|
755
|
+
"tags": [],
|
756
|
+
"text": "Game Property, default ''"
|
757
|
+
},
|
758
|
+
"attribute": "game-category",
|
759
|
+
"reflect": false,
|
760
|
+
"defaultValue": "''"
|
761
|
+
},
|
762
|
+
"livelobbyEndpoint": {
|
763
|
+
"type": "string",
|
764
|
+
"mutable": false,
|
765
|
+
"complexType": {
|
766
|
+
"original": "string",
|
767
|
+
"resolved": "string",
|
768
|
+
"references": {}
|
769
|
+
},
|
770
|
+
"required": false,
|
771
|
+
"optional": false,
|
772
|
+
"docs": {
|
773
|
+
"tags": [],
|
774
|
+
"text": "Widget Setting, Live lobby endpoint, use to start a game\nLoad game info by this url if type=='live-casino-tables'"
|
775
|
+
},
|
776
|
+
"attribute": "livelobby-endpoint",
|
777
|
+
"reflect": false
|
778
|
+
},
|
779
|
+
"gameId": {
|
780
|
+
"type": "any",
|
781
|
+
"mutable": false,
|
782
|
+
"complexType": {
|
783
|
+
"original": "number | string",
|
784
|
+
"resolved": "number | string",
|
785
|
+
"references": {}
|
786
|
+
},
|
787
|
+
"required": false,
|
788
|
+
"optional": false,
|
789
|
+
"docs": {
|
790
|
+
"tags": [],
|
791
|
+
"text": "Game Property, GameId"
|
792
|
+
},
|
793
|
+
"attribute": "game-id",
|
794
|
+
"reflect": false
|
795
|
+
},
|
796
|
+
"gameName": {
|
797
|
+
"type": "string",
|
798
|
+
"mutable": false,
|
799
|
+
"complexType": {
|
800
|
+
"original": "string",
|
801
|
+
"resolved": "string",
|
802
|
+
"references": {}
|
803
|
+
},
|
804
|
+
"required": false,
|
805
|
+
"optional": false,
|
806
|
+
"docs": {
|
807
|
+
"tags": [],
|
808
|
+
"text": "Game Property, Game Name"
|
809
|
+
},
|
810
|
+
"attribute": "game-name",
|
811
|
+
"reflect": false
|
812
|
+
},
|
813
|
+
"subVendor": {
|
814
|
+
"type": "string",
|
815
|
+
"mutable": false,
|
816
|
+
"complexType": {
|
817
|
+
"original": "string",
|
818
|
+
"resolved": "string",
|
819
|
+
"references": {}
|
820
|
+
},
|
821
|
+
"required": false,
|
822
|
+
"optional": false,
|
823
|
+
"docs": {
|
824
|
+
"tags": [],
|
825
|
+
"text": "Game Property, Game SubVendor"
|
826
|
+
},
|
827
|
+
"attribute": "sub-vendor",
|
828
|
+
"reflect": false
|
829
|
+
},
|
830
|
+
"gameVendor": {
|
831
|
+
"type": "string",
|
832
|
+
"mutable": false,
|
833
|
+
"complexType": {
|
834
|
+
"original": "string",
|
835
|
+
"resolved": "string",
|
836
|
+
"references": {}
|
837
|
+
},
|
838
|
+
"required": false,
|
839
|
+
"optional": false,
|
840
|
+
"docs": {
|
841
|
+
"tags": [],
|
842
|
+
"text": "Game Property, Game vendor"
|
843
|
+
},
|
844
|
+
"attribute": "game-vendor",
|
845
|
+
"reflect": false
|
846
|
+
},
|
847
|
+
"hasFunMode": {
|
848
|
+
"type": "boolean",
|
849
|
+
"mutable": false,
|
850
|
+
"complexType": {
|
851
|
+
"original": "boolean",
|
852
|
+
"resolved": "boolean",
|
853
|
+
"references": {}
|
854
|
+
},
|
855
|
+
"required": false,
|
856
|
+
"optional": false,
|
857
|
+
"docs": {
|
858
|
+
"tags": [],
|
859
|
+
"text": "Game Property, Game funMode"
|
860
|
+
},
|
861
|
+
"attribute": "has-fun-mode",
|
862
|
+
"reflect": false
|
863
|
+
},
|
864
|
+
"hasAnonymousFunMode": {
|
865
|
+
"type": "boolean",
|
866
|
+
"mutable": false,
|
867
|
+
"complexType": {
|
868
|
+
"original": "boolean",
|
869
|
+
"resolved": "boolean",
|
870
|
+
"references": {}
|
871
|
+
},
|
872
|
+
"required": false,
|
873
|
+
"optional": false,
|
874
|
+
"docs": {
|
875
|
+
"tags": [],
|
876
|
+
"text": "Game Property, hasAnonymousFunMode"
|
877
|
+
},
|
878
|
+
"attribute": "has-anonymous-fun-mode",
|
879
|
+
"reflect": false
|
880
|
+
},
|
881
|
+
"platform": {
|
882
|
+
"type": "string",
|
883
|
+
"mutable": false,
|
884
|
+
"complexType": {
|
885
|
+
"original": "string",
|
886
|
+
"resolved": "string",
|
887
|
+
"references": {}
|
888
|
+
},
|
889
|
+
"required": false,
|
890
|
+
"optional": false,
|
891
|
+
"docs": {
|
892
|
+
"tags": [],
|
893
|
+
"text": "Game Property, Game lunch platform"
|
894
|
+
},
|
895
|
+
"attribute": "platform",
|
896
|
+
"reflect": false,
|
897
|
+
"defaultValue": "'PC'"
|
898
|
+
},
|
899
|
+
"thumbnail": {
|
900
|
+
"type": "string",
|
901
|
+
"mutable": false,
|
902
|
+
"complexType": {
|
903
|
+
"original": "string",
|
904
|
+
"resolved": "string",
|
905
|
+
"references": {}
|
906
|
+
},
|
907
|
+
"required": false,
|
908
|
+
"optional": false,
|
909
|
+
"docs": {
|
910
|
+
"tags": [],
|
911
|
+
"text": "Game Property, Game thumbnail"
|
912
|
+
},
|
913
|
+
"attribute": "thumbnail",
|
914
|
+
"reflect": false
|
915
|
+
},
|
916
|
+
"isFavorite": {
|
917
|
+
"type": "boolean",
|
918
|
+
"mutable": false,
|
919
|
+
"complexType": {
|
920
|
+
"original": "boolean",
|
921
|
+
"resolved": "boolean",
|
922
|
+
"references": {}
|
923
|
+
},
|
924
|
+
"required": false,
|
925
|
+
"optional": false,
|
926
|
+
"docs": {
|
927
|
+
"tags": [],
|
928
|
+
"text": "Game Property, is Game Favorited"
|
929
|
+
},
|
930
|
+
"attribute": "is-favorite",
|
931
|
+
"reflect": false
|
932
|
+
},
|
933
|
+
"isNew": {
|
934
|
+
"type": "boolean",
|
935
|
+
"mutable": false,
|
936
|
+
"complexType": {
|
937
|
+
"original": "boolean",
|
938
|
+
"resolved": "boolean",
|
939
|
+
"references": {}
|
940
|
+
},
|
941
|
+
"required": false,
|
942
|
+
"optional": false,
|
943
|
+
"docs": {
|
944
|
+
"tags": [],
|
945
|
+
"text": "Game Property, is Game new"
|
946
|
+
},
|
947
|
+
"attribute": "is-new",
|
948
|
+
"reflect": false
|
949
|
+
},
|
950
|
+
"cellSize": {
|
951
|
+
"type": "string",
|
952
|
+
"mutable": false,
|
953
|
+
"complexType": {
|
954
|
+
"original": "string",
|
955
|
+
"resolved": "string",
|
956
|
+
"references": {}
|
957
|
+
},
|
958
|
+
"required": false,
|
959
|
+
"optional": false,
|
960
|
+
"docs": {
|
961
|
+
"tags": [],
|
962
|
+
"text": "Game Property, Customize game cell size"
|
963
|
+
},
|
964
|
+
"attribute": "cell-size",
|
965
|
+
"reflect": false
|
966
|
+
},
|
967
|
+
"gameTag": {
|
968
|
+
"type": "string",
|
969
|
+
"mutable": false,
|
970
|
+
"complexType": {
|
971
|
+
"original": "string",
|
972
|
+
"resolved": "string",
|
973
|
+
"references": {}
|
974
|
+
},
|
975
|
+
"required": false,
|
976
|
+
"optional": false,
|
977
|
+
"docs": {
|
978
|
+
"tags": [],
|
979
|
+
"text": "Game Property, gameTag"
|
980
|
+
},
|
981
|
+
"attribute": "game-tag",
|
982
|
+
"reflect": false
|
983
|
+
},
|
984
|
+
"type": {
|
985
|
+
"type": "string",
|
986
|
+
"mutable": false,
|
987
|
+
"complexType": {
|
988
|
+
"original": "string",
|
989
|
+
"resolved": "string",
|
990
|
+
"references": {}
|
991
|
+
},
|
992
|
+
"required": true,
|
993
|
+
"optional": false,
|
994
|
+
"docs": {
|
995
|
+
"tags": [],
|
996
|
+
"text": "Game Property, type, isLiveCasino when type == 'live-casino-tables'"
|
997
|
+
},
|
998
|
+
"attribute": "type",
|
999
|
+
"reflect": false
|
1000
|
+
}
|
1001
|
+
}; }
|
1002
|
+
static get states() { return {
|
1003
|
+
"gameInfo": {},
|
1004
|
+
"isTableFull": {},
|
1005
|
+
"hover": {}
|
1006
|
+
}; }
|
1007
|
+
static get events() { return [{
|
1008
|
+
"method": "toggleFavoriteCasinoGameEvent",
|
1009
|
+
"name": "toggleCasinoGameFavorite",
|
1010
|
+
"bubbles": true,
|
1011
|
+
"cancelable": true,
|
1012
|
+
"composed": true,
|
1013
|
+
"docs": {
|
1014
|
+
"tags": [],
|
1015
|
+
"text": ""
|
1016
|
+
},
|
1017
|
+
"complexType": {
|
1018
|
+
"original": "number | string",
|
1019
|
+
"resolved": "number | string",
|
1020
|
+
"references": {}
|
1021
|
+
}
|
1022
|
+
}]; }
|
1023
|
+
static get watchers() { return [{
|
1024
|
+
"propName": "session",
|
1025
|
+
"methodName": "onSessionChanged"
|
1026
|
+
}, {
|
1027
|
+
"propName": "userId",
|
1028
|
+
"methodName": "onSessionChanged"
|
1029
|
+
}, {
|
1030
|
+
"propName": "isTableFull",
|
1031
|
+
"methodName": "onTableFullChanged"
|
1032
|
+
}, {
|
1033
|
+
"propName": "connectLive",
|
1034
|
+
"methodName": "connectLiveHandler"
|
1035
|
+
}, {
|
1036
|
+
"propName": "visibilityConnect",
|
1037
|
+
"methodName": "visibilityConnectHandler"
|
1038
|
+
}]; }
|
1039
|
+
static get listeners() { return [{
|
1040
|
+
"name": "mouseenter",
|
1041
|
+
"method": "handleMouseOver",
|
1042
|
+
"target": undefined,
|
1043
|
+
"capture": false,
|
1044
|
+
"passive": true
|
1045
|
+
}, {
|
1046
|
+
"name": "mouseleave",
|
1047
|
+
"method": "handleMouseOver",
|
1048
|
+
"target": undefined,
|
1049
|
+
"capture": false,
|
1050
|
+
"passive": true
|
1051
|
+
}, {
|
1052
|
+
"name": "gameFavorited",
|
1053
|
+
"method": "gameFavoritedHandler",
|
1054
|
+
"target": "document",
|
1055
|
+
"capture": false,
|
1056
|
+
"passive": false
|
1057
|
+
}, {
|
1058
|
+
"name": "gameDetailChange",
|
1059
|
+
"method": "gameDetailChangeHandler",
|
1060
|
+
"target": undefined,
|
1061
|
+
"capture": false,
|
1062
|
+
"passive": false
|
1063
|
+
}]; }
|
1064
|
+
}
|