@everymatrix/casino-engagement-suite-challenges-details 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.esm.js +1 -0
- package/dist/casino-engagement-suite-challenges-details/index.esm.js +0 -0
- package/dist/casino-engagement-suite-challenges-details/p-11d8b487.js +2 -0
- package/dist/casino-engagement-suite-challenges-details/p-d908af25.entry.js +1 -0
- package/dist/casino-engagement-suite-challenges-details/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-challenges-details.cjs.js +25 -0
- package/dist/cjs/casino-engagement-suite-challenges-details_2.cjs.entry.js +334 -0
- package/dist/cjs/index-a758ba24.js +1249 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.css +302 -0
- package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.js +451 -0
- package/dist/collection/components/casino-engagement-suite-challenges-details/index.js +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/models/casino-challenges-details.js +16 -0
- package/dist/collection/utils/index.js +10 -0
- package/dist/collection/utils/locale.utils.js +23 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-challenges-details.js +20 -0
- package/dist/esm/casino-engagement-suite-challenges-details_2.entry.js +329 -0
- package/dist/esm/index-c193b756.js +1221 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-details/.stencil/packages/stencil/casino-engagement-suite-challenges-details/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-details/.stencil/packages/stencil/casino-engagement-suite-challenges-details/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.d.ts +74 -0
- package/dist/types/components/casino-engagement-suite-challenges-details/index.d.ts +1 -0
- package/dist/types/components.d.ts +131 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/casino-challenges-details.d.ts +62 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +29 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../utils/locale.utils";
|
|
3
|
+
import { ChallengeProgressStatus } from "../../models/casino-challenges-details";
|
|
4
|
+
import "../../../../../casino-engagement-suite-progress-bar/dist/types/index";
|
|
5
|
+
import { formatBalance } from "../../utils";
|
|
6
|
+
export class CasinoEngagementSuiteChallengesDetails {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.setClientStyling = () => {
|
|
9
|
+
let sheet = document.createElement('style');
|
|
10
|
+
sheet.innerHTML = this.clientStyling;
|
|
11
|
+
this.host.prepend(sheet);
|
|
12
|
+
};
|
|
13
|
+
this.setClientStylingURL = () => {
|
|
14
|
+
let url = new URL(this.clientStylingUrl);
|
|
15
|
+
let cssFile = document.createElement('style');
|
|
16
|
+
fetch(url.href)
|
|
17
|
+
.then((res) => res.text())
|
|
18
|
+
.then((data) => {
|
|
19
|
+
cssFile.innerHTML = data;
|
|
20
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
21
|
+
})
|
|
22
|
+
.catch((err) => {
|
|
23
|
+
console.log('Error ', err);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
this.handleCloseClick = () => {
|
|
27
|
+
this.resetNewLabel();
|
|
28
|
+
this.close.emit();
|
|
29
|
+
};
|
|
30
|
+
this.handleBackClick = () => {
|
|
31
|
+
this.resetNewLabel();
|
|
32
|
+
this.back.emit();
|
|
33
|
+
};
|
|
34
|
+
this.onGameClick = (ev) => {
|
|
35
|
+
const slug = ev.currentTarget.getAttribute('data-slug');
|
|
36
|
+
if (slug) {
|
|
37
|
+
window.postMessage({
|
|
38
|
+
type: 'EngagementSuiteGameRedirect',
|
|
39
|
+
data: {
|
|
40
|
+
Slug: slug
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
this.changeChallengeStatus = (e) => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
const id = e.currentTarget.getAttribute('data-id');
|
|
48
|
+
if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
|
|
49
|
+
window.postMessage({
|
|
50
|
+
type: 'ShowConfirmationModal',
|
|
51
|
+
ProgressToDeactivate: id,
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
56
|
+
window.postMessage({
|
|
57
|
+
type: 'ShowConfirmationModal',
|
|
58
|
+
ProgressToActivate: id,
|
|
59
|
+
ProgressToDeactivate: this.inProgressChallenges[0],
|
|
60
|
+
});
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
window.postMessage({
|
|
64
|
+
type: 'ChallengeJoinRequest',
|
|
65
|
+
data: {
|
|
66
|
+
ProgressToActivate: id,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
this.toggle = () => {
|
|
71
|
+
this.showDetails = !this.showDetails;
|
|
72
|
+
};
|
|
73
|
+
this.clientStyling = '';
|
|
74
|
+
this.clientStylingUrl = '';
|
|
75
|
+
this.challenge = undefined;
|
|
76
|
+
this.inProgressChallenges = undefined;
|
|
77
|
+
this.language = 'en';
|
|
78
|
+
this.gameSlug = '';
|
|
79
|
+
this.device = 'Mobile';
|
|
80
|
+
this.isJoiningToChallenge = undefined;
|
|
81
|
+
this.pausedChallengeIds = [];
|
|
82
|
+
this.limitStylingAppends = false;
|
|
83
|
+
this.timer = '';
|
|
84
|
+
this.showDetails = false;
|
|
85
|
+
this.isExpiredChallenge = false;
|
|
86
|
+
}
|
|
87
|
+
challengePropHandler(value) {
|
|
88
|
+
if (!this.interval && value) {
|
|
89
|
+
this.updateTimer();
|
|
90
|
+
this.startCountdown();
|
|
91
|
+
}
|
|
92
|
+
if (this.interval && !value) {
|
|
93
|
+
clearInterval(this.interval);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
componentWillLoad() {
|
|
97
|
+
this.challengePropHandler(this.challenge);
|
|
98
|
+
}
|
|
99
|
+
componentDidRender() {
|
|
100
|
+
if (!this.limitStylingAppends && this.host) {
|
|
101
|
+
if (this.clientStyling)
|
|
102
|
+
this.setClientStyling();
|
|
103
|
+
if (this.clientStylingUrl)
|
|
104
|
+
this.setClientStylingURL();
|
|
105
|
+
this.limitStylingAppends = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
disconnectedCallback() {
|
|
109
|
+
this.interval && clearInterval(this.interval);
|
|
110
|
+
}
|
|
111
|
+
getActionsTemplate() {
|
|
112
|
+
return (h("header", { class: "ChallengeActions" }, h("button", { class: "ChallengeIconButton", onClick: this.handleBackClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg", alt: "back" })), h("button", { class: "ChallengeIconButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "close" }))));
|
|
113
|
+
}
|
|
114
|
+
getChallengeHeader() {
|
|
115
|
+
const presentationName = this.challenge.ChallengePresentation.PresentationName;
|
|
116
|
+
const inProgressChallenge = this.challenge.Status === ChallengeProgressStatus.InProgress
|
|
117
|
+
|| this.challenge.Status === ChallengeProgressStatus.PendingLevelReward;
|
|
118
|
+
const isDisabledButton = this.isExpiredChallenge || this.isJoiningToChallenge ||
|
|
119
|
+
this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
120
|
+
const showJoinButton = ![ChallengeProgressStatus.Completed, ChallengeProgressStatus.Forfeited]
|
|
121
|
+
.includes(this.challenge.Status);
|
|
122
|
+
return (h("div", { class: "ChallengeDetailsHeader" }, h("span", { class: "ChallengeName" }, presentationName), showJoinButton ? (h("button", { onClick: this.changeChallengeStatus, class: `ChallengeJoinButton ${inProgressChallenge ? 'Joined' : ''}
|
|
123
|
+
${isDisabledButton ? 'Disabled' : ''}`, "data-id": this.challenge.Id }, inProgressChallenge
|
|
124
|
+
? translate('unjoin', this.language)
|
|
125
|
+
: translate('join', this.language))) : null, h("div", { class: `ChallengeLabel ${this.challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language)))));
|
|
126
|
+
}
|
|
127
|
+
getChallengeCountdown() {
|
|
128
|
+
const timerMessage = this.isExpiredChallenge ? 'Expired' : this.timer;
|
|
129
|
+
const showChallengeCountdown = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
|
|
130
|
+
return (showChallengeCountdown ? (h("div", { class: `ChallengeCountdown ${this.isExpiredChallenge ? 'Expired' : ''}` }, timerMessage)) : null);
|
|
131
|
+
}
|
|
132
|
+
getChallengeDetails() {
|
|
133
|
+
const description = this.challenge.ChallengePresentation.Description;
|
|
134
|
+
const url = this.challenge.ChallengePresentation.Url;
|
|
135
|
+
const games = this.challenge.Games;
|
|
136
|
+
return (h("div", { class: `CollapseDetails ${this.showDetails ? 'ShowDetails' : ''}` }, description && h("div", { class: "ChallengeDescription" }, description), url && (h("div", { class: "TC" }, h("a", { href: url, target: "_blank" }, translate('tc', this.language)))), (games === null || games === void 0 ? void 0 : games.length) && (h("div", { class: "ChallengeGames" }, games.map((game) => (h("div", { class: "Game", key: game.CasinoGameId }, h("img", { src: game.GameIcon, alt: game.GameName, onClick: this.onGameClick, class: `${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, "data-slug": game.GameSlug }))))))));
|
|
137
|
+
}
|
|
138
|
+
resetNewLabel() {
|
|
139
|
+
this.resetNewChallengeLabel.emit(this.challenge.Id);
|
|
140
|
+
}
|
|
141
|
+
startCountdown() {
|
|
142
|
+
this.interval = setInterval(() => {
|
|
143
|
+
this.updateTimer();
|
|
144
|
+
}, 1000);
|
|
145
|
+
}
|
|
146
|
+
updateTimer() {
|
|
147
|
+
const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
|
|
148
|
+
const now = new Date().getTime();
|
|
149
|
+
const distance = expirationTime - now;
|
|
150
|
+
if (distance < 1) {
|
|
151
|
+
clearInterval(this.interval);
|
|
152
|
+
this.timer = '';
|
|
153
|
+
this.isExpiredChallenge = true;
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const { days, hours, minutes, seconds } = {
|
|
157
|
+
days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
|
|
158
|
+
hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
|
|
159
|
+
minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
|
|
160
|
+
seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
|
|
161
|
+
};
|
|
162
|
+
this.timer = days === '00'
|
|
163
|
+
? `${hours}h:${minutes}m:${seconds}s`
|
|
164
|
+
: `${days}d:${hours}h:${minutes}m`;
|
|
165
|
+
}
|
|
166
|
+
getLevelTarget(level) {
|
|
167
|
+
const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
|
|
168
|
+
let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
|
|
169
|
+
if (level.LevelTargetType === 1) {
|
|
170
|
+
levelTarget += ` ${translate('bet', this.language)}`;
|
|
171
|
+
}
|
|
172
|
+
else if (level.LevelTargetType === 2) {
|
|
173
|
+
levelTarget += ` ${translate('bets', this.language)} X ${level.TargetBetCount}`;
|
|
174
|
+
}
|
|
175
|
+
return (h("span", { class: "ChallengeLevelTarget" }, levelTarget));
|
|
176
|
+
}
|
|
177
|
+
getLevelBetRangesDetails(level) {
|
|
178
|
+
var _a, _b, _c, _d;
|
|
179
|
+
const isAccumulativeLevelType = level.LevelTargetType === 0;
|
|
180
|
+
if (isAccumulativeLevelType) {
|
|
181
|
+
const formattedMinBet = formatBalance((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet, this.challenge.CurrencySymbol);
|
|
182
|
+
const formattedMaxBet = formatBalance((_b = level.BetRange) === null || _b === void 0 ? void 0 : _b.MaxBet, this.challenge.CurrencySymbol);
|
|
183
|
+
const formattedContributionPercentage = level.LevelContributionPercent + '%';
|
|
184
|
+
const showMinBet = !!((_c = level.BetRange) === null || _c === void 0 ? void 0 : _c.MinBet);
|
|
185
|
+
const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
|
|
186
|
+
const showContributionPercentage = level.LevelContributionPercent !== 100;
|
|
187
|
+
if (showMinBet || showMaxBet || showContributionPercentage) {
|
|
188
|
+
return (h("div", { class: 'ChallengeLevelBetDetails' }, showMinBet &&
|
|
189
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('minBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)), showMaxBet &&
|
|
190
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('maxBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)), showContributionPercentage &&
|
|
191
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('contribution', this.language), ": "), h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
getChallengeLevels() {
|
|
196
|
+
const isChallengePaused = this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
197
|
+
const InProgressLevel = (level) => {
|
|
198
|
+
return level.ProgressStatus === 1 && !this.isExpiredChallenge && !isChallengePaused;
|
|
199
|
+
};
|
|
200
|
+
return (h("div", { class: "ChallengeLevels" }, this.challenge.LevelProgresses.map((level, index) => (h("div", { class: `ChallengeLevelCard ${InProgressLevel(level) ? 'InProgress' : ''}` }, h("casino-engagement-suite-progress-bar", { class: this.device, value: level.ProgressPercentage, "hide-percent": (level.ProgressPercentage === 0 && !InProgressLevel(level)) || level.ProgressPercentage === 100, disabled: this.isExpiredChallenge || isChallengePaused }, h("span", { slot: "Title", class: "ChallengeLevelTitle" }, h("span", null, "Level ", index + 1, ": "), this.getLevelTarget(level))), h("div", { class: "ChallengeRewardMessage" }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/reward.svg", alt: "win" }), h("span", null, translate('win', this.language), ": "), h("span", { class: "CustomRewardMessage" }, level.CustomRewardMessage)), this.getLevelBetRangesDetails(level))))));
|
|
201
|
+
}
|
|
202
|
+
getToggleButton() {
|
|
203
|
+
return (h("div", { class: "ChallengeCollapseButton", onClick: this.toggle }, h("span", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('details', this.language))));
|
|
204
|
+
}
|
|
205
|
+
render() {
|
|
206
|
+
return h("div", { key: '413a8354c03545a336b044a26f33275423548ee2', class: `ChallengeDetailsPopup ${this.device}` }, this.getActionsTemplate(), h("div", { key: 'e58aac0709effc8ed9df011c07b52ee6a0c4fa66', class: `ChallengeDetails ${this.challenge.IsNew ? 'IsNewChallenge' : ''}` }, this.getChallengeHeader(), this.getChallengeCountdown(), this.getToggleButton(), this.getChallengeDetails(), this.getChallengeLevels()));
|
|
207
|
+
}
|
|
208
|
+
static get is() { return "casino-engagement-suite-challenges-details"; }
|
|
209
|
+
static get encapsulation() { return "shadow"; }
|
|
210
|
+
static get originalStyleUrls() {
|
|
211
|
+
return {
|
|
212
|
+
"$": ["casino-engagement-suite-challenges-details.scss"]
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
static get styleUrls() {
|
|
216
|
+
return {
|
|
217
|
+
"$": ["casino-engagement-suite-challenges-details.css"]
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
static get properties() {
|
|
221
|
+
return {
|
|
222
|
+
"clientStyling": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "string",
|
|
227
|
+
"resolved": "string",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Client custom styling via string"
|
|
235
|
+
},
|
|
236
|
+
"attribute": "client-styling",
|
|
237
|
+
"reflect": true,
|
|
238
|
+
"defaultValue": "''"
|
|
239
|
+
},
|
|
240
|
+
"clientStylingUrl": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"mutable": false,
|
|
243
|
+
"complexType": {
|
|
244
|
+
"original": "string",
|
|
245
|
+
"resolved": "string",
|
|
246
|
+
"references": {}
|
|
247
|
+
},
|
|
248
|
+
"required": false,
|
|
249
|
+
"optional": false,
|
|
250
|
+
"docs": {
|
|
251
|
+
"tags": [],
|
|
252
|
+
"text": "Client custom styling via url"
|
|
253
|
+
},
|
|
254
|
+
"attribute": "client-styling-url",
|
|
255
|
+
"reflect": true,
|
|
256
|
+
"defaultValue": "''"
|
|
257
|
+
},
|
|
258
|
+
"challenge": {
|
|
259
|
+
"type": "unknown",
|
|
260
|
+
"mutable": true,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "Challenge",
|
|
263
|
+
"resolved": "Challenge",
|
|
264
|
+
"references": {
|
|
265
|
+
"Challenge": {
|
|
266
|
+
"location": "import",
|
|
267
|
+
"path": "../../models/casino-challenges-details",
|
|
268
|
+
"id": "../../../../packages/stencil/casino-engagement-suite-challenges-details/src/models/casino-challenges-details.ts::Challenge"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": false,
|
|
273
|
+
"optional": false,
|
|
274
|
+
"docs": {
|
|
275
|
+
"tags": [],
|
|
276
|
+
"text": "Selected challenge"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"inProgressChallenges": {
|
|
280
|
+
"type": "unknown",
|
|
281
|
+
"mutable": true,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "Array<string>",
|
|
284
|
+
"resolved": "string[]",
|
|
285
|
+
"references": {
|
|
286
|
+
"Array": {
|
|
287
|
+
"location": "global",
|
|
288
|
+
"id": "global::Array"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": false,
|
|
293
|
+
"optional": false,
|
|
294
|
+
"docs": {
|
|
295
|
+
"tags": [],
|
|
296
|
+
"text": "Active challenges"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"language": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"mutable": false,
|
|
302
|
+
"complexType": {
|
|
303
|
+
"original": "string",
|
|
304
|
+
"resolved": "string",
|
|
305
|
+
"references": {}
|
|
306
|
+
},
|
|
307
|
+
"required": false,
|
|
308
|
+
"optional": false,
|
|
309
|
+
"docs": {
|
|
310
|
+
"tags": [],
|
|
311
|
+
"text": "Language of the widget"
|
|
312
|
+
},
|
|
313
|
+
"attribute": "language",
|
|
314
|
+
"reflect": false,
|
|
315
|
+
"defaultValue": "'en'"
|
|
316
|
+
},
|
|
317
|
+
"gameSlug": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"mutable": false,
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "string",
|
|
322
|
+
"resolved": "string",
|
|
323
|
+
"references": {}
|
|
324
|
+
},
|
|
325
|
+
"required": false,
|
|
326
|
+
"optional": false,
|
|
327
|
+
"docs": {
|
|
328
|
+
"tags": [],
|
|
329
|
+
"text": "Current game slug"
|
|
330
|
+
},
|
|
331
|
+
"attribute": "game-slug",
|
|
332
|
+
"reflect": false,
|
|
333
|
+
"defaultValue": "''"
|
|
334
|
+
},
|
|
335
|
+
"device": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"mutable": false,
|
|
338
|
+
"complexType": {
|
|
339
|
+
"original": "\"Mobile\" | \"Tablet\" | \"Desktop\"",
|
|
340
|
+
"resolved": "\"Desktop\" | \"Mobile\" | \"Tablet\"",
|
|
341
|
+
"references": {}
|
|
342
|
+
},
|
|
343
|
+
"required": false,
|
|
344
|
+
"optional": false,
|
|
345
|
+
"docs": {
|
|
346
|
+
"tags": [],
|
|
347
|
+
"text": "User's device type"
|
|
348
|
+
},
|
|
349
|
+
"attribute": "device",
|
|
350
|
+
"reflect": false,
|
|
351
|
+
"defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
|
|
352
|
+
},
|
|
353
|
+
"isJoiningToChallenge": {
|
|
354
|
+
"type": "boolean",
|
|
355
|
+
"mutable": true,
|
|
356
|
+
"complexType": {
|
|
357
|
+
"original": "boolean",
|
|
358
|
+
"resolved": "boolean",
|
|
359
|
+
"references": {}
|
|
360
|
+
},
|
|
361
|
+
"required": false,
|
|
362
|
+
"optional": false,
|
|
363
|
+
"docs": {
|
|
364
|
+
"tags": [],
|
|
365
|
+
"text": "Is joining to challenge"
|
|
366
|
+
},
|
|
367
|
+
"attribute": "is-joining-to-challenge",
|
|
368
|
+
"reflect": false
|
|
369
|
+
},
|
|
370
|
+
"pausedChallengeIds": {
|
|
371
|
+
"type": "unknown",
|
|
372
|
+
"mutable": true,
|
|
373
|
+
"complexType": {
|
|
374
|
+
"original": "string[]",
|
|
375
|
+
"resolved": "string[]",
|
|
376
|
+
"references": {}
|
|
377
|
+
},
|
|
378
|
+
"required": false,
|
|
379
|
+
"optional": false,
|
|
380
|
+
"docs": {
|
|
381
|
+
"tags": [],
|
|
382
|
+
"text": "Paused Challenge Ids"
|
|
383
|
+
},
|
|
384
|
+
"defaultValue": "[] as Array<string>"
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
static get states() {
|
|
389
|
+
return {
|
|
390
|
+
"limitStylingAppends": {},
|
|
391
|
+
"timer": {},
|
|
392
|
+
"showDetails": {},
|
|
393
|
+
"isExpiredChallenge": {}
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
static get events() {
|
|
397
|
+
return [{
|
|
398
|
+
"method": "close",
|
|
399
|
+
"name": "close",
|
|
400
|
+
"bubbles": true,
|
|
401
|
+
"cancelable": true,
|
|
402
|
+
"composed": true,
|
|
403
|
+
"docs": {
|
|
404
|
+
"tags": [],
|
|
405
|
+
"text": ""
|
|
406
|
+
},
|
|
407
|
+
"complexType": {
|
|
408
|
+
"original": "void",
|
|
409
|
+
"resolved": "void",
|
|
410
|
+
"references": {}
|
|
411
|
+
}
|
|
412
|
+
}, {
|
|
413
|
+
"method": "back",
|
|
414
|
+
"name": "back",
|
|
415
|
+
"bubbles": true,
|
|
416
|
+
"cancelable": true,
|
|
417
|
+
"composed": true,
|
|
418
|
+
"docs": {
|
|
419
|
+
"tags": [],
|
|
420
|
+
"text": ""
|
|
421
|
+
},
|
|
422
|
+
"complexType": {
|
|
423
|
+
"original": "void",
|
|
424
|
+
"resolved": "void",
|
|
425
|
+
"references": {}
|
|
426
|
+
}
|
|
427
|
+
}, {
|
|
428
|
+
"method": "resetNewChallengeLabel",
|
|
429
|
+
"name": "resetNewChallengeLabel",
|
|
430
|
+
"bubbles": true,
|
|
431
|
+
"cancelable": true,
|
|
432
|
+
"composed": true,
|
|
433
|
+
"docs": {
|
|
434
|
+
"tags": [],
|
|
435
|
+
"text": ""
|
|
436
|
+
},
|
|
437
|
+
"complexType": {
|
|
438
|
+
"original": "string",
|
|
439
|
+
"resolved": "string",
|
|
440
|
+
"references": {}
|
|
441
|
+
}
|
|
442
|
+
}];
|
|
443
|
+
}
|
|
444
|
+
static get elementRef() { return "host"; }
|
|
445
|
+
static get watchers() {
|
|
446
|
+
return [{
|
|
447
|
+
"propName": "challenge",
|
|
448
|
+
"methodName": "challengePropHandler"
|
|
449
|
+
}];
|
|
450
|
+
}
|
|
451
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CasinoEngagementSuiteChallengesDetails } from './casino-engagement-suite-challenges-details';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export var ChallengeLevelProgressStatus;
|
|
2
|
+
(function (ChallengeLevelProgressStatus) {
|
|
3
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
|
|
4
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
|
|
5
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
|
|
6
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
|
|
7
|
+
})(ChallengeLevelProgressStatus || (ChallengeLevelProgressStatus = {}));
|
|
8
|
+
export var ChallengeProgressStatus;
|
|
9
|
+
(function (ChallengeProgressStatus) {
|
|
10
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
|
|
11
|
+
ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
|
|
12
|
+
ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
|
|
13
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
|
|
14
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
|
|
15
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
16
|
+
})(ChallengeProgressStatus || (ChallengeProgressStatus = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function formatBalance(amount, currency) {
|
|
2
|
+
return `${currency}${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3
|
+
.format(amount)}`;
|
|
4
|
+
}
|
|
5
|
+
export function formatBetRange(amount, currency) {
|
|
6
|
+
return `${currency}${new Intl.NumberFormat('en-US', {
|
|
7
|
+
minimumFractionDigits: 0,
|
|
8
|
+
maximumFractionDigits: 0,
|
|
9
|
+
}).format(amount).replace(/,/g, ' ')}`;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['en'];
|
|
3
|
+
const TRANSLATIONS = {
|
|
4
|
+
en: {
|
|
5
|
+
challenges: 'Challenges',
|
|
6
|
+
join: 'Join',
|
|
7
|
+
unjoin: 'Unjoin',
|
|
8
|
+
details: 'Challenge Details',
|
|
9
|
+
tc: 'Terms & Conditions',
|
|
10
|
+
level: 'Level',
|
|
11
|
+
place: 'Place',
|
|
12
|
+
bet: 'bet',
|
|
13
|
+
bets: 'bets',
|
|
14
|
+
win: 'Win',
|
|
15
|
+
minBet: 'Min Bet',
|
|
16
|
+
maxBet: 'Max Bet',
|
|
17
|
+
contribution: 'Contribution'
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export const translate = (key, customLang) => {
|
|
21
|
+
const lang = customLang;
|
|
22
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
23
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-c193b756.js';
|
|
2
|
+
export { s as setNonce } from './index-c193b756.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
const importMeta = import.meta.url;
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== "") {
|
|
12
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return promiseResolve(opts);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
patchBrowser().then(async (options) => {
|
|
18
|
+
await globalScripts();
|
|
19
|
+
return bootstrapLazy([["casino-engagement-suite-challenges-details_2",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]},null,{"challenge":["challengePropHandler"]}],[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]}]]]], options);
|
|
20
|
+
});
|