@everymatrix/lottery-draw-results 0.1.7 → 0.1.20
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/{index-62f030ff.js → index-43800d3c.js} +17 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-bullet_3.cjs.entry.js +109 -14
- package/dist/cjs/lottery-draw-results.cjs.js +2 -2
- package/dist/collection/components/lottery-draw-results/lottery-draw-results.css +36 -13
- package/dist/collection/components/lottery-draw-results/lottery-draw-results.js +261 -100
- package/dist/collection/utils/locale.utils.js +4 -4
- package/dist/components/lottery-draw-results.js +118 -15
- package/dist/esm/{index-98326ddd.js → index-9547eb6c.js} +17 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-bullet_3.entry.js +109 -14
- package/dist/esm/lottery-draw-results.js +2 -2
- package/dist/lottery-draw-results/lottery-draw-results.esm.js +1 -1
- package/dist/lottery-draw-results/p-9678a673.entry.js +1 -0
- package/dist/lottery-draw-results/p-e1cb3144.js +1 -0
- package/dist/types/components/lottery-draw-results/lottery-draw-results.d.ts +27 -3
- package/dist/types/components.d.ts +32 -0
- package/package.json +4 -1
- package/dist/lottery-draw-results/p-bb429486.js +0 -1
- package/dist/lottery-draw-results/p-d653e278.entry.js +0 -1
|
@@ -268,6 +268,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
268
268
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
269
269
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
270
270
|
}
|
|
271
|
+
else if (memberName === 'ref') {
|
|
272
|
+
// minifier will clean this up
|
|
273
|
+
if (newValue) {
|
|
274
|
+
newValue(elm);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
271
277
|
else if ((!isProp ) &&
|
|
272
278
|
memberName[0] === 'o' &&
|
|
273
279
|
memberName[1] === 'n') {
|
|
@@ -424,6 +430,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
424
430
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
425
431
|
if ((vnode = vnodes[startIdx])) {
|
|
426
432
|
elm = vnode.$elm$;
|
|
433
|
+
callNodeRefs(vnode);
|
|
427
434
|
// remove the vnode's element from the dom
|
|
428
435
|
elm.remove();
|
|
429
436
|
}
|
|
@@ -542,6 +549,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
542
549
|
elm.data = text;
|
|
543
550
|
}
|
|
544
551
|
};
|
|
552
|
+
const callNodeRefs = (vNode) => {
|
|
553
|
+
{
|
|
554
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
555
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
556
|
+
}
|
|
557
|
+
};
|
|
545
558
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
546
559
|
const hostElm = hostRef.$hostElement$;
|
|
547
560
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -683,7 +696,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
683
696
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
684
697
|
const elm = hostRef.$hostElement$;
|
|
685
698
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
699
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
686
700
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
701
|
+
{
|
|
702
|
+
safeCall(instance, 'componentDidRender');
|
|
703
|
+
}
|
|
687
704
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
688
705
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
689
706
|
{
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-43800d3c.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"
|
|
17
|
+
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"ticketNumbers":[1,"ticket-numbers"],"sessionId":[1,"session-id"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"isLoading":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32],"ticketData":[32],"ticketDataLoaded":[32],"ticketDraws":[32],"hasDrawNumbers":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-43800d3c.js');
|
|
6
6
|
|
|
7
7
|
const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}";
|
|
8
8
|
|
|
@@ -46,8 +46,8 @@ const TRANSLATIONS = {
|
|
|
46
46
|
drawId: 'Draw ID',
|
|
47
47
|
drawName: 'Game name',
|
|
48
48
|
drawDate: 'Draw Date',
|
|
49
|
-
drawNumbersGridDraw: 'Draw numbers Grid
|
|
50
|
-
drawNumbersGridTicket: 'Draw numbers Grid
|
|
49
|
+
drawNumbersGridDraw: 'Draw numbers Grid ',
|
|
50
|
+
drawNumbersGridTicket: 'Draw numbers Grid ',
|
|
51
51
|
ticketResult: 'Ticket result',
|
|
52
52
|
amountWon: 'Amount won',
|
|
53
53
|
numberOfDraws: 'Number of draws',
|
|
@@ -63,8 +63,8 @@ const TRANSLATIONS = {
|
|
|
63
63
|
drawId: 'Id extragere',
|
|
64
64
|
drawName: 'Numele jocului',
|
|
65
65
|
drawDate: 'Data extragerii',
|
|
66
|
-
drawNumbersGridDraw: 'Numerele extrase Grid
|
|
67
|
-
drawNumbersGridTicket: 'Numerele extrase Grid
|
|
66
|
+
drawNumbersGridDraw: 'Numerele extrase Grid',
|
|
67
|
+
drawNumbersGridTicket: 'Numerele extrase Grid',
|
|
68
68
|
ticketResult: 'Rezultatul biletului',
|
|
69
69
|
amountWon: 'Suma castigata',
|
|
70
70
|
numberOfDraws: 'Numarul de extrageri',
|
|
@@ -81,7 +81,7 @@ const translate = (key, customLang) => {
|
|
|
81
81
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
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}.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}.
|
|
84
|
+
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}";
|
|
85
85
|
|
|
86
86
|
const LotteryDrawResults = class {
|
|
87
87
|
constructor(hostRef) {
|
|
@@ -126,13 +126,75 @@ const LotteryDrawResults = class {
|
|
|
126
126
|
* The ticket draw count
|
|
127
127
|
*/
|
|
128
128
|
this.ticketDrawCount = 0;
|
|
129
|
+
/**
|
|
130
|
+
* The ticket winning numbers
|
|
131
|
+
*/
|
|
132
|
+
this.ticketNumbers = '';
|
|
133
|
+
/**
|
|
134
|
+
* The session id
|
|
135
|
+
*/
|
|
136
|
+
this.sessionId = '';
|
|
137
|
+
/**
|
|
138
|
+
* Client custom styling via string
|
|
139
|
+
*/
|
|
140
|
+
this.clientStyling = '';
|
|
141
|
+
/**
|
|
142
|
+
* Client custom styling via url content
|
|
143
|
+
*/
|
|
144
|
+
this.clientStylingUrlContent = '';
|
|
129
145
|
this.multiplier = 3;
|
|
130
146
|
this.isLoading = true;
|
|
131
|
-
this.drawResults = [];
|
|
132
147
|
this.rules = {};
|
|
133
148
|
this.toggleDrawer = [false];
|
|
134
149
|
this.hasErrors = false;
|
|
135
150
|
this.errorText = '';
|
|
151
|
+
this.ticketData = [];
|
|
152
|
+
this.ticketDataLoaded = false;
|
|
153
|
+
this.ticketDraws = [];
|
|
154
|
+
this.hasDrawNumbers = false;
|
|
155
|
+
this.limitStylingAppends = false;
|
|
156
|
+
this.getTicketsData = () => {
|
|
157
|
+
let url = new URL(`${this.endpoint}/tickets`);
|
|
158
|
+
let drawOptions = {
|
|
159
|
+
method: "GET",
|
|
160
|
+
headers: {
|
|
161
|
+
'Content-Type': "application/json",
|
|
162
|
+
'Accept': 'application/json',
|
|
163
|
+
'Authorization': `Bearer ${this.sessionId}`
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
fetch(url.href, drawOptions)
|
|
167
|
+
.then((response) => {
|
|
168
|
+
return response.json();
|
|
169
|
+
})
|
|
170
|
+
.then((data) => {
|
|
171
|
+
if (data) {
|
|
172
|
+
this.ticketData = data;
|
|
173
|
+
this.ticketDataLoaded = true;
|
|
174
|
+
}
|
|
175
|
+
return this.ticketData;
|
|
176
|
+
}).then((response) => {
|
|
177
|
+
response.forEach(ticket => {
|
|
178
|
+
if (ticket.drawResults.length) {
|
|
179
|
+
ticket.drawResults.forEach(draw => {
|
|
180
|
+
fetch(`${this.endpoint}/games/${this.gameId}/draws/${draw.drawId}`)
|
|
181
|
+
.then((response) => {
|
|
182
|
+
return response.json();
|
|
183
|
+
})
|
|
184
|
+
.then((data) => {
|
|
185
|
+
// check if draw id is unique
|
|
186
|
+
if (!this.ticketDraws.some(el => el.drawId === draw.drawId)) {
|
|
187
|
+
this.ticketDraws.push({ drawId: draw.drawId, drawNumbers: data.winningNumbers });
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
return this.ticketDraws;
|
|
193
|
+
});
|
|
194
|
+
}).then(() => {
|
|
195
|
+
this.hasDrawNumbers = true;
|
|
196
|
+
});
|
|
197
|
+
};
|
|
136
198
|
this.changeBox = (index) => {
|
|
137
199
|
this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
|
|
138
200
|
if (itemIndex == index) {
|
|
@@ -144,6 +206,18 @@ const LotteryDrawResults = class {
|
|
|
144
206
|
this.toggleDrawer.push(true);
|
|
145
207
|
}
|
|
146
208
|
};
|
|
209
|
+
this.setClientStyling = () => {
|
|
210
|
+
let sheet = document.createElement('style');
|
|
211
|
+
sheet.innerHTML = this.clientStyling;
|
|
212
|
+
this.stylingContainer.prepend(sheet);
|
|
213
|
+
};
|
|
214
|
+
this.setClientStylingURL = () => {
|
|
215
|
+
let cssFile = document.createElement('style');
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
218
|
+
this.stylingContainer.prepend(cssFile);
|
|
219
|
+
}, 1);
|
|
220
|
+
};
|
|
147
221
|
}
|
|
148
222
|
connectedCallback() {
|
|
149
223
|
let promises = [];
|
|
@@ -151,14 +225,28 @@ const LotteryDrawResults = class {
|
|
|
151
225
|
if (this.drawId) {
|
|
152
226
|
promises.push(this.getDrawData());
|
|
153
227
|
}
|
|
228
|
+
if (!this.drawMode) {
|
|
229
|
+
this.getTicketsData();
|
|
230
|
+
}
|
|
154
231
|
Promise.all(promises)
|
|
155
232
|
.then(() => {
|
|
156
233
|
this.isLoading = false;
|
|
157
234
|
});
|
|
158
235
|
}
|
|
159
|
-
|
|
236
|
+
componentDidRender() {
|
|
237
|
+
// start custom styling area
|
|
238
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
239
|
+
if (this.clientStyling)
|
|
240
|
+
this.setClientStyling();
|
|
241
|
+
if (this.clientStylingUrlContent)
|
|
242
|
+
this.setClientStylingURL();
|
|
243
|
+
this.limitStylingAppends = true;
|
|
244
|
+
}
|
|
245
|
+
// end custom styling area
|
|
246
|
+
}
|
|
247
|
+
getDrawData(drawID) {
|
|
160
248
|
return new Promise((resolve, reject) => {
|
|
161
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);
|
|
249
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID ? drawID : this.drawId}`);
|
|
162
250
|
fetch(url.href)
|
|
163
251
|
.then((response) => {
|
|
164
252
|
// @TODO EXCEPTIONS
|
|
@@ -168,6 +256,9 @@ const LotteryDrawResults = class {
|
|
|
168
256
|
this.drawData = data;
|
|
169
257
|
resolve(true);
|
|
170
258
|
this.isLoading = false;
|
|
259
|
+
if (drawID) {
|
|
260
|
+
return this.drawData.winningNumbers;
|
|
261
|
+
}
|
|
171
262
|
})
|
|
172
263
|
.catch((err) => {
|
|
173
264
|
reject(err);
|
|
@@ -207,12 +298,16 @@ const LotteryDrawResults = class {
|
|
|
207
298
|
index.h("p", null, this.errorText);
|
|
208
299
|
}
|
|
209
300
|
else {
|
|
210
|
-
return (index.h("section", { class: "DrawResultsSection" },
|
|
211
|
-
index.h("div", { class: "DrawResultsArea" },
|
|
212
|
-
index.h("div", { class: "
|
|
301
|
+
return (index.h("section", { class: "DrawResultsSection", ref: el => this.stylingContainer = el }, this.drawMode ?
|
|
302
|
+
index.h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
303
|
+
index.h("div", null, index.h("div", { class: "DrawResultsHeader" }, index.h("span", null, translate('drawId', this.language), ": ", this.drawData.id), index.h("span", null, translate('drawDate', this.language), ": ", this.drawData.date.slice(0, 10))), index.h("div", { class: "DrawResultsBody" }, index.h("div", { class: "DrawNumbersGrid" }, index.h("p", null, translate('drawNumbersGridDraw', this.language), "0:"), index.h("div", { class: "BulletContainer" }, index.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 })), index.h("div", { class: "DrawMultipler" }, index.h("label", { class: "Label" }, translate('multiplier', this.language), " ", this.multiplier))))))
|
|
213
304
|
:
|
|
214
|
-
index.h("div", { class: "DrawResultsArea" }, this.
|
|
215
|
-
index.h("div", null,
|
|
305
|
+
index.h("div", { class: "DrawResultsArea TicketDraws" }, index.h("div", { class: "DrawResultsBody" }, index.h("div", { class: "TicketIdContainer" }, index.h("label", { class: "Label" }, translate('ticketId', this.language), ": ", index.h("span", null, this.ticketId))), index.h("div", { class: "TicketAmountContainer" }, index.h("label", { class: "Label" }, translate('ticketAmount', this.language), " ", index.h("span", null, this.ticketAmount))), index.h("div", { class: "DrawNumbersGrid" }, index.h("label", { class: "Label" }, translate('drawNumbersGridTicket', this.language), "0:"), index.h("div", { class: "BulletContainer" }, index.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 }))), index.h("div", { class: "DrawMultipler" }, index.h("label", { class: "Label" }, translate('multiplier', this.language), " ", JSON.stringify(this.ticketMultiplier))), index.h("div", { class: "NumberOfDrawsContainer" }, index.h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": ", this.ticketDrawCount), index.h("div", { class: "DrawTicketsContainer" }, this.ticketData.map((ticket) => index.h("div", { class: "ExpandableBoxes" }, ticket.drawResults.length ?
|
|
306
|
+
index.h("div", null, ticket.id == this.ticketId && ticket.drawResults.map((item, index$1) => index.h("div", { class: this.toggleDrawer[index$1] ? 'ExpandableBox ShowBox' : 'ExpandableBox', onClick: () => this.changeBox(index$1) }, index.h("div", { class: "TicketResultContainer" }, index.h("p", null, translate('ticketResult', this.language), ": ", item.state)), item.state == 'won' &&
|
|
307
|
+
index.h("div", { class: "AmountWonContainer" }, index.h("p", null, translate('amountWon', this.language), ": ", Number(item.amount).toLocaleString('en'), " ", item.currency)), index.h("div", { class: "DrawIdContainer" }, index.h("p", null, translate('drawId', this.language), ": ", item.drawId)), index.h("div", { class: "DrawDateContainer" }, index.h("p", null, translate('drawDate', this.language), ": ", item.updatedAt.slice(0, 10), " | ", item.updatedAt.slice(11, 19))), index.h("div", { class: "DrawNumbersGrid" }, this.hasDrawNumbers && this.ticketDraws.map((ticketDraw) => item.drawId && item.drawId === ticketDraw.drawId &&
|
|
308
|
+
index.h("div", null, index.h("label", { class: "Label" }, translate('drawNumbersGridDraw', this.language), "A:"), index.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 })))), index.h("div", { class: "DrawMultipler" }, index.h("label", { class: "Label" }, translate('multiplier', this.language), " ", item.multiplier)))))
|
|
309
|
+
:
|
|
310
|
+
index.h("span", null)))))))));
|
|
216
311
|
}
|
|
217
312
|
}
|
|
218
313
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-43800d3c.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"
|
|
18
|
+
return index.bootstrapLazy([["lottery-bullet_3.cjs",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"ticketNumbers":[1,"ticket-numbers"],"sessionId":[1,"session-id"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"isLoading":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32],"ticketData":[32],"ticketDataLoaded":[32],"ticketDraws":[32],"hasDrawNumbers":[32],"limitStylingAppends":[32]}],[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"]}]]]], options);
|
|
19
19
|
});
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
.DrawResultsArea {
|
|
18
18
|
margin-top: 15px;
|
|
19
19
|
}
|
|
20
|
+
.DrawResultsArea.TicketDraws .Content {
|
|
21
|
+
padding: 0;
|
|
22
|
+
border: 0;
|
|
23
|
+
}
|
|
24
|
+
.DrawResultsArea.TicketDraws .DrawResultsBody {
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin-bottom: 5px;
|
|
27
|
+
border-radius: 0;
|
|
28
|
+
border: 0;
|
|
29
|
+
}
|
|
20
30
|
|
|
21
31
|
.DrawResultsSection {
|
|
22
32
|
max-width: 600px;
|
|
@@ -40,25 +50,28 @@
|
|
|
40
50
|
padding-top: 15px;
|
|
41
51
|
}
|
|
42
52
|
|
|
43
|
-
.DrawMultipler label {
|
|
44
|
-
display: block;
|
|
45
|
-
margin: 15px 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
53
|
.DrawResultsBody {
|
|
49
|
-
padding:
|
|
54
|
+
padding: 20px;
|
|
50
55
|
margin-bottom: 5px;
|
|
51
56
|
border-radius: 0 0 4px 4px;
|
|
52
57
|
border: 1px solid #009993;
|
|
53
58
|
}
|
|
54
|
-
.DrawResultsBody
|
|
55
|
-
|
|
59
|
+
.DrawResultsBody > div {
|
|
60
|
+
margin: 10px 0;
|
|
56
61
|
}
|
|
57
62
|
.DrawResultsBody .NumberOfDrawsContainer {
|
|
58
63
|
display: table;
|
|
59
64
|
width: 100%;
|
|
60
65
|
}
|
|
61
66
|
|
|
67
|
+
.DrawNumbersGrid {
|
|
68
|
+
margin-bottom: 15px;
|
|
69
|
+
}
|
|
70
|
+
.DrawNumbersGrid label {
|
|
71
|
+
display: block;
|
|
72
|
+
margin-bottom: 10px;
|
|
73
|
+
}
|
|
74
|
+
|
|
62
75
|
.Toggle {
|
|
63
76
|
cursor: pointer;
|
|
64
77
|
display: inline-block;
|
|
@@ -109,17 +122,23 @@
|
|
|
109
122
|
}
|
|
110
123
|
|
|
111
124
|
.Label {
|
|
112
|
-
margin-right: 5px;
|
|
113
125
|
position: relative;
|
|
114
|
-
top: 2px;
|
|
115
126
|
}
|
|
116
127
|
|
|
117
128
|
.DrawTicketsContainer {
|
|
118
|
-
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
margin: 20px auto 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.DrawMultipler {
|
|
135
|
+
margin-top: 15px;
|
|
119
136
|
}
|
|
120
137
|
|
|
121
138
|
.ExpandableBoxes {
|
|
122
139
|
position: relative;
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
123
142
|
}
|
|
124
143
|
|
|
125
144
|
.ExpandableBox {
|
|
@@ -127,13 +146,14 @@
|
|
|
127
146
|
font-weight: lighter;
|
|
128
147
|
width: 100%;
|
|
129
148
|
height: 100%;
|
|
130
|
-
max-height:
|
|
149
|
+
max-height: 80px;
|
|
131
150
|
float: left;
|
|
132
151
|
margin: 0 0 20px 0;
|
|
133
|
-
border: 1px solid #
|
|
152
|
+
border: 1px solid #009993;
|
|
134
153
|
background: #fff;
|
|
135
154
|
border-radius: 4px;
|
|
136
155
|
padding: 10px;
|
|
156
|
+
box-sizing: border-box;
|
|
137
157
|
-webkit-transition: all 0.6s ease-in-out;
|
|
138
158
|
-moz-transition: all 0.6s ease-in-out;
|
|
139
159
|
-o-transition: all 0.6s ease-in-out;
|
|
@@ -142,6 +162,9 @@
|
|
|
142
162
|
overflow: hidden;
|
|
143
163
|
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
|
144
164
|
}
|
|
165
|
+
.ExpandableBox:last-of-type {
|
|
166
|
+
margin-bottom: 0;
|
|
167
|
+
}
|
|
145
168
|
|
|
146
169
|
.ExpandableBox.ShowBox {
|
|
147
170
|
max-height: 400px;
|