@everymatrix/lottery-game-page 0.0.19 → 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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
],
|
|
5
5
|
"compiler": {
|
|
6
6
|
"name": "@stencil/core",
|
|
7
|
-
"version": "2.
|
|
7
|
+
"version": "2.15.2",
|
|
8
8
|
"typescriptVersion": "4.5.4"
|
|
9
9
|
},
|
|
10
10
|
"collections": [
|
|
@@ -14,24 +14,12 @@
|
|
|
14
14
|
"helper-accordion"
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
|
-
{
|
|
18
|
-
"name": "@everymatrix/helper-filters",
|
|
19
|
-
"tags": [
|
|
20
|
-
"helper-filters"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
17
|
{
|
|
24
18
|
"name": "@everymatrix/helper-modal",
|
|
25
19
|
"tags": [
|
|
26
20
|
"helper-modal"
|
|
27
21
|
]
|
|
28
22
|
},
|
|
29
|
-
{
|
|
30
|
-
"name": "@everymatrix/helper-pagination",
|
|
31
|
-
"tags": [
|
|
32
|
-
"helper-pagination"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
23
|
{
|
|
36
24
|
"name": "@everymatrix/helper-tabs",
|
|
37
25
|
"tags": [
|
|
@@ -39,47 +27,11 @@
|
|
|
39
27
|
"helper-tabs"
|
|
40
28
|
]
|
|
41
29
|
},
|
|
42
|
-
{
|
|
43
|
-
"name": "@everymatrix/lottery-bullet",
|
|
44
|
-
"tags": [
|
|
45
|
-
"lottery-bullet"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "@everymatrix/lottery-draw-results",
|
|
50
|
-
"tags": [
|
|
51
|
-
"lottery-draw-results"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "@everymatrix/lottery-draw-results-history",
|
|
56
|
-
"tags": [
|
|
57
|
-
"lottery-draw-results-history"
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
30
|
{
|
|
61
31
|
"name": "@everymatrix/lottery-game-details",
|
|
62
32
|
"tags": [
|
|
63
33
|
"lottery-game-details"
|
|
64
34
|
]
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "@everymatrix/lottery-grid",
|
|
68
|
-
"tags": [
|
|
69
|
-
"lottery-grid"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "@everymatrix/lottery-ticket",
|
|
74
|
-
"tags": [
|
|
75
|
-
"lottery-ticket"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": "@everymatrix/lottery-ticket-controller",
|
|
80
|
-
"tags": [
|
|
81
|
-
"lottery-ticket-controller"
|
|
82
|
-
]
|
|
83
35
|
}
|
|
84
36
|
],
|
|
85
37
|
"bundles": [
|
|
@@ -36,16 +36,17 @@
|
|
|
36
36
|
align-items: center;
|
|
37
37
|
}
|
|
38
38
|
.GamePage .TotalWinnings {
|
|
39
|
-
color: #
|
|
39
|
+
color: #000;
|
|
40
40
|
font-size: 18px;
|
|
41
41
|
display: flex;
|
|
42
|
-
flex-direction:
|
|
42
|
+
flex-direction: row;
|
|
43
43
|
justify-content: center;
|
|
44
44
|
align-items: center;
|
|
45
45
|
gap: 10px;
|
|
46
|
+
text-transform: uppercase;
|
|
46
47
|
}
|
|
47
48
|
.GamePage .TotalWinnings span {
|
|
48
|
-
font-size:
|
|
49
|
+
font-size: 18px;
|
|
49
50
|
font-weight: 700;
|
|
50
51
|
}
|
|
51
52
|
.GamePage .NextDraw {
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
font-weight: 600;
|
|
55
56
|
margin: 0 auto;
|
|
56
57
|
text-align: center;
|
|
57
|
-
text-transform:
|
|
58
|
+
text-transform: uppercase;
|
|
58
59
|
display: flex;
|
|
59
60
|
justify-content: center;
|
|
60
61
|
align-items: center;
|
|
@@ -63,6 +64,9 @@
|
|
|
63
64
|
.GamePage .NextDraw .BannerText {
|
|
64
65
|
font-weight: 400;
|
|
65
66
|
font-size: 18px;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
padding: 0;
|
|
69
|
+
margin: 15px 0 0 0;
|
|
66
70
|
}
|
|
67
71
|
.GamePage .NextDraw .BannerCountdown {
|
|
68
72
|
font-size: 22px;
|
|
@@ -95,9 +99,21 @@
|
|
|
95
99
|
color: #FFF;
|
|
96
100
|
}
|
|
97
101
|
|
|
102
|
+
.LastDrawResultsTitle {
|
|
103
|
+
color: #009993;
|
|
104
|
+
padding: 25px 0 10px 0;
|
|
105
|
+
text-align: center;
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
98
113
|
.NextDrawWrapper {
|
|
99
114
|
padding: 10px 15px;
|
|
100
|
-
background: #
|
|
115
|
+
background: #F1F1F1;
|
|
116
|
+
background: linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%);
|
|
101
117
|
}
|
|
102
118
|
.NextDrawWrapper .BannerText {
|
|
103
119
|
font-size: 16px;
|
|
@@ -114,7 +130,7 @@
|
|
|
114
130
|
}
|
|
115
131
|
|
|
116
132
|
.GamePageContent {
|
|
117
|
-
padding:
|
|
133
|
+
padding: 15px;
|
|
118
134
|
max-width: 1200px;
|
|
119
135
|
margin: 0 auto;
|
|
120
136
|
}
|
|
@@ -122,7 +138,6 @@
|
|
|
122
138
|
.GameDetails {
|
|
123
139
|
padding-bottom: 10px;
|
|
124
140
|
margin-bottom: 20px;
|
|
125
|
-
border-bottom: 1px solid #e9e9e9;
|
|
126
141
|
}
|
|
127
142
|
|
|
128
143
|
.CreateNewTicket {
|
|
@@ -221,6 +236,11 @@
|
|
|
221
236
|
.ButtonWrapper .Button:hover {
|
|
222
237
|
background: #00ABA4;
|
|
223
238
|
}
|
|
239
|
+
.ButtonWrapper .Button.ButtonDisabled {
|
|
240
|
+
pointer-events: none;
|
|
241
|
+
background: #ccc;
|
|
242
|
+
border: 1px solid #ccc;
|
|
243
|
+
}
|
|
224
244
|
|
|
225
245
|
.SubmitModalSuccess {
|
|
226
246
|
text-align: center;
|
|
@@ -28,6 +28,8 @@ export class LotteryGamePage {
|
|
|
28
28
|
this.deleteVisible = false;
|
|
29
29
|
this.latestDraw = {};
|
|
30
30
|
this.totalWinningsAmount = 0;
|
|
31
|
+
this.isLoggedIn = false;
|
|
32
|
+
this.loginModalVisible = false;
|
|
31
33
|
this.multiplier = false;
|
|
32
34
|
this.quickPick = false;
|
|
33
35
|
}
|
|
@@ -35,6 +37,10 @@ export class LotteryGamePage {
|
|
|
35
37
|
connectedCallback() {
|
|
36
38
|
this.getGameDetails();
|
|
37
39
|
this.getDraws();
|
|
40
|
+
console.log(this.language);
|
|
41
|
+
if (this.sessionId) {
|
|
42
|
+
this.isLoggedIn = true;
|
|
43
|
+
}
|
|
38
44
|
}
|
|
39
45
|
countdownLogic(date) {
|
|
40
46
|
this.interval = setInterval(() => {
|
|
@@ -61,7 +67,6 @@ export class LotteryGamePage {
|
|
|
61
67
|
this.gameData = data;
|
|
62
68
|
this.basicStake = this.gameData.rules.stakes[0].amount;
|
|
63
69
|
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
64
|
-
console.log('draws', draws);
|
|
65
70
|
this.nextDraw = draws[0].id;
|
|
66
71
|
this.createNewTicket();
|
|
67
72
|
})
|
|
@@ -124,6 +129,7 @@ export class LotteryGamePage {
|
|
|
124
129
|
}
|
|
125
130
|
modalCloseEvent() {
|
|
126
131
|
this.deleteVisible = false;
|
|
132
|
+
this.loginModalVisible = false;
|
|
127
133
|
}
|
|
128
134
|
stakeChangeHandler(event) {
|
|
129
135
|
const { ticketId, stake } = event.detail;
|
|
@@ -185,6 +191,9 @@ export class LotteryGamePage {
|
|
|
185
191
|
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
186
192
|
];
|
|
187
193
|
}
|
|
194
|
+
showLoginModal() {
|
|
195
|
+
this.loginModalVisible = true;
|
|
196
|
+
}
|
|
188
197
|
submitTickets() {
|
|
189
198
|
let url = new URL(`${this.endpoint}/tickets`);
|
|
190
199
|
// @TODO Body TS type
|
|
@@ -192,7 +201,6 @@ export class LotteryGamePage {
|
|
|
192
201
|
gameId: this.gameId,
|
|
193
202
|
tickets: []
|
|
194
203
|
};
|
|
195
|
-
console.log('body', body);
|
|
196
204
|
this.tickets.forEach((item) => {
|
|
197
205
|
body.tickets.push({
|
|
198
206
|
startingDrawId: this.nextDraw,
|
|
@@ -236,7 +244,7 @@ export class LotteryGamePage {
|
|
|
236
244
|
}
|
|
237
245
|
return (
|
|
238
246
|
/* Game details */
|
|
239
|
-
h("div", { class: "GamePage" },
|
|
247
|
+
h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr' },
|
|
240
248
|
h("div", { class: "GridBanner" },
|
|
241
249
|
h("div", { class: "BannerButtonsWrapper" },
|
|
242
250
|
h("button", { class: "BannerBackButton" },
|
|
@@ -291,9 +299,16 @@ export class LotteryGamePage {
|
|
|
291
299
|
" ",
|
|
292
300
|
this.currency)),
|
|
293
301
|
h("div", { class: "ButtonWrapper" },
|
|
294
|
-
|
|
302
|
+
this.isLoggedIn &&
|
|
303
|
+
h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)),
|
|
304
|
+
!this.isLoggedIn &&
|
|
305
|
+
h("div", null,
|
|
306
|
+
h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)),
|
|
307
|
+
h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible },
|
|
308
|
+
h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))),
|
|
295
309
|
this.tabIndex == 1 &&
|
|
296
310
|
h("div", null,
|
|
311
|
+
h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)),
|
|
297
312
|
h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true }),
|
|
298
313
|
h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language })),
|
|
299
314
|
h("helper-modal", { "title-modal": "Success", visible: this.successVisible },
|
|
@@ -453,7 +468,9 @@ export class LotteryGamePage {
|
|
|
453
468
|
"secondsRemaining": {},
|
|
454
469
|
"latestDraw": {},
|
|
455
470
|
"totalWinningsAmount": {},
|
|
456
|
-
"nextDate": {}
|
|
471
|
+
"nextDate": {},
|
|
472
|
+
"isLoggedIn": {},
|
|
473
|
+
"loginModalVisible": {}
|
|
457
474
|
}; }
|
|
458
475
|
static get elementRef() { return "element"; }
|
|
459
476
|
static get listeners() { return [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'ar'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
4
|
en: {
|
|
5
5
|
error: 'Error',
|
|
@@ -12,7 +12,7 @@ const TRANSLATIONS = {
|
|
|
12
12
|
buy: 'Buy tickets',
|
|
13
13
|
viewLatest: 'View latest results',
|
|
14
14
|
createTicket: 'Create Ticket',
|
|
15
|
-
modalSuccess: 'Purchase
|
|
15
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
16
16
|
deleteTicketModalTitle: 'Delete Ticket',
|
|
17
17
|
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
18
18
|
deleteTicketModalCancel: 'Cancel',
|
|
@@ -20,7 +20,9 @@ const TRANSLATIONS = {
|
|
|
20
20
|
orderSummaryTitle: 'Order Summary',
|
|
21
21
|
orderSummaryTickets: 'Ticket',
|
|
22
22
|
orderSummaryTotal: 'Total',
|
|
23
|
-
orderSummarySubmit: 'Submit'
|
|
23
|
+
orderSummarySubmit: 'Submit',
|
|
24
|
+
lastDrawResultsTitle: 'Last Draw Results',
|
|
25
|
+
modalLogin: 'Please login to submit a ticket',
|
|
24
26
|
},
|
|
25
27
|
ro: {
|
|
26
28
|
error: 'Eroare',
|
|
@@ -29,11 +31,11 @@ const TRANSLATIONS = {
|
|
|
29
31
|
lobbyButton: 'Lobby',
|
|
30
32
|
prize: 'MARELE JACKPOT OMG',
|
|
31
33
|
winUpTo: 'Castiga pana la',
|
|
32
|
-
nextDraw: '
|
|
34
|
+
nextDraw: 'Urmatoarea extragere:',
|
|
33
35
|
buy: 'Cumpara bilet',
|
|
34
36
|
viewLatest: 'Ultimile extrageri',
|
|
35
37
|
createTicket: 'Creeaza bilet',
|
|
36
|
-
modalSuccess: '
|
|
38
|
+
modalSuccess: 'Achizitie efectuata cu succes',
|
|
37
39
|
deleteTicketModalTitle: 'Sterge biletul',
|
|
38
40
|
deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',
|
|
39
41
|
deleteTicketModalCancel: 'Anuleaza',
|
|
@@ -41,7 +43,32 @@ const TRANSLATIONS = {
|
|
|
41
43
|
orderSummaryTitle: 'Rezumat comanda',
|
|
42
44
|
orderSummaryTickets: 'Bilet',
|
|
43
45
|
orderSummaryTotal: 'Total',
|
|
44
|
-
orderSummarySubmit: 'Trimite'
|
|
46
|
+
orderSummarySubmit: 'Trimite',
|
|
47
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
48
|
+
modalLogin: 'Please login to submit a ticket',
|
|
49
|
+
},
|
|
50
|
+
ar: {
|
|
51
|
+
error: 'خطأ',
|
|
52
|
+
title: 'كرونو',
|
|
53
|
+
backButton: 'خلف',
|
|
54
|
+
lobbyButton: 'ردهة',
|
|
55
|
+
prize: 'جائزة',
|
|
56
|
+
winUpTo: 'الفوز بما يصل الى',
|
|
57
|
+
nextDraw: 'السحب التالي:',
|
|
58
|
+
buy: 'اشتري تذاكر',
|
|
59
|
+
viewLatest: 'عرض أحدث النتائج',
|
|
60
|
+
createTicket: 'إنشاء تذكرة',
|
|
61
|
+
modalSuccess: '!سيتم الشراء بنجاح قريبًا',
|
|
62
|
+
deleteTicketModalTitle: 'حذف التذكرة',
|
|
63
|
+
deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',
|
|
64
|
+
deleteTicketModalCancel: 'يلغي',
|
|
65
|
+
deleteTicketModalConfirm: 'حذف',
|
|
66
|
+
orderSummaryTitle: 'ملخص الطلب',
|
|
67
|
+
orderSummaryTickets: 'تذكرة',
|
|
68
|
+
orderSummaryTotal: 'المجموع',
|
|
69
|
+
orderSummarySubmit: 'يُقدِّم',
|
|
70
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
71
|
+
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
45
72
|
},
|
|
46
73
|
};
|
|
47
74
|
export const translate = (key, customLang) => {
|
|
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
|
|
|
15
15
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
16
16
|
};
|
|
17
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;
|
|
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
19
|
|
|
20
20
|
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
21
21
|
constructor() {
|
|
@@ -23,6 +23,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
23
23
|
this.__registerHost();
|
|
24
24
|
this.__attachShadow();
|
|
25
25
|
this.accordionEvent = createEvent(this, "helperAccordionAction", 7);
|
|
26
|
+
/**
|
|
27
|
+
* Flag for ticket history
|
|
28
|
+
*/
|
|
29
|
+
this.ticketHistoryFlag = false;
|
|
26
30
|
/**
|
|
27
31
|
* Title (top header)
|
|
28
32
|
*/
|
|
@@ -75,13 +79,14 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
75
79
|
this.accordionEvent.emit();
|
|
76
80
|
}
|
|
77
81
|
render() {
|
|
78
|
-
return (h("div", { class: "Wrapper" }, h("div", { class:
|
|
82
|
+
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 &&
|
|
79
83
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
80
84
|
h("div", null, this.deleteTab &&
|
|
81
85
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
82
86
|
}
|
|
83
87
|
static get style() { return helperAccordionCss; }
|
|
84
88
|
}, [1, "helper-accordion", {
|
|
89
|
+
"ticketHistoryFlag": [4, "ticket-history-flag"],
|
|
85
90
|
"headerTitle": [1, "header-title"],
|
|
86
91
|
"headerSubtitle": [1, "header-subtitle"],
|
|
87
92
|
"description": [1],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
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 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -11,24 +11,28 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
11
11
|
* Selected index
|
|
12
12
|
*/
|
|
13
13
|
this.selectedIndex = 0;
|
|
14
|
+
this.tabContent = '';
|
|
14
15
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Endpoing for CMS
|
|
17
|
-
*/
|
|
18
16
|
connectedCallback() {
|
|
19
17
|
/**
|
|
20
18
|
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
21
19
|
*/
|
|
22
20
|
}
|
|
23
21
|
render() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
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.");
|
|
23
|
+
if (this.selectedIndex + 1 == 2) {
|
|
24
|
+
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!")));
|
|
25
|
+
}
|
|
26
|
+
else if (this.selectedIndex + 1 == 3) {
|
|
27
|
+
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?")));
|
|
28
|
+
}
|
|
29
|
+
return (this.tabContent);
|
|
27
30
|
}
|
|
28
31
|
static get style() { return helperTabCss; }
|
|
29
32
|
}, [1, "helper-tab", {
|
|
30
33
|
"selectedIndex": [2, "selected-index"],
|
|
31
|
-
"cmsEndpoint": [1, "cms-endpoint"]
|
|
34
|
+
"cmsEndpoint": [1, "cms-endpoint"],
|
|
35
|
+
"tabContent": [32]
|
|
32
36
|
}]);
|
|
33
37
|
function defineCustomElement() {
|
|
34
38
|
if (typeof customElements === "undefined") {
|
|
@@ -23,7 +23,7 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
23
23
|
/**
|
|
24
24
|
* Tabs details
|
|
25
25
|
*/
|
|
26
|
-
this.tabs = [{ label: '
|
|
26
|
+
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
27
27
|
}
|
|
28
28
|
connectedCallback() {
|
|
29
29
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* LotteryGamePage custom elements */
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import type { Components, JSX } from "../types/components";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Used to manually set the base path where assets can be found.
|
|
@@ -19,4 +20,7 @@ export interface SetPlatformOptions {
|
|
|
19
20
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
20
21
|
}
|
|
21
22
|
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
23
|
+
|
|
24
|
+
export type { Components, JSX };
|
|
25
|
+
|
|
22
26
|
export * from '../types';
|
package/dist/components/index.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
1
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
-
export { HelperAccordion, defineCustomElement as defineCustomElementHelperAccordion } from './helper-accordion.js';
|
|
3
|
-
export { HelperFilters, defineCustomElement as defineCustomElementHelperFilters } from './helper-filters.js';
|
|
4
|
-
export { HelperModal, defineCustomElement as defineCustomElementHelperModal } from './helper-modal.js';
|
|
5
|
-
export { HelperPagination, defineCustomElement as defineCustomElementHelperPagination } from './helper-pagination.js';
|
|
6
|
-
export { HelperTab, defineCustomElement as defineCustomElementHelperTab } from './helper-tab.js';
|
|
7
|
-
export { HelperTabs, defineCustomElement as defineCustomElementHelperTabs } from './helper-tabs.js';
|
|
8
|
-
export { LotteryBullet, defineCustomElement as defineCustomElementLotteryBullet } from './lottery-bullet.js';
|
|
9
|
-
export { LotteryDrawResults, defineCustomElement as defineCustomElementLotteryDrawResults } from './lottery-draw-results.js';
|
|
10
|
-
export { LotteryDrawResultsHistory, defineCustomElement as defineCustomElementLotteryDrawResultsHistory } from './lottery-draw-results-history.js';
|
|
11
|
-
export { LotteryGameDetails, defineCustomElement as defineCustomElementLotteryGameDetails } from './lottery-game-details.js';
|
|
12
|
-
export { LotteryGamePage, defineCustomElement as defineCustomElementLotteryGamePage } from './lottery-game-page.js';
|
|
13
|
-
export { LotteryGrid, defineCustomElement as defineCustomElementLotteryGrid } from './lottery-grid.js';
|
|
14
|
-
export { LotteryTicket, defineCustomElement as defineCustomElementLotteryTicket } from './lottery-ticket.js';
|
|
15
|
-
export { LotteryTicketController, defineCustomElement as defineCustomElementLotteryTicketController } from './lottery-ticket-controller.js';
|