@everymatrix/casino-game-thumb-view 0.0.2-9.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 (130) hide show
  1. package/dist/assets/baccarat.svg +43 -0
  2. package/dist/assets/fav.svg +9 -0
  3. package/dist/assets/favorite.svg +12 -0
  4. package/dist/assets/seat.svg +6 -0
  5. package/dist/assets/unfav.svg +20 -0
  6. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -0
  7. package/dist/casino-game-thumb-view/index.esm.js +0 -0
  8. package/dist/casino-game-thumb-view/p-0bd6266b.entry.js +1 -0
  9. package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +1 -0
  10. package/dist/casino-game-thumb-view/p-2b51ea79.js +1 -0
  11. package/dist/casino-game-thumb-view/p-2d5f59fe.js +1 -0
  12. package/dist/casino-game-thumb-view/p-46dbb1cb.js +1 -0
  13. package/dist/casino-game-thumb-view/p-58134a43.entry.js +7 -0
  14. package/dist/casino-game-thumb-view/p-6a6b2a78.js +8 -0
  15. package/dist/casino-game-thumb-view/p-b153f943.entry.js +1 -0
  16. package/dist/casino-game-thumb-view/p-d961aec4.entry.js +1 -0
  17. package/dist/casino-game-thumb-view/p-eb23569d.entry.js +1 -0
  18. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +366 -0
  19. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +58 -0
  20. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +44 -0
  21. package/dist/cjs/casino-game-thumb-view.cjs.js +19 -0
  22. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +1604 -0
  23. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +275 -0
  24. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +23 -0
  25. package/dist/cjs/game-thumbnail-31d518f0.js +78 -0
  26. package/dist/cjs/index-65a1d768.js +1796 -0
  27. package/dist/cjs/index.cjs.js +2 -0
  28. package/dist/cjs/loader.cjs.js +21 -0
  29. package/dist/cjs/locale.utils-09067b6b.js +132 -0
  30. package/dist/cjs/utils-a0afc0a9.js +5745 -0
  31. package/dist/collection/collection-manifest.json +19 -0
  32. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.css +116 -0
  33. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +240 -0
  34. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.css +64 -0
  35. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +119 -0
  36. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.css +40 -0
  37. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +122 -0
  38. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +361 -0
  39. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1057 -0
  40. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.css +3 -0
  41. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +86 -0
  42. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.css +154 -0
  43. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +155 -0
  44. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.css +58 -0
  45. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +208 -0
  46. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.css +3 -0
  47. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +62 -0
  48. package/dist/collection/constants/game-thumbnail.js +85 -0
  49. package/dist/collection/index.js +1 -0
  50. package/dist/collection/models/casino-game-thumb-view.js +12 -0
  51. package/dist/collection/models/currency-symbols.js +173 -0
  52. package/dist/collection/static/baccarat.svg +43 -0
  53. package/dist/collection/static/fav.svg +9 -0
  54. package/dist/collection/static/favorite.svg +12 -0
  55. package/dist/collection/static/seat.svg +6 -0
  56. package/dist/collection/static/unfav.svg +20 -0
  57. package/dist/collection/utils/baccarat-board-svg.js +234 -0
  58. package/dist/collection/utils/locale.utils.js +128 -0
  59. package/dist/collection/utils/utils.js +65 -0
  60. package/dist/components/casino-extrainfo-baccarat.d.ts +11 -0
  61. package/dist/components/casino-extrainfo-baccarat.js +400 -0
  62. package/dist/components/casino-extrainfo-blackjack.d.ts +11 -0
  63. package/dist/components/casino-extrainfo-blackjack.js +92 -0
  64. package/dist/components/casino-extrainfo-roulette.d.ts +11 -0
  65. package/dist/components/casino-extrainfo-roulette.js +77 -0
  66. package/dist/components/casino-game-thumb-view.d.ts +11 -0
  67. package/dist/components/casino-game-thumb-view.js +1618 -0
  68. package/dist/components/casino-game-thumbnail-betlimit.d.ts +11 -0
  69. package/dist/components/casino-game-thumbnail-betlimit.js +6 -0
  70. package/dist/components/casino-game-thumbnail-betlimit2.js +227 -0
  71. package/dist/components/casino-game-thumbnail-extrainfo.d.ts +11 -0
  72. package/dist/components/casino-game-thumbnail-extrainfo.js +6 -0
  73. package/dist/components/casino-game-thumbnail-extrainfo2.js +93 -0
  74. package/dist/components/casino-game-thumbnail-overlay.d.ts +11 -0
  75. package/dist/components/casino-game-thumbnail-overlay.js +6 -0
  76. package/dist/components/casino-game-thumbnail-overlay2.js +68 -0
  77. package/dist/components/casino-normal-game-thumbnail.d.ts +11 -0
  78. package/dist/components/casino-normal-game-thumbnail.js +52 -0
  79. package/dist/components/game-thumbnail.js +72 -0
  80. package/dist/components/index.d.ts +26 -0
  81. package/dist/components/index.js +1 -0
  82. package/dist/components/locale.utils.js +130 -0
  83. package/dist/components/utils.js +5739 -0
  84. package/dist/esm/casino-extrainfo-baccarat.entry.js +362 -0
  85. package/dist/esm/casino-extrainfo-blackjack.entry.js +54 -0
  86. package/dist/esm/casino-extrainfo-roulette.entry.js +40 -0
  87. package/dist/esm/casino-game-thumb-view.js +17 -0
  88. package/dist/esm/casino-game-thumb-view_2.entry.js +1599 -0
  89. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +270 -0
  90. package/dist/esm/casino-normal-game-thumbnail.entry.js +19 -0
  91. package/dist/esm/game-thumbnail-0a56ee03.js +72 -0
  92. package/dist/esm/index-1e44dd9f.js +1769 -0
  93. package/dist/esm/index.js +1 -0
  94. package/dist/esm/loader.js +17 -0
  95. package/dist/esm/locale.utils-1c69bea3.js +130 -0
  96. package/dist/esm/polyfills/core-js.js +11 -0
  97. package/dist/esm/polyfills/css-shim.js +1 -0
  98. package/dist/esm/polyfills/dom.js +79 -0
  99. package/dist/esm/polyfills/es5-html-element.js +1 -0
  100. package/dist/esm/polyfills/index.js +34 -0
  101. package/dist/esm/polyfills/system.js +6 -0
  102. package/dist/esm/utils-e9314132.js +5739 -0
  103. package/dist/index.cjs.js +1 -0
  104. package/dist/index.js +1 -0
  105. package/dist/stencil.config.js +40 -0
  106. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +2 -0
  107. package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +40 -0
  108. package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +36 -0
  109. package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +21 -0
  110. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +221 -0
  111. package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +17 -0
  112. package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +16 -0
  113. package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +30 -0
  114. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +7 -0
  115. package/dist/types/components.d.ts +480 -0
  116. package/dist/types/constants/game-thumbnail.d.ts +83 -0
  117. package/dist/types/index.d.ts +1 -0
  118. package/dist/types/models/casino-game-thumb-view.d.ts +132 -0
  119. package/dist/types/models/currency-symbols.d.ts +172 -0
  120. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  121. package/dist/types/utils/baccarat-board-svg.d.ts +31 -0
  122. package/dist/types/utils/locale.utils.d.ts +1 -0
  123. package/dist/types/utils/utils.d.ts +19 -0
  124. package/loader/cdn.js +3 -0
  125. package/loader/index.cjs.js +3 -0
  126. package/loader/index.d.ts +12 -0
  127. package/loader/index.es2017.js +3 -0
  128. package/loader/index.js +4 -0
  129. package/loader/package.json +10 -0
  130. package/package.json +26 -0
@@ -0,0 +1,86 @@
1
+ import { Component, h, Prop } from '@stencil/core';
2
+ import { numberWithSeparators } from '../../utils/utils';
3
+ import { currenciesSymbols } from '../../models/currency-symbols';
4
+ export class CasinoGameThumbnailBetlimit {
5
+ constructor() {
6
+ this.defaultCurrency = 'EUR';
7
+ this.isBetLimitAvailable = false;
8
+ }
9
+ getCurrencySymbols(currency) {
10
+ return currenciesSymbols[currency];
11
+ }
12
+ componentWillRender() {
13
+ if (this.betLimit) {
14
+ const limit = this.betLimit.max
15
+ ? this.betLimit.max
16
+ : this.betLimit.min || {};
17
+ this.isBetLimitAvailable = Object.keys(limit).length === 1;
18
+ this.currency = this.isBetLimitAvailable
19
+ ? Object.keys(limit)[0]
20
+ : this.defaultCurrency;
21
+ }
22
+ }
23
+ render() {
24
+ if (!this.isBetLimitAvailable) {
25
+ return '';
26
+ }
27
+ return (h("p", { class: "LiveLimits" },
28
+ h("span", { class: "BetLimitLeft" },
29
+ this.getCurrencySymbols(this.currency),
30
+ ' ',
31
+ numberWithSeparators(this.betLimit.min[this.currency]),
32
+ " -",
33
+ ' ',
34
+ numberWithSeparators(this.betLimit.max[this.currency])),
35
+ (this.numberOfPlayers || this.numberOfPlayers == 0) && (h("span", { class: "BetLimitRight" },
36
+ h("svg", { fill: "white", width: "13", height: "13", viewBox: "0 0 13 14", xmlns: "http://www.w3.org/2000/svg" },
37
+ h("path", { d: "M4 8.2a4.6 4.6 0 0 0 5 0c2.7.8 4 2.6 4 4.8H0c0-2.2 1.3-4 4-4.8zM6.6 8c2 0 3.8-1.7 3.8-4 0-2.1-1.7-4-3.8-4a3.9 3.9 0 0 0-3.8 4c0 2.2 1.7 4 3.8 4z" })),
38
+ h("span", { class: "NrOfPlayers" }, this.numberOfPlayers)))));
39
+ }
40
+ static get is() { return "casino-game-thumbnail-betlimit"; }
41
+ static get originalStyleUrls() { return {
42
+ "$": ["casino-game-thumbnail-betlimit.scss"]
43
+ }; }
44
+ static get styleUrls() { return {
45
+ "$": ["casino-game-thumbnail-betlimit.css"]
46
+ }; }
47
+ static get properties() { return {
48
+ "betLimit": {
49
+ "type": "unknown",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "BetLimit",
53
+ "resolved": "BetLimit",
54
+ "references": {
55
+ "BetLimit": {
56
+ "location": "import",
57
+ "path": "../../models/casino-game-thumb-view"
58
+ }
59
+ }
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": "The betlimit of live game"
66
+ }
67
+ },
68
+ "numberOfPlayers": {
69
+ "type": "number",
70
+ "mutable": false,
71
+ "complexType": {
72
+ "original": "number",
73
+ "resolved": "number",
74
+ "references": {}
75
+ },
76
+ "required": false,
77
+ "optional": false,
78
+ "docs": {
79
+ "tags": [],
80
+ "text": "Number of players"
81
+ },
82
+ "attribute": "number-of-players",
83
+ "reflect": false
84
+ }
85
+ }; }
86
+ }
@@ -0,0 +1,154 @@
1
+ :host {
2
+ display: block;
3
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
4
+ }
5
+
6
+ *,
7
+ *::before,
8
+ *::after {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ .LiveProps {
15
+ display: flex;
16
+ flex-direction: column;
17
+ position: absolute;
18
+ bottom: 8px;
19
+ left: -8px;
20
+ right: 0;
21
+ width: 100%;
22
+ padding: 0;
23
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.3) 80%, rgba(0, 0, 0, 0.99) 100%);
24
+ color: var(--emfe-w-color-white, #FFFFFF);
25
+ opacity: 1;
26
+ font-size: 14px;
27
+ }
28
+
29
+ .GameExtraInfo {
30
+ display: block;
31
+ position: absolute;
32
+ width: 100%;
33
+ height: 100%;
34
+ top: 8px;
35
+ left: 8px;
36
+ z-index: 0;
37
+ }
38
+ .GameExtraInfoLabel {
39
+ font-size: 11px;
40
+ padding: 3px;
41
+ background-color: var(--emfe-w-color-primary, #D0046C);
42
+ color: var(--emfe-w-color-primary-50, #FBECF4);
43
+ font-weight: bold;
44
+ text-transform: uppercase;
45
+ border-radius: 5px;
46
+ }
47
+
48
+ .ListGame .GameInnerContainer .GameExtraInfo {
49
+ z-index: 10;
50
+ }
51
+ .ListGame .GameInnerContainer .ClosedGame {
52
+ opacity: 1;
53
+ z-index: 10;
54
+ padding: 8px 10px;
55
+ color: var(--emfe-w-color-white, #FFFFFF);
56
+ font-size: 18px;
57
+ }
58
+ .ListGame .GameInnerContainer .ClosedGame span {
59
+ font-size: 18px;
60
+ }
61
+ .ListGame .GameInnerContainer .LiveIcons {
62
+ position: relative;
63
+ display: flex;
64
+ padding: 0 10px;
65
+ box-sizing: border-box;
66
+ flex-direction: row;
67
+ align-items: center;
68
+ justify-content: flex-start;
69
+ min-height: auto;
70
+ margin-bottom: 5px;
71
+ }
72
+ .ListGame .GameInnerContainer .LiveIcons:first-child {
73
+ margin-left: 0;
74
+ }
75
+ .ListGame .GameInnerContainer .LiveIcons:last-child {
76
+ margin-right: 0;
77
+ }
78
+ .ListGame .GameInnerContainer .LiveIcons.Black, .ListGame .GameInnerContainer .LiveIcons.Red, .ListGame .GameInnerContainer .LiveIcons.Green {
79
+ color: var(--emfe-w-color-white, #FFFFFF);
80
+ border: 1px solid var(--emfe-w-color-white, #FFFFFF);
81
+ }
82
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult {
83
+ min-width: 12px;
84
+ padding: 2px;
85
+ margin: 0 6px 0 1px;
86
+ font-size: 14px;
87
+ text-align: center;
88
+ }
89
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult.FirstElementAnimated {
90
+ animation: flip-open 2s both;
91
+ -webkit-animation: flip-open 2s both;
92
+ -webkit-backface-visibility: visible;
93
+ backface-visibility: visible;
94
+ }
95
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult.First {
96
+ min-width: 24px;
97
+ padding: 4px;
98
+ }
99
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Black, .ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Red, .ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Green {
100
+ color: var(--emfe-w-color-white, #FFFFFF);
101
+ border: 1px solid var(--emfe-w-color-white, #FFFFFF);
102
+ }
103
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Black {
104
+ background: var(--emfe-w-color-black, #000000);
105
+ }
106
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Red {
107
+ background: red;
108
+ }
109
+ .ListGame .GameInnerContainer .LiveIcons .LatestResult.First.Green {
110
+ background: #56A80A;
111
+ }
112
+ .ListGame .GameInnerContainer .LiveIcons .Double {
113
+ display: flex;
114
+ flex-direction: column;
115
+ }
116
+ .ListGame .GameInnerContainer .LiveIcons .Double .LatestResult:first-child {
117
+ margin-bottom: 10px;
118
+ }
119
+ .ListGame .GameInnerContainer .LiveIcons .Double:first-child .LatestResult {
120
+ margin-left: 0;
121
+ margin-bottom: 0;
122
+ }
123
+ .ListGame .GameInnerContainer .LiveIcons .Double:last-child .LatestResult {
124
+ margin-right: 0;
125
+ }
126
+ .ListGame .GameInnerContainer .LiveIcons .Black,
127
+ .ListGame .GameInnerContainer .LiveIcons .Red,
128
+ .ListGame .GameInnerContainer .LiveIcons .Green {
129
+ background-color: transparent;
130
+ }
131
+ .ListGame .GameInnerContainer .LiveIcons .Black {
132
+ color: var(--emfe-w-color-white, #FFFFFF);
133
+ }
134
+ .ListGame .GameInnerContainer .LiveIcons .Red {
135
+ color: red;
136
+ }
137
+ .ListGame .GameInnerContainer .LiveIcons .Green {
138
+ color: #56A80A;
139
+ }
140
+ .ListGame .GameInnerContainer .LiveLimits {
141
+ opacity: 1;
142
+ display: flex;
143
+ flex-direction: row;
144
+ justify-content: space-between;
145
+ padding: 2px 10px 5px;
146
+ background: var(--emfe-w-color-black, #000000);
147
+ color: var(--emfe-w-color-white, #FFFFFF);
148
+ font-weight: normal;
149
+ font-size: 12px;
150
+ }
151
+ .ListGame .GameInnerContainer .LiveLimits span {
152
+ font-size: 12px;
153
+ vertical-align: top;
154
+ }
@@ -0,0 +1,155 @@
1
+ import { Component, h, State, Prop, Method } from '@stencil/core';
2
+ import moment from 'moment';
3
+ import { translate } from '../../utils/locale.utils';
4
+ import { addGameTag } from '../../utils/utils';
5
+ import { WIDGETTYPE_GAMECATEGORY, WIDGETTYPE_CLASS, } from '../../constants/game-thumbnail';
6
+ export class CasinoGameThumbnailExtrainfo {
7
+ constructor() {
8
+ this.language = 'en';
9
+ this.isNewGame = false;
10
+ }
11
+ async onGameLoaded(gameInfo) {
12
+ var _a;
13
+ this.gameInfo = gameInfo;
14
+ this.isNewGame = this.gameInfo.isNew;
15
+ this.gameTag = this.gameInfo.gameTag;
16
+ if (!this.gameInfo.details) {
17
+ return;
18
+ }
19
+ this.gameDetails = this.gameInfo.details;
20
+ this.isDouble = !this.gameDetails
21
+ ? false
22
+ : this.gameInfo.details.category.toLowerCase() ===
23
+ WIDGETTYPE_GAMECATEGORY.doubleballroulette;
24
+ this.gameTag = !this.gameDetails
25
+ ? this.gameInfo.gameTag
26
+ : ((_a = this.gameInfo.advancedTags) === null || _a === void 0 ? void 0 : _a.length) > 0
27
+ ? addGameTag(this.gameInfo.advancedTags)
28
+ : this.gameInfo.gameTag;
29
+ this.betLimit = !this.gameDetails ? null : this.gameDetails.betLimit;
30
+ this.initTimeProperties();
31
+ }
32
+ initTimeProperties() {
33
+ var _a, _b, _c, _d, _e;
34
+ //openHours.type: valid data: Bounded, FullTime
35
+ if (((_b = (_a = this.gameDetails) === null || _a === void 0 ? void 0 : _a.openHours) === null || _b === void 0 ? void 0 : _b.type) === 'Bounded') {
36
+ this.gameStartTime = (_d = (_c = this.gameDetails) === null || _c === void 0 ? void 0 : _c.openHours) === null || _d === void 0 ? void 0 : _d.value.startTime;
37
+ this.gameTimeFormat =
38
+ (_e = this.gameDetails) === null || _e === void 0 ? void 0 : _e.openHours.value.originalTimeFormat;
39
+ }
40
+ }
41
+ async onGameDetailUpdated(details) {
42
+ this.gameInfo.details = this.gameDetails = details;
43
+ this.gameDetails = Object.assign({}, this.gameDetails);
44
+ //openHours.type: valid data: Bouned, FullTime
45
+ this.initTimeProperties();
46
+ }
47
+ render() {
48
+ var _a, _b, _c;
49
+ if (!this.gameInfo) {
50
+ return '';
51
+ }
52
+ return (h("div", { class: "GameExtraInfo", part: "GameExtraInfo" },
53
+ this.isNewGame && (h("span", { class: "GameExtraInfoLabel NewGameTag", part: "GameExtraInfoLabel NewGameTag" }, translate('new', this.language))),
54
+ this.gameTag && (h("span", { class: "GameExtraInfoLabel PopularGameTag", part: "GameExtraInfoLabel PopularGameTag" }, this.gameTag)),
55
+ this.gameDetails && (h("div", { class: `GameProp LiveProps ${WIDGETTYPE_CLASS[this.gameDetails.category.toLowerCase()]} ${this.isDouble ? ' Double' : ''}`, part: `GameProp LiveProps ${WIDGETTYPE_CLASS[this.gameDetails.category.toLowerCase()]} ${this.isDouble ? ' Double' : ''}` },
56
+ this.gameDetails.isOpen ? (h("slot", { name: "category-details" })) : (this.gameStartTime &&
57
+ this.gameTimeFormat && (h("div", { class: "ClosedGame", part: "ClosedGame" },
58
+ translate('opens', this.language),
59
+ h("span", null,
60
+ ' ',
61
+ moment
62
+ .utc(this.gameStartTime)
63
+ .local()
64
+ .format(this.gameTimeFormat),
65
+ ' ')))),
66
+ ((_a = this.gameDetails.dealer) === null || _a === void 0 ? void 0 : _a.DealerName) && (h("p", { class: "LiveLimits" },
67
+ h("span", { class: "DealerName" },
68
+ translate('dealer', this.language),
69
+ ":",
70
+ ' ', (_b = this.gameDetails) === null || _b === void 0 ? void 0 :
71
+ _b.dealer.DealerName,
72
+ ' '))),
73
+ h("casino-game-thumbnail-betlimit", { betLimit: this.betLimit, numberOfPlayers: (_c = this.gameDetails) === null || _c === void 0 ? void 0 : _c.numberOfPlayers })))));
74
+ }
75
+ static get is() { return "casino-game-thumbnail-extrainfo"; }
76
+ static get originalStyleUrls() { return {
77
+ "$": ["casino-game-thumbnail-extrainfo.scss"]
78
+ }; }
79
+ static get styleUrls() { return {
80
+ "$": ["casino-game-thumbnail-extrainfo.css"]
81
+ }; }
82
+ static get properties() { return {
83
+ "language": {
84
+ "type": "string",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "string",
88
+ "resolved": "string",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": false,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": ""
96
+ },
97
+ "attribute": "language",
98
+ "reflect": false,
99
+ "defaultValue": "'en'"
100
+ }
101
+ }; }
102
+ static get states() { return {
103
+ "betLimit": {},
104
+ "gameInfo": {},
105
+ "gameDetails": {}
106
+ }; }
107
+ static get methods() { return {
108
+ "onGameLoaded": {
109
+ "complexType": {
110
+ "signature": "(gameInfo: CasinoGameThumbnailInfo) => Promise<void>",
111
+ "parameters": [{
112
+ "tags": [],
113
+ "text": ""
114
+ }],
115
+ "references": {
116
+ "Promise": {
117
+ "location": "global"
118
+ },
119
+ "CasinoGameThumbnailInfo": {
120
+ "location": "import",
121
+ "path": "../../models/casino-game-thumb-view"
122
+ }
123
+ },
124
+ "return": "Promise<void>"
125
+ },
126
+ "docs": {
127
+ "text": "",
128
+ "tags": []
129
+ }
130
+ },
131
+ "onGameDetailUpdated": {
132
+ "complexType": {
133
+ "signature": "(details: CasinoGameThumbnailDetails) => Promise<void>",
134
+ "parameters": [{
135
+ "tags": [],
136
+ "text": ""
137
+ }],
138
+ "references": {
139
+ "Promise": {
140
+ "location": "global"
141
+ },
142
+ "CasinoGameThumbnailDetails": {
143
+ "location": "import",
144
+ "path": "../../models/casino-game-thumb-view"
145
+ }
146
+ },
147
+ "return": "Promise<void>"
148
+ },
149
+ "docs": {
150
+ "text": "",
151
+ "tags": []
152
+ }
153
+ }
154
+ }; }
155
+ }
@@ -0,0 +1,58 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .GameInfoWrapper {
6
+ display: none;
7
+ position: absolute;
8
+ width: 100%;
9
+ height: 100%;
10
+ top: 0;
11
+ right: 0;
12
+ bottom: 0;
13
+ left: 0;
14
+ background: rgba(0, 0, 0, 0.65);
15
+ z-index: 15;
16
+ }
17
+ .GameInfoWrapper .GameInfo {
18
+ display: flex;
19
+ width: 100%;
20
+ height: 100%;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ justify-content: center;
24
+ }
25
+ .GameInfoWrapper .GameInfoName {
26
+ color: white;
27
+ margin-bottom: 10px;
28
+ text-align: center;
29
+ font-size: 14px;
30
+ }
31
+ .GameInfoWrapper .GameInfoBtn {
32
+ appearance: none;
33
+ padding: 6px;
34
+ background: var(--emfe-w-color-primary, #D0046C);
35
+ color: var(--emfe-w-color-primary-50, #FBECF4);
36
+ font-size: 16px;
37
+ border: 2px solid var(--emfe-w-color-primary-600, #99034F);
38
+ border-radius: 5px;
39
+ cursor: pointer;
40
+ transition: border 150ms ease-in-out;
41
+ }
42
+ .GameInfoWrapper .GameInfoBtn:hover {
43
+ border: 2px solid var(--emfe-w-color-primary-100, #F1BED9);
44
+ }
45
+
46
+ .GameInfoVendor {
47
+ display: block;
48
+ position: absolute;
49
+ bottom: 8px;
50
+ right: 8px;
51
+ color: white;
52
+ font-size: 12px;
53
+ font-weight: normal;
54
+ }
55
+
56
+ .GameInfoWrapper:hover {
57
+ display: block !important;
58
+ }
@@ -0,0 +1,208 @@
1
+ import { Component, h, Prop, Event } from '@stencil/core';
2
+ import { isMobile } from '../../utils/utils';
3
+ import { translate } from '../../utils/locale.utils';
4
+ export class CasinoGameThumbnailOverlay {
5
+ constructor() {
6
+ /**
7
+ * integratedGameFrameMobile
8
+ */
9
+ this.integratedGameFrameMobile = false;
10
+ /**
11
+ * Open game a a frame, gamepagemodalurl value should be set
12
+ */
13
+ this.integratedGameFrameDesktop = false;
14
+ /**
15
+ * Language
16
+ */
17
+ this.language = 'en';
18
+ this.userAgent = window.navigator.userAgent;
19
+ }
20
+ onPlayNowClicked() {
21
+ this.playClicked.emit(this.gameId);
22
+ let modalEventData = {
23
+ gameId: this.gameId,
24
+ isMobile: isMobile(this.userAgent),
25
+ };
26
+ let isFrameMode = this.integratedGameFrameMobile || this.integratedGameFrameDesktop;
27
+ window.postMessage({
28
+ type: isFrameMode ? 'OpenGameFrame' : 'ShowGameModal',
29
+ eventData: isFrameMode
30
+ ? Object.assign(Object.assign({}, modalEventData), { gamefunmode: this.hasFunMode, source: 'GameThumbnail', identifier: 'Lobby' }) : modalEventData,
31
+ }, window.location.href);
32
+ }
33
+ render() {
34
+ return (h("div", { class: "GameInfoWrapper", part: "GameInfoWrapper" },
35
+ h("div", { class: "GameInfo ", part: "GameInfo " },
36
+ h("p", { class: "GameInfoName", part: "GameInfoName", title: this.gameName },
37
+ ' ',
38
+ this.gameName,
39
+ ' '),
40
+ h("button", { class: "GameInfoBtn", part: "GameInfoBtn", onClick: () => this.onPlayNowClicked() }, translate('playNow', this.language))),
41
+ h("slot", { name: "vendor-name" },
42
+ h("span", { class: "GameInfoVendor", part: "GameInfoVendor" }, this.gameVendor))));
43
+ }
44
+ static get is() { return "casino-game-thumbnail-overlay"; }
45
+ static get originalStyleUrls() { return {
46
+ "$": ["casino-game-thumbnail-overlay.scss"]
47
+ }; }
48
+ static get styleUrls() { return {
49
+ "$": ["casino-game-thumbnail-overlay.css"]
50
+ }; }
51
+ static get properties() { return {
52
+ "integratedGameFrameMobile": {
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": "integratedGameFrameMobile"
65
+ },
66
+ "attribute": "integrated-game-frame-mobile",
67
+ "reflect": false,
68
+ "defaultValue": "false"
69
+ },
70
+ "gamepageModalUrl": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "string",
75
+ "resolved": "string",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "the frame url when integratedGameFrameDesktop is true"
83
+ },
84
+ "attribute": "gamepage-modal-url",
85
+ "reflect": false
86
+ },
87
+ "integratedGameFrameDesktop": {
88
+ "type": "boolean",
89
+ "mutable": false,
90
+ "complexType": {
91
+ "original": "boolean",
92
+ "resolved": "boolean",
93
+ "references": {}
94
+ },
95
+ "required": false,
96
+ "optional": false,
97
+ "docs": {
98
+ "tags": [],
99
+ "text": "Open game a a frame, gamepagemodalurl value should be set"
100
+ },
101
+ "attribute": "integrated-game-frame-desktop",
102
+ "reflect": false,
103
+ "defaultValue": "false"
104
+ },
105
+ "language": {
106
+ "type": "string",
107
+ "mutable": false,
108
+ "complexType": {
109
+ "original": "string",
110
+ "resolved": "string",
111
+ "references": {}
112
+ },
113
+ "required": false,
114
+ "optional": false,
115
+ "docs": {
116
+ "tags": [],
117
+ "text": "Language"
118
+ },
119
+ "attribute": "language",
120
+ "reflect": false,
121
+ "defaultValue": "'en'"
122
+ },
123
+ "gameName": {
124
+ "type": "string",
125
+ "mutable": false,
126
+ "complexType": {
127
+ "original": "string",
128
+ "resolved": "string",
129
+ "references": {}
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": ""
136
+ },
137
+ "attribute": "game-name",
138
+ "reflect": false
139
+ },
140
+ "gameVendor": {
141
+ "type": "string",
142
+ "mutable": false,
143
+ "complexType": {
144
+ "original": "string",
145
+ "resolved": "string",
146
+ "references": {}
147
+ },
148
+ "required": false,
149
+ "optional": false,
150
+ "docs": {
151
+ "tags": [],
152
+ "text": ""
153
+ },
154
+ "attribute": "game-vendor",
155
+ "reflect": false
156
+ },
157
+ "gameId": {
158
+ "type": "any",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "string | number",
162
+ "resolved": "number | string",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": false,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": ""
170
+ },
171
+ "attribute": "game-id",
172
+ "reflect": false
173
+ },
174
+ "hasFunMode": {
175
+ "type": "boolean",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "boolean",
179
+ "resolved": "boolean",
180
+ "references": {}
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": ""
187
+ },
188
+ "attribute": "has-fun-mode",
189
+ "reflect": false
190
+ }
191
+ }; }
192
+ static get events() { return [{
193
+ "method": "playClicked",
194
+ "name": "playCasinoGame",
195
+ "bubbles": true,
196
+ "cancelable": true,
197
+ "composed": true,
198
+ "docs": {
199
+ "tags": [],
200
+ "text": "Event when playnow button clicked"
201
+ },
202
+ "complexType": {
203
+ "original": "string | number",
204
+ "resolved": "number | string",
205
+ "references": {}
206
+ }
207
+ }]; }
208
+ }