@everymatrix/casino-engagement-suite-challenges-list 1.44.0 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.esm.js +1 -1
- package/dist/casino-engagement-suite-challenges-list/p-7fd72b22.js +2 -0
- package/dist/casino-engagement-suite-challenges-list/p-dd67e263.entry.js +1 -0
- package/dist/casino-engagement-suite-challenges-list/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-challenges-list.cjs.js +17 -11
- package/dist/cjs/casino-engagement-suite-challenges-list_2.cjs.entry.js +444 -466
- package/dist/cjs/index-97488095.js +1316 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.css +112 -111
- package/dist/collection/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.js +480 -524
- package/dist/collection/components/casino-engagement-suite-challenges-list/index.js +1 -0
- package/dist/collection/models/challenge.js +18 -18
- package/dist/collection/renders/ChallengesHistory.js +31 -47
- package/dist/collection/utils/locale.utils.js +26 -26
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-challenges-list.js +14 -11
- package/dist/esm/casino-engagement-suite-challenges-list_2.entry.js +444 -466
- package/dist/esm/index-00eb432b.js +1288 -0
- package/dist/esm/loader.js +7 -13
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-list/.stencil/packages/stencil/casino-engagement-suite-challenges-list/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-list/.stencil/packages/stencil/casino-engagement-suite-challenges-list/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-challenges-list/casino-engagement-suite-challenges-list.d.ts +81 -81
- package/dist/types/components/casino-engagement-suite-challenges-list/index.d.ts +1 -0
- package/dist/types/components.d.ts +19 -2
- package/dist/types/models/challenge.d.ts +65 -65
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +12 -2
- package/dist/casino-engagement-suite-challenges-list/p-2061b71e.entry.js +0 -1
- package/dist/casino-engagement-suite-challenges-list/p-fad4589e.js +0 -1
- package/dist/cjs/index-0a011384.js +0 -1336
- package/dist/components/casino-engagement-suite-challenges-list.d.ts +0 -11
- package/dist/components/casino-engagement-suite-challenges-list.js +0 -2650
- package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
- package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-ddf7e990.js +0 -1309
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-challenges-list/.stencil/packages/casino-engagement-suite-challenges-list/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CasinoEngagementSuiteChallengesList } from './casino-engagement-suite-challenges-list';
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export var ChallengeRewardType;
|
|
2
2
|
(function (ChallengeRewardType) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
ChallengeRewardType[ChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
|
|
4
|
+
ChallengeRewardType[ChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
|
|
5
|
+
ChallengeRewardType[ChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
|
|
6
|
+
ChallengeRewardType[ChallengeRewardType["Challenge"] = 3] = "Challenge";
|
|
7
|
+
ChallengeRewardType[ChallengeRewardType["Custom"] = 4] = "Custom";
|
|
8
8
|
})(ChallengeRewardType || (ChallengeRewardType = {}));
|
|
9
9
|
export var ChallengeHistoryLevelStatus;
|
|
10
10
|
(function (ChallengeHistoryLevelStatus) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Completed"] = 0] = "Completed";
|
|
12
|
+
ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Expired"] = 1] = "Expired";
|
|
13
|
+
ChallengeHistoryLevelStatus[ChallengeHistoryLevelStatus["Forfeited"] = 2] = "Forfeited";
|
|
14
14
|
})(ChallengeHistoryLevelStatus || (ChallengeHistoryLevelStatus = {}));
|
|
15
15
|
export var ChallengeLevelProgressStatus;
|
|
16
16
|
(function (ChallengeLevelProgressStatus) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
|
|
18
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
|
|
19
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
|
|
20
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
|
|
21
21
|
})(ChallengeLevelProgressStatus || (ChallengeLevelProgressStatus = {}));
|
|
22
22
|
export var ChallengeProgressStatus;
|
|
23
23
|
(function (ChallengeProgressStatus) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
|
|
25
|
+
ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
|
|
26
|
+
ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
|
|
27
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
|
|
28
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
|
|
29
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
30
30
|
})(ChallengeProgressStatus || (ChallengeProgressStatus = {}));
|
|
@@ -1,64 +1,48 @@
|
|
|
1
|
-
import { ChallengeHistoryLevelStatus, ChallengeRewardType } from
|
|
2
|
-
import { h } from
|
|
3
|
-
import { translate } from
|
|
4
|
-
import { format } from
|
|
1
|
+
import { ChallengeHistoryLevelStatus, ChallengeRewardType } from "../models/challenge";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
import { translate } from "../utils/locale.utils";
|
|
4
|
+
import { format } from "date-fns";
|
|
5
5
|
export const getHistoryLoaderTemplate = (lang) => {
|
|
6
|
-
|
|
7
|
-
h("casino-engagement-suite-progress-bar", { indeterminate: true }),
|
|
8
|
-
h("span", null, translate('loading', lang)));
|
|
6
|
+
return h("div", { class: "HistoryLoader" }, h("casino-engagement-suite-progress-bar", { indeterminate: true }), h("span", null, translate('loading', lang)));
|
|
9
7
|
};
|
|
10
8
|
const getRewardNameByType = (type, lang) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
switch (type) {
|
|
10
|
+
case 0: return translate('freeSpins', lang);
|
|
11
|
+
case 1: return translate('luckyWheel', lang);
|
|
12
|
+
case 2: return translate('leaderboard', lang);
|
|
13
|
+
case 3: return translate('mission', lang);
|
|
14
|
+
}
|
|
17
15
|
};
|
|
18
16
|
const getLevelStatusString = (status, lang) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
switch (status) {
|
|
18
|
+
case ChallengeHistoryLevelStatus.Completed: return translate('completed', lang);
|
|
19
|
+
case ChallengeHistoryLevelStatus.Expired: return translate('expired', lang);
|
|
20
|
+
case ChallengeHistoryLevelStatus.Forfeited: return translate('forfeited', lang);
|
|
21
|
+
default: return status;
|
|
22
|
+
}
|
|
25
23
|
};
|
|
26
24
|
const showRewards = (level) => {
|
|
27
|
-
|
|
25
|
+
return !!level.Rewards && level.Status === ChallengeHistoryLevelStatus.Completed;
|
|
28
26
|
};
|
|
29
27
|
export const getRewardTemplate = (reward, lang) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
h("span", { class: "HistoryRewardsItemName" }, rewardName),
|
|
35
|
-
!isCustom && h("div", { class: "HistoryRewardStatusIcon" }));
|
|
28
|
+
const isCustom = reward.Type === ChallengeRewardType.Custom;
|
|
29
|
+
const rewardName = isCustom ? reward.RewardDescription : getRewardNameByType(reward.Type, lang);
|
|
30
|
+
const isRewarded = isCustom || reward.IsRewarded;
|
|
31
|
+
return h("div", { class: `HistoryRewardsItem ${isRewarded || isCustom ? 'IsRewarded' : 'IsNotRewarded'}` }, h("span", { class: "HistoryRewardsItemName" }, rewardName), !isCustom && h("div", { class: `EngagementSuiteIconButton ${isRewarded ? 'Check' : 'Close'}` }));
|
|
36
32
|
};
|
|
37
33
|
export const getHistoryLevelRewardsTemplate = (level, lang) => {
|
|
38
|
-
|
|
39
|
-
h("img", { class: "HistoryRewardsIcon", src: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg", alt: "Reward" }),
|
|
40
|
-
Object.values(level.Rewards).map(reward => getRewardTemplate(reward, lang)));
|
|
34
|
+
return h("div", { class: "HistoryRewardsList" }, h("div", { class: "EngagementSuiteIconButton CupRewardList" }), Object.values(level.Rewards).map(reward => getRewardTemplate(reward, lang)));
|
|
41
35
|
};
|
|
42
36
|
export const getHistoryLevelTemplate = (level, index, lang) => {
|
|
43
|
-
|
|
44
|
-
h("span", { class: "Level" }, `${translate('level', lang)} ${index + 1}`),
|
|
45
|
-
h("span", { class: "Status" }, getLevelStatusString(level.Status, lang)),
|
|
46
|
-
h("span", { class: "Time" }, format(new Date(level.Time), 'LLL d, yyyy HH:mm:ss')));
|
|
37
|
+
return h("div", { class: "HistoryLevelInfo" }, h("span", { class: "Level" }, `${translate('level', lang)} ${index + 1}`), h("span", { class: "Status" }, getLevelStatusString(level.Status, lang)), h("span", { class: "Time" }, format(new Date(level.Time), 'LLL d, yyyy HH:mm:ss')));
|
|
47
38
|
};
|
|
48
39
|
export const getChallengesHistoryTemplate = (histories, openedHistoryIds, toggleChallengeHistory, lang) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
history.Name,
|
|
56
|
-
h("button", { class: "HistoryListItemButton" })),
|
|
57
|
-
h("div", { class: "HistoryListItemBody" },
|
|
58
|
-
h("div", null, history.Levels.map((level, index) => {
|
|
59
|
-
return h("div", { class: "HistoryListItemLevelCard" },
|
|
60
|
-
getHistoryLevelTemplate(level, index, lang),
|
|
61
|
-
showRewards(level) && getHistoryLevelRewardsTemplate(level, lang));
|
|
40
|
+
if (histories.length === 0) {
|
|
41
|
+
return h("p", { class: "HistoryEmptyMessage" }, translate('noHistory', lang));
|
|
42
|
+
}
|
|
43
|
+
return h("div", { class: "HistoryList" }, histories.map((history) => {
|
|
44
|
+
return h("div", { key: history.ProgressId, class: `HistoryListItem ${openedHistoryIds.includes(history.ProgressId) ? 'Opened' : 'Closed'}` }, h("header", { class: "HistoryListItemHeader", "data-id": history.ProgressId, onClick: toggleChallengeHistory }, history.Name, h("button", { class: "EngagementSuiteIconButton ArrowDown" })), h("div", { class: "HistoryListItemBody" }, h("div", null, history.Levels.map((level, index) => {
|
|
45
|
+
return h("div", { class: "HistoryListItemLevelCard" }, getHistoryLevelTemplate(level, index, lang), showRewards(level) && getHistoryLevelRewardsTemplate(level, lang));
|
|
62
46
|
}))));
|
|
63
|
-
|
|
47
|
+
}));
|
|
64
48
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
en: {
|
|
5
|
+
missions: 'Missions',
|
|
6
|
+
join: 'Join',
|
|
7
|
+
unjoin: 'Unjoin',
|
|
8
|
+
new: 'new',
|
|
9
|
+
noMissions: 'No Missions yet',
|
|
10
|
+
tryOtherGames: 'Try winning Missions as rewards or launching other booster games',
|
|
11
|
+
tooltip: 'Mission where your real money bets contribute towards the level progress to achieve the level reward',
|
|
12
|
+
history: 'History',
|
|
13
|
+
level: 'Level',
|
|
14
|
+
status: 'Status',
|
|
15
|
+
time: 'Time',
|
|
16
|
+
loading: 'Loading...',
|
|
17
|
+
completed: 'Completed',
|
|
18
|
+
expired: 'Expired',
|
|
19
|
+
forfeited: 'Forfeited',
|
|
20
|
+
noHistory: 'No missions’ history available (last 30 days)',
|
|
21
|
+
freeSpins: 'Free Spins',
|
|
22
|
+
luckyWheel: 'Lucky Wheel',
|
|
23
|
+
leaderboard: 'Leaderboard',
|
|
24
|
+
mission: 'Mission',
|
|
25
|
+
missionHasBeenForfeited: 'The mission has been canceled.',
|
|
26
|
+
support: 'Please, contact support.'
|
|
27
|
+
}
|
|
28
28
|
};
|
|
29
29
|
export const translate = (key, customLang) => {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const lang = customLang;
|
|
31
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
32
32
|
};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-00eb432b.js';
|
|
2
|
+
export { s as setNonce } from './index-00eb432b.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
2
4
|
|
|
3
5
|
/*
|
|
4
|
-
Stencil Client Patch Browser
|
|
6
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
const importMeta = import.meta.url;
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== "") {
|
|
12
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return promiseResolve(opts);
|
|
13
15
|
};
|
|
14
16
|
|
|
15
|
-
patchBrowser().then(options => {
|
|
16
|
-
|
|
17
|
+
patchBrowser().then(async (options) => {
|
|
18
|
+
await globalScripts();
|
|
19
|
+
return bootstrapLazy([["casino-engagement-suite-challenges-list_2",[[1,"casino-engagement-suite-challenges-list",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"device":[1],"challenges":[1040],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"inProgressChallenges":[1040],"pausedChallengeIds":[1040],"tooltip":[32],"timers":[32],"limitStylingAppends":[32],"activeTab":[32],"historyLoading":[32],"challengesHistory":[32],"openedHistoryIds":[32]},[[8,"message","handleEvent"]],{"challenges":["challengesPropHandler"]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
17
20
|
});
|