@everymatrix/casino-challenges-container 0.0.16 → 0.0.17

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.
Files changed (27) hide show
  1. package/dist/casino-challenges-container/casino-challenge-card_6.entry.js +1 -0
  2. package/dist/casino-challenges-container/casino-challenges-container-ea97765a.js +1 -0
  3. package/dist/casino-challenges-container/casino-challenges-container.esm.js +1 -1
  4. package/dist/casino-challenges-container/index.esm.js +1 -1
  5. package/dist/cjs/{casino-challenge-card_5.cjs.entry.js → casino-challenge-card_6.cjs.entry.js} +182 -29
  6. package/dist/cjs/{casino-challenges-container-50aca824.js → casino-challenges-container-da454267.js} +17 -3
  7. package/dist/cjs/casino-challenges-container.cjs.js +1 -1
  8. package/dist/cjs/index-d5f8d1ee.js +2 -2
  9. package/dist/cjs/index.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/assets/check-circle.svg +3 -0
  12. package/dist/collection/assets/error-circle.svg +3 -0
  13. package/dist/collection/collection-manifest.json +6 -0
  14. package/dist/collection/components/casino-challenges-container/casino-challenges-container.css +41 -0
  15. package/dist/collection/components/casino-challenges-container/casino-challenges-container.js +15 -2
  16. package/dist/collection/utils/locale.utils.js +2 -1
  17. package/dist/esm/{casino-challenge-card_5.entry.js → casino-challenge-card_6.entry.js} +183 -31
  18. package/dist/esm/{casino-challenges-container-677ffb33.js → casino-challenges-container-ea97765a.js} +17 -3
  19. package/dist/esm/casino-challenges-container.js +1 -1
  20. package/dist/esm/index-7720ad93.js +2 -2
  21. package/dist/esm/index.js +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/types/components/casino-challenges-container/casino-challenges-container.d.ts +5 -1
  24. package/dist/types/utils/types.d.ts +5 -0
  25. package/package.json +1 -1
  26. package/dist/casino-challenges-container/casino-challenge-card_5.entry.js +0 -1
  27. package/dist/casino-challenges-container/casino-challenges-container-677ffb33.js +0 -1
@@ -2,7 +2,8 @@ const DEFAULT_LANGUAGE = 'en';
2
2
  const TRANSLATIONS = {
3
3
  en: {
4
4
  title: 'Challenges',
5
- empty: 'No Challenges'
5
+ empty: 'No Challenges',
6
+ activeTab: 'Active tab'
6
7
  },
7
8
  ro: {
8
9
  title: 'Provocări',
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-7720ad93.js';
2
- import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-677ffb33.js';
3
- export { C as casino_challenges_container } from './casino-challenges-container-677ffb33.js';
2
+ import { s as setClientStyling, a as setClientStylingURL, b as setStreamStyling } from './casino-challenges-container-ea97765a.js';
3
+ export { C as casino_challenges_container } from './casino-challenges-container-ea97765a.js';
4
4
 
5
- const DEFAULT_LANGUAGE$1 = 'en';
5
+ const DEFAULT_LANGUAGE$2 = 'en';
6
6
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
7
- const TRANSLATIONS$1 = {
7
+ const TRANSLATIONS$2 = {
8
8
  en: {
9
9
  totalLevels: 'Total levels:',
10
10
  level1: 'Level 1:',
@@ -101,18 +101,18 @@ const TRANSLATIONS$1 = {
101
101
  pause: 'Pauza'
102
102
  }
103
103
  };
104
- const translate$1 = (key, customLang) => {
104
+ const translate$2 = (key, customLang) => {
105
105
  const lang = customLang;
106
- return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
106
+ return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
107
107
  };
108
- const getTranslations$1 = (data) => {
108
+ const getTranslations$2 = (data) => {
109
109
  Object.keys(data).forEach((item) => {
110
110
  for (let key in data[item]) {
111
- TRANSLATIONS$1[item][key] = data[item][key];
111
+ TRANSLATIONS$2[item][key] = data[item][key];
112
112
  }
113
113
  });
114
114
  };
115
- const resolveTranslationUrl$1 = async (translationUrl) => {
115
+ const resolveTranslationUrl$2 = async (translationUrl) => {
116
116
  if (translationUrl) {
117
117
  try {
118
118
  const response = await fetch(translationUrl);
@@ -120,7 +120,7 @@ const resolveTranslationUrl$1 = async (translationUrl) => {
120
120
  throw new Error(`HTTP error! status: ${response.status}`);
121
121
  }
122
122
  const translations = await response.json();
123
- getTranslations$1(translations);
123
+ getTranslations$2(translations);
124
124
  }
125
125
  catch (error) {
126
126
  console.error('Failed to fetch or parse translations from URL:', error);
@@ -223,15 +223,15 @@ const CasinoChallengeCard = class {
223
223
  if (!level)
224
224
  return '';
225
225
  const minbet = ((_a = level.BetRange) === null || _a === void 0 ? void 0 : _a.MinBet)
226
- ? `, ${translate$1('minBet', this.language)} ${currencySymbol + level.BetRange.MinBet}`
226
+ ? `, ${translate$2('minBet', this.language)} ${currencySymbol + level.BetRange.MinBet}`
227
227
  : '';
228
228
  switch (level.LevelTargetType) {
229
229
  case EChallengeLevelTargetType.Accumulative:
230
- return `${translate$1('placeBetsOf', this.language)} ${currencySymbol + level.DisplayCurrencyTargetTurnover + minbet}`;
230
+ return `${translate$2('placeBetsOf', this.language)} ${currencySymbol + level.DisplayCurrencyTargetTurnover + minbet}`;
231
231
  case EChallengeLevelTargetType.SingleBet:
232
- return `${translate$1('place', this.language)} ${currencySymbol + level.TargetTurnover} ${translate$1('bet', this.language)}`;
232
+ return `${translate$2('place', this.language)} ${currencySymbol + level.TargetTurnover} ${translate$2('bet', this.language)}`;
233
233
  case EChallengeLevelTargetType.MultipleOneBetSize:
234
- return `${translate$1('place', this.language)} ${level.TargetBetCount} ${translate$1('bets', this.language) + minbet}`;
234
+ return `${translate$2('place', this.language)} ${level.TargetBetCount} ${translate$2('bets', this.language) + minbet}`;
235
235
  }
236
236
  };
237
237
  this.onMouseEnterHandler = (index, el) => {
@@ -245,17 +245,17 @@ const CasinoChallengeCard = class {
245
245
  this.getBadgeContent = () => {
246
246
  switch (this.challenge.Status) {
247
247
  case EChallengeStatus.Expired:
248
- return translate$1('expired', this.language);
248
+ return translate$2('expired', this.language);
249
249
  case EChallengeStatus.Forfeited:
250
- return translate$1('forfeited', this.language);
250
+ return translate$2('forfeited', this.language);
251
251
  case EChallengeStatus.Completed:
252
- return translate$1('finished', this.language);
252
+ return translate$2('finished', this.language);
253
253
  case EChallengeStatus.Paused:
254
- return translate$1('suspended', this.language);
254
+ return translate$2('suspended', this.language);
255
255
  default:
256
256
  return this.timeLeft
257
- ? [translate$1('endsIn', this.language), ' - ', h("span", null, this.timeLeft)]
258
- : translate$1('expired', this.language);
257
+ ? [translate$2('endsIn', this.language), ' - ', h("span", null, this.timeLeft)]
258
+ : translate$2('expired', this.language);
259
259
  }
260
260
  };
261
261
  this.goToDetailsPage = (challengeId) => () => {
@@ -295,15 +295,15 @@ const CasinoChallengeCard = class {
295
295
  const rewardValue = (_c = level.Rewards) === null || _c === void 0 ? void 0 : _c.slice(0, 2).map((r) => r.RewardDescription).join(' + ');
296
296
  return [
297
297
  {
298
- lable: translate$1('totalLevels', this.language),
298
+ lable: translate$2('totalLevels', this.language),
299
299
  value: (_d = this.challenge.LevelProgresses) === null || _d === void 0 ? void 0 : _d.length
300
300
  },
301
301
  {
302
- lable: translate$1('level1', this.language),
302
+ lable: translate$2('level1', this.language),
303
303
  value: this.calculateTargetValue(level, (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.CurrencySymbol)
304
304
  },
305
305
  {
306
- lable: translate$1('get', this.language),
306
+ lable: translate$2('get', this.language),
307
307
  value: rewardValue
308
308
  }
309
309
  ];
@@ -332,7 +332,7 @@ const CasinoChallengeCard = class {
332
332
  }
333
333
  componentWillLoad() {
334
334
  if (this.translationUrl) {
335
- resolveTranslationUrl$1(this.translationUrl);
335
+ resolveTranslationUrl$2(this.translationUrl);
336
336
  }
337
337
  this.updateTime();
338
338
  }
@@ -381,9 +381,9 @@ const CasinoChallengeCard = class {
381
381
  return h("div", { class: "progress__placeholder" });
382
382
  }
383
383
  const barValue = Status === EChallengeStatus.Paused
384
- ? translate$1('suspended', this.language)
384
+ ? translate$2('suspended', this.language)
385
385
  : Status === EChallengeStatus.Completed
386
- ? translate$1('finished', this.language)
386
+ ? translate$2('finished', this.language)
387
387
  : `${currLevel.ProgressPercentage}%`;
388
388
  const isLastLevel = !LevelProgresses.some((x) => x.OrderNumber > currLevel.OrderNumber);
389
389
  const secondImgSrc = Status === EChallengeStatus.Completed ? trophySvg : isLastLevel ? finishSvg : '';
@@ -407,17 +407,17 @@ const CasinoChallengeCard = class {
407
407
  get getCardButton() {
408
408
  if (this.isUserAuthorized) {
409
409
  if (this.challenge.Status === EChallengeStatus.Started) {
410
- return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(true) }, translate$1('start', this.language)));
410
+ return (h("button", { class: "card__button filled", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(true) }, translate$2('start', this.language)));
411
411
  }
412
412
  if (this.challenge.Status === EChallengeStatus.Paused) {
413
- return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(true) }, translate$1('resume', this.language)));
413
+ return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(true) }, translate$2('resume', this.language)));
414
414
  }
415
415
  if (this.challenge.Status === EChallengeStatus.InProgress ||
416
416
  this.challenge.Status === EChallengeStatus.PendingLevelReward) {
417
- return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(false) }, translate$1('pause', this.language)));
417
+ return (h("button", { class: "card__button grayed", disabled: this.actionLoading, onClick: () => this.joinUnjoinProgress(false) }, translate$2('pause', this.language)));
418
418
  }
419
419
  }
420
- return (h("button", { class: "card__button", onClick: this.goToDetailsPage(this.challenge.ChallengeId) }, translate$1('viewDetails', this.language)));
420
+ return (h("button", { class: "card__button", onClick: this.goToDetailsPage(this.challenge.ChallengeId) }, translate$2('viewDetails', this.language)));
421
421
  }
422
422
  async joinUnjoinProgress(join) {
423
423
  var _a;
@@ -449,6 +449,158 @@ const CasinoChallengeCard = class {
449
449
  };
450
450
  CasinoChallengeCard.style = CasinoChallengeCardStyle0;
451
451
 
452
+ const DEFAULT_LANGUAGE$1 = 'en';
453
+ const TRANSLATIONS$1 = {
454
+ en: {
455
+ title: 'Enter the secret code to unlock hidden quests and rewards.',
456
+ btnText: 'Apply code',
457
+ successMessage: 'The code was successfully applied.',
458
+ inputLabel: '3–30 characters, no spaces',
459
+ lengthMinError: 'Code must be at least 3 characters',
460
+ lengthMaxError: 'Too long — max 30 characters',
461
+ formatError: 'Invalid code format. Please use only Latin letters (case-sensitive), numbers, and special characters.',
462
+ genericError: 'Something went wrong, please retry'
463
+ },
464
+ ro: {},
465
+ fr: {},
466
+ ar: {},
467
+ hr: {}
468
+ };
469
+ const translate$1 = (key, customLang) => {
470
+ const lang = customLang;
471
+ return TRANSLATIONS$1[lang !== undefined && lang in TRANSLATIONS$1 ? lang : DEFAULT_LANGUAGE$1][key];
472
+ };
473
+ const getTranslations$1 = (data) => {
474
+ Object.keys(data).forEach((item) => {
475
+ for (let key in data[item]) {
476
+ TRANSLATIONS$1[item][key] = data[item][key];
477
+ }
478
+ });
479
+ };
480
+ const resolveTranslationUrl$1 = async (translationUrl) => {
481
+ if (translationUrl) {
482
+ try {
483
+ const response = await fetch(translationUrl);
484
+ if (!response.ok) {
485
+ throw new Error(`HTTP error! status: ${response.status}`);
486
+ }
487
+ const translations = await response.json();
488
+ getTranslations$1(translations);
489
+ }
490
+ catch (error) {
491
+ console.error('Failed to fetch or parse translations from URL:', error);
492
+ }
493
+ }
494
+ };
495
+
496
+ const casinoChallengesClaimCodeCss = ".container {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 80px 0;\n text-align: center;\n}\n.container__title {\n font-size: var(--emw--font-size-medium-plus, 18px);\n font-weight: var(--emw--font-weight-medium, 500);\n line-height: 22px;\n color: var(--emw--color-white, white);\n margin: 0 0 32px;\n}\n.container__button {\n margin-top: 45px;\n padding: 14px 20px;\n background: transparent;\n text-transform: uppercase;\n border-radius: var(--emw--button-border-radius, 99px);\n border: 2px solid var(--emw--button-border-color, #083B17);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-white, #FFFFFF);\n background-color: var(--emw--button-background-color, #18CE51);\n cursor: pointer;\n}\n.container__button:hover {\n color: var(--emw--color-gray-300, #083B17);\n border-color: transparent;\n box-shadow: 0 0 4px 0 rgba(188, 252, 177, 0.2), 0 0 20px 0 rgba(0, 183, 79, 0.5);\n}\n.container__button:disabled, .container__button:disabled:hover {\n color: var(--emw--color-gray-50, #E2E2E2);\n border: 2px solid var(--emw--button-border-color, #083B17);\n opacity: 0.7;\n cursor: not-allowed;\n}\n@container challenges-container (max-width: 576px) {\n .container__button {\n width: calc(100% - 32px);\n position: absolute;\n bottom: 50px;\n }\n}\n\n.code-input {\n border: 1px solid var(--emw--button-border-color, #083B17);\n background: var(--emw--color-background-secondary, rgba(221, 255, 207, 0.1019607843));\n border-radius: 6px;\n padding: 12px 0;\n line-height: 24px;\n color: var(--emw--color-white, #FFFFFF);\n text-align: center;\n font-size: var(--emw--font-size-medium, 16px);\n min-width: 340px;\n}\n.code-input:focus {\n outline: 1px solid var(--emw--border-success-color, #00B74F);\n}\n.code-input:focus.errored {\n outline-color: var(--emw--color-error, #D6421E);\n}\n.code-input.errored {\n border-color: var(--emw--color-error, #D6421E);\n}\n.code-input__text {\n margin: 8px 0 0;\n line-height: 22px;\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-medium, 500);\n color: var(--emw--color-gray-150, #C8D6CE);\n}\n.code-input__text.errored {\n color: var(--emw--color-error, #D6421E);\n}\n@container challenges-container (max-width: 576px) {\n .code-input {\n min-width: 100%;\n }\n}";
497
+ const CasinoChallengesClaimCodeStyle0 = casinoChallengesClaimCodeCss;
498
+
499
+ const CasinoChallengesClaimCode = class {
500
+ constructor(hostRef) {
501
+ registerInstance(this, hostRef);
502
+ this.openNotification = createEvent(this, "openNotification", 7);
503
+ this.asciiPrintableRegex = /^[\x21-\x7E]+$/;
504
+ this.handleSubmit = async () => {
505
+ if (this.endpoint && this.session && this.domain) {
506
+ const response = await this.applyCode();
507
+ if (response.Success) {
508
+ this.openNotification.emit({ message: translate$1('successMessage', this.language) });
509
+ }
510
+ else {
511
+ this.hasError = true;
512
+ const showTabLink = response.ErrorCode === 3002 || response.ErrorCode === 3023 || response.ErrorCode === 3003;
513
+ this.openNotification.emit({ message: response.ErrorMessage, errored: true, showTabLink });
514
+ }
515
+ }
516
+ };
517
+ this.applyCode = async () => {
518
+ this.loading = true;
519
+ const url = `${this.endpoint}/challenge/GrantChallengeByCode`;
520
+ const body = {
521
+ DomainId: this.domain,
522
+ PlayerSessionId: this.session,
523
+ ActivationCode: this.code
524
+ };
525
+ return fetch(url, {
526
+ method: 'POST',
527
+ headers: {
528
+ 'Content-Type': 'application/json'
529
+ },
530
+ body: JSON.stringify(body)
531
+ })
532
+ .then((res) => res.json())
533
+ .finally(() => (this.loading = false));
534
+ };
535
+ this.handleInput = (event) => {
536
+ this.code = event.target.value;
537
+ if (this.debounceTime) {
538
+ clearTimeout(this.debounceTime);
539
+ }
540
+ this.debounceTime = setTimeout(() => {
541
+ this.hasError = !this.validate(this.code);
542
+ }, 200);
543
+ };
544
+ this.mbSource = undefined;
545
+ this.clientStyling = undefined;
546
+ this.clientStylingUrl = undefined;
547
+ this.translationUrl = '';
548
+ this.language = 'en';
549
+ this.endpoint = '';
550
+ this.domain = '';
551
+ this.session = '';
552
+ this.loading = false;
553
+ this.hasError = false;
554
+ this.code = '';
555
+ this.notificationMessage = '';
556
+ }
557
+ handleClientStylingChange(newValue, oldValue) {
558
+ if (newValue != oldValue) {
559
+ setClientStyling(this.stylingContainer, this.clientStyling);
560
+ }
561
+ }
562
+ handleClientStylingUrlChange(newValue, oldValue) {
563
+ if (newValue != oldValue) {
564
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
565
+ }
566
+ }
567
+ handleMbSourceChange(newValue, oldValue) {
568
+ if (newValue != oldValue) {
569
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
570
+ }
571
+ }
572
+ componentWillLoad() {
573
+ if (this.translationUrl) {
574
+ resolveTranslationUrl$1(this.translationUrl);
575
+ }
576
+ }
577
+ componentDidLoad() {
578
+ if (this.stylingContainer) {
579
+ if (this.mbSource)
580
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
581
+ if (this.clientStyling)
582
+ setClientStyling(this.stylingContainer, this.clientStyling);
583
+ if (this.clientStylingUrl)
584
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
585
+ }
586
+ }
587
+ disconnectedCallback() {
588
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
589
+ }
590
+ validate(val) {
591
+ return val.length >= 3 && val.length <= 30 && this.asciiPrintableRegex.test(val);
592
+ }
593
+ render() {
594
+ return (h("div", { key: '241aeeb9f0f0984bbf0367a7c925e0b84ef15fa0', ref: (el) => (this.stylingContainer = el) }, h("div", { key: 'f20ec43253905cb0e9a356f65d1e51e695f784cf', class: "container" }, h("p", { key: 'a4c3b0ca894db101c192f7c62ff141ec51eaede1', class: "container__title" }, translate$1('title', this.language)), h("input", { key: 'c99bdd43659c9d2fc06702fe041eab8458bb0ee5', class: `code-input ${this.hasError ? 'errored' : ''}`, type: "text", placeholder: "e.g. SPRING24", onInput: this.handleInput }), h("p", { key: 'c2aacc2d4a23c7d222f895dce3a3a47b8f03f587', class: "code-input__text" }, translate$1('inputLabel', this.language)), h("button", { key: '51e79d07278368567026d31b0c70e8c9f0eb4840', class: "container__button", onClick: this.handleSubmit, disabled: this.loading || !this.code || this.hasError }, translate$1('btnText', this.language)))));
595
+ }
596
+ static get watchers() { return {
597
+ "clientStyling": ["handleClientStylingChange"],
598
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
599
+ "mbSource": ["handleMbSourceChange"]
600
+ }; }
601
+ };
602
+ CasinoChallengesClaimCode.style = CasinoChallengesClaimCodeStyle0;
603
+
452
604
  const casinoChallengesListCss = ".challenges-list {\n display: flex;\n flex-wrap: wrap;\n gap: 30px;\n width: 100%;\n}\n\n.loader {\n width: 308px;\n border-radius: 16px;\n border: 2px solid var(--emw--button-border-color, rgba(221, 255, 207, 0.1019607843));\n background-color: var(--emw--color-background, #141515);\n box-sizing: border-box;\n position: relative;\n}\n@container challenge-list (max-width: 576px) {\n .loader {\n width: 100%;\n }\n}\n.loader:hover {\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n cursor: pointer;\n}\n.loader .SkeletonRows .SkeletonContainer {\n padding: 0 20px 0 20px;\n}\n.loader .SkeletonButton .Skeleton.Text {\n margin: 0;\n height: 28px;\n margin: 0 20px 20px 20px;\n border-radius: var(--emw--button-border-radius, 99px);\n width: auto;\n}\n.loader .Skeleton.Image {\n border-radius: 16px 16px 0 0;\n}\n.loader .Skeleton.Text {\n margin: 20px 0;\n}";
453
605
  const CasinoChallengesListStyle0 = casinoChallengesListCss;
454
606
 
@@ -3098,4 +3250,4 @@ const UiSkeleton = class {
3098
3250
  };
3099
3251
  UiSkeleton.style = UiSkeletonStyle0;
3100
3252
 
3101
- export { CasinoChallengeCard as casino_challenge_card, CasinoChallengeList as casino_challenges_list, CasinoChallengesPlayerHistory as casino_challenges_player_history, UiSkeleton as ui_skeleton };
3253
+ export { CasinoChallengeCard as casino_challenge_card, CasinoChallengesClaimCode as casino_challenges_claim_code, CasinoChallengeList as casino_challenges_list, CasinoChallengesPlayerHistory as casino_challenges_player_history, UiSkeleton as ui_skeleton };
@@ -61,7 +61,8 @@ const DEFAULT_LANGUAGE = 'en';
61
61
  const TRANSLATIONS = {
62
62
  en: {
63
63
  title: 'Challenges',
64
- empty: 'No Challenges'
64
+ empty: 'No Challenges',
65
+ activeTab: 'Active tab'
65
66
  },
66
67
  ro: {
67
68
  title: 'Provocări',
@@ -111,7 +112,11 @@ const titleIconSvg = 'data:image/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UiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJjbGlwMF84MzhfMzEwIj4KPHJlY3Qgd2lkdGg9IjEzIiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC41KSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=';
113
114
 
114
- const casinoChallengesContainerCss = ".challenges {\n container-type: inline-size;\n container-name: challenges-container;\n background-color: var(--emw--color-background, #000);\n padding: 16px 12px;\n}\n.challenges__header {\n margin: 0 0 32px;\n display: flex;\n justify-content: space-between;\n}\n.challenges__title {\n margin: 0;\n display: flex;\n gap: 10px;\n align-items: center;\n font-size: var(--emw--font-size-x-large, 24px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-white, #ffffff);\n}\n.challenges__tabs {\n display: flex;\n gap: 12px;\n border-radius: 48px;\n padding: 6px;\n color: var(--emw--color-gray-150, #c8d6ce);\n background-color: var(--emw--color-background-secondary, #272727);\n}\n.challenges__tab {\n padding: 10px 16px;\n border-radius: 40px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n cursor: pointer;\n text-align: center;\n width: 95px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n}\n.challenges__tab.active {\n color: var(--emw--color-white, #ffffff);\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n}\n.challenges__tab:last-child {\n width: inherit;\n padding: 10px 16px;\n}\n.challenges__content {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 300px;\n overflow-y: auto;\n}\n.challenges__empty {\n color: var(--emw--color-white, #ffffff);\n}\n@container challenges-container (max-width: 800px) {\n .challenges__header {\n margin: 0 0 16px;\n flex-wrap: wrap;\n row-gap: 12px;\n }\n .challenges__title {\n width: 100%;\n font-size: var(--emw--font-size-large, 20px);\n }\n .challenges__title img {\n height: 32px;\n }\n .challenges__tabs {\n width: 100%;\n gap: 8px;\n }\n .challenges__tab {\n flex: 1;\n padding: 5px 0;\n font-size: var(--emw--font-size-x-small, 12px);\n }\n .challenges__tab:last-child {\n width: inherit;\n padding: 5px 0;\n }\n}";
115
+ const errorCircleSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzkiIHZpZXdCb3g9IjAgMCAzOCAzOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzLjc0OTMgMTQuNzQ5OEwxNC4yNDkzIDI0LjI0OThNMTQuMjQ5MyAxNC43NDk4TDIzLjc0OTMgMjQuMjQ5OE0zNC44MzI3IDE5LjQ5OThDMzQuODMyNyAyOC4yNDQzIDI3Ljc0MzggMzUuMzMzMiAxOC45OTkzIDM1LjMzMzJDMTAuMjU0OCAzNS4zMzMyIDMuMTY2MDIgMjguMjQ0MyAzLjE2NjAyIDE5LjQ5OThDMy4xNjYwMiAxMC43NTUzIDEwLjI1NDggMy42NjY1IDE4Ljk5OTMgMy42NjY1QzI3Ljc0MzggMy42NjY1IDM0LjgzMjcgMTAuNzU1MyAzNC44MzI3IDE5LjQ5OThaIiBzdHJva2U9IiNENjQyMUUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
116
+
117
+ const checkCircleSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS4wMDA3IDQuNzQ5OTJDM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-container;\n background-color: var(--emw--color-background, #000);\n padding: 16px 12px;\n}\n.challenges__header {\n margin: 0 0 32px;\n display: flex;\n justify-content: space-between;\n}\n.challenges__title {\n margin: 0;\n display: flex;\n gap: 10px;\n align-items: center;\n font-size: var(--emw--font-size-x-large, 24px);\n font-weight: var(--emw--font-weight-bold, 700);\n color: var(--emw--color-white, #ffffff);\n}\n.challenges__tabs {\n display: flex;\n gap: 12px;\n border-radius: 48px;\n padding: 6px;\n color: var(--emw--color-gray-150, #c8d6ce);\n background-color: var(--emw--color-background-secondary, #272727);\n}\n.challenges__tab {\n padding: 10px 16px;\n border-radius: 40px;\n font-size: var(--emw--font-size-small, 14px);\n font-weight: var(--emw--font-weight-bold, 700);\n cursor: pointer;\n text-align: center;\n width: 95px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n}\n.challenges__tab.active {\n color: var(--emw--color-white, #ffffff);\n background: linear-gradient(90deg, rgb(0, 62, 92) 0%, rgb(17, 59, 33) 100%);\n}\n.challenges__tab:last-child {\n width: inherit;\n padding: 10px 16px;\n}\n.challenges__content {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 300px;\n overflow-y: auto;\n}\n.challenges__empty {\n color: var(--emw--color-white, #ffffff);\n}\n@container challenges-container (max-width: 800px) {\n .challenges__header {\n margin: 0 0 16px;\n flex-wrap: wrap;\n row-gap: 12px;\n }\n .challenges__title {\n width: 100%;\n font-size: var(--emw--font-size-large, 20px);\n }\n .challenges__title img {\n height: 32px;\n }\n .challenges__tabs {\n width: 100%;\n gap: 8px;\n }\n .challenges__tab {\n flex: 1;\n padding: 5px 0;\n font-size: var(--emw--font-size-x-small, 12px);\n }\n .challenges__tab:last-child {\n width: inherit;\n padding: 5px 0;\n }\n}\n\n.notification {\n display: flex;\n position: absolute;\n align-items: center;\n bottom: 90px;\n box-shadow: 0 0 20px 0 rgba(136, 143, 170, 0.15);\n border-radius: 8px;\n padding: 20px 16px;\n gap: 16px;\n right: 40px;\n max-width: 445px;\n box-sizing: border-box;\n background-color: var(--emw--background-success-color, #C9F0D7);\n border: 2px solid var(--emw--border-success-color, #00B74F);\n}\n.notification.errored {\n background: var(--emw--background-errored-color, #FFE1DF);\n border-color: var(--emw--color-error, #D6421E);\n}\n.notification__icon {\n width: 32px;\n height: 32px;\n}\n.notification__message {\n margin: 0;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: var(--emw--font-weight-bold, 700);\n}\n.notification__message .active-tab {\n color: var(--emw--border-success-color, #00B74F);\n text-decoration-line: underline;\n cursor: pointer;\n}\n@container challenges-container (max-width: 576px) {\n .notification {\n bottom: 60px;\n right: 12px;\n max-width: 290px;\n }\n}";
115
120
  const CasinoChallengesContainerStyle0 = casinoChallengesContainerCss;
116
121
 
117
122
  const CasinoChallengesContainer = class {
@@ -119,6 +124,10 @@ const CasinoChallengesContainer = class {
119
124
  registerInstance(this, hostRef);
120
125
  this.tabs = ['Active', 'Pending', 'Finished', 'Code'];
121
126
  this.showNotification = 1;
127
+ this.onOpenNotification = (event) => {
128
+ this.notification = event.detail;
129
+ setTimeout(() => (this.notification = null), 10000);
130
+ };
122
131
  this.checkAttrs = () => {
123
132
  if (!this.endpoint) {
124
133
  this.error = 'Endpoint is missing! Please provide a valid endpointURL.';
@@ -140,12 +149,16 @@ const CasinoChallengesContainer = class {
140
149
  });
141
150
  };
142
151
  this.handleTabClick = (index) => () => {
152
+ this.notification = null;
143
153
  this.activeTabIndex = index;
144
154
  this.challenges = [];
145
155
  this.pageNumber = 0;
146
156
  this.total = 0;
147
157
  this.loadData();
148
158
  };
159
+ this.renderNotification = () => {
160
+ return (h("div", { class: `notification ${this.notification.errored ? 'errored' : ''}` }, h("img", { src: this.notification.errored ? errorCircleSvg : checkCircleSvg, class: "notification__icon" }), h("p", { class: "notification__message" }, this.notification.message + ' ', this.notification.showTabLink && (h("span", { class: "active-tab", onClick: this.handleTabClick(0) }, translate('activeTab', this.language))))));
161
+ };
149
162
  this.mbSource = undefined;
150
163
  this.clientStyling = undefined;
151
164
  this.clientStylingUrl = undefined;
@@ -164,6 +177,7 @@ const CasinoChallengesContainer = class {
164
177
  this.pageNumber = 0;
165
178
  this.total = 0;
166
179
  this.pageSize = 20;
180
+ this.notification = null;
167
181
  }
168
182
  handleClientStylingChange(newValue, oldValue) {
169
183
  if (newValue != oldValue) {
@@ -237,7 +251,7 @@ const CasinoChallengesContainer = class {
237
251
  }
238
252
  render() {
239
253
  var _a, _b;
240
- return (h("div", { key: '4e2191039d59af380aab5d65f865727e04565ad9', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '5731ae9a18c13c0ff728512442a24e824fcab485', class: "challenges" }, h("div", { key: '391210a6442f95d421a223854b55da4f953a1ec3', class: "challenges__header" }, h("h1", { key: '90d93318a2082f4b19e9c2cc3fa341afcb223eb8', class: "challenges__title" }, h("img", { key: '167c1ee8869310677e864d0f7107bfb7f9e938cd', src: titleIconSvg, alt: "icon" }), translate('title', this.language)), this.session && (h("div", { key: '1479821da7d79a1d2d53de22b67a0d2d17c43a68', class: "challenges__tabs" }, this.tabs.map((label, index) => (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, label, this.showNotification === index && h("img", { src: notificationSvg }))))))), this.activeTabIndex < 2 && (h("div", { key: 'a0f87282b31054fb2b5c18c6d521530c92540db6', class: "challenges__content" }, this.challenges.length === 0 && !this.loading && (h("div", { key: '313b9431d71fe5d93d41c00d64b718159b86bfd3', class: "empty" }, translate('empty', this.language))), h("casino-challenges-list", { key: '4756590a375cdd1cd70f538084d0194523fa8c41', challenges: this.challenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, loading: this.loading, hasMore: ((_a = this.challenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex }))), this.activeTabIndex === 2 && (h("casino-challenges-player-history", { key: 'd1f077837fafb45d5c257541e3a3db5f149b210e', translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_b = this.playerHistory) === null || _b === void 0 ? void 0 : _b.length) < this.total })))));
254
+ return (h("div", { key: '18dbc05aa857b65262bfce730e1e410e478bd657', ref: (el) => (this.stylingContainer = el) }, h("div", { key: '592c62d6d5334874112f9fcb88547b22f73e75ad', class: "challenges" }, h("div", { key: '4e96b468e8be71f2f2a785954dc3a473cc2e6cda', class: "challenges__header" }, h("h1", { key: '292d55fd2dcd2f23f02b3648657c696dbf2104e0', class: "challenges__title" }, h("img", { key: '6eb390eebfdffd29c6cc42cb6c8585617419561b', src: titleIconSvg, alt: "icon" }), translate('title', this.language)), this.session && (h("div", { key: '605ba6644169130cef63e675388a801124a8cbbd', class: "challenges__tabs" }, this.tabs.map((label, index) => (h("div", { class: `challenges__tab ${index === this.activeTabIndex ? 'active' : ''}`, onClick: this.handleTabClick(index) }, label, this.showNotification === index && h("img", { src: notificationSvg }))))))), this.activeTabIndex < 2 && (h("div", { key: '2951e0f23a3de8fae3e1bbfd6eb1d607d2dc2275', class: "challenges__content" }, this.challenges.length === 0 && !this.loading && (h("div", { key: 'dc42b66dfb6f4fa42753123bdc07e00bfb716c3d', class: "empty" }, translate('empty', this.language))), h("casino-challenges-list", { key: '53eb947a6637400095e9c7b77c58b47b70b45afb', challenges: this.challenges, onLoadMore: this.onLoadMore, onTimerExpired: this.onTimerExpired, loading: this.loading, hasMore: ((_a = this.challenges) === null || _a === void 0 ? void 0 : _a.length) < this.total, language: this.language, activeTabIndex: this.activeTabIndex }))), this.activeTabIndex === 2 && (h("casino-challenges-player-history", { key: '467ce910010a03e26c1ecfac3c14f35acbc307c9', translationUrl: this.translationUrl, language: this.language, loading: this.loading, playerHistory: this.playerHistory, onLoadMore: this.onLoadMore, hasMore: ((_b = this.playerHistory) === null || _b === void 0 ? void 0 : _b.length) < this.total })), this.activeTabIndex === 3 && (h("casino-challenges-claim-code", { key: '62a08e91c1d991cd53e4f7ed47fcd2da9b323dc7', endpoint: this.endpoint, session: this.session, domain: this.domain, onOpenNotification: this.onOpenNotification })), this.notification && this.renderNotification())));
241
255
  }
242
256
  static get watchers() { return {
243
257
  "clientStyling": ["handleClientStylingChange"],
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-challenge-card_5",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"challenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeTabIndex":[514,"active-tab-index"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeTabIndex":[514,"active-tab-index"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
19
+ return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"challenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeTabIndex":[514,"active-tab-index"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeTabIndex":[514,"active-tab-index"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
20
20
  });
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
49
49
  }
50
50
  switch(bundleId) {
51
51
 
52
- case 'casino-challenge-card_5':
52
+ case 'casino-challenge-card_6':
53
53
  return import(
54
54
  /* webpackMode: "lazy" */
55
- './casino-challenge-card_5.entry.js').then(processMod, consoleError);
55
+ './casino-challenge-card_6.entry.js').then(processMod, consoleError);
56
56
  }
57
57
  }
58
58
  return import(
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesContainer } from './casino-challenges-container-677ffb33.js';
1
+ export { C as CasinoChallengesContainer } from './casino-challenges-container-ea97765a.js';
2
2
  import './index-7720ad93.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-challenge-card_5",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"challenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeTabIndex":[514,"active-tab-index"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeTabIndex":[514,"active-tab-index"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
8
+ return bootstrapLazy([["casino-challenge-card_6",[[1,"casino-challenges-container",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"userId":[513,"user-id"],"activeTabIndex":[32],"error":[32],"hasError":[32],"challenges":[32],"playerHistory":[32],"loading":[32],"pageNumber":[32],"total":[32],"pageSize":[32],"notification":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-list",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[513],"translationUrl":[513,"translation-url"],"challenges":[16],"loading":[516],"hasMore":[516,"has-more"],"activeTabIndex":[514,"active-tab-index"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenges-player-history",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"playerHistory":[16],"loading":[516],"hasMore":[516,"has-more"],"openItems":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"playerHistory":["handlePlayerHistoryChange"]}],[1,"casino-challenges-claim-code",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"loading":[32],"hasError":[32],"code":[32],"notificationMessage":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"casino-challenge-card",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"domain":[513],"session":[513],"challenge":[16],"isUserAuthorized":[516,"is-user-authorized"],"activeTabIndex":[514,"active-tab-index"],"tooltipIndex":[32],"timeLeft":[32],"error":[32],"hasError":[32],"actionLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,6 +1,7 @@
1
- import { IChallenge, IHistoryItem } from '../../utils/types';
1
+ import { IChallenge, IHistoryItem, INotificationOptions } from '../../utils/types';
2
2
  import "../../../../../../dist/packages/stencil/casino-challenges-list/dist/types/index";
3
3
  import "../../../../../../dist/packages/stencil/casino-challenges-player-history/dist/types/index";
4
+ import "../../../../../../dist/packages/stencil/casino-challenges-claim-code/dist/types/index";
4
5
  export declare class CasinoChallengesContainer {
5
6
  /**
6
7
  * Client custom styling via message bus
@@ -47,6 +48,7 @@ export declare class CasinoChallengesContainer {
47
48
  pageNumber: number;
48
49
  total: number;
49
50
  pageSize: number;
51
+ notification: INotificationOptions;
50
52
  private stylingContainer;
51
53
  private stylingSubscription;
52
54
  private readonly tabs;
@@ -54,6 +56,7 @@ export declare class CasinoChallengesContainer {
54
56
  handleClientStylingChange(newValue: any, oldValue: any): void;
55
57
  handleClientStylingUrlChange(newValue: any, oldValue: any): void;
56
58
  handleMbSourceChange(newValue: any, oldValue: any): void;
59
+ onOpenNotification: (event: CustomEvent<INotificationOptions>) => void;
57
60
  checkAttrs: () => boolean;
58
61
  getChallenges(): Promise<any>;
59
62
  loadData(): void;
@@ -62,6 +65,7 @@ export declare class CasinoChallengesContainer {
62
65
  disconnectedCallback(): void;
63
66
  componentWillLoad(): void;
64
67
  private handleTabClick;
68
+ private renderNotification;
65
69
  onTimerExpired(e: CustomEvent): void;
66
70
  render(): any;
67
71
  }
@@ -155,3 +155,8 @@ export interface IHistoryItemReward {
155
155
  LoyaltyEngineRewardType: number;
156
156
  RewardAmount: number;
157
157
  }
158
+ export interface INotificationOptions {
159
+ message: string;
160
+ errored?: boolean;
161
+ showTabLink?: boolean;
162
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-container",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",