@everymatrix/lottery-game-page 0.1.19 → 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 -1
- 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
|
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
|
|
|
15
15
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:
|
|
18
|
+
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}";
|
|
19
19
|
|
|
20
20
|
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
21
21
|
constructor() {
|
|
@@ -63,11 +63,43 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
63
63
|
* Language
|
|
64
64
|
*/
|
|
65
65
|
this.language = 'en';
|
|
66
|
+
/**
|
|
67
|
+
* Client custom styling via string
|
|
68
|
+
*/
|
|
69
|
+
this.clientStyling = '';
|
|
70
|
+
/**
|
|
71
|
+
* Client custom styling via url content
|
|
72
|
+
*/
|
|
73
|
+
this.clientStylingUrlContent = '';
|
|
74
|
+
this.limitStylingAppends = false;
|
|
75
|
+
this.setClientStyling = () => {
|
|
76
|
+
let sheet = document.createElement('style');
|
|
77
|
+
sheet.innerHTML = this.clientStyling;
|
|
78
|
+
this.stylingContainer.prepend(sheet);
|
|
79
|
+
};
|
|
80
|
+
this.setClientStylingURL = () => {
|
|
81
|
+
let cssFile = document.createElement('style');
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
84
|
+
this.stylingContainer.prepend(cssFile);
|
|
85
|
+
}, 1);
|
|
86
|
+
};
|
|
66
87
|
}
|
|
67
88
|
// @TODO fix the `any` type :)
|
|
68
89
|
connectedCallback() {
|
|
69
90
|
this.showContent = !this.collapsed;
|
|
70
91
|
}
|
|
92
|
+
componentDidRender() {
|
|
93
|
+
// start custom styling area
|
|
94
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
95
|
+
if (this.clientStyling)
|
|
96
|
+
this.setClientStyling();
|
|
97
|
+
if (this.clientStylingUrlContent)
|
|
98
|
+
this.setClientStylingURL();
|
|
99
|
+
this.limitStylingAppends = true;
|
|
100
|
+
}
|
|
101
|
+
// end custom styling area
|
|
102
|
+
}
|
|
71
103
|
toggleContent() {
|
|
72
104
|
this.showContent = !this.showContent;
|
|
73
105
|
}
|
|
@@ -79,7 +111,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
111
|
this.accordionEvent.emit();
|
|
80
112
|
}
|
|
81
113
|
render() {
|
|
82
|
-
return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
114
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
83
115
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
84
116
|
h("div", null, this.deleteTab &&
|
|
85
117
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -96,7 +128,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
96
128
|
"eventName": [1, "event-name"],
|
|
97
129
|
"collapsed": [4],
|
|
98
130
|
"language": [1],
|
|
99
|
-
"
|
|
131
|
+
"clientStyling": [1, "client-styling"],
|
|
132
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
133
|
+
"showContent": [32],
|
|
134
|
+
"limitStylingAppends": [32]
|
|
100
135
|
}]);
|
|
101
136
|
function defineCustomElement() {
|
|
102
137
|
if (typeof customElements === "undefined") {
|
|
@@ -22264,26 +22264,55 @@ const HelperFilters = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
22264
22264
|
* Language
|
|
22265
22265
|
*/
|
|
22266
22266
|
this.language = 'en';
|
|
22267
|
+
/**
|
|
22268
|
+
* Notifies if the quick filters from tickets are active
|
|
22269
|
+
*/
|
|
22270
|
+
this.quickFiltersActive = false;
|
|
22271
|
+
/**
|
|
22272
|
+
* Client custom styling via string
|
|
22273
|
+
*/
|
|
22274
|
+
this.clientStyling = '';
|
|
22275
|
+
/**
|
|
22276
|
+
* Client custom styling via url content
|
|
22277
|
+
*/
|
|
22278
|
+
this.clientStylingUrlContent = '';
|
|
22267
22279
|
this.showFilterModal = false;
|
|
22268
22280
|
this.showClearButton = false;
|
|
22269
22281
|
this.filterData = {};
|
|
22270
22282
|
this.filterDataReset = { ticketDrawId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
22283
|
+
this.limitStylingAppends = false;
|
|
22284
|
+
this.setClientStyling = () => {
|
|
22285
|
+
let sheet = document.createElement('style');
|
|
22286
|
+
sheet.innerHTML = this.clientStyling;
|
|
22287
|
+
this.stylingContainer.prepend(sheet);
|
|
22288
|
+
};
|
|
22289
|
+
this.setClientStylingURL = () => {
|
|
22290
|
+
let cssFile = document.createElement('style');
|
|
22291
|
+
setTimeout(() => {
|
|
22292
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22293
|
+
this.stylingContainer.prepend(cssFile);
|
|
22294
|
+
}, 1);
|
|
22295
|
+
};
|
|
22271
22296
|
}
|
|
22272
22297
|
// reset field values each time the filter modal opens
|
|
22273
22298
|
componentDidRender() {
|
|
22274
|
-
this.filterData.ticketDrawId = null;
|
|
22275
|
-
this.filterData.filterFromCalendar = null;
|
|
22276
|
-
this.filterData.filterToCalendar = null;
|
|
22277
22299
|
// @TODO: to way binding?
|
|
22278
22300
|
if (document.getElementById('#FilterById'))
|
|
22279
22301
|
document.getElementById('#FilterById').value = '';
|
|
22302
|
+
// start custom styling area
|
|
22303
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22304
|
+
if (this.clientStyling)
|
|
22305
|
+
this.setClientStyling();
|
|
22306
|
+
if (this.clientStylingUrlContent)
|
|
22307
|
+
this.setClientStylingURL();
|
|
22308
|
+
this.limitStylingAppends = true;
|
|
22309
|
+
}
|
|
22310
|
+
// end custom styling area
|
|
22280
22311
|
}
|
|
22281
22312
|
filterSelectionHandler(event) {
|
|
22282
22313
|
if (this.postMessage)
|
|
22283
22314
|
window.postMessage({ type: 'filterSelection', event }, window.location.href);
|
|
22284
|
-
if (this.filterData.ticketDrawId)
|
|
22285
|
-
this.filterDraw.emit(event);
|
|
22286
|
-
if (this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22315
|
+
if (this.filterData.ticketDrawId || this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22287
22316
|
this.filterSelection.emit(event);
|
|
22288
22317
|
}
|
|
22289
22318
|
filterSelectionResetHandler(event) {
|
|
@@ -22319,7 +22348,10 @@ const HelperFilters = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
22319
22348
|
this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
|
|
22320
22349
|
}
|
|
22321
22350
|
render() {
|
|
22322
|
-
return (h$2("div", { class: "HelperFilters"
|
|
22351
|
+
return (h$2("div", { class: "HelperFilters", ref: el => this.stylingContainer = el }, h$2("div", { class: "FilterButtonsWrapper" }, h$2("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$1('filterOpen', this.language)), (this.showClearButton || this.quickFiltersActive) ?
|
|
22352
|
+
h$2("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$1('filterClear', this.language))
|
|
22353
|
+
:
|
|
22354
|
+
null), h$2("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h$2("div", { class: "FilterModalHeader" }, h$2("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate$1('filterModalTicketTitle', this.language) : translate$1('filterModalDrawTitle', this.language))), h$2("div", { class: "FilterModalBody" }, h$2("input", { id: "FilterById", type: "text", value: this.filterData.ticketDrawId, onInput: (event) => this.handleTicketDrawId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate$1('filterTicketPlaceholder', this.language) : translate$1('filterDrawPlaceholder', this.language) }), h$2("p", null, translate$1('filterOrDate', this.language)), h$2("div", { class: "FilterCalendarWrapper" }, h$2("vaadin-date-picker", { value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate$1('filterFromCalendar', this.language), class: "VaadinDatePicker" }), h$2("vaadin-date-picker", { value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate$1('filterToCalendar', this.language), class: "VaadinDatePicker" }))), h$2("div", { class: "FilterModalFooter" }, h$2("button", { class: "FilterModalButton", onClick: () => this.filterSearch() }, translate$1('filterModalButton', this.language))))));
|
|
22323
22355
|
}
|
|
22324
22356
|
static get style() { return helperFiltersCss; }
|
|
22325
22357
|
}, [1, "helper-filters", {
|
|
@@ -22330,10 +22362,14 @@ const HelperFilters = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
22330
22362
|
"session": [1],
|
|
22331
22363
|
"postMessage": [4, "post-message"],
|
|
22332
22364
|
"language": [1],
|
|
22365
|
+
"quickFiltersActive": [4, "quick-filters-active"],
|
|
22366
|
+
"clientStyling": [1, "client-styling"],
|
|
22367
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
22333
22368
|
"showFilterModal": [32],
|
|
22334
22369
|
"showClearButton": [32],
|
|
22335
22370
|
"filterData": [32],
|
|
22336
|
-
"filterDataReset": [32]
|
|
22371
|
+
"filterDataReset": [32],
|
|
22372
|
+
"limitStylingAppends": [32]
|
|
22337
22373
|
}, [[0, "modalCloseEvent", "modalCloseEvent"]]]);
|
|
22338
22374
|
function defineCustomElement() {
|
|
22339
22375
|
if (typeof customElements === "undefined") {
|
|
@@ -25,21 +25,56 @@ const HelperModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
25
25
|
* Toggles if the helper is visible or not
|
|
26
26
|
*/
|
|
27
27
|
this.visible = true;
|
|
28
|
+
/**
|
|
29
|
+
* Client custom styling via string
|
|
30
|
+
*/
|
|
31
|
+
this.clientStyling = '';
|
|
32
|
+
/**
|
|
33
|
+
* Client custom styling via url content
|
|
34
|
+
*/
|
|
35
|
+
this.clientStylingUrlContent = '';
|
|
36
|
+
this.limitStylingAppends = false;
|
|
28
37
|
this.userAgent = window.navigator.userAgent;
|
|
38
|
+
this.setClientStyling = () => {
|
|
39
|
+
let sheet = document.createElement('style');
|
|
40
|
+
sheet.innerHTML = this.clientStyling;
|
|
41
|
+
this.stylingContainer.prepend(sheet);
|
|
42
|
+
};
|
|
43
|
+
this.setClientStylingURL = () => {
|
|
44
|
+
let cssFile = document.createElement('style');
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
47
|
+
this.stylingContainer.prepend(cssFile);
|
|
48
|
+
}, 1);
|
|
49
|
+
};
|
|
29
50
|
}
|
|
30
51
|
handleHelperModalClose() {
|
|
31
52
|
this.visible = false;
|
|
32
53
|
this.cancel.emit();
|
|
33
54
|
}
|
|
34
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
|
|
66
|
+
}
|
|
35
67
|
render() {
|
|
36
68
|
return ((this.visible &&
|
|
37
|
-
h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, h("div", { class: "HelperModalWrapper HelperModalVisible" }, h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h("slot", null))))));
|
|
69
|
+
h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, h("div", { class: "HelperModalWrapper HelperModalVisible" }, h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h("slot", null))))));
|
|
38
70
|
}
|
|
39
71
|
static get style() { return helperModalCss; }
|
|
40
72
|
}, [1, "helper-modal", {
|
|
41
73
|
"titleModal": [1, "title-modal"],
|
|
42
|
-
"visible": [1540]
|
|
74
|
+
"visible": [1540],
|
|
75
|
+
"clientStyling": [1, "client-styling"],
|
|
76
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
77
|
+
"limitStylingAppends": [32]
|
|
43
78
|
}]);
|
|
44
79
|
function defineCustomElement() {
|
|
45
80
|
if (typeof customElements === "undefined") {
|
|
@@ -66,6 +66,14 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
66
66
|
* Language
|
|
67
67
|
*/
|
|
68
68
|
this.language = 'en';
|
|
69
|
+
/**
|
|
70
|
+
* Client custom styling via string
|
|
71
|
+
*/
|
|
72
|
+
this.clientStyling = '';
|
|
73
|
+
/**
|
|
74
|
+
* Client custom styling via url content
|
|
75
|
+
*/
|
|
76
|
+
this.clientStylingUrlContent = '';
|
|
69
77
|
/**
|
|
70
78
|
* In component working variable for the array of pages
|
|
71
79
|
*/
|
|
@@ -76,6 +84,7 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
76
84
|
this.endInt = 0;
|
|
77
85
|
this.userAgent = window.navigator.userAgent;
|
|
78
86
|
this.currentPage = 1;
|
|
87
|
+
this.limitStylingAppends = false;
|
|
79
88
|
/**
|
|
80
89
|
* Navigation logic
|
|
81
90
|
*/
|
|
@@ -130,6 +139,18 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
130
139
|
this.currentPage = this.offsetInt;
|
|
131
140
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
132
141
|
};
|
|
142
|
+
this.setClientStyling = () => {
|
|
143
|
+
let sheet = document.createElement('style');
|
|
144
|
+
sheet.innerHTML = this.clientStyling;
|
|
145
|
+
this.stylingContainer.prepend(sheet);
|
|
146
|
+
};
|
|
147
|
+
this.setClientStylingURL = () => {
|
|
148
|
+
let cssFile = document.createElement('style');
|
|
149
|
+
setTimeout(() => {
|
|
150
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
151
|
+
this.stylingContainer.prepend(cssFile);
|
|
152
|
+
}, 1);
|
|
153
|
+
};
|
|
133
154
|
}
|
|
134
155
|
componentWillRender() {
|
|
135
156
|
this.offsetInt = this.offset;
|
|
@@ -155,6 +176,17 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
155
176
|
this.pagesArray.unshift('...');
|
|
156
177
|
}
|
|
157
178
|
}
|
|
179
|
+
componentDidRender() {
|
|
180
|
+
// start custom styling area
|
|
181
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
182
|
+
if (this.clientStyling)
|
|
183
|
+
this.setClientStyling();
|
|
184
|
+
if (this.clientStylingUrlContent)
|
|
185
|
+
this.setClientStylingURL();
|
|
186
|
+
this.limitStylingAppends = true;
|
|
187
|
+
}
|
|
188
|
+
// end custom styling area
|
|
189
|
+
}
|
|
158
190
|
render() {
|
|
159
191
|
/**
|
|
160
192
|
* Center navigation area
|
|
@@ -188,12 +220,15 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
188
220
|
"limit": [1538],
|
|
189
221
|
"total": [1538],
|
|
190
222
|
"language": [1],
|
|
223
|
+
"clientStyling": [1, "client-styling"],
|
|
224
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
191
225
|
"offsetInt": [32],
|
|
192
226
|
"lastPage": [32],
|
|
193
227
|
"limitInt": [32],
|
|
194
228
|
"totalInt": [32],
|
|
195
229
|
"pagesArray": [32],
|
|
196
|
-
"endInt": [32]
|
|
230
|
+
"endInt": [32],
|
|
231
|
+
"limitStylingAppends": [32]
|
|
197
232
|
}]);
|
|
198
233
|
function defineCustomElement$1() {
|
|
199
234
|
if (typeof customElements === "undefined") {
|
|
@@ -11,20 +11,52 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
11
11
|
* Selected index
|
|
12
12
|
*/
|
|
13
13
|
this.selectedIndex = 0;
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via string
|
|
16
|
+
*/
|
|
17
|
+
this.clientStyling = '';
|
|
18
|
+
/**
|
|
19
|
+
* Client custom styling via url content
|
|
20
|
+
*/
|
|
21
|
+
this.clientStylingUrlContent = '';
|
|
14
22
|
this.tabContent = '';
|
|
23
|
+
this.limitStylingAppends = false;
|
|
24
|
+
this.setClientStyling = () => {
|
|
25
|
+
let sheet = document.createElement('style');
|
|
26
|
+
sheet.innerHTML = this.clientStyling;
|
|
27
|
+
this.stylingContainer.prepend(sheet);
|
|
28
|
+
};
|
|
29
|
+
this.setClientStylingURL = () => {
|
|
30
|
+
let cssFile = document.createElement('style');
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
33
|
+
this.stylingContainer.prepend(cssFile);
|
|
34
|
+
}, 1);
|
|
35
|
+
};
|
|
15
36
|
}
|
|
16
37
|
connectedCallback() {
|
|
17
38
|
/**
|
|
18
39
|
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
19
40
|
*/
|
|
20
41
|
}
|
|
42
|
+
componentDidRender() {
|
|
43
|
+
// start custom styling area
|
|
44
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
45
|
+
if (this.clientStyling)
|
|
46
|
+
this.setClientStyling();
|
|
47
|
+
if (this.clientStylingUrlContent)
|
|
48
|
+
this.setClientStylingURL();
|
|
49
|
+
this.limitStylingAppends = true;
|
|
50
|
+
}
|
|
51
|
+
// end custom styling area
|
|
52
|
+
}
|
|
21
53
|
render() {
|
|
22
|
-
this.tabContent = h("div", { class: "TabContent" }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
|
|
54
|
+
this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");
|
|
23
55
|
if (this.selectedIndex + 1 == 2) {
|
|
24
|
-
this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
|
|
56
|
+
this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")));
|
|
25
57
|
}
|
|
26
58
|
else if (this.selectedIndex + 1 == 3) {
|
|
27
|
-
this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
|
|
59
|
+
this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
|
|
28
60
|
}
|
|
29
61
|
return (this.tabContent);
|
|
30
62
|
}
|
|
@@ -32,7 +64,10 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
32
64
|
}, [1, "helper-tab", {
|
|
33
65
|
"selectedIndex": [2, "selected-index"],
|
|
34
66
|
"cmsEndpoint": [1, "cms-endpoint"],
|
|
35
|
-
"
|
|
67
|
+
"clientStyling": [1, "client-styling"],
|
|
68
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
69
|
+
"tabContent": [32],
|
|
70
|
+
"limitStylingAppends": [32]
|
|
36
71
|
}]);
|
|
37
72
|
function defineCustomElement() {
|
|
38
73
|
if (typeof customElements === "undefined") {
|
|
@@ -24,11 +24,47 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
24
24
|
* Tabs details
|
|
25
25
|
*/
|
|
26
26
|
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
27
|
+
/**
|
|
28
|
+
* Client custom styling via string
|
|
29
|
+
*/
|
|
30
|
+
this.clientStyling = '';
|
|
31
|
+
/**
|
|
32
|
+
* Client custom styling via url
|
|
33
|
+
*/
|
|
34
|
+
this.clientStylingurl = '';
|
|
35
|
+
/**
|
|
36
|
+
* Client custom styling via url content
|
|
37
|
+
*/
|
|
38
|
+
this.clientStylingUrlContent = '';
|
|
39
|
+
this.limitStylingAppends = false;
|
|
40
|
+
this.setClientStyling = () => {
|
|
41
|
+
let sheet = document.createElement('style');
|
|
42
|
+
sheet.innerHTML = this.clientStyling;
|
|
43
|
+
this.stylingContainer.prepend(sheet);
|
|
44
|
+
};
|
|
45
|
+
this.setClientStylingURL = () => {
|
|
46
|
+
let cssFile = document.createElement('style');
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
49
|
+
this.stylingContainer.prepend(cssFile);
|
|
50
|
+
}, 1);
|
|
51
|
+
};
|
|
27
52
|
}
|
|
28
53
|
connectedCallback() {
|
|
29
54
|
}
|
|
55
|
+
componentDidRender() {
|
|
56
|
+
// start custom styling area
|
|
57
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
58
|
+
this.setClientStyling();
|
|
59
|
+
if (this.clientStylingUrlContent) {
|
|
60
|
+
this.setClientStylingURL();
|
|
61
|
+
}
|
|
62
|
+
this.limitStylingAppends = true;
|
|
63
|
+
}
|
|
64
|
+
// end custom styling area
|
|
65
|
+
}
|
|
30
66
|
render() {
|
|
31
|
-
return (h("div",
|
|
67
|
+
return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
|
|
32
68
|
}
|
|
33
69
|
get host() { return this; }
|
|
34
70
|
static get style() { return helperTabsCss; }
|
|
@@ -38,7 +74,11 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
38
74
|
"selected": [4],
|
|
39
75
|
"cmsEndpoint": [1, "cms-endpoint"],
|
|
40
76
|
"selectedIndex": [1538, "selected-index"],
|
|
41
|
-
"tabs": [16]
|
|
77
|
+
"tabs": [16],
|
|
78
|
+
"clientStyling": [1, "client-styling"],
|
|
79
|
+
"clientStylingurl": [1, "client-stylingurl"],
|
|
80
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
81
|
+
"limitStylingAppends": [32]
|
|
42
82
|
}]);
|
|
43
83
|
function defineCustomElement() {
|
|
44
84
|
if (typeof customElements === "undefined") {
|
|
@@ -20,6 +20,15 @@ const LotteryBullet = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
20
20
|
* Marks if the bullet should be selected
|
|
21
21
|
*/
|
|
22
22
|
this.isSelected = false;
|
|
23
|
+
/**
|
|
24
|
+
* Client custom styling via string
|
|
25
|
+
*/
|
|
26
|
+
this.clientStyling = '';
|
|
27
|
+
/**
|
|
28
|
+
* Client custom styling via url content
|
|
29
|
+
*/
|
|
30
|
+
this.clientStylingUrlContent = '';
|
|
31
|
+
this.limitStylingAppends = false;
|
|
23
32
|
this.select = () => {
|
|
24
33
|
if (this.selectable) {
|
|
25
34
|
this.isSelected = !this.isSelected;
|
|
@@ -29,15 +38,41 @@ const LotteryBullet = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
29
38
|
});
|
|
30
39
|
}
|
|
31
40
|
};
|
|
41
|
+
this.setClientStyling = () => {
|
|
42
|
+
let sheet = document.createElement('style');
|
|
43
|
+
sheet.innerHTML = this.clientStyling;
|
|
44
|
+
this.stylingContainer.prepend(sheet);
|
|
45
|
+
};
|
|
46
|
+
this.setClientStylingURL = () => {
|
|
47
|
+
let cssFile = document.createElement('style');
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
50
|
+
this.stylingContainer.prepend(cssFile);
|
|
51
|
+
}, 1);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
componentDidRender() {
|
|
55
|
+
// start custom styling area
|
|
56
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
57
|
+
if (this.clientStyling)
|
|
58
|
+
this.setClientStyling();
|
|
59
|
+
if (this.clientStylingUrlContent)
|
|
60
|
+
this.setClientStylingURL();
|
|
61
|
+
this.limitStylingAppends = true;
|
|
62
|
+
}
|
|
63
|
+
// end custom styling area
|
|
32
64
|
}
|
|
33
65
|
render() {
|
|
34
|
-
return (h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select() }, this.value));
|
|
66
|
+
return (h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));
|
|
35
67
|
}
|
|
36
68
|
static get style() { return lotteryBulletCss; }
|
|
37
69
|
}, [1, "lottery-bullet", {
|
|
38
70
|
"value": [1],
|
|
39
71
|
"selectable": [4],
|
|
40
|
-
"isSelected": [4, "is-selected"]
|
|
72
|
+
"isSelected": [4, "is-selected"],
|
|
73
|
+
"clientStyling": [1, "client-styling"],
|
|
74
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
75
|
+
"limitStylingAppends": [32]
|
|
41
76
|
}]);
|
|
42
77
|
function defineCustomElement() {
|
|
43
78
|
if (typeof customElements === "undefined") {
|