@everymatrix/casino-challenges-overlay-slider 0.5.17 → 0.5.19

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.
@@ -1 +1 @@
1
- import{r as e,c as n,h as s,H as a}from"./index-9e63661c.js";import{t as i}from"./casino-challenges-overlay-slider-f3c0b38e.js";export{C as casino_challenges_overlay_slider}from"./casino-challenges-overlay-slider-f3c0b38e.js";var t,l,r,d,o;!function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom",e[e.BonusProgram=5]="BonusProgram",e[e.LoyaltyEngine=6]="LoyaltyEngine"}(t||(t={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(l||(l={})),function(e){e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(r||(r={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired",e[e.Forfeited=5]="Forfeited",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused"}(d||(d={})),function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize"}(o||(o={}));const c=["started","inProgress","pendingLevelReward","completed","expired","forfeited","awaiting","paused"],h=class{constructor(a){e(this,a),this.challengeExpired=n(this,"challengeExpired",7),this.getBadgeContent=()=>{var e;if((null===(e=this.challenge)||void 0===e?void 0:e.ChallengeStatus)===r.Paused)return s("span",{class:"status"},i("unavailable",this.language));switch(this.challenge.Status){case d.Expired:return s("span",{class:"status"},i("expired",this.language));case d.Forfeited:return s("span",{class:"status"},i("forfeited",this.language));case d.Completed:return s("span",{class:"status"},i("finished",this.language));case d.Paused:return s("span",{class:"status"},i("suspended",this.language));default:return this.timeLeft?[i("endsIn",this.language)," - ",s("span",{class:"timer"},this.timeLeft)]:s("span",{class:"status"},i("expired",this.language))}},this.challenge=void 0,this.index=void 0,this.arrLength=void 0,this.currentIndex=void 0,this.language=void 0,this.isOptedOut=!1,this.slideWidth=void 0,this.slideHeight=void 0,this.timeLeft=void 0}connectedCallback(){this.timerId||(this.timerId=setInterval((()=>{this.updateTime()}),1e3))}disconnectedCallback(){clearInterval(this.timerId)}componentWillLoad(){this.updateTime()}updateTime(){var e;this.timeLeft=function(e){const n=new Date;let s=new Date(e).getTime()-n.getTime();if(s<=0)return;const a=Math.floor(s/864e5);s-=864e5*a;const i=Math.floor(s/36e5);s-=36e5*i;const t=Math.floor(s/6e4);s-=6e4*t;const l=Math.floor(s/1e3),r=e=>e.toString().padStart(2,"0");return`${r(a)} : ${r(i)} : ${r(t)} : ${r(l)}`}(null===(e=this.challenge)||void 0===e?void 0:e.ExpirationTime),this.timeLeft||(clearInterval(this.timerId),this.challengeExpired.emit(this.challenge.Id))}isItemActive(){return this.index===this.currentIndex||1===this.index&&this.currentIndex===this.arrLength-1||this.index===this.arrLength-2&&0===this.currentIndex}render(){var e,n,i,t,l,o,h,g;const _=(null===(e=this.challenge)||void 0===e?void 0:e.ChallengeStatus)===r.Paused;return s(a,{key:"5491e59a4439d23a7cd68d0e28af1a7b5d650925"},s("div",{class:{challenges__slide:!0,active:this.isItemActive(),grayed:[d.Expired,d.Forfeited,d.Completed].includes(null===(n=this.challenge)||void 0===n?void 0:n.Status)||_||this.isOptedOut},key:`${null===(i=this.challenge)||void 0===i?void 0:i.Id}-${this.index}`},s("div",{key:"8c10ad8fc780c314af68443c5c81057d3e88668b",class:"challenges__slide__image-wrapper",style:{width:`${this.slideWidth}px`,height:`${this.slideHeight}px`}},s("img",{key:"3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2",src:null===(l=null===(t=this.challenge)||void 0===t?void 0:t.ChallengePresentation)||void 0===l?void 0:l.BannerUrl,alt:""})),s("h1",{key:"e03556b748fda30202b3b80c2c84cf9dc3471168",class:"challenges__slide__title",style:{"max-width":this.slideWidth-28+"px"}},null===(h=null===(o=this.challenge)||void 0===o?void 0:o.ChallengePresentation)||void 0===h?void 0:h.PresentationName),s("div",{key:"9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9",class:`challenges__slide__badge ${(null===(g=this.challenge)||void 0===g?void 0:g.ChallengeStatus)!==r.Paused?c[this.challenge.Status]:"unavailable"}`},this.getBadgeContent())))}};h.style='.challenges__slide {\n align-content: center;\n flex-shrink: 0;\n transform: scale(0.8);\n opacity: 0.5;\n transition: transform 0.25s ease, opacity 0.25s ease;\n filter: blur(1px);\n position: relative;\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n}\n.challenges__slide.active {\n transform: scale(1);\n opacity: 1;\n filter: blur(0);\n}\n.challenges__slide.active .challenges__slide__image-wrapper {\n border: 3px solid var(--emw--img-bg-color, rgba(255, 255, 255, 0.3019607843));\n box-shadow: var(--emw--img-box-shadow, rgba(102, 102, 102, 0.3019607843) 0 0 10px 10px);\n box-sizing: border-box;\n}\n.challenges__slide.grayed .challenges__slide__image-wrapper img {\n opacity: 0.5;\n}\n.challenges__slide__title {\n color: white;\n position: absolute;\n bottom: 20px;\n left: 12px;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: 500;\n margin: 0;\n max-width: 319px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.challenges__slide__badge {\n box-sizing: border-box;\n align-content: center;\n color: var(--emw--badge-font-color, #f4eff4);\n font-size: var(--emw--font-size-xs-small, 13px);\n font-weight: 400;\n position: absolute;\n top: 10px;\n left: 12px;\n padding: 2px 3px;\n border: 1px solid var(--emw--dot-button-active-bg, rgba(255, 255, 255, 0.2));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n backdrop-filter: blur(4.5px);\n border-radius: 15px;\n}\n.challenges__slide__badge .status {\n height: 19px;\n display: inline-flex;\n align-items: center;\n border-radius: 15px;\n border: 1px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n padding: 0 8px 0 6px;\n}\n.challenges__slide__badge .status::before {\n content: "";\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n margin-right: 5px;\n flex-shrink: 0;\n}\n.challenges__slide__badge .timer {\n font-weight: 700;\n padding-right: 4px;\n}\n.challenges__slide__badge.unavailable .status::before, .challenges__slide__badge.expired .status::before {\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n}\n.challenges__slide__badge.completed .status::before {\n background: var(--emw--background-green-color, #00b541);\n}\n.challenges__slide__badge.forfeited .status::before {\n background: var(--emw--status-badge-red-bg, #d63d1e);\n}\n.challenges__slide__badge.paused .status::before {\n background: var(--emw--status-badge-yellow-bg, #ffb801);\n}\n.challenges__slide__badge:has(.timer) {\n padding-left: 6px;\n}\n.challenges__slide__image-wrapper {\n position: relative;\n border-radius: 16px;\n overflow: hidden;\n}\n.challenges__slide__image-wrapper img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.challenges__slide * {\n pointer-events: none;\n}\n\n@container challenges-drawer (width <= 500px) {\n .challenges__slide__title {\n bottom: 12px;\n }\n}';export{h as casino_challenges_overlay_card}
1
+ import{r as e,c as n,h as s,H as a}from"./index-9e63661c.js";import{t as i}from"./casino-challenges-overlay-slider-f3c0b38e.js";export{C as casino_challenges_overlay_slider}from"./casino-challenges-overlay-slider-f3c0b38e.js";var t,l,r,o,d;!function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom",e[e.BonusProgram=5]="BonusProgram",e[e.LoyaltyEngine=6]="LoyaltyEngine"}(t||(t={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(l||(l={})),function(e){e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(r||(r={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired",e[e.Forfeited=5]="Forfeited",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused",e[e.Unavailable=8]="Unavailable"}(o||(o={})),function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize"}(d||(d={}));const c=["started","inProgress","pendingLevelReward","completed","expired","forfeited","awaiting","paused","unavailable"],h=class{constructor(a){e(this,a),this.challengeExpired=n(this,"challengeExpired",7),this.getBadgeContent=()=>{var e;if((null===(e=this.challenge)||void 0===e?void 0:e.ChallengeStatus)===r.Paused)return s("span",{class:"status"},i("unavailable",this.language));switch(this.challenge.Status){case o.Unavailable:return s("span",{class:"status"},i("unavailable",this.language));case o.Expired:return s("span",{class:"status"},i("expired",this.language));case o.Forfeited:return s("span",{class:"status"},i("forfeited",this.language));case o.Completed:return s("span",{class:"status"},i("finished",this.language));case o.Paused:return s("span",{class:"status"},i("suspended",this.language));default:return this.timeLeft?[i("endsIn",this.language)," - ",s("span",{class:"timer"},this.timeLeft)]:s("span",{class:"status"},i("expired",this.language))}},this.challenge=void 0,this.index=void 0,this.arrLength=void 0,this.currentIndex=void 0,this.language=void 0,this.isOptedOut=!1,this.slideWidth=void 0,this.slideHeight=void 0,this.timeLeft=void 0}connectedCallback(){this.timerId||(this.timerId=setInterval((()=>{this.updateTime()}),1e3))}disconnectedCallback(){clearInterval(this.timerId)}componentWillLoad(){this.updateTime()}updateTime(){var e;this.timeLeft=function(e){const n=new Date;let s=new Date(e).getTime()-n.getTime();if(s<=0)return;const a=Math.floor(s/864e5);s-=864e5*a;const i=Math.floor(s/36e5);s-=36e5*i;const t=Math.floor(s/6e4);s-=6e4*t;const l=Math.floor(s/1e3),r=e=>e.toString().padStart(2,"0");return`${r(a)} : ${r(i)} : ${r(t)} : ${r(l)}`}(null===(e=this.challenge)||void 0===e?void 0:e.ExpirationTime),this.timeLeft||(clearInterval(this.timerId),this.challengeExpired.emit(this.challenge.Id))}isItemActive(){return this.index===this.currentIndex||1===this.index&&this.currentIndex===this.arrLength-1||this.index===this.arrLength-2&&0===this.currentIndex}render(){var e,n,i,t,l,d,h,g;const b=(null===(e=this.challenge)||void 0===e?void 0:e.ChallengeStatus)===r.Paused;return s(a,{key:"7285d0d026a4b6c469f4e86ff6678f00e02b47d8"},s("div",{class:{challenges__slide:!0,active:this.isItemActive(),grayed:[o.Expired,o.Forfeited,o.Completed,o.Unavailable].includes(null===(n=this.challenge)||void 0===n?void 0:n.Status)||b||this.isOptedOut},key:`${null===(i=this.challenge)||void 0===i?void 0:i.Id}-${this.index}`},s("div",{key:"23f5f7ae37c0cfe64cb4f88f9686247d5670164a",class:"challenges__slide__image-wrapper",style:{width:`${this.slideWidth}px`,height:`${this.slideHeight}px`}},s("img",{key:"4d98f3fdfadd1c25a28776cec70cc54ae000e637",src:null===(l=null===(t=this.challenge)||void 0===t?void 0:t.ChallengePresentation)||void 0===l?void 0:l.BannerUrl,alt:""})),s("h1",{key:"fb3ce642a878feb26008b4c663bdbe48650597b0",class:"challenges__slide__title",style:{"max-width":this.slideWidth-28+"px"}},null===(h=null===(d=this.challenge)||void 0===d?void 0:d.ChallengePresentation)||void 0===h?void 0:h.PresentationName),s("div",{key:"c38663e47c9aa7a7acf4b40535bd809c3a81ef6f",class:`challenges__slide__badge ${(null===(g=this.challenge)||void 0===g?void 0:g.ChallengeStatus)!==r.Paused?c[this.challenge.Status]:"unavailable"}`},this.getBadgeContent())))}};h.style='.challenges__slide {\n align-content: center;\n flex-shrink: 0;\n transform: scale(0.8);\n opacity: 0.5;\n transition: transform 0.25s ease, opacity 0.25s ease;\n filter: blur(1px);\n position: relative;\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n}\n.challenges__slide.active {\n transform: scale(1);\n opacity: 1;\n filter: blur(0);\n}\n.challenges__slide.active .challenges__slide__image-wrapper {\n border: 3px solid var(--emw--img-bg-color, rgba(255, 255, 255, 0.3019607843));\n box-shadow: var(--emw--img-box-shadow, rgba(102, 102, 102, 0.3019607843) 0 0 10px 10px);\n box-sizing: border-box;\n}\n.challenges__slide.grayed .challenges__slide__image-wrapper img {\n opacity: 0.5;\n}\n.challenges__slide__title {\n color: white;\n position: absolute;\n bottom: 20px;\n left: 12px;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: 500;\n margin: 0;\n max-width: 319px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.challenges__slide__badge {\n box-sizing: border-box;\n align-content: center;\n color: var(--emw--badge-font-color, #f4eff4);\n font-size: var(--emw--font-size-xs-small, 13px);\n font-weight: 400;\n position: absolute;\n top: 10px;\n left: 12px;\n padding: 2px 3px;\n border: 1px solid var(--emw--dot-button-active-bg, rgba(255, 255, 255, 0.2));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n backdrop-filter: blur(4.5px);\n border-radius: 15px;\n}\n.challenges__slide__badge .status {\n height: 19px;\n display: inline-flex;\n align-items: center;\n border-radius: 15px;\n border: 1px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n padding: 0 8px 0 6px;\n}\n.challenges__slide__badge .status::before {\n content: "";\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n margin-right: 5px;\n flex-shrink: 0;\n}\n.challenges__slide__badge .timer {\n font-weight: 700;\n padding-right: 4px;\n}\n.challenges__slide__badge.unavailable .status::before, .challenges__slide__badge.expired .status::before {\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n}\n.challenges__slide__badge.completed .status::before {\n background: var(--emw--background-green-color, #00b541);\n}\n.challenges__slide__badge.forfeited .status::before {\n background: var(--emw--status-badge-red-bg, #d63d1e);\n}\n.challenges__slide__badge.paused .status::before {\n background: var(--emw--status-badge-yellow-bg, #ffb801);\n}\n.challenges__slide__badge:has(.timer) {\n padding-left: 6px;\n}\n.challenges__slide__image-wrapper {\n position: relative;\n border-radius: 16px;\n overflow: hidden;\n}\n.challenges__slide__image-wrapper img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.challenges__slide * {\n pointer-events: none;\n}\n\n@container challenges-drawer (width <= 500px) {\n .challenges__slide__title {\n bottom: 12px;\n }\n}';export{h as casino_challenges_overlay_card}
@@ -40,6 +40,7 @@ var EChallengeProgressStatus;
40
40
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
41
41
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
42
42
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
43
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
43
44
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
44
45
  var EChallengeLevelTargetType;
45
46
  (function (EChallengeLevelTargetType) {
@@ -55,7 +56,8 @@ const ChallengeStatusDictionary = [
55
56
  'expired',
56
57
  'forfeited',
57
58
  'awaiting',
58
- 'paused'
59
+ 'paused',
60
+ 'unavailable'
59
61
  ];
60
62
 
61
63
  function getTimeLeft(endTime) {
@@ -89,6 +91,8 @@ const CasinoChallengesOverlaySlider = class {
89
91
  return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('unavailable', this.language));
90
92
  }
91
93
  switch (this.challenge.Status) {
94
+ case EChallengeProgressStatus.Unavailable:
95
+ return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('unavailable', this.language));
92
96
  case EChallengeProgressStatus.Expired:
93
97
  return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('expired', this.language));
94
98
  case EChallengeProgressStatus.Forfeited:
@@ -140,20 +144,21 @@ const CasinoChallengesOverlaySlider = class {
140
144
  render() {
141
145
  var _a, _b, _c, _d, _e, _f, _g, _h;
142
146
  const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
143
- return (index.h(index.Host, { key: '5491e59a4439d23a7cd68d0e28af1a7b5d650925' }, index.h("div", { class: {
147
+ return (index.h(index.Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, index.h("div", { class: {
144
148
  challenges__slide: true,
145
149
  active: this.isItemActive(),
146
150
  grayed: [
147
151
  EChallengeProgressStatus.Expired,
148
152
  EChallengeProgressStatus.Forfeited,
149
- EChallengeProgressStatus.Completed
153
+ EChallengeProgressStatus.Completed,
154
+ EChallengeProgressStatus.Unavailable
150
155
  ].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
151
156
  isChallengePaused ||
152
157
  this.isOptedOut
153
- }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '8c10ad8fc780c314af68443c5c81057d3e88668b', class: "challenges__slide__image-wrapper", style: {
158
+ }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
154
159
  width: `${this.slideWidth}px`,
155
160
  height: `${this.slideHeight}px`
156
- } }, index.h("img", { key: '3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), index.h("h1", { key: 'e03556b748fda30202b3b80c2c84cf9dc3471168', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), index.h("div", { key: '9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
161
+ } }, index.h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), index.h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), index.h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
157
162
  ? ChallengeStatusDictionary[this.challenge.Status]
158
163
  : 'unavailable'}` }, this.getBadgeContent()))));
159
164
  }
@@ -10,6 +10,8 @@ export class CasinoChallengesOverlaySlider {
10
10
  return h("span", { class: "status" }, translate('unavailable', this.language));
11
11
  }
12
12
  switch (this.challenge.Status) {
13
+ case EChallengeProgressStatus.Unavailable:
14
+ return h("span", { class: "status" }, translate('unavailable', this.language));
13
15
  case EChallengeProgressStatus.Expired:
14
16
  return h("span", { class: "status" }, translate('expired', this.language));
15
17
  case EChallengeProgressStatus.Forfeited:
@@ -61,20 +63,21 @@ export class CasinoChallengesOverlaySlider {
61
63
  render() {
62
64
  var _a, _b, _c, _d, _e, _f, _g, _h;
63
65
  const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
64
- return (h(Host, { key: '5491e59a4439d23a7cd68d0e28af1a7b5d650925' }, h("div", { class: {
66
+ return (h(Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, h("div", { class: {
65
67
  challenges__slide: true,
66
68
  active: this.isItemActive(),
67
69
  grayed: [
68
70
  EChallengeProgressStatus.Expired,
69
71
  EChallengeProgressStatus.Forfeited,
70
- EChallengeProgressStatus.Completed
72
+ EChallengeProgressStatus.Completed,
73
+ EChallengeProgressStatus.Unavailable
71
74
  ].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
72
75
  isChallengePaused ||
73
76
  this.isOptedOut
74
- }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '8c10ad8fc780c314af68443c5c81057d3e88668b', class: "challenges__slide__image-wrapper", style: {
77
+ }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
75
78
  width: `${this.slideWidth}px`,
76
79
  height: `${this.slideHeight}px`
77
- } }, h("img", { key: '3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'e03556b748fda30202b3b80c2c84cf9dc3471168', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: '9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
80
+ } }, h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
78
81
  ? ChallengeStatusDictionary[this.challenge.Status]
79
82
  : 'unavailable'}` }, this.getBadgeContent()))));
80
83
  }
@@ -33,6 +33,7 @@ export var EChallengeProgressStatus;
33
33
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
34
34
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
35
35
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
36
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
36
37
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
37
38
  export var EChallengeLevelTargetType;
38
39
  (function (EChallengeLevelTargetType) {
@@ -48,5 +49,6 @@ export const ChallengeStatusDictionary = [
48
49
  'expired',
49
50
  'forfeited',
50
51
  'awaiting',
51
- 'paused'
52
+ 'paused',
53
+ 'unavailable'
52
54
  ];
@@ -37,6 +37,7 @@ var EChallengeProgressStatus;
37
37
  EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
38
38
  EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
39
39
  EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
40
+ EChallengeProgressStatus[EChallengeProgressStatus["Unavailable"] = 8] = "Unavailable";
40
41
  })(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
41
42
  var EChallengeLevelTargetType;
42
43
  (function (EChallengeLevelTargetType) {
@@ -52,7 +53,8 @@ const ChallengeStatusDictionary = [
52
53
  'expired',
53
54
  'forfeited',
54
55
  'awaiting',
55
- 'paused'
56
+ 'paused',
57
+ 'unavailable'
56
58
  ];
57
59
 
58
60
  function getTimeLeft(endTime) {
@@ -86,6 +88,8 @@ const CasinoChallengesOverlaySlider = class {
86
88
  return h("span", { class: "status" }, translate('unavailable', this.language));
87
89
  }
88
90
  switch (this.challenge.Status) {
91
+ case EChallengeProgressStatus.Unavailable:
92
+ return h("span", { class: "status" }, translate('unavailable', this.language));
89
93
  case EChallengeProgressStatus.Expired:
90
94
  return h("span", { class: "status" }, translate('expired', this.language));
91
95
  case EChallengeProgressStatus.Forfeited:
@@ -137,20 +141,21 @@ const CasinoChallengesOverlaySlider = class {
137
141
  render() {
138
142
  var _a, _b, _c, _d, _e, _f, _g, _h;
139
143
  const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
140
- return (h(Host, { key: '5491e59a4439d23a7cd68d0e28af1a7b5d650925' }, h("div", { class: {
144
+ return (h(Host, { key: '7285d0d026a4b6c469f4e86ff6678f00e02b47d8' }, h("div", { class: {
141
145
  challenges__slide: true,
142
146
  active: this.isItemActive(),
143
147
  grayed: [
144
148
  EChallengeProgressStatus.Expired,
145
149
  EChallengeProgressStatus.Forfeited,
146
- EChallengeProgressStatus.Completed
150
+ EChallengeProgressStatus.Completed,
151
+ EChallengeProgressStatus.Unavailable
147
152
  ].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
148
153
  isChallengePaused ||
149
154
  this.isOptedOut
150
- }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '8c10ad8fc780c314af68443c5c81057d3e88668b', class: "challenges__slide__image-wrapper", style: {
155
+ }, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, h("div", { key: '23f5f7ae37c0cfe64cb4f88f9686247d5670164a', class: "challenges__slide__image-wrapper", style: {
151
156
  width: `${this.slideWidth}px`,
152
157
  height: `${this.slideHeight}px`
153
- } }, h("img", { key: '3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'e03556b748fda30202b3b80c2c84cf9dc3471168', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: '9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
158
+ } }, h("img", { key: '4d98f3fdfadd1c25a28776cec70cc54ae000e637', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), h("h1", { key: 'fb3ce642a878feb26008b4c663bdbe48650597b0', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), h("div", { key: 'c38663e47c9aa7a7acf4b40535bd809c3a81ef6f', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
154
159
  ? ChallengeStatusDictionary[this.challenge.Status]
155
160
  : 'unavailable'}` }, this.getBadgeContent()))));
156
161
  }
@@ -28,7 +28,8 @@ export declare enum EChallengeProgressStatus {
28
28
  Expired = 4,
29
29
  Forfeited = 5,
30
30
  Awaiting = 6,
31
- Paused = 7
31
+ Paused = 7,
32
+ Unavailable = 8
32
33
  }
33
34
  export interface IChallengeLevelReward {
34
35
  Type: EChallengeRewardType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-overlay-slider",
3
- "version": "0.5.17",
3
+ "version": "0.5.19",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",