@everymatrix/casino-engagement-suite-tournament 1.62.2 → 1.62.4

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 (43) 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-14ab3c1a.entry.js +1 -0
  4. package/dist/casino-engagement-suite-tournament/p-5f051654.js +15 -0
  5. package/dist/casino-engagement-suite-tournament/{p-bfca9e2a.js → p-c6fe0205.js} +1 -1
  6. package/dist/cjs/{casino-engagement-suite-progress-bar_3.cjs.entry.js → casino-engagement-suite-progress-bar_6.cjs.entry.js} +124 -2
  7. package/dist/cjs/{casino-engagement-suite-tournament-bc4edfdf.js → casino-engagement-suite-tournament-1f1275c4.js} +179 -242
  8. package/dist/cjs/casino-engagement-suite-tournament.cjs.js +2 -2
  9. package/dist/cjs/{index-982cd594.js → index-5e98dd13.js} +4 -3
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/assets/help.svg +10 -0
  13. package/dist/collection/collection-manifest.json +4 -1
  14. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.css +30 -3
  15. package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +89 -34
  16. package/dist/collection/shared/TournamentDurationTimer.js +92 -0
  17. package/dist/collection/shared/TournamentItem.js +114 -0
  18. package/dist/collection/shared/TournamentItemTitle.js +124 -0
  19. package/dist/collection/shared/icons.js +2 -1
  20. package/dist/collection/shared/renderBar.js +2 -2
  21. package/dist/collection/shared/renders.page.js +6 -79
  22. package/dist/collection/shared/renders.tab.js +2 -2
  23. package/dist/collection/utils/api.apdater.js +8 -0
  24. package/dist/collection/utils/bussiness.js +0 -25
  25. package/dist/collection/utils/message.js +27 -19
  26. package/dist/collection/utils/util.date.js +3 -0
  27. package/dist/esm/{casino-engagement-suite-progress-bar_3.entry.js → casino-engagement-suite-progress-bar_6.entry.js} +123 -3
  28. package/dist/esm/{casino-engagement-suite-tournament-bc5e0906.js → casino-engagement-suite-tournament-54c513f1.js} +162 -231
  29. package/dist/esm/casino-engagement-suite-tournament.js +3 -3
  30. package/dist/esm/{index-ac437a77.js → index-8b5c4b95.js} +4 -3
  31. package/dist/esm/index.js +2 -2
  32. package/dist/esm/loader.js +3 -3
  33. package/dist/types/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.d.ts +8 -10
  34. package/dist/types/components.d.ts +85 -2
  35. package/dist/types/shared/TournamentDurationTimer.d.ts +15 -0
  36. package/dist/types/shared/TournamentItem.d.ts +46 -0
  37. package/dist/types/shared/TournamentItemTitle.d.ts +47 -0
  38. package/dist/types/utils/bussiness.d.ts +1 -45
  39. package/dist/types/utils/message.d.ts +2 -2
  40. package/dist/types/utils/util.date.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/dist/casino-engagement-suite-tournament/p-67373ab1.entry.js +0 -1
  43. package/dist/casino-engagement-suite-tournament/p-b217e7cc.js +0 -15
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-982cd594.js');
5
+ const index = require('./index-5e98dd13.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- 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);
22
+ return index.bootstrapLazy([["casino-engagement-suite-progress-bar_6.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],"newIdList":[32]},[[8,"message","handleEvent"],[16,"clickToTournamentDetail","handleClickToTournamentDetail"],[16,"joinTournamentEvent","handleJoinTournamentEvent"],[16,"unjoinTournamentEvent","handleUnjoinTournamentEvent"],[4,"click","handleClickOutside"]],{"newIdList":["checkNewIdList"],"tournamentList":["syncBarState"],"show":["showPropWatcher"]}],[0,"casino-engagement-suite-tournament-item",{"tournament":[16],"isNew":[4,"is-new"],"locale":[32]},[[16,"joinTournamentEvent","handleJoinTournamentEvent"],[16,"unjoinTournamentEvent","handleUnjoinTournamentEvent"]]],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}],[0,"casino-engagement-suite-tournament-timer",{"tournament":[16],"time":[32],"timeHolder":[32],"timeCloak":[32]},[[0,"tournamentTimer","containerPageChangeHandler"]]],[0,"casino-engagement-suite-tournament-item-title",{"tournament":[16],"locale":[32],"isButtonDisabed":[32]},null,{"tournament":["onTournamentChanged"]}],[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]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -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: 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 };
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: true, 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
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
71
71
  }
72
72
  switch(bundleId) {
73
73
 
74
- case 'casino-engagement-suite-progress-bar_3.cjs':
74
+ case 'casino-engagement-suite-progress-bar_6.cjs':
75
75
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
76
76
  /* webpackMode: "lazy" */
77
- './casino-engagement-suite-progress-bar_3.cjs.entry.js')); }).then(processMod, consoleError);
77
+ './casino-engagement-suite-progress-bar_6.cjs.entry.js')); }).then(processMod, consoleError);
78
78
  }
79
79
  }
80
80
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
@@ -1585,6 +1585,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1585
1585
  var getHostListenerTarget = (elm, flags) => {
1586
1586
  if (flags & 4 /* TargetDocument */) return doc;
1587
1587
  if (flags & 8 /* TargetWindow */) return win;
1588
+ if (flags & 16 /* TargetBody */) return doc.body;
1588
1589
  return elm;
1589
1590
  };
1590
1591
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-bc4edfdf.js');
6
- require('./index-982cd594.js');
5
+ const casinoEngagementSuiteTournament = require('./casino-engagement-suite-tournament-1f1275c4.js');
6
+ require('./index-5e98dd13.js');
7
7
 
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-982cd594.js');
5
+ const index = require('./index-5e98dd13.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"],[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);
11
+ return index.bootstrapLazy([["casino-engagement-suite-progress-bar_6.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],"newIdList":[32]},[[8,"message","handleEvent"],[16,"clickToTournamentDetail","handleClickToTournamentDetail"],[16,"joinTournamentEvent","handleJoinTournamentEvent"],[16,"unjoinTournamentEvent","handleUnjoinTournamentEvent"],[4,"click","handleClickOutside"]],{"newIdList":["checkNewIdList"],"tournamentList":["syncBarState"],"show":["showPropWatcher"]}],[0,"casino-engagement-suite-tournament-item",{"tournament":[16],"isNew":[4,"is-new"],"locale":[32]},[[16,"joinTournamentEvent","handleJoinTournamentEvent"],[16,"unjoinTournamentEvent","handleUnjoinTournamentEvent"]]],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}],[0,"casino-engagement-suite-tournament-timer",{"tournament":[16],"time":[32],"timeHolder":[32],"timeCloak":[32]},[[0,"tournamentTimer","containerPageChangeHandler"]]],[0,"casino-engagement-suite-tournament-item-title",{"tournament":[16],"locale":[32],"isButtonDisabed":[32]},null,{"tournament":["onTournamentChanged"]}],[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]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -0,0 +1,10 @@
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_1971_516)">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.00008 2.00001C4.68637 2.00001 2.00008 4.6863 2.00008 8C2.00008 11.3137 4.68637 14 8.00008 14C11.3138 14 14.0001 11.3137 14.0001 8C14.0001 4.6863 11.3138 2.00001 8.00008 2.00001ZM0.666748 8C0.666748 3.94992 3.94999 0.666672 8.00008 0.666672C12.0502 0.666672 15.3334 3.94992 15.3334 8C15.3334 12.0501 12.0502 15.3333 8.00008 15.3333C3.94999 15.3333 0.666748 12.0501 0.666748 8ZM8.17216 5.34955C7.86181 5.29632 7.54264 5.35464 7.27117 5.51418C6.99971 5.67373 6.79346 5.9242 6.68897 6.22123C6.56679 6.56856 6.18618 6.75108 5.83885 6.62889C5.49153 6.50671 5.30901 6.1261 5.43119 5.77878C5.64017 5.1847 6.05266 4.68376 6.5956 4.36467C7.13853 4.04558 7.77688 3.92894 8.39757 4.03541C9.01826 4.14187 9.58125 4.46458 9.98682 4.94636C10.3923 5.42804 10.6143 6.03766 10.6134 6.66728C10.6131 7.68752 9.85671 8.36126 9.31655 8.72137C9.02613 8.91499 8.74045 9.05735 8.53001 9.15088C8.42384 9.19806 8.33444 9.23387 8.27002 9.25841C8.23775 9.27071 8.21159 9.28023 8.19255 9.287L8.16939 9.29511L8.16202 9.29763L8.15942 9.2985L8.1584 9.29885C8.1582 9.29891 8.15757 9.29913 7.94675 8.66667L8.15757 9.29913C7.80827 9.41556 7.43072 9.22678 7.31429 8.87749C7.1979 8.52831 7.38651 8.1509 7.73558 8.03433L7.74587 8.03072C7.75612 8.02707 7.77293 8.02097 7.79535 8.01243C7.84031 7.9953 7.90716 7.96861 7.98849 7.93246C8.15305 7.85933 8.36737 7.75169 8.57695 7.61197C9.03668 7.30548 9.28008 6.97943 9.28008 6.66667L9.28008 6.66568C9.28055 6.3508 9.16957 6.04591 8.96678 5.80502C8.764 5.56413 8.48251 5.40278 8.17216 5.34955ZM7.33341 11.3333C7.33341 10.9651 7.63189 10.6667 8.00008 10.6667H8.00675C8.37494 10.6667 8.67341 10.9651 8.67341 11.3333C8.67341 11.7015 8.37494 12 8.00675 12H8.00008C7.63189 12 7.33341 11.7015 7.33341 11.3333Z" fill="#666178"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_1971_516">
7
+ <rect width="16" height="16" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ <script xmlns=""/></svg>
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "entries": [
3
- "components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js"
3
+ "components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js",
4
+ "shared/TournamentDurationTimer.js",
5
+ "shared/TournamentItem.js",
6
+ "shared/TournamentItemTitle.js"
4
7
  ],
5
8
  "compiler": {
6
9
  "name": "@stencil/core",
@@ -42,13 +42,20 @@
42
42
  flex-direction: column;
43
43
  border-radius: 24px;
44
44
  }
45
- .Wrapper.Mobile {
46
- border-radius: 16px;
45
+ .Wrapper .TableContentWrapper {
46
+ scrollbar-width: thin;
47
+ scrollbar-color: var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent;
47
48
  }
48
- .Wrapper.Mobile .WrapperContent .TableContentWrapper {
49
+ .Wrapper .WrapperContent .TableContentWrapper {
49
50
  height: calc(100vh - 278px);
50
51
  overflow-y: auto;
51
52
  }
53
+ .Wrapper .WrapperContent .Main {
54
+ height: calc(100vh - 188px);
55
+ }
56
+ .Wrapper.Mobile {
57
+ border-radius: 16px;
58
+ }
52
59
 
53
60
  .WrapperContent {
54
61
  padding-bottom: 20px;
@@ -101,12 +108,18 @@
101
108
  font-family: Inter;
102
109
  }
103
110
 
111
+ .ScrollBar {
112
+ scrollbar-width: thin;
113
+ scrollbar-color: var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent;
114
+ }
115
+
104
116
  .Row {
105
117
  margin: 10px 0;
106
118
  padding: 0 20px;
107
119
  }
108
120
  .Row:first-child {
109
121
  margin: 0;
122
+ padding-top: 5px;
110
123
  }
111
124
 
112
125
  .LeaderboardsItem {
@@ -152,6 +165,12 @@
152
165
  align-items: center;
153
166
  color: var(--emw--color-secondary, rgb(187, 185, 195));
154
167
  }
168
+ .TimeContainer .Time .Running {
169
+ width: 100%;
170
+ display: flex;
171
+ flex-direction: row;
172
+ justify-content: space-between;
173
+ }
155
174
  .TimeContainer .Time button {
156
175
  font-size: var(--emw--font-size-x-small, 12px);
157
176
  height: 20px;
@@ -415,9 +434,17 @@
415
434
  display: flex;
416
435
  padding: 5px;
417
436
  }
437
+ .Games .Game.Current {
438
+ cursor: auto;
439
+ filter: grayscale(10);
440
+ }
418
441
  .Games .Game:hover {
419
442
  filter: brightness(var(--emw--hover-brightness, 1.25));
420
443
  }
444
+ .Games .Game.Current:hover {
445
+ cursor: auto;
446
+ filter: grayscale(10);
447
+ }
421
448
  .Games img {
422
449
  width: 100%;
423
450
  height: fit-content;
@@ -1,7 +1,7 @@
1
1
  import { __rest } from "tslib";
2
2
  import { h, Host } from "@stencil/core";
3
3
  import { Tab, TRANSLATIONS } from "../../utils/translations";
4
- import { getDevicePlatform, getNewItems } from "../../utils/utils";
4
+ import { classnames, getNewItems } from "../../utils/utils";
5
5
  import { DialogType, LeaderboardPage } from "../../utils/types";
6
6
  import { isTournamentClosed } from "../../utils/bussiness";
7
7
  import { renders } from "../../shared/renders";
@@ -9,12 +9,29 @@ import { messageReceiver, messageSender } from "../../utils/message";
9
9
  import "../../../../../../svelte/general-animation-loading/es2015/general-animation-loading";
10
10
  import "../../../../../general-styling-wrapper/dist/types/index";
11
11
  import "../../../../../casino-engagement-suite-progress-bar/dist/types/index";
12
+ import { renderCloseBar } from "../../shared/renderBar";
13
+ import { iconBack, iconClose, iconQuestion } from "../../shared/icons";
12
14
  export class CasinoEngagementSuiteTournament {
13
15
  handleEvent(e) {
14
16
  var _a, _b;
15
17
  const _c = e.data, { type } = _c, rest = __rest(_c, ["type"]);
16
18
  (_b = (_a = messageReceiver(this)) === null || _a === void 0 ? void 0 : _a[type]) === null || _b === void 0 ? void 0 : _b.call(null, rest);
17
19
  }
20
+ handleClickToTournamentDetail(e) {
21
+ const tournament = e.detail;
22
+ this.setPage(LeaderboardPage.item, { tournament });
23
+ this.newIdList = this.newIdList.filter((id) => id !== tournament.id);
24
+ }
25
+ ;
26
+ handleJoinTournamentEvent(e) {
27
+ const tournament = e.detail;
28
+ this.actionJoin(tournament);
29
+ this.tournamentItem = tournament;
30
+ }
31
+ handleUnjoinTournamentEvent(e) {
32
+ const { tournament } = e.detail;
33
+ this.openDialog(DialogType.unjoin, tournament);
34
+ }
18
35
  checkNewIdList() {
19
36
  if (this.newIdList.length > 0) {
20
37
  this.addLabel('new');
@@ -25,7 +42,6 @@ export class CasinoEngagementSuiteTournament {
25
42
  }
26
43
  syncBarState(newTournamentList, oldTournamentList) {
27
44
  if (!oldTournamentList) {
28
- // init
29
45
  this.checkNewIdList();
30
46
  if (this.gifts.length) {
31
47
  this.addLabel('win');
@@ -52,11 +68,6 @@ export class CasinoEngagementSuiteTournament {
52
68
  this.labels = this.labels.filter((label) => label != tag);
53
69
  messageSender.UpdateSuiteBarState(this.labels);
54
70
  }
55
- setTimeInterval() {
56
- this.timeHolder = setInterval(() => {
57
- this.time = this.tournamentList || this.tournamentItem ? this.time + 1 : 0;
58
- }, 1000);
59
- }
60
71
  checkGift() {
61
72
  //check gift
62
73
  if (this.gifts.length) {
@@ -75,7 +86,8 @@ export class CasinoEngagementSuiteTournament {
75
86
  }
76
87
  }
77
88
  getContainerScrollTop() {
78
- return this.page === LeaderboardPage.list ? this.containerScrollTop : this.detailElement.clientHeight / 2 - 250;
89
+ var _a;
90
+ return this.page === LeaderboardPage.list ? this.containerScrollTop : ((_a = this.detailElement) === null || _a === void 0 ? void 0 : _a.clientHeight) / 2 - 250;
79
91
  }
80
92
  handleClickOutside(event) {
81
93
  if (event.composedPath()[0] === this.tooltipIconReference)
@@ -87,6 +99,7 @@ export class CasinoEngagementSuiteTournament {
87
99
  this.pageElement.addEventListener('scroll', (event) => {
88
100
  this.containerScrollTop = event.target.scrollTop + event.target.clientHeight / 2 - 250;
89
101
  });
102
+ messageSender.UpdateTournamentsPageIsReady();
90
103
  }
91
104
  renderTooltip() {
92
105
  if (this.showTooltip) {
@@ -95,7 +108,6 @@ export class CasinoEngagementSuiteTournament {
95
108
  return null;
96
109
  }
97
110
  connectedCallback() {
98
- this.setTimeInterval();
99
111
  messageSender.UpdateLeaderboardsPlayerReq();
100
112
  }
101
113
  scrollToMyRankLine() {
@@ -106,25 +118,24 @@ export class CasinoEngagementSuiteTournament {
106
118
  this.scrolledToMyLine = true;
107
119
  }
108
120
  componentDidRender() {
109
- if (this.page === LeaderboardPage.item && this.tab === Tab.leaderboard && !this.scrolledToMyLine) {
110
- if (this.currentPlyerRank > this.maxPlyerRank) {
121
+ if (this.page === LeaderboardPage.item && this.tab === Tab.leaderboard) {
122
+ if (this.currentPlyerRank > this.maxPlyerRank && !this.scrolledToMyLine) {
111
123
  this.scrollToMyRankLine();
112
124
  }
113
125
  }
114
- else {
126
+ else if (this.page === LeaderboardPage.list) {
115
127
  this.scrolledToMyLine = false;
116
128
  }
117
129
  }
118
- disconnectedCallback() {
119
- clearInterval(this.timeHolder);
120
- }
121
130
  onGameClick(game) {
131
+ if (game.id === this.currentGameId) {
132
+ return;
133
+ }
122
134
  messageSender.GameClickReq(game);
123
135
  }
124
136
  actionJoin(tournament) {
125
137
  if (tournament.isActionJoinPending)
126
138
  return;
127
- tournament.isActionJoinPending = true;
128
139
  try {
129
140
  if (tournament.isPlayerAcknowledged) {
130
141
  messageSender.UnjoinTournamentReq(tournament);
@@ -139,33 +150,46 @@ export class CasinoEngagementSuiteTournament {
139
150
  }
140
151
  }
141
152
  setPage(page, metaData) {
142
- if (page == LeaderboardPage.item) {
153
+ var _a;
154
+ this.page = page;
155
+ if (page === LeaderboardPage.item) {
156
+ this.isShowInfo = false;
143
157
  this.tournamentItem = metaData.tournament;
144
158
  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
- });
156
159
  messageSender.UpdateTournamentsItemReq(metaData.tournament);
157
160
  }
158
161
  if (isTournamentClosed(this.tournamentItem)) {
159
162
  messageSender.UpdateLeaderboardsReq(this.tournamentItem);
160
163
  }
164
+ this.tab = Tab.info;
161
165
  }
162
- this.tab = Tab.info;
163
- this.page = page;
166
+ this.tournamentTimer.emit({ page, tournamentId: (_a = this.tournamentItem) === null || _a === void 0 ? void 0 : _a.id });
164
167
  }
165
168
  render() {
166
- return (h(Host, { key: '5a65900ecb503dd01f8f39774b92a6e95048dbf3' }, h("general-styling-wrapper", { key: '58cee35cf4142512e9b49566787b48cbc2761a4a', clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
169
+ const renderDialogContent = () => {
170
+ switch (this.dialog.type) {
171
+ case DialogType.unjoin:
172
+ return this.renders.dialog.unjoin();
173
+ case DialogType.tip:
174
+ return h("div", { class: "Tip" }, this.locale.Tip);
175
+ case DialogType.error:
176
+ return h("div", { class: "Tip Error" }, this.locale.FailedToJoin);
177
+ case DialogType.gift:
178
+ return this.renders.dialog.gift();
179
+ }
180
+ };
181
+ return (h(Host, null, h("general-styling-wrapper", { clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling,
167
182
  // @ts-ignore
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())));
183
+ targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: `Wrapper ${this.device}` }, h("div", { class: classnames('WrapperContent', { faded: this.dialog.isOpen }) }, renderCloseBar({
184
+ left: this.page === LeaderboardPage.list
185
+ ? h("span", { onClick: this.openDialog.bind(this, DialogType.tip) }, iconQuestion)
186
+ : h("span", { onClick: this.setPage.bind(this, LeaderboardPage.list) }, iconBack),
187
+ middle: this.locale.Leaderboards,
188
+ right: h("span", { onClick: () => this.close.emit() }, iconClose)
189
+ }), h("div", { class: `Leaderboards ${this.page} ${this.page === 'list' ? 'Active' : 'Hidden'}`, ref: el => this.pageElement = el }, this.renders.page.list()), this.page === LeaderboardPage.item &&
190
+ h("div", { class: `Leaderboards ${this.page} ${this.page === 'item' ? 'Active' : 'Hidden'} `, ref: el => this.detailElement = el }, this.renders.page.item())), h("div", { class: "WrapperUtil" }, h("dialog", { open: this.dialog.isOpen, style: { 'top': this.getContainerScrollTop() + 'px' } }, h("div", { class: "GradientRounded Hollow" }, renderCloseBar({
191
+ right: h("span", { onClick: () => this.closeDialog() }, iconClose)
192
+ }), this.dialog.isOpen && renderDialogContent()))))));
169
193
  }
170
194
  openDialog(type, data = undefined, onClose = undefined) {
171
195
  this.dialog = Object.assign(Object.assign({}, this.dialog), { isOpen: true, onClose,
@@ -205,7 +229,6 @@ export class CasinoEngagementSuiteTournament {
205
229
  data: undefined,
206
230
  onClose: undefined
207
231
  };
208
- this.time = 0;
209
232
  this.newIdList = [];
210
233
  // bind all renders
211
234
  this.renders = {};
@@ -373,7 +396,6 @@ export class CasinoEngagementSuiteTournament {
373
396
  "page": {},
374
397
  "tournamentInDialog": {},
375
398
  "dialog": {},
376
- "time": {},
377
399
  "newIdList": {}
378
400
  };
379
401
  }
@@ -393,6 +415,21 @@ export class CasinoEngagementSuiteTournament {
393
415
  "resolved": "void",
394
416
  "references": {}
395
417
  }
418
+ }, {
419
+ "method": "tournamentTimer",
420
+ "name": "tournamentTimer",
421
+ "bubbles": true,
422
+ "cancelable": true,
423
+ "composed": true,
424
+ "docs": {
425
+ "tags": [],
426
+ "text": ""
427
+ },
428
+ "complexType": {
429
+ "original": "any",
430
+ "resolved": "any",
431
+ "references": {}
432
+ }
396
433
  }];
397
434
  }
398
435
  static get watchers() {
@@ -414,6 +451,24 @@ export class CasinoEngagementSuiteTournament {
414
451
  "target": "window",
415
452
  "capture": false,
416
453
  "passive": false
454
+ }, {
455
+ "name": "clickToTournamentDetail",
456
+ "method": "handleClickToTournamentDetail",
457
+ "target": "body",
458
+ "capture": false,
459
+ "passive": false
460
+ }, {
461
+ "name": "joinTournamentEvent",
462
+ "method": "handleJoinTournamentEvent",
463
+ "target": "body",
464
+ "capture": false,
465
+ "passive": false
466
+ }, {
467
+ "name": "unjoinTournamentEvent",
468
+ "method": "handleUnjoinTournamentEvent",
469
+ "target": "body",
470
+ "capture": false,
471
+ "passive": false
417
472
  }, {
418
473
  "name": "click",
419
474
  "method": "handleClickOutside",
@@ -0,0 +1,92 @@
1
+ import { h } from "@stencil/core";
2
+ import { formatDate, getProgress, getTimeDifference } from "../utils/util.date";
3
+ import { renderGradientRoundedButton } from "./GradientRoundedButton";
4
+ import { LeaderboardPage, TournamentState } from "../utils/types";
5
+ export class CasinoEngagementSuiteTournamentTimer {
6
+ constructor() {
7
+ this.tournament = undefined;
8
+ this.time = 0;
9
+ this.timeHolder = undefined;
10
+ this.timeCloak = true;
11
+ }
12
+ containerPageChangeHandler(event) {
13
+ this.timeCloak = event.detail.page === LeaderboardPage.list ||
14
+ event.detail.page === LeaderboardPage.item && this.tournament.id === event.detail.tournamentId;
15
+ }
16
+ setTimeInterval() {
17
+ this.timeHolder = setInterval(() => {
18
+ var _a;
19
+ const timeDifference = getTimeDifference(new Date(), this.tournament.endTime);
20
+ const progress = getProgress(this.tournament.startTime, this.tournament.endTime);
21
+ if (this.timeCloak &&
22
+ ![TournamentState.Closed, TournamentState.Closing].includes((_a = this.tournament) === null || _a === void 0 ? void 0 : _a.state) &&
23
+ (timeDifference != this.lastTimeDiff || progress != this.lastProgress)) {
24
+ this.time++;
25
+ this.lastProgress = progress;
26
+ this.lastTimeDiff = timeDifference;
27
+ }
28
+ }, 2000);
29
+ }
30
+ connectedCallback() {
31
+ this.setTimeInterval();
32
+ }
33
+ disconnectedCallback() {
34
+ clearInterval(this.timeHolder);
35
+ }
36
+ render() {
37
+ return h("section", { key: 'b5d514586445a3acc665fcbbbaa0d139b7b28075', class: "TimeContainer" }, h("div", { key: '2080b18edd157a337d5c7f164d1914e91a95a3f3', class: "Time" }, this.tournament.state === 'Running'
38
+ ? [
39
+ h("div", { class: "Running" }, h("div", null, this.lastTimeDiff), ",", h("div", null, renderGradientRoundedButton({
40
+ statedClasses: {
41
+ isHollow: true,
42
+ isPendding: false
43
+ },
44
+ innerHTML: `${getProgress(this.tournament.startTime, this.tournament.endTime)}%`
45
+ })))
46
+ ]
47
+ : [h("div", { class: "NotRunning" }, formatDate(this.tournament.startTime)), h("div", null, formatDate(this.tournament.endTime))]), h("casino-engagement-suite-progress-bar", { key: 'b841cc70a1307f1175f0748644aaaeee9e1094ff', value: Number(this.lastProgress >= 100 ? 100 : this.lastProgress), "hide-percent": true }));
48
+ }
49
+ static get is() { return "casino-engagement-suite-tournament-timer"; }
50
+ static get properties() {
51
+ return {
52
+ "tournament": {
53
+ "type": "unknown",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "Tournament",
57
+ "resolved": "{ href: string; id: string; nameOrTitle: string; description: string; termsUrl: string; thumbnail: string; thumbnails: []; startTime: Date; endTime: Date; closeTime: Date; exhibitionStartTime: Date; exhibitionEndTime: Date; state: TournamentState; tags: string; minBetCount: number; dataSource: string; scoreCriteria: string; wallets: { code: string; }; prizes: { rank: number; count: number; name: string; }[]; games?: TournamentGame[]; playerEnrolled?: boolean; isPlayerAcknowledged?: boolean; isActionJoinPending?: boolean; isUnjoined?: boolean; }",
58
+ "references": {
59
+ "Tournament": {
60
+ "location": "import",
61
+ "path": "../utils/types",
62
+ "id": "../../../../packages/stencil/casino-engagement-suite-tournament/src/utils/types.ts::Tournament"
63
+ }
64
+ }
65
+ },
66
+ "required": false,
67
+ "optional": false,
68
+ "docs": {
69
+ "tags": [],
70
+ "text": ""
71
+ },
72
+ "defaultValue": "undefined"
73
+ }
74
+ };
75
+ }
76
+ static get states() {
77
+ return {
78
+ "time": {},
79
+ "timeHolder": {},
80
+ "timeCloak": {}
81
+ };
82
+ }
83
+ static get listeners() {
84
+ return [{
85
+ "name": "tournamentTimer",
86
+ "method": "containerPageChangeHandler",
87
+ "target": undefined,
88
+ "capture": false,
89
+ "passive": false
90
+ }];
91
+ }
92
+ }
@@ -0,0 +1,114 @@
1
+ import { h } from "@stencil/core";
2
+ import { classnames } from "../utils/utils";
3
+ import { TRANSLATIONS } from "../utils/translations";
4
+ export class CasinoEngagementSuiteTournamentItem {
5
+ constructor() {
6
+ this.tournament = undefined;
7
+ this.isNew = undefined;
8
+ this.locale = TRANSLATIONS;
9
+ }
10
+ handleJoinTournamentEvent(e) {
11
+ if (this.tournament.id === e.detail.id) {
12
+ this.tournament = Object.assign(Object.assign({}, this.tournament), { isActionJoinPending: true });
13
+ }
14
+ }
15
+ handleUnjoinTournamentEvent(e) {
16
+ if (this.tournament.id === e.detail.id) {
17
+ this.tournament = Object.assign(Object.assign({}, this.tournament), { isActionJoinPending: true });
18
+ }
19
+ }
20
+ goToDetail() {
21
+ this.clickToTournamentDetail.emit(this.tournament);
22
+ }
23
+ render() {
24
+ const tournament = this.tournament;
25
+ return (h("div", { key: 'e507da65532f4608aa96c1ebe2e329d332b9c439', class: classnames('LeaderboardsItem', tournament.isPlayerAcknowledged ? ' GradientRounded Hollow' : '', tournament.isUnjoined ? 'Unjoined' : ''), onClick: this.goToDetail.bind(this) }, h("div", { key: 'dc9bd1777858b2a3a57a3f808f734857db9011ee', class: "LeaderboardsItemContainer" }, h("casino-engagement-suite-tournament-item-title", { key: '14cae37fbc9d0f829b85d507ea0e60c95afc7250', tournament: tournament }), h("casino-engagement-suite-tournament-timer", { key: 'd703d03c146592887ea20bdc1289b446399f0870', tournament: tournament })), h("div", { key: '4f2f422965b47c0103ff5dcef8f28dc507491677', class: "LeaderboardLabels" }, this.isNew && (h("div", { key: '3132e3ac8adec5f9ca85d8c14c91801779d8afbf', class: "LeaderboardLabel" }, h("span", { key: 'c148c5fa597b76ff4f23c06b6b3407c06a96bdb7' }, "new"))))));
26
+ }
27
+ static get is() { return "casino-engagement-suite-tournament-item"; }
28
+ static get properties() {
29
+ return {
30
+ "tournament": {
31
+ "type": "unknown",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "Tournament",
35
+ "resolved": "{ href: string; id: string; nameOrTitle: string; description: string; termsUrl: string; thumbnail: string; thumbnails: []; startTime: Date; endTime: Date; closeTime: Date; exhibitionStartTime: Date; exhibitionEndTime: Date; state: TournamentState; tags: string; minBetCount: number; dataSource: string; scoreCriteria: string; wallets: { code: string; }; prizes: { rank: number; count: number; name: string; }[]; games?: TournamentGame[]; playerEnrolled?: boolean; isPlayerAcknowledged?: boolean; isActionJoinPending?: boolean; isUnjoined?: boolean; }",
36
+ "references": {
37
+ "Tournament": {
38
+ "location": "import",
39
+ "path": "../utils/types",
40
+ "id": "../../../../packages/stencil/casino-engagement-suite-tournament/src/utils/types.ts::Tournament"
41
+ }
42
+ }
43
+ },
44
+ "required": false,
45
+ "optional": false,
46
+ "docs": {
47
+ "tags": [],
48
+ "text": ""
49
+ },
50
+ "defaultValue": "undefined"
51
+ },
52
+ "isNew": {
53
+ "type": "boolean",
54
+ "mutable": false,
55
+ "complexType": {
56
+ "original": "boolean",
57
+ "resolved": "boolean",
58
+ "references": {}
59
+ },
60
+ "required": false,
61
+ "optional": false,
62
+ "docs": {
63
+ "tags": [],
64
+ "text": ""
65
+ },
66
+ "attribute": "is-new",
67
+ "reflect": false
68
+ }
69
+ };
70
+ }
71
+ static get states() {
72
+ return {
73
+ "locale": {}
74
+ };
75
+ }
76
+ static get events() {
77
+ return [{
78
+ "method": "clickToTournamentDetail",
79
+ "name": "clickToTournamentDetail",
80
+ "bubbles": true,
81
+ "cancelable": true,
82
+ "composed": true,
83
+ "docs": {
84
+ "tags": [],
85
+ "text": ""
86
+ },
87
+ "complexType": {
88
+ "original": "Object",
89
+ "resolved": "Object",
90
+ "references": {
91
+ "Object": {
92
+ "location": "global",
93
+ "id": "global::Object"
94
+ }
95
+ }
96
+ }
97
+ }];
98
+ }
99
+ static get listeners() {
100
+ return [{
101
+ "name": "joinTournamentEvent",
102
+ "method": "handleJoinTournamentEvent",
103
+ "target": "body",
104
+ "capture": false,
105
+ "passive": false
106
+ }, {
107
+ "name": "unjoinTournamentEvent",
108
+ "method": "handleUnjoinTournamentEvent",
109
+ "target": "body",
110
+ "capture": false,
111
+ "passive": false
112
+ }];
113
+ }
114
+ }