@everymatrix/lottery-game-page 0.0.17 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-modal.cjs.entry.js +1 -1
- package/dist/cjs/{index-81cb3b3b.js → index-614098f4.js} +5 -47
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/lottery-draw-results.cjs.entry.js +188 -0
- package/dist/cjs/lottery-game-page.cjs.entry.js +53 -13
- package/dist/cjs/lottery-game-page.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -62
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +27 -7
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +22 -5
- package/dist/collection/utils/locale.utils.js +33 -6
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +0 -14
- package/dist/components/lottery-draw-results2.js +62 -59
- package/dist/components/lottery-game-page.js +59 -77
- package/dist/esm/helper-modal.entry.js +1 -1
- package/dist/esm/{index-be84da79.js → index-0fa076cd.js} +5 -47
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottery-draw-results.entry.js +184 -0
- package/dist/esm/lottery-game-page.entry.js +53 -13
- package/dist/esm/lottery-game-page.js +3 -3
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-2d7ccc96.js +1 -0
- package/dist/lottery-game-page/{p-88f81126.entry.js → p-6183a920.entry.js} +1 -1
- package/dist/lottery-game-page/p-9ca649d9.entry.js +1 -0
- package/dist/lottery-game-page/p-e98ee83a.entry.js +1 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/helper-accordion.cjs.entry.js +0 -88
- package/dist/cjs/helper-filters_2.cjs.entry.js +0 -22490
- package/dist/cjs/helper-pagination.cjs.entry.js +0 -188
- package/dist/cjs/helper-tab.cjs.entry.js +0 -33
- package/dist/cjs/helper-tabs.cjs.entry.js +0 -38
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -202
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -124
- package/dist/cjs/lottery-game-details.cjs.entry.js +0 -19
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -69
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -146
- package/dist/components/helper-accordion.js +0 -6
- package/dist/components/helper-accordion2.js +0 -111
- package/dist/components/helper-filters.js +0 -6
- package/dist/components/helper-filters2.js +0 -22348
- package/dist/components/helper-pagination.js +0 -216
- package/dist/components/helper-tab.js +0 -6
- package/dist/components/helper-tab2.js +0 -48
- package/dist/components/helper-tabs.js +0 -6
- package/dist/components/helper-tabs2.js +0 -63
- package/dist/components/lottery-bullet.js +0 -6
- package/dist/components/lottery-bullet2.js +0 -57
- package/dist/components/lottery-draw-results-history.js +0 -6
- package/dist/components/lottery-draw-results-history2.js +0 -175
- package/dist/components/lottery-game-details.js +0 -6
- package/dist/components/lottery-game-details2.js +0 -49
- package/dist/components/lottery-grid.js +0 -6
- package/dist/components/lottery-grid2.js +0 -197
- package/dist/components/lottery-ticket-controller.js +0 -6
- package/dist/components/lottery-ticket-controller2.js +0 -118
- package/dist/components/lottery-ticket.js +0 -6
- package/dist/components/lottery-ticket2.js +0 -184
- package/dist/esm/helper-accordion.entry.js +0 -84
- package/dist/esm/helper-filters_2.entry.js +0 -22485
- package/dist/esm/helper-pagination.entry.js +0 -184
- package/dist/esm/helper-tab.entry.js +0 -29
- package/dist/esm/helper-tabs.entry.js +0 -34
- package/dist/esm/lottery-bullet_2.entry.js +0 -197
- package/dist/esm/lottery-draw-results-history.entry.js +0 -120
- package/dist/esm/lottery-game-details.entry.js +0 -15
- package/dist/esm/lottery-ticket-controller.entry.js +0 -65
- package/dist/esm/lottery-ticket.entry.js +0 -142
- package/dist/lottery-game-page/p-010895a3.entry.js +0 -1
- package/dist/lottery-game-page/p-08581ede.entry.js +0 -1
- package/dist/lottery-game-page/p-09f983c6.entry.js +0 -1
- package/dist/lottery-game-page/p-0c7ada78.entry.js +0 -1
- package/dist/lottery-game-page/p-2932d2a7.entry.js +0 -1
- package/dist/lottery-game-page/p-48831184.entry.js +0 -1
- package/dist/lottery-game-page/p-50298d2c.entry.js +0 -1
- package/dist/lottery-game-page/p-6736fa79.entry.js +0 -1
- package/dist/lottery-game-page/p-91420518.js +0 -2
- package/dist/lottery-game-page/p-95b37270.entry.js +0 -2849
- package/dist/lottery-game-page/p-a1dd3eb2.entry.js +0 -1
- package/dist/lottery-game-page/p-caf09eaf.entry.js +0 -1
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$8 } from './lottery-bullet2.js';
|
|
8
|
-
import { d as defineCustomElement$7 } from './lottery-draw-results2.js';
|
|
9
|
-
import { d as defineCustomElement$6 } from './lottery-draw-results-history2.js';
|
|
10
|
-
import { d as defineCustomElement$5 } from './lottery-game-details2.js';
|
|
11
|
-
import { d as defineCustomElement$4 } from './lottery-grid2.js';
|
|
12
|
-
import { d as defineCustomElement$3 } from './lottery-ticket2.js';
|
|
13
|
-
import { d as defineCustomElement$2 } from './lottery-ticket-controller2.js';
|
|
2
|
+
import '@everymatrix/lottery-ticket-controller';
|
|
3
|
+
import '@everymatrix/lottery-game-details';
|
|
4
|
+
import '@everymatrix/lottery-draw-results-history';
|
|
5
|
+
import { d as defineCustomElement$3 } from './helper-modal2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './lottery-draw-results2.js';
|
|
14
7
|
|
|
15
8
|
const DEFAULT_LANGUAGE = 'en';
|
|
16
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
9
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'ar'];
|
|
17
10
|
const TRANSLATIONS = {
|
|
18
11
|
en: {
|
|
19
12
|
error: 'Error',
|
|
@@ -26,7 +19,7 @@ const TRANSLATIONS = {
|
|
|
26
19
|
buy: 'Buy tickets',
|
|
27
20
|
viewLatest: 'View latest results',
|
|
28
21
|
createTicket: 'Create Ticket',
|
|
29
|
-
modalSuccess: 'Purchase
|
|
22
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
30
23
|
deleteTicketModalTitle: 'Delete Ticket',
|
|
31
24
|
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
32
25
|
deleteTicketModalCancel: 'Cancel',
|
|
@@ -34,7 +27,9 @@ const TRANSLATIONS = {
|
|
|
34
27
|
orderSummaryTitle: 'Order Summary',
|
|
35
28
|
orderSummaryTickets: 'Ticket',
|
|
36
29
|
orderSummaryTotal: 'Total',
|
|
37
|
-
orderSummarySubmit: 'Submit'
|
|
30
|
+
orderSummarySubmit: 'Submit',
|
|
31
|
+
lastDrawResultsTitle: 'Last Draw Results',
|
|
32
|
+
modalLogin: 'Please login to submit a ticket',
|
|
38
33
|
},
|
|
39
34
|
ro: {
|
|
40
35
|
error: 'Eroare',
|
|
@@ -43,11 +38,11 @@ const TRANSLATIONS = {
|
|
|
43
38
|
lobbyButton: 'Lobby',
|
|
44
39
|
prize: 'MARELE JACKPOT OMG',
|
|
45
40
|
winUpTo: 'Castiga pana la',
|
|
46
|
-
nextDraw: '
|
|
41
|
+
nextDraw: 'Urmatoarea extragere:',
|
|
47
42
|
buy: 'Cumpara bilet',
|
|
48
43
|
viewLatest: 'Ultimile extrageri',
|
|
49
44
|
createTicket: 'Creeaza bilet',
|
|
50
|
-
modalSuccess: '
|
|
45
|
+
modalSuccess: 'Achizitie efectuata cu succes',
|
|
51
46
|
deleteTicketModalTitle: 'Sterge biletul',
|
|
52
47
|
deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',
|
|
53
48
|
deleteTicketModalCancel: 'Anuleaza',
|
|
@@ -55,7 +50,32 @@ const TRANSLATIONS = {
|
|
|
55
50
|
orderSummaryTitle: 'Rezumat comanda',
|
|
56
51
|
orderSummaryTickets: 'Bilet',
|
|
57
52
|
orderSummaryTotal: 'Total',
|
|
58
|
-
orderSummarySubmit: 'Trimite'
|
|
53
|
+
orderSummarySubmit: 'Trimite',
|
|
54
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
55
|
+
modalLogin: 'Please login to submit a ticket',
|
|
56
|
+
},
|
|
57
|
+
ar: {
|
|
58
|
+
error: 'خطأ',
|
|
59
|
+
title: 'كرونو',
|
|
60
|
+
backButton: 'خلف',
|
|
61
|
+
lobbyButton: 'ردهة',
|
|
62
|
+
prize: 'جائزة',
|
|
63
|
+
winUpTo: 'الفوز بما يصل الى',
|
|
64
|
+
nextDraw: 'السحب التالي:',
|
|
65
|
+
buy: 'اشتري تذاكر',
|
|
66
|
+
viewLatest: 'عرض أحدث النتائج',
|
|
67
|
+
createTicket: 'إنشاء تذكرة',
|
|
68
|
+
modalSuccess: '!سيتم الشراء بنجاح قريبًا',
|
|
69
|
+
deleteTicketModalTitle: 'حذف التذكرة',
|
|
70
|
+
deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',
|
|
71
|
+
deleteTicketModalCancel: 'يلغي',
|
|
72
|
+
deleteTicketModalConfirm: 'حذف',
|
|
73
|
+
orderSummaryTitle: 'ملخص الطلب',
|
|
74
|
+
orderSummaryTickets: 'تذكرة',
|
|
75
|
+
orderSummaryTotal: 'المجموع',
|
|
76
|
+
orderSummarySubmit: 'يُقدِّم',
|
|
77
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
78
|
+
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
59
79
|
},
|
|
60
80
|
};
|
|
61
81
|
const translate = (key, customLang) => {
|
|
@@ -63,7 +83,7 @@ const translate = (key, customLang) => {
|
|
|
63
83
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
64
84
|
};
|
|
65
85
|
|
|
66
|
-
const lotteryGamePageCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#
|
|
86
|
+
const lotteryGamePageCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#F1F1F1;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{background:#00958f;color:#FFF}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;border-bottom:solid 1px #D4D4D4;line-height:50px}.OrderSummary .Ticket span{text-align:right}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}";
|
|
67
87
|
|
|
68
88
|
const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
69
89
|
constructor() {
|
|
@@ -90,6 +110,8 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
90
110
|
this.deleteVisible = false;
|
|
91
111
|
this.latestDraw = {};
|
|
92
112
|
this.totalWinningsAmount = 0;
|
|
113
|
+
this.isLoggedIn = false;
|
|
114
|
+
this.loginModalVisible = false;
|
|
93
115
|
this.multiplier = false;
|
|
94
116
|
this.quickPick = false;
|
|
95
117
|
}
|
|
@@ -97,6 +119,10 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
97
119
|
connectedCallback() {
|
|
98
120
|
this.getGameDetails();
|
|
99
121
|
this.getDraws();
|
|
122
|
+
console.log(this.language);
|
|
123
|
+
if (this.sessionId) {
|
|
124
|
+
this.isLoggedIn = true;
|
|
125
|
+
}
|
|
100
126
|
}
|
|
101
127
|
countdownLogic(date) {
|
|
102
128
|
this.interval = setInterval(() => {
|
|
@@ -123,7 +149,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
123
149
|
this.gameData = data;
|
|
124
150
|
this.basicStake = this.gameData.rules.stakes[0].amount;
|
|
125
151
|
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
126
|
-
console.log('draws', draws);
|
|
127
152
|
this.nextDraw = draws[0].id;
|
|
128
153
|
this.createNewTicket();
|
|
129
154
|
})
|
|
@@ -186,6 +211,7 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
186
211
|
}
|
|
187
212
|
modalCloseEvent() {
|
|
188
213
|
this.deleteVisible = false;
|
|
214
|
+
this.loginModalVisible = false;
|
|
189
215
|
}
|
|
190
216
|
stakeChangeHandler(event) {
|
|
191
217
|
const { ticketId, stake } = event.detail;
|
|
@@ -247,6 +273,9 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
247
273
|
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
248
274
|
];
|
|
249
275
|
}
|
|
276
|
+
showLoginModal() {
|
|
277
|
+
this.loginModalVisible = true;
|
|
278
|
+
}
|
|
250
279
|
submitTickets() {
|
|
251
280
|
let url = new URL(`${this.endpoint}/tickets`);
|
|
252
281
|
// @TODO Body TS type
|
|
@@ -254,7 +283,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
254
283
|
gameId: this.gameId,
|
|
255
284
|
tickets: []
|
|
256
285
|
};
|
|
257
|
-
console.log('body', body);
|
|
258
286
|
this.tickets.forEach((item) => {
|
|
259
287
|
body.tickets.push({
|
|
260
288
|
startingDrawId: this.nextDraw,
|
|
@@ -297,9 +325,11 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
297
325
|
}
|
|
298
326
|
return (
|
|
299
327
|
/* Game details */
|
|
300
|
-
h("div", { class: "GamePage" }, h("div", { class: "GridBanner" }, h("div", { class: "BannerButtonsWrapper" }, h("button", { class: "BannerBackButton" }, h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), h("button", { class: "BannerLobbyButton" }, translate('lobbyButton', this.language))), h("div", { class: "Tabs" }, h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), h("div", { class: "NextDrawWrapper" }, h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), h("div", { class: "NextDraw" }, h("p", { class: "BannerText" }, translate('nextDraw', this.language)), h("div", { class: "BannerCountdown" }, h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
301
|
-
h("div", { class: "GamePageContent" }, h("div", { class: "GameDetails" }, h("lottery-game-details", null)), h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton })), h("div", { class: "CreateNewTicket" }, h("button", { onClick: () => this.createNewTicket() }, "+"), h("span", null, translate('createTicket', this.language)))), h("div", { class: "OrderSummary" }, h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", h("span", null, this.tickets.length)), h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", h("span", null, this.totalAmount, " ", this.currency)), h("div", { class: "ButtonWrapper" },
|
|
302
|
-
|
|
328
|
+
h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr' }, h("div", { class: "GridBanner" }, h("div", { class: "BannerButtonsWrapper" }, h("button", { class: "BannerBackButton" }, h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), h("button", { class: "BannerLobbyButton" }, translate('lobbyButton', this.language))), h("div", { class: "Tabs" }, h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), h("div", { class: "NextDrawWrapper" }, h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), h("div", { class: "NextDraw" }, h("p", { class: "BannerText" }, translate('nextDraw', this.language)), h("div", { class: "BannerCountdown" }, h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
329
|
+
h("div", { class: "GamePageContent" }, h("div", { class: "GameDetails" }, h("lottery-game-details", null)), h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton })), h("div", { class: "CreateNewTicket" }, h("button", { onClick: () => this.createNewTicket() }, "+"), h("span", null, translate('createTicket', this.language)))), h("div", { class: "OrderSummary" }, h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", h("span", null, this.tickets.length)), h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", h("span", null, this.totalAmount, " ", this.currency)), h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
330
|
+
h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
331
|
+
h("div", null, h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)), h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible }, h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
332
|
+
h("div", null, h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)), h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true }), h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language })), h("helper-modal", { "title-modal": "Success", visible: this.successVisible }, h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))), h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible }, h("div", { class: "DeleteTicketModalWrapper" }, h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)), h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)), h("div", { class: "DeleteTicketModalButtons" }, h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate('deleteTicketModalCancel', this.language)), h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate('deleteTicketModalConfirm', this.language)))))));
|
|
303
333
|
}
|
|
304
334
|
static get assetsDirs() { return ["static"]; }
|
|
305
335
|
get element() { return this; }
|
|
@@ -325,75 +355,27 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
325
355
|
"secondsRemaining": [32],
|
|
326
356
|
"latestDraw": [32],
|
|
327
357
|
"totalWinningsAmount": [32],
|
|
328
|
-
"nextDate": [32]
|
|
358
|
+
"nextDate": [32],
|
|
359
|
+
"isLoggedIn": [32],
|
|
360
|
+
"loginModalVisible": [32]
|
|
329
361
|
}, [[0, "ticketCompleted", "gridFilledHandler"], [0, "gridDirty", "gridDirtyHandler"], [0, "deleteTicket", "deleteTicketHandler"], [0, "modalCloseEvent", "modalCloseEvent"], [0, "stakeChange", "stakeChangeHandler"], [0, "multiplierChange", "multiplierChangeHandler"]]]);
|
|
330
362
|
function defineCustomElement$1() {
|
|
331
363
|
if (typeof customElements === "undefined") {
|
|
332
364
|
return;
|
|
333
365
|
}
|
|
334
|
-
const components = ["lottery-game-page", "helper-
|
|
366
|
+
const components = ["lottery-game-page", "helper-modal", "lottery-draw-results"];
|
|
335
367
|
components.forEach(tagName => { switch (tagName) {
|
|
336
368
|
case "lottery-game-page":
|
|
337
369
|
if (!customElements.get(tagName)) {
|
|
338
370
|
customElements.define(tagName, LotteryGamePage$1);
|
|
339
371
|
}
|
|
340
372
|
break;
|
|
341
|
-
case "helper-accordion":
|
|
342
|
-
if (!customElements.get(tagName)) {
|
|
343
|
-
defineCustomElement$d();
|
|
344
|
-
}
|
|
345
|
-
break;
|
|
346
|
-
case "helper-filters":
|
|
347
|
-
if (!customElements.get(tagName)) {
|
|
348
|
-
defineCustomElement$c();
|
|
349
|
-
}
|
|
350
|
-
break;
|
|
351
373
|
case "helper-modal":
|
|
352
|
-
if (!customElements.get(tagName)) {
|
|
353
|
-
defineCustomElement$b();
|
|
354
|
-
}
|
|
355
|
-
break;
|
|
356
|
-
case "helper-tab":
|
|
357
|
-
if (!customElements.get(tagName)) {
|
|
358
|
-
defineCustomElement$a();
|
|
359
|
-
}
|
|
360
|
-
break;
|
|
361
|
-
case "helper-tabs":
|
|
362
|
-
if (!customElements.get(tagName)) {
|
|
363
|
-
defineCustomElement$9();
|
|
364
|
-
}
|
|
365
|
-
break;
|
|
366
|
-
case "lottery-bullet":
|
|
367
|
-
if (!customElements.get(tagName)) {
|
|
368
|
-
defineCustomElement$8();
|
|
369
|
-
}
|
|
370
|
-
break;
|
|
371
|
-
case "lottery-draw-results":
|
|
372
|
-
if (!customElements.get(tagName)) {
|
|
373
|
-
defineCustomElement$7();
|
|
374
|
-
}
|
|
375
|
-
break;
|
|
376
|
-
case "lottery-draw-results-history":
|
|
377
|
-
if (!customElements.get(tagName)) {
|
|
378
|
-
defineCustomElement$6();
|
|
379
|
-
}
|
|
380
|
-
break;
|
|
381
|
-
case "lottery-game-details":
|
|
382
|
-
if (!customElements.get(tagName)) {
|
|
383
|
-
defineCustomElement$5();
|
|
384
|
-
}
|
|
385
|
-
break;
|
|
386
|
-
case "lottery-grid":
|
|
387
|
-
if (!customElements.get(tagName)) {
|
|
388
|
-
defineCustomElement$4();
|
|
389
|
-
}
|
|
390
|
-
break;
|
|
391
|
-
case "lottery-ticket":
|
|
392
374
|
if (!customElements.get(tagName)) {
|
|
393
375
|
defineCustomElement$3();
|
|
394
376
|
}
|
|
395
377
|
break;
|
|
396
|
-
case "lottery-
|
|
378
|
+
case "lottery-draw-results":
|
|
397
379
|
if (!customElements.get(tagName)) {
|
|
398
380
|
defineCustomElement$2();
|
|
399
381
|
}
|
|
@@ -28,7 +28,7 @@ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
|
28
28
|
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
29
29
|
if (listeners) {
|
|
30
30
|
listeners.map(([flags, name, method]) => {
|
|
31
|
-
const target =
|
|
31
|
+
const target = elm;
|
|
32
32
|
const handler = hostListenerProxy(hostRef, method);
|
|
33
33
|
const opts = hostListenerOpts(flags);
|
|
34
34
|
plt.ael(target, name, handler, opts);
|
|
@@ -52,11 +52,6 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
52
52
|
consoleError(e);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
56
|
-
if (flags & 4 /* TargetDocument */)
|
|
57
|
-
return doc;
|
|
58
|
-
return elm;
|
|
59
|
-
};
|
|
60
55
|
// prettier-ignore
|
|
61
56
|
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
62
57
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
@@ -88,7 +83,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
88
83
|
};
|
|
89
84
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
90
85
|
let scopeId = getScopeId(cmpMeta);
|
|
91
|
-
|
|
86
|
+
let style = styles.get(scopeId);
|
|
92
87
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
93
88
|
// so the fallback is to always use the document for the root node in those cases
|
|
94
89
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -168,7 +163,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
168
163
|
let child = null;
|
|
169
164
|
let simple = false;
|
|
170
165
|
let lastSimple = false;
|
|
171
|
-
|
|
166
|
+
let vNodeChildren = [];
|
|
172
167
|
const walk = (c) => {
|
|
173
168
|
for (let i = 0; i < c.length; i++) {
|
|
174
169
|
child = c[i];
|
|
@@ -291,7 +286,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
291
286
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
292
287
|
try {
|
|
293
288
|
if (!elm.tagName.includes('-')) {
|
|
294
|
-
|
|
289
|
+
let n = newValue == null ? '' : newValue;
|
|
295
290
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
296
291
|
if (memberName === 'list') {
|
|
297
292
|
isProp = false;
|
|
@@ -348,7 +343,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
348
343
|
};
|
|
349
344
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
350
345
|
// tslint:disable-next-line: prefer-const
|
|
351
|
-
|
|
346
|
+
let newVNode = newParentVNode.$children$[childIndex];
|
|
352
347
|
let i = 0;
|
|
353
348
|
let elm;
|
|
354
349
|
let childNode;
|
|
@@ -602,9 +597,6 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
602
597
|
}
|
|
603
598
|
}
|
|
604
599
|
}
|
|
605
|
-
{
|
|
606
|
-
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
607
|
-
}
|
|
608
600
|
endSchedule();
|
|
609
601
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
610
602
|
};
|
|
@@ -781,7 +773,6 @@ const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propNam
|
|
|
781
773
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
782
774
|
// check our new property value against our internal value
|
|
783
775
|
const hostRef = getHostRef(ref);
|
|
784
|
-
const elm = hostRef.$hostElement$ ;
|
|
785
776
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
786
777
|
const flags = hostRef.$flags$;
|
|
787
778
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -794,22 +785,6 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
794
785
|
// set our new value!
|
|
795
786
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
796
787
|
if (instance) {
|
|
797
|
-
// get an array of method names of watch functions to call
|
|
798
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
799
|
-
const watchMethods = cmpMeta.$watchers$[propName];
|
|
800
|
-
if (watchMethods) {
|
|
801
|
-
// this instance is watching for when this property changed
|
|
802
|
-
watchMethods.map((watchMethodName) => {
|
|
803
|
-
try {
|
|
804
|
-
// fire off each of the watch methods that are watching this property
|
|
805
|
-
instance[watchMethodName](newVal, oldVal, propName);
|
|
806
|
-
}
|
|
807
|
-
catch (e) {
|
|
808
|
-
consoleError(e, elm);
|
|
809
|
-
}
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
788
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
814
789
|
// looks like this value actually changed, so we've got work to do!
|
|
815
790
|
// but only if we've already rendered, otherwise just chill out
|
|
@@ -822,9 +797,6 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
822
797
|
};
|
|
823
798
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
824
799
|
if (cmpMeta.$members$) {
|
|
825
|
-
if (Cstr.watchers) {
|
|
826
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
827
|
-
}
|
|
828
800
|
// It's better to have a const than two Object.entries()
|
|
829
801
|
const members = Object.entries(cmpMeta.$members$);
|
|
830
802
|
const prototype = Cstr.prototype;
|
|
@@ -932,12 +904,6 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
932
904
|
endLoad();
|
|
933
905
|
}
|
|
934
906
|
if (!Cstr.isProxied) {
|
|
935
|
-
// we've never proxied this Constructor before
|
|
936
|
-
// let's add the getters/setters to its prototype before
|
|
937
|
-
// the first time we create an instance of the implementation
|
|
938
|
-
{
|
|
939
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
940
|
-
}
|
|
941
907
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
942
908
|
Cstr.isProxied = true;
|
|
943
909
|
}
|
|
@@ -961,9 +927,6 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
961
927
|
{
|
|
962
928
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
963
929
|
}
|
|
964
|
-
{
|
|
965
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
966
|
-
}
|
|
967
930
|
endNewInstance();
|
|
968
931
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
969
932
|
}
|
|
@@ -1093,9 +1056,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1093
1056
|
{
|
|
1094
1057
|
cmpMeta.$attrsToReflect$ = [];
|
|
1095
1058
|
}
|
|
1096
|
-
{
|
|
1097
|
-
cmpMeta.$watchers$ = {};
|
|
1098
|
-
}
|
|
1099
1059
|
const tagName = cmpMeta.$tagName$;
|
|
1100
1060
|
const HostElement = class extends HTMLElement {
|
|
1101
1061
|
// StencilLazyHost
|
|
@@ -1190,9 +1150,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1190
1150
|
if (module) {
|
|
1191
1151
|
return module[exportName];
|
|
1192
1152
|
}
|
|
1193
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1194
1153
|
return import(
|
|
1195
|
-
/* @vite-ignore */
|
|
1196
1154
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1197
1155
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1198
1156
|
/* webpackMode: "lazy" */
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-0fa076cd.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
4
|
+
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchEsm = () => {
|
|
7
7
|
return promiseResolve();
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["
|
|
13
|
+
return bootstrapLazy([["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]],["lottery-draw-results",[[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"],"multiplier":[32],"isLoading":[32],"drawResults":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32]}]]],["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"],"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]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|