@everymatrix/player-elevate-level 1.37.4 → 1.37.6
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/cjs/bonus-elevate-levels_8.cjs.entry.js +62 -20
- package/dist/cjs/{player-elevate-card-items-31eb5d57.js → player-elevate-card-items-484c4947.js} +3 -3
- package/dist/cjs/player-elevate-card.cjs.entry.js +9 -1
- package/dist/cjs/player-elevate-pointcard.cjs.entry.js +9 -1
- package/dist/components/bonus-elevate-levels2.js +7 -2
- package/dist/components/elevate-level-list2.js +23 -2
- package/dist/components/elevate-levels-data2.js +1 -1
- package/dist/components/player-elevate-card-data2.js +20 -12
- package/dist/components/player-elevate-card-items.js +3 -3
- package/dist/components/player-elevate-card.js +8 -0
- package/dist/components/player-elevate-loyaltycard2.js +10 -2
- package/dist/components/player-elevate-pointcard.js +8 -0
- package/dist/esm/bonus-elevate-levels_8.entry.js +62 -20
- package/dist/esm/{player-elevate-card-items-289d91dc.js → player-elevate-card-items-d9ec468f.js} +3 -3
- package/dist/esm/player-elevate-card.entry.js +9 -1
- package/dist/esm/player-elevate-pointcard.entry.js +9 -1
- package/dist/player-elevate-level/p-01e66aea.entry.js +1 -0
- package/dist/player-elevate-level/p-7fe1badd.entry.js +1 -0
- package/dist/player-elevate-level/{p-f43f6ed2.js → p-9235a771.js} +1 -1
- package/dist/player-elevate-level/p-f2d7e1fd.entry.js +1 -0
- package/dist/player-elevate-level/player-elevate-level.esm.js +1 -1
- package/dist/static/level-percent.svg +3 -3
- package/package.json +1 -1
- package/dist/player-elevate-level/p-64f8cc9e.entry.js +0 -1
- package/dist/player-elevate-level/p-b67b6b93.entry.js +0 -1
- package/dist/player-elevate-level/p-c73cc225.entry.js +0 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-stencil/packages/player-elevate-level/.stencil/packages/player-elevate-level/stencil.config.d.ts +0 -0
|
@@ -3,22 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c706b0d2.js');
|
|
6
|
-
const playerElevateCardItems = require('./player-elevate-card-items-
|
|
6
|
+
const playerElevateCardItems = require('./player-elevate-card-items-484c4947.js');
|
|
7
7
|
|
|
8
8
|
const DEFAULT_LANGUAGE = 'en';
|
|
9
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', '
|
|
9
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr', 'tr'];
|
|
10
10
|
const TRANSLATIONS = {
|
|
11
11
|
en: {
|
|
12
|
+
level: 'level',
|
|
12
13
|
seeAll: 'See All',
|
|
13
14
|
termsAndConditions: 'Terms & Conditions',
|
|
14
15
|
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
15
16
|
noLevelsSet: 'There is no level set',
|
|
17
|
+
points: 'Points',
|
|
16
18
|
},
|
|
17
19
|
fr: {
|
|
20
|
+
level: 'level',
|
|
18
21
|
seeAll: 'See All',
|
|
19
22
|
termsAndConditions: 'Terms & Conditions',
|
|
20
23
|
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
21
24
|
noLevelsSet: 'There is no level set',
|
|
25
|
+
points: 'Points',
|
|
22
26
|
},
|
|
23
27
|
hr: {
|
|
24
28
|
level: 'Razina',
|
|
@@ -26,11 +30,28 @@ const TRANSLATIONS = {
|
|
|
26
30
|
privilegesFor: 'Privilegije za',
|
|
27
31
|
termsAndConditions: 'Uvjeti i odredbe',
|
|
28
32
|
noLevelsSet: 'There is no level set',
|
|
33
|
+
points: 'Points',
|
|
34
|
+
},
|
|
35
|
+
ro: {
|
|
36
|
+
level: 'level',
|
|
37
|
+
seeAll: 'See All',
|
|
38
|
+
termsAndConditions: 'Terms & Conditions',
|
|
39
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
40
|
+
noLevelsSet: 'There is no level set',
|
|
41
|
+
points: 'Points',
|
|
42
|
+
},
|
|
43
|
+
tr: {
|
|
44
|
+
level: 'level',
|
|
45
|
+
seeAll: 'See All',
|
|
46
|
+
termsAndConditions: 'Terms & Conditions',
|
|
47
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
48
|
+
noLevelsSet: 'There is no level set',
|
|
49
|
+
points: 'Points',
|
|
29
50
|
}
|
|
30
51
|
};
|
|
31
52
|
const translate = (key, customLang) => {
|
|
32
53
|
const lang = customLang;
|
|
33
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
54
|
+
return TRANSLATIONS[lang !== undefined && (SUPPORTED_LANGUAGES.includes(lang) || TRANSLATIONS[lang]) ? lang : DEFAULT_LANGUAGE][key];
|
|
34
55
|
};
|
|
35
56
|
|
|
36
57
|
const bonusElevateLevelsCss = ":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}";
|
|
@@ -72,6 +93,9 @@ const BonusElevateLevels = class {
|
|
|
72
93
|
this.currentLevel = Object.assign({}, currentLevel);
|
|
73
94
|
}
|
|
74
95
|
}
|
|
96
|
+
onSessionOrEndpointChange() {
|
|
97
|
+
this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
|
|
98
|
+
}
|
|
75
99
|
elevateLevelsDataChangeHandler(event) {
|
|
76
100
|
if (!event.detail) {
|
|
77
101
|
return;
|
|
@@ -103,11 +127,13 @@ const BonusElevateLevels = class {
|
|
|
103
127
|
render() {
|
|
104
128
|
return (index.h("div", { class: "ElevateLevelContent" }, index.h("elevate-levels-data", { scopeParams: this.elevateLevelParamProxy }), index.h("div", { class: "LevelContent" }, this.elevateLevels ?
|
|
105
129
|
index.h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
|
|
106
|
-
index.h("elevate-level-presentation", { elevateLevel: this.currentLevel })
|
|
130
|
+
index.h("elevate-level-presentation", { elevateLevel: this.currentLevel })), this.errorMessage && index.h("div", null, this.errorMessage), index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
|
|
107
131
|
}
|
|
108
132
|
static get watchers() { return {
|
|
109
133
|
"selectedLevelId": ["selectedLevelIdChangedHandler"],
|
|
110
|
-
"elevateLevels": ["selectedLevelIdChangedHandler"]
|
|
134
|
+
"elevateLevels": ["selectedLevelIdChangedHandler"],
|
|
135
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
136
|
+
"language": ["onSessionOrEndpointChange"]
|
|
111
137
|
}; }
|
|
112
138
|
};
|
|
113
139
|
BonusElevateLevels.style = bonusElevateLevelsCss;
|
|
@@ -296,7 +322,7 @@ const ElevateLevelsData = class {
|
|
|
296
322
|
index.registerInstance(this, hostRef);
|
|
297
323
|
this.elevateLevelsDataChange = index.createEvent(this, "elevateLevelsDataChange", 7);
|
|
298
324
|
}
|
|
299
|
-
async
|
|
325
|
+
async componentWillRender() {
|
|
300
326
|
//load data
|
|
301
327
|
if (!this.scopeParams.endpoint) {
|
|
302
328
|
return;
|
|
@@ -598,9 +624,12 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
598
624
|
|
|
599
625
|
function updateProgressSvg(progressElementRef, percent) {
|
|
600
626
|
const svgElement = progressElementRef.querySelector('#total_level');
|
|
601
|
-
const endLockWidth =
|
|
627
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
628
|
+
//Total Widget of the progress
|
|
602
629
|
const barWidth = svgElement.getBBox().width;
|
|
603
|
-
|
|
630
|
+
//The filled width according to current progress
|
|
631
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
632
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
604
633
|
//update bar's width, widthOnBar
|
|
605
634
|
const levelBar = progressElementRef.querySelector('#current_level');
|
|
606
635
|
//update filters, x = widthOnBar
|
|
@@ -609,8 +638,8 @@ function updateProgressSvg(progressElementRef, percent) {
|
|
|
609
638
|
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
610
639
|
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
611
640
|
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
612
|
-
levelCircle.setAttribute('cx', `${widthOnBar
|
|
613
|
-
levelFilter.setAttribute('x', `${widthOnBar -
|
|
641
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
642
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
614
643
|
//update lock location
|
|
615
644
|
const endLockElement = progressElementRef.querySelector('#lock');
|
|
616
645
|
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
@@ -642,9 +671,10 @@ function updateProgressSvg(progressElementRef, percent) {
|
|
|
642
671
|
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
643
672
|
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
644
673
|
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
674
|
+
svgElement.parentElement.style.opacity = '1';
|
|
645
675
|
}
|
|
646
676
|
|
|
647
|
-
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
|
|
677
|
+
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
|
|
648
678
|
|
|
649
679
|
const PlayerElevateCardData = class {
|
|
650
680
|
constructor(hostRef) {
|
|
@@ -654,6 +684,9 @@ const PlayerElevateCardData = class {
|
|
|
654
684
|
handleWindowResizs() {
|
|
655
685
|
this.initLevelProgressbar();
|
|
656
686
|
}
|
|
687
|
+
onParamsChanged() {
|
|
688
|
+
this.loadElevateInfo();
|
|
689
|
+
}
|
|
657
690
|
onRedeemClick() {
|
|
658
691
|
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
659
692
|
}
|
|
@@ -754,19 +787,14 @@ const PlayerElevateCardData = class {
|
|
|
754
787
|
return;
|
|
755
788
|
}
|
|
756
789
|
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
757
|
-
? 1
|
|
758
|
-
: (this.playerElevateLevel.loyaltyPoints -
|
|
759
|
-
this.playerElevateLevel.entryPoints) /
|
|
760
|
-
(this.playerElevateLevel.nextLevel.entryPoints -
|
|
761
|
-
this.playerElevateLevel.entryPoints));
|
|
790
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
762
791
|
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
763
792
|
}, 80);
|
|
764
793
|
}
|
|
765
|
-
componentWillRender() { }
|
|
766
794
|
componentDidRender() {
|
|
767
795
|
this.initLevelProgressbar();
|
|
768
796
|
}
|
|
769
|
-
|
|
797
|
+
loadElevateInfo() {
|
|
770
798
|
if (!this.params.endpoint || !this.params.session) {
|
|
771
799
|
return;
|
|
772
800
|
}
|
|
@@ -796,7 +824,13 @@ const PlayerElevateCardData = class {
|
|
|
796
824
|
});
|
|
797
825
|
});
|
|
798
826
|
}
|
|
827
|
+
componentWillLoad() {
|
|
828
|
+
this.loadElevateInfo();
|
|
829
|
+
}
|
|
799
830
|
get elevateCardRef() { return index.getElement(this); }
|
|
831
|
+
static get watchers() { return {
|
|
832
|
+
"params": ["onParamsChanged"]
|
|
833
|
+
}; }
|
|
800
834
|
};
|
|
801
835
|
PlayerElevateCardData.style = playerElevateCardDataCss;
|
|
802
836
|
|
|
@@ -864,6 +898,9 @@ const PlayerElevateLoyaltycard = class {
|
|
|
864
898
|
*/
|
|
865
899
|
this.translationUrl = '';
|
|
866
900
|
}
|
|
901
|
+
onSessionOrEndpointChange() {
|
|
902
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
903
|
+
}
|
|
867
904
|
playerElevateLeveLoadedHandler(event) {
|
|
868
905
|
if (!event.detail) {
|
|
869
906
|
return;
|
|
@@ -882,7 +919,7 @@ const PlayerElevateLoyaltycard = class {
|
|
|
882
919
|
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
883
920
|
}
|
|
884
921
|
componentWillLoad() {
|
|
885
|
-
this.
|
|
922
|
+
this.paramProxy = {
|
|
886
923
|
endpoint: this.endpoint,
|
|
887
924
|
session: this.session,
|
|
888
925
|
language: this.language,
|
|
@@ -904,8 +941,13 @@ const PlayerElevateLoyaltycard = class {
|
|
|
904
941
|
render() {
|
|
905
942
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
906
943
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
907
|
-
return (index.h("div", { class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: playerElevateCardItems.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { params: this.
|
|
944
|
+
return (index.h("div", { class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: playerElevateCardItems.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { params: this.paramProxy }), index.h("div", { class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, null, index.h("div", { class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(playerElevateCardItems.PlayerPoints, { loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), this.pointExpireString && (index.h("div", { class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h(playerElevateCardItems.PlayerLoyaltyProcess, null), index.h("div", { class: "NextLevelTip" }, this.getNextLevelTips())))))))));
|
|
908
945
|
}
|
|
946
|
+
static get watchers() { return {
|
|
947
|
+
"session": ["onSessionOrEndpointChange"],
|
|
948
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
949
|
+
"language": ["onSessionOrEndpointChange"]
|
|
950
|
+
}; }
|
|
909
951
|
};
|
|
910
952
|
PlayerElevateLoyaltycard.style = playerElevateLoyaltycardCss;
|
|
911
953
|
|
package/dist/cjs/{player-elevate-card-items-31eb5d57.js → player-elevate-card-items-484c4947.js}
RENAMED
|
@@ -2320,9 +2320,9 @@ const translateWithParams = (key, params) => {
|
|
|
2320
2320
|
return templateString;
|
|
2321
2321
|
};
|
|
2322
2322
|
|
|
2323
|
-
const LoyaltyProgress = `<svg width="100%" height="28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2324
|
-
<rect y="12" width="100%" id="total_level" height="5" rx="2.5" fill="white" fill-opacity="0.5"/>
|
|
2325
|
-
<rect y="12" id="current_level" width="64" height="5" rx="2.5" fill="white"/>
|
|
2323
|
+
const LoyaltyProgress = `<svg width="100%" height="28" style="opacity: 0" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2324
|
+
<rect y="12" x="2" width="100%" id="total_level" height="5" rx="2.5" fill="white" fill-opacity="0.5"/>
|
|
2325
|
+
<rect y="12" x="2" id="current_level" width="64" height="5" rx="2.5" fill="white"/>
|
|
2326
2326
|
<g filter="url(#filter_current_level)">
|
|
2327
2327
|
<circle id="circle_current_level" cx="74.5" cy="14.5" r="6.5" fill="white"/>
|
|
2328
2328
|
</g>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c706b0d2.js');
|
|
6
|
-
const playerElevateCardItems = require('./player-elevate-card-items-
|
|
6
|
+
const playerElevateCardItems = require('./player-elevate-card-items-484c4947.js');
|
|
7
7
|
|
|
8
8
|
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emfe-w-color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";
|
|
9
9
|
|
|
@@ -37,6 +37,9 @@ const PlayerElevateCard = class {
|
|
|
37
37
|
this.translationUrl = '';
|
|
38
38
|
this.playerLevelFlag = 0;
|
|
39
39
|
}
|
|
40
|
+
onSessionOrEndpointChange() {
|
|
41
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
42
|
+
}
|
|
40
43
|
playerElevateLeveLoadedHandler(event) {
|
|
41
44
|
if (!event.detail) {
|
|
42
45
|
return;
|
|
@@ -71,6 +74,11 @@ const PlayerElevateCard = class {
|
|
|
71
74
|
return (index.h("div", { class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: playerElevateCardItems.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { params: this.paramProxy }), index.h("div", { class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (index.h(index.Fragment, null, index.h("div", { class: 'Content Row' }, index.h("div", { class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), index.h(playerElevateCardItems.PlayerPoints, { loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (index.h("div", { class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h("div", { class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, index.h(playerElevateCardItems.PlayerNameDiv, { playerName: this.playerName }), index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(playerElevateCardItems.PlayerLoyaltyProcess, null), index.h(playerElevateCardItems.PlayerElevateCardRedeem, { onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
72
75
|
}
|
|
73
76
|
static get assetsDirs() { return ["../static"]; }
|
|
77
|
+
static get watchers() { return {
|
|
78
|
+
"session": ["onSessionOrEndpointChange"],
|
|
79
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
80
|
+
"language": ["onSessionOrEndpointChange"]
|
|
81
|
+
}; }
|
|
74
82
|
};
|
|
75
83
|
PlayerElevateCard.style = playerElevateCardCss;
|
|
76
84
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-c706b0d2.js');
|
|
6
|
-
const playerElevateCardItems = require('./player-elevate-card-items-
|
|
6
|
+
const playerElevateCardItems = require('./player-elevate-card-items-484c4947.js');
|
|
7
7
|
|
|
8
8
|
const playerElevatePointcardCss = ":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";
|
|
9
9
|
|
|
@@ -45,6 +45,9 @@ const PlayerElevatePointcard = class {
|
|
|
45
45
|
this.translationUrl = '';
|
|
46
46
|
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
47
47
|
}
|
|
48
|
+
onSessionOrEndpointChange() {
|
|
49
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
50
|
+
}
|
|
48
51
|
playerElevateLeveLoadedHandler(event) {
|
|
49
52
|
if (!event.detail) {
|
|
50
53
|
return;
|
|
@@ -78,6 +81,11 @@ const PlayerElevatePointcard = class {
|
|
|
78
81
|
this.onDetailsClick();
|
|
79
82
|
} }, playerElevateCardItems.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
80
83
|
}
|
|
84
|
+
static get watchers() { return {
|
|
85
|
+
"session": ["onSessionOrEndpointChange"],
|
|
86
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
87
|
+
"language": ["onSessionOrEndpointChange"]
|
|
88
|
+
}; }
|
|
81
89
|
};
|
|
82
90
|
PlayerElevatePointcard.style = playerElevatePointcardCss;
|
|
83
91
|
|
|
@@ -45,6 +45,9 @@ const BonusElevateLevels = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
45
45
|
this.currentLevel = Object.assign({}, currentLevel);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
onSessionOrEndpointChange() {
|
|
49
|
+
this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
|
|
50
|
+
}
|
|
48
51
|
elevateLevelsDataChangeHandler(event) {
|
|
49
52
|
if (!event.detail) {
|
|
50
53
|
return;
|
|
@@ -76,11 +79,13 @@ const BonusElevateLevels = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
76
79
|
render() {
|
|
77
80
|
return (h("div", { class: "ElevateLevelContent" }, h("elevate-levels-data", { scopeParams: this.elevateLevelParamProxy }), h("div", { class: "LevelContent" }, this.elevateLevels ?
|
|
78
81
|
h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
|
|
79
|
-
h("elevate-level-presentation", { elevateLevel: this.currentLevel })
|
|
82
|
+
h("elevate-level-presentation", { elevateLevel: this.currentLevel })), this.errorMessage && h("div", null, this.errorMessage), h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
|
|
80
83
|
}
|
|
81
84
|
static get watchers() { return {
|
|
82
85
|
"selectedLevelId": ["selectedLevelIdChangedHandler"],
|
|
83
|
-
"elevateLevels": ["selectedLevelIdChangedHandler"]
|
|
86
|
+
"elevateLevels": ["selectedLevelIdChangedHandler"],
|
|
87
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
88
|
+
"language": ["onSessionOrEndpointChange"]
|
|
84
89
|
}; }
|
|
85
90
|
static get style() { return bonusElevateLevelsCss; }
|
|
86
91
|
}, [1, "bonus-elevate-levels", {
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', '
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr', 'tr'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
|
+
level: 'level',
|
|
7
8
|
seeAll: 'See All',
|
|
8
9
|
termsAndConditions: 'Terms & Conditions',
|
|
9
10
|
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
10
11
|
noLevelsSet: 'There is no level set',
|
|
12
|
+
points: 'Points',
|
|
11
13
|
},
|
|
12
14
|
fr: {
|
|
15
|
+
level: 'level',
|
|
13
16
|
seeAll: 'See All',
|
|
14
17
|
termsAndConditions: 'Terms & Conditions',
|
|
15
18
|
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
16
19
|
noLevelsSet: 'There is no level set',
|
|
20
|
+
points: 'Points',
|
|
17
21
|
},
|
|
18
22
|
hr: {
|
|
19
23
|
level: 'Razina',
|
|
@@ -21,11 +25,28 @@ const TRANSLATIONS = {
|
|
|
21
25
|
privilegesFor: 'Privilegije za',
|
|
22
26
|
termsAndConditions: 'Uvjeti i odredbe',
|
|
23
27
|
noLevelsSet: 'There is no level set',
|
|
28
|
+
points: 'Points',
|
|
29
|
+
},
|
|
30
|
+
ro: {
|
|
31
|
+
level: 'level',
|
|
32
|
+
seeAll: 'See All',
|
|
33
|
+
termsAndConditions: 'Terms & Conditions',
|
|
34
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
35
|
+
noLevelsSet: 'There is no level set',
|
|
36
|
+
points: 'Points',
|
|
37
|
+
},
|
|
38
|
+
tr: {
|
|
39
|
+
level: 'level',
|
|
40
|
+
seeAll: 'See All',
|
|
41
|
+
termsAndConditions: 'Terms & Conditions',
|
|
42
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
43
|
+
noLevelsSet: 'There is no level set',
|
|
44
|
+
points: 'Points',
|
|
24
45
|
}
|
|
25
46
|
};
|
|
26
47
|
const translate = (key, customLang) => {
|
|
27
48
|
const lang = customLang;
|
|
28
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
49
|
+
return TRANSLATIONS[lang !== undefined && (SUPPORTED_LANGUAGES.includes(lang) || TRANSLATIONS[lang]) ? lang : DEFAULT_LANGUAGE][key];
|
|
29
50
|
};
|
|
30
51
|
|
|
31
52
|
/**
|
|
@@ -49,7 +49,7 @@ const ElevateLevelsData = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
49
49
|
this.__registerHost();
|
|
50
50
|
this.elevateLevelsDataChange = createEvent(this, "elevateLevelsDataChange", 7);
|
|
51
51
|
}
|
|
52
|
-
async
|
|
52
|
+
async componentWillRender() {
|
|
53
53
|
//load data
|
|
54
54
|
if (!this.scopeParams.endpoint) {
|
|
55
55
|
return;
|
|
@@ -401,9 +401,12 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
401
401
|
|
|
402
402
|
function updateProgressSvg(progressElementRef, percent) {
|
|
403
403
|
const svgElement = progressElementRef.querySelector('#total_level');
|
|
404
|
-
const endLockWidth =
|
|
404
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
405
|
+
//Total Widget of the progress
|
|
405
406
|
const barWidth = svgElement.getBBox().width;
|
|
406
|
-
|
|
407
|
+
//The filled width according to current progress
|
|
408
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
409
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
407
410
|
//update bar's width, widthOnBar
|
|
408
411
|
const levelBar = progressElementRef.querySelector('#current_level');
|
|
409
412
|
//update filters, x = widthOnBar
|
|
@@ -412,8 +415,8 @@ function updateProgressSvg(progressElementRef, percent) {
|
|
|
412
415
|
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
413
416
|
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
414
417
|
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
415
|
-
levelCircle.setAttribute('cx', `${widthOnBar
|
|
416
|
-
levelFilter.setAttribute('x', `${widthOnBar -
|
|
418
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
419
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
417
420
|
//update lock location
|
|
418
421
|
const endLockElement = progressElementRef.querySelector('#lock');
|
|
419
422
|
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
@@ -445,9 +448,10 @@ function updateProgressSvg(progressElementRef, percent) {
|
|
|
445
448
|
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
446
449
|
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
447
450
|
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
451
|
+
svgElement.parentElement.style.opacity = '1';
|
|
448
452
|
}
|
|
449
453
|
|
|
450
|
-
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
|
|
454
|
+
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px #00000040;\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
|
|
451
455
|
|
|
452
456
|
const PlayerElevateCardData = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
453
457
|
constructor() {
|
|
@@ -458,6 +462,9 @@ const PlayerElevateCardData = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
458
462
|
handleWindowResizs() {
|
|
459
463
|
this.initLevelProgressbar();
|
|
460
464
|
}
|
|
465
|
+
onParamsChanged() {
|
|
466
|
+
this.loadElevateInfo();
|
|
467
|
+
}
|
|
461
468
|
onRedeemClick() {
|
|
462
469
|
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
463
470
|
}
|
|
@@ -558,19 +565,14 @@ const PlayerElevateCardData = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
558
565
|
return;
|
|
559
566
|
}
|
|
560
567
|
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
561
|
-
? 1
|
|
562
|
-
: (this.playerElevateLevel.loyaltyPoints -
|
|
563
|
-
this.playerElevateLevel.entryPoints) /
|
|
564
|
-
(this.playerElevateLevel.nextLevel.entryPoints -
|
|
565
|
-
this.playerElevateLevel.entryPoints));
|
|
568
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
566
569
|
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
567
570
|
}, 80);
|
|
568
571
|
}
|
|
569
|
-
componentWillRender() { }
|
|
570
572
|
componentDidRender() {
|
|
571
573
|
this.initLevelProgressbar();
|
|
572
574
|
}
|
|
573
|
-
|
|
575
|
+
loadElevateInfo() {
|
|
574
576
|
if (!this.params.endpoint || !this.params.session) {
|
|
575
577
|
return;
|
|
576
578
|
}
|
|
@@ -600,7 +602,13 @@ const PlayerElevateCardData = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
600
602
|
});
|
|
601
603
|
});
|
|
602
604
|
}
|
|
605
|
+
componentWillLoad() {
|
|
606
|
+
this.loadElevateInfo();
|
|
607
|
+
}
|
|
603
608
|
get elevateCardRef() { return this; }
|
|
609
|
+
static get watchers() { return {
|
|
610
|
+
"params": ["onParamsChanged"]
|
|
611
|
+
}; }
|
|
604
612
|
static get style() { return playerElevateCardDataCss; }
|
|
605
613
|
}, [0, "player-elevate-card-data", {
|
|
606
614
|
"params": [8],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, getAssetPath } from '@stencil/core/internal/client';
|
|
2
2
|
import { r as requiredArgs, _ as _typeof, t as toDate, g as getTimezoneOffsetInMilliseconds, a as translate } from './player-elevate-card-data2.js';
|
|
3
3
|
|
|
4
|
-
const LoyaltyProgress = `<svg width="100%" height="28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<rect y="12" width="100%" id="total_level" height="5" rx="2.5" fill="white" fill-opacity="0.5"/>
|
|
6
|
-
<rect y="12" id="current_level" width="64" height="5" rx="2.5" fill="white"/>
|
|
4
|
+
const LoyaltyProgress = `<svg width="100%" height="28" style="opacity: 0" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<rect y="12" x="2" width="100%" id="total_level" height="5" rx="2.5" fill="white" fill-opacity="0.5"/>
|
|
6
|
+
<rect y="12" x="2" id="current_level" width="64" height="5" rx="2.5" fill="white"/>
|
|
7
7
|
<g filter="url(#filter_current_level)">
|
|
8
8
|
<circle id="circle_current_level" cx="74.5" cy="14.5" r="6.5" fill="white"/>
|
|
9
9
|
</g>
|
|
@@ -37,6 +37,9 @@ const PlayerElevateCard$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
37
37
|
this.translationUrl = '';
|
|
38
38
|
this.playerLevelFlag = 0;
|
|
39
39
|
}
|
|
40
|
+
onSessionOrEndpointChange() {
|
|
41
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
42
|
+
}
|
|
40
43
|
playerElevateLeveLoadedHandler(event) {
|
|
41
44
|
if (!event.detail) {
|
|
42
45
|
return;
|
|
@@ -71,6 +74,11 @@ const PlayerElevateCard$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
71
74
|
return (h("div", { class: `ElevateCardWrapper ${this.theme}` }, h("div", { class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { params: this.paramProxy }), h("div", { class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, null, h("div", { class: 'Content Row' }, h("div", { class: "PlayerImg" }, h(PlayerAvatar, { playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, null), h(PlayerElevateCardRedeem, { onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
72
75
|
}
|
|
73
76
|
static get assetsDirs() { return ["../static"]; }
|
|
77
|
+
static get watchers() { return {
|
|
78
|
+
"session": ["onSessionOrEndpointChange"],
|
|
79
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
80
|
+
"language": ["onSessionOrEndpointChange"]
|
|
81
|
+
}; }
|
|
74
82
|
static get style() { return playerElevateCardCss; }
|
|
75
83
|
}, [1, "player-elevate-card", {
|
|
76
84
|
"endpoint": [513],
|
|
@@ -36,6 +36,9 @@ const PlayerElevateLoyaltycard = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
36
36
|
*/
|
|
37
37
|
this.translationUrl = '';
|
|
38
38
|
}
|
|
39
|
+
onSessionOrEndpointChange() {
|
|
40
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
41
|
+
}
|
|
39
42
|
playerElevateLeveLoadedHandler(event) {
|
|
40
43
|
if (!event.detail) {
|
|
41
44
|
return;
|
|
@@ -54,7 +57,7 @@ const PlayerElevateLoyaltycard = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
54
57
|
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
55
58
|
}
|
|
56
59
|
componentWillLoad() {
|
|
57
|
-
this.
|
|
60
|
+
this.paramProxy = {
|
|
58
61
|
endpoint: this.endpoint,
|
|
59
62
|
session: this.session,
|
|
60
63
|
language: this.language,
|
|
@@ -76,8 +79,13 @@ const PlayerElevateLoyaltycard = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
76
79
|
render() {
|
|
77
80
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
78
81
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
79
|
-
return (h("div", { class: `ElevateCardWrapper ${this.theme}` }, h("div", { class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { params: this.
|
|
82
|
+
return (h("div", { class: `ElevateCardWrapper ${this.theme}` }, h("div", { class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { params: this.paramProxy }), h("div", { class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, null, h("div", { class: "PlayerImg" }, h(PlayerAvatar, { onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { class: `LevelInfo ${this.playerElevateLevel.name}` }, h(PlayerElevateLoyaltyLevel, { hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerPoints, { loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), this.pointExpireString && (h("div", { class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h(PlayerLoyaltyProcess, null), h("div", { class: "NextLevelTip" }, this.getNextLevelTips())))))))));
|
|
80
83
|
}
|
|
84
|
+
static get watchers() { return {
|
|
85
|
+
"session": ["onSessionOrEndpointChange"],
|
|
86
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
87
|
+
"language": ["onSessionOrEndpointChange"]
|
|
88
|
+
}; }
|
|
81
89
|
static get style() { return playerElevateLoyaltycardCss; }
|
|
82
90
|
}, [1, "player-elevate-loyaltycard", {
|
|
83
91
|
"endpoint": [513],
|
|
@@ -45,6 +45,9 @@ const PlayerElevatePointcard$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
45
45
|
this.translationUrl = '';
|
|
46
46
|
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
47
47
|
}
|
|
48
|
+
onSessionOrEndpointChange() {
|
|
49
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
50
|
+
}
|
|
48
51
|
playerElevateLeveLoadedHandler(event) {
|
|
49
52
|
if (!event.detail) {
|
|
50
53
|
return;
|
|
@@ -78,6 +81,11 @@ const PlayerElevatePointcard$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
78
81
|
this.onDetailsClick();
|
|
79
82
|
} }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
80
83
|
}
|
|
84
|
+
static get watchers() { return {
|
|
85
|
+
"session": ["onSessionOrEndpointChange"],
|
|
86
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
87
|
+
"language": ["onSessionOrEndpointChange"]
|
|
88
|
+
}; }
|
|
81
89
|
static get style() { return playerElevatePointcardCss; }
|
|
82
90
|
}, [1, "player-elevate-pointcard", {
|
|
83
91
|
"endpoint": [513],
|