@everymatrix/casino-challenges-container 0.3.16 → 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-076c8c1d.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[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],"
|
|
22
|
+
return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[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);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'casino-challenges-container';
|
|
24
|
-
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:
|
|
24
|
+
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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -106,6 +106,22 @@ var plt = {
|
|
|
106
106
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
107
107
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
108
108
|
};
|
|
109
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
110
|
+
let supportsListenerOptions2 = false;
|
|
111
|
+
try {
|
|
112
|
+
doc.addEventListener(
|
|
113
|
+
"e",
|
|
114
|
+
null,
|
|
115
|
+
Object.defineProperty({}, "passive", {
|
|
116
|
+
get() {
|
|
117
|
+
supportsListenerOptions2 = true;
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
);
|
|
121
|
+
} catch (e) {
|
|
122
|
+
}
|
|
123
|
+
return supportsListenerOptions2;
|
|
124
|
+
})();
|
|
109
125
|
var promiseResolve = (v) => Promise.resolve(v);
|
|
110
126
|
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
111
127
|
try {
|
|
@@ -760,6 +776,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
760
776
|
}
|
|
761
777
|
let maybePromise;
|
|
762
778
|
if (isInitialLoad) {
|
|
779
|
+
{
|
|
780
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
781
|
+
if (hostRef.$queuedListeners$) {
|
|
782
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
783
|
+
hostRef.$queuedListeners$ = void 0;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
763
786
|
{
|
|
764
787
|
maybePromise = safeCall(instance, "componentWillLoad");
|
|
765
788
|
}
|
|
@@ -1094,6 +1117,7 @@ var connectedCallback = (elm) => {
|
|
|
1094
1117
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1095
1118
|
}
|
|
1096
1119
|
} else {
|
|
1120
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1097
1121
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1098
1122
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1099
1123
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
@@ -1111,6 +1135,12 @@ var disconnectInstance = (instance) => {
|
|
|
1111
1135
|
var disconnectedCallback = async (elm) => {
|
|
1112
1136
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1113
1137
|
const hostRef = getHostRef(elm);
|
|
1138
|
+
{
|
|
1139
|
+
if (hostRef.$rmListeners$) {
|
|
1140
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1141
|
+
hostRef.$rmListeners$ = void 0;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1114
1144
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1115
1145
|
disconnectInstance(hostRef.$lazyInstance$);
|
|
1116
1146
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
@@ -1150,6 +1180,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1150
1180
|
{
|
|
1151
1181
|
cmpMeta.$members$ = compactMeta[2];
|
|
1152
1182
|
}
|
|
1183
|
+
{
|
|
1184
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1185
|
+
}
|
|
1153
1186
|
{
|
|
1154
1187
|
cmpMeta.$attrsToReflect$ = [];
|
|
1155
1188
|
}
|
|
@@ -1181,9 +1214,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1181
1214
|
}
|
|
1182
1215
|
}
|
|
1183
1216
|
connectedCallback() {
|
|
1184
|
-
getHostRef(this);
|
|
1217
|
+
const hostRef = getHostRef(this);
|
|
1185
1218
|
if (!this.hasRegisteredEventListeners) {
|
|
1186
1219
|
this.hasRegisteredEventListeners = true;
|
|
1220
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
1187
1221
|
}
|
|
1188
1222
|
if (appLoadFallback) {
|
|
1189
1223
|
clearTimeout(appLoadFallback);
|
|
@@ -1238,6 +1272,39 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1238
1272
|
}
|
|
1239
1273
|
endBootstrap();
|
|
1240
1274
|
};
|
|
1275
|
+
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1276
|
+
if (listeners) {
|
|
1277
|
+
listeners.map(([flags, name, method]) => {
|
|
1278
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
1279
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1280
|
+
const opts = hostListenerOpts(flags);
|
|
1281
|
+
plt.ael(target, name, handler, opts);
|
|
1282
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1287
|
+
var _a;
|
|
1288
|
+
try {
|
|
1289
|
+
{
|
|
1290
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
1291
|
+
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
1292
|
+
} else {
|
|
1293
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
} catch (e) {
|
|
1297
|
+
consoleError(e);
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
var getHostListenerTarget = (elm, flags) => {
|
|
1301
|
+
if (flags & 8 /* TargetWindow */) return win;
|
|
1302
|
+
return elm;
|
|
1303
|
+
};
|
|
1304
|
+
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
1305
|
+
passive: (flags & 1 /* Passive */) !== 0,
|
|
1306
|
+
capture: (flags & 2 /* Capture */) !== 0
|
|
1307
|
+
} : (flags & 2 /* Capture */) !== 0;
|
|
1241
1308
|
|
|
1242
1309
|
// src/runtime/nonce.ts
|
|
1243
1310
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoChallengesContainer = require('./casino-challenges-container-
|
|
6
|
-
require('./index-
|
|
5
|
+
const casinoChallengesContainer = require('./casino-challenges-container-29a7bf89.js');
|
|
6
|
+
require('./index-076c8c1d.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-076c8c1d.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[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],"
|
|
11
|
+
return index.bootstrapLazy([["casino-challenge-card_6.cjs",[[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);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
package/dist/collection/components/casino-challenges-container/casino-challenges-container.js
CHANGED
|
@@ -5,18 +5,13 @@ import titleIcon from "../../assets/title-icon.svg";
|
|
|
5
5
|
import notificationIcon from "../../assets/notification.svg";
|
|
6
6
|
import errorIcon from "../../assets/error-circle.svg";
|
|
7
7
|
import checkIcon from "../../assets/check-circle.svg";
|
|
8
|
+
import { EChallengeProgressStatus, EChallengeStatus } from "../../utils/types";
|
|
8
9
|
import "../../../../../casino-challenges-list/dist/types/index";
|
|
9
10
|
import "../../../../../casino-challenges-player-history/dist/types/index";
|
|
10
11
|
import "../../../../../casino-challenges-claim-code/dist/types/index";
|
|
12
|
+
import { updateInState } from "../../utils/utils";
|
|
11
13
|
export class CasinoChallengesContainer {
|
|
12
14
|
constructor() {
|
|
13
|
-
this.tabs = [
|
|
14
|
-
translate('active', this.language),
|
|
15
|
-
translate('pending', this.language),
|
|
16
|
-
translate('finished', this.language),
|
|
17
|
-
translate('code', this.language)
|
|
18
|
-
];
|
|
19
|
-
this.showNotification = 1;
|
|
20
15
|
this.onOpenNotification = (event) => {
|
|
21
16
|
this.notification = event.detail;
|
|
22
17
|
setTimeout(() => (this.notification = null), 10000);
|
|
@@ -33,11 +28,16 @@ export class CasinoChallengesContainer {
|
|
|
33
28
|
this.pageNumber += 1;
|
|
34
29
|
this.getChallenges().then((res) => {
|
|
35
30
|
this.total = res.TotalCount;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
switch (this.activeTabIndex) {
|
|
32
|
+
case 0:
|
|
33
|
+
this.activeChallenges = [...this.activeChallenges, ...res.Data];
|
|
34
|
+
break;
|
|
35
|
+
case 1:
|
|
36
|
+
this.pendingChallenges = [...this.pendingChallenges, ...res.Data];
|
|
37
|
+
break;
|
|
38
|
+
case 2:
|
|
39
|
+
this.playerHistory = [...this.playerHistory, ...res.Data];
|
|
40
|
+
break;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
};
|
|
@@ -45,7 +45,6 @@ export class CasinoChallengesContainer {
|
|
|
45
45
|
if (index !== this.activeTabIndex) {
|
|
46
46
|
this.notification = null;
|
|
47
47
|
this.activeTabIndex = index;
|
|
48
|
-
this.challenges = [];
|
|
49
48
|
this.pageNumber = 0;
|
|
50
49
|
this.total = 0;
|
|
51
50
|
this.loadData();
|
|
@@ -54,6 +53,25 @@ export class CasinoChallengesContainer {
|
|
|
54
53
|
this.renderNotification = () => {
|
|
55
54
|
return (h("div", { class: `notification ${this.notification.errored ? 'errored' : ''}` }, h("img", { src: this.notification.errored ? errorIcon : checkIcon, 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))))));
|
|
56
55
|
};
|
|
56
|
+
this.onTimerExpired = (e) => {
|
|
57
|
+
const currentTabIndex = this.activeTabIndex;
|
|
58
|
+
setTimeout(() => {
|
|
59
|
+
if (currentTabIndex === 0) {
|
|
60
|
+
this.activeChallenges = this.activeChallenges.filter((challenge) => challenge.Id !== e.detail);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.pendingChallenges = this.pendingChallenges.filter((challenge) => challenge.Id !== e.detail);
|
|
64
|
+
}
|
|
65
|
+
}, 10000);
|
|
66
|
+
};
|
|
67
|
+
this.onItemViewed = (e) => {
|
|
68
|
+
if (this.activeTabIndex === 0) {
|
|
69
|
+
this.activeChallenges = updateInState(this.activeChallenges, e.detail, { IsNew: false });
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, e.detail, { IsNew: false });
|
|
73
|
+
}
|
|
74
|
+
};
|
|
57
75
|
this.mbSource = undefined;
|
|
58
76
|
this.clientStyling = undefined;
|
|
59
77
|
this.clientStylingUrl = undefined;
|
|
@@ -66,7 +84,8 @@ export class CasinoChallengesContainer {
|
|
|
66
84
|
this.activeTabIndex = 0;
|
|
67
85
|
this.error = '';
|
|
68
86
|
this.hasError = false;
|
|
69
|
-
this.
|
|
87
|
+
this.activeChallenges = [];
|
|
88
|
+
this.pendingChallenges = [];
|
|
70
89
|
this.playerHistory = [];
|
|
71
90
|
this.loading = false;
|
|
72
91
|
this.pageNumber = 0;
|
|
@@ -74,6 +93,73 @@ export class CasinoChallengesContainer {
|
|
|
74
93
|
this.pageSize = 20;
|
|
75
94
|
this.notification = null;
|
|
76
95
|
}
|
|
96
|
+
get tabs() {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
return [
|
|
99
|
+
{ label: translate('active', this.language), showNotification: (_a = this.activeChallenges) === null || _a === void 0 ? void 0 : _a.some((x) => x.IsNew) },
|
|
100
|
+
{ label: translate('pending', this.language), showNotification: (_b = this.pendingChallenges) === null || _b === void 0 ? void 0 : _b.some((x) => x.IsNew) },
|
|
101
|
+
{ label: translate('finished', this.language) },
|
|
102
|
+
{ label: translate('code', this.language) }
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
handleEvent(e) {
|
|
106
|
+
const { data } = e === null || e === void 0 ? void 0 : e.data;
|
|
107
|
+
switch (data === null || data === void 0 ? void 0 : data.messageType) {
|
|
108
|
+
case 'newProgressNotification': {
|
|
109
|
+
const newChallengeProgress = data === null || data === void 0 ? void 0 : data.challengeProgress;
|
|
110
|
+
if (this.activeTabIndex === 0 && newChallengeProgress.Status === EChallengeProgressStatus.Started) {
|
|
111
|
+
this.activeChallenges = [newChallengeProgress, ...this.activeChallenges];
|
|
112
|
+
}
|
|
113
|
+
else if (this.activeTabIndex === 1 && newChallengeProgress.Status === EChallengeProgressStatus.Awaiting) {
|
|
114
|
+
this.pendingChallenges = [newChallengeProgress, ...this.pendingChallenges];
|
|
115
|
+
}
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case 'disabledChallengeNotification': {
|
|
119
|
+
if (this.activeTabIndex === 0) {
|
|
120
|
+
this.activeChallenges = updateInState(this.activeChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
121
|
+
StatusName: 'Paused',
|
|
122
|
+
ChallengeStatus: EChallengeStatus.Paused
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
else if (this.activeTabIndex === 1) {
|
|
126
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
127
|
+
StatusName: 'Paused',
|
|
128
|
+
ChallengeStatus: EChallengeStatus.Paused
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case 'enabledChallengeNotification': {
|
|
134
|
+
if (this.activeTabIndex === 0) {
|
|
135
|
+
this.activeChallenges = updateInState(this.activeChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
136
|
+
StatusName: 'Enabled',
|
|
137
|
+
ChallengeStatus: EChallengeStatus.Enabled
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
else if (this.activeTabIndex === 1) {
|
|
141
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
142
|
+
StatusName: 'Enabled',
|
|
143
|
+
ChallengeStatus: EChallengeStatus.Enabled
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
case 'forfeitedChallengeProgressNotification': {
|
|
149
|
+
if (this.activeTabIndex === 0) {
|
|
150
|
+
this.activeChallenges = updateInState(this.activeChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
151
|
+
Status: EChallengeProgressStatus.Forfeited
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
else if (this.activeTabIndex === 1) {
|
|
155
|
+
this.pendingChallenges = updateInState(this.pendingChallenges, data === null || data === void 0 ? void 0 : data.challengeProgressId, {
|
|
156
|
+
Status: EChallengeProgressStatus.Forfeited
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
77
163
|
handleClientStylingChange(newValue, oldValue) {
|
|
78
164
|
if (newValue != oldValue) {
|
|
79
165
|
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
@@ -116,11 +202,16 @@ export class CasinoChallengesContainer {
|
|
|
116
202
|
if (res === null || res === void 0 ? void 0 : res.Success) {
|
|
117
203
|
this.pageNumber = res.PageNumber;
|
|
118
204
|
this.total = res.TotalCount;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
205
|
+
switch (this.activeTabIndex) {
|
|
206
|
+
case 0:
|
|
207
|
+
this.activeChallenges = res.Data;
|
|
208
|
+
break;
|
|
209
|
+
case 1:
|
|
210
|
+
this.pendingChallenges = res.Data;
|
|
211
|
+
break;
|
|
212
|
+
case 2:
|
|
213
|
+
this.playerHistory = res.Data;
|
|
214
|
+
break;
|
|
124
215
|
}
|
|
125
216
|
}
|
|
126
217
|
});
|
|
@@ -144,24 +235,21 @@ export class CasinoChallengesContainer {
|
|
|
144
235
|
resolveTranslationUrl(this.translationUrl);
|
|
145
236
|
}
|
|
146
237
|
}
|
|
147
|
-
onTimerExpired(e) {
|
|
148
|
-
setTimeout(() => {
|
|
149
|
-
this.challenges = this.challenges.filter((challenge) => challenge.Id !== e.detail);
|
|
150
|
-
}, 10000);
|
|
151
|
-
}
|
|
152
238
|
renderChallengesContent() {
|
|
153
|
-
var _a, _b;
|
|
239
|
+
var _a, _b, _c;
|
|
154
240
|
switch (this.activeTabIndex) {
|
|
241
|
+
case 0:
|
|
242
|
+
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 }));
|
|
243
|
+
case 1:
|
|
244
|
+
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 }));
|
|
155
245
|
case 2:
|
|
156
|
-
return (h("casino-challenges-player-history", { translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((
|
|
246
|
+
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 }));
|
|
157
247
|
case 3:
|
|
158
248
|
return (h("casino-challenges-claim-code", { translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification }));
|
|
159
|
-
default:
|
|
160
|
-
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 }));
|
|
161
249
|
}
|
|
162
250
|
}
|
|
163
251
|
render() {
|
|
164
|
-
return (h("div", { key: '
|
|
252
|
+
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: titleIcon, 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: notificationIcon }))))))), this.renderChallengesContent(), this.notification && this.renderNotification())));
|
|
165
253
|
}
|
|
166
254
|
static get is() { return "casino-challenges-container"; }
|
|
167
255
|
static get encapsulation() { return "shadow"; }
|
|
@@ -343,7 +431,8 @@ export class CasinoChallengesContainer {
|
|
|
343
431
|
"activeTabIndex": {},
|
|
344
432
|
"error": {},
|
|
345
433
|
"hasError": {},
|
|
346
|
-
"
|
|
434
|
+
"activeChallenges": {},
|
|
435
|
+
"pendingChallenges": {},
|
|
347
436
|
"playerHistory": {},
|
|
348
437
|
"loading": {},
|
|
349
438
|
"pageNumber": {},
|
|
@@ -367,4 +456,13 @@ export class CasinoChallengesContainer {
|
|
|
367
456
|
"methodName": "handleSessionChange"
|
|
368
457
|
}];
|
|
369
458
|
}
|
|
459
|
+
static get listeners() {
|
|
460
|
+
return [{
|
|
461
|
+
"name": "message",
|
|
462
|
+
"method": "handleEvent",
|
|
463
|
+
"target": "window",
|
|
464
|
+
"capture": false,
|
|
465
|
+
"passive": false
|
|
466
|
+
}];
|
|
467
|
+
}
|
|
370
468
|
}
|
|
@@ -19,14 +19,17 @@ export var EChallengeRewardType;
|
|
|
19
19
|
EChallengeRewardType[EChallengeRewardType["Challenge"] = 3] = "Challenge";
|
|
20
20
|
EChallengeRewardType[EChallengeRewardType["Custom"] = 4] = "Custom";
|
|
21
21
|
})(EChallengeRewardType || (EChallengeRewardType = {}));
|
|
22
|
-
export var
|
|
23
|
-
(function (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
export var EChallengeProgressStatus;
|
|
23
|
+
(function (EChallengeProgressStatus) {
|
|
24
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Started"] = 0] = "Started";
|
|
25
|
+
EChallengeProgressStatus[EChallengeProgressStatus["InProgress"] = 1] = "InProgress";
|
|
26
|
+
EChallengeProgressStatus[EChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
|
|
27
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Completed"] = 3] = "Completed";
|
|
28
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Expired"] = 4] = "Expired";
|
|
29
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
30
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
31
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
32
|
+
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
30
33
|
export var EChallengeTriggerType;
|
|
31
34
|
(function (EChallengeTriggerType) {
|
|
32
35
|
EChallengeTriggerType[EChallengeTriggerType["GameLaunch"] = 0] = "GameLaunch";
|
|
@@ -38,6 +41,14 @@ export var EChallengeValidityType;
|
|
|
38
41
|
EChallengeValidityType[EChallengeValidityType["Period"] = 0] = "Period";
|
|
39
42
|
EChallengeValidityType[EChallengeValidityType["Date"] = 1] = "Date";
|
|
40
43
|
})(EChallengeValidityType || (EChallengeValidityType = {}));
|
|
44
|
+
export var EChallengeStatus;
|
|
45
|
+
(function (EChallengeStatus) {
|
|
46
|
+
EChallengeStatus[EChallengeStatus["Draft"] = 0] = "Draft";
|
|
47
|
+
EChallengeStatus[EChallengeStatus["Enabled"] = 1] = "Enabled";
|
|
48
|
+
EChallengeStatus[EChallengeStatus["Paused"] = 2] = "Paused";
|
|
49
|
+
EChallengeStatus[EChallengeStatus["Closed"] = 3] = "Closed";
|
|
50
|
+
EChallengeStatus[EChallengeStatus["Deleted"] = 4] = "Deleted";
|
|
51
|
+
})(EChallengeStatus || (EChallengeStatus = {}));
|
|
41
52
|
export var EHistoryItemLevelStatus;
|
|
42
53
|
(function (EHistoryItemLevelStatus) {
|
|
43
54
|
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Completed"] = 0] = "Completed";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export function format(first, middle, last) {
|
|
2
2
|
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
3
3
|
}
|
|
4
|
+
export function updateInState(array, id, updates) {
|
|
5
|
+
return array.map((el) => (el.Id === id ? Object.assign(Object.assign({}, el), updates) : el));
|
|
6
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-
|
|
2
|
-
import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-
|
|
3
|
-
export { C as casino_challenges_container } from './casino-challenges-container-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-889cb07d.js';
|
|
2
|
+
import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-9609395d.js';
|
|
3
|
+
export { C as casino_challenges_container } from './casino-challenges-container-9609395d.js';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_LANGUAGE$3 = 'en';
|
|
6
6
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
@@ -232,6 +232,7 @@ const CasinoChallengeCard = class {
|
|
|
232
232
|
constructor(hostRef) {
|
|
233
233
|
registerInstance(this, hostRef);
|
|
234
234
|
this.timerExpired = createEvent(this, "timerExpired", 7);
|
|
235
|
+
this.itemViewed = createEvent(this, "itemViewed", 7);
|
|
235
236
|
this.calculateTargetValue = (level, currencySymbol) => {
|
|
236
237
|
var _a;
|
|
237
238
|
if (!level)
|
|
@@ -280,7 +281,8 @@ const CasinoChallengeCard = class {
|
|
|
280
281
|
: translate$3('expired', this.language);
|
|
281
282
|
}
|
|
282
283
|
};
|
|
283
|
-
this.goToDetailsPage = () => {
|
|
284
|
+
this.goToDetailsPage = () => () => {
|
|
285
|
+
this.itemViewed.emit(this.challenge.Id);
|
|
284
286
|
window.postMessage({
|
|
285
287
|
type: 'GoToDetailsPage',
|
|
286
288
|
info: {
|
|
@@ -356,6 +358,11 @@ const CasinoChallengeCard = class {
|
|
|
356
358
|
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
357
359
|
}
|
|
358
360
|
}
|
|
361
|
+
handleChallengeChange(newValue) {
|
|
362
|
+
if (newValue) {
|
|
363
|
+
this.isChallengePaused = (newValue === null || newValue === void 0 ? void 0 : newValue.ChallengeStatus) === EChallengeStatus.Paused;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
359
366
|
connectedCallback() {
|
|
360
367
|
this.timerId = setInterval(() => {
|
|
361
368
|
this.updateTime();
|
|
@@ -479,12 +486,13 @@ const CasinoChallengeCard = class {
|
|
|
479
486
|
}
|
|
480
487
|
render() {
|
|
481
488
|
var _a, _b, _c, _d;
|
|
482
|
-
return (h("div", { key: '
|
|
489
|
+
return (h("div", { key: '1fff07a022a7ab552a4fc1ae88e5041267902f85', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '8002cca9419931b12ca5ba35713e5914da7b8ef3', class: "card", onClick: this.goToDetailsPage }, h("img", { key: 'b3201e9d52ddc3bf98c597b084240e66e4fe1cb7', class: `card__image ${this.isChallengeGrayed}`, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: '3d393004b10d6dd70ed702034239cf39168609c4', class: "card__content" }, h("h1", { key: 'f2b2c37cd574adb8762b1b7497a9da2d30fc5046', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.PresentationName), this.getChallengeProgress, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getCardButton))));
|
|
483
490
|
}
|
|
484
491
|
static get watchers() { return {
|
|
485
492
|
"clientStyling": ["handleClientStylingChange"],
|
|
486
493
|
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
487
|
-
"mbSource": ["handleMbSourceChange"]
|
|
494
|
+
"mbSource": ["handleMbSourceChange"],
|
|
495
|
+
"challenge": ["handleChallengeChange"]
|
|
488
496
|
}; }
|
|
489
497
|
};
|
|
490
498
|
CasinoChallengeCard.style = CasinoChallengeCardStyle0;
|
|
@@ -668,6 +676,7 @@ const CasinoChallengeList = class {
|
|
|
668
676
|
registerInstance(this, hostRef);
|
|
669
677
|
this.loadMore = createEvent(this, "loadMore", 7);
|
|
670
678
|
this.timerExpired = createEvent(this, "timerExpired", 7);
|
|
679
|
+
this.itemViewed = createEvent(this, "itemViewed", 7);
|
|
671
680
|
this.setLastItemRef = (el) => {
|
|
672
681
|
if (this.lastItemRef && this.observer) {
|
|
673
682
|
this.observer.unobserve(this.lastItemRef);
|
|
@@ -751,11 +760,16 @@ const CasinoChallengeList = class {
|
|
|
751
760
|
this.timerExpired.emit(e.detail);
|
|
752
761
|
}
|
|
753
762
|
}
|
|
763
|
+
onItemViewed(e) {
|
|
764
|
+
if (this.itemViewed) {
|
|
765
|
+
this.itemViewed.emit(e.detail);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
754
768
|
renderEmptyState() {
|
|
755
769
|
return (h("div", { class: "empty" }, h("img", { src: emptyStateSvg$1 }), h("b", null, translate$1('emptyTitle', this.language)), h("span", null, translate$1('emptyDescription', this.language))));
|
|
756
770
|
}
|
|
757
771
|
render() {
|
|
758
|
-
return (h("div", { key: '
|
|
772
|
+
return (h("div", { key: '8028a3fdc24ea18de2266eb5e34cfe5f9add779f', ref: (el) => (this.stylingContainer = el) }, this.challenges.length === 0 && !this.loading && this.renderEmptyState(), h("div", { key: 'ab1b0dc25aa05d9678064b8edef2f35b392319ce', class: "challenges-list" }, this.challenges.map((challenge, index) => (h("div", { key: challenge.Id, ref: index === this.challenges.length - 1 ? this.setLastItemRef : null, class: "list-item" }, h("casino-challenge-card", { challenge: challenge, language: this.language, mbSource: this.mbSource, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, onTimerExpired: this.onTimerExpired, onItemViewed: this.onItemViewed, activeTabIndex: this.activeTabIndex, isUserAuthorized: this.isUserAuthorized, userId: this.userId, endpoint: this.endpoint, session: this.session, domain: this.domain })))), this.loading && this.renderSkeletons())));
|
|
759
773
|
}
|
|
760
774
|
get el() { return getElement(this); }
|
|
761
775
|
static get watchers() { return {
|