@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.
Files changed (71) hide show
  1. package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
  2. package/dist/casino-engagement-suite-tournament/index.esm.js +1 -0
  3. package/dist/casino-engagement-suite-tournament/p-0f4e94ab.entry.js +1 -0
  4. package/dist/casino-engagement-suite-tournament/p-1bf11325.js +2 -0
  5. package/dist/casino-engagement-suite-tournament/p-5df3ac81.js +1 -0
  6. package/dist/casino-engagement-suite-tournament/p-e1255160.js +1 -0
  7. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  8. package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +119 -807
  9. package/dist/cjs/casino-engagement-suite-tournament-1b738bb2.js +560 -0
  10. package/dist/cjs/casino-engagement-suite-tournament.cjs.js +16 -10
  11. package/dist/cjs/index-16d5d7c3.js +1642 -0
  12. package/dist/cjs/index.cjs.js +8 -0
  13. package/dist/cjs/loader.cjs.js +6 -12
  14. package/dist/collection/collection-manifest.json +3 -3
  15. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +17 -17
  16. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +492 -582
  17. package/dist/collection/components/casino-engagement-suite-tournament/index.js +1 -0
  18. package/dist/collection/index.js +1 -1
  19. package/dist/collection/shared/GradientRoundedButton.js +6 -7
  20. package/dist/collection/shared/renderBar.js +11 -11
  21. package/dist/collection/utils/api.apdater.js +30 -30
  22. package/dist/collection/utils/translations.js +19 -19
  23. package/dist/collection/utils/types.js +9 -9
  24. package/dist/collection/utils/util.date.js +26 -26
  25. package/dist/collection/utils/utils.js +16 -16
  26. package/dist/esm/app-globals-0f993ce5.js +3 -0
  27. package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +119 -807
  28. package/dist/esm/casino-engagement-suite-tournament-d8471680.js +558 -0
  29. package/dist/esm/casino-engagement-suite-tournament.js +13 -10
  30. package/dist/esm/index-3962add4.js +1612 -0
  31. package/dist/esm/index.js +2 -1
  32. package/dist/esm/loader.js +6 -12
  33. package/dist/stencil.config.dev.js +14 -0
  34. package/dist/stencil.config.js +14 -19
  35. 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
  36. 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
  37. package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +120 -123
  38. package/dist/types/components/casino-engagement-suite-tournament/index.d.ts +1 -0
  39. package/dist/types/components.d.ts +17 -1
  40. package/dist/types/index.d.ts +1 -1
  41. package/dist/types/shared/GradientRoundedButton.d.ts +3 -3
  42. package/dist/types/stencil-public-runtime.d.ts +142 -33
  43. package/dist/types/utils/api.apdater.d.ts +2 -30
  44. package/dist/types/utils/translations.d.ts +35 -35
  45. package/dist/types/utils/types.d.ts +77 -77
  46. package/loader/cdn.js +1 -3
  47. package/loader/index.cjs.js +1 -3
  48. package/loader/index.d.ts +13 -1
  49. package/loader/index.es2017.js +1 -3
  50. package/loader/index.js +1 -3
  51. package/loader/package.json +1 -0
  52. package/package.json +8 -8
  53. package/dist/casino-engagement-suite-tournament/p-023f3dc7.entry.js +0 -1
  54. package/dist/casino-engagement-suite-tournament/p-86ce7485.js +0 -1
  55. package/dist/cjs/index-e778ddd2.js +0 -1733
  56. package/dist/components/casino-engagement-suite-progress-bar.js +0 -6
  57. package/dist/components/casino-engagement-suite-progress-bar2.js +0 -107
  58. package/dist/components/casino-engagement-suite-tournament.d.ts +0 -11
  59. package/dist/components/casino-engagement-suite-tournament.js +0 -716
  60. package/dist/components/general-styling-wrapper.js +0 -6
  61. package/dist/components/general-styling-wrapper2.js +0 -103
  62. package/dist/components/index.d.ts +0 -26
  63. package/dist/components/index.js +0 -1
  64. package/dist/esm/index-4e611d33.js +0 -1704
  65. package/dist/esm/polyfills/core-js.js +0 -11
  66. package/dist/esm/polyfills/css-shim.js +0 -1
  67. package/dist/esm/polyfills/dom.js +0 -79
  68. package/dist/esm/polyfills/es5-html-element.js +0 -1
  69. package/dist/esm/polyfills/index.js +0 -34
  70. package/dist/esm/polyfills/system.js +0 -6
  71. 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';
@@ -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
- var { statedClasses, innerHTML } = _a, props = __rest(_a, ["statedClasses", "innerHTML"]);
6
- const { isHollow, isPending } = statedClasses;
7
- return (h("button", Object.assign({}, Object.assign({ class: classnames('GradientRoundedButton', 'GradientRounded', {
8
- Hollow: isHollow || false,
9
- Pending: isPending || false,
10
- }) }, props)),
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
- 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] || '')))));
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
- 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;
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
- let { item, items: leaderboards } = leaderboardRes;
24
- if (!item) {
25
- return leaderboards;
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
- Tab["Info"] = "Info";
4
- Tab["Leaderboard"] = "Leaderboard";
5
- Tab["Games"] = "Games";
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
- Time["Starts"] = "Starts";
10
- Time["Ends"] = "Ends";
9
+ Time["Starts"] = "Starts";
10
+ Time["Ends"] = "Ends";
11
11
  })(Time || (Time = {}));
12
12
  export const localePostprocess = (translationText, props) => {
13
- Object.keys(props).map(key => {
14
- translationText = translationText.replace(`{${key}}`, props[key]);
15
- });
16
- return translationText;
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
- 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.' });
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
- LeaderboardPage["Confirm"] = "Confirm";
4
- LeaderboardPage["List"] = "List";
5
- LeaderboardPage["Item"] = "Item";
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
- TournamentState["Running"] = "Running";
10
- TournamentState["Unstarted"] = "Unstarted";
11
- TournamentState["Closed"] = "Closed";
12
- TournamentState["Closing"] = "Closing";
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
- DialogType["Unjoin"] = "Unjoin";
17
- DialogType["Tip"] = "Tip";
16
+ DialogType["Unjoin"] = "Unjoin";
17
+ DialogType["Tip"] = "Tip";
18
18
  })(DialogType || (DialogType = {}));
@@ -1,38 +1,38 @@
1
1
  export function formatDate(date) {
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', ',');
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
- const result = new Date(date);
14
- result.setDate(result.getDate() + days);
15
- return result;
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
- const result = new Date(date);
19
- result.setMinutes(result.getMinutes() + minutes);
20
- return result;
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
- const result = new Date(date);
24
- result.setSeconds(result.getSeconds() + seconds);
25
- return result;
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
- 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;
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
- return (100 * (new Date().getTime() - startDate.getTime()) / (endDate.getTime() - startDate.getTime())).toFixed(0);
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
- 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(' ');
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
  };
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };