@everymatrix/casino-engagement-suite-tournament 1.44.0 → 1.45.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/index.esm.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-0f4e94ab.entry.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-1bf11325.js +2 -0
- package/dist/casino-engagement-suite-tournament/p-5df3ac81.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +119 -807
- package/dist/cjs/casino-engagement-suite-tournament-1b738bb2.js +560 -0
- package/dist/cjs/casino-engagement-suite-tournament.cjs.js +16 -10
- package/dist/cjs/index-16d5d7c3.js +1642 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +17 -17
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +492 -582
- package/dist/collection/components/casino-engagement-suite-tournament/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/shared/GradientRoundedButton.js +6 -7
- package/dist/collection/shared/renderBar.js +11 -11
- package/dist/collection/utils/api.apdater.js +30 -30
- package/dist/collection/utils/translations.js +19 -19
- package/dist/collection/utils/types.js +9 -9
- package/dist/collection/utils/util.date.js +26 -26
- package/dist/collection/utils/utils.js +16 -16
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +119 -807
- package/dist/esm/casino-engagement-suite-tournament-d8471680.js +558 -0
- package/dist/esm/casino-engagement-suite-tournament.js +13 -10
- package/dist/esm/index-3962add4.js +1612 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +6 -12
- package/dist/stencil.config.dev.js +14 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +120 -123
- package/dist/types/components/casino-engagement-suite-tournament/index.d.ts +1 -0
- package/dist/types/components.d.ts +17 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/GradientRoundedButton.d.ts +3 -3
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/api.apdater.d.ts +2 -30
- package/dist/types/utils/translations.d.ts +35 -35
- package/dist/types/utils/types.d.ts +77 -77
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/casino-engagement-suite-tournament/p-023f3dc7.entry.js +0 -1
- package/dist/casino-engagement-suite-tournament/p-86ce7485.js +0 -1
- package/dist/cjs/index-e778ddd2.js +0 -1733
- package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
- package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
- package/dist/components/casino-engagement-suite-tournament.d.ts +0 -11
- package/dist/components/casino-engagement-suite-tournament.js +0 -716
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-4e611d33.js +0 -1704
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-tournament/.stencil/packages/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
|
@@ -1,601 +1,511 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import {
|
|
3
|
-
import { TRANSLATIONS, Tab, localePostprocess } from
|
|
4
|
-
import { classnames } from
|
|
5
|
-
import { TournamentState, LeaderboardPage, DialogType, } from
|
|
6
|
-
import { GradientRoundedButton } from
|
|
7
|
-
import { iconBack, iconClose, iconReward, iconEyeClose, iconEyeOpen, iconQuestion, iconTrophy } from
|
|
8
|
-
import { CloseBar } from
|
|
9
|
-
import { addSeconds, formatDate, getDifference, getProgress } from
|
|
10
|
-
import { leaderboardsAdapter, tournamentAdapter } from
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
2
|
+
import { Fragment, h, Host } from "@stencil/core";
|
|
3
|
+
import { TRANSLATIONS, Tab, localePostprocess } from "../../utils/translations";
|
|
4
|
+
import { classnames } from "../../utils/utils";
|
|
5
|
+
import { TournamentState, LeaderboardPage, DialogType, } from "../../utils/types";
|
|
6
|
+
import { GradientRoundedButton } from "../../shared/GradientRoundedButton";
|
|
7
|
+
import { iconBack, iconClose, iconReward, iconEyeClose, iconEyeOpen, iconQuestion, iconTrophy } from "../../shared/icons";
|
|
8
|
+
import { CloseBar } from "../../shared/renderBar";
|
|
9
|
+
import { addSeconds, formatDate, getDifference, getProgress } from "../../utils/util.date";
|
|
10
|
+
import { leaderboardsAdapter, tournamentAdapter } from "../../utils/api.apdater";
|
|
11
|
+
import "../../../../../../svelte/general-animation-loading/es2015/general-animation-loading";
|
|
12
|
+
import "../../../../../general-styling-wrapper/dist/types/index";
|
|
13
|
+
import "../../../../../casino-engagement-suite-progress-bar/dist/types/index";
|
|
14
14
|
export class CasinoEngagementSuiteTournament {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.onClickBarInLayoutDialog = () => {
|
|
66
|
-
this.closeDialog();
|
|
67
|
-
};
|
|
68
|
-
this.onClickShowInfo = () => {
|
|
69
|
-
this.isShowInfo = !this.isShowInfo;
|
|
70
|
-
};
|
|
71
|
-
this.onClickBarTip = () => {
|
|
72
|
-
this.openDialog(DialogType.Tip);
|
|
73
|
-
};
|
|
74
|
-
this.onClickBarBack = () => {
|
|
75
|
-
this.setPage(LeaderboardPage.List);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
setTimeInterval() {
|
|
79
|
-
this.timeHolder = setInterval(() => {
|
|
80
|
-
if (this.tournamentList || this.tournamentItem) {
|
|
81
|
-
this.time += 1;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.onClickConfirmJoin = () => {
|
|
17
|
+
this.actionJoin(this.tournamentItem);
|
|
18
|
+
this.nextPage = LeaderboardPage.List;
|
|
19
|
+
};
|
|
20
|
+
this.onClickConfirmUnjoin = () => {
|
|
21
|
+
this.close.emit();
|
|
22
|
+
};
|
|
23
|
+
this.onClickDialogUnjoin = () => {
|
|
24
|
+
this.actionJoin(this.dialog.data);
|
|
25
|
+
this.closeDialog();
|
|
26
|
+
};
|
|
27
|
+
this.onClickDialogJoin = () => {
|
|
28
|
+
this.closeDialog();
|
|
29
|
+
};
|
|
30
|
+
this.onClickBarInLayout = () => {
|
|
31
|
+
this.close.emit();
|
|
32
|
+
};
|
|
33
|
+
this.onClickBarInLayoutDialog = () => {
|
|
34
|
+
this.closeDialog();
|
|
35
|
+
};
|
|
36
|
+
this.onClickShowInfo = () => {
|
|
37
|
+
this.isShowInfo = !this.isShowInfo;
|
|
38
|
+
};
|
|
39
|
+
this.onClickBarTip = () => {
|
|
40
|
+
this.openDialog(DialogType.Tip);
|
|
41
|
+
};
|
|
42
|
+
this.onClickBarBack = () => {
|
|
43
|
+
this.setPage(LeaderboardPage.List);
|
|
44
|
+
};
|
|
45
|
+
this.language = 'en';
|
|
46
|
+
this.clientStyling = '';
|
|
47
|
+
this.clientStylingUrl = '';
|
|
48
|
+
this.translationUrl = '';
|
|
49
|
+
this.leaderboardsInit = undefined;
|
|
50
|
+
this.tab = Tab.Info;
|
|
51
|
+
this.locale = TRANSLATIONS;
|
|
52
|
+
this.tournamentItem = undefined;
|
|
53
|
+
this.tournamentList = undefined;
|
|
54
|
+
this.leaderboards = [];
|
|
55
|
+
this.isActionJoinPending = false;
|
|
56
|
+
this.isDialogOpen = false;
|
|
57
|
+
this.isShowInfo = false;
|
|
58
|
+
this.page = LeaderboardPage.List;
|
|
59
|
+
this.tournamentInDialog = undefined;
|
|
60
|
+
this.dialog = {
|
|
61
|
+
isOpen: false,
|
|
62
|
+
type: undefined,
|
|
63
|
+
data: undefined,
|
|
64
|
+
};
|
|
84
65
|
this.time = 0;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.setPage(LeaderboardPage.Confirm, { tournament: tournamentAdapter(tournament) });
|
|
104
|
-
postMessage({ type: 'BarLeaderboardsClick' });
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
case 'UpdateTournamentsItemRes': {
|
|
108
|
-
const tournamentNew = tournamentAdapter(rest.data.item);
|
|
109
|
-
this.tournamentItem = tournamentNew;
|
|
110
|
-
this.updateTournamentListByItem(tournamentNew);
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
case 'UpdateLeaderboardsRes': {
|
|
114
|
-
this.leaderboards = leaderboardsAdapter(rest.data);
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
case 'JoinTournamentRes':
|
|
118
|
-
case 'UnjoinTournamentRes':
|
|
119
|
-
const { success } = rest;
|
|
120
|
-
if (success) {
|
|
121
|
-
this.tournamentItem = Object.assign(Object.assign({}, this.tournamentItem), { playerEnrolled: !!!this.tournamentItem.playerEnrolled });
|
|
122
|
-
switch (this.page) {
|
|
123
|
-
case LeaderboardPage.Item: {
|
|
124
|
-
break;
|
|
66
|
+
}
|
|
67
|
+
setTimeInterval() {
|
|
68
|
+
this.timeHolder = setInterval(() => {
|
|
69
|
+
if (this.tournamentList || this.tournamentItem) {
|
|
70
|
+
this.time += 1;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.time = 0;
|
|
74
|
+
}
|
|
75
|
+
}, 1000);
|
|
76
|
+
}
|
|
77
|
+
updateTournamentListByItem(tournament) {
|
|
78
|
+
this.tournamentList = this.tournamentList.map((_tournament) => {
|
|
79
|
+
if (_tournament.id === tournament.id) {
|
|
80
|
+
return tournamentAdapter(tournament);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return _tournament;
|
|
125
84
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
handleEvent(e) {
|
|
88
|
+
const _a = e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
89
|
+
switch (type) {
|
|
90
|
+
case 'ShowLeaderboardRewardModal': {
|
|
91
|
+
const { tournament } = rest;
|
|
92
|
+
this.setPage(LeaderboardPage.Confirm, { tournament: tournamentAdapter(tournament) });
|
|
93
|
+
postMessage({ type: 'BarLeaderboardsClick' });
|
|
94
|
+
break;
|
|
129
95
|
}
|
|
130
|
-
|
|
96
|
+
case 'UpdateTournamentsItemRes': {
|
|
97
|
+
const tournamentNew = tournamentAdapter(rest.data.item);
|
|
98
|
+
this.tournamentItem = tournamentNew;
|
|
99
|
+
this.updateTournamentListByItem(tournamentNew);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case 'UpdateLeaderboardsRes': {
|
|
103
|
+
this.leaderboards = leaderboardsAdapter(rest.data);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case 'JoinTournamentRes':
|
|
107
|
+
case 'UnjoinTournamentRes':
|
|
108
|
+
const { success } = rest;
|
|
109
|
+
if (success) {
|
|
110
|
+
this.tournamentItem = Object.assign(Object.assign({}, this.tournamentItem), { playerEnrolled: !!!this.tournamentItem.playerEnrolled });
|
|
111
|
+
switch (this.page) {
|
|
112
|
+
case LeaderboardPage.Item: {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case LeaderboardPage.List: {
|
|
116
|
+
this.updateTournamentListByItem(this.tournamentItem);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (this.nextPage) {
|
|
122
|
+
this.setPage(this.nextPage);
|
|
123
|
+
this.nextPage = undefined;
|
|
124
|
+
}
|
|
125
|
+
this.isActionJoinPending = false;
|
|
126
|
+
break;
|
|
131
127
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
}
|
|
129
|
+
get messageSender() {
|
|
130
|
+
return {
|
|
131
|
+
JoinTournamentReq: (tournament) => { var _a; return window.postMessage({ type: 'JoinTournamentReq', bonusCode: (_a = tournament.wallets[0]) === null || _a === void 0 ? void 0 : _a.code }); },
|
|
132
|
+
UnjoinTournamentReq: (tournament) => window.postMessage({ type: 'UnjoinTournamentReq', id: tournament.id }),
|
|
133
|
+
UpdateTournamentsItemReq: (tournament) => window.postMessage({ type: 'UpdateTournamentsItemReq', id: tournament.id }),
|
|
134
|
+
UpdateLeaderboardsReq: (tournament) => window.postMessage({ type: 'UpdateLeaderboardsReq', id: tournament.id }),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
connectedCallback() {
|
|
138
|
+
this.setTimeInterval();
|
|
139
|
+
}
|
|
140
|
+
disconnectedCallback() {
|
|
141
|
+
clearInterval(this.timeHolder);
|
|
142
|
+
}
|
|
143
|
+
actionJoin(tournament) {
|
|
144
|
+
if (this.isActionJoinPending)
|
|
145
|
+
return;
|
|
146
|
+
this.isActionJoinPending = true;
|
|
147
|
+
try {
|
|
148
|
+
if (tournament.playerEnrolled) {
|
|
149
|
+
this.messageSender.UnjoinTournamentReq(tournament);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
this.messageSender.JoinTournamentReq(tournament);
|
|
153
|
+
}
|
|
135
154
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (
|
|
183
|
-
|
|
155
|
+
catch (e) {
|
|
156
|
+
console.log('error', e);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
isTournamentClosed(tournament) {
|
|
161
|
+
return [
|
|
162
|
+
TournamentState.Closed,
|
|
163
|
+
TournamentState.Closing
|
|
164
|
+
].includes(tournament.state);
|
|
165
|
+
}
|
|
166
|
+
setPage(page, metaData) {
|
|
167
|
+
switch (page) {
|
|
168
|
+
case LeaderboardPage.Confirm:
|
|
169
|
+
case LeaderboardPage.Item:
|
|
170
|
+
this.tournamentItem = metaData.tournament;
|
|
171
|
+
if (!this.tournamentItem) {
|
|
172
|
+
this.messageSender.UpdateTournamentsItemReq(metaData.tournament);
|
|
173
|
+
}
|
|
174
|
+
if (this.isTournamentClosed(this.tournamentItem)) {
|
|
175
|
+
this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);
|
|
176
|
+
}
|
|
177
|
+
break;
|
|
178
|
+
case LeaderboardPage.List:
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
this.tab = Tab.Info;
|
|
182
|
+
this.page = page;
|
|
183
|
+
}
|
|
184
|
+
renderPage() {
|
|
185
|
+
switch (this.page) {
|
|
186
|
+
case LeaderboardPage.Confirm: return this.renderPageConfirm();
|
|
187
|
+
case LeaderboardPage.Item: return this.renderPageLeaderboardItem();
|
|
188
|
+
case LeaderboardPage.List: return this.renderPageLeaderboardList();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
render() {
|
|
192
|
+
return (h(Host, { key: '07ebdb6c71a03be84b430e18a80417323a9cd3cc' }, h("general-styling-wrapper", { key: 'ac0134009a6bfcdb4b79816138ea441a8415b953', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
|
|
193
|
+
// @ts-ignore
|
|
194
|
+
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderPage()));
|
|
195
|
+
}
|
|
196
|
+
onClickListItemChangePage(tournament) {
|
|
197
|
+
this.setPage(LeaderboardPage.Item, { tournament });
|
|
198
|
+
}
|
|
199
|
+
onClickItemJoin(tournament, e) {
|
|
200
|
+
e.stopPropagation();
|
|
201
|
+
if (tournament.playerEnrolled) {
|
|
202
|
+
this.openDialog(DialogType.Unjoin, tournament);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.actionJoin(tournament);
|
|
206
|
+
this.tournamentItem = tournament;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
onClickTab(tab) {
|
|
210
|
+
this.tab = tab;
|
|
211
|
+
switch (tab) {
|
|
212
|
+
case Tab.Leaderboard:
|
|
213
|
+
this.leaderboards = undefined;
|
|
214
|
+
this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);
|
|
215
|
+
break;
|
|
216
|
+
case Tab.Games:
|
|
217
|
+
this.messageSender.UpdateTournamentsItemReq(this.tournamentItem);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
renderPageLeaderboardList() {
|
|
222
|
+
var _a;
|
|
223
|
+
if (!this.tournamentList) {
|
|
224
|
+
this.tournamentList = (_a = this.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map(item => tournamentAdapter(item));
|
|
225
|
+
return h("general-animation-loading", null);
|
|
226
|
+
}
|
|
227
|
+
const { locale } = this;
|
|
228
|
+
if (this.tournamentList.length) {
|
|
229
|
+
return this.renderLeaderboardContainer(h(Fragment, null, h("div", { class: "Leaderboards Row" }, this.tournamentList.map(_tournament => (h("div", { class: classnames("LeaderboardsItem", _tournament.playerEnrolled ? ' GradientRounded Hollow' : ''), onClick: this.onClickListItemChangePage.bind(this, _tournament) }, h("div", { class: "LeaderboardsItemContainer" }, this.renderTitleContainer(_tournament), this.renderTimeBar(_tournament))))))));
|
|
184
230
|
}
|
|
185
|
-
|
|
186
|
-
|
|
231
|
+
else {
|
|
232
|
+
return (h("div", { class: "NoLeaderboards Row" }, h("div", null, locale.NoLeaderboards), h("div", null, locale.NoLeaderboardsTip)));
|
|
187
233
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
switch (this.page) {
|
|
197
|
-
case LeaderboardPage.Confirm: return this.renderPageConfirm();
|
|
198
|
-
case LeaderboardPage.Item: return this.renderPageLeaderboardItem();
|
|
199
|
-
case LeaderboardPage.List: return this.renderPageLeaderboardList();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
render() {
|
|
203
|
-
return (h(Host, null,
|
|
204
|
-
h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
|
|
205
|
-
// @ts-ignore
|
|
206
|
-
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }),
|
|
207
|
-
this.renderPage()));
|
|
208
|
-
}
|
|
209
|
-
onClickListItemChangePage(tournament) {
|
|
210
|
-
this.setPage(LeaderboardPage.Item, { tournament });
|
|
211
|
-
}
|
|
212
|
-
onClickItemJoin(tournament, e) {
|
|
213
|
-
e.stopPropagation();
|
|
214
|
-
if (tournament.playerEnrolled) {
|
|
215
|
-
this.openDialog(DialogType.Unjoin, tournament);
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
this.actionJoin(tournament);
|
|
219
|
-
this.tournamentItem = tournament;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
onClickTab(tab) {
|
|
223
|
-
this.tab = tab;
|
|
224
|
-
switch (tab) {
|
|
225
|
-
case Tab.Leaderboard:
|
|
226
|
-
this.leaderboards = undefined;
|
|
227
|
-
this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);
|
|
228
|
-
break;
|
|
229
|
-
case Tab.Games:
|
|
230
|
-
this.messageSender.UpdateTournamentsItemReq(this.tournamentItem);
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
renderPageLeaderboardList() {
|
|
235
|
-
var _a;
|
|
236
|
-
if (!this.tournamentList) {
|
|
237
|
-
this.tournamentList = (_a = this.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map(item => tournamentAdapter(item));
|
|
238
|
-
return h("general-animation-loading", null);
|
|
239
|
-
}
|
|
240
|
-
const { locale } = this;
|
|
241
|
-
if (this.tournamentList.length) {
|
|
242
|
-
return this.renderLeaderboardContainer(h(Fragment, null,
|
|
243
|
-
h("div", { class: "Leaderboards Row" }, this.tournamentList.map(_tournament => (h("div", { class: classnames("LeaderboardsItem", _tournament.playerEnrolled ? ' GradientRounded Hollow' : ''), onClick: this.onClickListItemChangePage.bind(this, _tournament) },
|
|
244
|
-
h("div", { class: "LeaderboardsItemContainer" },
|
|
245
|
-
this.renderTitleContainer(_tournament),
|
|
246
|
-
this.renderTimeBar(_tournament))))))));
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
return (h("div", { class: "NoLeaderboards Row" },
|
|
250
|
-
h("div", null, locale.NoLeaderboards),
|
|
251
|
-
h("div", null, locale.NoLeaderboardsTip)));
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
renderPageConfirm() {
|
|
255
|
-
if (!this.tournamentItem)
|
|
256
|
-
return h("general-animation-loading", null);
|
|
257
|
-
const tournamentName = this.tournamentItem.nameOrTitle;
|
|
258
|
-
const { locale } = this;
|
|
259
|
-
return (h("div", { class: "PageConfirmContainer" },
|
|
260
|
-
h("div", { class: "GradientRounded Hollow PageConfirm" },
|
|
261
|
-
h("div", null, iconTrophy),
|
|
262
|
-
h("div", { class: "Title" }, locale.JoinDialog.Tile),
|
|
263
|
-
h("div", { class: "Description", innerHTML: localePostprocess(locale.JoinDialog.Description, { tournamentName }) }),
|
|
264
|
-
h("div", { class: "PageConfirmButtonsGroup" },
|
|
265
|
-
h(GradientRoundedButton, Object.assign({}, {
|
|
266
|
-
statedClasses: {
|
|
267
|
-
isPending: this.isActionJoinPending,
|
|
234
|
+
}
|
|
235
|
+
renderPageConfirm() {
|
|
236
|
+
if (!this.tournamentItem)
|
|
237
|
+
return h("general-animation-loading", null);
|
|
238
|
+
const tournamentName = this.tournamentItem.nameOrTitle;
|
|
239
|
+
const { locale } = this;
|
|
240
|
+
return (h("div", { class: "PageConfirmContainer" }, h("div", { class: "GradientRounded Hollow PageConfirm" }, h("div", null, iconTrophy), h("div", { class: "Title" }, locale.JoinDialog.Tile), h("div", { class: "Description", innerHTML: localePostprocess(locale.JoinDialog.Description, { tournamentName }) }), h("div", { class: "PageConfirmButtonsGroup" }, h(GradientRoundedButton, { statedClasses: {
|
|
241
|
+
isPending: this.isActionJoinPending,
|
|
268
242
|
},
|
|
269
243
|
onClick: this.onClickConfirmJoin,
|
|
270
|
-
innerHTML: locale.JoinDialog.ButtonYes,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
statedClasses: {
|
|
274
|
-
isPending: this.isActionJoinPending,
|
|
275
|
-
isHollow: true,
|
|
244
|
+
innerHTML: locale.JoinDialog.ButtonYes }), h(GradientRoundedButton, { statedClasses: {
|
|
245
|
+
isPending: this.isActionJoinPending,
|
|
246
|
+
isHollow: true,
|
|
276
247
|
},
|
|
277
248
|
onClick: this.onClickConfirmUnjoin,
|
|
278
|
-
innerHTML: locale.JoinDialog.ButtonNo
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
onClick: this.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
": ",
|
|
392
|
-
h("span", null, tournament.scoreCriteria)),
|
|
393
|
-
h("div", null,
|
|
394
|
-
locale.MinimumBetCriteria,
|
|
395
|
-
": ",
|
|
396
|
-
h("span", null, tournament.minBetCount))),
|
|
397
|
-
h("div", { class: "TC" },
|
|
398
|
-
h("a", { href: tournament.termsUrl, target: '_blank' }, locale.TC)))),
|
|
399
|
-
this.isTournamentClosed(this.tournamentItem) && ((_a = this.leaderboards) === null || _a === void 0 ? void 0 : _a.find(l => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, this.getResultPrize((_b = this.leaderboards) === null || _b === void 0 ? void 0 : _b.find(l => l.isMe))) })),
|
|
400
|
-
h("section", { class: "Prizes" },
|
|
401
|
-
h("div", { class: "PrizesHeader" },
|
|
402
|
-
iconReward,
|
|
403
|
-
h("span", { class: "PrizesText" }, locale.Prizes)),
|
|
404
|
-
tournament.prizes.map((prize, index) => (h("div", { class: "Prize" },
|
|
405
|
-
index + 1,
|
|
406
|
-
" ",
|
|
407
|
-
locale.Place,
|
|
408
|
-
": ",
|
|
409
|
-
h("span", { class: "PrizeText" }, prize.name)))))));
|
|
410
|
-
}
|
|
411
|
-
getResultPrize(leaderboard) {
|
|
412
|
-
return {
|
|
413
|
-
prize: leaderboard.prizeName,
|
|
414
|
-
place: leaderboard.rank,
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
renderCloseBarInLayout() {
|
|
418
|
-
const { left, middle } = this.getWrapperBarData();
|
|
419
|
-
return (h(CloseBar, Object.assign({}, { left, middle,
|
|
420
|
-
right: (h("span", Object.assign({}, { onClick: this.onClickBarInLayout }), iconClose))
|
|
421
|
-
})));
|
|
422
|
-
}
|
|
423
|
-
renderCloseBarInLayoutDialog() {
|
|
424
|
-
return (h(CloseBar, Object.assign({}, {
|
|
425
|
-
right: (h("span", Object.assign({}, { onClick: this.onClickBarInLayoutDialog }), iconClose))
|
|
426
|
-
})));
|
|
427
|
-
}
|
|
428
|
-
renderLeaderboardContainer(render) {
|
|
429
|
-
const { dialog: { isOpen } } = this;
|
|
430
|
-
return (h("div", { class: "Wrapper" },
|
|
431
|
-
h("div", { class: classnames("WrapperContent", { faded: isOpen }) },
|
|
432
|
-
this.renderCloseBarInLayout(),
|
|
433
|
-
h("div", { class: "Root" },
|
|
434
|
-
h("div", { class: "Main" }, render))),
|
|
435
|
-
h("div", { class: "WrapperUtil" },
|
|
436
|
-
h("dialog", { open: isOpen },
|
|
437
|
-
h("div", null,
|
|
438
|
-
this.renderCloseBarInLayoutDialog(),
|
|
439
|
-
isOpen && this.renderDialogContent())))));
|
|
440
|
-
}
|
|
441
|
-
getWrapperBarData() {
|
|
442
|
-
const { page, locale } = this;
|
|
443
|
-
switch (page) {
|
|
444
|
-
case LeaderboardPage.List:
|
|
249
|
+
innerHTML: locale.JoinDialog.ButtonNo })))));
|
|
250
|
+
}
|
|
251
|
+
renderPageLeaderboardItem() {
|
|
252
|
+
if (!this.tournamentItem)
|
|
253
|
+
return h("general-animation-loading", null);
|
|
254
|
+
return this.renderLeaderboardContainer(h(Fragment, null, this.renderTitleContainer(this.tournamentItem), this.renderTabs(), this.renderTabbedContent()));
|
|
255
|
+
}
|
|
256
|
+
renderDialogContent() {
|
|
257
|
+
switch (this.dialog.type) {
|
|
258
|
+
case DialogType.Unjoin:
|
|
259
|
+
return this.renderDialogContentUnjoin();
|
|
260
|
+
case DialogType.Tip:
|
|
261
|
+
return (h("div", { class: "Tip" }, this.locale.Tip));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
renderDialogContentUnjoin() {
|
|
265
|
+
const { locale } = this;
|
|
266
|
+
return (h("div", { class: "DialogContentUnjoin" }, h("div", { class: "DialogContentUnjoinTitle" }, locale.UnjoinDialog.Title), h("div", { class: "DialogContentUnjoinDescription", innerHTML: locale.UnjoinDialog.Description }), h(GradientRoundedButton, { statedClasses: {
|
|
267
|
+
isPending: this.isActionJoinPending,
|
|
268
|
+
},
|
|
269
|
+
onClick: this.onClickDialogUnjoin,
|
|
270
|
+
innerHTML: locale.UnjoinDialog.ButtonYes }), h(GradientRoundedButton, { statedClasses: {
|
|
271
|
+
isHollow: true,
|
|
272
|
+
isPending: this.isActionJoinPending,
|
|
273
|
+
},
|
|
274
|
+
onClick: this.onClickDialogJoin,
|
|
275
|
+
innerHTML: locale.UnjoinDialog.ButtonNo })));
|
|
276
|
+
}
|
|
277
|
+
renderTitleContainer(tournament) {
|
|
278
|
+
const { locale } = this;
|
|
279
|
+
return (h("div", { class: "TitleContainer" }, h("div", { class: "Title" }, tournament.nameOrTitle), tournament.state !== TournamentState.Closed && (h("div", null, h(GradientRoundedButton, { statedClasses: {
|
|
280
|
+
isHollow: tournament.playerEnrolled,
|
|
281
|
+
isPending: this.isActionJoinPending,
|
|
282
|
+
},
|
|
283
|
+
onClick: this.onClickItemJoin.bind(this, tournament),
|
|
284
|
+
innerHTML: tournament.playerEnrolled ? locale.Unjoin : locale.Join })))));
|
|
285
|
+
}
|
|
286
|
+
renderTabbedContent() {
|
|
287
|
+
switch (this.tab) {
|
|
288
|
+
case Tab.Info: return this.renderInfo();
|
|
289
|
+
case Tab.Leaderboard: return this.renderLeaderboard();
|
|
290
|
+
case Tab.Games: return this.renderGames();
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
renderGames() {
|
|
294
|
+
var _a;
|
|
295
|
+
return (h("div", { class: "Games" }, (_a = this.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map(game => (h("div", null, h("img", { src: game.defaultThumbnail, alt: "" }))))));
|
|
296
|
+
}
|
|
297
|
+
renderLeaderboard() {
|
|
298
|
+
if (!this.leaderboards)
|
|
299
|
+
return h("general-animation-loading", null);
|
|
300
|
+
if (!this.leaderboards.length)
|
|
301
|
+
return '';
|
|
302
|
+
return (h("table", { class: "Leaderboards" }, this.leaderboards.map(leaderboard => (h("tr", { class: classnames({ isMe: leaderboard.isMe }) }, h("td", { class: "LeaderboardRank" }, h("span", null, leaderboard.rank)), h("td", { class: "LeaderboardName" }, leaderboard.shortName), h("td", { class: "LeaderboardScore" }, leaderboard.score), h("td", { class: "LeaderboardPrize" }, leaderboard.prizeName))))));
|
|
303
|
+
}
|
|
304
|
+
renderTabs() {
|
|
305
|
+
const { locale, tab } = this;
|
|
306
|
+
return (h("div", { class: "TabsContainer" }, h("div", { class: "Tabs" }, Object.keys(Tab).map((_tab) => (h("div", { class: classnames({ active: tab === _tab }),
|
|
307
|
+
onClick: this.onClickTab.bind(this, _tab) }, locale[_tab]))))));
|
|
308
|
+
}
|
|
309
|
+
renderTimeBar(tournament) {
|
|
310
|
+
return (h("section", { class: "TimeContainer" }, h("div", { class: 'Time' }, tournament.playerEnrolled ? (h(Fragment, null, h("div", null, getDifference(addSeconds(tournament.startTime, this.time), tournament.endTime)), h("div", null, h(GradientRoundedButton, { statedClasses: {
|
|
311
|
+
isHollow: true,
|
|
312
|
+
isPendding: false,
|
|
313
|
+
}, innerHTML: `${getProgress(tournament.startTime, tournament.endTime)}%` })))) : (h(Fragment, null, h("div", null, formatDate(tournament.startTime)), h("div", null, formatDate(tournament.endTime))))), h("casino-engagement-suite-progress-bar", { value: Number(getProgress(tournament.startTime, tournament.endTime)), "hide-percent": true })));
|
|
314
|
+
}
|
|
315
|
+
renderInfo() {
|
|
316
|
+
var _a, _b;
|
|
317
|
+
const { locale, tournamentItem: tournament, isShowInfo } = this;
|
|
318
|
+
return (h("div", { class: "InfoContainer" }, this.renderTimeBar(tournament), (h("section", { class: "ShowInfo", onClick: this.onClickShowInfo }, h("p", null, h("span", null, isShowInfo ? iconEyeClose : iconEyeOpen), h("span", null, locale.LeaderboardDetails)))), isShowInfo && (h("section", { class: "Info" }, h("div", null, tournament.description), h("div", { class: "Criterias" }, h("div", null, locale.ScoreCriteria, ": ", h("span", null, tournament.scoreCriteria)), h("div", null, locale.MinimumBetCriteria, ": ", h("span", null, tournament.minBetCount))), h("div", { class: "TC" }, h("a", { href: tournament.termsUrl, target: '_blank' }, locale.TC)))), this.isTournamentClosed(this.tournamentItem) && ((_a = this.leaderboards) === null || _a === void 0 ? void 0 : _a.find(l => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, this.getResultPrize((_b = this.leaderboards) === null || _b === void 0 ? void 0 : _b.find(l => l.isMe))) })), h("section", { class: "Prizes" }, h("div", { class: "PrizesHeader" }, iconReward, h("span", { class: "PrizesText" }, locale.Prizes)), tournament.prizes.map((prize, index) => (h("div", { class: "Prize" }, index + 1, " ", locale.Place, ": ", h("span", { class: "PrizeText" }, prize.name)))))));
|
|
319
|
+
}
|
|
320
|
+
getResultPrize(leaderboard) {
|
|
321
|
+
return {
|
|
322
|
+
prize: leaderboard.prizeName,
|
|
323
|
+
place: leaderboard.rank,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
renderCloseBarInLayout() {
|
|
327
|
+
const { left, middle } = this.getWrapperBarData();
|
|
328
|
+
return (h(CloseBar, { left, middle,
|
|
329
|
+
right: (h("span", { onClick: this.onClickBarInLayout }, iconClose)) }));
|
|
330
|
+
}
|
|
331
|
+
renderCloseBarInLayoutDialog() {
|
|
332
|
+
return (h(CloseBar, { right: (h("span", { onClick: this.onClickBarInLayoutDialog }, iconClose)) }));
|
|
333
|
+
}
|
|
334
|
+
renderLeaderboardContainer(render) {
|
|
335
|
+
const { dialog: { isOpen } } = this;
|
|
336
|
+
return (h("div", { class: "Wrapper" }, h("div", { class: classnames("WrapperContent", { faded: isOpen }) }, this.renderCloseBarInLayout(), h("div", { class: "Root" }, h("div", { class: "Main" }, render))), h("div", { class: "WrapperUtil" }, h("dialog", { open: isOpen }, h("div", null, this.renderCloseBarInLayoutDialog(), isOpen && this.renderDialogContent())))));
|
|
337
|
+
}
|
|
338
|
+
getWrapperBarData() {
|
|
339
|
+
const { page, locale } = this;
|
|
340
|
+
switch (page) {
|
|
341
|
+
case LeaderboardPage.List:
|
|
342
|
+
return {
|
|
343
|
+
left: h("span", { onClick: this.onClickBarTip }, iconQuestion),
|
|
344
|
+
middle: locale.Leaderboards
|
|
345
|
+
};
|
|
346
|
+
case LeaderboardPage.Item:
|
|
347
|
+
return {
|
|
348
|
+
left: (h("span", { onClick: this.onClickBarBack }, iconBack)),
|
|
349
|
+
middle: '',
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
openDialog(type, data = undefined) {
|
|
354
|
+
this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, type, data });
|
|
355
|
+
}
|
|
356
|
+
closeDialog() {
|
|
357
|
+
this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: false });
|
|
358
|
+
}
|
|
359
|
+
static get is() { return "casino-engagement-suite-tournament"; }
|
|
360
|
+
static get encapsulation() { return "shadow"; }
|
|
361
|
+
static get originalStyleUrls() {
|
|
445
362
|
return {
|
|
446
|
-
|
|
447
|
-
middle: locale.Leaderboards
|
|
363
|
+
"$": ["casino-engagement-suite-tournament.scss"]
|
|
448
364
|
};
|
|
449
|
-
|
|
365
|
+
}
|
|
366
|
+
static get styleUrls() {
|
|
450
367
|
return {
|
|
451
|
-
|
|
452
|
-
middle: '',
|
|
368
|
+
"$": ["casino-engagement-suite-tournament.css"]
|
|
453
369
|
};
|
|
454
370
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
"name": "message",
|
|
596
|
-
"method": "handleEvent",
|
|
597
|
-
"target": "window",
|
|
598
|
-
"capture": false,
|
|
599
|
-
"passive": false
|
|
600
|
-
}]; }
|
|
371
|
+
static get properties() {
|
|
372
|
+
return {
|
|
373
|
+
"language": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"mutable": false,
|
|
376
|
+
"complexType": {
|
|
377
|
+
"original": "string",
|
|
378
|
+
"resolved": "string",
|
|
379
|
+
"references": {}
|
|
380
|
+
},
|
|
381
|
+
"required": false,
|
|
382
|
+
"optional": false,
|
|
383
|
+
"docs": {
|
|
384
|
+
"tags": [],
|
|
385
|
+
"text": "Language"
|
|
386
|
+
},
|
|
387
|
+
"attribute": "language",
|
|
388
|
+
"reflect": false,
|
|
389
|
+
"defaultValue": "'en'"
|
|
390
|
+
},
|
|
391
|
+
"clientStyling": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"mutable": false,
|
|
394
|
+
"complexType": {
|
|
395
|
+
"original": "string",
|
|
396
|
+
"resolved": "string",
|
|
397
|
+
"references": {}
|
|
398
|
+
},
|
|
399
|
+
"required": false,
|
|
400
|
+
"optional": false,
|
|
401
|
+
"docs": {
|
|
402
|
+
"tags": [],
|
|
403
|
+
"text": "Client custom styling via string"
|
|
404
|
+
},
|
|
405
|
+
"attribute": "client-styling",
|
|
406
|
+
"reflect": true,
|
|
407
|
+
"defaultValue": "''"
|
|
408
|
+
},
|
|
409
|
+
"clientStylingUrl": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"mutable": false,
|
|
412
|
+
"complexType": {
|
|
413
|
+
"original": "string",
|
|
414
|
+
"resolved": "string",
|
|
415
|
+
"references": {}
|
|
416
|
+
},
|
|
417
|
+
"required": false,
|
|
418
|
+
"optional": false,
|
|
419
|
+
"docs": {
|
|
420
|
+
"tags": [],
|
|
421
|
+
"text": "Client custom styling via url"
|
|
422
|
+
},
|
|
423
|
+
"attribute": "client-styling-url",
|
|
424
|
+
"reflect": true,
|
|
425
|
+
"defaultValue": "''"
|
|
426
|
+
},
|
|
427
|
+
"translationUrl": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"mutable": false,
|
|
430
|
+
"complexType": {
|
|
431
|
+
"original": "string",
|
|
432
|
+
"resolved": "string",
|
|
433
|
+
"references": {}
|
|
434
|
+
},
|
|
435
|
+
"required": false,
|
|
436
|
+
"optional": false,
|
|
437
|
+
"docs": {
|
|
438
|
+
"tags": [],
|
|
439
|
+
"text": "Translation via url"
|
|
440
|
+
},
|
|
441
|
+
"attribute": "translation-url",
|
|
442
|
+
"reflect": true,
|
|
443
|
+
"defaultValue": "''"
|
|
444
|
+
},
|
|
445
|
+
"leaderboardsInit": {
|
|
446
|
+
"type": "unknown",
|
|
447
|
+
"mutable": false,
|
|
448
|
+
"complexType": {
|
|
449
|
+
"original": "TournamentApi[]",
|
|
450
|
+
"resolved": "TournamentApi[]",
|
|
451
|
+
"references": {
|
|
452
|
+
"TournamentApi": {
|
|
453
|
+
"location": "import",
|
|
454
|
+
"path": "../../utils/types",
|
|
455
|
+
"id": "../../../../packages/stencil/casino-engagement-suite-tournament/src/utils/types.ts::TournamentApi"
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"required": false,
|
|
460
|
+
"optional": false,
|
|
461
|
+
"docs": {
|
|
462
|
+
"tags": [],
|
|
463
|
+
"text": "Raw Leaderboards from API for Init"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
static get states() {
|
|
469
|
+
return {
|
|
470
|
+
"tab": {},
|
|
471
|
+
"locale": {},
|
|
472
|
+
"tournamentItem": {},
|
|
473
|
+
"tournamentList": {},
|
|
474
|
+
"leaderboards": {},
|
|
475
|
+
"isActionJoinPending": {},
|
|
476
|
+
"isDialogOpen": {},
|
|
477
|
+
"isShowInfo": {},
|
|
478
|
+
"page": {},
|
|
479
|
+
"tournamentInDialog": {},
|
|
480
|
+
"dialog": {},
|
|
481
|
+
"time": {}
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
static get events() {
|
|
485
|
+
return [{
|
|
486
|
+
"method": "close",
|
|
487
|
+
"name": "close",
|
|
488
|
+
"bubbles": true,
|
|
489
|
+
"cancelable": true,
|
|
490
|
+
"composed": true,
|
|
491
|
+
"docs": {
|
|
492
|
+
"tags": [],
|
|
493
|
+
"text": ""
|
|
494
|
+
},
|
|
495
|
+
"complexType": {
|
|
496
|
+
"original": "void",
|
|
497
|
+
"resolved": "void",
|
|
498
|
+
"references": {}
|
|
499
|
+
}
|
|
500
|
+
}];
|
|
501
|
+
}
|
|
502
|
+
static get listeners() {
|
|
503
|
+
return [{
|
|
504
|
+
"name": "message",
|
|
505
|
+
"method": "handleEvent",
|
|
506
|
+
"target": "window",
|
|
507
|
+
"capture": false,
|
|
508
|
+
"passive": false
|
|
509
|
+
}];
|
|
510
|
+
}
|
|
601
511
|
}
|