@everymatrix/casino-game-thumb-view 0.0.2-9.1 → 1.0.69

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