@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
|
@@ -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'];
|
|
@@ -19,7 +19,7 @@ const translate = (key, customLang) => {
|
|
|
19
19
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
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:
|
|
22
|
+
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}";
|
|
23
23
|
|
|
24
24
|
const Accordion = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -65,11 +65,43 @@ const Accordion = class {
|
|
|
65
65
|
* Language
|
|
66
66
|
*/
|
|
67
67
|
this.language = 'en';
|
|
68
|
+
/**
|
|
69
|
+
* Client custom styling via string
|
|
70
|
+
*/
|
|
71
|
+
this.clientStyling = '';
|
|
72
|
+
/**
|
|
73
|
+
* Client custom styling via url content
|
|
74
|
+
*/
|
|
75
|
+
this.clientStylingUrlContent = '';
|
|
76
|
+
this.limitStylingAppends = false;
|
|
77
|
+
this.setClientStyling = () => {
|
|
78
|
+
let sheet = document.createElement('style');
|
|
79
|
+
sheet.innerHTML = this.clientStyling;
|
|
80
|
+
this.stylingContainer.prepend(sheet);
|
|
81
|
+
};
|
|
82
|
+
this.setClientStylingURL = () => {
|
|
83
|
+
let cssFile = document.createElement('style');
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
86
|
+
this.stylingContainer.prepend(cssFile);
|
|
87
|
+
}, 1);
|
|
88
|
+
};
|
|
68
89
|
}
|
|
69
90
|
// @TODO fix the `any` type :)
|
|
70
91
|
connectedCallback() {
|
|
71
92
|
this.showContent = !this.collapsed;
|
|
72
93
|
}
|
|
94
|
+
componentDidRender() {
|
|
95
|
+
// start custom styling area
|
|
96
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
97
|
+
if (this.clientStyling)
|
|
98
|
+
this.setClientStyling();
|
|
99
|
+
if (this.clientStylingUrlContent)
|
|
100
|
+
this.setClientStylingURL();
|
|
101
|
+
this.limitStylingAppends = true;
|
|
102
|
+
}
|
|
103
|
+
// end custom styling area
|
|
104
|
+
}
|
|
73
105
|
toggleContent() {
|
|
74
106
|
this.showContent = !this.showContent;
|
|
75
107
|
}
|
|
@@ -81,7 +113,7 @@ const Accordion = class {
|
|
|
81
113
|
this.accordionEvent.emit();
|
|
82
114
|
}
|
|
83
115
|
render() {
|
|
84
|
-
return (index.h("div", { class: "Wrapper" }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
116
|
+
return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
85
117
|
index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
86
118
|
index.h("div", null, this.deleteTab &&
|
|
87
119
|
index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -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$1 = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES$1 = ['ro', 'en'];
|
|
@@ -22265,26 +22265,55 @@ const HelperFilters = class {
|
|
|
22265
22265
|
* Language
|
|
22266
22266
|
*/
|
|
22267
22267
|
this.language = 'en';
|
|
22268
|
+
/**
|
|
22269
|
+
* Notifies if the quick filters from tickets are active
|
|
22270
|
+
*/
|
|
22271
|
+
this.quickFiltersActive = false;
|
|
22272
|
+
/**
|
|
22273
|
+
* Client custom styling via string
|
|
22274
|
+
*/
|
|
22275
|
+
this.clientStyling = '';
|
|
22276
|
+
/**
|
|
22277
|
+
* Client custom styling via url content
|
|
22278
|
+
*/
|
|
22279
|
+
this.clientStylingUrlContent = '';
|
|
22268
22280
|
this.showFilterModal = false;
|
|
22269
22281
|
this.showClearButton = false;
|
|
22270
22282
|
this.filterData = {};
|
|
22271
22283
|
this.filterDataReset = { ticketDrawId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
22284
|
+
this.limitStylingAppends = false;
|
|
22285
|
+
this.setClientStyling = () => {
|
|
22286
|
+
let sheet = document.createElement('style');
|
|
22287
|
+
sheet.innerHTML = this.clientStyling;
|
|
22288
|
+
this.stylingContainer.prepend(sheet);
|
|
22289
|
+
};
|
|
22290
|
+
this.setClientStylingURL = () => {
|
|
22291
|
+
let cssFile = document.createElement('style');
|
|
22292
|
+
setTimeout(() => {
|
|
22293
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22294
|
+
this.stylingContainer.prepend(cssFile);
|
|
22295
|
+
}, 1);
|
|
22296
|
+
};
|
|
22272
22297
|
}
|
|
22273
22298
|
// reset field values each time the filter modal opens
|
|
22274
22299
|
componentDidRender() {
|
|
22275
|
-
this.filterData.ticketDrawId = null;
|
|
22276
|
-
this.filterData.filterFromCalendar = null;
|
|
22277
|
-
this.filterData.filterToCalendar = null;
|
|
22278
22300
|
// @TODO: to way binding?
|
|
22279
22301
|
if (document.getElementById('#FilterById'))
|
|
22280
22302
|
document.getElementById('#FilterById').value = '';
|
|
22303
|
+
// start custom styling area
|
|
22304
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22305
|
+
if (this.clientStyling)
|
|
22306
|
+
this.setClientStyling();
|
|
22307
|
+
if (this.clientStylingUrlContent)
|
|
22308
|
+
this.setClientStylingURL();
|
|
22309
|
+
this.limitStylingAppends = true;
|
|
22310
|
+
}
|
|
22311
|
+
// end custom styling area
|
|
22281
22312
|
}
|
|
22282
22313
|
filterSelectionHandler(event) {
|
|
22283
22314
|
if (this.postMessage)
|
|
22284
22315
|
window.postMessage({ type: 'filterSelection', event }, window.location.href);
|
|
22285
|
-
if (this.filterData.ticketDrawId)
|
|
22286
|
-
this.filterDraw.emit(event);
|
|
22287
|
-
if (this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22316
|
+
if (this.filterData.ticketDrawId || this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22288
22317
|
this.filterSelection.emit(event);
|
|
22289
22318
|
}
|
|
22290
22319
|
filterSelectionResetHandler(event) {
|
|
@@ -22320,7 +22349,10 @@ const HelperFilters = class {
|
|
|
22320
22349
|
this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
|
|
22321
22350
|
}
|
|
22322
22351
|
render() {
|
|
22323
|
-
return (index.h("div", { class: "HelperFilters"
|
|
22352
|
+
return (index.h("div", { class: "HelperFilters", ref: el => this.stylingContainer = el }, index.h("div", { class: "FilterButtonsWrapper" }, index.h("button", { class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$2('filterOpen', this.language)), (this.showClearButton || this.quickFiltersActive) ?
|
|
22353
|
+
index.h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$2('filterClear', this.language))
|
|
22354
|
+
:
|
|
22355
|
+
null), index.h("helper-modal", { "title-modal": "Filter Modal", visible: this.showFilterModal, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "FilterModalHeader" }, index.h("h3", { class: "FilterModalTitle" }, this.activateTicketSearch ? translate$2('filterModalTicketTitle', this.language) : translate$2('filterModalDrawTitle', this.language))), index.h("div", { class: "FilterModalBody" }, index.h("input", { id: "FilterById", type: "text", value: this.filterData.ticketDrawId, onInput: (event) => this.handleTicketDrawId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate$2('filterTicketPlaceholder', this.language) : translate$2('filterDrawPlaceholder', this.language) }), index.h("p", null, translate$2('filterOrDate', this.language)), index.h("div", { class: "FilterCalendarWrapper" }, index.h("vaadin-date-picker", { value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate$2('filterFromCalendar', this.language), class: "VaadinDatePicker" }), index.h("vaadin-date-picker", { value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate$2('filterToCalendar', this.language), class: "VaadinDatePicker" }))), index.h("div", { class: "FilterModalFooter" }, index.h("button", { class: "FilterModalButton", onClick: () => this.filterSearch() }, translate$2('filterModalButton', this.language))))));
|
|
22324
22356
|
}
|
|
22325
22357
|
};
|
|
22326
22358
|
HelperFilters.style = helperFiltersCss;
|
|
@@ -22333,8 +22365,8 @@ const TRANSLATIONS = {
|
|
|
22333
22365
|
drawId: 'Draw ID',
|
|
22334
22366
|
drawName: 'Game name',
|
|
22335
22367
|
drawDate: 'Draw Date',
|
|
22336
|
-
drawNumbersGridDraw: 'Draw numbers Grid
|
|
22337
|
-
drawNumbersGridTicket: 'Draw numbers Grid
|
|
22368
|
+
drawNumbersGridDraw: 'Draw numbers Grid ',
|
|
22369
|
+
drawNumbersGridTicket: 'Draw numbers Grid ',
|
|
22338
22370
|
ticketResult: 'Ticket result',
|
|
22339
22371
|
amountWon: 'Amount won',
|
|
22340
22372
|
numberOfDraws: 'Number of draws',
|
|
@@ -22350,8 +22382,8 @@ const TRANSLATIONS = {
|
|
|
22350
22382
|
drawId: 'Id extragere',
|
|
22351
22383
|
drawName: 'Numele jocului',
|
|
22352
22384
|
drawDate: 'Data extragerii',
|
|
22353
|
-
drawNumbersGridDraw: 'Numerele extrase Grid
|
|
22354
|
-
drawNumbersGridTicket: 'Numerele extrase Grid
|
|
22385
|
+
drawNumbersGridDraw: 'Numerele extrase Grid',
|
|
22386
|
+
drawNumbersGridTicket: 'Numerele extrase Grid',
|
|
22355
22387
|
ticketResult: 'Rezultatul biletului',
|
|
22356
22388
|
amountWon: 'Suma castigata',
|
|
22357
22389
|
numberOfDraws: 'Numarul de extrageri',
|
|
@@ -22368,7 +22400,7 @@ const translate = (key, customLang) => {
|
|
|
22368
22400
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
22369
22401
|
};
|
|
22370
22402
|
|
|
22371
|
-
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}.
|
|
22403
|
+
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}";
|
|
22372
22404
|
|
|
22373
22405
|
const LotteryDrawResults = class {
|
|
22374
22406
|
constructor(hostRef) {
|
|
@@ -22413,13 +22445,75 @@ const LotteryDrawResults = class {
|
|
|
22413
22445
|
* The ticket draw count
|
|
22414
22446
|
*/
|
|
22415
22447
|
this.ticketDrawCount = 0;
|
|
22448
|
+
/**
|
|
22449
|
+
* The ticket winning numbers
|
|
22450
|
+
*/
|
|
22451
|
+
this.ticketNumbers = '';
|
|
22452
|
+
/**
|
|
22453
|
+
* The session id
|
|
22454
|
+
*/
|
|
22455
|
+
this.sessionId = '';
|
|
22456
|
+
/**
|
|
22457
|
+
* Client custom styling via string
|
|
22458
|
+
*/
|
|
22459
|
+
this.clientStyling = '';
|
|
22460
|
+
/**
|
|
22461
|
+
* Client custom styling via url content
|
|
22462
|
+
*/
|
|
22463
|
+
this.clientStylingUrlContent = '';
|
|
22416
22464
|
this.multiplier = 3;
|
|
22417
22465
|
this.isLoading = true;
|
|
22418
|
-
this.drawResults = [];
|
|
22419
22466
|
this.rules = {};
|
|
22420
22467
|
this.toggleDrawer = [false];
|
|
22421
22468
|
this.hasErrors = false;
|
|
22422
22469
|
this.errorText = '';
|
|
22470
|
+
this.ticketData = [];
|
|
22471
|
+
this.ticketDataLoaded = false;
|
|
22472
|
+
this.ticketDraws = [];
|
|
22473
|
+
this.hasDrawNumbers = false;
|
|
22474
|
+
this.limitStylingAppends = false;
|
|
22475
|
+
this.getTicketsData = () => {
|
|
22476
|
+
let url = new URL(`${this.endpoint}/tickets`);
|
|
22477
|
+
let drawOptions = {
|
|
22478
|
+
method: "GET",
|
|
22479
|
+
headers: {
|
|
22480
|
+
'Content-Type': "application/json",
|
|
22481
|
+
'Accept': 'application/json',
|
|
22482
|
+
'Authorization': `Bearer ${this.sessionId}`
|
|
22483
|
+
},
|
|
22484
|
+
};
|
|
22485
|
+
fetch(url.href, drawOptions)
|
|
22486
|
+
.then((response) => {
|
|
22487
|
+
return response.json();
|
|
22488
|
+
})
|
|
22489
|
+
.then((data) => {
|
|
22490
|
+
if (data) {
|
|
22491
|
+
this.ticketData = data;
|
|
22492
|
+
this.ticketDataLoaded = true;
|
|
22493
|
+
}
|
|
22494
|
+
return this.ticketData;
|
|
22495
|
+
}).then((response) => {
|
|
22496
|
+
response.forEach(ticket => {
|
|
22497
|
+
if (ticket.drawResults.length) {
|
|
22498
|
+
ticket.drawResults.forEach(draw => {
|
|
22499
|
+
fetch(`${this.endpoint}/games/${this.gameId}/draws/${draw.drawId}`)
|
|
22500
|
+
.then((response) => {
|
|
22501
|
+
return response.json();
|
|
22502
|
+
})
|
|
22503
|
+
.then((data) => {
|
|
22504
|
+
// check if draw id is unique
|
|
22505
|
+
if (!this.ticketDraws.some(el => el.drawId === draw.drawId)) {
|
|
22506
|
+
this.ticketDraws.push({ drawId: draw.drawId, drawNumbers: data.winningNumbers });
|
|
22507
|
+
}
|
|
22508
|
+
});
|
|
22509
|
+
});
|
|
22510
|
+
}
|
|
22511
|
+
return this.ticketDraws;
|
|
22512
|
+
});
|
|
22513
|
+
}).then(() => {
|
|
22514
|
+
this.hasDrawNumbers = true;
|
|
22515
|
+
});
|
|
22516
|
+
};
|
|
22423
22517
|
this.changeBox = (index) => {
|
|
22424
22518
|
this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
|
|
22425
22519
|
if (itemIndex == index) {
|
|
@@ -22431,6 +22525,18 @@ const LotteryDrawResults = class {
|
|
|
22431
22525
|
this.toggleDrawer.push(true);
|
|
22432
22526
|
}
|
|
22433
22527
|
};
|
|
22528
|
+
this.setClientStyling = () => {
|
|
22529
|
+
let sheet = document.createElement('style');
|
|
22530
|
+
sheet.innerHTML = this.clientStyling;
|
|
22531
|
+
this.stylingContainer.prepend(sheet);
|
|
22532
|
+
};
|
|
22533
|
+
this.setClientStylingURL = () => {
|
|
22534
|
+
let cssFile = document.createElement('style');
|
|
22535
|
+
setTimeout(() => {
|
|
22536
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22537
|
+
this.stylingContainer.prepend(cssFile);
|
|
22538
|
+
}, 1);
|
|
22539
|
+
};
|
|
22434
22540
|
}
|
|
22435
22541
|
connectedCallback() {
|
|
22436
22542
|
let promises = [];
|
|
@@ -22438,14 +22544,28 @@ const LotteryDrawResults = class {
|
|
|
22438
22544
|
if (this.drawId) {
|
|
22439
22545
|
promises.push(this.getDrawData());
|
|
22440
22546
|
}
|
|
22547
|
+
if (!this.drawMode) {
|
|
22548
|
+
this.getTicketsData();
|
|
22549
|
+
}
|
|
22441
22550
|
Promise.all(promises)
|
|
22442
22551
|
.then(() => {
|
|
22443
22552
|
this.isLoading = false;
|
|
22444
22553
|
});
|
|
22445
22554
|
}
|
|
22446
|
-
|
|
22555
|
+
componentDidRender() {
|
|
22556
|
+
// start custom styling area
|
|
22557
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22558
|
+
if (this.clientStyling)
|
|
22559
|
+
this.setClientStyling();
|
|
22560
|
+
if (this.clientStylingUrlContent)
|
|
22561
|
+
this.setClientStylingURL();
|
|
22562
|
+
this.limitStylingAppends = true;
|
|
22563
|
+
}
|
|
22564
|
+
// end custom styling area
|
|
22565
|
+
}
|
|
22566
|
+
getDrawData(drawID) {
|
|
22447
22567
|
return new Promise((resolve, reject) => {
|
|
22448
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);
|
|
22568
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID ? drawID : this.drawId}`);
|
|
22449
22569
|
fetch(url.href)
|
|
22450
22570
|
.then((response) => {
|
|
22451
22571
|
// @TODO EXCEPTIONS
|
|
@@ -22455,6 +22575,9 @@ const LotteryDrawResults = class {
|
|
|
22455
22575
|
this.drawData = data;
|
|
22456
22576
|
resolve(true);
|
|
22457
22577
|
this.isLoading = false;
|
|
22578
|
+
if (drawID) {
|
|
22579
|
+
return this.drawData.winningNumbers;
|
|
22580
|
+
}
|
|
22458
22581
|
})
|
|
22459
22582
|
.catch((err) => {
|
|
22460
22583
|
reject(err);
|
|
@@ -22494,12 +22617,16 @@ const LotteryDrawResults = class {
|
|
|
22494
22617
|
index.h("p", null, this.errorText);
|
|
22495
22618
|
}
|
|
22496
22619
|
else {
|
|
22497
|
-
return (index.h("section", { class: "DrawResultsSection" },
|
|
22498
|
-
index.h("div", { class: "DrawResultsArea" },
|
|
22499
|
-
index.h("div", { class: "
|
|
22620
|
+
return (index.h("section", { class: "DrawResultsSection", ref: el => this.stylingContainer = el }, this.drawMode ?
|
|
22621
|
+
index.h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
22622
|
+
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))))))
|
|
22500
22623
|
:
|
|
22501
|
-
index.h("div", { class: "DrawResultsArea" }, this.
|
|
22502
|
-
index.h("div", null,
|
|
22624
|
+
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 ?
|
|
22625
|
+
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' &&
|
|
22626
|
+
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 &&
|
|
22627
|
+
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)))))
|
|
22628
|
+
:
|
|
22629
|
+
index.h("span", null)))))))));
|
|
22503
22630
|
}
|
|
22504
22631
|
}
|
|
22505
22632
|
};
|
|
@@ -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
|
* @name isMobile
|
|
@@ -27,16 +27,48 @@ const HelperModal = class {
|
|
|
27
27
|
* Toggles if the helper is visible or not
|
|
28
28
|
*/
|
|
29
29
|
this.visible = true;
|
|
30
|
+
/**
|
|
31
|
+
* Client custom styling via string
|
|
32
|
+
*/
|
|
33
|
+
this.clientStyling = '';
|
|
34
|
+
/**
|
|
35
|
+
* Client custom styling via url content
|
|
36
|
+
*/
|
|
37
|
+
this.clientStylingUrlContent = '';
|
|
38
|
+
this.limitStylingAppends = false;
|
|
30
39
|
this.userAgent = window.navigator.userAgent;
|
|
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
|
+
};
|
|
31
52
|
}
|
|
32
53
|
handleHelperModalClose() {
|
|
33
54
|
this.visible = false;
|
|
34
55
|
this.cancel.emit();
|
|
35
56
|
}
|
|
36
57
|
;
|
|
58
|
+
componentDidRender() {
|
|
59
|
+
// start custom styling area
|
|
60
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
61
|
+
if (this.clientStyling)
|
|
62
|
+
this.setClientStyling();
|
|
63
|
+
if (this.clientStylingUrlContent)
|
|
64
|
+
this.setClientStylingURL();
|
|
65
|
+
this.limitStylingAppends = true;
|
|
66
|
+
}
|
|
67
|
+
// end custom styling area
|
|
68
|
+
}
|
|
37
69
|
render() {
|
|
38
70
|
return ((this.visible &&
|
|
39
|
-
index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, index.h("div", { class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", null))))));
|
|
71
|
+
index.h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", null))))));
|
|
40
72
|
}
|
|
41
73
|
};
|
|
42
74
|
HelperModal.style = helperModalCss;
|
|
@@ -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
|
* @name isMobile
|
|
@@ -68,6 +68,14 @@ const HelperPagination = class {
|
|
|
68
68
|
* Language
|
|
69
69
|
*/
|
|
70
70
|
this.language = 'en';
|
|
71
|
+
/**
|
|
72
|
+
* Client custom styling via string
|
|
73
|
+
*/
|
|
74
|
+
this.clientStyling = '';
|
|
75
|
+
/**
|
|
76
|
+
* Client custom styling via url content
|
|
77
|
+
*/
|
|
78
|
+
this.clientStylingUrlContent = '';
|
|
71
79
|
/**
|
|
72
80
|
* In component working variable for the array of pages
|
|
73
81
|
*/
|
|
@@ -78,6 +86,7 @@ const HelperPagination = class {
|
|
|
78
86
|
this.endInt = 0;
|
|
79
87
|
this.userAgent = window.navigator.userAgent;
|
|
80
88
|
this.currentPage = 1;
|
|
89
|
+
this.limitStylingAppends = false;
|
|
81
90
|
/**
|
|
82
91
|
* Navigation logic
|
|
83
92
|
*/
|
|
@@ -132,6 +141,18 @@ const HelperPagination = class {
|
|
|
132
141
|
this.currentPage = this.offsetInt;
|
|
133
142
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
134
143
|
};
|
|
144
|
+
this.setClientStyling = () => {
|
|
145
|
+
let sheet = document.createElement('style');
|
|
146
|
+
sheet.innerHTML = this.clientStyling;
|
|
147
|
+
this.stylingContainer.prepend(sheet);
|
|
148
|
+
};
|
|
149
|
+
this.setClientStylingURL = () => {
|
|
150
|
+
let cssFile = document.createElement('style');
|
|
151
|
+
setTimeout(() => {
|
|
152
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
153
|
+
this.stylingContainer.prepend(cssFile);
|
|
154
|
+
}, 1);
|
|
155
|
+
};
|
|
135
156
|
}
|
|
136
157
|
componentWillRender() {
|
|
137
158
|
this.offsetInt = this.offset;
|
|
@@ -157,6 +178,17 @@ const HelperPagination = class {
|
|
|
157
178
|
this.pagesArray.unshift('...');
|
|
158
179
|
}
|
|
159
180
|
}
|
|
181
|
+
componentDidRender() {
|
|
182
|
+
// start custom styling area
|
|
183
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
184
|
+
if (this.clientStyling)
|
|
185
|
+
this.setClientStyling();
|
|
186
|
+
if (this.clientStylingUrlContent)
|
|
187
|
+
this.setClientStylingURL();
|
|
188
|
+
this.limitStylingAppends = true;
|
|
189
|
+
}
|
|
190
|
+
// end custom styling area
|
|
191
|
+
}
|
|
160
192
|
render() {
|
|
161
193
|
/**
|
|
162
194
|
* Center navigation area
|
|
@@ -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 helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
|
|
8
8
|
|
|
@@ -13,20 +13,52 @@ const HelperTab = class {
|
|
|
13
13
|
* Selected index
|
|
14
14
|
*/
|
|
15
15
|
this.selectedIndex = 0;
|
|
16
|
+
/**
|
|
17
|
+
* Client custom styling via string
|
|
18
|
+
*/
|
|
19
|
+
this.clientStyling = '';
|
|
20
|
+
/**
|
|
21
|
+
* Client custom styling via url content
|
|
22
|
+
*/
|
|
23
|
+
this.clientStylingUrlContent = '';
|
|
16
24
|
this.tabContent = '';
|
|
25
|
+
this.limitStylingAppends = false;
|
|
26
|
+
this.setClientStyling = () => {
|
|
27
|
+
let sheet = document.createElement('style');
|
|
28
|
+
sheet.innerHTML = this.clientStyling;
|
|
29
|
+
this.stylingContainer.prepend(sheet);
|
|
30
|
+
};
|
|
31
|
+
this.setClientStylingURL = () => {
|
|
32
|
+
let cssFile = document.createElement('style');
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
35
|
+
this.stylingContainer.prepend(cssFile);
|
|
36
|
+
}, 1);
|
|
37
|
+
};
|
|
17
38
|
}
|
|
18
39
|
connectedCallback() {
|
|
19
40
|
/**
|
|
20
41
|
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
21
42
|
*/
|
|
22
43
|
}
|
|
44
|
+
componentDidRender() {
|
|
45
|
+
// start custom styling area
|
|
46
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
47
|
+
if (this.clientStyling)
|
|
48
|
+
this.setClientStyling();
|
|
49
|
+
if (this.clientStylingUrlContent)
|
|
50
|
+
this.setClientStylingURL();
|
|
51
|
+
this.limitStylingAppends = true;
|
|
52
|
+
}
|
|
53
|
+
// end custom styling area
|
|
54
|
+
}
|
|
23
55
|
render() {
|
|
24
|
-
this.tabContent = index.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.");
|
|
56
|
+
this.tabContent = index.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.");
|
|
25
57
|
if (this.selectedIndex + 1 == 2) {
|
|
26
|
-
this.tabContent = index.h("div", { class: "TabContent" }, index.h("ol", null, index.h("li", null, "Register or Login"), index.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."), index.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!")));
|
|
58
|
+
this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", null, index.h("li", null, "Register or Login"), index.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."), index.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!")));
|
|
27
59
|
}
|
|
28
60
|
else if (this.selectedIndex + 1 == 3) {
|
|
29
|
-
this.tabContent = index.h("div", { class: "TabContent" }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
|
|
61
|
+
this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
|
|
30
62
|
}
|
|
31
63
|
return (this.tabContent);
|
|
32
64
|
}
|
|
@@ -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 helperTabsCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}";
|
|
8
8
|
|
|
@@ -25,11 +25,47 @@ const HelperTabs = class {
|
|
|
25
25
|
* Tabs details
|
|
26
26
|
*/
|
|
27
27
|
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
28
|
+
/**
|
|
29
|
+
* Client custom styling via string
|
|
30
|
+
*/
|
|
31
|
+
this.clientStyling = '';
|
|
32
|
+
/**
|
|
33
|
+
* Client custom styling via url
|
|
34
|
+
*/
|
|
35
|
+
this.clientStylingurl = '';
|
|
36
|
+
/**
|
|
37
|
+
* Client custom styling via url content
|
|
38
|
+
*/
|
|
39
|
+
this.clientStylingUrlContent = '';
|
|
40
|
+
this.limitStylingAppends = false;
|
|
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
|
+
};
|
|
28
53
|
}
|
|
29
54
|
connectedCallback() {
|
|
30
55
|
}
|
|
56
|
+
componentDidRender() {
|
|
57
|
+
// start custom styling area
|
|
58
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
59
|
+
this.setClientStyling();
|
|
60
|
+
if (this.clientStylingUrlContent) {
|
|
61
|
+
this.setClientStylingURL();
|
|
62
|
+
}
|
|
63
|
+
this.limitStylingAppends = true;
|
|
64
|
+
}
|
|
65
|
+
// end custom styling area
|
|
66
|
+
}
|
|
31
67
|
render() {
|
|
32
|
-
return (index.h("div",
|
|
68
|
+
return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", null, index.h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
|
|
33
69
|
}
|
|
34
70
|
get host() { return index.getElement(this); }
|
|
35
71
|
};
|