@everymatrix/casino-engagement-suite-tournament 1.60.1 → 1.60.2
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 -1
- package/dist/casino-engagement-suite-tournament/{p-7dd52ef4.js → p-a9e7f099.js} +2 -2
- package/dist/casino-engagement-suite-tournament/{p-10e1f844.entry.js → p-b582ab53.entry.js} +1 -1
- package/dist/casino-engagement-suite-tournament/p-e7ecbdf5.js +15 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +2 -2
- package/dist/cjs/{casino-engagement-suite-tournament-9276045b.js → casino-engagement-suite-tournament-0a51ec72.js} +54 -33
- package/dist/cjs/casino-engagement-suite-tournament.cjs.js +2 -2
- package/dist/cjs/{index-9b5a5304.js → index-3539ab09.js} +4 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +55 -6
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +12 -6
- package/dist/collection/shared/renders.dialog.js +2 -2
- package/dist/collection/shared/renders.page.js +8 -6
- package/dist/collection/shared/renders.tab.js +1 -1
- package/dist/collection/utils/message.js +28 -17
- package/dist/collection/utils/translations.js +1 -1
- package/dist/collection/utils/types.js +1 -0
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +2 -2
- package/dist/esm/{casino-engagement-suite-tournament-e9186545.js → casino-engagement-suite-tournament-8680a674.js} +54 -33
- package/dist/esm/casino-engagement-suite-tournament.js +3 -3
- package/dist/esm/{index-e8e1e68e.js → index-ecf4f553.js} +4 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- 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 +13 -8
- package/dist/types/utils/api.apdater.d.ts +3 -1
- package/dist/types/utils/bussiness.d.ts +3 -1
- package/dist/types/utils/message.d.ts +2 -1
- package/dist/types/utils/translations.d.ts +2 -0
- package/dist/types/utils/types.d.ts +20 -2
- package/package.json +1 -1
- package/dist/casino-engagement-suite-tournament/p-94a5935e.js +0 -15
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
.
|
|
1
|
+
.Leaderboards {
|
|
2
2
|
height: 100%;
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.Wrapper {
|
|
3
7
|
position: relative;
|
|
4
8
|
color: var(--emw--color-typography, #FFFFFF);
|
|
5
9
|
display: flex;
|
|
6
10
|
background-color: var(--emw--color-background, hsl(254, 44%, 15%));
|
|
7
11
|
flex-direction: column;
|
|
8
12
|
border-radius: 24px;
|
|
9
|
-
overflow-y: auto;
|
|
10
13
|
}
|
|
11
14
|
.Wrapper.Mobile {
|
|
12
15
|
border-radius: 16px;
|
|
@@ -62,11 +65,19 @@
|
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
.LeaderboardsItem {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
transition: 1s opacity ease;
|
|
65
70
|
position: relative;
|
|
66
71
|
margin: 10px 0;
|
|
67
72
|
border: 1px solid rgb(64, 57, 86);
|
|
68
73
|
border-radius: 16px;
|
|
69
74
|
}
|
|
75
|
+
.LeaderboardsItem.Unjoined {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
margin: 0;
|
|
78
|
+
border: 0 none;
|
|
79
|
+
animation: slideOut 1s forwards;
|
|
80
|
+
}
|
|
70
81
|
.LeaderboardsItem.Hollow {
|
|
71
82
|
border-color: transparent;
|
|
72
83
|
}
|
|
@@ -338,24 +349,37 @@
|
|
|
338
349
|
.Games {
|
|
339
350
|
margin: 24px 0;
|
|
340
351
|
padding: 0 20px;
|
|
352
|
+
padding: 0 20px;
|
|
341
353
|
display: flex;
|
|
342
354
|
flex-wrap: wrap;
|
|
343
|
-
justify-content:
|
|
344
|
-
|
|
355
|
+
justify-content: start;
|
|
356
|
+
margin: 20px auto;
|
|
357
|
+
}
|
|
358
|
+
.Games .Game {
|
|
359
|
+
cursor: pointer;
|
|
360
|
+
width: 25%;
|
|
361
|
+
display: flex;
|
|
362
|
+
padding: 5px;
|
|
363
|
+
}
|
|
364
|
+
.Games .Game:hover {
|
|
365
|
+
filter: brightness(var(--emw--hover-brightness, 1.25));
|
|
345
366
|
}
|
|
346
367
|
.Games img {
|
|
347
|
-
width:
|
|
368
|
+
width: 100%;
|
|
369
|
+
height: fit-content;
|
|
348
370
|
}
|
|
349
371
|
|
|
350
372
|
dialog {
|
|
351
373
|
position: absolute;
|
|
352
374
|
top: 30px;
|
|
353
375
|
width: 100%;
|
|
354
|
-
height:
|
|
376
|
+
height: max-content;
|
|
355
377
|
background: transparent;
|
|
356
378
|
border: 0;
|
|
357
379
|
padding: 0;
|
|
358
380
|
color: var(--emw--color-typography, #FFFFFF);
|
|
381
|
+
transition: all 0.2s;
|
|
382
|
+
transition-timing-function: ease-in-out;
|
|
359
383
|
}
|
|
360
384
|
dialog > div {
|
|
361
385
|
margin: 32px;
|
|
@@ -392,6 +416,10 @@ dialog > div {
|
|
|
392
416
|
color: var(--emw--color-secondary, rgb(187, 185, 195));
|
|
393
417
|
font-size: var(--emw--font-size-small, 14px);
|
|
394
418
|
}
|
|
419
|
+
.Tip.Error {
|
|
420
|
+
color: var(--emw--color-error, var(--emw--color-red, #ed0909));
|
|
421
|
+
font-weight: var(--emw--font-weight-normal, 500);
|
|
422
|
+
}
|
|
395
423
|
|
|
396
424
|
.PageConfirmContainer {
|
|
397
425
|
text-align: center;
|
|
@@ -483,4 +511,25 @@ dialog > div {
|
|
|
483
511
|
|
|
484
512
|
.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer {
|
|
485
513
|
margin-bottom: 16px;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
@keyframes slideOut {
|
|
517
|
+
0% {
|
|
518
|
+
display: block;
|
|
519
|
+
opacity: 1;
|
|
520
|
+
height: max-content;
|
|
521
|
+
}
|
|
522
|
+
50% {
|
|
523
|
+
display: block;
|
|
524
|
+
opacity: 0.5;
|
|
525
|
+
}
|
|
526
|
+
80% {
|
|
527
|
+
display: none;
|
|
528
|
+
opacity: 0;
|
|
529
|
+
}
|
|
530
|
+
100% {
|
|
531
|
+
display: none;
|
|
532
|
+
opacity: 0;
|
|
533
|
+
height: 0;
|
|
534
|
+
}
|
|
486
535
|
}
|
|
@@ -74,6 +74,11 @@ export class CasinoEngagementSuiteTournament {
|
|
|
74
74
|
this.removeLabel('win');
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
componentDidLoad() {
|
|
78
|
+
this.pageElement.addEventListener('scroll', (event) => {
|
|
79
|
+
this.containerScrollTop = event.target.scrollTop + window.innerHeight / 2 - 400;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
77
82
|
connectedCallback() {
|
|
78
83
|
this.setTimeInterval();
|
|
79
84
|
messageSender.UpdateLeaderboardsPlayerReq();
|
|
@@ -81,10 +86,13 @@ export class CasinoEngagementSuiteTournament {
|
|
|
81
86
|
disconnectedCallback() {
|
|
82
87
|
clearInterval(this.timeHolder);
|
|
83
88
|
}
|
|
89
|
+
onGameClick(game) {
|
|
90
|
+
messageSender.GameClickReq(game);
|
|
91
|
+
}
|
|
84
92
|
actionJoin(tournament) {
|
|
85
|
-
if (
|
|
93
|
+
if (tournament.isActionJoinPending)
|
|
86
94
|
return;
|
|
87
|
-
|
|
95
|
+
tournament.isActionJoinPending = true;
|
|
88
96
|
try {
|
|
89
97
|
if (tournament.isPlayerAcknowledged) {
|
|
90
98
|
messageSender.UnjoinTournamentReq(tournament);
|
|
@@ -112,9 +120,9 @@ export class CasinoEngagementSuiteTournament {
|
|
|
112
120
|
this.page = page;
|
|
113
121
|
}
|
|
114
122
|
render() {
|
|
115
|
-
return (h(Host, { key: '
|
|
123
|
+
return (h(Host, { key: '6ccc0ea805f77b2753cbb06f27953f8d6ae250e1' }, h("general-styling-wrapper", { key: '29be4b2eb25061f496844922c2d250d2d9967297', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
|
|
116
124
|
// @ts-ignore
|
|
117
|
-
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renders.page[this.page]()));
|
|
125
|
+
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { key: '2e7ab6c379e74abcc01635051a2621944733cb1c', class: 'Leaderboards', ref: el => this.pageElement = el }, this.renders.page[this.page]())));
|
|
118
126
|
}
|
|
119
127
|
openDialog(type, data = undefined, onClose = undefined) {
|
|
120
128
|
this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, onClose,
|
|
@@ -141,7 +149,6 @@ export class CasinoEngagementSuiteTournament {
|
|
|
141
149
|
this.tournamentItem = undefined;
|
|
142
150
|
this.tournamentList = undefined;
|
|
143
151
|
this.leaderboards = [];
|
|
144
|
-
this.isActionJoinPending = false;
|
|
145
152
|
this.isDialogOpen = false;
|
|
146
153
|
this.isShowInfo = false;
|
|
147
154
|
this.page = LeaderboardPage.list;
|
|
@@ -315,7 +322,6 @@ export class CasinoEngagementSuiteTournament {
|
|
|
315
322
|
"tournamentItem": {},
|
|
316
323
|
"tournamentList": {},
|
|
317
324
|
"leaderboards": {},
|
|
318
|
-
"isActionJoinPending": {},
|
|
319
325
|
"isDialogOpen": {},
|
|
320
326
|
"isShowInfo": {},
|
|
321
327
|
"page": {},
|
|
@@ -8,7 +8,7 @@ var GradientButton;
|
|
|
8
8
|
GradientButton["unjoinYes"] = "unjoinYes";
|
|
9
9
|
GradientButton["unjoinNo"] = "unjoinNo";
|
|
10
10
|
})(GradientButton || (GradientButton = {}));
|
|
11
|
-
const renderButton = (instance, buttonType) => {
|
|
11
|
+
const renderButton = (instance, buttonType, isActionJoinPending = false) => {
|
|
12
12
|
const { locale } = instance;
|
|
13
13
|
const buttonCollector = {
|
|
14
14
|
normal: {
|
|
@@ -27,7 +27,7 @@ const renderButton = (instance, buttonType) => {
|
|
|
27
27
|
};
|
|
28
28
|
const props = buttonCollector[buttonType];
|
|
29
29
|
return renderGradientRoundedButton({
|
|
30
|
-
statedClasses: Object.assign({ isPending:
|
|
30
|
+
statedClasses: Object.assign({ isPending: isActionJoinPending }, props.statedClasses),
|
|
31
31
|
onClick: () => {
|
|
32
32
|
var _a;
|
|
33
33
|
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call();
|
|
@@ -11,7 +11,7 @@ import { messageSender } from "../utils/message";
|
|
|
11
11
|
export const page = {
|
|
12
12
|
list(instance) {
|
|
13
13
|
var _a;
|
|
14
|
-
if (!instance.tournamentList) {
|
|
14
|
+
if (!(instance === null || instance === void 0 ? void 0 : instance.tournamentList)) {
|
|
15
15
|
instance.tournamentList = (_a = instance.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map((item) => tournamentAdapter(item));
|
|
16
16
|
return h("general-animation-loading", null);
|
|
17
17
|
}
|
|
@@ -21,7 +21,7 @@ export const page = {
|
|
|
21
21
|
instance.setPage(LeaderboardPage.item, { tournament });
|
|
22
22
|
instance.newIdList = instance.newIdList.filter((id) => id !== tournament.id);
|
|
23
23
|
};
|
|
24
|
-
return renderLeaderboardContainer(instance, h("div", { class: "Leaderboards Row" }, instance.tournamentList.map((_tournament) => (h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : ''), onClick: () => onClickListItemChangePage(_tournament) }, h("div", { class: "LeaderboardsItemContainer" }, renderTitleContainer(instance, _tournament), renderTimeBar(_tournament)), h("div", { class: "LeaderboardLabels" }, instance.newIdList.includes(_tournament.id) && (h("div", { class: "LeaderboardLabel" }, h("span", null, "new")))))))));
|
|
24
|
+
return renderLeaderboardContainer(instance, h("div", { class: "Leaderboards Row" }, instance.tournamentList.map((_tournament) => (h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : '', _tournament.isUnjoined ? 'Unjoined' : ''), onClick: () => onClickListItemChangePage(_tournament) }, h("div", { class: "LeaderboardsItemContainer" }, renderTitleContainer(instance, _tournament), renderTimeBar(_tournament)), h("div", { class: "LeaderboardLabels" }, instance.newIdList.includes(_tournament.id) && (h("div", { class: "LeaderboardLabel" }, h("span", null, "new")))))))));
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
return renderLeaderboardContainer(instance, h("div", { class: "NoLeaderboards Row" }, h("div", null, locale.NoLeaderboards), h("div", null, locale.NoLeaderboardsTip)));
|
|
@@ -68,11 +68,11 @@ const renderTitleContainer = (instance, tournament) => {
|
|
|
68
68
|
return (h("div", { class: "TitleContainer" }, h("div", { class: "Title" }, tournament.nameOrTitle), tournament.state !== TournamentState.Closed && (h("div", null, renderGradientRoundedButton({
|
|
69
69
|
statedClasses: {
|
|
70
70
|
isHollow: tournament.isPlayerAcknowledged,
|
|
71
|
-
isPending:
|
|
71
|
+
isPending: tournament.isActionJoinPending
|
|
72
72
|
},
|
|
73
73
|
onClick: (e) => {
|
|
74
74
|
e.stopPropagation();
|
|
75
|
-
if (!
|
|
75
|
+
if (!tournament.isActionJoinPending) {
|
|
76
76
|
onClickItemJoin(tournament);
|
|
77
77
|
}
|
|
78
78
|
},
|
|
@@ -87,9 +87,11 @@ const renderLeaderboardContainer = (instance, render) => {
|
|
|
87
87
|
const renderDialogContent = () => {
|
|
88
88
|
switch (instance.dialog.type) {
|
|
89
89
|
case DialogType.unjoin:
|
|
90
|
-
return instance.renders.dialog.unjoin();
|
|
90
|
+
return instance.renders.dialog.unjoin();
|
|
91
91
|
case DialogType.tip:
|
|
92
92
|
return h("div", { class: "Tip" }, instance.locale.Tip);
|
|
93
|
+
case DialogType.error:
|
|
94
|
+
return h("div", { class: "Tip Error" }, instance.locale.FailedToJoin);
|
|
93
95
|
case DialogType.gift:
|
|
94
96
|
return instance.renders.dialog.gift();
|
|
95
97
|
}
|
|
@@ -117,5 +119,5 @@ const renderLeaderboardContainer = (instance, render) => {
|
|
|
117
119
|
right: h("span", { onClick: () => instance.close.emit() }, iconClose)
|
|
118
120
|
});
|
|
119
121
|
};
|
|
120
|
-
return (h("div", { class: `Wrapper ${instance.device}` }, h("div", { class: classnames('WrapperContent', { faded: isOpen }) }, renderCloseBarInLayout(), h("div", { class: "Root" }, h("div", { class: "Main" }, render))), h("div", { class: "WrapperUtil" }, h("dialog", { open: isOpen }, h("div", { class: "GradientRounded Hollow" }, renderBar, isOpen && renderDialogContent())))));
|
|
122
|
+
return (h("div", { class: `Wrapper ${instance.device}` }, h("div", { class: classnames('WrapperContent', { faded: isOpen }) }, renderCloseBarInLayout(), h("div", { class: "Root" }, h("div", { class: "Main" }, render))), h("div", { class: "WrapperUtil" }, h("dialog", { open: isOpen, style: { 'top': instance.containerScrollTop + 'px' } }, h("div", { class: "GradientRounded Hollow" }, renderBar, isOpen && renderDialogContent())))));
|
|
121
123
|
};
|
|
@@ -26,7 +26,7 @@ export const tab = {
|
|
|
26
26
|
},
|
|
27
27
|
games(instance) {
|
|
28
28
|
var _a;
|
|
29
|
-
return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div",
|
|
29
|
+
return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div", { class: 'Game', onClick: () => { instance.onGameClick(game); } }, h("img", { src: game.defaultThumbnail, alt: "" }))))));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
const getResultPrize = (leaderboard) => {
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { leaderboardsAdapter, tournamentAdapter } from "./api.apdater";
|
|
2
2
|
import { getMaxRankStr } from "./bussiness";
|
|
3
|
-
import {
|
|
3
|
+
import { DialogType } from "./types";
|
|
4
4
|
export const messageSender = {
|
|
5
5
|
UpdateSuiteBarState: (labels) => window.postMessage({ type: 'UpdateLeaderboardState', labels }),
|
|
6
|
-
JoinTournamentReq: (tournament) => {
|
|
6
|
+
JoinTournamentReq: (tournament) => {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
return window.postMessage({
|
|
9
|
+
type: 'JoinTournamentReq',
|
|
10
|
+
id: tournament.id,
|
|
11
|
+
bonusCode: tournament.id || ((_b = (_a = tournament.wallets) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.code)
|
|
12
|
+
});
|
|
13
|
+
},
|
|
7
14
|
UnjoinTournamentReq: (tournament) => window.postMessage({ type: 'UnjoinTournamentReq', id: tournament.id }),
|
|
8
15
|
UpdateTournamentsItemReq: (tournament) => window.postMessage({ type: 'UpdateTournamentsItemReq', id: tournament.id }),
|
|
9
16
|
UpdateLeaderboardsReq: (tournament, query) => window.postMessage({ type: 'UpdateLeaderboardsReq', id: tournament.id, query }),
|
|
10
|
-
UpdateLeaderboardsPlayerReq: () => window.postMessage({ type: 'UpdateLeaderboardsPlayerReq' })
|
|
17
|
+
UpdateLeaderboardsPlayerReq: () => window.postMessage({ type: 'UpdateLeaderboardsPlayerReq' }),
|
|
18
|
+
GameClickReq: (game) => window.postMessage({ type: 'GameClickedReq', game }),
|
|
11
19
|
};
|
|
12
20
|
export const messageReceiver = (instance) => {
|
|
13
21
|
const receiver = {
|
|
@@ -27,7 +35,9 @@ export const messageReceiver = (instance) => {
|
|
|
27
35
|
instance.leaderboards = leaderboardsAdapter(rest.data);
|
|
28
36
|
},
|
|
29
37
|
JoinTournamentRes: (rest) => commonJoinRes(instance, rest),
|
|
30
|
-
UnjoinTournamentRes: (rest) =>
|
|
38
|
+
UnjoinTournamentRes: (rest) => {
|
|
39
|
+
commonJoinRes(instance, rest);
|
|
40
|
+
},
|
|
31
41
|
// listen to LeaderboardLiveEvent event, handle update
|
|
32
42
|
LeaderboardLiveEvent: (rest) => {
|
|
33
43
|
handleLeaderboardLiveEvent(instance, rest);
|
|
@@ -109,25 +119,26 @@ const handleLeaderboardLiveEvent = (instance, rest) => {
|
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
};
|
|
122
|
+
const showErrorMessage = (instance, type) => {
|
|
123
|
+
instance.dialog = Object.assign(Object.assign({}, instance.dialog), { isOpen: true, type });
|
|
124
|
+
};
|
|
112
125
|
const commonJoinRes = (instance, rest) => {
|
|
113
|
-
const { success } = rest;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
updateTournamentListByItem(instance, instance.tournamentItem);
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
126
|
+
const { success, data } = rest;
|
|
127
|
+
let tournamentIdx = instance.tournamentList.findIndex((tournament) => tournament.id === (data.id || data.bonusCode)), current = instance.tournamentList[tournamentIdx];
|
|
128
|
+
current.isActionJoinPending = false;
|
|
129
|
+
if (!success) {
|
|
130
|
+
instance.tournamentList[tournamentIdx] = current;
|
|
131
|
+
instance.tournamentList = [...instance.tournamentList];
|
|
132
|
+
showErrorMessage(instance, DialogType.error);
|
|
133
|
+
return;
|
|
125
134
|
}
|
|
135
|
+
current = Object.assign(Object.assign({}, current), { isUnjoined: current.isPlayerAcknowledged ? true : false, isPlayerAcknowledged: !!!current.isPlayerAcknowledged });
|
|
136
|
+
instance.tournamentList[tournamentIdx] = current;
|
|
137
|
+
instance.tournamentList = [...instance.tournamentList];
|
|
126
138
|
if (instance.nextPage) {
|
|
127
139
|
instance.setPage(instance.nextPage);
|
|
128
140
|
instance.nextPage = undefined;
|
|
129
141
|
}
|
|
130
|
-
instance.isActionJoinPending = false;
|
|
131
142
|
};
|
|
132
143
|
const updateTournamentListByItem = (instance, tournament) => {
|
|
133
144
|
instance.tournamentList = instance.tournamentList.map((_tournament) => {
|
|
@@ -24,4 +24,4 @@ export const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'J
|
|
|
24
24
|
Tile: 'Congratulations!',
|
|
25
25
|
Description: 'You won <span>{tournamentName}</span>!',
|
|
26
26
|
ButtonContinue: 'Continue'
|
|
27
|
-
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.', TournamentNotStarted: 'The leaderboard is not started yet. <br> It will start in {startTime}.', BeOne: 'No winners for the time being. Be one of them!' });
|
|
27
|
+
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.', TournamentNotStarted: 'The leaderboard is not started yet. <br> It will start in {startTime}.', BeOne: 'No winners for the time being. Be one of them!', FailedToJoin: 'Oops! some unexpected error happened, please try it again.', FailedToUnjoin: 'Oops! some unexpected error happened, please try it again.' });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
2
|
-
export { C as casino_engagement_suite_tournament } from './casino-engagement-suite-tournament-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-ecf4f553.js';
|
|
2
|
+
export { C as casino_engagement_suite_tournament } from './casino-engagement-suite-tournament-8680a674.js';
|
|
3
3
|
import '@everymatrix/general-animation-loading/dist';
|
|
4
4
|
|
|
5
5
|
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, H as Host, r as registerInstance, c as createEvent } from './index-
|
|
1
|
+
import { h, H as Host, r as registerInstance, c as createEvent } from './index-ecf4f553.js';
|
|
2
2
|
import '@everymatrix/general-animation-loading/dist';
|
|
3
3
|
|
|
4
4
|
/*! *****************************************************************************
|
|
@@ -54,7 +54,7 @@ const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'Join', U
|
|
|
54
54
|
Tile: 'Congratulations!',
|
|
55
55
|
Description: 'You won <span>{tournamentName}</span>!',
|
|
56
56
|
ButtonContinue: 'Continue'
|
|
57
|
-
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.', TournamentNotStarted: 'The leaderboard is not started yet. <br> It will start in {startTime}.', BeOne: 'No winners for the time being. Be one of them!' });
|
|
57
|
+
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.', TournamentNotStarted: 'The leaderboard is not started yet. <br> It will start in {startTime}.', BeOne: 'No winners for the time being. Be one of them!', FailedToJoin: 'Oops! some unexpected error happened, please try it again.', FailedToUnjoin: 'Oops! some unexpected error happened, please try it again.' });
|
|
58
58
|
|
|
59
59
|
const classnames = (...args) => {
|
|
60
60
|
let classnameArray = [];
|
|
@@ -124,6 +124,7 @@ var DialogType;
|
|
|
124
124
|
DialogType["unjoin"] = "unjoin";
|
|
125
125
|
DialogType["tip"] = "tip";
|
|
126
126
|
DialogType["gift"] = "gift";
|
|
127
|
+
DialogType["error"] = "error";
|
|
127
128
|
})(DialogType || (DialogType = {}));
|
|
128
129
|
|
|
129
130
|
const getMaxRankStr = (list) => {
|
|
@@ -178,7 +179,7 @@ var GradientButton;
|
|
|
178
179
|
GradientButton["unjoinYes"] = "unjoinYes";
|
|
179
180
|
GradientButton["unjoinNo"] = "unjoinNo";
|
|
180
181
|
})(GradientButton || (GradientButton = {}));
|
|
181
|
-
const renderButton = (instance, buttonType) => {
|
|
182
|
+
const renderButton = (instance, buttonType, isActionJoinPending = false) => {
|
|
182
183
|
const { locale } = instance;
|
|
183
184
|
const buttonCollector = {
|
|
184
185
|
normal: {
|
|
@@ -197,7 +198,7 @@ const renderButton = (instance, buttonType) => {
|
|
|
197
198
|
};
|
|
198
199
|
const props = buttonCollector[buttonType];
|
|
199
200
|
return renderGradientRoundedButton({
|
|
200
|
-
statedClasses: Object.assign({ isPending:
|
|
201
|
+
statedClasses: Object.assign({ isPending: isActionJoinPending }, props.statedClasses),
|
|
201
202
|
onClick: () => {
|
|
202
203
|
var _a;
|
|
203
204
|
(_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call();
|
|
@@ -318,11 +319,19 @@ const renderTimeBar = (tournament) => {
|
|
|
318
319
|
|
|
319
320
|
const messageSender = {
|
|
320
321
|
UpdateSuiteBarState: (labels) => window.postMessage({ type: 'UpdateLeaderboardState', labels }),
|
|
321
|
-
JoinTournamentReq: (tournament) => {
|
|
322
|
+
JoinTournamentReq: (tournament) => {
|
|
323
|
+
var _a, _b;
|
|
324
|
+
return window.postMessage({
|
|
325
|
+
type: 'JoinTournamentReq',
|
|
326
|
+
id: tournament.id,
|
|
327
|
+
bonusCode: tournament.id || ((_b = (_a = tournament.wallets) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.code)
|
|
328
|
+
});
|
|
329
|
+
},
|
|
322
330
|
UnjoinTournamentReq: (tournament) => window.postMessage({ type: 'UnjoinTournamentReq', id: tournament.id }),
|
|
323
331
|
UpdateTournamentsItemReq: (tournament) => window.postMessage({ type: 'UpdateTournamentsItemReq', id: tournament.id }),
|
|
324
332
|
UpdateLeaderboardsReq: (tournament, query) => window.postMessage({ type: 'UpdateLeaderboardsReq', id: tournament.id, query }),
|
|
325
|
-
UpdateLeaderboardsPlayerReq: () => window.postMessage({ type: 'UpdateLeaderboardsPlayerReq' })
|
|
333
|
+
UpdateLeaderboardsPlayerReq: () => window.postMessage({ type: 'UpdateLeaderboardsPlayerReq' }),
|
|
334
|
+
GameClickReq: (game) => window.postMessage({ type: 'GameClickedReq', game }),
|
|
326
335
|
};
|
|
327
336
|
const messageReceiver = (instance) => {
|
|
328
337
|
const receiver = {
|
|
@@ -342,7 +351,9 @@ const messageReceiver = (instance) => {
|
|
|
342
351
|
instance.leaderboards = leaderboardsAdapter(rest.data);
|
|
343
352
|
},
|
|
344
353
|
JoinTournamentRes: (rest) => commonJoinRes(instance, rest),
|
|
345
|
-
UnjoinTournamentRes: (rest) =>
|
|
354
|
+
UnjoinTournamentRes: (rest) => {
|
|
355
|
+
commonJoinRes(instance, rest);
|
|
356
|
+
},
|
|
346
357
|
// listen to LeaderboardLiveEvent event, handle update
|
|
347
358
|
LeaderboardLiveEvent: (rest) => {
|
|
348
359
|
handleLeaderboardLiveEvent(instance, rest);
|
|
@@ -424,25 +435,26 @@ const handleLeaderboardLiveEvent = (instance, rest) => {
|
|
|
424
435
|
}
|
|
425
436
|
}
|
|
426
437
|
};
|
|
438
|
+
const showErrorMessage = (instance, type) => {
|
|
439
|
+
instance.dialog = Object.assign(Object.assign({}, instance.dialog), { isOpen: true, type });
|
|
440
|
+
};
|
|
427
441
|
const commonJoinRes = (instance, rest) => {
|
|
428
|
-
const { success } = rest;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
updateTournamentListByItem(instance, instance.tournamentItem);
|
|
437
|
-
break;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
442
|
+
const { success, data } = rest;
|
|
443
|
+
let tournamentIdx = instance.tournamentList.findIndex((tournament) => tournament.id === (data.id || data.bonusCode)), current = instance.tournamentList[tournamentIdx];
|
|
444
|
+
current.isActionJoinPending = false;
|
|
445
|
+
if (!success) {
|
|
446
|
+
instance.tournamentList[tournamentIdx] = current;
|
|
447
|
+
instance.tournamentList = [...instance.tournamentList];
|
|
448
|
+
showErrorMessage(instance, DialogType.error);
|
|
449
|
+
return;
|
|
440
450
|
}
|
|
451
|
+
current = Object.assign(Object.assign({}, current), { isUnjoined: current.isPlayerAcknowledged ? true : false, isPlayerAcknowledged: !!!current.isPlayerAcknowledged });
|
|
452
|
+
instance.tournamentList[tournamentIdx] = current;
|
|
453
|
+
instance.tournamentList = [...instance.tournamentList];
|
|
441
454
|
if (instance.nextPage) {
|
|
442
455
|
instance.setPage(instance.nextPage);
|
|
443
456
|
instance.nextPage = undefined;
|
|
444
457
|
}
|
|
445
|
-
instance.isActionJoinPending = false;
|
|
446
458
|
};
|
|
447
459
|
const updateTournamentListByItem = (instance, tournament) => {
|
|
448
460
|
instance.tournamentList = instance.tournamentList.map((_tournament) => {
|
|
@@ -470,7 +482,7 @@ const updateOrAddTournamentToList = (instance, tournament) => {
|
|
|
470
482
|
const page = {
|
|
471
483
|
list(instance) {
|
|
472
484
|
var _a;
|
|
473
|
-
if (!instance.tournamentList) {
|
|
485
|
+
if (!(instance === null || instance === void 0 ? void 0 : instance.tournamentList)) {
|
|
474
486
|
instance.tournamentList = (_a = instance.leaderboardsInit) === null || _a === void 0 ? void 0 : _a.map((item) => tournamentAdapter(item));
|
|
475
487
|
return h("general-animation-loading", null);
|
|
476
488
|
}
|
|
@@ -480,7 +492,7 @@ const page = {
|
|
|
480
492
|
instance.setPage(LeaderboardPage.item, { tournament });
|
|
481
493
|
instance.newIdList = instance.newIdList.filter((id) => id !== tournament.id);
|
|
482
494
|
};
|
|
483
|
-
return renderLeaderboardContainer(instance, h("div", { class: "Leaderboards Row" }, instance.tournamentList.map((_tournament) => (h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : ''), onClick: () => onClickListItemChangePage(_tournament) },
|
|
495
|
+
return renderLeaderboardContainer(instance, h("div", { class: "Leaderboards Row" }, instance.tournamentList.map((_tournament) => (h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : '', _tournament.isUnjoined ? 'Unjoined' : ''), onClick: () => onClickListItemChangePage(_tournament) },
|
|
484
496
|
h("div", { class: "LeaderboardsItemContainer" },
|
|
485
497
|
renderTitleContainer(instance, _tournament),
|
|
486
498
|
renderTimeBar(_tournament)),
|
|
@@ -537,11 +549,11 @@ const renderTitleContainer = (instance, tournament) => {
|
|
|
537
549
|
tournament.state !== TournamentState.Closed && (h("div", null, renderGradientRoundedButton({
|
|
538
550
|
statedClasses: {
|
|
539
551
|
isHollow: tournament.isPlayerAcknowledged,
|
|
540
|
-
isPending:
|
|
552
|
+
isPending: tournament.isActionJoinPending
|
|
541
553
|
},
|
|
542
554
|
onClick: (e) => {
|
|
543
555
|
e.stopPropagation();
|
|
544
|
-
if (!
|
|
556
|
+
if (!tournament.isActionJoinPending) {
|
|
545
557
|
onClickItemJoin(tournament);
|
|
546
558
|
}
|
|
547
559
|
},
|
|
@@ -556,9 +568,11 @@ const renderLeaderboardContainer = (instance, render) => {
|
|
|
556
568
|
const renderDialogContent = () => {
|
|
557
569
|
switch (instance.dialog.type) {
|
|
558
570
|
case DialogType.unjoin:
|
|
559
|
-
return instance.renders.dialog.unjoin();
|
|
571
|
+
return instance.renders.dialog.unjoin();
|
|
560
572
|
case DialogType.tip:
|
|
561
573
|
return h("div", { class: "Tip" }, instance.locale.Tip);
|
|
574
|
+
case DialogType.error:
|
|
575
|
+
return h("div", { class: "Tip Error" }, instance.locale.FailedToJoin);
|
|
562
576
|
case DialogType.gift:
|
|
563
577
|
return instance.renders.dialog.gift();
|
|
564
578
|
}
|
|
@@ -592,7 +606,7 @@ const renderLeaderboardContainer = (instance, render) => {
|
|
|
592
606
|
h("div", { class: "Root" },
|
|
593
607
|
h("div", { class: "Main" }, render))),
|
|
594
608
|
h("div", { class: "WrapperUtil" },
|
|
595
|
-
h("dialog", { open: isOpen },
|
|
609
|
+
h("dialog", { open: isOpen, style: { 'top': instance.containerScrollTop + 'px' } },
|
|
596
610
|
h("div", { class: "GradientRounded Hollow" },
|
|
597
611
|
renderBar,
|
|
598
612
|
isOpen && renderDialogContent())))));
|
|
@@ -654,7 +668,7 @@ const tab = {
|
|
|
654
668
|
},
|
|
655
669
|
games(instance) {
|
|
656
670
|
var _a;
|
|
657
|
-
return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div",
|
|
671
|
+
return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div", { class: 'Game', onClick: () => { instance.onGameClick(game); } },
|
|
658
672
|
h("img", { src: game.defaultThumbnail, alt: "" }))))));
|
|
659
673
|
}
|
|
660
674
|
};
|
|
@@ -671,7 +685,7 @@ const renders = {
|
|
|
671
685
|
tab
|
|
672
686
|
};
|
|
673
687
|
|
|
674
|
-
const casinoEngagementSuiteTournamentCss = ".
|
|
688
|
+
const casinoEngagementSuiteTournamentCss = ".Leaderboards{height:100%;overflow-y:auto}.Wrapper{position:relative;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:24px}.Wrapper.Mobile{border-radius:16px}.WrapperContent{padding-bottom:20px;transition:0.5s filter}.WrapperContent.faded{filter:brightness(53.3333333333%)}.Wrapper.Mobile .WrapperBar{padding:20px 8px 8px;margin-bottom:8px}.WrapperBar{display:flex;width:100%;padding:32px 20px 20px;margin-bottom:20px}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);line-height:16px;font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 12px);font-family:Inter}.Row{margin:24px 0;padding:0 20px}.Row:first-child{margin:0}.LeaderboardsItem{opacity:1;transition:1s opacity ease;position:relative;margin:10px 0;border:1px solid rgb(64, 57, 86);border-radius:16px}.LeaderboardsItem.Unjoined{opacity:0;margin:0;border:0 none;animation:slideOut 1s forwards}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.Info{margin:24px 0;padding:0 20px}.TimeContainer{margin:24px 0;padding:0 20px}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 12px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 12px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.ShowInfo{margin:24px 0;padding:0 20px;cursor:pointer;color:rgb(102, 97, 120)}.ShowInfo p{display:flex;gap:4px}.TitleContainer{display:flex;justify-content:space-between;margin:24px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat}.TitleContainer .GradientRoundedButton{width:120px}.TabsContainer{margin:24px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 12px);margin-bottom:-1px}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:12px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:12px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:24px 0;padding:0 20px}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.ContentScrollContainer{flex:1;display:flex;flex-direction:column;overflow-y:auto;position:relative;height:auto}.ContentScrollContainer.expanded{height:100%;max-height:100%}.PrizesContainer{flex:1;display:flex;flex-direction:column;min-height:100px;max-height:calc(100% - 20px)}.PrizesHeader{align-items:center;display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));padding:5px 0;z-index:1;margin:0 20px}.PrizesHeader img{width:12px}.PrizesHeader .PrizesText{margin-left:3px;font-weight:600}.Prizes{margin:24px 0;padding:0 20px;flex:1;overflow-y:auto;margin-bottom:0;padding-right:10px;max-height:300px;margin-top:10px}.Prizes::-webkit-scrollbar{width:4px}.Prizes::-webkit-scrollbar-track{background:rgba(0, 0, 0, 0.1);border-radius:2px}.Prizes::-webkit-scrollbar-thumb{background:var(--emw--color-primary, rgb(255, 214, 47));border-radius:2px}.Prizes .Prize{margin:8px 0}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer section.Info{margin-bottom:12px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards td{opacity:0.6;padding:20px 5px}.Leaderboards td:first-child{padding-left:20px}.Leaderboards td:last-child{padding-right:20px}.Leaderboards .LeaderboardName{color:var(--emw--color-typography, #FFF);opacity:1}.Leaderboards tr.isMe{background:rgba(0, 0, 0, 0.2)}.Leaderboards tr.isMe .LeaderboardRank span{padding:0px 3px;opacity:1;border:1px solid var(--emw--color-primary, rgb(255, 214, 47));border-radius:11px}.Leaderboards tr.isMe td{color:#FFD029;font-weight:var(--emw--font-weight-semibold, 500)}.LeaderboardLabels{position:absolute;top:-6px;right:18px;display:flex;gap:4px}.LeaderboardLabel{width:30px;height:15px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-3x-small, 7px);line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.LeaderboardUnstarted{margin:24px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:24px 0;padding:0 20px;padding:0 20px;display:flex;flex-wrap:wrap;justify-content:start;margin:20px auto}.Games .Game{cursor:pointer;width:25%;display:flex;padding:5px}.Games .Game:hover{filter:brightness(var(--emw--hover-brightness, 1.25))}.Games img{width:100%;height:fit-content}dialog{position:absolute;top:30px;width:100%;height:max-content;background:transparent;border:0;padding:0;color:var(--emw--color-typography, #FFFFFF);transition:all 0.2s;transition-timing-function:ease-in-out}dialog>div{margin:32px;border-radius:8px;background:var(--emw--color-background, hsl(254, 44%, 15%));border:1px solid hsl(254, 20%, 28%);align-items:center}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;flex-direction:column}.DialogContentUnjoinTitle{font-family:Montserrat;font-size:var(--emw--font-size-large, 20px);font-weight:600;line-height:24.38px;text-align:center}.DialogContentUnjoinDescription{color:var(--emw--color-secondary, rgb(187, 185, 195));margin-bottom:30px}.Tip{padding:32px;padding-top:10px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.Tip.Error{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-weight:var(--emw--font-weight-normal, 500)}.PageConfirmContainer{text-align:center;width:80%;margin:0 auto}.PageConfirm{padding:40px 32px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 20px);text-align:center}.PageConfirm .Description{color:var(--emw--color-secondary, rgb(187, 185, 195));font-weight:400}.PageConfirm .Description span{color:var(--emw--color-typography, #FFF);font-weight:600}.PageConfirmButtonsGroup{width:150px;margin:0 auto;display:flex;flex-direction:column;gap:10px}.GradientRounded{display:block;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:rgb(30, 22, 56);position:relative;border-radius:16px}.GradientRounded.Hollow{background:rgb(30, 22, 56);color:#FFFFFF}.GradientRounded.Hollow::before{content:\"\";position:absolute;inset:0;border-radius:15px;border:1px solid transparent;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;-webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude}.GradientRoundedButton{border:none;padding:7px;height:32px;width:100%;font-size:var(--emw--font-size-small, 14px);font-weight:700;line-height:17.07px;text-align:center;transition:0.5s opacity;cursor:pointer}.GradientRoundedButton.Pending{cursor:not-allowed;opacity:0.3}.GradientRoundedButton.Hollow span{background:-webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.WrapperUtil .GradientRounded .WrapperBar{margin-bottom:0;padding-bottom:0}.WrapperUtil .GradientRounded .Tip{padding-top:0;padding-bottom:40px}.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer{margin-bottom:16px}@keyframes slideOut{0%{display:block;opacity:1;height:max-content}50%{display:block;opacity:0.5}80%{display:none;opacity:0}100%{display:none;opacity:0;height:0}}";
|
|
675
689
|
const CasinoEngagementSuiteTournamentStyle0 = casinoEngagementSuiteTournamentCss;
|
|
676
690
|
|
|
677
691
|
const CasinoEngagementSuiteTournament = class {
|
|
@@ -739,6 +753,11 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
739
753
|
this.removeLabel('win');
|
|
740
754
|
}
|
|
741
755
|
}
|
|
756
|
+
componentDidLoad() {
|
|
757
|
+
this.pageElement.addEventListener('scroll', (event) => {
|
|
758
|
+
this.containerScrollTop = event.target.scrollTop + window.innerHeight / 2 - 400;
|
|
759
|
+
});
|
|
760
|
+
}
|
|
742
761
|
connectedCallback() {
|
|
743
762
|
this.setTimeInterval();
|
|
744
763
|
messageSender.UpdateLeaderboardsPlayerReq();
|
|
@@ -746,10 +765,13 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
746
765
|
disconnectedCallback() {
|
|
747
766
|
clearInterval(this.timeHolder);
|
|
748
767
|
}
|
|
768
|
+
onGameClick(game) {
|
|
769
|
+
messageSender.GameClickReq(game);
|
|
770
|
+
}
|
|
749
771
|
actionJoin(tournament) {
|
|
750
|
-
if (
|
|
772
|
+
if (tournament.isActionJoinPending)
|
|
751
773
|
return;
|
|
752
|
-
|
|
774
|
+
tournament.isActionJoinPending = true;
|
|
753
775
|
try {
|
|
754
776
|
if (tournament.isPlayerAcknowledged) {
|
|
755
777
|
messageSender.UnjoinTournamentReq(tournament);
|
|
@@ -777,9 +799,9 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
777
799
|
this.page = page;
|
|
778
800
|
}
|
|
779
801
|
render() {
|
|
780
|
-
return (h(Host, { key: '
|
|
802
|
+
return (h(Host, { key: '6ccc0ea805f77b2753cbb06f27953f8d6ae250e1' }, h("general-styling-wrapper", { key: '29be4b2eb25061f496844922c2d250d2d9967297', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
|
|
781
803
|
// @ts-ignore
|
|
782
|
-
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renders.page[this.page]()));
|
|
804
|
+
targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { key: '2e7ab6c379e74abcc01635051a2621944733cb1c', class: 'Leaderboards', ref: el => this.pageElement = el }, this.renders.page[this.page]())));
|
|
783
805
|
}
|
|
784
806
|
openDialog(type, data = undefined, onClose = undefined) {
|
|
785
807
|
this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, onClose,
|
|
@@ -808,7 +830,6 @@ const CasinoEngagementSuiteTournament = class {
|
|
|
808
830
|
this.tournamentItem = undefined;
|
|
809
831
|
this.tournamentList = undefined;
|
|
810
832
|
this.leaderboards = [];
|
|
811
|
-
this.isActionJoinPending = false;
|
|
812
833
|
this.isDialogOpen = false;
|
|
813
834
|
this.isShowInfo = false;
|
|
814
835
|
this.page = LeaderboardPage.list;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-ecf4f553.js';
|
|
2
|
+
export { s as setNonce } from './index-ecf4f553.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["casino-engagement-suite-progress-bar_3",[[1,"casino-engagement-suite-tournament",{"language":[1],"show":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"device":[1],"leaderboardsInit":[16],"tab":[32],"locale":[32],"tournamentItem":[32],"tournamentList":[32],"leaderboards":[32],"
|
|
19
|
+
return bootstrapLazy([["casino-engagement-suite-progress-bar_3",[[1,"casino-engagement-suite-tournament",{"language":[1],"show":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"device":[1],"leaderboardsInit":[16],"tab":[32],"locale":[32],"tournamentItem":[32],"tournamentList":[32],"leaderboards":[32],"isDialogOpen":[32],"isShowInfo":[32],"page":[32],"tournamentInDialog":[32],"dialog":[32],"time":[32],"newIdList":[32]},[[8,"message","handleEvent"]],{"newIdList":["checkNewIdList"],"tournamentList":["syncBarState"],"show":["showPropWatcher"]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
20
20
|
});
|