@everymatrix/casino-tournament-prizes 1.31.2 → 1.32.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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/casino-tournament-prizes/casino-tournament-prizes.esm.js +0 -1
  4. package/dist/casino-tournament-prizes/index.esm.js +0 -0
  5. package/dist/casino-tournament-prizes/p-0c9dcd23.entry.js +0 -1
  6. package/dist/casino-tournament-prizes/p-44cdb103.js +0 -1
  7. package/dist/cjs/casino-tournament-prizes.cjs.entry.js +0 -177
  8. package/dist/cjs/casino-tournament-prizes.cjs.js +0 -19
  9. package/dist/cjs/index-edbd2afe.js +0 -1195
  10. package/dist/cjs/index.cjs.js +0 -2
  11. package/dist/cjs/loader.cjs.js +0 -21
  12. package/dist/collection/collection-manifest.json +0 -12
  13. package/dist/collection/components/casino-tournament-prizes/casino-tournament-prizes.css +0 -100
  14. package/dist/collection/components/casino-tournament-prizes/casino-tournament-prizes.js +0 -319
  15. package/dist/collection/index.js +0 -1
  16. package/dist/collection/utils/locale.utils.js +0 -58
  17. package/dist/collection/utils/utils.js +0 -3
  18. package/dist/components/casino-tournament-prizes.d.ts +0 -11
  19. package/dist/components/casino-tournament-prizes.js +0 -205
  20. package/dist/components/index.d.ts +0 -26
  21. package/dist/components/index.js +0 -1
  22. package/dist/esm/casino-tournament-prizes.entry.js +0 -173
  23. package/dist/esm/casino-tournament-prizes.js +0 -17
  24. package/dist/esm/index-fd6b56d4.js +0 -1169
  25. package/dist/esm/index.js +0 -1
  26. package/dist/esm/loader.js +0 -17
  27. package/dist/esm/polyfills/core-js.js +0 -11
  28. package/dist/esm/polyfills/css-shim.js +0 -1
  29. package/dist/esm/polyfills/dom.js +0 -79
  30. package/dist/esm/polyfills/es5-html-element.js +0 -1
  31. package/dist/esm/polyfills/index.js +0 -34
  32. package/dist/esm/polyfills/system.js +0 -6
  33. package/dist/index.cjs.js +0 -1
  34. package/dist/index.js +0 -1
  35. package/dist/stencil.config.js +0 -22
  36. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/casino-tournament-prizes/.stencil/packages/casino-tournament-prizes/stencil.config.d.ts +0 -2
  37. package/dist/types/components/casino-tournament-prizes/casino-tournament-prizes.d.ts +0 -24
  38. package/dist/types/components.d.ts +0 -55
  39. package/dist/types/index.d.ts +0 -1
  40. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  41. package/dist/types/utils/locale.utils.d.ts +0 -1
  42. package/dist/types/utils/utils.d.ts +0 -1
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-edbd2afe.js');
6
-
7
- /*
8
- Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchEsm = () => {
11
- return index.promiseResolve();
12
- };
13
-
14
- const defineCustomElements = (win, options) => {
15
- if (typeof window === 'undefined') return Promise.resolve();
16
- return patchEsm().then(() => {
17
- return index.bootstrapLazy([["casino-tournament-prizes.cjs",[[1,"casino-tournament-prizes",{"language":[1],"useGroup":[4,"use-group"],"useEvent":[4,"use-event"],"endpoint":[1],"session":[1],"rawPrizes":[1,"raw-prizes"],"tournamentId":[1,"tournament-id"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"prizes":[32],"prizeGroups":[32],"initialLoad":[32]},[[10,"getTournamentInfoCompleted","infoCompletedHandler"]]]]]], options);
18
- });
19
- };
20
-
21
- exports.defineCustomElements = defineCustomElements;
@@ -1,12 +0,0 @@
1
- {
2
- "entries": [
3
- "./components/casino-tournament-prizes/casino-tournament-prizes.js"
4
- ],
5
- "compiler": {
6
- "name": "@stencil/core",
7
- "version": "2.15.2",
8
- "typescriptVersion": "4.5.4"
9
- },
10
- "collections": [],
11
- "bundles": []
12
- }
@@ -1,100 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- .PrizeGroups {
6
- color: var(--emfe-w-color-white, #FFFFFF);
7
- display: flex;
8
- gap: 20px;
9
- font-size: 14px;
10
- }
11
-
12
- .PrizeGroup {
13
- flex: 1;
14
- background: var(--emfe-w-tournament-color-bg, #153a5c);
15
- }
16
-
17
- .PrizeTitle {
18
- text-align: center;
19
- width: 100%;
20
- }
21
-
22
- .GroupPrizeTitle {
23
- width: 100%;
24
- display: flex;
25
- padding: 8px 6px;
26
- gap: 8px;
27
- justify-content: center;
28
- }
29
-
30
- .PrizeView {
31
- display: flex;
32
- gap: 10px;
33
- font-size: 12px;
34
- }
35
- .PrizeView .PrizeTitle {
36
- display: inline-block;
37
- width: auto;
38
- }
39
- .PrizeView .PrizeGroups {
40
- display: inline-flex;
41
- }
42
-
43
- .Title {
44
- text-align: center;
45
- color: var(--emfe-w-color-white, #FFFFFF);
46
- }
47
-
48
- .PrizeIcon path {
49
- fill: var(--emfe-w-color-white, #FFFFFF);
50
- }
51
-
52
- .PrizeRow {
53
- padding: 8px;
54
- border-bottom: 1px solid rgba(206, 210, 214, 0.15);
55
- }
56
-
57
- .PrizeItem {
58
- display: flex;
59
- justify-content: space-between;
60
- padding: 6px;
61
- font-size: 12px;
62
- border-radius: 2px;
63
- }
64
-
65
- .Group1 .Rank1 {
66
- background: #7e6c22;
67
- }
68
- .Group1 .Rank2 {
69
- background: #666;
70
- }
71
- .Group1 .Rank3 {
72
- background: #6a5446;
73
- }
74
-
75
- .Prizes {
76
- padding-left: 20px;
77
- flex-wrap: wrap;
78
- display: flex;
79
- gap: 20px;
80
- width: 100%;
81
- min-height: 50px;
82
- padding-top: 8px;
83
- }
84
-
85
- .Prize {
86
- flex-grow: 1;
87
- color: var(--emfe-w-color-gray-300, #58586B);
88
- }
89
- .Prize.Prize0 span {
90
- color: #FECF00;
91
- }
92
- .Prize.Prize1 span {
93
- color: #D9B206;
94
- }
95
- .Prize.Prize2 span {
96
- color: #9B8007;
97
- }
98
- .Prize p {
99
- color: var(--emfe-w-color-white, #FFFFFF);
100
- }
@@ -1,319 +0,0 @@
1
- import { Component, Prop, h, State, Listen, Element } from '@stencil/core';
2
- import { translate } from '../../utils/locale.utils';
3
- export class CasinoTournamentPrizes {
4
- constructor() {
5
- this.useGroup = false;
6
- this.useEvent = false;
7
- this.clientStyling = '';
8
- this.clientStylingUrl = '';
9
- this.limitStylingAppends = false;
10
- this.prizes = [];
11
- this.prizeGroups = [];
12
- this.initialLoad = false;
13
- }
14
- infoCompletedHandler(event) {
15
- if (event.detail) {
16
- this.prizes = event.detail.prizes;
17
- this.formatGroup();
18
- this.initialLoad = true;
19
- }
20
- }
21
- formatGroup() {
22
- const prizes = this.prizes;
23
- prizes.forEach((prize) => {
24
- let array = [];
25
- if (prize.count > 0) {
26
- for (let index = 0; index < prize.count; index++) {
27
- const element = { name: prize.name, rank: prize.rank + index };
28
- array.push(element);
29
- }
30
- }
31
- this.prizeGroups.push(array);
32
- });
33
- }
34
- getTournamentInfo() {
35
- let url = new URL(this.endpoint + `/v1/tournaments/${this.tournamentId}`);
36
- let reqHeaders = new Headers();
37
- url.searchParams.append('expand', 'games');
38
- url.searchParams.append('language', this.language);
39
- url.searchParams.append('fields', 'playerEnrolled,games(id,name,thumbnail)');
40
- if (this.session) {
41
- reqHeaders.append('X-SessionId', this.session);
42
- }
43
- let requestOptions = {
44
- method: 'GET',
45
- headers: reqHeaders,
46
- };
47
- fetch(url.href, requestOptions).then((res) => res.json())
48
- .then((res) => {
49
- this.prizes = res.item.prizes;
50
- if (this.useGroup) {
51
- this.formatGroup();
52
- }
53
- this.initialLoad = true;
54
- });
55
- }
56
- componentWillLoad() {
57
- if (!this.useEvent && this.rawPrizes) {
58
- this.prizes = JSON.parse(this.rawPrizes);
59
- if (this.useGroup) {
60
- this.formatGroup();
61
- }
62
- this.initialLoad = true;
63
- }
64
- if (!this.useEvent && this.endpoint && this.tournamentId) {
65
- this.getTournamentInfo();
66
- }
67
- }
68
- componentDidRender() {
69
- if (!this.limitStylingAppends && this.host) {
70
- if (this.clientStyling)
71
- this.setClientStyling();
72
- if (this.clientStylingUrl)
73
- this.setClientStylingURL();
74
- this.limitStylingAppends = true;
75
- }
76
- }
77
- setClientStyling() {
78
- const sheet = new CSSStyleSheet();
79
- // @ts-ignore
80
- sheet.replace(this.clientStyling);
81
- // @ts-ignore
82
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
83
- }
84
- setClientStylingURL() {
85
- let url = new URL(this.clientStylingUrl);
86
- fetch(url.href)
87
- .then((res) => res.text())
88
- .then((data) => {
89
- const sheet = new CSSStyleSheet();
90
- // @ts-ignore
91
- sheet.replace(data);
92
- // @ts-ignore
93
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
94
- });
95
- }
96
- render() {
97
- {
98
- this.prizes && this.prizes.length > 0;
99
- return h("div", { class: `TournamentPrizes ${this.useGroup ? '' : 'PrizeView'}` },
100
- this.initialLoad && !this.useGroup && h("div", { class: "PrizeTitle" },
101
- h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "30", height: "27.454", viewBox: "0 0 30 27.454" },
102
- h("path", { d: "M35.84,12.887a1.023,1.023,0,0,0-.853-.481h-5.2l.242-1.456a1.023,1.023,0,0,0-1.023-1.19H12.977a1.023,1.023,0,0,0-1.023,1.19l.242,1.456H7.022a1.023,1.023,0,0,0-.921,1.47l2.967,6.077a6.48,6.48,0,0,0,5.163,3.581,7.227,7.227,0,0,0,3.7,3.963v2.667h-.426a3.525,3.525,0,1,0,0,7.049H24.5a3.525,3.525,0,1,0,0-7.049h-.426V27.5a7.227,7.227,0,0,0,3.7-3.963,6.48,6.48,0,0,0,5.167-3.581L35.9,13.876a1.023,1.023,0,0,0-.058-.989ZM10.914,19.05l-2.241-4.6h3.891l1.153,6.916A4.406,4.406,0,0,1,10.914,19.05ZM25.977,33.687A1.477,1.477,0,0,1,24.5,35.164H17.509a1.478,1.478,0,0,1,0-2.957H24.5A1.48,1.48,0,0,1,25.977,33.687Zm-3.949-3.526H19.982V28.094a6.729,6.729,0,0,0,2.046,0Zm4.123-8.383a5.218,5.218,0,0,1-10.293,0L14.184,11.8H27.826ZM31.1,19.05a4.406,4.406,0,0,1-2.8,2.309l1.153-6.916h3.891Z", transform: "translate(-5.999 -9.76)" })),
103
- h("div", { class: "Title" }, translate('prizes', this.language))),
104
- this.initialLoad && this.useGroup && h("div", { class: "GroupPrizeTitle" },
105
- h("svg", { class: "PrizeIcon", xmlns: "http://www.w3.org/2000/svg", width: "19", height: "16", viewBox: "0 0 19 16", fill: "none" },
106
- h("g", { "clip-path": "url(#clip0_2459_42455)" },
107
- h("path", { d: "M14.7476 2.84132V0.664551H4.03327V2.84132H0.818359V5.01946C0.818359 6.8229 2.2568 8.28496 4.0326 8.28496C4.36862 8.28496 4.69326 8.23192 4.99647 8.13399C5.76958 9.25604 6.94898 10.07 8.31782 10.3516V13.7266H7.24685C6.06276 13.7266 5.1029 14.701 5.1029 15.9026H13.6753C13.6753 14.7004 12.7168 13.7266 11.5327 13.7266H10.4611V10.3516C11.8293 10.07 13.0087 9.25672 13.7818 8.13399C14.0863 8.23124 14.4116 8.28496 14.7463 8.28496C16.5214 8.28496 17.9612 6.8229 17.9612 5.01946V2.84132H14.7476ZM4.03327 6.99222C2.9623 6.99222 2.0908 6.10751 2.0908 5.01946V3.93005H4.03327V5.01946C4.03327 5.70221 4.15844 6.3564 4.38401 6.9589C4.27089 6.9793 4.15175 6.99086 4.03327 6.99086V6.99222ZM11.0207 5.88989L12.0414 9.06223L9.38945 7.09355L6.7368 9.06223L7.75757 5.88989L5.09688 3.93481L8.3814 3.94229L9.38945 0.767235L10.3968 3.94229L13.6814 3.93481L11.0207 5.88989ZM16.6901 5.01946C16.6901 6.10683 15.8193 6.99222 14.7483 6.99222C14.6285 6.99222 14.512 6.9793 14.3982 6.95958C14.6245 6.3564 14.7483 5.70357 14.7483 5.02014V3.93073H16.6901V5.02014V5.01946Z", fill: "white" })),
108
- h("defs", null,
109
- h("clipPath", { id: "clip0_2459_42455" },
110
- h("rect", { width: "18.2857", height: "16", fill: "white", transform: "translate(0.5)" })))),
111
- h("div", { class: "Title" }, translate('prizes', this.language))),
112
- h("div", { class: "PrizeGroups" },
113
- this.useGroup == true && this.prizeGroups && this.prizeGroups.map((group, groupIndex) => {
114
- return h("div", { class: `PrizeGroup Group${groupIndex + 1}` }, group && group.map((prize, prizeIndex) => {
115
- return h("div", { class: "PrizeRow" },
116
- h("div", { class: `PrizeItem Rank${prizeIndex + 1}` },
117
- h("span", { class: "PrizeRank" },
118
- prize.rank,
119
- " ",
120
- translate('place', this.language),
121
- " "),
122
- h("span", { class: "PrizeName" }, prize.name)));
123
- }));
124
- }),
125
- this.useGroup == false && this.prizes && this.prizes.map((prize, prizeIndex) => {
126
- return h("div", { class: `Prize Prize${prizeIndex}` },
127
- h("p", { class: "PrizeText" },
128
- h("span", { class: "PrizeRank" }, prize.count > 1 ? (`${prize.rank}~${prize.rank + prize.count - 1}`) : (prize.rank)),
129
- " ",
130
- translate('place', this.language),
131
- ": ",
132
- prize.name));
133
- }),
134
- !this.prizes && h("p", null, translate('noprizes', this.language))));
135
- }
136
- ;
137
- }
138
- static get is() { return "casino-tournament-prizes"; }
139
- static get encapsulation() { return "shadow"; }
140
- static get originalStyleUrls() { return {
141
- "$": ["casino-tournament-prizes.scss"]
142
- }; }
143
- static get styleUrls() { return {
144
- "$": ["casino-tournament-prizes.css"]
145
- }; }
146
- static get properties() { return {
147
- "language": {
148
- "type": "string",
149
- "mutable": false,
150
- "complexType": {
151
- "original": "string",
152
- "resolved": "string",
153
- "references": {}
154
- },
155
- "required": false,
156
- "optional": false,
157
- "docs": {
158
- "tags": [],
159
- "text": ""
160
- },
161
- "attribute": "language",
162
- "reflect": false
163
- },
164
- "useGroup": {
165
- "type": "boolean",
166
- "mutable": false,
167
- "complexType": {
168
- "original": "boolean",
169
- "resolved": "boolean",
170
- "references": {}
171
- },
172
- "required": false,
173
- "optional": false,
174
- "docs": {
175
- "tags": [],
176
- "text": ""
177
- },
178
- "attribute": "use-group",
179
- "reflect": false,
180
- "defaultValue": "false"
181
- },
182
- "useEvent": {
183
- "type": "boolean",
184
- "mutable": false,
185
- "complexType": {
186
- "original": "boolean",
187
- "resolved": "boolean",
188
- "references": {}
189
- },
190
- "required": false,
191
- "optional": false,
192
- "docs": {
193
- "tags": [],
194
- "text": ""
195
- },
196
- "attribute": "use-event",
197
- "reflect": false,
198
- "defaultValue": "false"
199
- },
200
- "endpoint": {
201
- "type": "string",
202
- "mutable": false,
203
- "complexType": {
204
- "original": "string",
205
- "resolved": "string",
206
- "references": {}
207
- },
208
- "required": false,
209
- "optional": false,
210
- "docs": {
211
- "tags": [],
212
- "text": ""
213
- },
214
- "attribute": "endpoint",
215
- "reflect": false
216
- },
217
- "session": {
218
- "type": "string",
219
- "mutable": false,
220
- "complexType": {
221
- "original": "string",
222
- "resolved": "string",
223
- "references": {}
224
- },
225
- "required": false,
226
- "optional": false,
227
- "docs": {
228
- "tags": [],
229
- "text": ""
230
- },
231
- "attribute": "session",
232
- "reflect": false
233
- },
234
- "rawPrizes": {
235
- "type": "string",
236
- "mutable": false,
237
- "complexType": {
238
- "original": "string",
239
- "resolved": "string",
240
- "references": {}
241
- },
242
- "required": false,
243
- "optional": false,
244
- "docs": {
245
- "tags": [],
246
- "text": ""
247
- },
248
- "attribute": "raw-prizes",
249
- "reflect": false
250
- },
251
- "tournamentId": {
252
- "type": "string",
253
- "mutable": false,
254
- "complexType": {
255
- "original": "string",
256
- "resolved": "string",
257
- "references": {}
258
- },
259
- "required": false,
260
- "optional": false,
261
- "docs": {
262
- "tags": [],
263
- "text": ""
264
- },
265
- "attribute": "tournament-id",
266
- "reflect": false
267
- },
268
- "clientStyling": {
269
- "type": "string",
270
- "mutable": false,
271
- "complexType": {
272
- "original": "string",
273
- "resolved": "string",
274
- "references": {}
275
- },
276
- "required": false,
277
- "optional": false,
278
- "docs": {
279
- "tags": [],
280
- "text": ""
281
- },
282
- "attribute": "client-styling",
283
- "reflect": false,
284
- "defaultValue": "''"
285
- },
286
- "clientStylingUrl": {
287
- "type": "string",
288
- "mutable": false,
289
- "complexType": {
290
- "original": "string",
291
- "resolved": "string",
292
- "references": {}
293
- },
294
- "required": false,
295
- "optional": false,
296
- "docs": {
297
- "tags": [],
298
- "text": ""
299
- },
300
- "attribute": "client-styling-url",
301
- "reflect": false,
302
- "defaultValue": "''"
303
- }
304
- }; }
305
- static get states() { return {
306
- "limitStylingAppends": {},
307
- "prizes": {},
308
- "prizeGroups": {},
309
- "initialLoad": {}
310
- }; }
311
- static get elementRef() { return "host"; }
312
- static get listeners() { return [{
313
- "name": "getTournamentInfoCompleted",
314
- "method": "infoCompletedHandler",
315
- "target": "window",
316
- "capture": true,
317
- "passive": false
318
- }]; }
319
- }
@@ -1 +0,0 @@
1
- export * from './components';
@@ -1,58 +0,0 @@
1
- const DEFAULT_LANGUAGE = 'en';
2
- const TRANSLATIONS = {
3
- en: {
4
- prizes: 'Prizes',
5
- noprizes: 'No available prizes',
6
- place: 'place',
7
- },
8
- 'zh-hk': {
9
- prizes: '獎品',
10
- noprizes: '沒有可用的獎品',
11
- place: 'place', // need translation
12
- },
13
- fr: {
14
- prizes: 'Prix',
15
- noprizes: 'Aucun prix disponible',
16
- place: 'place', // need translation
17
- },
18
- ro: {
19
- prizes: 'Premii',
20
- noprizes: 'Nu sunt disponibile premii',
21
- place: 'poziție',
22
- },
23
- tr: {
24
- prizes: 'Ödüller',
25
- noprizes: 'Geçerli ödül yok',
26
- place: 'Sıra',
27
- },
28
- el: {
29
- prizes: 'Έπαθλα',
30
- noprizes: 'Μη διαθέσιμα έπαθλα',
31
- place: 'θέση',
32
- },
33
- es: {
34
- prizes: 'Premios',
35
- noprizes: 'No hay premios disponibles',
36
- place: 'posición',
37
- },
38
- hu: {
39
- prizes: 'Nyeremények',
40
- noprizes: 'Nincs elérhető nyeremény',
41
- place: 'helyezés',
42
- },
43
- pt: {
44
- prizes: 'Prêmios',
45
- noprizes: 'Não há prêmios disponíveis',
46
- place: 'place', // need translation
47
- },
48
- hr: {
49
- prizes: 'Nagrade',
50
- noprizes: 'Nema dostupnih nagrada',
51
- place: 'mjesto',
52
- }
53
- };
54
- export const translate = (key, customLang) => {
55
- var _a, _b;
56
- const lang = customLang;
57
- return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
58
- };
@@ -1,3 +0,0 @@
1
- export function format(first, middle, last) {
2
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
- }
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface CasinoTournamentPrizes extends Components.CasinoTournamentPrizes, HTMLElement {}
4
- export const CasinoTournamentPrizes: {
5
- prototype: CasinoTournamentPrizes;
6
- new (): CasinoTournamentPrizes;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;