@everymatrix/casino-challenges-overlay-drawer-details 0.0.1

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 (102) hide show
  1. package/dist/casino-challenges-overlay-drawer-details/app-globals-0f993ce5.js +1 -0
  2. package/dist/casino-challenges-overlay-drawer-details/casino-challenge-details-events_8.entry.js +1 -0
  3. package/dist/casino-challenges-overlay-drawer-details/casino-challenges-overlay-drawer-details-116a1e66.js +1 -0
  4. package/dist/casino-challenges-overlay-drawer-details/casino-challenges-overlay-drawer-details.esm.js +1 -0
  5. package/dist/casino-challenges-overlay-drawer-details/index-994a671b.js +2 -0
  6. package/dist/casino-challenges-overlay-drawer-details/index.esm.js +1 -0
  7. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  8. package/dist/cjs/casino-challenge-details-events_8.cjs.entry.js +424 -0
  9. package/dist/cjs/casino-challenges-overlay-drawer-details-45264a41.js +3207 -0
  10. package/dist/cjs/casino-challenges-overlay-drawer-details.cjs.js +25 -0
  11. package/dist/cjs/index-c31d813d.js +1522 -0
  12. package/dist/cjs/index.cjs.js +10 -0
  13. package/dist/cjs/loader.cjs.js +15 -0
  14. package/dist/collection/assets/alert.svg +3 -0
  15. package/dist/collection/assets/check.svg +3 -0
  16. package/dist/collection/assets/chevron-up.svg +3 -0
  17. package/dist/collection/assets/chevron.svg +4 -0
  18. package/dist/collection/assets/cross.svg +4 -0
  19. package/dist/collection/assets/error.svg +3 -0
  20. package/dist/collection/assets/gift.svg +24 -0
  21. package/dist/collection/assets/link.svg +3 -0
  22. package/dist/collection/assets/lock.svg +3 -0
  23. package/dist/collection/assets/opt-out.svg +3 -0
  24. package/dist/collection/assets/revert-icon.svg +4 -0
  25. package/dist/collection/assets/reward-gift.svg +123 -0
  26. package/dist/collection/assets/slot.svg +59 -0
  27. package/dist/collection/assets/sport.svg +34 -0
  28. package/dist/collection/assets/target.svg +16 -0
  29. package/dist/collection/assets/term-and-condition.svg +3 -0
  30. package/dist/collection/collection-manifest.json +19 -0
  31. package/dist/collection/components/casino-challenges-overlay-drawer-details/casino-challenges-overlay-drawer-details.css +870 -0
  32. package/dist/collection/components/casino-challenges-overlay-drawer-details/casino-challenges-overlay-drawer-details.js +735 -0
  33. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-events/casino-challenge-details-events.css +42 -0
  34. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-events/casino-challenge-details-events.js +125 -0
  35. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-games/casino-challenge-details-games.css +56 -0
  36. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-games/casino-challenge-details-games.js +117 -0
  37. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-levels/casino-challenge-details-levels.css +168 -0
  38. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-levels/casino-challenge-details-levels.js +197 -0
  39. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-progress-bar/casino-challenge-details-progress-bar.css +92 -0
  40. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-progress-bar/casino-challenge-details-progress-bar.js +120 -0
  41. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-rules/casino-challenge-details-rules.css +119 -0
  42. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-rules/casino-challenge-details-rules.js +264 -0
  43. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-expandable-paragraph/casino-challenge-expandable-paragraph.css +91 -0
  44. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-expandable-paragraph/casino-challenge-expandable-paragraph.js +113 -0
  45. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-level-progress-bar/casino-challenge-level-progress-bar.css +44 -0
  46. package/dist/collection/components/casino-challenges-overlay-drawer-details/components/casino-challenge-level-progress-bar/casino-challenge-level-progress-bar.js +80 -0
  47. package/dist/collection/components/casino-challenges-overlay-drawer-details/index.js +1 -0
  48. package/dist/collection/index.js +1 -0
  49. package/dist/collection/utils/consts.js +1 -0
  50. package/dist/collection/utils/general-info-utils.js +106 -0
  51. package/dist/collection/utils/levels-utils.js +55 -0
  52. package/dist/collection/utils/locale.utils.js +137 -0
  53. package/dist/collection/utils/types.js +139 -0
  54. package/dist/collection/utils/utils.js +36 -0
  55. package/dist/esm/app-globals-0f993ce5.js +3 -0
  56. package/dist/esm/casino-challenge-details-events_8.entry.js +414 -0
  57. package/dist/esm/casino-challenges-overlay-drawer-details-116a1e66.js +3199 -0
  58. package/dist/esm/casino-challenges-overlay-drawer-details.js +20 -0
  59. package/dist/esm/index-994a671b.js +1493 -0
  60. package/dist/esm/index.js +2 -0
  61. package/dist/esm/loader.js +11 -0
  62. package/dist/index.cjs.js +1 -0
  63. package/dist/index.js +1 -0
  64. package/dist/stencil.config.dev.js +19 -0
  65. package/dist/stencil.config.js +19 -0
  66. package/dist/storybook/main.js +43 -0
  67. package/dist/storybook/preview.js +9 -0
  68. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
  69. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/packages/stencil/casino-challenges-overlay-drawer-details/stencil.config.d.ts +2 -0
  70. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/packages/stencil/casino-challenges-overlay-drawer-details/stencil.config.dev.d.ts +2 -0
  71. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/packages/stencil/casino-challenges-overlay-drawer-details/storybook/main.d.ts +3 -0
  72. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/packages/stencil/casino-challenges-overlay-drawer-details/storybook/preview.d.ts +70 -0
  73. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/tools/plugins/index.d.ts +4 -0
  74. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
  75. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
  76. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
  77. package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-drawer-details/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
  78. package/dist/types/components/casino-challenges-overlay-drawer-details/casino-challenges-overlay-drawer-details.d.ts +71 -0
  79. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-events/casino-challenge-details-events.d.ts +9 -0
  80. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-games/casino-challenge-details-games.d.ts +9 -0
  81. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-levels/casino-challenge-details-levels.d.ts +14 -0
  82. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-progress-bar/casino-challenge-details-progress-bar.d.ts +8 -0
  83. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-details-rules/casino-challenge-details-rules.d.ts +27 -0
  84. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-expandable-paragraph/casino-challenge-expandable-paragraph.d.ts +15 -0
  85. package/dist/types/components/casino-challenges-overlay-drawer-details/components/casino-challenge-level-progress-bar/casino-challenge-level-progress-bar.d.ts +6 -0
  86. package/dist/types/components/casino-challenges-overlay-drawer-details/index.d.ts +1 -0
  87. package/dist/types/components.d.ts +244 -0
  88. package/dist/types/index.d.ts +1 -0
  89. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  90. package/dist/types/utils/consts.d.ts +1 -0
  91. package/dist/types/utils/general-info-utils.d.ts +10 -0
  92. package/dist/types/utils/levels-utils.d.ts +5 -0
  93. package/dist/types/utils/locale.utils.d.ts +12 -0
  94. package/dist/types/utils/types.d.ts +277 -0
  95. package/dist/types/utils/utils.d.ts +5 -0
  96. package/loader/cdn.js +1 -0
  97. package/loader/index.cjs.js +1 -0
  98. package/loader/index.d.ts +24 -0
  99. package/loader/index.es2017.js +1 -0
  100. package/loader/index.js +2 -0
  101. package/loader/package.json +11 -0
  102. package/package.json +27 -0
@@ -0,0 +1,735 @@
1
+ import { h } from "@stencil/core";
2
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
+ import { ChallengeStatusDictionary, EChallengeDetailsTabs, EChallengeProgressLevelStatus, EChallengeProgressStatus, EChallengesTabs, EChallengeStatus, EContributedFrom, EPostMessageRequestType } from "../../utils/types";
4
+ import { formatDate, getTimeLeft } from "../../utils/utils";
5
+ import { translate } from "../../utils/locale.utils";
6
+ import { actionButtonIsVisible, getActionButtonDescription, getActionButtonText, getBadgeContent, getDepositDescription, isClaimByButtonTriggerType, isDepositTriggerType, isGameLaunchTriggerType, isPromoChallenge } from "../../utils/general-info-utils";
7
+ import { getLevelStatus, getReward, getTarget } from "../../utils/levels-utils";
8
+ import sport from "../../assets/sport.svg";
9
+ import slot from "../../assets/slot.svg";
10
+ import target from "../../assets/target.svg";
11
+ import gift from "../../assets/gift.svg";
12
+ import chevron from "../../assets/chevron.svg";
13
+ import link from "../../assets/link.svg";
14
+ import revertIcon from "../../assets/revert-icon.svg";
15
+ import checkIcon from "../../assets/check.svg";
16
+ import alertIcon from "../../assets/alert.svg";
17
+ import infoIcon from "../../assets/alert.svg";
18
+ import crossSvg from "../../assets/cross.svg";
19
+ export class CasinoChallengesOverlayDrawerDetails {
20
+ constructor() {
21
+ this.activeEntityRef = null;
22
+ this.scrollContainerRef = null;
23
+ this.updateTime = () => {
24
+ var _a;
25
+ if (this.challenge) {
26
+ this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ExpirationTime);
27
+ if (!this.timeLeft) {
28
+ clearInterval(this.timerId);
29
+ }
30
+ }
31
+ };
32
+ this.handleClickSeeAll = (params) => () => {
33
+ var _a;
34
+ (_a = this.seeMoreClick) === null || _a === void 0 ? void 0 : _a.emit(params);
35
+ };
36
+ this.handleCloseClick = () => {
37
+ var _a;
38
+ (_a = this.closeClick) === null || _a === void 0 ? void 0 : _a.emit();
39
+ };
40
+ this.handleActionButtonClick = async () => {
41
+ var _a, _b, _c;
42
+ const depositTriggerType = isDepositTriggerType(this.challenge);
43
+ const gameLaunchTriggerType = isGameLaunchTriggerType(this.challenge);
44
+ const claimByButtonTriggerType = isClaimByButtonTriggerType(this.challenge);
45
+ if (depositTriggerType) {
46
+ this.triggerAction(EPostMessageRequestType.RedirectToDepositPage);
47
+ return;
48
+ }
49
+ else if (gameLaunchTriggerType) {
50
+ this.handleAllGamesClick();
51
+ return;
52
+ }
53
+ else if (claimByButtonTriggerType) {
54
+ this.triggerAction(EPostMessageRequestType.ClaimChallengeByButton, {
55
+ ChallengeId: (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeId
56
+ });
57
+ }
58
+ else {
59
+ const join = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus.Started ||
60
+ ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus.Paused;
61
+ this.triggerAction(EPostMessageRequestType.ChallengeJoin, Object.assign({}, (join ? { ProgressToActivate: this.challenge.Id } : { ProgressToDeactivate: this.challenge.Id })));
62
+ }
63
+ };
64
+ this.scrollToActiveLevel = () => {
65
+ if (this.activeEntityRef) {
66
+ const container = this.scrollContainerRef;
67
+ const target = this.activeEntityRef;
68
+ const containerLeft = container === null || container === void 0 ? void 0 : container.getBoundingClientRect().left;
69
+ const targetLeft = target.getBoundingClientRect().left;
70
+ const scrollOffset = targetLeft - containerLeft;
71
+ container === null || container === void 0 ? void 0 : container.scrollTo({
72
+ left: container.scrollLeft + scrollOffset - container.clientWidth / 2 + target.clientWidth / 2,
73
+ behavior: 'smooth'
74
+ });
75
+ }
76
+ };
77
+ this.optedOutNotification = () => {
78
+ var _a;
79
+ return (this.isOptedOut &&
80
+ !((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open) && (h("div", { class: "notification" }, h("img", { class: "notification__icon", src: alertIcon }), h("span", { class: "notification__message" }, translate('optedOutNotification', this.language)))));
81
+ };
82
+ this.forfeitedNotification = () => {
83
+ var _a, _b;
84
+ return (!this.isOptedOut &&
85
+ ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Status) === 5 &&
86
+ !((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.open) && (h("div", { class: "notification" }, h("img", { class: "notification__icon", src: alertIcon }), h("span", { class: "notification__message" }, translate('forfeitNotification', this.language)))));
87
+ };
88
+ this.completedNotification = () => {
89
+ var _a, _b;
90
+ return (((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Status) === 3 &&
91
+ !((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.open) && (h("div", { class: "notification" }, h("img", { class: "notification__icon", src: checkIcon }), h("div", { class: "notification__column" }, h("span", { class: "notification__title" }, translate('congrats', this.language)), h("span", { class: "notification__message" }, translate('completedNofitication', this.language))))));
92
+ };
93
+ this.expiredNotification = () => {
94
+ var _a, _b;
95
+ return (((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Status) === EChallengeProgressStatus.Expired &&
96
+ !((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.open) && (h("div", { class: "notification" }, h("img", { class: "notification__icon", src: infoIcon }), h("span", { class: "notification__message" }, translate('expiredNotification', this.language)))));
97
+ };
98
+ this.renderEventRule = (rule) => {
99
+ var _a, _b, _c, _d, _e;
100
+ const value = [
101
+ (_a = rule === null || rule === void 0 ? void 0 : rule.Discipline) === null || _a === void 0 ? void 0 : _a.Name,
102
+ (_b = rule === null || rule === void 0 ? void 0 : rule.Location) === null || _b === void 0 ? void 0 : _b.Name,
103
+ (_c = rule === null || rule === void 0 ? void 0 : rule.Template) === null || _c === void 0 ? void 0 : _c.Name,
104
+ (_d = rule === null || rule === void 0 ? void 0 : rule.Tournament) === null || _d === void 0 ? void 0 : _d.Name,
105
+ (_e = rule === null || rule === void 0 ? void 0 : rule.Event) === null || _e === void 0 ? void 0 : _e.Name
106
+ ]
107
+ .filter((x) => !!x)
108
+ .join(', ');
109
+ return (h("div", { class: "challenge-event ellipsed" }, `${value} - ${rule.ContributionPercent}% `, h("span", null, translate('contribution', this.language))));
110
+ };
111
+ this.handleAllGamesClick = () => {
112
+ var _a, _b;
113
+ this.triggerAction(EPostMessageRequestType.GetChallengeGames, { ChallengeId: (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeId });
114
+ (_b = this.seeMoreClick) === null || _b === void 0 ? void 0 : _b.emit({ open: true, tab: EChallengeDetailsTabs.Games });
115
+ };
116
+ this.renderDetailsContent = (fullScreen) => {
117
+ var _a, _b;
118
+ if ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open)
119
+ return this.renderSubPage();
120
+ const tabs = [
121
+ EChallengeDetailsTabs.Levels,
122
+ EChallengeDetailsTabs.Events,
123
+ EChallengeDetailsTabs.Games,
124
+ EChallengeDetailsTabs.Rules
125
+ ];
126
+ if (tabs.includes((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.tab))
127
+ return;
128
+ else
129
+ return (h("div", { class: "content" }, this.renderChallengeHeader(fullScreen), this.renderProgress(), this.renderGeneralInfo(), this.renderTerms(), this.renderLevels(), this.renderEvents(), this.renderGames(), this.renderRules()));
130
+ };
131
+ this.getTotalNumberForBreadcrumbs = (tab) => {
132
+ var _a, _b;
133
+ switch (tab) {
134
+ case EChallengeDetailsTabs.Levels:
135
+ return (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.LevelProgresses.length;
136
+ case EChallengeDetailsTabs.Games:
137
+ return (_b = this.challengeGames) === null || _b === void 0 ? void 0 : _b.length;
138
+ default:
139
+ break;
140
+ }
141
+ };
142
+ this.renderBreadcrumbs = () => {
143
+ var _a, _b, _c, _d;
144
+ const tab = translate(EChallengeDetailsTabs[(_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.tab].toLowerCase(), this.language);
145
+ const total = this.getTotalNumberForBreadcrumbs((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.tab);
146
+ return (h("div", { class: "breadcrumbs" }, h("div", null, h("button", { class: "action", onClick: this.handleClickSeeAll({ open: false, tab: undefined }) }, h("img", { src: revertIcon, alt: "" })), h("span", { class: "challenge-name ellipsed" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.PresentationName), h("span", { class: "divider" }, "/"), h("span", { class: "tab-name ellipsed" }, tab), total && h("span", { class: "total-number" }, "(", total, ")")), h("button", { class: "action", onClick: this.handleCloseClick }, h("img", { src: crossSvg, alt: "" }))));
147
+ };
148
+ this.renderSubPageContent = () => {
149
+ var _a, _b, _c, _d;
150
+ switch ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.tab) {
151
+ case EChallengeDetailsTabs.Levels:
152
+ return (h("casino-challenge-details-levels", { open: ((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.tab) === EChallengeDetailsTabs.Levels, challenge: this.challenge, isMobile: this.isMobile, isOptedOut: this.isOptedOut, isChallengePaused: this.isChallengePaused, language: this.language }));
153
+ case EChallengeDetailsTabs.Games:
154
+ return (h("casino-challenge-details-games", { challenge: this.challenge, isMobile: this.isMobile, language: this.language, games: this.challengeGames }));
155
+ case EChallengeDetailsTabs.Events:
156
+ return (h("casino-challenge-details-events", { open: ((_c = this.detailsSubPageInfo) === null || _c === void 0 ? void 0 : _c.tab) === EChallengeDetailsTabs.Events, challenge: this.challenge, isMobile: this.isMobile, language: this.language }));
157
+ case EChallengeDetailsTabs.Rules:
158
+ return (h("casino-challenge-details-rules", { open: ((_d = this.detailsSubPageInfo) === null || _d === void 0 ? void 0 : _d.tab) === EChallengeDetailsTabs.Rules, challenge: this.challenge, isMobile: this.isMobile, language: this.language, isOptedOut: this.isOptedOut }));
159
+ default:
160
+ return;
161
+ }
162
+ };
163
+ this.renderSubPage = () => {
164
+ return (h("div", { class: "sub-page-wrapper" }, this.renderBreadcrumbs(), h("div", { class: "sub-page" }, this.renderSubPageContent())));
165
+ };
166
+ this.mbSource = undefined;
167
+ this.clientStyling = undefined;
168
+ this.clientStylingUrl = undefined;
169
+ this.challenge = undefined;
170
+ this.language = 'en';
171
+ this.isMobile = false;
172
+ this.isUnique = false;
173
+ this.swipped = false;
174
+ this.progress = 0;
175
+ this.activeChallengesTabIndex = String(EChallengesTabs.Promo);
176
+ this.detailsSubPageInfo = undefined;
177
+ this.isOptedOut = false;
178
+ this.challengeGames = [];
179
+ this.swipping = false;
180
+ this.actionLoading = false;
181
+ this.error = '';
182
+ this.isChallengePaused = false;
183
+ this.timeLeft = undefined;
184
+ }
185
+ handleClientStylingChange(newValue, oldValue) {
186
+ if (newValue != oldValue) {
187
+ setClientStyling(this.stylingContainer, this.clientStyling);
188
+ }
189
+ }
190
+ handleClientStylingUrlChange(newValue, oldValue) {
191
+ if (newValue != oldValue) {
192
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
193
+ }
194
+ }
195
+ handleMbSourceChange(newValue, oldValue) {
196
+ if (newValue != oldValue) {
197
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
198
+ }
199
+ }
200
+ onSwipeChange(newValue) {
201
+ if (newValue === 1) {
202
+ this.swipping = true;
203
+ }
204
+ else if (newValue === 0) {
205
+ this.swipping = false;
206
+ }
207
+ }
208
+ onChallengeChange(newValue, oldValue) {
209
+ this.isChallengePaused = (newValue === null || newValue === void 0 ? void 0 : newValue.ChallengeStatus) === EChallengeStatus.Paused;
210
+ if ((newValue === null || newValue === void 0 ? void 0 : newValue.Id) !== (oldValue === null || oldValue === void 0 ? void 0 : oldValue.Id)) {
211
+ if (newValue === null || newValue === void 0 ? void 0 : newValue.IsNew) {
212
+ this.triggerAction(EPostMessageRequestType.ChallengeIsNew, {
213
+ ChallengeProgressId: newValue === null || newValue === void 0 ? void 0 : newValue.Id
214
+ });
215
+ }
216
+ }
217
+ setTimeout(() => {
218
+ this.scrollToActiveLevel();
219
+ }, 0);
220
+ }
221
+ componentDidLoad() {
222
+ if (this.stylingContainer) {
223
+ if (this.mbSource)
224
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
225
+ if (this.clientStyling)
226
+ setClientStyling(this.stylingContainer, this.clientStyling);
227
+ if (this.clientStylingUrl)
228
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
229
+ }
230
+ }
231
+ connectedCallback() {
232
+ this.timerId = setInterval(() => {
233
+ this.updateTime();
234
+ }, 1000);
235
+ }
236
+ componentWillLoad() {
237
+ this.updateTime();
238
+ this.onChallengeChange(this.challenge);
239
+ }
240
+ disconnectedCallback() {
241
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
242
+ clearInterval(this.timerId);
243
+ }
244
+ triggerAction(type, data) {
245
+ window.postMessage({
246
+ type,
247
+ data
248
+ });
249
+ }
250
+ renderChallengeHeader(fullScreen) {
251
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
252
+ const isPromo = isPromoChallenge(this.activeChallengesTabIndex);
253
+ const isPending = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Status) === EChallengeProgressStatus.Awaiting;
254
+ const showButton = actionButtonIsVisible(this.challenge, isPromo, this.isOptedOut) && !isPending;
255
+ const depositTriggerType = isDepositTriggerType(this.challenge);
256
+ const depositDescription = this.challenge && getDepositDescription(this.challenge, this.language);
257
+ const launchGameDescription = translate('launchDescription', this.language);
258
+ const claimDescription = translate('claimDescription', this.language);
259
+ const claimByButtonTriggerType = isClaimByButtonTriggerType(this.challenge);
260
+ const promoDescription = depositTriggerType
261
+ ? depositDescription
262
+ : claimByButtonTriggerType
263
+ ? claimDescription
264
+ : launchGameDescription;
265
+ const description = translate(getActionButtonDescription(this.challenge, this.activeChallengesTabIndex === String(EChallengesTabs.Pending)), this.language);
266
+ return (h("div", { class: "head" }, this.isMobile && (isPromo || this.activeChallengesTabIndex === String(EChallengesTabs.Pending)) && (h("p", { class: { 'action-description': true, 'promo-action-description': isPromo || isPending } }, isPromo ? promoDescription : description)), h("div", { class: "row", style: { padding: '0 4px', justifyContent: 'space-between', gap: '10px' } }, h("h1", { class: "challenge-title" }, (_c = (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.ChallengePresentation) === null || _c === void 0 ? void 0 : _c.PresentationName), showButton && this.isMobile && !fullScreen && (h("button", { class: {
267
+ 'action-button': true,
268
+ 'details__general-info-action-button': true,
269
+ filled: isPromo,
270
+ grayed: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus.Paused ||
271
+ ((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus.InProgress ||
272
+ ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus.PendingLevelReward ||
273
+ this.isOptedOut
274
+ }, disabled: this.actionLoading, onClick: this.handleActionButtonClick }, translate(getActionButtonText(this.challenge), this.language)))), this.forfeitedNotification(), this.completedNotification(), this.expiredNotification(), this.optedOutNotification(), this.isMobile && fullScreen && (h("div", { class: {
275
+ banner: true,
276
+ grayed: [
277
+ EChallengeProgressStatus.Expired,
278
+ EChallengeProgressStatus.Forfeited,
279
+ EChallengeProgressStatus.Completed
280
+ ].includes((_g = this.challenge) === null || _g === void 0 ? void 0 : _g.Status) ||
281
+ this.isChallengePaused ||
282
+ this.isOptedOut
283
+ } }, h("div", { class: "banner__image-wrapper" }, h("img", { src: (_j = (_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengePresentation) === null || _j === void 0 ? void 0 : _j.BannerUrl, alt: "" })), h("div", { class: `banner__badge ${((_k = this.challenge) === null || _k === void 0 ? void 0 : _k.ChallengeStatus) !== EChallengeStatus.Paused
284
+ ? ChallengeStatusDictionary[(_l = this.challenge) === null || _l === void 0 ? void 0 : _l.Status]
285
+ : 'unavailable'}` }, this.challenge && getBadgeContent(this.challenge, this.language, this.timeLeft))))));
286
+ }
287
+ renderProgress() {
288
+ var _a;
289
+ const { Status, LevelProgresses, ChallengeStatus } = this.challenge || {};
290
+ if (this.activeChallengesTabIndex === String(EChallengesTabs.Pending) ||
291
+ ChallengeStatus === EChallengeStatus.Closed ||
292
+ ChallengeStatus === EChallengeStatus.Deleted ||
293
+ Status === EChallengeProgressStatus.Expired ||
294
+ Status === EChallengeProgressStatus.Started ||
295
+ Status === EChallengeProgressStatus.Forfeited) {
296
+ return null;
297
+ }
298
+ return (((LevelProgresses === null || LevelProgresses === void 0 ? void 0 : LevelProgresses.find((x) => x.ProgressStatus === EChallengeProgressLevelStatus.InProgress)) ||
299
+ ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Status) === EChallengeProgressStatus.Awaiting) && (h("div", { class: { 'challenge-block': true, 'progress-block': true }, style: { display: 'block', padding: '14px' } }, h("h3", null, translate('yourProgress', this.language)), h("casino-challenge-details-progress-bar", { challenge: this.challenge, language: this.language, "is-mobile": this.isMobile }))));
300
+ }
301
+ renderGeneralInfo() {
302
+ var _a, _b, _c, _d, _e;
303
+ return (h("div", { class: { 'challenge-block': true, 'challenge-general-info': true } }, h("div", { class: { column: true, 'general-info-col': true } }, h("h3", { class: "label" }, translate('bet', this.language)), ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ContributedFrom) === EContributedFrom.Sportsbook && (h("p", { class: "description" }, h("span", null, translate('sports', this.language)), " ", h("img", { src: sport, class: "general-info-icon" }))), ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.ContributedFrom) === EContributedFrom.Casino && (h("p", { class: "description" }, h("span", null, translate('casino', this.language)), " ", h("img", { src: slot, class: "general-info-icon" }))), ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ContributedFrom) === EContributedFrom.Any && h("p", { class: "description" }, "-")), h("div", { class: { column: true, 'general-info-col': true } }, h("h3", { class: "label" }, translate('endDate', this.language)), h("p", { class: "description date-description" }, ' ', this.challenge ? formatDate((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ExpirationTime) : '-')), h("div", { class: { column: true, 'general-info-col': true } }, h("h3", { class: "label" }, translate('totalLevels', this.language)), h("p", { class: "description total-level-description" }, (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.LevelProgresses.length))));
304
+ }
305
+ renderTerms() {
306
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
307
+ return ((((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.Url) || ((_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.SignificantCondition)) && (h("div", { class: "challenge-terms" }, ((_f = (_e = this.challenge) === null || _e === void 0 ? void 0 : _e.ChallengePresentation) === null || _f === void 0 ? void 0 : _f.Url) && (h("a", { class: "terms-title", href: (_h = (_g = this.challenge) === null || _g === void 0 ? void 0 : _g.ChallengePresentation) === null || _h === void 0 ? void 0 : _h.Url, target: "_blank" }, translate('terms', this.language), h("img", { class: "icon", src: link }))), ((_k = (_j = this.challenge) === null || _j === void 0 ? void 0 : _j.ChallengePresentation) === null || _k === void 0 ? void 0 : _k.SignificantCondition) && (h("p", { class: "terms-description" }, ((_m = (_l = this.challenge) === null || _l === void 0 ? void 0 : _l.ChallengePresentation) === null || _m === void 0 ? void 0 : _m.SignificantCondition) || '')))));
308
+ }
309
+ renderLevels() {
310
+ var _a, _b, _c;
311
+ return (h("div", { class: { 'challenge-block': true, 'challenge-levels': true } }, h("div", { class: "challenge-block-header" }, h("div", { class: "total-levels" }, h("h3", null, translate('levels', this.language)), h("span", null, "(", (_a = this.challenge) === null || _a === void 0 ? void 0 :
312
+ _a.LevelProgresses.length, ")")), h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs.Levels }) }, h("p", null, translate('seeAll', this.language)), h("div", { class: "chevron-button" }, h("img", { src: chevron })))), h("div", { class: 'row levels-row', ref: (el) => (this.scrollContainerRef = el) }, (_c = (_b = this.challenge) === null || _b === void 0 ? void 0 : _b.LevelProgresses) === null || _c === void 0 ? void 0 : _c.map((level, index) => {
313
+ var _a, _b, _c, _d, _e, _f;
314
+ const activeChallenge = [0, 1, 2, 3].includes((_a = this === null || this === void 0 ? void 0 : this.challenge) === null || _a === void 0 ? void 0 : _a.Status) && !this.isChallengePaused;
315
+ const isGrayed = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus.Forfeited ||
316
+ level.ProgressStatus === EChallengeProgressLevelStatus.Closed ||
317
+ level.ProgressStatus === EChallengeProgressLevelStatus.Fillup ||
318
+ this.isOptedOut;
319
+ const isActiveMatch = level.ProgressStatus === EChallengeProgressLevelStatus.InProgress;
320
+ return (h("div", { class: {
321
+ 'challenge-level': true,
322
+ level: true,
323
+ forfeited: ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) === EChallengeProgressStatus.Forfeited ||
324
+ level.ProgressStatus === EChallengeProgressLevelStatus.Closed ||
325
+ level.ProgressStatus === EChallengeProgressLevelStatus.Fillup ||
326
+ this.isOptedOut,
327
+ suspended: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus.Paused,
328
+ active: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus.InProgress,
329
+ completed: activeChallenge && level.ProgressStatus === EChallengeProgressLevelStatus.Completed
330
+ }, ref: isActiveMatch ? (el) => (this.activeEntityRef = el) : undefined, key: level.LevelId }, h("div", { class: {
331
+ level__title: true,
332
+ grayed: isGrayed
333
+ } }, h("span", null, "Level ", index + 1), getLevelStatus((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status, level, activeChallenge, this.language)), h("div", { class: {
334
+ level__bonus: true
335
+ } }, h("span", { class: "level__icon" }, h("img", { class: {
336
+ grayed: isGrayed
337
+ }, src: gift, alt: "gift-icon", title: "gift-icon" })), h("span", { class: {
338
+ level__value: true,
339
+ description: true,
340
+ ellipsed: true
341
+ } }, getReward(level))), h("div", { class: {
342
+ level__target: true
343
+ } }, h("span", { class: "level__icon" }, h("img", { class: {
344
+ grayed: isGrayed
345
+ }, src: target, alt: "target-icon", title: "target-icon" })), h("span", { class: {
346
+ level__value: true,
347
+ description: true,
348
+ ellipsed: true
349
+ } }, this.challenge && getTarget(level, (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.CurrencySymbol, this.language)))));
350
+ }))));
351
+ }
352
+ renderEvents() {
353
+ var _a, _b, _c, _d, _e;
354
+ const sortedRules = ((_c = (_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.SportSettings) === null || _b === void 0 ? void 0 : _b.EventRules) === null || _c === void 0 ? void 0 : _c.sort((a, b) => a.OrderNumber - b.OrderNumber)) || [];
355
+ if (((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ContributedFrom) === EContributedFrom.Sportsbook && sortedRules.length) {
356
+ return (h("div", { class: { 'challenge-block': true, 'challenge-levels': true } }, h("div", { class: "challenge-block-header" }, h("h3", null, translate('events', this.language)), h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs.Events }) }, h("p", null, translate('seeAll', this.language)), h("div", { class: "chevron-button" }, h("img", { src: chevron })))), h("div", { class: "challenge-event" }, translate('defaultRule', this.language) + `${(_e = sortedRules[0]) === null || _e === void 0 ? void 0 : _e.ContributionPercent}% `, h("span", null, translate('contribution', this.language))), sortedRules[1] && this.renderEventRule(sortedRules[1])));
357
+ }
358
+ return null;
359
+ }
360
+ renderGames() {
361
+ var _a, _b, _c, _d, _e;
362
+ if (!!((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.Games) === null || _b === void 0 ? void 0 : _b.length) && ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.TotalGamesCount)) {
363
+ return (h("div", { class: { 'challenge-block': true, 'challenge-games': true } }, h("div", { class: "challenge-block-header" }, h("div", { class: "total-games" }, h("h3", null, translate('games', this.language)), h("span", null, "(", this.challenge.TotalGamesCount, ")")), h("button", { class: "row button", onClick: this.handleAllGamesClick }, h("p", null, translate('seeAll', this.language)), h("div", { class: "chevron-button" }, h("img", { src: chevron })))), h("div", { class: "row games-row" }, (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Games) === null || _e === void 0 ? void 0 : _e.map((game) => (h("div", { class: "challenge-game" }, h("img", { src: game.GameIcon })))))));
364
+ }
365
+ return null;
366
+ }
367
+ renderRules() {
368
+ var _a, _b, _c, _d;
369
+ const fullScreen = this.swipping && this.progress > 0;
370
+ return (h("div", { class: { 'challenge-block': true, 'challenge-rules': true, 'challenge-rules-gap': fullScreen } }, h("div", { class: "challenge-block-header" }, h("h3", null, translate('rules', this.language)), h("button", { class: "row button", onClick: this.handleClickSeeAll({ open: true, tab: EChallengeDetailsTabs.Rules }) }, h("p", null, translate('seeAll', this.language)), h("div", { class: "chevron-button" }, h("img", { src: chevron })))), ((_b = (_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengePresentation) === null || _b === void 0 ? void 0 : _b.Description) && (h("div", { class: "challenge-rule" }, (_d = (_c = this.challenge) === null || _c === void 0 ? void 0 : _c.ChallengePresentation) === null || _d === void 0 ? void 0 : _d.Description))));
371
+ }
372
+ renderFooter() {
373
+ var _a, _b, _c, _d, _e, _f;
374
+ const gameLaunchTriggerType = isGameLaunchTriggerType(this.challenge);
375
+ if (gameLaunchTriggerType && ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.tab) === EChallengeDetailsTabs.Games) {
376
+ return;
377
+ }
378
+ const isPromo = isPromoChallenge(this.activeChallengesTabIndex);
379
+ const isPending = ((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) === EChallengeProgressStatus.Awaiting;
380
+ const showButton = actionButtonIsVisible(this.challenge, isPromo, this.isOptedOut);
381
+ const depositTriggerType = isDepositTriggerType(this.challenge);
382
+ const depositDescription = this.challenge && getDepositDescription(this.challenge, this.language);
383
+ const launchGameDescription = translate('launchDescription', this.language);
384
+ const claimDescription = translate('claimDescription', this.language);
385
+ const claimByButtonTriggerType = isClaimByButtonTriggerType(this.challenge);
386
+ const promoDescription = depositTriggerType
387
+ ? depositDescription
388
+ : claimByButtonTriggerType
389
+ ? claimDescription
390
+ : launchGameDescription;
391
+ const description = translate(getActionButtonDescription(this.challenge, this.activeChallengesTabIndex === String(EChallengesTabs.Pending)), this.language);
392
+ if (!showButton) {
393
+ return;
394
+ }
395
+ return (h("div", { class: "footer" }, h("p", { class: { 'action-description': true, 'promo-action-description': isPromo || isPending } }, isPromo ? promoDescription : description), ((_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Status) !== EChallengeProgressStatus.Awaiting && (h("button", { class: {
396
+ 'action-button': true,
397
+ 'footer-action-button': true,
398
+ filled: isPromo,
399
+ grayed: ((_d = this.challenge) === null || _d === void 0 ? void 0 : _d.Status) === EChallengeProgressStatus.Paused ||
400
+ ((_e = this.challenge) === null || _e === void 0 ? void 0 : _e.Status) === EChallengeProgressStatus.InProgress ||
401
+ ((_f = this.challenge) === null || _f === void 0 ? void 0 : _f.Status) === EChallengeProgressStatus.PendingLevelReward
402
+ }, onClick: this.handleActionButtonClick, disabled: this.actionLoading }, translate(getActionButtonText(this.challenge), this.language)))));
403
+ }
404
+ render() {
405
+ var _a, _b;
406
+ const fullScreen = (this.swipping && this.progress > 0) || ((_a = this.detailsSubPageInfo) === null || _a === void 0 ? void 0 : _a.open);
407
+ const footerIsVisible = !this.isMobile || (this.isMobile && fullScreen);
408
+ return (h("div", { key: '86168e21384bf7f861e12c69af8e1218167c712e', class: {
409
+ Mobile: this.isMobile,
410
+ swipped: (this.isMobile && this.swipping && this.progress > 0) || !this.isMobile,
411
+ moved: this.progress > 0,
412
+ tabView: !!((_b = this.detailsSubPageInfo) === null || _b === void 0 ? void 0 : _b.open),
413
+ oneSlide: this.isUnique,
414
+ hasAction: actionButtonIsVisible(this.challenge, isPromoChallenge(this.activeChallengesTabIndex), this.isOptedOut),
415
+ 'challenge-details': true
416
+ } }, this.renderDetailsContent(fullScreen), footerIsVisible && this.renderFooter()));
417
+ }
418
+ static get is() { return "casino-challenges-overlay-drawer-details"; }
419
+ static get encapsulation() { return "shadow"; }
420
+ static get originalStyleUrls() {
421
+ return {
422
+ "$": ["casino-challenges-overlay-drawer-details.scss"]
423
+ };
424
+ }
425
+ static get styleUrls() {
426
+ return {
427
+ "$": ["casino-challenges-overlay-drawer-details.css"]
428
+ };
429
+ }
430
+ static get properties() {
431
+ return {
432
+ "mbSource": {
433
+ "type": "string",
434
+ "mutable": false,
435
+ "complexType": {
436
+ "original": "string",
437
+ "resolved": "string",
438
+ "references": {}
439
+ },
440
+ "required": false,
441
+ "optional": false,
442
+ "docs": {
443
+ "tags": [],
444
+ "text": ""
445
+ },
446
+ "attribute": "mb-source",
447
+ "reflect": true
448
+ },
449
+ "clientStyling": {
450
+ "type": "string",
451
+ "mutable": false,
452
+ "complexType": {
453
+ "original": "string",
454
+ "resolved": "string",
455
+ "references": {}
456
+ },
457
+ "required": false,
458
+ "optional": false,
459
+ "docs": {
460
+ "tags": [],
461
+ "text": ""
462
+ },
463
+ "attribute": "client-styling",
464
+ "reflect": true
465
+ },
466
+ "clientStylingUrl": {
467
+ "type": "string",
468
+ "mutable": false,
469
+ "complexType": {
470
+ "original": "string",
471
+ "resolved": "string",
472
+ "references": {}
473
+ },
474
+ "required": false,
475
+ "optional": false,
476
+ "docs": {
477
+ "tags": [],
478
+ "text": ""
479
+ },
480
+ "attribute": "client-styling-url",
481
+ "reflect": true
482
+ },
483
+ "challenge": {
484
+ "type": "unknown",
485
+ "mutable": false,
486
+ "complexType": {
487
+ "original": "IChallenge | null",
488
+ "resolved": "IChallenge",
489
+ "references": {
490
+ "IChallenge": {
491
+ "location": "import",
492
+ "path": "../../utils/types",
493
+ "id": "../../../../packages/stencil/casino-challenges-overlay-drawer-details/src/utils/types.ts::IChallenge"
494
+ }
495
+ }
496
+ },
497
+ "required": false,
498
+ "optional": true,
499
+ "docs": {
500
+ "tags": [],
501
+ "text": ""
502
+ }
503
+ },
504
+ "language": {
505
+ "type": "string",
506
+ "mutable": false,
507
+ "complexType": {
508
+ "original": "string",
509
+ "resolved": "string",
510
+ "references": {}
511
+ },
512
+ "required": false,
513
+ "optional": false,
514
+ "docs": {
515
+ "tags": [],
516
+ "text": ""
517
+ },
518
+ "attribute": "language",
519
+ "reflect": true,
520
+ "defaultValue": "'en'"
521
+ },
522
+ "isMobile": {
523
+ "type": "boolean",
524
+ "mutable": false,
525
+ "complexType": {
526
+ "original": "boolean",
527
+ "resolved": "boolean",
528
+ "references": {}
529
+ },
530
+ "required": false,
531
+ "optional": false,
532
+ "docs": {
533
+ "tags": [],
534
+ "text": ""
535
+ },
536
+ "attribute": "is-mobile",
537
+ "reflect": true,
538
+ "defaultValue": "false"
539
+ },
540
+ "isUnique": {
541
+ "type": "boolean",
542
+ "mutable": false,
543
+ "complexType": {
544
+ "original": "boolean",
545
+ "resolved": "boolean",
546
+ "references": {}
547
+ },
548
+ "required": false,
549
+ "optional": false,
550
+ "docs": {
551
+ "tags": [],
552
+ "text": ""
553
+ },
554
+ "attribute": "is-unique",
555
+ "reflect": true,
556
+ "defaultValue": "false"
557
+ },
558
+ "swipped": {
559
+ "type": "boolean",
560
+ "mutable": false,
561
+ "complexType": {
562
+ "original": "boolean",
563
+ "resolved": "boolean",
564
+ "references": {}
565
+ },
566
+ "required": false,
567
+ "optional": false,
568
+ "docs": {
569
+ "tags": [],
570
+ "text": ""
571
+ },
572
+ "attribute": "swipped",
573
+ "reflect": true,
574
+ "defaultValue": "false"
575
+ },
576
+ "progress": {
577
+ "type": "number",
578
+ "mutable": false,
579
+ "complexType": {
580
+ "original": "number",
581
+ "resolved": "number",
582
+ "references": {}
583
+ },
584
+ "required": false,
585
+ "optional": false,
586
+ "docs": {
587
+ "tags": [],
588
+ "text": ""
589
+ },
590
+ "attribute": "progress",
591
+ "reflect": true,
592
+ "defaultValue": "0"
593
+ },
594
+ "activeChallengesTabIndex": {
595
+ "type": "string",
596
+ "mutable": false,
597
+ "complexType": {
598
+ "original": "string",
599
+ "resolved": "string",
600
+ "references": {}
601
+ },
602
+ "required": false,
603
+ "optional": false,
604
+ "docs": {
605
+ "tags": [],
606
+ "text": ""
607
+ },
608
+ "attribute": "active-challenges-tab-index",
609
+ "reflect": true,
610
+ "defaultValue": "String(EChallengesTabs.Promo)"
611
+ },
612
+ "detailsSubPageInfo": {
613
+ "type": "unknown",
614
+ "mutable": false,
615
+ "complexType": {
616
+ "original": "{ open: boolean; tab: EChallengeDetailsTabs }",
617
+ "resolved": "{ open: boolean; tab: EChallengeDetailsTabs; }",
618
+ "references": {
619
+ "EChallengeDetailsTabs": {
620
+ "location": "import",
621
+ "path": "../../utils/types",
622
+ "id": "../../../../packages/stencil/casino-challenges-overlay-drawer-details/src/utils/types.ts::EChallengeDetailsTabs"
623
+ }
624
+ }
625
+ },
626
+ "required": false,
627
+ "optional": true,
628
+ "docs": {
629
+ "tags": [],
630
+ "text": ""
631
+ }
632
+ },
633
+ "isOptedOut": {
634
+ "type": "boolean",
635
+ "mutable": false,
636
+ "complexType": {
637
+ "original": "boolean",
638
+ "resolved": "boolean",
639
+ "references": {}
640
+ },
641
+ "required": false,
642
+ "optional": false,
643
+ "docs": {
644
+ "tags": [],
645
+ "text": ""
646
+ },
647
+ "attribute": "is-opted-out",
648
+ "reflect": true,
649
+ "defaultValue": "false"
650
+ },
651
+ "challengeGames": {
652
+ "type": "unknown",
653
+ "mutable": false,
654
+ "complexType": {
655
+ "original": "IGameDetails[]",
656
+ "resolved": "IGameDetails[]",
657
+ "references": {
658
+ "IGameDetails": {
659
+ "location": "import",
660
+ "path": "../../utils/types",
661
+ "id": "../../../../packages/stencil/casino-challenges-overlay-drawer-details/src/utils/types.ts::IGameDetails"
662
+ }
663
+ }
664
+ },
665
+ "required": false,
666
+ "optional": false,
667
+ "docs": {
668
+ "tags": [],
669
+ "text": ""
670
+ },
671
+ "defaultValue": "[]"
672
+ }
673
+ };
674
+ }
675
+ static get states() {
676
+ return {
677
+ "swipping": {},
678
+ "actionLoading": {},
679
+ "error": {},
680
+ "isChallengePaused": {},
681
+ "timeLeft": {}
682
+ };
683
+ }
684
+ static get events() {
685
+ return [{
686
+ "method": "seeMoreClick",
687
+ "name": "seeMoreClick",
688
+ "bubbles": true,
689
+ "cancelable": true,
690
+ "composed": true,
691
+ "docs": {
692
+ "tags": [],
693
+ "text": ""
694
+ },
695
+ "complexType": {
696
+ "original": "any",
697
+ "resolved": "any",
698
+ "references": {}
699
+ }
700
+ }, {
701
+ "method": "closeClick",
702
+ "name": "closeClick",
703
+ "bubbles": true,
704
+ "cancelable": true,
705
+ "composed": true,
706
+ "docs": {
707
+ "tags": [],
708
+ "text": ""
709
+ },
710
+ "complexType": {
711
+ "original": "any",
712
+ "resolved": "any",
713
+ "references": {}
714
+ }
715
+ }];
716
+ }
717
+ static get watchers() {
718
+ return [{
719
+ "propName": "clientStyling",
720
+ "methodName": "handleClientStylingChange"
721
+ }, {
722
+ "propName": "clientStylingUrl",
723
+ "methodName": "handleClientStylingUrlChange"
724
+ }, {
725
+ "propName": "mbSource",
726
+ "methodName": "handleMbSourceChange"
727
+ }, {
728
+ "propName": "progress",
729
+ "methodName": "onSwipeChange"
730
+ }, {
731
+ "propName": "challenge",
732
+ "methodName": "onChallengeChange"
733
+ }];
734
+ }
735
+ }