@everymatrix/lottery-game-page 0.0.16 → 0.1.0
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_2.cjs.entry.js +124 -0
- package/dist/cjs/helper-modal.cjs.entry.js +1 -1
- package/dist/cjs/helper-tab.cjs.entry.js +11 -8
- package/dist/cjs/{index-81cb3b3b.js → index-614098f4.js} +5 -47
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/lottery-game-details.cjs.entry.js +1 -1
- 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 -49
- 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/helper-accordion2.js +7 -2
- package/dist/components/helper-tab2.js +12 -8
- package/dist/components/helper-tabs2.js +1 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +0 -14
- package/dist/components/lottery-game-page.js +65 -65
- package/dist/esm/helper-accordion_2.entry.js +119 -0
- package/dist/esm/helper-modal.entry.js +1 -1
- package/dist/esm/helper-tab.entry.js +11 -8
- package/dist/esm/{index-be84da79.js → index-0fa076cd.js} +5 -47
- package/dist/esm/loader.js +3 -3
- package/dist/esm/lottery-game-details.entry.js +1 -1
- 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-74eea5ec.entry.js +1 -0
- package/dist/lottery-game-page/p-75f13007.entry.js +1 -0
- package/dist/lottery-game-page/p-97d1602e.entry.js +1 -0
- package/dist/lottery-game-page/{p-a1dd3eb2.entry.js → p-d04141f7.entry.js} +1 -1
- 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-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-ticket-controller.cjs.entry.js +0 -69
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -146
- 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/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-draw-results.js +0 -6
- package/dist/components/lottery-draw-results2.js +0 -218
- 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-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-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-caf09eaf.entry.js +0 -1
|
@@ -1,19 +1,15 @@
|
|
|
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
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
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-draw-results-history';
|
|
4
|
+
import '@everymatrix/lottery-draw-results';
|
|
5
|
+
import { d as defineCustomElement$6 } from './helper-accordion2.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './helper-modal2.js';
|
|
7
|
+
import { d as defineCustomElement$4 } from './helper-tab2.js';
|
|
8
|
+
import { d as defineCustomElement$3 } from './helper-tabs2.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './lottery-game-details2.js';
|
|
14
10
|
|
|
15
11
|
const DEFAULT_LANGUAGE = 'en';
|
|
16
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
12
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'ar'];
|
|
17
13
|
const TRANSLATIONS = {
|
|
18
14
|
en: {
|
|
19
15
|
error: 'Error',
|
|
@@ -26,7 +22,7 @@ const TRANSLATIONS = {
|
|
|
26
22
|
buy: 'Buy tickets',
|
|
27
23
|
viewLatest: 'View latest results',
|
|
28
24
|
createTicket: 'Create Ticket',
|
|
29
|
-
modalSuccess: 'Purchase
|
|
25
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
30
26
|
deleteTicketModalTitle: 'Delete Ticket',
|
|
31
27
|
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
32
28
|
deleteTicketModalCancel: 'Cancel',
|
|
@@ -34,7 +30,9 @@ const TRANSLATIONS = {
|
|
|
34
30
|
orderSummaryTitle: 'Order Summary',
|
|
35
31
|
orderSummaryTickets: 'Ticket',
|
|
36
32
|
orderSummaryTotal: 'Total',
|
|
37
|
-
orderSummarySubmit: 'Submit'
|
|
33
|
+
orderSummarySubmit: 'Submit',
|
|
34
|
+
lastDrawResultsTitle: 'Last Draw Results',
|
|
35
|
+
modalLogin: 'Please login to submit a ticket',
|
|
38
36
|
},
|
|
39
37
|
ro: {
|
|
40
38
|
error: 'Eroare',
|
|
@@ -43,11 +41,11 @@ const TRANSLATIONS = {
|
|
|
43
41
|
lobbyButton: 'Lobby',
|
|
44
42
|
prize: 'MARELE JACKPOT OMG',
|
|
45
43
|
winUpTo: 'Castiga pana la',
|
|
46
|
-
nextDraw: '
|
|
44
|
+
nextDraw: 'Urmatoarea extragere:',
|
|
47
45
|
buy: 'Cumpara bilet',
|
|
48
46
|
viewLatest: 'Ultimile extrageri',
|
|
49
47
|
createTicket: 'Creeaza bilet',
|
|
50
|
-
modalSuccess: '
|
|
48
|
+
modalSuccess: 'Achizitie efectuata cu succes',
|
|
51
49
|
deleteTicketModalTitle: 'Sterge biletul',
|
|
52
50
|
deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',
|
|
53
51
|
deleteTicketModalCancel: 'Anuleaza',
|
|
@@ -55,7 +53,32 @@ const TRANSLATIONS = {
|
|
|
55
53
|
orderSummaryTitle: 'Rezumat comanda',
|
|
56
54
|
orderSummaryTickets: 'Bilet',
|
|
57
55
|
orderSummaryTotal: 'Total',
|
|
58
|
-
orderSummarySubmit: 'Trimite'
|
|
56
|
+
orderSummarySubmit: 'Trimite',
|
|
57
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
58
|
+
modalLogin: 'Please login to submit a ticket',
|
|
59
|
+
},
|
|
60
|
+
ar: {
|
|
61
|
+
error: 'خطأ',
|
|
62
|
+
title: 'كرونو',
|
|
63
|
+
backButton: 'خلف',
|
|
64
|
+
lobbyButton: 'ردهة',
|
|
65
|
+
prize: 'جائزة',
|
|
66
|
+
winUpTo: 'الفوز بما يصل الى',
|
|
67
|
+
nextDraw: 'السحب التالي:',
|
|
68
|
+
buy: 'اشتري تذاكر',
|
|
69
|
+
viewLatest: 'عرض أحدث النتائج',
|
|
70
|
+
createTicket: 'إنشاء تذكرة',
|
|
71
|
+
modalSuccess: '!سيتم الشراء بنجاح قريبًا',
|
|
72
|
+
deleteTicketModalTitle: 'حذف التذكرة',
|
|
73
|
+
deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',
|
|
74
|
+
deleteTicketModalCancel: 'يلغي',
|
|
75
|
+
deleteTicketModalConfirm: 'حذف',
|
|
76
|
+
orderSummaryTitle: 'ملخص الطلب',
|
|
77
|
+
orderSummaryTickets: 'تذكرة',
|
|
78
|
+
orderSummaryTotal: 'المجموع',
|
|
79
|
+
orderSummarySubmit: 'يُقدِّم',
|
|
80
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
81
|
+
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
59
82
|
},
|
|
60
83
|
};
|
|
61
84
|
const translate = (key, customLang) => {
|
|
@@ -63,7 +86,7 @@ const translate = (key, customLang) => {
|
|
|
63
86
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
64
87
|
};
|
|
65
88
|
|
|
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:#
|
|
89
|
+
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
90
|
|
|
68
91
|
const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
69
92
|
constructor() {
|
|
@@ -90,6 +113,8 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
90
113
|
this.deleteVisible = false;
|
|
91
114
|
this.latestDraw = {};
|
|
92
115
|
this.totalWinningsAmount = 0;
|
|
116
|
+
this.isLoggedIn = false;
|
|
117
|
+
this.loginModalVisible = false;
|
|
93
118
|
this.multiplier = false;
|
|
94
119
|
this.quickPick = false;
|
|
95
120
|
}
|
|
@@ -97,6 +122,10 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
97
122
|
connectedCallback() {
|
|
98
123
|
this.getGameDetails();
|
|
99
124
|
this.getDraws();
|
|
125
|
+
console.log(this.language);
|
|
126
|
+
if (this.sessionId) {
|
|
127
|
+
this.isLoggedIn = true;
|
|
128
|
+
}
|
|
100
129
|
}
|
|
101
130
|
countdownLogic(date) {
|
|
102
131
|
this.interval = setInterval(() => {
|
|
@@ -123,7 +152,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
123
152
|
this.gameData = data;
|
|
124
153
|
this.basicStake = this.gameData.rules.stakes[0].amount;
|
|
125
154
|
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
126
|
-
console.log('draws', draws);
|
|
127
155
|
this.nextDraw = draws[0].id;
|
|
128
156
|
this.createNewTicket();
|
|
129
157
|
})
|
|
@@ -186,6 +214,7 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
186
214
|
}
|
|
187
215
|
modalCloseEvent() {
|
|
188
216
|
this.deleteVisible = false;
|
|
217
|
+
this.loginModalVisible = false;
|
|
189
218
|
}
|
|
190
219
|
stakeChangeHandler(event) {
|
|
191
220
|
const { ticketId, stake } = event.detail;
|
|
@@ -247,6 +276,9 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
247
276
|
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
248
277
|
];
|
|
249
278
|
}
|
|
279
|
+
showLoginModal() {
|
|
280
|
+
this.loginModalVisible = true;
|
|
281
|
+
}
|
|
250
282
|
submitTickets() {
|
|
251
283
|
let url = new URL(`${this.endpoint}/tickets`);
|
|
252
284
|
// @TODO Body TS type
|
|
@@ -254,7 +286,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
254
286
|
gameId: this.gameId,
|
|
255
287
|
tickets: []
|
|
256
288
|
};
|
|
257
|
-
console.log('body', body);
|
|
258
289
|
this.tickets.forEach((item) => {
|
|
259
290
|
body.tickets.push({
|
|
260
291
|
startingDrawId: this.nextDraw,
|
|
@@ -297,9 +328,11 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
297
328
|
}
|
|
298
329
|
return (
|
|
299
330
|
/* 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
|
-
|
|
331
|
+
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 &&
|
|
332
|
+
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 &&
|
|
333
|
+
h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
334
|
+
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 &&
|
|
335
|
+
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
336
|
}
|
|
304
337
|
static get assetsDirs() { return ["static"]; }
|
|
305
338
|
get element() { return this; }
|
|
@@ -325,13 +358,15 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
325
358
|
"secondsRemaining": [32],
|
|
326
359
|
"latestDraw": [32],
|
|
327
360
|
"totalWinningsAmount": [32],
|
|
328
|
-
"nextDate": [32]
|
|
361
|
+
"nextDate": [32],
|
|
362
|
+
"isLoggedIn": [32],
|
|
363
|
+
"loginModalVisible": [32]
|
|
329
364
|
}, [[0, "ticketCompleted", "gridFilledHandler"], [0, "gridDirty", "gridDirtyHandler"], [0, "deleteTicket", "deleteTicketHandler"], [0, "modalCloseEvent", "modalCloseEvent"], [0, "stakeChange", "stakeChangeHandler"], [0, "multiplierChange", "multiplierChangeHandler"]]]);
|
|
330
365
|
function defineCustomElement$1() {
|
|
331
366
|
if (typeof customElements === "undefined") {
|
|
332
367
|
return;
|
|
333
368
|
}
|
|
334
|
-
const components = ["lottery-game-page", "helper-accordion", "helper-
|
|
369
|
+
const components = ["lottery-game-page", "helper-accordion", "helper-modal", "helper-tab", "helper-tabs", "lottery-game-details"];
|
|
335
370
|
components.forEach(tagName => { switch (tagName) {
|
|
336
371
|
case "lottery-game-page":
|
|
337
372
|
if (!customElements.get(tagName)) {
|
|
@@ -339,61 +374,26 @@ function defineCustomElement$1() {
|
|
|
339
374
|
}
|
|
340
375
|
break;
|
|
341
376
|
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
|
-
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
377
|
if (!customElements.get(tagName)) {
|
|
378
378
|
defineCustomElement$6();
|
|
379
379
|
}
|
|
380
380
|
break;
|
|
381
|
-
case "
|
|
381
|
+
case "helper-modal":
|
|
382
382
|
if (!customElements.get(tagName)) {
|
|
383
383
|
defineCustomElement$5();
|
|
384
384
|
}
|
|
385
385
|
break;
|
|
386
|
-
case "
|
|
386
|
+
case "helper-tab":
|
|
387
387
|
if (!customElements.get(tagName)) {
|
|
388
388
|
defineCustomElement$4();
|
|
389
389
|
}
|
|
390
390
|
break;
|
|
391
|
-
case "
|
|
391
|
+
case "helper-tabs":
|
|
392
392
|
if (!customElements.get(tagName)) {
|
|
393
393
|
defineCustomElement$3();
|
|
394
394
|
}
|
|
395
395
|
break;
|
|
396
|
-
case "lottery-
|
|
396
|
+
case "lottery-game-details":
|
|
397
397
|
if (!customElements.get(tagName)) {
|
|
398
398
|
defineCustomElement$2();
|
|
399
399
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-0fa076cd.js';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
deleteTicket: 'Delete ticket'
|
|
8
|
+
},
|
|
9
|
+
ro: {
|
|
10
|
+
deleteTicket: 'Sterge biletul'
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
const translate = (key, customLang) => {
|
|
14
|
+
const lang = customLang;
|
|
15
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.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}";
|
|
19
|
+
|
|
20
|
+
const Accordion = class {
|
|
21
|
+
constructor(hostRef) {
|
|
22
|
+
registerInstance(this, hostRef);
|
|
23
|
+
this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
|
|
24
|
+
/**
|
|
25
|
+
* Flag for ticket history
|
|
26
|
+
*/
|
|
27
|
+
this.ticketHistoryFlag = false;
|
|
28
|
+
/**
|
|
29
|
+
* Title (top header)
|
|
30
|
+
*/
|
|
31
|
+
this.headerTitle = '';
|
|
32
|
+
/**
|
|
33
|
+
* SubTitle (top header)
|
|
34
|
+
*/
|
|
35
|
+
this.headerSubtitle = '';
|
|
36
|
+
/**
|
|
37
|
+
* Description
|
|
38
|
+
*/
|
|
39
|
+
this.description = '';
|
|
40
|
+
/**
|
|
41
|
+
* Enables footer content
|
|
42
|
+
*/
|
|
43
|
+
this.footer = false;
|
|
44
|
+
/**
|
|
45
|
+
* Enables footer button for tab deletion
|
|
46
|
+
*/
|
|
47
|
+
this.deleteTab = false;
|
|
48
|
+
/**
|
|
49
|
+
* Activates postMessages as events for actions from the widget
|
|
50
|
+
*/
|
|
51
|
+
this.postMessage = false;
|
|
52
|
+
/**
|
|
53
|
+
* Name of the event emitter by the action button
|
|
54
|
+
*/
|
|
55
|
+
this.eventName = 'helperAccordionAction';
|
|
56
|
+
/**
|
|
57
|
+
* Collapsed
|
|
58
|
+
*/
|
|
59
|
+
this.collapsed = true;
|
|
60
|
+
/**
|
|
61
|
+
* Language
|
|
62
|
+
*/
|
|
63
|
+
this.language = 'en';
|
|
64
|
+
}
|
|
65
|
+
// @TODO fix the `any` type :)
|
|
66
|
+
connectedCallback() {
|
|
67
|
+
this.showContent = !this.collapsed;
|
|
68
|
+
}
|
|
69
|
+
toggleContent() {
|
|
70
|
+
this.showContent = !this.showContent;
|
|
71
|
+
}
|
|
72
|
+
deleteAction() {
|
|
73
|
+
if (this.postMessage) {
|
|
74
|
+
// @TODO maybe change the name type, this one sucks
|
|
75
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
76
|
+
}
|
|
77
|
+
this.accordionEvent.emit();
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
81
|
+
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
82
|
+
h("div", null, this.deleteTab &&
|
|
83
|
+
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
Accordion.style = helperAccordionCss;
|
|
87
|
+
|
|
88
|
+
const helperTabsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}";
|
|
89
|
+
|
|
90
|
+
const HelperTabs = class {
|
|
91
|
+
constructor(hostRef) {
|
|
92
|
+
registerInstance(this, hostRef);
|
|
93
|
+
/**
|
|
94
|
+
* Tell me if it is disabled
|
|
95
|
+
*/
|
|
96
|
+
this.disabled = false;
|
|
97
|
+
/**
|
|
98
|
+
* Tell me what tab is selected
|
|
99
|
+
*/
|
|
100
|
+
this.selected = false;
|
|
101
|
+
/**
|
|
102
|
+
* Default selected index
|
|
103
|
+
*/
|
|
104
|
+
this.selectedIndex = 0;
|
|
105
|
+
/**
|
|
106
|
+
* Tabs details
|
|
107
|
+
*/
|
|
108
|
+
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
109
|
+
}
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
}
|
|
112
|
+
render() {
|
|
113
|
+
return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
|
|
114
|
+
}
|
|
115
|
+
get host() { return getElement(this); }
|
|
116
|
+
};
|
|
117
|
+
HelperTabs.style = helperTabsCss;
|
|
118
|
+
|
|
119
|
+
export { Accordion as helper_accordion, HelperTabs as helper_tabs };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-0fa076cd.js';
|
|
2
2
|
|
|
3
|
-
const helperTabCss = ":host{display:block}";
|
|
3
|
+
const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
|
|
4
4
|
|
|
5
5
|
const HelperTab = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -9,19 +9,22 @@ const HelperTab = class {
|
|
|
9
9
|
* Selected index
|
|
10
10
|
*/
|
|
11
11
|
this.selectedIndex = 0;
|
|
12
|
+
this.tabContent = '';
|
|
12
13
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Endpoing for CMS
|
|
15
|
-
*/
|
|
16
14
|
connectedCallback() {
|
|
17
15
|
/**
|
|
18
16
|
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
19
17
|
*/
|
|
20
18
|
}
|
|
21
19
|
render() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
this.tabContent = h("div", { class: "TabContent" }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
|
|
21
|
+
if (this.selectedIndex + 1 == 2) {
|
|
22
|
+
this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
|
|
23
|
+
}
|
|
24
|
+
else if (this.selectedIndex + 1 == 3) {
|
|
25
|
+
this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
|
|
26
|
+
}
|
|
27
|
+
return (this.tabContent);
|
|
25
28
|
}
|
|
26
29
|
};
|
|
27
30
|
HelperTab.style = helperTabCss;
|
|
@@ -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-tab",[[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]],["helper-accordion_2",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[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],"showContent":[32]}]]],["lottery-game-details",[[1,"lottery-game-details"]]],["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540]}]]],["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
|
|