@everymatrix/player-elevate-points-history 1.44.0 → 1.45.2
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-pagination-limits_6.cjs.entry.js +769 -931
- package/dist/cjs/index-c769d3e9.js +1651 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/{player-elevate-card-items-574f7423.js → player-elevate-card-items-e7f7d092.js} +171 -285
- package/dist/cjs/player-elevate-card.cjs.entry.js +59 -70
- package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +66 -77
- package/dist/cjs/player-elevate-points-history.cjs.js +17 -11
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/player-elevate-points-history/index.js +1 -0
- package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.css +4 -4
- package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.js +389 -396
- package/dist/collection/renders/renderTabs.js +7 -9
- package/dist/collection/renders/renderTopBar.js +4 -12
- package/dist/collection/renders/renderWallets.js +27 -38
- package/dist/collection/utils/business.js +12 -12
- package/dist/collection/utils/fetch.js +13 -13
- package/dist/collection/utils/translation.js +32 -32
- package/dist/collection/utils/types.js +3 -3
- package/dist/collection/utils/util.js +12 -12
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-pagination-limits_6.entry.js +769 -931
- package/dist/esm/index-e7bde614.js +1621 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/{player-elevate-card-items-2bf82f60.js → player-elevate-card-items-4cabbcc6.js} +172 -285
- package/dist/esm/player-elevate-card.entry.js +59 -70
- package/dist/esm/player-elevate-loyaltycard.entry.js +66 -77
- package/dist/esm/player-elevate-points-history.js +14 -11
- package/dist/player-elevate-points-history/p-0f3449ca.entry.js +1 -0
- package/dist/player-elevate-points-history/p-212a0bb7.entry.js +1 -0
- package/dist/player-elevate-points-history/p-8a361039.js +1 -0
- package/dist/player-elevate-points-history/p-9e0ee722.entry.js +1 -0
- package/dist/player-elevate-points-history/p-e1255160.js +1 -0
- package/dist/player-elevate-points-history/p-f547f5dc.js +2 -0
- package/dist/player-elevate-points-history/player-elevate-points-history.esm.js +1 -1
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -26
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-elevate-points-history/index.d.ts +1 -0
- package/dist/types/components/player-elevate-points-history/player-elevate-points-history.d.ts +63 -63
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/translation.d.ts +33 -33
- package/dist/types/utils/types.d.ts +32 -32
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +14 -13
- package/dist/assets/back.svg +0 -3
- package/dist/assets/menu.svg +0 -5
- package/dist/cjs/index-974f5239.js +0 -1686
- package/dist/components/bonus-pagination-limits.js +0 -6
- package/dist/components/bonus-pagination-limits2.js +0 -111
- package/dist/components/bonus-pagination-nav.js +0 -6
- package/dist/components/bonus-pagination-nav2.js +0 -219
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -104
- 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 -636
- package/dist/components/player-elevate-card-items.js +0 -2250
- package/dist/components/player-elevate-card.js +0 -127
- package/dist/components/player-elevate-loyaltycard.js +0 -133
- package/dist/components/player-elevate-pointcard.js +0 -6
- package/dist/components/player-elevate-pointcard2.js +0 -133
- package/dist/components/player-elevate-points-history.d.ts +0 -11
- package/dist/components/player-elevate-points-history.js +0 -471
- package/dist/esm/index-18159ab2.js +0 -1657
- 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-points-history/p-2639efd0.js +0 -1
- package/dist/player-elevate-points-history/p-2d512640.entry.js +0 -1
- package/dist/player-elevate-points-history/p-3073cebd.js +0 -1
- package/dist/player-elevate-points-history/p-309d0acb.entry.js +0 -1
- package/dist/player-elevate-points-history/p-977d72c7.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-elevate-points-history/.stencil/packages/player-elevate-points-history/stencil.config.d.ts +0 -2
|
@@ -1,348 +1,309 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, 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$2, P as PlayerAvatar, b as translate$2, c as PlayerPoints } from './player-elevate-card-items-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, a as getAssetPath, F as Fragment } from './index-e7bde614.js';
|
|
2
|
+
import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, a as translateWithParams, T as TRANSLATIONS$2, P as PlayerAvatar, b as translate$2, c as PlayerPoints } from './player-elevate-card-items-4cabbcc6.js';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_LANGUAGE$1 = 'en';
|
|
5
5
|
const SUPPORTED_LANGUAGES$1 = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
6
6
|
const TRANSLATIONS$1 = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
en: {
|
|
8
|
+
"pageLimitLabel": 'Show',
|
|
9
|
+
},
|
|
10
|
+
hu: {
|
|
11
|
+
"pageLimitLabel": 'Show',
|
|
12
|
+
},
|
|
13
|
+
hr: {
|
|
14
|
+
"pageLimitLabel": 'Show',
|
|
15
|
+
},
|
|
16
|
+
"pt-br": {
|
|
17
|
+
"pageLimitLabel": 'Show',
|
|
18
|
+
},
|
|
19
|
+
"es-mx": {
|
|
20
|
+
"pageLimitLabel": 'Show',
|
|
21
|
+
}
|
|
22
22
|
};
|
|
23
23
|
const translate$1 = (key, customLang) => {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
const lang = customLang;
|
|
25
|
+
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const bonusPaginationLimitsCss = ":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";
|
|
29
|
+
const BonusPaginationLimitsStyle0 = bonusPaginationLimitsCss;
|
|
29
30
|
|
|
30
31
|
const BonusPaginationLimits = class {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* Translation via url
|
|
40
|
-
*/
|
|
41
|
-
this.translationUrl = '';
|
|
42
|
-
/**
|
|
43
|
-
* Default limit for per page, default: 10
|
|
44
|
-
*/
|
|
45
|
-
this.limit = 10;
|
|
46
|
-
this.pageLimits = [10, 25, 50];
|
|
47
|
-
}
|
|
48
|
-
onPageLimitClicked(pageLimit) {
|
|
49
|
-
this.limit = pageLimit;
|
|
50
|
-
this.pageLimitChanged.emit({ limit: this.limit });
|
|
51
|
-
}
|
|
52
|
-
componentWillLoad() {
|
|
53
|
-
if (!this.pageLimitOptions) {
|
|
54
|
-
return;
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
registerInstance(this, hostRef);
|
|
34
|
+
this.pageLimitChanged = createEvent(this, "pageLimitChanged", 7);
|
|
35
|
+
this.language = 'en';
|
|
36
|
+
this.translationUrl = '';
|
|
37
|
+
this.pageLimitOptions = undefined;
|
|
38
|
+
this.limit = 10;
|
|
39
|
+
this.pageLimits = [10, 25, 50];
|
|
55
40
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
61
|
-
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
62
|
-
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
63
|
-
// (as part of the example so far, this would be 5)
|
|
64
|
-
if (!this.pageLimits.includes(this.limit)) {
|
|
65
|
-
this.limit = this.pageLimits[0];
|
|
66
|
-
}
|
|
41
|
+
onPageLimitClicked(pageLimit) {
|
|
42
|
+
this.limit = pageLimit;
|
|
43
|
+
this.pageLimitChanged.emit({ limit: this.limit });
|
|
67
44
|
}
|
|
68
|
-
|
|
69
|
-
|
|
45
|
+
componentWillLoad() {
|
|
46
|
+
if (!this.pageLimitOptions) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
|
|
51
|
+
return parseInt(item);
|
|
52
|
+
});
|
|
53
|
+
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
54
|
+
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
55
|
+
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
56
|
+
// (as part of the example so far, this would be 5)
|
|
57
|
+
if (!this.pageLimits.includes(this.limit)) {
|
|
58
|
+
this.limit = this.pageLimits[0];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
console.error('Error when parse PageLimitOptions', e);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
renderStylingWrapper() {
|
|
66
|
+
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl });
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return h("div", { key: '57f5e61ee287f72d0427a2e4f646e37c6b9358b9', class: 'PaginationWrapper' }, h("span", { key: '5f82b19fcf269086659b3faa475d9967b2af57fa', class: 'NoOfItemsToDisplayMessage' }, translate$1('pageLimitLabel', this.language)), h("ul", { key: '559c2d5378a352691583567579a8e681d092ddd3', class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
70
|
+
return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
71
|
+
this.onPageLimitClicked(pageLimit);
|
|
72
|
+
} }, pageLimit));
|
|
73
|
+
})), h("general-styling-wrapper", { key: 'a8b9632e7421318e330f33b9c1cc9eb7121e35e9', targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
70
74
|
}
|
|
71
|
-
}
|
|
72
|
-
renderStylingWrapper() {
|
|
73
|
-
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl });
|
|
74
|
-
}
|
|
75
|
-
render() {
|
|
76
|
-
return h("div", { class: 'PaginationWrapper' }, h("span", { class: 'NoOfItemsToDisplayMessage' }, translate$1('pageLimitLabel', this.language)), h("ul", { class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
77
|
-
return (h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
78
|
-
this.onPageLimitClicked(pageLimit);
|
|
79
|
-
} }, pageLimit));
|
|
80
|
-
})), h("general-styling-wrapper", { targetTranslations: TRANSLATIONS$1, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
81
|
-
}
|
|
82
75
|
};
|
|
83
|
-
BonusPaginationLimits.style =
|
|
76
|
+
BonusPaginationLimits.style = BonusPaginationLimitsStyle0;
|
|
84
77
|
|
|
85
78
|
const DEFAULT_LANGUAGE = 'en';
|
|
86
79
|
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
87
80
|
const TRANSLATIONS = {
|
|
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
|
-
|
|
81
|
+
"en": {
|
|
82
|
+
"firstPage": '|<',
|
|
83
|
+
"lastPage": '>|',
|
|
84
|
+
"prePage": '<',
|
|
85
|
+
"nextPage": '>',
|
|
86
|
+
"pageOfTotal": '{start}-{end} of {total}',
|
|
87
|
+
},
|
|
88
|
+
"hu": {
|
|
89
|
+
"firstPage": 'First',
|
|
90
|
+
"lastPage": 'Last',
|
|
91
|
+
"prePage": '<',
|
|
92
|
+
"nextPage": '>',
|
|
93
|
+
"pageOfTotal": '{start}-{end} of {total}',
|
|
94
|
+
},
|
|
95
|
+
"hr": {
|
|
96
|
+
"firstPage": 'First',
|
|
97
|
+
"lastPage": 'Last',
|
|
98
|
+
"prePage": '<',
|
|
99
|
+
"nextPage": '>',
|
|
100
|
+
"pageOfTotal": '{start}-{end} of {total}',
|
|
101
|
+
},
|
|
102
|
+
"pt-br": {
|
|
103
|
+
"firstPage": 'First',
|
|
104
|
+
"lastPage": 'Last',
|
|
105
|
+
"prePage": '<',
|
|
106
|
+
"nextPage": '>',
|
|
107
|
+
"pageOfTotal": '{start}-{end} of {total}',
|
|
108
|
+
},
|
|
109
|
+
"es-mx": {
|
|
110
|
+
"firstPage": 'First',
|
|
111
|
+
"lastPage": 'Last',
|
|
112
|
+
"prePage": '<',
|
|
113
|
+
"nextPage": '>',
|
|
114
|
+
"pageOfTotal": '{start}-{end} of {total}',
|
|
115
|
+
}
|
|
123
116
|
};
|
|
124
117
|
const translate = (key, customLang, values) => {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
const lang = customLang;
|
|
119
|
+
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
120
|
+
if (values !== undefined) {
|
|
121
|
+
for (const [key, value] of Object.entries(values.values)) {
|
|
122
|
+
const regex = new RegExp(`{${key}}`, 'g');
|
|
123
|
+
translation = translation.replace(regex, value);
|
|
124
|
+
}
|
|
131
125
|
}
|
|
132
|
-
|
|
133
|
-
return translation;
|
|
126
|
+
return translation;
|
|
134
127
|
};
|
|
135
128
|
|
|
136
129
|
const bonusPaginationNavCss = ":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emfe-w-color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emfe-w-color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emfe-w-color-primary, #f5f1f1);background-color:var(--emfe-w-color-secondary, #8c8989);border-radius:0.3rem}";
|
|
130
|
+
const BonusPaginationNavStyle0 = bonusPaginationNavCss;
|
|
137
131
|
|
|
138
132
|
const BonusPaginationNav = class {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
* The table id, use to identify which table listen the page change message
|
|
156
|
-
* when there is more than 1 table on same page
|
|
157
|
-
*/
|
|
158
|
-
this.tableId = 'default';
|
|
159
|
-
/**
|
|
160
|
-
* Language
|
|
161
|
-
*/
|
|
162
|
-
this.language = 'en';
|
|
163
|
-
/**
|
|
164
|
-
* Translation via url
|
|
165
|
-
*/
|
|
166
|
-
this.translationUrl = '';
|
|
167
|
-
/**
|
|
168
|
-
* Customize pagination: Activate pagination arrows
|
|
169
|
-
*/
|
|
170
|
-
this.arrowsActive = true;
|
|
171
|
-
/**
|
|
172
|
-
* Customize pagination: Activate pagination secondary arrows
|
|
173
|
-
*/
|
|
174
|
-
this.secondaryArrowsActive = true;
|
|
175
|
-
/**
|
|
176
|
-
* Customize pagination: Activate pagination numbered navigation
|
|
177
|
-
*/
|
|
178
|
-
this.displayPageNumbers = true;
|
|
179
|
-
this.endPageIndex = 0;
|
|
180
|
-
this.currentPage = 1;
|
|
181
|
-
}
|
|
182
|
-
pageLimitChangedHandler(event) {
|
|
183
|
-
this.limit = event.detail.limit ? event.detail.limit : this.limit;
|
|
184
|
-
//reset offset = 0, this.currentPage = 1 when page limit changed
|
|
185
|
-
this.currentPage = 1;
|
|
186
|
-
this.offset = 0;
|
|
187
|
-
this.updatePageStatus();
|
|
188
|
-
if (event.type == 'pageLimitChanged') {
|
|
189
|
-
this.reloadPageEmitter.emit({ offset: 0, limit: this.limit, tableId: this.tableId });
|
|
133
|
+
constructor(hostRef) {
|
|
134
|
+
registerInstance(this, hostRef);
|
|
135
|
+
this.reloadPageEmitter = createEvent(this, "reloadPageByType", 7);
|
|
136
|
+
this.total = 1;
|
|
137
|
+
this.limit = 10;
|
|
138
|
+
this.offset = 0;
|
|
139
|
+
this.tableId = 'default';
|
|
140
|
+
this.language = 'en';
|
|
141
|
+
this.translationUrl = '';
|
|
142
|
+
this.arrowsActive = true;
|
|
143
|
+
this.secondaryArrowsActive = true;
|
|
144
|
+
this.displayPageNumbers = true;
|
|
145
|
+
this.displayRangeOfTotal = undefined;
|
|
146
|
+
this.endPageIndex = 0;
|
|
147
|
+
this.pagesArray = undefined;
|
|
148
|
+
this.currentPage = 1;
|
|
190
149
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
150
|
+
pageLimitChangedHandler(event) {
|
|
151
|
+
this.limit = event.detail.limit ? event.detail.limit : this.limit;
|
|
152
|
+
//reset offset = 0, this.currentPage = 1 when page limit changed
|
|
153
|
+
this.currentPage = 1;
|
|
154
|
+
this.offset = 0;
|
|
155
|
+
this.updatePageStatus();
|
|
156
|
+
if (event.type == 'pageLimitChanged') {
|
|
157
|
+
this.reloadPageEmitter.emit({ offset: 0, limit: this.limit, tableId: this.tableId });
|
|
158
|
+
}
|
|
195
159
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.goTo(page);
|
|
204
|
-
} }, page));
|
|
205
|
-
}));
|
|
206
|
-
}
|
|
207
|
-
renderStylingWrapper() {
|
|
208
|
-
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
209
|
-
}
|
|
210
|
-
updatePageStatus() {
|
|
211
|
-
this.endPageIndex = (Math.ceil(this.total / this.limit) - 1);
|
|
212
|
-
this.endPageIndex = this.endPageIndex < 0 ? this.endPageIndex = 0 : this.endPageIndex;
|
|
213
|
-
this.pagesArray = [];
|
|
214
|
-
if (this.endPageIndex < 5) {
|
|
215
|
-
this.pagesArray = Array.from({ length: this.endPageIndex + 1 }, (_, i) => i + 1);
|
|
160
|
+
goTo(step) {
|
|
161
|
+
if (step == '...' || step == 0 || parseInt(step.toString(), 10) > (this.endPageIndex + 1)) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this.currentPage = step;
|
|
165
|
+
let offset = (this.currentPage - 1) * this.limit;
|
|
166
|
+
this.reloadPageEmitter.emit({ offset, limit: this.limit, tableId: this.tableId });
|
|
216
167
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
this.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
168
|
+
renderPageList() {
|
|
169
|
+
return h("ul", { class: 'PaginationArea' }, this.pagesArray.map((page) => {
|
|
170
|
+
return (h("li", { class: `PageItem ${this.currentPage == page ? 'Active' : ''}`, onClick: () => {
|
|
171
|
+
this.goTo(page);
|
|
172
|
+
} }, page));
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
renderStylingWrapper() {
|
|
176
|
+
return h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
177
|
+
}
|
|
178
|
+
updatePageStatus() {
|
|
179
|
+
this.endPageIndex = (Math.ceil(this.total / this.limit) - 1);
|
|
180
|
+
this.endPageIndex = this.endPageIndex < 0 ? this.endPageIndex = 0 : this.endPageIndex;
|
|
181
|
+
this.pagesArray = [];
|
|
182
|
+
if (this.endPageIndex < 5) {
|
|
183
|
+
this.pagesArray = Array.from({ length: this.endPageIndex + 1 }, (_, i) => i + 1);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
/**
|
|
187
|
+
* Construct numbered navigation area based on current page position
|
|
188
|
+
*/
|
|
189
|
+
if (this.currentPage == 1 || this.currentPage == 2) {
|
|
190
|
+
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
191
|
+
this.pagesArray.push('...');
|
|
192
|
+
}
|
|
193
|
+
else if (this.currentPage >= 3 && ((this.endPageIndex - this.currentPage) >= 2)) {
|
|
194
|
+
this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
|
|
195
|
+
this.pagesArray.push('...');
|
|
196
|
+
this.pagesArray.unshift('...');
|
|
197
|
+
}
|
|
198
|
+
else if ((this.endPageIndex - this.currentPage) < 3) {
|
|
199
|
+
this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endPageIndex - 2 + i);
|
|
200
|
+
this.pagesArray.unshift('...');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
componentWillRender() {
|
|
205
|
+
this.currentPage = Math.floor(this.offset / this.limit) + 1;
|
|
206
|
+
this.updatePageStatus();
|
|
207
|
+
}
|
|
208
|
+
render() {
|
|
209
|
+
const startOffset = (this.currentPage - 1) * this.limit + 1;
|
|
210
|
+
const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
|
|
211
|
+
return h("div", { key: 'a6817c12f1e1e9960f8e91cfd5c5e2fa1ea72f7f', class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && h("span", { key: '8f7a16c5835147e2a83808f882a66a2463e3998e', class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
|
|
212
|
+
values: {
|
|
213
|
+
start: startOffset,
|
|
214
|
+
end: endOffset,
|
|
215
|
+
total: this.total
|
|
216
|
+
}
|
|
217
|
+
})), h("div", { key: 'ddc20a86777c2fde667ad8b75ab86f3bc72ccfdb', class: 'PageNavigation' }, this.arrowsActive &&
|
|
218
|
+
h("div", { key: 'ce2a45b8c0d6e32cfa3f1c5cc8b3c9ac58acc409', class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
219
|
+
this.goTo(1);
|
|
220
|
+
} }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
|
|
221
|
+
h("span", { key: '82dce028e4283dcac511b3b62823e87f2085f4b5', class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
222
|
+
this.goTo(this.currentPage - 1);
|
|
223
|
+
} }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
|
|
224
|
+
h("span", { key: 'a6ed748ce3e2555ac3d9d4bae174ad5bad0fabec', class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
|
|
225
|
+
this.goTo(this.currentPage + 1);
|
|
226
|
+
} }, translate('nextPage', this.language)), this.arrowsActive &&
|
|
227
|
+
h("div", { key: '60a81a86f11e2bb07ee93b61d6f367a11b0e2b6c', class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
228
|
+
this.goTo(this.endPageIndex + 1);
|
|
229
|
+
} }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
|
|
234
230
|
}
|
|
235
|
-
}
|
|
236
|
-
componentWillRender() {
|
|
237
|
-
this.currentPage = Math.floor(this.offset / this.limit) + 1;
|
|
238
|
-
this.updatePageStatus();
|
|
239
|
-
}
|
|
240
|
-
render() {
|
|
241
|
-
const startOffset = (this.currentPage - 1) * this.limit + 1;
|
|
242
|
-
const endOffset = this.currentPage * this.limit > this.total ? this.total : this.currentPage * this.limit;
|
|
243
|
-
return h("div", { class: 'PageNavigationWrapper' }, this.displayRangeOfTotal && this.total > 0 && h("span", { class: 'PageOfMessage' }, translate('pageOfTotal', this.language, {
|
|
244
|
-
values: {
|
|
245
|
-
start: startOffset,
|
|
246
|
-
end: endOffset,
|
|
247
|
-
total: this.total
|
|
248
|
-
}
|
|
249
|
-
})), h("div", { class: 'PageNavigation' }, this.arrowsActive &&
|
|
250
|
-
h("div", { class: `PageArrow FirstPage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
251
|
-
this.goTo(1);
|
|
252
|
-
} }, translate('firstPage', this.language)), this.secondaryArrowsActive &&
|
|
253
|
-
h("span", { class: `PageArrow PrePage ${this.currentPage == 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
254
|
-
this.goTo(this.currentPage - 1);
|
|
255
|
-
} }, translate('prePage', this.language)), this.displayPageNumbers && this.renderPageList(), this.secondaryArrowsActive &&
|
|
256
|
-
h("span", { class: `PageArrow NextPage ${this.currentPage == (this.endPageIndex + 1) ? 'Disabled' : ''}`, onClick: () => {
|
|
257
|
-
this.goTo(this.currentPage + 1);
|
|
258
|
-
} }, translate('nextPage', this.language)), this.arrowsActive &&
|
|
259
|
-
h("div", { class: `PageArrow LastPage ${this.currentPage == this.endPageIndex + 1 ? 'Disabled' : ''}`, onClick: () => {
|
|
260
|
-
this.goTo(this.endPageIndex + 1);
|
|
261
|
-
} }, " ", translate('lastPage', this.language), " "), this.renderStylingWrapper()));
|
|
262
|
-
}
|
|
263
231
|
};
|
|
264
|
-
BonusPaginationNav.style =
|
|
232
|
+
BonusPaginationNav.style = BonusPaginationNavStyle0;
|
|
265
233
|
|
|
266
234
|
const mergeTranslations = (url, target) => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
235
|
+
return new Promise((resolve) => {
|
|
236
|
+
fetch(url)
|
|
237
|
+
.then((res) => res.json())
|
|
238
|
+
.then((data) => {
|
|
239
|
+
Object.keys(data).forEach((item) => {
|
|
240
|
+
target[item] = target[item] ? target[item] : {};
|
|
241
|
+
for (let key in data[item]) {
|
|
242
|
+
target[item][key] = data[item][key];
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
resolve(true);
|
|
246
|
+
});
|
|
278
247
|
});
|
|
279
|
-
});
|
|
280
248
|
};
|
|
281
249
|
|
|
282
250
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
251
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
283
252
|
|
|
284
253
|
const GeneralStylingWrapper = class {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
.
|
|
310
|
-
.
|
|
311
|
-
|
|
312
|
-
setTimeout(() => {
|
|
313
|
-
this.el.prepend(cssFile);
|
|
314
|
-
}, 1);
|
|
315
|
-
})
|
|
316
|
-
.catch((err) => {
|
|
317
|
-
console.log('error ', err);
|
|
318
|
-
});
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
componentDidRender() {
|
|
322
|
-
// start custom styling area
|
|
323
|
-
if (!this.stylingAppends) {
|
|
324
|
-
if (this.clientStyling)
|
|
325
|
-
this.setClientStyling();
|
|
326
|
-
if (this.clientStylingUrl)
|
|
327
|
-
this.setClientStylingURL();
|
|
328
|
-
this.stylingAppends = true;
|
|
254
|
+
constructor(hostRef) {
|
|
255
|
+
registerInstance(this, hostRef);
|
|
256
|
+
this.stylingAppends = false;
|
|
257
|
+
this.setClientStyling = () => {
|
|
258
|
+
let sheet = document.createElement('style');
|
|
259
|
+
sheet.innerHTML = this.clientStyling;
|
|
260
|
+
this.el.prepend(sheet);
|
|
261
|
+
};
|
|
262
|
+
this.setClientStylingURL = () => {
|
|
263
|
+
let url = new URL(this.clientStylingUrl);
|
|
264
|
+
let cssFile = document.createElement('style');
|
|
265
|
+
fetch(url.href)
|
|
266
|
+
.then((res) => res.text())
|
|
267
|
+
.then((data) => {
|
|
268
|
+
cssFile.innerHTML = data;
|
|
269
|
+
setTimeout(() => {
|
|
270
|
+
this.el.prepend(cssFile);
|
|
271
|
+
}, 1);
|
|
272
|
+
})
|
|
273
|
+
.catch((err) => {
|
|
274
|
+
console.log('error ', err);
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
this.clientStyling = '';
|
|
278
|
+
this.clientStylingUrl = '';
|
|
279
|
+
this.translationUrl = '';
|
|
280
|
+
this.targetTranslations = undefined;
|
|
329
281
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
282
|
+
componentDidRender() {
|
|
283
|
+
// start custom styling area
|
|
284
|
+
if (!this.stylingAppends) {
|
|
285
|
+
if (this.clientStyling)
|
|
286
|
+
this.setClientStyling();
|
|
287
|
+
if (this.clientStylingUrl)
|
|
288
|
+
this.setClientStylingURL();
|
|
289
|
+
this.stylingAppends = true;
|
|
290
|
+
}
|
|
291
|
+
// end custom styling area
|
|
337
292
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
293
|
+
async componentWillLoad() {
|
|
294
|
+
const promises = [];
|
|
295
|
+
if (this.translationUrl) {
|
|
296
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
297
|
+
promises.push(translationPromise);
|
|
298
|
+
}
|
|
299
|
+
return await Promise.all(promises);
|
|
300
|
+
}
|
|
301
|
+
render() {
|
|
302
|
+
return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
303
|
+
}
|
|
304
|
+
get el() { return getElement(this); }
|
|
344
305
|
};
|
|
345
|
-
GeneralStylingWrapper.style =
|
|
306
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
346
307
|
|
|
347
308
|
/**
|
|
348
309
|
* @name startOfDay
|
|
@@ -529,705 +490,582 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
529
490
|
}
|
|
530
491
|
|
|
531
492
|
function updateProgressSvg(progressElementRef, percent) {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
493
|
+
const svgElement = progressElementRef.querySelector('#total_level');
|
|
494
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
495
|
+
//Total Widget of the progress
|
|
496
|
+
const barWidth = svgElement.getBBox().width;
|
|
497
|
+
//The filled width according to current progress
|
|
498
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
499
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
500
|
+
//update bar's width, widthOnBar
|
|
501
|
+
const levelBar = progressElementRef.querySelector('#current_level');
|
|
502
|
+
//update filters, x = widthOnBar
|
|
503
|
+
const levelFilter = progressElementRef.querySelector('#filter_current_level');
|
|
504
|
+
//update circle, widthOnBar+10
|
|
505
|
+
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
506
|
+
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
507
|
+
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
508
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
509
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
510
|
+
//update lock location
|
|
511
|
+
const endLockElement = progressElementRef.querySelector('#lock');
|
|
512
|
+
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
513
|
+
const filter1 = progressElementRef.querySelector('#filter_heart_ball');
|
|
514
|
+
// ball in endlockfilter2_i_305_23
|
|
515
|
+
const filter2 = progressElementRef.querySelector('#filter_ball');
|
|
516
|
+
// heart in endlockfilter3_d_305_23
|
|
517
|
+
const filter3 = progressElementRef.querySelector('#filter_heart');
|
|
518
|
+
//wrapper of lockfilter4_d_305_23
|
|
519
|
+
const filterLock = progressElementRef.querySelector('#filter_lock');
|
|
520
|
+
// shadow of ball paint0_linear_305_23
|
|
521
|
+
const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
|
|
522
|
+
//paint in lockpaint1_linear_305_23
|
|
523
|
+
const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
|
|
524
|
+
// box of lock and heart, for move position dynamically
|
|
525
|
+
const lockBox = progressElementRef.querySelector('#lock_box');
|
|
526
|
+
const heartBox = progressElementRef.querySelector('#heart_box');
|
|
527
|
+
const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
|
|
528
|
+
//set cx of lockElement
|
|
529
|
+
endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
|
|
530
|
+
//set cx of sub Elements
|
|
531
|
+
paint1.setAttribute('x1', `${cxOfEndLockEle}`);
|
|
532
|
+
paint1.setAttribute('x2', `${cxOfEndLockEle}`);
|
|
533
|
+
paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
|
|
534
|
+
paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
|
|
535
|
+
filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
536
|
+
filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
|
|
537
|
+
filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
|
|
538
|
+
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
539
|
+
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
540
|
+
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
541
|
+
svgElement.parentElement.style.opacity = '1';
|
|
581
542
|
}
|
|
582
543
|
|
|
583
|
-
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
|
|
544
|
+
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}";
|
|
545
|
+
const PlayerElevateCardDataStyle0 = playerElevateCardDataCss;
|
|
584
546
|
|
|
585
547
|
const PlayerElevateCardData = class {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
onParamsChanged() {
|
|
594
|
-
this.loadElevateInfo();
|
|
595
|
-
}
|
|
596
|
-
redeemGiftButtonHandler() {
|
|
597
|
-
this.loadElevateInfo();
|
|
598
|
-
}
|
|
599
|
-
onRedeemClick() {
|
|
600
|
-
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
601
|
-
}
|
|
602
|
-
loadLevels() {
|
|
603
|
-
let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
|
|
604
|
-
return new Promise((resolve, reject) => {
|
|
605
|
-
return fetch(url.href, {
|
|
606
|
-
method: 'GET',
|
|
607
|
-
})
|
|
608
|
-
.then((res) => res.json())
|
|
609
|
-
.then((res) => {
|
|
610
|
-
this.levels = res.data;
|
|
611
|
-
resolve(true);
|
|
612
|
-
})
|
|
613
|
-
.catch((err) => {
|
|
614
|
-
reject(err);
|
|
615
|
-
});
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
calcuatePointsToBeExpired(walletTotalInfo) {
|
|
619
|
-
let pointExpireInfoAsString = '';
|
|
620
|
-
if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
|
|
621
|
-
walletTotalInfo.aboutToExpire.length == 0 ||
|
|
622
|
-
walletTotalInfo.aboutToExpire[0].points <= 0) {
|
|
623
|
-
return pointExpireInfoAsString;
|
|
548
|
+
constructor(hostRef) {
|
|
549
|
+
registerInstance(this, hostRef);
|
|
550
|
+
this.playerElevateLeveLoaded = createEvent(this, "playerElevateLeveLoaded", 7);
|
|
551
|
+
this.params = undefined;
|
|
552
|
+
this.playerElevateLevel = undefined;
|
|
553
|
+
this.pointExpireString = undefined;
|
|
624
554
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
? -1
|
|
628
|
-
: 1;
|
|
629
|
-
});
|
|
630
|
-
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
631
|
-
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
632
|
-
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
633
|
-
if (daysToExpried == 0) {
|
|
634
|
-
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
635
|
-
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
555
|
+
handleWindowResizs() {
|
|
556
|
+
this.initLevelProgressbar();
|
|
636
557
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
558
|
+
onParamsChanged() {
|
|
559
|
+
this.loadElevateInfo();
|
|
560
|
+
}
|
|
561
|
+
onRedeemClick() {
|
|
562
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
563
|
+
}
|
|
564
|
+
loadLevels() {
|
|
565
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
|
|
566
|
+
return new Promise((resolve, reject) => {
|
|
567
|
+
return fetch(url.href, {
|
|
568
|
+
method: 'GET',
|
|
569
|
+
})
|
|
570
|
+
.then((res) => res.json())
|
|
571
|
+
.then((res) => {
|
|
572
|
+
this.levels = res.data;
|
|
573
|
+
resolve(true);
|
|
574
|
+
})
|
|
575
|
+
.catch((err) => {
|
|
576
|
+
reject(err);
|
|
577
|
+
});
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
calcuatePointsToBeExpired(walletTotalInfo) {
|
|
581
|
+
let pointExpireInfoAsString = '';
|
|
582
|
+
if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
|
|
583
|
+
walletTotalInfo.aboutToExpire.length == 0 ||
|
|
584
|
+
walletTotalInfo.aboutToExpire[0].points <= 0) {
|
|
585
|
+
return pointExpireInfoAsString;
|
|
660
586
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
666
|
-
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
667
|
-
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
668
|
-
this.playerElevateLeveLoaded.emit({
|
|
669
|
-
elevateLevelWalletTotal: spendableTotal,
|
|
670
|
-
loyaltyWalletTotal
|
|
587
|
+
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
588
|
+
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
589
|
+
? -1
|
|
590
|
+
: 1;
|
|
671
591
|
});
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
});
|
|
592
|
+
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
593
|
+
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
594
|
+
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
595
|
+
if (daysToExpried == 0) {
|
|
596
|
+
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
597
|
+
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
679
598
|
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
});
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
setLoyaltyProgress(percent) {
|
|
689
|
-
updateProgressSvg(this.loyaltyProgressEle, percent);
|
|
690
|
-
}
|
|
691
|
-
initLevelProgressbar() {
|
|
692
|
-
setTimeout(() => {
|
|
693
|
-
this.loyaltyProgressEle =
|
|
694
|
-
this.elevateCardRef.parentElement.querySelector('#LevelProgress');
|
|
695
|
-
if (!this.loyaltyProgressEle) {
|
|
696
|
-
return;
|
|
697
|
-
}
|
|
698
|
-
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
699
|
-
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
700
|
-
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
701
|
-
}, 80);
|
|
702
|
-
}
|
|
703
|
-
componentDidRender() {
|
|
704
|
-
this.initLevelProgressbar();
|
|
705
|
-
}
|
|
706
|
-
loadElevateInfo() {
|
|
707
|
-
if (!this.params.endpoint || !this.params.session) {
|
|
708
|
-
return;
|
|
599
|
+
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
600
|
+
expirationPoints: aboutToExpire.points,
|
|
601
|
+
expireDay: daysToExpried,
|
|
602
|
+
});
|
|
603
|
+
return pointExpireInfoAsString;
|
|
709
604
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
605
|
+
loadPlayerLevelInfo() {
|
|
606
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
607
|
+
return new Promise((resolve, reject) => {
|
|
608
|
+
return fetch(url.href, {
|
|
609
|
+
method: 'GET',
|
|
610
|
+
headers: {
|
|
611
|
+
'X-Sessionid': this.params.session,
|
|
612
|
+
'Content-Type': 'application/json',
|
|
613
|
+
},
|
|
614
|
+
})
|
|
615
|
+
.then((res) => res.json())
|
|
616
|
+
.then((res) => {
|
|
617
|
+
var _a, _b, _c;
|
|
618
|
+
if (!res.success) {
|
|
619
|
+
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
620
|
+
reject(true);
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
let playerElevateInfo = res.data;
|
|
624
|
+
this.playerElevateLevel = playerElevateInfo.level;
|
|
625
|
+
this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
|
|
626
|
+
this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
|
|
627
|
+
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
628
|
+
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
629
|
+
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
630
|
+
this.playerElevateLeveLoaded.emit({
|
|
631
|
+
elevateLevelWalletTotal: spendableTotal,
|
|
632
|
+
loyaltyWalletTotal
|
|
633
|
+
});
|
|
634
|
+
let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
|
|
635
|
+
let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
|
|
636
|
+
if (spExpireInfoAsString || xpExpireInfoAsString) {
|
|
637
|
+
this.playerElevateLeveLoaded.emit({
|
|
638
|
+
pointExpireString: spExpireInfoAsString,
|
|
639
|
+
xpExpireString: xpExpireInfoAsString
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
resolve(this.playerElevateLevel);
|
|
643
|
+
})
|
|
644
|
+
.catch((err) => {
|
|
645
|
+
console.log('error ', err);
|
|
646
|
+
reject(true);
|
|
647
|
+
});
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
setLoyaltyProgress(percent) {
|
|
651
|
+
updateProgressSvg(this.loyaltyProgressEle, percent);
|
|
652
|
+
}
|
|
653
|
+
initLevelProgressbar() {
|
|
654
|
+
setTimeout(() => {
|
|
655
|
+
this.loyaltyProgressEle =
|
|
656
|
+
this.elevateCardRef.parentElement.querySelector('#LevelProgress');
|
|
657
|
+
if (!this.loyaltyProgressEle) {
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
661
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
662
|
+
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
663
|
+
}, 80);
|
|
664
|
+
}
|
|
665
|
+
componentDidRender() {
|
|
666
|
+
this.initLevelProgressbar();
|
|
714
667
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
if (!this.levels) {
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
this.levels.sort((level1, level2) => {
|
|
722
|
-
return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
|
|
723
|
-
});
|
|
724
|
-
const playerPoints = this.playerElevateLevel.loyaltyPoints;
|
|
725
|
-
let playerLevelNumber = 0;
|
|
726
|
-
this.levels.forEach((elevateLevel, idx) => {
|
|
727
|
-
if (playerPoints > elevateLevel.firstEntryPoints) {
|
|
728
|
-
playerLevelNumber = idx;
|
|
668
|
+
loadElevateInfo() {
|
|
669
|
+
if (!this.params.endpoint || !this.params.session) {
|
|
670
|
+
return;
|
|
729
671
|
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
672
|
+
const promises = [];
|
|
673
|
+
promises.push(this.loadPlayerLevelInfo());
|
|
674
|
+
if (this.params.calculateLevelFlag) {
|
|
675
|
+
promises.push(this.loadLevels());
|
|
676
|
+
}
|
|
677
|
+
Promise.all(promises).then((res) => {
|
|
678
|
+
console.log('elevate-init', res);
|
|
679
|
+
this.initLevelProgressbar();
|
|
680
|
+
if (!this.levels) {
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
this.levels.sort((level1, level2) => {
|
|
684
|
+
return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
|
|
685
|
+
});
|
|
686
|
+
const playerPoints = this.playerElevateLevel.loyaltyPoints;
|
|
687
|
+
let playerLevelNumber = 0;
|
|
688
|
+
this.levels.forEach((elevateLevel, idx) => {
|
|
689
|
+
if (playerPoints > elevateLevel.firstEntryPoints) {
|
|
690
|
+
playerLevelNumber = idx;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
this.playerElevateLeveLoaded.emit({
|
|
694
|
+
calculatedLevelFlag: playerLevelNumber,
|
|
695
|
+
});
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
componentWillLoad() {
|
|
699
|
+
this.loadElevateInfo();
|
|
700
|
+
}
|
|
701
|
+
get elevateCardRef() { return getElement(this); }
|
|
702
|
+
static get watchers() { return {
|
|
703
|
+
"params": ["onParamsChanged"]
|
|
704
|
+
}; }
|
|
743
705
|
};
|
|
744
|
-
PlayerElevateCardData.style =
|
|
706
|
+
PlayerElevateCardData.style = PlayerElevateCardDataStyle0;
|
|
745
707
|
|
|
746
708
|
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}";
|
|
709
|
+
const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
|
|
747
710
|
|
|
748
711
|
const PlayerElevatePointcard = class {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
onSessionOrEndpointChange() {
|
|
787
|
-
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
788
|
-
}
|
|
789
|
-
playerElevateLeveLoadedHandler(event) {
|
|
790
|
-
if (!event.detail) {
|
|
791
|
-
return;
|
|
712
|
+
constructor(hostRef) {
|
|
713
|
+
registerInstance(this, hostRef);
|
|
714
|
+
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
715
|
+
this.endpoint = undefined;
|
|
716
|
+
this.theme = 'Dark';
|
|
717
|
+
this.session = undefined;
|
|
718
|
+
this.playerAvatarUrl = undefined;
|
|
719
|
+
this.language = 'en';
|
|
720
|
+
this.playerName = undefined;
|
|
721
|
+
this.cardTitle = undefined;
|
|
722
|
+
this.buttonType = 'earningRule';
|
|
723
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
724
|
+
this.clientStyling = '';
|
|
725
|
+
this.clientStylingUrl = '';
|
|
726
|
+
this.translationUrl = '';
|
|
727
|
+
this.pointExpireString = undefined;
|
|
728
|
+
this.playerElevateLevel = undefined;
|
|
729
|
+
this.elevateWalletTotal = undefined;
|
|
730
|
+
this.elevateSPTotal = undefined;
|
|
731
|
+
}
|
|
732
|
+
onSessionOrEndpointChange() {
|
|
733
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
734
|
+
}
|
|
735
|
+
playerElevateLeveLoadedHandler(event) {
|
|
736
|
+
if (!event.detail) {
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
740
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
741
|
+
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
742
|
+
}
|
|
743
|
+
if (event.detail['elevateLevel']) {
|
|
744
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
745
|
+
}
|
|
746
|
+
if (event.detail['pointExpireString']) {
|
|
747
|
+
this.pointExpireString = event.detail.pointExpireString;
|
|
748
|
+
}
|
|
792
749
|
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
750
|
+
onDetailsClick() {
|
|
751
|
+
window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
|
|
752
|
+
path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
|
|
796
753
|
}
|
|
797
|
-
|
|
798
|
-
|
|
754
|
+
componentWillLoad() {
|
|
755
|
+
this.paramProxy = {
|
|
756
|
+
endpoint: this.endpoint,
|
|
757
|
+
session: this.session,
|
|
758
|
+
language: this.language,
|
|
759
|
+
};
|
|
799
760
|
}
|
|
800
|
-
|
|
801
|
-
|
|
761
|
+
render() {
|
|
762
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
763
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
764
|
+
return (h("div", { key: '13461fc9cf8b777337a539c15da4bb2781f5a837', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '526e72c0ada871f74ba4a07f0a125bc25840c09c', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '95e358ceb8fa3c247660f7ca15a4684b132874be', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS$2, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '24c765d743446ac597a9dcc9cd22515e7e39e6db', params: this.paramProxy }), h("div", { key: '309db4bbfc244a7fb97827774d9d4383109ca0d7', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '9d5614ded2f73b505e60900675a7d95b3cfbcbc6', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '9a17e809083e61aad19f7ffef5d5ee5885ae8b4d' }, h("div", { key: '47068df3c0070ee2785b0d0201b08766fe0d71e8', class: "PlayerImg" }, h(PlayerAvatar, { key: '40115f8b190d871c85f9531fbf0bafb8fbd739e2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '278cd70c23ecb48655e90810af570ce5366d13d5', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: 'ce682ff881c5b12ed0b736ffcc67ad07b3713999', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate$2('spendablePoints')), h("div", { key: 'eeebc5c468cf6e3d566f708fd47a19956ad9defe', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: 'ad58990b7fa789cf2d5c524191447196e97c8a16', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: '0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c', class: "TC", onClick: () => {
|
|
765
|
+
this.onDetailsClick();
|
|
766
|
+
} }, translate$2('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '45c3267d390995fabe34974913adf97b112cf8c2', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
802
767
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
componentWillLoad() {
|
|
809
|
-
this.paramProxy = {
|
|
810
|
-
endpoint: this.endpoint,
|
|
811
|
-
session: this.session,
|
|
812
|
-
language: this.language,
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
render() {
|
|
816
|
-
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
817
|
-
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
818
|
-
return (h("div", { class: `ElevateCardWrapper ${this.theme}` }, h("div", { class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS$2, 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: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate$2('spendablePoints')), h("div", { class: 'PointsTxt SPPoints' }, h(PlayerPoints, { spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { class: "TC", onClick: () => {
|
|
819
|
-
this.onDetailsClick();
|
|
820
|
-
} }, translate$2('termAndConditions', this.language))), this.pointExpireString && (h("div", { class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
821
|
-
}
|
|
822
|
-
static get watchers() { return {
|
|
823
|
-
"session": ["onSessionOrEndpointChange"],
|
|
824
|
-
"endpoint": ["onSessionOrEndpointChange"],
|
|
825
|
-
"language": ["onSessionOrEndpointChange"]
|
|
826
|
-
}; }
|
|
768
|
+
static get watchers() { return {
|
|
769
|
+
"session": ["onSessionOrEndpointChange"],
|
|
770
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
771
|
+
"language": ["onSessionOrEndpointChange"]
|
|
772
|
+
}; }
|
|
827
773
|
};
|
|
828
|
-
PlayerElevatePointcard.style =
|
|
774
|
+
PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
|
|
829
775
|
|
|
830
776
|
var WalletType;
|
|
831
777
|
(function (WalletType) {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
778
|
+
WalletType["spendable"] = "spendable";
|
|
779
|
+
WalletType["loyalty"] = "loyalty";
|
|
780
|
+
WalletType["history"] = "history";
|
|
835
781
|
})(WalletType || (WalletType = {}));
|
|
836
782
|
|
|
837
783
|
const translation = {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
784
|
+
en: {
|
|
785
|
+
tabTitle: {
|
|
786
|
+
[WalletType.spendable]: 'Coins',
|
|
787
|
+
[WalletType.loyalty]: 'XP',
|
|
788
|
+
[WalletType.history]: 'Conversion History'
|
|
789
|
+
},
|
|
790
|
+
barTitle: {
|
|
791
|
+
[WalletType.spendable]: 'Coins History',
|
|
792
|
+
[WalletType.loyalty]: 'Experience Points History',
|
|
793
|
+
[WalletType.history]: 'Conversion History'
|
|
794
|
+
},
|
|
795
|
+
bonus: 'Bonus',
|
|
796
|
+
noContent: 'No Content',
|
|
797
|
+
redeem: 'Redeem',
|
|
798
|
+
reload: 'Reload',
|
|
799
|
+
reloadMsgWhenError: 'Network Problem, please ',
|
|
800
|
+
pointType: {
|
|
801
|
+
registration: 'Registration',
|
|
802
|
+
cancelledRegistration: 'Cancelled Registration',
|
|
803
|
+
expiredRegistration: 'Expired Registration',
|
|
804
|
+
manual: 'Manual',
|
|
805
|
+
cancelledManual: 'Cancelled Manual',
|
|
806
|
+
expiredManual: 'Expired Manual',
|
|
807
|
+
wageringByRealMoney: 'Real Money Wager',
|
|
808
|
+
wageringByBonusMoney: 'Bonus Money Wager',
|
|
809
|
+
cancelledWageringByRealMoney: 'Cancelled Real Money Wager',
|
|
810
|
+
cancelledWageringByBonusMoney: 'Cancelled Bonus Money Wager',
|
|
811
|
+
expiredWageringByRealMoney: 'Expired Real Money Wager',
|
|
812
|
+
expiredWageringByBonusMoney: 'Expired Bonus Money Wager',
|
|
813
|
+
levelExpired: 'Level Expiration',
|
|
814
|
+
bonus: 'Bonus Redeem',
|
|
815
|
+
}
|
|
869
816
|
}
|
|
870
|
-
}
|
|
871
817
|
};
|
|
872
818
|
|
|
873
819
|
const getUrl = (path, params = {}) => {
|
|
874
|
-
|
|
820
|
+
return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
|
|
875
821
|
};
|
|
876
822
|
const fetcher = async (input, init = {}) => {
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
823
|
+
let res;
|
|
824
|
+
// @ts-ignore
|
|
825
|
+
res = await fetch(input, init);
|
|
826
|
+
res = await res.text();
|
|
827
|
+
try {
|
|
828
|
+
res = JSON.parse(res);
|
|
829
|
+
}
|
|
830
|
+
catch (e) {
|
|
831
|
+
console.error(e);
|
|
832
|
+
throw e;
|
|
833
|
+
}
|
|
834
|
+
return res;
|
|
889
835
|
};
|
|
890
836
|
|
|
891
837
|
const getWallets = async (endpoint, language, type, session, pageSetting) => {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
838
|
+
const params = {
|
|
839
|
+
type,
|
|
840
|
+
language,
|
|
841
|
+
pagination: `offset=${pageSetting.offset},limit=${pageSetting.limit}`
|
|
842
|
+
};
|
|
843
|
+
const url = getUrl(endpoint + getUriByWalletType(params.type), params);
|
|
844
|
+
const res = await fetcher(url, {
|
|
845
|
+
headers: {
|
|
846
|
+
'x-SessionId': session
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
return res;
|
|
904
850
|
};
|
|
905
851
|
const getUriByWalletType = (type) => `/v1/elevate/${type == WalletType.history ? 'redeemHistory' : 'pointsHistory'}`;
|
|
906
852
|
|
|
907
853
|
const renderWallets = (locale, wallets, pageSetting) => wallets && (h(Fragment, null,
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
854
|
+
h("div", { class: "Records" }, wallets.map(wallet => (h("div", { class: "RecordContainer" },
|
|
855
|
+
h("div", { class: "Row" },
|
|
856
|
+
h("div", { class: "Title" }, locale.pointType[wallet.pointType] || wallet.pointType),
|
|
857
|
+
h("div", { class: `Amount ${getAmountConfig(wallet.points).class}` },
|
|
858
|
+
getAmountConfig(wallet.points).symbol,
|
|
859
|
+
wallet.points)),
|
|
860
|
+
wallet.payload && wallet.payload.displayName &&
|
|
861
|
+
h("div", { class: "Row Desc", innerHTML: wallet.payload.displayName['*'] }),
|
|
862
|
+
h("div", { class: "Row" },
|
|
863
|
+
h("div", { class: "DateTime" }, formatDate(new Date(wallet.modified)))))))),
|
|
864
|
+
h("div", { class: "PaginationContainer" },
|
|
865
|
+
h("bonus-pagination-nav", { offset: pageSetting.offset, limit: pageSetting.limit, displayPageNumbers: pageSetting.displayPageNumbers, tableId: pageSetting.tableId, secondaryArrowsActive: pageSetting.secondaryArrowsActive, total: pageSetting.total }))));
|
|
920
866
|
const getAmountConfig = (amount) => {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
867
|
+
if (amount > 0) {
|
|
868
|
+
return {
|
|
869
|
+
class: 'Positive',
|
|
870
|
+
symbol: '+'
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
else {
|
|
874
|
+
return {
|
|
875
|
+
class: 'Negative',
|
|
876
|
+
symbol: ''
|
|
877
|
+
};
|
|
878
|
+
}
|
|
933
879
|
};
|
|
934
880
|
const padTo2Digits = (num) => {
|
|
935
|
-
|
|
881
|
+
return num.toString().padStart(2, '0');
|
|
936
882
|
};
|
|
937
883
|
const formatDate = (date) => {
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
884
|
+
return ([
|
|
885
|
+
date.getFullYear(),
|
|
886
|
+
padTo2Digits(date.getMonth() + 1),
|
|
887
|
+
padTo2Digits(date.getDate()),
|
|
888
|
+
].join('-') +
|
|
889
|
+
' ' +
|
|
890
|
+
[
|
|
891
|
+
padTo2Digits(date.getHours()),
|
|
892
|
+
padTo2Digits(date.getMinutes()),
|
|
893
|
+
padTo2Digits(date.getSeconds()),
|
|
894
|
+
].join(':'));
|
|
949
895
|
};
|
|
950
896
|
|
|
951
|
-
const backSvg =
|
|
952
|
-
<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
953
|
-
</svg>
|
|
954
|
-
`;
|
|
897
|
+
const backSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDkgMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik03Ljc1IDFMMS4yNSA3LjVMNy43NSAxNCIgc3Ryb2tlPSIjMjQyNDI0IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
|
|
955
898
|
|
|
956
|
-
const menuSvg =
|
|
957
|
-
<circle cx="4" cy="4" r="4" fill="black"/>
|
|
958
|
-
<circle cx="15" cy="4" r="4" fill="black"/>
|
|
959
|
-
<circle cx="26" cy="4" r="4" fill="black"/>
|
|
960
|
-
</svg>
|
|
961
|
-
`;
|
|
899
|
+
const menuSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDMwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9IjQiIGN5PSI0IiByPSI0IiBmaWxsPSJibGFjayIvPgo8Y2lyY2xlIGN4PSIxNSIgY3k9IjQiIHI9IjQiIGZpbGw9ImJsYWNrIi8+CjxjaXJjbGUgY3g9IjI2IiBjeT0iNCIgcj0iNCIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==';
|
|
962
900
|
|
|
963
901
|
const renderTopBar = (locale, type, pageSetting) => h("div", { class: "TopBarContainer" },
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
902
|
+
h("div", { class: "BackImageContainer" },
|
|
903
|
+
h("span", { class: "BackImage", innerHTML: backSvg })),
|
|
904
|
+
h("div", { class: "TitleContainer" },
|
|
905
|
+
h("div", { class: "Title", title: locale.barTitle[type] }, locale.barTitle[type]),
|
|
906
|
+
h("div", { class: 'Limits' },
|
|
907
|
+
h("bonus-pagination-limits", { pageLimitOptions: pageSetting.pageLimitOptions, limit: pageSetting.limit }))),
|
|
908
|
+
h("div", null,
|
|
909
|
+
h("span", { class: "MenuImage", innerHTML: menuSvg })));
|
|
972
910
|
|
|
973
911
|
const renderTabs = (locale, type, onChangeTab) => h("div", { class: "Tabs Row" }, Object.keys(WalletType).map(key => {
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
912
|
+
const isActive = key === type;
|
|
913
|
+
const cssActive = isActive ? 'active' : '';
|
|
914
|
+
return (h("div", null,
|
|
915
|
+
h("div", { class: `TabText ${cssActive}`, onClick: () => {
|
|
916
|
+
onChangeTab(key);
|
|
917
|
+
} }, locale.tabTitle[key]),
|
|
918
|
+
h("div", { class: `TabBorderBottom ${cssActive}` })));
|
|
981
919
|
}));
|
|
982
920
|
|
|
983
|
-
var
|
|
921
|
+
var GeneralAnimationLoadingCczQRHih = {};
|
|
984
922
|
|
|
985
|
-
function
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
exports: {},
|
|
989
|
-
require: function (path, base) {
|
|
990
|
-
return commonjsRequire();
|
|
991
|
-
}
|
|
992
|
-
}, fn(module, module.exports), module.exports;
|
|
993
|
-
}
|
|
923
|
+
(function (exports) {
|
|
924
|
+
var V=Object.defineProperty,z=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var x=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))G.call(t,n)&&x(e,n,t[n]);if(N)for(var n of N(t))q.call(t,n)&&x(e,n,t[n]);return e},M=(e,t)=>z(e,F(t));var $=(e,t,n)=>x(e,typeof t!="symbol"?t+"":t,n);var T=(e,t,n)=>new Promise((s,l)=>{var i=o=>{try{u(n.next(o));}catch(r){l(r);}},c=o=>{try{u(n.throw(o));}catch(r){l(r);}},u=o=>o.done?s(o.value):Promise.resolve(o.value).then(i,c);u((n=n.apply(e,t)).next());});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _(){}function H(e){return e()}function B(){return Object.create(null)}function b(e){e.forEach(H);}function I(e){return typeof e=="function"}function K(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Q(e){return Object.keys(e).length===0}function W(e,t){e.appendChild(t);}function X(e,t,n){const s=Y(e);if(!s.getElementById(t)){const l=L("style");l.id=t,l.textContent=n,Z(s,l);}}function Y(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Z(e,t){return W(e.head||e,t),t.sheet}function U(e,t,n){e.insertBefore(t,n||null);}function C(e){e.parentNode&&e.parentNode.removeChild(e);}function L(e){return document.createElement(e)}function tt(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n);}function et(e){return Array.from(e.childNodes)}function nt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0;}),t}let j;function g(e){j=e;}const h=[],k=[];let p=[];const R=[],it=Promise.resolve();let v=!1;function st(){v||(v=!0,it.then(y));}function E(e){p.push(e);}const w=new Set;let a=0;function y(){if(a!==0)return;const e=j;do{try{for(;a<h.length;){const t=h[a];a++,g(t),rt(t.$$);}}catch(t){throw h.length=0,a=0,t}for(g(null),h.length=0,a=0;k.length;)k.pop()();for(let t=0;t<p.length;t+=1){const n=p[t];w.has(n)||(w.add(n),n());}p.length=0;}while(h.length);for(;R.length;)R.pop()();v=!1,w.clear(),g(e);}function rt(e){if(e.fragment!==null){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(E);}}function lt(e){const t=[],n=[];p.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),p=t;}const ct=new Set;function ot(e,t){e&&e.i&&(ct.delete(e),e.i(t));}function ut(e,t,n){const{fragment:s,after_update:l}=e.$$;s&&s.m(t,n),E(()=>{const i=e.$$.on_mount.map(H).filter(I);e.$$.on_destroy?e.$$.on_destroy.push(...i):b(i),e.$$.on_mount=[];}),l.forEach(E);}function dt(e,t){const n=e.$$;n.fragment!==null&&(lt(n.after_update),b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[]);}function $t(e,t){e.$$.dirty[0]===-1&&(h.push(e),st(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31;}function ft(e,t,n,s,l,i,c=null,u=[-1]){const o=j;g(e);const r=e.$$={fragment:null,ctx:[],props:i,update:_,not_equal:l,bound:B(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(o?o.$$.context:[])),callbacks:B(),dirty:u,skip_bound:!1,root:t.target||o.$$.root};c&&c(r.root);let f=!1;if(r.ctx=n?n(e,t.props||{},(d,O,...S)=>{const A=S.length?S[0]:O;return r.ctx&&l(r.ctx[d],r.ctx[d]=A)&&(!r.skip_bound&&r.bound[d]&&r.bound[d](A),f&&$t(e,d)),O}):[],r.update(),f=!0,b(r.before_update),r.fragment=s?s(r.ctx):!1,t.target){if(t.hydrate){const d=et(t.target);r.fragment&&r.fragment.l(d),d.forEach(C);}else r.fragment&&r.fragment.c();t.intro&&ot(e.$$.fragment),ut(e,t.target,t.anchor),y();}g(o);}let D;typeof HTMLElement=="function"&&(D=class extends HTMLElement{constructor(t,n,s){super();$(this,"$$ctor");$(this,"$$s");$(this,"$$c");$(this,"$$cn",!1);$(this,"$$d",{});$(this,"$$r",!1);$(this,"$$p_d",{});$(this,"$$l",{});$(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,s&&this.attachShadow({mode:"open"});}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const l=this.$$c.$on(t,n);this.$$l_u.set(n,l);}super.addEventListener(t,n,s);}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n));}}connectedCallback(){return T(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return ()=>{let c;return {c:function(){c=L("slot"),i!=="default"&&tt(c,"name",i);},m:function(r,f){U(r,c,f);},d:function(r){r&&C(c);}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=nt(this);for(const i of this.$$s)i in s&&(n[i]=[t(i)]);for(const i of this.attributes){const c=this.$$g_p(i.name);c in this.$$d||(this.$$d[c]=m(c,i.value,this.$$p_d,"toProp"));}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:M(P({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const l=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const c=m(i,this.$$d[i],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,c);}this.$$r=!1;};this.$$c.$$.after_update.push(l),l();for(const i in this.$$l)for(const c of this.$$l[i]){const u=this.$$c.$on(i,c);this.$$l_u.set(c,u);}this.$$l={};}})}attributeChangedCallback(t,n,s){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=m(t,s,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[t]:this.$$d[t]}));}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0);});}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function m(e,t,n,s){var i;const l=(i=n[e])==null?void 0:i.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(l){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function at(e,t,n,s,l,i){let c=class extends D{constructor(){super(e,n,l),this.$$p_d=t;}static get observedAttributes(){return Object.keys(t).map(u=>(t[u].attribute||u).toLowerCase())}};return Object.keys(t).forEach(u=>{Object.defineProperty(c.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(o){var r;o=m(u,o,t),this.$$d[u]=o,(r=this.$$c)==null||r.$set({[u]:o});}});}),s.forEach(u=>{Object.defineProperty(c.prototype,u,{get(){var o;return (o=this.$$c)==null?void 0:o[u]}});}),e.element=c,c}class ht{constructor(){$(this,"$$");$(this,"$$set");}$destroy(){dt(this,1),this.$destroy=_;}$on(t,n){if(!I(n))return _;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const l=s.indexOf(n);l!==-1&&s.splice(l,1);}}$set(t){this.$$set&&!Q(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}}const _t="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_t);function pt(e){X(e,"svelte-gnt082",".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}");}function gt(e){let t;return {c(){t=L("div"),t.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>';},m(n,s){U(n,t,s),e[3](t);},p:_,i:_,o:_,d(n){n&&C(t),e[3](null);}}}function mt(e,t,n){let{clientstyling:s=""}=t,{clientstylingurl:l=""}=t,i;const c=()=>{let r=document.createElement("style");r.innerHTML=s,i.appendChild(r);},u=()=>{let r=new URL(l),f=document.createElement("style");fetch(r.href).then(d=>d.text()).then(d=>{f.innerHTML=d,setTimeout(()=>{i.appendChild(f);},1),setTimeout(()=>{},500);});};function o(r){k[r?"unshift":"push"](()=>{i=r,n(0,i);});}return e.$$set=r=>{"clientstyling"in r&&n(1,s=r.clientstyling),"clientstylingurl"in r&&n(2,l=r.clientstylingurl);},e.$$.update=()=>{e.$$.dirty&3&&s&&i&&c(),e.$$.dirty&5&&l&&i&&u();},[i,s,l,o]}class J extends ht{constructor(t){super(),ft(this,t,mt,gt,K,{clientstyling:1,clientstylingurl:2},pt);}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),y();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),y();}}at(J,{clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=J;
|
|
925
|
+
}(GeneralAnimationLoadingCczQRHih));
|
|
994
926
|
|
|
995
|
-
function
|
|
996
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
997
|
-
}
|
|
998
|
-
|
|
999
|
-
createCommonjsModule(function (module, exports) {
|
|
1000
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e);}function s(t){return "function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e,n){t.insertBefore(e,n||null);}function r(t){t.parentNode&&t.parentNode.removeChild(t);}function c(t){const e={};for(const n of t)e[n.name]=n.value;return e}let a;function d(t){a=t;}const u=[],f=[];let p=[];const h=[],$=Promise.resolve();let m=!1;function g(t){p.push(t);}
|
|
1001
|
-
// flush() calls callbacks in this order:
|
|
1002
|
-
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
1003
|
-
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
1004
|
-
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
1005
|
-
// for afterUpdates called during the initial onMount, which are called in
|
|
1006
|
-
// reverse order: children before parents.
|
|
1007
|
-
// Since callbacks might update component values, which could trigger another
|
|
1008
|
-
// call to flush(), the following steps guard against this:
|
|
1009
|
-
// 1. During beforeUpdate, any updated components will be added to the
|
|
1010
|
-
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
1011
|
-
// the flush index is kept outside the function, the reentrant call will pick
|
|
1012
|
-
// up where the earlier call left off and go through all dirty components. The
|
|
1013
|
-
// current_component value is saved and restored so that the reentrant call will
|
|
1014
|
-
// not interfere with the "parent" flush() call.
|
|
1015
|
-
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
1016
|
-
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
1017
|
-
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
1018
|
-
// function, guarantees this behavior.
|
|
1019
|
-
const y=new Set;let b=0;// Do *not* move this inside the flush() function
|
|
1020
|
-
function x(){
|
|
1021
|
-
// Do not reenter flush while dirty components are updated, as this can
|
|
1022
|
-
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
1023
|
-
// Reentrancy is ok afterwards for bindings etc.
|
|
1024
|
-
if(0!==b)return;const t=a;do{
|
|
1025
|
-
// first, call beforeUpdate functions
|
|
1026
|
-
// and update components
|
|
1027
|
-
try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
|
|
1028
|
-
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
1029
|
-
throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
|
|
1030
|
-
// then, once components are updated, call
|
|
1031
|
-
// afterUpdate functions. This may cause
|
|
1032
|
-
// subsequent updates...
|
|
1033
|
-
for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
|
|
1034
|
-
// ...so guard against infinite loops
|
|
1035
|
-
y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
|
|
1036
|
-
/**
|
|
1037
|
-
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
1038
|
-
*/const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
1039
|
-
// TODO null out other refs, including component.$$ (but need to
|
|
1040
|
-
// preserve final state?)
|
|
1041
|
-
n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
|
|
1042
|
-
// state
|
|
1043
|
-
props:p,update:t,not_equal:f,bound:n(),
|
|
1044
|
-
// lifecycle
|
|
1045
|
-
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
|
|
1046
|
-
// everything else
|
|
1047
|
-
callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
|
|
1048
|
-
// `false` as a special case of no DOM component
|
|
1049
|
-
y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
|
|
1050
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1051
|
-
y.fragment&&y.fragment.l(t),t.forEach(r);}else
|
|
1052
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1053
|
-
y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
|
|
1054
|
-
// onMount happens before the initial afterUpdate
|
|
1055
|
-
g((()=>{const n=t.$$.on_mount.map(e).filter(s);
|
|
1056
|
-
// if the component was destroyed immediately
|
|
1057
|
-
// it will update the `$$.on_destroy` reference to `null`.
|
|
1058
|
-
// the destructured on_destroy may still reference to the old array
|
|
1059
|
-
t.$$.on_destroy?t.$$.on_destroy.push(...n):
|
|
1060
|
-
// Edge case - component was destroyed immediately,
|
|
1061
|
-
// most likely as a result of a binding initialising
|
|
1062
|
-
i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
|
|
1063
|
-
/* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
|
|
1064
|
-
function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
|
|
1065
|
-
/*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
|
|
1066
|
-
/*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
|
|
1067
|
-
// @ts-ignore todo: improve typings
|
|
1068
|
-
for(const t in this.$$.slotted)
|
|
1069
|
-
// @ts-ignore todo: improve typings
|
|
1070
|
-
this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
|
|
1071
|
-
// TODO should this delegate to addEventListener?
|
|
1072
|
-
if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
|
|
1073
|
-
//# sourceMappingURL=general-animation-loading.js.map
|
|
1074
|
-
});
|
|
927
|
+
if(typeof window!="undefined"){let n=function(t){return function(...i){try{return t.apply(this,i)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return !1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>GeneralAnimationLoadingCczQRHih).then(({default:t})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",t.element);});}
|
|
1075
928
|
|
|
1076
|
-
const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px
|
|
929
|
+
const playerElevatePointsHistoryCss = ":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.2509803922);border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px rgba(0, 0, 0, 0.1019607843);border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px rgba(0, 0, 0, 0.2509803922)}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
930
|
+
const PlayerElevatePointsHistoryStyle0 = playerElevatePointsHistoryCss;
|
|
1077
931
|
|
|
1078
932
|
const PlayerElevatePointsHistory = class {
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
this.language = 'en';
|
|
1098
|
-
/**
|
|
1099
|
-
* Client custom styling via string
|
|
1100
|
-
*/
|
|
1101
|
-
this.clientStyling = '';
|
|
1102
|
-
/**
|
|
1103
|
-
* Client custom styling via url
|
|
1104
|
-
*/
|
|
1105
|
-
this.clientStylingUrl = '';
|
|
1106
|
-
/**
|
|
1107
|
-
* translation via url
|
|
1108
|
-
*/
|
|
1109
|
-
this.translationUrl = '';
|
|
1110
|
-
this.locale = translation['en'];
|
|
1111
|
-
this.type = WalletType.spendable;
|
|
1112
|
-
this.pointsWallets = {};
|
|
1113
|
-
}
|
|
1114
|
-
switchTab(type) {
|
|
1115
|
-
var _a, _b;
|
|
1116
|
-
this.type = type;
|
|
1117
|
-
if (this.pointsWallets[type] || !((_a = this.pointsWallets[type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)) {
|
|
1118
|
-
return;
|
|
933
|
+
constructor(hostRef) {
|
|
934
|
+
registerInstance(this, hostRef);
|
|
935
|
+
this.paginationReset = createEvent(this, "paginationReset", 7);
|
|
936
|
+
this.playerAvatarUrl = undefined;
|
|
937
|
+
this.session = undefined;
|
|
938
|
+
this.endpoint = undefined;
|
|
939
|
+
this.limit = undefined;
|
|
940
|
+
this.secondaryArrowsActive = true;
|
|
941
|
+
this.displayPageNumbers = false;
|
|
942
|
+
this.pageLimitOptions = '10,25,50';
|
|
943
|
+
this.language = 'en';
|
|
944
|
+
this.clientStyling = '';
|
|
945
|
+
this.clientStylingUrl = '';
|
|
946
|
+
this.translationUrl = '';
|
|
947
|
+
this.locale = translation['en'];
|
|
948
|
+
this.type = WalletType.spendable;
|
|
949
|
+
this.pageSetting = undefined;
|
|
950
|
+
this.pointsWallets = {};
|
|
1119
951
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
pageLimitOptions: this.pageLimitOptions || undefined
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
loadWallets(renderer) {
|
|
1131
|
-
if (!this.pointsWallets[this.type] || this.pointsWallets[this.type].isLoading) {
|
|
1132
|
-
return h("general-animation-loading", null);
|
|
1133
|
-
}
|
|
1134
|
-
else {
|
|
1135
|
-
if (this.pointsWallets[this.type].wallets.length === 0) {
|
|
1136
|
-
return (h("div", { class: "NoContent" }, this.locale.noContent));
|
|
1137
|
-
}
|
|
1138
|
-
else {
|
|
1139
|
-
return renderer();
|
|
1140
|
-
}
|
|
952
|
+
switchTab(type) {
|
|
953
|
+
var _a, _b;
|
|
954
|
+
this.type = type;
|
|
955
|
+
if (this.pointsWallets[type] || !((_a = this.pointsWallets[type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)) {
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
this.paginationReset.emit({ limit: ((_b = this.pointsWallets[type]) === null || _b === void 0 ? void 0 : _b.pageSetting.limit) || this.limit, tableId: this.type });
|
|
1141
959
|
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
renderTopBar(this.locale, this.type, pageSetting),
|
|
1150
|
-
renderTabs(this.locale, this.type, (type) => this.switchTab(type)),
|
|
1151
|
-
((_a = this.pointsWallets[this.type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)
|
|
1152
|
-
? h("div", { class: 'ReloadMsg' }, this.locale['reloadMsgWhenError'], h("a", { class: 'Reload', onClick: () => { this.updateWallets(); } }, this.locale['reload']))
|
|
1153
|
-
: this.loadWallets(renderWallets.bind(this, this.locale, ((_b = this.pointsWallets[this.type]) === null || _b === void 0 ? void 0 : _b.wallets) || [], pageSetting))
|
|
1154
|
-
])));
|
|
1155
|
-
}
|
|
1156
|
-
walletTypeChangedHandler() {
|
|
1157
|
-
//do not reload when loaded tab switched back
|
|
1158
|
-
if (this.pointsWallets[this.type]) {
|
|
1159
|
-
return;
|
|
960
|
+
getPageSettingByType(type) {
|
|
961
|
+
return this.pointsWallets[type] ? this.pointsWallets[type].pageSetting : {
|
|
962
|
+
limit: this.limit, total: 0, offset: 0, tableId: type,
|
|
963
|
+
secondaryArrowsActive: this.secondaryArrowsActive,
|
|
964
|
+
displayPageNumbers: this.displayPageNumbers,
|
|
965
|
+
pageLimitOptions: this.pageLimitOptions || undefined
|
|
966
|
+
};
|
|
1160
967
|
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
pageSetting });
|
|
1174
|
-
this.pointsWallets = Object.assign({}, this.pointsWallets);
|
|
1175
|
-
}
|
|
1176
|
-
else {
|
|
1177
|
-
console.error(walletsDetail);
|
|
1178
|
-
this.pointsWallets[this.type].isLoadFailed = true;
|
|
1179
|
-
//pageSetting.total = 0;
|
|
1180
|
-
}
|
|
968
|
+
loadWallets(renderer) {
|
|
969
|
+
if (!this.pointsWallets[this.type] || this.pointsWallets[this.type].isLoading) {
|
|
970
|
+
return h("general-animation-loading", null);
|
|
971
|
+
}
|
|
972
|
+
else {
|
|
973
|
+
if (this.pointsWallets[this.type].wallets.length === 0) {
|
|
974
|
+
return (h("div", { class: "NoContent" }, this.locale.noContent));
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
return renderer();
|
|
978
|
+
}
|
|
979
|
+
}
|
|
1181
980
|
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
981
|
+
render() {
|
|
982
|
+
var _a, _b;
|
|
983
|
+
const pageSetting = this.getPageSettingByType(this.type);
|
|
984
|
+
return (h("main", { key: 'a92c0b154fec4d3ce8b8e919b9af5ebd80f1d125' }, h("general-styling-wrapper", { key: '5095ab265d71f9e74f6f049b7b0b212ae11bc4da', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl,
|
|
985
|
+
// @ts-ignore
|
|
986
|
+
targetTranslations: translation, translationUrl: this.translationUrl }), h("player-elevate-pointcard", { key: 'c471ddeccbe8e18e15935c9d106bf8c52c80a6fb', playerAvatarUrl: this.playerAvatarUrl, endpoint: this.endpoint, session: this.session, language: this.language, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), h("div", { key: '5fa700aaa6e0cffe6d3d9dd8366bf9a95bba3a14', class: "PlayerElevatePointsDetaisContainer" }, [
|
|
987
|
+
renderTopBar(this.locale, this.type, pageSetting),
|
|
988
|
+
renderTabs(this.locale, this.type, (type) => this.switchTab(type)),
|
|
989
|
+
((_a = this.pointsWallets[this.type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)
|
|
990
|
+
? h("div", { class: 'ReloadMsg' }, this.locale['reloadMsgWhenError'], h("a", { class: 'Reload', onClick: () => { this.updateWallets(); } }, this.locale['reload']))
|
|
991
|
+
: this.loadWallets(renderWallets.bind(this, this.locale, ((_b = this.pointsWallets[this.type]) === null || _b === void 0 ? void 0 : _b.wallets) || [], pageSetting))
|
|
992
|
+
])));
|
|
1185
993
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
994
|
+
walletTypeChangedHandler() {
|
|
995
|
+
//do not reload when loaded tab switched back
|
|
996
|
+
if (this.pointsWallets[this.type]) {
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
this.updateWallets();
|
|
1190
1000
|
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1001
|
+
async updateWallets() {
|
|
1002
|
+
let pageSetting = this.pointsWallets[this.type]
|
|
1003
|
+
? this.pointsWallets[this.type].pageSetting
|
|
1004
|
+
: this.getPageSettingByType(this.type);
|
|
1005
|
+
try {
|
|
1006
|
+
const walletsDetail = await getWallets(this.endpoint, this.language, this.type, this.session, pageSetting);
|
|
1007
|
+
const wallets = walletsDetail.data || [];
|
|
1008
|
+
if (walletsDetail.success) {
|
|
1009
|
+
pageSetting.total = walletsDetail.total;
|
|
1010
|
+
this.pointsWallets[this.type] = Object.assign(Object.assign({}, this.pointsWallets[this.type]), { wallets,
|
|
1011
|
+
pageSetting });
|
|
1012
|
+
this.pointsWallets = Object.assign({}, this.pointsWallets);
|
|
1013
|
+
}
|
|
1014
|
+
else {
|
|
1015
|
+
console.error(walletsDetail);
|
|
1016
|
+
this.pointsWallets[this.type].isLoadFailed = true;
|
|
1017
|
+
//pageSetting.total = 0;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
catch (e) {
|
|
1021
|
+
console.error(e);
|
|
1022
|
+
this.pointsWallets[this.type].isLoadFailed = true;
|
|
1023
|
+
}
|
|
1196
1024
|
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1025
|
+
reloadPageByTypeHandler(event) {
|
|
1026
|
+
if (event.detail.tableId != this.type) {
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
//reset all wallets when limit changed
|
|
1030
|
+
//otherwise fetch new data with new offset when offset changed
|
|
1031
|
+
if (this.limit != event.detail.limit) {
|
|
1032
|
+
this.pointsWallets = {};
|
|
1033
|
+
this.limit = event.detail.limit;
|
|
1034
|
+
}
|
|
1035
|
+
else {
|
|
1036
|
+
let pageSetting = this.pointsWallets[this.type].pageSetting || this.getPageSettingByType(this.type);
|
|
1037
|
+
pageSetting.offset = event.detail.offset;
|
|
1038
|
+
this.pointsWallets[this.type].pageSetting = pageSetting;
|
|
1039
|
+
}
|
|
1040
|
+
this.updateWallets();
|
|
1201
1041
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1042
|
+
setLimit() {
|
|
1043
|
+
try {
|
|
1044
|
+
const pageLimits = this.pageLimitOptions.split(',').map((item) => {
|
|
1045
|
+
return parseInt(item);
|
|
1046
|
+
});
|
|
1047
|
+
if (pageLimits.includes(this.limit)) ;
|
|
1048
|
+
else {
|
|
1049
|
+
this.limit = pageLimits[0];
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
catch (e) {
|
|
1053
|
+
console.error('Error when parse PageLimitOptions', e);
|
|
1054
|
+
this.limit = 10;
|
|
1055
|
+
}
|
|
1213
1056
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1057
|
+
async componentWillLoad() {
|
|
1058
|
+
this.setLimit();
|
|
1059
|
+
this.updateWallets();
|
|
1217
1060
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
"type": ["walletTypeChangedHandler"],
|
|
1226
|
-
"endpoint": ["updateWallets"],
|
|
1227
|
-
"language": ["updateWallets"],
|
|
1228
|
-
"session": ["updateWallets"]
|
|
1229
|
-
}; }
|
|
1061
|
+
static get assetsDirs() { return ["static"]; }
|
|
1062
|
+
static get watchers() { return {
|
|
1063
|
+
"type": ["walletTypeChangedHandler"],
|
|
1064
|
+
"endpoint": ["updateWallets"],
|
|
1065
|
+
"language": ["updateWallets"],
|
|
1066
|
+
"session": ["updateWallets"]
|
|
1067
|
+
}; }
|
|
1230
1068
|
};
|
|
1231
|
-
PlayerElevatePointsHistory.style =
|
|
1069
|
+
PlayerElevatePointsHistory.style = PlayerElevatePointsHistoryStyle0;
|
|
1232
1070
|
|
|
1233
1071
|
export { BonusPaginationLimits as bonus_pagination_limits, BonusPaginationNav as bonus_pagination_nav, GeneralStylingWrapper as general_styling_wrapper, PlayerElevateCardData as player_elevate_card_data, PlayerElevatePointcard as player_elevate_pointcard, PlayerElevatePointsHistory as player_elevate_points_history };
|