@everymatrix/casino-engagement-suite-tournament 1.60.2 → 1.61.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 (35) hide show
  1. package/dist/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
  2. package/dist/casino-engagement-suite-tournament/index.esm.js +1 -1
  3. package/dist/casino-engagement-suite-tournament/{p-b582ab53.entry.js → p-2dd35709.entry.js} +1 -1
  4. package/dist/casino-engagement-suite-tournament/p-2de8ee45.js +15 -0
  5. package/dist/casino-engagement-suite-tournament/{p-a9e7f099.js → p-bfca9e2a.js} +1 -1
  6. package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +2 -2
  7. package/dist/cjs/{casino-engagement-suite-tournament-0a51ec72.js → casino-engagement-suite-tournament-49cebf14.js} +123 -36
  8. package/dist/cjs/casino-engagement-suite-tournament.cjs.js +2 -2
  9. package/dist/cjs/{index-3539ab09.js → index-982cd594.js} +2 -1
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/assets/reward.svg +11 -0
  13. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +80 -26
  14. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +58 -6
  15. package/dist/collection/shared/icons.js +2 -1
  16. package/dist/collection/shared/renders.page.js +5 -5
  17. package/dist/collection/shared/renders.tab.js +4 -2
  18. package/dist/collection/shared/renders.util.js +3 -4
  19. package/dist/collection/utils/api.apdater.js +1 -1
  20. package/dist/collection/utils/bussiness.js +15 -0
  21. package/dist/collection/utils/message.js +15 -9
  22. package/dist/collection/utils/utils.js +38 -1
  23. package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +2 -2
  24. package/dist/esm/{casino-engagement-suite-tournament-8680a674.js → casino-engagement-suite-tournament-bd7c9cdd.js} +123 -36
  25. package/dist/esm/casino-engagement-suite-tournament.js +3 -3
  26. package/dist/esm/{index-ecf4f553.js → index-ac437a77.js} +2 -1
  27. package/dist/esm/index.js +2 -2
  28. package/dist/esm/loader.js +3 -3
  29. package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +19 -9
  30. package/dist/types/utils/bussiness.d.ts +12 -0
  31. package/dist/types/utils/message.d.ts +2 -0
  32. package/dist/types/utils/types.d.ts +1 -1
  33. package/dist/types/utils/utils.d.ts +6 -0
  34. package/package.json +1 -1
  35. package/dist/casino-engagement-suite-tournament/p-e7ecbdf5.js +0 -15
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'casino-engagement-suite-tournament';
24
- const BUILD = /* casino-engagement-suite-tournament */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
24
+ const BUILD = /* casino-engagement-suite-tournament */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -1583,6 +1583,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1583
1583
  }
1584
1584
  };
1585
1585
  var getHostListenerTarget = (elm, flags) => {
1586
+ if (flags & 4 /* TargetDocument */) return doc;
1586
1587
  if (flags & 8 /* TargetWindow */) return win;
1587
1588
  return elm;
1588
1589
  };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-0a51ec72.js');
6
- require('./index-3539ab09.js');
5
+ const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-49cebf14.js');
6
+ require('./index-982cd594.js');
7
7
  require('@everymatrix/general-animation-loading/dist');
8
8
 
9
9
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3539ab09.js');
5
+ const index = require('./index-982cd594.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["casino-engagement-suite-progress-bar_3.cjs",[[1,"casino-engagement-suite-tournament",{"language":[1],"show":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"device":[1],"leaderboardsInit":[16],"tab":[32],"locale":[32],"tournamentItem":[32],"tournamentList":[32],"leaderboards":[32],"isDialogOpen":[32],"isShowInfo":[32],"page":[32],"tournamentInDialog":[32],"dialog":[32],"time":[32],"newIdList":[32]},[[8,"message","handleEvent"]],{"newIdList":["checkNewIdList"],"tournamentList":["syncBarState"],"show":["showPropWatcher"]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
11
+ return index.bootstrapLazy([["casino-engagement-suite-progress-bar_3.cjs",[[1,"casino-engagement-suite-tournament",{"language":[1],"show":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"device":[1],"leaderboardsInit":[16],"tab":[32],"locale":[32],"tournamentItem":[32],"tournamentList":[32],"leaderboards":[32],"isDialogOpen":[32],"isShowInfo":[32],"page":[32],"tournamentInDialog":[32],"dialog":[32],"time":[32],"newIdList":[32]},[[8,"message","handleEvent"],[4,"click","handleClickOutside"]],{"newIdList":["checkNewIdList"],"tournamentList":["syncBarState"],"show":["showPropWatcher"]}],[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -0,0 +1,11 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><script xmlns=""/>
2
+ <g clip-path="url(#clip0_2115_306)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4.90292 0.666496C4.92339 0.666579 4.9434 0.66666 4.96286 0.66666H11.0369C11.0564 0.66666 11.0764 0.666579 11.0969 0.666496C11.3056 0.665653 11.5627 0.664613 11.7893 0.74707C12.1596 0.881868 12.4514 1.17361 12.5862 1.54397C12.6394 1.69031 12.6578 1.84942 12.664 1.99999L13.6842 1.99999C13.8242 1.99998 13.9607 1.99996 14.0767 2.00788C14.2036 2.01654 14.3541 2.03686 14.5101 2.10149C14.8368 2.23681 15.0964 2.49638 15.2317 2.82308C15.2964 2.97911 15.3167 3.12959 15.3253 3.25651C15.3333 3.37256 15.3332 3.50898 15.3332 3.64901V3.99999C15.3332 4.03102 15.3333 4.06158 15.3333 4.09171C15.3336 4.62197 15.3338 5.01574 15.2424 5.35684C14.9958 6.27709 14.277 6.99588 13.3568 7.24246C13.103 7.31044 12.8202 7.32774 12.4737 7.33203C11.9618 9.05393 10.4829 10.3596 8.66657 10.6194V11.3333H8.96286C10.6402 11.3333 11.9999 12.6931 11.9999 14.3704C11.9999 14.9022 11.5688 15.3333 11.0369 15.3333H4.96286C4.43103 15.3333 3.9999 14.9022 3.9999 14.3704C3.9999 12.6931 5.35963 11.3333 7.03694 11.3333H7.33323V10.6194C5.51693 10.3596 4.03802 9.05393 3.5261 7.33203C3.17962 7.32774 2.89676 7.31044 2.64305 7.24246C1.72281 6.99588 1.00401 6.27709 0.757433 5.35684C0.666035 5.01574 0.666248 4.62197 0.666535 4.09171C0.666552 4.06159 0.666568 4.03102 0.666568 3.99999V3.66666C0.666568 3.66077 0.666568 3.65489 0.666567 3.64901C0.666553 3.50898 0.66654 3.37256 0.674458 3.25651C0.683117 3.12959 0.703433 2.97911 0.768062 2.82308C0.903387 2.49638 1.16295 2.23681 1.48966 2.10149C1.64569 2.03686 1.79617 2.01654 1.92308 2.00788C2.03914 1.99996 2.17556 1.99998 2.31559 1.99999C2.32146 1.99999 2.32735 1.99999 2.33323 1.99999H3.33581C3.34196 1.84942 3.36038 1.69031 3.41364 1.54397C3.54844 1.17361 3.84019 0.881868 4.21054 0.74707C4.43709 0.664613 4.69421 0.665653 4.90292 0.666496ZM3.33323 3.33333H2.33323C2.1688 3.33333 2.07886 3.33369 2.01385 3.33812C2.01082 3.33833 2.00798 3.33854 2.00532 3.33875C2.00511 3.34141 2.0049 3.34425 2.0047 3.34727C2.00026 3.41229 1.9999 3.50222 1.9999 3.66666V3.99999C1.9999 4.6629 2.00563 4.86357 2.04533 5.01175C2.16862 5.47187 2.52802 5.83127 2.98814 5.95456C3.06734 5.97578 3.16152 5.9873 3.33323 5.99342V3.33333ZM4.66657 2.29629C4.66657 2.15025 4.66685 2.07039 4.67037 2.01249C4.67055 2.00958 4.67072 2.00687 4.6709 2.00433C4.67344 2.00415 4.67616 2.00397 4.67907 2.00379C4.73697 2.00028 4.81683 1.99999 4.96286 1.99999H11.0369C11.183 1.99999 11.2628 2.00028 11.3207 2.00379C11.3236 2.00397 11.3264 2.00415 11.3289 2.00433C11.3291 2.00686 11.3293 2.00959 11.3294 2.01249C11.3329 2.07039 11.3332 2.15025 11.3332 2.29629V5.99999C11.3332 7.84094 9.84085 9.33333 7.9999 9.33333C6.15895 9.33333 4.66657 7.84094 4.66657 5.99999V2.29629ZM12.6666 3.33333V5.99342C12.8383 5.9873 12.9325 5.97578 13.0117 5.95456C13.4718 5.83127 13.8312 5.47187 13.9545 5.01175C13.9942 4.86357 13.9999 4.6629 13.9999 3.99999V3.66666C13.9999 3.50222 13.9995 3.41229 13.9951 3.34727C13.9949 3.34425 13.9947 3.34141 13.9945 3.33875C13.9918 3.33854 13.989 3.33833 13.986 3.33812C13.9209 3.33369 13.831 3.33333 13.6666 3.33333H12.6666ZM7.03694 12.6667C6.2232 12.6667 5.54271 13.2372 5.37361 14H10.6262C10.4571 13.2372 9.7766 12.6667 8.96286 12.6667H7.03694Z" fill="#8F8B9C"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_2115_306">
7
+ <rect width="16" height="16" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ <script xmlns=""/>
11
+ </svg>
@@ -1,10 +1,41 @@
1
1
  .Leaderboards {
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
+ transition: 0.5s ease;
5
+ transition-property: all, transform;
6
+ }
7
+ .Leaderboards.list, .Leaderboards.item {
8
+ opacity: 0;
9
+ }
10
+ .Leaderboards.list.Active, .Leaderboards.item.Active {
11
+ opacity: 1;
12
+ }
13
+ .Leaderboards.list.Hidden, .Leaderboards.item.Hidden {
14
+ display: none;
15
+ }
16
+ .Leaderboards .question__tooltip {
17
+ position: absolute;
18
+ top: 0;
19
+ left: 20px;
20
+ width: 320px;
21
+ text-align: left;
22
+ background-color: var(--emw--color-typography, rgba(255, 255, 255, 0.6));
23
+ border: 1px solid var(--emw--color-typography, rgba(255, 255, 255, 0.8));
24
+ color: var(var(--emw--color-primary, rgb(255, 214, 47)), rgb(255, 214, 47));
25
+ padding: 10px;
26
+ border-radius: 5px;
27
+ opacity: 0;
28
+ fill-opacity: 0.5;
29
+ transition: opacity 0.3s ease-in-out;
30
+ z-index: 10;
31
+ }
32
+ .Leaderboards .question__tooltip.visible {
33
+ opacity: 0.8;
4
34
  }
5
35
 
6
36
  .Wrapper {
7
37
  position: relative;
38
+ min-height: 100%;
8
39
  color: var(--emw--color-typography, #FFFFFF);
9
40
  display: flex;
10
41
  background-color: var(--emw--color-background, hsl(254, 44%, 15%));
@@ -14,6 +45,10 @@
14
45
  .Wrapper.Mobile {
15
46
  border-radius: 16px;
16
47
  }
48
+ .Wrapper.Mobile .WrapperContent .TableContentWrapper {
49
+ height: calc(100vh - 278px);
50
+ overflow-y: auto;
51
+ }
17
52
 
18
53
  .WrapperContent {
19
54
  padding-bottom: 20px;
@@ -22,6 +57,13 @@
22
57
  .WrapperContent.faded {
23
58
  filter: brightness(53.3333333333%);
24
59
  }
60
+ .WrapperContent .NoLeaderboards h3.Title {
61
+ text-align: center;
62
+ }
63
+ .WrapperContent .NoLeaderboards div.message {
64
+ color: var(--emw--color-secondary, rgb(187, 185, 195));
65
+ text-align: left;
66
+ }
25
67
 
26
68
  .Wrapper.Mobile .WrapperBar {
27
69
  padding: 20px 8px 8px;
@@ -34,6 +76,9 @@
34
76
  padding: 32px 20px 20px;
35
77
  margin-bottom: 20px;
36
78
  }
79
+ .WrapperBar .WrapperBarLeft span {
80
+ position: relative;
81
+ }
37
82
 
38
83
  .WrapperBarLeft,
39
84
  .WrapperBarRight {
@@ -57,7 +102,7 @@
57
102
  }
58
103
 
59
104
  .Row {
60
- margin: 24px 0;
105
+ margin: 10px 0;
61
106
  padding: 0 20px;
62
107
  }
63
108
  .Row:first-child {
@@ -89,14 +134,16 @@
89
134
  padding-top: 16px;
90
135
  }
91
136
 
92
- .Info {
93
- margin: 24px 0;
137
+ .ShowInfo {
138
+ margin: 10px 0;
94
139
  padding: 0 20px;
140
+ transition: 0.5s all ease;
95
141
  }
96
142
 
97
143
  .TimeContainer {
98
- margin: 24px 0;
144
+ margin: 10px 0;
99
145
  padding: 0 20px;
146
+ transition: 0.5s all ease;
100
147
  }
101
148
  .TimeContainer .Time {
102
149
  display: flex;
@@ -115,21 +162,10 @@
115
162
  border: 0;
116
163
  }
117
164
 
118
- .ShowInfo {
119
- margin: 24px 0;
120
- padding: 0 20px;
121
- cursor: pointer;
122
- color: rgb(102, 97, 120);
123
- }
124
- .ShowInfo p {
125
- display: flex;
126
- gap: 4px;
127
- }
128
-
129
165
  .TitleContainer {
130
166
  display: flex;
131
167
  justify-content: space-between;
132
- margin: 24px 0;
168
+ margin: 10px 0;
133
169
  padding: 0 20px;
134
170
  margin-top: 0;
135
171
  gap: 10px;
@@ -140,7 +176,7 @@
140
176
  }
141
177
 
142
178
  .TabsContainer {
143
- margin: 24px 0;
179
+ margin: 10px 0;
144
180
  padding: 0 20px;
145
181
  margin: 0 20px;
146
182
  padding: 0;
@@ -154,6 +190,9 @@
154
190
  font-size: var(--emw--font-size-x-small, 12px);
155
191
  margin-bottom: -1px;
156
192
  }
193
+ .Tabs .Tab {
194
+ text-transform: capitalize;
195
+ }
157
196
  .Tabs > div {
158
197
  padding: 10px;
159
198
  color: rgb(102, 97, 120);
@@ -188,8 +227,10 @@
188
227
  }
189
228
 
190
229
  .ResultPrize {
191
- margin: 24px 0;
230
+ margin: 10px 0;
192
231
  padding: 0 20px;
232
+ padding-left: 30px;
233
+ text-align: left;
193
234
  }
194
235
  .ResultPrize span {
195
236
  color: var(--emw--color-primary, rgb(255, 214, 47));
@@ -225,7 +266,7 @@
225
266
  max-height: calc(100% - 20px);
226
267
  }
227
268
 
228
- .PrizesHeader {
269
+ .PrizesHeader, .DetailHeader {
229
270
  align-items: center;
230
271
  display: flex;
231
272
  background-color: var(--emw--color-background, hsl(254, 44%, 15%));
@@ -233,17 +274,23 @@
233
274
  z-index: 1;
234
275
  margin: 0 20px;
235
276
  }
236
- .PrizesHeader img {
277
+ .PrizesHeader img, .DetailHeader img {
237
278
  width: 12px;
238
279
  }
239
- .PrizesHeader .PrizesText {
280
+ .PrizesHeader .PrizesText, .DetailHeader .PrizesText {
240
281
  margin-left: 3px;
241
282
  font-weight: 600;
242
283
  }
243
284
 
285
+ .DetailHeader {
286
+ margin: 0;
287
+ }
288
+
244
289
  .Prizes {
245
- margin: 24px 0;
290
+ margin: 10px 0;
246
291
  padding: 0 20px;
292
+ padding-left: 30px;
293
+ text-align: left;
247
294
  flex: 1;
248
295
  overflow-y: auto;
249
296
  margin-bottom: 0;
@@ -272,6 +319,12 @@
272
319
 
273
320
  .InfoContainer section.Info {
274
321
  margin-bottom: 12px;
322
+ text-align: left;
323
+ padding-left: 15px;
324
+ }
325
+ .InfoContainer section.Info .Criterias, .InfoContainer section.Info .Description {
326
+ padding-left: 15px;
327
+ margin-top: 10px;
275
328
  }
276
329
 
277
330
  * {
@@ -285,7 +338,7 @@
285
338
  }
286
339
  .Leaderboards td {
287
340
  opacity: 0.6;
288
- padding: 20px 5px;
341
+ padding: 12px 5px;
289
342
  }
290
343
  .Leaderboards td:first-child {
291
344
  padding-left: 20px;
@@ -299,6 +352,7 @@
299
352
  }
300
353
  .Leaderboards tr.isMe {
301
354
  background: rgba(0, 0, 0, 0.2);
355
+ border: 1px solid var(--emw--color-primary, rgb(255, 214, 47));
302
356
  }
303
357
  .Leaderboards tr.isMe .LeaderboardRank span {
304
358
  padding: 0px 3px;
@@ -307,7 +361,7 @@
307
361
  border-radius: 11px;
308
362
  }
309
363
  .Leaderboards tr.isMe td {
310
- color: #FFD029;
364
+ color: var(--emw--color-primary, rgb(255, 214, 47));
311
365
  font-weight: var(--emw--font-weight-semibold, 500);
312
366
  }
313
367
 
@@ -340,14 +394,14 @@
340
394
  }
341
395
 
342
396
  .LeaderboardUnstarted {
343
- margin: 24px 0;
397
+ margin: 10px 0;
344
398
  padding: 0 20px;
345
399
  color: var(--emw--color-secondary, rgb(187, 185, 195));
346
400
  font-size: var(--emw--font-size-medium, 16px);
347
401
  }
348
402
 
349
403
  .Games {
350
- margin: 24px 0;
404
+ margin: 10px 0;
351
405
  padding: 0 20px;
352
406
  padding: 0 20px;
353
407
  display: flex;
@@ -1,8 +1,8 @@
1
1
  import { __rest } from "tslib";
2
2
  import { h, Host } from "@stencil/core";
3
- import { TRANSLATIONS, Tab } from "../../utils/translations";
4
- import { getNewItems } from "../../utils/utils";
5
- import { LeaderboardPage, DialogType } from "../../utils/types";
3
+ import { Tab, TRANSLATIONS } from "../../utils/translations";
4
+ import { getDevicePlatform, getNewItems } from "../../utils/utils";
5
+ import { DialogType, LeaderboardPage } from "../../utils/types";
6
6
  import { isTournamentClosed } from "../../utils/bussiness";
7
7
  import { renders } from "../../shared/renders";
8
8
  import { messageReceiver, messageSender } from "../../utils/message";
@@ -74,15 +74,47 @@ export class CasinoEngagementSuiteTournament {
74
74
  this.removeLabel('win');
75
75
  }
76
76
  }
77
+ getContainerScrollTop() {
78
+ return this.page === LeaderboardPage.list ? this.containerScrollTop : this.detailElement.clientHeight / 2 - 250;
79
+ }
80
+ handleClickOutside(event) {
81
+ if (event.composedPath()[0] === this.tooltipIconReference)
82
+ return;
83
+ if (event.composedPath()[0] !== this.tooltipReference)
84
+ this.showTooltip = false;
85
+ }
77
86
  componentDidLoad() {
78
87
  this.pageElement.addEventListener('scroll', (event) => {
79
- this.containerScrollTop = event.target.scrollTop + window.innerHeight / 2 - 400;
88
+ this.containerScrollTop = event.target.scrollTop + event.target.clientHeight / 2 - 250;
80
89
  });
81
90
  }
91
+ renderTooltip() {
92
+ if (this.showTooltip) {
93
+ return (h("div", { class: `question__tooltip ${this.showTooltip ? 'visible' : ''}`, ref: (el) => this.tooltipReference = el, innerHTML: this.locale.Tip }));
94
+ }
95
+ return null;
96
+ }
82
97
  connectedCallback() {
83
98
  this.setTimeInterval();
84
99
  messageSender.UpdateLeaderboardsPlayerReq();
85
100
  }
101
+ scrollToMyRankLine() {
102
+ if (!this.detailElement.querySelectorAll('.isMe').length) {
103
+ return;
104
+ }
105
+ (this.detailElement.querySelectorAll('.TableContentWrapper.leaderboard')[0]).scrollTo({ top: this.detailElement.querySelectorAll('.isMe')[0].offsetTop, behavior: 'smooth' });
106
+ this.scrolledToMyLine = true;
107
+ }
108
+ componentDidRender() {
109
+ if (this.page === LeaderboardPage.item && this.tab === Tab.leaderboard && !this.scrolledToMyLine) {
110
+ if (this.currentPlyerRank > this.maxPlyerRank) {
111
+ this.scrollToMyRankLine();
112
+ }
113
+ }
114
+ else {
115
+ this.scrolledToMyLine = false;
116
+ }
117
+ }
86
118
  disconnectedCallback() {
87
119
  clearInterval(this.timeHolder);
88
120
  }
@@ -110,6 +142,17 @@ export class CasinoEngagementSuiteTournament {
110
142
  if (page == LeaderboardPage.item) {
111
143
  this.tournamentItem = metaData.tournament;
112
144
  if (!this.tournamentItem) {
145
+ messageSender.post({
146
+ type: 'GetTournamentGamesById',
147
+ pathParams: { id: metaData.tournament.id },
148
+ payload: {
149
+ expand: 'games',
150
+ pagination: 'games(limit=50,offset=0)',
151
+ fields: 'games(id,name,thumbnail,launchUrl)',
152
+ platform: getDevicePlatform(),
153
+ language: this.language
154
+ }
155
+ });
113
156
  messageSender.UpdateTournamentsItemReq(metaData.tournament);
114
157
  }
115
158
  if (isTournamentClosed(this.tournamentItem)) {
@@ -120,9 +163,9 @@ export class CasinoEngagementSuiteTournament {
120
163
  this.page = page;
121
164
  }
122
165
  render() {
123
- return (h(Host, { key: '6ccc0ea805f77b2753cbb06f27953f8d6ae250e1' }, h("general-styling-wrapper", { key: '29be4b2eb25061f496844922c2d250d2d9967297', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
166
+ return (h(Host, { key: '5a65900ecb503dd01f8f39774b92a6e95048dbf3' }, h("general-styling-wrapper", { key: '58cee35cf4142512e9b49566787b48cbc2761a4a', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
124
167
  // @ts-ignore
125
- targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { key: '2e7ab6c379e74abcc01635051a2621944733cb1c', class: 'Leaderboards', ref: el => this.pageElement = el }, this.renders.page[this.page]())));
168
+ targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { key: '1848e193e8c61fe6bc9d3e123b7651cb1b97981b', class: `Leaderboards ${this.page} ${this.page === 'list' ? 'Active' : 'Hidden'}`, ref: el => this.pageElement = el }, this.renders.page.list()), h("div", { key: 'f865edc80013565981b76df146e99ebf1d5d4721', class: `Leaderboards ${this.page} ${this.page === 'item' ? 'Active' : 'Hidden'} `, ref: el => this.detailElement = el }, this.renders.page.item())));
126
169
  }
127
170
  openDialog(type, data = undefined, onClose = undefined) {
128
171
  this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, onClose,
@@ -137,6 +180,9 @@ export class CasinoEngagementSuiteTournament {
137
180
  constructor() {
138
181
  this.gifts = [];
139
182
  this.labels = [];
183
+ this.showTooltip = false;
184
+ this.maxPlyerRank = 30;
185
+ this.scrolledToMyLine = false;
140
186
  this.language = 'en';
141
187
  this.show = false;
142
188
  this.clientStyling = '';
@@ -368,6 +414,12 @@ export class CasinoEngagementSuiteTournament {
368
414
  "target": "window",
369
415
  "capture": false,
370
416
  "passive": false
417
+ }, {
418
+ "name": "click",
419
+ "method": "handleClickOutside",
420
+ "target": "document",
421
+ "capture": false,
422
+ "passive": false
371
423
  }];
372
424
  }
373
425
  }
@@ -1,8 +1,9 @@
1
1
  import { h } from "@stencil/core";
2
+ import reward from "../assets/reward.svg";
2
3
  export const iconClose = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg" });
3
4
  export const iconQuestion = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/help.svg" });
4
5
  export const iconEyeOpen = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg" });
5
6
  export const iconEyeClose = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg" });
6
7
  export const iconBack = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg" });
7
- export const iconReward = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/reward.svg" });
8
+ export const iconReward = h("img", { src: reward, alt: "reward", class: "Reward" });
8
9
  export const iconTrophy = h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg" });
@@ -21,10 +21,10 @@ export const page = {
21
21
  instance.setPage(LeaderboardPage.item, { tournament });
22
22
  instance.newIdList = instance.newIdList.filter((id) => id !== tournament.id);
23
23
  };
24
- return renderLeaderboardContainer(instance, h("div", { class: "Leaderboards Row" }, instance.tournamentList.map((_tournament) => (h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : '', _tournament.isUnjoined ? 'Unjoined' : ''), onClick: () => onClickListItemChangePage(_tournament) }, h("div", { class: "LeaderboardsItemContainer" }, renderTitleContainer(instance, _tournament), renderTimeBar(_tournament)), h("div", { class: "LeaderboardLabels" }, instance.newIdList.includes(_tournament.id) && (h("div", { class: "LeaderboardLabel" }, h("span", null, "new")))))))));
24
+ return renderLeaderboardContainer(instance, h("div", { class: 'Leaderboards Row' }, instance.tournamentList.map((_tournament) => (h("div", { class: classnames('LeaderboardsItem', _tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : '', _tournament.isUnjoined ? 'Unjoined' : ''), onClick: () => onClickListItemChangePage(_tournament) }, h("div", { class: "LeaderboardsItemContainer" }, renderTitleContainer(instance, _tournament), renderTimeBar(_tournament)), h("div", { class: "LeaderboardLabels" }, instance.newIdList.includes(_tournament.id) && (h("div", { class: "LeaderboardLabel" }, h("span", null, "new")))))))));
25
25
  }
26
26
  else {
27
- return renderLeaderboardContainer(instance, h("div", { class: "NoLeaderboards Row" }, h("div", null, locale.NoLeaderboards), h("div", null, locale.NoLeaderboardsTip)));
27
+ return renderLeaderboardContainer(instance, h("div", { class: "NoLeaderboards Row" }, h("h3", { class: 'Title' }, locale.NoLeaderboards), h("div", { class: 'message' }, locale.NoLeaderboardsTip)));
28
28
  }
29
29
  },
30
30
  item(instance) {
@@ -50,7 +50,7 @@ export const page = {
50
50
  return renderLeaderboardContainer(instance, [
51
51
  renderTitleContainer(instance, instance.tournamentItem),
52
52
  renderTabs(),
53
- instance.renders.tab[instance.tab]()
53
+ h("div", { class: `TableContentWrapper ${instance.tab}` }, instance.renders.tab[instance.tab]())
54
54
  ]);
55
55
  }
56
56
  };
@@ -101,7 +101,7 @@ const renderLeaderboardContainer = (instance, render) => {
101
101
  switch (page) {
102
102
  case LeaderboardPage.list:
103
103
  return {
104
- left: h("span", { onClick: () => instance.openDialog(DialogType.tip) }, iconQuestion),
104
+ left: h("span", { onClick: () => instance.openDialog(DialogType.tip), onMouseEnter: () => { instance.showTooltip = true; }, onMouseLeave: () => { instance.showTooltip = false; }, ref: (el) => instance.tooltipIconReference = el }, iconQuestion, instance.renderTooltip()),
105
105
  middle: locale.Leaderboards
106
106
  };
107
107
  case LeaderboardPage.item:
@@ -119,5 +119,5 @@ const renderLeaderboardContainer = (instance, render) => {
119
119
  right: h("span", { onClick: () => instance.close.emit() }, iconClose)
120
120
  });
121
121
  };
122
- return (h("div", { class: `Wrapper ${instance.device}` }, h("div", { class: classnames('WrapperContent', { faded: isOpen }) }, renderCloseBarInLayout(), h("div", { class: "Root" }, h("div", { class: "Main" }, render))), h("div", { class: "WrapperUtil" }, h("dialog", { open: isOpen, style: { 'top': instance.containerScrollTop + 'px' } }, h("div", { class: "GradientRounded Hollow" }, renderBar, isOpen && renderDialogContent())))));
122
+ return (h("div", { class: `Wrapper ${instance.device}` }, h("div", { class: classnames('WrapperContent', { faded: isOpen }) }, renderCloseBarInLayout(), h("div", { class: "Root" }, h("div", { class: "Main" }, render))), h("div", { class: "WrapperUtil" }, h("dialog", { open: isOpen, style: { 'top': instance.getContainerScrollTop() + 'px' } }, h("div", { class: "GradientRounded Hollow" }, renderBar, isOpen && renderDialogContent())))));
123
123
  };
@@ -9,7 +9,7 @@ export const tab = {
9
9
  info(instance) {
10
10
  var _a, _b;
11
11
  const { locale, tournamentItem: tournament, isShowInfo } = instance;
12
- return (h("div", { class: "InfoContainer" }, renderTimeBar(tournament), h("section", { class: "ShowInfo", onClick: () => (instance.isShowInfo = !instance.isShowInfo) }, h("p", null, h("span", null, isShowInfo ? iconEyeClose : iconEyeOpen), h("span", null, locale.LeaderboardDetails))), h("div", { class: `ContentScrollContainer ${isShowInfo ? 'expanded' : ''}` }, isShowInfo && (h("section", { class: "Info" }, h("div", null, tournament.description), h("div", { class: "Criterias" }, h("div", null, locale.ScoreCriteria, ": ", h("span", null, tournament.scoreCriteria)), h("div", null, locale.MinimumBetCriteria, ": ", h("span", null, tournament.minBetCount))), !!tournament.termsUrl && (h("div", { class: "TC" }, h("a", { href: tournament.termsUrl, target: "_blank" }, locale.TC))))), isTournamentClosed(instance.tournamentItem) && ((_a = instance.leaderboards) === null || _a === void 0 ? void 0 : _a.find((l) => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, getResultPrize((_b = instance.leaderboards) === null || _b === void 0 ? void 0 : _b.find((l) => l.isMe))) })), h("section", { class: "PrizesContainer" }, h("div", { class: "PrizesHeader" }, iconReward, h("span", { class: "PrizesText" }, locale.Prizes)), h("div", { class: "Prizes" }, tournament.prizes.map((prize, index) => (h("div", { class: "Prize" }, index + 1, " ", locale.Place, ": ", h("span", { class: "PrizeText" }, prize.name)))))))));
12
+ return (h("div", { class: "InfoContainer" }, renderTimeBar(tournament), h("section", { class: "ShowInfo", onClick: () => (instance.isShowInfo = !instance.isShowInfo) }, h("div", { class: 'DetailHeader' }, h("span", null, isShowInfo ? iconEyeOpen : iconEyeClose), h("span", null, locale.LeaderboardDetails))), h("div", { class: `ContentScrollContainer ${isShowInfo ? 'expanded' : ''}` }, isShowInfo && (h("section", { class: "Info" }, h("div", { class: 'Description' }, tournament.description), h("div", { class: "Criterias" }, h("div", null, locale.ScoreCriteria, ": ", h("span", null, tournament.scoreCriteria)), h("div", null, locale.MinimumBetCriteria, ": ", h("span", null, tournament.minBetCount))), !!tournament.termsUrl && (h("div", { class: "TC" }, h("a", { href: tournament.termsUrl, target: "_blank" }, locale.TC))))), isTournamentClosed(instance.tournamentItem) && ((_a = instance.leaderboards) === null || _a === void 0 ? void 0 : _a.find((l) => l.isMe)) && (h("section", { class: "ResultPrize", innerHTML: localePostprocess(locale.TipPrize, getResultPrize((_b = instance.leaderboards) === null || _b === void 0 ? void 0 : _b.find((l) => l.isMe))) })), h("section", { class: "PrizesContainer" }, h("div", { class: "PrizesHeader" }, iconReward, h("span", { class: "PrizesText" }, locale.Prizes)), h("div", { class: "Prizes" }, tournament.prizes.map((prize, index) => (h("div", { class: "Prize" }, index + 1, " ", locale.Place, ": ", h("span", { class: "PrizeText" }, prize.name)))))))));
13
13
  },
14
14
  leaderboard(instance) {
15
15
  const { locale, tournamentItem } = instance;
@@ -26,7 +26,9 @@ export const tab = {
26
26
  },
27
27
  games(instance) {
28
28
  var _a;
29
- return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div", { class: 'Game', onClick: () => { instance.onGameClick(game); } }, h("img", { src: game.defaultThumbnail, alt: "" }))))));
29
+ return (h("div", { class: "Games" }, (_a = instance.tournamentItem.games) === null || _a === void 0 ? void 0 : _a.map((game) => (h("div", { class: 'Game', onClick: () => {
30
+ instance.onGameClick(game);
31
+ } }, h("img", { src: game.defaultThumbnail, alt: "" }))))));
30
32
  }
31
33
  };
32
34
  const getResultPrize = (leaderboard) => {
@@ -4,14 +4,13 @@ import { renderGradientRoundedButton } from "./GradientRoundedButton";
4
4
  export const renderTimeBar = (tournament) => {
5
5
  return (h("section", { class: "TimeContainer" }, h("div", { class: "Time" }, tournament.state === 'Running'
6
6
  ? [
7
- h("div", null, getTimeDifference(new Date(), tournament.endTime)),
8
- h("div", null, renderGradientRoundedButton({
7
+ h("div", { class: 'Running' }, h("div", null, getTimeDifference(new Date(), tournament.endTime)), ",", h("div", null, renderGradientRoundedButton({
9
8
  statedClasses: {
10
9
  isHollow: true,
11
10
  isPendding: false
12
11
  },
13
12
  innerHTML: `${getProgress(tournament.startTime, tournament.endTime)}%`
14
- }))
13
+ })))
15
14
  ]
16
- : [h("div", null, formatDate(tournament.startTime)), h("div", null, formatDate(tournament.endTime))]), h("casino-engagement-suite-progress-bar", { value: Number(getProgress(tournament.startTime, tournament.endTime)), "hide-percent": true })));
15
+ : [h("div", { class: 'NotRunning' }, formatDate(tournament.startTime)), h("div", null, formatDate(tournament.endTime))]), h("casino-engagement-suite-progress-bar", { value: Number(getProgress(tournament.startTime, tournament.endTime)), "hide-percent": true })));
17
16
  };
@@ -25,7 +25,7 @@ export const leaderboardsAdapter = (leaderboardRes) => {
25
25
  return leaderboards;
26
26
  }
27
27
  return leaderboards.map((leaderboard) => {
28
- if (item && item.userID === leaderboard.userID) {
28
+ if ((item === null || item === void 0 ? void 0 : item.userId) && item.userId === leaderboard.userId) {
29
29
  return Object.assign(Object.assign({}, leaderboard), { isMe: true });
30
30
  }
31
31
  else {
@@ -1,4 +1,5 @@
1
1
  import { TournamentState } from "./types";
2
+ import dateFnsFormat from "date-fns/format";
2
3
  export const getMaxRankStr = (list) => {
3
4
  let itemHaveMaxRank;
4
5
  list.map((item) => {
@@ -36,3 +37,17 @@ export const getTournamentListByItem = (tournamentList, tournament) => {
36
37
  }
37
38
  });
38
39
  };
40
+ export const getTournamentListParams = (language) => {
41
+ return {
42
+ 'type': 'InitTournamentList',
43
+ 'messageType': 'apiCall',
44
+ 'method': 'GET',
45
+ 'queryParams': {
46
+ 'filter': `PlayerEnrolled=true,ExhibitionEndTime=${dateFnsFormat(new Date(), 'yyyy-MM-ddThh:mm:ssZ')},TicketStatus=active|closed|completed|released`,
47
+ 'sortField': 'StartTime',
48
+ 'sortOrder': 'asc',
49
+ 'pagination': 'limit=50,offset=0',
50
+ language
51
+ }
52
+ };
53
+ };
@@ -2,6 +2,12 @@ import { leaderboardsAdapter, tournamentAdapter } from "./api.apdater";
2
2
  import { getMaxRankStr } from "./bussiness";
3
3
  import { DialogType } from "./types";
4
4
  export const messageSender = {
5
+ InitTournamentList: (queryParams) => {
6
+ window.postMessage(Object.assign({ type: 'InitTournamentList' }, queryParams));
7
+ },
8
+ post: (options) => {
9
+ window.postMessage(Object.assign({}, options));
10
+ },
5
11
  UpdateSuiteBarState: (labels) => window.postMessage({ type: 'UpdateLeaderboardState', labels }),
6
12
  JoinTournamentReq: (tournament) => {
7
13
  var _a, _b;
@@ -15,7 +21,7 @@ export const messageSender = {
15
21
  UpdateTournamentsItemReq: (tournament) => window.postMessage({ type: 'UpdateTournamentsItemReq', id: tournament.id }),
16
22
  UpdateLeaderboardsReq: (tournament, query) => window.postMessage({ type: 'UpdateLeaderboardsReq', id: tournament.id, query }),
17
23
  UpdateLeaderboardsPlayerReq: () => window.postMessage({ type: 'UpdateLeaderboardsPlayerReq' }),
18
- GameClickReq: (game) => window.postMessage({ type: 'GameClickedReq', game }),
24
+ GameClickReq: (game) => window.postMessage({ type: 'EngagementSuiteGameRedirect', data: { Slug: game.slug } }),
19
25
  };
20
26
  export const messageReceiver = (instance) => {
21
27
  const receiver = {
@@ -31,17 +37,13 @@ export const messageReceiver = (instance) => {
31
37
  instance.tournamentItem = tournamentNew;
32
38
  updateTournamentListByItem(instance, tournamentNew);
33
39
  },
34
- UpdateLeaderboardsRes: (rest) => {
35
- instance.leaderboards = leaderboardsAdapter(rest.data);
36
- },
40
+ UpdateLeaderboardsRes: (rest) => processLeaderboardTableData(instance, rest),
37
41
  JoinTournamentRes: (rest) => commonJoinRes(instance, rest),
38
- UnjoinTournamentRes: (rest) => {
39
- commonJoinRes(instance, rest);
40
- },
42
+ UnjoinTournamentRes: (rest) => commonJoinRes(instance, rest),
41
43
  // listen to LeaderboardLiveEvent event, handle update
42
44
  LeaderboardLiveEvent: (rest) => {
43
45
  handleLeaderboardLiveEvent(instance, rest);
44
- }
46
+ },
45
47
  };
46
48
  return receiver;
47
49
  };
@@ -124,7 +126,7 @@ const showErrorMessage = (instance, type) => {
124
126
  };
125
127
  const commonJoinRes = (instance, rest) => {
126
128
  const { success, data } = rest;
127
- let tournamentIdx = instance.tournamentList.findIndex((tournament) => tournament.id === (data.id || data.bonusCode)), current = instance.tournamentList[tournamentIdx];
129
+ let tournamentIdx = instance.tournamentList.findIndex((tournament) => tournament.id === (data.tournamentId || data.id || data.bonusCode)), current = instance.tournamentList[tournamentIdx];
128
130
  current.isActionJoinPending = false;
129
131
  if (!success) {
130
132
  instance.tournamentList[tournamentIdx] = current;
@@ -140,6 +142,10 @@ const commonJoinRes = (instance, rest) => {
140
142
  instance.nextPage = undefined;
141
143
  }
142
144
  };
145
+ const processLeaderboardTableData = (instance, rest) => {
146
+ instance.leaderboards = leaderboardsAdapter(rest.data);
147
+ instance.currentPlyerRank = rest.data.item ? rest.data.item.rank : -1;
148
+ };
143
149
  const updateTournamentListByItem = (instance, tournament) => {
144
150
  instance.tournamentList = instance.tournamentList.map((_tournament) => {
145
151
  if (_tournament.id === tournament.id) {