@everymatrix/casino-engagement-suite-jackpots-list 1.41.0 → 1.43.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-jackpots-list/casino-engagement-suite-jackpots-list.esm.js +1 -1
- package/dist/casino-engagement-suite-jackpots-list/p-f0590452.entry.js +1 -0
- package/dist/cjs/casino-engagement-suite-jackpots-list.cjs.entry.js +17 -17
- package/dist/collection/components/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.css +19 -1
- package/dist/collection/components/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.js +25 -20
- package/dist/collection/utils/locale.utils.js +1 -0
- package/dist/components/casino-engagement-suite-jackpots-list.js +17 -17
- package/dist/esm/casino-engagement-suite-jackpots-list.entry.js +17 -17
- package/dist/types/components/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.d.ts +2 -3
- package/package.json +1 -1
- package/dist/casino-engagement-suite-jackpots-list/p-6a0c9095.entry.js +0 -1
- /package/dist/types/Users/{adrian.pripon/Documents/Work → sebastian.strulea/Documents/work}/widgets-stencil/packages/casino-engagement-suite-jackpots-list/.stencil/packages/casino-engagement-suite-jackpots-list/stencil.config.d.ts +0 -0
package/dist/casino-engagement-suite-jackpots-list/casino-engagement-suite-jackpots-list.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as i}from"./p-d22cb483.js";(()=>{const i=import.meta.url,e={};return""!==i&&(e.resourcesUrl=new URL(".",i).href),t(e)})().then((t=>i([["p-
|
|
1
|
+
import{p as t,b as i}from"./p-d22cb483.js";(()=>{const i=import.meta.url,e={};return""!==i&&(e.resourcesUrl=new URL(".",i).href),t(e)})().then((t=>i([["p-f0590452",[[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]}]]]],t)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as e,g as i}from"./p-d22cb483.js";function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,o){if(o.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+o.length+" present")}function n(t){s(1,arguments);var o=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===o?new Date(t.getTime()):"number"==typeof t||"[object Number]"===o?new Date(t):("string"!=typeof t&&"[object String]"!==o||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,o){s(2,arguments);var e=n(t),i=n(o);return e.getTime()<i.getTime()}const r=["en"],c={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",tooltip:"A payout that increases each time the game is played but the jackpot is not won",mega:"Mega",major:"Major",minor:"Minor",Suspended:"Suspended Jackpot",Closed:"Closed Jackpot",allJackpotsClosed:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is won!",termsAndConditions:"Terms and Conditions",winningProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days",contributionTooltip:"A % of the bet that will be contributed by the casino to the jackpot amount."}},l=(t,o)=>{const e=o;return c[void 0!==e&&r.includes(e)?e:"en"][t]},d=class{constructor(e){t(this,e),this.close=o(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.tooltip=null,this.timers={},this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),o=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{o.innerHTML=t,setTimeout((()=>{this.host.prepend(o)}),1)})).catch((t=>{console.log("Error ",t)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=null},this.toggleTooltip=t=>{t.stopPropagation(),this.tooltip=this.tooltip?null:l(t.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=t=>{t.stopPropagation()},this.handleJackpotClick=t=>{const o=+t.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:o})}}jackpotsPropHandler(t){!this.interval&&t.length&&this.startCountdown(),this.interval&&!t.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const t=(new Date).getTime();this.timers=this.jackpots.reduce(((o,e)=>{const i=new Date(e.JackpotEndTime).getTime()-t;let a="00h:00m:00s";const{days:s,hours:n,minutes:p,seconds:r}={days:String(Math.floor(i/864e5)).padStart(2,"0"),hours:String(Math.floor(i%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(i%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(i%6e4/1e3)).padStart(2,"0")};return a="00"===s?`${n}h:${p}m:${r}s`:`${s}d:${n}h:${p}m`,Object.assign(Object.assign({},o),{[e.JackpotId]:a})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(t){return{JackpotCard:!0,JackpotCardClosed:t.IsClosed||p(new Date(t.JackpotEndTime),new Date),InProgress:t.Enabled&&!t.IsClosed}}getJackpotHeaderTemplate(t){const o=!!t.WinBalance,i=l(t.Type,this.language),a=l(t.Reason,this.language),s=(null==t?void 0:t.IsClosed)?a:i,n=`JackpotBalance Jackpot${l(t.Type,this.language)}`,r=t.Enabled?"JackpotJoinButton Joined":"JackpotJoinButton",c=l(t.Enabled?"unjoin":"join",this.language),d=t.Pending||(null==t?void 0:t.IsClosed)||p(new Date(t.JackpotEndTime),new Date);return e("div",{class:"JackpotCardHeader"},e("div",{class:"JackpotTitle"},e("span",{class:"JackpotName"},s),e("span",{class:n},function(t,o,e=99999999){return t=Math.min(t,e),`${o} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}(t.Balance,t.Currency))),e("div",{class:"JackpotActions"},e("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":t.JackpotId,disabled:d},c),o&&e("span",{class:"JackpotWon"},l("jackpotIsWon",this.language))))}getJackpotDescriptionTemplate(t){const o=+t.OperatorContributionPercent+"%",i=`1:${t.Probability}`,a=p(new Date(t.JackpotEndTime),new Date)?l("outdatedJackpotCountdown",this.language):this.timers[t.JackpotId],s=l("operatorContribution",this.language),n=l("type",this.language),r=l("winningProbability",this.language);return e("div",{class:"JackpotCardDescription"},!t.IsClosed&&e("span",{class:"JackpotCountdown"},a),e("div",{class:"JackpotCardDescriptionBlock"},e("div",{class:"JackpotCardDescriptionRow"},e("span",null,s,":"),e("span",{class:"JackpotDescriptionValue"},o,e("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,i),this.renderDescriptionRowInfo(`${n}:`,t.JackpotTypePresentation),e("a",{href:t.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},l("termsAndConditions",this.language))))}renderDescriptionRowInfo(t,o){return e("div",{class:"JackpotCardDescriptionRow"},e("span",null,t),e("span",{class:"JackpotDescriptionValue"},o))}getJackpotTemplate(t){return e("div",{class:this.getJackpotClasses(t),onClick:this.handleJackpotClick,key:t.JackpotId,"data-id":t.JackpotId},this.getJackpotHeaderTemplate(t),this.getJackpotDescriptionTemplate(t))}getHeaderTemplate(){return e("header",{class:"JackpotsListPopupHeader"},e("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"JackpotsIconButton"},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),e("div",{class:"JackpotsListPopupHeaderName"},l("jackpots",this.language)),e("button",{class:"JackpotsIconButton",onClick:this.handleCloseClick},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close jackpots list"})))}getListTemplate(){const t=this.jackpots.every((t=>t.IsClosed));return this.jackpots.length?e("div",{class:"JackpotsListWrapper"},t&&e("div",{class:"JackpotsListClosed"},e("h2",null,l("allJackpotsClosed",this.language))),e("div",{class:"JackpotsList"},this.jackpots.map((t=>this.getJackpotTemplate(t))))):e("div",{class:"JackpotsListClosed"},e("h2",null,l("allJackpotsClosed",this.language)))}getTooltipTemplate(){return e("div",{class:"JackpotsTooltipBackdrop"},e("div",{class:"JackpotsTooltip"},e("button",{class:"JackpotsIconButton",onClick:this.toggleTooltip},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),this.tooltip))}render(){return e("div",{class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return i(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};d.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsIconButton img{width:100%;height:100%}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:"Montserrat", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}';export{d as casino_engagement_suite_jackpots_list}
|
|
@@ -116,6 +116,7 @@ const TRANSLATIONS = {
|
|
|
116
116
|
type: 'Type',
|
|
117
117
|
operatorContribution: 'Operator Contribution',
|
|
118
118
|
outdatedJackpotCountdown: 'We are going to remove this Jackpot in 30 days',
|
|
119
|
+
contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
|
|
119
120
|
}
|
|
120
121
|
};
|
|
121
122
|
const translate = (key, customLang) => {
|
|
@@ -129,7 +130,7 @@ function formatBalance(amount, currency, maxAmount = 99999999) {
|
|
|
129
130
|
.format(amount)}`;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
|
-
const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:
|
|
133
|
+
const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsIconButton img{width:100%;height:100%}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}";
|
|
133
134
|
|
|
134
135
|
const CasinoEngagementSuiteJackpotsList = class {
|
|
135
136
|
constructor(hostRef) {
|
|
@@ -155,7 +156,7 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
155
156
|
* List of jackpots
|
|
156
157
|
*/
|
|
157
158
|
this.jackpots = [];
|
|
158
|
-
this.tooltip =
|
|
159
|
+
this.tooltip = null;
|
|
159
160
|
this.timers = {};
|
|
160
161
|
this.limitStylingAppends = false;
|
|
161
162
|
this.setClientStyling = () => {
|
|
@@ -180,13 +181,17 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
180
181
|
};
|
|
181
182
|
this.handleCloseClick = () => {
|
|
182
183
|
this.close.emit();
|
|
183
|
-
this.tooltip =
|
|
184
|
+
this.tooltip = null;
|
|
184
185
|
};
|
|
185
|
-
this.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
this.toggleTooltip = (ev) => {
|
|
187
|
+
ev.stopPropagation();
|
|
188
|
+
if (this.tooltip) {
|
|
189
|
+
this.tooltip = null;
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
const el = ev.currentTarget;
|
|
193
|
+
this.tooltip = translate(el.getAttribute('data-tooltip'), this.language);
|
|
194
|
+
}
|
|
190
195
|
};
|
|
191
196
|
this.stopPropagation = (ev) => {
|
|
192
197
|
ev.stopPropagation();
|
|
@@ -275,7 +280,7 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
275
280
|
const operatorContributionLabel = translate('operatorContribution', this.language);
|
|
276
281
|
const typeLabel = translate('type', this.language);
|
|
277
282
|
const winningProbabilityLabel = translate('winningProbability', this.language);
|
|
278
|
-
return (index.h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && index.h("span", { class: "JackpotCountdown" }, countdownValue), index.h("div", { class: "JackpotCardDescriptionBlock" },
|
|
283
|
+
return (index.h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && index.h("span", { class: "JackpotCountdown" }, countdownValue), index.h("div", { class: "JackpotCardDescriptionBlock" }, index.h("div", { class: "JackpotCardDescriptionRow" }, index.h("span", null, operatorContributionLabel, ":"), index.h("span", { class: "JackpotDescriptionValue" }, operatorContributionPercent, index.h("button", { class: "JackpotContributionTooltipButton", "data-tooltip": "contributionTooltip", onClick: this.toggleTooltip }))), this.renderDescriptionRowInfo(`${winningProbabilityLabel}:`, winingProbabilityPercent), this.renderDescriptionRowInfo(`${typeLabel}:`, jackpot.JackpotTypePresentation), index.h("a", { href: jackpot.JackpotRulesUrl, target: "_blank", onClick: this.stopPropagation }, translate('termsAndConditions', this.language)))));
|
|
279
284
|
}
|
|
280
285
|
renderDescriptionRowInfo(title, value) {
|
|
281
286
|
return (index.h("div", { class: "JackpotCardDescriptionRow" }, index.h("span", null, title), index.h("span", { class: "JackpotDescriptionValue" }, value)));
|
|
@@ -284,7 +289,7 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
284
289
|
return (index.h("div", { class: this.getJackpotClasses(jackpot), onClick: this.handleJackpotClick, key: jackpot.JackpotId, "data-id": jackpot.JackpotId }, this.getJackpotHeaderTemplate(jackpot), this.getJackpotDescriptionTemplate(jackpot)));
|
|
285
290
|
}
|
|
286
291
|
getHeaderTemplate() {
|
|
287
|
-
return (index.h("header", { class: "JackpotsListPopupHeader" }, index.h("button", { onClick: this.
|
|
292
|
+
return (index.h("header", { class: "JackpotsListPopupHeader" }, index.h("button", { onClick: this.toggleTooltip, "data-tooltip": "tooltip", class: "JackpotsIconButton" }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })), index.h("div", { class: "JackpotsListPopupHeaderName" }, translate('jackpots', this.language)), index.h("button", { class: "JackpotsIconButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close jackpots list" }))));
|
|
288
293
|
}
|
|
289
294
|
getListTemplate() {
|
|
290
295
|
const areAllJackpotsClosed = this.jackpots.every((item) => item.IsClosed);
|
|
@@ -296,15 +301,10 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
296
301
|
}
|
|
297
302
|
}
|
|
298
303
|
getTooltipTemplate() {
|
|
299
|
-
|
|
300
|
-
return (index.h("div", { class: "JackpotsTooltipBackdrop" }, index.h("div", { class: "JackpotsTooltip" }, index.h("button", { class: "JackpotsIconButton", onClick: this.hideTooltip }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('tooltip', this.language))));
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
return '';
|
|
304
|
-
}
|
|
304
|
+
return (index.h("div", { class: "JackpotsTooltipBackdrop" }, index.h("div", { class: "JackpotsTooltip" }, index.h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), this.tooltip)));
|
|
305
305
|
}
|
|
306
306
|
render() {
|
|
307
|
-
return (index.h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.getTooltipTemplate()));
|
|
307
|
+
return (index.h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.tooltip && this.getTooltipTemplate()));
|
|
308
308
|
}
|
|
309
309
|
get host() { return index.getElement(this); }
|
|
310
310
|
static get watchers() { return {
|
|
@@ -47,6 +47,10 @@ button:focus {
|
|
|
47
47
|
height: 16px;
|
|
48
48
|
cursor: pointer;
|
|
49
49
|
}
|
|
50
|
+
.JackpotsIconButton img {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
50
54
|
|
|
51
55
|
.JackpotsListPopupHeaderName {
|
|
52
56
|
color: var(--emw--color-gray-100, #BBB9C3);
|
|
@@ -172,6 +176,8 @@ button:focus {
|
|
|
172
176
|
.JackpotCardDescriptionRow .JackpotDescriptionValue {
|
|
173
177
|
font-weight: 600;
|
|
174
178
|
margin-left: 2px;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
175
181
|
}
|
|
176
182
|
|
|
177
183
|
.JackpotCardDescriptionAlignEnd {
|
|
@@ -191,6 +197,13 @@ button:focus {
|
|
|
191
197
|
font-size: var(--emw--font-size-2x-smal, 11px);
|
|
192
198
|
}
|
|
193
199
|
|
|
200
|
+
.JackpotContributionTooltipButton {
|
|
201
|
+
margin-left: 5px;
|
|
202
|
+
width: 16px;
|
|
203
|
+
height: 16px;
|
|
204
|
+
background: center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg);
|
|
205
|
+
}
|
|
206
|
+
|
|
194
207
|
.JackpotJoinButton {
|
|
195
208
|
transition: all 0.5s ease-out;
|
|
196
209
|
background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);
|
|
@@ -255,10 +268,15 @@ button:focus {
|
|
|
255
268
|
}
|
|
256
269
|
.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton {
|
|
257
270
|
top: 12px;
|
|
258
|
-
right:
|
|
271
|
+
right: 12px;
|
|
259
272
|
position: absolute;
|
|
260
273
|
}
|
|
261
274
|
|
|
275
|
+
.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,
|
|
276
|
+
.JackpotsListPopup.Desktop .JackpotContributionTooltipButton {
|
|
277
|
+
width: 22px;
|
|
278
|
+
height: 22px;
|
|
279
|
+
}
|
|
262
280
|
.JackpotsListPopup.Tablet .JackpotsListPopupHeader,
|
|
263
281
|
.JackpotsListPopup.Desktop .JackpotsListPopupHeader {
|
|
264
282
|
padding-top: 16px;
|
|
@@ -24,7 +24,7 @@ export class CasinoEngagementSuiteJackpotsList {
|
|
|
24
24
|
* List of jackpots
|
|
25
25
|
*/
|
|
26
26
|
this.jackpots = [];
|
|
27
|
-
this.tooltip =
|
|
27
|
+
this.tooltip = null;
|
|
28
28
|
this.timers = {};
|
|
29
29
|
this.limitStylingAppends = false;
|
|
30
30
|
this.setClientStyling = () => {
|
|
@@ -49,13 +49,17 @@ export class CasinoEngagementSuiteJackpotsList {
|
|
|
49
49
|
};
|
|
50
50
|
this.handleCloseClick = () => {
|
|
51
51
|
this.close.emit();
|
|
52
|
-
this.tooltip =
|
|
52
|
+
this.tooltip = null;
|
|
53
53
|
};
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
this.toggleTooltip = (ev) => {
|
|
55
|
+
ev.stopPropagation();
|
|
56
|
+
if (this.tooltip) {
|
|
57
|
+
this.tooltip = null;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const el = ev.currentTarget;
|
|
61
|
+
this.tooltip = translate(el.getAttribute('data-tooltip'), this.language);
|
|
62
|
+
}
|
|
59
63
|
};
|
|
60
64
|
this.stopPropagation = (ev) => {
|
|
61
65
|
ev.stopPropagation();
|
|
@@ -153,7 +157,13 @@ export class CasinoEngagementSuiteJackpotsList {
|
|
|
153
157
|
return (h("div", { class: "JackpotCardDescription" },
|
|
154
158
|
!jackpot.IsClosed && h("span", { class: "JackpotCountdown" }, countdownValue),
|
|
155
159
|
h("div", { class: "JackpotCardDescriptionBlock" },
|
|
156
|
-
|
|
160
|
+
h("div", { class: "JackpotCardDescriptionRow" },
|
|
161
|
+
h("span", null,
|
|
162
|
+
operatorContributionLabel,
|
|
163
|
+
":"),
|
|
164
|
+
h("span", { class: "JackpotDescriptionValue" },
|
|
165
|
+
operatorContributionPercent,
|
|
166
|
+
h("button", { class: "JackpotContributionTooltipButton", "data-tooltip": "contributionTooltip", onClick: this.toggleTooltip }))),
|
|
157
167
|
this.renderDescriptionRowInfo(`${winningProbabilityLabel}:`, winingProbabilityPercent),
|
|
158
168
|
this.renderDescriptionRowInfo(`${typeLabel}:`, jackpot.JackpotTypePresentation),
|
|
159
169
|
h("a", { href: jackpot.JackpotRulesUrl, target: "_blank", onClick: this.stopPropagation }, translate('termsAndConditions', this.language)))));
|
|
@@ -170,7 +180,7 @@ export class CasinoEngagementSuiteJackpotsList {
|
|
|
170
180
|
}
|
|
171
181
|
getHeaderTemplate() {
|
|
172
182
|
return (h("header", { class: "JackpotsListPopupHeader" },
|
|
173
|
-
h("button", { onClick: this.
|
|
183
|
+
h("button", { onClick: this.toggleTooltip, "data-tooltip": "tooltip", class: "JackpotsIconButton" },
|
|
174
184
|
h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })),
|
|
175
185
|
h("div", { class: "JackpotsListPopupHeaderName" }, translate('jackpots', this.language)),
|
|
176
186
|
h("button", { class: "JackpotsIconButton", onClick: this.handleCloseClick },
|
|
@@ -190,22 +200,17 @@ export class CasinoEngagementSuiteJackpotsList {
|
|
|
190
200
|
}
|
|
191
201
|
}
|
|
192
202
|
getTooltipTemplate() {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
h("
|
|
196
|
-
h("
|
|
197
|
-
|
|
198
|
-
translate('tooltip', this.language))));
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
return '';
|
|
202
|
-
}
|
|
203
|
+
return (h("div", { class: "JackpotsTooltipBackdrop" },
|
|
204
|
+
h("div", { class: "JackpotsTooltip" },
|
|
205
|
+
h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip },
|
|
206
|
+
h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })),
|
|
207
|
+
this.tooltip)));
|
|
203
208
|
}
|
|
204
209
|
render() {
|
|
205
210
|
return (h("div", { class: `JackpotsListPopup ${this.device}` },
|
|
206
211
|
this.getHeaderTemplate(),
|
|
207
212
|
this.getListTemplate(),
|
|
208
|
-
this.getTooltipTemplate()));
|
|
213
|
+
this.tooltip && this.getTooltipTemplate()));
|
|
209
214
|
}
|
|
210
215
|
static get is() { return "casino-engagement-suite-jackpots-list"; }
|
|
211
216
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,6 +18,7 @@ const TRANSLATIONS = {
|
|
|
18
18
|
type: 'Type',
|
|
19
19
|
operatorContribution: 'Operator Contribution',
|
|
20
20
|
outdatedJackpotCountdown: 'We are going to remove this Jackpot in 30 days',
|
|
21
|
+
contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
24
|
export const translate = (key, customLang) => {
|
|
@@ -112,6 +112,7 @@ const TRANSLATIONS = {
|
|
|
112
112
|
type: 'Type',
|
|
113
113
|
operatorContribution: 'Operator Contribution',
|
|
114
114
|
outdatedJackpotCountdown: 'We are going to remove this Jackpot in 30 days',
|
|
115
|
+
contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
const translate = (key, customLang) => {
|
|
@@ -125,7 +126,7 @@ function formatBalance(amount, currency, maxAmount = 99999999) {
|
|
|
125
126
|
.format(amount)}`;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:
|
|
129
|
+
const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsIconButton img{width:100%;height:100%}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}";
|
|
129
130
|
|
|
130
131
|
const CasinoEngagementSuiteJackpotsList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
131
132
|
constructor() {
|
|
@@ -153,7 +154,7 @@ const CasinoEngagementSuiteJackpotsList$1 = /*@__PURE__*/ proxyCustomElement(cla
|
|
|
153
154
|
* List of jackpots
|
|
154
155
|
*/
|
|
155
156
|
this.jackpots = [];
|
|
156
|
-
this.tooltip =
|
|
157
|
+
this.tooltip = null;
|
|
157
158
|
this.timers = {};
|
|
158
159
|
this.limitStylingAppends = false;
|
|
159
160
|
this.setClientStyling = () => {
|
|
@@ -178,13 +179,17 @@ const CasinoEngagementSuiteJackpotsList$1 = /*@__PURE__*/ proxyCustomElement(cla
|
|
|
178
179
|
};
|
|
179
180
|
this.handleCloseClick = () => {
|
|
180
181
|
this.close.emit();
|
|
181
|
-
this.tooltip =
|
|
182
|
+
this.tooltip = null;
|
|
182
183
|
};
|
|
183
|
-
this.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
this.toggleTooltip = (ev) => {
|
|
185
|
+
ev.stopPropagation();
|
|
186
|
+
if (this.tooltip) {
|
|
187
|
+
this.tooltip = null;
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
const el = ev.currentTarget;
|
|
191
|
+
this.tooltip = translate(el.getAttribute('data-tooltip'), this.language);
|
|
192
|
+
}
|
|
188
193
|
};
|
|
189
194
|
this.stopPropagation = (ev) => {
|
|
190
195
|
ev.stopPropagation();
|
|
@@ -273,7 +278,7 @@ const CasinoEngagementSuiteJackpotsList$1 = /*@__PURE__*/ proxyCustomElement(cla
|
|
|
273
278
|
const operatorContributionLabel = translate('operatorContribution', this.language);
|
|
274
279
|
const typeLabel = translate('type', this.language);
|
|
275
280
|
const winningProbabilityLabel = translate('winningProbability', this.language);
|
|
276
|
-
return (h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && h("span", { class: "JackpotCountdown" }, countdownValue), h("div", { class: "JackpotCardDescriptionBlock" },
|
|
281
|
+
return (h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && h("span", { class: "JackpotCountdown" }, countdownValue), h("div", { class: "JackpotCardDescriptionBlock" }, h("div", { class: "JackpotCardDescriptionRow" }, h("span", null, operatorContributionLabel, ":"), h("span", { class: "JackpotDescriptionValue" }, operatorContributionPercent, h("button", { class: "JackpotContributionTooltipButton", "data-tooltip": "contributionTooltip", onClick: this.toggleTooltip }))), this.renderDescriptionRowInfo(`${winningProbabilityLabel}:`, winingProbabilityPercent), this.renderDescriptionRowInfo(`${typeLabel}:`, jackpot.JackpotTypePresentation), h("a", { href: jackpot.JackpotRulesUrl, target: "_blank", onClick: this.stopPropagation }, translate('termsAndConditions', this.language)))));
|
|
277
282
|
}
|
|
278
283
|
renderDescriptionRowInfo(title, value) {
|
|
279
284
|
return (h("div", { class: "JackpotCardDescriptionRow" }, h("span", null, title), h("span", { class: "JackpotDescriptionValue" }, value)));
|
|
@@ -282,7 +287,7 @@ const CasinoEngagementSuiteJackpotsList$1 = /*@__PURE__*/ proxyCustomElement(cla
|
|
|
282
287
|
return (h("div", { class: this.getJackpotClasses(jackpot), onClick: this.handleJackpotClick, key: jackpot.JackpotId, "data-id": jackpot.JackpotId }, this.getJackpotHeaderTemplate(jackpot), this.getJackpotDescriptionTemplate(jackpot)));
|
|
283
288
|
}
|
|
284
289
|
getHeaderTemplate() {
|
|
285
|
-
return (h("header", { class: "JackpotsListPopupHeader" }, h("button", { onClick: this.
|
|
290
|
+
return (h("header", { class: "JackpotsListPopupHeader" }, h("button", { onClick: this.toggleTooltip, "data-tooltip": "tooltip", class: "JackpotsIconButton" }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })), h("div", { class: "JackpotsListPopupHeaderName" }, translate('jackpots', this.language)), h("button", { class: "JackpotsIconButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close jackpots list" }))));
|
|
286
291
|
}
|
|
287
292
|
getListTemplate() {
|
|
288
293
|
const areAllJackpotsClosed = this.jackpots.every((item) => item.IsClosed);
|
|
@@ -294,15 +299,10 @@ const CasinoEngagementSuiteJackpotsList$1 = /*@__PURE__*/ proxyCustomElement(cla
|
|
|
294
299
|
}
|
|
295
300
|
}
|
|
296
301
|
getTooltipTemplate() {
|
|
297
|
-
|
|
298
|
-
return (h("div", { class: "JackpotsTooltipBackdrop" }, h("div", { class: "JackpotsTooltip" }, h("button", { class: "JackpotsIconButton", onClick: this.hideTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('tooltip', this.language))));
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
return '';
|
|
302
|
-
}
|
|
302
|
+
return (h("div", { class: "JackpotsTooltipBackdrop" }, h("div", { class: "JackpotsTooltip" }, h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), this.tooltip)));
|
|
303
303
|
}
|
|
304
304
|
render() {
|
|
305
|
-
return (h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.getTooltipTemplate()));
|
|
305
|
+
return (h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.tooltip && this.getTooltipTemplate()));
|
|
306
306
|
}
|
|
307
307
|
get host() { return this; }
|
|
308
308
|
static get watchers() { return {
|
|
@@ -112,6 +112,7 @@ const TRANSLATIONS = {
|
|
|
112
112
|
type: 'Type',
|
|
113
113
|
operatorContribution: 'Operator Contribution',
|
|
114
114
|
outdatedJackpotCountdown: 'We are going to remove this Jackpot in 30 days',
|
|
115
|
+
contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
118
|
const translate = (key, customLang) => {
|
|
@@ -125,7 +126,7 @@ function formatBalance(amount, currency, maxAmount = 99999999) {
|
|
|
125
126
|
.format(amount)}`;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:
|
|
129
|
+
const casinoEngagementSuiteJackpotsListCss = "@import url(\"https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap\");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsIconButton img{width:100%;height:100%}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:\"\";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:\"Montserrat\", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:\"Montserrat\", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}";
|
|
129
130
|
|
|
130
131
|
const CasinoEngagementSuiteJackpotsList = class {
|
|
131
132
|
constructor(hostRef) {
|
|
@@ -151,7 +152,7 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
151
152
|
* List of jackpots
|
|
152
153
|
*/
|
|
153
154
|
this.jackpots = [];
|
|
154
|
-
this.tooltip =
|
|
155
|
+
this.tooltip = null;
|
|
155
156
|
this.timers = {};
|
|
156
157
|
this.limitStylingAppends = false;
|
|
157
158
|
this.setClientStyling = () => {
|
|
@@ -176,13 +177,17 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
176
177
|
};
|
|
177
178
|
this.handleCloseClick = () => {
|
|
178
179
|
this.close.emit();
|
|
179
|
-
this.tooltip =
|
|
180
|
+
this.tooltip = null;
|
|
180
181
|
};
|
|
181
|
-
this.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
this.toggleTooltip = (ev) => {
|
|
183
|
+
ev.stopPropagation();
|
|
184
|
+
if (this.tooltip) {
|
|
185
|
+
this.tooltip = null;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
const el = ev.currentTarget;
|
|
189
|
+
this.tooltip = translate(el.getAttribute('data-tooltip'), this.language);
|
|
190
|
+
}
|
|
186
191
|
};
|
|
187
192
|
this.stopPropagation = (ev) => {
|
|
188
193
|
ev.stopPropagation();
|
|
@@ -271,7 +276,7 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
271
276
|
const operatorContributionLabel = translate('operatorContribution', this.language);
|
|
272
277
|
const typeLabel = translate('type', this.language);
|
|
273
278
|
const winningProbabilityLabel = translate('winningProbability', this.language);
|
|
274
|
-
return (h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && h("span", { class: "JackpotCountdown" }, countdownValue), h("div", { class: "JackpotCardDescriptionBlock" },
|
|
279
|
+
return (h("div", { class: "JackpotCardDescription" }, !jackpot.IsClosed && h("span", { class: "JackpotCountdown" }, countdownValue), h("div", { class: "JackpotCardDescriptionBlock" }, h("div", { class: "JackpotCardDescriptionRow" }, h("span", null, operatorContributionLabel, ":"), h("span", { class: "JackpotDescriptionValue" }, operatorContributionPercent, h("button", { class: "JackpotContributionTooltipButton", "data-tooltip": "contributionTooltip", onClick: this.toggleTooltip }))), this.renderDescriptionRowInfo(`${winningProbabilityLabel}:`, winingProbabilityPercent), this.renderDescriptionRowInfo(`${typeLabel}:`, jackpot.JackpotTypePresentation), h("a", { href: jackpot.JackpotRulesUrl, target: "_blank", onClick: this.stopPropagation }, translate('termsAndConditions', this.language)))));
|
|
275
280
|
}
|
|
276
281
|
renderDescriptionRowInfo(title, value) {
|
|
277
282
|
return (h("div", { class: "JackpotCardDescriptionRow" }, h("span", null, title), h("span", { class: "JackpotDescriptionValue" }, value)));
|
|
@@ -280,7 +285,7 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
280
285
|
return (h("div", { class: this.getJackpotClasses(jackpot), onClick: this.handleJackpotClick, key: jackpot.JackpotId, "data-id": jackpot.JackpotId }, this.getJackpotHeaderTemplate(jackpot), this.getJackpotDescriptionTemplate(jackpot)));
|
|
281
286
|
}
|
|
282
287
|
getHeaderTemplate() {
|
|
283
|
-
return (h("header", { class: "JackpotsListPopupHeader" }, h("button", { onClick: this.
|
|
288
|
+
return (h("header", { class: "JackpotsListPopupHeader" }, h("button", { onClick: this.toggleTooltip, "data-tooltip": "tooltip", class: "JackpotsIconButton" }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg", alt: "Show tooltip" })), h("div", { class: "JackpotsListPopupHeaderName" }, translate('jackpots', this.language)), h("button", { class: "JackpotsIconButton", onClick: this.handleCloseClick }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close jackpots list" }))));
|
|
284
289
|
}
|
|
285
290
|
getListTemplate() {
|
|
286
291
|
const areAllJackpotsClosed = this.jackpots.every((item) => item.IsClosed);
|
|
@@ -292,15 +297,10 @@ const CasinoEngagementSuiteJackpotsList = class {
|
|
|
292
297
|
}
|
|
293
298
|
}
|
|
294
299
|
getTooltipTemplate() {
|
|
295
|
-
|
|
296
|
-
return (h("div", { class: "JackpotsTooltipBackdrop" }, h("div", { class: "JackpotsTooltip" }, h("button", { class: "JackpotsIconButton", onClick: this.hideTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), translate('tooltip', this.language))));
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
return '';
|
|
300
|
-
}
|
|
300
|
+
return (h("div", { class: "JackpotsTooltipBackdrop" }, h("div", { class: "JackpotsTooltip" }, h("button", { class: "JackpotsIconButton", onClick: this.toggleTooltip }, h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "Close tooltip" })), this.tooltip)));
|
|
301
301
|
}
|
|
302
302
|
render() {
|
|
303
|
-
return (h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.getTooltipTemplate()));
|
|
303
|
+
return (h("div", { class: `JackpotsListPopup ${this.device}` }, this.getHeaderTemplate(), this.getListTemplate(), this.tooltip && this.getTooltipTemplate()));
|
|
304
304
|
}
|
|
305
305
|
get host() { return getElement(this); }
|
|
306
306
|
static get watchers() { return {
|
|
@@ -23,7 +23,7 @@ export declare class CasinoEngagementSuiteJackpotsList {
|
|
|
23
23
|
jackpots: Jackpot[];
|
|
24
24
|
jackpotChangeStatusRequest: (event: MouseEvent) => void;
|
|
25
25
|
close: EventEmitter<void>;
|
|
26
|
-
tooltip:
|
|
26
|
+
tooltip: string;
|
|
27
27
|
timers: Record<string, string>;
|
|
28
28
|
private limitStylingAppends;
|
|
29
29
|
host: HTMLElement;
|
|
@@ -37,8 +37,7 @@ export declare class CasinoEngagementSuiteJackpotsList {
|
|
|
37
37
|
setClientStyling: () => void;
|
|
38
38
|
setClientStylingURL: () => void;
|
|
39
39
|
handleCloseClick: () => void;
|
|
40
|
-
|
|
41
|
-
hideTooltip: () => void;
|
|
40
|
+
toggleTooltip: (ev: MouseEvent) => void;
|
|
42
41
|
stopPropagation: (ev: MouseEvent) => void;
|
|
43
42
|
getJackpotClasses(jackpot: Jackpot): {
|
|
44
43
|
JackpotCard: boolean;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,g as a}from"./p-d22cb483.js";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,o){if(o.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+o.length+" present")}function n(t){s(1,arguments);var o=Object.prototype.toString.call(t);return t instanceof Date||"object"===i(t)&&"[object Date]"===o?new Date(t.getTime()):"number"==typeof t||"[object Number]"===o?new Date(t):("string"!=typeof t&&"[object String]"!==o||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,o){s(2,arguments);var e=n(t),a=n(o);return e.getTime()<a.getTime()}const r=["en"],c={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",tooltip:"A payout that increases each time the game is played but the jackpot is not won",mega:"Mega",major:"Major",minor:"Minor",Suspended:"Suspended Jackpot",Closed:"Closed Jackpot",allJackpotsClosed:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is won!",termsAndConditions:"Terms and Conditions",winningProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days"}},l=(t,o)=>{const e=o;return c[void 0!==e&&r.includes(e)?e:"en"][t]},d=class{constructor(e){t(this,e),this.close=o(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),o=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{o.innerHTML=t,setTimeout((()=>{this.host.prepend(o)}),1)})).catch((t=>{console.log("Error ",t)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.stopPropagation=t=>{t.stopPropagation()},this.handleJackpotClick=t=>{const o=+t.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:o})}}jackpotsPropHandler(t){!this.interval&&t.length&&this.startCountdown(),this.interval&&!t.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const t=(new Date).getTime();this.timers=this.jackpots.reduce(((o,e)=>{const a=new Date(e.JackpotEndTime).getTime()-t;let i="00h:00m:00s";const{days:s,hours:n,minutes:p,seconds:r}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};return i="00"===s?`${n}h:${p}m:${r}s`:`${s}d:${n}h:${p}m`,Object.assign(Object.assign({},o),{[e.JackpotId]:i})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(t){return{JackpotCard:!0,JackpotCardClosed:t.IsClosed||p(new Date(t.JackpotEndTime),new Date),InProgress:t.Enabled&&!t.IsClosed}}getJackpotHeaderTemplate(t){const o=!!t.WinBalance,a=l(t.Type,this.language),i=l(t.Reason,this.language),s=(null==t?void 0:t.IsClosed)?i:a,n=`JackpotBalance Jackpot${l(t.Type,this.language)}`,r=t.Enabled?"JackpotJoinButton Joined":"JackpotJoinButton",c=l(t.Enabled?"unjoin":"join",this.language),d=t.Pending||(null==t?void 0:t.IsClosed)||p(new Date(t.JackpotEndTime),new Date);return e("div",{class:"JackpotCardHeader"},e("div",{class:"JackpotTitle"},e("span",{class:"JackpotName"},s),e("span",{class:n},function(t,o,e=99999999){return t=Math.min(t,e),`${o} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}(t.Balance,t.Currency))),e("div",{class:"JackpotActions"},e("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":t.JackpotId,disabled:d},c),o&&e("span",{class:"JackpotWon"},l("jackpotIsWon",this.language))))}getJackpotDescriptionTemplate(t){const o=+t.OperatorContributionPercent+"%",a=`1:${t.Probability}`,i=p(new Date(t.JackpotEndTime),new Date)?l("outdatedJackpotCountdown",this.language):this.timers[t.JackpotId],s=l("operatorContribution",this.language),n=l("type",this.language),r=l("winningProbability",this.language);return e("div",{class:"JackpotCardDescription"},!t.IsClosed&&e("span",{class:"JackpotCountdown"},i),e("div",{class:"JackpotCardDescriptionBlock"},this.renderDescriptionRowInfo(`${s}:`,o),this.renderDescriptionRowInfo(`${r}:`,a),this.renderDescriptionRowInfo(`${n}:`,t.JackpotTypePresentation),e("a",{href:t.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},l("termsAndConditions",this.language))))}renderDescriptionRowInfo(t,o){return e("div",{class:"JackpotCardDescriptionRow"},e("span",null,t),e("span",{class:"JackpotDescriptionValue"},o))}getJackpotTemplate(t){return e("div",{class:this.getJackpotClasses(t),onClick:this.handleJackpotClick,key:t.JackpotId,"data-id":t.JackpotId},this.getJackpotHeaderTemplate(t),this.getJackpotDescriptionTemplate(t))}getHeaderTemplate(){return e("header",{class:"JackpotsListPopupHeader"},e("button",{onClick:this.showTooltip,class:"JackpotsIconButton"},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),e("div",{class:"JackpotsListPopupHeaderName"},l("jackpots",this.language)),e("button",{class:"JackpotsIconButton",onClick:this.handleCloseClick},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close jackpots list"})))}getListTemplate(){const t=this.jackpots.every((t=>t.IsClosed));return this.jackpots.length?e("div",{class:"JackpotsListWrapper"},t&&e("div",{class:"JackpotsListClosed"},e("h2",null,l("allJackpotsClosed",this.language))),e("div",{class:"JackpotsList"},this.jackpots.map((t=>this.getJackpotTemplate(t))))):e("div",{class:"JackpotsListClosed"},e("h2",null,l("allJackpotsClosed",this.language)))}getTooltipTemplate(){return this.tooltip?e("div",{class:"JackpotsTooltipBackdrop"},e("div",{class:"JackpotsTooltip"},e("button",{class:"JackpotsIconButton",onClick:this.hideTooltip},e("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),l("tooltip",this.language))):""}render(){return e("div",{class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};d.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton.Joined::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;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}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-2x-smal, 12px)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:var(--emw--font-size-medium, 18px);word-break:break-word}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-family:"Montserrat", sans-serif;font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotJoinButton{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:var(--emw--font-size-small, 14px);font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.JackpotJoinButton.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}.JackpotJoinButton.Joined::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-2x-smal, 12px);line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:6px;position:absolute}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}';export{d as casino_engagement_suite_jackpots_list}
|