@everymatrix/lottery-game-page 0.1.26 → 1.0.69
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{helper-filters_2.cjs.entry.js → helper-accordion_13.cjs.entry.js} +13401 -9890
- package/dist/cjs/helper-pagination.cjs.entry.js +197 -189
- package/dist/cjs/index-f3851683.js +1345 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/lottery-game-page.cjs.js +17 -11
- package/dist/collection/collection-manifest.json +4 -10
- package/dist/collection/components/lottery-game-page/index.js +1 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +11 -2
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +579 -594
- package/dist/collection/utils/locale.utils.js +118 -95
- package/dist/collection/utils/utils.js +4 -4
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/{helper-filters_2.entry.js → helper-accordion_13.entry.js} +13391 -9891
- package/dist/esm/helper-pagination.entry.js +197 -189
- package/dist/esm/index-8248702b.js +1316 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/lottery-game-page.js +14 -11
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-46aaa562.entry.js +1 -0
- package/dist/lottery-game-page/p-8f2c63c7.js +2 -0
- package/dist/lottery-game-page/p-bd89bbf0.entry.js +3567 -0
- package/dist/lottery-game-page/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -36
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/lottery-game-page/index.d.ts +1 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +99 -90
- package/dist/types/components.d.ts +28 -2
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +13 -7
- package/dist/cjs/helper-accordion.cjs.entry.js +0 -124
- package/dist/cjs/helper-modal.cjs.entry.js +0 -76
- package/dist/cjs/helper-tab.cjs.entry.js +0 -68
- package/dist/cjs/helper-tabs.cjs.entry.js +0 -74
- package/dist/cjs/index-cd44e726.js +0 -1324
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -270
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -198
- package/dist/cjs/lottery-game-details.cjs.entry.js +0 -51
- package/dist/cjs/lottery-game-page.cjs.entry.js +0 -427
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -116
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -201
- package/dist/collection/components/lottery-game-page/static/chrono_desktop.png +0 -0
- package/dist/collection/components/lottery-game-page/static/chrono_lottery_mobile.png +0 -0
- package/dist/components/assets/chrono_desktop.png +0 -0
- package/dist/components/assets/chrono_lottery_mobile.png +0 -0
- package/dist/components/helper-accordion.js +0 -6
- package/dist/components/helper-accordion2.js +0 -151
- package/dist/components/helper-filters.js +0 -6
- package/dist/components/helper-filters2.js +0 -22394
- package/dist/components/helper-modal.js +0 -6
- package/dist/components/helper-modal2.js +0 -94
- package/dist/components/helper-pagination.js +0 -251
- package/dist/components/helper-tab.js +0 -6
- package/dist/components/helper-tab2.js +0 -87
- package/dist/components/helper-tabs.js +0 -6
- package/dist/components/helper-tabs2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/lottery-bullet.js +0 -6
- package/dist/components/lottery-bullet2.js +0 -92
- package/dist/components/lottery-draw-results-history.js +0 -6
- package/dist/components/lottery-draw-results-history2.js +0 -256
- package/dist/components/lottery-draw-results.js +0 -6
- package/dist/components/lottery-draw-results2.js +0 -335
- package/dist/components/lottery-game-details.js +0 -6
- package/dist/components/lottery-game-details2.js +0 -85
- package/dist/components/lottery-game-page.d.ts +0 -11
- package/dist/components/lottery-game-page.js +0 -542
- package/dist/components/lottery-grid.js +0 -6
- package/dist/components/lottery-grid2.js +0 -237
- package/dist/components/lottery-ticket-controller.js +0 -6
- package/dist/components/lottery-ticket-controller2.js +0 -168
- package/dist/components/lottery-ticket.js +0 -6
- package/dist/components/lottery-ticket2.js +0 -244
- package/dist/esm/helper-accordion.entry.js +0 -120
- package/dist/esm/helper-modal.entry.js +0 -72
- package/dist/esm/helper-tab.entry.js +0 -64
- package/dist/esm/helper-tabs.entry.js +0 -70
- package/dist/esm/index-d1baacd4.js +0 -1296
- package/dist/esm/lottery-bullet_2.entry.js +0 -265
- package/dist/esm/lottery-draw-results-history.entry.js +0 -194
- package/dist/esm/lottery-game-details.entry.js +0 -47
- package/dist/esm/lottery-game-page.entry.js +0 -423
- package/dist/esm/lottery-ticket-controller.entry.js +0 -112
- package/dist/esm/lottery-ticket.entry.js +0 -197
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/lottery-game-page/p-023325a2.entry.js +0 -1
- package/dist/lottery-game-page/p-04fbc8fd.entry.js +0 -1
- package/dist/lottery-game-page/p-256b151c.entry.js +0 -1
- package/dist/lottery-game-page/p-381b5507.entry.js +0 -1
- package/dist/lottery-game-page/p-3f8b6ad9.entry.js +0 -1
- package/dist/lottery-game-page/p-4274053c.entry.js +0 -1
- package/dist/lottery-game-page/p-4f81cd37.entry.js +0 -1
- package/dist/lottery-game-page/p-5c389034.entry.js +0 -1
- package/dist/lottery-game-page/p-7d06371e.entry.js +0 -1
- package/dist/lottery-game-page/p-ca8430a0.entry.js +0 -2849
- package/dist/lottery-game-page/p-d6f76e8d.entry.js +0 -1
- package/dist/lottery-game-page/p-e765c7d9.js +0 -1
- package/dist/lottery-game-page/p-f6fcc22c.entry.js +0 -1
- package/dist/lottery-game-page/static/chrono_desktop.png +0 -0
- package/dist/lottery-game-page/static/chrono_lottery_mobile.png +0 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$2 } from './lottery-bullet2.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './lottery-grid2.js';
|
|
4
|
-
|
|
5
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
6
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
7
|
-
const TRANSLATIONS = {
|
|
8
|
-
en: {
|
|
9
|
-
drawResultsHeader: 'Last draw results',
|
|
10
|
-
drawId: 'Draw ID',
|
|
11
|
-
drawName: 'Game name',
|
|
12
|
-
drawDate: 'Draw Date',
|
|
13
|
-
drawNumbersGridDraw: 'Draw numbers Grid ',
|
|
14
|
-
drawNumbersGridTicket: 'Draw numbers Grid ',
|
|
15
|
-
ticketResult: 'Ticket result',
|
|
16
|
-
amountWon: 'Amount won',
|
|
17
|
-
numberOfDraws: 'Number of draws',
|
|
18
|
-
multiplier: 'Multiplier:',
|
|
19
|
-
ticketPurchaseDate: 'Ticket Purchase Date',
|
|
20
|
-
ticketStatus: 'Ticket Status',
|
|
21
|
-
ticketId: 'Ticket ID',
|
|
22
|
-
ticketAmount: 'Ticket Amount',
|
|
23
|
-
winUpTo: 'Win up to',
|
|
24
|
-
},
|
|
25
|
-
ro: {
|
|
26
|
-
drawResultsHeader: 'Ultimele rezultate extragere',
|
|
27
|
-
drawId: 'Id extragere',
|
|
28
|
-
drawName: 'Numele jocului',
|
|
29
|
-
drawDate: 'Data extragerii',
|
|
30
|
-
drawNumbersGridDraw: 'Numerele extrase Grid',
|
|
31
|
-
drawNumbersGridTicket: 'Numerele extrase Grid',
|
|
32
|
-
ticketResult: 'Rezultatul biletului',
|
|
33
|
-
amountWon: 'Suma castigata',
|
|
34
|
-
numberOfDraws: 'Numarul de extrageri',
|
|
35
|
-
multiplier: 'Multiplicator:',
|
|
36
|
-
ticketPurchaseDate: 'Data achizitionarii biletului',
|
|
37
|
-
ticketStatus: 'Statusul biletului',
|
|
38
|
-
ticketId: 'Id biletul',
|
|
39
|
-
ticketAmount: 'Valoarea biletului',
|
|
40
|
-
winUpTo: 'Poti castiga'
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
const translate = (key, customLang) => {
|
|
44
|
-
const lang = customLang;
|
|
45
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
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}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{margin-bottom:15px}.DrawNumbersGrid label{display:block;margin-bottom:10px}.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{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column}.ExpandableBox{line-height:12px;font-weight:lighter;width:100%;height:100%;max-height:80px;float:left;margin:0 0 20px 0;border:1px solid #009993;background:#fff;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;box-shadow:rgba(99, 99, 99, 0.2) 0px 2px 8px 0px}.ExpandableBox:last-of-type{margin-bottom:0}.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}";
|
|
49
|
-
|
|
50
|
-
const LotteryDrawResults = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
this.__registerHost();
|
|
54
|
-
this.__attachShadow();
|
|
55
|
-
/**
|
|
56
|
-
* Language of the widget
|
|
57
|
-
*/
|
|
58
|
-
this.language = 'en';
|
|
59
|
-
/**
|
|
60
|
-
* Shows only the last draw
|
|
61
|
-
*/
|
|
62
|
-
this.drawMode = false;
|
|
63
|
-
/**
|
|
64
|
-
* The drawID (option)
|
|
65
|
-
*/
|
|
66
|
-
this.drawId = '';
|
|
67
|
-
/**
|
|
68
|
-
* The game name
|
|
69
|
-
*/
|
|
70
|
-
this.gameName = '';
|
|
71
|
-
/**
|
|
72
|
-
* The ticket submission date
|
|
73
|
-
*/
|
|
74
|
-
this.ticketDate = '';
|
|
75
|
-
/**
|
|
76
|
-
* The ticket status
|
|
77
|
-
*/
|
|
78
|
-
this.ticketStatus = '';
|
|
79
|
-
/**
|
|
80
|
-
* The ticket id
|
|
81
|
-
*/
|
|
82
|
-
this.ticketId = '';
|
|
83
|
-
/**
|
|
84
|
-
* The ticket amount
|
|
85
|
-
*/
|
|
86
|
-
this.ticketAmount = '';
|
|
87
|
-
/**
|
|
88
|
-
* The ticket multiplier
|
|
89
|
-
*/
|
|
90
|
-
this.ticketMultiplier = false;
|
|
91
|
-
/**
|
|
92
|
-
* The ticket draw count
|
|
93
|
-
*/
|
|
94
|
-
this.ticketDrawCount = 0;
|
|
95
|
-
/**
|
|
96
|
-
* The ticket winning numbers
|
|
97
|
-
*/
|
|
98
|
-
this.ticketNumbers = '';
|
|
99
|
-
/**
|
|
100
|
-
* The session id
|
|
101
|
-
*/
|
|
102
|
-
this.sessionId = '';
|
|
103
|
-
/**
|
|
104
|
-
* Client custom styling via string
|
|
105
|
-
*/
|
|
106
|
-
this.clientStyling = '';
|
|
107
|
-
/**
|
|
108
|
-
* Client custom styling via url content
|
|
109
|
-
*/
|
|
110
|
-
this.clientStylingUrlContent = '';
|
|
111
|
-
this.multiplier = 3;
|
|
112
|
-
this.isLoading = true;
|
|
113
|
-
this.rules = {};
|
|
114
|
-
this.toggleDrawer = [false];
|
|
115
|
-
this.hasErrors = false;
|
|
116
|
-
this.errorText = '';
|
|
117
|
-
this.ticketData = [];
|
|
118
|
-
this.ticketDataLoaded = false;
|
|
119
|
-
this.ticketDraws = [];
|
|
120
|
-
this.hasDrawNumbers = false;
|
|
121
|
-
this.limitStylingAppends = false;
|
|
122
|
-
this.getTicketsData = () => {
|
|
123
|
-
let url = new URL(`${this.endpoint}/tickets`);
|
|
124
|
-
let drawOptions = {
|
|
125
|
-
method: "GET",
|
|
126
|
-
headers: {
|
|
127
|
-
'Content-Type': "application/json",
|
|
128
|
-
'Accept': 'application/json',
|
|
129
|
-
'Authorization': `Bearer ${this.sessionId}`
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
fetch(url.href, drawOptions)
|
|
133
|
-
.then((response) => {
|
|
134
|
-
return response.json();
|
|
135
|
-
})
|
|
136
|
-
.then((data) => {
|
|
137
|
-
if (data) {
|
|
138
|
-
this.ticketData = data;
|
|
139
|
-
this.ticketDataLoaded = true;
|
|
140
|
-
}
|
|
141
|
-
return this.ticketData;
|
|
142
|
-
}).then((response) => {
|
|
143
|
-
response.forEach(ticket => {
|
|
144
|
-
if (ticket.drawResults.length) {
|
|
145
|
-
ticket.drawResults.forEach(draw => {
|
|
146
|
-
fetch(`${this.endpoint}/games/${this.gameId}/draws/${draw.drawId}`)
|
|
147
|
-
.then((response) => {
|
|
148
|
-
return response.json();
|
|
149
|
-
})
|
|
150
|
-
.then((data) => {
|
|
151
|
-
// check if draw id is unique
|
|
152
|
-
if (!this.ticketDraws.some(el => el.drawId === draw.drawId)) {
|
|
153
|
-
this.ticketDraws.push({ drawId: draw.drawId, drawNumbers: data.winningNumbers });
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
return this.ticketDraws;
|
|
159
|
-
});
|
|
160
|
-
}).then(() => {
|
|
161
|
-
this.hasDrawNumbers = true;
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
this.changeBox = (index) => {
|
|
165
|
-
this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
|
|
166
|
-
if (itemIndex == index) {
|
|
167
|
-
return !item;
|
|
168
|
-
}
|
|
169
|
-
return item;
|
|
170
|
-
});
|
|
171
|
-
if (index >= this.toggleDrawer.length) {
|
|
172
|
-
this.toggleDrawer.push(true);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
this.setClientStyling = () => {
|
|
176
|
-
let sheet = document.createElement('style');
|
|
177
|
-
sheet.innerHTML = this.clientStyling;
|
|
178
|
-
this.stylingContainer.prepend(sheet);
|
|
179
|
-
};
|
|
180
|
-
this.setClientStylingURL = () => {
|
|
181
|
-
let cssFile = document.createElement('style');
|
|
182
|
-
setTimeout(() => {
|
|
183
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
184
|
-
this.stylingContainer.prepend(cssFile);
|
|
185
|
-
}, 1);
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
connectedCallback() {
|
|
189
|
-
let promises = [];
|
|
190
|
-
promises.push(this.getGameData());
|
|
191
|
-
if (this.drawId) {
|
|
192
|
-
promises.push(this.getDrawData());
|
|
193
|
-
}
|
|
194
|
-
if (!this.drawMode) {
|
|
195
|
-
this.getTicketsData();
|
|
196
|
-
}
|
|
197
|
-
Promise.all(promises)
|
|
198
|
-
.then(() => {
|
|
199
|
-
this.isLoading = false;
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
componentDidRender() {
|
|
203
|
-
// start custom styling area
|
|
204
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
205
|
-
if (this.clientStyling)
|
|
206
|
-
this.setClientStyling();
|
|
207
|
-
if (this.clientStylingUrlContent)
|
|
208
|
-
this.setClientStylingURL();
|
|
209
|
-
this.limitStylingAppends = true;
|
|
210
|
-
}
|
|
211
|
-
// end custom styling area
|
|
212
|
-
}
|
|
213
|
-
getDrawData(drawID) {
|
|
214
|
-
return new Promise((resolve, reject) => {
|
|
215
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID ? drawID : this.drawId}`);
|
|
216
|
-
fetch(url.href)
|
|
217
|
-
.then((response) => {
|
|
218
|
-
// @TODO EXCEPTIONS
|
|
219
|
-
return response.json();
|
|
220
|
-
})
|
|
221
|
-
.then((data) => {
|
|
222
|
-
this.drawData = data;
|
|
223
|
-
resolve(true);
|
|
224
|
-
this.isLoading = false;
|
|
225
|
-
if (drawID) {
|
|
226
|
-
return this.drawData.winningNumbers;
|
|
227
|
-
}
|
|
228
|
-
})
|
|
229
|
-
.catch((err) => {
|
|
230
|
-
reject(err);
|
|
231
|
-
this.isLoading = false;
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
getGameData() {
|
|
236
|
-
return new Promise((resolve, reject) => {
|
|
237
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
238
|
-
fetch(url.href)
|
|
239
|
-
.then((response) => {
|
|
240
|
-
return response.json();
|
|
241
|
-
})
|
|
242
|
-
.then((data) => {
|
|
243
|
-
this.rules = {
|
|
244
|
-
maximumAllowed: data.rules.boards[0].maximumAllowed,
|
|
245
|
-
totalNumbers: data.rules.boards[0].totalNumbers
|
|
246
|
-
};
|
|
247
|
-
resolve(true);
|
|
248
|
-
this.isLoading = false;
|
|
249
|
-
this.hasErrors = false;
|
|
250
|
-
})
|
|
251
|
-
.catch((err) => {
|
|
252
|
-
this.isLoading = false;
|
|
253
|
-
this.hasErrors = true;
|
|
254
|
-
this.errorText = err;
|
|
255
|
-
reject(err);
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
render() {
|
|
260
|
-
if (this.isLoading) {
|
|
261
|
-
return (h("p", null, "Loading, please wait ..."));
|
|
262
|
-
}
|
|
263
|
-
else if (this.hasErrors) {
|
|
264
|
-
h("p", null, this.errorText);
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
return (h("section", { class: "DrawResultsSection", ref: el => this.stylingContainer = el }, this.drawMode ?
|
|
268
|
-
h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
269
|
-
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), "0:"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, "selected-numbers": this.drawData.winningNumbers.join(','), "display-selected": true, selectable: false, language: this.language, "grid-type": 'ticket', "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, translate('multiplier', this.language), " ", this.multiplier))))))
|
|
270
|
-
:
|
|
271
|
-
h("div", { class: "DrawResultsArea TicketDraws" }, h("div", { class: "DrawResultsBody" }, h("div", { class: "TicketIdContainer" }, h("label", { class: "Label" }, translate('ticketId', this.language), ": ", h("span", null, this.ticketId))), h("div", { class: "TicketAmountContainer" }, h("label", { class: "Label" }, translate('ticketAmount', this.language), " ", h("span", null, this.ticketAmount))), h("div", { class: "DrawNumbersGrid" }, h("label", { class: "Label" }, translate('drawNumbersGridTicket', this.language), "0:"), h("div", { class: "BulletContainer" }, h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, "selected-numbers": JSON.parse(this.ticketNumbers).join(','), selectable: false, "display-selected": true, language: this.language, "grid-type": 'ticket', "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, translate('multiplier', this.language), " ", JSON.stringify(this.ticketMultiplier))), h("div", { class: "NumberOfDrawsContainer" }, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": ", this.ticketDrawCount), h("div", { class: "DrawTicketsContainer" }, this.ticketData.map((ticket) => h("div", { class: "ExpandableBoxes" }, ticket.drawResults.length ?
|
|
272
|
-
h("div", null, ticket.id == this.ticketId && ticket.drawResults.map((item, index) => 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.state)), item.state == 'won' &&
|
|
273
|
-
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" }, this.hasDrawNumbers && this.ticketDraws.map((ticketDraw) => item.drawId && item.drawId === ticketDraw.drawId &&
|
|
274
|
-
h("div", null, h("label", { class: "Label" }, translate('drawNumbersGridDraw', this.language), "A:"), h("lottery-grid", { "maximum-allowed": this.rules.maximumAllowed, "total-numbers": this.rules.totalNumbers, "selected-numbers": ticketDraw.drawNumbers.join(','), selectable: false, "display-selected": true, language: this.language, "grid-type": 'ticket', "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))), h("div", { class: "DrawMultipler" }, h("label", { class: "Label" }, translate('multiplier', this.language), " ", item.multiplier)))))
|
|
275
|
-
:
|
|
276
|
-
h("span", null)))))))));
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
static get style() { return lotteryDrawResultsCss; }
|
|
280
|
-
}, [1, "lottery-draw-results", {
|
|
281
|
-
"endpoint": [1],
|
|
282
|
-
"gameId": [1, "game-id"],
|
|
283
|
-
"language": [1],
|
|
284
|
-
"playerId": [1, "player-id"],
|
|
285
|
-
"drawMode": [4, "draw-mode"],
|
|
286
|
-
"drawId": [1, "draw-id"],
|
|
287
|
-
"gameName": [1, "game-name"],
|
|
288
|
-
"ticketDate": [1, "ticket-date"],
|
|
289
|
-
"ticketStatus": [1, "ticket-status"],
|
|
290
|
-
"ticketId": [1, "ticket-id"],
|
|
291
|
-
"ticketAmount": [1, "ticket-amount"],
|
|
292
|
-
"ticketMultiplier": [4, "ticket-multiplier"],
|
|
293
|
-
"ticketDrawCount": [2, "ticket-draw-count"],
|
|
294
|
-
"ticketNumbers": [1, "ticket-numbers"],
|
|
295
|
-
"sessionId": [1, "session-id"],
|
|
296
|
-
"clientStyling": [1, "client-styling"],
|
|
297
|
-
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
298
|
-
"multiplier": [32],
|
|
299
|
-
"isLoading": [32],
|
|
300
|
-
"rules": [32],
|
|
301
|
-
"toggleDrawer": [32],
|
|
302
|
-
"hasErrors": [32],
|
|
303
|
-
"errorText": [32],
|
|
304
|
-
"ticketData": [32],
|
|
305
|
-
"ticketDataLoaded": [32],
|
|
306
|
-
"ticketDraws": [32],
|
|
307
|
-
"hasDrawNumbers": [32],
|
|
308
|
-
"limitStylingAppends": [32]
|
|
309
|
-
}]);
|
|
310
|
-
function defineCustomElement() {
|
|
311
|
-
if (typeof customElements === "undefined") {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
const components = ["lottery-draw-results", "lottery-bullet", "lottery-grid"];
|
|
315
|
-
components.forEach(tagName => { switch (tagName) {
|
|
316
|
-
case "lottery-draw-results":
|
|
317
|
-
if (!customElements.get(tagName)) {
|
|
318
|
-
customElements.define(tagName, LotteryDrawResults);
|
|
319
|
-
}
|
|
320
|
-
break;
|
|
321
|
-
case "lottery-bullet":
|
|
322
|
-
if (!customElements.get(tagName)) {
|
|
323
|
-
defineCustomElement$2();
|
|
324
|
-
}
|
|
325
|
-
break;
|
|
326
|
-
case "lottery-grid":
|
|
327
|
-
if (!customElements.get(tagName)) {
|
|
328
|
-
defineCustomElement$1();
|
|
329
|
-
}
|
|
330
|
-
break;
|
|
331
|
-
} });
|
|
332
|
-
}
|
|
333
|
-
defineCustomElement();
|
|
334
|
-
|
|
335
|
-
export { LotteryDrawResults as L, defineCustomElement as d };
|
|
@@ -1,85 +0,0 @@
|
|
|
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
|
-
* Client custom styling via string
|
|
15
|
-
*/
|
|
16
|
-
this.clientStyling = '';
|
|
17
|
-
/**
|
|
18
|
-
* Client custom styling via url content
|
|
19
|
-
*/
|
|
20
|
-
this.clientStylingUrlContent = '';
|
|
21
|
-
this.limitStylingAppends = false;
|
|
22
|
-
this.setClientStyling = () => {
|
|
23
|
-
let sheet = document.createElement('style');
|
|
24
|
-
sheet.innerHTML = this.clientStyling;
|
|
25
|
-
this.stylingContainer.prepend(sheet);
|
|
26
|
-
};
|
|
27
|
-
this.setClientStylingURL = () => {
|
|
28
|
-
let cssFile = document.createElement('style');
|
|
29
|
-
setTimeout(() => {
|
|
30
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
31
|
-
this.stylingContainer.prepend(cssFile);
|
|
32
|
-
}, 1);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
componentDidRender() {
|
|
36
|
-
// start custom styling area
|
|
37
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
38
|
-
if (this.clientStyling)
|
|
39
|
-
this.setClientStyling();
|
|
40
|
-
if (this.clientStylingUrlContent)
|
|
41
|
-
this.setClientStylingURL();
|
|
42
|
-
this.limitStylingAppends = true;
|
|
43
|
-
}
|
|
44
|
-
// end custom styling area
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "AccordionContainer", slot: "accordionContent" }, h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
48
|
-
}
|
|
49
|
-
static get style() { return lotteryGameDetailsCss; }
|
|
50
|
-
}, [1, "lottery-game-details", {
|
|
51
|
-
"clientStyling": [1, "client-styling"],
|
|
52
|
-
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
53
|
-
"limitStylingAppends": [32]
|
|
54
|
-
}]);
|
|
55
|
-
function defineCustomElement() {
|
|
56
|
-
if (typeof customElements === "undefined") {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const components = ["lottery-game-details", "helper-accordion", "helper-tab", "helper-tabs"];
|
|
60
|
-
components.forEach(tagName => { switch (tagName) {
|
|
61
|
-
case "lottery-game-details":
|
|
62
|
-
if (!customElements.get(tagName)) {
|
|
63
|
-
customElements.define(tagName, LotteryGameDetails);
|
|
64
|
-
}
|
|
65
|
-
break;
|
|
66
|
-
case "helper-accordion":
|
|
67
|
-
if (!customElements.get(tagName)) {
|
|
68
|
-
defineCustomElement$3();
|
|
69
|
-
}
|
|
70
|
-
break;
|
|
71
|
-
case "helper-tab":
|
|
72
|
-
if (!customElements.get(tagName)) {
|
|
73
|
-
defineCustomElement$2();
|
|
74
|
-
}
|
|
75
|
-
break;
|
|
76
|
-
case "helper-tabs":
|
|
77
|
-
if (!customElements.get(tagName)) {
|
|
78
|
-
defineCustomElement$1();
|
|
79
|
-
}
|
|
80
|
-
break;
|
|
81
|
-
} });
|
|
82
|
-
}
|
|
83
|
-
defineCustomElement();
|
|
84
|
-
|
|
85
|
-
export { LotteryGameDetails as L, defineCustomElement as d };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface LotteryGamePage extends Components.LotteryGamePage, HTMLElement {}
|
|
4
|
-
export const LotteryGamePage: {
|
|
5
|
-
prototype: LotteryGamePage;
|
|
6
|
-
new (): LotteryGamePage;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|