@everymatrix/casino-engagement-suite-challenges-details 1.44.0 → 1.45.0
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 -1
- package/dist/casino-engagement-suite-challenges-details/p-11d8b487.js +2 -0
- package/dist/casino-engagement-suite-challenges-details/p-8bbfff73.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 +17 -11
- package/dist/cjs/casino-engagement-suite-challenges-details_2.cjs.entry.js +293 -323
- package/dist/cjs/index-a758ba24.js +1249 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.css +63 -61
- package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.js +438 -493
- package/dist/collection/components/casino-engagement-suite-challenges-details/index.js +1 -0
- package/dist/collection/models/casino-challenges-details.js +10 -10
- package/dist/collection/utils/index.js +8 -2
- package/dist/collection/utils/locale.utils.js +18 -18
- 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 +14 -11
- package/dist/esm/casino-engagement-suite-challenges-details_2.entry.js +293 -323
- package/dist/esm/index-c193b756.js +1221 -0
- package/dist/esm/loader.js +7 -13
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/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/adrian.pripon/Documents/Work/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 +70 -70
- package/dist/types/components/casino-engagement-suite-challenges-details/index.d.ts +1 -0
- package/dist/types/components.d.ts +21 -3
- package/dist/types/models/casino-challenges-details.d.ts +46 -46
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -0
- 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 +12 -2
- package/dist/casino-engagement-suite-challenges-details/p-80848cd8.entry.js +0 -1
- package/dist/casino-engagement-suite-challenges-details/p-808a7dc5.js +0 -1
- package/dist/cjs/index-a0eb9215.js +0 -1279
- package/dist/components/casino-engagement-suite-challenges-details.d.ts +0 -11
- package/dist/components/casino-engagement-suite-challenges-details.js +0 -318
- 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/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-c5abae48.js +0 -1252
- 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-challenges-details/.stencil/packages/casino-engagement-suite-challenges-details/stencil.config.d.ts +0 -2
|
@@ -1,507 +1,452 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { translate } from
|
|
3
|
-
import { ChallengeProgressStatus } from
|
|
4
|
-
import
|
|
5
|
-
import { formatBalance } from
|
|
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
6
|
export class CasinoEngagementSuiteChallengesDetails {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
ProgressToActivate: id,
|
|
87
|
-
ProgressToDeactivate: this.inProgressChallenges[0],
|
|
88
|
-
});
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
window.postMessage({
|
|
92
|
-
type: 'ChallengeJoinRequest',
|
|
93
|
-
data: {
|
|
94
|
-
ProgressToActivate: id,
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
this.toggle = () => {
|
|
99
|
-
this.showDetails = !this.showDetails;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
challengePropHandler(value) {
|
|
103
|
-
if (!this.interval && value) {
|
|
104
|
-
this.updateTimer();
|
|
105
|
-
this.startCountdown();
|
|
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;
|
|
106
86
|
}
|
|
107
|
-
|
|
108
|
-
|
|
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
|
+
}
|
|
109
107
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
this.challengePropHandler(this.challenge);
|
|
113
|
-
}
|
|
114
|
-
componentDidRender() {
|
|
115
|
-
if (!this.limitStylingAppends && this.host) {
|
|
116
|
-
if (this.clientStyling)
|
|
117
|
-
this.setClientStyling();
|
|
118
|
-
if (this.clientStylingUrl)
|
|
119
|
-
this.setClientStylingURL();
|
|
120
|
-
this.limitStylingAppends = true;
|
|
108
|
+
disconnectedCallback() {
|
|
109
|
+
this.interval && clearInterval(this.interval);
|
|
121
110
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const inProgressChallenge = this.challenge.Status === ChallengeProgressStatus.InProgress
|
|
136
|
-
|| this.challenge.Status === ChallengeProgressStatus.PendingLevelReward;
|
|
137
|
-
const isDisabledButton = this.isExpiredChallenge || this.isJoiningToChallenge ||
|
|
138
|
-
this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
139
|
-
const showJoinButton = ![ChallengeProgressStatus.Completed, ChallengeProgressStatus.Forfeited]
|
|
140
|
-
.includes(this.challenge.Status);
|
|
141
|
-
return (h("div", { class: "ChallengeDetailsHeader" },
|
|
142
|
-
h("span", { class: "ChallengeName" }, presentationName),
|
|
143
|
-
showJoinButton ? (h("button", { onClick: this.changeChallengeStatus, class: `ChallengeJoinButton ${inProgressChallenge ? 'Joined' : ''}
|
|
111
|
+
getActionsTemplate() {
|
|
112
|
+
return (h("header", { class: "ChallengeActions" }, h("button", { class: "EngagementSuiteIconButton Back", onClick: this.handleBackClick }), h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
|
|
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
|
+
const showNewLabel = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
|
|
123
|
+
return (h("div", { class: "ChallengeDetailsHeader" }, h("span", { class: "ChallengeName" }, presentationName), showJoinButton ? (h("button", { onClick: this.changeChallengeStatus, class: `EngagementSuiteButton ${inProgressChallenge ? 'Active' : ''}
|
|
144
124
|
${isDisabledButton ? 'Disabled' : ''}`, "data-id": this.challenge.Id }, inProgressChallenge
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const showChallengeCountdown = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
|
|
153
|
-
return (showChallengeCountdown ? (h("div", { class: `ChallengeCountdown ${this.isExpiredChallenge ? 'Expired' : ''}` }, timerMessage)) : null);
|
|
154
|
-
}
|
|
155
|
-
getChallengeDetails() {
|
|
156
|
-
const description = this.challenge.ChallengePresentation.Description;
|
|
157
|
-
const url = this.challenge.ChallengePresentation.Url;
|
|
158
|
-
const games = this.challenge.Games;
|
|
159
|
-
return (h("div", { class: `CollapseDetails ${this.showDetails ? 'ShowDetails' : ''}` },
|
|
160
|
-
description && h("div", { class: "ChallengeDescription" }, description),
|
|
161
|
-
url && (h("div", { class: "TC" },
|
|
162
|
-
h("a", { href: url, target: "_blank" }, translate('tc', this.language)))),
|
|
163
|
-
(games === null || games === void 0 ? void 0 : games.length) && (h("div", { class: "ChallengeGames" }, games.map((game) => (h("div", { class: "Game", key: game.CasinoGameId },
|
|
164
|
-
h("img", { src: game.GameIcon, alt: game.GameName, onClick: this.onGameClick, class: `${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, "data-slug": game.GameSlug }))))))));
|
|
165
|
-
}
|
|
166
|
-
resetNewLabel() {
|
|
167
|
-
this.resetNewChallengeLabel.emit(this.challenge.Id);
|
|
168
|
-
}
|
|
169
|
-
startCountdown() {
|
|
170
|
-
this.interval = setInterval(() => {
|
|
171
|
-
this.updateTimer();
|
|
172
|
-
}, 1000);
|
|
173
|
-
}
|
|
174
|
-
updateTimer() {
|
|
175
|
-
const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
|
|
176
|
-
const now = new Date().getTime();
|
|
177
|
-
const distance = expirationTime - now;
|
|
178
|
-
if (distance < 1) {
|
|
179
|
-
clearInterval(this.interval);
|
|
180
|
-
this.timer = '';
|
|
181
|
-
this.isExpiredChallenge = true;
|
|
182
|
-
return;
|
|
125
|
+
? translate('unjoin', this.language)
|
|
126
|
+
: translate('join', this.language))) : null, showNewLabel ? (h("div", { class: `ChallengeLabel ${this.challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language)))) : null));
|
|
127
|
+
}
|
|
128
|
+
getChallengeCountdown() {
|
|
129
|
+
const timerMessage = this.isExpiredChallenge ? 'Expired' : this.timer;
|
|
130
|
+
const showChallengeCountdown = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
|
|
131
|
+
return (showChallengeCountdown ? (h("div", { class: `ChallengeCountdown ${this.isExpiredChallenge ? 'Expired' : ''}` }, timerMessage)) : null);
|
|
183
132
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
};
|
|
190
|
-
this.timer = days === '00'
|
|
191
|
-
? `${hours}h:${minutes}m:${seconds}s`
|
|
192
|
-
: `${days}d:${hours}h:${minutes}m`;
|
|
193
|
-
}
|
|
194
|
-
getLevelTarget(level) {
|
|
195
|
-
const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
|
|
196
|
-
let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
|
|
197
|
-
if (level.LevelTargetType === 1) {
|
|
198
|
-
levelTarget += ` ${translate('bet', this.language)}`;
|
|
133
|
+
getChallengeDetails() {
|
|
134
|
+
const description = this.challenge.ChallengePresentation.Description;
|
|
135
|
+
const url = this.challenge.ChallengePresentation.Url;
|
|
136
|
+
const games = this.challenge.Games;
|
|
137
|
+
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 }))))))));
|
|
199
138
|
}
|
|
200
|
-
|
|
201
|
-
|
|
139
|
+
resetNewLabel() {
|
|
140
|
+
this.resetNewChallengeLabel.emit(this.challenge.Id);
|
|
202
141
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const isAccumulativeLevelType = level.LevelTargetType === 0;
|
|
208
|
-
if (isAccumulativeLevelType) {
|
|
209
|
-
const formattedMinBet = formatBalance((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet, this.challenge.CurrencySymbol);
|
|
210
|
-
const formattedMaxBet = formatBalance((_b = level.BetRange) === null || _b === void 0 ? void 0 : _b.MaxBet, this.challenge.CurrencySymbol);
|
|
211
|
-
const formattedContributionPercentage = level.LevelContributionPercent + '%';
|
|
212
|
-
const showMinBet = !!((_c = level.BetRange) === null || _c === void 0 ? void 0 : _c.MinBet);
|
|
213
|
-
const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
|
|
214
|
-
const showContributionPercentage = level.LevelContributionPercent !== 100;
|
|
215
|
-
if (showMinBet || showMaxBet || showContributionPercentage) {
|
|
216
|
-
return (h("div", { class: 'ChallengeLevelBetDetails' },
|
|
217
|
-
showMinBet &&
|
|
218
|
-
h("div", { class: 'ChallengeLevelBetDetail' },
|
|
219
|
-
h("span", null,
|
|
220
|
-
translate('minBet', this.language),
|
|
221
|
-
": "),
|
|
222
|
-
h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)),
|
|
223
|
-
showMaxBet &&
|
|
224
|
-
h("div", { class: 'ChallengeLevelBetDetail' },
|
|
225
|
-
h("span", null,
|
|
226
|
-
translate('maxBet', this.language),
|
|
227
|
-
": "),
|
|
228
|
-
h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)),
|
|
229
|
-
showContributionPercentage &&
|
|
230
|
-
h("div", { class: 'ChallengeLevelBetDetail' },
|
|
231
|
-
h("span", null,
|
|
232
|
-
translate('contribution', this.language),
|
|
233
|
-
": "),
|
|
234
|
-
h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
|
|
235
|
-
}
|
|
142
|
+
startCountdown() {
|
|
143
|
+
this.interval = setInterval(() => {
|
|
144
|
+
this.updateTimer();
|
|
145
|
+
}, 1000);
|
|
236
146
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
h("span", null,
|
|
247
|
-
"Level ",
|
|
248
|
-
index + 1,
|
|
249
|
-
": "),
|
|
250
|
-
this.getLevelTarget(level))),
|
|
251
|
-
h("div", { class: "ChallengeRewardMessage" },
|
|
252
|
-
h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/reward.svg", alt: "win" }),
|
|
253
|
-
h("span", null,
|
|
254
|
-
translate('win', this.language),
|
|
255
|
-
": "),
|
|
256
|
-
h("span", { class: "CustomRewardMessage" }, level.CustomRewardMessage)),
|
|
257
|
-
this.getLevelBetRangesDetails(level))))));
|
|
258
|
-
}
|
|
259
|
-
getToggleButton() {
|
|
260
|
-
return (h("div", { class: "ChallengeCollapseButton", onClick: this.toggle },
|
|
261
|
-
h("span", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }),
|
|
262
|
-
h("span", null, translate('details', this.language))));
|
|
263
|
-
}
|
|
264
|
-
render() {
|
|
265
|
-
return h("div", { class: `ChallengeDetailsPopup ${this.device}` },
|
|
266
|
-
this.getActionsTemplate(),
|
|
267
|
-
h("div", { class: `ChallengeDetails ${this.challenge.IsNew ? 'IsNewChallenge' : ''}` },
|
|
268
|
-
this.getChallengeHeader(),
|
|
269
|
-
this.getChallengeCountdown(),
|
|
270
|
-
this.getToggleButton(),
|
|
271
|
-
this.getChallengeDetails(),
|
|
272
|
-
this.getChallengeLevels()));
|
|
273
|
-
}
|
|
274
|
-
static get is() { return "casino-engagement-suite-challenges-details"; }
|
|
275
|
-
static get encapsulation() { return "shadow"; }
|
|
276
|
-
static get originalStyleUrls() { return {
|
|
277
|
-
"$": ["casino-engagement-suite-challenges-details.scss"]
|
|
278
|
-
}; }
|
|
279
|
-
static get styleUrls() { return {
|
|
280
|
-
"$": ["casino-engagement-suite-challenges-details.css"]
|
|
281
|
-
}; }
|
|
282
|
-
static get properties() { return {
|
|
283
|
-
"clientStyling": {
|
|
284
|
-
"type": "string",
|
|
285
|
-
"mutable": false,
|
|
286
|
-
"complexType": {
|
|
287
|
-
"original": "string",
|
|
288
|
-
"resolved": "string",
|
|
289
|
-
"references": {}
|
|
290
|
-
},
|
|
291
|
-
"required": false,
|
|
292
|
-
"optional": false,
|
|
293
|
-
"docs": {
|
|
294
|
-
"tags": [],
|
|
295
|
-
"text": "Client custom styling via string"
|
|
296
|
-
},
|
|
297
|
-
"attribute": "client-styling",
|
|
298
|
-
"reflect": true,
|
|
299
|
-
"defaultValue": "''"
|
|
300
|
-
},
|
|
301
|
-
"clientStylingUrl": {
|
|
302
|
-
"type": "string",
|
|
303
|
-
"mutable": false,
|
|
304
|
-
"complexType": {
|
|
305
|
-
"original": "string",
|
|
306
|
-
"resolved": "string",
|
|
307
|
-
"references": {}
|
|
308
|
-
},
|
|
309
|
-
"required": false,
|
|
310
|
-
"optional": false,
|
|
311
|
-
"docs": {
|
|
312
|
-
"tags": [],
|
|
313
|
-
"text": "Client custom styling via url"
|
|
314
|
-
},
|
|
315
|
-
"attribute": "client-styling-url",
|
|
316
|
-
"reflect": true,
|
|
317
|
-
"defaultValue": "''"
|
|
318
|
-
},
|
|
319
|
-
"challenge": {
|
|
320
|
-
"type": "unknown",
|
|
321
|
-
"mutable": true,
|
|
322
|
-
"complexType": {
|
|
323
|
-
"original": "Challenge",
|
|
324
|
-
"resolved": "Challenge",
|
|
325
|
-
"references": {
|
|
326
|
-
"Challenge": {
|
|
327
|
-
"location": "import",
|
|
328
|
-
"path": "../../models/casino-challenges-details"
|
|
329
|
-
}
|
|
147
|
+
updateTimer() {
|
|
148
|
+
const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
|
|
149
|
+
const now = new Date().getTime();
|
|
150
|
+
const distance = expirationTime - now;
|
|
151
|
+
if (distance < 1) {
|
|
152
|
+
clearInterval(this.interval);
|
|
153
|
+
this.timer = '';
|
|
154
|
+
this.isExpiredChallenge = true;
|
|
155
|
+
return;
|
|
330
156
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
"Array": {
|
|
347
|
-
"location": "global"
|
|
348
|
-
}
|
|
157
|
+
const { days, hours, minutes, seconds } = {
|
|
158
|
+
days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
|
|
159
|
+
hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
|
|
160
|
+
minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
|
|
161
|
+
seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
|
|
162
|
+
};
|
|
163
|
+
this.timer = days === '00'
|
|
164
|
+
? `${hours}h:${minutes}m:${seconds}s`
|
|
165
|
+
: `${days}d:${hours}h:${minutes}m`;
|
|
166
|
+
}
|
|
167
|
+
getLevelTarget(level) {
|
|
168
|
+
const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
|
|
169
|
+
let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
|
|
170
|
+
if (level.LevelTargetType === 1) {
|
|
171
|
+
levelTarget += ` ${translate('bet', this.language)}`;
|
|
349
172
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
"attribute": "language",
|
|
373
|
-
"reflect": false,
|
|
374
|
-
"defaultValue": "'en'"
|
|
375
|
-
},
|
|
376
|
-
"gameSlug": {
|
|
377
|
-
"type": "string",
|
|
378
|
-
"mutable": false,
|
|
379
|
-
"complexType": {
|
|
380
|
-
"original": "string",
|
|
381
|
-
"resolved": "string",
|
|
382
|
-
"references": {}
|
|
383
|
-
},
|
|
384
|
-
"required": false,
|
|
385
|
-
"optional": false,
|
|
386
|
-
"docs": {
|
|
387
|
-
"tags": [],
|
|
388
|
-
"text": "Current game slug"
|
|
389
|
-
},
|
|
390
|
-
"attribute": "game-slug",
|
|
391
|
-
"reflect": false,
|
|
392
|
-
"defaultValue": "''"
|
|
393
|
-
},
|
|
394
|
-
"device": {
|
|
395
|
-
"type": "string",
|
|
396
|
-
"mutable": false,
|
|
397
|
-
"complexType": {
|
|
398
|
-
"original": "\"Mobile\" | \"Tablet\" | \"Desktop\"",
|
|
399
|
-
"resolved": "\"Desktop\" | \"Mobile\" | \"Tablet\"",
|
|
400
|
-
"references": {}
|
|
401
|
-
},
|
|
402
|
-
"required": false,
|
|
403
|
-
"optional": false,
|
|
404
|
-
"docs": {
|
|
405
|
-
"tags": [],
|
|
406
|
-
"text": "User's device type"
|
|
407
|
-
},
|
|
408
|
-
"attribute": "device",
|
|
409
|
-
"reflect": false,
|
|
410
|
-
"defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
|
|
411
|
-
},
|
|
412
|
-
"isJoiningToChallenge": {
|
|
413
|
-
"type": "boolean",
|
|
414
|
-
"mutable": true,
|
|
415
|
-
"complexType": {
|
|
416
|
-
"original": "boolean",
|
|
417
|
-
"resolved": "boolean",
|
|
418
|
-
"references": {}
|
|
419
|
-
},
|
|
420
|
-
"required": false,
|
|
421
|
-
"optional": false,
|
|
422
|
-
"docs": {
|
|
423
|
-
"tags": [],
|
|
424
|
-
"text": "Is joining to challenge"
|
|
425
|
-
},
|
|
426
|
-
"attribute": "is-joining-to-challenge",
|
|
427
|
-
"reflect": false
|
|
428
|
-
},
|
|
429
|
-
"pausedChallengeIds": {
|
|
430
|
-
"type": "unknown",
|
|
431
|
-
"mutable": true,
|
|
432
|
-
"complexType": {
|
|
433
|
-
"original": "string[]",
|
|
434
|
-
"resolved": "string[]",
|
|
435
|
-
"references": {
|
|
436
|
-
"Array": {
|
|
437
|
-
"location": "global"
|
|
438
|
-
}
|
|
173
|
+
else if (level.LevelTargetType === 2) {
|
|
174
|
+
levelTarget += ` ${translate('bets', this.language)} X ${level.TargetBetCount}`;
|
|
175
|
+
}
|
|
176
|
+
return (h("span", { class: "ChallengeLevelTarget" }, levelTarget));
|
|
177
|
+
}
|
|
178
|
+
getLevelBetRangesDetails(level) {
|
|
179
|
+
var _a, _b, _c, _d;
|
|
180
|
+
const isAccumulativeLevelType = level.LevelTargetType === 0;
|
|
181
|
+
if (isAccumulativeLevelType) {
|
|
182
|
+
const formattedMinBet = formatBalance((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet, this.challenge.CurrencySymbol);
|
|
183
|
+
const formattedMaxBet = formatBalance((_b = level.BetRange) === null || _b === void 0 ? void 0 : _b.MaxBet, this.challenge.CurrencySymbol);
|
|
184
|
+
const formattedContributionPercentage = level.LevelContributionPercent + '%';
|
|
185
|
+
const showMinBet = !!((_c = level.BetRange) === null || _c === void 0 ? void 0 : _c.MinBet);
|
|
186
|
+
const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
|
|
187
|
+
const showContributionPercentage = level.LevelContributionPercent !== 100;
|
|
188
|
+
if (showMinBet || showMaxBet || showContributionPercentage) {
|
|
189
|
+
return (h("div", { class: 'ChallengeLevelBetDetails' }, showMinBet &&
|
|
190
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('minBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)), showMaxBet &&
|
|
191
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('maxBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)), showContributionPercentage &&
|
|
192
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('contribution', this.language), ": "), h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
|
|
193
|
+
}
|
|
439
194
|
}
|
|
440
|
-
},
|
|
441
|
-
"required": false,
|
|
442
|
-
"optional": false,
|
|
443
|
-
"docs": {
|
|
444
|
-
"tags": [],
|
|
445
|
-
"text": "Paused Challenge Ids"
|
|
446
|
-
},
|
|
447
|
-
"defaultValue": "[] as Array<string>"
|
|
448
195
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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
|
-
|
|
196
|
+
getChallengeLevels() {
|
|
197
|
+
const isChallengePaused = this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
198
|
+
const InProgressLevel = (level) => {
|
|
199
|
+
return level.ProgressStatus === 1 && !this.isExpiredChallenge && !isChallengePaused;
|
|
200
|
+
};
|
|
201
|
+
return (h("div", { class: "ChallengeLevels" }, this.challenge.LevelProgresses.map((level, index) => (h("div", { class: `ChallengeLevelCard ${InProgressLevel(level) ? 'InProgress' : ''}` }, h("casino-engagement-suite-progress-bar", { clientStylingUrl: this.clientStylingUrl, 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("div", { class: "EngagementSuiteIconButton Reward" }), h("span", null, translate('win', this.language), ": "), h("span", { class: "CustomRewardMessage" }, level.CustomRewardMessage)), this.getLevelBetRangesDetails(level))))));
|
|
202
|
+
}
|
|
203
|
+
getToggleButton() {
|
|
204
|
+
return (h("div", { class: "ChallengeCollapseButton", onClick: this.toggle }, h("span", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('details', this.language))));
|
|
205
|
+
}
|
|
206
|
+
render() {
|
|
207
|
+
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()));
|
|
208
|
+
}
|
|
209
|
+
static get is() { return "casino-engagement-suite-challenges-details"; }
|
|
210
|
+
static get encapsulation() { return "shadow"; }
|
|
211
|
+
static get originalStyleUrls() {
|
|
212
|
+
return {
|
|
213
|
+
"$": ["casino-engagement-suite-challenges-details.scss"]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
static get styleUrls() {
|
|
217
|
+
return {
|
|
218
|
+
"$": ["casino-engagement-suite-challenges-details.css"]
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
static get properties() {
|
|
222
|
+
return {
|
|
223
|
+
"clientStyling": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"mutable": false,
|
|
226
|
+
"complexType": {
|
|
227
|
+
"original": "string",
|
|
228
|
+
"resolved": "string",
|
|
229
|
+
"references": {}
|
|
230
|
+
},
|
|
231
|
+
"required": false,
|
|
232
|
+
"optional": false,
|
|
233
|
+
"docs": {
|
|
234
|
+
"tags": [],
|
|
235
|
+
"text": "Client custom styling via string"
|
|
236
|
+
},
|
|
237
|
+
"attribute": "client-styling",
|
|
238
|
+
"reflect": true,
|
|
239
|
+
"defaultValue": "''"
|
|
240
|
+
},
|
|
241
|
+
"clientStylingUrl": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "string",
|
|
246
|
+
"resolved": "string",
|
|
247
|
+
"references": {}
|
|
248
|
+
},
|
|
249
|
+
"required": false,
|
|
250
|
+
"optional": false,
|
|
251
|
+
"docs": {
|
|
252
|
+
"tags": [],
|
|
253
|
+
"text": "Client custom styling via url"
|
|
254
|
+
},
|
|
255
|
+
"attribute": "client-styling-url",
|
|
256
|
+
"reflect": true,
|
|
257
|
+
"defaultValue": "''"
|
|
258
|
+
},
|
|
259
|
+
"challenge": {
|
|
260
|
+
"type": "unknown",
|
|
261
|
+
"mutable": true,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "Challenge",
|
|
264
|
+
"resolved": "Challenge",
|
|
265
|
+
"references": {
|
|
266
|
+
"Challenge": {
|
|
267
|
+
"location": "import",
|
|
268
|
+
"path": "../../models/casino-challenges-details",
|
|
269
|
+
"id": "../../../../packages/stencil/casino-engagement-suite-challenges-details/src/models/casino-challenges-details.ts::Challenge"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"required": false,
|
|
274
|
+
"optional": false,
|
|
275
|
+
"docs": {
|
|
276
|
+
"tags": [],
|
|
277
|
+
"text": "Selected challenge"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"inProgressChallenges": {
|
|
281
|
+
"type": "unknown",
|
|
282
|
+
"mutable": true,
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "Array<string>",
|
|
285
|
+
"resolved": "string[]",
|
|
286
|
+
"references": {
|
|
287
|
+
"Array": {
|
|
288
|
+
"location": "global",
|
|
289
|
+
"id": "global::Array"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": false,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [],
|
|
297
|
+
"text": "Active challenges"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"language": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "string",
|
|
305
|
+
"resolved": "string",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": "Language of the widget"
|
|
313
|
+
},
|
|
314
|
+
"attribute": "language",
|
|
315
|
+
"reflect": false,
|
|
316
|
+
"defaultValue": "'en'"
|
|
317
|
+
},
|
|
318
|
+
"gameSlug": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"mutable": false,
|
|
321
|
+
"complexType": {
|
|
322
|
+
"original": "string",
|
|
323
|
+
"resolved": "string",
|
|
324
|
+
"references": {}
|
|
325
|
+
},
|
|
326
|
+
"required": false,
|
|
327
|
+
"optional": false,
|
|
328
|
+
"docs": {
|
|
329
|
+
"tags": [],
|
|
330
|
+
"text": "Current game slug"
|
|
331
|
+
},
|
|
332
|
+
"attribute": "game-slug",
|
|
333
|
+
"reflect": false,
|
|
334
|
+
"defaultValue": "''"
|
|
335
|
+
},
|
|
336
|
+
"device": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"mutable": false,
|
|
339
|
+
"complexType": {
|
|
340
|
+
"original": "\"Mobile\" | \"Tablet\" | \"Desktop\"",
|
|
341
|
+
"resolved": "\"Desktop\" | \"Mobile\" | \"Tablet\"",
|
|
342
|
+
"references": {}
|
|
343
|
+
},
|
|
344
|
+
"required": false,
|
|
345
|
+
"optional": false,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": "User's device type"
|
|
349
|
+
},
|
|
350
|
+
"attribute": "device",
|
|
351
|
+
"reflect": false,
|
|
352
|
+
"defaultValue": "'Mobile' as 'Mobile' | 'Tablet' | 'Desktop'"
|
|
353
|
+
},
|
|
354
|
+
"isJoiningToChallenge": {
|
|
355
|
+
"type": "boolean",
|
|
356
|
+
"mutable": true,
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "boolean",
|
|
359
|
+
"resolved": "boolean",
|
|
360
|
+
"references": {}
|
|
361
|
+
},
|
|
362
|
+
"required": false,
|
|
363
|
+
"optional": false,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": "Is joining to challenge"
|
|
367
|
+
},
|
|
368
|
+
"attribute": "is-joining-to-challenge",
|
|
369
|
+
"reflect": false
|
|
370
|
+
},
|
|
371
|
+
"pausedChallengeIds": {
|
|
372
|
+
"type": "unknown",
|
|
373
|
+
"mutable": true,
|
|
374
|
+
"complexType": {
|
|
375
|
+
"original": "string[]",
|
|
376
|
+
"resolved": "string[]",
|
|
377
|
+
"references": {}
|
|
378
|
+
},
|
|
379
|
+
"required": false,
|
|
380
|
+
"optional": false,
|
|
381
|
+
"docs": {
|
|
382
|
+
"tags": [],
|
|
383
|
+
"text": "Paused Challenge Ids"
|
|
384
|
+
},
|
|
385
|
+
"defaultValue": "[] as Array<string>"
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
static get states() {
|
|
390
|
+
return {
|
|
391
|
+
"limitStylingAppends": {},
|
|
392
|
+
"timer": {},
|
|
393
|
+
"showDetails": {},
|
|
394
|
+
"isExpiredChallenge": {}
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
static get events() {
|
|
398
|
+
return [{
|
|
399
|
+
"method": "close",
|
|
400
|
+
"name": "close",
|
|
401
|
+
"bubbles": true,
|
|
402
|
+
"cancelable": true,
|
|
403
|
+
"composed": true,
|
|
404
|
+
"docs": {
|
|
405
|
+
"tags": [],
|
|
406
|
+
"text": ""
|
|
407
|
+
},
|
|
408
|
+
"complexType": {
|
|
409
|
+
"original": "void",
|
|
410
|
+
"resolved": "void",
|
|
411
|
+
"references": {}
|
|
412
|
+
}
|
|
413
|
+
}, {
|
|
414
|
+
"method": "back",
|
|
415
|
+
"name": "back",
|
|
416
|
+
"bubbles": true,
|
|
417
|
+
"cancelable": true,
|
|
418
|
+
"composed": true,
|
|
419
|
+
"docs": {
|
|
420
|
+
"tags": [],
|
|
421
|
+
"text": ""
|
|
422
|
+
},
|
|
423
|
+
"complexType": {
|
|
424
|
+
"original": "void",
|
|
425
|
+
"resolved": "void",
|
|
426
|
+
"references": {}
|
|
427
|
+
}
|
|
428
|
+
}, {
|
|
429
|
+
"method": "resetNewChallengeLabel",
|
|
430
|
+
"name": "resetNewChallengeLabel",
|
|
431
|
+
"bubbles": true,
|
|
432
|
+
"cancelable": true,
|
|
433
|
+
"composed": true,
|
|
434
|
+
"docs": {
|
|
435
|
+
"tags": [],
|
|
436
|
+
"text": ""
|
|
437
|
+
},
|
|
438
|
+
"complexType": {
|
|
439
|
+
"original": "string",
|
|
440
|
+
"resolved": "string",
|
|
441
|
+
"references": {}
|
|
442
|
+
}
|
|
443
|
+
}];
|
|
444
|
+
}
|
|
445
|
+
static get elementRef() { return "host"; }
|
|
446
|
+
static get watchers() {
|
|
447
|
+
return [{
|
|
448
|
+
"propName": "challenge",
|
|
449
|
+
"methodName": "challengePropHandler"
|
|
450
|
+
}];
|
|
451
|
+
}
|
|
507
452
|
}
|