@everymatrix/casino-engagement-suite-challenges-details 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-details/casino-engagement-suite-challenges-details.esm.js +1 -1
- package/dist/casino-engagement-suite-challenges-details/p-11d8b487.js +2 -0
- package/dist/casino-engagement-suite-challenges-details/p-8bbfff73.entry.js +1 -0
- package/dist/casino-engagement-suite-challenges-details/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-challenges-details.cjs.js +17 -11
- package/dist/cjs/casino-engagement-suite-challenges-details_2.cjs.entry.js +293 -323
- package/dist/cjs/index-a758ba24.js +1249 -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-details/casino-engagement-suite-challenges-details.css +63 -61
- package/dist/collection/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.js +438 -493
- package/dist/collection/components/casino-engagement-suite-challenges-details/index.js +1 -0
- package/dist/collection/models/casino-challenges-details.js +10 -10
- package/dist/collection/utils/index.js +8 -2
- package/dist/collection/utils/locale.utils.js +18 -18
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-challenges-details.js +14 -11
- package/dist/esm/casino-engagement-suite-challenges-details_2.entry.js +293 -323
- package/dist/esm/index-c193b756.js +1221 -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-details/.stencil/packages/stencil/casino-engagement-suite-challenges-details/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-challenges-details/.stencil/packages/stencil/casino-engagement-suite-challenges-details/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.d.ts +70 -70
- package/dist/types/components/casino-engagement-suite-challenges-details/index.d.ts +1 -0
- package/dist/types/components.d.ts +21 -3
- package/dist/types/models/casino-challenges-details.d.ts +46 -46
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/index.d.ts +1 -0
- 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-details/p-80848cd8.entry.js +0 -1
- package/dist/casino-engagement-suite-challenges-details/p-808a7dc5.js +0 -1
- package/dist/cjs/index-a0eb9215.js +0 -1279
- package/dist/components/casino-engagement-suite-challenges-details.d.ts +0 -11
- package/dist/components/casino-engagement-suite-challenges-details.js +0 -318
- 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-c5abae48.js +0 -1252
- 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-details/.stencil/packages/casino-engagement-suite-challenges-details/stencil.config.d.ts +0 -2
|
@@ -1,361 +1,331 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-c193b756.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
en: {
|
|
7
|
+
missions: 'Missions',
|
|
8
|
+
join: 'Join',
|
|
9
|
+
unjoin: 'Unjoin',
|
|
10
|
+
new: 'new',
|
|
11
|
+
details: 'Mission Details',
|
|
12
|
+
tc: 'Terms & Conditions',
|
|
13
|
+
level: 'Level',
|
|
14
|
+
place: 'Place',
|
|
15
|
+
bet: 'bet',
|
|
16
|
+
bets: 'bets',
|
|
17
|
+
win: 'Win',
|
|
18
|
+
minBet: 'Min Bet',
|
|
19
|
+
maxBet: 'Max Bet',
|
|
20
|
+
contribution: 'Contribution'
|
|
21
|
+
}
|
|
22
22
|
};
|
|
23
23
|
const translate = (key, customLang) => {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const lang = customLang;
|
|
25
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
var ChallengeLevelProgressStatus;
|
|
29
29
|
(function (ChallengeLevelProgressStatus) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Closed"] = 0] = "Closed";
|
|
31
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["InProgress"] = 1] = "InProgress";
|
|
32
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Fillup"] = 2] = "Fillup";
|
|
33
|
+
ChallengeLevelProgressStatus[ChallengeLevelProgressStatus["Completed"] = 3] = "Completed";
|
|
34
34
|
})(ChallengeLevelProgressStatus || (ChallengeLevelProgressStatus = {}));
|
|
35
35
|
var ChallengeProgressStatus;
|
|
36
36
|
(function (ChallengeProgressStatus) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Started"] = 0] = "Started";
|
|
38
|
+
ChallengeProgressStatus[ChallengeProgressStatus["InProgress"] = 1] = "InProgress";
|
|
39
|
+
ChallengeProgressStatus[ChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
|
|
40
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Completed"] = 3] = "Completed";
|
|
41
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Expired"] = 4] = "Expired";
|
|
42
|
+
ChallengeProgressStatus[ChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
43
43
|
})(ChallengeProgressStatus || (ChallengeProgressStatus = {}));
|
|
44
44
|
|
|
45
45
|
function formatBalance(amount, currency) {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
return `${currency}${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
47
|
+
.format(amount)}`;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const casinoEngagementSuiteChallengesDetailsCss = "
|
|
50
|
+
const casinoEngagementSuiteChallengesDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Reward{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/reward.svg) no-repeat}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeLabel{min-width:35px;height:18px;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:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-word}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, 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}.EngagementSuiteButton.Active::before{content:\"\";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.ChallengeCollapseButton{margin:24px 0 14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emw--color-typography, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-x-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:var(--emw--border-radius-large, 8px)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emw--color-typography, #FFF)}.ChallengeLevels .InProgress::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--border-radius-large, 8px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengeDetailsPopup.Tablet .EngagementSuiteButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}";
|
|
51
|
+
const CasinoEngagementSuiteChallengesDetailsStyle0 = casinoEngagementSuiteChallengesDetailsCss;
|
|
51
52
|
|
|
52
53
|
const CasinoEngagementSuiteChallengesDetails = class {
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
54
|
+
constructor(hostRef) {
|
|
55
|
+
registerInstance(this, hostRef);
|
|
56
|
+
this.close = createEvent(this, "close", 7);
|
|
57
|
+
this.back = createEvent(this, "back", 7);
|
|
58
|
+
this.resetNewChallengeLabel = createEvent(this, "resetNewChallengeLabel", 7);
|
|
59
|
+
this.setClientStyling = () => {
|
|
60
|
+
let sheet = document.createElement('style');
|
|
61
|
+
sheet.innerHTML = this.clientStyling;
|
|
62
|
+
this.host.prepend(sheet);
|
|
63
|
+
};
|
|
64
|
+
this.setClientStylingURL = () => {
|
|
65
|
+
let url = new URL(this.clientStylingUrl);
|
|
66
|
+
let cssFile = document.createElement('style');
|
|
67
|
+
fetch(url.href)
|
|
68
|
+
.then((res) => res.text())
|
|
69
|
+
.then((data) => {
|
|
70
|
+
cssFile.innerHTML = data;
|
|
71
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
72
|
+
})
|
|
73
|
+
.catch((err) => {
|
|
74
|
+
console.log('Error ', err);
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
this.handleCloseClick = () => {
|
|
78
|
+
this.resetNewLabel();
|
|
79
|
+
this.close.emit();
|
|
80
|
+
};
|
|
81
|
+
this.handleBackClick = () => {
|
|
82
|
+
this.resetNewLabel();
|
|
83
|
+
this.back.emit();
|
|
84
|
+
};
|
|
85
|
+
this.onGameClick = (ev) => {
|
|
86
|
+
const slug = ev.currentTarget.getAttribute('data-slug');
|
|
87
|
+
if (slug) {
|
|
88
|
+
window.postMessage({
|
|
89
|
+
type: 'EngagementSuiteGameRedirect',
|
|
90
|
+
data: {
|
|
91
|
+
Slug: slug
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this.changeChallengeStatus = (e) => {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
const id = e.currentTarget.getAttribute('data-id');
|
|
99
|
+
if ((_a = this.inProgressChallenges) === null || _a === void 0 ? void 0 : _a.includes(id)) {
|
|
100
|
+
window.postMessage({
|
|
101
|
+
type: 'ShowConfirmationModal',
|
|
102
|
+
ProgressToDeactivate: id,
|
|
103
|
+
});
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (((_b = this.inProgressChallenges) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
107
|
+
window.postMessage({
|
|
108
|
+
type: 'ShowConfirmationModal',
|
|
109
|
+
ProgressToActivate: id,
|
|
110
|
+
ProgressToDeactivate: this.inProgressChallenges[0],
|
|
111
|
+
});
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
window.postMessage({
|
|
115
|
+
type: 'ChallengeJoinRequest',
|
|
116
|
+
data: {
|
|
117
|
+
ProgressToActivate: id,
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
this.toggle = () => {
|
|
122
|
+
this.showDetails = !this.showDetails;
|
|
123
|
+
};
|
|
124
|
+
this.clientStyling = '';
|
|
125
|
+
this.clientStylingUrl = '';
|
|
126
|
+
this.challenge = undefined;
|
|
127
|
+
this.inProgressChallenges = undefined;
|
|
128
|
+
this.language = 'en';
|
|
129
|
+
this.gameSlug = '';
|
|
130
|
+
this.device = 'Mobile';
|
|
131
|
+
this.isJoiningToChallenge = undefined;
|
|
132
|
+
this.pausedChallengeIds = [];
|
|
133
|
+
this.limitStylingAppends = false;
|
|
134
|
+
this.timer = '';
|
|
135
|
+
this.showDetails = false;
|
|
136
|
+
this.isExpiredChallenge = false;
|
|
137
|
+
}
|
|
138
|
+
challengePropHandler(value) {
|
|
139
|
+
if (!this.interval && value) {
|
|
140
|
+
this.updateTimer();
|
|
141
|
+
this.startCountdown();
|
|
142
|
+
}
|
|
143
|
+
if (this.interval && !value) {
|
|
144
|
+
clearInterval(this.interval);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
componentWillLoad() {
|
|
148
|
+
this.challengePropHandler(this.challenge);
|
|
149
|
+
}
|
|
150
|
+
componentDidRender() {
|
|
151
|
+
if (!this.limitStylingAppends && this.host) {
|
|
152
|
+
if (this.clientStyling)
|
|
153
|
+
this.setClientStyling();
|
|
154
|
+
if (this.clientStylingUrl)
|
|
155
|
+
this.setClientStylingURL();
|
|
156
|
+
this.limitStylingAppends = true;
|
|
157
|
+
}
|
|
156
158
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
disconnectedCallback() {
|
|
160
|
+
this.interval && clearInterval(this.interval);
|
|
159
161
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
this.challengePropHandler(this.challenge);
|
|
163
|
-
}
|
|
164
|
-
componentDidRender() {
|
|
165
|
-
if (!this.limitStylingAppends && this.host) {
|
|
166
|
-
if (this.clientStyling)
|
|
167
|
-
this.setClientStyling();
|
|
168
|
-
if (this.clientStylingUrl)
|
|
169
|
-
this.setClientStylingURL();
|
|
170
|
-
this.limitStylingAppends = true;
|
|
162
|
+
getActionsTemplate() {
|
|
163
|
+
return (h("header", { class: "ChallengeActions" }, h("button", { class: "EngagementSuiteIconButton Back", onClick: this.handleBackClick }), h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
|
|
171
164
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|| this.challenge.Status === ChallengeProgressStatus.PendingLevelReward;
|
|
183
|
-
const isDisabledButton = this.isExpiredChallenge || this.isJoiningToChallenge ||
|
|
184
|
-
this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
185
|
-
const showJoinButton = ![ChallengeProgressStatus.Completed, ChallengeProgressStatus.Forfeited]
|
|
186
|
-
.includes(this.challenge.Status);
|
|
187
|
-
return (h("div", { class: "ChallengeDetailsHeader" }, h("span", { class: "ChallengeName" }, presentationName), showJoinButton ? (h("button", { onClick: this.changeChallengeStatus, class: `ChallengeJoinButton ${inProgressChallenge ? 'Joined' : ''}
|
|
165
|
+
getChallengeHeader() {
|
|
166
|
+
const presentationName = this.challenge.ChallengePresentation.PresentationName;
|
|
167
|
+
const inProgressChallenge = this.challenge.Status === ChallengeProgressStatus.InProgress
|
|
168
|
+
|| this.challenge.Status === ChallengeProgressStatus.PendingLevelReward;
|
|
169
|
+
const isDisabledButton = this.isExpiredChallenge || this.isJoiningToChallenge ||
|
|
170
|
+
this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
171
|
+
const showJoinButton = ![ChallengeProgressStatus.Completed, ChallengeProgressStatus.Forfeited]
|
|
172
|
+
.includes(this.challenge.Status);
|
|
173
|
+
const showNewLabel = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
|
|
174
|
+
return (h("div", { class: "ChallengeDetailsHeader" }, h("span", { class: "ChallengeName" }, presentationName), showJoinButton ? (h("button", { onClick: this.changeChallengeStatus, class: `EngagementSuiteButton ${inProgressChallenge ? 'Active' : ''}
|
|
188
175
|
${isDisabledButton ? 'Disabled' : ''}`, "data-id": this.challenge.Id }, inProgressChallenge
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
startCountdown() {
|
|
207
|
-
this.interval = setInterval(() => {
|
|
208
|
-
this.updateTimer();
|
|
209
|
-
}, 1000);
|
|
210
|
-
}
|
|
211
|
-
updateTimer() {
|
|
212
|
-
const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
|
|
213
|
-
const now = new Date().getTime();
|
|
214
|
-
const distance = expirationTime - now;
|
|
215
|
-
if (distance < 1) {
|
|
216
|
-
clearInterval(this.interval);
|
|
217
|
-
this.timer = '';
|
|
218
|
-
this.isExpiredChallenge = true;
|
|
219
|
-
return;
|
|
176
|
+
? translate('unjoin', this.language)
|
|
177
|
+
: translate('join', this.language))) : null, showNewLabel ? (h("div", { class: `ChallengeLabel ${this.challenge.IsNew ? 'ShowChallengeLabel' : ''}` }, h("span", null, translate('new', this.language)))) : null));
|
|
178
|
+
}
|
|
179
|
+
getChallengeCountdown() {
|
|
180
|
+
const timerMessage = this.isExpiredChallenge ? 'Expired' : this.timer;
|
|
181
|
+
const showChallengeCountdown = this.challenge.Status !== ChallengeProgressStatus.Forfeited;
|
|
182
|
+
return (showChallengeCountdown ? (h("div", { class: `ChallengeCountdown ${this.isExpiredChallenge ? 'Expired' : ''}` }, timerMessage)) : null);
|
|
183
|
+
}
|
|
184
|
+
getChallengeDetails() {
|
|
185
|
+
const description = this.challenge.ChallengePresentation.Description;
|
|
186
|
+
const url = this.challenge.ChallengePresentation.Url;
|
|
187
|
+
const games = this.challenge.Games;
|
|
188
|
+
return (h("div", { class: `CollapseDetails ${this.showDetails ? 'ShowDetails' : ''}` }, description && h("div", { class: "ChallengeDescription" }, description), url && (h("div", { class: "TC" }, h("a", { href: url, target: "_blank" }, translate('tc', this.language)))), (games === null || games === void 0 ? void 0 : games.length) && (h("div", { class: "ChallengeGames" }, games.map((game) => (h("div", { class: "Game", key: game.CasinoGameId }, h("img", { src: game.GameIcon, alt: game.GameName, onClick: this.onGameClick, class: `${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, "data-slug": game.GameSlug }))))))));
|
|
189
|
+
}
|
|
190
|
+
resetNewLabel() {
|
|
191
|
+
this.resetNewChallengeLabel.emit(this.challenge.Id);
|
|
220
192
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
|
|
226
|
-
};
|
|
227
|
-
this.timer = days === '00'
|
|
228
|
-
? `${hours}h:${minutes}m:${seconds}s`
|
|
229
|
-
: `${days}d:${hours}h:${minutes}m`;
|
|
230
|
-
}
|
|
231
|
-
getLevelTarget(level) {
|
|
232
|
-
const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
|
|
233
|
-
let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
|
|
234
|
-
if (level.LevelTargetType === 1) {
|
|
235
|
-
levelTarget += ` ${translate('bet', this.language)}`;
|
|
193
|
+
startCountdown() {
|
|
194
|
+
this.interval = setInterval(() => {
|
|
195
|
+
this.updateTimer();
|
|
196
|
+
}, 1000);
|
|
236
197
|
}
|
|
237
|
-
|
|
238
|
-
|
|
198
|
+
updateTimer() {
|
|
199
|
+
const expirationTime = new Date(this.challenge.ExpirationTime).getTime();
|
|
200
|
+
const now = new Date().getTime();
|
|
201
|
+
const distance = expirationTime - now;
|
|
202
|
+
if (distance < 1) {
|
|
203
|
+
clearInterval(this.interval);
|
|
204
|
+
this.timer = '';
|
|
205
|
+
this.isExpiredChallenge = true;
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const { days, hours, minutes, seconds } = {
|
|
209
|
+
days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
|
|
210
|
+
hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
|
|
211
|
+
minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
|
|
212
|
+
seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
|
|
213
|
+
};
|
|
214
|
+
this.timer = days === '00'
|
|
215
|
+
? `${hours}h:${minutes}m:${seconds}s`
|
|
216
|
+
: `${days}d:${hours}h:${minutes}m`;
|
|
239
217
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
|
|
251
|
-
const showContributionPercentage = level.LevelContributionPercent !== 100;
|
|
252
|
-
if (showMinBet || showMaxBet || showContributionPercentage) {
|
|
253
|
-
return (h("div", { class: 'ChallengeLevelBetDetails' }, showMinBet &&
|
|
254
|
-
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('minBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)), showMaxBet &&
|
|
255
|
-
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('maxBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)), showContributionPercentage &&
|
|
256
|
-
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('contribution', this.language), ": "), h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
|
|
257
|
-
}
|
|
218
|
+
getLevelTarget(level) {
|
|
219
|
+
const targetTurnover = formatBalance(level.DisplayCurrencyTargetTurnover, this.challenge.CurrencySymbol);
|
|
220
|
+
let levelTarget = `${translate('place', this.language)} ${targetTurnover}`;
|
|
221
|
+
if (level.LevelTargetType === 1) {
|
|
222
|
+
levelTarget += ` ${translate('bet', this.language)}`;
|
|
223
|
+
}
|
|
224
|
+
else if (level.LevelTargetType === 2) {
|
|
225
|
+
levelTarget += ` ${translate('bets', this.language)} X ${level.TargetBetCount}`;
|
|
226
|
+
}
|
|
227
|
+
return (h("span", { class: "ChallengeLevelTarget" }, levelTarget));
|
|
258
228
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
229
|
+
getLevelBetRangesDetails(level) {
|
|
230
|
+
var _a, _b, _c, _d;
|
|
231
|
+
const isAccumulativeLevelType = level.LevelTargetType === 0;
|
|
232
|
+
if (isAccumulativeLevelType) {
|
|
233
|
+
const formattedMinBet = formatBalance((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet, this.challenge.CurrencySymbol);
|
|
234
|
+
const formattedMaxBet = formatBalance((_b = level.BetRange) === null || _b === void 0 ? void 0 : _b.MaxBet, this.challenge.CurrencySymbol);
|
|
235
|
+
const formattedContributionPercentage = level.LevelContributionPercent + '%';
|
|
236
|
+
const showMinBet = !!((_c = level.BetRange) === null || _c === void 0 ? void 0 : _c.MinBet);
|
|
237
|
+
const showMaxBet = !!((_d = level.BetRange) === null || _d === void 0 ? void 0 : _d.MaxBet);
|
|
238
|
+
const showContributionPercentage = level.LevelContributionPercent !== 100;
|
|
239
|
+
if (showMinBet || showMaxBet || showContributionPercentage) {
|
|
240
|
+
return (h("div", { class: 'ChallengeLevelBetDetails' }, showMinBet &&
|
|
241
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('minBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMinBet)), showMaxBet &&
|
|
242
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('maxBet', this.language), ": "), h("span", { class: 'ChallengeLevelBetRange' }, formattedMaxBet)), showContributionPercentage &&
|
|
243
|
+
h("div", { class: 'ChallengeLevelBetDetail' }, h("span", null, translate('contribution', this.language), ": "), h("span", { class: 'ChallengeLevelBetContribution' }, formattedContributionPercentage))));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
getChallengeLevels() {
|
|
248
|
+
const isChallengePaused = this.pausedChallengeIds.includes(this.challenge.ChallengeId);
|
|
249
|
+
const InProgressLevel = (level) => {
|
|
250
|
+
return level.ProgressStatus === 1 && !this.isExpiredChallenge && !isChallengePaused;
|
|
251
|
+
};
|
|
252
|
+
return (h("div", { class: "ChallengeLevels" }, this.challenge.LevelProgresses.map((level, index) => (h("div", { class: `ChallengeLevelCard ${InProgressLevel(level) ? 'InProgress' : ''}` }, h("casino-engagement-suite-progress-bar", { clientStylingUrl: this.clientStylingUrl, class: this.device, value: level.ProgressPercentage, "hide-percent": (level.ProgressPercentage === 0 && !InProgressLevel(level)) || level.ProgressPercentage === 100, disabled: this.isExpiredChallenge || isChallengePaused }, h("span", { slot: "Title", class: "ChallengeLevelTitle" }, h("span", null, "Level ", index + 1, ": "), this.getLevelTarget(level))), h("div", { class: "ChallengeRewardMessage" }, h("div", { class: "EngagementSuiteIconButton Reward" }), h("span", null, translate('win', this.language), ": "), h("span", { class: "CustomRewardMessage" }, level.CustomRewardMessage)), this.getLevelBetRangesDetails(level))))));
|
|
253
|
+
}
|
|
254
|
+
getToggleButton() {
|
|
255
|
+
return (h("div", { class: "ChallengeCollapseButton", onClick: this.toggle }, h("span", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('details', this.language))));
|
|
256
|
+
}
|
|
257
|
+
render() {
|
|
258
|
+
return h("div", { key: '413a8354c03545a336b044a26f33275423548ee2', class: `ChallengeDetailsPopup ${this.device}` }, this.getActionsTemplate(), h("div", { key: 'e58aac0709effc8ed9df011c07b52ee6a0c4fa66', class: `ChallengeDetails ${this.challenge.IsNew ? 'IsNewChallenge' : ''}` }, this.getChallengeHeader(), this.getChallengeCountdown(), this.getToggleButton(), this.getChallengeDetails(), this.getChallengeLevels()));
|
|
259
|
+
}
|
|
260
|
+
get host() { return getElement(this); }
|
|
261
|
+
static get watchers() { return {
|
|
262
|
+
"challenge": ["challengePropHandler"]
|
|
263
|
+
}; }
|
|
277
264
|
};
|
|
278
|
-
CasinoEngagementSuiteChallengesDetails.style =
|
|
265
|
+
CasinoEngagementSuiteChallengesDetails.style = CasinoEngagementSuiteChallengesDetailsStyle0;
|
|
279
266
|
|
|
280
|
-
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-
|
|
267
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, 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-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
268
|
+
const CasinoEngagementSuiteProgressBarStyle0 = casinoEngagementSuiteProgressBarCss;
|
|
281
269
|
|
|
282
270
|
const CasinoEngagementSuiteProgressBar = class {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
componentDidRender() {
|
|
330
|
-
if (!this.limitStylingAppends && this.host) {
|
|
331
|
-
if (this.clientStyling)
|
|
332
|
-
this.setClientStyling();
|
|
333
|
-
if (this.clientStylingUrl)
|
|
334
|
-
this.setClientStylingURL();
|
|
335
|
-
this.limitStylingAppends = true;
|
|
271
|
+
constructor(hostRef) {
|
|
272
|
+
registerInstance(this, hostRef);
|
|
273
|
+
this.setClientStyling = () => {
|
|
274
|
+
let sheet = document.createElement('style');
|
|
275
|
+
sheet.innerHTML = this.clientStyling;
|
|
276
|
+
this.host.prepend(sheet);
|
|
277
|
+
};
|
|
278
|
+
this.setClientStylingURL = () => {
|
|
279
|
+
let url = new URL(this.clientStylingUrl);
|
|
280
|
+
let cssFile = document.createElement('style');
|
|
281
|
+
fetch(url.href)
|
|
282
|
+
.then((res) => res.text())
|
|
283
|
+
.then((data) => {
|
|
284
|
+
cssFile.innerHTML = data;
|
|
285
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
286
|
+
})
|
|
287
|
+
.catch((err) => {
|
|
288
|
+
console.log('Error ', err);
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
this.value = 0;
|
|
292
|
+
this.disabled = false;
|
|
293
|
+
this.hidePercent = false;
|
|
294
|
+
this.indeterminate = false;
|
|
295
|
+
this.clientStyling = '';
|
|
296
|
+
this.clientStylingUrl = '';
|
|
297
|
+
this.limitStylingAppends = false;
|
|
298
|
+
}
|
|
299
|
+
componentDidRender() {
|
|
300
|
+
if (!this.limitStylingAppends && this.host) {
|
|
301
|
+
if (this.clientStyling)
|
|
302
|
+
this.setClientStyling();
|
|
303
|
+
if (this.clientStylingUrl)
|
|
304
|
+
this.setClientStylingURL();
|
|
305
|
+
this.limitStylingAppends = true;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
getProgressBarClasses() {
|
|
309
|
+
return {
|
|
310
|
+
ProgressBar: true,
|
|
311
|
+
Completed: this.value === 100,
|
|
312
|
+
Disabled: this.disabled,
|
|
313
|
+
HidePercent: this.hidePercent || this.indeterminate
|
|
314
|
+
};
|
|
336
315
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
getProgressBarLineTemplate() {
|
|
347
|
-
if (this.indeterminate) {
|
|
348
|
-
return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
316
|
+
getProgressBarLineTemplate() {
|
|
317
|
+
if (this.indeterminate) {
|
|
318
|
+
return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
|
|
322
|
+
}
|
|
349
323
|
}
|
|
350
|
-
|
|
351
|
-
|
|
324
|
+
render() {
|
|
325
|
+
return h("div", { key: 'ecce3a26a92d2e090c1db84bdc1bdbeb505080ed', class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { key: '649fe1103d222200f2a1ad3b5967e37da1f1ab3d', class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { key: '49dc180eedd823f0027f75099813fb9d91bcd938', name: "Title" }, h("div", { key: 'e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5' })), h("slot", { key: '3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e', name: "Percent" }, h("div", { key: '6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad', class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { key: '141106e77caad7b04bb199f911e87c0c6f0adc2d', class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
|
|
352
326
|
}
|
|
353
|
-
|
|
354
|
-
render() {
|
|
355
|
-
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" }, this.getProgressBarLineTemplate()));
|
|
356
|
-
}
|
|
357
|
-
get host() { return getElement(this); }
|
|
327
|
+
get host() { return getElement(this); }
|
|
358
328
|
};
|
|
359
|
-
CasinoEngagementSuiteProgressBar.style =
|
|
329
|
+
CasinoEngagementSuiteProgressBar.style = CasinoEngagementSuiteProgressBarStyle0;
|
|
360
330
|
|
|
361
331
|
export { CasinoEngagementSuiteChallengesDetails as casino_engagement_suite_challenges_details, CasinoEngagementSuiteProgressBar as casino_engagement_suite_progress_bar };
|