@everymatrix/casino-challenges-container 0.3.15 → 0.3.17
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-challenges-container/casino-challenge-card_6.entry.js +1 -1
- package/dist/casino-challenges-container/casino-challenges-container-9609395d.js +1 -0
- package/dist/casino-challenges-container/casino-challenges-container.esm.js +1 -1
- package/dist/casino-challenges-container/index-889cb07d.js +2 -0
- package/dist/casino-challenges-container/index.esm.js +1 -1
- package/dist/cjs/casino-challenge-card_6.cjs.entry.js +20 -6
- package/dist/cjs/{casino-challenges-container-d393937e.js → casino-challenges-container-29a7bf89.js} +178 -30
- package/dist/cjs/casino-challenges-container.cjs.js +2 -2
- package/dist/cjs/{index-d5f8d1ee.js → index-076c8c1d.js} +69 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/casino-challenges-container/casino-challenges-container.js +128 -30
- package/dist/collection/utils/types.js +19 -8
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/casino-challenge-card_6.entry.js +21 -7
- package/dist/esm/{casino-challenges-container-bb64adfe.js → casino-challenges-container-9609395d.js} +178 -30
- package/dist/esm/casino-challenges-container.js +3 -3
- package/dist/esm/{index-7720ad93.js → index-889cb07d.js} +69 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/casino-challenges-container/casino-challenges-container.d.ts +9 -4
- package/dist/types/utils/types.d.ts +20 -8
- package/dist/types/utils/utils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/casino-challenges-container/casino-challenges-container-bb64adfe.js +0 -1
- package/dist/casino-challenges-container/index-7720ad93.js +0 -2
package/dist/esm/{casino-challenges-container-bb64adfe.js → casino-challenges-container-9609395d.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-889cb07d.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name setClientStyling
|
|
@@ -120,19 +120,74 @@ const errorCircleSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD
|
|
|
120
120
|
|
|
121
121
|
const checkCircleSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS4wMDA3IDQuNzQ5OTJDMTEuMTMwNiA0Ljc0OTkyIDQuNzUwNjUgMTEuMTI5OSA0Ljc1MDY1IDE4Ljk5OTlDNC43NTA2NSAyNi44NyAxMS4xMzA2IDMzLjI0OTkgMTkuMDAwNyAzMy4yNDk5QzI2Ljg3MDcgMzMuMjQ5OSAzMy4yNTA3IDI2Ljg3IDMzLjI1MDcgMTguOTk5OUMzMy4yNTA3IDExLjEyOTkgMjYuODcwNyA0Ljc0OTkyIDE5LjAwMDcgNC43NDk5MlpNMS41ODM5OCAxOC45OTk5QzEuNTgzOTggOS4zODA5NiA5LjM4MTY5IDEuNTgzMjUgMTkuMDAwNyAxLjU4MzI1QzI4LjYxOTYgMS41ODMyNSAzNi40MTczIDkuMzgwOTYgMzYuNDE3MyAxOC45OTk5QzM2LjQxNzMgMjguNjE4OSAyOC42MTk2IDM2LjQxNjYgMTkuMDAwNyAzNi40MTY2QzkuMzgxNjkgMzYuNDE2NiAxLjU4Mzk4IDI4LjYxODkgMS41ODM5OCAxOC45OTk5Wk0yNy4yNDUyIDEzLjEzMDNDMjcuODYzNiAxMy43NDg3IDI3Ljg2MzYgMTQuNzUxMiAyNy4yNDUyIDE1LjM2OTVMMTcuNzQ1MiAyNC44Njk1QzE3LjEyNjkgMjUuNDg3OCAxNi4xMjQ0IDI1LjQ4NzggMTUuNTA2MSAyNC44Njk1TDEwLjc1NjEgMjAuMTE5NUMxMC4xMzc3IDE5LjUwMTIgMTAuMTM3NyAxOC40OTg3IDEwLjc1NjEgMTcuODgwM0MxMS4zNzQ0IDE3LjI2MiAxMi4zNzY5IDE3LjI2MiAxMi45OTUyIDE3Ljg4MDNMMTYuNjI1NyAyMS41MTA3TDI1LjAwNjEgMTMuMTMwM0MyNS42MjQ0IDEyLjUxMiAyNi42MjY5IDEyLjUxMiAyNy4yNDUyIDEzLjEzMDNaIiBmaWxsPSIjMDBCNzRGIi8+Cjwvc3ZnPgo=';
|
|
122
122
|
|
|
123
|
+
var EChallengeLevelTargetType;
|
|
124
|
+
(function (EChallengeLevelTargetType) {
|
|
125
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["Accumulative"] = 0] = "Accumulative";
|
|
126
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["SingleBet"] = 1] = "SingleBet";
|
|
127
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["MultipleOneBetSize"] = 2] = "MultipleOneBetSize";
|
|
128
|
+
})(EChallengeLevelTargetType || (EChallengeLevelTargetType = {}));
|
|
129
|
+
var EChallengeRecurrenceType;
|
|
130
|
+
(function (EChallengeRecurrenceType) {
|
|
131
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Single"] = 0] = "Single";
|
|
132
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Daily"] = 1] = "Daily";
|
|
133
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Weekly"] = 2] = "Weekly";
|
|
134
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Monthly"] = 3] = "Monthly";
|
|
135
|
+
})(EChallengeRecurrenceType || (EChallengeRecurrenceType = {}));
|
|
136
|
+
var EChallengeRewardType;
|
|
137
|
+
(function (EChallengeRewardType) {
|
|
138
|
+
EChallengeRewardType[EChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
|
|
139
|
+
EChallengeRewardType[EChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
|
|
140
|
+
EChallengeRewardType[EChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
|
|
141
|
+
EChallengeRewardType[EChallengeRewardType["Challenge"] = 3] = "Challenge";
|
|
142
|
+
EChallengeRewardType[EChallengeRewardType["Custom"] = 4] = "Custom";
|
|
143
|
+
})(EChallengeRewardType || (EChallengeRewardType = {}));
|
|
144
|
+
var EChallengeProgressStatus;
|
|
145
|
+
(function (EChallengeProgressStatus) {
|
|
146
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Started"] = 0] = "Started";
|
|
147
|
+
EChallengeProgressStatus[EChallengeProgressStatus["InProgress"] = 1] = "InProgress";
|
|
148
|
+
EChallengeProgressStatus[EChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
|
|
149
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Completed"] = 3] = "Completed";
|
|
150
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Expired"] = 4] = "Expired";
|
|
151
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
152
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
153
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
154
|
+
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
155
|
+
var EChallengeTriggerType;
|
|
156
|
+
(function (EChallengeTriggerType) {
|
|
157
|
+
EChallengeTriggerType[EChallengeTriggerType["GameLaunch"] = 0] = "GameLaunch";
|
|
158
|
+
EChallengeTriggerType[EChallengeTriggerType["Reward"] = 1] = "Reward";
|
|
159
|
+
EChallengeTriggerType[EChallengeTriggerType["Manual"] = 2] = "Manual";
|
|
160
|
+
})(EChallengeTriggerType || (EChallengeTriggerType = {}));
|
|
161
|
+
var EChallengeValidityType;
|
|
162
|
+
(function (EChallengeValidityType) {
|
|
163
|
+
EChallengeValidityType[EChallengeValidityType["Period"] = 0] = "Period";
|
|
164
|
+
EChallengeValidityType[EChallengeValidityType["Date"] = 1] = "Date";
|
|
165
|
+
})(EChallengeValidityType || (EChallengeValidityType = {}));
|
|
166
|
+
var EChallengeStatus;
|
|
167
|
+
(function (EChallengeStatus) {
|
|
168
|
+
EChallengeStatus[EChallengeStatus["Draft"] = 0] = "Draft";
|
|
169
|
+
EChallengeStatus[EChallengeStatus["Enabled"] = 1] = "Enabled";
|
|
170
|
+
EChallengeStatus[EChallengeStatus["Paused"] = 2] = "Paused";
|
|
171
|
+
EChallengeStatus[EChallengeStatus["Closed"] = 3] = "Closed";
|
|
172
|
+
EChallengeStatus[EChallengeStatus["Deleted"] = 4] = "Deleted";
|
|
173
|
+
})(EChallengeStatus || (EChallengeStatus = {}));
|
|
174
|
+
var EHistoryItemLevelStatus;
|
|
175
|
+
(function (EHistoryItemLevelStatus) {
|
|
176
|
+
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Completed"] = 0] = "Completed";
|
|
177
|
+
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Expired"] = 1] = "Expired";
|
|
178
|
+
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Forfeited"] = 2] = "Forfeited";
|
|
179
|
+
})(EHistoryItemLevelStatus || (EHistoryItemLevelStatus = {}));
|
|
180
|
+
|
|
181
|
+
function updateInState(array, id, updates) {
|
|
182
|
+
return array.map((el) => (el.Id === id ? Object.assign(Object.assign({}, el), updates) : el));
|
|
183
|
+
}
|
|
184
|
+
|
|
123
185
|
const casinoChallengesContainerCss = ".challenges {\n container-type: inline-size;\n container-name: challenges-container;\n background-color: var(--emw--color-background, #000);\n padding: 16px 12px;\n min-height: 100vh;\n}\n.challenges__header {\n margin: 0 0 32px;\n display: flex;\n justify-content: space-between;\n}\n.challenges__title {\n margin: 0;\n display: flex;\n gap: 10px;\n align-items: center;\n font-size: var(--emw--font-size-x-large, 24px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-white, #ffffff);\n}\n.challenges__tabs {\n display: flex;\n gap: 12px;\n border-radius: 48px;\n padding: 6px;\n color: var(--emw--color-gray-150, #c8d6ce);\n background-color: var(--emw--color-background-secondary, #272727);\n}\n.challenges__tab {\n padding: 10px 16px;\n border-radius: 40px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n cursor: pointer;\n text-align: center;\n width: 95px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n}\n.challenges__tab.active {\n color: var(--emw--color-white, #ffffff);\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n}\n.challenges__tab:last-child {\n width: inherit;\n padding: 10px 16px;\n}\n@container challenges-container (max-width: 800px) {\n .challenges__header {\n margin: 0 0 16px;\n flex-wrap: wrap;\n row-gap: 12px;\n }\n .challenges__title {\n width: 100%;\n font-size: var(--emw--font-size-large, 20px);\n }\n .challenges__title img {\n height: 32px;\n }\n .challenges__tabs {\n width: 100%;\n gap: 8px;\n }\n .challenges__tab {\n flex: 1;\n padding: 5px 0;\n font-size: var(--emw--font-size-x-small, 12px);\n }\n .challenges__tab:last-child {\n width: inherit;\n padding: 5px 0;\n }\n}\n\n.notification {\n display: flex;\n position: absolute;\n z-index: 400;\n align-items: center;\n bottom: 90px;\n box-shadow: 0 0 20px 0 rgba(136, 143, 170, 0.15);\n border-radius: 8px;\n padding: 20px 16px;\n gap: 16px;\n right: 40px;\n max-width: 445px;\n box-sizing: border-box;\n background-color: var(--emw--background-success-color, #C9F0D7);\n border: 2px solid var(--emw--border-success-color, #00B74F);\n}\n.notification.errored {\n background: var(--emw--background-errored-color, #FFE1DF);\n border-color: var(--emw--color-error, #D6421E);\n}\n.notification__icon {\n width: 32px;\n height: 32px;\n}\n.notification__message {\n margin: 0;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.notification__message .active-tab {\n color: var(--emw--border-success-color, #00B74F);\n text-decoration-line: underline;\n cursor: pointer;\n}\n@container challenges-container (max-width: 576px) {\n .notification {\n bottom: 60px;\n right: 12px;\n max-width: 290px;\n }\n}";
|
|
124
186
|
const CasinoChallengesContainerStyle0 = casinoChallengesContainerCss;
|
|
125
187
|
|
|
126
188
|
const CasinoChallengesContainer = class {
|
|
127
189
|
constructor(hostRef) {
|
|
128
190
|
registerInstance(this, hostRef);
|
|
129
|
-
this.tabs = [
|
|
130
|
-
translate('active', this.language),
|
|
131
|
-
translate('pending', this.language),
|
|
132
|
-
translate('finished', this.language),
|
|
133
|
-
translate('code', this.language)
|
|
134
|
-
];
|
|
135
|
-
this.showNotification = 1;
|
|
136
191
|
this.onOpenNotification = (event) => {
|
|
137
192
|
this.notification = event.detail;
|
|
138
193
|
setTimeout(() => (this.notification = null), 10000);
|
|
@@ -149,11 +204,16 @@ const CasinoChallengesContainer = class {
|
|
|
149
204
|
this.pageNumber += 1;
|
|
150
205
|
this.getChallenges().then((res) => {
|
|
151
206
|
this.total = res.TotalCount;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
207
|
+
switch (this.activeTabIndex) {
|
|
208
|
+
case 0:
|
|
209
|
+
this.activeChallenges = [...this.activeChallenges, ...res.Data];
|
|
210
|
+
break;
|
|
211
|
+
case 1:
|
|
212
|
+
this.pendingChallenges = [...this.pendingChallenges, ...res.Data];
|
|
213
|
+
break;
|
|
214
|
+
case 2:
|
|
215
|
+
this.playerHistory = [...this.playerHistory, ...res.Data];
|
|
216
|
+
break;
|
|
157
217
|
}
|
|
158
218
|
});
|
|
159
219
|
};
|
|
@@ -161,7 +221,6 @@ const CasinoChallengesContainer = class {
|
|
|
161
221
|
if (index !== this.activeTabIndex) {
|
|
162
222
|
this.notification = null;
|
|
163
223
|
this.activeTabIndex = index;
|
|
164
|
-
this.challenges = [];
|
|
165
224
|
this.pageNumber = 0;
|
|
166
225
|
this.total = 0;
|
|
167
226
|
this.loadData();
|
|
@@ -170,6 +229,25 @@ const CasinoChallengesContainer = class {
|
|
|
170
229
|
this.renderNotification = () => {
|
|
171
230
|
return (h("div", { class: `notification ${this.notification.errored ? 'errored' : ''}` }, h("img", { src: this.notification.errored ? errorCircleSvg : checkCircleSvg, class: "notification__icon" }), h("p", { class: "notification__message" }, this.notification.message + ' ', this.notification.showTabLink && (h("span", { class: "active-tab", onClick: this.handleTabClick(0) }, translate('activeTab', this.language))))));
|
|
172
231
|
};
|
|
232
|
+
this.onTimerExpired = (e) => {
|
|
233
|
+
const currentTabIndex = this.activeTabIndex;
|
|
234
|
+
setTimeout(() => {
|
|
235
|
+
if (currentTabIndex === 0) {
|
|
236
|
+
this.activeChallenges = this.activeChallenges.filter((challenge) => challenge.Id !== e.detail);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
this.pendingChallenges = this.pendingChallenges.filter((challenge) => challenge.Id !== e.detail);
|
|
240
|
+
}
|
|
241
|
+
}, 10000);
|
|
242
|
+
};
|
|
243
|
+
this.onItemViewed = (e) => {
|
|
244
|
+
if (this.activeTabIndex === 0) {
|
|
245
|
+
this.activeChallenges = updateInState(this.activeChallenges, e.detail, { IsNew: false });
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, e.detail, { IsNew: false });
|
|
249
|
+
}
|
|
250
|
+
};
|
|
173
251
|
this.mbSource = undefined;
|
|
174
252
|
this.clientStyling = undefined;
|
|
175
253
|
this.clientStylingUrl = undefined;
|
|
@@ -182,7 +260,8 @@ const CasinoChallengesContainer = class {
|
|
|
182
260
|
this.activeTabIndex = 0;
|
|
183
261
|
this.error = '';
|
|
184
262
|
this.hasError = false;
|
|
185
|
-
this.
|
|
263
|
+
this.activeChallenges = [];
|
|
264
|
+
this.pendingChallenges = [];
|
|
186
265
|
this.playerHistory = [];
|
|
187
266
|
this.loading = false;
|
|
188
267
|
this.pageNumber = 0;
|
|
@@ -190,6 +269,73 @@ const CasinoChallengesContainer = class {
|
|
|
190
269
|
this.pageSize = 20;
|
|
191
270
|
this.notification = null;
|
|
192
271
|
}
|
|
272
|
+
get tabs() {
|
|
273
|
+
var _a, _b;
|
|
274
|
+
return [
|
|
275
|
+
{ label: translate('active', this.language), showNotification: (_a = this.activeChallenges) === null || _a === void 0 ? void 0 : _a.some((x) => x.IsNew) },
|
|
276
|
+
{ label: translate('pending', this.language), showNotification: (_b = this.pendingChallenges) === null || _b === void 0 ? void 0 : _b.some((x) => x.IsNew) },
|
|
277
|
+
{ label: translate('finished', this.language) },
|
|
278
|
+
{ label: translate('code', this.language) }
|
|
279
|
+
];
|
|
280
|
+
}
|
|
281
|
+
handleEvent(e) {
|
|
282
|
+
const { data } = e === null || e === void 0 ? void 0 : e.data;
|
|
283
|
+
switch (data === null || data === void 0 ? void 0 : data.messageType) {
|
|
284
|
+
case 'newProgressNotification': {
|
|
285
|
+
const newChallengeProgress = data === null || data === void 0 ? void 0 : data.challengeProgress;
|
|
286
|
+
if (this.activeTabIndex === 0 && newChallengeProgress.Status === EChallengeProgressStatus.Started) {
|
|
287
|
+
this.activeChallenges = [newChallengeProgress, ...this.activeChallenges];
|
|
288
|
+
}
|
|
289
|
+
else if (this.activeTabIndex === 1 && newChallengeProgress.Status === EChallengeProgressStatus.Awaiting) {
|
|
290
|
+
this.pendingChallenges = [newChallengeProgress, ...this.pendingChallenges];
|
|
291
|
+
}
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
case 'disabledChallengeNotification': {
|
|
295
|
+
if (this.activeTabIndex === 0) {
|
|
296
|
+
this.activeChallenges = updateInState(this.activeChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
297
|
+
StatusName: 'Paused',
|
|
298
|
+
ChallengeStatus: EChallengeStatus.Paused
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
else if (this.activeTabIndex === 1) {
|
|
302
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
303
|
+
StatusName: 'Paused',
|
|
304
|
+
ChallengeStatus: EChallengeStatus.Paused
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
case 'enabledChallengeNotification': {
|
|
310
|
+
if (this.activeTabIndex === 0) {
|
|
311
|
+
this.activeChallenges = updateInState(this.activeChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
312
|
+
StatusName: 'Enabled',
|
|
313
|
+
ChallengeStatus: EChallengeStatus.Enabled
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
else if (this.activeTabIndex === 1) {
|
|
317
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
318
|
+
StatusName: 'Enabled',
|
|
319
|
+
ChallengeStatus: EChallengeStatus.Enabled
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
case 'forfeitedChallengeProgressNotification': {
|
|
325
|
+
if (this.activeTabIndex === 0) {
|
|
326
|
+
this.activeChallenges = updateInState(this.activeChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
327
|
+
Status: EChallengeProgressStatus.Forfeited
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
else if (this.activeTabIndex === 1) {
|
|
331
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
332
|
+
Status: EChallengeProgressStatus.Forfeited
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
193
339
|
handleClientStylingChange(newValue, oldValue) {
|
|
194
340
|
if (newValue != oldValue) {
|
|
195
341
|
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
@@ -232,11 +378,16 @@ const CasinoChallengesContainer = class {
|
|
|
232
378
|
if (res === null || res === void 0 ? void 0 : res.Success) {
|
|
233
379
|
this.pageNumber = res.PageNumber;
|
|
234
380
|
this.total = res.TotalCount;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
381
|
+
switch (this.activeTabIndex) {
|
|
382
|
+
case 0:
|
|
383
|
+
this.activeChallenges = res.Data;
|
|
384
|
+
break;
|
|
385
|
+
case 1:
|
|
386
|
+
this.pendingChallenges = res.Data;
|
|
387
|
+
break;
|
|
388
|
+
case 2:
|
|
389
|
+
this.playerHistory = res.Data;
|
|
390
|
+
break;
|
|
240
391
|
}
|
|
241
392
|
}
|
|
242
393
|
});
|
|
@@ -260,24 +411,21 @@ const CasinoChallengesContainer = class {
|
|
|
260
411
|
resolveTranslationUrl(this.translationUrl);
|
|
261
412
|
}
|
|
262
413
|
}
|
|
263
|
-
onTimerExpired(e) {
|
|
264
|
-
setTimeout(() => {
|
|
265
|
-
this.challenges = this.challenges.filter((challenge) => challenge.Id !== e.detail);
|
|
266
|
-
}, 10000);
|
|
267
|
-
}
|
|
268
414
|
renderChallengesContent() {
|
|
269
|
-
var _a, _b;
|
|
415
|
+
var _a, _b, _c;
|
|
270
416
|
switch (this.activeTabIndex) {
|
|
417
|
+
case 0:
|
|
418
|
+
return (h("casino-challenges-list", { challenges: this.activeChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: ((_a = this.activeChallenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session }));
|
|
419
|
+
case 1:
|
|
420
|
+
return (h("casino-challenges-list", { challenges: this.pendingChallenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, loading: this.loading, hasMore: ((_b = this.pendingChallenges) === null || _b === void 0 ? void 0 : _b.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session }));
|
|
271
421
|
case 2:
|
|
272
|
-
return (h("casino-challenges-player-history", { translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((
|
|
422
|
+
return (h("casino-challenges-player-history", { translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_c = this.playerHistory) === null || _c === void 0 ? void 0 : _c.length) < this.total }));
|
|
273
423
|
case 3:
|
|
274
424
|
return (h("casino-challenges-claim-code", { translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification }));
|
|
275
|
-
default:
|
|
276
|
-
return (h("casino-challenges-list", { challenges: this.challenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, loading: this.loading, hasMore: ((_b = this.challenges) === null || _b === void 0 ? void 0 : _b.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex, isUserAuthorized: !!this.session, userId: this.userId, translationUrl: this.translationUrl, endpoint: this.endpoint, domain: this.domain, session: this.session }));
|
|
277
425
|
}
|
|
278
426
|
}
|
|
279
427
|
render() {
|
|
280
|
-
return (h("div", { key: '
|
|
428
|
+
return (h("div", { key: 'f3dc7f8a9c618087620557419291cd119d04db8f', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '44cb1b7c19293679cf011bef7ba231929d161b2e', class: "challenges" }, h("div", { key: 'f8820b3b7d9f8cf1655125f66cc90381d4fa7379', class: "challenges__header" }, h("h1", { key: 'f0adf67e0a23adf398856fe1487e4412d5f5e58c', class: "challenges__title" }, h("img", { key: '586fcea03149af87376460dbc64ecbb9519ea82d', src: titleIconSvg, alt: "icon" }), translate('title', this.language)), this.session && (h("div", { key: 'af096aeb2edecacae09fcc1ce1c2be71658cd666', class: "challenges__tabs" }, this.tabs.map((tab, index) => (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, tab.label, (tab === null || tab === void 0 ? void 0 : tab.showNotification) && h("img", { src: notificationSvg }))))))), this.renderChallengesContent(), this.notification && this.renderNotification())));
|
|
281
429
|
}
|
|
282
430
|
static get watchers() { return {
|
|
283
431
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -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-889cb07d.js';
|
|
2
|
+
export { s as setNonce } from './index-889cb07d.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-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"
|
|
19
|
+
return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32]},[[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeTabIndex":[514,"active-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeTabIndex":[514,"active-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-challenges-container';
|
|
2
|
-
const BUILD = /* casino-challenges-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener:
|
|
2
|
+
const BUILD = /* casino-challenges-container */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -84,6 +84,22 @@ var plt = {
|
|
|
84
84
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
85
85
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
86
86
|
};
|
|
87
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
88
|
+
let supportsListenerOptions2 = false;
|
|
89
|
+
try {
|
|
90
|
+
doc.addEventListener(
|
|
91
|
+
"e",
|
|
92
|
+
null,
|
|
93
|
+
Object.defineProperty({}, "passive", {
|
|
94
|
+
get() {
|
|
95
|
+
supportsListenerOptions2 = true;
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
);
|
|
99
|
+
} catch (e) {
|
|
100
|
+
}
|
|
101
|
+
return supportsListenerOptions2;
|
|
102
|
+
})();
|
|
87
103
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
88
104
|
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
89
105
|
try {
|
|
@@ -738,6 +754,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
738
754
|
}
|
|
739
755
|
let maybePromise;
|
|
740
756
|
if (isInitialLoad) {
|
|
757
|
+
{
|
|
758
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
759
|
+
if (hostRef.$queuedListeners$) {
|
|
760
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
761
|
+
hostRef.$queuedListeners$ = void 0;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
741
764
|
{
|
|
742
765
|
maybePromise = safeCall(instance, "componentWillLoad");
|
|
743
766
|
}
|
|
@@ -1072,6 +1095,7 @@ var connectedCallback = (elm) => {
|
|
|
1072
1095
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1073
1096
|
}
|
|
1074
1097
|
} else {
|
|
1098
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1075
1099
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1076
1100
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1077
1101
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
@@ -1089,6 +1113,12 @@ var disconnectInstance = (instance) => {
|
|
|
1089
1113
|
var disconnectedCallback = async (elm) => {
|
|
1090
1114
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1091
1115
|
const hostRef = getHostRef(elm);
|
|
1116
|
+
{
|
|
1117
|
+
if (hostRef.$rmListeners$) {
|
|
1118
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1119
|
+
hostRef.$rmListeners$ = void 0;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1092
1122
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1093
1123
|
disconnectInstance(hostRef.$lazyInstance$);
|
|
1094
1124
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
@@ -1128,6 +1158,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1128
1158
|
{
|
|
1129
1159
|
cmpMeta.$members$ = compactMeta[2];
|
|
1130
1160
|
}
|
|
1161
|
+
{
|
|
1162
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1163
|
+
}
|
|
1131
1164
|
{
|
|
1132
1165
|
cmpMeta.$attrsToReflect$ = [];
|
|
1133
1166
|
}
|
|
@@ -1159,9 +1192,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1159
1192
|
}
|
|
1160
1193
|
}
|
|
1161
1194
|
connectedCallback() {
|
|
1162
|
-
getHostRef(this);
|
|
1195
|
+
const hostRef = getHostRef(this);
|
|
1163
1196
|
if (!this.hasRegisteredEventListeners) {
|
|
1164
1197
|
this.hasRegisteredEventListeners = true;
|
|
1198
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
1165
1199
|
}
|
|
1166
1200
|
if (appLoadFallback) {
|
|
1167
1201
|
clearTimeout(appLoadFallback);
|
|
@@ -1216,6 +1250,39 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1216
1250
|
}
|
|
1217
1251
|
endBootstrap();
|
|
1218
1252
|
};
|
|
1253
|
+
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1254
|
+
if (listeners) {
|
|
1255
|
+
listeners.map(([flags, name, method]) => {
|
|
1256
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
1257
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1258
|
+
const opts = hostListenerOpts(flags);
|
|
1259
|
+
plt.ael(target, name, handler, opts);
|
|
1260
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
};
|
|
1264
|
+
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1265
|
+
var _a;
|
|
1266
|
+
try {
|
|
1267
|
+
{
|
|
1268
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
1269
|
+
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
1270
|
+
} else {
|
|
1271
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
} catch (e) {
|
|
1275
|
+
consoleError(e);
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1278
|
+
var getHostListenerTarget = (elm, flags) => {
|
|
1279
|
+
if (flags & 8 /* TargetWindow */) return win;
|
|
1280
|
+
return elm;
|
|
1281
|
+
};
|
|
1282
|
+
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
1283
|
+
passive: (flags & 1 /* Passive */) !== 0,
|
|
1284
|
+
capture: (flags & 2 /* Capture */) !== 0
|
|
1285
|
+
} : (flags & 2 /* Capture */) !== 0;
|
|
1219
1286
|
|
|
1220
1287
|
// src/runtime/nonce.ts
|
|
1221
1288
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CasinoChallengesContainer } from './casino-challenges-container-
|
|
2
|
-
import './index-
|
|
1
|
+
export { C as CasinoChallengesContainer } from './casino-challenges-container-9609395d.js';
|
|
2
|
+
import './index-889cb07d.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-889cb07d.js';
|
|
2
|
+
export { s as setNonce } from './index-889cb07d.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"
|
|
8
|
+
return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"activeChallenges":[32],"pendingChallenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32]},[[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"userId":["handleSessionChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeTabIndex":[514,"active-tab-index"],"isUserAuthorized":[516,"is-user-authorized"],"userId":[513,"user-id"],"endpoint":[513],"domain":[513],"session":[513]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeTabIndex":[514,"active-tab-index"],"userId":[513,"user-id"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32],"isChallengePaused":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenge":["handleChallengeChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -42,7 +42,8 @@ export declare class CasinoChallengesContainer {
|
|
|
42
42
|
activeTabIndex: number;
|
|
43
43
|
error: string;
|
|
44
44
|
hasError: boolean;
|
|
45
|
-
|
|
45
|
+
activeChallenges: IChallenge[];
|
|
46
|
+
pendingChallenges: IChallenge[];
|
|
46
47
|
playerHistory: IHistoryItem[];
|
|
47
48
|
loading: boolean;
|
|
48
49
|
pageNumber: number;
|
|
@@ -51,8 +52,11 @@ export declare class CasinoChallengesContainer {
|
|
|
51
52
|
notification: INotificationOptions;
|
|
52
53
|
private stylingContainer;
|
|
53
54
|
private stylingSubscription;
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
get tabs(): {
|
|
56
|
+
label: string;
|
|
57
|
+
showNotification?: boolean;
|
|
58
|
+
}[];
|
|
59
|
+
handleEvent(e: any): void;
|
|
56
60
|
handleClientStylingChange(newValue: any, oldValue: any): void;
|
|
57
61
|
handleClientStylingUrlChange(newValue: any, oldValue: any): void;
|
|
58
62
|
handleMbSourceChange(newValue: any, oldValue: any): void;
|
|
@@ -67,7 +71,8 @@ export declare class CasinoChallengesContainer {
|
|
|
67
71
|
componentWillLoad(): void;
|
|
68
72
|
private handleTabClick;
|
|
69
73
|
private renderNotification;
|
|
70
|
-
onTimerExpired(e: CustomEvent)
|
|
74
|
+
onTimerExpired: (e: CustomEvent) => void;
|
|
75
|
+
onItemViewed: (e: CustomEvent) => void;
|
|
71
76
|
renderChallengesContent(): any;
|
|
72
77
|
render(): any;
|
|
73
78
|
}
|
|
@@ -20,12 +20,15 @@ export declare enum EChallengeRewardType {
|
|
|
20
20
|
Challenge = 3,
|
|
21
21
|
Custom = 4
|
|
22
22
|
}
|
|
23
|
-
export declare enum
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
export declare enum EChallengeProgressStatus {
|
|
24
|
+
Started = 0,
|
|
25
|
+
InProgress = 1,
|
|
26
|
+
PendingLevelReward = 2,
|
|
27
|
+
Completed = 3,
|
|
28
|
+
Expired = 4,
|
|
29
|
+
Forfeited = 5,
|
|
30
|
+
Awaiting = 6,
|
|
31
|
+
Paused = 7
|
|
29
32
|
}
|
|
30
33
|
export declare enum EChallengeTriggerType {
|
|
31
34
|
GameLaunch = 0,
|
|
@@ -36,6 +39,13 @@ export declare enum EChallengeValidityType {
|
|
|
36
39
|
Period = 0,
|
|
37
40
|
Date = 1
|
|
38
41
|
}
|
|
42
|
+
export declare enum EChallengeStatus {
|
|
43
|
+
Draft = 0,
|
|
44
|
+
Enabled = 1,
|
|
45
|
+
Paused = 2,
|
|
46
|
+
Closed = 3,
|
|
47
|
+
Deleted = 4
|
|
48
|
+
}
|
|
39
49
|
export type ChallengeRecurrenceTypeName = 'Single' | 'Daily' | 'Weekly' | 'Monthly';
|
|
40
50
|
export type ChallengeStatusName = 'Draft' | 'Enabled' | 'Paused' | 'Closed' | 'Deleted';
|
|
41
51
|
export type ChallengeTriggerName = 'GameLaunch' | 'Reward';
|
|
@@ -92,7 +102,7 @@ export interface IChallengeBetRange {
|
|
|
92
102
|
MaxContributionAmount: number;
|
|
93
103
|
}
|
|
94
104
|
export interface IChallenge {
|
|
95
|
-
Status:
|
|
105
|
+
Status: EChallengeProgressStatus;
|
|
96
106
|
StatusName: ChallengeStatusName;
|
|
97
107
|
Name: string;
|
|
98
108
|
ChallengePresentations?: IChallengePresentation;
|
|
@@ -115,10 +125,12 @@ export interface IChallenge {
|
|
|
115
125
|
IncludedUserIdRange?: Array<Record<string, number>>;
|
|
116
126
|
ExcludedUserIdRange?: Array<Record<string, number>>;
|
|
117
127
|
IsPendingTrigger: boolean;
|
|
118
|
-
Id:
|
|
128
|
+
Id: string;
|
|
119
129
|
DomainId: number;
|
|
120
130
|
Removed: boolean;
|
|
121
131
|
TotalGrantLimit: number;
|
|
132
|
+
IsNew: boolean;
|
|
133
|
+
ChallengeStatus: EChallengeStatus;
|
|
122
134
|
IncludedUserRoles?: string[] | null;
|
|
123
135
|
ExcludedUserRoles?: string[] | null;
|
|
124
136
|
}
|