@everymatrix/lottery-game-page 0.1.20 → 0.1.22
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/helper-accordion.cjs.entry.js +6 -0
- package/dist/cjs/helper-filters_2.cjs.entry.js +73 -2
- package/dist/cjs/helper-pagination.cjs.entry.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +37 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +75 -12
- package/dist/cjs/lottery-game-details.cjs.entry.js +33 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +35 -3
- package/dist/cjs/lottery-game-page.cjs.js +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +54 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +54 -2
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +9 -0
- package/dist/collection/utils/locale.utils.js +26 -3
- package/dist/components/helper-accordion2.js +6 -0
- package/dist/components/helper-filters2.js +26 -0
- package/dist/components/helper-pagination.js +12 -0
- package/dist/components/lottery-draw-results-history2.js +80 -14
- package/dist/components/lottery-draw-results2.js +47 -2
- package/dist/components/lottery-game-details2.js +38 -2
- package/dist/components/lottery-game-page.js +35 -3
- package/dist/components/lottery-grid2.js +42 -2
- package/dist/components/lottery-ticket-controller2.js +58 -2
- package/dist/components/lottery-ticket2.js +58 -3
- package/dist/esm/helper-accordion.entry.js +6 -0
- package/dist/esm/helper-filters_2.entry.js +73 -2
- package/dist/esm/helper-pagination.entry.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/lottery-bullet_2.entry.js +37 -1
- package/dist/esm/lottery-draw-results-history.entry.js +75 -12
- package/dist/esm/lottery-game-details.entry.js +33 -1
- package/dist/esm/lottery-game-page.entry.js +35 -3
- package/dist/esm/lottery-game-page.js +1 -1
- package/dist/esm/lottery-ticket-controller.entry.js +54 -1
- package/dist/esm/lottery-ticket.entry.js +54 -2
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-01132729.entry.js +1 -0
- package/dist/lottery-game-page/p-4098d6d4.entry.js +1 -0
- package/dist/lottery-game-page/p-807dda48.entry.js +1 -0
- package/dist/lottery-game-page/p-97048566.entry.js +1 -0
- package/dist/lottery-game-page/p-a21ecd5f.entry.js +1 -0
- package/dist/lottery-game-page/p-b44e49d7.entry.js +1 -0
- package/dist/lottery-game-page/{p-90003eb8.entry.js → p-c8162ede.entry.js} +50 -50
- package/dist/lottery-game-page/p-d91fc066.entry.js +1 -0
- package/dist/lottery-game-page/p-fc4ea90d.entry.js +1 -0
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- package/package.json +1 -1
- package/dist/lottery-game-page/p-13d0f256.entry.js +0 -1
- package/dist/lottery-game-page/p-63781a10.entry.js +0 -1
- package/dist/lottery-game-page/p-87298564.entry.js +0 -1
- package/dist/lottery-game-page/p-b49e741d.entry.js +0 -1
- package/dist/lottery-game-page/p-bb028d40.entry.js +0 -1
- package/dist/lottery-game-page/p-c0e7c864.entry.js +0 -1
- package/dist/lottery-game-page/p-d241f927.entry.js +0 -1
- package/dist/lottery-game-page/p-f9740035.entry.js +0 -1
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-0f8edfd2.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
drawResultsHeader: 'Draw results history',
|
|
@@ -29,6 +29,32 @@ const TRANSLATIONS = {
|
|
|
29
29
|
noResults: 'Niciun rezultat',
|
|
30
30
|
fetchingResults: 'Se obtin rezultatele'
|
|
31
31
|
},
|
|
32
|
+
fr: {
|
|
33
|
+
drawResultsHeader: 'Dessiner l\'historique des résultats',
|
|
34
|
+
drawId: 'ID de tirage',
|
|
35
|
+
drawDate: 'Date du tirage',
|
|
36
|
+
drawNumbersGridA: 'Tirage des numéros Grille',
|
|
37
|
+
viewAllResults: 'Voir tout',
|
|
38
|
+
lastFiveDraws: '5 derniers tirages',
|
|
39
|
+
lastTenDraws: '10 derniers tirages',
|
|
40
|
+
lastFifteenDraws: '15 derniers tirages',
|
|
41
|
+
allDrawResultsHistory: 'Historique des résultats de tous les tirages',
|
|
42
|
+
noResults: 'Aucun résultat',
|
|
43
|
+
fetchingResults: 'Récupération des résultats'
|
|
44
|
+
},
|
|
45
|
+
ar: {
|
|
46
|
+
drawResultsHeader: 'سجل نتائج السحب',
|
|
47
|
+
drawId: 'معرّف السحب',
|
|
48
|
+
drawDate: 'تاريخ السحب',
|
|
49
|
+
drawNumbersGridA: 'شبكة أرقام السحب',
|
|
50
|
+
viewAllResults: 'عرض الكل',
|
|
51
|
+
lastFiveDraws: 'آخر 5 سحوبات',
|
|
52
|
+
lastTenDraws: 'آخر 10 سحوبات',
|
|
53
|
+
lastFifteenDraws: 'آخر 15 سحبًا',
|
|
54
|
+
allDrawResultsHistory: 'سجل نتائج كل السحوبات',
|
|
55
|
+
noResults: 'لا توجد نتائج',
|
|
56
|
+
fetchingResults: 'جلب النتائج'
|
|
57
|
+
}
|
|
32
58
|
};
|
|
33
59
|
const translate = (key, customLang) => {
|
|
34
60
|
const lang = customLang;
|
|
@@ -48,6 +74,14 @@ const LotteryDrawResultsHistory = class {
|
|
|
48
74
|
*Language
|
|
49
75
|
*/
|
|
50
76
|
this.language = 'en';
|
|
77
|
+
/**
|
|
78
|
+
* Client custom styling via string
|
|
79
|
+
*/
|
|
80
|
+
this.clientStyling = '';
|
|
81
|
+
/**
|
|
82
|
+
* Client custom styling via url content
|
|
83
|
+
*/
|
|
84
|
+
this.clientStylingUrlContent = '';
|
|
51
85
|
this.drawData = [];
|
|
52
86
|
this.displayAllDrawsResults = true;
|
|
53
87
|
this.showQuickFilters = true;
|
|
@@ -56,6 +90,7 @@ const LotteryDrawResultsHistory = class {
|
|
|
56
90
|
this.dateFiltersTo = '';
|
|
57
91
|
this.isLoading = false;
|
|
58
92
|
this.noResults = false;
|
|
93
|
+
this.limitStylingAppends = false;
|
|
59
94
|
this.getDrawsData = (filterbydate = false) => {
|
|
60
95
|
let url = filterbydate ? new URL(`${this.endpoint}/games/${this.gameId}/draws`) : new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
61
96
|
if (this.dateFiltersFrom)
|
|
@@ -114,19 +149,36 @@ const LotteryDrawResultsHistory = class {
|
|
|
114
149
|
this.displayAllDrawsResults = false;
|
|
115
150
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
116
151
|
};
|
|
152
|
+
this.setClientStyling = () => {
|
|
153
|
+
let sheet = document.createElement('style');
|
|
154
|
+
sheet.innerHTML = this.clientStyling;
|
|
155
|
+
this.stylingContainer.prepend(sheet);
|
|
156
|
+
};
|
|
157
|
+
this.setClientStylingURL = () => {
|
|
158
|
+
let cssFile = document.createElement('style');
|
|
159
|
+
setTimeout(() => {
|
|
160
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
161
|
+
this.stylingContainer.prepend(cssFile);
|
|
162
|
+
}, 1);
|
|
163
|
+
};
|
|
117
164
|
}
|
|
118
165
|
// Filters events
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
166
|
+
// @Listen('filterDraw')
|
|
167
|
+
// filtersDrawHandler(event: CustomEvent<any>):void {
|
|
168
|
+
// this.isLoading = true;
|
|
169
|
+
// this.showQuickFilters = false;
|
|
170
|
+
// }
|
|
124
171
|
filtersHandler(event) {
|
|
125
172
|
this.showQuickFilters = false;
|
|
126
|
-
this.dateFiltersFrom = event.detail.filterFromCalendar;
|
|
127
|
-
this.dateFiltersTo = event.detail.filterToCalendar;
|
|
128
173
|
this.isLoading = true;
|
|
129
|
-
|
|
174
|
+
if (event.detail.ticketDrawId) {
|
|
175
|
+
this.getDrawResults(event.detail.ticketDrawId);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this.dateFiltersFrom = event.detail.filterFromCalendar;
|
|
179
|
+
this.dateFiltersTo = event.detail.filterToCalendar;
|
|
180
|
+
this.getDrawsData(true);
|
|
181
|
+
}
|
|
130
182
|
}
|
|
131
183
|
clearFiltersHandler() {
|
|
132
184
|
this.drawData = this.winningDataSetsData;
|
|
@@ -143,13 +195,24 @@ const LotteryDrawResultsHistory = class {
|
|
|
143
195
|
disconnectedCallback() {
|
|
144
196
|
clearInterval(this.interval);
|
|
145
197
|
}
|
|
198
|
+
componentDidRender() {
|
|
199
|
+
// start custom styling area
|
|
200
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
201
|
+
if (this.clientStyling)
|
|
202
|
+
this.setClientStyling();
|
|
203
|
+
if (this.clientStylingUrlContent)
|
|
204
|
+
this.setClientStylingURL();
|
|
205
|
+
this.limitStylingAppends = true;
|
|
206
|
+
}
|
|
207
|
+
// end custom styling area
|
|
208
|
+
}
|
|
146
209
|
render() {
|
|
147
210
|
let gridHeader = h("div", { class: "DrawResultsHeader" }, this.displayAllDrawsResults ? h("h4", null, translate('drawResultsHeader', this.language)) :
|
|
148
211
|
[h("div", { class: "DrawResultsHeaderContent" }, h("h4", null, translate('allDrawResultsHistory', this.language)), h("div", { class: "FilterSection" }, this.showQuickFilters &&
|
|
149
|
-
h("div", { class: "FilterResultsContainer" }, h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(5) }, translate('lastFiveDraws', this.language)), h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(10) }, translate('lastTenDraws', this.language)), h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(15) }, translate('lastFifteenDraws', this.language))), h("helper-filters", { "show-filter-id": "true", "activate-ticket-search": "false", "game-id": this.gameId }))),
|
|
212
|
+
h("div", { class: "FilterResultsContainer" }, h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(5) }, translate('lastFiveDraws', this.language)), h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(10) }, translate('lastTenDraws', this.language)), h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(15) }, translate('lastFifteenDraws', this.language))), h("helper-filters", { "show-filter-id": "true", "activate-ticket-search": "false", "game-id": this.gameId, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))),
|
|
150
213
|
]);
|
|
151
|
-
return h("section", { class: "GridWrapper" }, h("div", { class: "DrawResultsSection" }, h("div", { class: "DrawResultsAreaHistory" }, gridHeader, h("div", { class: "HistoryGridWrapper" }, h("div", { class: "HistoryGrid" }, this.isLoading &&
|
|
152
|
-
h("p", null, translate('fetchingResults', this.language)), !this.isLoading && !this.noResults && this.drawData.map((item) => h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, "draw-id": item.id, "draw-mode": true })).reverse().slice(0, this.numberOfResults), !this.isLoading && this.noResults && (h("p", null, translate('noResults', this.language))))), this.displayAllDrawsResults && h("button", { class: "ViewAllResults", onClick: this.viewAllResults }, translate('viewAllResults', this.language)))));
|
|
214
|
+
return h("section", { class: "GridWrapper", ref: el => this.stylingContainer = el }, h("div", { class: "DrawResultsSection" }, h("div", { class: "DrawResultsAreaHistory" }, gridHeader, h("div", { class: "HistoryGridWrapper" }, h("div", { class: "HistoryGrid" }, this.isLoading &&
|
|
215
|
+
h("p", null, translate('fetchingResults', this.language)), !this.isLoading && !this.noResults && this.drawData.map((item) => h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, "draw-id": item.id, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })).reverse().slice(0, this.numberOfResults), !this.isLoading && this.noResults && (h("p", null, translate('noResults', this.language))))), this.displayAllDrawsResults && h("button", { class: "ViewAllResults", onClick: this.viewAllResults }, translate('viewAllResults', this.language)))));
|
|
153
216
|
}
|
|
154
217
|
};
|
|
155
218
|
LotteryDrawResultsHistory.style = lotteryDrawResultsHistoryCss;
|
|
@@ -5,9 +5,41 @@ const lotteryGameDetailsCss = ":host{display:block}";
|
|
|
5
5
|
const LotteryGameDetails = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
+
/**
|
|
9
|
+
* Client custom styling via string
|
|
10
|
+
*/
|
|
11
|
+
this.clientStyling = '';
|
|
12
|
+
/**
|
|
13
|
+
* Client custom styling via url content
|
|
14
|
+
*/
|
|
15
|
+
this.clientStylingUrlContent = '';
|
|
16
|
+
this.limitStylingAppends = false;
|
|
17
|
+
this.setClientStyling = () => {
|
|
18
|
+
let sheet = document.createElement('style');
|
|
19
|
+
sheet.innerHTML = this.clientStyling;
|
|
20
|
+
this.stylingContainer.prepend(sheet);
|
|
21
|
+
};
|
|
22
|
+
this.setClientStylingURL = () => {
|
|
23
|
+
let cssFile = document.createElement('style');
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
26
|
+
this.stylingContainer.prepend(cssFile);
|
|
27
|
+
}, 1);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
componentDidRender() {
|
|
31
|
+
// start custom styling area
|
|
32
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
33
|
+
if (this.clientStyling)
|
|
34
|
+
this.setClientStyling();
|
|
35
|
+
if (this.clientStylingUrlContent)
|
|
36
|
+
this.setClientStylingURL();
|
|
37
|
+
this.limitStylingAppends = true;
|
|
38
|
+
}
|
|
39
|
+
// end custom styling area
|
|
8
40
|
}
|
|
9
41
|
render() {
|
|
10
|
-
return (h("div",
|
|
42
|
+
return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "AccordionContainer", slot: "accordionContent" }, h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
11
43
|
}
|
|
12
44
|
};
|
|
13
45
|
LotteryGameDetails.style = lotteryGameDetailsCss;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-0f8edfd2.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'ar'];
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
error: 'Error',
|
|
@@ -49,6 +49,29 @@ const TRANSLATIONS = {
|
|
|
49
49
|
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
50
50
|
modalLogin: 'Please login to submit a ticket',
|
|
51
51
|
},
|
|
52
|
+
fr: {
|
|
53
|
+
error: 'Error',
|
|
54
|
+
title: 'Chrono',
|
|
55
|
+
backButton: 'Back',
|
|
56
|
+
lobbyButton: 'Lobby',
|
|
57
|
+
prize: 'Prize',
|
|
58
|
+
winUpTo: 'Win up to',
|
|
59
|
+
nextDraw: 'Next draw in: ',
|
|
60
|
+
buy: 'Buy tickets',
|
|
61
|
+
viewLatest: 'View latest results',
|
|
62
|
+
createTicket: 'Create Ticket',
|
|
63
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
64
|
+
deleteTicketModalTitle: 'Delete Ticket',
|
|
65
|
+
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
66
|
+
deleteTicketModalCancel: 'Cancel',
|
|
67
|
+
deleteTicketModalConfirm: 'Delete',
|
|
68
|
+
orderSummaryTitle: 'Order Summary',
|
|
69
|
+
orderSummaryTickets: 'Ticket',
|
|
70
|
+
orderSummaryTotal: 'Total',
|
|
71
|
+
orderSummarySubmit: 'Submit',
|
|
72
|
+
lastDrawResultsTitle: 'Résultats du dernier tirage',
|
|
73
|
+
modalLogin: 'Please login to submit a ticket',
|
|
74
|
+
},
|
|
52
75
|
ar: {
|
|
53
76
|
error: 'خطأ',
|
|
54
77
|
title: 'كرونو',
|
|
@@ -69,9 +92,9 @@ const TRANSLATIONS = {
|
|
|
69
92
|
orderSummaryTickets: 'تذكرة',
|
|
70
93
|
orderSummaryTotal: 'المجموع',
|
|
71
94
|
orderSummarySubmit: 'يُقدِّم',
|
|
72
|
-
lastDrawResultsTitle: '
|
|
95
|
+
lastDrawResultsTitle: 'نتائج آخر سحب',
|
|
73
96
|
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
74
|
-
}
|
|
97
|
+
}
|
|
75
98
|
};
|
|
76
99
|
const translate = (key, customLang) => {
|
|
77
100
|
const lang = customLang;
|
|
@@ -131,6 +154,9 @@ const LotteryGamePage = class {
|
|
|
131
154
|
this.clientStylingUrlContent = data;
|
|
132
155
|
cssFile.innerHTML = data;
|
|
133
156
|
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
157
|
+
})
|
|
158
|
+
.catch((err) => {
|
|
159
|
+
console.log('error ', err);
|
|
134
160
|
});
|
|
135
161
|
};
|
|
136
162
|
}
|
|
@@ -282,6 +308,9 @@ const LotteryGamePage = class {
|
|
|
282
308
|
(_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
|
|
283
309
|
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
284
310
|
});
|
|
311
|
+
})
|
|
312
|
+
.catch((err) => {
|
|
313
|
+
console.log('error ', err);
|
|
285
314
|
});
|
|
286
315
|
}
|
|
287
316
|
;
|
|
@@ -344,6 +373,9 @@ const LotteryGamePage = class {
|
|
|
344
373
|
})
|
|
345
374
|
.then((data) => {
|
|
346
375
|
console.log('data', data);
|
|
376
|
+
})
|
|
377
|
+
.catch((err) => {
|
|
378
|
+
console.log('error ', err);
|
|
347
379
|
});
|
|
348
380
|
this.successVisible = true;
|
|
349
381
|
}
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["lottery-game-page",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[32],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32],"limitStylingAppends":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]],["lottery-bullet_2",[[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-filters_2",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"ticketNumbers":[1,"ticket-numbers"],"sessionId":[1,"session-id"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"isLoading":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32],"ticketData":[32],"ticketDataLoaded":[32],"ticketDraws":[32],"hasDrawNumbers":[32],"limitStylingAppends":[32]}],[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["lottery-draw-results-history",[[1,"lottery-draw-results-history",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfResults":[2,"number-of-results"],"language":[1],"drawData":[32],"displayAllDrawsResults":[32],"showQuickFilters":[32],"winningDataSetsData":[32],"dateFiltersFrom":[32],"dateFiltersTo":[32],"isLoading":[32],"noResults":[32]
|
|
16
|
+
return bootstrapLazy([["lottery-game-page",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[32],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32],"limitStylingAppends":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]],["lottery-bullet_2",[[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"gridType":[1,"grid-type"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-filters_2",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"ticketNumbers":[1,"ticket-numbers"],"sessionId":[1,"session-id"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"isLoading":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32],"ticketData":[32],"ticketDataLoaded":[32],"ticketDraws":[32],"hasDrawNumbers":[32],"limitStylingAppends":[32]}],[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["lottery-draw-results-history",[[1,"lottery-draw-results-history",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfResults":[2,"number-of-results"],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"drawData":[32],"displayAllDrawsResults":[32],"showQuickFilters":[32],"winningDataSetsData":[32],"dateFiltersFrom":[32],"dateFiltersTo":[32],"isLoading":[32],"noResults":[32],"limitStylingAppends":[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["lottery-ticket",[[1,"lottery-ticket",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfGrids":[2,"number-of-grids"],"multipleDraws":[4,"multiple-draws"],"ticketId":[2,"ticket-id"],"resetButton":[4,"reset-button"],"autoPick":[4,"auto-pick"],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["lottery-ticket-controller",[[1,"lottery-ticket-controller",{"endpoint":[1],"ticketId":[2,"ticket-id"],"ticketDescription":[1,"ticket-description"],"gameId":[1,"game-id"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"numberOfGrids":[2,"number-of-grids"],"last":[4],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["helper-tabs",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]],["helper-tab",[[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]],["lottery-game-details",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-0f8edfd2.js';
|
|
2
2
|
|
|
3
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
ticket: 'Ticket',
|
|
8
|
+
},
|
|
9
|
+
ro: {
|
|
10
|
+
ticket: 'Bilet',
|
|
11
|
+
},
|
|
12
|
+
fr: {
|
|
13
|
+
ticket: 'Billet'
|
|
14
|
+
},
|
|
15
|
+
ar: {
|
|
16
|
+
ticket: 'تذكرة',
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const translate = (key, customLang) => {
|
|
20
|
+
const lang = customLang;
|
|
21
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
22
|
+
};
|
|
23
|
+
|
|
3
24
|
const lotteryTicketControllerCss = ":host{display:block}";
|
|
4
25
|
|
|
5
26
|
const LotteryTicketController = class {
|
|
@@ -46,6 +67,27 @@ const LotteryTicketController = class {
|
|
|
46
67
|
* Shows the reset button
|
|
47
68
|
*/
|
|
48
69
|
this.resetButton = false;
|
|
70
|
+
/**
|
|
71
|
+
* Client custom styling via string
|
|
72
|
+
*/
|
|
73
|
+
this.clientStyling = '';
|
|
74
|
+
/**
|
|
75
|
+
* Client custom styling via url content
|
|
76
|
+
*/
|
|
77
|
+
this.clientStylingUrlContent = '';
|
|
78
|
+
this.limitStylingAppends = false;
|
|
79
|
+
this.setClientStyling = () => {
|
|
80
|
+
let sheet = document.createElement('style');
|
|
81
|
+
sheet.innerHTML = this.clientStyling;
|
|
82
|
+
this.stylingContainer.prepend(sheet);
|
|
83
|
+
};
|
|
84
|
+
this.setClientStylingURL = () => {
|
|
85
|
+
let cssFile = document.createElement('style');
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
88
|
+
this.stylingContainer.prepend(cssFile);
|
|
89
|
+
}, 1);
|
|
90
|
+
};
|
|
49
91
|
}
|
|
50
92
|
// @TODO fix the `any` type
|
|
51
93
|
helperAccordionActionHandler() {
|
|
@@ -56,8 +98,19 @@ const LotteryTicketController = class {
|
|
|
56
98
|
ticketId: this.ticketId
|
|
57
99
|
});
|
|
58
100
|
}
|
|
101
|
+
componentDidRender() {
|
|
102
|
+
// start custom styling area
|
|
103
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
104
|
+
if (this.clientStyling)
|
|
105
|
+
this.setClientStyling();
|
|
106
|
+
if (this.clientStylingUrlContent)
|
|
107
|
+
this.setClientStylingURL();
|
|
108
|
+
this.limitStylingAppends = true;
|
|
109
|
+
}
|
|
110
|
+
// end custom styling area
|
|
111
|
+
}
|
|
59
112
|
render() {
|
|
60
|
-
return (h("div",
|
|
113
|
+
return (h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": true, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { slot: "accordionContent" }, h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
61
114
|
}
|
|
62
115
|
};
|
|
63
116
|
LotteryTicketController.style = lotteryTicketControllerCss;
|
|
@@ -23,6 +23,26 @@ const TRANSLATIONS = {
|
|
|
23
23
|
resetButton: 'Reseteaza',
|
|
24
24
|
autoButton: 'Ma simt norocos'
|
|
25
25
|
},
|
|
26
|
+
fr: {
|
|
27
|
+
loading: 'Loading, please wait ...',
|
|
28
|
+
error: 'It was an error while trying to fetch the data',
|
|
29
|
+
grid: 'Grid',
|
|
30
|
+
multiplier: 'Multiplier',
|
|
31
|
+
numberOfDraws: 'Number of draws',
|
|
32
|
+
wagerPerDraw: 'Wager per draw',
|
|
33
|
+
resetButton: 'Reset',
|
|
34
|
+
autoButton: 'I feel lucky'
|
|
35
|
+
},
|
|
36
|
+
ar: {
|
|
37
|
+
loading: 'Loading, please wait ...',
|
|
38
|
+
error: 'It was an error while trying to fetch the data',
|
|
39
|
+
grid: 'Grid',
|
|
40
|
+
multiplier: 'Multiplier',
|
|
41
|
+
numberOfDraws: 'Number of draws',
|
|
42
|
+
wagerPerDraw: 'Wager per draw',
|
|
43
|
+
resetButton: 'Reset',
|
|
44
|
+
autoButton: 'I feel lucky'
|
|
45
|
+
}
|
|
26
46
|
};
|
|
27
47
|
const translate = (key, customLang) => {
|
|
28
48
|
const lang = customLang;
|
|
@@ -59,6 +79,14 @@ const LotteryTicket = class {
|
|
|
59
79
|
* Language
|
|
60
80
|
*/
|
|
61
81
|
this.language = 'en';
|
|
82
|
+
/**
|
|
83
|
+
* Client custom styling via string
|
|
84
|
+
*/
|
|
85
|
+
this.clientStyling = '';
|
|
86
|
+
/**
|
|
87
|
+
* Client custom styling via url content
|
|
88
|
+
*/
|
|
89
|
+
this.clientStylingUrlContent = '';
|
|
62
90
|
this.multiplier = false;
|
|
63
91
|
this.numberOfDraws = 1;
|
|
64
92
|
this.isLoading = true;
|
|
@@ -66,6 +94,19 @@ const LotteryTicket = class {
|
|
|
66
94
|
this.ticketDone = false;
|
|
67
95
|
this.isCustomSelect = false;
|
|
68
96
|
this.amountInfo = {};
|
|
97
|
+
this.limitStylingAppends = false;
|
|
98
|
+
this.setClientStyling = () => {
|
|
99
|
+
let sheet = document.createElement('style');
|
|
100
|
+
sheet.innerHTML = this.clientStyling;
|
|
101
|
+
this.stylingContainer.prepend(sheet);
|
|
102
|
+
};
|
|
103
|
+
this.setClientStylingURL = () => {
|
|
104
|
+
let cssFile = document.createElement('style');
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
107
|
+
this.stylingContainer.prepend(cssFile);
|
|
108
|
+
}, 1);
|
|
109
|
+
};
|
|
69
110
|
}
|
|
70
111
|
/**
|
|
71
112
|
* @TODO find a better way to implement click outside the custom select, so that we don't have to use the 'data-cluster' attribute on each element
|
|
@@ -99,6 +140,17 @@ const LotteryTicket = class {
|
|
|
99
140
|
console.error('Error!', err);
|
|
100
141
|
});
|
|
101
142
|
}
|
|
143
|
+
componentDidRender() {
|
|
144
|
+
// start custom styling area
|
|
145
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
146
|
+
if (this.clientStyling)
|
|
147
|
+
this.setClientStyling();
|
|
148
|
+
if (this.clientStylingUrlContent)
|
|
149
|
+
this.setClientStylingURL();
|
|
150
|
+
this.limitStylingAppends = true;
|
|
151
|
+
}
|
|
152
|
+
// end custom styling area
|
|
153
|
+
}
|
|
102
154
|
multiplierChangeHandler(e) {
|
|
103
155
|
this.multiplier = e.target ? e.target.checked : false;
|
|
104
156
|
this.multiplierChange.emit(this.multiplier);
|
|
@@ -147,9 +199,9 @@ const LotteryTicket = class {
|
|
|
147
199
|
}
|
|
148
200
|
else {
|
|
149
201
|
const { rules } = this.gameData;
|
|
150
|
-
return (h("div", { class: "TicketContainer" }, h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
202
|
+
return (h("div", { class: "TicketContainer", ref: el => this.stylingContainer = el }, h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
151
203
|
h("div", { class: "ButtonContainer" }, h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate('resetButton', this.language))), this.autoPick && !this.ticketDone &&
|
|
152
|
-
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))), this.grids.map((item, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate('grid', this.language), " ", item), h("lottery-grid", { "grid-index": index, "maximum-allowed": rules.boards[index].maximumAllowed, "minimum-allowed": rules.boards[index].minimumAllowed, "total-numbers": rules.boards[index].totalNumbers, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language }))), rules.multiplier &&
|
|
204
|
+
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))), this.grids.map((item, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate('grid', this.language), " ", item), h("lottery-grid", { "grid-index": index, "maximum-allowed": rules.boards[index].maximumAllowed, "minimum-allowed": rules.boards[index].minimumAllowed, "total-numbers": rules.boards[index].totalNumbers, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))), rules.multiplier &&
|
|
153
205
|
h("div", null, h("label", { class: "Toggle" }, h("label", { class: "Label" }, translate('multiplier', this.language), ": "), h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
154
206
|
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("div", null, h("label", { class: "Label" }, translate('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" }, rules.stakes.length > 1 ?
|
|
155
207
|
(h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.amount, " ", this.amountInfo.currency), h("span", { "data-cluster": "SelectComponent", class: "SelectExpand" }, "\u25BC")), h("div", { "data-cluster": "SelectComponent", class: "SelectContent" }, h("ul", { "data-cluster": "SelectComponent", class: "SelectOptions" }, rules.stakes.map((item) => h("li", { "data-cluster": "SelectComponent", class: this.amountInfo.amount == item.amount ? 'SelectedValue' : '', value: item.amount, onClick: () => this.setDropdownItem(item) }, item.amount, " ", item.currency)))))) : (h("div", null, h("input", { min: "1", value: rules.stakes[0].amount, type: "number", disabled: true }), h("p", { class: "WagerInputTitle" }, rules.stakes[0].currency)))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as t,b as e}from"./p-b4e2988a.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),t(i)})().then((t=>e([["p-fc4ea90d",[[1,"lottery-game-page",{endpoint:[1],gameId:[1,"game-id"],playerId:[2,"player-id"],sessionId:[1,"session-id"],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[32],tickets:[32],tabIndex:[32],hasErrors:[32],totalAmount:[32],successVisible:[32],deleteVisible:[32],deleteEventData:[32],daysRemaining:[32],hoursRemaining:[32],minutesRemaining:[32],secondsRemaining:[32],latestDraw:[32],totalWinningsAmount:[32],nextDate:[32],isLoggedIn:[32],loginModalVisible:[32],limitStylingAppends:[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["p-a21ecd5f",[[1,"helper-pagination",{firstPage:[1540,"first-page"],previousPage:[1540,"previous-page"],offset:[1538],limit:[1538],total:[1538],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],offsetInt:[32],lastPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]],["p-97048566",[[1,"lottery-grid",{ticketId:[2,"ticket-id"],totalNumbers:[2,"total-numbers"],gameId:[1,"game-id"],maximumAllowed:[2,"maximum-allowed"],minimumAllowed:[2,"minimum-allowed"],selectable:[4],selectedNumbers:[1,"selected-numbers"],displaySelected:[4,"display-selected"],language:[1],gridIndex:[2,"grid-index"],gridType:[1,"grid-type"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[1],selectable:[4],isSelected:[4,"is-selected"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-c8162ede",[[1,"lottery-draw-results",{endpoint:[1],gameId:[1,"game-id"],language:[1],playerId:[1,"player-id"],drawMode:[4,"draw-mode"],drawId:[1,"draw-id"],gameName:[1,"game-name"],ticketDate:[1,"ticket-date"],ticketStatus:[1,"ticket-status"],ticketId:[1,"ticket-id"],ticketAmount:[1,"ticket-amount"],ticketMultiplier:[4,"ticket-multiplier"],ticketDrawCount:[2,"ticket-draw-count"],ticketNumbers:[1,"ticket-numbers"],sessionId:[1,"session-id"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],multiplier:[32],isLoading:[32],rules:[32],toggleDrawer:[32],hasErrors:[32],errorText:[32],ticketData:[32],ticketDataLoaded:[32],ticketDraws:[32],hasDrawNumbers:[32],limitStylingAppends:[32]}],[1,"helper-filters",{showFilterId:[4,"show-filter-id"],activateTicketSearch:[4,"activate-ticket-search"],gameId:[1,"game-id"],playerId:[1,"player-id"],session:[1],postMessage:[4,"post-message"],language:[1],quickFiltersActive:[4,"quick-filters-active"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showFilterModal:[32],showClearButton:[32],filterData:[32],filterDataReset:[32],limitStylingAppends:[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["p-01132729",[[1,"lottery-draw-results-history",{endpoint:[1],gameId:[1,"game-id"],numberOfResults:[2,"number-of-results"],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],drawData:[32],displayAllDrawsResults:[32],showQuickFilters:[32],winningDataSetsData:[32],dateFiltersFrom:[32],dateFiltersTo:[32],isLoading:[32],noResults:[32],limitStylingAppends:[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["p-d91fc066",[[1,"lottery-ticket",{endpoint:[1],gameId:[1,"game-id"],numberOfGrids:[2,"number-of-grids"],multipleDraws:[4,"multiple-draws"],ticketId:[2,"ticket-id"],resetButton:[4,"reset-button"],autoPick:[4,"auto-pick"],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],multiplier:[32],numberOfDraws:[32],isLoading:[32],hasErrors:[32],ticketDone:[32],isCustomSelect:[32],amountInfo:[32],limitStylingAppends:[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["p-807dda48",[[1,"lottery-ticket-controller",{endpoint:[1],ticketId:[2,"ticket-id"],ticketDescription:[1,"ticket-description"],gameId:[1,"game-id"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],numberOfGrids:[2,"number-of-grids"],last:[4],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["p-07f98587",[[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-b44e49d7",[[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showContent:[32],limitStylingAppends:[32]}]]],["p-800590f3",[[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]],["p-4098d6d4",[[1,"lottery-game-details",{clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-e816baee",[[1,"helper-modal",{titleModal:[1,"title-modal"],visible:[1540],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s}from"./p-b4e2988a.js";const e=["ro","en","fr","ar"],i={en:{drawResultsHeader:"Draw results history",drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridA:"Draw numbers Grid A",viewAllResults:"View All",lastFiveDraws:"Last 5 Draws",lastTenDraws:"Last 10 Draws",lastFifteenDraws:"Last 15 Draws",allDrawResultsHistory:"All Draw Results History",noResults:"No results",fetchingResults:"Fetching results"},ro:{drawResultsHeader:"Istoricul extragerilor",drawId:"ID-ul extragerii",drawDate:"Data extragerii",drawNumbersGridA:"Numerele extrase Grid A",viewAllResults:"Vezi toate rezultatele",lastFiveDraws:"Ultimile 5 extrageri",lastTenDraws:"Ultimile 10 extrageri",lastFifteenDraws:"Ultimile 15 extrageri",allDrawResultsHistory:"Istoricul tuturor extragerilor",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridA:"Tirage des numéros Grille",viewAllResults:"Voir tout",lastFiveDraws:"5 derniers tirages",lastTenDraws:"10 derniers tirages",lastFifteenDraws:"15 derniers tirages",allDrawResultsHistory:"Historique des résultats de tous les tirages",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridA:"شبكة أرقام السحب",viewAllResults:"عرض الكل",lastFiveDraws:"آخر 5 سحوبات",lastTenDraws:"آخر 10 سحوبات",lastFifteenDraws:"آخر 15 سحبًا",allDrawResultsHistory:"سجل نتائج كل السحوبات",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"}},r=(t,s)=>{const r=s;return i[void 0!==r&&e.includes(r)?r:"en"][t]},a=class{constructor(s){t(this,s),this.numberOfResults=3,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.drawData=[],this.displayAllDrawsResults=!0,this.showQuickFilters=!0,this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.limitStylingAppends=!1,this.getDrawsData=(t=!1)=>{let s=t?new URL(`${this.endpoint}/games/${this.gameId}/draws`):new URL(`${this.endpoint}/games/${this.gameId}`);this.dateFiltersFrom&&s.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&s.searchParams.append("to",this.dateFiltersTo),fetch(s.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((s=>{this.isLoading=!1,this.winningDataSetsData=t?s.items.filter((t=>t.winningNumbers)):s.draws.filter((t=>t.winningNumbers)),this.drawData=this.winningDataSetsData.map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.filterResults=t=>{this.numberOfResults=t,this.displayAllDrawsResults=!0},this.getDrawResults=t=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);fetch(s.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json())).then((t=>{this.drawData=[t].map((t=>t)),this.isLoading=!1}))},this.viewAllResults=()=>{this.numberOfResults=this.drawData.length,this.displayAllDrawsResults=!1,window.scrollTo({top:0,behavior:"smooth"})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}filtersHandler(t){this.showQuickFilters=!1,this.isLoading=!0,t.detail.ticketDrawId?this.getDrawResults(t.detail.ticketDrawId):(this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.getDrawsData(!0))}clearFiltersHandler(){this.drawData=this.winningDataSetsData,this.showQuickFilters=!0,this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!0,this.getDrawsData(!1)}connectedCallback(){this.showQuickFilters&&this.getDrawsData(!1)}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("div",{class:"DrawResultsHeader"},this.displayAllDrawsResults?s("h4",null,r("drawResultsHeader",this.language)):[s("div",{class:"DrawResultsHeaderContent"},s("h4",null,r("allDrawResultsHistory",this.language)),s("div",{class:"FilterSection"},this.showQuickFilters&&s("div",{class:"FilterResultsContainer"},s("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(5)},r("lastFiveDraws",this.language)),s("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(10)},r("lastTenDraws",this.language)),s("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(15)},r("lastFifteenDraws",this.language))),s("helper-filters",{"show-filter-id":"true","activate-ticket-search":"false","game-id":this.gameId,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))]);return s("section",{class:"GridWrapper",ref:t=>this.stylingContainer=t},s("div",{class:"DrawResultsSection"},s("div",{class:"DrawResultsAreaHistory"},t,s("div",{class:"HistoryGridWrapper"},s("div",{class:"HistoryGrid"},this.isLoading&&s("p",null,r("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>s("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))).reverse().slice(0,this.numberOfResults),!this.isLoading&&this.noResults&&s("p",null,r("noResults",this.language)))),this.displayAllDrawsResults&&s("button",{class:"ViewAllResults",onClick:this.viewAllResults},r("viewAllResults",this.language)))))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}';export{a as lottery_draw_results_history}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s}from"./p-b4e2988a.js";const i=class{constructor(s){t(this,s),this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{"header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};i.style=":host{display:block}";export{i as lottery_game_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-b4e2988a.js";const s=["ro","en","fr","ar"],h={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"}},n=(t,i)=>{const e=i;return h[void 0!==e&&s.includes(e)?e:"en"][t]},o=class{constructor(e){t(this,e),this.deleteTicketEvent=i(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return e("div",{class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},e("helper-accordion",{"header-title":`${n("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":!0,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("div",{slot:"accordionContent"},e("lottery-ticket",{endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};o.style=":host{display:block}";export{o as lottery_ticket_controller}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-b4e2988a.js";const i=class{constructor(s){t(this,s),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};i.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const r=class{constructor(s){t(this,s),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.totalNumbers=0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1)).sort((()=>.5-Math.random()));e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return s("div",{class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';export{i as lottery_bullet,r as lottery_grid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-b4e2988a.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),a=["ro","en"],o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"}},n=(t,i)=>{const s=i;return o[void 0!==s&&a.includes(s)?s:"en"][t]},h=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.firstPage=!1,this.previousPage=!1,this.offset=0,this.limit=1,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.pagesArray=[],this.endInt=0,this.userAgent=window.navigator.userAgent,this.currentPage=1,this.limitStylingAppends=!1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=10;break;case"nextPage":this.offsetInt+=10;break;case"fivePagesBack":this.offsetInt-=30,this.offsetInt=this.offsetInt<0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=30,this.offsetInt=this.offsetInt/10>=this.endInt?10*this.endInt:this.offsetInt}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):this.offsetInt=1===t?t-1:10*(t-1),this.currentPage=this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentWillRender(){this.offsetInt=this.offset,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1===this.currentPage||2===this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"firstPage")},n("firstPage",this.language)),s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language)));e(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language))));let a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)),s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"lastPage")},n("lastPage",this.language)));return e(this.userAgent)&&(a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)))),s("div",{id:"PaginationContainer"},i,t,a)}};h.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin-top:20px;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:12px}}@media screen and (max-width: 480px){button{width:70px;font-size:10px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:10px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';export{h as helper_pagination}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-b4e2988a.js";const s=["ro","en"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';export{r as helper_accordion}
|