@everymatrix/casino-engagement-suite-challenges-details 1.40.0 → 1.42.0
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/casino-engagement-suite-challenges-details/casino-engagement-suite-challenges-details.esm.js +1 -1
- package/dist/casino-engagement-suite-challenges-details/{p-3bbbd16d.entry.js → p-3f962e1f.entry.js} +1 -1
- package/dist/cjs/casino-engagement-suite-challenges-details.cjs.js +1 -1
- package/dist/cjs/casino-engagement-suite-challenges-details_2.cjs.entry.js +15 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/components/casino-engagement-suite-progress-bar2.js +16 -3
- package/dist/esm/casino-engagement-suite-challenges-details.js +1 -1
- package/dist/esm/casino-engagement-suite-challenges-details_2.entry.js +15 -3
- package/dist/esm/loader.js +1 -1
- package/package.json +1 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-stencil/packages/casino-engagement-suite-challenges-details/.stencil/packages/casino-engagement-suite-challenges-details/stencil.config.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as i}from"./p-808a7dc5.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-3f962e1f",[[1,"casino-engagement-suite-challenges-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],challenge:[1040],inProgressChallenges:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],pausedChallengeIds:[1040],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32]}],[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
|
package/dist/casino-engagement-suite-challenges-details/{p-3bbbd16d.entry.js → p-3f962e1f.entry.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as l,g as a}from"./p-808a7dc5.js";const s=["en"],i={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",details:"Mission Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution"}},n=(e,t)=>{const l=t;return i[void 0!==l&&s.includes(l)?l:"en"][e]};var o,r;function h(e,t){return`${t}${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(o||(o={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(r||(r={}));const g=class{constructor(l){e(this,l),this.close=t(this,"close",7),this.back=t(this,"back",7),this.resetNewChallengeLabel=t(this,"resetNewChallengeLabel",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.resetNewLabel(),this.close.emit()},this.handleBackClick=()=>{this.resetNewLabel(),this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.changeChallengeStatus=e=>{var t,l;const a=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(a))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:a}):(null===(l=this.inProgressChallenges)||void 0===l?void 0:l.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:a,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:a}})},this.toggle=()=>{this.showDetails=!this.showDetails}}challengePropHandler(e){!this.interval&&e&&(this.updateTimer(),this.startCountdown()),this.interval&&!e&&clearInterval(this.interval)}componentWillLoad(){this.challengePropHandler(this.challenge)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getActionsTemplate(){return l("header",{class:"ChallengeActions"},l("button",{class:"ChallengeIconButton",onClick:this.handleBackClick},l("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),l("button",{class:"ChallengeIconButton",onClick:this.handleCloseClick},l("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getChallengeHeader(){const e=this.challenge.Status===r.InProgress||this.challenge.Status===r.PendingLevelReward;return l("div",{class:"ChallengeDetailsHeader"},l("span",{class:"ChallengeName"},this.challenge.ChallengePresentation.PresentationName),this.challenge.Status!==r.Completed?l("button",{onClick:this.changeChallengeStatus,class:`ChallengeJoinButton ${e?"Joined":""}\n ${this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId)?"Disabled":""}`,"data-id":this.challenge.Id},n(e?"unjoin":"join",this.language)):null,l("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},l("span",null,n("new",this.language))))}getChallengeCountdown(){return l("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer)}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,t=this.challenge.ChallengePresentation.Url,a=this.challenge.Games;return l("div",{class:"CollapseDetails "+(this.showDetails?"ShowDetails":"")},e&&l("div",{class:"ChallengeDescription"},e),t&&l("div",{class:"TC"},l("a",{href:t,target:"_blank"},n("tc",this.language))),(null==a?void 0:a.length)&&l("div",{class:"ChallengeGames"},a.map((e=>l("div",{class:"Game",key:e.CasinoGameId},l("img",{src:e.GameIcon,alt:e.GameName,onClick:this.onGameClick,class:e.GameSlug===this.gameSlug?"Disabled":"","data-slug":e.GameSlug}))))))}resetNewLabel(){this.resetNewChallengeLabel.emit(this.challenge.Id)}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.challenge.ExpirationTime).getTime()-(new Date).getTime();if(e<1)return clearInterval(this.interval),this.timer="",void(this.isExpiredChallenge=!0);const{days:t,hours:l,minutes:a,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${l}h:${a}m:${s}s`:`${t}d:${l}h:${a}m`}getLevelTarget(e){const t=h(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let a=`${n("place",this.language)} ${t}`;return 1===e.LevelTargetType?a+=` ${n("bet",this.language)}`:2===e.LevelTargetType&&(a+=` ${n("bets",this.language)} X ${e.TargetBetCount}`),l("span",{class:"ChallengeLevelTarget"},a)}getLevelBetRangesDetails(e){var t,a,s,i;if(0===e.LevelTargetType){const o=h(null===(t=e.BetRange)||void 0===t?void 0:t.MinBet,this.challenge.CurrencySymbol),r=h(null===(a=e.BetRange)||void 0===a?void 0:a.MaxBet,this.challenge.CurrencySymbol),g=e.LevelContributionPercent+"%",p=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MinBet),d=!!(null===(i=e.BetRange)||void 0===i?void 0:i.MaxBet),c=100!==e.LevelContributionPercent;if(p||d||c)return l("div",{class:"ChallengeLevelBetDetails"},p&&l("div",{class:"ChallengeLevelBetDetail"},l("span",null,n("minBet",this.language),": "),l("span",{class:"ChallengeLevelBetRange"},o)),d&&l("div",{class:"ChallengeLevelBetDetail"},l("span",null,n("maxBet",this.language),": "),l("span",{class:"ChallengeLevelBetRange"},r)),c&&l("div",{class:"ChallengeLevelBetDetail"},l("span",null,n("contribution",this.language),": "),l("span",{class:"ChallengeLevelBetContribution"},g)))}}getChallengeLevels(){const e=this.pausedChallengeIds.includes(this.challenge.ChallengeId),t=t=>1===t.ProgressStatus&&!this.isExpiredChallenge&&!e;return l("div",{class:"ChallengeLevels"},this.challenge.LevelProgresses.map(((a,s)=>l("div",{class:"ChallengeLevelCard "+(t(a)?"InProgress":"")},l("casino-engagement-suite-progress-bar",{class:this.device,value:a.ProgressPercentage,"hide-percent":0===a.ProgressPercentage&&!t(a)||100===a.ProgressPercentage,disabled:this.isExpiredChallenge||e},l("span",{slot:"Title",class:"ChallengeLevelTitle"},l("span",null,"Level ",s+1,": "),this.getLevelTarget(a))),l("div",{class:"ChallengeRewardMessage"},l("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg",alt:"win"}),l("span",null,n("win",this.language),": "),l("span",{class:"CustomRewardMessage"},a.CustomRewardMessage)),this.getLevelBetRangesDetails(a)))))}getToggleButton(){return l("div",{class:"ChallengeCollapseButton",onClick:this.toggle},l("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),l("span",null,n("details",this.language)))}render(){return l("div",{class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),l("div",{class:"ChallengeDetails "+(this.challenge.IsNew?"IsNewChallenge":"")},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return a(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};g.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap"); :host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeActions .ChallengeIconButton{width:16px;height:16px;cursor:pointer}.ChallengeActions .ChallengeIconButton img{width:100%;height:100%}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-word}.ChallengeJoinButton.Joined::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-gray-150, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.ChallengeCollapseButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emfe-w-color-white, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:4px;background-color:var(--emw--color-background, #666178)}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:2px;cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emfe-w-color-white, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:8px;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .ChallengeIconButton,.ChallengeDetailsPopup.Desktop .ChallengeIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengeDetailsPopup.Tablet .ChallengeJoinButton,.ChallengeDetailsPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}';const p=class{constructor(t){e(this,t),this.value=0,this.disabled=!1,this.hidePercent=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent}}render(){return l("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},l("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},l("slot",{name:"Title"},l("div",null)),l("slot",{name:"Percent"},l("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),l("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},l("div",{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})))}get host(){return a(this)}};p.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";export{g as casino_engagement_suite_challenges_details,p as casino_engagement_suite_progress_bar}
|
|
1
|
+
import{r as e,c as t,h as l,g as a}from"./p-808a7dc5.js";const s=["en"],i={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",details:"Mission Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution"}},n=(e,t)=>{const l=t;return i[void 0!==l&&s.includes(l)?l:"en"][e]};var o,r;function h(e,t){return`${t}${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(o||(o={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(r||(r={}));const g=class{constructor(l){e(this,l),this.close=t(this,"close",7),this.back=t(this,"back",7),this.resetNewChallengeLabel=t(this,"resetNewChallengeLabel",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.resetNewLabel(),this.close.emit()},this.handleBackClick=()=>{this.resetNewLabel(),this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.changeChallengeStatus=e=>{var t,l;const a=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(a))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:a}):(null===(l=this.inProgressChallenges)||void 0===l?void 0:l.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:a,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:a}})},this.toggle=()=>{this.showDetails=!this.showDetails}}challengePropHandler(e){!this.interval&&e&&(this.updateTimer(),this.startCountdown()),this.interval&&!e&&clearInterval(this.interval)}componentWillLoad(){this.challengePropHandler(this.challenge)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getActionsTemplate(){return l("header",{class:"ChallengeActions"},l("button",{class:"ChallengeIconButton",onClick:this.handleBackClick},l("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),l("button",{class:"ChallengeIconButton",onClick:this.handleCloseClick},l("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getChallengeHeader(){const e=this.challenge.Status===r.InProgress||this.challenge.Status===r.PendingLevelReward;return l("div",{class:"ChallengeDetailsHeader"},l("span",{class:"ChallengeName"},this.challenge.ChallengePresentation.PresentationName),this.challenge.Status!==r.Completed?l("button",{onClick:this.changeChallengeStatus,class:`ChallengeJoinButton ${e?"Joined":""}\n ${this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId)?"Disabled":""}`,"data-id":this.challenge.Id},n(e?"unjoin":"join",this.language)):null,l("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},l("span",null,n("new",this.language))))}getChallengeCountdown(){return l("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer)}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,t=this.challenge.ChallengePresentation.Url,a=this.challenge.Games;return l("div",{class:"CollapseDetails "+(this.showDetails?"ShowDetails":"")},e&&l("div",{class:"ChallengeDescription"},e),t&&l("div",{class:"TC"},l("a",{href:t,target:"_blank"},n("tc",this.language))),(null==a?void 0:a.length)&&l("div",{class:"ChallengeGames"},a.map((e=>l("div",{class:"Game",key:e.CasinoGameId},l("img",{src:e.GameIcon,alt:e.GameName,onClick:this.onGameClick,class:e.GameSlug===this.gameSlug?"Disabled":"","data-slug":e.GameSlug}))))))}resetNewLabel(){this.resetNewChallengeLabel.emit(this.challenge.Id)}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.challenge.ExpirationTime).getTime()-(new Date).getTime();if(e<1)return clearInterval(this.interval),this.timer="",void(this.isExpiredChallenge=!0);const{days:t,hours:l,minutes:a,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${l}h:${a}m:${s}s`:`${t}d:${l}h:${a}m`}getLevelTarget(e){const t=h(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let a=`${n("place",this.language)} ${t}`;return 1===e.LevelTargetType?a+=` ${n("bet",this.language)}`:2===e.LevelTargetType&&(a+=` ${n("bets",this.language)} X ${e.TargetBetCount}`),l("span",{class:"ChallengeLevelTarget"},a)}getLevelBetRangesDetails(e){var t,a,s,i;if(0===e.LevelTargetType){const o=h(null===(t=e.BetRange)||void 0===t?void 0:t.MinBet,this.challenge.CurrencySymbol),r=h(null===(a=e.BetRange)||void 0===a?void 0:a.MaxBet,this.challenge.CurrencySymbol),g=e.LevelContributionPercent+"%",p=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MinBet),d=!!(null===(i=e.BetRange)||void 0===i?void 0:i.MaxBet),c=100!==e.LevelContributionPercent;if(p||d||c)return l("div",{class:"ChallengeLevelBetDetails"},p&&l("div",{class:"ChallengeLevelBetDetail"},l("span",null,n("minBet",this.language),": "),l("span",{class:"ChallengeLevelBetRange"},o)),d&&l("div",{class:"ChallengeLevelBetDetail"},l("span",null,n("maxBet",this.language),": "),l("span",{class:"ChallengeLevelBetRange"},r)),c&&l("div",{class:"ChallengeLevelBetDetail"},l("span",null,n("contribution",this.language),": "),l("span",{class:"ChallengeLevelBetContribution"},g)))}}getChallengeLevels(){const e=this.pausedChallengeIds.includes(this.challenge.ChallengeId),t=t=>1===t.ProgressStatus&&!this.isExpiredChallenge&&!e;return l("div",{class:"ChallengeLevels"},this.challenge.LevelProgresses.map(((a,s)=>l("div",{class:"ChallengeLevelCard "+(t(a)?"InProgress":"")},l("casino-engagement-suite-progress-bar",{class:this.device,value:a.ProgressPercentage,"hide-percent":0===a.ProgressPercentage&&!t(a)||100===a.ProgressPercentage,disabled:this.isExpiredChallenge||e},l("span",{slot:"Title",class:"ChallengeLevelTitle"},l("span",null,"Level ",s+1,": "),this.getLevelTarget(a))),l("div",{class:"ChallengeRewardMessage"},l("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg",alt:"win"}),l("span",null,n("win",this.language),": "),l("span",{class:"CustomRewardMessage"},a.CustomRewardMessage)),this.getLevelBetRangesDetails(a)))))}getToggleButton(){return l("div",{class:"ChallengeCollapseButton",onClick:this.toggle},l("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),l("span",null,n("details",this.language)))}render(){return l("div",{class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),l("div",{class:"ChallengeDetails "+(this.challenge.IsNew?"IsNewChallenge":"")},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return a(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};g.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap"); :host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeActions .ChallengeIconButton{width:16px;height:16px;cursor:pointer}.ChallengeActions .ChallengeIconButton img{width:100%;height:100%}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-23px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-word}.ChallengeJoinButton.Joined::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeJoinButton{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-gray-150, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.ChallengeCollapseButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emfe-w-color-white, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:4px;background-color:var(--emw--color-background, #666178)}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:2px;cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emfe-w-color-white, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:8px;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .ChallengeIconButton,.ChallengeDetailsPopup.Desktop .ChallengeIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengeDetailsPopup.Tablet .ChallengeJoinButton,.ChallengeDetailsPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}';const p=class{constructor(t){e(this,t),this.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent||this.indeterminate}}getProgressBarLineTemplate(){return l("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return l("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},l("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},l("slot",{name:"Title"},l("div",null)),l("slot",{name:"Percent"},l("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),l("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return a(this)}};p.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";export{g as casino_engagement_suite_challenges_details,p as casino_engagement_suite_progress_bar}
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["casino-engagement-suite-challenges-details_2.cjs",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["casino-engagement-suite-challenges-details_2.cjs",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -278,7 +278,7 @@ const CasinoEngagementSuiteChallengesDetails = class {
|
|
|
278
278
|
};
|
|
279
279
|
CasinoEngagementSuiteChallengesDetails.style = casinoEngagementSuiteChallengesDetailsCss;
|
|
280
280
|
|
|
281
|
-
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
281
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
282
282
|
|
|
283
283
|
const CasinoEngagementSuiteProgressBar = class {
|
|
284
284
|
constructor(hostRef) {
|
|
@@ -295,6 +295,10 @@ const CasinoEngagementSuiteProgressBar = class {
|
|
|
295
295
|
* Hide percent value
|
|
296
296
|
*/
|
|
297
297
|
this.hidePercent = false;
|
|
298
|
+
/**
|
|
299
|
+
* Constantly animates
|
|
300
|
+
*/
|
|
301
|
+
this.indeterminate = false;
|
|
298
302
|
/**
|
|
299
303
|
* Client custom styling via string
|
|
300
304
|
*/
|
|
@@ -337,11 +341,19 @@ const CasinoEngagementSuiteProgressBar = class {
|
|
|
337
341
|
ProgressBar: true,
|
|
338
342
|
Completed: this.value === 100,
|
|
339
343
|
Disabled: this.disabled,
|
|
340
|
-
HidePercent: this.hidePercent
|
|
344
|
+
HidePercent: this.hidePercent || this.indeterminate
|
|
341
345
|
};
|
|
342
346
|
}
|
|
347
|
+
getProgressBarLineTemplate() {
|
|
348
|
+
if (this.indeterminate) {
|
|
349
|
+
return index.h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
return index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
|
|
353
|
+
}
|
|
354
|
+
}
|
|
343
355
|
render() {
|
|
344
|
-
return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" },
|
|
356
|
+
return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
|
|
345
357
|
}
|
|
346
358
|
get host() { return index.getElement(this); }
|
|
347
359
|
};
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["casino-engagement-suite-challenges-details_2.cjs",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["casino-engagement-suite-challenges-details_2.cjs",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
3
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
4
4
|
|
|
5
5
|
const CasinoEngagementSuiteProgressBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -19,6 +19,10 @@ const CasinoEngagementSuiteProgressBar = /*@__PURE__*/ proxyCustomElement(class
|
|
|
19
19
|
* Hide percent value
|
|
20
20
|
*/
|
|
21
21
|
this.hidePercent = false;
|
|
22
|
+
/**
|
|
23
|
+
* Constantly animates
|
|
24
|
+
*/
|
|
25
|
+
this.indeterminate = false;
|
|
22
26
|
/**
|
|
23
27
|
* Client custom styling via string
|
|
24
28
|
*/
|
|
@@ -61,11 +65,19 @@ const CasinoEngagementSuiteProgressBar = /*@__PURE__*/ proxyCustomElement(class
|
|
|
61
65
|
ProgressBar: true,
|
|
62
66
|
Completed: this.value === 100,
|
|
63
67
|
Disabled: this.disabled,
|
|
64
|
-
HidePercent: this.hidePercent
|
|
68
|
+
HidePercent: this.hidePercent || this.indeterminate
|
|
65
69
|
};
|
|
66
70
|
}
|
|
71
|
+
getProgressBarLineTemplate() {
|
|
72
|
+
if (this.indeterminate) {
|
|
73
|
+
return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
67
79
|
render() {
|
|
68
|
-
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" },
|
|
80
|
+
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
|
|
69
81
|
}
|
|
70
82
|
get host() { return this; }
|
|
71
83
|
static get style() { return casinoEngagementSuiteProgressBarCss; }
|
|
@@ -73,6 +85,7 @@ const CasinoEngagementSuiteProgressBar = /*@__PURE__*/ proxyCustomElement(class
|
|
|
73
85
|
"value": [2],
|
|
74
86
|
"disabled": [4],
|
|
75
87
|
"hidePercent": [4, "hide-percent"],
|
|
88
|
+
"indeterminate": [4],
|
|
76
89
|
"clientStyling": [513, "client-styling"],
|
|
77
90
|
"clientStylingUrl": [513, "client-styling-url"],
|
|
78
91
|
"limitStylingAppends": [32]
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-engagement-suite-challenges-details_2",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["casino-engagement-suite-challenges-details_2",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -274,7 +274,7 @@ const CasinoEngagementSuiteChallengesDetails = class {
|
|
|
274
274
|
};
|
|
275
275
|
CasinoEngagementSuiteChallengesDetails.style = casinoEngagementSuiteChallengesDetailsCss;
|
|
276
276
|
|
|
277
|
-
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
277
|
+
const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
|
|
278
278
|
|
|
279
279
|
const CasinoEngagementSuiteProgressBar = class {
|
|
280
280
|
constructor(hostRef) {
|
|
@@ -291,6 +291,10 @@ const CasinoEngagementSuiteProgressBar = class {
|
|
|
291
291
|
* Hide percent value
|
|
292
292
|
*/
|
|
293
293
|
this.hidePercent = false;
|
|
294
|
+
/**
|
|
295
|
+
* Constantly animates
|
|
296
|
+
*/
|
|
297
|
+
this.indeterminate = false;
|
|
294
298
|
/**
|
|
295
299
|
* Client custom styling via string
|
|
296
300
|
*/
|
|
@@ -333,11 +337,19 @@ const CasinoEngagementSuiteProgressBar = class {
|
|
|
333
337
|
ProgressBar: true,
|
|
334
338
|
Completed: this.value === 100,
|
|
335
339
|
Disabled: this.disabled,
|
|
336
|
-
HidePercent: this.hidePercent
|
|
340
|
+
HidePercent: this.hidePercent || this.indeterminate
|
|
337
341
|
};
|
|
338
342
|
}
|
|
343
|
+
getProgressBarLineTemplate() {
|
|
344
|
+
if (this.indeterminate) {
|
|
345
|
+
return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
|
|
349
|
+
}
|
|
350
|
+
}
|
|
339
351
|
render() {
|
|
340
|
-
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" },
|
|
352
|
+
return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
|
|
341
353
|
}
|
|
342
354
|
get host() { return getElement(this); }
|
|
343
355
|
};
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-engagement-suite-challenges-details_2",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["casino-engagement-suite-challenges-details_2",[[1,"casino-engagement-suite-challenges-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"challenge":[1040],"inProgressChallenges":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"pausedChallengeIds":[1040],"limitStylingAppends":[32],"timer":[32],"showDetails":[32],"isExpiredChallenge":[32]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
package/package.json
CHANGED