@everymatrix/casino-jackpot-winner 1.0.69

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 (75) hide show
  1. package/dist/casino-jackpot-winner/casino-jackpot-winner.esm.js +1 -0
  2. package/dist/casino-jackpot-winner/index.esm.js +0 -0
  3. package/dist/casino-jackpot-winner/p-ac5b2e9b.entry.js +1 -0
  4. package/dist/casino-jackpot-winner/p-d8aa97f8.js +2 -0
  5. package/dist/casino-jackpot-winner/p-e1255160.js +1 -0
  6. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  7. package/dist/cjs/casino-jackpot-winner.cjs.entry.js +352 -0
  8. package/dist/cjs/casino-jackpot-winner.cjs.js +25 -0
  9. package/dist/cjs/index-043b8326.js +1191 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +15 -0
  12. package/dist/collection/collection-manifest.json +12 -0
  13. package/dist/collection/components/casino-jackpot-winner/casino-jackpot-winner.css +417 -0
  14. package/dist/collection/components/casino-jackpot-winner/casino-jackpot-winner.js +190 -0
  15. package/dist/collection/components/casino-jackpot-winner/index.js +1 -0
  16. package/dist/collection/decorators/base.decorator.js +12 -0
  17. package/dist/collection/decorators/locale.decorator.js +40 -0
  18. package/dist/collection/decorators/style.decorator.js +28 -0
  19. package/dist/collection/decorators/style.util.js +40 -0
  20. package/dist/collection/index.js +1 -0
  21. package/dist/collection/renders/Layout.js +2 -0
  22. package/dist/collection/renders/ListLoader.js +15 -0
  23. package/dist/collection/renders/Loader.js +2 -0
  24. package/dist/collection/renders/User.js +14 -0
  25. package/dist/collection/renders/images.js +21 -0
  26. package/dist/collection/renders/index.js +17 -0
  27. package/dist/collection/static/logo.svg +1 -0
  28. package/dist/collection/static/winner1.svg +59 -0
  29. package/dist/collection/static/winner2.svg +37 -0
  30. package/dist/collection/static/winner3.svg +124 -0
  31. package/dist/collection/static/winner4.svg +88 -0
  32. package/dist/collection/utils/business.js +13 -0
  33. package/dist/collection/utils/currencySymbols.js +172 -0
  34. package/dist/collection/utils/fetch.js +16 -0
  35. package/dist/collection/utils/translation.js +11 -0
  36. package/dist/collection/utils/utils.js +3 -0
  37. package/dist/esm/app-globals-0f993ce5.js +3 -0
  38. package/dist/esm/casino-jackpot-winner.entry.js +348 -0
  39. package/dist/esm/casino-jackpot-winner.js +20 -0
  40. package/dist/esm/index-a3763668.js +1163 -0
  41. package/dist/esm/index.js +1 -0
  42. package/dist/esm/loader.js +11 -0
  43. package/dist/index.cjs.js +1 -0
  44. package/dist/index.js +1 -0
  45. package/dist/stencil.config.dev.js +17 -0
  46. package/dist/stencil.config.js +17 -0
  47. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-jackpot-winner/.stencil/packages/stencil/casino-jackpot-winner/stencil.config.d.ts +2 -0
  48. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-jackpot-winner/.stencil/packages/stencil/casino-jackpot-winner/stencil.config.dev.d.ts +2 -0
  49. package/dist/types/components/casino-jackpot-winner/casino-jackpot-winner.d.ts +46 -0
  50. package/dist/types/components/casino-jackpot-winner/index.d.ts +1 -0
  51. package/dist/types/components.d.ts +85 -0
  52. package/dist/types/decorators/base.decorator.d.ts +2 -0
  53. package/dist/types/decorators/locale.decorator.d.ts +2 -0
  54. package/dist/types/decorators/style.decorator.d.ts +2 -0
  55. package/dist/types/decorators/style.util.d.ts +5 -0
  56. package/dist/types/index.d.ts +1 -0
  57. package/dist/types/renders/Layout.d.ts +1 -0
  58. package/dist/types/renders/ListLoader.d.ts +6 -0
  59. package/dist/types/renders/Loader.d.ts +1 -0
  60. package/dist/types/renders/User.d.ts +5 -0
  61. package/dist/types/renders/images.d.ts +2 -0
  62. package/dist/types/renders/index.d.ts +6 -0
  63. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  64. package/dist/types/utils/business.d.ts +1 -0
  65. package/dist/types/utils/currencySymbols.d.ts +172 -0
  66. package/dist/types/utils/fetch.d.ts +2 -0
  67. package/dist/types/utils/translation.d.ts +12 -0
  68. package/dist/types/utils/utils.d.ts +1 -0
  69. package/loader/cdn.js +1 -0
  70. package/loader/index.cjs.js +1 -0
  71. package/loader/index.d.ts +24 -0
  72. package/loader/index.es2017.js +1 -0
  73. package/loader/index.js +2 -0
  74. package/loader/package.json +11 -0
  75. package/package.json +26 -0
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-043b8326.js');
6
+ const appGlobals = require('./app-globals-3a1e7e63.js');
7
+
8
+ const defineCustomElements = async (win, options) => {
9
+ if (typeof window === 'undefined') return undefined;
10
+ await appGlobals.globalScripts();
11
+ return index.bootstrapLazy([["casino-jackpot-winner.cjs",[[1,"casino-jackpot-winner",{"endpoint":[1],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"currency":[1],"locale":[32],"users":[32],"isLoading":[32]},null,{"endpoint":["watchForUpdateUsers"],"language":["watchForUpdateUsers"]}]]]], options);
12
+ };
13
+
14
+ exports.setNonce = index.setNonce;
15
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,12 @@
1
+ {
2
+ "entries": [
3
+ "components/casino-jackpot-winner/casino-jackpot-winner.js"
4
+ ],
5
+ "compiler": {
6
+ "name": "@stencil/core",
7
+ "version": "4.20.0",
8
+ "typescriptVersion": "5.5.3"
9
+ },
10
+ "collections": [],
11
+ "bundles": []
12
+ }
@@ -0,0 +1,417 @@
1
+ .User {
2
+ color: #FFFFFF;
3
+ text-align: center;
4
+ }
5
+ .User .RankImageWrapper {
6
+ position: absolute;
7
+ z-index: 2;
8
+ }
9
+ .User .RankImageWrapper {
10
+ background-size: contain;
11
+ background-repeat: no-repeat;
12
+ width: 120px;
13
+ }
14
+
15
+ .Amount {
16
+ width: 100%;
17
+ border: none;
18
+ outline: none;
19
+ position: relative;
20
+ white-space: nowrap;
21
+ z-index: 1;
22
+ color: #FFFFFF;
23
+ background: linear-gradient(0deg, #FFBB33, #FFE74D);
24
+ }
25
+ .Amount::before {
26
+ content: "";
27
+ position: absolute;
28
+ background: linear-gradient(0deg, #000 0%, #4D4D4D 100%);
29
+ z-index: -1;
30
+ }
31
+ .Amount::after {
32
+ content: attr(data);
33
+ background: linear-gradient(0deg, #FFBB33, #FFE74D);
34
+ -webkit-background-clip: text;
35
+ color: transparent;
36
+ }
37
+
38
+ .Loader {
39
+ display: flex;
40
+ justify-content: center;
41
+ }
42
+
43
+ .lds-ellipsis {
44
+ display: inline-block;
45
+ position: relative;
46
+ width: 80px;
47
+ height: 80px;
48
+ }
49
+
50
+ .lds-ellipsis div {
51
+ position: absolute;
52
+ top: 33px;
53
+ width: 13px;
54
+ height: 13px;
55
+ border-radius: 50%;
56
+ background: rgb(99, 99, 99);
57
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
58
+ }
59
+
60
+ .lds-ellipsis div:nth-child(1) {
61
+ left: 8px;
62
+ animation: lds-ellipsis1 0.6s infinite;
63
+ }
64
+
65
+ .lds-ellipsis div:nth-child(2) {
66
+ left: 8px;
67
+ animation: lds-ellipsis2 0.6s infinite;
68
+ }
69
+
70
+ .lds-ellipsis div:nth-child(3) {
71
+ left: 32px;
72
+ animation: lds-ellipsis2 0.6s infinite;
73
+ }
74
+
75
+ .lds-ellipsis div:nth-child(4) {
76
+ left: 56px;
77
+ animation: lds-ellipsis3 0.6s infinite;
78
+ }
79
+
80
+ @keyframes lds-ellipsis1 {
81
+ 0% {
82
+ transform: scale(0);
83
+ }
84
+ 100% {
85
+ transform: scale(1);
86
+ }
87
+ }
88
+ @keyframes lds-ellipsis3 {
89
+ 0% {
90
+ transform: scale(1);
91
+ }
92
+ 100% {
93
+ transform: scale(0);
94
+ }
95
+ }
96
+ @keyframes lds-ellipsis2 {
97
+ 0% {
98
+ transform: translate(0, 0);
99
+ }
100
+ 100% {
101
+ transform: translate(24px, 0);
102
+ }
103
+ }
104
+ :host {
105
+ display: block;
106
+ }
107
+
108
+ .RootContainer {
109
+ background-color: #2D2D2D;
110
+ container-type: inline-size;
111
+ container-name: rootContainer;
112
+ }
113
+
114
+ .RootContainer .Logo {
115
+ flex: 1;
116
+ width: 100%;
117
+ height: 150px;
118
+ background-size: contain;
119
+ background-repeat: no-repeat;
120
+ background-position: center;
121
+ }
122
+ .RootContainer .CoreContainer {
123
+ padding: 20px 30px 30px;
124
+ }
125
+ .RootContainer .Row {
126
+ display: flex;
127
+ justify-content: space-evenly;
128
+ gap: 20px;
129
+ margin-bottom: 10px;
130
+ align-items: center;
131
+ }
132
+ .RootContainer .Amount::before {
133
+ left: 2px;
134
+ right: 2px;
135
+ top: 2px;
136
+ bottom: 2px;
137
+ }
138
+ .RootContainer .Amount::after {
139
+ font-size: 16px;
140
+ }
141
+ .RootContainer .UserFirst {
142
+ flex: 2;
143
+ padding-left: 50px;
144
+ }
145
+ .RootContainer .UserFirst .Amount {
146
+ font-size: 32px;
147
+ padding: 15px 0;
148
+ }
149
+ .RootContainer .UserFirst .Amount, .RootContainer .UserFirst .Amount:before {
150
+ border-radius: 32px;
151
+ }
152
+ .RootContainer .UserFirst .RankImageWrapper {
153
+ height: 86.36px;
154
+ margin-top: -10px;
155
+ transform: translateX(-30px);
156
+ }
157
+ .RootContainer .UserOther {
158
+ flex: 1;
159
+ padding-left: 30px;
160
+ }
161
+ .RootContainer .UserOther .Amount {
162
+ font-size: 20px;
163
+ padding: 8px 0;
164
+ }
165
+ .RootContainer .UserOther .Amount, .RootContainer .UserOther .Amount:before {
166
+ border-radius: 32px;
167
+ }
168
+ .RootContainer .UserOther .RankImageWrapper {
169
+ height: 46.63px;
170
+ margin-top: -5px;
171
+ transform: translateX(-30px);
172
+ }
173
+
174
+ @container rootContainer (max-width: 720px) {
175
+ .RootContainer .Logo {
176
+ flex: 1;
177
+ width: 100%;
178
+ height: 120px;
179
+ background-size: contain;
180
+ background-repeat: no-repeat;
181
+ background-position: center;
182
+ }
183
+ .RootContainer .CoreContainer {
184
+ padding: 16px 24px 24px;
185
+ }
186
+ .RootContainer .Row {
187
+ display: flex;
188
+ justify-content: space-evenly;
189
+ gap: 16px;
190
+ margin-bottom: 8px;
191
+ align-items: center;
192
+ }
193
+ .RootContainer .Amount::before {
194
+ left: 1.6px;
195
+ right: 1.6px;
196
+ top: 1.6px;
197
+ bottom: 1.6px;
198
+ }
199
+ .RootContainer .Amount::after {
200
+ font-size: 16px;
201
+ }
202
+ .RootContainer .UserFirst {
203
+ flex: 2;
204
+ padding-left: 40px;
205
+ }
206
+ .RootContainer .UserFirst .Amount {
207
+ font-size: 25.6px;
208
+ padding: 12px 0;
209
+ }
210
+ .RootContainer .UserFirst .Amount, .RootContainer .UserFirst .Amount:before {
211
+ border-radius: 25.6px;
212
+ }
213
+ .RootContainer .UserFirst .RankImageWrapper {
214
+ height: 69.088px;
215
+ margin-top: -8px;
216
+ transform: translateX(-24px);
217
+ }
218
+ .RootContainer .UserOther {
219
+ flex: 1;
220
+ padding-left: 24px;
221
+ }
222
+ .RootContainer .UserOther .Amount {
223
+ font-size: 16px;
224
+ padding: 6.4px 0;
225
+ }
226
+ .RootContainer .UserOther .Amount, .RootContainer .UserOther .Amount:before {
227
+ border-radius: 25.6px;
228
+ }
229
+ .RootContainer .UserOther .RankImageWrapper {
230
+ height: 37.304px;
231
+ margin-top: -4px;
232
+ transform: translateX(-24px);
233
+ }
234
+ }
235
+ @container rootContainer (max-width: 630px) {
236
+ .RootContainer .Logo {
237
+ flex: 1;
238
+ width: 100%;
239
+ height: 105px;
240
+ background-size: contain;
241
+ background-repeat: no-repeat;
242
+ background-position: center;
243
+ }
244
+ .RootContainer .CoreContainer {
245
+ padding: 14px 21px 21px;
246
+ }
247
+ .RootContainer .Row {
248
+ display: flex;
249
+ justify-content: space-evenly;
250
+ gap: 14px;
251
+ margin-bottom: 7px;
252
+ align-items: center;
253
+ }
254
+ .RootContainer .Amount::before {
255
+ left: 1.4px;
256
+ right: 1.4px;
257
+ top: 1.4px;
258
+ bottom: 1.4px;
259
+ }
260
+ .RootContainer .Amount::after {
261
+ font-size: 16px;
262
+ }
263
+ .RootContainer .UserFirst {
264
+ flex: 2;
265
+ padding-left: 35px;
266
+ }
267
+ .RootContainer .UserFirst .Amount {
268
+ font-size: 22.4px;
269
+ padding: 10.5px 0;
270
+ }
271
+ .RootContainer .UserFirst .Amount, .RootContainer .UserFirst .Amount:before {
272
+ border-radius: 22.4px;
273
+ }
274
+ .RootContainer .UserFirst .RankImageWrapper {
275
+ height: 60.452px;
276
+ margin-top: -7px;
277
+ transform: translateX(-21px);
278
+ }
279
+ .RootContainer .UserOther {
280
+ flex: 1;
281
+ padding-left: 21px;
282
+ }
283
+ .RootContainer .UserOther .Amount {
284
+ font-size: 14px;
285
+ padding: 5.6px 0;
286
+ }
287
+ .RootContainer .UserOther .Amount, .RootContainer .UserOther .Amount:before {
288
+ border-radius: 22.4px;
289
+ }
290
+ .RootContainer .UserOther .RankImageWrapper {
291
+ height: 32.641px;
292
+ margin-top: -3.5px;
293
+ transform: translateX(-21px);
294
+ }
295
+ }
296
+ @container rootContainer (max-width: 540px) {
297
+ .RootContainer .Logo {
298
+ flex: 1;
299
+ width: 100%;
300
+ height: 90px;
301
+ background-size: contain;
302
+ background-repeat: no-repeat;
303
+ background-position: center;
304
+ }
305
+ .RootContainer .CoreContainer {
306
+ padding: 12px 18px 18px;
307
+ }
308
+ .RootContainer .Row {
309
+ display: flex;
310
+ justify-content: space-evenly;
311
+ gap: 12px;
312
+ margin-bottom: 6px;
313
+ align-items: center;
314
+ }
315
+ .RootContainer .Amount::before {
316
+ left: 1.2px;
317
+ right: 1.2px;
318
+ top: 1.2px;
319
+ bottom: 1.2px;
320
+ }
321
+ .RootContainer .Amount::after {
322
+ font-size: 16px;
323
+ }
324
+ .RootContainer .UserFirst {
325
+ flex: 2;
326
+ padding-left: 30px;
327
+ }
328
+ .RootContainer .UserFirst .Amount {
329
+ font-size: 19.2px;
330
+ padding: 9px 0;
331
+ }
332
+ .RootContainer .UserFirst .Amount, .RootContainer .UserFirst .Amount:before {
333
+ border-radius: 19.2px;
334
+ }
335
+ .RootContainer .UserFirst .RankImageWrapper {
336
+ height: 51.816px;
337
+ margin-top: -6px;
338
+ transform: translateX(-18px);
339
+ }
340
+ .RootContainer .UserOther {
341
+ flex: 1;
342
+ padding-left: 18px;
343
+ }
344
+ .RootContainer .UserOther .Amount {
345
+ font-size: 12px;
346
+ padding: 4.8px 0;
347
+ }
348
+ .RootContainer .UserOther .Amount, .RootContainer .UserOther .Amount:before {
349
+ border-radius: 19.2px;
350
+ }
351
+ .RootContainer .UserOther .RankImageWrapper {
352
+ height: 27.978px;
353
+ margin-top: -3px;
354
+ transform: translateX(-18px);
355
+ }
356
+ }
357
+ @container rootContainer (max-width: 450px) {
358
+ .RootContainer .Logo {
359
+ flex: 1;
360
+ width: 100%;
361
+ height: 75px;
362
+ background-size: contain;
363
+ background-repeat: no-repeat;
364
+ background-position: center;
365
+ }
366
+ .RootContainer .CoreContainer {
367
+ padding: 10px 15px 15px;
368
+ }
369
+ .RootContainer .Row {
370
+ display: flex;
371
+ justify-content: space-evenly;
372
+ gap: 10px;
373
+ margin-bottom: 5px;
374
+ align-items: center;
375
+ }
376
+ .RootContainer .Amount::before {
377
+ left: 1px;
378
+ right: 1px;
379
+ top: 1px;
380
+ bottom: 1px;
381
+ }
382
+ .RootContainer .Amount::after {
383
+ font-size: 16px;
384
+ }
385
+ .RootContainer .UserFirst {
386
+ flex: 2;
387
+ padding-left: 25px;
388
+ }
389
+ .RootContainer .UserFirst .Amount {
390
+ font-size: 16px;
391
+ padding: 7.5px 0;
392
+ }
393
+ .RootContainer .UserFirst .Amount, .RootContainer .UserFirst .Amount:before {
394
+ border-radius: 16px;
395
+ }
396
+ .RootContainer .UserFirst .RankImageWrapper {
397
+ height: 43.18px;
398
+ margin-top: -5px;
399
+ transform: translateX(-15px);
400
+ }
401
+ .RootContainer .UserOther {
402
+ flex: 1;
403
+ padding-left: 15px;
404
+ }
405
+ .RootContainer .UserOther .Amount {
406
+ font-size: 10px;
407
+ padding: 4px 0;
408
+ }
409
+ .RootContainer .UserOther .Amount, .RootContainer .UserOther .Amount:before {
410
+ border-radius: 16px;
411
+ }
412
+ .RootContainer .UserOther .RankImageWrapper {
413
+ height: 23.315px;
414
+ margin-top: -2.5px;
415
+ transform: translateX(-15px);
416
+ }
417
+ }
@@ -0,0 +1,190 @@
1
+ import { h } from "@stencil/core";
2
+ import { RenderJackpotWinner } from "../../renders";
3
+ import { getWinners } from "../../utils/business";
4
+ import { setDefaultStyle } from "../../renders/images";
5
+ export class CasinoJackpotWinner {
6
+ constructor() {
7
+ this.isComponentLoaded = false;
8
+ this.endpoint = undefined;
9
+ this.language = 'en';
10
+ this.clientStyling = '';
11
+ this.clientStylingUrl = '';
12
+ this.translationUrl = '';
13
+ this.currency = 'EUR';
14
+ this.locale = undefined;
15
+ this.users = [];
16
+ this.isLoading = true;
17
+ }
18
+ render() {
19
+ const { isLoading, users, currency, locale } = this;
20
+ return (h(RenderJackpotWinner, { key: '9e70f595e00e43837f307403b93e08c36a9e8071', isLoading, users, currency, locale }));
21
+ }
22
+ async updateUsers() {
23
+ if (!this.endpoint)
24
+ return;
25
+ this.isLoading = true;
26
+ this.users = await getWinners(this.endpoint, this.language, this.currency);
27
+ this.isLoading = false;
28
+ }
29
+ watchForUpdateUsers() {
30
+ if (!this.isComponentLoaded)
31
+ return;
32
+ this.updateUsers();
33
+ }
34
+ /**
35
+ * define for @Style Decorator
36
+ */
37
+ componentDidLoad() {
38
+ setDefaultStyle(this.host.shadowRoot);
39
+ this.isComponentLoaded = true;
40
+ this.updateUsers();
41
+ }
42
+ /**
43
+ * define for @Locale and @Style
44
+ */
45
+ componentShouldUpdate() { }
46
+ /**
47
+ * define for @Locale
48
+ */
49
+ componentWillLoad() { }
50
+ static get is() { return "casino-jackpot-winner"; }
51
+ static get encapsulation() { return "shadow"; }
52
+ static get originalStyleUrls() {
53
+ return {
54
+ "$": ["casino-jackpot-winner.scss"]
55
+ };
56
+ }
57
+ static get styleUrls() {
58
+ return {
59
+ "$": ["casino-jackpot-winner.css"]
60
+ };
61
+ }
62
+ static get properties() {
63
+ return {
64
+ "endpoint": {
65
+ "type": "string",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "string",
69
+ "resolved": "string",
70
+ "references": {}
71
+ },
72
+ "required": false,
73
+ "optional": false,
74
+ "docs": {
75
+ "tags": [],
76
+ "text": "Endpoint URL for the source of data"
77
+ },
78
+ "attribute": "endpoint",
79
+ "reflect": false
80
+ },
81
+ "language": {
82
+ "type": "string",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "string",
86
+ "resolved": "string",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": "Language of the widget"
94
+ },
95
+ "attribute": "language",
96
+ "reflect": false,
97
+ "defaultValue": "'en'"
98
+ },
99
+ "clientStyling": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "Client custom styling via string"
112
+ },
113
+ "attribute": "client-styling",
114
+ "reflect": false,
115
+ "defaultValue": "''"
116
+ },
117
+ "clientStylingUrl": {
118
+ "type": "string",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "string",
122
+ "resolved": "string",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": "Client custom styling via url"
130
+ },
131
+ "attribute": "client-styling-url",
132
+ "reflect": false,
133
+ "defaultValue": "''"
134
+ },
135
+ "translationUrl": {
136
+ "type": "string",
137
+ "mutable": false,
138
+ "complexType": {
139
+ "original": "string",
140
+ "resolved": "string",
141
+ "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": false,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": "translation via url"
148
+ },
149
+ "attribute": "translation-url",
150
+ "reflect": false,
151
+ "defaultValue": "''"
152
+ },
153
+ "currency": {
154
+ "type": "string",
155
+ "mutable": false,
156
+ "complexType": {
157
+ "original": "string",
158
+ "resolved": "string",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": false,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "Currency of the widget"
166
+ },
167
+ "attribute": "currency",
168
+ "reflect": false,
169
+ "defaultValue": "'EUR'"
170
+ }
171
+ };
172
+ }
173
+ static get states() {
174
+ return {
175
+ "locale": {},
176
+ "users": {},
177
+ "isLoading": {}
178
+ };
179
+ }
180
+ static get elementRef() { return "host"; }
181
+ static get watchers() {
182
+ return [{
183
+ "propName": "endpoint",
184
+ "methodName": "watchForUpdateUsers"
185
+ }, {
186
+ "propName": "language",
187
+ "methodName": "watchForUpdateUsers"
188
+ }];
189
+ }
190
+ }
@@ -0,0 +1 @@
1
+ export { CasinoJackpotWinner } from './casino-jackpot-winner';
@@ -0,0 +1,12 @@
1
+ export const apply = (proto, lifecycle, run) => {
2
+ const existLifeCycle = proto[lifecycle];
3
+ if (!existLifeCycle) {
4
+ throw new Error('lifecycle ' + lifecycle + ' not defined');
5
+ }
6
+ proto[lifecycle] = function (...args) {
7
+ run.bind(this, ...args).call();
8
+ if (existLifeCycle) {
9
+ return existLifeCycle.bind(this, ...args).call();
10
+ }
11
+ };
12
+ };
@@ -0,0 +1,40 @@
1
+ import { apply } from "./base.decorator";
2
+ import { translation } from "../utils/translation";
3
+ import { fetcher } from "../utils/fetch";
4
+ const getLocale = (_translations, language) => {
5
+ return _translations[language] || _translations['en'];
6
+ };
7
+ function setLocale() {
8
+ this.locale = getLocale(this.translation, this.language);
9
+ }
10
+ async function setLocaleByUrl(isInit = true) {
11
+ if (this.translationUrl) {
12
+ this.translation = await fetcher(this.translationUrl);
13
+ setLocale.bind(this).call();
14
+ }
15
+ else {
16
+ if (!isInit) {
17
+ this.translation = translation;
18
+ setLocale.bind(this).call();
19
+ }
20
+ }
21
+ }
22
+ export const Locale = () => {
23
+ // @ts-ignore
24
+ return (proto, prop) => {
25
+ apply(proto, 'componentWillLoad', async function () {
26
+ this.translation = translation;
27
+ setLocale.bind(this).call();
28
+ setLocaleByUrl.bind(this, true).call();
29
+ });
30
+ // @ts-ignore
31
+ apply(proto, 'componentShouldUpdate', async function (newValue, oldValue, key) {
32
+ if (key === 'language') {
33
+ setLocale.bind(this).call();
34
+ }
35
+ if (key === 'translationUrl') {
36
+ setLocaleByUrl.bind(this, false).call();
37
+ }
38
+ });
39
+ };
40
+ };