@everymatrix/casino-challenges-overlay 0.6.9 → 0.6.11

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.
@@ -149,7 +149,7 @@ var EChallengeLevelTargetType;
149
149
  EChallengeLevelTargetType[EChallengeLevelTargetType["MultipleOneBetSize"] = 2] = "MultipleOneBetSize";
150
150
  })(EChallengeLevelTargetType || (EChallengeLevelTargetType = {}));
151
151
 
152
- const casinoChallengesOverlayCss = "@import url(\"https://fonts.googleapis.com/css2?family=Cherry+Bomb+One&display=swap\");.container{position:relative;z-index:300}.circle{display:inline-block;box-sizing:border-box;border-radius:24px;position:relative;background:conic-gradient(from 270deg at 50% 50%, transparent 0deg var(--progress), var(--emw--border-color, #a4d3b4) var(--progress) 360deg), linear-gradient(103deg, var(--emw--progress-gradient-color-1, #FF9400) 16.9%, var(--emw--progress-gradient-color-2, #FEF746) 95.33%, var(--emw--progress-gradient-color-3, #FFE24A) 95.96%) no-repeat center/100% 100%;box-shadow:var(--emw--button-box-shadow, 0 4px 4px 0 rgba(0, 0, 0, 0.3019607843));width:55px;height:32px;padding:4px 6px;isolation:isolate}.circle__content{display:flex;align-items:center;justify-content:center;height:100%;pointer-events:none;color:var(--emw--color-white, #FFFFFF);z-index:302;position:relative;padding:0 0 0 12px}.circle__content span{font-family:var(--emw--font-family-secondary, \"Cherry Bomb One\", sans-serif);font-size:var(--emw--font-size-x-smal, 11px);font-weight:var(--emw--font-weight-normal, 400);letter-spacing:-0.22px;text-transform:uppercase}.circle__img{position:absolute;left:0;z-index:304;top:0}.circle.grayed{mix-blend-mode:luminosity}.circle.grayed::before{display:block}.circle.grayed .dot{filter:grayscale(100%)}.circle::after{content:\"\";position:absolute;inset:3px;border-radius:24px;background:linear-gradient(90deg, var(--emw--background-gradient-color-1, #24AA4D) 0%, var(--emw--background-gradient-color-2, #113F21) 100%);pointer-events:none}.dot{position:absolute;width:4px;height:4px;background:var(--emw--color-white, #FFFFFF);border-radius:50%;box-sizing:border-box;transform:translate(-50%, -50%);pointer-events:none;z-index:303;box-shadow:var(--emw--secondary-box-shadow, 0 0.33px 1.32px 0.165px rgba(0, 0, 0, 0.1215686275))}.dot::before{content:\"\";position:absolute;inset:0;border-radius:50%;padding:1px;background:linear-gradient(103deg, var(--emw--progress-gradient-color-1, #FF9400) 16.9%, var(--emw--progress-gradient-color-2, #FEF746) 95.33%, var(--emw--progress-gradient-color-3, #FFE24A) 95.96%);-webkit-mask:linear-gradient(var(--emw--color-white, #FFFFFF) 0 0) content-box, linear-gradient(var(--emw--color-white, #FFFFFF) 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}.dot::after{content:\"\";position:absolute;top:50%;left:50%;width:9px;height:9px;background:url(\"../../assets/indicator.png\") no-repeat center/contain, url(\"../../assets/shining.svg\") no-repeat center/contain;transform:translate(-50%, -50%);pointer-events:none;z-index:304}.circle::before{content:\"\";position:absolute;inset:0;background:var(--emw--color-gray-150, #808080);border-radius:24px;mix-blend-mode:saturation;pointer-events:none;z-index:305;display:none}.badge{border-radius:50%;background:radial-gradient(93.38% 91.12% at 11.11% 0%, var(--emw--badge-gradient-color-1, rgba(35, 176, 78, 0.8)) 0%, var(--emw--badge-gradient-color-2, rgba(188, 252, 177, 0.0784313725)) 100%), var(--emw--color-black, #000000);border:1px solid var(--emw--button-border-color, rgba(29, 249, 139, 0.8));position:absolute;height:18px;min-width:18px;align-content:center;box-sizing:border-box;top:-5px;left:44px;font-size:var(--emw--font-size-2x-smal, 10px);line-height:10px;font-weight:var(--emw--font-weight-normal, 400);font-family:var(--emw--font-family-secondary, \"Cherry Bomb One\", sans-serif);text-align:center}.badge.new{height:14px;border-radius:200px;padding:0 4px;padding-bottom:3px}.badge .icon{height:10px;width:10px}.badge .gradient-text{background:linear-gradient(103deg, var(--emw--progress-gradient-color-1, #FF9400) 16.9%, var(--emw--progress-gradient-color-3, #FFE24A) 70.65%, var(--emw--progress-gradient-color-2, #FEF746) 95.33%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;color:transparent}";
152
+ const casinoChallengesOverlayCss = "@import url(\"https://fonts.googleapis.com/css2?family=Cherry+Bomb+One&display=swap\");.container{z-index:300;position:absolute;top:24px;left:10px}.circle{display:inline-block;box-sizing:border-box;border-radius:24px;position:relative;background:conic-gradient(from 270deg at 50% 50%, transparent 0deg var(--progress), var(--emw--border-color, #a4d3b4) var(--progress) 360deg), linear-gradient(103deg, var(--emw--progress-gradient-color-1, #FF9400) 16.9%, var(--emw--progress-gradient-color-2, #FEF746) 95.33%, var(--emw--progress-gradient-color-3, #FFE24A) 95.96%) no-repeat center/100% 100%;box-shadow:var(--emw--button-box-shadow, 0 4px 4px 0 rgba(0, 0, 0, 0.3019607843));width:55px;height:32px;padding:4px 6px;isolation:isolate}.circle__content{display:flex;align-items:center;justify-content:center;height:100%;pointer-events:none;color:var(--emw--color-white, #FFFFFF);z-index:302;position:relative;padding:0 0 0 12px}.circle__content span{font-family:var(--emw--font-family-secondary, \"Cherry Bomb One\", sans-serif);font-size:var(--emw--font-size-x-smal, 11px);font-weight:var(--emw--font-weight-normal, 400);letter-spacing:-0.22px;text-transform:uppercase}.circle__img{position:absolute;left:0;z-index:304;top:0}.circle.grayed{mix-blend-mode:luminosity}.circle.grayed::before{display:block}.circle.grayed .dot{filter:grayscale(100%)}.circle::after{content:\"\";position:absolute;inset:3px;border-radius:24px;background:linear-gradient(90deg, var(--emw--background-gradient-color-1, #24AA4D) 0%, var(--emw--background-gradient-color-2, #113F21) 100%);pointer-events:none}.dot{position:absolute;width:4px;height:4px;background:var(--emw--color-white, #FFFFFF);border-radius:50%;box-sizing:border-box;transform:translate(-50%, -50%);pointer-events:none;z-index:303;box-shadow:var(--emw--secondary-box-shadow, 0 0.33px 1.32px 0.165px rgba(0, 0, 0, 0.1215686275))}.dot::before{content:\"\";position:absolute;inset:0;border-radius:50%;padding:1px;background:linear-gradient(103deg, var(--emw--progress-gradient-color-1, #FF9400) 16.9%, var(--emw--progress-gradient-color-2, #FEF746) 95.33%, var(--emw--progress-gradient-color-3, #FFE24A) 95.96%);-webkit-mask:linear-gradient(var(--emw--color-white, #FFFFFF) 0 0) content-box, linear-gradient(var(--emw--color-white, #FFFFFF) 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}.dot::after{content:\"\";position:absolute;top:50%;left:50%;width:9px;height:9px;background:url(\"../../assets/indicator.png\") no-repeat center/contain, url(\"../../assets/shining.svg\") no-repeat center/contain;transform:translate(-50%, -50%);pointer-events:none;z-index:304}.circle::before{content:\"\";position:absolute;inset:0;background:var(--emw--color-gray-150, #808080);border-radius:24px;mix-blend-mode:saturation;pointer-events:none;z-index:305;display:none}.badge{border-radius:50%;background:radial-gradient(93.38% 91.12% at 11.11% 0%, var(--emw--badge-gradient-color-1, rgba(35, 176, 78, 0.8)) 0%, var(--emw--badge-gradient-color-2, rgba(188, 252, 177, 0.0784313725)) 100%), var(--emw--color-black, #000000);border:1px solid var(--emw--button-border-color, rgba(29, 249, 139, 0.8));position:absolute;height:18px;min-width:18px;align-content:center;box-sizing:border-box;top:-5px;left:44px;font-size:var(--emw--font-size-2x-smal, 10px);line-height:10px;font-weight:var(--emw--font-weight-normal, 400);font-family:var(--emw--font-family-secondary, \"Cherry Bomb One\", sans-serif);text-align:center}.badge.new{height:14px;border-radius:200px;padding:0 4px;padding-bottom:3px}.badge .icon{height:10px;width:10px}.badge .gradient-text{background:linear-gradient(103deg, var(--emw--progress-gradient-color-1, #FF9400) 16.9%, var(--emw--progress-gradient-color-3, #FFE24A) 70.65%, var(--emw--progress-gradient-color-2, #FEF746) 95.33%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;color:transparent}";
153
153
  const CasinoChallengesOverlayStyle0 = casinoChallengesOverlayCss;
154
154
 
155
155
  const CasinoChallengesOverlay = class {
@@ -168,6 +168,8 @@ const CasinoChallengesOverlay = class {
168
168
  this.isNotification = false;
169
169
  this.inProgressCount = 0;
170
170
  this.activeChallenge = '';
171
+ this.completedLevelId = '';
172
+ this.prevUpdateEvent = undefined;
171
173
  this.showModal = false;
172
174
  this.modalTitle = '';
173
175
  this.modalSubTitle = '';
@@ -196,41 +198,48 @@ const CasinoChallengesOverlay = class {
196
198
  handleChallengesChange(newValue) {
197
199
  if (Array.isArray(newValue)) {
198
200
  let maxPercentage = 0;
199
- let count = 0;
200
- const filteredChallenges = (newValue === null || newValue === void 0 ? void 0 : newValue.filter((x) => x.Status === EChallengeProgressStatus.InProgress)) || [];
201
+ const filteredChallenges = (newValue === null || newValue === void 0 ? void 0 : newValue.filter((x) => x.Status === EChallengeProgressStatus.InProgress || x.Status === EChallengeProgressStatus.PendingLevelReward)) || [];
201
202
  for (const challenge of filteredChallenges) {
202
- if (challenge.Status === EChallengeProgressStatus.InProgress) {
203
- count++;
204
- for (const level of challenge.LevelProgresses) {
205
- if (level.ProgressStatus === EChallengeProgressLevelStatus.InProgress) {
206
- if (level.ProgressPercentage > maxPercentage) {
207
- maxPercentage = level.ProgressPercentage;
208
- this.activeChallenge = challenge.ChallengeId;
209
- }
203
+ for (const level of challenge.LevelProgresses) {
204
+ if (level.ProgressStatus === EChallengeProgressLevelStatus.InProgress) {
205
+ if (level.ProgressPercentage > maxPercentage) {
206
+ maxPercentage = level.ProgressPercentage;
207
+ this.activeChallenge = challenge.ChallengeId;
210
208
  }
211
209
  }
212
210
  }
213
211
  }
214
212
  this.progress = maxPercentage;
215
- this.inProgressCount = count;
213
+ this.inProgressCount = filteredChallenges.length;
216
214
  }
217
215
  }
218
216
  handleEvent(e) {
217
+ var _a, _b, _c, _d;
219
218
  const { type, data } = e === null || e === void 0 ? void 0 : e.data;
220
219
  switch (type) {
221
220
  case 'UpdateChallengeProgress': {
222
221
  const newChallenge = data;
223
- let completedLevel = '';
222
+ if (!this.hasUpdateDataChanged(this.prevUpdateEvent, newChallenge)) {
223
+ return;
224
+ }
225
+ this.prevUpdateEvent = newChallenge;
226
+ this.completedLevelId = '';
224
227
  this.isNew = this.isNotification = this.isGift = false;
225
- const newChallenges = this.challenges.map((challenge) => {
228
+ const newChallenges = (_a = this.challenges) === null || _a === void 0 ? void 0 : _a.map((challenge) => {
226
229
  if (challenge.ChallengeId !== (newChallenge === null || newChallenge === void 0 ? void 0 : newChallenge.ChallengeId))
227
230
  return challenge;
228
231
  const updatedLevels = challenge.LevelProgresses.map((level) => {
229
232
  const newLevelData = newChallenge === null || newChallenge === void 0 ? void 0 : newChallenge.Levels.find((l) => l.LevelId === level.LevelId);
230
233
  if (!newLevelData)
231
234
  return level;
232
- if (newLevelData.ProgressPercentage === 100) {
233
- completedLevel = level.LevelId;
235
+ if (newLevelData.ProgressPercentage === 100 && level.ProgressPercentage !== 100) {
236
+ this.completedLevelId = level.LevelId;
237
+ setTimeout(() => {
238
+ if (newLevelData.LevelId === this.completedLevelId) {
239
+ this.completedLevelId = '';
240
+ this.isNew = this.isNotification = this.isGift = false;
241
+ }
242
+ }, 10000);
234
243
  if (level.Rewards.every((r) => r.Type === EChallengeRewardType.Challenge)) {
235
244
  this.isNew = true;
236
245
  }
@@ -238,25 +247,12 @@ const CasinoChallengesOverlay = class {
238
247
  this.isGift = true;
239
248
  }
240
249
  }
250
+ delete newLevelData.Rewards;
241
251
  return Object.assign(Object.assign({}, level), newLevelData);
242
252
  });
243
- return Object.assign(Object.assign({}, challenge), { Status: newChallenge.Status, LevelProgresses: updatedLevels });
253
+ return Object.assign(Object.assign({}, challenge), { Status: newChallenge === null || newChallenge === void 0 ? void 0 : newChallenge.Status, LevelProgresses: updatedLevels });
244
254
  });
245
255
  this.challenges = newChallenges;
246
- if (completedLevel) {
247
- for (const challenge of this.challenges) {
248
- for (const level of challenge.LevelProgresses) {
249
- if (level.LevelId === completedLevel) {
250
- level.ProgressStatus = EChallengeProgressLevelStatus.Completed;
251
- const nextLevel = challenge.LevelProgresses.find((z) => z.OrderNumber === level.OrderNumber + 1);
252
- if (nextLevel) {
253
- nextLevel.ProgressStatus = EChallengeProgressLevelStatus.InProgress;
254
- }
255
- break;
256
- }
257
- }
258
- }
259
- }
260
256
  break;
261
257
  }
262
258
  case 'ChallengeForfeitNotification': {
@@ -272,10 +268,14 @@ const CasinoChallengesOverlay = class {
272
268
  this.modalShowIcon = false;
273
269
  }
274
270
  else {
275
- const completedLevel = this.challenges
276
- .flatMap((x) => x.LevelProgresses || [])
277
- .find((level) => level.LevelId === (data === null || data === void 0 ? void 0 : data.LevelId));
278
- this.modalSubTitle = translate('level', this.language) + ' 3 ' + translate('completed', this.language);
271
+ const completedLevel = (_c = (_b = this.challenges) === null || _b === void 0 ? void 0 : _b.flatMap((x) => x.LevelProgresses || [])) === null || _c === void 0 ? void 0 : _c.find((level) => level.LevelId === (data === null || data === void 0 ? void 0 : data.LevelId));
272
+ if (!completedLevel) {
273
+ return this.closeModal();
274
+ }
275
+ this.modalSubTitle =
276
+ translate('level', this.language) +
277
+ ` ${(completedLevel === null || completedLevel === void 0 ? void 0 : completedLevel.OrderNumber) + 1} ` +
278
+ translate('completed', this.language);
279
279
  this.modalReward = completedLevel.Rewards.map((reward) => reward.RewardDescription).join(' + ');
280
280
  if (completedLevel.Rewards.some((x) => x.Type === EChallengeRewardType.Custom)) {
281
281
  this.modalAddition = translate('physicalReward', this.language);
@@ -288,9 +288,27 @@ const CasinoChallengesOverlay = class {
288
288
  this.handleStatusEvent(data);
289
289
  }
290
290
  case 'ChangeChallengeProgressStatus': {
291
- this.challenges = this.challenges.map((x) => x.Id === (data === null || data === void 0 ? void 0 : data.ChallengeProgressId) ? Object.assign(Object.assign({}, x), { Status: data === null || data === void 0 ? void 0 : data.ChallengeProgressStatus }) : x);
291
+ this.challenges = (_d = this.challenges) === null || _d === void 0 ? void 0 : _d.map((x) => x.Id === (data === null || data === void 0 ? void 0 : data.ChallengeProgressId) ? Object.assign(Object.assign({}, x), { Status: data === null || data === void 0 ? void 0 : data.ChallengeProgressStatus }) : x);
292
+ }
293
+ }
294
+ }
295
+ hasUpdateDataChanged(prev, next) {
296
+ if (!prev)
297
+ return true;
298
+ if (prev.ProgressId !== next.ProgressId)
299
+ return true;
300
+ if (prev.Levels.length !== next.Levels.length)
301
+ return true;
302
+ for (let i = 0; i < next.Levels.length; i++) {
303
+ const a = prev.Levels[i];
304
+ const b = next.Levels[i];
305
+ if (a.LevelId !== b.LevelId ||
306
+ a.ProgressStatus !== b.ProgressStatus ||
307
+ a.ProgressPercentage !== b.ProgressPercentage) {
308
+ return true;
292
309
  }
293
310
  }
311
+ return false;
294
312
  }
295
313
  handleStatusEvent(data) {
296
314
  const newChallenges = [...this.challenges];
@@ -443,10 +461,11 @@ const CasinoChallengesOverlay = class {
443
461
  if (this.inProgressCount < 1) {
444
462
  return;
445
463
  }
446
- const dot = this.getCapsuleDotPosition(this.progress);
464
+ const currProgress = this.completedLevelId ? 100 : this.progress;
465
+ const dot = this.getCapsuleDotPosition(currProgress);
447
466
  return (h("div", { class: "container" }, h("div", { class: `circle ${this.isGrayed ? 'grayed' : ''}`, style: {
448
- '--progress': `${this.progress}%`
449
- } }, h("img", { class: "circle__img", src: bgIconSvg }), h("div", { class: "circle__content" }, h("span", null, this.progress, "%")), dot && (h("div", { class: "dot", style: {
467
+ '--progress': `${currProgress}%`
468
+ } }, h("img", { class: "circle__img", src: bgIconSvg }), h("div", { class: "circle__content" }, h("span", null, Math.floor(currProgress), "%")), dot && (h("div", { class: "dot", style: {
450
469
  left: `${dot.x}px`,
451
470
  top: `${dot.y}px`
452
471
  } }))), !this.isGrayed && h("div", { class: `badge ${this.isNew ? 'new' : ''}` }, this.renderBadgeContent()), h("casino-challenges-overlay-modal", { isOpen: this.showModal, handleClick: () => this.closeModal(), header: this.modalTitle, subtitle: this.modalSubTitle, actionText: this.modalBtnText, showIcon: this.modalShowIcon, reward: this.modalReward, addition: this.modalAddition, additionLinkText: this.modalAdditionText, additionLinkUrl: this.modalAdditionText })));
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-challenges-overlay_2",[[1,"casino-challenges-overlay",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"challenges":[16],"progress":[32],"isGrayed":[32],"isNew":[32],"isGift":[32],"isNotification":[32],"inProgressCount":[32],"activeChallenge":[32],"showModal":[32],"modalTitle":[32],"modalSubTitle":[32],"modalBtnText":[32],"modalShowIcon":[32],"modalReward":[32],"modalAddition":[32],"modalAdditionLink":[32],"modalAdditionText":[32],"init":[64]},[[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"isOpen":[4,"is-open"],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"header":[1],"subtitle":[1],"reward":[1],"addition":[1],"additionLinkUrl":[1,"addition-link-url"],"additionLinkText":[1,"addition-link-text"],"actionText":[1,"action-text"],"translationUrl":[513,"translation-url"],"handleClick":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
19
+ return bootstrapLazy([["casino-challenges-overlay_2",[[1,"casino-challenges-overlay",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"challenges":[16],"progress":[32],"isGrayed":[32],"isNew":[32],"isGift":[32],"isNotification":[32],"inProgressCount":[32],"activeChallenge":[32],"completedLevelId":[32],"prevUpdateEvent":[32],"showModal":[32],"modalTitle":[32],"modalSubTitle":[32],"modalBtnText":[32],"modalShowIcon":[32],"modalReward":[32],"modalAddition":[32],"modalAdditionLink":[32],"modalAdditionText":[32],"init":[64]},[[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"isOpen":[4,"is-open"],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"header":[1],"subtitle":[1],"reward":[1],"addition":[1],"additionLinkUrl":[1,"addition-link-url"],"additionLinkText":[1,"addition-link-text"],"actionText":[1,"action-text"],"translationUrl":[513,"translation-url"],"handleClick":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-overlay-eef46bdb.js';
2
- export { C as casino_challenges_overlay } from './casino-challenges-overlay-eef46bdb.js';
1
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-overlay-0516d7ba.js';
2
+ export { C as casino_challenges_overlay } from './casino-challenges-overlay-0516d7ba.js';
3
3
  import { r as registerInstance, h } from './index-2be35f12.js';
4
4
 
5
5
  const giftboxSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMyIgdmlld0JveD0iMCAwIDIyIDIzIiBmaWxsPSJub25lIj4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuNDY0MjkgMi41QzcuMjE0NDIgMi41IDYuOTcxMDYgMi42MDA5IDYuNzg4NzggMi43ODY0OUM2LjYwNTkgMi45NzI3IDYuNTAwMDEgMy4yMjkwMyA2LjUwMDAxIDMuNUM2LjUwMDAxID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o=';
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesOverlay } from './casino-challenges-overlay-eef46bdb.js';
1
+ export { C as CasinoChallengesOverlay } from './casino-challenges-overlay-0516d7ba.js';
2
2
  import './index-2be35f12.js';
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["casino-challenges-overlay_2",[[1,"casino-challenges-overlay",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"challenges":[16],"progress":[32],"isGrayed":[32],"isNew":[32],"isGift":[32],"isNotification":[32],"inProgressCount":[32],"activeChallenge":[32],"showModal":[32],"modalTitle":[32],"modalSubTitle":[32],"modalBtnText":[32],"modalShowIcon":[32],"modalReward":[32],"modalAddition":[32],"modalAdditionLink":[32],"modalAdditionText":[32],"init":[64]},[[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"isOpen":[4,"is-open"],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"header":[1],"subtitle":[1],"reward":[1],"addition":[1],"additionLinkUrl":[1,"addition-link-url"],"additionLinkText":[1,"addition-link-text"],"actionText":[1,"action-text"],"translationUrl":[513,"translation-url"],"handleClick":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
8
+ return bootstrapLazy([["casino-challenges-overlay_2",[[1,"casino-challenges-overlay",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"challenges":[16],"progress":[32],"isGrayed":[32],"isNew":[32],"isGift":[32],"isNotification":[32],"inProgressCount":[32],"activeChallenge":[32],"completedLevelId":[32],"prevUpdateEvent":[32],"showModal":[32],"modalTitle":[32],"modalSubTitle":[32],"modalBtnText":[32],"modalShowIcon":[32],"modalReward":[32],"modalAddition":[32],"modalAdditionLink":[32],"modalAdditionText":[32],"init":[64]},[[8,"message","handleEvent"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"challenges":["handleChallengesChange"]}],[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"isOpen":[4,"is-open"],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"header":[1],"subtitle":[1],"reward":[1],"addition":[1],"additionLinkUrl":[1,"addition-link-url"],"additionLinkText":[1,"addition-link-text"],"actionText":[1,"action-text"],"translationUrl":[513,"translation-url"],"handleClick":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { IChallenge, IStatusEvent } from '../../utils/types';
1
+ import { IChallenge, IStatusEvent, IUpdateEventData } from '../../utils/types';
2
2
  import "../../../../../../dist/packages/stencil/casino-challenges-overlay-modal/dist/types/index";
3
3
  export declare class CasinoChallengesOverlay {
4
4
  /**
@@ -32,6 +32,8 @@ export declare class CasinoChallengesOverlay {
32
32
  isNotification: boolean;
33
33
  inProgressCount: number;
34
34
  activeChallenge: string;
35
+ completedLevelId: string;
36
+ prevUpdateEvent: IUpdateEventData;
35
37
  showModal: boolean;
36
38
  modalTitle: string;
37
39
  modalSubTitle: string;
@@ -48,6 +50,7 @@ export declare class CasinoChallengesOverlay {
48
50
  handleMbSourceChange(newValue: any, oldValue: any): void;
49
51
  handleChallengesChange(newValue: IChallenge[]): void;
50
52
  handleEvent(e: any): void;
53
+ hasUpdateDataChanged(prev: IUpdateEventData, next: IUpdateEventData): boolean;
51
54
  handleStatusEvent(data: IStatusEvent): void;
52
55
  componentWillLoad(): void;
53
56
  componentDidLoad(): void;
@@ -103,3 +103,11 @@ export interface IStatusEvent {
103
103
  ChallengeId: string;
104
104
  IsEnabled?: boolean;
105
105
  }
106
+ export interface IUpdateEventData {
107
+ ChallengeId: string;
108
+ ProgressId: string;
109
+ UserId: number;
110
+ DomainId: number;
111
+ Status: EChallengeProgressStatus;
112
+ Levels: ILevelProgress[];
113
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-overlay",
3
- "version": "0.6.9",
3
+ "version": "0.6.11",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",