@everymatrix/lottery-game-page 0.1.18 → 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/helper-accordion.cjs.entry.js +35 -3
- package/dist/cjs/helper-filters_2.cjs.entry.js +148 -21
- package/dist/cjs/helper-modal.cjs.entry.js +34 -2
- package/dist/cjs/helper-pagination.cjs.entry.js +33 -1
- package/dist/cjs/helper-tab.cjs.entry.js +36 -4
- package/dist/cjs/helper-tabs.cjs.entry.js +38 -2
- package/dist/cjs/{index-5701a895.js → index-7b63209d.js} +13 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +35 -3
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +1 -1
- package/dist/cjs/lottery-game-details.cjs.entry.js +1 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +43 -6
- package/dist/cjs/lottery-game-page.cjs.js +2 -2
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +1 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +1 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +6 -4
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +84 -9
- package/dist/components/helper-accordion2.js +38 -3
- package/dist/components/helper-filters2.js +44 -8
- package/dist/components/helper-modal2.js +37 -2
- package/dist/components/helper-pagination.js +36 -1
- package/dist/components/helper-tab2.js +39 -4
- package/dist/components/helper-tabs2.js +42 -2
- package/dist/components/lottery-bullet2.js +37 -2
- package/dist/components/lottery-draw-results2.js +118 -15
- package/dist/components/lottery-game-page.js +47 -6
- package/dist/components/lottery-grid2.js +1 -1
- package/dist/esm/helper-accordion.entry.js +35 -3
- package/dist/esm/helper-filters_2.entry.js +148 -21
- package/dist/esm/helper-modal.entry.js +34 -2
- package/dist/esm/helper-pagination.entry.js +33 -1
- package/dist/esm/helper-tab.entry.js +36 -4
- package/dist/esm/helper-tabs.entry.js +38 -2
- package/dist/esm/{index-ade3d0ab.js → index-0f8edfd2.js} +13 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-bullet_2.entry.js +35 -3
- package/dist/esm/lottery-draw-results-history.entry.js +1 -1
- package/dist/esm/lottery-game-details.entry.js +1 -1
- package/dist/esm/lottery-game-page.entry.js +43 -6
- package/dist/esm/lottery-game-page.js +2 -2
- package/dist/esm/lottery-ticket-controller.entry.js +1 -1
- package/dist/esm/lottery-ticket.entry.js +1 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-07f98587.entry.js +1 -0
- package/dist/lottery-game-page/{p-5e12dbf9.entry.js → p-13d0f256.entry.js} +1 -1
- package/dist/lottery-game-page/{p-a26ebf45.entry.js → p-63781a10.entry.js} +1 -1
- package/dist/lottery-game-page/p-800590f3.entry.js +1 -0
- package/dist/lottery-game-page/p-87298564.entry.js +1 -0
- package/dist/lottery-game-page/{p-042b777b.entry.js → p-90003eb8.entry.js} +34 -34
- package/dist/lottery-game-page/p-b49e741d.entry.js +1 -0
- package/dist/lottery-game-page/p-b4e2988a.js +1 -0
- package/dist/lottery-game-page/p-bb028d40.entry.js +1 -0
- package/dist/lottery-game-page/{p-2197c8ae.entry.js → p-c0e7c864.entry.js} +1 -1
- package/dist/lottery-game-page/p-d241f927.entry.js +1 -0
- package/dist/lottery-game-page/p-e816baee.entry.js +1 -0
- package/dist/lottery-game-page/{p-a10368b2.entry.js → p-f9740035.entry.js} +1 -1
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +14 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -2
- package/dist/lottery-game-page/p-07cca45e.entry.js +0 -1
- package/dist/lottery-game-page/p-1196396b.entry.js +0 -1
- package/dist/lottery-game-page/p-2a4e9984.entry.js +0 -1
- package/dist/lottery-game-page/p-4bfd0112.entry.js +0 -1
- package/dist/lottery-game-page/p-b301a9d4.js +0 -1
- package/dist/lottery-game-page/p-d4b6a11a.entry.js +0 -1
- package/dist/lottery-game-page/p-dd63fcc6.entry.js +0 -1
- package/dist/lottery-game-page/p-f59dc9e1.entry.js +0 -1
|
@@ -270,6 +270,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
270
270
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
271
271
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
272
272
|
}
|
|
273
|
+
else if (memberName === 'ref') {
|
|
274
|
+
// minifier will clean this up
|
|
275
|
+
if (newValue) {
|
|
276
|
+
newValue(elm);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
273
279
|
else if ((!isProp ) &&
|
|
274
280
|
memberName[0] === 'o' &&
|
|
275
281
|
memberName[1] === 'n') {
|
|
@@ -426,6 +432,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
426
432
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
427
433
|
if ((vnode = vnodes[startIdx])) {
|
|
428
434
|
elm = vnode.$elm$;
|
|
435
|
+
callNodeRefs(vnode);
|
|
429
436
|
// remove the vnode's element from the dom
|
|
430
437
|
elm.remove();
|
|
431
438
|
}
|
|
@@ -547,6 +554,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
547
554
|
elm.data = text;
|
|
548
555
|
}
|
|
549
556
|
};
|
|
557
|
+
const callNodeRefs = (vNode) => {
|
|
558
|
+
{
|
|
559
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
560
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
561
|
+
}
|
|
562
|
+
};
|
|
550
563
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
551
564
|
const hostElm = hostRef.$hostElement$;
|
|
552
565
|
const cmpMeta = hostRef.$cmpMeta$;
|
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-7b63209d.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-game-page.cjs",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination.cjs",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]}]]],["lottery-bullet_2.cjs",[[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"]}]]],["helper-filters_2.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-game-page.cjs",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[32],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32],"limitStylingAppends":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination.cjs",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]],["lottery-bullet_2.cjs",[[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"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-filters_2.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,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["lottery-draw-results-history.cjs",[[1,"lottery-draw-results-history",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfResults":[2,"number-of-results"],"language":[1],"drawData":[32],"displayAllDrawsResults":[32],"showQuickFilters":[32],"winningDataSetsData":[32],"dateFiltersFrom":[32],"dateFiltersTo":[32],"isLoading":[32],"noResults":[32]},[[0,"filterDraw","filtersDrawHandler"],[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["lottery-ticket.cjs",[[1,"lottery-ticket",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfGrids":[2,"number-of-grids"],"multipleDraws":[4,"multiple-draws"],"ticketId":[2,"ticket-id"],"resetButton":[4,"reset-button"],"autoPick":[4,"auto-pick"],"language":[1],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["lottery-ticket-controller.cjs",[[1,"lottery-ticket-controller",{"endpoint":[1],"ticketId":[2,"ticket-id"],"ticketDescription":[1,"ticket-description"],"gameId":[1,"game-id"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"numberOfGrids":[2,"number-of-grids"],"last":[4],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["helper-tabs.cjs",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]],["helper-tab.cjs",[[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]],["lottery-game-details.cjs",[[1,"lottery-game-details"]]],["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], 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-7b63209d.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
|
|
|
@@ -22,6 +22,15 @@ const LotteryBullet = class {
|
|
|
22
22
|
* Marks if the bullet should be selected
|
|
23
23
|
*/
|
|
24
24
|
this.isSelected = false;
|
|
25
|
+
/**
|
|
26
|
+
* Client custom styling via string
|
|
27
|
+
*/
|
|
28
|
+
this.clientStyling = '';
|
|
29
|
+
/**
|
|
30
|
+
* Client custom styling via url content
|
|
31
|
+
*/
|
|
32
|
+
this.clientStylingUrlContent = '';
|
|
33
|
+
this.limitStylingAppends = false;
|
|
25
34
|
this.select = () => {
|
|
26
35
|
if (this.selectable) {
|
|
27
36
|
this.isSelected = !this.isSelected;
|
|
@@ -31,14 +40,37 @@ const LotteryBullet = class {
|
|
|
31
40
|
});
|
|
32
41
|
}
|
|
33
42
|
};
|
|
43
|
+
this.setClientStyling = () => {
|
|
44
|
+
let sheet = document.createElement('style');
|
|
45
|
+
sheet.innerHTML = this.clientStyling;
|
|
46
|
+
this.stylingContainer.prepend(sheet);
|
|
47
|
+
};
|
|
48
|
+
this.setClientStylingURL = () => {
|
|
49
|
+
let cssFile = document.createElement('style');
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
52
|
+
this.stylingContainer.prepend(cssFile);
|
|
53
|
+
}, 1);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
componentDidRender() {
|
|
57
|
+
// start custom styling area
|
|
58
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
59
|
+
if (this.clientStyling)
|
|
60
|
+
this.setClientStyling();
|
|
61
|
+
if (this.clientStylingUrlContent)
|
|
62
|
+
this.setClientStylingURL();
|
|
63
|
+
this.limitStylingAppends = true;
|
|
64
|
+
}
|
|
65
|
+
// end custom styling area
|
|
34
66
|
}
|
|
35
67
|
render() {
|
|
36
|
-
return (index.h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select() }, this.value));
|
|
68
|
+
return (index.h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));
|
|
37
69
|
}
|
|
38
70
|
};
|
|
39
71
|
LotteryBullet.style = lotteryBulletCss;
|
|
40
72
|
|
|
41
|
-
const lotteryGridCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:
|
|
73
|
+
const lotteryGridCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}";
|
|
42
74
|
|
|
43
75
|
const LotteryGrid = class {
|
|
44
76
|
constructor(hostRef) {
|
|
@@ -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-7b63209d.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['ro', 'en', 'ar'];
|
|
@@ -82,7 +82,7 @@ const translate = (key, customLang) => {
|
|
|
82
82
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
const lotteryGamePageCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#
|
|
85
|
+
const lotteryGamePageCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;border-bottom:solid 1px #D4D4D4;line-height:50px}.OrderSummary .Ticket span{text-align:right}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}";
|
|
86
86
|
|
|
87
87
|
const LotteryGamePage = class {
|
|
88
88
|
constructor(hostRef) {
|
|
@@ -99,6 +99,15 @@ const LotteryGamePage = class {
|
|
|
99
99
|
* Shows the reset button
|
|
100
100
|
*/
|
|
101
101
|
this.resetButton = false;
|
|
102
|
+
/**
|
|
103
|
+
* Client custom styling via string
|
|
104
|
+
*/
|
|
105
|
+
this.clientStyling = '';
|
|
106
|
+
/**
|
|
107
|
+
* Client custom styling via url
|
|
108
|
+
*/
|
|
109
|
+
this.clientStylingurl = '';
|
|
110
|
+
this.clientStylingUrlContent = '';
|
|
102
111
|
this.tickets = [];
|
|
103
112
|
this.tabIndex = 0;
|
|
104
113
|
this.hasErrors = false;
|
|
@@ -109,8 +118,25 @@ const LotteryGamePage = class {
|
|
|
109
118
|
this.totalWinningsAmount = 0;
|
|
110
119
|
this.isLoggedIn = false;
|
|
111
120
|
this.loginModalVisible = false;
|
|
121
|
+
this.limitStylingAppends = false;
|
|
112
122
|
this.multiplier = false;
|
|
113
123
|
this.quickPick = false;
|
|
124
|
+
this.setClientStyling = () => {
|
|
125
|
+
let sheet = document.createElement('style');
|
|
126
|
+
sheet.innerHTML = this.clientStyling;
|
|
127
|
+
this.stylingContainer.prepend(sheet);
|
|
128
|
+
};
|
|
129
|
+
this.setClientStylingURL = () => {
|
|
130
|
+
let url = new URL(this.clientStylingurl);
|
|
131
|
+
let cssFile = document.createElement('style');
|
|
132
|
+
fetch(url.href)
|
|
133
|
+
.then((res) => res.text())
|
|
134
|
+
.then((data) => {
|
|
135
|
+
this.clientStylingUrlContent = data;
|
|
136
|
+
cssFile.innerHTML = data;
|
|
137
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
138
|
+
});
|
|
139
|
+
};
|
|
114
140
|
}
|
|
115
141
|
// @TODO fix `any` type later, I'm lazy now
|
|
116
142
|
connectedCallback() {
|
|
@@ -121,6 +147,17 @@ const LotteryGamePage = class {
|
|
|
121
147
|
this.isLoggedIn = true;
|
|
122
148
|
}
|
|
123
149
|
}
|
|
150
|
+
componentDidRender() {
|
|
151
|
+
// start custom styling area
|
|
152
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
153
|
+
if (this.clientStyling)
|
|
154
|
+
this.setClientStyling();
|
|
155
|
+
if (this.clientStylingurl)
|
|
156
|
+
this.setClientStylingURL();
|
|
157
|
+
this.limitStylingAppends = true;
|
|
158
|
+
}
|
|
159
|
+
// end custom styling area
|
|
160
|
+
}
|
|
124
161
|
countdownLogic(date) {
|
|
125
162
|
this.interval = setInterval(() => {
|
|
126
163
|
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
@@ -322,11 +359,11 @@ const LotteryGamePage = class {
|
|
|
322
359
|
}
|
|
323
360
|
return (
|
|
324
361
|
/* Game details */
|
|
325
|
-
index.h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr' }, index.h("div", { class: "GridBanner" }, index.h("div", { class: "BannerButtonsWrapper" }, index.h("button", { class: "BannerBackButton" }, index.h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), index.h("button", { class: "BannerLobbyButton" }, translate('lobbyButton', this.language))), index.h("div", { class: "Tabs" }, index.h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), index.h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), index.h("div", { class: "NextDrawWrapper" }, index.h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", index.h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), index.h("div", { class: "NextDraw" }, index.h("p", { class: "BannerText" }, translate('nextDraw', this.language)), index.h("div", { class: "BannerCountdown" }, index.h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), index.h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), index.h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), index.h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
326
|
-
index.h("div", { class: "GamePageContent" }, index.h("div", { class: "GameDetails" }, index.h("lottery-game-details",
|
|
362
|
+
index.h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, index.h("div", { class: "GridBanner" }, index.h("div", { class: "BannerButtonsWrapper" }, index.h("button", { class: "BannerBackButton" }, index.h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), index.h("button", { class: "BannerLobbyButton" }, translate('lobbyButton', this.language))), index.h("div", { class: "Tabs" }, index.h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), index.h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), index.h("div", { class: "NextDrawWrapper" }, index.h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", index.h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), index.h("div", { class: "NextDraw" }, index.h("p", { class: "BannerText" }, translate('nextDraw', this.language)), index.h("div", { class: "BannerCountdown" }, index.h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), index.h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), index.h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), index.h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
363
|
+
index.h("div", { class: "GamePageContent" }, index.h("div", { class: "GameDetails" }, index.h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => index.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, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "CreateNewTicket" }, index.h("button", { onClick: () => this.createNewTicket() }, "+"), index.h("span", null, translate('createTicket', this.language)))), index.h("div", { class: "OrderSummary" }, index.h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), index.h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", index.h("span", null, this.tickets.length)), index.h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", index.h("span", null, this.totalAmount, " ", this.currency)), index.h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
327
364
|
index.h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
328
|
-
index.h("div", null, index.h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)), index.h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible }, index.h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
329
|
-
index.h("div", null, index.h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)), index.h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true }), index.h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language })), index.h("helper-modal", { "title-modal": "Success", visible: this.successVisible }, index.h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))), index.h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible }, index.h("div", { class: "DeleteTicketModalWrapper" }, index.h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)), index.h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)), index.h("div", { class: "DeleteTicketModalButtons" }, index.h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate('deleteTicketModalCancel', this.language)), index.h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate('deleteTicketModalConfirm', this.language)))))));
|
|
365
|
+
index.h("div", null, index.h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)), index.h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
366
|
+
index.h("div", null, index.h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)), index.h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }), index.h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("helper-modal", { "title-modal": "Success", visible: this.successVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))), index.h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "DeleteTicketModalWrapper" }, index.h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)), index.h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)), index.h("div", { class: "DeleteTicketModalButtons" }, index.h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate('deleteTicketModalCancel', this.language)), index.h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate('deleteTicketModalConfirm', this.language)))))));
|
|
330
367
|
}
|
|
331
368
|
static get assetsDirs() { return ["static"]; }
|
|
332
369
|
get element() { return index.getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-7b63209d.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-game-page.cjs",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination.cjs",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]}]]],["lottery-bullet_2.cjs",[[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"]}]]],["helper-filters_2.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-game-page.cjs",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[32],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32],"limitStylingAppends":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination.cjs",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]],["lottery-bullet_2.cjs",[[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"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-filters_2.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,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["lottery-draw-results-history.cjs",[[1,"lottery-draw-results-history",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfResults":[2,"number-of-results"],"language":[1],"drawData":[32],"displayAllDrawsResults":[32],"showQuickFilters":[32],"winningDataSetsData":[32],"dateFiltersFrom":[32],"dateFiltersTo":[32],"isLoading":[32],"noResults":[32]},[[0,"filterDraw","filtersDrawHandler"],[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["lottery-ticket.cjs",[[1,"lottery-ticket",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfGrids":[2,"number-of-grids"],"multipleDraws":[4,"multiple-draws"],"ticketId":[2,"ticket-id"],"resetButton":[4,"reset-button"],"autoPick":[4,"auto-pick"],"language":[1],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["lottery-ticket-controller.cjs",[[1,"lottery-ticket-controller",{"endpoint":[1],"ticketId":[2,"ticket-id"],"ticketDescription":[1,"ticket-description"],"gameId":[1,"game-id"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"numberOfGrids":[2,"number-of-grids"],"last":[4],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["helper-tabs.cjs",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-accordion.cjs",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]],["helper-tab.cjs",[[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]],["lottery-game-details.cjs",[[1,"lottery-game-details"]]],["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
width: 50%;
|
|
87
87
|
max-width: 200px;
|
|
88
88
|
border: 1px solid #00958f;
|
|
89
|
-
background: #
|
|
90
|
-
color: #
|
|
89
|
+
background: #00958f;
|
|
90
|
+
color: #fff;
|
|
91
91
|
font-size: 12px;
|
|
92
92
|
transition: all 0.2s linear;
|
|
93
93
|
text-transform: uppercase;
|
|
@@ -95,8 +95,9 @@
|
|
|
95
95
|
letter-spacing: 0;
|
|
96
96
|
}
|
|
97
97
|
.GamePage .Tabs .TabButton.Active {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
color: #00958f;
|
|
99
|
+
background: #F1F1F1;
|
|
100
|
+
border: 1px solid #F1F1F1;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
.LastDrawResultsTitle {
|
|
@@ -145,6 +146,7 @@
|
|
|
145
146
|
height: 100px;
|
|
146
147
|
width: 100%;
|
|
147
148
|
display: flex;
|
|
149
|
+
margin-top: 10px;
|
|
148
150
|
flex-direction: column;
|
|
149
151
|
justify-content: center;
|
|
150
152
|
align-items: center;
|
|
@@ -20,6 +20,15 @@ export class LotteryGamePage {
|
|
|
20
20
|
* Shows the reset button
|
|
21
21
|
*/
|
|
22
22
|
this.resetButton = false;
|
|
23
|
+
/**
|
|
24
|
+
* Client custom styling via string
|
|
25
|
+
*/
|
|
26
|
+
this.clientStyling = '';
|
|
27
|
+
/**
|
|
28
|
+
* Client custom styling via url
|
|
29
|
+
*/
|
|
30
|
+
this.clientStylingurl = '';
|
|
31
|
+
this.clientStylingUrlContent = '';
|
|
23
32
|
this.tickets = [];
|
|
24
33
|
this.tabIndex = 0;
|
|
25
34
|
this.hasErrors = false;
|
|
@@ -30,8 +39,25 @@ export class LotteryGamePage {
|
|
|
30
39
|
this.totalWinningsAmount = 0;
|
|
31
40
|
this.isLoggedIn = false;
|
|
32
41
|
this.loginModalVisible = false;
|
|
42
|
+
this.limitStylingAppends = false;
|
|
33
43
|
this.multiplier = false;
|
|
34
44
|
this.quickPick = false;
|
|
45
|
+
this.setClientStyling = () => {
|
|
46
|
+
let sheet = document.createElement('style');
|
|
47
|
+
sheet.innerHTML = this.clientStyling;
|
|
48
|
+
this.stylingContainer.prepend(sheet);
|
|
49
|
+
};
|
|
50
|
+
this.setClientStylingURL = () => {
|
|
51
|
+
let url = new URL(this.clientStylingurl);
|
|
52
|
+
let cssFile = document.createElement('style');
|
|
53
|
+
fetch(url.href)
|
|
54
|
+
.then((res) => res.text())
|
|
55
|
+
.then((data) => {
|
|
56
|
+
this.clientStylingUrlContent = data;
|
|
57
|
+
cssFile.innerHTML = data;
|
|
58
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
59
|
+
});
|
|
60
|
+
};
|
|
35
61
|
}
|
|
36
62
|
// @TODO fix `any` type later, I'm lazy now
|
|
37
63
|
connectedCallback() {
|
|
@@ -42,6 +68,17 @@ export class LotteryGamePage {
|
|
|
42
68
|
this.isLoggedIn = true;
|
|
43
69
|
}
|
|
44
70
|
}
|
|
71
|
+
componentDidRender() {
|
|
72
|
+
// start custom styling area
|
|
73
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
74
|
+
if (this.clientStyling)
|
|
75
|
+
this.setClientStyling();
|
|
76
|
+
if (this.clientStylingurl)
|
|
77
|
+
this.setClientStylingURL();
|
|
78
|
+
this.limitStylingAppends = true;
|
|
79
|
+
}
|
|
80
|
+
// end custom styling area
|
|
81
|
+
}
|
|
45
82
|
countdownLogic(date) {
|
|
46
83
|
this.interval = setInterval(() => {
|
|
47
84
|
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
@@ -244,7 +281,7 @@ export class LotteryGamePage {
|
|
|
244
281
|
}
|
|
245
282
|
return (
|
|
246
283
|
/* Game details */
|
|
247
|
-
h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr' },
|
|
284
|
+
h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el },
|
|
248
285
|
h("div", { class: "GridBanner" },
|
|
249
286
|
h("div", { class: "BannerButtonsWrapper" },
|
|
250
287
|
h("button", { class: "BannerBackButton" },
|
|
@@ -279,9 +316,9 @@ export class LotteryGamePage {
|
|
|
279
316
|
this.tabIndex == 0 &&
|
|
280
317
|
h("div", { class: "GamePageContent" },
|
|
281
318
|
h("div", { class: "GameDetails" },
|
|
282
|
-
h("lottery-game-details",
|
|
319
|
+
h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })),
|
|
283
320
|
h("div", { class: "TicketsWrapper" },
|
|
284
|
-
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 })),
|
|
321
|
+
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, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })),
|
|
285
322
|
h("div", { class: "CreateNewTicket" },
|
|
286
323
|
h("button", { onClick: () => this.createNewTicket() }, "+"),
|
|
287
324
|
h("span", null, translate('createTicket', this.language)))),
|
|
@@ -304,16 +341,16 @@ export class LotteryGamePage {
|
|
|
304
341
|
!this.isLoggedIn &&
|
|
305
342
|
h("div", null,
|
|
306
343
|
h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)),
|
|
307
|
-
h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible },
|
|
344
|
+
h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
|
|
308
345
|
h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))),
|
|
309
346
|
this.tabIndex == 1 &&
|
|
310
347
|
h("div", null,
|
|
311
348
|
h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)),
|
|
312
|
-
h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true }),
|
|
313
|
-
h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language })),
|
|
314
|
-
h("helper-modal", { "title-modal": "Success", visible: this.successVisible },
|
|
349
|
+
h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }),
|
|
350
|
+
h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })),
|
|
351
|
+
h("helper-modal", { "title-modal": "Success", visible: this.successVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
|
|
315
352
|
h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))),
|
|
316
|
-
h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible },
|
|
353
|
+
h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
|
|
317
354
|
h("div", { class: "DeleteTicketModalWrapper" },
|
|
318
355
|
h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)),
|
|
319
356
|
h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)),
|
|
@@ -452,9 +489,46 @@ export class LotteryGamePage {
|
|
|
452
489
|
"attribute": "reset-button",
|
|
453
490
|
"reflect": false,
|
|
454
491
|
"defaultValue": "false"
|
|
492
|
+
},
|
|
493
|
+
"clientStyling": {
|
|
494
|
+
"type": "string",
|
|
495
|
+
"mutable": false,
|
|
496
|
+
"complexType": {
|
|
497
|
+
"original": "string",
|
|
498
|
+
"resolved": "string",
|
|
499
|
+
"references": {}
|
|
500
|
+
},
|
|
501
|
+
"required": false,
|
|
502
|
+
"optional": false,
|
|
503
|
+
"docs": {
|
|
504
|
+
"tags": [],
|
|
505
|
+
"text": "Client custom styling via string"
|
|
506
|
+
},
|
|
507
|
+
"attribute": "client-styling",
|
|
508
|
+
"reflect": false,
|
|
509
|
+
"defaultValue": "''"
|
|
510
|
+
},
|
|
511
|
+
"clientStylingurl": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"mutable": false,
|
|
514
|
+
"complexType": {
|
|
515
|
+
"original": "string",
|
|
516
|
+
"resolved": "string",
|
|
517
|
+
"references": {}
|
|
518
|
+
},
|
|
519
|
+
"required": false,
|
|
520
|
+
"optional": false,
|
|
521
|
+
"docs": {
|
|
522
|
+
"tags": [],
|
|
523
|
+
"text": "Client custom styling via url"
|
|
524
|
+
},
|
|
525
|
+
"attribute": "client-stylingurl",
|
|
526
|
+
"reflect": false,
|
|
527
|
+
"defaultValue": "''"
|
|
455
528
|
}
|
|
456
529
|
}; }
|
|
457
530
|
static get states() { return {
|
|
531
|
+
"clientStylingUrlContent": {},
|
|
458
532
|
"tickets": {},
|
|
459
533
|
"tabIndex": {},
|
|
460
534
|
"hasErrors": {},
|
|
@@ -470,7 +544,8 @@ export class LotteryGamePage {
|
|
|
470
544
|
"totalWinningsAmount": {},
|
|
471
545
|
"nextDate": {},
|
|
472
546
|
"isLoggedIn": {},
|
|
473
|
-
"loginModalVisible": {}
|
|
547
|
+
"loginModalVisible": {},
|
|
548
|
+
"limitStylingAppends": {}
|
|
474
549
|
}; }
|
|
475
550
|
static get elementRef() { return "element"; }
|
|
476
551
|
static get listeners() { return [{
|