@everymatrix/bonus-elevate-shop-item
Advanced tools
Comparing version 1.37.4 to 1.37.5
@@ -1,1 +0,1 @@ | ||
import{p as e,b as s}from"./p-b5f2af9b.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>s([["p-61b101cd",[[1,"bonus-elevate-shop-item",{endpoint:[513],language:[513],itemId:[1537,"item-id"],elevateGift:[1040],session:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],isGiftNotFound:[32],redeemErrorMsg:[32],isRedeeming:[32]}],[0,"bonus-elevate-shop-assets-slider",{showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],itemsPerPage:[514,"items-per-page"],sliderItems:[16],activeIndex:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],e))); | ||
import{p as e,b as s}from"./p-84e222d1.js";(()=>{const s=import.meta.url,t={};return""!==s&&(t.resourcesUrl=new URL(".",s).href),e(t)})().then((e=>s([["p-c8d51d14",[[1,"bonus-elevate-shop-item",{endpoint:[513],language:[513],itemId:[1537,"item-id"],elevateGift:[1040],session:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],isGiftNotFound:[32],redeemErrorMsg:[32],isRedeeming:[32]}],[0,"bonus-elevate-shop-assets-slider",{showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],itemsPerPage:[514,"items-per-page"],sliderItems:[16],activeIndex:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],e))); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const index = require('./index-e516a37b.js'); | ||
const index = require('./index-44774988.js'); | ||
@@ -241,3 +241,3 @@ const BonusElevateShopAssetsSlider = class { | ||
const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}"; | ||
const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}"; | ||
@@ -274,4 +274,14 @@ const BonusElevateShopItem = class { | ||
this.isRedeeming = false; | ||
this.bindedHandler = this.handleMessage.bind(this); | ||
this.deviceType = getDevicePlatform(); | ||
} | ||
redeemGiftConfirm() { | ||
window.postMessage({ type: 'BEERedeemConfirm', shopItem: this.elevateGift }, window.location.href); | ||
} | ||
handleMessage(message) { | ||
if (message.data && message.data.type === "bee-redeem-confirmed" && | ||
message.data.id == this.elevateGift.id) { | ||
this.redeemGift(); | ||
} | ||
} | ||
onBackClicked() { | ||
@@ -299,3 +309,3 @@ window.postMessage({ type: 'OnGiftDetailsBackButtonClicked' }, window.location.href); | ||
if (res.success) { | ||
window.postMessage({ type: 'BEEGiftClaimed', itemId: this.elevateGift.id }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href); | ||
} | ||
@@ -305,4 +315,3 @@ else { | ||
this.redeemErrorMsg = translatedError ? translatedError : translate('redeemFailed', this.language); | ||
console.error('RedeemFailed', res); | ||
window.postMessage({ type: 'BEEGiftClaimFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeemFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
} | ||
@@ -341,2 +350,8 @@ }) | ||
} | ||
disconnectedCallback() { | ||
window.removeEventListener('message', this.bindedHandler, false); | ||
} | ||
componentDidLoad() { | ||
window.addEventListener('message', this.bindedHandler, false); | ||
} | ||
async componentWillLoad() { | ||
@@ -357,3 +372,3 @@ if (this.translationUrl.length > 2) { | ||
} }, '<')), index.h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && index.h(index.Fragment, null, index.h("div", { class: "ThumbnailRow" }, index.h("div", { class: 'Row' }, index.h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), index.h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), index.h("div", { class: 'Col Details' }, index.h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), index.h("div", { class: "GiftPoints" }, index.h("span", { class: "Points" }, this.elevateGift.points, " "), index.h("span", { class: " PointsLabel" }, translate('points', this.language))))), index.h("div", { class: 'ShopItemDetail Details' }, index.h("div", { class: "GiftPresentation" }, index.h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), index.h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''} | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGift.bind(this) }, translate('redeem', this.language)), index.h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " ")))))); | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), index.h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " ")))))); | ||
} | ||
@@ -360,0 +375,0 @@ }; |
'use strict'; | ||
const index = require('./index-e516a37b.js'); | ||
const index = require('./index-44774988.js'); | ||
@@ -5,0 +5,0 @@ /* |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const index = require('./index-e516a37b.js'); | ||
const index = require('./index-44774988.js'); | ||
@@ -8,0 +8,0 @@ /* |
@@ -34,4 +34,14 @@ import { Component, Fragment, h, Host, Prop, State } from '@stencil/core'; | ||
this.isRedeeming = false; | ||
this.bindedHandler = this.handleMessage.bind(this); | ||
this.deviceType = getDevicePlatform(); | ||
} | ||
redeemGiftConfirm() { | ||
window.postMessage({ type: 'BEERedeemConfirm', shopItem: this.elevateGift }, window.location.href); | ||
} | ||
handleMessage(message) { | ||
if (message.data && message.data.type === "bee-redeem-confirmed" && | ||
message.data.id == this.elevateGift.id) { | ||
this.redeemGift(); | ||
} | ||
} | ||
onBackClicked() { | ||
@@ -59,3 +69,3 @@ window.postMessage({ type: 'OnGiftDetailsBackButtonClicked' }, window.location.href); | ||
if (res.success) { | ||
window.postMessage({ type: 'BEEGiftClaimed', itemId: this.elevateGift.id }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href); | ||
} | ||
@@ -65,4 +75,3 @@ else { | ||
this.redeemErrorMsg = translatedError ? translatedError : translate('redeemFailed', this.language); | ||
console.error('RedeemFailed', res); | ||
window.postMessage({ type: 'BEEGiftClaimFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeemFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
} | ||
@@ -101,2 +110,8 @@ }) | ||
} | ||
disconnectedCallback() { | ||
window.removeEventListener('message', this.bindedHandler, false); | ||
} | ||
componentDidLoad() { | ||
window.addEventListener('message', this.bindedHandler, false); | ||
} | ||
async componentWillLoad() { | ||
@@ -141,3 +156,3 @@ if (this.translationUrl.length > 2) { | ||
h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''} | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGift.bind(this) }, translate('redeem', this.language)), | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), | ||
h("span", { class: 'RedeemError Error' }, | ||
@@ -144,0 +159,0 @@ " ", |
@@ -103,3 +103,3 @@ import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client'; | ||
const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}"; | ||
const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}"; | ||
@@ -138,4 +138,14 @@ const BonusElevateShopItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement { | ||
this.isRedeeming = false; | ||
this.bindedHandler = this.handleMessage.bind(this); | ||
this.deviceType = getDevicePlatform(); | ||
} | ||
redeemGiftConfirm() { | ||
window.postMessage({ type: 'BEERedeemConfirm', shopItem: this.elevateGift }, window.location.href); | ||
} | ||
handleMessage(message) { | ||
if (message.data && message.data.type === "bee-redeem-confirmed" && | ||
message.data.id == this.elevateGift.id) { | ||
this.redeemGift(); | ||
} | ||
} | ||
onBackClicked() { | ||
@@ -163,3 +173,3 @@ window.postMessage({ type: 'OnGiftDetailsBackButtonClicked' }, window.location.href); | ||
if (res.success) { | ||
window.postMessage({ type: 'BEEGiftClaimed', itemId: this.elevateGift.id }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href); | ||
} | ||
@@ -169,4 +179,3 @@ else { | ||
this.redeemErrorMsg = translatedError ? translatedError : translate('redeemFailed', this.language); | ||
console.error('RedeemFailed', res); | ||
window.postMessage({ type: 'BEEGiftClaimFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeemFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
} | ||
@@ -205,2 +214,8 @@ }) | ||
} | ||
disconnectedCallback() { | ||
window.removeEventListener('message', this.bindedHandler, false); | ||
} | ||
componentDidLoad() { | ||
window.addEventListener('message', this.bindedHandler, false); | ||
} | ||
async componentWillLoad() { | ||
@@ -221,3 +236,3 @@ if (this.translationUrl.length > 2) { | ||
} }, '<')), h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, null, h("div", { class: "ThumbnailRow" }, h("div", { class: 'Row' }, h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { class: 'Col Details' }, h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { class: "GiftPoints" }, h("span", { class: "Points" }, this.elevateGift.points, " "), h("span", { class: " PointsLabel" }, translate('points', this.language))))), h("div", { class: 'ShopItemDetail Details' }, h("div", { class: "GiftPresentation" }, h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''} | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGift.bind(this) }, translate('redeem', this.language)), h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " ")))))); | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " ")))))); | ||
} | ||
@@ -224,0 +239,0 @@ static get style() { return bonusElevateShopItemCss; } |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, h, g as getElement, F as Fragment, H as Host } from './index-46c1a945.js'; | ||
import { r as registerInstance, h, g as getElement, F as Fragment, H as Host } from './index-dbb9b7c5.js'; | ||
@@ -236,3 +236,3 @@ const BonusElevateShopAssetsSlider = class { | ||
const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}"; | ||
const bonusElevateShopItemCss = ":host{display:block}.ElevateDetails{display:flex;flex-direction:row;flex-wrap:wrap;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emfe-w-color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:20px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:#e3dede}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emfe-w-color-gray-300, #4e5a37);font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton:hover{font-weight:800;border:2px solid var(--emfe-w-color-gray-300, #e5e7d5)}.ElevateDetails .RedeemButton.Disabled:hover{font-weight:normal;border:2px solid transparent}.ElevateDetails .RedeemButton{margin-top:50px;color:#f1f1f1;font-size:20px;padding:16px 25px 16px 25px;border-radius:18px;text-align:center;cursor:pointer;background:linear-gradient(0deg, #26CC37, #26CC37), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);border:2px solid;border-image-source:linear-gradient(283.85deg, rgba(190, 40, 40, 0.5) 0%, rgba(56, 64, 179, 0) 33.47%);box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25)}.ElevateDetails .RedeemButton.DkButton{width:80px;padding:8px;font-size:16px;border-radius:5px}.ElevateDetails .RedeemButton.Disabled{background:linear-gradient(0deg, #b8c4b9, #9eb0a0), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%)}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:#efefef;border:1px solid #efefef;border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emfe-w-color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emfe-w-color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emfe-w-color-secondary, #FD2839);pointer-events:none}"; | ||
@@ -269,4 +269,14 @@ const BonusElevateShopItem = class { | ||
this.isRedeeming = false; | ||
this.bindedHandler = this.handleMessage.bind(this); | ||
this.deviceType = getDevicePlatform(); | ||
} | ||
redeemGiftConfirm() { | ||
window.postMessage({ type: 'BEERedeemConfirm', shopItem: this.elevateGift }, window.location.href); | ||
} | ||
handleMessage(message) { | ||
if (message.data && message.data.type === "bee-redeem-confirmed" && | ||
message.data.id == this.elevateGift.id) { | ||
this.redeemGift(); | ||
} | ||
} | ||
onBackClicked() { | ||
@@ -294,3 +304,3 @@ window.postMessage({ type: 'OnGiftDetailsBackButtonClicked' }, window.location.href); | ||
if (res.success) { | ||
window.postMessage({ type: 'BEEGiftClaimed', itemId: this.elevateGift.id }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeem', itemId: this.elevateGift.id }, window.location.href); | ||
} | ||
@@ -300,4 +310,3 @@ else { | ||
this.redeemErrorMsg = translatedError ? translatedError : translate('redeemFailed', this.language); | ||
console.error('RedeemFailed', res); | ||
window.postMessage({ type: 'BEEGiftClaimFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
window.postMessage({ type: 'BEEGiftRedeemFailed', itemId: this.elevateGift.id, res }, window.location.href); | ||
} | ||
@@ -336,2 +345,8 @@ }) | ||
} | ||
disconnectedCallback() { | ||
window.removeEventListener('message', this.bindedHandler, false); | ||
} | ||
componentDidLoad() { | ||
window.addEventListener('message', this.bindedHandler, false); | ||
} | ||
async componentWillLoad() { | ||
@@ -352,3 +367,3 @@ if (this.translationUrl.length > 2) { | ||
} }, '<')), h("div", { class: "Thumnails GiftNotFound" }, translate('noDataFound', this.language), "."))), this.elevateGift && h(Fragment, null, h("div", { class: "ThumbnailRow" }, h("div", { class: 'Row' }, h("div", { class: "BackButton", onClick: () => { this.onBackClicked(); } }, '<'), h("bonus-elevate-shop-assets-slider", { class: 'Thumbnails', itemsPerPage: 1, sliderItems: this.elevateGift.presentation.assets, showSliderDots: this.showSliderDots })), h("div", { class: 'Col Details' }, h("h3", { class: "GiftName" }, this.elevateGift.presentation.displayName || this.elevateGift.displayName), h("div", { class: "GiftPoints" }, h("span", { class: "Points" }, this.elevateGift.points, " "), h("span", { class: " PointsLabel" }, translate('points', this.language))))), h("div", { class: 'ShopItemDetail Details' }, h("div", { class: "GiftPresentation" }, h("p", null, this.elevateGift.presentation.description ? this.elevateGift.presentation.description : translate('noGiftPresentation', this.language))), h("div", { class: `RedeemButton ${this.elevateGift.available === 'false' || this.isRedeeming ? 'Disabled' : ''} | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGift.bind(this) }, translate('redeem', this.language)), h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " ")))))); | ||
${this.deviceType == 'dk' ? 'DkButton' : ''}`, onClick: this.redeemGiftConfirm.bind(this) }, translate('redeem', this.language)), h("span", { class: 'RedeemError Error' }, " ", this.redeemErrorMsg, " ")))))); | ||
} | ||
@@ -355,0 +370,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { p as promiseResolve, b as bootstrapLazy } from './index-46c1a945.js'; | ||
import { p as promiseResolve, b as bootstrapLazy } from './index-dbb9b7c5.js'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -1,2 +0,2 @@ | ||
import { p as promiseResolve, b as bootstrapLazy } from './index-46c1a945.js'; | ||
import { p as promiseResolve, b as bootstrapLazy } from './index-dbb9b7c5.js'; | ||
@@ -3,0 +3,0 @@ /* |
@@ -47,8 +47,13 @@ import '@everymatrix/general-styling-wrapper'; | ||
isRedeeming: boolean; | ||
private bindedHandler; | ||
deviceType: string; | ||
redeemGiftConfirm(): void; | ||
private handleMessage; | ||
onBackClicked(): void; | ||
redeemGift(): void; | ||
loadElevateGift(): Promise<void>; | ||
disconnectedCallback(): void; | ||
componentDidLoad(): void; | ||
componentWillLoad(): Promise<void>; | ||
render(): any; | ||
} |
{ | ||
"name": "@everymatrix/bonus-elevate-shop-item", | ||
"version": "1.37.4", | ||
"version": "1.37.5", | ||
"main": "./dist/index.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
458360
8171