@everymatrix/player-elevate-level 1.43.4 → 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/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-elevate-levels_8.cjs.entry.js +644 -674
- package/dist/cjs/index-91eb0bf0.js +1682 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/{player-elevate-card-items-9e7a9a23.js → player-elevate-card-items-ae20c19f.js} +171 -285
- package/dist/cjs/player-elevate-card.cjs.entry.js +59 -70
- package/dist/cjs/player-elevate-level.cjs.js +17 -11
- package/dist/cjs/player-elevate-pointcard.cjs.entry.js +61 -77
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/player-elevate-level/index.js +1 -0
- package/dist/collection/components/player-elevate-level/player-elevate-level.js +208 -209
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-elevate-levels_8.entry.js +644 -674
- package/dist/esm/index-32ed7fbd.js +1651 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/{player-elevate-card-items-08ee8fab.js → player-elevate-card-items-2eccd763.js} +172 -285
- package/dist/esm/player-elevate-card.entry.js +59 -70
- package/dist/esm/player-elevate-level.js +14 -11
- package/dist/esm/player-elevate-pointcard.entry.js +61 -77
- package/dist/player-elevate-level/p-5f93600c.entry.js +1 -0
- package/dist/player-elevate-level/p-6d39391e.js +2 -0
- package/dist/player-elevate-level/p-73e5a291.entry.js +1 -0
- package/dist/player-elevate-level/p-a622755e.js +1 -0
- package/dist/player-elevate-level/p-acd808d7.entry.js +1 -0
- package/dist/player-elevate-level/p-e1255160.js +1 -0
- package/dist/player-elevate-level/player-elevate-level.esm.js +1 -1
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -22
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-elevate-level/index.d.ts +1 -0
- package/dist/types/components/player-elevate-level/player-elevate-level.d.ts +41 -41
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- 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 -6
- package/dist/cjs/index-c706b0d2.js +0 -1726
- package/dist/components/bonus-elevate-levels.js +0 -6
- package/dist/components/bonus-elevate-levels2.js +0 -138
- package/dist/components/elevate-level-list.js +0 -6
- package/dist/components/elevate-level-list2.js +0 -198
- package/dist/components/elevate-level-presentation.js +0 -6
- package/dist/components/elevate-level-presentation2.js +0 -31
- package/dist/components/elevate-levels-data.js +0 -6
- package/dist/components/elevate-levels-data2.js +0 -102
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/player-elevate-card-data.js +0 -6
- package/dist/components/player-elevate-card-data2.js +0 -635
- package/dist/components/player-elevate-card-items.js +0 -2250
- package/dist/components/player-elevate-card.js +0 -126
- package/dist/components/player-elevate-level.d.ts +0 -11
- package/dist/components/player-elevate-level.js +0 -107
- package/dist/components/player-elevate-loyaltycard.js +0 -6
- package/dist/components/player-elevate-loyaltycard2.js +0 -129
- package/dist/components/player-elevate-pointcard.js +0 -135
- package/dist/esm/index-104132db.js +0 -1696
- 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/player-elevate-level/p-04a5ef33.entry.js +0 -1
- package/dist/player-elevate-level/p-46fd6f51.js +0 -1
- package/dist/player-elevate-level/p-6766466f.js +0 -1
- package/dist/player-elevate-level/p-d5d234f8.entry.js +0 -1
- package/dist/player-elevate-level/p-d8ae2452.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-elevate-level/.stencil/packages/player-elevate-level/stencil.config.d.ts +0 -2
|
@@ -1,138 +1,130 @@
|
|
|
1
|
-
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement, a as getAssetPath, F as Fragment } from './index-
|
|
2
|
-
import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, a as translateWithParams, T as TRANSLATIONS$1, P as PlayerAvatar, b as
|
|
1
|
+
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement, a as getAssetPath, F as Fragment } from './index-32ed7fbd.js';
|
|
2
|
+
import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, a as translateWithParams, T as TRANSLATIONS$1, P as PlayerAvatar, b as PlayerElevateLoyaltyLevel, c as PlayerPoints, d as PlayerLoyaltyProcess } from './player-elevate-card-items-2eccd763.js';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_LANGUAGE = 'en';
|
|
5
5
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'hr', 'tr'];
|
|
6
6
|
const TRANSLATIONS = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
7
|
+
en: {
|
|
8
|
+
level: 'level',
|
|
9
|
+
seeAll: 'See All',
|
|
10
|
+
termsAndConditions: 'Terms & Conditions',
|
|
11
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
12
|
+
noLevelsSet: 'There is no level set',
|
|
13
|
+
points: 'Points',
|
|
14
|
+
},
|
|
15
|
+
fr: {
|
|
16
|
+
level: 'level',
|
|
17
|
+
seeAll: 'See All',
|
|
18
|
+
termsAndConditions: 'Terms & Conditions',
|
|
19
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
20
|
+
noLevelsSet: 'There is no level set',
|
|
21
|
+
points: 'Points',
|
|
22
|
+
},
|
|
23
|
+
hr: {
|
|
24
|
+
level: 'Razina',
|
|
25
|
+
seeAll: 'Vidi sve',
|
|
26
|
+
privilegesFor: 'Privilegije za',
|
|
27
|
+
termsAndConditions: 'Uvjeti i odredbe',
|
|
28
|
+
noLevelsSet: 'There is no level set',
|
|
29
|
+
points: 'Points',
|
|
30
|
+
},
|
|
31
|
+
ro: {
|
|
32
|
+
level: 'level',
|
|
33
|
+
seeAll: 'See All',
|
|
34
|
+
termsAndConditions: 'Terms & Conditions',
|
|
35
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
36
|
+
noLevelsSet: 'There is no level set',
|
|
37
|
+
points: 'Points',
|
|
38
|
+
},
|
|
39
|
+
tr: {
|
|
40
|
+
level: 'level',
|
|
41
|
+
seeAll: 'See All',
|
|
42
|
+
termsAndConditions: 'Terms & Conditions',
|
|
43
|
+
loadElevateLevelErrorMessage: 'Error when load elevate levels',
|
|
44
|
+
noLevelsSet: 'There is no level set',
|
|
45
|
+
points: 'Points',
|
|
46
|
+
}
|
|
47
47
|
};
|
|
48
48
|
const translate = (key, customLang) => {
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
const lang = customLang;
|
|
50
|
+
return TRANSLATIONS[lang !== undefined && (SUPPORTED_LANGUAGES.includes(lang) || TRANSLATIONS[lang]) ? lang : DEFAULT_LANGUAGE][key];
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
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}";
|
|
54
|
+
const BonusElevateLevelsStyle0 = bonusElevateLevelsCss;
|
|
54
55
|
|
|
55
56
|
const BonusElevateLevels = class {
|
|
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
|
-
h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
|
|
126
|
-
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 })));
|
|
127
|
-
}
|
|
128
|
-
static get watchers() { return {
|
|
129
|
-
"selectedLevelId": ["selectedLevelIdChangedHandler"],
|
|
130
|
-
"elevateLevels": ["selectedLevelIdChangedHandler"],
|
|
131
|
-
"endpoint": ["onSessionOrEndpointChange"],
|
|
132
|
-
"language": ["onSessionOrEndpointChange"]
|
|
133
|
-
}; }
|
|
57
|
+
constructor(hostRef) {
|
|
58
|
+
registerInstance(this, hostRef);
|
|
59
|
+
this.clientStyling = '';
|
|
60
|
+
this.clientStylingUrl = '';
|
|
61
|
+
this.endpoint = undefined;
|
|
62
|
+
this.language = 'en';
|
|
63
|
+
this.translationUrl = '';
|
|
64
|
+
this.selectedLevelId = undefined;
|
|
65
|
+
this.showDefault = undefined;
|
|
66
|
+
this.elevateLevelParamProxy = undefined;
|
|
67
|
+
this.elevateLevels = [];
|
|
68
|
+
this.currentLevel = undefined;
|
|
69
|
+
this.errorMessage = undefined;
|
|
70
|
+
}
|
|
71
|
+
selectedLevelChangedHandler(event) {
|
|
72
|
+
if (event.detail) {
|
|
73
|
+
this.currentLevel = Object.assign({}, event.detail.level);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
selectedLevelIdChangedHandler() {
|
|
77
|
+
if (this.selectedLevelId && this.elevateLevels) {
|
|
78
|
+
const currentLevel = this.elevateLevels.filter((item) => {
|
|
79
|
+
return item.id == this.selectedLevelId;
|
|
80
|
+
})[0];
|
|
81
|
+
this.currentLevel = Object.assign({}, currentLevel);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
onSessionOrEndpointChange() {
|
|
85
|
+
this.elevateLevelParamProxy = Object.assign(Object.assign({}, this.elevateLevelParamProxy), { endpoint: this.endpoint, language: this.language });
|
|
86
|
+
}
|
|
87
|
+
elevateLevelsDataChangeHandler(event) {
|
|
88
|
+
if (!event.detail) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (event.detail.currentLevel) {
|
|
92
|
+
this.currentLevel = Object.assign({}, event.detail.currentLevel);
|
|
93
|
+
}
|
|
94
|
+
if (event.detail.elevateLevels) {
|
|
95
|
+
this.elevateLevels = [...event.detail.elevateLevels];
|
|
96
|
+
}
|
|
97
|
+
if (event.detail.clearError) {
|
|
98
|
+
this.errorMessage = null;
|
|
99
|
+
}
|
|
100
|
+
if (event.detail.errorMessage) {
|
|
101
|
+
if (event.detail.errorMessage['errorWhenLoadElevateLevels']) {
|
|
102
|
+
this.errorMessage = translate('loadElevateLevelErrorMessage', this.language);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
onTCClick() {
|
|
107
|
+
window.postMessage({ type: 'termAndConditionClicked' }, window.location.href);
|
|
108
|
+
}
|
|
109
|
+
componentWillLoad() {
|
|
110
|
+
this.elevateLevelParamProxy = {
|
|
111
|
+
endpoint: this.endpoint, language: this.language, selectedLevelId: this.selectedLevelId,
|
|
112
|
+
showDefault: this.showDefault
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
render() {
|
|
116
|
+
return (h("div", { key: '327b5cd6a3bc756ce0696a0f2a4081f35bad7316', class: "ElevateLevelContent" }, h("elevate-levels-data", { key: 'cf1ab9a55cdaf9eba688bd524cb4a83d63563e77', scopeParams: this.elevateLevelParamProxy }), h("div", { key: '9c85b9a805712db07c7c99ac2db843062997f667', class: "LevelContent" }, this.elevateLevels ?
|
|
117
|
+
h("elevate-level-list", { language: this.language, selectedLevelId: this.selectedLevelId, levels: this.elevateLevels }) : translate('noLevelsSet', this.language), this.currentLevel &&
|
|
118
|
+
h("elevate-level-presentation", { key: '0fecb2a451caeef4512dc6f2af4fd3406610cc72', elevateLevel: this.currentLevel })), this.errorMessage && h("div", { key: 'ef746907148df80338fd2300322cd8eea9342f51' }, this.errorMessage), h("general-styling-wrapper", { key: 'e3d82ef1b7e5986354e18d875f9e3c547ff8adba', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl })));
|
|
119
|
+
}
|
|
120
|
+
static get watchers() { return {
|
|
121
|
+
"selectedLevelId": ["selectedLevelIdChangedHandler"],
|
|
122
|
+
"elevateLevels": ["selectedLevelIdChangedHandler"],
|
|
123
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
124
|
+
"language": ["onSessionOrEndpointChange"]
|
|
125
|
+
}; }
|
|
134
126
|
};
|
|
135
|
-
BonusElevateLevels.style =
|
|
127
|
+
BonusElevateLevels.style = BonusElevateLevelsStyle0;
|
|
136
128
|
|
|
137
129
|
/**
|
|
138
130
|
* @name isMobile
|
|
@@ -141,150 +133,146 @@ BonusElevateLevels.style = bonusElevateLevelsCss;
|
|
|
141
133
|
* @returns {Boolean} true or false
|
|
142
134
|
*/
|
|
143
135
|
const isMobile = (userAgent) => {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
137
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
138
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
139
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
148
140
|
};
|
|
149
141
|
var MOVE_TO;
|
|
150
142
|
(function (MOVE_TO) {
|
|
151
|
-
|
|
152
|
-
|
|
143
|
+
MOVE_TO[MOVE_TO["slideToRight"] = 1] = "slideToRight";
|
|
144
|
+
MOVE_TO[MOVE_TO["slideToLeft"] = -1] = "slideToLeft";
|
|
153
145
|
})(MOVE_TO || (MOVE_TO = {}));
|
|
154
146
|
|
|
155
|
-
const elevateLevelListCss = "elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emfe-w-color-gray-50,
|
|
147
|
+
const elevateLevelListCss = "elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emfe-w-color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emfe-w-color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emfe-w-color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";
|
|
148
|
+
const ElevateLevelListStyle0 = elevateLevelListCss;
|
|
156
149
|
|
|
157
150
|
const ElevateLevelList = class {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
151
|
+
constructor(hostRef) {
|
|
152
|
+
registerInstance(this, hostRef);
|
|
153
|
+
this.selectedLevelChanged = createEvent(this, "selectedLevelChanged", 7);
|
|
154
|
+
this.minOffset = 0;
|
|
155
|
+
this.isMobile = isMobile(window.navigator.userAgent);
|
|
156
|
+
this.levels = undefined;
|
|
157
|
+
this.language = undefined;
|
|
158
|
+
this.selectedLevelId = undefined;
|
|
159
|
+
this.isShowSliderButton = false;
|
|
160
|
+
this.touchPosStart = undefined;
|
|
161
|
+
this.touchPosEnd = undefined;
|
|
162
|
+
this.offset = 0;
|
|
163
|
+
}
|
|
164
|
+
onLevelClicked(elevateLevel) {
|
|
165
|
+
this.selectedLevelChanged.emit({ level: elevateLevel });
|
|
166
|
+
this.selectedLevelId = elevateLevel.id;
|
|
167
|
+
}
|
|
168
|
+
levelsChangedHandler() {
|
|
169
|
+
this.initOffsetOfLevelItems();
|
|
170
|
+
}
|
|
171
|
+
initOffsetOfLevelItems() {
|
|
172
|
+
if (!this.levels || this.levels.length == 0 || !this.selectedLevelId) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const currentLevelIndex = this.levels.findIndex((item) => {
|
|
176
|
+
return this.selectedLevelId == item.id;
|
|
177
|
+
});
|
|
178
|
+
this.onLevelClicked(this.levels[currentLevelIndex == -1 ? 0 : currentLevelIndex]);
|
|
179
|
+
//do not need change the slider offset when level items less than moveCountForOneTouch
|
|
180
|
+
if (this.levels.length <= this.moveCountForOneTouch) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
//to avoid the slider do not move when currentLevelIndex = moveCountForOneTouch - 1
|
|
184
|
+
let newOffset = Math.floor((currentLevelIndex == -1 ? 1 : currentLevelIndex + 1) / this.moveCountForOneTouch)
|
|
185
|
+
* this.moveCountForOneTouch * this.childElementWidth * (-1);
|
|
186
|
+
this.offset = newOffset <= this.minOffset ? this.minOffset : (newOffset >= 0 ? 0 : newOffset);
|
|
187
|
+
}
|
|
188
|
+
onTouchStart(e) {
|
|
189
|
+
this.touchPosStart = { clientX: e.touches[0].clientX, clientY: e.touches[0].clientY };
|
|
190
|
+
}
|
|
191
|
+
onTouchMove(e) {
|
|
192
|
+
this.touchPosEnd = { clientX: e.touches[0].clientX, clientY: e.touches[0].clientY };
|
|
193
|
+
const diffX = this.touchPosEnd.clientX - this.touchPosStart.clientX;
|
|
194
|
+
const diffY = this.touchPosEnd.clientY - this.touchPosStart.clientY;
|
|
195
|
+
if (Math.abs(diffX) > Math.abs(diffY)) {
|
|
196
|
+
this.slideTo(diffX > 0 ? MOVE_TO.slideToRight : MOVE_TO.slideToLeft);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
slideTo(direction) {
|
|
200
|
+
let newOffset = this.levelsElement.offsetLeft +
|
|
201
|
+
(this.childElementWidth) * this.moveCountForOneTouch * direction;
|
|
202
|
+
if (newOffset % this.childElementWidth != 0) {
|
|
203
|
+
const leftOfPreNode = (Math.floor(newOffset / this.childElementWidth)) * this.childElementWidth;
|
|
204
|
+
const leftOfNextNode = (Math.ceil(newOffset / this.childElementWidth)) * this.childElementWidth;
|
|
205
|
+
//touchmove to right, get left of pre-node; touchmove to left, get left of next-node
|
|
206
|
+
newOffset = direction == MOVE_TO.slideToRight ? leftOfPreNode : leftOfNextNode;
|
|
207
|
+
}
|
|
208
|
+
this.offset = newOffset < this.minOffset ? this.minOffset : (newOffset >= 0 ? 0 : newOffset);
|
|
209
|
+
}
|
|
210
|
+
initLevelSlider() {
|
|
211
|
+
var _a;
|
|
212
|
+
if (!((_a = this.levelsElement) === null || _a === void 0 ? void 0 : _a.firstElementChild)) {
|
|
213
|
+
console.log('Widget[elevate-level-list] DOM is not ready.');
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
this.isShowSliderButton = !this.isMobile && (this.levelsElement.clientWidth > this.levelsElement.parentElement.clientWidth);
|
|
217
|
+
this.minOffset = this.levelsElement.parentElement.clientWidth - this.levelsElement.clientWidth;
|
|
218
|
+
this.childElementWidth = this.levelsElement.firstElementChild.clientWidth;
|
|
219
|
+
this.moveCountForOneTouch = Math.ceil(this.levelsElement.parentElement.clientWidth / this.childElementWidth) - 1;
|
|
220
|
+
const childElementCount = this.levelsElement.childElementCount;
|
|
221
|
+
this.childElementWidth += (this.levelsElement.clientWidth - this.childElementWidth * childElementCount) / (childElementCount - 1);
|
|
222
|
+
}
|
|
223
|
+
debounce(callback, delay) {
|
|
224
|
+
{
|
|
225
|
+
let timer;
|
|
226
|
+
return () => {
|
|
227
|
+
clearTimeout(timer);
|
|
228
|
+
timer = setTimeout(() => {
|
|
229
|
+
callback();
|
|
230
|
+
}, delay);
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
;
|
|
235
|
+
handleResize() {
|
|
236
|
+
this.debounce(this.initLevelSlider.bind(this), 200)();
|
|
237
|
+
}
|
|
238
|
+
componentDidRender() {
|
|
239
|
+
this.host.componentOnReady().then(() => {
|
|
240
|
+
this.initLevelSlider();
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
render() {
|
|
244
|
+
return (h(Host, { key: 'd88d3434af89a0f8fd20a97735121fdf297905ab' }, this.levels && [
|
|
245
|
+
h("div", { key: 'cff36ba584e2474a65a1b95545b00937ecd06c8c', class: `SliderButton LeftButton ${this.offset == 0 ? 'Disabled' : ''} ${this.isShowSliderButton ? '' : 'Hidden'}`, onClick: () => this.slideTo(MOVE_TO.slideToRight) }, h("svg", { key: '640b4dd9b26b4097d15623f3e9c6b14b9a60b37e', fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0a50ffc9319ad33ed61e4696c37a0bfe6090518c', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))),
|
|
246
|
+
h("div", { key: '314c5b4c5bbc0d50041a66fdf474441ea418345a', class: 'LevelItemsWrapper' }, h("div", { key: 'ff1fb084aeb20319c36a3420e9eb8693ea81b144', style: { 'left': `${this.offset}px` }, class: `LevelItems ${this.isMobile ? 'Mobile' : ''}`, id: 'levelItems', ref: (el) => { this.levelsElement = el; } }, this.levels.map((level, idx) => {
|
|
247
|
+
return (h("div", { class: `Item ${this.selectedLevelId == level.id ? 'Active' : ''}`, onClick: this.onLevelClicked.bind(this, level) }, h("img", { alt: `Presentation Icon for ${level.presentation.displayName}`, class: "LevelImg", src: level.presentation.asset }), h("span", { class: "LevelName", title: level.presentation.displayName }, level.presentation.displayName), h("span", { class: "LevelPoints" }, idx == 0 ? '' : '>', level.firstEntryPoints, ' ', translate('points', this.language))));
|
|
248
|
+
}))),
|
|
249
|
+
h("div", { key: '8dae638ca436c7e747a0f737028588ee5d040edd', class: `SliderButton RightButton ${this.offset <= this.minOffset ? 'Disabled' : ''} ${this.isShowSliderButton ? '' : 'Hidden'}`, onClick: () => this.slideTo(MOVE_TO.slideToLeft) }, h("svg", { key: 'bba16b49668567aaa41beedd9ea461d256c6812d', fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '36a0b6f3ffe8b50ebea9a4ec1c01e3341c440949', "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" })))
|
|
250
|
+
]));
|
|
251
|
+
}
|
|
252
|
+
get host() { return getElement(this); }
|
|
253
|
+
static get watchers() { return {
|
|
254
|
+
"selectedLevelId": ["levelsChangedHandler"]
|
|
255
|
+
}; }
|
|
258
256
|
};
|
|
259
|
-
ElevateLevelList.style =
|
|
257
|
+
ElevateLevelList.style = ElevateLevelListStyle0;
|
|
260
258
|
|
|
261
259
|
const elevateLevelPresentationCss = ":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";
|
|
260
|
+
const ElevateLevelPresentationStyle0 = elevateLevelPresentationCss;
|
|
262
261
|
|
|
263
262
|
const ElevateLevelPresentation = class {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
263
|
+
constructor(hostRef) {
|
|
264
|
+
registerInstance(this, hostRef);
|
|
265
|
+
this.elevateLevel = undefined;
|
|
266
|
+
}
|
|
267
|
+
render() {
|
|
268
|
+
return h(Host, { key: '16d128717e716f7ca7d3bb77fc3a2e67209318b6' }, h("div", { key: '658657abdfc64844bd2af40562efe40385e1735a', class: "Row Desc" }, h("h3", { key: 'ec5871c2f810c8c120bf99510717381175bc1ef4' }, this.elevateLevel.presentation.displayName), h("p", { key: '865915c6eea90295238fb47eaa91c8f968199ca5' }, h("span", { key: '2b90c6c5d6957b73fc4a0f53d53da0ca023a4f0a', class: "TxtDesc", innerHTML: this.elevateLevel.presentation.description }))));
|
|
269
|
+
}
|
|
270
270
|
};
|
|
271
|
-
ElevateLevelPresentation.style =
|
|
272
|
-
|
|
273
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
274
|
-
return module = {
|
|
275
|
-
path: basedir,
|
|
276
|
-
exports: {},
|
|
277
|
-
require: function (path, base) {
|
|
278
|
-
return commonjsRequire();
|
|
279
|
-
}
|
|
280
|
-
}, fn(module, module.exports), module.exports;
|
|
281
|
-
}
|
|
271
|
+
ElevateLevelPresentation.style = ElevateLevelPresentationStyle0;
|
|
282
272
|
|
|
283
|
-
|
|
284
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
285
|
-
}
|
|
273
|
+
var browser = {exports: {}};
|
|
286
274
|
|
|
287
|
-
|
|
275
|
+
(function (module, exports) {
|
|
288
276
|
|
|
289
277
|
// ref: https://github.com/tc39/proposal-global
|
|
290
278
|
var getGlobal = function () {
|
|
@@ -309,130 +297,127 @@ if (global.fetch) {
|
|
|
309
297
|
exports.Headers = global.Headers;
|
|
310
298
|
exports.Request = global.Request;
|
|
311
299
|
exports.Response = global.Response;
|
|
312
|
-
});
|
|
300
|
+
}(browser, browser.exports));
|
|
301
|
+
|
|
302
|
+
const fetch$1 = browser.exports;
|
|
313
303
|
|
|
314
304
|
const elevateLevelsDataCss = ":host{display:block}";
|
|
305
|
+
const ElevateLevelsDataStyle0 = elevateLevelsDataCss;
|
|
315
306
|
|
|
316
307
|
const ElevateLevelsData = class {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
308
|
+
constructor(hostRef) {
|
|
309
|
+
registerInstance(this, hostRef);
|
|
310
|
+
this.elevateLevelsDataChange = createEvent(this, "elevateLevelsDataChange", 7);
|
|
311
|
+
this.scopeParams = undefined;
|
|
312
|
+
}
|
|
313
|
+
async componentWillRender() {
|
|
314
|
+
//load data
|
|
315
|
+
if (!this.scopeParams.endpoint) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const endpoint = this.scopeParams.endpoint;
|
|
319
|
+
let url = new URL(`${endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);
|
|
320
|
+
await fetch$1(url.href)
|
|
321
|
+
.then((res) => res.json())
|
|
322
|
+
.then((res) => {
|
|
323
|
+
const elevateLevels = res.data.sort((a, b) => {
|
|
324
|
+
return a.firstEntryPoints < b.firstEntryPoints ? -1 : 1;
|
|
325
|
+
});
|
|
326
|
+
let selectedLevelId = this.scopeParams.selectedLevelId;
|
|
327
|
+
// if selected level is not set, set first(basic) as default
|
|
328
|
+
if (!selectedLevelId && this.scopeParams.showDefault && elevateLevels.length > 0) {
|
|
329
|
+
selectedLevelId = elevateLevels[0].id;
|
|
330
|
+
}
|
|
331
|
+
if (selectedLevelId) {
|
|
332
|
+
// get current level by name
|
|
333
|
+
const currentLevel = elevateLevels.filter((item) => {
|
|
334
|
+
return item.id == selectedLevelId;
|
|
335
|
+
})[0];
|
|
336
|
+
this.elevateLevelsDataChange.emit({ currentLevel: currentLevel });
|
|
337
|
+
}
|
|
338
|
+
this.elevateLevelsDataChange.emit({ 'clearError': true });
|
|
339
|
+
this.elevateLevelsDataChange.emit({ 'elevateLevels': elevateLevels });
|
|
340
|
+
}).catch((err) => {
|
|
341
|
+
this.elevateLevelsDataChange.emit({ errorMessage: { type: 'errorWhenLoadElevateLevels', err } });
|
|
342
|
+
console.error(err);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
353
345
|
};
|
|
354
|
-
ElevateLevelsData.style =
|
|
346
|
+
ElevateLevelsData.style = ElevateLevelsDataStyle0;
|
|
355
347
|
|
|
356
348
|
const mergeTranslations = (url, target) => {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
349
|
+
return new Promise((resolve) => {
|
|
350
|
+
fetch(url)
|
|
351
|
+
.then((res) => res.json())
|
|
352
|
+
.then((data) => {
|
|
353
|
+
Object.keys(data).forEach((item) => {
|
|
354
|
+
target[item] = target[item] ? target[item] : {};
|
|
355
|
+
for (let key in data[item]) {
|
|
356
|
+
target[item][key] = data[item][key];
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
resolve(true);
|
|
360
|
+
});
|
|
368
361
|
});
|
|
369
|
-
});
|
|
370
362
|
};
|
|
371
363
|
|
|
372
364
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
365
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
373
366
|
|
|
374
367
|
const GeneralStylingWrapper = class {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
.
|
|
400
|
-
.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
promises.push(translationPromise);
|
|
427
|
-
}
|
|
428
|
-
return await Promise.all(promises);
|
|
429
|
-
}
|
|
430
|
-
render() {
|
|
431
|
-
return (h("div", { class: "StyleShell" }, h("slot", { name: "mainContent" })));
|
|
432
|
-
}
|
|
433
|
-
get el() { return getElement(this); }
|
|
368
|
+
constructor(hostRef) {
|
|
369
|
+
registerInstance(this, hostRef);
|
|
370
|
+
this.stylingAppends = false;
|
|
371
|
+
this.setClientStyling = () => {
|
|
372
|
+
let sheet = document.createElement('style');
|
|
373
|
+
sheet.innerHTML = this.clientStyling;
|
|
374
|
+
this.el.prepend(sheet);
|
|
375
|
+
};
|
|
376
|
+
this.setClientStylingURL = () => {
|
|
377
|
+
let url = new URL(this.clientStylingUrl);
|
|
378
|
+
let cssFile = document.createElement('style');
|
|
379
|
+
fetch(url.href)
|
|
380
|
+
.then((res) => res.text())
|
|
381
|
+
.then((data) => {
|
|
382
|
+
cssFile.innerHTML = data;
|
|
383
|
+
setTimeout(() => {
|
|
384
|
+
this.el.prepend(cssFile);
|
|
385
|
+
}, 1);
|
|
386
|
+
})
|
|
387
|
+
.catch((err) => {
|
|
388
|
+
console.log('error ', err);
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
this.clientStyling = '';
|
|
392
|
+
this.clientStylingUrl = '';
|
|
393
|
+
this.translationUrl = '';
|
|
394
|
+
this.targetTranslations = undefined;
|
|
395
|
+
}
|
|
396
|
+
componentDidRender() {
|
|
397
|
+
// start custom styling area
|
|
398
|
+
if (!this.stylingAppends) {
|
|
399
|
+
if (this.clientStyling)
|
|
400
|
+
this.setClientStyling();
|
|
401
|
+
if (this.clientStylingUrl)
|
|
402
|
+
this.setClientStylingURL();
|
|
403
|
+
this.stylingAppends = true;
|
|
404
|
+
}
|
|
405
|
+
// end custom styling area
|
|
406
|
+
}
|
|
407
|
+
async componentWillLoad() {
|
|
408
|
+
const promises = [];
|
|
409
|
+
if (this.translationUrl) {
|
|
410
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
411
|
+
promises.push(translationPromise);
|
|
412
|
+
}
|
|
413
|
+
return await Promise.all(promises);
|
|
414
|
+
}
|
|
415
|
+
render() {
|
|
416
|
+
return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
417
|
+
}
|
|
418
|
+
get el() { return getElement(this); }
|
|
434
419
|
};
|
|
435
|
-
GeneralStylingWrapper.style =
|
|
420
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
436
421
|
|
|
437
422
|
/**
|
|
438
423
|
* @name startOfDay
|
|
@@ -619,335 +604,320 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
619
604
|
}
|
|
620
605
|
|
|
621
606
|
function updateProgressSvg(progressElementRef, percent) {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
607
|
+
const svgElement = progressElementRef.querySelector('#total_level');
|
|
608
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
609
|
+
//Total Widget of the progress
|
|
610
|
+
const barWidth = svgElement.getBBox().width;
|
|
611
|
+
//The filled width according to current progress
|
|
612
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
613
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
614
|
+
//update bar's width, widthOnBar
|
|
615
|
+
const levelBar = progressElementRef.querySelector('#current_level');
|
|
616
|
+
//update filters, x = widthOnBar
|
|
617
|
+
const levelFilter = progressElementRef.querySelector('#filter_current_level');
|
|
618
|
+
//update circle, widthOnBar+10
|
|
619
|
+
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
620
|
+
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
621
|
+
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
622
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
623
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
624
|
+
//update lock location
|
|
625
|
+
const endLockElement = progressElementRef.querySelector('#lock');
|
|
626
|
+
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
627
|
+
const filter1 = progressElementRef.querySelector('#filter_heart_ball');
|
|
628
|
+
// ball in endlockfilter2_i_305_23
|
|
629
|
+
const filter2 = progressElementRef.querySelector('#filter_ball');
|
|
630
|
+
// heart in endlockfilter3_d_305_23
|
|
631
|
+
const filter3 = progressElementRef.querySelector('#filter_heart');
|
|
632
|
+
//wrapper of lockfilter4_d_305_23
|
|
633
|
+
const filterLock = progressElementRef.querySelector('#filter_lock');
|
|
634
|
+
// shadow of ball paint0_linear_305_23
|
|
635
|
+
const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
|
|
636
|
+
//paint in lockpaint1_linear_305_23
|
|
637
|
+
const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
|
|
638
|
+
// box of lock and heart, for move position dynamically
|
|
639
|
+
const lockBox = progressElementRef.querySelector('#lock_box');
|
|
640
|
+
const heartBox = progressElementRef.querySelector('#heart_box');
|
|
641
|
+
const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
|
|
642
|
+
//set cx of lockElement
|
|
643
|
+
endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
|
|
644
|
+
//set cx of sub Elements
|
|
645
|
+
paint1.setAttribute('x1', `${cxOfEndLockEle}`);
|
|
646
|
+
paint1.setAttribute('x2', `${cxOfEndLockEle}`);
|
|
647
|
+
paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
|
|
648
|
+
paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
|
|
649
|
+
filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
650
|
+
filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
|
|
651
|
+
filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
|
|
652
|
+
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
653
|
+
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
654
|
+
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
655
|
+
svgElement.parentElement.style.opacity = '1';
|
|
671
656
|
}
|
|
672
657
|
|
|
673
|
-
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
|
|
658
|
+
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 rgba(0, 0, 0, 0.2509803922);\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}";
|
|
659
|
+
const PlayerElevateCardDataStyle0 = playerElevateCardDataCss;
|
|
674
660
|
|
|
675
661
|
const PlayerElevateCardData = class {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}
|
|
715
|
-
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
716
|
-
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
717
|
-
? -1
|
|
718
|
-
: 1;
|
|
719
|
-
});
|
|
720
|
-
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
721
|
-
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
722
|
-
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
723
|
-
if (daysToExpried == 0) {
|
|
724
|
-
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
725
|
-
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
726
|
-
}
|
|
727
|
-
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
728
|
-
expirationPoints: aboutToExpire.points,
|
|
729
|
-
expireDay: daysToExpried,
|
|
730
|
-
});
|
|
731
|
-
return pointExpireInfoAsString;
|
|
732
|
-
}
|
|
733
|
-
loadPlayerLevelInfo() {
|
|
734
|
-
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
735
|
-
return new Promise((resolve, reject) => {
|
|
736
|
-
return fetch(url.href, {
|
|
737
|
-
method: 'GET',
|
|
738
|
-
headers: {
|
|
739
|
-
'X-Sessionid': this.params.session,
|
|
740
|
-
'Content-Type': 'application/json',
|
|
741
|
-
},
|
|
742
|
-
})
|
|
743
|
-
.then((res) => res.json())
|
|
744
|
-
.then((res) => {
|
|
745
|
-
var _a, _b, _c;
|
|
746
|
-
if (!res.success) {
|
|
747
|
-
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
748
|
-
reject(true);
|
|
749
|
-
return;
|
|
662
|
+
constructor(hostRef) {
|
|
663
|
+
registerInstance(this, hostRef);
|
|
664
|
+
this.playerElevateLeveLoaded = createEvent(this, "playerElevateLeveLoaded", 7);
|
|
665
|
+
this.params = undefined;
|
|
666
|
+
this.playerElevateLevel = undefined;
|
|
667
|
+
this.pointExpireString = undefined;
|
|
668
|
+
}
|
|
669
|
+
handleWindowResizs() {
|
|
670
|
+
this.initLevelProgressbar();
|
|
671
|
+
}
|
|
672
|
+
onParamsChanged() {
|
|
673
|
+
this.loadElevateInfo();
|
|
674
|
+
}
|
|
675
|
+
onRedeemClick() {
|
|
676
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
677
|
+
}
|
|
678
|
+
loadLevels() {
|
|
679
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
|
|
680
|
+
return new Promise((resolve, reject) => {
|
|
681
|
+
return fetch(url.href, {
|
|
682
|
+
method: 'GET',
|
|
683
|
+
})
|
|
684
|
+
.then((res) => res.json())
|
|
685
|
+
.then((res) => {
|
|
686
|
+
this.levels = res.data;
|
|
687
|
+
resolve(true);
|
|
688
|
+
})
|
|
689
|
+
.catch((err) => {
|
|
690
|
+
reject(err);
|
|
691
|
+
});
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
calcuatePointsToBeExpired(walletTotalInfo) {
|
|
695
|
+
let pointExpireInfoAsString = '';
|
|
696
|
+
if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
|
|
697
|
+
walletTotalInfo.aboutToExpire.length == 0 ||
|
|
698
|
+
walletTotalInfo.aboutToExpire[0].points <= 0) {
|
|
699
|
+
return pointExpireInfoAsString;
|
|
750
700
|
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
756
|
-
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
757
|
-
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
758
|
-
this.playerElevateLeveLoaded.emit({
|
|
759
|
-
elevateLevelWalletTotal: spendableTotal,
|
|
760
|
-
loyaltyWalletTotal
|
|
701
|
+
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
702
|
+
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
703
|
+
? -1
|
|
704
|
+
: 1;
|
|
761
705
|
});
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
});
|
|
706
|
+
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
707
|
+
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
708
|
+
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
709
|
+
if (daysToExpried == 0) {
|
|
710
|
+
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
711
|
+
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
769
712
|
}
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
713
|
+
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
714
|
+
expirationPoints: aboutToExpire.points,
|
|
715
|
+
expireDay: daysToExpried,
|
|
716
|
+
});
|
|
717
|
+
return pointExpireInfoAsString;
|
|
718
|
+
}
|
|
719
|
+
loadPlayerLevelInfo() {
|
|
720
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
721
|
+
return new Promise((resolve, reject) => {
|
|
722
|
+
return fetch(url.href, {
|
|
723
|
+
method: 'GET',
|
|
724
|
+
headers: {
|
|
725
|
+
'X-Sessionid': this.params.session,
|
|
726
|
+
'Content-Type': 'application/json',
|
|
727
|
+
},
|
|
728
|
+
})
|
|
729
|
+
.then((res) => res.json())
|
|
730
|
+
.then((res) => {
|
|
731
|
+
var _a, _b, _c;
|
|
732
|
+
if (!res.success) {
|
|
733
|
+
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
734
|
+
reject(true);
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
let playerElevateInfo = res.data;
|
|
738
|
+
this.playerElevateLevel = playerElevateInfo.level;
|
|
739
|
+
this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
|
|
740
|
+
this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
|
|
741
|
+
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
742
|
+
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
743
|
+
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
744
|
+
this.playerElevateLeveLoaded.emit({
|
|
745
|
+
elevateLevelWalletTotal: spendableTotal,
|
|
746
|
+
loyaltyWalletTotal
|
|
747
|
+
});
|
|
748
|
+
let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
|
|
749
|
+
let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
|
|
750
|
+
if (spExpireInfoAsString || xpExpireInfoAsString) {
|
|
751
|
+
this.playerElevateLeveLoaded.emit({
|
|
752
|
+
pointExpireString: spExpireInfoAsString,
|
|
753
|
+
xpExpireString: xpExpireInfoAsString
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
resolve(this.playerElevateLevel);
|
|
757
|
+
})
|
|
758
|
+
.catch((err) => {
|
|
759
|
+
console.log('error ', err);
|
|
760
|
+
reject(true);
|
|
761
|
+
});
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
setLoyaltyProgress(percent) {
|
|
765
|
+
updateProgressSvg(this.loyaltyProgressEle, percent);
|
|
766
|
+
}
|
|
767
|
+
initLevelProgressbar() {
|
|
768
|
+
setTimeout(() => {
|
|
769
|
+
this.loyaltyProgressEle =
|
|
770
|
+
this.elevateCardRef.parentElement.querySelector('#LevelProgress');
|
|
771
|
+
if (!this.loyaltyProgressEle) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
775
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
776
|
+
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
777
|
+
}, 80);
|
|
778
|
+
}
|
|
779
|
+
componentDidRender() {
|
|
780
|
+
this.initLevelProgressbar();
|
|
781
|
+
}
|
|
782
|
+
loadElevateInfo() {
|
|
783
|
+
if (!this.params.endpoint || !this.params.session) {
|
|
784
|
+
return;
|
|
819
785
|
}
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
786
|
+
const promises = [];
|
|
787
|
+
promises.push(this.loadPlayerLevelInfo());
|
|
788
|
+
if (this.params.calculateLevelFlag) {
|
|
789
|
+
promises.push(this.loadLevels());
|
|
790
|
+
}
|
|
791
|
+
Promise.all(promises).then((res) => {
|
|
792
|
+
console.log('elevate-init', res);
|
|
793
|
+
this.initLevelProgressbar();
|
|
794
|
+
if (!this.levels) {
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
797
|
+
this.levels.sort((level1, level2) => {
|
|
798
|
+
return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
|
|
799
|
+
});
|
|
800
|
+
const playerPoints = this.playerElevateLevel.loyaltyPoints;
|
|
801
|
+
let playerLevelNumber = 0;
|
|
802
|
+
this.levels.forEach((elevateLevel, idx) => {
|
|
803
|
+
if (playerPoints > elevateLevel.firstEntryPoints) {
|
|
804
|
+
playerLevelNumber = idx;
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
this.playerElevateLeveLoaded.emit({
|
|
808
|
+
calculatedLevelFlag: playerLevelNumber,
|
|
809
|
+
});
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
componentWillLoad() {
|
|
813
|
+
this.loadElevateInfo();
|
|
814
|
+
}
|
|
815
|
+
get elevateCardRef() { return getElement(this); }
|
|
816
|
+
static get watchers() { return {
|
|
817
|
+
"params": ["onParamsChanged"]
|
|
818
|
+
}; }
|
|
833
819
|
};
|
|
834
|
-
PlayerElevateCardData.style =
|
|
820
|
+
PlayerElevateCardData.style = PlayerElevateCardDataStyle0;
|
|
835
821
|
|
|
836
822
|
const playerElevateLevelCss = ":host{display:block}.PlayerElevateCard{height:160px;width:100%;overflow:hidden}.ElevateLevelsInfo{background-color:var(--emw--color-background, #e6e8ea)}";
|
|
823
|
+
const PlayerElevateLevelStyle0 = playerElevateLevelCss;
|
|
837
824
|
|
|
838
825
|
const PlayerElevateLevel = class {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
this.userLevelId = event.detail['elevateLevel'].id;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
render() {
|
|
864
|
-
return h(Host, null, h("div", { class: 'PlayerElevateCard' }, h("player-elevate-loyaltycard", { playerName: this.playerName, dateFormat: this.dateFormat, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, clientStyling: `${this.clientStyling} .Outer{height: 185px}`, endpoint: this.endpoint, language: this.language, session: this.session })), h("div", { class: 'ElevateLevelsInfo' }, h("bonus-elevate-levels", { selectedLevelId: this.userLevelId, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint })), h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
|
|
865
|
-
}
|
|
826
|
+
constructor(hostRef) {
|
|
827
|
+
registerInstance(this, hostRef);
|
|
828
|
+
this.endpoint = undefined;
|
|
829
|
+
this.session = undefined;
|
|
830
|
+
this.playerAvatarUrl = undefined;
|
|
831
|
+
this.language = undefined;
|
|
832
|
+
this.playerName = undefined;
|
|
833
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
834
|
+
this.clientStyling = '';
|
|
835
|
+
this.clientStylingUrl = '';
|
|
836
|
+
this.translationUrl = '';
|
|
837
|
+
this.userLevelId = undefined;
|
|
838
|
+
}
|
|
839
|
+
async setPlayerElevateLevelInfo(event) {
|
|
840
|
+
if (event.type == 'playerElevateLeveLoaded' && event.detail['elevateLevel']) {
|
|
841
|
+
this.userLevelId = event.detail['elevateLevel'].id;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
render() {
|
|
845
|
+
return h(Host, { key: '8ff544f13c2709a4f5314e0c4e190ca70d9732ff' }, h("div", { key: '90c75c6283ab1b7b83f5b9af8b163853852a5636', class: 'PlayerElevateCard' }, h("player-elevate-loyaltycard", { key: 'be1ab26bc44443547364a64cc31e6bac42e8ba8e', playerName: this.playerName, dateFormat: this.dateFormat, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, clientStyling: `${this.clientStyling} .Outer{height: 185px}`, endpoint: this.endpoint, language: this.language, session: this.session })), h("div", { key: 'd868908d61b3320a4c3751eab8cf8cdbd98c41c4', class: 'ElevateLevelsInfo' }, h("bonus-elevate-levels", { key: '715bc9c3d15e1ac07f4fc75217beeaa48875ec63', selectedLevelId: this.userLevelId, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, translationUrl: this.translationUrl, language: this.language, endpoint: this.endpoint })), h("general-styling-wrapper", { key: '0e40a6825499a6c44e04dadce2079d995ecb2702', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl }));
|
|
846
|
+
}
|
|
866
847
|
};
|
|
867
|
-
PlayerElevateLevel.style =
|
|
848
|
+
PlayerElevateLevel.style = PlayerElevateLevelStyle0;
|
|
868
849
|
|
|
869
|
-
const playerElevateLoyaltycardCss = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo{width:100%}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emfe-w-color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emfe-w-elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emfe-w-elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .
|
|
850
|
+
const playerElevateLoyaltycardCss = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo{width:100%}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emfe-w-color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emfe-w-elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emfe-w-elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emfe-w-color-black, #000);opacity:0.8;font-weight:bold}";
|
|
851
|
+
const PlayerElevateLoyaltycardStyle0 = playerElevateLoyaltycardCss;
|
|
870
852
|
|
|
871
853
|
const PlayerElevateLoyaltycard = class {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
}
|
|
938
|
-
return '';
|
|
939
|
-
}
|
|
940
|
-
render() {
|
|
941
|
-
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
942
|
-
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
943
|
-
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$1, 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("div", { class: 'CardCell ElevateLevel' }, h("span", { class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), h(PlayerPoints, { loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), this.pointExpireString && (h("div", { class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h(PlayerLoyaltyProcess, null), h("div", { class: "Row NextLevelTip" }, this.getNextLevelTips()), this.playerElevateLevel.expireTime && (h("div", { class: "Row CardCell ExpirationDate Txt" }, translate$1('expireOn', this.language), h("span", { class: "ExpireTime" }, format(new Date(this.playerElevateLevel.expireTime), this.dateFormat || 'yyyy-MM-dd'))))))))))));
|
|
944
|
-
}
|
|
945
|
-
static get watchers() { return {
|
|
946
|
-
"session": ["onSessionOrEndpointChange"],
|
|
947
|
-
"endpoint": ["onSessionOrEndpointChange"],
|
|
948
|
-
"language": ["onSessionOrEndpointChange"]
|
|
949
|
-
}; }
|
|
854
|
+
constructor(hostRef) {
|
|
855
|
+
registerInstance(this, hostRef);
|
|
856
|
+
this.endpoint = undefined;
|
|
857
|
+
this.theme = 'Dark';
|
|
858
|
+
this.session = undefined;
|
|
859
|
+
this.playerAvatarUrl = undefined;
|
|
860
|
+
this.language = 'en';
|
|
861
|
+
this.playerName = undefined;
|
|
862
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
863
|
+
this.clientStyling = '';
|
|
864
|
+
this.clientStylingUrl = '';
|
|
865
|
+
this.translationUrl = '';
|
|
866
|
+
this.pointExpireString = undefined;
|
|
867
|
+
this.playerElevateLevel = undefined;
|
|
868
|
+
this.elevateWalletTotal = undefined;
|
|
869
|
+
}
|
|
870
|
+
onSessionOrEndpointChange() {
|
|
871
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
872
|
+
}
|
|
873
|
+
playerElevateLeveLoadedHandler(event) {
|
|
874
|
+
if (!event.detail) {
|
|
875
|
+
return;
|
|
876
|
+
}
|
|
877
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
878
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
879
|
+
}
|
|
880
|
+
if (event.detail['elevateLevel']) {
|
|
881
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
882
|
+
}
|
|
883
|
+
if (event.detail['pointExpireString']) {
|
|
884
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
onRedeemClick() {
|
|
888
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
889
|
+
}
|
|
890
|
+
componentWillLoad() {
|
|
891
|
+
this.paramProxy = {
|
|
892
|
+
endpoint: this.endpoint,
|
|
893
|
+
session: this.session,
|
|
894
|
+
language: this.language,
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
getNextLevelTips() {
|
|
898
|
+
var _a;
|
|
899
|
+
//need xx to reach Diamond
|
|
900
|
+
let nextLevel = (_a = this.playerElevateLevel) === null || _a === void 0 ? void 0 : _a.nextLevel;
|
|
901
|
+
if (this.playerElevateLevel && nextLevel) {
|
|
902
|
+
const pointsToReach = (nextLevel.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
903
|
+
return translateWithParams('tipsForNextLevel', {
|
|
904
|
+
pointsToReach,
|
|
905
|
+
levelName: nextLevel.name,
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
return '';
|
|
909
|
+
}
|
|
910
|
+
render() {
|
|
911
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
912
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
913
|
+
return (h("div", { key: 'd32d09786bf66e0abef026482e7ea04a53c051b1', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: 'dd2685eb840341b8823f24db9b72d0f6b7d340ae', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '3e2a00d1697c89441a8254cb81c6dc72e5b9f534', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '56221e6d50df3b09c4269000637818009807c994', params: this.paramProxy }), h("div", { key: 'f11201024b280d6beb2ce1978ebfa7f2c7c59678', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '948a023268fad3945b5069686eb29312111042a2', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: 'de7c52faa07386949ce1ca728968534922e9d880' }, h("div", { key: '7c1a0c6ea5dbe7ee2375813b3819efa61e283232', class: "PlayerImg" }, h(PlayerAvatar, { key: '70ae13ee168c6de7bf4618f6ab8761462c8812b2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: 'c11f916999b52e43e04ee472b0f54691012409a5', class: `LevelInfo ${this.playerElevateLevel.name}` }, h(PlayerElevateLoyaltyLevel, { key: '6aa61d117b24f9abbee9c5d33e882d6f023f205b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerPoints, { key: '7cc02e34d4682c25095dbf6a3077b314410d8093', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), this.pointExpireString && (h("div", { key: '793e388644891e15b32e003ac8914e57e758e86b', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h(PlayerLoyaltyProcess, { key: 'a4f6c3b9f9cd5e8c6a025c26154702f9495bbe5b' }), h("div", { key: 'd91eda0f963ba9ffd481237f4b16bd4ef638d25e', class: "NextLevelTip" }, this.getNextLevelTips())))))))));
|
|
914
|
+
}
|
|
915
|
+
static get watchers() { return {
|
|
916
|
+
"session": ["onSessionOrEndpointChange"],
|
|
917
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
918
|
+
"language": ["onSessionOrEndpointChange"]
|
|
919
|
+
}; }
|
|
950
920
|
};
|
|
951
|
-
PlayerElevateLoyaltycard.style =
|
|
921
|
+
PlayerElevateLoyaltycard.style = PlayerElevateLoyaltycardStyle0;
|
|
952
922
|
|
|
953
923
|
export { BonusElevateLevels as bonus_elevate_levels, ElevateLevelList as elevate_level_list, ElevateLevelPresentation as elevate_level_presentation, ElevateLevelsData as elevate_levels_data, GeneralStylingWrapper as general_styling_wrapper, PlayerElevateCardData as player_elevate_card_data, PlayerElevateLevel as player_elevate_level, PlayerElevateLoyaltycard as player_elevate_loyaltycard };
|