@everymatrix/lottery-oddsbom-bomb 0.0.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.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-68db8b3b.js +1245 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/lottery-oddsbom-bomb-2e7290d5.js +3054 -0
- package/dist/cjs/lottery-oddsbom-bomb.cjs.entry.js +10 -0
- package/dist/cjs/lottery-oddsbom-bomb.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/lottery-oddsbom-bomb/index.js +1 -0
- package/dist/collection/components/lottery-oddsbom-bomb/lottery-oddsbom-bomb.css +289 -0
- package/dist/collection/components/lottery-oddsbom-bomb/lottery-oddsbom-bomb.js +292 -0
- package/dist/collection/components/static/empty-info.svg +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/models/index.js +6 -0
- package/dist/collection/utils/api.js +68 -0
- package/dist/collection/utils/locale.utils.js +66 -0
- package/dist/collection/utils/utils.js +140 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-f361862f.js +1217 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/lottery-oddsbom-bomb-eaeeaf9f.js +3052 -0
- package/dist/esm/lottery-oddsbom-bomb.entry.js +2 -0
- package/dist/esm/lottery-oddsbom-bomb.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-oddsbom-bomb/app-globals-0f993ce5.js +1 -0
- package/dist/lottery-oddsbom-bomb/index-f361862f.js +2 -0
- package/dist/lottery-oddsbom-bomb/index.esm.js +1 -0
- package/dist/lottery-oddsbom-bomb/lottery-oddsbom-bomb-eaeeaf9f.js +1 -0
- package/dist/lottery-oddsbom-bomb/lottery-oddsbom-bomb.entry.js +1 -0
- package/dist/lottery-oddsbom-bomb/lottery-oddsbom-bomb.esm.js +1 -0
- package/dist/static/empty-info.svg +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/packages/stencil/lottery-oddsbom-bomb/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/packages/stencil/lottery-oddsbom-bomb/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/packages/stencil/lottery-oddsbom-bomb/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/packages/stencil/lottery-oddsbom-bomb/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/lottery-oddsbom-bomb/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/lottery-oddsbom-bomb/index.d.ts +1 -0
- package/dist/types/components/lottery-oddsbom-bomb/lottery-oddsbom-bomb.d.ts +54 -0
- package/dist/types/components.d.ts +103 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/index.d.ts +75 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/api.d.ts +30 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +9 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const lotteryOddsbomBomb = require('./lottery-oddsbom-bomb-2e7290d5.js');
|
|
6
|
+
require('./index-68db8b3b.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.lottery_oddsbom_bomb = lotteryOddsbomBomb.LotteryOddsbomBomb;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-68db8b3b.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('lottery-oddsbom-bomb.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["lottery-oddsbom-bomb.cjs",[[1,"lottery-oddsbom-bomb",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"groupId":[513,"group-id"],"activeBomb":[32],"bombList":[32],"gameList":[32],"liveDrawsInfoByGroupId":[32],"isLoading":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LotteryOddsbomBomb } from './lottery-oddsbom-bomb';
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/* --- Component: Bomb Card Grid --- */
|
|
2
|
+
.lottery-oddsbom-bomb-wrapper {
|
|
3
|
+
background: var(--emw--color-background, #fff);
|
|
4
|
+
color: var(--emw--color-typography, #000);
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.bomb-grid-container {
|
|
9
|
+
width: 100%;
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
container-type: inline-size;
|
|
13
|
+
container-name: bomb-grid;
|
|
14
|
+
background: var(--emw--color-background, #fff);
|
|
15
|
+
color: var(--emw--color-typography, #000);
|
|
16
|
+
/* --- Component: Bomb Card --- */
|
|
17
|
+
}
|
|
18
|
+
.bomb-grid-container .bomb-grid {
|
|
19
|
+
display: grid;
|
|
20
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
21
|
+
gap: 0.75rem;
|
|
22
|
+
place-items: center;
|
|
23
|
+
}
|
|
24
|
+
.bomb-grid-container .bomb-card-wrapper {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 30rem;
|
|
27
|
+
height: 100%;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
padding: 1rem;
|
|
31
|
+
border: 1px solid var(--emw--color-gray-100, #e6e6e6);
|
|
32
|
+
}
|
|
33
|
+
.bomb-grid-container .bomb-card {
|
|
34
|
+
height: 100%;
|
|
35
|
+
min-width: 24rem;
|
|
36
|
+
transition: transform 0.3s;
|
|
37
|
+
}
|
|
38
|
+
.bomb-grid-container .bomb-card:hover {
|
|
39
|
+
transform: scale(1.02);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
.bomb-grid-container .card-header {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: 1rem;
|
|
46
|
+
margin-bottom: 0.8rem;
|
|
47
|
+
}
|
|
48
|
+
.bomb-grid-container .card-icon {
|
|
49
|
+
width: 48px;
|
|
50
|
+
height: 48px;
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
}
|
|
56
|
+
.bomb-grid-container .card-icon svg {
|
|
57
|
+
width: 28px;
|
|
58
|
+
height: 28px;
|
|
59
|
+
}
|
|
60
|
+
.bomb-grid-container .card-title {
|
|
61
|
+
flex-grow: 1;
|
|
62
|
+
word-break: break-all;
|
|
63
|
+
}
|
|
64
|
+
.bomb-grid-container .card-title h2 {
|
|
65
|
+
margin: 0;
|
|
66
|
+
font-size: 1.25rem;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
word-wrap: break-word;
|
|
69
|
+
}
|
|
70
|
+
.bomb-grid-container .card-title p {
|
|
71
|
+
margin: 0;
|
|
72
|
+
color: var(--emw--color-typography-secondary, #333);
|
|
73
|
+
font-size: 0.9rem;
|
|
74
|
+
word-wrap: break-word;
|
|
75
|
+
}
|
|
76
|
+
.bomb-grid-container .card-info {
|
|
77
|
+
display: flex;
|
|
78
|
+
gap: 0.75rem;
|
|
79
|
+
margin-bottom: 0.8rem;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
}
|
|
82
|
+
.bomb-grid-container .card-tag {
|
|
83
|
+
background-color: var(--emw--color-tertiary, #e3f2fd);
|
|
84
|
+
padding: 0.3rem 0.75rem;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
font-size: 0.85rem;
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
max-width: 120px;
|
|
89
|
+
}
|
|
90
|
+
.bomb-grid-container .card-matches {
|
|
91
|
+
max-height: 6.8rem;
|
|
92
|
+
overflow-y: auto;
|
|
93
|
+
}
|
|
94
|
+
.bomb-grid-container .card-matches ol {
|
|
95
|
+
margin: 0;
|
|
96
|
+
padding-left: 1.25rem;
|
|
97
|
+
font-size: 0.85rem;
|
|
98
|
+
line-height: 1.6;
|
|
99
|
+
}
|
|
100
|
+
.bomb-grid-container .card-matches li {
|
|
101
|
+
padding-left: 0.2rem;
|
|
102
|
+
word-wrap: break-word;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* --- CONTAINER QUERIES FOR RESPONSIVENESS --- */
|
|
106
|
+
@container bomb-grid (max-width: 768px) {
|
|
107
|
+
.bomb-grid-container .bomb-grid {
|
|
108
|
+
/* On smaller containers, switch to a single column */
|
|
109
|
+
grid-template-columns: 1fr;
|
|
110
|
+
}
|
|
111
|
+
.bomb-card-wrapper .bomb-card {
|
|
112
|
+
min-width: 200px;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/* --- Component: Filter Controls --- */
|
|
116
|
+
.OddsbomEntranceController__section {
|
|
117
|
+
margin: 1.5rem 0;
|
|
118
|
+
display: flex;
|
|
119
|
+
gap: 12px;
|
|
120
|
+
color: var(--emw--color-typography, #000);
|
|
121
|
+
container-type: inline-size;
|
|
122
|
+
container-name: controller;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
}
|
|
125
|
+
.OddsbomEntranceController__label {
|
|
126
|
+
font-weight: 500;
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
width: 6rem;
|
|
129
|
+
line-height: 2.2rem;
|
|
130
|
+
}
|
|
131
|
+
.OddsbomEntranceController__segmented-control {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
gap: 1rem;
|
|
134
|
+
flex-wrap: wrap;
|
|
135
|
+
}
|
|
136
|
+
.OddsbomEntranceController__segment {
|
|
137
|
+
height: 2.2rem;
|
|
138
|
+
border: none;
|
|
139
|
+
padding: 0.3rem 0.8rem;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
font-weight: 500;
|
|
142
|
+
border-radius: 2rem;
|
|
143
|
+
outline: none;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
background-color: var(--emw--color-background, #ffffff);
|
|
146
|
+
color: var(--emw--color-typography, #000);
|
|
147
|
+
}
|
|
148
|
+
.OddsbomEntranceController__segment--active {
|
|
149
|
+
background-color: var(--emw--color-primary-variant, #1367e7);
|
|
150
|
+
color: var(--emw--color-typography-reverse, #fff);
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
}
|
|
153
|
+
.OddsbomEntranceController__segment--disabled:hover {
|
|
154
|
+
cursor: not-allowed !important;
|
|
155
|
+
}
|
|
156
|
+
.OddsbomEntranceController__segment:not(.OddsbomEntranceController__segment--active):hover {
|
|
157
|
+
background-color: var(--emw--color-background-tertiary, #ccc);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.skeleton-content {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
gap: 29px;
|
|
164
|
+
align-items: center;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.skeleton-item {
|
|
168
|
+
background: var(--emw--color-background-secondary, #f5f5f5);
|
|
169
|
+
border-radius: 4px;
|
|
170
|
+
height: 40px;
|
|
171
|
+
width: 200px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.skeleton-animated {
|
|
175
|
+
animation: skeleton-shimmer 1.5s infinite linear;
|
|
176
|
+
background: linear-gradient(90deg, var(--emw--color-background-secondary, #f5f5f5) 25%, var(--emw--color-background-tertiary, #ccc) 37%, var(--emw--color-background-secondary, #f5f5f5) 63%);
|
|
177
|
+
background-size: 200% 100%;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@keyframes skeleton-shimmer {
|
|
181
|
+
to {
|
|
182
|
+
background-position: 100% 0;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
.loading-icon.scale {
|
|
186
|
+
animation: scale 1s infinite ease-in-out;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@keyframes scale {
|
|
190
|
+
0%, 100% {
|
|
191
|
+
transform: scale(1);
|
|
192
|
+
}
|
|
193
|
+
50% {
|
|
194
|
+
transform: scale(1.2);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
@container controller (max-width: 500px) {
|
|
198
|
+
.OddsbomEntranceController__segmented-control {
|
|
199
|
+
gap: 0rem;
|
|
200
|
+
}
|
|
201
|
+
.OddsbomEntranceController__segment {
|
|
202
|
+
padding: 0.2rem 0.6rem;
|
|
203
|
+
}
|
|
204
|
+
.OddsbomEntranceController__label,
|
|
205
|
+
.OddsbomEntranceController____segment {
|
|
206
|
+
line-height: 1.8rem;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
.loading-wrap {
|
|
210
|
+
margin: 20px 0;
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
min-height: 100px;
|
|
215
|
+
}
|
|
216
|
+
.loading-wrap .dots-container {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
justify-content: center;
|
|
220
|
+
height: 100%;
|
|
221
|
+
width: 100%;
|
|
222
|
+
}
|
|
223
|
+
.loading-wrap .dot {
|
|
224
|
+
height: 14px;
|
|
225
|
+
width: 14px;
|
|
226
|
+
margin-right: 14px;
|
|
227
|
+
border-radius: 14px;
|
|
228
|
+
background-color: var(--emw--color-gray-300, #333);
|
|
229
|
+
animation: pulse 1.5s infinite ease-in-out;
|
|
230
|
+
}
|
|
231
|
+
.loading-wrap .dot:last-child {
|
|
232
|
+
margin-right: 0;
|
|
233
|
+
}
|
|
234
|
+
.loading-wrap .dot:nth-child(1) {
|
|
235
|
+
animation-delay: -0.3s;
|
|
236
|
+
}
|
|
237
|
+
.loading-wrap .dot:nth-child(2) {
|
|
238
|
+
animation-delay: -0.1s;
|
|
239
|
+
}
|
|
240
|
+
.loading-wrap .dot:nth-child(3) {
|
|
241
|
+
animation-delay: 0.1s;
|
|
242
|
+
}
|
|
243
|
+
@keyframes pulse {
|
|
244
|
+
0% {
|
|
245
|
+
transform: scale(0.8);
|
|
246
|
+
background-color: var(--emw--color-gray-300, #333);
|
|
247
|
+
}
|
|
248
|
+
50% {
|
|
249
|
+
transform: scale(1.2);
|
|
250
|
+
background-color: var(--emw--color-gray-100, #e6e6e6);
|
|
251
|
+
}
|
|
252
|
+
100% {
|
|
253
|
+
transform: scale(0.8);
|
|
254
|
+
background-color: var(--emw--color-gray-150, #6f6f6f);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.empty-draw-wrap {
|
|
259
|
+
padding-top: 100px;
|
|
260
|
+
}
|
|
261
|
+
.empty-draw-wrap .empty-draw {
|
|
262
|
+
width: 240px;
|
|
263
|
+
height: 160px;
|
|
264
|
+
padding: 18px 12px 12px 12px;
|
|
265
|
+
background: var(--emw--color-secondary-variant, #e3f2fd);
|
|
266
|
+
position: relative;
|
|
267
|
+
margin: 0 auto;
|
|
268
|
+
display: flex;
|
|
269
|
+
justify-content: center;
|
|
270
|
+
align-items: center;
|
|
271
|
+
text-align: center;
|
|
272
|
+
border-radius: 12px;
|
|
273
|
+
}
|
|
274
|
+
.empty-draw-wrap .empty-draw img {
|
|
275
|
+
position: absolute;
|
|
276
|
+
top: -64%;
|
|
277
|
+
left: 50%;
|
|
278
|
+
transform: translateX(-50%);
|
|
279
|
+
width: 200px;
|
|
280
|
+
}
|
|
281
|
+
.empty-draw-wrap .empty-draw-content {
|
|
282
|
+
display: flex;
|
|
283
|
+
gap: 4px;
|
|
284
|
+
}
|
|
285
|
+
.empty-draw-wrap .empty-draw-text {
|
|
286
|
+
font-size: 14px;
|
|
287
|
+
font-weight: bold;
|
|
288
|
+
line-height: 20px;
|
|
289
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { getAssetPath, h } from "@stencil/core";
|
|
2
|
+
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
3
|
+
import { Bomb } from "../../models";
|
|
4
|
+
import { fetchData, getTurnoverForAll } from "../../utils/api";
|
|
5
|
+
import { DEFAULT_ALL_BOMB } from "../../utils/utils";
|
|
6
|
+
import { translate } from "../../utils/locale.utils";
|
|
7
|
+
const BombIcons = {
|
|
8
|
+
[Bomb.Football]: (h("svg", { height: "18px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", class: "text-sm" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.063 19.072l-.81-.97-.117.083.385-2.43.136-.211 2.23-3.464.037-.057h1.075a9.964 9.964 0 01-2.936 7.049zM4.769 5.112l2.8.877-.072 3.246-2.427 2.95-1.561-.153L2.39 9.26a9.977 9.977 0 012.378-4.148zm7.745-3.086l-.72 1.645-3.798 1.404-2.395-.75A9.953 9.953 0 0112 2c.174 0 .343.017.514.026zm7.346 3.812l-1.128 1.29-3.402-.755-.033-.008-2.446-2.241.057.016.862-1.973a9.996 9.996 0 016.09 3.67zm-1.87 8.894l-3.385-.493-1.358-4.067 2.173-2.755 3.144.698 1.347 3.634-1.921 2.983zm-4.64 5.787l4.304-1.486.62.742a9.945 9.945 0 01-5.878 2.205l.954-1.461zm-6.314-2.84l3.91.873-.001.003 1.509 1.507-1.24 1.898a9.946 9.946 0 01-5.908-2.553l1.73-1.728zm1.16-7.72l4.168.725 1.302 3.9-2.552 2.98-3.97-.885-1.412-3.724L8.196 9.96zM2 12c0-.31.019-.615.047-.92l.485 1.203-.454.907A9.934 9.934 0 012 11.999zM12 1C5.934 1 1 5.935 1 12c0 6.067 4.935 11 11 11 6.066 0 11-4.933 11-11 0-6.065-4.934-11-11-11z", fill: "currentColor" })))
|
|
9
|
+
};
|
|
10
|
+
export class LotteryOddsbomBomb {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.mbSource = undefined;
|
|
13
|
+
this.clientStyling = undefined;
|
|
14
|
+
this.clientStylingUrl = undefined;
|
|
15
|
+
this.translationUrl = '';
|
|
16
|
+
this.language = 'en';
|
|
17
|
+
this.endpoint = undefined;
|
|
18
|
+
this.groupId = undefined;
|
|
19
|
+
this.activeBomb = 'All';
|
|
20
|
+
this.bombList = [];
|
|
21
|
+
this.gameList = [];
|
|
22
|
+
this.liveDrawsInfoByGroupId = {};
|
|
23
|
+
this.isLoading = false;
|
|
24
|
+
}
|
|
25
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
26
|
+
if (newValue != oldValue) {
|
|
27
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
31
|
+
if (newValue != oldValue) {
|
|
32
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
36
|
+
if (newValue != oldValue) {
|
|
37
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
componentDidLoad() {
|
|
41
|
+
if (this.stylingContainer) {
|
|
42
|
+
if (this.mbSource)
|
|
43
|
+
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
44
|
+
if (this.clientStyling)
|
|
45
|
+
setClientStyling(this.stylingContainer, this.clientStyling);
|
|
46
|
+
if (this.clientStylingUrl)
|
|
47
|
+
setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
52
|
+
}
|
|
53
|
+
connectedCallback() {
|
|
54
|
+
this.doFetchData();
|
|
55
|
+
}
|
|
56
|
+
async doFetchData(params = {}) {
|
|
57
|
+
try {
|
|
58
|
+
this.isLoading = true;
|
|
59
|
+
this.liveDrawsInfoByGroupId = await fetchData({
|
|
60
|
+
endpoint: this.endpoint,
|
|
61
|
+
groupId: this.groupId,
|
|
62
|
+
params
|
|
63
|
+
});
|
|
64
|
+
this.gameList = this.liveDrawsInfoByGroupId.liveDraws;
|
|
65
|
+
this.bombList = [DEFAULT_ALL_BOMB, ...this.liveDrawsInfoByGroupId.sportTags];
|
|
66
|
+
this.isLoading = false;
|
|
67
|
+
this.updateTurnoverForAll();
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
this.isLoading = false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async updateTurnoverForAll() {
|
|
74
|
+
const turnovers = getTurnoverForAll({
|
|
75
|
+
endpoint: this.endpoint,
|
|
76
|
+
configs: this.gameList.map((item) => ({ gameId: item.gameId, drawId: item.drawId }))
|
|
77
|
+
});
|
|
78
|
+
for (let i = 0; i < this.gameList.length; i++) {
|
|
79
|
+
this.gameList[i].turnover = (await turnovers)[i].turnover;
|
|
80
|
+
}
|
|
81
|
+
this.gameList = [...this.gameList];
|
|
82
|
+
}
|
|
83
|
+
handleBombChange(code) {
|
|
84
|
+
this.activeBomb = code;
|
|
85
|
+
if (code === DEFAULT_ALL_BOMB.code) {
|
|
86
|
+
this.doFetchData();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.doFetchData({ sportTag: code });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
renderLoading() {
|
|
93
|
+
return (h("div", { class: "loading-wrap" }, h("section", { class: "dots-container" }, h("div", { class: "dot" }), h("div", { class: "dot" }), h("div", { class: "dot" }), h("div", { class: "dot" }), h("div", { class: "dot" }))));
|
|
94
|
+
}
|
|
95
|
+
renderEmpty() {
|
|
96
|
+
const infoImagePath = getAssetPath('../static/empty-info.svg');
|
|
97
|
+
return (h("div", { class: "empty-draw-wrap" }, h("div", { class: "empty-draw" }, h("img", { src: infoImagePath, class: "empty-draw-logo" }), h("div", { class: "empty-draw-content" }, h("div", { class: "empty-draw-text" }, "\u24D8 Sorry. The game is not available now.")))));
|
|
98
|
+
}
|
|
99
|
+
renderFilter() {
|
|
100
|
+
return (h("div", { class: "OddsbomEntranceController__section" }, h("span", { class: "OddsbomEntranceController__label" }, "Select Bomb:"), !!this.bombList.length ? (h("div", { class: "OddsbomEntranceController__segmented-control" }, this.bombList.map(({ name, code }) => (h("button", { class: {
|
|
101
|
+
OddsbomEntranceController__segment: true,
|
|
102
|
+
'OddsbomEntranceController__segment--active': this.activeBomb === code
|
|
103
|
+
}, onClick: this.handleBombChange.bind(this, code) }, name))))) : (h("div", { class: "skeleton-content" }, h("div", { class: "skeleton-item skeleton-animated" })))));
|
|
104
|
+
}
|
|
105
|
+
renderMain() {
|
|
106
|
+
if (!this.gameList.length)
|
|
107
|
+
return this.renderEmpty();
|
|
108
|
+
return (h("div", { class: "bomb-grid" }, this.gameList.map(({ title, subTitle, icon, date, turnover, matchList, drawId, gameId }) => (h("div", { class: "bomb-card-wrapper" }, h("div", { class: "bomb-card", onClick: () => {
|
|
109
|
+
this.handleBombItemClick.emit({ drawId, gameId });
|
|
110
|
+
} }, h("div", { class: "card-header" }, BombIcons[icon] && h("div", { class: "card-icon football" }, BombIcons[icon]), h("div", { class: "card-title" }, h("h2", null, title), h("p", null, subTitle)), h("div", { class: "card-jackpot" })), h("div", { class: "card-info" }, h("span", { class: "card-tag" }, date), h("span", { class: "card-tag" }, translate('turnover', this.language) + turnover)), h("div", { class: "card-matches" }, h("ol", null, matchList.map((item) => (h("li", null, item)))))))))));
|
|
111
|
+
}
|
|
112
|
+
render() {
|
|
113
|
+
return (h("div", { key: 'ae8252d8cb1374af9bb8189bcd9edac313c7bc6a', ref: (el) => (this.stylingContainer = el), class: "lottery-oddsbom-bomb-wrapper" }, this.renderFilter(), h("div", { key: '3f673f335248057370e7e57076cc387a86dc4099', class: "bomb-grid-container" }, this.isLoading ? this.renderLoading() : this.renderMain())));
|
|
114
|
+
}
|
|
115
|
+
static get is() { return "lottery-oddsbom-bomb"; }
|
|
116
|
+
static get encapsulation() { return "shadow"; }
|
|
117
|
+
static get originalStyleUrls() {
|
|
118
|
+
return {
|
|
119
|
+
"$": ["lottery-oddsbom-bomb.scss"]
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
static get styleUrls() {
|
|
123
|
+
return {
|
|
124
|
+
"$": ["lottery-oddsbom-bomb.css"]
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
static get assetsDirs() { return ["../static"]; }
|
|
128
|
+
static get properties() {
|
|
129
|
+
return {
|
|
130
|
+
"mbSource": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"complexType": {
|
|
134
|
+
"original": "string",
|
|
135
|
+
"resolved": "string",
|
|
136
|
+
"references": {}
|
|
137
|
+
},
|
|
138
|
+
"required": false,
|
|
139
|
+
"optional": false,
|
|
140
|
+
"docs": {
|
|
141
|
+
"tags": [],
|
|
142
|
+
"text": "Client custom styling via message bus"
|
|
143
|
+
},
|
|
144
|
+
"attribute": "mb-source",
|
|
145
|
+
"reflect": true
|
|
146
|
+
},
|
|
147
|
+
"clientStyling": {
|
|
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": "Client custom styling via string"
|
|
160
|
+
},
|
|
161
|
+
"attribute": "client-styling",
|
|
162
|
+
"reflect": true
|
|
163
|
+
},
|
|
164
|
+
"clientStylingUrl": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "string",
|
|
169
|
+
"resolved": "string",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": false,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": "Client custom styling via css file url"
|
|
177
|
+
},
|
|
178
|
+
"attribute": "client-styling-url",
|
|
179
|
+
"reflect": true
|
|
180
|
+
},
|
|
181
|
+
"translationUrl": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "string",
|
|
186
|
+
"resolved": "string",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": "Client custom translation via json file url"
|
|
194
|
+
},
|
|
195
|
+
"attribute": "translation-url",
|
|
196
|
+
"reflect": true,
|
|
197
|
+
"defaultValue": "''"
|
|
198
|
+
},
|
|
199
|
+
"language": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "string",
|
|
204
|
+
"resolved": "string",
|
|
205
|
+
"references": {}
|
|
206
|
+
},
|
|
207
|
+
"required": false,
|
|
208
|
+
"optional": false,
|
|
209
|
+
"docs": {
|
|
210
|
+
"tags": [],
|
|
211
|
+
"text": "Client custom language for translation"
|
|
212
|
+
},
|
|
213
|
+
"attribute": "language",
|
|
214
|
+
"reflect": true,
|
|
215
|
+
"defaultValue": "'en'"
|
|
216
|
+
},
|
|
217
|
+
"endpoint": {
|
|
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": "endpoint",
|
|
232
|
+
"reflect": true
|
|
233
|
+
},
|
|
234
|
+
"groupId": {
|
|
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": "GameID of the lottery game"
|
|
247
|
+
},
|
|
248
|
+
"attribute": "group-id",
|
|
249
|
+
"reflect": true
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
static get states() {
|
|
254
|
+
return {
|
|
255
|
+
"activeBomb": {},
|
|
256
|
+
"bombList": {},
|
|
257
|
+
"gameList": {},
|
|
258
|
+
"liveDrawsInfoByGroupId": {},
|
|
259
|
+
"isLoading": {}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
static get events() {
|
|
263
|
+
return [{
|
|
264
|
+
"method": "handleBombItemClick",
|
|
265
|
+
"name": "handleBombItemClick",
|
|
266
|
+
"bubbles": true,
|
|
267
|
+
"cancelable": true,
|
|
268
|
+
"composed": true,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": ""
|
|
272
|
+
},
|
|
273
|
+
"complexType": {
|
|
274
|
+
"original": "{ drawId: string; gameId: string }",
|
|
275
|
+
"resolved": "{ drawId: string; gameId: string; }",
|
|
276
|
+
"references": {}
|
|
277
|
+
}
|
|
278
|
+
}];
|
|
279
|
+
}
|
|
280
|
+
static get watchers() {
|
|
281
|
+
return [{
|
|
282
|
+
"propName": "clientStyling",
|
|
283
|
+
"methodName": "handleClientStylingChange"
|
|
284
|
+
}, {
|
|
285
|
+
"propName": "clientStylingUrl",
|
|
286
|
+
"methodName": "handleClientStylingUrlChange"
|
|
287
|
+
}, {
|
|
288
|
+
"propName": "mbSource",
|
|
289
|
+
"methodName": "handleMbSourceChange"
|
|
290
|
+
}];
|
|
291
|
+
}
|
|
292
|
+
}
|