@everymatrix/lottery-game-page 0.1.19 → 0.1.21
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 +41 -3
- package/dist/cjs/helper-filters_2.cjs.entry.js +208 -21
- package/dist/cjs/helper-modal.cjs.entry.js +34 -2
- package/dist/cjs/helper-pagination.cjs.entry.js +45 -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 +72 -4
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +76 -13
- package/dist/cjs/lottery-game-details.cjs.entry.js +34 -2
- package/dist/cjs/lottery-game-page.cjs.entry.js +69 -9
- package/dist/cjs/lottery-game-page.cjs.js +2 -2
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +55 -2
- package/dist/cjs/lottery-ticket.cjs.entry.js +55 -3
- 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/collection/utils/locale.utils.js +26 -3
- package/dist/components/helper-accordion2.js +44 -3
- package/dist/components/helper-filters2.js +70 -8
- package/dist/components/helper-modal2.js +37 -2
- package/dist/components/helper-pagination.js +48 -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-results-history2.js +80 -14
- package/dist/components/lottery-draw-results2.js +152 -15
- package/dist/components/lottery-game-details2.js +38 -2
- package/dist/components/lottery-game-page.js +73 -9
- package/dist/components/lottery-grid2.js +43 -3
- package/dist/components/lottery-ticket-controller2.js +58 -2
- package/dist/components/lottery-ticket2.js +58 -3
- package/dist/esm/helper-accordion.entry.js +41 -3
- package/dist/esm/helper-filters_2.entry.js +208 -21
- package/dist/esm/helper-modal.entry.js +34 -2
- package/dist/esm/helper-pagination.entry.js +45 -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 +72 -4
- package/dist/esm/lottery-draw-results-history.entry.js +76 -13
- package/dist/esm/lottery-game-details.entry.js +34 -2
- package/dist/esm/lottery-game-page.entry.js +69 -9
- package/dist/esm/lottery-game-page.js +2 -2
- package/dist/esm/lottery-ticket-controller.entry.js +55 -2
- package/dist/esm/lottery-ticket.entry.js +55 -3
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-01132729.entry.js +1 -0
- package/dist/lottery-game-page/p-07f98587.entry.js +1 -0
- package/dist/lottery-game-page/p-4098d6d4.entry.js +1 -0
- package/dist/lottery-game-page/p-75703176.entry.js +1 -0
- package/dist/lottery-game-page/p-800590f3.entry.js +1 -0
- package/dist/lottery-game-page/p-807dda48.entry.js +1 -0
- package/dist/lottery-game-page/p-97048566.entry.js +1 -0
- package/dist/lottery-game-page/p-a21ecd5f.entry.js +1 -0
- package/dist/lottery-game-page/p-b44e49d7.entry.js +1 -0
- package/dist/lottery-game-page/p-b4e2988a.js +1 -0
- package/dist/lottery-game-page/{p-042b777b.entry.js → p-d1d09322.entry.js} +39 -39
- package/dist/lottery-game-page/p-d91fc066.entry.js +1 -0
- package/dist/lottery-game-page/p-e816baee.entry.js +1 -0
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- 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-2197c8ae.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-5e12dbf9.entry.js +0 -1
- package/dist/lottery-game-page/p-a10368b2.entry.js +0 -1
- package/dist/lottery-game-page/p-a26ebf45.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
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -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'];
|
|
@@ -13,13 +13,19 @@ const TRANSLATIONS = {
|
|
|
13
13
|
ro: {
|
|
14
14
|
deleteTicket: 'Sterge biletul'
|
|
15
15
|
},
|
|
16
|
+
fr: {
|
|
17
|
+
deleteTicket: 'Supprimer le billet'
|
|
18
|
+
},
|
|
19
|
+
ar: {
|
|
20
|
+
deleteTicket: 'حذف التذكرة'
|
|
21
|
+
}
|
|
16
22
|
};
|
|
17
23
|
const translate = (key, customLang) => {
|
|
18
24
|
const lang = customLang;
|
|
19
25
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
20
26
|
};
|
|
21
27
|
|
|
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:
|
|
28
|
+
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
29
|
|
|
24
30
|
const Accordion = class {
|
|
25
31
|
constructor(hostRef) {
|
|
@@ -65,11 +71,43 @@ const Accordion = class {
|
|
|
65
71
|
* Language
|
|
66
72
|
*/
|
|
67
73
|
this.language = 'en';
|
|
74
|
+
/**
|
|
75
|
+
* Client custom styling via string
|
|
76
|
+
*/
|
|
77
|
+
this.clientStyling = '';
|
|
78
|
+
/**
|
|
79
|
+
* Client custom styling via url content
|
|
80
|
+
*/
|
|
81
|
+
this.clientStylingUrlContent = '';
|
|
82
|
+
this.limitStylingAppends = false;
|
|
83
|
+
this.setClientStyling = () => {
|
|
84
|
+
let sheet = document.createElement('style');
|
|
85
|
+
sheet.innerHTML = this.clientStyling;
|
|
86
|
+
this.stylingContainer.prepend(sheet);
|
|
87
|
+
};
|
|
88
|
+
this.setClientStylingURL = () => {
|
|
89
|
+
let cssFile = document.createElement('style');
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
92
|
+
this.stylingContainer.prepend(cssFile);
|
|
93
|
+
}, 1);
|
|
94
|
+
};
|
|
68
95
|
}
|
|
69
96
|
// @TODO fix the `any` type :)
|
|
70
97
|
connectedCallback() {
|
|
71
98
|
this.showContent = !this.collapsed;
|
|
72
99
|
}
|
|
100
|
+
componentDidRender() {
|
|
101
|
+
// start custom styling area
|
|
102
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
103
|
+
if (this.clientStyling)
|
|
104
|
+
this.setClientStyling();
|
|
105
|
+
if (this.clientStylingUrlContent)
|
|
106
|
+
this.setClientStylingURL();
|
|
107
|
+
this.limitStylingAppends = true;
|
|
108
|
+
}
|
|
109
|
+
// end custom styling area
|
|
110
|
+
}
|
|
73
111
|
toggleContent() {
|
|
74
112
|
this.showContent = !this.showContent;
|
|
75
113
|
}
|
|
@@ -81,7 +119,7 @@ const Accordion = class {
|
|
|
81
119
|
this.accordionEvent.emit();
|
|
82
120
|
}
|
|
83
121
|
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 &&
|
|
122
|
+
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
123
|
index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
86
124
|
index.h("div", null, this.deleteTab &&
|
|
87
125
|
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'];
|
|
@@ -31,6 +31,32 @@ const TRANSLATIONS$1 = {
|
|
|
31
31
|
filterModalButton: 'Cauta',
|
|
32
32
|
filterOrDate: 'sau cauta dupa data'
|
|
33
33
|
},
|
|
34
|
+
fr: {
|
|
35
|
+
filterOpen: 'Filter',
|
|
36
|
+
filterClear: 'Clear',
|
|
37
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
38
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
39
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
40
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
41
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
42
|
+
filterModalButton: 'Search',
|
|
43
|
+
filterFromCalendar: 'From',
|
|
44
|
+
filterToCalendar: 'To',
|
|
45
|
+
filterOrDate: 'or search by date'
|
|
46
|
+
},
|
|
47
|
+
ar: {
|
|
48
|
+
filterOpen: 'Filter',
|
|
49
|
+
filterClear: 'Clear',
|
|
50
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
51
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
52
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
53
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
54
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
55
|
+
filterModalButton: 'Search',
|
|
56
|
+
filterFromCalendar: 'From',
|
|
57
|
+
filterToCalendar: 'To',
|
|
58
|
+
filterOrDate: 'or search by date'
|
|
59
|
+
}
|
|
34
60
|
};
|
|
35
61
|
const translate$2 = (key, customLang) => {
|
|
36
62
|
const lang = customLang;
|
|
@@ -22265,26 +22291,55 @@ const HelperFilters = class {
|
|
|
22265
22291
|
* Language
|
|
22266
22292
|
*/
|
|
22267
22293
|
this.language = 'en';
|
|
22294
|
+
/**
|
|
22295
|
+
* Notifies if the quick filters from tickets are active
|
|
22296
|
+
*/
|
|
22297
|
+
this.quickFiltersActive = false;
|
|
22298
|
+
/**
|
|
22299
|
+
* Client custom styling via string
|
|
22300
|
+
*/
|
|
22301
|
+
this.clientStyling = '';
|
|
22302
|
+
/**
|
|
22303
|
+
* Client custom styling via url content
|
|
22304
|
+
*/
|
|
22305
|
+
this.clientStylingUrlContent = '';
|
|
22268
22306
|
this.showFilterModal = false;
|
|
22269
22307
|
this.showClearButton = false;
|
|
22270
22308
|
this.filterData = {};
|
|
22271
22309
|
this.filterDataReset = { ticketDrawId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
22310
|
+
this.limitStylingAppends = false;
|
|
22311
|
+
this.setClientStyling = () => {
|
|
22312
|
+
let sheet = document.createElement('style');
|
|
22313
|
+
sheet.innerHTML = this.clientStyling;
|
|
22314
|
+
this.stylingContainer.prepend(sheet);
|
|
22315
|
+
};
|
|
22316
|
+
this.setClientStylingURL = () => {
|
|
22317
|
+
let cssFile = document.createElement('style');
|
|
22318
|
+
setTimeout(() => {
|
|
22319
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22320
|
+
this.stylingContainer.prepend(cssFile);
|
|
22321
|
+
}, 1);
|
|
22322
|
+
};
|
|
22272
22323
|
}
|
|
22273
22324
|
// reset field values each time the filter modal opens
|
|
22274
22325
|
componentDidRender() {
|
|
22275
|
-
this.filterData.ticketDrawId = null;
|
|
22276
|
-
this.filterData.filterFromCalendar = null;
|
|
22277
|
-
this.filterData.filterToCalendar = null;
|
|
22278
22326
|
// @TODO: to way binding?
|
|
22279
22327
|
if (document.getElementById('#FilterById'))
|
|
22280
22328
|
document.getElementById('#FilterById').value = '';
|
|
22329
|
+
// start custom styling area
|
|
22330
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22331
|
+
if (this.clientStyling)
|
|
22332
|
+
this.setClientStyling();
|
|
22333
|
+
if (this.clientStylingUrlContent)
|
|
22334
|
+
this.setClientStylingURL();
|
|
22335
|
+
this.limitStylingAppends = true;
|
|
22336
|
+
}
|
|
22337
|
+
// end custom styling area
|
|
22281
22338
|
}
|
|
22282
22339
|
filterSelectionHandler(event) {
|
|
22283
22340
|
if (this.postMessage)
|
|
22284
22341
|
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)
|
|
22342
|
+
if (this.filterData.ticketDrawId || this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
22288
22343
|
this.filterSelection.emit(event);
|
|
22289
22344
|
}
|
|
22290
22345
|
filterSelectionResetHandler(event) {
|
|
@@ -22320,7 +22375,10 @@ const HelperFilters = class {
|
|
|
22320
22375
|
this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
|
|
22321
22376
|
}
|
|
22322
22377
|
render() {
|
|
22323
|
-
return (index.h("div", { class: "HelperFilters"
|
|
22378
|
+
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) ?
|
|
22379
|
+
index.h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$2('filterClear', this.language))
|
|
22380
|
+
:
|
|
22381
|
+
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
22382
|
}
|
|
22325
22383
|
};
|
|
22326
22384
|
HelperFilters.style = helperFiltersCss;
|
|
@@ -22333,8 +22391,8 @@ const TRANSLATIONS = {
|
|
|
22333
22391
|
drawId: 'Draw ID',
|
|
22334
22392
|
drawName: 'Game name',
|
|
22335
22393
|
drawDate: 'Draw Date',
|
|
22336
|
-
drawNumbersGridDraw: 'Draw numbers Grid
|
|
22337
|
-
drawNumbersGridTicket: 'Draw numbers Grid
|
|
22394
|
+
drawNumbersGridDraw: 'Draw numbers Grid ',
|
|
22395
|
+
drawNumbersGridTicket: 'Draw numbers Grid ',
|
|
22338
22396
|
ticketResult: 'Ticket result',
|
|
22339
22397
|
amountWon: 'Amount won',
|
|
22340
22398
|
numberOfDraws: 'Number of draws',
|
|
@@ -22350,8 +22408,8 @@ const TRANSLATIONS = {
|
|
|
22350
22408
|
drawId: 'Id extragere',
|
|
22351
22409
|
drawName: 'Numele jocului',
|
|
22352
22410
|
drawDate: 'Data extragerii',
|
|
22353
|
-
drawNumbersGridDraw: 'Numerele extrase Grid
|
|
22354
|
-
drawNumbersGridTicket: 'Numerele extrase Grid
|
|
22411
|
+
drawNumbersGridDraw: 'Numerele extrase Grid',
|
|
22412
|
+
drawNumbersGridTicket: 'Numerele extrase Grid',
|
|
22355
22413
|
ticketResult: 'Rezultatul biletului',
|
|
22356
22414
|
amountWon: 'Suma castigata',
|
|
22357
22415
|
numberOfDraws: 'Numarul de extrageri',
|
|
@@ -22362,13 +22420,47 @@ const TRANSLATIONS = {
|
|
|
22362
22420
|
ticketAmount: 'Valoarea biletului',
|
|
22363
22421
|
winUpTo: 'Poti castiga'
|
|
22364
22422
|
},
|
|
22423
|
+
fr: {
|
|
22424
|
+
drawResultsHeader: 'Résultats du dernier tirage',
|
|
22425
|
+
drawId: 'ID de tirage',
|
|
22426
|
+
drawName: 'Nom du jeu',
|
|
22427
|
+
drawDate: 'Date du tirage',
|
|
22428
|
+
drawNumbersGridDraw: 'Tirage des numéros Grille',
|
|
22429
|
+
drawNumbersGridTicket: 'Tirage des numéros Grille',
|
|
22430
|
+
ticketResult: 'Résultat du ticket',
|
|
22431
|
+
amountWon: 'Montant gagné',
|
|
22432
|
+
numberOfDraws: 'Nombre de tirages',
|
|
22433
|
+
multiplier: 'Multiplicateur',
|
|
22434
|
+
ticketPurchaseDate: 'Date d\'achat du billet',
|
|
22435
|
+
ticketStatus: 'Statut du ticket',
|
|
22436
|
+
ticketId: 'ID de billets',
|
|
22437
|
+
ticketAmount: 'Montant du billet',
|
|
22438
|
+
winUpTo: 'Gagnez jusqu\'à'
|
|
22439
|
+
},
|
|
22440
|
+
ar: {
|
|
22441
|
+
drawResultsHeader: 'نتائج آخر سحب',
|
|
22442
|
+
drawId: 'معرّف السحب',
|
|
22443
|
+
drawName: 'اسم اللعبة',
|
|
22444
|
+
drawDate: 'تاريخ السحب',
|
|
22445
|
+
drawNumbersGridDraw: 'شبكة أرقام السحب',
|
|
22446
|
+
drawNumbersGridTicket: 'شبكة أرقام السحب',
|
|
22447
|
+
ticketResult: 'نتيجة التذكرة',
|
|
22448
|
+
amountWon: 'المبلغ الذي تم ربحه',
|
|
22449
|
+
numberOfDraws: 'عدد السحوبات',
|
|
22450
|
+
multiplier: 'مضاعف',
|
|
22451
|
+
ticketPurchaseDate: 'تاريخ شراء التذكرة',
|
|
22452
|
+
ticketStatus: 'حالة التذكرة',
|
|
22453
|
+
ticketId: 'معرّف التذكرة',
|
|
22454
|
+
ticketAmount: 'مبلغ التذكرة',
|
|
22455
|
+
winUpTo: 'ربح يصل إلى'
|
|
22456
|
+
}
|
|
22365
22457
|
};
|
|
22366
22458
|
const translate = (key, customLang) => {
|
|
22367
22459
|
const lang = customLang;
|
|
22368
22460
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
22369
22461
|
};
|
|
22370
22462
|
|
|
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}.
|
|
22463
|
+
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
22464
|
|
|
22373
22465
|
const LotteryDrawResults = class {
|
|
22374
22466
|
constructor(hostRef) {
|
|
@@ -22413,13 +22505,75 @@ const LotteryDrawResults = class {
|
|
|
22413
22505
|
* The ticket draw count
|
|
22414
22506
|
*/
|
|
22415
22507
|
this.ticketDrawCount = 0;
|
|
22508
|
+
/**
|
|
22509
|
+
* The ticket winning numbers
|
|
22510
|
+
*/
|
|
22511
|
+
this.ticketNumbers = '';
|
|
22512
|
+
/**
|
|
22513
|
+
* The session id
|
|
22514
|
+
*/
|
|
22515
|
+
this.sessionId = '';
|
|
22516
|
+
/**
|
|
22517
|
+
* Client custom styling via string
|
|
22518
|
+
*/
|
|
22519
|
+
this.clientStyling = '';
|
|
22520
|
+
/**
|
|
22521
|
+
* Client custom styling via url content
|
|
22522
|
+
*/
|
|
22523
|
+
this.clientStylingUrlContent = '';
|
|
22416
22524
|
this.multiplier = 3;
|
|
22417
22525
|
this.isLoading = true;
|
|
22418
|
-
this.drawResults = [];
|
|
22419
22526
|
this.rules = {};
|
|
22420
22527
|
this.toggleDrawer = [false];
|
|
22421
22528
|
this.hasErrors = false;
|
|
22422
22529
|
this.errorText = '';
|
|
22530
|
+
this.ticketData = [];
|
|
22531
|
+
this.ticketDataLoaded = false;
|
|
22532
|
+
this.ticketDraws = [];
|
|
22533
|
+
this.hasDrawNumbers = false;
|
|
22534
|
+
this.limitStylingAppends = false;
|
|
22535
|
+
this.getTicketsData = () => {
|
|
22536
|
+
let url = new URL(`${this.endpoint}/tickets`);
|
|
22537
|
+
let drawOptions = {
|
|
22538
|
+
method: "GET",
|
|
22539
|
+
headers: {
|
|
22540
|
+
'Content-Type': "application/json",
|
|
22541
|
+
'Accept': 'application/json',
|
|
22542
|
+
'Authorization': `Bearer ${this.sessionId}`
|
|
22543
|
+
},
|
|
22544
|
+
};
|
|
22545
|
+
fetch(url.href, drawOptions)
|
|
22546
|
+
.then((response) => {
|
|
22547
|
+
return response.json();
|
|
22548
|
+
})
|
|
22549
|
+
.then((data) => {
|
|
22550
|
+
if (data) {
|
|
22551
|
+
this.ticketData = data;
|
|
22552
|
+
this.ticketDataLoaded = true;
|
|
22553
|
+
}
|
|
22554
|
+
return this.ticketData;
|
|
22555
|
+
}).then((response) => {
|
|
22556
|
+
response.forEach(ticket => {
|
|
22557
|
+
if (ticket.drawResults.length) {
|
|
22558
|
+
ticket.drawResults.forEach(draw => {
|
|
22559
|
+
fetch(`${this.endpoint}/games/${this.gameId}/draws/${draw.drawId}`)
|
|
22560
|
+
.then((response) => {
|
|
22561
|
+
return response.json();
|
|
22562
|
+
})
|
|
22563
|
+
.then((data) => {
|
|
22564
|
+
// check if draw id is unique
|
|
22565
|
+
if (!this.ticketDraws.some(el => el.drawId === draw.drawId)) {
|
|
22566
|
+
this.ticketDraws.push({ drawId: draw.drawId, drawNumbers: data.winningNumbers });
|
|
22567
|
+
}
|
|
22568
|
+
});
|
|
22569
|
+
});
|
|
22570
|
+
}
|
|
22571
|
+
return this.ticketDraws;
|
|
22572
|
+
});
|
|
22573
|
+
}).then(() => {
|
|
22574
|
+
this.hasDrawNumbers = true;
|
|
22575
|
+
});
|
|
22576
|
+
};
|
|
22423
22577
|
this.changeBox = (index) => {
|
|
22424
22578
|
this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
|
|
22425
22579
|
if (itemIndex == index) {
|
|
@@ -22431,6 +22585,18 @@ const LotteryDrawResults = class {
|
|
|
22431
22585
|
this.toggleDrawer.push(true);
|
|
22432
22586
|
}
|
|
22433
22587
|
};
|
|
22588
|
+
this.setClientStyling = () => {
|
|
22589
|
+
let sheet = document.createElement('style');
|
|
22590
|
+
sheet.innerHTML = this.clientStyling;
|
|
22591
|
+
this.stylingContainer.prepend(sheet);
|
|
22592
|
+
};
|
|
22593
|
+
this.setClientStylingURL = () => {
|
|
22594
|
+
let cssFile = document.createElement('style');
|
|
22595
|
+
setTimeout(() => {
|
|
22596
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
22597
|
+
this.stylingContainer.prepend(cssFile);
|
|
22598
|
+
}, 1);
|
|
22599
|
+
};
|
|
22434
22600
|
}
|
|
22435
22601
|
connectedCallback() {
|
|
22436
22602
|
let promises = [];
|
|
@@ -22438,14 +22604,28 @@ const LotteryDrawResults = class {
|
|
|
22438
22604
|
if (this.drawId) {
|
|
22439
22605
|
promises.push(this.getDrawData());
|
|
22440
22606
|
}
|
|
22607
|
+
if (!this.drawMode) {
|
|
22608
|
+
this.getTicketsData();
|
|
22609
|
+
}
|
|
22441
22610
|
Promise.all(promises)
|
|
22442
22611
|
.then(() => {
|
|
22443
22612
|
this.isLoading = false;
|
|
22444
22613
|
});
|
|
22445
22614
|
}
|
|
22446
|
-
|
|
22615
|
+
componentDidRender() {
|
|
22616
|
+
// start custom styling area
|
|
22617
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
22618
|
+
if (this.clientStyling)
|
|
22619
|
+
this.setClientStyling();
|
|
22620
|
+
if (this.clientStylingUrlContent)
|
|
22621
|
+
this.setClientStylingURL();
|
|
22622
|
+
this.limitStylingAppends = true;
|
|
22623
|
+
}
|
|
22624
|
+
// end custom styling area
|
|
22625
|
+
}
|
|
22626
|
+
getDrawData(drawID) {
|
|
22447
22627
|
return new Promise((resolve, reject) => {
|
|
22448
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${this.drawId}`);
|
|
22628
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID ? drawID : this.drawId}`);
|
|
22449
22629
|
fetch(url.href)
|
|
22450
22630
|
.then((response) => {
|
|
22451
22631
|
// @TODO EXCEPTIONS
|
|
@@ -22455,6 +22635,9 @@ const LotteryDrawResults = class {
|
|
|
22455
22635
|
this.drawData = data;
|
|
22456
22636
|
resolve(true);
|
|
22457
22637
|
this.isLoading = false;
|
|
22638
|
+
if (drawID) {
|
|
22639
|
+
return this.drawData.winningNumbers;
|
|
22640
|
+
}
|
|
22458
22641
|
})
|
|
22459
22642
|
.catch((err) => {
|
|
22460
22643
|
reject(err);
|
|
@@ -22494,12 +22677,16 @@ const LotteryDrawResults = class {
|
|
|
22494
22677
|
index.h("p", null, this.errorText);
|
|
22495
22678
|
}
|
|
22496
22679
|
else {
|
|
22497
|
-
return (index.h("section", { class: "DrawResultsSection" },
|
|
22498
|
-
index.h("div", { class: "DrawResultsArea" },
|
|
22499
|
-
index.h("div", { class: "
|
|
22680
|
+
return (index.h("section", { class: "DrawResultsSection", ref: el => this.stylingContainer = el }, this.drawMode ?
|
|
22681
|
+
index.h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
22682
|
+
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
22683
|
:
|
|
22501
|
-
index.h("div", { class: "DrawResultsArea" }, this.
|
|
22502
|
-
index.h("div", null,
|
|
22684
|
+
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 ?
|
|
22685
|
+
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' &&
|
|
22686
|
+
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 &&
|
|
22687
|
+
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)))))
|
|
22688
|
+
:
|
|
22689
|
+
index.h("span", null)))))))));
|
|
22503
22690
|
}
|
|
22504
22691
|
}
|
|
22505
22692
|
};
|
|
@@ -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
|
|
@@ -32,6 +32,18 @@ const TRANSLATIONS = {
|
|
|
32
32
|
nextPage: 'Urmatoarea',
|
|
33
33
|
lastPage: 'Ultima'
|
|
34
34
|
},
|
|
35
|
+
fr: {
|
|
36
|
+
firstPage: 'First',
|
|
37
|
+
previousPage: 'Previous',
|
|
38
|
+
nextPage: 'Next',
|
|
39
|
+
lastPage: 'Last'
|
|
40
|
+
},
|
|
41
|
+
ar: {
|
|
42
|
+
firstPage: 'First',
|
|
43
|
+
previousPage: 'Previous',
|
|
44
|
+
nextPage: 'Next',
|
|
45
|
+
lastPage: 'Last'
|
|
46
|
+
}
|
|
35
47
|
};
|
|
36
48
|
const translate = (key, customLang) => {
|
|
37
49
|
const lang = customLang;
|
|
@@ -68,6 +80,14 @@ const HelperPagination = class {
|
|
|
68
80
|
* Language
|
|
69
81
|
*/
|
|
70
82
|
this.language = 'en';
|
|
83
|
+
/**
|
|
84
|
+
* Client custom styling via string
|
|
85
|
+
*/
|
|
86
|
+
this.clientStyling = '';
|
|
87
|
+
/**
|
|
88
|
+
* Client custom styling via url content
|
|
89
|
+
*/
|
|
90
|
+
this.clientStylingUrlContent = '';
|
|
71
91
|
/**
|
|
72
92
|
* In component working variable for the array of pages
|
|
73
93
|
*/
|
|
@@ -78,6 +98,7 @@ const HelperPagination = class {
|
|
|
78
98
|
this.endInt = 0;
|
|
79
99
|
this.userAgent = window.navigator.userAgent;
|
|
80
100
|
this.currentPage = 1;
|
|
101
|
+
this.limitStylingAppends = false;
|
|
81
102
|
/**
|
|
82
103
|
* Navigation logic
|
|
83
104
|
*/
|
|
@@ -132,6 +153,18 @@ const HelperPagination = class {
|
|
|
132
153
|
this.currentPage = this.offsetInt;
|
|
133
154
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
134
155
|
};
|
|
156
|
+
this.setClientStyling = () => {
|
|
157
|
+
let sheet = document.createElement('style');
|
|
158
|
+
sheet.innerHTML = this.clientStyling;
|
|
159
|
+
this.stylingContainer.prepend(sheet);
|
|
160
|
+
};
|
|
161
|
+
this.setClientStylingURL = () => {
|
|
162
|
+
let cssFile = document.createElement('style');
|
|
163
|
+
setTimeout(() => {
|
|
164
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
165
|
+
this.stylingContainer.prepend(cssFile);
|
|
166
|
+
}, 1);
|
|
167
|
+
};
|
|
135
168
|
}
|
|
136
169
|
componentWillRender() {
|
|
137
170
|
this.offsetInt = this.offset;
|
|
@@ -157,6 +190,17 @@ const HelperPagination = class {
|
|
|
157
190
|
this.pagesArray.unshift('...');
|
|
158
191
|
}
|
|
159
192
|
}
|
|
193
|
+
componentDidRender() {
|
|
194
|
+
// start custom styling area
|
|
195
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
196
|
+
if (this.clientStyling)
|
|
197
|
+
this.setClientStyling();
|
|
198
|
+
if (this.clientStylingUrlContent)
|
|
199
|
+
this.setClientStylingURL();
|
|
200
|
+
this.limitStylingAppends = true;
|
|
201
|
+
}
|
|
202
|
+
// end custom styling area
|
|
203
|
+
}
|
|
160
204
|
render() {
|
|
161
205
|
/**
|
|
162
206
|
* Center navigation area
|