@everymatrix/casino-engagement-suite-bar 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-bar/casino-engagement-suite-bar.esm.js +1 -1
- package/dist/casino-engagement-suite-bar/p-0a29e254.entry.js +1 -0
- package/dist/casino-engagement-suite-bar/p-e1255160.js +1 -0
- package/dist/casino-engagement-suite-bar/p-e3622c4f.js +2 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-bar.cjs.entry.js +104 -126
- package/dist/cjs/casino-engagement-suite-bar.cjs.js +16 -10
- package/dist/cjs/index-650e78a1.js +1181 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-bar/casino-engagement-suite-bar.css +20 -20
- package/dist/collection/components/casino-engagement-suite-bar/casino-engagement-suite-bar.js +374 -411
- package/dist/collection/components/casino-engagement-suite-bar/index.js +1 -0
- package/dist/collection/utils/index.js +3 -3
- package/dist/collection/utils/locale.utils.js +5 -5
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-bar.entry.js +104 -126
- package/dist/esm/casino-engagement-suite-bar.js +13 -10
- package/dist/esm/index-6a254eea.js +1155 -0
- package/dist/esm/loader.js +6 -12
- 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-bar/.stencil/packages/stencil/casino-engagement-suite-bar/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-bar/.stencil/packages/stencil/casino-engagement-suite-bar/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-bar/casino-engagement-suite-bar.d.ts +68 -68
- package/dist/types/components/casino-engagement-suite-bar/index.d.ts +1 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/models/index.d.ts +11 -11
- 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 +9 -2
- package/dist/casino-engagement-suite-bar/p-09703adc.js +0 -1
- package/dist/casino-engagement-suite-bar/p-6a92c0ec.entry.js +0 -1
- package/dist/cjs/index-baea8059.js +0 -1163
- package/dist/components/casino-engagement-suite-bar.d.ts +0 -11
- package/dist/components/casino-engagement-suite-bar.js +0 -178
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-965162c9.js +0 -1138
- 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-bar/.stencil/packages/casino-engagement-suite-bar/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CasinoEngagementSuiteBar } from './casino-engagement-suite-bar';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function formatBalance(amount, currency, maxAmount = 99999999) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
amount = Math.min(amount, maxAmount);
|
|
3
|
+
return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
4
|
+
.format(amount)}`;
|
|
5
5
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
2
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
en: {
|
|
5
|
+
new: 'new'
|
|
6
|
+
}
|
|
7
7
|
};
|
|
8
8
|
export const translate = (key, customLang) => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const lang = customLang;
|
|
10
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
11
11
|
};
|
|
@@ -1,143 +1,121 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-6a254eea.js';
|
|
2
2
|
|
|
3
3
|
function formatBalance(amount, currency, maxAmount = 99999999) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
amount = Math.min(amount, maxAmount);
|
|
5
|
+
return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
6
|
+
.format(amount)}`;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const DEFAULT_LANGUAGE = 'en';
|
|
10
10
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
11
11
|
const TRANSLATIONS = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
en: {
|
|
13
|
+
new: 'new'
|
|
14
|
+
}
|
|
15
15
|
};
|
|
16
16
|
const translate = (key, customLang) => {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const lang = customLang;
|
|
18
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const casinoEngagementSuiteBarCss = ":host{display:block}*{box-sizing:border-box}button{touch-action:manipulation}.CasinoEngagementSuiteBar{height:100vh;background-color:var(--emw--color-background, #1E1638);color:var(--emw--color-typography, #FFF);display:flex;justify-content:center;position:relative;z-index:1}.CasinoEngagementSuiteBar .EngagementSuiteContainer{display:flex;align-items:center;gap:4px;scrollbar-gutter:stable;overflow-x:auto;padding:7px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-
|
|
21
|
+
const casinoEngagementSuiteBarCss = ":host{display:block}*{box-sizing:border-box}button{touch-action:manipulation}.CasinoEngagementSuiteBar{height:100vh;background-color:var(--emw--color-background, #1E1638);color:var(--emw--color-typography, #FFF);display:flex;justify-content:center;position:relative;z-index:1}.CasinoEngagementSuiteBar .EngagementSuiteContainer{display:flex;align-items:center;gap:4px;scrollbar-gutter:stable;overflow-x:auto;padding:7px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-background-secondary, #251D3E);border-radius:var(--emw--border-radius-small, 4px);display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-x-small, 12px);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-typography, #FFF)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile.Active::before{background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #2D2545 82.77%)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 100%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{display:flex;gap:4px;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{padding:14px 4px;flex-direction:column}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotType{display:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotBalance{font-weight:var(--emw--font-weight-semibold, 600);line-height:12px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-typography, #fff)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled .JackpotBalance{font-weight:var(--emw--font-weight-extra-bold, 800)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{justify-content:space-between;padding:8px;border:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .RewardIcon{width:24px;height:24px;background-size:100%;background-position:center}.Tile.Leaderboard .RewardIcon{background:center/contain url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg\")}.Tile.Leaderboard.Active .RewardIcon{background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard-pressed.svg\")}.Tile.Challenges .RewardIcon{background:center/contain url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge.svg\")}.Tile.Challenges.Active .RewardIcon{background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge-pressed.svg\")}.Tile.Luckywheel .RewardIcon{background:center/contain url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel.svg\")}.Tile.Luckywheel.Active .RewardIcon{background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel-pressed.svg\")}.Tile.FreeSpins .RewardIcon{background:center/contain url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins.svg\")}.Tile.FreeSpins.Active .RewardIcon{background-image:url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins-pressed.svg\")}.ChallengeLabel{min-width:23px;height:11px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-4px;right:4px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.ForfeitLabel{width:12px;height:12px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:50%;display:none;position:absolute;top:-6px;right:8px}.ShowChallengeLabel{display:inline-flex}.ShowForfeitLabel,.ShowForfeitChallengeLabel{display:inline-flex}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{width:120px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{flex-direction:column}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:3px 10px 10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{padding:7px 0 0;gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards,.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots{gap:8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 4px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .EngagementSuiteContainer{gap:12px}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward{padding:8px 20px;height:64px;font-size:var(--emw--font-size-medium, 16px)}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward .RewardIcon{width:48px;height:48px}.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Tile{width:212px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot{padding-top:35px;min-height:133px;background:center/contain url(\"https://static.everymatrix.com/gic/img/engagement-suite/bar/jackpot-bg-stars.svg\"), var(--emw--color-background-secondary, #251D3E)}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType{display:block;font-weight:var(--emw--font-weight-extra-bold, 800);margin-bottom:12px;text-transform:uppercase}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotBalance{font-size:var(--emw--size-large, 24px);line-height:24px}";
|
|
22
|
+
const CasinoEngagementSuiteBarStyle0 = casinoEngagementSuiteBarCss;
|
|
22
23
|
|
|
23
24
|
const CasinoEngagementSuiteBar = class {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
registerInstance(this, hostRef);
|
|
27
|
+
this.handleTileClick = (ev) => {
|
|
28
|
+
const application = ev.target.getAttribute('data-app');
|
|
29
|
+
window.postMessage({ type: `Bar${application}Click` });
|
|
30
|
+
this.activeWidget = application;
|
|
31
|
+
if (application === 'Jackpots') {
|
|
32
|
+
this.activeJackpot = ev.target.getAttribute('data-type');
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.setClientStyling = () => {
|
|
36
|
+
let sheet = document.createElement('style');
|
|
37
|
+
sheet.innerHTML = this.clientStyling;
|
|
38
|
+
this.engagementSuiteBar.prepend(sheet);
|
|
39
|
+
};
|
|
40
|
+
this.setClientStylingURL = () => {
|
|
41
|
+
let url = new URL(this.clientStylingUrl);
|
|
42
|
+
let cssFile = document.createElement('style');
|
|
43
|
+
fetch(url.href)
|
|
44
|
+
.then((res) => res.text())
|
|
45
|
+
.then((data) => {
|
|
46
|
+
cssFile.innerHTML = data;
|
|
47
|
+
setTimeout(() => { this.engagementSuiteBar.prepend(cssFile); }, 1);
|
|
48
|
+
})
|
|
49
|
+
.catch((err) => {
|
|
50
|
+
console.log('Error ', err);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
this.activeWidget = undefined;
|
|
54
|
+
this.challengePercent = undefined;
|
|
55
|
+
this.highlightChallenge = false;
|
|
56
|
+
this.clientStyling = '';
|
|
57
|
+
this.clientStylingUrl = '';
|
|
58
|
+
this.orientation = 'Landscape';
|
|
59
|
+
this.device = 'Mobile';
|
|
60
|
+
this.isChallengeLabel = false;
|
|
61
|
+
this.isForfeitedChallengeLabel = false;
|
|
62
|
+
this.isSpinForfeitedLabel = false;
|
|
63
|
+
this.language = 'en';
|
|
64
|
+
this.jackpots = [];
|
|
65
|
+
this.remainingFreeSpins = undefined;
|
|
66
|
+
this.leaderboards = undefined;
|
|
67
|
+
this.limitStylingAppends = false;
|
|
68
|
+
this.activeJackpot = '';
|
|
69
|
+
}
|
|
70
|
+
componentDidRender() {
|
|
71
|
+
// start custom styling area
|
|
72
|
+
if (!this.limitStylingAppends && this.engagementSuiteBar) {
|
|
73
|
+
if (this.clientStyling)
|
|
74
|
+
this.setClientStyling();
|
|
75
|
+
if (this.clientStylingUrl)
|
|
76
|
+
this.setClientStylingURL();
|
|
77
|
+
this.limitStylingAppends = true;
|
|
78
|
+
}
|
|
79
|
+
// end custom styling area
|
|
80
|
+
}
|
|
81
|
+
getChallengeTile() {
|
|
82
|
+
return h("button", { class: `Tile Reward Challenges ${this.activeWidget === 'Challenges' || this.highlightChallenge ? 'Active' : ''}`, "data-app": "Challenges", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.challengePercent), h("div", { class: `ChallengeLabel ${(this.isChallengeLabel && !this.isForfeitedChallengeLabel) ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language))), h("div", { class: `ForfeitLabel ${this.isForfeitedChallengeLabel ? 'ShowForfeitChallengeLabel' : ''}` }));
|
|
83
|
+
}
|
|
84
|
+
getFreeSpinsTile() {
|
|
85
|
+
return (h("button", { class: `Tile Reward FreeSpins ${this.activeWidget === 'FreeSpins' ? 'Active' : ''}`, "data-app": "FreeSpins", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.remainingFreeSpins), h("div", { class: `ForfeitLabel ${this.isSpinForfeitedLabel ? 'ShowForfeitLabel' : ''}` }, h("span", null))));
|
|
86
|
+
}
|
|
87
|
+
getJackpotClasses(jackpot) {
|
|
88
|
+
return {
|
|
89
|
+
Tile: true,
|
|
90
|
+
Jackpot: true,
|
|
91
|
+
Enabled: jackpot.Enabled,
|
|
92
|
+
Active: this.activeWidget === 'Jackpots' && this.activeJackpot === jackpot.Type,
|
|
93
|
+
[jackpot.Type.charAt(0).toUpperCase() + jackpot.Type.slice(1)]: true
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
getJackpotsTemplate() {
|
|
97
|
+
return this.jackpots.map((jackpot) => {
|
|
98
|
+
const jackpotBalance = formatBalance(jackpot.Balance, jackpot.Currency);
|
|
99
|
+
return h("div", { class: this.getJackpotClasses(jackpot), "data-app": "Jackpots", "data-type": jackpot.Type, onClick: this.handleTileClick }, h("div", { class: "JackpotType" }, jackpot.Type), h("span", { class: "JackpotBalance" }, jackpotBalance));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
getLeaderboardsTile() {
|
|
103
|
+
return (h("button", { class: `Tile Reward Leaderboard ${this.activeWidget === 'Leaderboards' ? 'Active' : ''}`, "data-app": "Leaderboards", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, "-")));
|
|
104
|
+
}
|
|
105
|
+
displayTilesInOneRow() {
|
|
106
|
+
const jackpotsLength = this.jackpots.length;
|
|
107
|
+
const boostersLength = [this.leaderboards, this.challengePercent, this.remainingFreeSpins].filter(obj => !!obj).length;
|
|
108
|
+
return jackpotsLength + boostersLength < 4;
|
|
109
|
+
}
|
|
110
|
+
getTilesTemplate() {
|
|
111
|
+
return this.displayTilesInOneRow()
|
|
112
|
+
? h("div", { class: "EngagementSuiteContainer" }, !!this.jackpots.length && this.getJackpotsTemplate(), this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile())
|
|
113
|
+
: h("div", { class: "EngagementSuiteContainer" }, h("div", { class: "Jackpots" }, !!this.jackpots.length && this.getJackpotsTemplate()), h("div", { class: "Rewards" }, this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile()));
|
|
114
|
+
}
|
|
115
|
+
render() {
|
|
116
|
+
return h("div", { key: 'f90aab0bf55c9016600be3ab90199de6c31874ee', class: `CasinoEngagementSuiteBar ${this.orientation} ${this.device}`, ref: (el) => (this.engagementSuiteBar = el) }, this.getTilesTemplate());
|
|
100
117
|
}
|
|
101
|
-
// end custom styling area
|
|
102
|
-
}
|
|
103
|
-
getChallengeTile() {
|
|
104
|
-
return h("button", { class: `Tile Reward Challenges ${this.activeWidget === 'Challenges' || this.highlightChallenge ? 'Active' : ''}`, "data-app": "Challenges", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.challengePercent), h("div", { class: `ChallengeLabel ${(this.isChallengeLabel && !this.isForfeitedChallengeLabel) ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language))), h("div", { class: `ForfeitLabel ${this.isForfeitedChallengeLabel ? 'ShowForfeitChallengeLabel' : ''}` }));
|
|
105
|
-
}
|
|
106
|
-
getFreeSpinsTile() {
|
|
107
|
-
return (h("button", { class: `Tile Reward FreeSpins ${this.activeWidget === 'FreeSpins' ? 'Active' : ''}`, "data-app": "FreeSpins", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, this.remainingFreeSpins), h("div", { class: `ForfeitLabel ${this.isSpinForfeitedLabel ? 'ShowForfeitLabel' : ''}` }, h("span", null))));
|
|
108
|
-
}
|
|
109
|
-
getJackpotClasses(jackpot) {
|
|
110
|
-
return {
|
|
111
|
-
Tile: true,
|
|
112
|
-
Jackpot: true,
|
|
113
|
-
Enabled: jackpot.Enabled,
|
|
114
|
-
Active: this.activeWidget === 'Jackpots' && this.activeJackpot === jackpot.Type,
|
|
115
|
-
[jackpot.Type.charAt(0).toUpperCase() + jackpot.Type.slice(1)]: true
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
getJackpotsTemplate() {
|
|
119
|
-
return this.jackpots.map((jackpot) => {
|
|
120
|
-
const jackpotBalance = formatBalance(jackpot.Balance, jackpot.Currency);
|
|
121
|
-
return h("div", { class: this.getJackpotClasses(jackpot), "data-app": "Jackpots", "data-type": jackpot.Type, onClick: this.handleTileClick }, h("div", { class: "JackpotType" }, jackpot.Type), h("span", { class: "JackpotBalance" }, jackpotBalance));
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
getLeaderboardsTile() {
|
|
125
|
-
return (h("button", { class: `Tile Reward Leaderboard ${this.activeWidget === 'Leaderboards' ? 'Active' : ''}`, "data-app": "Leaderboards", onClick: this.handleTileClick }, h("div", { class: "RewardIcon" }), h("span", null, "-")));
|
|
126
|
-
}
|
|
127
|
-
displayTilesInOneRow() {
|
|
128
|
-
const jackpotsLength = this.jackpots.length;
|
|
129
|
-
const boostersLength = [this.leaderboards, this.challengePercent, this.remainingFreeSpins].filter(obj => !!obj).length;
|
|
130
|
-
return jackpotsLength + boostersLength < 4;
|
|
131
|
-
}
|
|
132
|
-
getTilesTemplate() {
|
|
133
|
-
return this.displayTilesInOneRow()
|
|
134
|
-
? h("div", { class: "EngagementSuiteContainer" }, !!this.jackpots.length && this.getJackpotsTemplate(), this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile())
|
|
135
|
-
: h("div", { class: "EngagementSuiteContainer" }, h("div", { class: "Jackpots" }, !!this.jackpots.length && this.getJackpotsTemplate()), h("div", { class: "Rewards" }, this.leaderboards && this.getLeaderboardsTile(), this.challengePercent && this.getChallengeTile(), this.remainingFreeSpins && this.getFreeSpinsTile()));
|
|
136
|
-
}
|
|
137
|
-
render() {
|
|
138
|
-
return h("div", { class: `CasinoEngagementSuiteBar ${this.orientation} ${this.device}`, ref: (el) => (this.engagementSuiteBar = el) }, this.getTilesTemplate());
|
|
139
|
-
}
|
|
140
118
|
};
|
|
141
|
-
CasinoEngagementSuiteBar.style =
|
|
119
|
+
CasinoEngagementSuiteBar.style = CasinoEngagementSuiteBarStyle0;
|
|
142
120
|
|
|
143
121
|
export { CasinoEngagementSuiteBar as casino_engagement_suite_bar };
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6a254eea.js';
|
|
2
|
+
export { s as setNonce } from './index-6a254eea.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 => {
|
|
17
|
+
patchBrowser().then(async (options) => {
|
|
18
|
+
await globalScripts();
|
|
16
19
|
return bootstrapLazy([["casino-engagement-suite-bar",[[1,"casino-engagement-suite-bar",{"activeWidget":[1537,"active-widget"],"challengePercent":[1,"challenge-percent"],"highlightChallenge":[4,"highlight-challenge"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"orientation":[1],"device":[1],"isChallengeLabel":[4,"is-challenge-label"],"isForfeitedChallengeLabel":[4,"is-forfeited-challenge-label"],"isSpinForfeitedLabel":[1028,"is-spin-forfeited-label"],"language":[1],"jackpots":[16],"remainingFreeSpins":[1,"remaining-free-spins"],"leaderboards":[16],"limitStylingAppends":[32],"activeJackpot":[32]}]]]], options);
|
|
17
20
|
});
|