@everymatrix/casino-engagement-suite-tournament 1.44.0 → 1.45.5
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-tournament/casino-engagement-suite-tournament.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/index.esm.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-0f4e94ab.entry.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-1bf11325.js +2 -0
- package/dist/casino-engagement-suite-tournament/p-5df3ac81.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +119 -807
- package/dist/cjs/casino-engagement-suite-tournament-1b738bb2.js +560 -0
- package/dist/cjs/casino-engagement-suite-tournament.cjs.js +16 -10
- package/dist/cjs/index-16d5d7c3.js +1642 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +17 -17
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +492 -582
- package/dist/collection/components/casino-engagement-suite-tournament/index.js +1 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/shared/GradientRoundedButton.js +6 -7
- package/dist/collection/shared/renderBar.js +11 -11
- package/dist/collection/utils/api.apdater.js +30 -30
- package/dist/collection/utils/translations.js +19 -19
- package/dist/collection/utils/types.js +9 -9
- package/dist/collection/utils/util.date.js +26 -26
- package/dist/collection/utils/utils.js +16 -16
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +119 -807
- package/dist/esm/casino-engagement-suite-tournament-d8471680.js +558 -0
- package/dist/esm/casino-engagement-suite-tournament.js +13 -10
- package/dist/esm/index-3962add4.js +1612 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +6 -12
- package/dist/stencil.config.dev.js +14 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +120 -123
- package/dist/types/components/casino-engagement-suite-tournament/index.d.ts +1 -0
- package/dist/types/components.d.ts +17 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/GradientRoundedButton.d.ts +3 -3
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/api.apdater.d.ts +2 -30
- package/dist/types/utils/translations.d.ts +35 -35
- package/dist/types/utils/types.d.ts +77 -77
- 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 +8 -8
- package/dist/casino-engagement-suite-tournament/p-023f3dc7.entry.js +0 -1
- package/dist/casino-engagement-suite-tournament/p-86ce7485.js +0 -1
- package/dist/cjs/index-e778ddd2.js +0 -1733
- 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/casino-engagement-suite-tournament.d.ts +0 -11
- package/dist/components/casino-engagement-suite-tournament.js +0 -716
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-4e611d33.js +0 -1704
- 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-tournament/.stencil/packages/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CasinoEngagementSuiteTournament } from './casino-engagement-suite-tournament';
|
package/dist/collection/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components';
|
|
1
|
+
export * from './components/casino-engagement-suite-tournament';
|
|
@@ -2,11 +2,10 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { h } from "@stencil/core";
|
|
3
3
|
import { classnames } from "../utils/utils";
|
|
4
4
|
export const GradientRoundedButton = (_a) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
h("span", null, innerHTML)));
|
|
5
|
+
var { statedClasses, innerHTML } = _a, props = __rest(_a, ["statedClasses", "innerHTML"]);
|
|
6
|
+
const { isHollow, isPending } = statedClasses;
|
|
7
|
+
return (h("button", Object.assign({ class: classnames('GradientRoundedButton', 'GradientRounded', {
|
|
8
|
+
Hollow: isHollow || false,
|
|
9
|
+
Pending: isPending || false,
|
|
10
|
+
}) }, props), h("span", null, innerHTML)));
|
|
12
11
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const CloseBar = (props) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
const { left, middle, right } = props;
|
|
4
|
+
const slots = {
|
|
5
|
+
left,
|
|
6
|
+
middle,
|
|
7
|
+
right,
|
|
8
|
+
};
|
|
9
|
+
const getFirstLetterUppercase = (str) => str
|
|
10
|
+
.split('')
|
|
11
|
+
.map((letter, index) => index === 0 ? letter.toUpperCase() : letter)
|
|
12
|
+
.join('');
|
|
13
|
+
return (h("div", { class: "WrapperBar" }, Object.keys(slots).map(slotKey => (h("div", { class: "WrapperBar" + getFirstLetterUppercase(slotKey) }, slots[slotKey] || '')))));
|
|
14
14
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
export const tournamentAdapter = (tournamentApi) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
const keysTime = [
|
|
3
|
+
'startTime',
|
|
4
|
+
'endTime',
|
|
5
|
+
'closeTime',
|
|
6
|
+
'exhibitionStartTime',
|
|
7
|
+
'exhibitionEndTime',
|
|
8
|
+
];
|
|
9
|
+
const tournament = {};
|
|
10
|
+
Object.keys(tournamentApi).map((key) => {
|
|
11
|
+
const value = tournamentApi[key];
|
|
12
|
+
switch (key) {
|
|
13
|
+
case 'games':
|
|
14
|
+
tournament[key] = value.items;
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
tournament[key] = keysTime.includes(key) ? new Date(value) : value;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return tournament;
|
|
21
21
|
};
|
|
22
22
|
export const leaderboardsAdapter = (leaderboardRes) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
return leaderboards.map(leaderboard => {
|
|
28
|
-
if (item && item.userID === leaderboard.userID) {
|
|
29
|
-
return Object.assign(Object.assign({}, leaderboard), { isMe: true });
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return leaderboard;
|
|
23
|
+
let { item, items: leaderboards } = leaderboardRes;
|
|
24
|
+
if (!item) {
|
|
25
|
+
return leaderboards;
|
|
33
26
|
}
|
|
34
|
-
|
|
27
|
+
return leaderboards.map(leaderboard => {
|
|
28
|
+
if (item && item.userID === leaderboard.userID) {
|
|
29
|
+
return Object.assign(Object.assign({}, leaderboard), { isMe: true });
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return leaderboard;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
35
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
export var Tab;
|
|
2
2
|
(function (Tab) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Tab["Info"] = "Info";
|
|
4
|
+
Tab["Leaderboard"] = "Leaderboard";
|
|
5
|
+
Tab["Games"] = "Games";
|
|
6
6
|
})(Tab || (Tab = {}));
|
|
7
7
|
export var Time;
|
|
8
8
|
(function (Time) {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Time["Starts"] = "Starts";
|
|
10
|
+
Time["Ends"] = "Ends";
|
|
11
11
|
})(Time || (Time = {}));
|
|
12
12
|
export const localePostprocess = (translationText, props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
Object.keys(props).map(key => {
|
|
14
|
+
translationText = translationText.replace(`{${key}}`, props[key]);
|
|
15
|
+
});
|
|
16
|
+
return translationText;
|
|
17
17
|
};
|
|
18
18
|
export const TRANSLATIONS = Object.assign(Object.assign(Object.assign({ Join: 'Join', Unjoin: 'Unjoin' }, Tab), Time), { TC: 'Terms & Conditions', ScoreCriteria: 'Score Criteria', MinimumBetCriteria: 'Minimum bet criteria', Place: 'place', Prizes: 'Rewards', LeaderboardDetails: 'Leaderboard Details', UnjoinDialog: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
Title: 'Quit Leaderboard?',
|
|
20
|
+
Description: 'Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?',
|
|
21
|
+
ButtonYes: 'Yes, I want to quit leaderboard',
|
|
22
|
+
ButtonNo: 'No, Stay on the leaderboard',
|
|
23
|
+
}, JoinDialog: {
|
|
24
|
+
Tile: 'Congratulations!',
|
|
25
|
+
Description: 'You have unlocked <span>{tournamentName}</span>! <br />Would you like to join?',
|
|
26
|
+
ButtonYes: 'Join',
|
|
27
|
+
ButtonNo: 'Not interested',
|
|
28
|
+
}, NoLeaderboards: 'No Leaderboards yet', NoLeaderboardsTip: 'Try winning tickets to Leaderboards as rewards or launching other booster games', Leaderboards: 'Leaderboards', TipPrize: 'You took <span>{place}</span> place and win <span>{prize}</span>', Tip: 'Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward.' });
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export var LeaderboardPage;
|
|
2
2
|
(function (LeaderboardPage) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
LeaderboardPage["Confirm"] = "Confirm";
|
|
4
|
+
LeaderboardPage["List"] = "List";
|
|
5
|
+
LeaderboardPage["Item"] = "Item";
|
|
6
6
|
})(LeaderboardPage || (LeaderboardPage = {}));
|
|
7
7
|
export var TournamentState;
|
|
8
8
|
(function (TournamentState) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
TournamentState["Running"] = "Running";
|
|
10
|
+
TournamentState["Unstarted"] = "Unstarted";
|
|
11
|
+
TournamentState["Closed"] = "Closed";
|
|
12
|
+
TournamentState["Closing"] = "Closing";
|
|
13
13
|
})(TournamentState || (TournamentState = {}));
|
|
14
14
|
export var DialogType;
|
|
15
15
|
(function (DialogType) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
DialogType["Unjoin"] = "Unjoin";
|
|
17
|
+
DialogType["Tip"] = "Tip";
|
|
18
18
|
})(DialogType || (DialogType = {}));
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
export function formatDate(date) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
const options = {
|
|
3
|
+
year: 'numeric',
|
|
4
|
+
month: 'long',
|
|
5
|
+
day: 'numeric',
|
|
6
|
+
hour: '2-digit',
|
|
7
|
+
minute: '2-digit',
|
|
8
|
+
hour12: false
|
|
9
|
+
};
|
|
10
|
+
return date.toLocaleDateString('en-US', options).replace(' at', ',');
|
|
11
11
|
}
|
|
12
12
|
export function addDays(date, days) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const result = new Date(date);
|
|
14
|
+
result.setDate(result.getDate() + days);
|
|
15
|
+
return result;
|
|
16
16
|
}
|
|
17
17
|
export function addMinutes(date, minutes) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const result = new Date(date);
|
|
19
|
+
result.setMinutes(result.getMinutes() + minutes);
|
|
20
|
+
return result;
|
|
21
21
|
}
|
|
22
22
|
export function addSeconds(date, seconds) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const result = new Date(date);
|
|
24
|
+
result.setSeconds(result.getSeconds() + seconds);
|
|
25
|
+
return result;
|
|
26
26
|
}
|
|
27
27
|
export function getDifference(startDate, endDate) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
const diffMs = Math.abs(endDate.getTime() - startDate.getTime()); // Difference in milliseconds
|
|
29
|
+
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24)); // Difference in days
|
|
30
|
+
const diffHours = Math.floor((diffMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); // Remaining hours
|
|
31
|
+
const diffMinutes = Math.floor((diffMs % (1000 * 60 * 60)) / (1000 * 60)); // Remaining minutes
|
|
32
|
+
// Format the output
|
|
33
|
+
const formattedDiff = `${String(diffDays).padStart(2, '0')}d:${String(diffHours).padStart(2, '0')}h:${String(diffMinutes).padStart(2, '0')}m`;
|
|
34
|
+
return formattedDiff;
|
|
35
35
|
}
|
|
36
36
|
export function getProgress(startDate, endDate) {
|
|
37
|
-
|
|
37
|
+
return (100 * (new Date().getTime() - startDate.getTime()) / (endDate.getTime() - startDate.getTime())).toFixed(0);
|
|
38
38
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export const classnames = (...args) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
let classnameArray = [];
|
|
3
|
+
args.map(arg => {
|
|
4
|
+
switch (typeof arg) {
|
|
5
|
+
case 'string':
|
|
6
|
+
classnameArray.push(arg);
|
|
7
|
+
break;
|
|
8
|
+
case 'object':
|
|
9
|
+
Object.keys(arg).map(k => {
|
|
10
|
+
if (arg[k]) {
|
|
11
|
+
classnameArray.push(k);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return classnameArray.join(' ');
|
|
18
18
|
};
|