@everymatrix/player-elevate-card 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-styling-wrapper_5.cjs.entry.js +3061 -0
- package/dist/cjs/index-b1cf5517.js +1634 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/player-elevate-card.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +22 -0
- package/dist/collection/components/player-elevate-card/index.js +1 -0
- package/dist/collection/components/player-elevate-card/player-elevate-card-items.js +22 -0
- package/dist/collection/components/player-elevate-card/player-elevate-card.css +64 -0
- package/dist/collection/components/player-elevate-card/player-elevate-card.js +279 -0
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.css +192 -0
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.js +231 -0
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.css +68 -0
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +285 -0
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.css +70 -0
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +316 -0
- package/dist/collection/components/static/button-default.svg +42 -0
- package/dist/collection/components/static/button-disabled.svg +4 -0
- package/dist/collection/components/static/button-hover.svg +4 -0
- package/dist/collection/components/static/button-level.svg +27 -0
- package/dist/collection/components/static/button-pressed.svg +18 -0
- package/dist/collection/components/static/button-redeem.svg +36 -0
- package/dist/collection/components/static/card-ground-over.png +0 -0
- package/dist/collection/components/static/card-ground-over.svg +903 -0
- package/dist/collection/components/static/card-ground.png +0 -0
- package/dist/collection/components/static/card-ground.svg +34 -0
- package/dist/collection/components/static/info.svg +4 -0
- package/dist/collection/components/static/level-badge.png +0 -0
- package/dist/collection/components/static/level-percent.svg +80 -0
- package/dist/collection/components/static/tips-info.svg +21 -0
- package/dist/collection/components/static/user.svg +3 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/models/player-elevate.js +1 -0
- package/dist/collection/utils/locale.utils.js +144 -0
- package/dist/collection/utils/utils.js +51 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-styling-wrapper_5.entry.js +3053 -0
- package/dist/esm/index-cd7a4beb.js +1604 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/player-elevate-card.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/player-elevate-card/index.esm.js +0 -0
- package/dist/player-elevate-card/p-37a424ba.entry.js +1 -0
- package/dist/player-elevate-card/p-ba534fa2.js +2 -0
- package/dist/player-elevate-card/p-e1255160.js +1 -0
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -0
- package/dist/static/button-default.svg +42 -0
- package/dist/static/button-disabled.svg +4 -0
- package/dist/static/button-hover.svg +4 -0
- package/dist/static/button-level.svg +27 -0
- package/dist/static/button-pressed.svg +18 -0
- package/dist/static/button-redeem.svg +36 -0
- package/dist/static/card-ground-over.png +0 -0
- package/dist/static/card-ground-over.svg +903 -0
- package/dist/static/card-ground.png +0 -0
- package/dist/static/card-ground.svg +34 -0
- package/dist/static/info.svg +4 -0
- package/dist/static/level-badge.png +0 -0
- package/dist/static/level-percent.svg +80 -0
- package/dist/static/tips-info.svg +21 -0
- package/dist/static/user.svg +3 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-elevate-card/index.d.ts +1 -0
- package/dist/types/components/player-elevate-card/player-elevate-card-items.d.ts +19 -0
- package/dist/types/components/player-elevate-card/player-elevate-card.d.ts +54 -0
- package/dist/types/components/player-elevate-card-data/player-elevate-card-data.d.ts +23 -0
- package/dist/types/components/player-elevate-loyaltycard/player-elevate-loyaltycard.d.ts +54 -0
- package/dist/types/components/player-elevate-pointcard/player-elevate-pointcard.d.ts +67 -0
- package/dist/types/components.d.ts +350 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/player-elevate.d.ts +40 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +15 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b1cf5517.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
11
|
+
return index.bootstrapLazy([["general-styling-wrapper_5.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"],"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"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"]],{"params":["onParamsChanged"]}]]]], options);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-b1cf5517.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('player-elevate-card.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["general-styling-wrapper_5.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"],"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"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"]],{"params":["onParamsChanged"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"components/player-elevate-card/player-elevate-card.js",
|
|
4
|
+
"components/player-elevate-card-data/player-elevate-card-data.js",
|
|
5
|
+
"components/player-elevate-loyaltycard/player-elevate-loyaltycard.js",
|
|
6
|
+
"components/player-elevate-pointcard/player-elevate-pointcard.js"
|
|
7
|
+
],
|
|
8
|
+
"compiler": {
|
|
9
|
+
"name": "@stencil/core",
|
|
10
|
+
"version": "4.20.0",
|
|
11
|
+
"typescriptVersion": "5.5.3"
|
|
12
|
+
},
|
|
13
|
+
"collections": [
|
|
14
|
+
{
|
|
15
|
+
"name": "@everymatrix/general-styling-wrapper",
|
|
16
|
+
"tags": [
|
|
17
|
+
"general-styling-wrapper"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"bundles": []
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PlayerElevateCard } from './player-elevate-card';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getAssetPath, h } from "@stencil/core";
|
|
2
|
+
import LoyaltyProgress from "../static/level-percent.svg";
|
|
3
|
+
import { translate } from "../../utils/locale.utils";
|
|
4
|
+
import dateFnsFormat from "date-fns/format";
|
|
5
|
+
import TipsInfo from "../static/tips-info.svg";
|
|
6
|
+
export const PlayerLoyaltyProcess = () => (h("span", { class: "LevelProgress", id: 'LevelProgress', innerHTML: LoyaltyProgress }));
|
|
7
|
+
export const PlayerPoints = ({ loyaltyPoints, spendablePoints, pointExpireString, language, }) => (h("div", { class: "PointsInfo" }, loyaltyPoints &&
|
|
8
|
+
h("div", { class: 'Points' }, loyaltyPoints, " ", h("sub", { class: "XP" }, translate('xp', language))), spendablePoints &&
|
|
9
|
+
h("div", { class: 'Points' }, spendablePoints, " ", h("sub", { class: "XP" }, translate('sp', language))), pointExpireString && (h("div", { class: 'ExpirationPoints' }, pointExpireString, " "))));
|
|
10
|
+
export const PlayerElevateCardRedeem = ({ language, onRedeemClick }) => (h("div", { class: "CardCell Redeem" }, h("div", { class: "RedeemButton", onClick: () => {
|
|
11
|
+
onRedeemClick();
|
|
12
|
+
} }, h("span", null, translate('redeem', language)))));
|
|
13
|
+
export const PlayerNameDiv = (props) => (h("div", { class: 'CardCell PlayerName Txt' }, props.playerName));
|
|
14
|
+
export 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" }, dateFnsFormat(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 })))))));
|
|
15
|
+
export const PlayerAvatar = (props) => {
|
|
16
|
+
const badge = props.loyaltyIconUrl
|
|
17
|
+
? h("img", { class: "Badge", src: props.loyaltyIconUrl })
|
|
18
|
+
: props.hideIfNull ? '' : h("div", { class: "Badge" });
|
|
19
|
+
const avatarSrc = props.playerAvatarUrl || getAssetPath('../static/user.svg');
|
|
20
|
+
return h("div", { class: "PlayerAvatar", style: { 'position': `${props.onlyBadge ? '' : 'relative'}` } }, !props.onlyBadge && h("img", { class: "Avatar", src: avatarSrc }), badge);
|
|
21
|
+
};
|
|
22
|
+
export const TextSpan = (props) => (h("div", { class: `${props.classValues}` }, props.textToShow));
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@container (max-width: 270px) {
|
|
2
|
+
.Card .Inner {
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
}
|
|
5
|
+
.Card .Inner .Content {
|
|
6
|
+
padding: 9px;
|
|
7
|
+
}
|
|
8
|
+
.Inner .Row .ExpirationPoints {
|
|
9
|
+
order: 1;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.Card .PlayerImg {
|
|
13
|
+
order: 0;
|
|
14
|
+
}
|
|
15
|
+
.Card .ExpirationPoints {
|
|
16
|
+
order: 3;
|
|
17
|
+
}
|
|
18
|
+
.Card .LevelInfo {
|
|
19
|
+
order: 2;
|
|
20
|
+
}
|
|
21
|
+
.Card .Inner .Row .PlayerImg {
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
.Card .Inner .Row .PointsInfo {
|
|
25
|
+
width: 100%;
|
|
26
|
+
text-align: center;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
max-height: 50%;
|
|
30
|
+
}
|
|
31
|
+
.Card .Inner .PlayerAvatar .Badge {
|
|
32
|
+
background-size: contain;
|
|
33
|
+
background-repeat: no-repeat;
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: 5px;
|
|
36
|
+
bottom: -5px;
|
|
37
|
+
width: 40%;
|
|
38
|
+
height: 40%;
|
|
39
|
+
overflow: visible;
|
|
40
|
+
}
|
|
41
|
+
.Card .Inner .Row .ExpirationPoints {
|
|
42
|
+
text-align: left;
|
|
43
|
+
color: var(--emfe-w-color-red, red);
|
|
44
|
+
}
|
|
45
|
+
.Card .Inner .Row .Points {
|
|
46
|
+
text-wrap: nowrap;
|
|
47
|
+
}
|
|
48
|
+
.Card .Inner .LevelInfo .ElevateLevel {
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
}
|
|
51
|
+
.Card .Inner .LevelInfo .ElevateLevel .LevelName {
|
|
52
|
+
width: calc(100% - 20px);
|
|
53
|
+
text-align: left;
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
padding-left: 20px;
|
|
56
|
+
margin: 10px 0;
|
|
57
|
+
}
|
|
58
|
+
.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {
|
|
59
|
+
text-align: center;
|
|
60
|
+
font-size: smaller;
|
|
61
|
+
}
|
|
62
|
+
.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {
|
|
63
|
+
margin-left: 5px;
|
|
64
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { h, Fragment, getAssetPath } from "@stencil/core";
|
|
2
|
+
import { PlayerAvatar, PlayerElevateCardRedeem, PlayerElevateLoyaltyLevel, PlayerLoyaltyProcess, PlayerNameDiv, PlayerPoints, } from "./player-elevate-card-items";
|
|
3
|
+
import { TRANSLATIONS } from "../../utils/locale.utils";
|
|
4
|
+
export class PlayerElevateCard {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.endpoint = undefined;
|
|
7
|
+
this.theme = 'Dark';
|
|
8
|
+
this.session = undefined;
|
|
9
|
+
this.playerAvatarUrl = undefined;
|
|
10
|
+
this.language = 'en';
|
|
11
|
+
this.playerName = undefined;
|
|
12
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
13
|
+
this.clientStyling = '';
|
|
14
|
+
this.clientStylingUrl = '';
|
|
15
|
+
this.translationUrl = '';
|
|
16
|
+
this.pointExpireString = undefined;
|
|
17
|
+
this.playerLevelFlag = 0;
|
|
18
|
+
this.playerElevateLevel = undefined;
|
|
19
|
+
this.elevateWalletTotal = undefined;
|
|
20
|
+
}
|
|
21
|
+
onSessionOrEndpointChange() {
|
|
22
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
23
|
+
}
|
|
24
|
+
playerElevateLeveLoadedHandler(event) {
|
|
25
|
+
if (!event.detail) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
29
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
30
|
+
}
|
|
31
|
+
if (event.detail['elevateLevel']) {
|
|
32
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
33
|
+
}
|
|
34
|
+
if (event.detail['pointExpireString']) {
|
|
35
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
36
|
+
}
|
|
37
|
+
if (event.detail.calculatedLevelFlag) {
|
|
38
|
+
this.playerLevelFlag = event.detail.calculatedLevelFlag;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
onRedeemClick() {
|
|
42
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
43
|
+
}
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
this.paramProxy = {
|
|
46
|
+
endpoint: this.endpoint,
|
|
47
|
+
session: this.session,
|
|
48
|
+
language: this.language,
|
|
49
|
+
calculateLevelFlag: true,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
54
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
55
|
+
return (h("div", { key: '278a328dd084ee73b2707b93a57bccae64a2c9c7', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '68c885baf533447a7c77fd887bbec11e53768277', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '4066253a70cdd5e712ca244a708e7c1600c83071', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '64cda2a267c752056b3c7e3134cc324fa96bc261', params: this.paramProxy }), h("div", { key: 'c63ae83b401a35f5a78acd83dc3d7296c25141d7', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, { key: 'ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c' }, h("div", { key: 'fa1bf74f45e28318c95266cc42c54541bde92718', class: 'Content Row' }, h("div", { key: '7ede46f91bcc0d894b2b633627a4ca97d15fbe90', class: "PlayerImg" }, h(PlayerAvatar, { key: 'b6d0bac085e0178512b8a63ba8fccae7d4cc8399', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { key: '88c445dbcd7dbe426a8de18beea02aecc03e26f3', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { key: '4d985e486ecb74a6c916b28e619de83cb3d77ac1', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { key: '34e051ee1ff79b825fca57db958e1e5684a0aca1', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { key: 'fa1b1f16e0b25c6adfba4c215e4ed377e05699b2', playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { key: '6d18b1422db202363ebcd56cc56946e0e071937b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, { key: '7dae355c4a5a9e28c70dced0ac061608f1753020' }), h(PlayerElevateCardRedeem, { key: '7e5f830b612c962a828c58f20a88dc97d315c910', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
56
|
+
}
|
|
57
|
+
static get is() { return "player-elevate-card"; }
|
|
58
|
+
static get encapsulation() { return "shadow"; }
|
|
59
|
+
static get originalStyleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["player-elevate-card.scss"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get styleUrls() {
|
|
65
|
+
return {
|
|
66
|
+
"$": ["player-elevate-card.css"]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get assetsDirs() { return ["../static"]; }
|
|
70
|
+
static get properties() {
|
|
71
|
+
return {
|
|
72
|
+
"endpoint": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "string",
|
|
77
|
+
"resolved": "string",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": true,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": "The NWA endpoint"
|
|
85
|
+
},
|
|
86
|
+
"attribute": "endpoint",
|
|
87
|
+
"reflect": true
|
|
88
|
+
},
|
|
89
|
+
"theme": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "string",
|
|
94
|
+
"resolved": "string",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "The style that widget shows,available value: Dark, Light\nDefault: Dark"
|
|
102
|
+
},
|
|
103
|
+
"attribute": "theme",
|
|
104
|
+
"reflect": true,
|
|
105
|
+
"defaultValue": "'Dark'"
|
|
106
|
+
},
|
|
107
|
+
"session": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "string",
|
|
112
|
+
"resolved": "string",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": true,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": "The NWA session for the logged-in user"
|
|
120
|
+
},
|
|
121
|
+
"attribute": "session",
|
|
122
|
+
"reflect": true
|
|
123
|
+
},
|
|
124
|
+
"playerAvatarUrl": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "string",
|
|
129
|
+
"resolved": "string",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Widget, player avatar url"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "player-avatar-url",
|
|
139
|
+
"reflect": true
|
|
140
|
+
},
|
|
141
|
+
"language": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Widget Language to show"
|
|
154
|
+
},
|
|
155
|
+
"attribute": "language",
|
|
156
|
+
"reflect": true,
|
|
157
|
+
"defaultValue": "'en'"
|
|
158
|
+
},
|
|
159
|
+
"playerName": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "string",
|
|
164
|
+
"resolved": "string",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": "Player name"
|
|
172
|
+
},
|
|
173
|
+
"attribute": "player-name",
|
|
174
|
+
"reflect": true
|
|
175
|
+
},
|
|
176
|
+
"dateFormat": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "string",
|
|
181
|
+
"resolved": "string",
|
|
182
|
+
"references": {}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": false,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": "datePattern"
|
|
189
|
+
},
|
|
190
|
+
"attribute": "date-format",
|
|
191
|
+
"reflect": true,
|
|
192
|
+
"defaultValue": "'yyyy-MM-dd'"
|
|
193
|
+
},
|
|
194
|
+
"clientStyling": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": "Client custom styling via inline styles"
|
|
207
|
+
},
|
|
208
|
+
"attribute": "client-styling",
|
|
209
|
+
"reflect": true,
|
|
210
|
+
"defaultValue": "''"
|
|
211
|
+
},
|
|
212
|
+
"clientStylingUrl": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "string",
|
|
217
|
+
"resolved": "string",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": "Client custom styling via url"
|
|
225
|
+
},
|
|
226
|
+
"attribute": "client-styling-url",
|
|
227
|
+
"reflect": true,
|
|
228
|
+
"defaultValue": "''"
|
|
229
|
+
},
|
|
230
|
+
"translationUrl": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "string",
|
|
235
|
+
"resolved": "string",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": false,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": "Translation via url"
|
|
243
|
+
},
|
|
244
|
+
"attribute": "translation-url",
|
|
245
|
+
"reflect": true,
|
|
246
|
+
"defaultValue": "''"
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
static get states() {
|
|
251
|
+
return {
|
|
252
|
+
"pointExpireString": {},
|
|
253
|
+
"playerLevelFlag": {},
|
|
254
|
+
"playerElevateLevel": {},
|
|
255
|
+
"elevateWalletTotal": {}
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
static get watchers() {
|
|
259
|
+
return [{
|
|
260
|
+
"propName": "session",
|
|
261
|
+
"methodName": "onSessionOrEndpointChange"
|
|
262
|
+
}, {
|
|
263
|
+
"propName": "endpoint",
|
|
264
|
+
"methodName": "onSessionOrEndpointChange"
|
|
265
|
+
}, {
|
|
266
|
+
"propName": "language",
|
|
267
|
+
"methodName": "onSessionOrEndpointChange"
|
|
268
|
+
}];
|
|
269
|
+
}
|
|
270
|
+
static get listeners() {
|
|
271
|
+
return [{
|
|
272
|
+
"name": "playerElevateLeveLoaded",
|
|
273
|
+
"method": "playerElevateLeveLoadedHandler",
|
|
274
|
+
"target": undefined,
|
|
275
|
+
"capture": false,
|
|
276
|
+
"passive": false
|
|
277
|
+
}];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 360px;
|
|
4
|
+
height: 230px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ElevateCardWrapper {
|
|
8
|
+
contain: layout inline-size;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: fit-content;
|
|
11
|
+
min-height: 218px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Outer {
|
|
15
|
+
container-type: inline-size;
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
background-size: cover;
|
|
18
|
+
background-repeat: no-repeat;
|
|
19
|
+
line-height: initial;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Dark {
|
|
25
|
+
color: var(--emfe-w-color-gray150, #efefef);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.Light {
|
|
29
|
+
color: var(--emfe-w-color-black, #0e0e0e);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@container (min-width: 381px) {
|
|
33
|
+
.Outer {
|
|
34
|
+
background-size: cover;
|
|
35
|
+
}
|
|
36
|
+
.Outer .OuterCover {
|
|
37
|
+
min-height: 190px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
@container (min-width: 260px) {
|
|
41
|
+
.Outer {
|
|
42
|
+
background-size: contain;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.OuterCover {
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
content: "";
|
|
49
|
+
background-repeat: no-repeat;
|
|
50
|
+
background-size: cover;
|
|
51
|
+
border-radius: 15px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.Inner {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
min-height: 158px;
|
|
58
|
+
}
|
|
59
|
+
.Inner .Content {
|
|
60
|
+
padding: 15px;
|
|
61
|
+
flex-wrap: wrap;
|
|
62
|
+
gap: 8px;
|
|
63
|
+
}
|
|
64
|
+
.Inner .Row {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: row;
|
|
67
|
+
}
|
|
68
|
+
.Inner .CardCell {
|
|
69
|
+
display: flex;
|
|
70
|
+
}
|
|
71
|
+
.Inner .LevelProgress svg {
|
|
72
|
+
transition: opacity 0.4s;
|
|
73
|
+
}
|
|
74
|
+
.Inner .LevelInfo {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
}
|
|
78
|
+
.Inner .LevelInfo .ElevateLevel .LevelName {
|
|
79
|
+
height: 28px;
|
|
80
|
+
border-radius: 5px;
|
|
81
|
+
line-height: 28px;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
text-overflow: ellipsis;
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
}
|
|
86
|
+
.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {
|
|
87
|
+
box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));
|
|
88
|
+
background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);
|
|
89
|
+
}
|
|
90
|
+
.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {
|
|
91
|
+
box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));
|
|
92
|
+
background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);
|
|
93
|
+
}
|
|
94
|
+
.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {
|
|
95
|
+
box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));
|
|
96
|
+
background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);
|
|
97
|
+
}
|
|
98
|
+
.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {
|
|
99
|
+
box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));
|
|
100
|
+
background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);
|
|
101
|
+
}
|
|
102
|
+
.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {
|
|
103
|
+
box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));
|
|
104
|
+
background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);
|
|
105
|
+
}
|
|
106
|
+
.Inner .LevelInfo .ElevateLevel {
|
|
107
|
+
display: flex;
|
|
108
|
+
}
|
|
109
|
+
.Inner .LevelInfo {
|
|
110
|
+
flex: 1;
|
|
111
|
+
flex-grow: 1;
|
|
112
|
+
min-width: 150px;
|
|
113
|
+
}
|
|
114
|
+
.Inner .PlayerImg {
|
|
115
|
+
width: 29%;
|
|
116
|
+
margin: auto;
|
|
117
|
+
max-width: 100px;
|
|
118
|
+
min-width: 30px;
|
|
119
|
+
order: 0;
|
|
120
|
+
}
|
|
121
|
+
.Inner .PlayerAvatar {
|
|
122
|
+
max-width: 100px;
|
|
123
|
+
flex-basis: 100px;
|
|
124
|
+
height: auto;
|
|
125
|
+
margin: auto;
|
|
126
|
+
padding-top: 10px;
|
|
127
|
+
}
|
|
128
|
+
.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {
|
|
129
|
+
width: 100%;
|
|
130
|
+
height: 100%;
|
|
131
|
+
}
|
|
132
|
+
.Inner .PlayerAvatar .Avatar {
|
|
133
|
+
border-radius: 50%;
|
|
134
|
+
background-size: contain;
|
|
135
|
+
background-repeat: no-repeat;
|
|
136
|
+
}
|
|
137
|
+
.Inner .ElevateLevel .ExpirationDate {
|
|
138
|
+
max-width: 138px;
|
|
139
|
+
min-width: 118px;
|
|
140
|
+
}
|
|
141
|
+
.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {
|
|
142
|
+
text-transform: capitalize;
|
|
143
|
+
width: 100%;
|
|
144
|
+
}
|
|
145
|
+
.Inner .PlayerName {
|
|
146
|
+
font-size: 16px;
|
|
147
|
+
}
|
|
148
|
+
.Inner .Row .PointsInfo {
|
|
149
|
+
display: table;
|
|
150
|
+
font-weight: 600;
|
|
151
|
+
}
|
|
152
|
+
.Inner .Row .Redeem {
|
|
153
|
+
justify-content: flex-end;
|
|
154
|
+
margin-left: auto;
|
|
155
|
+
}
|
|
156
|
+
.Inner .Row .Redeem:hover {
|
|
157
|
+
color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
}
|
|
160
|
+
.Inner .Row .RedeemButton:hover span {
|
|
161
|
+
color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);
|
|
162
|
+
font-weight: bold;
|
|
163
|
+
}
|
|
164
|
+
.Inner .Row .RedeemButton {
|
|
165
|
+
width: 95px;
|
|
166
|
+
height: 35px;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
border-radius: 10px;
|
|
170
|
+
background: var(--emfe-w-elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);
|
|
171
|
+
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);
|
|
172
|
+
}
|
|
173
|
+
.Inner .Row .RedeemButton span {
|
|
174
|
+
color: var(--emfe-w-color-white, #fff);
|
|
175
|
+
line-height: 18px;
|
|
176
|
+
font-size: 15px;
|
|
177
|
+
text-align: center;
|
|
178
|
+
width: 100%;
|
|
179
|
+
}
|
|
180
|
+
.Inner .Row .Points {
|
|
181
|
+
font-size: large;
|
|
182
|
+
vertical-align: middle;
|
|
183
|
+
}
|
|
184
|
+
.Inner .Row .Points .XP {
|
|
185
|
+
font-size: x-small;
|
|
186
|
+
}
|
|
187
|
+
.Inner .Row .ExpirationPoints {
|
|
188
|
+
font-size: small;
|
|
189
|
+
text-align: right;
|
|
190
|
+
font-weight: bold;
|
|
191
|
+
color: var(--emfe-w-color-red, #9e595f);
|
|
192
|
+
}
|