@everymatrix/bonus-elevate-shop 1.69.0 → 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/bonus-elevate-shop/bonus-elevate-shop.esm.js +1 -1
- package/dist/bonus-elevate-shop/bonus-elevate-shop_5.entry.js +1 -1
- package/dist/bonus-elevate-shop/{player-elevate-card-items-a874e9d5.js → player-elevate-card-items-d0cd4d5f.js} +1 -1
- package/dist/bonus-elevate-shop/player-elevate-card.entry.js +1 -1
- package/dist/bonus-elevate-shop/player-elevate-loyaltycard.entry.js +1 -1
- package/dist/bonus-elevate-shop/player-rakeback-card.entry.js +1 -1
- package/dist/cjs/bonus-elevate-shop.cjs.js +1 -1
- package/dist/cjs/bonus-elevate-shop_5.cjs.entry.js +103 -27
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{player-elevate-card-items-ddb04cfd.js → player-elevate-card-items-a50f74fa.js} +2 -0
- package/dist/cjs/player-elevate-card.cjs.entry.js +3 -2
- package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +4 -3
- package/dist/cjs/player-rakeback-card.cjs.entry.js +2 -1
- package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.js +19 -1
- package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.stories.js +4 -0
- package/dist/esm/bonus-elevate-shop.js +1 -1
- package/dist/esm/bonus-elevate-shop_5.entry.js +103 -27
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{player-elevate-card-items-a874e9d5.js → player-elevate-card-items-d0cd4d5f.js} +2 -1
- package/dist/esm/player-elevate-card.entry.js +3 -2
- package/dist/esm/player-elevate-loyaltycard.entry.js +4 -3
- package/dist/esm/player-rakeback-card.entry.js +2 -1
- package/dist/types/components/bonus-elevate-shop/bonus-elevate-shop.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, g as getElement, a as getAssetPath, F as Fragment } from './index-4bbe8850.js';
|
|
2
2
|
import { t as translateWithParams, T as TRANSLATIONS$1, a as translate$1 } from './locale.utils-34e6f004.js';
|
|
3
|
-
import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, P as PlayerAvatar, a as PlayerPoints } from './player-elevate-card-items-
|
|
3
|
+
import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, P as PlayerAvatar, a as PlayerPoints } from './player-elevate-card-items-d0cd4d5f.js';
|
|
4
4
|
|
|
5
5
|
const getUrl = (path, params = {}) => {
|
|
6
6
|
return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
|
|
@@ -92,6 +92,7 @@ const BonusElevateShop = class {
|
|
|
92
92
|
this.session = undefined;
|
|
93
93
|
this.endpoint = undefined;
|
|
94
94
|
this.language = 'en';
|
|
95
|
+
this.mbSource = undefined;
|
|
95
96
|
this.clientStyling = '';
|
|
96
97
|
this.clientStylingUrl = '';
|
|
97
98
|
this.translationUrl = '';
|
|
@@ -211,7 +212,7 @@ const BonusElevateShop = class {
|
|
|
211
212
|
this.locale = Object.assign(Object.assign({}, translation['en']), translation[this.language]);
|
|
212
213
|
}
|
|
213
214
|
render() {
|
|
214
|
-
return (h("main", { key: '
|
|
215
|
+
return (h("main", { key: 'b3500b7f2d9ce92a6516f34d9e589538f888900a', class: "MainContainer" }, h("general-styling-wrapper", { key: '038ebd20a7676c1f2c44fa5decf2377ab0abed76', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'dfe15faf5ffe2c6bc0d03d863159829fc85c1053', endpoint: this.endpoint, session: this.session, language: this.language, mbSource: this.mbSource, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this))), h("div", { key: 'c77f4d76ed3383f2b58153eb7bfe3b5e1b922456', class: "ShopBottom" }, h("bonus-pagination-nav", { key: 'a383af9908f5eb3359c0c8d570c9b1edf50b3027', total: this.total, offset: this.offset, limit: this.limit, tableId: this.shopListId, "nav-item-account": 7, arrowsActive: false, "display-page-numbers": "true" }), h("general-input", { key: '93d1e1c3540234b2db2d521524ed1788b122a9ab', type: "dropdown", name: "pageLimits", displayName: this.locale.perPage, defaultValue: this.limit, validation: { mandatory: false }, options: this.pageLimitSelectOptions, emitValue: true, language: this.language, mbSource: this.mbSource, "client-styling-url": this.clientStylingUrl }))));
|
|
215
216
|
}
|
|
216
217
|
handleMessage(message) {
|
|
217
218
|
if (message.data.type === 'bee-redeem-confirmed' && message.data.id) {
|
|
@@ -458,10 +459,71 @@ const mergeTranslations = (url, target) => {
|
|
|
458
459
|
});
|
|
459
460
|
});
|
|
460
461
|
resolve(true);
|
|
462
|
+
})
|
|
463
|
+
.catch(err => {
|
|
464
|
+
console.error("Failed to load translations:", err);
|
|
465
|
+
resolve(false);
|
|
461
466
|
});
|
|
462
467
|
});
|
|
463
468
|
};
|
|
464
469
|
|
|
470
|
+
/**
|
|
471
|
+
* @name setClientStyling
|
|
472
|
+
* @description Method used to create and append to the passed element of the widget a style element with the content received
|
|
473
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
474
|
+
* @param {string} clientStyling The style content
|
|
475
|
+
*/
|
|
476
|
+
function setClientStyling(stylingContainer, clientStyling) {
|
|
477
|
+
if (stylingContainer) {
|
|
478
|
+
const sheet = document.createElement('style');
|
|
479
|
+
sheet.innerHTML = clientStyling;
|
|
480
|
+
stylingContainer.appendChild(sheet);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* @name setClientStylingURL
|
|
486
|
+
* @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
|
|
487
|
+
* @param {HTMLElement} stylingContainer The reference element of the widget
|
|
488
|
+
* @param {string} clientStylingUrl The URL of the style content
|
|
489
|
+
*/
|
|
490
|
+
function setClientStylingURL(stylingContainer, clientStylingUrl) {
|
|
491
|
+
const url = new URL(clientStylingUrl);
|
|
492
|
+
|
|
493
|
+
fetch(url.href)
|
|
494
|
+
.then((res) => res.text())
|
|
495
|
+
.then((data) => {
|
|
496
|
+
const cssFile = document.createElement('style');
|
|
497
|
+
cssFile.innerHTML = data;
|
|
498
|
+
if (stylingContainer) {
|
|
499
|
+
stylingContainer.appendChild(cssFile);
|
|
500
|
+
}
|
|
501
|
+
})
|
|
502
|
+
.catch((err) => {
|
|
503
|
+
console.error('There was an error while trying to load client styling from URL', err);
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* @name setStreamLibrary
|
|
509
|
+
* @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
|
|
510
|
+
* @param {HTMLElement} stylingContainer The highest element of the widget
|
|
511
|
+
* @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
|
|
512
|
+
* @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
|
|
513
|
+
*/
|
|
514
|
+
function setStreamStyling(stylingContainer, domain, subscription) {
|
|
515
|
+
if (window.emMessageBus) {
|
|
516
|
+
const sheet = document.createElement('style');
|
|
517
|
+
|
|
518
|
+
window.emMessageBus.subscribe(domain, (data) => {
|
|
519
|
+
sheet.innerHTML = data;
|
|
520
|
+
if (stylingContainer) {
|
|
521
|
+
stylingContainer.appendChild(sheet);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
465
527
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
466
528
|
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
467
529
|
|
|
@@ -469,38 +531,47 @@ const GeneralStylingWrapper = class {
|
|
|
469
531
|
constructor(hostRef) {
|
|
470
532
|
registerInstance(this, hostRef);
|
|
471
533
|
this.stylingAppends = false;
|
|
472
|
-
this.setClientStyling = () => {
|
|
473
|
-
let sheet = document.createElement('style');
|
|
474
|
-
sheet.innerHTML = this.clientStyling;
|
|
475
|
-
this.el.prepend(sheet);
|
|
476
|
-
};
|
|
477
|
-
this.setClientStylingURL = () => {
|
|
478
|
-
let url = new URL(this.clientStylingUrl);
|
|
479
|
-
let cssFile = document.createElement('style');
|
|
480
|
-
fetch(url.href)
|
|
481
|
-
.then((res) => res.text())
|
|
482
|
-
.then((data) => {
|
|
483
|
-
cssFile.innerHTML = data;
|
|
484
|
-
setTimeout(() => {
|
|
485
|
-
this.el.prepend(cssFile);
|
|
486
|
-
}, 1);
|
|
487
|
-
})
|
|
488
|
-
.catch((err) => {
|
|
489
|
-
console.log('error ', err);
|
|
490
|
-
});
|
|
491
|
-
};
|
|
492
534
|
this.clientStyling = '';
|
|
493
535
|
this.clientStylingUrl = '';
|
|
536
|
+
this.mbSource = undefined;
|
|
494
537
|
this.translationUrl = '';
|
|
495
538
|
this.targetTranslations = undefined;
|
|
496
539
|
}
|
|
540
|
+
componentDidLoad() {
|
|
541
|
+
if (this.el) {
|
|
542
|
+
if (window.emMessageBus != undefined) {
|
|
543
|
+
setStreamStyling(this.el, `${this.mbSource}.Style`);
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
if (this.clientStyling)
|
|
547
|
+
setClientStyling(this.el, this.clientStyling);
|
|
548
|
+
if (this.clientStylingUrl)
|
|
549
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
550
|
+
this.stylingAppends = true;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
disconnectedCallback() {
|
|
555
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
556
|
+
}
|
|
557
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
558
|
+
if (newValue != oldValue) {
|
|
559
|
+
setClientStyling(this.el, this.clientStyling);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
563
|
+
if (newValue != oldValue) {
|
|
564
|
+
if (this.clientStylingUrl)
|
|
565
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
497
568
|
componentDidRender() {
|
|
498
569
|
// start custom styling area
|
|
499
570
|
if (!this.stylingAppends) {
|
|
500
571
|
if (this.clientStyling)
|
|
501
|
-
this.
|
|
572
|
+
setClientStyling(this.el, this.clientStyling);
|
|
502
573
|
if (this.clientStylingUrl)
|
|
503
|
-
this.
|
|
574
|
+
setClientStylingURL(this.el, this.clientStylingUrl);
|
|
504
575
|
this.stylingAppends = true;
|
|
505
576
|
}
|
|
506
577
|
// end custom styling area
|
|
@@ -514,9 +585,13 @@ const GeneralStylingWrapper = class {
|
|
|
514
585
|
return await Promise.all(promises);
|
|
515
586
|
}
|
|
516
587
|
render() {
|
|
517
|
-
return (h("div", { key: '
|
|
588
|
+
return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
|
|
518
589
|
}
|
|
519
590
|
get el() { return getElement(this); }
|
|
591
|
+
static get watchers() { return {
|
|
592
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
593
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
594
|
+
}; }
|
|
520
595
|
};
|
|
521
596
|
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
522
597
|
|
|
@@ -987,6 +1062,7 @@ const PlayerElevatePointcard = class {
|
|
|
987
1062
|
this.session = undefined;
|
|
988
1063
|
this.playerAvatarUrl = undefined;
|
|
989
1064
|
this.language = 'en';
|
|
1065
|
+
this.mbSource = undefined;
|
|
990
1066
|
this.playerName = undefined;
|
|
991
1067
|
this.cardTitle = undefined;
|
|
992
1068
|
this.buttonType = 'earningRule';
|
|
@@ -1031,9 +1107,9 @@ const PlayerElevatePointcard = class {
|
|
|
1031
1107
|
render() {
|
|
1032
1108
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
1033
1109
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
1034
|
-
return (h("div", { key: '
|
|
1110
|
+
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$1, 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$1('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: () => {
|
|
1035
1111
|
this.onDetailsClick();
|
|
1036
|
-
} }, translate$1('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '
|
|
1112
|
+
} }, translate$1('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
1037
1113
|
}
|
|
1038
1114
|
static get watchers() { return {
|
|
1039
1115
|
"session": ["onSessionOrEndpointChange"],
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[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"]}],[0,"bonus-pagination-nav",{"total":[1538],"limit":[1538],"offset":[1538],"tableId":[1537,"table-id"],"language":[1537],"translationUrl":[513,"translation-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"displayPageNumbers":[1540,"display-page-numbers"],"displayRangeOfTotal":[1540,"display-range-of-total"],"navItemAccount":[1538,"nav-item-account"],"endPageIndex":[32],"pagesArray":[32],"currentPage":[32],"showAsEllipsisMid":[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[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]}]]],["player-elevate-card",[[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"]}]]],["player-elevate-loyaltycard",[[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"]}]]],["player-rakeback-card",[[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"]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["bonus-elevate-shop_5",[[1,"bonus-elevate-shop",{"session":[513],"endpoint":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"limit":[1538],"navItemAccount":[514,"nav-item-account"],"pageLimitOptions":[1537,"page-limit-options"],"locale":[32],"gifts":[32],"total":[32],"offset":[32],"shopListId":[32],"isLoading":[32],"pageLimitSelectOptions":[32]},[[16,"sendInputValue","onPageLimitChangedHandler"],[0,"reloadPageByType","reloadPageByTypeHandler"]],{"endpoint":["onPropsChange"],"language":["onPropsChange"],"session":["onPropsChange"]}],[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"]}],[0,"bonus-pagination-nav",{"total":[1538],"limit":[1538],"offset":[1538],"tableId":[1537,"table-id"],"language":[1537],"translationUrl":[513,"translation-url"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"displayPageNumbers":[1540,"display-page-numbers"],"displayRangeOfTotal":[1540,"display-range-of-total"],"navItemAccount":[1538,"nav-item-account"],"endPageIndex":[32],"pagesArray":[32],"currentPage":[32],"showAsEllipsisMid":[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]],[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"]}]]],["player-elevate-card",[[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"]}]]],["player-elevate-loyaltycard",[[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"]}]]],["player-rakeback-card",[[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"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
package/dist/esm/{player-elevate-card-items-a874e9d5.js → player-elevate-card-items-d0cd4d5f.js}
RENAMED
|
@@ -2311,6 +2311,7 @@ const PlayerElevateCardRedeem = ({ language, onRedeemClick }) => (h("div", { cla
|
|
|
2311
2311
|
} }, h("span", null, translate('redeem', language)))));
|
|
2312
2312
|
const PlayerNameDiv = (props) => (h("div", { class: 'CardCell PlayerName Txt' }, props.playerName));
|
|
2313
2313
|
const PlayerElevateLoyaltyLevel = (props) => (h("div", { class: 'CardCell ElevateLevel' }, h("span", { class: "LevelName", title: props.level }, props.level), props.expireTime && (h("div", { class: "CardCell ExpirationDate Txt" }, translate('expireOn', props.language), h("span", { class: "ExpireTime" }, format(new Date(props.expireTime), props.dateFormat || 'yyyy-MM-dd')), !props.hideInfo && (h("span", { class: "fa Info", style: { 'background': `url(${getAssetPath('../static/info.svg')})` } }, h("span", { class: "InfoTips", innerHTML: TipsInfo })))))));
|
|
2314
|
+
const LoyaltyLevelExpireDay = (props) => (h("div", { class: 'CardCell ElevateLevel Expire' }, h("div", { class: "CardCell ExpirationDate Txt" }, translate('expireOn', props.language), h("span", { class: "ExpireTime" }, format(new Date(props.expireTime), props.dateFormat || 'yyyy-MM-dd')))));
|
|
2314
2315
|
const PlayerAvatar = (props) => {
|
|
2315
2316
|
const badge = props.loyaltyIconUrl
|
|
2316
2317
|
? h("img", { class: "Badge", src: props.loyaltyIconUrl })
|
|
@@ -2319,4 +2320,4 @@ const PlayerAvatar = (props) => {
|
|
|
2319
2320
|
return h("div", { class: "PlayerAvatar", style: { 'position': `${props.onlyBadge ? '' : 'relative'}` } }, !props.onlyBadge && h("img", { class: "Avatar", src: avatarSrc }), badge);
|
|
2320
2321
|
};
|
|
2321
2322
|
|
|
2322
|
-
export { PlayerAvatar as P, PlayerPoints as a, PlayerNameDiv as b, PlayerElevateLoyaltyLevel as c, PlayerLoyaltyProcess as d, PlayerElevateCardRedeem as e, getTimezoneOffsetInMilliseconds as g, requiredArgs as r, toDate as t };
|
|
2323
|
+
export { LoyaltyLevelExpireDay as L, PlayerAvatar as P, PlayerPoints as a, PlayerNameDiv as b, PlayerElevateLoyaltyLevel as c, PlayerLoyaltyProcess as d, PlayerElevateCardRedeem as e, getTimezoneOffsetInMilliseconds as g, requiredArgs as r, toDate as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-4bbe8850.js';
|
|
2
|
-
import { P as PlayerAvatar, a as PlayerPoints, b as PlayerNameDiv, c as PlayerElevateLoyaltyLevel, d as PlayerLoyaltyProcess, e as PlayerElevateCardRedeem } from './player-elevate-card-items-
|
|
2
|
+
import { P as PlayerAvatar, a as PlayerPoints, b as PlayerNameDiv, c as PlayerElevateLoyaltyLevel, d as PlayerLoyaltyProcess, e as PlayerElevateCardRedeem } from './player-elevate-card-items-d0cd4d5f.js';
|
|
3
3
|
import { T as TRANSLATIONS } from './locale.utils-34e6f004.js';
|
|
4
4
|
|
|
5
5
|
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emw--color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";
|
|
@@ -15,6 +15,7 @@ const PlayerElevateCard = class {
|
|
|
15
15
|
this.language = 'en';
|
|
16
16
|
this.playerName = undefined;
|
|
17
17
|
this.dateFormat = 'yyyy-MM-dd';
|
|
18
|
+
this.mbSource = undefined;
|
|
18
19
|
this.clientStyling = '';
|
|
19
20
|
this.clientStylingUrl = '';
|
|
20
21
|
this.translationUrl = '';
|
|
@@ -57,7 +58,7 @@ const PlayerElevateCard = class {
|
|
|
57
58
|
render() {
|
|
58
59
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
59
60
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
60
|
-
return (h("div", { key: '
|
|
61
|
+
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 })))))))));
|
|
61
62
|
}
|
|
62
63
|
static get assetsDirs() { return ["../static"]; }
|
|
63
64
|
static get watchers() { return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-4bbe8850.js';
|
|
2
|
-
import { P as PlayerAvatar,
|
|
2
|
+
import { P as PlayerAvatar, a as PlayerPoints, d as PlayerLoyaltyProcess, L as LoyaltyLevelExpireDay } from './player-elevate-card-items-d0cd4d5f.js';
|
|
3
3
|
import { t as translateWithParams, T as TRANSLATIONS } from './locale.utils-34e6f004.js';
|
|
4
4
|
|
|
5
|
-
const playerElevateLoyaltycardCss = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:
|
|
5
|
+
const playerElevateLoyaltycardCss = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";
|
|
6
6
|
const PlayerElevateLoyaltycardStyle0 = playerElevateLoyaltycardCss;
|
|
7
7
|
|
|
8
8
|
const PlayerElevateLoyaltycard = class {
|
|
@@ -71,7 +71,8 @@ const PlayerElevateLoyaltycard = class {
|
|
|
71
71
|
render() {
|
|
72
72
|
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
73
73
|
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
74
|
-
return (h("div", { key: '
|
|
74
|
+
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 &&
|
|
75
|
+
h(LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
|
|
75
76
|
}
|
|
76
77
|
static get watchers() { return {
|
|
77
78
|
"session": ["onSessionOrEndpointChange"],
|
|
@@ -27,6 +27,7 @@ const PlayerRakebackCard = class {
|
|
|
27
27
|
this.theme = 'Dark';
|
|
28
28
|
this.session = undefined;
|
|
29
29
|
this.language = 'en';
|
|
30
|
+
this.mbSource = undefined;
|
|
30
31
|
this.clientStyling = '';
|
|
31
32
|
this.clientStylingUrl = '';
|
|
32
33
|
this.translationUrl = '';
|
|
@@ -140,7 +141,7 @@ const PlayerRakebackCard = class {
|
|
|
140
141
|
await this.onShowOrHasRakebackWalletChange();
|
|
141
142
|
}
|
|
142
143
|
render() {
|
|
143
|
-
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', {
|
|
144
|
+
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', {
|
|
144
145
|
lang: this.language,
|
|
145
146
|
minutes: this.rakebackInfo.minutesCanClaim
|
|
146
147
|
})))))) : null;
|
|
@@ -27,6 +27,10 @@ export namespace Components {
|
|
|
27
27
|
* The item account showed on per page
|
|
28
28
|
*/
|
|
29
29
|
"limit": number;
|
|
30
|
+
/**
|
|
31
|
+
* Client custom styling via streamStyling
|
|
32
|
+
*/
|
|
33
|
+
"mbSource": string;
|
|
30
34
|
/**
|
|
31
35
|
* The nav items count on pagination, default 5
|
|
32
36
|
*/
|
|
@@ -93,6 +97,10 @@ declare namespace LocalJSX {
|
|
|
93
97
|
* The item account showed on per page
|
|
94
98
|
*/
|
|
95
99
|
"limit"?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Client custom styling via streamStyling
|
|
102
|
+
*/
|
|
103
|
+
"mbSource"?: string;
|
|
96
104
|
/**
|
|
97
105
|
* The nav items count on pagination, default 5
|
|
98
106
|
*/
|