@everymatrix/casino-challenges-container 0.17.74 → 0.17.76

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.
@@ -514,10 +514,14 @@ const CasinoChallengeCard = class {
514
514
  .then((res) => {
515
515
  if (res.Success) {
516
516
  window.postMessage({ type: 'GoToChallengesPage', tabIndex: EChallengesTabs.Active }, window.location.href);
517
- this.openNotification.emit({ message: translate$3('grantClaimByButtonSuccessMessage', this.language), errored: false, tab: EChallengesTabs.Active });
517
+ this.openNotification.emit({
518
+ message: translate$3('grantClaimByButtonSuccessMessage', this.language),
519
+ errored: false,
520
+ tab: EChallengesTabs.Active
521
+ });
518
522
  }
519
523
  else {
520
- this.openNotification.emit({ message: res.ErrorMessage, errored: true, });
524
+ this.openNotification.emit({ message: res.ErrorMessage, errored: true });
521
525
  }
522
526
  return res;
523
527
  })
@@ -528,44 +532,45 @@ const CasinoChallengeCard = class {
528
532
  }
529
533
  get getCardButton() {
530
534
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
531
- if (this.activeChallengesTabIndex === EChallengesTabs.Promo &&
532
- this.challenge.Status !== EChallengeProgressStatus.Expired) {
533
- const isDepositTriggerType = (((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Triggers) === null || _b === void 0 ? void 0 : _b.includes(EChallengeTriggerType.Deposit)) &&
534
- ((_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Triggers) === null || _d === void 0 ? void 0 : _d.includes(EChallengeTriggerType.GameLaunch))) ||
535
- ((_f = (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Triggers) === null || _f === void 0 ? void 0 : _f.includes(EChallengeTriggerType.Deposit));
536
- const isClaimByButtonTriggerType = !isDepositTriggerType && ((_h = (_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Triggers) === null || _h === void 0 ? void 0 : _h.includes(EChallengeTriggerType.ClaimByButton));
537
- const isGameLaunchTriggerType = !isDepositTriggerType &&
538
- !isClaimByButtonTriggerType &&
539
- ((_k = (_j = this.challenge) === null || _j === void 0 ? void 0 : _j.Triggers) === null || _k === void 0 ? void 0 : _k.includes(EChallengeTriggerType.GameLaunch));
540
- if (isDepositTriggerType) {
541
- return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
542
- e.stopPropagation();
543
- this.goToDepositPage();
544
- } }, translate$3('deposit', this.language)));
545
- }
546
- else if (isClaimByButtonTriggerType) {
547
- return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
548
- e.stopPropagation();
549
- this.grantClaimByButton();
550
- } }, translate$3('claim', this.language)));
551
- }
552
- else if (isGameLaunchTriggerType) {
553
- return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
554
- e.stopPropagation();
555
- this.goToDetailsPage(false, EDetailsTabs.GamesOrEvents)();
556
- } }, translate$3('launchGame', this.language)));
557
- }
558
- }
559
- else if (this.isUserAuthorized && !this.isChallengePaused) {
560
- if (this.challenge.Status === EChallengeProgressStatus.Started) {
561
- return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('optIn', this.language)));
562
- }
563
- if (this.challenge.Status === EChallengeProgressStatus.Paused) {
564
- return (index.h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('resume', this.language)));
535
+ if (!this.isChallengePaused && this.challenge.Status !== EChallengeProgressStatus.Expired) {
536
+ if (this.activeChallengesTabIndex === EChallengesTabs.Promo) {
537
+ const isDepositTriggerType = (((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Triggers) === null || _b === void 0 ? void 0 : _b.includes(EChallengeTriggerType.Deposit)) &&
538
+ ((_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Triggers) === null || _d === void 0 ? void 0 : _d.includes(EChallengeTriggerType.GameLaunch))) ||
539
+ ((_f = (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Triggers) === null || _f === void 0 ? void 0 : _f.includes(EChallengeTriggerType.Deposit));
540
+ const isClaimByButtonTriggerType = !isDepositTriggerType && ((_h = (_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Triggers) === null || _h === void 0 ? void 0 : _h.includes(EChallengeTriggerType.ClaimByButton));
541
+ const isGameLaunchTriggerType = !isDepositTriggerType &&
542
+ !isClaimByButtonTriggerType &&
543
+ ((_k = (_j = this.challenge) === null || _j === void 0 ? void 0 : _j.Triggers) === null || _k === void 0 ? void 0 : _k.includes(EChallengeTriggerType.GameLaunch));
544
+ if (isDepositTriggerType) {
545
+ return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
546
+ e.stopPropagation();
547
+ this.goToDepositPage();
548
+ } }, translate$3('deposit', this.language)));
549
+ }
550
+ else if (isClaimByButtonTriggerType) {
551
+ return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
552
+ e.stopPropagation();
553
+ this.grantClaimByButton();
554
+ } }, translate$3('claim', this.language)));
555
+ }
556
+ else if (isGameLaunchTriggerType) {
557
+ return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
558
+ e.stopPropagation();
559
+ this.goToDetailsPage(false, EDetailsTabs.GamesOrEvents)();
560
+ } }, translate$3('launchGame', this.language)));
561
+ }
565
562
  }
566
- if (this.challenge.Status === EChallengeProgressStatus.InProgress ||
567
- this.challenge.Status === EChallengeProgressStatus.PendingLevelReward) {
568
- return (index.h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(false)) }, translate$3('pause', this.language)));
563
+ else if (this.isUserAuthorized && !this.isChallengePaused) {
564
+ if (this.challenge.Status === EChallengeProgressStatus.Started) {
565
+ return (index.h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('optIn', this.language)));
566
+ }
567
+ if (this.challenge.Status === EChallengeProgressStatus.Paused) {
568
+ return (index.h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('resume', this.language)));
569
+ }
570
+ if (this.challenge.Status === EChallengeProgressStatus.InProgress ||
571
+ this.challenge.Status === EChallengeProgressStatus.PendingLevelReward) {
572
+ return (index.h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(false)) }, translate$3('pause', this.language)));
573
+ }
569
574
  }
570
575
  }
571
576
  return index.h("button", { class: "card__button" }, translate$3('viewDetails', this.language));
@@ -615,10 +620,10 @@ const CasinoChallengeCard = class {
615
620
  }
616
621
  render() {
617
622
  var _a, _b, _c, _d;
618
- return (index.h("div", { key: 'a6fb07b2fbd0daafb74d79aadf5ba5fffbcedc48', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, index.h("div", { key: 'c5ee2fb7f82de38bfddf44988dfca53cc2d43a7f', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, index.h("img", { key: 'ee9b514c762563cf945683b4a09913597c9283e9', class: {
623
+ return (index.h("div", { key: 'c073e12394b0deeb498ca524a37fa57e0ba0775f', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, index.h("div", { key: 'ffedf90383bf6e3b267a6a4b95f90023da6e4b29', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, index.h("img", { key: 'f7ee4488c3569a2310fdd164c32ef7956fb187c6', class: {
619
624
  card__image: true,
620
625
  grayed: !!this.isChallengeGrayed || this.challenge.Status === EChallengeProgressStatus.Awaiting
621
- }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), index.h("div", { key: '86cd00434687dd4a865e2bcb1cbe3ba1224a57c0', class: "card__content" }, index.h("h1", { key: '693135eb505d6e3d37d3378753e6e04498080f99', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
626
+ }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), index.h("div", { key: 'bf576d8afb45d31c33695da69608462ca84b824b', class: "card__content" }, index.h("h1", { key: 'a2371c8586c1bd9986991ef1d487ed7967ec4749', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
622
627
  _d.PresentationName, this.renderCardIcon()), this.getChallengeProgress, this.additionalInfo, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getTermsAndConditions()), this.getCardButton)));
623
628
  }
624
629
  static get watchers() { return {
@@ -511,10 +511,14 @@ const CasinoChallengeCard = class {
511
511
  .then((res) => {
512
512
  if (res.Success) {
513
513
  window.postMessage({ type: 'GoToChallengesPage', tabIndex: EChallengesTabs.Active }, window.location.href);
514
- this.openNotification.emit({ message: translate$3('grantClaimByButtonSuccessMessage', this.language), errored: false, tab: EChallengesTabs.Active });
514
+ this.openNotification.emit({
515
+ message: translate$3('grantClaimByButtonSuccessMessage', this.language),
516
+ errored: false,
517
+ tab: EChallengesTabs.Active
518
+ });
515
519
  }
516
520
  else {
517
- this.openNotification.emit({ message: res.ErrorMessage, errored: true, });
521
+ this.openNotification.emit({ message: res.ErrorMessage, errored: true });
518
522
  }
519
523
  return res;
520
524
  })
@@ -525,44 +529,45 @@ const CasinoChallengeCard = class {
525
529
  }
526
530
  get getCardButton() {
527
531
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
528
- if (this.activeChallengesTabIndex === EChallengesTabs.Promo &&
529
- this.challenge.Status !== EChallengeProgressStatus.Expired) {
530
- const isDepositTriggerType = (((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Triggers) === null || _b === void 0 ? void 0 : _b.includes(EChallengeTriggerType.Deposit)) &&
531
- ((_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Triggers) === null || _d === void 0 ? void 0 : _d.includes(EChallengeTriggerType.GameLaunch))) ||
532
- ((_f = (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Triggers) === null || _f === void 0 ? void 0 : _f.includes(EChallengeTriggerType.Deposit));
533
- const isClaimByButtonTriggerType = !isDepositTriggerType && ((_h = (_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Triggers) === null || _h === void 0 ? void 0 : _h.includes(EChallengeTriggerType.ClaimByButton));
534
- const isGameLaunchTriggerType = !isDepositTriggerType &&
535
- !isClaimByButtonTriggerType &&
536
- ((_k = (_j = this.challenge) === null || _j === void 0 ? void 0 : _j.Triggers) === null || _k === void 0 ? void 0 : _k.includes(EChallengeTriggerType.GameLaunch));
537
- if (isDepositTriggerType) {
538
- return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
539
- e.stopPropagation();
540
- this.goToDepositPage();
541
- } }, translate$3('deposit', this.language)));
542
- }
543
- else if (isClaimByButtonTriggerType) {
544
- return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
545
- e.stopPropagation();
546
- this.grantClaimByButton();
547
- } }, translate$3('claim', this.language)));
548
- }
549
- else if (isGameLaunchTriggerType) {
550
- return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
551
- e.stopPropagation();
552
- this.goToDetailsPage(false, EDetailsTabs.GamesOrEvents)();
553
- } }, translate$3('launchGame', this.language)));
554
- }
555
- }
556
- else if (this.isUserAuthorized && !this.isChallengePaused) {
557
- if (this.challenge.Status === EChallengeProgressStatus.Started) {
558
- return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('optIn', this.language)));
559
- }
560
- if (this.challenge.Status === EChallengeProgressStatus.Paused) {
561
- return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('resume', this.language)));
532
+ if (!this.isChallengePaused && this.challenge.Status !== EChallengeProgressStatus.Expired) {
533
+ if (this.activeChallengesTabIndex === EChallengesTabs.Promo) {
534
+ const isDepositTriggerType = (((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Triggers) === null || _b === void 0 ? void 0 : _b.includes(EChallengeTriggerType.Deposit)) &&
535
+ ((_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Triggers) === null || _d === void 0 ? void 0 : _d.includes(EChallengeTriggerType.GameLaunch))) ||
536
+ ((_f = (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Triggers) === null || _f === void 0 ? void 0 : _f.includes(EChallengeTriggerType.Deposit));
537
+ const isClaimByButtonTriggerType = !isDepositTriggerType && ((_h = (_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Triggers) === null || _h === void 0 ? void 0 : _h.includes(EChallengeTriggerType.ClaimByButton));
538
+ const isGameLaunchTriggerType = !isDepositTriggerType &&
539
+ !isClaimByButtonTriggerType &&
540
+ ((_k = (_j = this.challenge) === null || _j === void 0 ? void 0 : _j.Triggers) === null || _k === void 0 ? void 0 : _k.includes(EChallengeTriggerType.GameLaunch));
541
+ if (isDepositTriggerType) {
542
+ return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
543
+ e.stopPropagation();
544
+ this.goToDepositPage();
545
+ } }, translate$3('deposit', this.language)));
546
+ }
547
+ else if (isClaimByButtonTriggerType) {
548
+ return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
549
+ e.stopPropagation();
550
+ this.grantClaimByButton();
551
+ } }, translate$3('claim', this.language)));
552
+ }
553
+ else if (isGameLaunchTriggerType) {
554
+ return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => {
555
+ e.stopPropagation();
556
+ this.goToDetailsPage(false, EDetailsTabs.GamesOrEvents)();
557
+ } }, translate$3('launchGame', this.language)));
558
+ }
562
559
  }
563
- if (this.challenge.Status === EChallengeProgressStatus.InProgress ||
564
- this.challenge.Status === EChallengeProgressStatus.PendingLevelReward) {
565
- return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(false)) }, translate$3('pause', this.language)));
560
+ else if (this.isUserAuthorized && !this.isChallengePaused) {
561
+ if (this.challenge.Status === EChallengeProgressStatus.Started) {
562
+ return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('optIn', this.language)));
563
+ }
564
+ if (this.challenge.Status === EChallengeProgressStatus.Paused) {
565
+ return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(true)) }, translate$3('resume', this.language)));
566
+ }
567
+ if (this.challenge.Status === EChallengeProgressStatus.InProgress ||
568
+ this.challenge.Status === EChallengeProgressStatus.PendingLevelReward) {
569
+ return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: (e) => (e.stopPropagation(), this.joinUnjoinProgress(false)) }, translate$3('pause', this.language)));
570
+ }
566
571
  }
567
572
  }
568
573
  return h("button", { class: "card__button" }, translate$3('viewDetails', this.language));
@@ -612,10 +617,10 @@ const CasinoChallengeCard = class {
612
617
  }
613
618
  render() {
614
619
  var _a, _b, _c, _d;
615
- return (h("div", { key: 'a6fb07b2fbd0daafb74d79aadf5ba5fffbcedc48', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, h("div", { key: 'c5ee2fb7f82de38bfddf44988dfca53cc2d43a7f', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: 'ee9b514c762563cf945683b4a09913597c9283e9', class: {
620
+ return (h("div", { key: 'c073e12394b0deeb498ca524a37fa57e0ba0775f', ref: (el) => (this.stylingContainer = el), style: { height: '100%' } }, h("div", { key: 'ffedf90383bf6e3b267a6a4b95f90023da6e4b29', class: "card", onClick: this.goToDetailsPage(true, EDetailsTabs.Rules) }, h("img", { key: 'f7ee4488c3569a2310fdd164c32ef7956fb187c6', class: {
616
621
  card__image: true,
617
622
  grayed: !!this.isChallengeGrayed || this.challenge.Status === EChallengeProgressStatus.Awaiting
618
- }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: '86cd00434687dd4a865e2bcb1cbe3ba1224a57c0', class: "card__content" }, h("h1", { key: '693135eb505d6e3d37d3378753e6e04498080f99', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
623
+ }, src: (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.BannerUrl }), this.getCardBadge, this.challenge.IsNew && this.renderNewLabel(), h("div", { key: 'bf576d8afb45d31c33695da69608462ca84b824b', class: "card__content" }, h("h1", { key: 'a2371c8586c1bd9986991ef1d487ed7967ec4749', class: "card__title" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 :
619
624
  _d.PresentationName, this.renderCardIcon()), this.getChallengeProgress, this.additionalInfo, this.infoItems.map((x, index) => this.renderInfoItem(x, index)), this.getTermsAndConditions()), this.getCardButton)));
620
625
  }
621
626
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-container",
3
- "version": "0.17.74",
3
+ "version": "0.17.76",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",