@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,19 @@
|
|
1
|
+
{
|
2
|
+
"entries": [
|
3
|
+
"./components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js",
|
4
|
+
"./components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js",
|
5
|
+
"./components/casino-extrainfo-roulette/casino-extrainfo-roulette.js",
|
6
|
+
"./components/casino-game-thumb-view/casino-game-thumb-view.js",
|
7
|
+
"./components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js",
|
8
|
+
"./components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js",
|
9
|
+
"./components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js",
|
10
|
+
"./components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js"
|
11
|
+
],
|
12
|
+
"compiler": {
|
13
|
+
"name": "@stencil/core",
|
14
|
+
"version": "2.15.2",
|
15
|
+
"typescriptVersion": "4.5.4"
|
16
|
+
},
|
17
|
+
"collections": [],
|
18
|
+
"bundles": []
|
19
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
:host {
|
2
|
+
display: block;
|
3
|
+
}
|
4
|
+
|
5
|
+
.BaccaratBoard {
|
6
|
+
container-type: inline-size;
|
7
|
+
min-height: 30px;
|
8
|
+
width: 100%;
|
9
|
+
}
|
10
|
+
.BaccaratBoard svg {
|
11
|
+
background: #fff;
|
12
|
+
opacity: 0.99;
|
13
|
+
height: 100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
.LiveProps.BaccaratProps div.LiveIcons {
|
17
|
+
margin-bottom: 0px;
|
18
|
+
padding: 0px;
|
19
|
+
width: 100%;
|
20
|
+
}
|
21
|
+
|
22
|
+
svg circle {
|
23
|
+
transition: stroke-dashoffset 0s ease 2s;
|
24
|
+
}
|
25
|
+
|
26
|
+
g.BoardRoundsGroup {
|
27
|
+
stroke-width: 1.8px;
|
28
|
+
}
|
29
|
+
|
30
|
+
@container (max-width: 300px) {
|
31
|
+
g.BoardRoundsGroup {
|
32
|
+
stroke-width: 0.9px;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
svg .Round.NewRound {
|
36
|
+
opacity: 1;
|
37
|
+
-webkit-animation-name: fadeInFromNone;
|
38
|
+
animation-name: fadeInFromNone;
|
39
|
+
-webkit-animation-duration: 1.5s;
|
40
|
+
animation-duration: 1.5s;
|
41
|
+
-webkit-animation-fill-mode: both;
|
42
|
+
animation-fill-mode: both;
|
43
|
+
}
|
44
|
+
|
45
|
+
@-webkit-keyframes fadeInFromNone {
|
46
|
+
0% {
|
47
|
+
display: none;
|
48
|
+
opacity: 0;
|
49
|
+
}
|
50
|
+
1% {
|
51
|
+
display: block;
|
52
|
+
opacity: 0;
|
53
|
+
}
|
54
|
+
100% {
|
55
|
+
display: block;
|
56
|
+
opacity: 1;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
@-moz-keyframes fadeInFromNone {
|
60
|
+
0% {
|
61
|
+
display: none;
|
62
|
+
opacity: 0;
|
63
|
+
}
|
64
|
+
1% {
|
65
|
+
display: block;
|
66
|
+
opacity: 0;
|
67
|
+
}
|
68
|
+
100% {
|
69
|
+
display: block;
|
70
|
+
opacity: 1;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
@-o-keyframes fadeInFromNone {
|
74
|
+
0% {
|
75
|
+
display: none;
|
76
|
+
opacity: 0;
|
77
|
+
}
|
78
|
+
1% {
|
79
|
+
display: block;
|
80
|
+
opacity: 0;
|
81
|
+
}
|
82
|
+
30% {
|
83
|
+
display: block;
|
84
|
+
opacity: 1;
|
85
|
+
}
|
86
|
+
60% {
|
87
|
+
display: block;
|
88
|
+
opacity: 0;
|
89
|
+
}
|
90
|
+
100% {
|
91
|
+
display: block;
|
92
|
+
opacity: 1;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
@keyframes fadeInFromNone {
|
96
|
+
0% {
|
97
|
+
display: none;
|
98
|
+
opacity: 0;
|
99
|
+
}
|
100
|
+
1% {
|
101
|
+
display: block;
|
102
|
+
opacity: 0;
|
103
|
+
}
|
104
|
+
30% {
|
105
|
+
display: block;
|
106
|
+
opacity: 1;
|
107
|
+
}
|
108
|
+
60% {
|
109
|
+
display: block;
|
110
|
+
opacity: 0;
|
111
|
+
}
|
112
|
+
100% {
|
113
|
+
display: block;
|
114
|
+
opacity: 1;
|
115
|
+
}
|
116
|
+
}
|
@@ -0,0 +1,240 @@
|
|
1
|
+
import { Component, h, Host, Method, Prop, State, Watch } from '@stencil/core';
|
2
|
+
import { BaccaratWinner, } from '../../models/casino-game-thumb-view';
|
3
|
+
import { BaccaratSvg } from '../../utils/baccarat-board-svg';
|
4
|
+
import { WINNER_COLOR } from '../../constants/game-thumbnail';
|
5
|
+
export class CasinoExtrainfoBaccarat {
|
6
|
+
constructor() {
|
7
|
+
this.baccaratSvg = new BaccaratSvg();
|
8
|
+
this.isBoardInited = false;
|
9
|
+
this.filledCells = [];
|
10
|
+
}
|
11
|
+
gameDetailsHandler(newVal, oldVal) {
|
12
|
+
if (newVal.isOpen && (!oldVal || !oldVal.isOpen)) {
|
13
|
+
if (this.showRoundBoard) {
|
14
|
+
setTimeout(() => {
|
15
|
+
this.initBaccaratRoundsBoard();
|
16
|
+
}, 100);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
async onGameLoaded(gameInfo) {
|
21
|
+
var _a;
|
22
|
+
this.gameInfo = gameInfo;
|
23
|
+
this.gameDetails = this.gameInfo.details;
|
24
|
+
(_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameLoaded(this.gameInfo);
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* Called when received update from updater
|
28
|
+
* @param details
|
29
|
+
*/
|
30
|
+
async onGameDetailUpdated(details) {
|
31
|
+
var _a;
|
32
|
+
this.gameInfo.details = this.gameDetails = details;
|
33
|
+
this.gameDetails = Object.assign({}, this.gameDetails);
|
34
|
+
(_a = this.infoWrapperRef) === null || _a === void 0 ? void 0 : _a.onGameDetailUpdated(details);
|
35
|
+
// init board when the svg board init finished
|
36
|
+
setTimeout(() => {
|
37
|
+
this.isBoardInited = true;
|
38
|
+
}, 200);
|
39
|
+
}
|
40
|
+
async onBaccaratResultChanged(result) {
|
41
|
+
if (!result || !this.baccaratRef || this.isResetingRoundBoard) {
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
// For Tie round to mark, latestRound
|
45
|
+
let latestRound, resetRoundBoardCells = () => {
|
46
|
+
console.log('Reset Baccarat Board.');
|
47
|
+
this.filledCells = [];
|
48
|
+
this.baccaratSvg.resetSvg();
|
49
|
+
latestRound = null;
|
50
|
+
};
|
51
|
+
// Reset round board to avoid the reset(result==[]) update come earlier than last round,
|
52
|
+
// Ignore if the result.length == 0 for temporary
|
53
|
+
if (this.isBoardInited &&
|
54
|
+
(result.length == 0 ||
|
55
|
+
(result.length == 1 &&
|
56
|
+
(result[0].winner == BaccaratWinner.TIE ||
|
57
|
+
(result[0].location.column == 0 && result[0].location.row == 0))))) {
|
58
|
+
this.isResetingRoundBoard = true;
|
59
|
+
resetRoundBoardCells();
|
60
|
+
setTimeout(() => {
|
61
|
+
this.isResetingRoundBoard = false;
|
62
|
+
}, 1000);
|
63
|
+
}
|
64
|
+
result.forEach((item, i) => {
|
65
|
+
//Mark the Tie when Tie round is the first cell(0,0)
|
66
|
+
if (item.winner == BaccaratWinner.TIE) {
|
67
|
+
if (i == result.length - 1 &&
|
68
|
+
(!latestRound ||
|
69
|
+
(latestRound &&
|
70
|
+
latestRound.location.column == 0 &&
|
71
|
+
latestRound.location.row == 0))) {
|
72
|
+
let firstTieCellKey = '0-0-T';
|
73
|
+
if (this.filledCells.indexOf(firstTieCellKey) == -1) {
|
74
|
+
this.baccaratSvg.markNewRound(0, 0, Object.assign(Object.assign({}, item), { pairColor: WINNER_COLOR }), this.isBoardInited);
|
75
|
+
this.filledCells.push(firstTieCellKey);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
//cellKey to mark if a round has been marked
|
81
|
+
const cellKey = `${item.location.column}-${item.location.row}`;
|
82
|
+
const tCellKey = `${cellKey}-T`;
|
83
|
+
if (item.ties > 0 && this.filledCells.indexOf(tCellKey) == -1) {
|
84
|
+
this.baccaratSvg.markNewRound(item.location.column, item.location.row, Object.assign(Object.assign({}, item), { winner: BaccaratWinner.TIE }), this.isBoardInited);
|
85
|
+
this.filledCells.push(tCellKey);
|
86
|
+
}
|
87
|
+
latestRound = item;
|
88
|
+
//If current cell has been filled,duplicated data
|
89
|
+
if (this.filledCells.indexOf(cellKey) == -1) {
|
90
|
+
this.baccaratSvg.markNewRound(item.location.column, item.location.row, Object.assign(Object.assign({}, item), { pairColor: WINNER_COLOR }), this.isBoardInited);
|
91
|
+
this.filledCells.push(cellKey);
|
92
|
+
}
|
93
|
+
});
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
initBaccaratRoundsBoard() {
|
97
|
+
var _a;
|
98
|
+
this.baccaratSvg.createBaccaratBoard(this.baccaratRef);
|
99
|
+
if (((_a = this.gameDetails.results) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
100
|
+
this.onBaccaratResultChanged(this.gameDetails.results);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
render() {
|
104
|
+
var _a;
|
105
|
+
return (h(Host, null,
|
106
|
+
h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language }, ((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.isOpen) && this.showRoundBoard && (h("div", { slot: "category-details", class: "LiveIcons", part: "LiveIcons" },
|
107
|
+
h("div", { id: "boardContainer", part: "BaccaratBoard", class: "BaccaratBoard", ref: (el) => (this.baccaratRef = el) }))))));
|
108
|
+
}
|
109
|
+
static get is() { return "casino-extrainfo-baccarat"; }
|
110
|
+
static get originalStyleUrls() { return {
|
111
|
+
"$": ["casino-extrainfo-baccarat.scss"]
|
112
|
+
}; }
|
113
|
+
static get styleUrls() { return {
|
114
|
+
"$": ["casino-extrainfo-baccarat.css"]
|
115
|
+
}; }
|
116
|
+
static get properties() { return {
|
117
|
+
"language": {
|
118
|
+
"type": "string",
|
119
|
+
"mutable": false,
|
120
|
+
"complexType": {
|
121
|
+
"original": "string",
|
122
|
+
"resolved": "string",
|
123
|
+
"references": {}
|
124
|
+
},
|
125
|
+
"required": false,
|
126
|
+
"optional": false,
|
127
|
+
"docs": {
|
128
|
+
"tags": [],
|
129
|
+
"text": "Text language to show"
|
130
|
+
},
|
131
|
+
"attribute": "language",
|
132
|
+
"reflect": false
|
133
|
+
},
|
134
|
+
"showRoundBoard": {
|
135
|
+
"type": "boolean",
|
136
|
+
"mutable": false,
|
137
|
+
"complexType": {
|
138
|
+
"original": "boolean",
|
139
|
+
"resolved": "boolean",
|
140
|
+
"references": {}
|
141
|
+
},
|
142
|
+
"required": false,
|
143
|
+
"optional": false,
|
144
|
+
"docs": {
|
145
|
+
"tags": [],
|
146
|
+
"text": "Text language to show"
|
147
|
+
},
|
148
|
+
"attribute": "show-round-board",
|
149
|
+
"reflect": false
|
150
|
+
}
|
151
|
+
}; }
|
152
|
+
static get states() { return {
|
153
|
+
"gameInfo": {},
|
154
|
+
"gameDetails": {}
|
155
|
+
}; }
|
156
|
+
static get methods() { return {
|
157
|
+
"onGameLoaded": {
|
158
|
+
"complexType": {
|
159
|
+
"signature": "(gameInfo: CasinoGameThumbnailInfo) => Promise<void>",
|
160
|
+
"parameters": [{
|
161
|
+
"tags": [],
|
162
|
+
"text": ""
|
163
|
+
}],
|
164
|
+
"references": {
|
165
|
+
"Promise": {
|
166
|
+
"location": "global"
|
167
|
+
},
|
168
|
+
"CasinoGameThumbnailInfo": {
|
169
|
+
"location": "import",
|
170
|
+
"path": "../../models/casino-game-thumb-view"
|
171
|
+
}
|
172
|
+
},
|
173
|
+
"return": "Promise<void>"
|
174
|
+
},
|
175
|
+
"docs": {
|
176
|
+
"text": "",
|
177
|
+
"tags": []
|
178
|
+
}
|
179
|
+
},
|
180
|
+
"onGameDetailUpdated": {
|
181
|
+
"complexType": {
|
182
|
+
"signature": "(details: CasinoGameThumbnailDetails) => Promise<void>",
|
183
|
+
"parameters": [{
|
184
|
+
"tags": [{
|
185
|
+
"name": "param",
|
186
|
+
"text": "details"
|
187
|
+
}],
|
188
|
+
"text": ""
|
189
|
+
}],
|
190
|
+
"references": {
|
191
|
+
"Promise": {
|
192
|
+
"location": "global"
|
193
|
+
},
|
194
|
+
"CasinoGameThumbnailDetails": {
|
195
|
+
"location": "import",
|
196
|
+
"path": "../../models/casino-game-thumb-view"
|
197
|
+
}
|
198
|
+
},
|
199
|
+
"return": "Promise<void>"
|
200
|
+
},
|
201
|
+
"docs": {
|
202
|
+
"text": "Called when received update from updater",
|
203
|
+
"tags": [{
|
204
|
+
"name": "param",
|
205
|
+
"text": "details"
|
206
|
+
}]
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"onBaccaratResultChanged": {
|
210
|
+
"complexType": {
|
211
|
+
"signature": "(result: Array<BaccaratUpdateItem>) => Promise<void>",
|
212
|
+
"parameters": [{
|
213
|
+
"tags": [],
|
214
|
+
"text": ""
|
215
|
+
}],
|
216
|
+
"references": {
|
217
|
+
"Promise": {
|
218
|
+
"location": "global"
|
219
|
+
},
|
220
|
+
"Array": {
|
221
|
+
"location": "global"
|
222
|
+
},
|
223
|
+
"BaccaratUpdateItem": {
|
224
|
+
"location": "import",
|
225
|
+
"path": "../../models/casino-game-thumb-view"
|
226
|
+
}
|
227
|
+
},
|
228
|
+
"return": "Promise<void>"
|
229
|
+
},
|
230
|
+
"docs": {
|
231
|
+
"text": "",
|
232
|
+
"tags": []
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}; }
|
236
|
+
static get watchers() { return [{
|
237
|
+
"propName": "gameDetails",
|
238
|
+
"methodName": "gameDetailsHandler"
|
239
|
+
}]; }
|
240
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
:host {
|
2
|
+
display: block;
|
3
|
+
}
|
4
|
+
|
5
|
+
.OpenSeat, .ClosedSeat {
|
6
|
+
display: inline-block;
|
7
|
+
width: 16px;
|
8
|
+
height: 16px;
|
9
|
+
margin-right: 4px;
|
10
|
+
}
|
11
|
+
.OpenSeat svg, .ClosedSeat svg {
|
12
|
+
width: 100%;
|
13
|
+
height: 100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
.OpenSeat {
|
17
|
+
animation: flip-closed-seat 2s both;
|
18
|
+
-webkit-animation: flip-closed-seat 2s both;
|
19
|
+
-webkit-backface-visibility: visible;
|
20
|
+
backface-visibility: visible;
|
21
|
+
}
|
22
|
+
|
23
|
+
.ClosedSeat {
|
24
|
+
animation: flip-open 2s both;
|
25
|
+
-webkit-animation: flip-open 2s both;
|
26
|
+
-webkit-backface-visibility: visible;
|
27
|
+
backface-visibility: visible;
|
28
|
+
}
|
29
|
+
|
30
|
+
.OpenSeat svg {
|
31
|
+
fill: transparent;
|
32
|
+
stroke: var(--emfe-w-color-white, #FFFFFF);
|
33
|
+
}
|
34
|
+
|
35
|
+
.ClosedSeat svg {
|
36
|
+
fill: var(--emfe-w-color-white, #FFFFFF);
|
37
|
+
}
|
38
|
+
|
39
|
+
.FullTable {
|
40
|
+
display: flex;
|
41
|
+
position: relative;
|
42
|
+
z-index: 10;
|
43
|
+
height: 20px;
|
44
|
+
padding: 1px 4px 1px 0;
|
45
|
+
align-items: center;
|
46
|
+
border-radius: 3px;
|
47
|
+
font-size: 12px;
|
48
|
+
white-space: normal;
|
49
|
+
text-transform: uppercase;
|
50
|
+
-webkit-animation-name: silde-in-from-left;
|
51
|
+
animation-name: silde-in-from-left;
|
52
|
+
-webkit-animation-duration: 1s;
|
53
|
+
animation-duration: 1s;
|
54
|
+
-webkit-animation-fill-mode: both;
|
55
|
+
animation-fill-mode: both;
|
56
|
+
}
|
57
|
+
.FullTable svg {
|
58
|
+
width: 100%;
|
59
|
+
height: 100%;
|
60
|
+
fill: var(--emfe-w-color-white, #FFFFFF);
|
61
|
+
}
|
62
|
+
.FullTable.ClosedSeat {
|
63
|
+
margin-right: -3px;
|
64
|
+
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
import { Component, h, Host, Method, Prop, State } from '@stencil/core';
|
2
|
+
import SeatSvg from '../../static/seat.svg';
|
3
|
+
import { DEFAULT_BLACKJACK_TOTAL_SEATS } from '../../constants/game-thumbnail';
|
4
|
+
import { translate } from '../../utils/locale.utils';
|
5
|
+
export class CasinoExtrainfoBlackjack {
|
6
|
+
/**
|
7
|
+
* Generate Jackpot live seats info
|
8
|
+
* @param totalSeats
|
9
|
+
* @param occupiedSeats
|
10
|
+
*/
|
11
|
+
generateBlackJackSeats(totalSeats = DEFAULT_BLACKJACK_TOTAL_SEATS, occupiedSeats = []) {
|
12
|
+
let seatsStatus = [];
|
13
|
+
for (let i = 0; i < totalSeats; i++) {
|
14
|
+
seatsStatus.push({
|
15
|
+
seatNo: i,
|
16
|
+
isClosed: occupiedSeats.indexOf((i + 1).toString()) > -1,
|
17
|
+
});
|
18
|
+
}
|
19
|
+
this.isTableFull = totalSeats == occupiedSeats.length;
|
20
|
+
return seatsStatus;
|
21
|
+
}
|
22
|
+
async onGameLoaded(gameInfo) {
|
23
|
+
var _a, _b, _c;
|
24
|
+
this.gameInfo = gameInfo;
|
25
|
+
this.gameDetails = this.gameInfo.details;
|
26
|
+
this.seatsStatus = this.generateBlackJackSeats((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.totalSeats, (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentOccupiedSeats);
|
27
|
+
(_c = this.infoWrapperRef) === null || _c === void 0 ? void 0 : _c.onGameLoaded(gameInfo);
|
28
|
+
}
|
29
|
+
async onGameDetailUpdated(details) {
|
30
|
+
var _a, _b;
|
31
|
+
this.gameInfo.details = this.gameDetails = details;
|
32
|
+
this.seatsStatus = this.generateBlackJackSeats((_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.totalSeats, (_b = this.gameDetails) === null || _b === void 0 ? void 0 : _b.currentOccupiedSeats);
|
33
|
+
this.gameDetails = Object.assign({}, this.gameDetails);
|
34
|
+
}
|
35
|
+
render() {
|
36
|
+
return (h(Host, null,
|
37
|
+
h("casino-game-thumbnail-extrainfo", { ref: (el) => (this.infoWrapperRef = el), language: this.language }, this.gameDetails && this.gameDetails.isOpen && (h("div", { slot: "category-details", class: "LiveIcons", part: "LiveIcons" }, this.isTableFull ? (h("span", { class: "FullTable", part: "FullTable" }, translate('full', this.language))) : (this.seatsStatus.map((seatStatus) => (h("span", { class: `${seatStatus.isClosed ? 'ClosedSeat' : 'OpenSeat'} svg-container`, id: `s${seatStatus.seatNo}`, part: `${seatStatus.isClosed ? 'ClosedSeat' : 'OpenSeat'} svg-container`, innerHTML: SeatSvg })))))))));
|
38
|
+
}
|
39
|
+
static get is() { return "casino-extrainfo-blackjack"; }
|
40
|
+
static get originalStyleUrls() { return {
|
41
|
+
"$": ["casino-extrainfo-blackjack.scss"]
|
42
|
+
}; }
|
43
|
+
static get styleUrls() { return {
|
44
|
+
"$": ["casino-extrainfo-blackjack.css"]
|
45
|
+
}; }
|
46
|
+
static get properties() { return {
|
47
|
+
"language": {
|
48
|
+
"type": "string",
|
49
|
+
"mutable": false,
|
50
|
+
"complexType": {
|
51
|
+
"original": "string",
|
52
|
+
"resolved": "string",
|
53
|
+
"references": {}
|
54
|
+
},
|
55
|
+
"required": false,
|
56
|
+
"optional": false,
|
57
|
+
"docs": {
|
58
|
+
"tags": [],
|
59
|
+
"text": "Text language to show"
|
60
|
+
},
|
61
|
+
"attribute": "language",
|
62
|
+
"reflect": false
|
63
|
+
}
|
64
|
+
}; }
|
65
|
+
static get states() { return {
|
66
|
+
"gameInfo": {},
|
67
|
+
"gameDetails": {},
|
68
|
+
"seatsStatus": {},
|
69
|
+
"isTableFull": {}
|
70
|
+
}; }
|
71
|
+
static get methods() { return {
|
72
|
+
"onGameLoaded": {
|
73
|
+
"complexType": {
|
74
|
+
"signature": "(gameInfo: CasinoGameThumbnailInfo) => Promise<void>",
|
75
|
+
"parameters": [{
|
76
|
+
"tags": [],
|
77
|
+
"text": ""
|
78
|
+
}],
|
79
|
+
"references": {
|
80
|
+
"Promise": {
|
81
|
+
"location": "global"
|
82
|
+
},
|
83
|
+
"CasinoGameThumbnailInfo": {
|
84
|
+
"location": "import",
|
85
|
+
"path": "../../models/casino-game-thumb-view"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"return": "Promise<void>"
|
89
|
+
},
|
90
|
+
"docs": {
|
91
|
+
"text": "",
|
92
|
+
"tags": []
|
93
|
+
}
|
94
|
+
},
|
95
|
+
"onGameDetailUpdated": {
|
96
|
+
"complexType": {
|
97
|
+
"signature": "(details: CasinoGameThumbnailDetails) => Promise<void>",
|
98
|
+
"parameters": [{
|
99
|
+
"tags": [],
|
100
|
+
"text": ""
|
101
|
+
}],
|
102
|
+
"references": {
|
103
|
+
"Promise": {
|
104
|
+
"location": "global"
|
105
|
+
},
|
106
|
+
"CasinoGameThumbnailDetails": {
|
107
|
+
"location": "import",
|
108
|
+
"path": "../../models/casino-game-thumb-view"
|
109
|
+
}
|
110
|
+
},
|
111
|
+
"return": "Promise<void>"
|
112
|
+
},
|
113
|
+
"docs": {
|
114
|
+
"text": "",
|
115
|
+
"tags": []
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}; }
|
119
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
:host {
|
2
|
+
display: block;
|
3
|
+
font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
4
|
+
}
|
5
|
+
|
6
|
+
.Blue {
|
7
|
+
color: #4d90a7;
|
8
|
+
}
|
9
|
+
|
10
|
+
.Red {
|
11
|
+
background-color: red;
|
12
|
+
}
|
13
|
+
|
14
|
+
.Black {
|
15
|
+
background-color: var(--emfe-w-color-black, #000000);
|
16
|
+
}
|
17
|
+
|
18
|
+
.Green {
|
19
|
+
background-color: #56A80A;
|
20
|
+
}
|
21
|
+
|
22
|
+
.White {
|
23
|
+
background-color: var(--emfe-w-color-white, #FFFFFF);
|
24
|
+
}
|
25
|
+
|
26
|
+
.Yellow {
|
27
|
+
background-color: #eeca3d;
|
28
|
+
}
|
29
|
+
|
30
|
+
.Gold {
|
31
|
+
background-color: #866d0c;
|
32
|
+
}
|
33
|
+
|
34
|
+
.Orange {
|
35
|
+
background-color: #574708;
|
36
|
+
}
|
37
|
+
|
38
|
+
.Purple {
|
39
|
+
background-color: #330033;
|
40
|
+
}
|