@everymatrix/lottery-tipping-ticket-controller 1.85.15 → 1.85.17
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/general-tooltip_7.cjs.entry.js +1136 -0
- package/dist/cjs/index-3e1fe885.js +2 -2
- package/dist/cjs/index.cjs.js +1 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{general-tooltip_6.cjs.entry.js → lottery-tipping-ticket-controller-1e79780d.js} +7366 -5190
- package/dist/cjs/lottery-tipping-ticket-controller.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.js +41 -9
- package/dist/collection/utils/locale.utils.js +2 -1
- package/dist/collection/utils/utils.js +1 -0
- package/dist/esm/general-tooltip_7.entry.js +1127 -0
- package/dist/esm/index-e3ec645c.js +2 -2
- package/dist/esm/index.js +1 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{general-tooltip_6.entry.js → lottery-tipping-ticket-controller-e914932b.js} +7220 -5047
- package/dist/esm/lottery-tipping-ticket-controller.js +1 -1
- package/dist/lottery-tipping-ticket-controller/general-tooltip_7.entry.js +1 -0
- package/dist/lottery-tipping-ticket-controller/index.esm.js +1 -1
- package/dist/lottery-tipping-ticket-controller/{general-tooltip_6.entry.js → lottery-tipping-ticket-controller-e914932b.js} +242 -242
- package/dist/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.esm.js +1 -1
- package/dist/types/components/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller.d.ts +8 -3
- package/dist/types/models/index.d.ts +5 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/lottery-tipping-ticket-controller-b89883ee.js +0 -3141
- package/dist/esm/lottery-tipping-ticket-controller-12ffe9b9.js +0 -3130
- package/dist/lottery-tipping-ticket-controller/lottery-tipping-ticket-controller-12ffe9b9.js +0 -1
|
@@ -0,0 +1,1136 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3e1fe885.js');
|
|
6
|
+
const lotteryTippingTicketController = require('./lottery-tipping-ticket-controller-1e79780d.js');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @name startOfDay
|
|
10
|
+
* @category Day Helpers
|
|
11
|
+
* @summary Return the start of a day for the given date.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Return the start of a day for the given date.
|
|
15
|
+
* The result will be in the local timezone.
|
|
16
|
+
*
|
|
17
|
+
* @param {Date|Number} date - the original date
|
|
18
|
+
* @returns {Date} the start of a day
|
|
19
|
+
* @throws {TypeError} 1 argument required
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // The start of a day for 2 September 2014 11:55:00:
|
|
23
|
+
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
24
|
+
* //=> Tue Sep 02 2014 00:00:00
|
|
25
|
+
*/
|
|
26
|
+
function startOfDay(dirtyDate) {
|
|
27
|
+
lotteryTippingTicketController.requiredArgs(1, arguments);
|
|
28
|
+
var date = lotteryTippingTicketController.toDate(dirtyDate);
|
|
29
|
+
date.setHours(0, 0, 0, 0);
|
|
30
|
+
return date;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @name isSameDay
|
|
35
|
+
* @category Day Helpers
|
|
36
|
+
* @summary Are the given dates in the same day (and year and month)?
|
|
37
|
+
*
|
|
38
|
+
* @description
|
|
39
|
+
* Are the given dates in the same day (and year and month)?
|
|
40
|
+
*
|
|
41
|
+
* @param {Date|Number} dateLeft - the first date to check
|
|
42
|
+
* @param {Date|Number} dateRight - the second date to check
|
|
43
|
+
* @returns {Boolean} the dates are in the same day (and year and month)
|
|
44
|
+
* @throws {TypeError} 2 arguments required
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
|
|
48
|
+
* const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
|
|
49
|
+
* //=> true
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Are 4 September and 4 October in the same day?
|
|
53
|
+
* const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))
|
|
54
|
+
* //=> false
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* // Are 4 September, 2014 and 4 September, 2015 in the same day?
|
|
58
|
+
* const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))
|
|
59
|
+
* //=> false
|
|
60
|
+
*/
|
|
61
|
+
function isSameDay(dirtyDateLeft, dirtyDateRight) {
|
|
62
|
+
lotteryTippingTicketController.requiredArgs(2, arguments);
|
|
63
|
+
var dateLeftStartOfDay = startOfDay(dirtyDateLeft);
|
|
64
|
+
var dateRightStartOfDay = startOfDay(dirtyDateRight);
|
|
65
|
+
return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @name isToday
|
|
70
|
+
* @category Day Helpers
|
|
71
|
+
* @summary Is the given date today?
|
|
72
|
+
* @pure false
|
|
73
|
+
*
|
|
74
|
+
* @description
|
|
75
|
+
* Is the given date today?
|
|
76
|
+
*
|
|
77
|
+
* > ⚠️ Please note that this function is not present in the FP submodule as
|
|
78
|
+
* > it uses `Date.now()` internally hence impure and can't be safely curried.
|
|
79
|
+
*
|
|
80
|
+
* @param {Date|Number} date - the date to check
|
|
81
|
+
* @returns {Boolean} the date is today
|
|
82
|
+
* @throws {TypeError} 1 argument required
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* // If today is 6 October 2014, is 6 October 14:00:00 today?
|
|
86
|
+
* const result = isToday(new Date(2014, 9, 6, 14, 0))
|
|
87
|
+
* //=> true
|
|
88
|
+
*/
|
|
89
|
+
function isToday(dirtyDate) {
|
|
90
|
+
lotteryTippingTicketController.requiredArgs(1, arguments);
|
|
91
|
+
return isSameDay(dirtyDate, Date.now());
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const generalTooltipCss = ".general-tooltip-wrapper{display:inline-block;position:relative;line-height:0}.general-tooltip-container{display:contents;}.general-tooltip-popup{position:absolute;color:var(--emw--color-typography-inverse, #fff);background:var(--emw--color-background-inverse, #000);padding:8px 12px;border-radius:4px;font-size:0.875em;line-height:1.4;z-index:1000;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;white-space:nowrap;pointer-events:none;}.general-tooltip-popup.visible{opacity:1;visibility:visible}.general-tooltip-arrow{position:absolute;width:0;height:0;border-style:solid}.general-tooltip-top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:8px;}.general-tooltip-top .general-tooltip-arrow{top:100%;left:50%;transform:translateX(-50%);border-width:6px 6px 0 6px;border-color:var(--emw--color-gray-300, #333) transparent transparent transparent}.general-tooltip-bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:8px;}.general-tooltip-bottom .general-tooltip-arrow{bottom:100%;left:50%;transform:translateX(-50%);border-width:0 6px 6px 6px;border-color:transparent transparent var(--emw--color-gray-300, #333) transparent}.general-tooltip-left{right:100%;top:50%;transform:translateY(-50%);margin-right:8px;}.general-tooltip-left .general-tooltip-arrow{left:100%;top:50%;transform:translateY(-50%);border-width:6px 0 6px 6px;border-color:transparent transparent transparent var(--emw--color-gray-300, #333)}.general-tooltip-right{left:100%;top:50%;transform:translateY(-50%);margin-left:8px;}.general-tooltip-right .general-tooltip-arrow{right:100%;top:50%;transform:translateY(-50%);border-width:6px 6px 6px 0;border-color:transparent var(--emw--color-gray-300, #333) transparent transparent}";
|
|
95
|
+
const GeneralTooltipStyle0 = generalTooltipCss;
|
|
96
|
+
|
|
97
|
+
const GeneralTooltip = class {
|
|
98
|
+
constructor(hostRef) {
|
|
99
|
+
index.registerInstance(this, hostRef);
|
|
100
|
+
this.mbSource = undefined;
|
|
101
|
+
this.clientStyling = undefined;
|
|
102
|
+
this.clientStylingUrl = undefined;
|
|
103
|
+
this.position = 'top';
|
|
104
|
+
this.delay = 200;
|
|
105
|
+
this.isVisible = false;
|
|
106
|
+
this._tooltipId = undefined;
|
|
107
|
+
}
|
|
108
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
109
|
+
if (newValue != oldValue) {
|
|
110
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
114
|
+
if (newValue != oldValue) {
|
|
115
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
119
|
+
if (newValue != oldValue) {
|
|
120
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
componentWillLoad() {
|
|
124
|
+
this._tooltipId = `general-tooltip-${Math.random().toString(36).substring(2, 9)}`;
|
|
125
|
+
}
|
|
126
|
+
componentDidLoad() {
|
|
127
|
+
if (this.stylingContainer) {
|
|
128
|
+
if (this.mbSource)
|
|
129
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
130
|
+
if (this.clientStyling)
|
|
131
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
132
|
+
if (this.clientStylingUrl)
|
|
133
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
handleMouseEnterOrFocus() {
|
|
137
|
+
clearTimeout(this.hideTimeout); // Clear any pending hide
|
|
138
|
+
if (this.showTimeout)
|
|
139
|
+
clearTimeout(this.showTimeout);
|
|
140
|
+
this.showTimeout = setTimeout(() => {
|
|
141
|
+
this.isVisible = true;
|
|
142
|
+
}, this.delay);
|
|
143
|
+
}
|
|
144
|
+
handleMouseLeaveOrBlur() {
|
|
145
|
+
if (this.showTimeout)
|
|
146
|
+
clearTimeout(this.showTimeout);
|
|
147
|
+
this.hideTimeout = setTimeout(() => {
|
|
148
|
+
this.isVisible = false;
|
|
149
|
+
}, 100);
|
|
150
|
+
}
|
|
151
|
+
handleKeyDown(event) {
|
|
152
|
+
if (event.key === 'Escape' && this.isVisible) {
|
|
153
|
+
this.isVisible = false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
disconnectedCallback() {
|
|
157
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
158
|
+
clearTimeout(this.showTimeout);
|
|
159
|
+
clearTimeout(this.hideTimeout);
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
const tooltipClasses = {
|
|
163
|
+
'general-tooltip-popup': true,
|
|
164
|
+
visible: this.isVisible,
|
|
165
|
+
[`general-tooltip-${this.position}`]: true
|
|
166
|
+
};
|
|
167
|
+
return (index.h("div", { key: 'c0d52518e1e196e0d022789f7c6b7e64173b2c7d', class: "general-tooltip-wrapper" }, index.h("slot", { key: 'a935e103e16b0b619a024706e8224f4a937de6b9', name: "trigger" }), index.h("div", { key: '35c60e35ce3f8d5c2c42cd333fe64a3b289d34d4', class: "general-tooltip-container", role: "tooltip", ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '9d3fd9f142c1e3bd263dee289a2c1a9e4eebfddc', id: this._tooltipId, class: tooltipClasses, role: "tooltip" }, index.h("slot", { key: '31344f0d4d4139f913d1819cc4f42a39f5113d8a', name: "content" }), index.h("div", { key: 'f5cdd93060baec37b2a2879056efe2d66c5a553a', class: "general-tooltip-arrow" })))));
|
|
168
|
+
}
|
|
169
|
+
get hostElement() { return index.getElement(this); }
|
|
170
|
+
static get watchers() { return {
|
|
171
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
172
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
173
|
+
"mbSource": ["handleMbSourceChange"]
|
|
174
|
+
}; }
|
|
175
|
+
};
|
|
176
|
+
GeneralTooltip.style = GeneralTooltipStyle0;
|
|
177
|
+
|
|
178
|
+
const DEFAULT_LANGUAGE$2 = 'en';
|
|
179
|
+
const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr', 'zh'];
|
|
180
|
+
const TRANSLATIONS$2 = {
|
|
181
|
+
en: {
|
|
182
|
+
loading: 'Loading'
|
|
183
|
+
},
|
|
184
|
+
ro: {},
|
|
185
|
+
fr: {},
|
|
186
|
+
ar: {},
|
|
187
|
+
hr: {}
|
|
188
|
+
};
|
|
189
|
+
const translate$2 = (key, customLang, replacements) => {
|
|
190
|
+
const lang = customLang;
|
|
191
|
+
let translation = TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
192
|
+
if (replacements) {
|
|
193
|
+
Object.keys(replacements).forEach((placeholder) => {
|
|
194
|
+
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
return translation;
|
|
198
|
+
};
|
|
199
|
+
const getTranslations$1 = (data) => {
|
|
200
|
+
Object.keys(data).forEach((item) => {
|
|
201
|
+
for (let key in data[item]) {
|
|
202
|
+
TRANSLATIONS$2[item][key] = data[item][key];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
const resolveTranslationUrl = async (translationUrl) => {
|
|
207
|
+
if (translationUrl) {
|
|
208
|
+
try {
|
|
209
|
+
const response = await fetch(translationUrl);
|
|
210
|
+
if (!response.ok) {
|
|
211
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
212
|
+
}
|
|
213
|
+
const translations = await response.json();
|
|
214
|
+
getTranslations$1(translations);
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
console.error('Failed to fetch or parse translations from URL:', error);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const lotteryButtonCss = ":host{display:inline-block;font-family:\"PingFang SC\", \"Microsoft YaHei\", \"Helvetica Neue\", Helvetica, Arial, sans-serif}.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;font-weight:500;cursor:pointer;outline:none;overflow:hidden;transition:background-color 0.2s, border-color 0.2s, color 0.2s;user-select:none;-webkit-tap-highlight-color:transparent}.btn .content{position:relative}.btn:disabled{cursor:not-allowed;opacity:0.5}.btn .loading-container{display:flex;align-items:center}.btn--loading{position:relative}.btn .spinner{display:inline-block;width:1em;height:1em;border:2px solid rgba(255, 255, 255, 0.3);border-radius:50%;border-top-color:white;animation:spin 1s ease-in-out infinite;margin-left:0.5em;vertical-align:middle}.btn--small .spinner{width:0.8em;height:0.8em}.btn--large .spinner{width:1.2em;height:1.2em}@keyframes spin{to{transform:rotate(360deg)}}.btn--primary{background-color:var(--emw--color-primary, #0d196e);color:var(--emw--color-typography-inverse, #fff)}.btn--primary:hover:not(:disabled){background-color:var(--emw--color-primary-variant, #1367e7)}.btn--primary:active:not(:disabled){background-color:#08104a}.btn--outline .spinner,.btn--dashed .spinner,.btn--text .spinner{border-top-color:currentColor;border-color:rgba(0, 0, 0, 0.2)}.btn--outline{background-color:var(--emw--color-background, #fff);border-color:#dcdcdc;color:var(--emw--color-typography, #000)}.btn--outline:hover:not(:disabled){background-color:var(--emw--color-background-tertiary, #ccc);border-color:#a6a6a6}.btn--outline:active:not(:disabled){background-color:#e6e6e6}.btn--dashed{background-color:transparent;border-style:dashed;border-color:#dcdcdc;color:#333}.btn--dashed:hover:not(:disabled){border-color:#a6a6a6;color:#0052d9}.btn--text{background-color:transparent;color:#0052d9;border-color:transparent}.btn--text:hover:not(:disabled){background-color:#f2f2f2}.btn--text:active:not(:disabled){background-color:#e6e6e6}.btn--small{height:28px;font-size:12px;padding:0 12px}.btn--medium{height:34px;font-size:14px;padding:0 18px}.btn--large{height:40px;font-size:16px;padding:0 24px}.ripple-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;pointer-events:none;border-radius:inherit}.ripple{position:absolute;border-radius:50%;background-color:rgba(255, 255, 255, 0.3);transform:scale(0);animation:ripple-animation 600ms linear}.btn--outline .ripple,.btn--dashed .ripple,.btn--text .ripple{background-color:rgba(0, 0, 0, 0.1)}@keyframes ripple-animation{to{transform:scale(4);opacity:0}}";
|
|
223
|
+
const LotteryButtonStyle0 = lotteryButtonCss;
|
|
224
|
+
|
|
225
|
+
const LotteryButton = class {
|
|
226
|
+
constructor(hostRef) {
|
|
227
|
+
index.registerInstance(this, hostRef);
|
|
228
|
+
this.handleClick = (event) => {
|
|
229
|
+
if (this.disabled) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
// Get the button element from the shadow root
|
|
233
|
+
const button = this.host.shadowRoot.querySelector('.btn');
|
|
234
|
+
if (!button)
|
|
235
|
+
return;
|
|
236
|
+
const rect = button.getBoundingClientRect();
|
|
237
|
+
const size = Math.max(rect.width, rect.height);
|
|
238
|
+
const top = event.clientY - rect.top - size / 2;
|
|
239
|
+
const left = event.clientX - rect.left - size / 2;
|
|
240
|
+
// Add the new ripple to the state, triggering a re-render
|
|
241
|
+
const newRipple = { top, left, size };
|
|
242
|
+
this.ripples = [...this.ripples, newRipple];
|
|
243
|
+
// Set a timeout to clean up the ripple from the state after the animation ends
|
|
244
|
+
// This prevents the DOM from filling up with old ripple elements
|
|
245
|
+
setTimeout(() => {
|
|
246
|
+
this.ripples = this.ripples.filter((r) => r !== newRipple);
|
|
247
|
+
}, 600); // This duration should match the CSS animation duration
|
|
248
|
+
};
|
|
249
|
+
this.variant = 'primary';
|
|
250
|
+
this.size = 'medium';
|
|
251
|
+
this.disabled = false;
|
|
252
|
+
this.loading = false;
|
|
253
|
+
this.text = undefined;
|
|
254
|
+
this.mbSource = undefined;
|
|
255
|
+
this.language = 'en';
|
|
256
|
+
this.clientStyling = undefined;
|
|
257
|
+
this.clientStylingUrl = undefined;
|
|
258
|
+
this.translationUrl = '';
|
|
259
|
+
this.ripples = [];
|
|
260
|
+
}
|
|
261
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
262
|
+
if (newValue != oldValue) {
|
|
263
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
267
|
+
if (newValue != oldValue) {
|
|
268
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
272
|
+
if (newValue != oldValue) {
|
|
273
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
disconnectedCallback() {
|
|
277
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
278
|
+
}
|
|
279
|
+
componentDidLoad() {
|
|
280
|
+
if (this.stylingContainer) {
|
|
281
|
+
if (this.mbSource)
|
|
282
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
283
|
+
if (this.clientStyling)
|
|
284
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
285
|
+
if (this.clientStylingUrl)
|
|
286
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
componentWillLoad() {
|
|
290
|
+
if (this.translationUrl) {
|
|
291
|
+
resolveTranslationUrl(this.translationUrl);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
render() {
|
|
295
|
+
const { variant, disabled, size } = this;
|
|
296
|
+
const isDisabled = disabled || this.loading;
|
|
297
|
+
return (index.h("button", { key: '19094b8ffd0d13c7e3cdc7139d559214803f0e73', class: {
|
|
298
|
+
btn: true,
|
|
299
|
+
[`btn--${variant}`]: true,
|
|
300
|
+
[`btn--${size}`]: true,
|
|
301
|
+
'btn--loading': this.loading
|
|
302
|
+
}, disabled: isDisabled, onClick: this.handleClick }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("span", { class: "content" }, this.text || translate$2('loading', this.language)), index.h("span", { class: "spinner" }))) : (index.h("span", { class: "content" }, this.text)), index.h("div", { key: 'e7e7542f0b79c5bf8e41969e23dd77d9fdec4462', class: "ripple-container" }, this.ripples.map((ripple, index$1) => (index.h("span", { key: index$1, class: "ripple", style: {
|
|
303
|
+
top: `${ripple.top}px`,
|
|
304
|
+
left: `${ripple.left}px`,
|
|
305
|
+
width: `${ripple.size}px`,
|
|
306
|
+
height: `${ripple.size}px`
|
|
307
|
+
} }))))));
|
|
308
|
+
}
|
|
309
|
+
get host() { return index.getElement(this); }
|
|
310
|
+
static get watchers() { return {
|
|
311
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
312
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
313
|
+
"mbSource": ["handleMbSourceChange"]
|
|
314
|
+
}; }
|
|
315
|
+
};
|
|
316
|
+
LotteryButton.style = LotteryButtonStyle0;
|
|
317
|
+
|
|
318
|
+
const lotteryTippingBulletCss = ".LotteryTippingBullet__segment{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;font-size:16px;line-height:1;font-weight:500;color:var(--emw--color-typography, #000);background:var(--emw--color-background, #fff);border:1px solid var(--emw--color-gray-100, #e6e6e6);border-radius:6px;cursor:pointer;transition:all 0.2s ease;user-select:none}.LotteryTippingBullet__segment:not(.LotteryTippingBullet__segment--disabled):hover{cursor:pointer;animation:jelly 0.3s ease-in-out;transform:scale(1.02)}.LotteryTippingBullet__segment--text{border:none;color:var(--emw--color-typography, #000);background:transparent;font-weight:400}.LotteryTippingBullet__segment--text:hover{cursor:not-allowed !important}.LotteryTippingBullet__segment--active{font-weight:600;background-color:var(--emw--color-background-inverse, #000);color:var(--emw--color-primary, #fed275)}.LotteryTippingBullet__segment--disabled:not(.LotteryTippingBullet__segment--active){background-color:var(--emw--color-background-tertiary, #ccc);color:var(--emw--color-gray-150, #6f6f6f);border-color:var(--emw--color-gray-100, #e6e6e6)}.LotteryTippingBullet__segment--disabled:hover{cursor:not-allowed}@keyframes jelly{0%{transform:translate(0, 0)}20%{transform:translate(-0.5px, -0.5px)}40%{transform:translate(0.5px, 0.5px)}60%{transform:translate(-0.25px, -0.25px)}80%{transform:translate(0.25px, 0.25px)}100%{transform:translate(0, 0)}}";
|
|
319
|
+
const LotteryTippingBulletStyle0 = lotteryTippingBulletCss;
|
|
320
|
+
|
|
321
|
+
const LotteryTippingBullet = class {
|
|
322
|
+
constructor(hostRef) {
|
|
323
|
+
index.registerInstance(this, hostRef);
|
|
324
|
+
this.lotteryTippingBulletToggleEvent = index.createEvent(this, "lotteryTippingBulletToggle", 7);
|
|
325
|
+
this.mbSource = undefined;
|
|
326
|
+
this.clientStyling = undefined;
|
|
327
|
+
this.clientStylingUrl = undefined;
|
|
328
|
+
this.positionIdx = undefined;
|
|
329
|
+
this.theme = 'default';
|
|
330
|
+
this.value = '';
|
|
331
|
+
this.disabled = false;
|
|
332
|
+
this.isSelected = false;
|
|
333
|
+
}
|
|
334
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
335
|
+
if (newValue != oldValue) {
|
|
336
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
340
|
+
if (newValue != oldValue) {
|
|
341
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
345
|
+
if (newValue != oldValue) {
|
|
346
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
componentDidLoad() {
|
|
350
|
+
if (this.stylingContainer) {
|
|
351
|
+
if (this.mbSource)
|
|
352
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
353
|
+
if (this.clientStyling)
|
|
354
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
355
|
+
if (this.clientStylingUrl)
|
|
356
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
handleClick() {
|
|
360
|
+
if (!this.disabled) {
|
|
361
|
+
this.lotteryTippingBulletToggleEvent.emit({ positionIdx: this.positionIdx });
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
disconnectedCallback() {
|
|
365
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
366
|
+
}
|
|
367
|
+
render() {
|
|
368
|
+
return (index.h("div", { key: 'ef0fee38ed62adb7809b5a60668af6a499ebe5a6', ref: (el) => (this.stylingContainer = el) }, this.theme === 'text' ? (index.h("div", { class: {
|
|
369
|
+
LotteryTippingBullet__segment: true,
|
|
370
|
+
'LotteryTippingBullet__segment--text': true
|
|
371
|
+
} }, this.value)) : (index.h("button", { class: {
|
|
372
|
+
LotteryTippingBullet__segment: true,
|
|
373
|
+
'LotteryTippingBullet__segment--disabled': this.disabled,
|
|
374
|
+
'LotteryTippingBullet__segment--active': this.isSelected
|
|
375
|
+
}, onClick: this.handleClick.bind(this) }, this.isSelected ? 'X' : this.value))));
|
|
376
|
+
}
|
|
377
|
+
static get watchers() { return {
|
|
378
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
379
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
380
|
+
"mbSource": ["handleMbSourceChange"]
|
|
381
|
+
}; }
|
|
382
|
+
};
|
|
383
|
+
LotteryTippingBullet.style = LotteryTippingBulletStyle0;
|
|
384
|
+
|
|
385
|
+
const lotteryTippingBulletGroupCss = "";
|
|
386
|
+
const LotteryTippingBulletGroupStyle0 = lotteryTippingBulletGroupCss;
|
|
387
|
+
|
|
388
|
+
const LotteryTippingBulletGroup = class {
|
|
389
|
+
constructor(hostRef) {
|
|
390
|
+
index.registerInstance(this, hostRef);
|
|
391
|
+
this.lotteryTippingBulletGroupToggleEvent = index.createEvent(this, "lotteryTippingBulletGroupToggle", 7);
|
|
392
|
+
this.mbSource = undefined;
|
|
393
|
+
this.clientStyling = undefined;
|
|
394
|
+
this.clientStylingUrl = undefined;
|
|
395
|
+
this.positionIdx = undefined;
|
|
396
|
+
this.theme = 'default';
|
|
397
|
+
this.mode = 'single';
|
|
398
|
+
this.bulletConfigContent = '';
|
|
399
|
+
}
|
|
400
|
+
get bulletConfigArr() {
|
|
401
|
+
const defaultConfig = [
|
|
402
|
+
{
|
|
403
|
+
value: '1'
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
value: 'X'
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
value: '2'
|
|
410
|
+
}
|
|
411
|
+
];
|
|
412
|
+
if (typeof this.bulletConfigContent === 'string' && this.bulletConfigContent) {
|
|
413
|
+
try {
|
|
414
|
+
const _temp = JSON.parse(this.bulletConfigContent);
|
|
415
|
+
return _temp;
|
|
416
|
+
}
|
|
417
|
+
catch (e) {
|
|
418
|
+
console.error('Error parsing bulletConfigContent:', e);
|
|
419
|
+
return defaultConfig;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
return defaultConfig;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
427
|
+
if (newValue != oldValue) {
|
|
428
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
432
|
+
if (newValue != oldValue) {
|
|
433
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
437
|
+
if (newValue != oldValue) {
|
|
438
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
componentDidLoad() {
|
|
442
|
+
if (this.stylingContainer) {
|
|
443
|
+
if (this.mbSource)
|
|
444
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
445
|
+
if (this.clientStyling)
|
|
446
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
447
|
+
if (this.clientStylingUrl)
|
|
448
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
disconnectedCallback() {
|
|
452
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
453
|
+
}
|
|
454
|
+
lotteryTippingBulletSelectionHandler(event) {
|
|
455
|
+
const { positionIdx } = event.detail;
|
|
456
|
+
this.handleToggle(positionIdx);
|
|
457
|
+
}
|
|
458
|
+
handleToggle(index) {
|
|
459
|
+
let newConfigArr = [...this.bulletConfigArr];
|
|
460
|
+
if (this.mode === 'single') {
|
|
461
|
+
// single mode: only one button can be selected
|
|
462
|
+
newConfigArr = newConfigArr.map((item) => (Object.assign(Object.assign({}, item), { isSelected: false })));
|
|
463
|
+
newConfigArr[index].isSelected = true;
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
// multi mode: multiple buttons can be selected
|
|
467
|
+
newConfigArr = newConfigArr.map((item) => (Object.assign({}, item)));
|
|
468
|
+
newConfigArr[index].isSelected = !newConfigArr[index].isSelected;
|
|
469
|
+
}
|
|
470
|
+
this.lotteryTippingBulletGroupToggleEvent.emit({
|
|
471
|
+
bulletConfigArr: newConfigArr,
|
|
472
|
+
positionIdx: this.positionIdx + '-' + index
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
render() {
|
|
476
|
+
var _a;
|
|
477
|
+
return (index.h("div", { ref: (el) => (this.stylingContainer = el), key: this.positionIdx }, index.h("div", { key: '68223022eed831932c571378164be913206d98e9', style: { display: 'flex', flexDirection: 'row', gap: '10px' } }, (_a = this.bulletConfigArr) === null || _a === void 0 ? void 0 : _a.map((item, index$1) => (index.h("div", { key: index$1 }, index.h("lottery-tipping-bullet", { value: item.value, isSelected: item.isSelected, "position-idx": index$1, disabled: item.disabled, theme: this.theme, clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, mbSource: this.mbSource })))))));
|
|
478
|
+
}
|
|
479
|
+
static get watchers() { return {
|
|
480
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
481
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
482
|
+
"mbSource": ["handleMbSourceChange"]
|
|
483
|
+
}; }
|
|
484
|
+
};
|
|
485
|
+
LotteryTippingBulletGroup.style = LotteryTippingBulletGroupStyle0;
|
|
486
|
+
|
|
487
|
+
const DEFAULT_LANGUAGE$1 = 'en';
|
|
488
|
+
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
489
|
+
const TRANSLATIONS$1 = {
|
|
490
|
+
en: {
|
|
491
|
+
stop: 'Stop',
|
|
492
|
+
at: 'at',
|
|
493
|
+
turnover: 'Turnover: '
|
|
494
|
+
},
|
|
495
|
+
ro: {
|
|
496
|
+
stop: 'Oprește',
|
|
497
|
+
at: 'la'
|
|
498
|
+
},
|
|
499
|
+
fr: {
|
|
500
|
+
stop: 'Arrêtez',
|
|
501
|
+
at: 'à'
|
|
502
|
+
},
|
|
503
|
+
ar: {
|
|
504
|
+
stop: 'توقف',
|
|
505
|
+
at: 'في'
|
|
506
|
+
},
|
|
507
|
+
hr: {
|
|
508
|
+
stop: 'Stop',
|
|
509
|
+
at: 'u'
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
const translate$1 = (key, customLang) => {
|
|
513
|
+
const lang = customLang;
|
|
514
|
+
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
const lotteryTippingTicketBannerCss = ".lottery-tipping-ticket-banner__container {\n font-family: system-ui, sans-serif;\n font-size: 14px;\n container-type: inline-size;\n}\n\n.banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n padding: 0 1rem;\n background: var(--emw--color-primary, #fed275);\n border-top: 2px solid var(--emw--color-primary, #fed275);\n border-bottom: 2px solid var(--emw--color-primary, #fed275);\n gap: 0.5rem;\n white-space: nowrap;\n position: relative;\n height: 46px;\n}\n\n.left {\n flex: 1;\n gap: 0.4rem;\n}\n.left .logo {\n width: 216px;\n position: absolute;\n top: -7px;\n}\n\n.brand {\n font-weight: 700;\n color: var(--emw--color-typography, #000);\n}\n\n.mid {\n flex: 1;\n font-size: 1.5rem;\n font-weight: 800;\n font-style: italic;\n letter-spacing: 0.04em;\n color: var(--emw--color-typography, #000);\n text-align: center;\n}\n\n.right {\n flex: 1;\n display: flex;\n gap: 0.4rem;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n\n@container (max-width: 420px) {\n .mid {\n text-align: right;\n }\n .right {\n justify-content: center;\n }\n}\n.pill {\n padding: 0.25rem 0.7rem;\n font-size: 0.9rem;\n color: var(--emw--color-gray-400, #000);\n display: inline-flex;\n align-items: baseline;\n}\n\n.pill > strong {\n font-weight: 700;\n}";
|
|
518
|
+
const LotteryTippingTicketBannerStyle0 = lotteryTippingTicketBannerCss;
|
|
519
|
+
|
|
520
|
+
const LotteryTippingTicketBanner = class {
|
|
521
|
+
constructor(hostRef) {
|
|
522
|
+
index.registerInstance(this, hostRef);
|
|
523
|
+
this.mbSource = undefined;
|
|
524
|
+
this.clientStyling = undefined;
|
|
525
|
+
this.clientStylingUrl = undefined;
|
|
526
|
+
this.language = 'en';
|
|
527
|
+
this.translationUrl = '';
|
|
528
|
+
this.logoUrl = undefined;
|
|
529
|
+
this.stopTime = '';
|
|
530
|
+
this.period = undefined;
|
|
531
|
+
this.formattedTurnover = undefined;
|
|
532
|
+
}
|
|
533
|
+
get formattedStopTime() {
|
|
534
|
+
let _temp = '';
|
|
535
|
+
if (!this.stopTime) {
|
|
536
|
+
return _temp;
|
|
537
|
+
}
|
|
538
|
+
_temp = lotteryTippingTicketController.formatDate({ date: this.stopTime, format: 'dd/MM/yyyy HH:mm' });
|
|
539
|
+
if (isToday(new Date(this.stopTime))) {
|
|
540
|
+
_temp = lotteryTippingTicketController.formatDate({ date: this.stopTime, format: 'HH:mm' });
|
|
541
|
+
}
|
|
542
|
+
return _temp;
|
|
543
|
+
}
|
|
544
|
+
get formattedPeriod() {
|
|
545
|
+
let _temp = '';
|
|
546
|
+
_temp = lotteryTippingTicketController.formatDate({ date: this.period, format: 'EEEE' });
|
|
547
|
+
if (_temp.toLowerCase() === 'wednesday') {
|
|
548
|
+
_temp = 'MIDWEEK';
|
|
549
|
+
}
|
|
550
|
+
return _temp.toUpperCase();
|
|
551
|
+
}
|
|
552
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
553
|
+
if (newValue != oldValue) {
|
|
554
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
558
|
+
if (newValue != oldValue) {
|
|
559
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
563
|
+
if (newValue != oldValue) {
|
|
564
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
async componentWillLoad() {
|
|
568
|
+
if (this.translationUrl) {
|
|
569
|
+
lotteryTippingTicketController.resolveTranslationUrl(this.translationUrl);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
componentDidLoad() {
|
|
573
|
+
if (this.stylingContainer) {
|
|
574
|
+
if (this.mbSource)
|
|
575
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
576
|
+
if (this.clientStyling)
|
|
577
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
578
|
+
if (this.clientStylingUrl)
|
|
579
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
disconnectedCallback() {
|
|
583
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
584
|
+
}
|
|
585
|
+
render() {
|
|
586
|
+
return (index.h("div", { key: 'e9286d0a6a9433698703b9c04d6d50892a7b3168', ref: (el) => (this.stylingContainer = el), class: "lottery-tipping-ticket-banner__container" }, index.h("section", { key: 'd787e64156f76cf6d12bd552513971301534860c', class: "banner" }, index.h("div", { key: '027baf0c88733d1430801c96b5b338f79f92f22c', class: "left" }, this.logoUrl && index.h("img", { key: '7b41d5635a2121ccf394aca19de48e10e9a93357', alt: "Betting", src: this.logoUrl, class: "logo" })), index.h("div", { key: '73e6c3ffa336b020a3819a72b71117b8084381b1', class: "mid period" }, this.formattedPeriod), index.h("div", { key: '922ae894814157f68aa8f0774c8aa5ca06e1e7cd', class: "right" }, index.h("span", { key: 'efaf79b1ff5617f2ba92cfef464232041cd87fbf', class: "pill" }, index.h("strong", { key: 'c842562b15a13407038933da9d1cc7c6fafa0b76' }, translate$1('stop', this.language)), "\u00A0", translate$1('at', this.language), "\u00A0", this.formattedStopTime), index.h("span", { key: '3e79a5ec17cbcf0896d58196286fa0b637988f69', class: "pill" }, index.h("strong", { key: '1158b00abffb1c6bf04e9eec10b4c996d04f118e' }, translate$1('turnover', this.language)), "\u00A0", this.formattedTurnover)))));
|
|
587
|
+
}
|
|
588
|
+
static get assetsDirs() { return ["../static"]; }
|
|
589
|
+
static get watchers() { return {
|
|
590
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
591
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
592
|
+
"mbSource": ["handleMbSourceChange"]
|
|
593
|
+
}; }
|
|
594
|
+
};
|
|
595
|
+
LotteryTippingTicketBanner.style = LotteryTippingTicketBannerStyle0;
|
|
596
|
+
|
|
597
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
598
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
599
|
+
const TRANSLATIONS = {
|
|
600
|
+
en: {
|
|
601
|
+
homeTeam: 'Home team:',
|
|
602
|
+
awayTeam: 'Away team:',
|
|
603
|
+
selectionCleared: 'Your selection has been cleared.',
|
|
604
|
+
selectionOnLineCleared: 'Your selection on this line will be cleared.',
|
|
605
|
+
loading: 'Loading...',
|
|
606
|
+
error: 'Error!',
|
|
607
|
+
noData: 'No data available.',
|
|
608
|
+
lineInfo: 'Line {currentPage} of {totalPages}',
|
|
609
|
+
clearAll: 'Clear All',
|
|
610
|
+
cancel: 'Cancel',
|
|
611
|
+
confirm: 'Confirm'
|
|
612
|
+
},
|
|
613
|
+
ro: {
|
|
614
|
+
homeTeam: 'Echipa gazdă:',
|
|
615
|
+
awayTeam: 'Echipa oaspete:',
|
|
616
|
+
selectionCleared: 'Selecția dvs. a fost ștearsă.',
|
|
617
|
+
selectionOnLineCleared: 'Selecția dvs. de pe această linie va fi ștearsă.',
|
|
618
|
+
loading: `Se încarcă...',n error: 'Eroare!`,
|
|
619
|
+
noData: 'Nu sunt date disponibile.',
|
|
620
|
+
lineInfo: 'Linia {currentPage} din {totalPages}',
|
|
621
|
+
clearAll: 'Șterge tot',
|
|
622
|
+
cancel: 'Anulează',
|
|
623
|
+
confirm: 'Confirmă'
|
|
624
|
+
},
|
|
625
|
+
fr: {
|
|
626
|
+
homeTeam: 'Équipe à domicile:',
|
|
627
|
+
awayTeam: `Équipe à l'extérieur:`,
|
|
628
|
+
selectionCleared: 'Votre sélection a été effacée.',
|
|
629
|
+
selectionOnLineCleared: 'Votre sélection sur cette ligne sera effacée.',
|
|
630
|
+
loading: `Chargement...',n error: 'Erreur!`,
|
|
631
|
+
noData: 'Aucune donnée disponible.',
|
|
632
|
+
lineInfo: 'Ligne {currentPage} sur {totalPages}',
|
|
633
|
+
clearAll: 'Tout effacer',
|
|
634
|
+
cancel: 'Annuler',
|
|
635
|
+
confirm: 'Confirmer'
|
|
636
|
+
},
|
|
637
|
+
ar: {
|
|
638
|
+
homeTeam: 'الفريق المضيف:',
|
|
639
|
+
awayTeam: 'الفريق الضيف:',
|
|
640
|
+
selectionCleared: 'تم مسح اختيارك.',
|
|
641
|
+
selectionOnLineCleared: 'سيتم مسح اختيارك في هذا السطر.',
|
|
642
|
+
loading: `جار التحميل...',n error: 'خطأ!`,
|
|
643
|
+
noData: 'لا توجد بيانات متاحة.',
|
|
644
|
+
lineInfo: 'السطر {currentPage} من {totalPages}',
|
|
645
|
+
clearAll: 'مسح الكل',
|
|
646
|
+
cancel: 'إلغاء',
|
|
647
|
+
confirm: 'تأكيد'
|
|
648
|
+
},
|
|
649
|
+
hr: {
|
|
650
|
+
homeTeam: 'Domaći tim:',
|
|
651
|
+
awayTeam: 'Gostujući tim:',
|
|
652
|
+
selectionCleared: 'Vaš odabir je obrisan.',
|
|
653
|
+
selectionOnLineCleared: 'Vaš odabir na ovoj liniji bit će obrisan.',
|
|
654
|
+
loading: `Učitavanje...',n error: 'Greška!`,
|
|
655
|
+
noData: 'Nema dostupnih podataka.',
|
|
656
|
+
lineInfo: 'Linija {currentPage} od {totalPages}',
|
|
657
|
+
clearAll: 'Očisti sve',
|
|
658
|
+
cancel: 'Odustani',
|
|
659
|
+
confirm: 'Potvrdi'
|
|
660
|
+
}
|
|
661
|
+
};
|
|
662
|
+
const translate = (key, customLang, replacements) => {
|
|
663
|
+
const lang = customLang;
|
|
664
|
+
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
665
|
+
if (replacements) {
|
|
666
|
+
Object.keys(replacements).forEach((placeholder) => {
|
|
667
|
+
translation = translation.replace(`{${placeholder}}`, replacements[placeholder]);
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
return translation;
|
|
671
|
+
};
|
|
672
|
+
const getTranslations = (data) => {
|
|
673
|
+
Object.keys(data).forEach((item) => {
|
|
674
|
+
for (let key in data[item]) {
|
|
675
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
const formatDate = ({ date, type = 'date', format }) => {
|
|
681
|
+
try {
|
|
682
|
+
const parsedDate = lotteryTippingTicketController.parseISO(date);
|
|
683
|
+
if (isNaN(parsedDate.getTime())) {
|
|
684
|
+
throw new Error(`Invalid date: ${date}`);
|
|
685
|
+
}
|
|
686
|
+
if (format)
|
|
687
|
+
return lotteryTippingTicketController.format(parsedDate, format);
|
|
688
|
+
let formatStr = 'dd/MM/yyyy';
|
|
689
|
+
if (type === 'time') {
|
|
690
|
+
formatStr = 'dd/MM/yyyy HH:mm:ss';
|
|
691
|
+
}
|
|
692
|
+
else if (type === 'week') {
|
|
693
|
+
formatStr = 'ccc dd/MM/yyyy HH:mm:ss';
|
|
694
|
+
}
|
|
695
|
+
return lotteryTippingTicketController.format(parsedDate, formatStr);
|
|
696
|
+
}
|
|
697
|
+
catch (error) {
|
|
698
|
+
console.error('Error formatting date:', error.message);
|
|
699
|
+
return '';
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
const fetcher = (url) => fetch(url).then((r) => r.json());
|
|
703
|
+
const DEFAULT_BULLET_CONFIG = [
|
|
704
|
+
{
|
|
705
|
+
value: '1'
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
value: 'X'
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
value: '2'
|
|
712
|
+
}
|
|
713
|
+
];
|
|
714
|
+
const SPLIT_TOKEN = '-';
|
|
715
|
+
const showNotification = ({ message, theme = 'success' }) => {
|
|
716
|
+
window.postMessage({
|
|
717
|
+
type: 'ShowNotificationToast',
|
|
718
|
+
message,
|
|
719
|
+
theme
|
|
720
|
+
});
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
// This icon file is generated automatically.
|
|
724
|
+
var DeleteOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
|
|
725
|
+
const DeleteOutlined$1 = DeleteOutlined;
|
|
726
|
+
|
|
727
|
+
// This icon file is generated automatically.
|
|
728
|
+
var InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" };
|
|
729
|
+
const InfoCircleOutlined$1 = InfoCircleOutlined;
|
|
730
|
+
|
|
731
|
+
// This icon file is generated automatically.
|
|
732
|
+
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
|
|
733
|
+
const LeftOutlined$1 = LeftOutlined;
|
|
734
|
+
|
|
735
|
+
// This icon file is generated automatically.
|
|
736
|
+
var PlusSquareOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" } }, { "tag": "path", "attrs": { "d": "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z" } }] }, "name": "plus-square", "theme": "outlined" };
|
|
737
|
+
const PlusSquareOutlined$1 = PlusSquareOutlined;
|
|
738
|
+
|
|
739
|
+
// This icon file is generated automatically.
|
|
740
|
+
var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
|
|
741
|
+
const RightOutlined$1 = RightOutlined;
|
|
742
|
+
|
|
743
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
744
|
+
__assign = Object.assign || function(t) {
|
|
745
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
746
|
+
s = arguments[i];
|
|
747
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
748
|
+
t[p] = s[p];
|
|
749
|
+
}
|
|
750
|
+
return t;
|
|
751
|
+
};
|
|
752
|
+
return __assign.apply(this, arguments);
|
|
753
|
+
};
|
|
754
|
+
var defaultColors = {
|
|
755
|
+
primaryColor: '#333',
|
|
756
|
+
secondaryColor: '#E6E6E6'
|
|
757
|
+
};
|
|
758
|
+
function renderIconDefinitionToSVGElement(icond, options) {
|
|
759
|
+
if (options === void 0) { options = {}; }
|
|
760
|
+
if (typeof icond.icon === 'function') {
|
|
761
|
+
// two-tone
|
|
762
|
+
var placeholders = options.placeholders || defaultColors;
|
|
763
|
+
return renderAbstractNodeToSVGElement(icond.icon(placeholders.primaryColor, placeholders.secondaryColor), options);
|
|
764
|
+
}
|
|
765
|
+
// fill, outline
|
|
766
|
+
return renderAbstractNodeToSVGElement(icond.icon, options);
|
|
767
|
+
}
|
|
768
|
+
function renderAbstractNodeToSVGElement(node, options) {
|
|
769
|
+
var targetAttrs = node.tag === 'svg'
|
|
770
|
+
? __assign(__assign({}, node.attrs), (options.extraSVGAttrs || {})) : node.attrs;
|
|
771
|
+
var attrs = Object.keys(targetAttrs).reduce(function (acc, nextKey) {
|
|
772
|
+
var key = nextKey;
|
|
773
|
+
var value = targetAttrs[key];
|
|
774
|
+
var token = "".concat(key, "=\"").concat(value, "\"");
|
|
775
|
+
acc.push(token);
|
|
776
|
+
return acc;
|
|
777
|
+
}, []);
|
|
778
|
+
var attrsToken = attrs.length ? ' ' + attrs.join(' ') : '';
|
|
779
|
+
var children = (node.children || [])
|
|
780
|
+
.map(function (child) { return renderAbstractNodeToSVGElement(child, options); })
|
|
781
|
+
.join('');
|
|
782
|
+
if (children && children.length) {
|
|
783
|
+
return "<".concat(node.tag).concat(attrsToken, ">").concat(children, "</").concat(node.tag, ">");
|
|
784
|
+
}
|
|
785
|
+
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
const lotteryTippingTicketBetCss = ".LotteryTippingTicketBet__container {\n display: block; /* Or inline-block, depending on desired layout flow */\n font-size: 14px;\n line-height: 1.5715;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n overflow: hidden;\n min-width: 300px;\n container-type: inline-size;\n}\n@container (max-width: 375px) {\n .LotteryTippingTicketBet__container {\n font-size: 12px;\n }\n}\n\n.table-wrapper {\n overflow-x: auto; /* Handle horizontal scroll if content overflows */\n}\n\n.my-table-component {\n width: 100%;\n border-collapse: collapse; /* Important for borders */\n text-align: left;\n border-radius: 0.1rem; /* Ant Design like subtle rounding */\n border-spacing: 0;\n}\n\n/* Header */\n.my-table-component th {\n background: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n font-weight: 500;\n padding: 0.4rem 0.5rem;\n transition: background 0.3s ease;\n}\n\n/* Cells */\n.my-table-component td {\n padding: 0.4rem 0.5rem;\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n transition: background 0.3s;\n}\n@container (max-width: 400px) {\n .my-table-component td {\n padding: 0.3rem 0.3rem;\n }\n}\n\n.my-table-component.bordered th,\n.my-table-component.bordered td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Bordered style */\n.my-table-component.grid th,\n.my-table-component.grid td {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid th {\n border-bottom-width: 1px; /* Ensure bottom border is consistent */\n}\n\n.my-table-component.grid {\n border: 1px solid var(--emw--color-gray-100, #e6e6e6); /* Outer border */\n border-right-width: 0;\n border-bottom-width: 0;\n}\n\n.my-table-component.grid th:last-child,\n.my-table-component.grid td:last-child {\n border-right: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n.my-table-component.grid tr:last-child td {\n border-bottom: 1px solid var(--emw--color-gray-100, #e6e6e6);\n}\n\n/* Striped style */\n.my-table-component.striped tbody tr:nth-child(even) td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n/* Hover (optional, but nice) */\n.my-table-component tbody tr:hover td {\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.flex {\n display: flex;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.gap-1 {\n gap: 4px;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.align-center {\n align-items: center;\n}\n\n.gap-1 {\n gap: 0.5rem;\n}\n\n.btn {\n color: var(--emw--color-typography, #000);\n background: var(--emw--color-background, #fff);\n font-size: 14px;\n transition: all 0.2s ease;\n}\n.btn:hover {\n cursor: pointer;\n}\n\n.btn:hover {\n background-color: var(--emw--color-gray-100, #e6e6e6);\n}\n\n.btn.disabled {\n opacity: 0.5;\n pointer-events: none;\n}\n.btn.disabled:hover {\n cursor: not-allowed !important;\n}\n\n.LotteryTippingTicketBet__tableToolbar {\n width: 100%;\n margin-bottom: 1rem;\n}\n\n.LotteryTippingTicketBet__tableToolbar--item {\n background-color: transparent;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n display: inline-flex;\n border-radius: 1.6rem;\n border: 1px solid var(--emw--color-gray-100, #e6e6e6);\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n padding-right: 1rem;\n margin-right: 2rem;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketBet__tableToolbar--item.mr-0 {\n margin-right: 0rem !important;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup {\n flex-basis: 2rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-radius: 8px;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n color: var(--emw--color-typography, #000);\n border-radius: 8px;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item .icon {\n width: 20px;\n height: 20px;\n transition: filter 0.2s ease-in-out;\n filter: grayscale(0.3);\n}\n\n.LotteryTippingTicketBet__lineOperatorGroup--item:hover .icon {\n filter: grayscale(0);\n transform: rotate(3deg);\n}\n\ndiv.border-line {\n margin-top: 1rem;\n height: 1px;\n width: 100%;\n box-sizing: border-box;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n transition: all 0.3s ease;\n}\n\n.LotteryTippingTicketBet__footer {\n padding: 0.5rem;\n}\n\n.my-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n font-size: 0.8rem;\n color: var(--emw--color-typography-secondary, #333);\n}\n\n.my-pagination span {\n font-weight: 500;\n user-select: none;\n}\n\n.my-pagination .btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 50%;\n transition: all 0.3s ease;\n cursor: pointer;\n opacity: 0.9;\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n.my-pagination .btn .icon {\n width: 20px;\n height: 20px;\n transition: transform 0.2s ease;\n}\n\n.my-pagination .btn:hover {\n transform: scale(1.1);\n box-shadow: 0 6px 14px var(--emw-calender-curday-box-shadow, rgba(0, 0, 0, 0.09));\n}\n\n.my-pagination .btn.disabled {\n background-color: var(--emw--color-background-tertiary, #ccc);\n cursor: not-allowed;\n opacity: 0.5;\n transform: scale(1);\n}\n\n.match-info-item {\n display: flex;\n}\n\n.match-info-item-label {\n margin-right: 6px;\n}\n\n.info-icon:hover {\n cursor: pointer;\n}\n\n.LotteryTippingTicketBet__empty p {\n text-align: center;\n}\n\n.no-wrap {\n white-space: nowrap;\n overflow: hidden;\n}\n\n.eventNameContainer__item--title {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 300px;\n}\n@container (max-width: 600px) {\n .eventNameContainer__item--title {\n max-width: 180px;\n }\n}\n@container (max-width: 500px) {\n .eventNameContainer__item--title {\n max-width: 150px;\n }\n}\n@container (max-width: 400px) {\n .eventNameContainer__item--title {\n max-width: 100px;\n }\n}\n@container (max-width: 330px) {\n .eventNameContainer__item--title {\n max-width: 70px;\n }\n}\n\n.LotteryTippingTicketBet__main {\n perspective: 800px;\n will-change: transform, opacity;\n backface-visibility: hidden;\n}\n\n@container (max-width: 520px) {\n .LotteryTippingTicketBet__main {\n flex-wrap: wrap;\n justify-content: center;\n }\n .LotteryTippingTicketBet__tableToolbar--item {\n margin-right: 0 !important;\n }\n}\n/* Fade-In Keyframes */\n@keyframes fadeInLeft {\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n/* Fade-Out Keyframes */\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes fadeInRight {\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes fadeInUp {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@-webkit-keyframes slide-left {\n 0% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n}\n@keyframes slide-left {\n 0% {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@-webkit-keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n }\n 100% {\n -webkit-transform: translateX(0px);\n transform: translateX(0px);\n }\n}\n@keyframes slide-right {\n 0% {\n -webkit-transform: translateX(-100px);\n transform: translateX(-100px);\n }\n 100% {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@-webkit-keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n@keyframes slide-top {\n 0% {\n -webkit-transform: translateY(-100px);\n transform: translateY(-100px);\n }\n 100% {\n -webkit-transform: translateY(0px);\n transform: translateY(0px);\n }\n}\n/* Apply to your card classes */\n.card-in-left {\n -webkit-animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-left {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-right {\n -webkit-animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-right {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.card-in-up {\n -webkit-animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n animation: slide-top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.card-out-down {\n animation: fadeOut 0.2s ease-out both;\n}\n\n.loading-wrap {\n margin: 20px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40vh;\n}\n.loading-wrap .dots-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.loading-wrap .dot {\n height: 14px;\n width: 14px;\n margin-right: 14px;\n border-radius: 14px;\n background-color: var(--emw--color-gray-300, #333);\n animation: pulse 1.5s infinite ease-in-out;\n}\n.loading-wrap .dot:last-child {\n margin-right: 0;\n}\n.loading-wrap .dot:nth-child(1) {\n animation-delay: -0.3s;\n}\n.loading-wrap .dot:nth-child(2) {\n animation-delay: -0.1s;\n}\n.loading-wrap .dot:nth-child(3) {\n animation-delay: 0.1s;\n}\n@keyframes pulse {\n 0% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-300, #333);\n }\n 50% {\n transform: scale(1.2);\n background-color: var(--emw--color-gray-100, #e6e6e6);\n }\n 100% {\n transform: scale(0.8);\n background-color: var(--emw--color-gray-150, #6f6f6f);\n }\n}";
|
|
789
|
+
const LotteryTippingTicketBetStyle0 = lotteryTippingTicketBetCss;
|
|
790
|
+
|
|
791
|
+
const addImagePath = renderIconDefinitionToSVGElement(PlusSquareOutlined$1, {
|
|
792
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: 'currentColor' }
|
|
793
|
+
});
|
|
794
|
+
const deleteImagePath = renderIconDefinitionToSVGElement(DeleteOutlined$1, {
|
|
795
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: 'currentColor' }
|
|
796
|
+
});
|
|
797
|
+
const infoImagePath = renderIconDefinitionToSVGElement(InfoCircleOutlined$1, {
|
|
798
|
+
extraSVGAttrs: { width: '16px', height: '16px', fill: 'currentColor' }
|
|
799
|
+
});
|
|
800
|
+
const leftImagePath = renderIconDefinitionToSVGElement(LeftOutlined$1, {
|
|
801
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: 'currentColor' }
|
|
802
|
+
});
|
|
803
|
+
const rightImagePath = renderIconDefinitionToSVGElement(RightOutlined$1, {
|
|
804
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: 'currentColor' }
|
|
805
|
+
});
|
|
806
|
+
const LotteryTippingTicketBet = class {
|
|
807
|
+
constructor(hostRef) {
|
|
808
|
+
index.registerInstance(this, hostRef);
|
|
809
|
+
this.lotteryTippingBulletBetEvent = index.createEvent(this, "lotteryTippingBulletBetSelect", 7);
|
|
810
|
+
this.lotteryTippingCurrentPageChangeEvent = index.createEvent(this, "lotteryTippingCurrentPageChange", 7);
|
|
811
|
+
this.eventNameRender = (item, value) => (index.h("div", { class: "flex gap-1 eventNameContainer__item" }, index.h("span", { class: "eventNameContainer__item--title" }, value), index.h("general-tooltip", null, index.h("span", { slot: "trigger", class: "icon info-icon", innerHTML: infoImagePath, style: { width: '18px' } }), index.h("div", { slot: "content" }, index.h("div", { class: "match-info" }, index.h("div", { class: "match-info-item" }, index.h("div", { class: "match-info-item-label" }, translate('homeTeam', this.language)), index.h("div", { class: "match-info-item-value" }, item.homeName)), index.h("div", { class: "match-info-item" }, index.h("div", { class: "match-info-item-label" }, translate('awayTeam', this.language)), index.h("div", { class: "match-info-item-value" }, item.awayName)))))));
|
|
812
|
+
this.columns = [
|
|
813
|
+
{ title: '', value: 'index', width: 3 },
|
|
814
|
+
{
|
|
815
|
+
title: '',
|
|
816
|
+
value: 'eventName',
|
|
817
|
+
width: 70,
|
|
818
|
+
render: this.eventNameRender
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
title: '',
|
|
822
|
+
value: 'startTime',
|
|
823
|
+
width: 22,
|
|
824
|
+
align: 'right',
|
|
825
|
+
nowrap: true,
|
|
826
|
+
render: (_, value) => formatDate({ date: value, format: 'ccc HH:mm' })
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
title: () => (index.h("lottery-tipping-bullet-group", { theme: "text", bulletConfigContent: JSON.stringify(DEFAULT_BULLET_CONFIG) })),
|
|
830
|
+
value: 'results',
|
|
831
|
+
width: 5,
|
|
832
|
+
render: (_, __, curRow) => {
|
|
833
|
+
var _a, _b;
|
|
834
|
+
return (index.h("lottery-tipping-bullet-group", { mode: this.mode, bulletConfigContent: JSON.stringify((_b = (_a = this.bulletConfigLineGroup) === null || _a === void 0 ? void 0 : _a[this.currentPage - 1]) === null || _b === void 0 ? void 0 : _b[curRow]), "position-idx": `${this.currentPage - 1}${SPLIT_TOKEN}${curRow}` }));
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
];
|
|
838
|
+
this.mbSource = undefined;
|
|
839
|
+
this.clientStyling = undefined;
|
|
840
|
+
this.clientStylingUrl = undefined;
|
|
841
|
+
this.translationUrl = '';
|
|
842
|
+
this.language = 'en';
|
|
843
|
+
this.translationData = undefined;
|
|
844
|
+
this.clientStylingUrlContent = '';
|
|
845
|
+
this.sessionId = undefined;
|
|
846
|
+
this.endpoint = '';
|
|
847
|
+
this.gameId = undefined;
|
|
848
|
+
this.drawId = undefined;
|
|
849
|
+
this.totalPages = undefined;
|
|
850
|
+
this.minTotalPages = 0;
|
|
851
|
+
this.maxTotalPages = 0;
|
|
852
|
+
this.mode = 'multi';
|
|
853
|
+
this.readPretty = false;
|
|
854
|
+
this.defaultBulletConfigLineGroup = undefined;
|
|
855
|
+
this.bulletConfigLineGroup = [[[]]];
|
|
856
|
+
this.currentPage = 1;
|
|
857
|
+
this.isLoading = true;
|
|
858
|
+
this.hasErrors = false;
|
|
859
|
+
this.dialogConfig = { visible: false };
|
|
860
|
+
this.ticketDataSource = [];
|
|
861
|
+
}
|
|
862
|
+
handleNewTranslations() {
|
|
863
|
+
this.isLoading = true;
|
|
864
|
+
getTranslations(JSON.parse(this.translationUrl));
|
|
865
|
+
this.isLoading = false;
|
|
866
|
+
}
|
|
867
|
+
handleClientStylingChange(newValue, oldValue) {
|
|
868
|
+
if (newValue != oldValue) {
|
|
869
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
handleClientStylingUrlChange(newValue, oldValue) {
|
|
873
|
+
if (newValue != oldValue) {
|
|
874
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
handleMbSourceChange(newValue, oldValue) {
|
|
878
|
+
if (newValue != oldValue) {
|
|
879
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
disconnectedCallback() {
|
|
883
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
884
|
+
}
|
|
885
|
+
componentWillLoad() {
|
|
886
|
+
if (this.translationUrl) {
|
|
887
|
+
getTranslations(JSON.parse(this.translationUrl));
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
componentDidLoad() {
|
|
891
|
+
console.log(111, this.stylingContainer);
|
|
892
|
+
if (this.stylingContainer) {
|
|
893
|
+
if (this.mbSource)
|
|
894
|
+
lotteryTippingTicketController.setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
|
|
895
|
+
if (this.clientStyling)
|
|
896
|
+
lotteryTippingTicketController.setClientStyling(this.stylingContainer, this.clientStyling);
|
|
897
|
+
if (this.clientStylingUrl)
|
|
898
|
+
lotteryTippingTicketController.setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
get parsedDefaultBulletConfigLineGroup() {
|
|
902
|
+
if (typeof this.defaultBulletConfigLineGroup === 'string' && this.defaultBulletConfigLineGroup) {
|
|
903
|
+
try {
|
|
904
|
+
const _temp = JSON.parse(this.defaultBulletConfigLineGroup);
|
|
905
|
+
return this.readPrettyHandler(_temp);
|
|
906
|
+
}
|
|
907
|
+
catch (e) {
|
|
908
|
+
console.error('Error parsing defaultBulletConfigLineGroup:', e);
|
|
909
|
+
return undefined;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
else {
|
|
913
|
+
return undefined;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
readPrettyHandler(rawDefaultBulletConfigLineGroup) {
|
|
917
|
+
if (this.readPretty) {
|
|
918
|
+
this.currentPage = 1;
|
|
919
|
+
this.minTotalPages = 1;
|
|
920
|
+
this.maxTotalPages = this.totalPages;
|
|
921
|
+
return rawDefaultBulletConfigLineGroup === null || rawDefaultBulletConfigLineGroup === void 0 ? void 0 : rawDefaultBulletConfigLineGroup.map((item) => item === null || item === void 0 ? void 0 : item.map((i) => i === null || i === void 0 ? void 0 : i.map((j) => (Object.assign(Object.assign({}, j), { disabled: true })))));
|
|
922
|
+
}
|
|
923
|
+
return rawDefaultBulletConfigLineGroup;
|
|
924
|
+
}
|
|
925
|
+
initLineForBulletConfig() {
|
|
926
|
+
var _a;
|
|
927
|
+
return Array.from({ length: (_a = this.ticketDataSource) === null || _a === void 0 ? void 0 : _a.length }, () => [...DEFAULT_BULLET_CONFIG]);
|
|
928
|
+
}
|
|
929
|
+
_resetBulletConfig() {
|
|
930
|
+
this.bulletConfigLineGroup = Array.from({ length: this.totalPages }).map(this.initLineForBulletConfig.bind(this));
|
|
931
|
+
}
|
|
932
|
+
fetchMatchData() {
|
|
933
|
+
// get match
|
|
934
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}/findDrawEvents`);
|
|
935
|
+
if (!this.gameId || !this.drawId)
|
|
936
|
+
return;
|
|
937
|
+
this.isLoading = true;
|
|
938
|
+
fetcher(url.href)
|
|
939
|
+
.then((data) => {
|
|
940
|
+
this.ticketDataSource = data || [];
|
|
941
|
+
this.isLoading = false;
|
|
942
|
+
this.updateBulletConfigLineGroup();
|
|
943
|
+
})
|
|
944
|
+
.catch((err) => {
|
|
945
|
+
this.isLoading = false;
|
|
946
|
+
this.hasErrors = true;
|
|
947
|
+
console.error('Error!', err);
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
updateBulletConfigLineGroup() {
|
|
951
|
+
if (this.parsedDefaultBulletConfigLineGroup && this.parsedDefaultBulletConfigLineGroup.length > 0)
|
|
952
|
+
this.bulletConfigLineGroup = this.parsedDefaultBulletConfigLineGroup;
|
|
953
|
+
else {
|
|
954
|
+
this._resetBulletConfig();
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
connectedCallback() {
|
|
958
|
+
this.fetchMatchData();
|
|
959
|
+
}
|
|
960
|
+
handleClearAll() {
|
|
961
|
+
this._resetBulletConfig();
|
|
962
|
+
showNotification({ message: translate('selectionCleared', this.language) });
|
|
963
|
+
this.lotteryTippingBulletBetEvent.emit({ hasSelectBullet: false });
|
|
964
|
+
}
|
|
965
|
+
async resetBulletConfig({ minLineNumber, maxLineNumber, defaultBoards }) {
|
|
966
|
+
this.totalPages = defaultBoards;
|
|
967
|
+
this.minTotalPages = minLineNumber;
|
|
968
|
+
this.maxTotalPages = maxLineNumber;
|
|
969
|
+
this.currentPage = 1;
|
|
970
|
+
this._resetBulletConfig();
|
|
971
|
+
this.lotteryTippingBulletBetEvent.emit({ hasSelectBullet: false });
|
|
972
|
+
}
|
|
973
|
+
lotteryTippingBulletGroupSelectionHandler(event) {
|
|
974
|
+
const { bulletConfigArr, positionIdx } = event.detail;
|
|
975
|
+
const [curLine, curRow] = positionIdx.split(SPLIT_TOKEN);
|
|
976
|
+
this.bulletConfigLineGroup[curLine][curRow] = bulletConfigArr;
|
|
977
|
+
this.bulletConfigLineGroup = [...this.bulletConfigLineGroup];
|
|
978
|
+
this.lotteryTippingBulletBetEvent.emit({ hasSelectBullet: true });
|
|
979
|
+
}
|
|
980
|
+
async getData() {
|
|
981
|
+
await this.validateBulletConfigLineGroup();
|
|
982
|
+
return this.bulletConfigLineGroup;
|
|
983
|
+
}
|
|
984
|
+
validateBulletConfigLineGroup() {
|
|
985
|
+
if (JSON.stringify(this.bulletConfigLineGroup) === '[[[]]]')
|
|
986
|
+
return Promise.resolve(this.bulletConfigLineGroup);
|
|
987
|
+
const totalPages = this.bulletConfigLineGroup.length;
|
|
988
|
+
if (totalPages !== this.totalPages || totalPages < this.minTotalPages || totalPages > this.maxTotalPages) {
|
|
989
|
+
this._resetBulletConfig();
|
|
990
|
+
return Promise.reject(new Error('Invalid bullet config line group length'));
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
return Promise.resolve(this.bulletConfigLineGroup);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* previous page
|
|
998
|
+
*/
|
|
999
|
+
prevPage() {
|
|
1000
|
+
const doPrev = () => {
|
|
1001
|
+
if (this.currentPage > 1) {
|
|
1002
|
+
this.currentPage--;
|
|
1003
|
+
}
|
|
1004
|
+
};
|
|
1005
|
+
this.swapCard('prev', doPrev);
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* next page
|
|
1009
|
+
*/
|
|
1010
|
+
nextPage() {
|
|
1011
|
+
const doNext = () => {
|
|
1012
|
+
if (this.currentPage < this.totalPages) {
|
|
1013
|
+
this.currentPage++;
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
this.swapCard('next', doNext);
|
|
1017
|
+
}
|
|
1018
|
+
handleAddLine() {
|
|
1019
|
+
const doAdd = () => {
|
|
1020
|
+
if (this.totalPages <= this.maxTotalPages - 1) {
|
|
1021
|
+
this.bulletConfigLineGroup.push(this.initLineForBulletConfig());
|
|
1022
|
+
this.totalPages++;
|
|
1023
|
+
// move to next line
|
|
1024
|
+
this.currentPage++;
|
|
1025
|
+
this.lotteryTippingBulletBetEvent.emit();
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
this.swapCard('add', doAdd);
|
|
1029
|
+
}
|
|
1030
|
+
handleRemoveLine() {
|
|
1031
|
+
const doRemove = () => {
|
|
1032
|
+
if (this.totalPages >= this.minTotalPages + 1) {
|
|
1033
|
+
const closeDialog = () => {
|
|
1034
|
+
this.dialogConfig = { visible: false };
|
|
1035
|
+
};
|
|
1036
|
+
const doRemove = () => {
|
|
1037
|
+
this.bulletConfigLineGroup.splice(this.currentPage - 1, 1);
|
|
1038
|
+
this.totalPages--;
|
|
1039
|
+
if (this.currentPage !== 1)
|
|
1040
|
+
this.currentPage--;
|
|
1041
|
+
this.lotteryTippingBulletBetEvent.emit();
|
|
1042
|
+
this.swapCard('remove', closeDialog);
|
|
1043
|
+
};
|
|
1044
|
+
this.dialogConfig = {
|
|
1045
|
+
visible: true,
|
|
1046
|
+
content: translate('selectionOnLineCleared', this.language),
|
|
1047
|
+
onConfirm: doRemove,
|
|
1048
|
+
onCancel: closeDialog
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
doRemove();
|
|
1053
|
+
}
|
|
1054
|
+
swapCard(action, cb) {
|
|
1055
|
+
const wrapper = this.mainContainer;
|
|
1056
|
+
if (!wrapper)
|
|
1057
|
+
return;
|
|
1058
|
+
const map = {
|
|
1059
|
+
next: { out: 'card-out-left', in: 'card-in-left' },
|
|
1060
|
+
prev: { out: 'card-out-right', in: 'card-in-right' },
|
|
1061
|
+
remove: { out: 'card-out-down', in: 'card-in-right' },
|
|
1062
|
+
add: { out: 'card-out-left', in: 'card-in-up' }
|
|
1063
|
+
};
|
|
1064
|
+
const { out: outCls, in: inCls } = map[action];
|
|
1065
|
+
wrapper.classList.add(outCls);
|
|
1066
|
+
// FIXME: reference not clear
|
|
1067
|
+
wrapper.addEventListener('animationend', () => {
|
|
1068
|
+
wrapper.classList.remove(outCls);
|
|
1069
|
+
cb();
|
|
1070
|
+
const newWrapper = this.mainContainer;
|
|
1071
|
+
if (!newWrapper)
|
|
1072
|
+
return;
|
|
1073
|
+
newWrapper.classList.add(inCls);
|
|
1074
|
+
newWrapper.addEventListener('animationend', () => newWrapper.classList.remove(inCls), { once: true });
|
|
1075
|
+
}, { once: true });
|
|
1076
|
+
}
|
|
1077
|
+
handleCurrentPageChange() {
|
|
1078
|
+
this.lotteryTippingCurrentPageChangeEvent.emit({ currentPage: this.currentPage });
|
|
1079
|
+
}
|
|
1080
|
+
renderLoading() {
|
|
1081
|
+
return (index.h("div", { class: "loading-wrap" }, index.h("section", { class: "dots-container" }, index.h("div", { class: "dot" }), index.h("div", { class: "dot" }), index.h("div", { class: "dot" }), index.h("div", { class: "dot" }), index.h("div", { class: "dot" }))));
|
|
1082
|
+
}
|
|
1083
|
+
render() {
|
|
1084
|
+
var _a, _b, _c, _d;
|
|
1085
|
+
if (this.isLoading) {
|
|
1086
|
+
return this.renderLoading();
|
|
1087
|
+
}
|
|
1088
|
+
if (this.hasErrors) {
|
|
1089
|
+
return (index.h("div", { ref: (el) => (this.stylingContainer = el), class: "LotteryTippingTicketBet__container" }, index.h("p", null, translate('error', this.language))));
|
|
1090
|
+
}
|
|
1091
|
+
const MyTable = ({ columns, dataSource, hideHead = false, grid = true, bordered = true }) => (index.h("table", { class: { bordered: bordered, grid: grid, 'my-table-component': true } }, !hideHead && (index.h("thead", null, index.h("tr", null, columns.map((column) => {
|
|
1092
|
+
var _a;
|
|
1093
|
+
return (index.h("th", { key: column.value, style: { width: column.width + '%', textAlign: column.align } }, typeof column.title === 'string' ? column.title : (_a = column.title) === null || _a === void 0 ? void 0 : _a.call(column)));
|
|
1094
|
+
})))), index.h("tbody", null, dataSource.map((row, index$1) => (index.h("tr", { key: index$1 }, columns.map((column) => (index.h("td", { key: column.value, style: { width: column.width + '%', textAlign: column.align }, class: { 'no-wrap': column.nowrap } }, column.render ? column.render(row, row[column.value], index$1) : row[column.value])))))))));
|
|
1095
|
+
const lineOperatorAddShow = this.totalPages < this.maxTotalPages && this.currentPage === this.totalPages ? true : false;
|
|
1096
|
+
const lineOperatorRemoveShow = this.totalPages > this.minTotalPages ? true : false;
|
|
1097
|
+
if (this.ticketDataSource.length === 0 || this.minTotalPages === 0 || this.maxTotalPages === 0) {
|
|
1098
|
+
return (index.h("div", { class: "LotteryTippingTicketBet__container", ref: (el) => (this.stylingContainer = el) }, index.h("div", { class: "LotteryTippingTicketBet__empty" }, index.h("p", null, translate('noData', this.language)))));
|
|
1099
|
+
}
|
|
1100
|
+
if (this.readPretty) {
|
|
1101
|
+
return (index.h("div", { class: "LotteryTippingTicketBet__container", ref: (el) => (this.stylingContainer = el) }, index.h("div", { class: "LotteryTippingTicketBet__main", ref: (el) => (this.mainContainer = el) }, index.h(MyTable, { columns: this.columns, dataSource: ((_a = this.ticketDataSource) === null || _a === void 0 ? void 0 : _a.map((item, index) => (Object.assign(Object.assign({}, item), { index: index + 1 })))) || [], hideHead: false, grid: false, bordered: false }), this.totalPages > 1 && (index.h("div", null, index.h("div", { class: 'border-line' }), index.h("div", { class: "LotteryTippingTicketBet__footer" }, index.h("div", { class: "my-pagination flex justify-between" }, index.h("span", null, translate('lineInfo', this.language, {
|
|
1102
|
+
currentPage: this.currentPage,
|
|
1103
|
+
totalPages: this.totalPages
|
|
1104
|
+
})), index.h("div", { class: 'flex gap-1' }, index.h("span", { class: `btn ${this.currentPage === 1 ? 'disabled' : ''}`, onClick: this.prevPage.bind(this) }, index.h("span", { class: "icon", innerHTML: leftImagePath })), index.h("span", { class: `btn ${this.currentPage === this.totalPages ? 'disabled' : ''}`, onClick: this.nextPage.bind(this) }, index.h("span", { class: "icon", innerHTML: rightImagePath }))))))))));
|
|
1105
|
+
}
|
|
1106
|
+
return (index.h("div", { ref: (el) => (this.stylingContainer = el), class: "LotteryTippingTicketBet__container" }, index.h("div", { class: "LotteryTippingTicketBet__tableToolbar flex justify-end gap-1" }, index.h("button", { class: {
|
|
1107
|
+
'LotteryTippingTicketBet__tableToolbar--item': true,
|
|
1108
|
+
'mr-0': !(lineOperatorAddShow || lineOperatorRemoveShow)
|
|
1109
|
+
}, onClick: this.handleClearAll.bind(this) }, translate('clearAll', this.language))), index.h("div", { class: "flex align-center LotteryTippingTicketBet__main", ref: (el) => (this.mainContainer = el) }, index.h(MyTable, { columns: this.columns, dataSource: ((_b = this.ticketDataSource) === null || _b === void 0 ? void 0 : _b.map((item, index) => (Object.assign(Object.assign({}, item), { index: index + 1 })))) || [], hideHead: false, grid: false, bordered: false }), (lineOperatorAddShow || lineOperatorRemoveShow) && (index.h("div", { class: "LotteryTippingTicketBet__lineOperatorGroup" }, lineOperatorAddShow && (index.h("div", { class: {
|
|
1110
|
+
'LotteryTippingTicketBet__lineOperatorGroup--item': true
|
|
1111
|
+
}, onClick: this.handleAddLine.bind(this) }, index.h("span", { class: "icon", innerHTML: addImagePath }))), lineOperatorRemoveShow && (index.h("div", { class: {
|
|
1112
|
+
'LotteryTippingTicketBet__lineOperatorGroup--item': true
|
|
1113
|
+
}, onClick: this.handleRemoveLine.bind(this) }, index.h("span", { class: "icon", innerHTML: deleteImagePath })))))), index.h("div", { class: 'border-line' }), index.h("div", { class: "LotteryTippingTicketBet__footer" }, index.h("div", { class: "my-pagination flex justify-between" }, index.h("span", null, translate('lineInfo', this.language, { currentPage: this.currentPage, totalPages: this.totalPages })), index.h("div", { class: 'flex gap-1' }, index.h("span", { class: `btn ${this.currentPage === 1 ? 'disabled' : ''}`, onClick: this.prevPage.bind(this) }, index.h("span", { class: "icon", innerHTML: leftImagePath })), index.h("span", { class: `btn ${this.currentPage === this.totalPages ? 'disabled' : ''}`, onClick: this.nextPage.bind(this) }, index.h("span", { class: "icon", innerHTML: rightImagePath }))))), this.dialogConfig.visible && (index.h("vaadin-confirm-dialog", { rejectButtonVisible: true, rejectText: translate('cancel', this.language), confirmText: translate('confirm', this.language), opened: (_c = this.dialogConfig) === null || _c === void 0 ? void 0 : _c.visible, onConfirm: this.dialogConfig.onConfirm, onReject: this.dialogConfig.onCancel }, (_d = this.dialogConfig) === null || _d === void 0 ? void 0 : _d.content))));
|
|
1114
|
+
}
|
|
1115
|
+
static get assetsDirs() { return ["../static"]; }
|
|
1116
|
+
static get watchers() { return {
|
|
1117
|
+
"translationUrl": ["handleNewTranslations"],
|
|
1118
|
+
"clientStyling": ["handleClientStylingChange"],
|
|
1119
|
+
"clientStylingUrl": ["handleClientStylingUrlChange"],
|
|
1120
|
+
"mbSource": ["handleMbSourceChange"],
|
|
1121
|
+
"gameId": ["fetchMatchData"],
|
|
1122
|
+
"sessionId": ["fetchMatchData"],
|
|
1123
|
+
"drawId": ["fetchMatchData"],
|
|
1124
|
+
"defaultBulletConfigLineGroup": ["fetchMatchData"],
|
|
1125
|
+
"currentPage": ["handleCurrentPageChange"]
|
|
1126
|
+
}; }
|
|
1127
|
+
};
|
|
1128
|
+
LotteryTippingTicketBet.style = LotteryTippingTicketBetStyle0;
|
|
1129
|
+
|
|
1130
|
+
exports.lottery_tipping_ticket_controller = lotteryTippingTicketController.LotteryTippingTicketController;
|
|
1131
|
+
exports.general_tooltip = GeneralTooltip;
|
|
1132
|
+
exports.lottery_button = LotteryButton;
|
|
1133
|
+
exports.lottery_tipping_bullet = LotteryTippingBullet;
|
|
1134
|
+
exports.lottery_tipping_bullet_group = LotteryTippingBulletGroup;
|
|
1135
|
+
exports.lottery_tipping_ticket_banner = LotteryTippingTicketBanner;
|
|
1136
|
+
exports.lottery_tipping_ticket_bet = LotteryTippingTicketBet;
|