@everymatrix/lottery-game-page 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-accordion.cjs.entry.js +88 -0
- package/dist/cjs/helper-filters_2.cjs.entry.js +22490 -0
- package/dist/cjs/helper-modal.cjs.entry.js +1 -1
- package/dist/cjs/helper-pagination.cjs.entry.js +188 -0
- package/dist/cjs/helper-tab.cjs.entry.js +33 -0
- package/dist/cjs/helper-tabs.cjs.entry.js +38 -0
- package/dist/cjs/{index-614098f4.js → index-e5770ba2.js} +41 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +202 -0
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +124 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js +19 -0
- package/dist/cjs/lottery-game-page.cjs.entry.js +13 -53
- package/dist/cjs/lottery-game-page.cjs.js +2 -2
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +69 -0
- package/dist/cjs/lottery-ticket.cjs.entry.js +146 -0
- package/dist/collection/collection-manifest.json +61 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +7 -27
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +5 -22
- package/dist/collection/utils/locale.utils.js +6 -33
- package/dist/components/helper-accordion.js +6 -0
- package/dist/components/helper-accordion2.js +111 -0
- package/dist/components/helper-filters.js +6 -0
- package/dist/components/helper-filters2.js +22348 -0
- package/dist/components/helper-pagination.js +216 -0
- package/dist/components/helper-tab.js +6 -0
- package/dist/components/helper-tab2.js +48 -0
- package/dist/components/helper-tabs.js +6 -0
- package/dist/components/helper-tabs2.js +63 -0
- package/dist/components/lottery-bullet.js +6 -0
- package/dist/components/lottery-bullet2.js +57 -0
- package/dist/components/lottery-draw-results-history.js +6 -0
- package/dist/components/lottery-draw-results-history2.js +175 -0
- package/dist/components/lottery-draw-results2.js +59 -62
- package/dist/components/lottery-game-details.js +6 -0
- package/dist/components/lottery-game-details2.js +49 -0
- package/dist/components/lottery-game-page.js +77 -59
- package/dist/components/lottery-grid.js +6 -0
- package/dist/components/lottery-grid2.js +197 -0
- package/dist/components/lottery-ticket-controller.js +6 -0
- package/dist/components/lottery-ticket-controller2.js +118 -0
- package/dist/components/lottery-ticket.js +6 -0
- package/dist/components/lottery-ticket2.js +184 -0
- package/dist/esm/helper-accordion.entry.js +84 -0
- package/dist/esm/helper-filters_2.entry.js +22485 -0
- package/dist/esm/helper-modal.entry.js +1 -1
- package/dist/esm/helper-pagination.entry.js +184 -0
- package/dist/esm/helper-tab.entry.js +29 -0
- package/dist/esm/helper-tabs.entry.js +34 -0
- package/dist/esm/{index-0fa076cd.js → index-8f308493.js} +41 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-bullet_2.entry.js +197 -0
- package/dist/esm/lottery-draw-results-history.entry.js +120 -0
- package/dist/esm/lottery-game-details.entry.js +15 -0
- package/dist/esm/lottery-game-page.entry.js +13 -53
- package/dist/esm/lottery-game-page.js +2 -2
- package/dist/esm/lottery-ticket-controller.entry.js +65 -0
- package/dist/esm/lottery-ticket.entry.js +142 -0
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-037dd940.js +1 -0
- package/dist/lottery-game-page/p-12251772.entry.js +1 -0
- package/dist/lottery-game-page/p-324c7edd.entry.js +2849 -0
- package/dist/lottery-game-page/p-43400250.entry.js +1 -0
- package/dist/lottery-game-page/p-43f7fac4.entry.js +1 -0
- package/dist/lottery-game-page/p-55338096.entry.js +1 -0
- package/dist/lottery-game-page/p-581bdfc2.entry.js +1 -0
- package/dist/lottery-game-page/p-6977f833.entry.js +1 -0
- package/dist/lottery-game-page/p-85f4e95b.entry.js +1 -0
- package/dist/lottery-game-page/p-99a61a44.entry.js +1 -0
- package/dist/lottery-game-page/{p-6183a920.entry.js → p-af9a2dde.entry.js} +1 -1
- package/dist/lottery-game-page/p-bf66e969.entry.js +1 -0
- package/dist/lottery-game-page/p-d1b9da94.entry.js +1 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +0 -3
- package/package.json +1 -1
- package/dist/cjs/lottery-draw-results.cjs.entry.js +0 -188
- package/dist/esm/lottery-draw-results.entry.js +0 -184
- package/dist/lottery-game-page/p-2d7ccc96.js +0 -1
- package/dist/lottery-game-page/p-9ca649d9.entry.js +0 -1
- package/dist/lottery-game-page/p-e98ee83a.entry.js +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import '
|
|
2
|
+
import { d as defineCustomElement$2 } from './lottery-bullet2.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './lottery-grid2.js';
|
|
3
4
|
|
|
4
5
|
const DEFAULT_LANGUAGE = 'en';
|
|
5
6
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
@@ -13,13 +14,7 @@ const TRANSLATIONS = {
|
|
|
13
14
|
drawNumbersGridTicket: 'Draw numbers Grid B',
|
|
14
15
|
ticketResult: 'Ticket result',
|
|
15
16
|
amountWon: 'Amount won',
|
|
16
|
-
numberOfDraws: 'Number of draws'
|
|
17
|
-
multiplier: 'Multiplier:',
|
|
18
|
-
ticketPurchaseDate: 'Ticket Purchase Date',
|
|
19
|
-
ticketStatus: 'Ticket Status',
|
|
20
|
-
ticketId: 'Ticket ID',
|
|
21
|
-
ticketAmount: 'Ticket Amount',
|
|
22
|
-
winUpTo: 'Win up to',
|
|
17
|
+
numberOfDraws: 'Number of draws'
|
|
23
18
|
},
|
|
24
19
|
ro: {
|
|
25
20
|
drawResultsHeader: 'Ultimele rezultate extragere',
|
|
@@ -30,13 +25,7 @@ const TRANSLATIONS = {
|
|
|
30
25
|
drawNumbersGridTicket: 'Numerele extrase Grid B',
|
|
31
26
|
ticketResult: 'Rezultatul biletului',
|
|
32
27
|
amountWon: 'Suma castigata',
|
|
33
|
-
numberOfDraws: 'Numarul de extrageri'
|
|
34
|
-
multiplier: 'Multiplicator:',
|
|
35
|
-
ticketPurchaseDate: 'Data achizitionarii biletului',
|
|
36
|
-
ticketStatus: 'Statusul biletului',
|
|
37
|
-
ticketId: 'Id biletul',
|
|
38
|
-
ticketAmount: 'Valoarea biletului',
|
|
39
|
-
winUpTo: 'Poti castiga'
|
|
28
|
+
numberOfDraws: 'Numarul de extrageri'
|
|
40
29
|
},
|
|
41
30
|
};
|
|
42
31
|
const translate = (key, customLang) => {
|
|
@@ -44,8 +33,22 @@ const translate = (key, customLang) => {
|
|
|
44
33
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
45
34
|
};
|
|
46
35
|
|
|
47
|
-
const lotteryDrawResultsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.
|
|
36
|
+
const lotteryDrawResultsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsSection{max-width:500px;margin:0 auto;margin:0px auto 10px;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0}.DrawMultipler label{display:block;margin:15px 0}.DrawResultsBody{padding:0 20px}.DrawResultsBody .DrawNumbersGrid{font-size:14px}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:\"\"}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px}.DrawTicketsContainer{margin:30px auto}.ExpandableBoxes{position:relative}.ExpandableBox{width:100%;height:100%;max-height:100px;float:left;margin:0 0 20px 0;border:1px solid #009993;border-radius:4px;padding:10px;box-sizing:border-box;-webkit-transition:all 0.6s ease-in-out;-moz-transition:all 0.6s ease-in-out;-o-transition:all 0.6s ease-in-out;-ms-transition:all 0.6s ease-in-out;transition:all 0.6s ease-in-out;overflow:hidden}.ExpandableBox.ShowBox{max-height:400px;margin:0px 0px 20p 0px}.ExpandableBox.HideBox{width:0;height:0;overflow:hidden;border:none;padding:0;margin:0;opacity:0}";
|
|
48
37
|
|
|
38
|
+
const DEFAULT_VALUES = {
|
|
39
|
+
gamename: 'Chrono',
|
|
40
|
+
gamedate: '24/09/2022',
|
|
41
|
+
state: 'Processing',
|
|
42
|
+
amount: 304444,
|
|
43
|
+
ticketid: '6963444',
|
|
44
|
+
selection: '[5, 6, 7, 8, 9]',
|
|
45
|
+
multiplier: 4.5,
|
|
46
|
+
resultstatus: 'Processing',
|
|
47
|
+
drawstatus: 'Won',
|
|
48
|
+
drawamount: 1022,
|
|
49
|
+
drawid: '54545555',
|
|
50
|
+
drawdate: '24/09/2032'
|
|
51
|
+
};
|
|
49
52
|
const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
50
53
|
constructor() {
|
|
51
54
|
super();
|
|
@@ -59,39 +62,9 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
59
62
|
* Shows only the last draw
|
|
60
63
|
*/
|
|
61
64
|
this.drawMode = false;
|
|
62
|
-
/**
|
|
63
|
-
* The drawID (option)
|
|
64
|
-
*/
|
|
65
|
-
this.drawId = '';
|
|
66
|
-
/**
|
|
67
|
-
* The game name
|
|
68
|
-
*/
|
|
69
65
|
this.gameName = '';
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
this.ticketDate = '';
|
|
74
|
-
/**
|
|
75
|
-
* The ticket status
|
|
76
|
-
*/
|
|
77
|
-
this.ticketStatus = '';
|
|
78
|
-
/**
|
|
79
|
-
* The ticket id
|
|
80
|
-
*/
|
|
81
|
-
this.ticketId = '';
|
|
82
|
-
/**
|
|
83
|
-
* The ticket amount
|
|
84
|
-
*/
|
|
85
|
-
this.ticketAmount = '';
|
|
86
|
-
/**
|
|
87
|
-
* The ticket multiplier
|
|
88
|
-
*/
|
|
89
|
-
this.ticketMultiplier = false;
|
|
90
|
-
/**
|
|
91
|
-
* The ticket draw count
|
|
92
|
-
*/
|
|
93
|
-
this.ticketDrawCount = 0;
|
|
94
|
-
this.multiplier = 3;
|
|
66
|
+
this.multiplier = 5.434;
|
|
67
|
+
this.ticketData = {};
|
|
95
68
|
this.isLoading = true;
|
|
96
69
|
this.drawResults = [];
|
|
97
70
|
this.rules = {};
|
|
@@ -113,6 +86,9 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
113
86
|
connectedCallback() {
|
|
114
87
|
let promises = [];
|
|
115
88
|
promises.push(this.getGameData());
|
|
89
|
+
if (this.playerId) {
|
|
90
|
+
promises.push(this.getTicketData());
|
|
91
|
+
}
|
|
116
92
|
if (this.drawId) {
|
|
117
93
|
promises.push(this.getDrawData());
|
|
118
94
|
}
|
|
@@ -132,11 +108,9 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
132
108
|
.then((data) => {
|
|
133
109
|
this.drawData = data;
|
|
134
110
|
resolve(true);
|
|
135
|
-
this.isLoading = false;
|
|
136
111
|
})
|
|
137
112
|
.catch((err) => {
|
|
138
113
|
reject(err);
|
|
139
|
-
this.isLoading = false;
|
|
140
114
|
});
|
|
141
115
|
});
|
|
142
116
|
}
|
|
@@ -153,8 +127,6 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
153
127
|
totalNumbers: data.rules.boards[0].totalNumbers
|
|
154
128
|
};
|
|
155
129
|
resolve(true);
|
|
156
|
-
this.isLoading = false;
|
|
157
|
-
this.hasErrors = false;
|
|
158
130
|
})
|
|
159
131
|
.catch((err) => {
|
|
160
132
|
this.isLoading = false;
|
|
@@ -164,7 +136,26 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
164
136
|
});
|
|
165
137
|
});
|
|
166
138
|
}
|
|
139
|
+
getTicketData() {
|
|
140
|
+
return new Promise((resolve, reject) => {
|
|
141
|
+
let url = new URL(`${this.endpoint}/tickets/player/${this.playerId}`);
|
|
142
|
+
fetch(url.href)
|
|
143
|
+
.then((response) => {
|
|
144
|
+
return response.json();
|
|
145
|
+
})
|
|
146
|
+
.then((data) => {
|
|
147
|
+
this.ticketData = data.length === 0 ? DEFAULT_VALUES : data[1];
|
|
148
|
+
this.drawResults = this.ticketData.drawResults.map((item) => item);
|
|
149
|
+
this.selection = this.ticketData.selection[0].join(',');
|
|
150
|
+
resolve(true);
|
|
151
|
+
})
|
|
152
|
+
.catch((err) => {
|
|
153
|
+
reject(err);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
167
157
|
render() {
|
|
158
|
+
var _a, _b, _c, _d, _e, _f;
|
|
168
159
|
if (this.isLoading) {
|
|
169
160
|
return (h("p", null, "Loading, please wait ..."));
|
|
170
161
|
}
|
|
@@ -173,11 +164,12 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
173
164
|
}
|
|
174
165
|
else {
|
|
175
166
|
return (h("section", { class: "DrawResultsSection" }, !this.drawMode ?
|
|
176
|
-
h("div", { class: "DrawResultsArea" }, h("div", { class: "TicketInfo" }, h("div", { class: "TicketGameName" }, translate('drawName', this.language), ": ", h("span", null, this.gameName)), h("div", { class: "TicketDate" },
|
|
177
|
-
h("div", { class: "
|
|
167
|
+
h("div", { class: "DrawResultsArea" }, h("div", { class: "TicketInfo" }, h("div", { class: "TicketGameName" }, translate('drawName', this.language), ": ", h("span", null, this.gameName)), h("div", { class: "TicketDate" }, "Ticket Purchase Date: ", h("span", null, (_a = this.ticketData) === null || _a === void 0 ? void 0 : _a.createdAt.slice(0, 10))), h("div", { class: "TicketStatus" }, "Status: ", h("span", null, (_b = this.ticketData) === null || _b === void 0 ? void 0 : _b.state))), h("div", { class: "DrawResultsBody" }, h("div", { class: "TicketIdContainer" }, h("p", null, "Ticket id: ", h("span", null, (_c = this.ticketData) === null || _c === void 0 ? void 0 : _c.id))), h("div", { class: "TicketAmountContainer" }, h("p", null, "Ticket amount: ", h("span", null, (_d = this.ticketData) === null || _d === void 0 ? void 0 : _d.amount))), h("div", { class: "DrawNumbersGrid" }, h("p", null, translate('drawNumbersGridTicket', this.language), ":"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, "selected-numbers": this.selection, selectable: false, "display-selected": true, language: this.language }))), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, "Multiplier: ", h("span", null, JSON.stringify((_e = this.ticketData) === null || _e === void 0 ? void 0 : _e.multiplier)))), h("div", { class: "NumberOfDrawsContainer" }, h("p", null, translate('numberOfDraws', this.language), ": ", (_f = this.ticketData) === null || _f === void 0 ? void 0 :
|
|
168
|
+
_f.drawCount), h("div", { class: "DrawTicketsContainer" }, this.drawResults.map((item, index) => h("div", { class: "ExpandableBoxes" }, h("div", { class: this.toggleDrawer[index] ? 'ExpandableBox ShowBox' : 'ExpandableBox', onClick: () => this.changeBox(index) }, h("div", { class: "TicketResultContainer" }, h("p", null, translate('ticketResult', this.language), ": ", item.status)), item.state == 'won' &&
|
|
169
|
+
h("div", { class: "AmountWonContainer" }, h("p", null, translate('amountWon', this.language), ": ", Number(item.amount).toLocaleString('en'), " ", item.currency)), h("div", { class: "DrawIdContainer" }, h("p", null, translate('drawId', this.language), ": ", item.drawId)), h("div", { class: "DrawDateContainer" }, h("p", null, translate('drawDate', this.language), ": ", item.updatedAt.slice(0, 10), " | ", item.updatedAt.slice(11, 19))), h("div", { class: "DrawNumbersGrid" }), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, "Multiplier: ", item.multiplier)))))))))
|
|
178
170
|
:
|
|
179
171
|
h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
180
|
-
h("div", null, h("div", { class: "DrawResultsHeader" }, h("span", null, translate('drawId', this.language), ": ", this.drawData.id), h("span", null, translate('drawDate', this.language), ": ", this.drawData.date.slice(0, 10))), h("div", { class: "DrawResultsBody" }, h("div", { class: "DrawNumbersGrid" }, h("p", null, translate('drawNumbersGridDraw', this.language), ":"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, selectedNumbers: this.drawData.winningNumbers.join(','), "display-selected": true, selectable: false, language: this.language })), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" },
|
|
172
|
+
h("div", null, h("div", { class: "DrawResultsHeader" }, h("span", null, translate('drawId', this.language), ": ", this.drawData.id), h("span", null, translate('drawDate', this.language), ": ", this.drawData.date.slice(0, 10))), h("div", { class: "DrawResultsBody" }, h("div", { class: "DrawNumbersGrid" }, h("p", null, translate('drawNumbersGridDraw', this.language), ":"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, selectedNumbers: this.drawData.winningNumbers.join(','), "display-selected": true, selectable: false, language: this.language })), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, "Multiplier: ", this.multiplier))))))));
|
|
181
173
|
}
|
|
182
174
|
}
|
|
183
175
|
static get style() { return lotteryDrawResultsCss; }
|
|
@@ -189,13 +181,8 @@ const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
189
181
|
"drawMode": [4, "draw-mode"],
|
|
190
182
|
"drawId": [1, "draw-id"],
|
|
191
183
|
"gameName": [1, "game-name"],
|
|
192
|
-
"ticketDate": [1, "ticket-date"],
|
|
193
|
-
"ticketStatus": [1, "ticket-status"],
|
|
194
|
-
"ticketId": [1, "ticket-id"],
|
|
195
|
-
"ticketAmount": [1, "ticket-amount"],
|
|
196
|
-
"ticketMultiplier": [4, "ticket-multiplier"],
|
|
197
|
-
"ticketDrawCount": [2, "ticket-draw-count"],
|
|
198
184
|
"multiplier": [32],
|
|
185
|
+
"ticketData": [32],
|
|
199
186
|
"isLoading": [32],
|
|
200
187
|
"drawResults": [32],
|
|
201
188
|
"rules": [32],
|
|
@@ -207,13 +194,23 @@ function defineCustomElement() {
|
|
|
207
194
|
if (typeof customElements === "undefined") {
|
|
208
195
|
return;
|
|
209
196
|
}
|
|
210
|
-
const components = ["lottery-draw-results"];
|
|
197
|
+
const components = ["lottery-draw-results", "lottery-bullet", "lottery-grid"];
|
|
211
198
|
components.forEach(tagName => { switch (tagName) {
|
|
212
199
|
case "lottery-draw-results":
|
|
213
200
|
if (!customElements.get(tagName)) {
|
|
214
201
|
customElements.define(tagName, LotteryDrawResults);
|
|
215
202
|
}
|
|
216
203
|
break;
|
|
204
|
+
case "lottery-bullet":
|
|
205
|
+
if (!customElements.get(tagName)) {
|
|
206
|
+
defineCustomElement$2();
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
case "lottery-grid":
|
|
210
|
+
if (!customElements.get(tagName)) {
|
|
211
|
+
defineCustomElement$1();
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
217
214
|
} });
|
|
218
215
|
}
|
|
219
216
|
defineCustomElement();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './helper-accordion2.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './helper-tab2.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './helper-tabs2.js';
|
|
5
|
+
|
|
6
|
+
const lotteryGameDetailsCss = ":host{display:block}";
|
|
7
|
+
|
|
8
|
+
const LotteryGameDetails = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h("div", null, h("helper-accordion", { "header-title": "Game Details", collapsed: false }, h("div", { slot: "accordionContent" }, h("helper-tabs", null)))));
|
|
16
|
+
}
|
|
17
|
+
static get style() { return lotteryGameDetailsCss; }
|
|
18
|
+
}, [1, "lottery-game-details"]);
|
|
19
|
+
function defineCustomElement() {
|
|
20
|
+
if (typeof customElements === "undefined") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const components = ["lottery-game-details", "helper-accordion", "helper-tab", "helper-tabs"];
|
|
24
|
+
components.forEach(tagName => { switch (tagName) {
|
|
25
|
+
case "lottery-game-details":
|
|
26
|
+
if (!customElements.get(tagName)) {
|
|
27
|
+
customElements.define(tagName, LotteryGameDetails);
|
|
28
|
+
}
|
|
29
|
+
break;
|
|
30
|
+
case "helper-accordion":
|
|
31
|
+
if (!customElements.get(tagName)) {
|
|
32
|
+
defineCustomElement$3();
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case "helper-tab":
|
|
36
|
+
if (!customElements.get(tagName)) {
|
|
37
|
+
defineCustomElement$2();
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
case "helper-tabs":
|
|
41
|
+
if (!customElements.get(tagName)) {
|
|
42
|
+
defineCustomElement$1();
|
|
43
|
+
}
|
|
44
|
+
break;
|
|
45
|
+
} });
|
|
46
|
+
}
|
|
47
|
+
defineCustomElement();
|
|
48
|
+
|
|
49
|
+
export { LotteryGameDetails as L, defineCustomElement as d };
|
|
@@ -1,12 +1,19 @@
|
|
|
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$
|
|
2
|
+
import { d as defineCustomElement$d } from './helper-accordion2.js';
|
|
3
|
+
import { d as defineCustomElement$c } from './helper-filters2.js';
|
|
4
|
+
import { d as defineCustomElement$b } from './helper-modal2.js';
|
|
5
|
+
import { d as defineCustomElement$a } from './helper-tab2.js';
|
|
6
|
+
import { d as defineCustomElement$9 } from './helper-tabs2.js';
|
|
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';
|
|
7
14
|
|
|
8
15
|
const DEFAULT_LANGUAGE = 'en';
|
|
9
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'
|
|
16
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
10
17
|
const TRANSLATIONS = {
|
|
11
18
|
en: {
|
|
12
19
|
error: 'Error',
|
|
@@ -19,7 +26,7 @@ const TRANSLATIONS = {
|
|
|
19
26
|
buy: 'Buy tickets',
|
|
20
27
|
viewLatest: 'View latest results',
|
|
21
28
|
createTicket: 'Create Ticket',
|
|
22
|
-
modalSuccess: 'Purchase
|
|
29
|
+
modalSuccess: 'Purchase will be successfull soon!',
|
|
23
30
|
deleteTicketModalTitle: 'Delete Ticket',
|
|
24
31
|
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
25
32
|
deleteTicketModalCancel: 'Cancel',
|
|
@@ -27,9 +34,7 @@ const TRANSLATIONS = {
|
|
|
27
34
|
orderSummaryTitle: 'Order Summary',
|
|
28
35
|
orderSummaryTickets: 'Ticket',
|
|
29
36
|
orderSummaryTotal: 'Total',
|
|
30
|
-
orderSummarySubmit: 'Submit'
|
|
31
|
-
lastDrawResultsTitle: 'Last Draw Results',
|
|
32
|
-
modalLogin: 'Please login to submit a ticket',
|
|
37
|
+
orderSummarySubmit: 'Submit'
|
|
33
38
|
},
|
|
34
39
|
ro: {
|
|
35
40
|
error: 'Eroare',
|
|
@@ -38,11 +43,11 @@ const TRANSLATIONS = {
|
|
|
38
43
|
lobbyButton: 'Lobby',
|
|
39
44
|
prize: 'MARELE JACKPOT OMG',
|
|
40
45
|
winUpTo: 'Castiga pana la',
|
|
41
|
-
nextDraw: '
|
|
46
|
+
nextDraw: 'In cat timp devii milionar daca cumperi acum!!!',
|
|
42
47
|
buy: 'Cumpara bilet',
|
|
43
48
|
viewLatest: 'Ultimile extrageri',
|
|
44
49
|
createTicket: 'Creeaza bilet',
|
|
45
|
-
modalSuccess: '
|
|
50
|
+
modalSuccess: 'Achiziția va avea succes în curând!',
|
|
46
51
|
deleteTicketModalTitle: 'Sterge biletul',
|
|
47
52
|
deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',
|
|
48
53
|
deleteTicketModalCancel: 'Anuleaza',
|
|
@@ -50,32 +55,7 @@ const TRANSLATIONS = {
|
|
|
50
55
|
orderSummaryTitle: 'Rezumat comanda',
|
|
51
56
|
orderSummaryTickets: 'Bilet',
|
|
52
57
|
orderSummaryTotal: 'Total',
|
|
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: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
58
|
+
orderSummarySubmit: 'Trimite'
|
|
79
59
|
},
|
|
80
60
|
};
|
|
81
61
|
const translate = (key, customLang) => {
|
|
@@ -83,7 +63,7 @@ const translate = (key, customLang) => {
|
|
|
83
63
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
84
64
|
};
|
|
85
65
|
|
|
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:#
|
|
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:#00958f;font-size:18px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px}.GamePage .TotalWinnings span{font-size:22px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:capitalize;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px}.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}.NextDrawWrapper{padding:10px 15px;background:#fff}.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:10px 15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px;border-bottom:1px solid #e9e9e9}.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}.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%}}";
|
|
87
67
|
|
|
88
68
|
const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
89
69
|
constructor() {
|
|
@@ -110,8 +90,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
110
90
|
this.deleteVisible = false;
|
|
111
91
|
this.latestDraw = {};
|
|
112
92
|
this.totalWinningsAmount = 0;
|
|
113
|
-
this.isLoggedIn = false;
|
|
114
|
-
this.loginModalVisible = false;
|
|
115
93
|
this.multiplier = false;
|
|
116
94
|
this.quickPick = false;
|
|
117
95
|
}
|
|
@@ -119,10 +97,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
119
97
|
connectedCallback() {
|
|
120
98
|
this.getGameDetails();
|
|
121
99
|
this.getDraws();
|
|
122
|
-
console.log(this.language);
|
|
123
|
-
if (this.sessionId) {
|
|
124
|
-
this.isLoggedIn = true;
|
|
125
|
-
}
|
|
126
100
|
}
|
|
127
101
|
countdownLogic(date) {
|
|
128
102
|
this.interval = setInterval(() => {
|
|
@@ -149,6 +123,7 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
149
123
|
this.gameData = data;
|
|
150
124
|
this.basicStake = this.gameData.rules.stakes[0].amount;
|
|
151
125
|
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
126
|
+
console.log('draws', draws);
|
|
152
127
|
this.nextDraw = draws[0].id;
|
|
153
128
|
this.createNewTicket();
|
|
154
129
|
})
|
|
@@ -211,7 +186,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
211
186
|
}
|
|
212
187
|
modalCloseEvent() {
|
|
213
188
|
this.deleteVisible = false;
|
|
214
|
-
this.loginModalVisible = false;
|
|
215
189
|
}
|
|
216
190
|
stakeChangeHandler(event) {
|
|
217
191
|
const { ticketId, stake } = event.detail;
|
|
@@ -273,9 +247,6 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
273
247
|
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
274
248
|
];
|
|
275
249
|
}
|
|
276
|
-
showLoginModal() {
|
|
277
|
-
this.loginModalVisible = true;
|
|
278
|
-
}
|
|
279
250
|
submitTickets() {
|
|
280
251
|
let url = new URL(`${this.endpoint}/tickets`);
|
|
281
252
|
// @TODO Body TS type
|
|
@@ -283,6 +254,7 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
283
254
|
gameId: this.gameId,
|
|
284
255
|
tickets: []
|
|
285
256
|
};
|
|
257
|
+
console.log('body', body);
|
|
286
258
|
this.tickets.forEach((item) => {
|
|
287
259
|
body.tickets.push({
|
|
288
260
|
startingDrawId: this.nextDraw,
|
|
@@ -325,11 +297,9 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
325
297
|
}
|
|
326
298
|
return (
|
|
327
299
|
/* Game details */
|
|
328
|
-
h("div", { class: "GamePage"
|
|
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.
|
|
330
|
-
|
|
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)))))));
|
|
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" }, h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language))))), this.tabIndex == 1 &&
|
|
302
|
+
h("div", null, 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)))))));
|
|
333
303
|
}
|
|
334
304
|
static get assetsDirs() { return ["static"]; }
|
|
335
305
|
get element() { return this; }
|
|
@@ -355,27 +325,75 @@ const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
355
325
|
"secondsRemaining": [32],
|
|
356
326
|
"latestDraw": [32],
|
|
357
327
|
"totalWinningsAmount": [32],
|
|
358
|
-
"nextDate": [32]
|
|
359
|
-
"isLoggedIn": [32],
|
|
360
|
-
"loginModalVisible": [32]
|
|
328
|
+
"nextDate": [32]
|
|
361
329
|
}, [[0, "ticketCompleted", "gridFilledHandler"], [0, "gridDirty", "gridDirtyHandler"], [0, "deleteTicket", "deleteTicketHandler"], [0, "modalCloseEvent", "modalCloseEvent"], [0, "stakeChange", "stakeChangeHandler"], [0, "multiplierChange", "multiplierChangeHandler"]]]);
|
|
362
330
|
function defineCustomElement$1() {
|
|
363
331
|
if (typeof customElements === "undefined") {
|
|
364
332
|
return;
|
|
365
333
|
}
|
|
366
|
-
const components = ["lottery-game-page", "helper-modal", "lottery-draw-results"];
|
|
334
|
+
const components = ["lottery-game-page", "helper-accordion", "helper-filters", "helper-modal", "helper-tab", "helper-tabs", "lottery-bullet", "lottery-draw-results", "lottery-draw-results-history", "lottery-game-details", "lottery-grid", "lottery-ticket", "lottery-ticket-controller"];
|
|
367
335
|
components.forEach(tagName => { switch (tagName) {
|
|
368
336
|
case "lottery-game-page":
|
|
369
337
|
if (!customElements.get(tagName)) {
|
|
370
338
|
customElements.define(tagName, LotteryGamePage$1);
|
|
371
339
|
}
|
|
372
340
|
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;
|
|
373
351
|
case "helper-modal":
|
|
374
352
|
if (!customElements.get(tagName)) {
|
|
375
|
-
defineCustomElement$
|
|
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();
|
|
376
369
|
}
|
|
377
370
|
break;
|
|
378
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
|
+
if (!customElements.get(tagName)) {
|
|
393
|
+
defineCustomElement$3();
|
|
394
|
+
}
|
|
395
|
+
break;
|
|
396
|
+
case "lottery-ticket-controller":
|
|
379
397
|
if (!customElements.get(tagName)) {
|
|
380
398
|
defineCustomElement$2();
|
|
381
399
|
}
|