@everymatrix/casino-challenges-container 0.0.13 → 0.0.15
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_5.entry.js +1 -0
- package/dist/casino-challenges-container/casino-challenges-container-677ffb33.js +1 -0
- package/dist/casino-challenges-container/casino-challenges-container.esm.js +1 -1
- package/dist/casino-challenges-container/index-7720ad93.js +2 -0
- package/dist/casino-challenges-container/index.esm.js +1 -1
- package/dist/cjs/casino-challenge-card_5.cjs.entry.js +3108 -0
- package/dist/cjs/{casino-challenges-container-f2c3603f.js → casino-challenges-container-50aca824.js} +35 -9
- package/dist/cjs/casino-challenges-container.cjs.js +2 -2
- package/dist/cjs/{index-cf89b5da.js → index-d5f8d1ee.js} +60 -5
- package/dist/cjs/index.cjs.js +2 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +26 -1
- package/dist/collection/components/casino-challenges-container/casino-challenges-container.js +18 -4
- package/dist/collection/utils/locale.utils.js +16 -4
- package/dist/collection/utils/types.js +7 -0
- package/dist/esm/casino-challenge-card_5.entry.js +3101 -0
- package/dist/esm/{casino-challenges-container-c6332600.js → casino-challenges-container-677ffb33.js} +33 -10
- package/dist/esm/casino-challenges-container.js +3 -3
- package/dist/esm/{index-9c823353.js → index-7720ad93.js} +58 -6
- package/dist/esm/index.js +2 -3
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/casino-challenges-container/casino-challenges-container.d.ts +4 -2
- package/dist/types/utils/types.d.ts +28 -1
- package/package.json +1 -1
- package/dist/casino-challenges-container/casino-challenges-container-c6332600.js +0 -1
- package/dist/casino-challenges-container/casino-challenges-container.entry.js +0 -1
- package/dist/casino-challenges-container/index-9c823353.js +0 -2
- package/dist/cjs/casino-challenges-container.cjs.entry.js +0 -11
- package/dist/esm/casino-challenges-container.entry.js +0 -3
package/dist/cjs/{casino-challenges-container-f2c3603f.js → casino-challenges-container-50aca824.js}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
require('@everymatrix/casino-challenges-list');
|
|
3
|
+
const index = require('./index-d5f8d1ee.js');
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* @name setClientStyling
|
|
@@ -66,10 +65,22 @@ const TRANSLATIONS = {
|
|
|
66
65
|
title: 'Challenges',
|
|
67
66
|
empty: 'No Challenges'
|
|
68
67
|
},
|
|
69
|
-
ro: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
ro: {
|
|
69
|
+
title: 'Provocări',
|
|
70
|
+
empty: 'Nicio provocare'
|
|
71
|
+
},
|
|
72
|
+
fr: {
|
|
73
|
+
title: 'Défis',
|
|
74
|
+
empty: 'Aucun défi'
|
|
75
|
+
},
|
|
76
|
+
ar: {
|
|
77
|
+
title: 'التحديات',
|
|
78
|
+
empty: 'لا توجد تحديات'
|
|
79
|
+
},
|
|
80
|
+
hr: {
|
|
81
|
+
title: 'Izazovi',
|
|
82
|
+
empty: 'Nema izazova'
|
|
83
|
+
}
|
|
73
84
|
};
|
|
74
85
|
const translate = (key, customLang) => {
|
|
75
86
|
const lang = customLang;
|
|
@@ -121,8 +132,13 @@ const CasinoChallengesContainer = class {
|
|
|
121
132
|
this.onLoadMore = () => {
|
|
122
133
|
this.pageNumber += 1;
|
|
123
134
|
this.getChallenges().then((res) => {
|
|
124
|
-
this.challenges = [...this.challenges, ...res.Data];
|
|
125
135
|
this.total = res.TotalCount;
|
|
136
|
+
if (this.activeTabIndex < 2) {
|
|
137
|
+
this.challenges = [...this.challenges, ...res.Data];
|
|
138
|
+
}
|
|
139
|
+
else if (this.activeTabIndex === 2) {
|
|
140
|
+
this.playerHistory = [...this.playerHistory, ...res.Data];
|
|
141
|
+
}
|
|
126
142
|
});
|
|
127
143
|
};
|
|
128
144
|
this.handleTabClick = (index) => () => {
|
|
@@ -145,6 +161,7 @@ const CasinoChallengesContainer = class {
|
|
|
145
161
|
this.error = '';
|
|
146
162
|
this.hasError = false;
|
|
147
163
|
this.challenges = [];
|
|
164
|
+
this.playerHistory = [];
|
|
148
165
|
this.loading = false;
|
|
149
166
|
this.pageNumber = 0;
|
|
150
167
|
this.total = 0;
|
|
@@ -187,6 +204,12 @@ const CasinoChallengesContainer = class {
|
|
|
187
204
|
if (res === null || res === void 0 ? void 0 : res.Success) {
|
|
188
205
|
this.pageNumber = res.PageNumber;
|
|
189
206
|
this.total = res.TotalCount;
|
|
207
|
+
if (this.activeTabIndex < 2) {
|
|
208
|
+
this.challenges = res.Data;
|
|
209
|
+
}
|
|
210
|
+
else if (this.activeTabIndex === 2) {
|
|
211
|
+
this.playerHistory = res.Data;
|
|
212
|
+
}
|
|
190
213
|
}
|
|
191
214
|
});
|
|
192
215
|
}
|
|
@@ -215,8 +238,8 @@ const CasinoChallengesContainer = class {
|
|
|
215
238
|
}, 10000);
|
|
216
239
|
}
|
|
217
240
|
render() {
|
|
218
|
-
var _a;
|
|
219
|
-
return (index.h("div", { key: '
|
|
241
|
+
var _a, _b;
|
|
242
|
+
return (index.h("div", { key: '4e2191039d59af380aab5d65f865727e04565ad9', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '5731ae9a18c13c0ff728512442a24e824fcab485', class: "challenges" }, index.h("div", { key: '391210a6442f95d421a223854b55da4f953a1ec3', class: "challenges__header" }, index.h("h1", { key: '90d93318a2082f4b19e9c2cc3fa341afcb223eb8', class: "challenges__title" }, index.h("img", { key: '167c1ee8869310677e864d0f7107bfb7f9e938cd', src: titleIconSvg, alt: "icon" }), translate('title', this.language)), this.session && (index.h("div", { key: '1479821da7d79a1d2d53de22b67a0d2d17c43a68', class: "challenges__tabs" }, this.tabs.map((label, index$1) => (index.h("div", { class: `challenges__tab ${index$1 === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index$1) }, label, this.showNotification === index$1 && index.h("img", { src: notificationSvg }))))))), this.activeTabIndex < 2 && (index.h("div", { key: 'a0f87282b31054fb2b5c18c6d521530c92540db6', class: "challenges__content" }, this.challenges.length === 0 && !this.loading && (index.h("div", { key: '313b9431d71fe5d93d41c00d64b718159b86bfd3', class: "empty" }, translate('empty', this.language))), index.h("casino-challenges-list", { key: '4756590a375cdd1cd70f538084d0194523fa8c41', challenges: this.challenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, loading: this.loading, hasMore: ((_a = this.challenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex }))), this.activeTabIndex === 2 && (index.h("casino-challenges-player-history", { key: 'd1f077837fafb45d5c257541e3a3db5f149b210e', translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_b = this.playerHistory) === null || _b === void 0 ? void 0 : _b.length) < this.total })))));
|
|
220
243
|
}
|
|
221
244
|
static get watchers() { return {
|
|
222
245
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -227,3 +250,6 @@ const CasinoChallengesContainer = class {
|
|
|
227
250
|
CasinoChallengesContainer.style = CasinoChallengesContainerStyle0;
|
|
228
251
|
|
|
229
252
|
exports.CasinoChallengesContainer = CasinoChallengesContainer;
|
|
253
|
+
exports.setClientStyling = setClientStyling;
|
|
254
|
+
exports.setClientStylingURL = setClientStylingURL;
|
|
255
|
+
exports.setStreamStyling = setStreamStyling;
|
|
@@ -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-d5f8d1ee.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-
|
|
22
|
+
return index.bootstrapLazy([["casino-challenge-card_5.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],"challenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[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"]},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-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"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[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:
|
|
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: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, 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
|
|
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
71
71
|
}
|
|
72
72
|
switch(bundleId) {
|
|
73
73
|
|
|
74
|
-
case 'casino-
|
|
74
|
+
case 'casino-challenge-card_5.cjs':
|
|
75
75
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
76
76
|
/* webpackMode: "lazy" */
|
|
77
|
-
'./casino-
|
|
77
|
+
'./casino-challenge-card_5.cjs.entry.js')); }).then(processMod, consoleError);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
@@ -295,6 +295,12 @@ var Host = {};
|
|
|
295
295
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
296
296
|
var parsePropertyValue = (propValue, propType) => {
|
|
297
297
|
if (propValue != null && !isComplexType(propValue)) {
|
|
298
|
+
if (propType & 4 /* Boolean */) {
|
|
299
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
300
|
+
}
|
|
301
|
+
if (propType & 2 /* Number */) {
|
|
302
|
+
return parseFloat(propValue);
|
|
303
|
+
}
|
|
298
304
|
if (propType & 1 /* String */) {
|
|
299
305
|
return String(propValue);
|
|
300
306
|
}
|
|
@@ -302,6 +308,22 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
302
308
|
}
|
|
303
309
|
return propValue;
|
|
304
310
|
};
|
|
311
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
312
|
+
|
|
313
|
+
// src/runtime/event-emitter.ts
|
|
314
|
+
var createEvent = (ref, name, flags) => {
|
|
315
|
+
const elm = getElement(ref);
|
|
316
|
+
return {
|
|
317
|
+
emit: (detail) => {
|
|
318
|
+
return emitEvent(elm, name, {
|
|
319
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
320
|
+
composed: !!(flags & 2 /* Composed */),
|
|
321
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
322
|
+
detail
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
};
|
|
305
327
|
var emitEvent = (elm, name, opts) => {
|
|
306
328
|
const ev = plt.ce(name, opts);
|
|
307
329
|
elm.dispatchEvent(ev);
|
|
@@ -383,6 +405,27 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
383
405
|
const newClasses = parseClassList(newValue);
|
|
384
406
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
385
407
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
408
|
+
} else if (memberName === "style") {
|
|
409
|
+
{
|
|
410
|
+
for (const prop in oldValue) {
|
|
411
|
+
if (!newValue || newValue[prop] == null) {
|
|
412
|
+
if (prop.includes("-")) {
|
|
413
|
+
elm.style.removeProperty(prop);
|
|
414
|
+
} else {
|
|
415
|
+
elm.style[prop] = "";
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
for (const prop in newValue) {
|
|
421
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
422
|
+
if (prop.includes("-")) {
|
|
423
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
424
|
+
} else {
|
|
425
|
+
elm.style[prop] = newValue[prop];
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
386
429
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
387
430
|
if (newValue) {
|
|
388
431
|
newValue(elm);
|
|
@@ -786,6 +829,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
786
829
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
787
830
|
const instance = hostRef.$lazyInstance$ ;
|
|
788
831
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
832
|
+
{
|
|
833
|
+
safeCall(instance, "componentDidRender");
|
|
834
|
+
}
|
|
789
835
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
790
836
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
791
837
|
{
|
|
@@ -985,6 +1031,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
985
1031
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
986
1032
|
}
|
|
987
1033
|
endNewInstance();
|
|
1034
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
988
1035
|
} else {
|
|
989
1036
|
Cstr = elm.constructor;
|
|
990
1037
|
const cmpTag = elm.localName;
|
|
@@ -1012,6 +1059,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1012
1059
|
}
|
|
1013
1060
|
};
|
|
1014
1061
|
var fireConnectedCallback = (instance) => {
|
|
1062
|
+
{
|
|
1063
|
+
safeCall(instance, "connectedCallback");
|
|
1064
|
+
}
|
|
1015
1065
|
};
|
|
1016
1066
|
|
|
1017
1067
|
// src/runtime/connected-callback.ts
|
|
@@ -1044,8 +1094,10 @@ var connectedCallback = (elm) => {
|
|
|
1044
1094
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1045
1095
|
}
|
|
1046
1096
|
} else {
|
|
1047
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1048
|
-
hostRef.$
|
|
1097
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1098
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1099
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1100
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1049
1101
|
}
|
|
1050
1102
|
}
|
|
1051
1103
|
endConnected();
|
|
@@ -1190,7 +1242,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1190
1242
|
// src/runtime/nonce.ts
|
|
1191
1243
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1192
1244
|
|
|
1245
|
+
exports.Host = Host;
|
|
1193
1246
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1247
|
+
exports.createEvent = createEvent;
|
|
1248
|
+
exports.getElement = getElement;
|
|
1194
1249
|
exports.h = h;
|
|
1195
1250
|
exports.promiseResolve = promiseResolve;
|
|
1196
1251
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoChallengesContainer = require('./casino-challenges-container-
|
|
6
|
-
require('./index-
|
|
7
|
-
require('@everymatrix/casino-challenges-list');
|
|
5
|
+
const casinoChallengesContainer = require('./casino-challenges-container-50aca824.js');
|
|
6
|
+
require('./index-d5f8d1ee.js');
|
|
8
7
|
|
|
9
8
|
|
|
10
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-d5f8d1ee.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-
|
|
11
|
+
return index.bootstrapLazy([["casino-challenge-card_5.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],"challenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[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"]},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-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"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[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;
|
|
@@ -7,6 +7,31 @@
|
|
|
7
7
|
"version": "4.19.2",
|
|
8
8
|
"typescriptVersion": "5.4.5"
|
|
9
9
|
},
|
|
10
|
-
"collections": [
|
|
10
|
+
"collections": [
|
|
11
|
+
{
|
|
12
|
+
"name": "@everymatrix/casino-challenge-card",
|
|
13
|
+
"tags": [
|
|
14
|
+
"casino-challenge-card"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "@everymatrix/casino-challenges-list",
|
|
19
|
+
"tags": [
|
|
20
|
+
"casino-challenges-list"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "@everymatrix/casino-challenges-player-history",
|
|
25
|
+
"tags": [
|
|
26
|
+
"casino-challenges-player-history"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "@everymatrix/ui-skeleton",
|
|
31
|
+
"tags": [
|
|
32
|
+
"ui-skeleton"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
11
36
|
"bundles": []
|
|
12
37
|
}
|
package/dist/collection/components/casino-challenges-container/casino-challenges-container.js
CHANGED
|
@@ -3,7 +3,8 @@ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../.
|
|
|
3
3
|
import { resolveTranslationUrl, translate } from "../../utils/locale.utils";
|
|
4
4
|
import titleIcon from "../../assets/title-icon.svg";
|
|
5
5
|
import notificationIcon from "../../assets/notification.svg";
|
|
6
|
-
import "
|
|
6
|
+
import "../../../../../casino-challenges-list/dist/types/index";
|
|
7
|
+
import "../../../../../casino-challenges-player-history/dist/types/index";
|
|
7
8
|
export class CasinoChallengesContainer {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.tabs = ['Active', 'Pending', 'Finished', 'Code'];
|
|
@@ -19,8 +20,13 @@ export class CasinoChallengesContainer {
|
|
|
19
20
|
this.onLoadMore = () => {
|
|
20
21
|
this.pageNumber += 1;
|
|
21
22
|
this.getChallenges().then((res) => {
|
|
22
|
-
this.challenges = [...this.challenges, ...res.Data];
|
|
23
23
|
this.total = res.TotalCount;
|
|
24
|
+
if (this.activeTabIndex < 2) {
|
|
25
|
+
this.challenges = [...this.challenges, ...res.Data];
|
|
26
|
+
}
|
|
27
|
+
else if (this.activeTabIndex === 2) {
|
|
28
|
+
this.playerHistory = [...this.playerHistory, ...res.Data];
|
|
29
|
+
}
|
|
24
30
|
});
|
|
25
31
|
};
|
|
26
32
|
this.handleTabClick = (index) => () => {
|
|
@@ -43,6 +49,7 @@ export class CasinoChallengesContainer {
|
|
|
43
49
|
this.error = '';
|
|
44
50
|
this.hasError = false;
|
|
45
51
|
this.challenges = [];
|
|
52
|
+
this.playerHistory = [];
|
|
46
53
|
this.loading = false;
|
|
47
54
|
this.pageNumber = 0;
|
|
48
55
|
this.total = 0;
|
|
@@ -85,6 +92,12 @@ export class CasinoChallengesContainer {
|
|
|
85
92
|
if (res === null || res === void 0 ? void 0 : res.Success) {
|
|
86
93
|
this.pageNumber = res.PageNumber;
|
|
87
94
|
this.total = res.TotalCount;
|
|
95
|
+
if (this.activeTabIndex < 2) {
|
|
96
|
+
this.challenges = res.Data;
|
|
97
|
+
}
|
|
98
|
+
else if (this.activeTabIndex === 2) {
|
|
99
|
+
this.playerHistory = res.Data;
|
|
100
|
+
}
|
|
88
101
|
}
|
|
89
102
|
});
|
|
90
103
|
}
|
|
@@ -113,8 +126,8 @@ export class CasinoChallengesContainer {
|
|
|
113
126
|
}, 10000);
|
|
114
127
|
}
|
|
115
128
|
render() {
|
|
116
|
-
var _a;
|
|
117
|
-
return (h("div", { key: '
|
|
129
|
+
var _a, _b;
|
|
130
|
+
return (h("div", { key: '4e2191039d59af380aab5d65f865727e04565ad9', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '5731ae9a18c13c0ff728512442a24e824fcab485', class: "challenges" }, h("div", { key: '391210a6442f95d421a223854b55da4f953a1ec3', class: "challenges__header" }, h("h1", { key: '90d93318a2082f4b19e9c2cc3fa341afcb223eb8', class: "challenges__title" }, h("img", { key: '167c1ee8869310677e864d0f7107bfb7f9e938cd', src: titleIcon, alt: "icon" }), translate('title', this.language)), this.session && (h("div", { key: '1479821da7d79a1d2d53de22b67a0d2d17c43a68', class: "challenges__tabs" }, this.tabs.map((label, index) => (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, label, this.showNotification === index && h("img", { src: notificationIcon }))))))), this.activeTabIndex < 2 && (h("div", { key: 'a0f87282b31054fb2b5c18c6d521530c92540db6', class: "challenges__content" }, this.challenges.length === 0 && !this.loading && (h("div", { key: '313b9431d71fe5d93d41c00d64b718159b86bfd3', class: "empty" }, translate('empty', this.language))), h("casino-challenges-list", { key: '4756590a375cdd1cd70f538084d0194523fa8c41', challenges: this.challenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, loading: this.loading, hasMore: ((_a = this.challenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex }))), this.activeTabIndex === 2 && (h("casino-challenges-player-history", { key: 'd1f077837fafb45d5c257541e3a3db5f149b210e', translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_b = this.playerHistory) === null || _b === void 0 ? void 0 : _b.length) < this.total })))));
|
|
118
131
|
}
|
|
119
132
|
static get is() { return "casino-challenges-container"; }
|
|
120
133
|
static get encapsulation() { return "shadow"; }
|
|
@@ -297,6 +310,7 @@ export class CasinoChallengesContainer {
|
|
|
297
310
|
"error": {},
|
|
298
311
|
"hasError": {},
|
|
299
312
|
"challenges": {},
|
|
313
|
+
"playerHistory": {},
|
|
300
314
|
"loading": {},
|
|
301
315
|
"pageNumber": {},
|
|
302
316
|
"total": {},
|
|
@@ -4,10 +4,22 @@ const TRANSLATIONS = {
|
|
|
4
4
|
title: 'Challenges',
|
|
5
5
|
empty: 'No Challenges'
|
|
6
6
|
},
|
|
7
|
-
ro: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
ro: {
|
|
8
|
+
title: 'Provocări',
|
|
9
|
+
empty: 'Nicio provocare'
|
|
10
|
+
},
|
|
11
|
+
fr: {
|
|
12
|
+
title: 'Défis',
|
|
13
|
+
empty: 'Aucun défi'
|
|
14
|
+
},
|
|
15
|
+
ar: {
|
|
16
|
+
title: 'التحديات',
|
|
17
|
+
empty: 'لا توجد تحديات'
|
|
18
|
+
},
|
|
19
|
+
hr: {
|
|
20
|
+
title: 'Izazovi',
|
|
21
|
+
empty: 'Nema izazova'
|
|
22
|
+
}
|
|
11
23
|
};
|
|
12
24
|
export const translate = (key, customLang) => {
|
|
13
25
|
const lang = customLang;
|
|
@@ -38,3 +38,10 @@ export var EChallengeValidityType;
|
|
|
38
38
|
EChallengeValidityType[EChallengeValidityType["Period"] = 0] = "Period";
|
|
39
39
|
EChallengeValidityType[EChallengeValidityType["Date"] = 1] = "Date";
|
|
40
40
|
})(EChallengeValidityType || (EChallengeValidityType = {}));
|
|
41
|
+
export var EHistoryItemLevelStatus;
|
|
42
|
+
(function (EHistoryItemLevelStatus) {
|
|
43
|
+
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Completed"] = 0] = "Completed";
|
|
44
|
+
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Expired"] = 1] = "Expired";
|
|
45
|
+
EHistoryItemLevelStatus[EHistoryItemLevelStatus["Forfeited"] = 2] = "Forfeited";
|
|
46
|
+
})(EHistoryItemLevelStatus || (EHistoryItemLevelStatus = {}));
|
|
47
|
+
export const HistoryItemLevelStatusDictionary = ['Completed', 'Expired', 'Forfeited'];
|