@everymatrix/casino-engagement-suite-tournament 1.39.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-tournament/casino-engagement-suite-tournament.esm.js +1 -0
- package/dist/casino-engagement-suite-tournament/index.esm.js +0 -0
- package/dist/casino-engagement-suite-tournament/p-75de0549.entry.js +1 -0
- package/dist/casino-engagement-suite-tournament/p-86ce7485.js +1 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +824 -0
- package/dist/cjs/casino-engagement-suite-tournament.cjs.js +19 -0
- package/dist/cjs/index-e778ddd2.js +1733 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/collection/collection-manifest.json +25 -0
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +374 -0
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +601 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/shared/GradientRoundedButton.js +12 -0
- package/dist/collection/shared/icons.js +8 -0
- package/dist/collection/shared/renderBar.js +14 -0
- package/dist/collection/utils/api.apdater.js +35 -0
- package/dist/collection/utils/translations.js +28 -0
- package/dist/collection/utils/types.js +18 -0
- package/dist/collection/utils/util.date.js +38 -0
- package/dist/collection/utils/utils.js +18 -0
- package/dist/components/casino-engagement-suite-progress-bar.js +6 -0
- package/dist/components/casino-engagement-suite-progress-bar2.js +94 -0
- package/dist/components/casino-engagement-suite-tournament.d.ts +11 -0
- package/dist/components/casino-engagement-suite-tournament.js +716 -0
- package/dist/components/general-styling-wrapper.js +6 -0
- package/dist/components/general-styling-wrapper2.js +103 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +818 -0
- package/dist/esm/casino-engagement-suite-tournament.js +17 -0
- package/dist/esm/index-4e611d33.js +1704 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +22 -0
- 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 +2 -0
- package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +130 -0
- package/dist/types/components.d.ts +79 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/shared/GradientRoundedButton.d.ts +5 -0
- package/dist/types/shared/icons.d.ts +7 -0
- package/dist/types/shared/renderBar.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/api.apdater.d.ts +31 -0
- package/dist/types/utils/translations.d.ts +42 -0
- package/dist/types/utils/types.d.ts +95 -0
- package/dist/types/utils/util.date.d.ts +6 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +26 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export var Tab;
|
|
2
|
+
(function (Tab) {
|
|
3
|
+
Tab["Info"] = "Info";
|
|
4
|
+
Tab["Leaderboard"] = "Leaderboard";
|
|
5
|
+
Tab["Games"] = "Games";
|
|
6
|
+
})(Tab || (Tab = {}));
|
|
7
|
+
export var Time;
|
|
8
|
+
(function (Time) {
|
|
9
|
+
Time["Starts"] = "Starts";
|
|
10
|
+
Time["Ends"] = "Ends";
|
|
11
|
+
})(Time || (Time = {}));
|
|
12
|
+
export const localePostprocess = (translationText, props) => {
|
|
13
|
+
Object.keys(props).map(key => {
|
|
14
|
+
translationText = translationText.replace(`{${key}}`, props[key]);
|
|
15
|
+
});
|
|
16
|
+
return translationText;
|
|
17
|
+
};
|
|
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.' });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var LeaderboardPage;
|
|
2
|
+
(function (LeaderboardPage) {
|
|
3
|
+
LeaderboardPage["Confirm"] = "Confirm";
|
|
4
|
+
LeaderboardPage["List"] = "List";
|
|
5
|
+
LeaderboardPage["Item"] = "Item";
|
|
6
|
+
})(LeaderboardPage || (LeaderboardPage = {}));
|
|
7
|
+
export var TournamentState;
|
|
8
|
+
(function (TournamentState) {
|
|
9
|
+
TournamentState["Running"] = "Running";
|
|
10
|
+
TournamentState["Unstarted"] = "Unstarted";
|
|
11
|
+
TournamentState["Closed"] = "Closed";
|
|
12
|
+
TournamentState["Closing"] = "Closing";
|
|
13
|
+
})(TournamentState || (TournamentState = {}));
|
|
14
|
+
export var DialogType;
|
|
15
|
+
(function (DialogType) {
|
|
16
|
+
DialogType["Unjoin"] = "Unjoin";
|
|
17
|
+
DialogType["Tip"] = "Tip";
|
|
18
|
+
})(DialogType || (DialogType = {}));
|
|
@@ -0,0 +1,38 @@
|
|
|
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', ',');
|
|
11
|
+
}
|
|
12
|
+
export function addDays(date, days) {
|
|
13
|
+
const result = new Date(date);
|
|
14
|
+
result.setDate(result.getDate() + days);
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
export function addMinutes(date, minutes) {
|
|
18
|
+
const result = new Date(date);
|
|
19
|
+
result.setMinutes(result.getMinutes() + minutes);
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
export function addSeconds(date, seconds) {
|
|
23
|
+
const result = new Date(date);
|
|
24
|
+
result.setSeconds(result.getSeconds() + seconds);
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
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;
|
|
35
|
+
}
|
|
36
|
+
export function getProgress(startDate, endDate) {
|
|
37
|
+
return (100 * (new Date().getTime() - startDate.getTime()) / (endDate.getTime() - startDate.getTime())).toFixed(0);
|
|
38
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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(' ');
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { C as CasinoEngagementSuiteProgressBar$1, d as defineCustomElement$1 } from './casino-engagement-suite-progress-bar2.js';
|
|
2
|
+
|
|
3
|
+
const CasinoEngagementSuiteProgressBar = CasinoEngagementSuiteProgressBar$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { CasinoEngagementSuiteProgressBar, defineCustomElement };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
4
|
+
|
|
5
|
+
const CasinoEngagementSuiteProgressBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* Value for the widget
|
|
12
|
+
*/
|
|
13
|
+
this.value = 0;
|
|
14
|
+
/**
|
|
15
|
+
* Shows disabled styles
|
|
16
|
+
*/
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
/**
|
|
19
|
+
* Hide percent value
|
|
20
|
+
*/
|
|
21
|
+
this.hidePercent = false;
|
|
22
|
+
/**
|
|
23
|
+
* Client custom styling via string
|
|
24
|
+
*/
|
|
25
|
+
this.clientStyling = '';
|
|
26
|
+
/**
|
|
27
|
+
* Client custom styling via url
|
|
28
|
+
*/
|
|
29
|
+
this.clientStylingUrl = '';
|
|
30
|
+
this.limitStylingAppends = false;
|
|
31
|
+
this.setClientStyling = () => {
|
|
32
|
+
let sheet = document.createElement('style');
|
|
33
|
+
sheet.innerHTML = this.clientStyling;
|
|
34
|
+
this.host.prepend(sheet);
|
|
35
|
+
};
|
|
36
|
+
this.setClientStylingURL = () => {
|
|
37
|
+
let url = new URL(this.clientStylingUrl);
|
|
38
|
+
let cssFile = document.createElement('style');
|
|
39
|
+
fetch(url.href)
|
|
40
|
+
.then((res) => res.text())
|
|
41
|
+
.then((data) => {
|
|
42
|
+
cssFile.innerHTML = data;
|
|
43
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
44
|
+
})
|
|
45
|
+
.catch((err) => {
|
|
46
|
+
console.log('Error ', err);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
componentDidRender() {
|
|
51
|
+
if (!this.limitStylingAppends && this.host) {
|
|
52
|
+
if (this.clientStyling)
|
|
53
|
+
this.setClientStyling();
|
|
54
|
+
if (this.clientStylingUrl)
|
|
55
|
+
this.setClientStylingURL();
|
|
56
|
+
this.limitStylingAppends = true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
getProgressBarClasses() {
|
|
60
|
+
return {
|
|
61
|
+
ProgressBar: true,
|
|
62
|
+
Completed: this.value === 100,
|
|
63
|
+
Disabled: this.disabled,
|
|
64
|
+
HidePercent: this.hidePercent
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
|
|
69
|
+
}
|
|
70
|
+
get host() { return this; }
|
|
71
|
+
static get style() { return casinoEngagementSuiteProgressBarCss; }
|
|
72
|
+
}, [1, "casino-engagement-suite-progress-bar", {
|
|
73
|
+
"value": [2],
|
|
74
|
+
"disabled": [4],
|
|
75
|
+
"hidePercent": [4, "hide-percent"],
|
|
76
|
+
"clientStyling": [513, "client-styling"],
|
|
77
|
+
"clientStylingUrl": [513, "client-styling-url"],
|
|
78
|
+
"limitStylingAppends": [32]
|
|
79
|
+
}]);
|
|
80
|
+
function defineCustomElement() {
|
|
81
|
+
if (typeof customElements === "undefined") {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const components = ["casino-engagement-suite-progress-bar"];
|
|
85
|
+
components.forEach(tagName => { switch (tagName) {
|
|
86
|
+
case "casino-engagement-suite-progress-bar":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
customElements.define(tagName, CasinoEngagementSuiteProgressBar);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
} });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { CasinoEngagementSuiteProgressBar as C, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CasinoEngagementSuiteTournament extends Components.CasinoEngagementSuiteTournament, HTMLElement {}
|
|
4
|
+
export const CasinoEngagementSuiteTournament: {
|
|
5
|
+
prototype: CasinoEngagementSuiteTournament;
|
|
6
|
+
new (): CasinoEngagementSuiteTournament;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|