@everymatrix/player-elevate-card 1.69.2 → 1.69.3
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/general-styling-wrapper_6.cjs.entry.js +103 -30
- package/dist/cjs/{index-5e07cb40.js → index-81135df8.js} +11 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/player-elevate-card.cjs.js +2 -2
- package/dist/collection/components/player-elevate-card/player-elevate-card.js +19 -1
- package/dist/collection/components/player-elevate-card/player-elevate-card.stories.js +10 -6
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +2 -2
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +20 -2
- package/dist/collection/components/player-rakeback-card/player-rakeback-card.js +19 -1
- package/dist/esm/general-styling-wrapper_6.entry.js +103 -30
- package/dist/esm/{index-f1097e33.js → index-5e93d535.js} +11 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/player-elevate-card.js +3 -3
- package/dist/player-elevate-card/general-styling-wrapper_6.entry.js +1 -1
- package/dist/player-elevate-card/{index-f1097e33.js → index-5e93d535.js} +2 -2
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/types/components/player-elevate-card/player-elevate-card.d.ts +2 -0
- package/dist/types/components/player-elevate-pointcard/player-elevate-pointcard.d.ts +2 -0
- package/dist/types/components/player-rakeback-card/player-rakeback-card.d.ts +2 -0
- package/dist/types/components.d.ts +24 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-81135df8.js');
|
|
6
6
|
|
|
7
7
|
const mergeTranslations = (url, target) => {
|
|
8
8
|
return new Promise((resolve) => {
|
|
@@ -37,6 +37,63 @@ const mergeTranslations = (url, target) => {
|
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* @name setClientStyling
|
|
42
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
43
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
44
|
+
* @param {string} clientStyling The style content
|
|
45
|
+
*/
|
|
46
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
47
|
+
if (stylingContainer) {
|
|
48
|
+
const sheet = document.createElement('style');
|
|
49
|
+
sheet.innerHTML = clientStyling;
|
|
50
|
+
stylingContainer.appendChild(sheet);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @name setClientStylingURL
|
|
56
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
|
|
57
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
58
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
59
|
+
*/
|
|
60
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
61
|
+
const url = new URL(clientStylingUrl);
|
|
62
|
+
|
|
63
|
+
fetch(url.href)
|
|
64
|
+
.then((res) => res.text())
|
|
65
|
+
.then((data) => {
|
|
66
|
+
const cssFile = document.createElement('style');
|
|
67
|
+
cssFile.innerHTML = data;
|
|
68
|
+
if (stylingContainer) {
|
|
69
|
+
stylingContainer.appendChild(cssFile);
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
.catch((err) => {
|
|
73
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @name setStreamLibrary
|
|
79
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
80
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
81
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
82
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
83
|
+
*/
|
|
84
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
85
|
+
if (window.emMessageBus) {
|
|
86
|
+
const sheet = document.createElement('style');
|
|
87
|
+
|
|
88
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
89
|
+
sheet.innerHTML = data;
|
|
90
|
+
if (stylingContainer) {
|
|
91
|
+
stylingContainer.appendChild(sheet);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
40
97
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
41
98
|
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
42
99
|
|
|
@@ -44,38 +101,47 @@ const GeneralStylingWrapper = class {
|
|
|
44
101
|
constructor(hostRef) {
|
|
45
102
|
index.registerInstance(this, hostRef);
|
|
46
103
|
this.stylingAppends = false;
|
|
47
|
-
this.setClientStyling = () => {
|
|
48
|
-
let sheet = document.createElement('style');
|
|
49
|
-
sheet.innerHTML = this.clientStyling;
|
|
50
|
-
this.el.prepend(sheet);
|
|
51
|
-
};
|
|
52
|
-
this.setClientStylingURL = () => {
|
|
53
|
-
let url = new URL(this.clientStylingUrl);
|
|
54
|
-
let cssFile = document.createElement('style');
|
|
55
|
-
fetch(url.href)
|
|
56
|
-
.then((res) => res.text())
|
|
57
|
-
.then((data) => {
|
|
58
|
-
cssFile.innerHTML = data;
|
|
59
|
-
setTimeout(() => {
|
|
60
|
-
this.el.prepend(cssFile);
|
|
61
|
-
}, 1);
|
|
62
|
-
})
|
|
63
|
-
.catch((err) => {
|
|
64
|
-
console.log('error ', err);
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
104
|
this.clientStyling = '';
|
|
68
105
|
this.clientStylingUrl = '';
|
|
106
|
+
this.mbSource = undefined;
|
|
69
107
|
this.translationUrl = '';
|
|
70
108
|
this.targetTranslations = undefined;
|
|
71
109
|
}
|
|
110
|
+
componentDidLoad() {
|
|
111
|
+
if (this.el) {
|
|
112
|
+
if (window.emMessageBus != undefined) {
|
|
113
|
+
setStreamStyling(this.el, `${this.mbSource}.Style`);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
if (this.clientStyling)
|
|
117
|
+
setClientStyling(this.el, this.clientStyling);
|
|
118
|
+
if (this.clientStylingUrl)
|
|
119
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
120
|
+
this.stylingAppends = true;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
disconnectedCallback() {
|
|
125
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
126
|
+
}
|
|
127
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
128
|
+
if (newValue != oldValue) {
|
|
129
|
+
setClientStyling(this.el, this.clientStyling);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
133
|
+
if (newValue != oldValue) {
|
|
134
|
+
if (this.clientStylingUrl)
|
|
135
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
72
138
|
componentDidRender() {
|
|
73
139
|
// start custom styling area
|
|
74
140
|
if (!this.stylingAppends) {
|
|
75
141
|
if (this.clientStyling)
|
|
76
|
-
this.
|
|
142
|
+
setClientStyling(this.el, this.clientStyling);
|
|
77
143
|
if (this.clientStylingUrl)
|
|
78
|
-
this.
|
|
144
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
79
145
|
this.stylingAppends = true;
|
|
80
146
|
}
|
|
81
147
|
// end custom styling area
|
|
@@ -89,9 +155,13 @@ const GeneralStylingWrapper = class {
|
|
|
89
155
|
return await Promise.all(promises);
|
|
90
156
|
}
|
|
91
157
|
render() {
|
|
92
|
-
return (index.h("div", { key: '
|
|
158
|
+
return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
|
|
93
159
|
}
|
|
94
160
|
get el() { return index.getElement(this); }
|
|
161
|
+
static get watchers() { return {
|
|
162
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
163
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
164
|
+
}; }
|
|
95
165
|
};
|
|
96
166
|
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
97
167
|
|
|
@@ -2676,6 +2746,7 @@ const PlayerElevateCard = class {
|
|
|
2676
2746
|
this.language = 'en';
|
|
2677
2747
|
this.playerName = undefined;
|
|
2678
2748
|
this.dateFormat = 'yyyy-MM-dd';
|
|
2749
|
+
this.mbSource = undefined;
|
|
2679
2750
|
this.clientStyling = '';
|
|
2680
2751
|
this.clientStylingUrl = '';
|
|
2681
2752
|
this.translationUrl = '';
|
|
@@ -2718,7 +2789,7 @@ const PlayerElevateCard = class {
|
|
|
2718
2789
|
render() {
|
|
2719
2790
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
2720
2791
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
2721
|
-
return (index.h("div", { key: '
|
|
2792
|
+
return (index.h("div", { key: 'e976417483a756b8f67d70feb09afb544efb3802', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '5de2dbc7d093bbcbe7b415122effa691c058ddb6', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '1a5b13640d37efab6dacee24e27f9f2bdc83cd0c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: 'e80389984932f77408c772ad9cb130de99e88504', params: this.paramProxy }), index.h("div", { key: 'fec6145e06a300bc044fec2f96e61dfe86f44d6c', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (index.h(index.Fragment, { key: '90b1f057c5d1d5ae286a75c3d30182c16593bbe6' }, index.h("div", { key: 'cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91', class: 'Content Row' }, index.h("div", { key: 'f3348ba8eb7bcb08085ab49ce2059c7fd86f862f', class: "PlayerImg" }, index.h(PlayerAvatar, { key: '8fa96d942ee70d43ea0231b87f5d5de0b72198df', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), index.h(PlayerPoints, { key: 'f774e833169326404d44dd8c2361bd89f0e5a9e6', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (index.h("div", { key: 'c85b28e71be4e13df275f2ae74f5b0c9538b3cda', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h("div", { key: '63ef752d5e25c3a65e5af7977b9e9f4846b8ba45', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, index.h(PlayerNameDiv, { key: '7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4', playerName: this.playerName }), index.h(PlayerElevateLoyaltyLevel, { key: '38d7c5aed410c9bf55e9640a98f6f74fc2d38291', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(PlayerLoyaltyProcess, { key: '2e1305ff3bea4cb2f432f1187c40bb36a1464627' }), index.h(PlayerElevateCardRedeem, { key: '427405f246bec7a028b5164fc70292b769ea609b', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
2722
2793
|
}
|
|
2723
2794
|
static get assetsDirs() { return ["../static"]; }
|
|
2724
2795
|
static get watchers() { return {
|
|
@@ -3253,8 +3324,8 @@ const PlayerElevateLoyaltycard = class {
|
|
|
3253
3324
|
render() {
|
|
3254
3325
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
3255
3326
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
3256
|
-
return (index.h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '
|
|
3257
|
-
index.h(LoyaltyLevelExpireDay, { key: '
|
|
3327
|
+
return (index.h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '3648821972ac115a1c33705463cdc2cdb427a95b', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: '7b36c46a869bd4b014d1f04dbb718445b23ec964', params: this.paramProxy }), index.h("div", { key: 'f4e5aa453459f693e07c166028aec9b0b696c907', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'd5f1894120cba3e7cf3c54b838a025f469bc445e', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '112ee04598b23dda6911f043101c0c1631454d7f' }, index.h("div", { key: '7af4b6e937bbe73cc00aae0f27f8c93da47bb626', class: "PlayerImg" }, index.h(PlayerAvatar, { key: '1b5037bfa196063f56cccd947c988a3aca0781b0', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '7b714e446f4e01edd4f4aefcc035d070b7d6a47b', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '37ad8ce5dae374685e74f6772d28e79d251932e3', class: 'CardCell ElevateLevel' }, index.h("span", { key: '2d9dcf4b08fcecc927d3e8bdca74c75ff4336480', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), index.h("div", { key: 'cc89cbaa70d9583b9626da15e98f9fd61d82f81f', class: 'PointsRange' }, index.h(PlayerPoints, { key: '32de4cac05a4fd5610af857b25e096a7cb9ba34d', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), index.h(PlayerPoints, { key: '298f492c8991384547c31396fc930b5c21f41501', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), index.h(PlayerLoyaltyProcess, { key: 'aca4f5642c41db1c4b7fa04411331a5c25c655dd' }), index.h("div", { key: 'd841c5df319de105376c6eee24bc685757916aae', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (index.h("div", { key: '774279829f3f52ee5696550a855a833b39df8c81', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
|
|
3328
|
+
index.h(LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
|
|
3258
3329
|
}
|
|
3259
3330
|
static get watchers() { return {
|
|
3260
3331
|
"session": ["onSessionOrEndpointChange"],
|
|
@@ -3276,6 +3347,7 @@ const PlayerElevatePointcard = class {
|
|
|
3276
3347
|
this.session = undefined;
|
|
3277
3348
|
this.playerAvatarUrl = undefined;
|
|
3278
3349
|
this.language = 'en';
|
|
3350
|
+
this.mbSource = undefined;
|
|
3279
3351
|
this.playerName = undefined;
|
|
3280
3352
|
this.cardTitle = undefined;
|
|
3281
3353
|
this.buttonType = 'earningRule';
|
|
@@ -3320,9 +3392,9 @@ const PlayerElevatePointcard = class {
|
|
|
3320
3392
|
render() {
|
|
3321
3393
|
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
3322
3394
|
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
3323
|
-
return (index.h("div", { key: '
|
|
3395
|
+
return (index.h("div", { key: '45aa5be359b46d5503a8310daa4db2029a8c59b8', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '0d1773bd9eb0913ede4eeedfc93f22967aa133d6', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'cfb35c5220633e39e25b11f0be5b6fc5cc73df5c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: '25206c4deb6e51e3ea60259d4fee3452df8253d6', params: this.paramProxy }), index.h("div", { key: 'c14ee3498a1a584b7f484fe2ef6a204c337d2b27', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'dd7e0528034013d889f1f9bfbacf7928d2b4d1e9', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '20b36f112f735446a6219b61e012e4568f199717' }, index.h("div", { key: '3705136c1ee509484f43b7268b23cfbe273f727c', class: "PlayerImg" }, index.h(PlayerAvatar, { key: 'b81cbcff0528acd3253a676e0a64141c6414fc2a', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: 'ba1744b3b9cee03a424093df96454ff68d04aec1', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints', this.language)), index.h("div", { key: '6b554d17a0f74684e23549365fb06f6079ba7239', class: 'PointsTxt SPPoints' }, index.h(PlayerPoints, { key: '6c9f812eccea99cd94095c252ba552816f800447', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: 'eb79d25c2ccce8c542a192c1ca07265649dbd1bc', class: "TC", onClick: () => {
|
|
3324
3396
|
this.onDetailsClick();
|
|
3325
|
-
} }, translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '
|
|
3397
|
+
} }, translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
3326
3398
|
}
|
|
3327
3399
|
static get watchers() { return {
|
|
3328
3400
|
"session": ["onSessionOrEndpointChange"],
|
|
@@ -3358,6 +3430,7 @@ const PlayerRakebackCard = class {
|
|
|
3358
3430
|
this.theme = 'Dark';
|
|
3359
3431
|
this.session = undefined;
|
|
3360
3432
|
this.language = 'en';
|
|
3433
|
+
this.mbSource = undefined;
|
|
3361
3434
|
this.clientStyling = '';
|
|
3362
3435
|
this.clientStylingUrl = '';
|
|
3363
3436
|
this.translationUrl = '';
|
|
@@ -3471,7 +3544,7 @@ const PlayerRakebackCard = class {
|
|
|
3471
3544
|
await this.onShowOrHasRakebackWalletChange();
|
|
3472
3545
|
}
|
|
3473
3546
|
render() {
|
|
3474
|
-
return this.showTheWidget ? (index.h("div", { class: "RakebackCard" }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), index.h("div", { class: "RakebackCardContent" }, index.h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), index.h("div", { class: "RakebackDetails" }, index.h("div", { class: "RakebackInfo" }, index.h("div", { class: "RakebackNumContainer" }, index.h("span", { class: "RakebackNum" }, this.rakebackInfo.points), index.h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), index.h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (index.h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
3547
|
+
return this.showTheWidget ? (index.h("div", { class: "RakebackCard" }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("div", { class: "RakebackCardContent" }, index.h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), index.h("div", { class: "RakebackDetails" }, index.h("div", { class: "RakebackInfo" }, index.h("div", { class: "RakebackNumContainer" }, index.h("span", { class: "RakebackNum" }, this.rakebackInfo.points), index.h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), index.h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (index.h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
3475
3548
|
lang: this.language,
|
|
3476
3549
|
minutes: this.rakebackInfo.minutesCanClaim
|
|
3477
3550
|
})))))) : null;
|
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'player-elevate-card';
|
|
24
|
-
const BUILD = /* player-elevate-card */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad:
|
|
24
|
+
const BUILD = /* player-elevate-card */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -1149,6 +1149,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1149
1149
|
{
|
|
1150
1150
|
addHydratedFlag(elm);
|
|
1151
1151
|
}
|
|
1152
|
+
{
|
|
1153
|
+
safeCall(instance, "componentDidLoad");
|
|
1154
|
+
}
|
|
1152
1155
|
endPostUpdate();
|
|
1153
1156
|
{
|
|
1154
1157
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1421,6 +1424,9 @@ var setContentReference = (elm) => {
|
|
|
1421
1424
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1422
1425
|
};
|
|
1423
1426
|
var disconnectInstance = (instance) => {
|
|
1427
|
+
{
|
|
1428
|
+
safeCall(instance, "disconnectedCallback");
|
|
1429
|
+
}
|
|
1424
1430
|
};
|
|
1425
1431
|
var disconnectedCallback = async (elm) => {
|
|
1426
1432
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1431,8 +1437,10 @@ var disconnectedCallback = async (elm) => {
|
|
|
1431
1437
|
hostRef.$rmListeners$ = void 0;
|
|
1432
1438
|
}
|
|
1433
1439
|
}
|
|
1434
|
-
if (hostRef == null ? void 0 : hostRef.$lazyInstance$)
|
|
1435
|
-
hostRef.$
|
|
1440
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1441
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1442
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1443
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1436
1444
|
}
|
|
1437
1445
|
}
|
|
1438
1446
|
};
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-81135df8.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["general-styling-wrapper_6.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["general-styling-wrapper_6.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-81135df8.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["general-styling-wrapper_6.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["general-styling-wrapper_6.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -10,6 +10,7 @@ export class PlayerElevateCard {
|
|
|
10
10
|
this.language = 'en';
|
|
11
11
|
this.playerName = undefined;
|
|
12
12
|
this.dateFormat = 'yyyy-MM-dd';
|
|
13
|
+
this.mbSource = undefined;
|
|
13
14
|
this.clientStyling = '';
|
|
14
15
|
this.clientStylingUrl = '';
|
|
15
16
|
this.translationUrl = '';
|
|
@@ -52,7 +53,7 @@ export class PlayerElevateCard {
|
|
|
52
53
|
render() {
|
|
53
54
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
54
55
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
55
|
-
return (h("div", { key: '
|
|
56
|
+
return (h("div", { key: 'e976417483a756b8f67d70feb09afb544efb3802', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '5de2dbc7d093bbcbe7b415122effa691c058ddb6', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '1a5b13640d37efab6dacee24e27f9f2bdc83cd0c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: 'e80389984932f77408c772ad9cb130de99e88504', params: this.paramProxy }), h("div", { key: 'fec6145e06a300bc044fec2f96e61dfe86f44d6c', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, { key: '90b1f057c5d1d5ae286a75c3d30182c16593bbe6' }, h("div", { key: 'cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91', class: 'Content Row' }, h("div", { key: 'f3348ba8eb7bcb08085ab49ce2059c7fd86f862f', class: "PlayerImg" }, h(PlayerAvatar, { key: '8fa96d942ee70d43ea0231b87f5d5de0b72198df', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { key: 'f774e833169326404d44dd8c2361bd89f0e5a9e6', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { key: 'c85b28e71be4e13df275f2ae74f5b0c9538b3cda', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { key: '63ef752d5e25c3a65e5af7977b9e9f4846b8ba45', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { key: '7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4', playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { key: '38d7c5aed410c9bf55e9640a98f6f74fc2d38291', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, { key: '2e1305ff3bea4cb2f432f1187c40bb36a1464627' }), h(PlayerElevateCardRedeem, { key: '427405f246bec7a028b5164fc70292b769ea609b', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
56
57
|
}
|
|
57
58
|
static get is() { return "player-elevate-card"; }
|
|
58
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -191,6 +192,23 @@ export class PlayerElevateCard {
|
|
|
191
192
|
"reflect": true,
|
|
192
193
|
"defaultValue": "'yyyy-MM-dd'"
|
|
193
194
|
},
|
|
195
|
+
"mbSource": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "string",
|
|
200
|
+
"resolved": "string",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": false,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Client custom styling via streamStyling"
|
|
208
|
+
},
|
|
209
|
+
"attribute": "mb-source",
|
|
210
|
+
"reflect": true
|
|
211
|
+
},
|
|
194
212
|
"clientStyling": {
|
|
195
213
|
"type": "string",
|
|
196
214
|
"mutable": false,
|
|
@@ -14,6 +14,7 @@ const meta = {
|
|
|
14
14
|
clientStyling: "",
|
|
15
15
|
clientStylingUrl: "",
|
|
16
16
|
translationUrl: "",
|
|
17
|
+
mbSource: "",
|
|
17
18
|
},
|
|
18
19
|
argTypes: {
|
|
19
20
|
endpoint: { control: 'text', description: '' },
|
|
@@ -26,6 +27,7 @@ const meta = {
|
|
|
26
27
|
clientStyling: { control: 'text', description: '' },
|
|
27
28
|
clientStylingUrl: { control: 'text', description: '' },
|
|
28
29
|
translationUrl: { control: 'text', description: '' },
|
|
30
|
+
mbSource: { control: 'text', description: '' },
|
|
29
31
|
},
|
|
30
32
|
};
|
|
31
33
|
export default meta;
|
|
@@ -34,13 +36,14 @@ const Template = (args) => {
|
|
|
34
36
|
endpoint="${args.endpoint}"
|
|
35
37
|
theme="${args.theme}"
|
|
36
38
|
session="${args.session}"
|
|
37
|
-
|
|
39
|
+
player-avatar-url="${args.playerAvatarUrl}"
|
|
38
40
|
language="${args.language}"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
player-name="${args.playerName}"
|
|
42
|
+
date-format="${args.dateFormat}"
|
|
43
|
+
client-styling="${args.clientStyling}"
|
|
44
|
+
client-styling-url="${args.clientStylingUrl}"
|
|
45
|
+
translation-url="${args.translationUrl}"
|
|
46
|
+
mb-source="${args.mbSource}"
|
|
44
47
|
></player-elevate-card>`;
|
|
45
48
|
};
|
|
46
49
|
export const Default = Template.bind({});
|
|
@@ -55,4 +58,5 @@ Default.args = {
|
|
|
55
58
|
clientStyling: "",
|
|
56
59
|
clientStylingUrl: "",
|
|
57
60
|
translationUrl: "",
|
|
61
|
+
mbSource: "",
|
|
58
62
|
};
|
|
@@ -66,8 +66,8 @@ export class PlayerElevateLoyaltycard {
|
|
|
66
66
|
render() {
|
|
67
67
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
68
68
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
69
|
-
return (h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '
|
|
70
|
-
h(LoyaltyLevelExpireDay, { key: '
|
|
69
|
+
return (h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '3648821972ac115a1c33705463cdc2cdb427a95b', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: '7b36c46a869bd4b014d1f04dbb718445b23ec964', params: this.paramProxy }), h("div", { key: 'f4e5aa453459f693e07c166028aec9b0b696c907', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'd5f1894120cba3e7cf3c54b838a025f469bc445e', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '112ee04598b23dda6911f043101c0c1631454d7f' }, h("div", { key: '7af4b6e937bbe73cc00aae0f27f8c93da47bb626', class: "PlayerImg" }, h(PlayerAvatar, { key: '1b5037bfa196063f56cccd947c988a3aca0781b0', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '7b714e446f4e01edd4f4aefcc035d070b7d6a47b', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '37ad8ce5dae374685e74f6772d28e79d251932e3', class: 'CardCell ElevateLevel' }, h("span", { key: '2d9dcf4b08fcecc927d3e8bdca74c75ff4336480', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), h("div", { key: 'cc89cbaa70d9583b9626da15e98f9fd61d82f81f', class: 'PointsRange' }, h(PlayerPoints, { key: '32de4cac05a4fd5610af857b25e096a7cb9ba34d', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), h(PlayerPoints, { key: '298f492c8991384547c31396fc930b5c21f41501', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), h(PlayerLoyaltyProcess, { key: 'aca4f5642c41db1c4b7fa04411331a5c25c655dd' }), h("div", { key: 'd841c5df319de105376c6eee24bc685757916aae', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (h("div", { key: '774279829f3f52ee5696550a855a833b39df8c81', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
|
|
70
|
+
h(LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "player-elevate-loyaltycard"; }
|
|
73
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,6 +9,7 @@ export class PlayerElevatePointcard {
|
|
|
9
9
|
this.session = undefined;
|
|
10
10
|
this.playerAvatarUrl = undefined;
|
|
11
11
|
this.language = 'en';
|
|
12
|
+
this.mbSource = undefined;
|
|
12
13
|
this.playerName = undefined;
|
|
13
14
|
this.cardTitle = undefined;
|
|
14
15
|
this.buttonType = 'earningRule';
|
|
@@ -53,9 +54,9 @@ export class PlayerElevatePointcard {
|
|
|
53
54
|
render() {
|
|
54
55
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
55
56
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
56
|
-
return (h("div", { key: '
|
|
57
|
+
return (h("div", { key: '45aa5be359b46d5503a8310daa4db2029a8c59b8', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '0d1773bd9eb0913ede4eeedfc93f22967aa133d6', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'cfb35c5220633e39e25b11f0be5b6fc5cc73df5c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: '25206c4deb6e51e3ea60259d4fee3452df8253d6', params: this.paramProxy }), h("div", { key: 'c14ee3498a1a584b7f484fe2ef6a204c337d2b27', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'dd7e0528034013d889f1f9bfbacf7928d2b4d1e9', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '20b36f112f735446a6219b61e012e4568f199717' }, h("div", { key: '3705136c1ee509484f43b7268b23cfbe273f727c', class: "PlayerImg" }, h(PlayerAvatar, { key: 'b81cbcff0528acd3253a676e0a64141c6414fc2a', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: 'ba1744b3b9cee03a424093df96454ff68d04aec1', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints', this.language)), h("div", { key: '6b554d17a0f74684e23549365fb06f6079ba7239', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: '6c9f812eccea99cd94095c252ba552816f800447', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: 'eb79d25c2ccce8c542a192c1ca07265649dbd1bc', class: "TC", onClick: () => {
|
|
57
58
|
this.onDetailsClick();
|
|
58
|
-
} }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '
|
|
59
|
+
} }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
59
60
|
}
|
|
60
61
|
static get is() { return "player-elevate-pointcard"; }
|
|
61
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -158,6 +159,23 @@ export class PlayerElevatePointcard {
|
|
|
158
159
|
"reflect": true,
|
|
159
160
|
"defaultValue": "'en'"
|
|
160
161
|
},
|
|
162
|
+
"mbSource": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "string",
|
|
167
|
+
"resolved": "string",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": false,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": "Client custom styling via streamStyling"
|
|
175
|
+
},
|
|
176
|
+
"attribute": "mb-source",
|
|
177
|
+
"reflect": true
|
|
178
|
+
},
|
|
161
179
|
"playerName": {
|
|
162
180
|
"type": "string",
|
|
163
181
|
"mutable": false,
|
|
@@ -22,6 +22,7 @@ export class PlayerRakebackCard {
|
|
|
22
22
|
this.theme = 'Dark';
|
|
23
23
|
this.session = undefined;
|
|
24
24
|
this.language = 'en';
|
|
25
|
+
this.mbSource = undefined;
|
|
25
26
|
this.clientStyling = '';
|
|
26
27
|
this.clientStylingUrl = '';
|
|
27
28
|
this.translationUrl = '';
|
|
@@ -135,7 +136,7 @@ export class PlayerRakebackCard {
|
|
|
135
136
|
await this.onShowOrHasRakebackWalletChange();
|
|
136
137
|
}
|
|
137
138
|
render() {
|
|
138
|
-
return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
139
|
+
return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
|
|
139
140
|
lang: this.language,
|
|
140
141
|
minutes: this.rakebackInfo.minutesCanClaim
|
|
141
142
|
})))))) : null;
|
|
@@ -224,6 +225,23 @@ export class PlayerRakebackCard {
|
|
|
224
225
|
"reflect": true,
|
|
225
226
|
"defaultValue": "'en'"
|
|
226
227
|
},
|
|
228
|
+
"mbSource": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"mutable": false,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "string",
|
|
233
|
+
"resolved": "string",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": false,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [],
|
|
240
|
+
"text": "Client custom styling via streamStyling"
|
|
241
|
+
},
|
|
242
|
+
"attribute": "mb-source",
|
|
243
|
+
"reflect": true
|
|
244
|
+
},
|
|
227
245
|
"clientStyling": {
|
|
228
246
|
"type": "string",
|
|
229
247
|
"mutable": false,
|