@everymatrix/casino-challenges-container 0.0.1 → 0.0.2
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_4.entry.js +1 -0
- package/dist/casino-challenges-container/casino-challenges-container-b776a245.js +1 -0
- package/dist/casino-challenges-container/casino-challenges-container.esm.js +1 -1
- package/dist/casino-challenges-container/index-c7b24115.js +2 -0
- package/dist/casino-challenges-container/index.esm.js +1 -1
- package/dist/cjs/casino-challenge-card_4.cjs.entry.js +570 -0
- package/dist/cjs/{casino-challenges-container-54a20dee.js → casino-challenges-container-aa20cd29.js} +70 -5
- package/dist/cjs/casino-challenges-container.cjs.js +2 -2
- package/dist/cjs/{index-cf89b5da.js → index-2631ee03.js} +39 -5
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +20 -1
- package/dist/collection/components/casino-challenges-container/casino-challenges-container.css +15 -2
- package/dist/collection/components/casino-challenges-container/casino-challenges-container.js +144 -3
- package/dist/collection/utils/locale.utils.js +2 -1
- package/dist/collection/utils/types.js +40 -0
- package/dist/esm/casino-challenge-card_4.entry.js +564 -0
- package/dist/esm/{casino-challenges-container-affc90f5.js → casino-challenges-container-b776a245.js} +68 -6
- package/dist/esm/casino-challenges-container.js +3 -3
- package/dist/esm/{index-9c823353.js → index-c7b24115.js} +37 -6
- 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 +30 -0
- package/dist/types/components.d.ts +32 -0
- package/dist/types/utils/types.d.ts +130 -0
- package/package.json +1 -1
- package/dist/casino-challenges-container/casino-challenges-container-affc90f5.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 -10
- package/dist/esm/casino-challenges-container.entry.js +0 -2
package/dist/cjs/{casino-challenges-container-54a20dee.js → casino-challenges-container-aa20cd29.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-2631ee03.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @name setClientStyling
|
|
@@ -62,7 +62,8 @@ function setStreamStyling(stylingContainer, domain, subscription) {
|
|
|
62
62
|
const DEFAULT_LANGUAGE = 'en';
|
|
63
63
|
const TRANSLATIONS = {
|
|
64
64
|
en: {
|
|
65
|
-
title: 'Challenges'
|
|
65
|
+
title: 'Challenges',
|
|
66
|
+
empty: 'No Challenges'
|
|
66
67
|
},
|
|
67
68
|
ro: {},
|
|
68
69
|
fr: {},
|
|
@@ -100,24 +101,53 @@ const titleIconSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53
|
|
|
100
101
|
|
|
101
102
|
const notificationSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzgzOF8zMTApIj4KPHBhdGggZD0iTTcuNTAwNDYgMTIuOTk5OUM4LjQwNTk1IDEyLjk5OTkgOS4xNjM0MSAxMi4zNTQ0IDkuMzM3MzUgMTEuNUg1LjY2MzU3QzUuODM3NiAxMi4zNTQ0IDYuNTk1MDYgMTIuOTk5OSA3LjUwMDQ2IDEyLjk5OTlaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfODM4XzMxMCkiLz4KPHBhdGggZD0iTTExLjAwNTggNi45OTkxN0MxMS4wMDM3IDYuOTk5MTcgMTEuMDAxNyA2Ljk5OTYzIDEwLjk5OTcgNi45OTk2M0M5LjA3MDM2IDYuOTk5NjMgNy40OTk5NyA1LjQyOTcgNy40OTk5NyAzLjQ5OTlDNy40OTk5NyAyLjk2OTM5IDcuNjIyIDIuNDY3ODkgNy44MzQ0OCAyLjAxNjk0QzcuNzI0NDQgMi4wMDY1IDcuNjEyOTMgMiA3LjQ5OTk3IDJDNS41NjcxMyAyIDQuMDAwMjIgMy41NjY4MiA0LjAwMDIyIDUuNDk5NzNWNi44OTM2MkM0LjAwMDIyIDcuODgzMDUgMy41NjY3NCA4LjgxNzAxIDIuODA2MjYgOS40NTk5NEMyLjU1Mjc3IDkuNjc2NDUgMi40NDAyNiAxMC4wMjE0IDIuNTMxMjUgMTAuMzU3OUMyLjYzNzI3IDEwLjc0OTQgMy4wMjQyMyAxMC45OTk0IDMuNDMwMjUgMTAuOTk5NEgxMS41NjcyQzExLjk5MzIgMTAuOTk5NCAxMi4zOTQ3IDEwLjcyMzQgMTIuNDgxMSAxMC4zMDU5QzEyLjU0ODEgOS45ODI5NCAxMi40MzMyIDkuNjYwNDMgMTIuMTgyNyA5LjQ0OTk2QzExLjQ1NTcgOC44NDA1NCAxMS4wMzUyIDcuOTQ1MDMgMTEuMDA1OCA2Ljk5OTE3WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzgzOF8zMTApIi8+CjxwYXRoIGQ9Ik0xMy41MDA2IDMuNDk5ODZDMTMuNTAwNiA0Ljg4MDQ3IDEyLjM4MTUgNS45OTk2MyAxMS4wMDA4IDUuOTk5NjNDOS42MjAxNCA1Ljk5OTYzIDguNTAwOTggNC44ODA0NyA4LjUwMDk4IDMuNDk5ODZDOC41MDA5OCAyLjExOTI1IDkuNjIwMTQgMSAxMS4wMDA4IDFDMTIuMzgxNSAxIDEzLjUwMDYgMi4xMTkyNSAxMy41MDA2IDMuNDk5ODZaIiBmaWxsPSIjRDY0MjFFIi8+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl84MzhfMzEwIiB4MT0iNy41MDA0NiIgeTE9IjExLjUiIHgyPSI3LjUwMDQ2IiB5Mj0iMTIuOTk5OSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjRUE5MDE4Ii8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0UwQTg0RSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfODM4XzMxMCIgeDE9IjcuNDk5OTciIHkxPSIyIiB4Mj0iNy40OTk5NyIgeTI9IjEwLjk5OTQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0VBOTAxOCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNFMEE4NEUiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF84MzhfMzEwIj4KPHJlY3Qgd2lkdGg9IjEzIiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC41KSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
102
103
|
|
|
103
|
-
const casinoChallengesContainerCss = ".challenges {\n container-type: inline-size;\n container-name: challenges-container;\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}\n.challenges__tabs {\n display: flex;\n gap: 12px;\n border-radius: 48px;\n padding: 6px;\n color: var(--emw--color-gray-150, #
|
|
104
|
+
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}\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.challenges__content {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 300px;\n overflow-y: auto;\n}\n.challenges__empty {\n color: var(--emw--color-white, #ffffff);\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}";
|
|
104
105
|
const CasinoChallengesContainerStyle0 = casinoChallengesContainerCss;
|
|
105
106
|
|
|
106
107
|
const CasinoChallengesContainer = class {
|
|
107
108
|
constructor(hostRef) {
|
|
108
109
|
index.registerInstance(this, hostRef);
|
|
109
|
-
// todo: connect with api
|
|
110
110
|
this.tabs = ['Active', 'Pending', 'Finished', 'Code'];
|
|
111
111
|
this.showNotification = 1;
|
|
112
|
+
this.checkAttrs = () => {
|
|
113
|
+
if (!this.endpoint) {
|
|
114
|
+
this.error = 'Endpoint is missing! Please provide a valid endpointURL.';
|
|
115
|
+
this.hasError = true;
|
|
116
|
+
console.error(this.error);
|
|
117
|
+
}
|
|
118
|
+
return this.hasError;
|
|
119
|
+
};
|
|
120
|
+
this.onLoadMore = () => {
|
|
121
|
+
this.pageNumber += 1;
|
|
122
|
+
this.getChallenges().then((res) => {
|
|
123
|
+
this.challenges = [...this.challenges, ...res.Data];
|
|
124
|
+
this.total = res.TotalCount;
|
|
125
|
+
});
|
|
126
|
+
};
|
|
112
127
|
this.handleTabClick = (index) => () => {
|
|
113
128
|
this.activeTabIndex = index;
|
|
129
|
+
this.challenges = [];
|
|
130
|
+
this.pageNumber = 0;
|
|
131
|
+
this.total = 0;
|
|
132
|
+
this.loadData();
|
|
114
133
|
};
|
|
115
134
|
this.mbSource = undefined;
|
|
116
135
|
this.clientStyling = undefined;
|
|
117
136
|
this.clientStylingUrl = undefined;
|
|
118
137
|
this.translationUrl = '';
|
|
119
138
|
this.language = 'en';
|
|
139
|
+
this.endpoint = '';
|
|
140
|
+
this.domain = '';
|
|
141
|
+
this.session = '';
|
|
142
|
+
this.userId = '';
|
|
120
143
|
this.activeTabIndex = 0;
|
|
144
|
+
this.error = '';
|
|
145
|
+
this.hasError = false;
|
|
146
|
+
this.challenges = [];
|
|
147
|
+
this.loading = false;
|
|
148
|
+
this.pageNumber = 0;
|
|
149
|
+
this.total = 0;
|
|
150
|
+
this.pageSize = 20;
|
|
121
151
|
}
|
|
122
152
|
handleClientStylingChange(newValue, oldValue) {
|
|
123
153
|
if (newValue != oldValue) {
|
|
@@ -134,6 +164,31 @@ const CasinoChallengesContainer = class {
|
|
|
134
164
|
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
135
165
|
}
|
|
136
166
|
}
|
|
167
|
+
async getChallenges() {
|
|
168
|
+
if (!this.checkAttrs()) {
|
|
169
|
+
const path = this.activeTabIndex === 2 ? '/PlayerHistory' : '/GetChallengesInfo';
|
|
170
|
+
const url = `${this.endpoint}/challenge/${path}`;
|
|
171
|
+
const body = Object.assign(Object.assign({ DomainId: this.domain, PlayerLanguage: this.language, PageNumber: this.pageNumber, PageSize: this.pageSize }, (this.session && { PlayerSessionId: this.session })), (this.userId && this.activeTabIndex === 2 && { UserId: this.userId }));
|
|
172
|
+
this.loading = true;
|
|
173
|
+
return fetch(url, {
|
|
174
|
+
method: 'POST',
|
|
175
|
+
headers: {
|
|
176
|
+
'Content-Type': 'application/json'
|
|
177
|
+
},
|
|
178
|
+
body: JSON.stringify(body)
|
|
179
|
+
})
|
|
180
|
+
.then((res) => res.json())
|
|
181
|
+
.finally(() => (this.loading = false));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
loadData() {
|
|
185
|
+
this.getChallenges().then((res) => {
|
|
186
|
+
if (res === null || res === void 0 ? void 0 : res.Success) {
|
|
187
|
+
this.pageNumber = res.PageNumber;
|
|
188
|
+
this.total = res.TotalCount;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
137
192
|
componentDidLoad() {
|
|
138
193
|
if (this.stylingContainer) {
|
|
139
194
|
if (this.mbSource)
|
|
@@ -143,6 +198,7 @@ const CasinoChallengesContainer = class {
|
|
|
143
198
|
if (this.clientStylingUrl)
|
|
144
199
|
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
145
200
|
}
|
|
201
|
+
this.loadData();
|
|
146
202
|
}
|
|
147
203
|
disconnectedCallback() {
|
|
148
204
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
@@ -152,8 +208,14 @@ const CasinoChallengesContainer = class {
|
|
|
152
208
|
resolveTranslationUrl(this.translationUrl);
|
|
153
209
|
}
|
|
154
210
|
}
|
|
211
|
+
onTimerExpired(e) {
|
|
212
|
+
setTimeout(() => {
|
|
213
|
+
this.challenges = this.challenges.filter((challenge) => challenge.Id !== e.detail);
|
|
214
|
+
}, 10000);
|
|
215
|
+
}
|
|
155
216
|
render() {
|
|
156
|
-
|
|
217
|
+
var _a;
|
|
218
|
+
return (index.h("div", { key: 'af2e5b13351a5b8694258c628f545d6a127e80dc', ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '91cdbc6a152a8b8c884842370c5509e7f6752074', class: "challenges" }, index.h("div", { key: 'd480a88d50cea5789eabb8dcc30233aea7d18d0f', class: "challenges__header" }, index.h("h1", { key: '8cd8787debb4f6f9897291f11c131c4ea1ef1d15', class: "challenges__title" }, index.h("img", { key: '1551482df42aaf36ed5cac7b2834bc276cc5cf52', src: titleIconSvg, alt: "icon" }), translate('title', this.language)), this.session && (index.h("div", { key: 'b45e42e56d5abc570b72979490f6e7ff4bf4f1bd', 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 }))))))), index.h("div", { key: 'd1a2a52ff5d26f17e401a7a3707f4153bbbc6290', class: "challenges__content" }, this.challenges.length === 0 && !this.loading && (index.h("div", { key: 'f0ab8469ac8a795b4d25d925bc1065217398e862', class: "empty" }, translate('empty', this.language))), this.activeTabIndex !== 3 && (index.h("casino-challenges-list", { key: '2f7aaf6e940668be6e15e1cfb81f5d2d063361ef', 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 }))))));
|
|
157
219
|
}
|
|
158
220
|
static get watchers() { return {
|
|
159
221
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -164,3 +226,6 @@ const CasinoChallengesContainer = class {
|
|
|
164
226
|
CasinoChallengesContainer.style = CasinoChallengesContainerStyle0;
|
|
165
227
|
|
|
166
228
|
exports.CasinoChallengesContainer = CasinoChallengesContainer;
|
|
229
|
+
exports.setClientStyling = setClientStyling;
|
|
230
|
+
exports.setClientStylingURL = setClientStylingURL;
|
|
231
|
+
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-2631ee03.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_4.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],"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"]},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],"challenge":[16],"tooltipIndex":[32],"timeLeft":[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: false, 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_4.cjs':
|
|
75
75
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
76
76
|
/* webpackMode: "lazy" */
|
|
77
|
-
'./casino-
|
|
77
|
+
'./casino-challenge-card_4.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);
|
|
@@ -786,6 +808,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
786
808
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
787
809
|
const instance = hostRef.$lazyInstance$ ;
|
|
788
810
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
811
|
+
{
|
|
812
|
+
safeCall(instance, "componentDidRender");
|
|
813
|
+
}
|
|
789
814
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
790
815
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
791
816
|
{
|
|
@@ -985,6 +1010,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
985
1010
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
986
1011
|
}
|
|
987
1012
|
endNewInstance();
|
|
1013
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
988
1014
|
} else {
|
|
989
1015
|
Cstr = elm.constructor;
|
|
990
1016
|
const cmpTag = elm.localName;
|
|
@@ -1012,6 +1038,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1012
1038
|
}
|
|
1013
1039
|
};
|
|
1014
1040
|
var fireConnectedCallback = (instance) => {
|
|
1041
|
+
{
|
|
1042
|
+
safeCall(instance, "connectedCallback");
|
|
1043
|
+
}
|
|
1015
1044
|
};
|
|
1016
1045
|
|
|
1017
1046
|
// src/runtime/connected-callback.ts
|
|
@@ -1044,8 +1073,10 @@ var connectedCallback = (elm) => {
|
|
|
1044
1073
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1045
1074
|
}
|
|
1046
1075
|
} else {
|
|
1047
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1048
|
-
hostRef.$
|
|
1076
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1077
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1078
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1079
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1049
1080
|
}
|
|
1050
1081
|
}
|
|
1051
1082
|
endConnected();
|
|
@@ -1190,7 +1221,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1190
1221
|
// src/runtime/nonce.ts
|
|
1191
1222
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1192
1223
|
|
|
1224
|
+
exports.Host = Host;
|
|
1193
1225
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1226
|
+
exports.createEvent = createEvent;
|
|
1227
|
+
exports.getElement = getElement;
|
|
1194
1228
|
exports.h = h;
|
|
1195
1229
|
exports.promiseResolve = promiseResolve;
|
|
1196
1230
|
exports.registerInstance = registerInstance;
|
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-aa20cd29.js');
|
|
6
|
+
require('./index-2631ee03.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-2631ee03.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_4.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],"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"]},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],"challenge":[16],"tooltipIndex":[32],"timeLeft":[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,25 @@
|
|
|
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/ui-skeleton",
|
|
25
|
+
"tags": [
|
|
26
|
+
"ui-skeleton"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
11
30
|
"bundles": []
|
|
12
31
|
}
|
package/dist/collection/components/casino-challenges-container/casino-challenges-container.css
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
.challenges {
|
|
2
2
|
container-type: inline-size;
|
|
3
3
|
container-name: challenges-container;
|
|
4
|
+
background-color: var(--emw--color-background, #000);
|
|
5
|
+
padding: 16px 12px;
|
|
4
6
|
}
|
|
5
7
|
.challenges__header {
|
|
6
8
|
margin: 0 0 32px;
|
|
@@ -14,13 +16,14 @@
|
|
|
14
16
|
align-items: center;
|
|
15
17
|
font-size: var(--emw--font-size-x-large, 24px);
|
|
16
18
|
font-weight: var(--emw--font-weight-bold, 700);
|
|
19
|
+
color: var(--emw--color-white, #ffffff);
|
|
17
20
|
}
|
|
18
21
|
.challenges__tabs {
|
|
19
22
|
display: flex;
|
|
20
23
|
gap: 12px;
|
|
21
24
|
border-radius: 48px;
|
|
22
25
|
padding: 6px;
|
|
23
|
-
color: var(--emw--color-gray-150, #
|
|
26
|
+
color: var(--emw--color-gray-150, #c8d6ce);
|
|
24
27
|
background-color: var(--emw--color-background-secondary, #272727);
|
|
25
28
|
}
|
|
26
29
|
.challenges__tab {
|
|
@@ -37,13 +40,23 @@
|
|
|
37
40
|
gap: 4px;
|
|
38
41
|
}
|
|
39
42
|
.challenges__tab.active {
|
|
40
|
-
color: var(--emw--color-white, #
|
|
43
|
+
color: var(--emw--color-white, #ffffff);
|
|
41
44
|
background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);
|
|
42
45
|
}
|
|
43
46
|
.challenges__tab:last-child {
|
|
44
47
|
width: inherit;
|
|
45
48
|
padding: 10px 16px;
|
|
46
49
|
}
|
|
50
|
+
.challenges__content {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
min-height: 300px;
|
|
55
|
+
overflow-y: auto;
|
|
56
|
+
}
|
|
57
|
+
.challenges__empty {
|
|
58
|
+
color: var(--emw--color-white, #ffffff);
|
|
59
|
+
}
|
|
47
60
|
@container challenges-container (max-width: 800px) {
|
|
48
61
|
.challenges__header {
|
|
49
62
|
margin: 0 0 16px;
|
package/dist/collection/components/casino-challenges-container/casino-challenges-container.js
CHANGED
|
@@ -3,20 +3,50 @@ 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 "../../../../../casino-challenges-list/dist/types/index";
|
|
6
7
|
export class CasinoChallengesContainer {
|
|
7
8
|
constructor() {
|
|
8
|
-
// todo: connect with api
|
|
9
9
|
this.tabs = ['Active', 'Pending', 'Finished', 'Code'];
|
|
10
10
|
this.showNotification = 1;
|
|
11
|
+
this.checkAttrs = () => {
|
|
12
|
+
if (!this.endpoint) {
|
|
13
|
+
this.error = 'Endpoint is missing! Please provide a valid endpointURL.';
|
|
14
|
+
this.hasError = true;
|
|
15
|
+
console.error(this.error);
|
|
16
|
+
}
|
|
17
|
+
return this.hasError;
|
|
18
|
+
};
|
|
19
|
+
this.onLoadMore = () => {
|
|
20
|
+
this.pageNumber += 1;
|
|
21
|
+
this.getChallenges().then((res) => {
|
|
22
|
+
this.challenges = [...this.challenges, ...res.Data];
|
|
23
|
+
this.total = res.TotalCount;
|
|
24
|
+
});
|
|
25
|
+
};
|
|
11
26
|
this.handleTabClick = (index) => () => {
|
|
12
27
|
this.activeTabIndex = index;
|
|
28
|
+
this.challenges = [];
|
|
29
|
+
this.pageNumber = 0;
|
|
30
|
+
this.total = 0;
|
|
31
|
+
this.loadData();
|
|
13
32
|
};
|
|
14
33
|
this.mbSource = undefined;
|
|
15
34
|
this.clientStyling = undefined;
|
|
16
35
|
this.clientStylingUrl = undefined;
|
|
17
36
|
this.translationUrl = '';
|
|
18
37
|
this.language = 'en';
|
|
38
|
+
this.endpoint = '';
|
|
39
|
+
this.domain = '';
|
|
40
|
+
this.session = '';
|
|
41
|
+
this.userId = '';
|
|
19
42
|
this.activeTabIndex = 0;
|
|
43
|
+
this.error = '';
|
|
44
|
+
this.hasError = false;
|
|
45
|
+
this.challenges = [];
|
|
46
|
+
this.loading = false;
|
|
47
|
+
this.pageNumber = 0;
|
|
48
|
+
this.total = 0;
|
|
49
|
+
this.pageSize = 20;
|
|
20
50
|
}
|
|
21
51
|
handleClientStylingChange(newValue, oldValue) {
|
|
22
52
|
if (newValue != oldValue) {
|
|
@@ -33,6 +63,31 @@ export class CasinoChallengesContainer {
|
|
|
33
63
|
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
34
64
|
}
|
|
35
65
|
}
|
|
66
|
+
async getChallenges() {
|
|
67
|
+
if (!this.checkAttrs()) {
|
|
68
|
+
const path = this.activeTabIndex === 2 ? '/PlayerHistory' : '/GetChallengesInfo';
|
|
69
|
+
const url = `${this.endpoint}/challenge/${path}`;
|
|
70
|
+
const body = Object.assign(Object.assign({ DomainId: this.domain, PlayerLanguage: this.language, PageNumber: this.pageNumber, PageSize: this.pageSize }, (this.session && { PlayerSessionId: this.session })), (this.userId && this.activeTabIndex === 2 && { UserId: this.userId }));
|
|
71
|
+
this.loading = true;
|
|
72
|
+
return fetch(url, {
|
|
73
|
+
method: 'POST',
|
|
74
|
+
headers: {
|
|
75
|
+
'Content-Type': 'application/json'
|
|
76
|
+
},
|
|
77
|
+
body: JSON.stringify(body)
|
|
78
|
+
})
|
|
79
|
+
.then((res) => res.json())
|
|
80
|
+
.finally(() => (this.loading = false));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
loadData() {
|
|
84
|
+
this.getChallenges().then((res) => {
|
|
85
|
+
if (res === null || res === void 0 ? void 0 : res.Success) {
|
|
86
|
+
this.pageNumber = res.PageNumber;
|
|
87
|
+
this.total = res.TotalCount;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
36
91
|
componentDidLoad() {
|
|
37
92
|
if (this.stylingContainer) {
|
|
38
93
|
if (this.mbSource)
|
|
@@ -42,6 +97,7 @@ export class CasinoChallengesContainer {
|
|
|
42
97
|
if (this.clientStylingUrl)
|
|
43
98
|
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
44
99
|
}
|
|
100
|
+
this.loadData();
|
|
45
101
|
}
|
|
46
102
|
disconnectedCallback() {
|
|
47
103
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
@@ -51,8 +107,14 @@ export class CasinoChallengesContainer {
|
|
|
51
107
|
resolveTranslationUrl(this.translationUrl);
|
|
52
108
|
}
|
|
53
109
|
}
|
|
110
|
+
onTimerExpired(e) {
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
this.challenges = this.challenges.filter((challenge) => challenge.Id !== e.detail);
|
|
113
|
+
}, 10000);
|
|
114
|
+
}
|
|
54
115
|
render() {
|
|
55
|
-
|
|
116
|
+
var _a;
|
|
117
|
+
return (h("div", { key: 'af2e5b13351a5b8694258c628f545d6a127e80dc', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '91cdbc6a152a8b8c884842370c5509e7f6752074', class: "challenges" }, h("div", { key: 'd480a88d50cea5789eabb8dcc30233aea7d18d0f', class: "challenges__header" }, h("h1", { key: '8cd8787debb4f6f9897291f11c131c4ea1ef1d15', class: "challenges__title" }, h("img", { key: '1551482df42aaf36ed5cac7b2834bc276cc5cf52', src: titleIcon, alt: "icon" }), translate('title', this.language)), this.session && (h("div", { key: 'b45e42e56d5abc570b72979490f6e7ff4bf4f1bd', 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 }))))))), h("div", { key: 'd1a2a52ff5d26f17e401a7a3707f4153bbbc6290', class: "challenges__content" }, this.challenges.length === 0 && !this.loading && (h("div", { key: 'f0ab8469ac8a795b4d25d925bc1065217398e862', class: "empty" }, translate('empty', this.language))), this.activeTabIndex !== 3 && (h("casino-challenges-list", { key: '2f7aaf6e940668be6e15e1cfb81f5d2d063361ef', 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 }))))));
|
|
56
118
|
}
|
|
57
119
|
static get is() { return "casino-challenges-container"; }
|
|
58
120
|
static get encapsulation() { return "shadow"; }
|
|
@@ -154,12 +216,91 @@ export class CasinoChallengesContainer {
|
|
|
154
216
|
"attribute": "language",
|
|
155
217
|
"reflect": true,
|
|
156
218
|
"defaultValue": "'en'"
|
|
219
|
+
},
|
|
220
|
+
"endpoint": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"mutable": false,
|
|
223
|
+
"complexType": {
|
|
224
|
+
"original": "string",
|
|
225
|
+
"resolved": "string",
|
|
226
|
+
"references": {}
|
|
227
|
+
},
|
|
228
|
+
"required": false,
|
|
229
|
+
"optional": false,
|
|
230
|
+
"docs": {
|
|
231
|
+
"tags": [],
|
|
232
|
+
"text": "Client endpoint to fetch data"
|
|
233
|
+
},
|
|
234
|
+
"attribute": "endpoint",
|
|
235
|
+
"reflect": true,
|
|
236
|
+
"defaultValue": "''"
|
|
237
|
+
},
|
|
238
|
+
"domain": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "string",
|
|
243
|
+
"resolved": "string",
|
|
244
|
+
"references": {}
|
|
245
|
+
},
|
|
246
|
+
"required": false,
|
|
247
|
+
"optional": false,
|
|
248
|
+
"docs": {
|
|
249
|
+
"tags": [],
|
|
250
|
+
"text": "Client endpoint to fetch data"
|
|
251
|
+
},
|
|
252
|
+
"attribute": "domain",
|
|
253
|
+
"reflect": true,
|
|
254
|
+
"defaultValue": "''"
|
|
255
|
+
},
|
|
256
|
+
"session": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"mutable": false,
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "string",
|
|
261
|
+
"resolved": "string",
|
|
262
|
+
"references": {}
|
|
263
|
+
},
|
|
264
|
+
"required": false,
|
|
265
|
+
"optional": false,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": "session"
|
|
269
|
+
},
|
|
270
|
+
"attribute": "session",
|
|
271
|
+
"reflect": true,
|
|
272
|
+
"defaultValue": "''"
|
|
273
|
+
},
|
|
274
|
+
"userId": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"mutable": false,
|
|
277
|
+
"complexType": {
|
|
278
|
+
"original": "string",
|
|
279
|
+
"resolved": "string",
|
|
280
|
+
"references": {}
|
|
281
|
+
},
|
|
282
|
+
"required": false,
|
|
283
|
+
"optional": false,
|
|
284
|
+
"docs": {
|
|
285
|
+
"tags": [],
|
|
286
|
+
"text": "userId"
|
|
287
|
+
},
|
|
288
|
+
"attribute": "user-id",
|
|
289
|
+
"reflect": true,
|
|
290
|
+
"defaultValue": "''"
|
|
157
291
|
}
|
|
158
292
|
};
|
|
159
293
|
}
|
|
160
294
|
static get states() {
|
|
161
295
|
return {
|
|
162
|
-
"activeTabIndex": {}
|
|
296
|
+
"activeTabIndex": {},
|
|
297
|
+
"error": {},
|
|
298
|
+
"hasError": {},
|
|
299
|
+
"challenges": {},
|
|
300
|
+
"loading": {},
|
|
301
|
+
"pageNumber": {},
|
|
302
|
+
"total": {},
|
|
303
|
+
"pageSize": {}
|
|
163
304
|
};
|
|
164
305
|
}
|
|
165
306
|
static get watchers() {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export var EChallengeLevelTargetType;
|
|
2
|
+
(function (EChallengeLevelTargetType) {
|
|
3
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["Accumulative"] = 0] = "Accumulative";
|
|
4
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["SingleBet"] = 1] = "SingleBet";
|
|
5
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["MultipleOneBetSize"] = 2] = "MultipleOneBetSize";
|
|
6
|
+
})(EChallengeLevelTargetType || (EChallengeLevelTargetType = {}));
|
|
7
|
+
export var EChallengeRecurrenceType;
|
|
8
|
+
(function (EChallengeRecurrenceType) {
|
|
9
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Single"] = 0] = "Single";
|
|
10
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Daily"] = 1] = "Daily";
|
|
11
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Weekly"] = 2] = "Weekly";
|
|
12
|
+
EChallengeRecurrenceType[EChallengeRecurrenceType["Monthly"] = 3] = "Monthly";
|
|
13
|
+
})(EChallengeRecurrenceType || (EChallengeRecurrenceType = {}));
|
|
14
|
+
export var EChallengeRewardType;
|
|
15
|
+
(function (EChallengeRewardType) {
|
|
16
|
+
EChallengeRewardType[EChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
|
|
17
|
+
EChallengeRewardType[EChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
|
|
18
|
+
EChallengeRewardType[EChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
|
|
19
|
+
EChallengeRewardType[EChallengeRewardType["Challenge"] = 3] = "Challenge";
|
|
20
|
+
EChallengeRewardType[EChallengeRewardType["Custom"] = 4] = "Custom";
|
|
21
|
+
})(EChallengeRewardType || (EChallengeRewardType = {}));
|
|
22
|
+
export var EChallengeStatus;
|
|
23
|
+
(function (EChallengeStatus) {
|
|
24
|
+
EChallengeStatus[EChallengeStatus["Setup"] = 0] = "Setup";
|
|
25
|
+
EChallengeStatus[EChallengeStatus["Active"] = 1] = "Active";
|
|
26
|
+
EChallengeStatus[EChallengeStatus["Paused"] = 2] = "Paused";
|
|
27
|
+
EChallengeStatus[EChallengeStatus["Closed"] = 3] = "Closed";
|
|
28
|
+
EChallengeStatus[EChallengeStatus["Deleted"] = 4] = "Deleted";
|
|
29
|
+
})(EChallengeStatus || (EChallengeStatus = {}));
|
|
30
|
+
export var EChallengeTriggerType;
|
|
31
|
+
(function (EChallengeTriggerType) {
|
|
32
|
+
EChallengeTriggerType[EChallengeTriggerType["GameLaunch"] = 0] = "GameLaunch";
|
|
33
|
+
EChallengeTriggerType[EChallengeTriggerType["Reward"] = 1] = "Reward";
|
|
34
|
+
EChallengeTriggerType[EChallengeTriggerType["Manual"] = 2] = "Manual";
|
|
35
|
+
})(EChallengeTriggerType || (EChallengeTriggerType = {}));
|
|
36
|
+
export var EChallengeValidityType;
|
|
37
|
+
(function (EChallengeValidityType) {
|
|
38
|
+
EChallengeValidityType[EChallengeValidityType["Period"] = 0] = "Period";
|
|
39
|
+
EChallengeValidityType[EChallengeValidityType["Date"] = 1] = "Date";
|
|
40
|
+
})(EChallengeValidityType || (EChallengeValidityType = {}));
|