@everymatrix/lottery-game-page 1.44.0 → 1.45.0
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{helper-filters_2.cjs.entry.js → helper-accordion_13.cjs.entry.js} +3329 -1000
- package/dist/cjs/helper-pagination.cjs.entry.js +195 -226
- package/dist/cjs/index-f3851683.js +1345 -0
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +7 -15
- package/dist/cjs/lottery-game-page.cjs.js +16 -12
- package/dist/collection/collection-manifest.json +4 -10
- package/dist/collection/components/lottery-game-page/index.js +1 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +1 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +580 -646
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/locale.utils.js +117 -118
- package/dist/collection/utils/utils.js +4 -5
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/{helper-filters_2.entry.js → helper-accordion_13.entry.js} +3319 -1001
- package/dist/esm/helper-pagination.entry.js +195 -226
- package/dist/esm/index-8248702b.js +1316 -0
- package/dist/esm/index.js +0 -2
- package/dist/esm/loader.js +8 -16
- package/dist/esm/lottery-game-page.js +14 -13
- package/dist/lottery-game-page/index.esm.js +0 -2
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -2
- package/dist/lottery-game-page/p-4254ae78.entry.js +3567 -0
- package/dist/lottery-game-page/p-89956c67.entry.js +1 -0
- package/dist/lottery-game-page/p-8f2c63c7.js +2 -0
- package/dist/lottery-game-page/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -45
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/lottery-game-page/index.d.ts +1 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +98 -98
- package/dist/types/components.d.ts +18 -2
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +13 -7
- package/dist/assets/chrono_desktop.png +0 -0
- package/dist/assets/chrono_lottery_mobile.png +0 -0
- package/dist/cjs/helper-accordion.cjs.entry.js +0 -134
- package/dist/cjs/helper-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-modal.cjs.entry.js +0 -78
- package/dist/cjs/helper-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-pagination.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-tab.cjs.entry.js +0 -70
- package/dist/cjs/helper-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-tabs.cjs.entry.js +0 -76
- package/dist/cjs/helper-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/index-cd44e726.js +0 -1326
- package/dist/cjs/index-cd44e726.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -281
- package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -240
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-details.cjs.entry.js +0 -53
- package/dist/cjs/lottery-game-details.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +0 -456
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-page.cjs.js.map +0 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -132
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -233
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +0 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/locale.utils.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/helper-accordion.js +0 -8
- package/dist/components/helper-accordion.js.map +0 -1
- package/dist/components/helper-accordion2.js +0 -161
- package/dist/components/helper-accordion2.js.map +0 -1
- package/dist/components/helper-filters.js +0 -8
- package/dist/components/helper-filters.js.map +0 -1
- package/dist/components/helper-filters2.js +0 -23566
- package/dist/components/helper-filters2.js.map +0 -1
- package/dist/components/helper-modal.js +0 -8
- package/dist/components/helper-modal.js.map +0 -1
- package/dist/components/helper-modal2.js +0 -96
- package/dist/components/helper-modal2.js.map +0 -1
- package/dist/components/helper-pagination.js +0 -293
- package/dist/components/helper-pagination.js.map +0 -1
- package/dist/components/helper-tab.js +0 -8
- package/dist/components/helper-tab.js.map +0 -1
- package/dist/components/helper-tab2.js +0 -89
- package/dist/components/helper-tab2.js.map +0 -1
- package/dist/components/helper-tabs.js +0 -8
- package/dist/components/helper-tabs.js.map +0 -1
- package/dist/components/helper-tabs2.js +0 -105
- package/dist/components/helper-tabs2.js.map +0 -1
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -3
- package/dist/components/index.js.map +0 -1
- package/dist/components/lottery-bullet.js +0 -8
- package/dist/components/lottery-bullet.js.map +0 -1
- package/dist/components/lottery-bullet2.js +0 -94
- package/dist/components/lottery-bullet2.js.map +0 -1
- package/dist/components/lottery-draw-results-history.js +0 -8
- package/dist/components/lottery-draw-results-history.js.map +0 -1
- package/dist/components/lottery-draw-results-history2.js +0 -298
- package/dist/components/lottery-draw-results-history2.js.map +0 -1
- package/dist/components/lottery-draw-results.js +0 -8
- package/dist/components/lottery-draw-results.js.map +0 -1
- package/dist/components/lottery-draw-results2.js +0 -346
- package/dist/components/lottery-draw-results2.js.map +0 -1
- package/dist/components/lottery-game-details.js +0 -8
- package/dist/components/lottery-game-details.js.map +0 -1
- package/dist/components/lottery-game-details2.js +0 -87
- package/dist/components/lottery-game-details2.js.map +0 -1
- package/dist/components/lottery-game-page.d.ts +0 -11
- package/dist/components/lottery-game-page.js +0 -572
- package/dist/components/lottery-game-page.js.map +0 -1
- package/dist/components/lottery-grid.js +0 -8
- package/dist/components/lottery-grid.js.map +0 -1
- package/dist/components/lottery-grid2.js +0 -248
- package/dist/components/lottery-grid2.js.map +0 -1
- package/dist/components/lottery-ticket-controller.js +0 -8
- package/dist/components/lottery-ticket-controller.js.map +0 -1
- package/dist/components/lottery-ticket-controller2.js +0 -185
- package/dist/components/lottery-ticket-controller2.js.map +0 -1
- package/dist/components/lottery-ticket.js +0 -8
- package/dist/components/lottery-ticket.js.map +0 -1
- package/dist/components/lottery-ticket2.js +0 -276
- package/dist/components/lottery-ticket2.js.map +0 -1
- package/dist/esm/helper-accordion.entry.js +0 -130
- package/dist/esm/helper-accordion.entry.js.map +0 -1
- package/dist/esm/helper-filters_2.entry.js.map +0 -1
- package/dist/esm/helper-modal.entry.js +0 -74
- package/dist/esm/helper-modal.entry.js.map +0 -1
- package/dist/esm/helper-pagination.entry.js.map +0 -1
- package/dist/esm/helper-tab.entry.js +0 -66
- package/dist/esm/helper-tab.entry.js.map +0 -1
- package/dist/esm/helper-tabs.entry.js +0 -72
- package/dist/esm/helper-tabs.entry.js.map +0 -1
- package/dist/esm/index-d1baacd4.js +0 -1298
- package/dist/esm/index-d1baacd4.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/lottery-bullet_2.entry.js +0 -276
- package/dist/esm/lottery-bullet_2.entry.js.map +0 -1
- package/dist/esm/lottery-draw-results-history.entry.js +0 -236
- package/dist/esm/lottery-draw-results-history.entry.js.map +0 -1
- package/dist/esm/lottery-game-details.entry.js +0 -49
- package/dist/esm/lottery-game-details.entry.js.map +0 -1
- package/dist/esm/lottery-game-page.entry.js +0 -452
- package/dist/esm/lottery-game-page.entry.js.map +0 -1
- package/dist/esm/lottery-game-page.js.map +0 -1
- package/dist/esm/lottery-ticket-controller.entry.js +0 -128
- package/dist/esm/lottery-ticket-controller.entry.js.map +0 -1
- package/dist/esm/lottery-ticket.entry.js +0 -229
- package/dist/esm/lottery-ticket.entry.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/lottery-game-page/index.esm.js.map +0 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js.map +0 -1
- package/dist/lottery-game-page/p-12340c50.entry.js +0 -2921
- package/dist/lottery-game-page/p-12340c50.entry.js.map +0 -1
- package/dist/lottery-game-page/p-15309f9a.entry.js +0 -2
- package/dist/lottery-game-page/p-15309f9a.entry.js.map +0 -1
- package/dist/lottery-game-page/p-167c9dbe.entry.js +0 -2
- package/dist/lottery-game-page/p-167c9dbe.entry.js.map +0 -1
- package/dist/lottery-game-page/p-20e0c81c.entry.js +0 -2
- package/dist/lottery-game-page/p-20e0c81c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-59a96854.entry.js +0 -2
- package/dist/lottery-game-page/p-59a96854.entry.js.map +0 -1
- package/dist/lottery-game-page/p-662d9dac.entry.js +0 -2
- package/dist/lottery-game-page/p-662d9dac.entry.js.map +0 -1
- package/dist/lottery-game-page/p-66729e9c.entry.js +0 -2
- package/dist/lottery-game-page/p-66729e9c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-721345a7.entry.js +0 -2
- package/dist/lottery-game-page/p-721345a7.entry.js.map +0 -1
- package/dist/lottery-game-page/p-76c280ec.entry.js +0 -2
- package/dist/lottery-game-page/p-76c280ec.entry.js.map +0 -1
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js +0 -2
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js.map +0 -1
- package/dist/lottery-game-page/p-e765c7d9.js +0 -2
- package/dist/lottery-game-page/p-e765c7d9.js.map +0 -1
- package/dist/lottery-game-page/p-e86e2389.entry.js +0 -2
- package/dist/lottery-game-page/p-e86e2389.entry.js.map +0 -1
- package/dist/lottery-game-page/p-f399eef1.entry.js +0 -2
- package/dist/lottery-game-page/p-f399eef1.entry.js.map +0 -1
- package/dist/stencil.config.js.map +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -2,78 +2,169 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-f3851683.js');
|
|
6
6
|
|
|
7
|
-
const DEFAULT_LANGUAGE$
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
filterOpen: 'Filtrare',
|
|
25
|
-
filterClear: 'Stergere',
|
|
26
|
-
filterModalTicketTitle: 'Rezultatele biletelor',
|
|
27
|
-
filterModalDrawTitle: 'Rezultatele draw-urilor',
|
|
28
|
-
filterTicketPlaceholder: 'Cauta ID bilet',
|
|
29
|
-
filterDrawPlaceholder: 'Cauta ID draw',
|
|
30
|
-
filterDateRangePlaceholder: 'Perioada',
|
|
31
|
-
filterModalButton: 'Cauta',
|
|
32
|
-
filterOrDate: 'sau cauta dupa data'
|
|
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
|
-
},
|
|
60
|
-
hr: {
|
|
61
|
-
filterOpen: 'Filter',
|
|
62
|
-
filterClear: 'Očisti',
|
|
63
|
-
filterModalTicketTitle: 'Rezultati listića',
|
|
64
|
-
filterModalDrawTitle: 'Povijest rezultata Izvlačenja',
|
|
65
|
-
filterTicketPlaceholder: 'Pretraga ID listića',
|
|
66
|
-
filterDrawPlaceholder: 'Pretraga ID izvlačenja',
|
|
67
|
-
filterDateRangePlaceholder: 'Raspon datuma',
|
|
68
|
-
filterModalButton: 'Traži',
|
|
69
|
-
filterFromCalendar: 'Od',
|
|
70
|
-
filterToCalendar: 'Do',
|
|
71
|
-
filterOrDate: 'ili tražite po datumu'
|
|
72
|
-
}
|
|
7
|
+
const DEFAULT_LANGUAGE$6 = 'en';
|
|
8
|
+
const TRANSLATIONS$6 = {
|
|
9
|
+
en: {
|
|
10
|
+
deleteTicket: 'Delete ticket'
|
|
11
|
+
},
|
|
12
|
+
ro: {
|
|
13
|
+
deleteTicket: 'Sterge biletul'
|
|
14
|
+
},
|
|
15
|
+
fr: {
|
|
16
|
+
deleteTicket: 'Supprimer le billet'
|
|
17
|
+
},
|
|
18
|
+
ar: {
|
|
19
|
+
deleteTicket: 'حذف التذكرة'
|
|
20
|
+
},
|
|
21
|
+
hr: {
|
|
22
|
+
deleteTicket: 'Izbriši listić'
|
|
23
|
+
}
|
|
73
24
|
};
|
|
74
|
-
const translate$
|
|
75
|
-
|
|
76
|
-
|
|
25
|
+
const translate$7 = (key, customLang) => {
|
|
26
|
+
const lang = customLang;
|
|
27
|
+
return TRANSLATIONS$6[(lang !== undefined) && (lang in TRANSLATIONS$6) ? lang : DEFAULT_LANGUAGE$6][key];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
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;cursor:pointer}.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;cursor:pointer}.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}";
|
|
31
|
+
const HelperAccordionStyle0 = helperAccordionCss;
|
|
32
|
+
|
|
33
|
+
const HelperAccordion = class {
|
|
34
|
+
constructor(hostRef) {
|
|
35
|
+
index.registerInstance(this, hostRef);
|
|
36
|
+
this.accordionEvent = index.createEvent(this, "helperAccordionAction", 7);
|
|
37
|
+
this.setClientStyling = () => {
|
|
38
|
+
let sheet = document.createElement('style');
|
|
39
|
+
sheet.innerHTML = this.clientStyling;
|
|
40
|
+
this.stylingContainer.prepend(sheet);
|
|
41
|
+
};
|
|
42
|
+
this.setClientStylingURL = () => {
|
|
43
|
+
let cssFile = document.createElement('style');
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
46
|
+
this.stylingContainer.prepend(cssFile);
|
|
47
|
+
}, 1);
|
|
48
|
+
};
|
|
49
|
+
this.ticketHistoryFlag = false;
|
|
50
|
+
this.headerTitle = '';
|
|
51
|
+
this.headerSubtitle = '';
|
|
52
|
+
this.description = '';
|
|
53
|
+
this.footer = false;
|
|
54
|
+
this.deleteTab = false;
|
|
55
|
+
this.postMessage = false;
|
|
56
|
+
this.eventName = 'helperAccordionAction';
|
|
57
|
+
this.collapsed = true;
|
|
58
|
+
this.language = 'en';
|
|
59
|
+
this.clientStyling = '';
|
|
60
|
+
this.clientStylingUrlContent = '';
|
|
61
|
+
this.showContent = undefined;
|
|
62
|
+
this.limitStylingAppends = false;
|
|
63
|
+
}
|
|
64
|
+
// @TODO fix the `any` type :)
|
|
65
|
+
connectedCallback() {
|
|
66
|
+
this.showContent = !this.collapsed;
|
|
67
|
+
}
|
|
68
|
+
componentDidRender() {
|
|
69
|
+
// start custom styling area
|
|
70
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
71
|
+
if (this.clientStyling)
|
|
72
|
+
this.setClientStyling();
|
|
73
|
+
if (this.clientStylingUrlContent)
|
|
74
|
+
this.setClientStylingURL();
|
|
75
|
+
this.limitStylingAppends = true;
|
|
76
|
+
}
|
|
77
|
+
// end custom styling area
|
|
78
|
+
}
|
|
79
|
+
toggleContent() {
|
|
80
|
+
this.showContent = !this.showContent;
|
|
81
|
+
}
|
|
82
|
+
deleteAction() {
|
|
83
|
+
if (this.postMessage) {
|
|
84
|
+
// @TODO maybe change the name type, this one sucks
|
|
85
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
86
|
+
}
|
|
87
|
+
this.accordionEvent.emit();
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return (index.h("div", { key: 'ad26faefd6e3dd089171c7e2bff13faa5a26d972', class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { key: 'bb7045653ec12a2526029589744f7ef014ec6a6a', class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, index.h("p", { key: 'ae30943582063e368e942124d8d5acadc1732629', class: "Title" }, this.headerTitle), index.h("p", { key: '7c35076cb768de784177988900c61fe40a71594c', class: "Subtitle" }, this.headerSubtitle), index.h("p", { key: 'daff2b456a427f45b00efc32ba33a68cdc2228f0', class: "Subtitle Description" }, this.description), index.h("span", { key: '0c4f942642da6e8b1ac3d2aeac46034963965d8f', class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
91
|
+
index.h("div", { key: 'c688ab7cc629a3974b905a2fdc43063e996a3b90' }, index.h("div", { key: 'aaa3ad7d9f1503b8e1baaa2c756376a580ffe261', class: "Content" }, index.h("slot", { key: '8c5c8ff70857da9414c7284b052a3fbc5f503f4a', name: 'accordionContent' }), this.footer && this.showContent &&
|
|
92
|
+
index.h("div", { key: '917191f55a45647d708a5e3ff5e188c7e565a0c0' }, this.deleteTab &&
|
|
93
|
+
index.h("span", { key: 'e7fdd5b4f18cacaceda206b36ce9576cc3fc1472', class: "ActionButton", onClick: () => this.deleteAction() }, translate$7('deleteTicket', this.language)))))));
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
HelperAccordion.style = HelperAccordionStyle0;
|
|
97
|
+
|
|
98
|
+
const DEFAULT_LANGUAGE$5 = 'en';
|
|
99
|
+
const SUPPORTED_LANGUAGES$5 = ['ro', 'en', 'hr'];
|
|
100
|
+
const TRANSLATIONS$5 = {
|
|
101
|
+
en: {
|
|
102
|
+
filterOpen: 'Filter',
|
|
103
|
+
filterClear: 'Clear',
|
|
104
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
105
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
106
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
107
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
108
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
109
|
+
filterModalButton: 'Search',
|
|
110
|
+
filterFromCalendar: 'From',
|
|
111
|
+
filterToCalendar: 'To',
|
|
112
|
+
filterOrDate: 'or search by date'
|
|
113
|
+
},
|
|
114
|
+
ro: {
|
|
115
|
+
filterOpen: 'Filtrare',
|
|
116
|
+
filterClear: 'Stergere',
|
|
117
|
+
filterModalTicketTitle: 'Rezultatele biletelor',
|
|
118
|
+
filterModalDrawTitle: 'Rezultatele draw-urilor',
|
|
119
|
+
filterTicketPlaceholder: 'Cauta ID bilet',
|
|
120
|
+
filterDrawPlaceholder: 'Cauta ID draw',
|
|
121
|
+
filterDateRangePlaceholder: 'Perioada',
|
|
122
|
+
filterModalButton: 'Cauta',
|
|
123
|
+
filterOrDate: 'sau cauta dupa data'
|
|
124
|
+
},
|
|
125
|
+
fr: {
|
|
126
|
+
filterOpen: 'Filter',
|
|
127
|
+
filterClear: 'Clear',
|
|
128
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
129
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
130
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
131
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
132
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
133
|
+
filterModalButton: 'Search',
|
|
134
|
+
filterFromCalendar: 'From',
|
|
135
|
+
filterToCalendar: 'To',
|
|
136
|
+
filterOrDate: 'or search by date'
|
|
137
|
+
},
|
|
138
|
+
ar: {
|
|
139
|
+
filterOpen: 'Filter',
|
|
140
|
+
filterClear: 'Clear',
|
|
141
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
142
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
143
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
144
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
145
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
146
|
+
filterModalButton: 'Search',
|
|
147
|
+
filterFromCalendar: 'From',
|
|
148
|
+
filterToCalendar: 'To',
|
|
149
|
+
filterOrDate: 'or search by date'
|
|
150
|
+
},
|
|
151
|
+
hr: {
|
|
152
|
+
filterOpen: 'Filter',
|
|
153
|
+
filterClear: 'Očisti',
|
|
154
|
+
filterModalTicketTitle: 'Rezultati listića',
|
|
155
|
+
filterModalDrawTitle: 'Povijest rezultata Izvlačenja',
|
|
156
|
+
filterTicketPlaceholder: 'Pretraga ID listića',
|
|
157
|
+
filterDrawPlaceholder: 'Pretraga ID izvlačenja',
|
|
158
|
+
filterDateRangePlaceholder: 'Raspon datuma',
|
|
159
|
+
filterModalButton: 'Traži',
|
|
160
|
+
filterFromCalendar: 'Od',
|
|
161
|
+
filterToCalendar: 'Do',
|
|
162
|
+
filterOrDate: 'ili tražite po datumu'
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const translate$6 = (key, customLang) => {
|
|
166
|
+
const lang = customLang;
|
|
167
|
+
return TRANSLATIONS$5[lang !== undefined && SUPPORTED_LANGUAGES$5.includes(lang) ? lang : DEFAULT_LANGUAGE$5][key];
|
|
77
168
|
};
|
|
78
169
|
|
|
79
170
|
/**
|
|
@@ -110,17 +201,17 @@ function defineCustomElement(CustomElement) {
|
|
|
110
201
|
*
|
|
111
202
|
* @private
|
|
112
203
|
*/
|
|
113
|
-
class Lumo extends HTMLElement {
|
|
204
|
+
class Lumo$2 extends HTMLElement {
|
|
114
205
|
static get is() {
|
|
115
206
|
return 'vaadin-lumo-styles';
|
|
116
207
|
}
|
|
117
208
|
|
|
118
209
|
static get version() {
|
|
119
|
-
return '24.2.
|
|
210
|
+
return '24.2.9';
|
|
120
211
|
}
|
|
121
212
|
}
|
|
122
213
|
|
|
123
|
-
defineCustomElement(Lumo);
|
|
214
|
+
defineCustomElement(Lumo$2);
|
|
124
215
|
|
|
125
216
|
/**
|
|
126
217
|
* @license
|
|
@@ -464,7 +555,7 @@ const addGlobalThemeStyles = (id, ...styles) => {
|
|
|
464
555
|
document.head.insertAdjacentElement('afterbegin', styleTag);
|
|
465
556
|
};
|
|
466
557
|
|
|
467
|
-
const addLumoGlobalStyles = (id, ...styles) => {
|
|
558
|
+
const addLumoGlobalStyles$2 = (id, ...styles) => {
|
|
468
559
|
addGlobalThemeStyles(`lumo-${id}`, styles);
|
|
469
560
|
};
|
|
470
561
|
|
|
@@ -474,7 +565,7 @@ const addLumoGlobalStyles = (id, ...styles) => {
|
|
|
474
565
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
475
566
|
*/
|
|
476
567
|
|
|
477
|
-
const colorBase = i$1`
|
|
568
|
+
const colorBase$2 = i$1`
|
|
478
569
|
:host {
|
|
479
570
|
/* Base (background) */
|
|
480
571
|
--lumo-base-color: #fff;
|
|
@@ -561,9 +652,9 @@ const colorBase = i$1`
|
|
|
561
652
|
}
|
|
562
653
|
`;
|
|
563
654
|
|
|
564
|
-
addLumoGlobalStyles('color-props', colorBase);
|
|
655
|
+
addLumoGlobalStyles$2('color-props', colorBase$2);
|
|
565
656
|
|
|
566
|
-
const color = i$1`
|
|
657
|
+
const color$2 = i$1`
|
|
567
658
|
[theme~='dark'] {
|
|
568
659
|
/* Base (background) */
|
|
569
660
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -680,7 +771,7 @@ const color = i$1`
|
|
|
680
771
|
}
|
|
681
772
|
`;
|
|
682
773
|
|
|
683
|
-
registerStyles('', color, { moduleId: 'lumo-color' });
|
|
774
|
+
registerStyles('', color$2, { moduleId: 'lumo-color' });
|
|
684
775
|
|
|
685
776
|
/**
|
|
686
777
|
* @license
|
|
@@ -688,7 +779,7 @@ registerStyles('', color, { moduleId: 'lumo-color' });
|
|
|
688
779
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
689
780
|
*/
|
|
690
781
|
|
|
691
|
-
const sizing = i$1`
|
|
782
|
+
const sizing$2 = i$1`
|
|
692
783
|
:host {
|
|
693
784
|
--lumo-size-xs: 1.625rem;
|
|
694
785
|
--lumo-size-s: 1.875rem;
|
|
@@ -705,7 +796,7 @@ const sizing = i$1`
|
|
|
705
796
|
}
|
|
706
797
|
`;
|
|
707
798
|
|
|
708
|
-
addLumoGlobalStyles('sizing-props', sizing);
|
|
799
|
+
addLumoGlobalStyles$2('sizing-props', sizing$2);
|
|
709
800
|
|
|
710
801
|
/**
|
|
711
802
|
* @license
|
|
@@ -713,7 +804,7 @@ addLumoGlobalStyles('sizing-props', sizing);
|
|
|
713
804
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
714
805
|
*/
|
|
715
806
|
|
|
716
|
-
const style = i$1`
|
|
807
|
+
const style$2 = i$1`
|
|
717
808
|
:host {
|
|
718
809
|
/* Border radius */
|
|
719
810
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -743,7 +834,7 @@ i$1`
|
|
|
743
834
|
}
|
|
744
835
|
`;
|
|
745
836
|
|
|
746
|
-
addLumoGlobalStyles('style-props', style);
|
|
837
|
+
addLumoGlobalStyles$2('style-props', style$2);
|
|
747
838
|
|
|
748
839
|
/**
|
|
749
840
|
* @license
|
|
@@ -751,7 +842,7 @@ addLumoGlobalStyles('style-props', style);
|
|
|
751
842
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
752
843
|
*/
|
|
753
844
|
|
|
754
|
-
const font = i$1`
|
|
845
|
+
const font$2 = i$1`
|
|
755
846
|
:host {
|
|
756
847
|
/* prettier-ignore */
|
|
757
848
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -773,7 +864,7 @@ const font = i$1`
|
|
|
773
864
|
}
|
|
774
865
|
`;
|
|
775
866
|
|
|
776
|
-
const typography = i$1`
|
|
867
|
+
const typography$2 = i$1`
|
|
777
868
|
body,
|
|
778
869
|
:host {
|
|
779
870
|
font-family: var(--lumo-font-family);
|
|
@@ -867,8 +958,8 @@ const typography = i$1`
|
|
|
867
958
|
}
|
|
868
959
|
`;
|
|
869
960
|
|
|
870
|
-
registerStyles('', typography, { moduleId: 'lumo-typography' });
|
|
871
|
-
addLumoGlobalStyles('typography-props', font);
|
|
961
|
+
registerStyles('', typography$2, { moduleId: 'lumo-typography' });
|
|
962
|
+
addLumoGlobalStyles$2('typography-props', font$2);
|
|
872
963
|
|
|
873
964
|
registerStyles(
|
|
874
965
|
'vaadin-input-container',
|
|
@@ -1818,7 +1909,7 @@ function isDescendant(base, path) {
|
|
|
1818
1909
|
* @param {string} path Path to translate
|
|
1819
1910
|
* @return {string} Translated string
|
|
1820
1911
|
*/
|
|
1821
|
-
function translate$
|
|
1912
|
+
function translate$5(base, newBase, path) {
|
|
1822
1913
|
return newBase + path.slice(base.length);
|
|
1823
1914
|
}
|
|
1824
1915
|
|
|
@@ -4019,7 +4110,7 @@ function handleNotification(event, inst, fromProp, toPath, negate) {
|
|
|
4019
4110
|
let detail = /** @type {Object} */(event.detail);
|
|
4020
4111
|
let fromPath = detail && detail.path;
|
|
4021
4112
|
if (fromPath) {
|
|
4022
|
-
toPath = translate$
|
|
4113
|
+
toPath = translate$5(fromProp, toPath, fromPath);
|
|
4023
4114
|
value = detail && detail.value;
|
|
4024
4115
|
} else {
|
|
4025
4116
|
value = event.currentTarget[fromProp];
|
|
@@ -4305,10 +4396,10 @@ function computeLinkedPaths(inst, path, value) {
|
|
|
4305
4396
|
for (let a in links) {
|
|
4306
4397
|
let b = links[a];
|
|
4307
4398
|
if (isDescendant(a, path)) {
|
|
4308
|
-
link = translate$
|
|
4399
|
+
link = translate$5(a, b, path);
|
|
4309
4400
|
inst._setPendingPropertyOrPath(link, value, true, true);
|
|
4310
4401
|
} else if (isDescendant(b, path)) {
|
|
4311
|
-
link = translate$
|
|
4402
|
+
link = translate$5(b, a, path);
|
|
4312
4403
|
inst._setPendingPropertyOrPath(link, value, true, true);
|
|
4313
4404
|
}
|
|
4314
4405
|
}
|
|
@@ -4420,7 +4511,7 @@ function runBindingEffect(inst, path, props, oldProps, info, hasPaths, nodeList)
|
|
|
4420
4511
|
node.__isPropertyEffectsClient &&
|
|
4421
4512
|
node.__dataHasAccessor && node.__dataHasAccessor[binding.target]) {
|
|
4422
4513
|
let value = props[path];
|
|
4423
|
-
path = translate$
|
|
4514
|
+
path = translate$5(part.source, binding.target, path);
|
|
4424
4515
|
if (node._setPendingPropertyOrPath(path, value, false, true)) {
|
|
4425
4516
|
inst._enqueueClient(node);
|
|
4426
4517
|
}
|
|
@@ -8368,7 +8459,60 @@ defineCustomElement(InputContainer);
|
|
|
8368
8459
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8369
8460
|
*/
|
|
8370
8461
|
|
|
8371
|
-
|
|
8462
|
+
/**
|
|
8463
|
+
* Dummy custom element used for collecting
|
|
8464
|
+
* development time usage statistics.
|
|
8465
|
+
*
|
|
8466
|
+
* @private
|
|
8467
|
+
*/
|
|
8468
|
+
class Lumo$1 extends HTMLElement {
|
|
8469
|
+
static get is() {
|
|
8470
|
+
return 'vaadin-lumo-styles';
|
|
8471
|
+
}
|
|
8472
|
+
|
|
8473
|
+
static get version() {
|
|
8474
|
+
return '24.2.5';
|
|
8475
|
+
}
|
|
8476
|
+
}
|
|
8477
|
+
|
|
8478
|
+
defineCustomElement(Lumo$1);
|
|
8479
|
+
|
|
8480
|
+
const addLumoGlobalStyles$1 = (id, ...styles) => {
|
|
8481
|
+
addGlobalThemeStyles(`lumo-${id}`, styles);
|
|
8482
|
+
};
|
|
8483
|
+
|
|
8484
|
+
/**
|
|
8485
|
+
* @license
|
|
8486
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
8487
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8488
|
+
*/
|
|
8489
|
+
|
|
8490
|
+
const sizing$1 = i$1`
|
|
8491
|
+
:host {
|
|
8492
|
+
--lumo-size-xs: 1.625rem;
|
|
8493
|
+
--lumo-size-s: 1.875rem;
|
|
8494
|
+
--lumo-size-m: 2.25rem;
|
|
8495
|
+
--lumo-size-l: 2.75rem;
|
|
8496
|
+
--lumo-size-xl: 3.5rem;
|
|
8497
|
+
|
|
8498
|
+
/* Icons */
|
|
8499
|
+
--lumo-icon-size-s: 1.25em;
|
|
8500
|
+
--lumo-icon-size-m: 1.5em;
|
|
8501
|
+
--lumo-icon-size-l: 2.25em;
|
|
8502
|
+
/* For backwards compatibility */
|
|
8503
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
8504
|
+
}
|
|
8505
|
+
`;
|
|
8506
|
+
|
|
8507
|
+
addLumoGlobalStyles$1('sizing-props', sizing$1);
|
|
8508
|
+
|
|
8509
|
+
/**
|
|
8510
|
+
* @license
|
|
8511
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
8512
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8513
|
+
*/
|
|
8514
|
+
|
|
8515
|
+
const spacing$1 = i$1`
|
|
8372
8516
|
:host {
|
|
8373
8517
|
/* Square */
|
|
8374
8518
|
--lumo-space-xs: 0.25rem;
|
|
@@ -8393,7 +8537,7 @@ const spacing = i$1`
|
|
|
8393
8537
|
}
|
|
8394
8538
|
`;
|
|
8395
8539
|
|
|
8396
|
-
addLumoGlobalStyles('spacing-props', spacing);
|
|
8540
|
+
addLumoGlobalStyles$1('spacing-props', spacing$1);
|
|
8397
8541
|
|
|
8398
8542
|
/**
|
|
8399
8543
|
* @license
|
|
@@ -8401,72 +8545,37 @@ addLumoGlobalStyles('spacing-props', spacing);
|
|
|
8401
8545
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8402
8546
|
*/
|
|
8403
8547
|
|
|
8404
|
-
const
|
|
8548
|
+
const style$1 = i$1`
|
|
8405
8549
|
:host {
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
8411
|
-
/* stylelint-disable-next-line */
|
|
8412
|
-
outline: 0px solid transparent;
|
|
8413
|
-
}
|
|
8414
|
-
|
|
8415
|
-
[part='overlay'] {
|
|
8416
|
-
background-color: var(--lumo-base-color);
|
|
8417
|
-
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
8418
|
-
border-radius: var(--lumo-border-radius-m);
|
|
8419
|
-
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
|
8420
|
-
color: var(--lumo-body-text-color);
|
|
8421
|
-
font-family: var(--lumo-font-family);
|
|
8422
|
-
font-size: var(--lumo-font-size-m);
|
|
8423
|
-
font-weight: 400;
|
|
8424
|
-
line-height: var(--lumo-line-height-m);
|
|
8425
|
-
letter-spacing: 0;
|
|
8426
|
-
text-transform: none;
|
|
8427
|
-
-webkit-text-size-adjust: 100%;
|
|
8428
|
-
-webkit-font-smoothing: antialiased;
|
|
8429
|
-
-moz-osx-font-smoothing: grayscale;
|
|
8430
|
-
}
|
|
8431
|
-
|
|
8432
|
-
[part='content'] {
|
|
8433
|
-
padding: var(--lumo-space-xs);
|
|
8434
|
-
}
|
|
8435
|
-
|
|
8436
|
-
[part='backdrop'] {
|
|
8437
|
-
background-color: var(--lumo-shade-20pct);
|
|
8438
|
-
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
8439
|
-
will-change: opacity;
|
|
8440
|
-
}
|
|
8441
|
-
|
|
8442
|
-
@keyframes lumo-overlay-backdrop-enter {
|
|
8443
|
-
0% {
|
|
8444
|
-
opacity: 0;
|
|
8445
|
-
}
|
|
8446
|
-
}
|
|
8550
|
+
/* Border radius */
|
|
8551
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
8552
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
8553
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
8447
8554
|
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8555
|
+
/* Shadow */
|
|
8556
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
8557
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
8558
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
8559
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
8560
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
8451
8561
|
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
opacity: 0;
|
|
8455
|
-
}
|
|
8562
|
+
/* Clickable element cursor */
|
|
8563
|
+
--lumo-clickable-cursor: default;
|
|
8456
8564
|
}
|
|
8565
|
+
`;
|
|
8457
8566
|
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8567
|
+
/**
|
|
8568
|
+
* Default values for component-specific custom properties.
|
|
8569
|
+
*/
|
|
8570
|
+
i$1`
|
|
8571
|
+
html {
|
|
8572
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
8573
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
8574
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
8466
8575
|
}
|
|
8467
8576
|
`;
|
|
8468
8577
|
|
|
8469
|
-
|
|
8578
|
+
addLumoGlobalStyles$1('style-props', style$1);
|
|
8470
8579
|
|
|
8471
8580
|
/**
|
|
8472
8581
|
* @license
|
|
@@ -8474,571 +8583,1446 @@ registerStyles('', overlay, { moduleId: 'lumo-overlay' });
|
|
|
8474
8583
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8475
8584
|
*/
|
|
8476
8585
|
|
|
8477
|
-
const
|
|
8478
|
-
:host
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
}
|
|
8482
|
-
|
|
8483
|
-
[part='overlay'] {
|
|
8484
|
-
will-change: opacity, transform;
|
|
8485
|
-
}
|
|
8586
|
+
const colorBase$1 = i$1`
|
|
8587
|
+
:host {
|
|
8588
|
+
/* Base (background) */
|
|
8589
|
+
--lumo-base-color: #fff;
|
|
8486
8590
|
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8591
|
+
/* Tint */
|
|
8592
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
8593
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
8594
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
8595
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
8596
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
8597
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
8598
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
8599
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
8600
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
8601
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
8602
|
+
--lumo-tint: #fff;
|
|
8490
8603
|
|
|
8491
|
-
|
|
8492
|
-
0
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8604
|
+
/* Shade */
|
|
8605
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
8606
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
8607
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
8608
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
8609
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
8610
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
8611
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
8612
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
8613
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
8614
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
8615
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
8497
8616
|
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8617
|
+
/* Contrast */
|
|
8618
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
8619
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
8620
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
8621
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
8622
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
8623
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
8624
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
8625
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
8626
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
8627
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
8628
|
+
--lumo-contrast: var(--lumo-shade);
|
|
8501
8629
|
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8630
|
+
/* Text */
|
|
8631
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
8632
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
8633
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
8634
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
8635
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
8508
8636
|
|
|
8509
|
-
|
|
8637
|
+
/* Primary */
|
|
8638
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
8639
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
8640
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
8641
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
8642
|
+
--lumo-primary-contrast-color: #fff;
|
|
8510
8643
|
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
:
|
|
8516
|
-
|
|
8517
|
-
right: 0 !important;
|
|
8518
|
-
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
8519
|
-
left: 0 !important;
|
|
8520
|
-
align-items: stretch !important;
|
|
8521
|
-
justify-content: flex-end !important;
|
|
8522
|
-
}
|
|
8644
|
+
/* Error */
|
|
8645
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
8646
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
8647
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
8648
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
8649
|
+
--lumo-error-contrast-color: #fff;
|
|
8523
8650
|
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8651
|
+
/* Success */
|
|
8652
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
8653
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
8654
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
8655
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
8656
|
+
--lumo-success-contrast-color: #fff;
|
|
8530
8657
|
|
|
8531
|
-
/*
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
overflow: auto;
|
|
8538
|
-
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
8539
|
-
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
8540
|
-
}
|
|
8658
|
+
/* Warning */
|
|
8659
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
8660
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
8661
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
8662
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
8663
|
+
}
|
|
8541
8664
|
|
|
8542
|
-
|
|
8543
|
-
|
|
8665
|
+
/* forced-colors mode adjustments */
|
|
8666
|
+
@media (forced-colors: active) {
|
|
8667
|
+
html {
|
|
8668
|
+
--lumo-disabled-text-color: GrayText;
|
|
8544
8669
|
}
|
|
8670
|
+
}
|
|
8671
|
+
`;
|
|
8545
8672
|
|
|
8546
|
-
|
|
8673
|
+
addLumoGlobalStyles$1('color-props', colorBase$1);
|
|
8547
8674
|
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8675
|
+
const color$1 = i$1`
|
|
8676
|
+
[theme~='dark'] {
|
|
8677
|
+
/* Base (background) */
|
|
8678
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
8551
8679
|
|
|
8552
|
-
|
|
8553
|
-
:
|
|
8554
|
-
|
|
8555
|
-
|
|
8680
|
+
/* Tint */
|
|
8681
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
8682
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
8683
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
8684
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
8685
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
8686
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
8687
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
8688
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
8689
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
8690
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
8691
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
8556
8692
|
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8693
|
+
/* Shade */
|
|
8694
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
8695
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
8696
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
8697
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
8698
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
8699
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
8700
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
8701
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
8702
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
8703
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
8704
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
8561
8705
|
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8706
|
+
/* Contrast */
|
|
8707
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
8708
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
8709
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
8710
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
8711
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
8712
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
8713
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
8714
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
8715
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
8716
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
8717
|
+
--lumo-contrast: var(--lumo-tint);
|
|
8567
8718
|
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8719
|
+
/* Text */
|
|
8720
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
8721
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
8722
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
8723
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
8724
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
8574
8725
|
|
|
8575
|
-
|
|
8726
|
+
/* Primary */
|
|
8727
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
8728
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
8729
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
8730
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
8731
|
+
--lumo-primary-contrast-color: #fff;
|
|
8576
8732
|
|
|
8577
|
-
|
|
8733
|
+
/* Error */
|
|
8734
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
8735
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
8736
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
8737
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
8578
8738
|
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
+ month calendar side padding
|
|
8585
|
-
+ year scroller width
|
|
8586
|
-
*/
|
|
8587
|
-
/* prettier-ignore */
|
|
8588
|
-
width:
|
|
8589
|
-
calc(
|
|
8590
|
-
var(--lumo-size-m) * 7
|
|
8591
|
-
+ var(--lumo-space-xs) * 2
|
|
8592
|
-
+ 57px
|
|
8593
|
-
);
|
|
8594
|
-
height: 100%;
|
|
8595
|
-
max-height: calc(var(--lumo-size-m) * 14);
|
|
8596
|
-
overflow: hidden;
|
|
8597
|
-
-webkit-tap-highlight-color: transparent;
|
|
8598
|
-
}
|
|
8739
|
+
/* Success */
|
|
8740
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
8741
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
8742
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
8743
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
8599
8744
|
|
|
8600
|
-
|
|
8601
|
-
|
|
8745
|
+
/* Warning */
|
|
8746
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
8747
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
8748
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
8749
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
8602
8750
|
}
|
|
8603
8751
|
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
-webkit-mask-image: none;
|
|
8609
|
-
mask-image: none;
|
|
8752
|
+
html {
|
|
8753
|
+
color: var(--lumo-body-text-color);
|
|
8754
|
+
background-color: var(--lumo-base-color);
|
|
8755
|
+
color-scheme: light;
|
|
8610
8756
|
}
|
|
8611
8757
|
|
|
8612
|
-
|
|
8613
|
-
|
|
8758
|
+
[theme~='dark'] {
|
|
8759
|
+
color: var(--lumo-body-text-color);
|
|
8760
|
+
background-color: var(--lumo-base-color);
|
|
8761
|
+
color-scheme: dark;
|
|
8614
8762
|
}
|
|
8615
8763
|
|
|
8616
|
-
|
|
8617
|
-
|
|
8764
|
+
h1,
|
|
8765
|
+
h2,
|
|
8766
|
+
h3,
|
|
8767
|
+
h4,
|
|
8768
|
+
h5,
|
|
8769
|
+
h6 {
|
|
8770
|
+
color: var(--lumo-header-text-color);
|
|
8618
8771
|
}
|
|
8619
8772
|
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
width: 100vw;
|
|
8623
|
-
height: 70vh;
|
|
8624
|
-
max-height: 70vh;
|
|
8625
|
-
}
|
|
8773
|
+
a:where(:any-link) {
|
|
8774
|
+
color: var(--lumo-primary-text-color);
|
|
8626
8775
|
}
|
|
8627
|
-
`;
|
|
8628
|
-
|
|
8629
|
-
registerStyles('vaadin-date-picker-overlay', [menuOverlay, datePickerOverlay], {
|
|
8630
|
-
moduleId: 'lumo-date-picker-overlay',
|
|
8631
|
-
});
|
|
8632
8776
|
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
/* Sizing */
|
|
8636
|
-
--lumo-button-size: var(--lumo-size-m);
|
|
8637
|
-
min-width: calc(var(--lumo-button-size) * 2);
|
|
8638
|
-
height: var(--lumo-button-size);
|
|
8639
|
-
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
|
|
8640
|
-
margin: var(--lumo-space-xs) 0;
|
|
8641
|
-
box-sizing: border-box;
|
|
8642
|
-
/* Style */
|
|
8643
|
-
font-family: var(--lumo-font-family);
|
|
8644
|
-
font-size: var(--lumo-font-size-m);
|
|
8645
|
-
font-weight: 500;
|
|
8646
|
-
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
8647
|
-
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
8648
|
-
border-radius: var(--lumo-border-radius-m);
|
|
8649
|
-
cursor: var(--lumo-clickable-cursor);
|
|
8650
|
-
-webkit-tap-highlight-color: transparent;
|
|
8651
|
-
-webkit-font-smoothing: antialiased;
|
|
8652
|
-
-moz-osx-font-smoothing: grayscale;
|
|
8653
|
-
flex-shrink: 0;
|
|
8777
|
+
a:not(:any-link) {
|
|
8778
|
+
color: var(--lumo-disabled-text-color);
|
|
8654
8779
|
}
|
|
8655
8780
|
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
[part='prefix'],
|
|
8659
|
-
[part='suffix'] {
|
|
8660
|
-
line-height: var(--lumo-line-height-xs);
|
|
8781
|
+
blockquote {
|
|
8782
|
+
color: var(--lumo-secondary-text-color);
|
|
8661
8783
|
}
|
|
8662
8784
|
|
|
8663
|
-
|
|
8664
|
-
|
|
8785
|
+
code,
|
|
8786
|
+
pre {
|
|
8787
|
+
background-color: var(--lumo-contrast-10pct);
|
|
8788
|
+
border-radius: var(--lumo-border-radius-m);
|
|
8665
8789
|
}
|
|
8790
|
+
`;
|
|
8666
8791
|
|
|
8667
|
-
|
|
8668
|
-
font-size: var(--lumo-font-size-s);
|
|
8669
|
-
--lumo-button-size: var(--lumo-size-s);
|
|
8670
|
-
}
|
|
8792
|
+
registerStyles('', color$1, { moduleId: 'lumo-color' });
|
|
8671
8793
|
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8794
|
+
/**
|
|
8795
|
+
* @license
|
|
8796
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
8797
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8798
|
+
*/
|
|
8676
8799
|
|
|
8677
|
-
|
|
8678
|
-
:host
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
/* We rely on the host always being relative */
|
|
8682
|
-
position: absolute;
|
|
8683
|
-
z-index: 1;
|
|
8684
|
-
inset: 0;
|
|
8685
|
-
background-color: currentColor;
|
|
8686
|
-
border-radius: inherit;
|
|
8687
|
-
opacity: 0;
|
|
8688
|
-
pointer-events: none;
|
|
8689
|
-
}
|
|
8800
|
+
const font$1 = i$1`
|
|
8801
|
+
:host {
|
|
8802
|
+
/* prettier-ignore */
|
|
8803
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
8690
8804
|
|
|
8691
|
-
|
|
8805
|
+
/* Font sizes */
|
|
8806
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
8807
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
8808
|
+
--lumo-font-size-s: 0.875rem;
|
|
8809
|
+
--lumo-font-size-m: 1rem;
|
|
8810
|
+
--lumo-font-size-l: 1.125rem;
|
|
8811
|
+
--lumo-font-size-xl: 1.375rem;
|
|
8812
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
8813
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
8692
8814
|
|
|
8693
|
-
|
|
8694
|
-
:
|
|
8695
|
-
|
|
8696
|
-
|
|
8815
|
+
/* Line heights */
|
|
8816
|
+
--lumo-line-height-xs: 1.25;
|
|
8817
|
+
--lumo-line-height-s: 1.375;
|
|
8818
|
+
--lumo-line-height-m: 1.625;
|
|
8697
8819
|
}
|
|
8820
|
+
`;
|
|
8698
8821
|
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
:host
|
|
8702
|
-
|
|
8703
|
-
|
|
8822
|
+
const typography$1 = i$1`
|
|
8823
|
+
body,
|
|
8824
|
+
:host {
|
|
8825
|
+
font-family: var(--lumo-font-family);
|
|
8826
|
+
font-size: var(--lumo-font-size-m);
|
|
8827
|
+
line-height: var(--lumo-line-height-m);
|
|
8828
|
+
-webkit-text-size-adjust: 100%;
|
|
8829
|
+
-webkit-font-smoothing: antialiased;
|
|
8830
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8704
8831
|
}
|
|
8705
8832
|
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8833
|
+
small,
|
|
8834
|
+
[theme~='font-size-s'] {
|
|
8835
|
+
font-size: var(--lumo-font-size-s);
|
|
8836
|
+
line-height: var(--lumo-line-height-s);
|
|
8709
8837
|
}
|
|
8710
8838
|
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
transform: scale(0);
|
|
8839
|
+
[theme~='font-size-xs'] {
|
|
8840
|
+
font-size: var(--lumo-font-size-xs);
|
|
8841
|
+
line-height: var(--lumo-line-height-xs);
|
|
8715
8842
|
}
|
|
8716
8843
|
|
|
8717
|
-
|
|
8844
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
8845
|
+
font-weight: 600;
|
|
8846
|
+
line-height: var(--lumo-line-height-xs);
|
|
8847
|
+
margin-block: 0;
|
|
8848
|
+
}
|
|
8718
8849
|
|
|
8719
|
-
:
|
|
8720
|
-
|
|
8850
|
+
:where(h1) {
|
|
8851
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
8721
8852
|
}
|
|
8722
8853
|
|
|
8723
|
-
:
|
|
8724
|
-
|
|
8854
|
+
:where(h2) {
|
|
8855
|
+
font-size: var(--lumo-font-size-xxl);
|
|
8725
8856
|
}
|
|
8726
8857
|
|
|
8727
|
-
|
|
8858
|
+
:where(h3) {
|
|
8859
|
+
font-size: var(--lumo-font-size-xl);
|
|
8860
|
+
}
|
|
8728
8861
|
|
|
8729
|
-
:
|
|
8730
|
-
|
|
8731
|
-
background-color: transparent !important;
|
|
8732
|
-
min-width: 0;
|
|
8862
|
+
:where(h4) {
|
|
8863
|
+
font-size: var(--lumo-font-size-l);
|
|
8733
8864
|
}
|
|
8734
8865
|
|
|
8735
|
-
:
|
|
8736
|
-
|
|
8866
|
+
:where(h5) {
|
|
8867
|
+
font-size: var(--lumo-font-size-m);
|
|
8737
8868
|
}
|
|
8738
8869
|
|
|
8739
|
-
:
|
|
8740
|
-
|
|
8870
|
+
:where(h6) {
|
|
8871
|
+
font-size: var(--lumo-font-size-xs);
|
|
8872
|
+
text-transform: uppercase;
|
|
8873
|
+
letter-spacing: 0.03em;
|
|
8741
8874
|
}
|
|
8742
8875
|
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
line-height: inherit;
|
|
8748
|
-
font-size: inherit;
|
|
8876
|
+
p,
|
|
8877
|
+
blockquote {
|
|
8878
|
+
margin-top: 0.5em;
|
|
8879
|
+
margin-bottom: 0.75em;
|
|
8749
8880
|
}
|
|
8750
8881
|
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
overflow: visible;
|
|
8754
|
-
line-height: inherit;
|
|
8882
|
+
a {
|
|
8883
|
+
text-decoration: none;
|
|
8755
8884
|
}
|
|
8756
8885
|
|
|
8757
|
-
:
|
|
8758
|
-
|
|
8759
|
-
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
8760
|
-
font-weight: 600;
|
|
8761
|
-
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
8886
|
+
a:where(:any-link):hover {
|
|
8887
|
+
text-decoration: underline;
|
|
8762
8888
|
}
|
|
8763
8889
|
|
|
8764
|
-
|
|
8765
|
-
|
|
8890
|
+
hr {
|
|
8891
|
+
display: block;
|
|
8892
|
+
align-self: stretch;
|
|
8893
|
+
height: 1px;
|
|
8894
|
+
border: 0;
|
|
8895
|
+
padding: 0;
|
|
8896
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
8897
|
+
background-color: var(--lumo-contrast-10pct);
|
|
8766
8898
|
}
|
|
8767
8899
|
|
|
8768
|
-
|
|
8769
|
-
:
|
|
8770
|
-
opacity: 0.05;
|
|
8771
|
-
}
|
|
8900
|
+
blockquote {
|
|
8901
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
8772
8902
|
}
|
|
8773
8903
|
|
|
8774
|
-
|
|
8775
|
-
|
|
8904
|
+
b,
|
|
8905
|
+
strong {
|
|
8906
|
+
font-weight: 600;
|
|
8776
8907
|
}
|
|
8777
8908
|
|
|
8778
|
-
|
|
8779
|
-
|
|
8909
|
+
/* RTL specific styles */
|
|
8910
|
+
blockquote[dir='rtl'] {
|
|
8911
|
+
border-left: none;
|
|
8912
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
8780
8913
|
}
|
|
8914
|
+
`;
|
|
8781
8915
|
|
|
8782
|
-
|
|
8916
|
+
registerStyles('', typography$1, { moduleId: 'lumo-typography' });
|
|
8917
|
+
addLumoGlobalStyles$1('typography-props', font$1);
|
|
8783
8918
|
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8919
|
+
/**
|
|
8920
|
+
* @license
|
|
8921
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
8922
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8923
|
+
*/
|
|
8787
8924
|
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8925
|
+
const overlay = i$1`
|
|
8926
|
+
:host {
|
|
8927
|
+
top: var(--lumo-space-m);
|
|
8928
|
+
right: var(--lumo-space-m);
|
|
8929
|
+
bottom: var(--lumo-space-m);
|
|
8930
|
+
left: var(--lumo-space-m);
|
|
8931
|
+
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
8932
|
+
/* stylelint-disable-next-line */
|
|
8933
|
+
outline: 0px solid transparent;
|
|
8791
8934
|
}
|
|
8792
8935
|
|
|
8793
|
-
|
|
8794
|
-
color: var(--lumo-
|
|
8936
|
+
[part='overlay'] {
|
|
8937
|
+
background-color: var(--lumo-base-color);
|
|
8938
|
+
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
8939
|
+
border-radius: var(--lumo-border-radius-m);
|
|
8940
|
+
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
|
8941
|
+
color: var(--lumo-body-text-color);
|
|
8942
|
+
font-family: var(--lumo-font-family);
|
|
8943
|
+
font-size: var(--lumo-font-size-m);
|
|
8944
|
+
font-weight: 400;
|
|
8945
|
+
line-height: var(--lumo-line-height-m);
|
|
8946
|
+
letter-spacing: 0;
|
|
8947
|
+
text-transform: none;
|
|
8948
|
+
-webkit-text-size-adjust: 100%;
|
|
8949
|
+
-webkit-font-smoothing: antialiased;
|
|
8950
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8795
8951
|
}
|
|
8796
8952
|
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
color: var(--lumo-error-contrast-color);
|
|
8953
|
+
[part='content'] {
|
|
8954
|
+
padding: var(--lumo-space-xs);
|
|
8800
8955
|
}
|
|
8801
8956
|
|
|
8802
|
-
|
|
8803
|
-
color: var(--lumo-
|
|
8957
|
+
[part='backdrop'] {
|
|
8958
|
+
background-color: var(--lumo-shade-20pct);
|
|
8959
|
+
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
8960
|
+
will-change: opacity;
|
|
8804
8961
|
}
|
|
8805
8962
|
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8963
|
+
@keyframes lumo-overlay-backdrop-enter {
|
|
8964
|
+
0% {
|
|
8965
|
+
opacity: 0;
|
|
8966
|
+
}
|
|
8809
8967
|
}
|
|
8810
8968
|
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
:host([disabled]) {
|
|
8814
|
-
pointer-events: none;
|
|
8815
|
-
color: var(--lumo-disabled-text-color);
|
|
8969
|
+
:host([closing]) [part='backdrop'] {
|
|
8970
|
+
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
8816
8971
|
}
|
|
8817
8972
|
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8973
|
+
@keyframes lumo-overlay-backdrop-exit {
|
|
8974
|
+
100% {
|
|
8975
|
+
opacity: 0;
|
|
8976
|
+
}
|
|
8821
8977
|
}
|
|
8822
8978
|
|
|
8823
|
-
|
|
8824
|
-
|
|
8979
|
+
@keyframes lumo-overlay-dummy-animation {
|
|
8980
|
+
0% {
|
|
8981
|
+
opacity: 1;
|
|
8982
|
+
}
|
|
8983
|
+
|
|
8984
|
+
100% {
|
|
8985
|
+
opacity: 1;
|
|
8986
|
+
}
|
|
8825
8987
|
}
|
|
8988
|
+
`;
|
|
8826
8989
|
|
|
8827
|
-
|
|
8990
|
+
registerStyles('', overlay, { moduleId: 'lumo-overlay' });
|
|
8828
8991
|
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8992
|
+
/**
|
|
8993
|
+
* @license
|
|
8994
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
8995
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8996
|
+
*/
|
|
8997
|
+
|
|
8998
|
+
const menuOverlayCore = i$1`
|
|
8999
|
+
:host([opening]),
|
|
9000
|
+
:host([closing]) {
|
|
9001
|
+
animation: 0.14s lumo-overlay-dummy-animation;
|
|
8833
9002
|
}
|
|
8834
9003
|
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
padding: 0.25em;
|
|
8838
|
-
box-sizing: border-box !important;
|
|
9004
|
+
[part='overlay'] {
|
|
9005
|
+
will-change: opacity, transform;
|
|
8839
9006
|
}
|
|
8840
9007
|
|
|
8841
|
-
[part='
|
|
8842
|
-
|
|
8843
|
-
margin-right: 0.25em;
|
|
9008
|
+
:host([opening]) [part='overlay'] {
|
|
9009
|
+
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
8844
9010
|
}
|
|
8845
9011
|
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
/* Icon-only */
|
|
8852
|
-
|
|
8853
|
-
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
8854
|
-
min-width: var(--lumo-button-size);
|
|
8855
|
-
padding-left: calc(var(--lumo-button-size) / 4);
|
|
8856
|
-
padding-right: calc(var(--lumo-button-size) / 4);
|
|
8857
|
-
}
|
|
8858
|
-
|
|
8859
|
-
:host([theme~='icon']) [part='prefix'],
|
|
8860
|
-
:host([theme~='icon']) [part='suffix'] {
|
|
8861
|
-
margin-left: 0;
|
|
8862
|
-
margin-right: 0;
|
|
8863
|
-
}
|
|
8864
|
-
|
|
8865
|
-
/* RTL specific styles */
|
|
8866
|
-
|
|
8867
|
-
:host([dir='rtl']) [part='prefix'] {
|
|
8868
|
-
margin-left: 0.25em;
|
|
8869
|
-
margin-right: -0.25em;
|
|
9012
|
+
@keyframes lumo-menu-overlay-enter {
|
|
9013
|
+
0% {
|
|
9014
|
+
opacity: 0;
|
|
9015
|
+
transform: translateY(-4px);
|
|
9016
|
+
}
|
|
8870
9017
|
}
|
|
8871
9018
|
|
|
8872
|
-
:host([
|
|
8873
|
-
|
|
8874
|
-
margin-right: 0.25em;
|
|
9019
|
+
:host([closing]) [part='overlay'] {
|
|
9020
|
+
animation: 0.1s lumo-menu-overlay-exit both;
|
|
8875
9021
|
}
|
|
8876
9022
|
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
9023
|
+
@keyframes lumo-menu-overlay-exit {
|
|
9024
|
+
100% {
|
|
9025
|
+
opacity: 0;
|
|
9026
|
+
}
|
|
8881
9027
|
}
|
|
8882
9028
|
`;
|
|
8883
9029
|
|
|
8884
|
-
registerStyles('
|
|
8885
|
-
|
|
8886
|
-
/**
|
|
8887
|
-
* @license
|
|
8888
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
8889
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8890
|
-
*/
|
|
8891
|
-
|
|
8892
|
-
/**
|
|
8893
|
-
* @typedef ReactiveController
|
|
8894
|
-
* @type {import('lit').ReactiveController}
|
|
8895
|
-
*/
|
|
8896
|
-
|
|
8897
|
-
/**
|
|
8898
|
-
* A mixin for connecting controllers to the element.
|
|
8899
|
-
*
|
|
8900
|
-
* @polymerMixin
|
|
8901
|
-
*/
|
|
8902
|
-
const ControllerMixin = dedupingMixin((superClass) => {
|
|
8903
|
-
// If the superclass extends from LitElement,
|
|
8904
|
-
// use its own controllers implementation.
|
|
8905
|
-
if (typeof superClass.prototype.addController === 'function') {
|
|
8906
|
-
return superClass;
|
|
8907
|
-
}
|
|
9030
|
+
registerStyles('', menuOverlayCore, { moduleId: 'lumo-menu-overlay-core' });
|
|
8908
9031
|
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
9032
|
+
const menuOverlayExt = i$1`
|
|
9033
|
+
/* Small viewport (bottom sheet) styles */
|
|
9034
|
+
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
9035
|
+
@media (max-width: 420px), (max-height: 420px) {
|
|
9036
|
+
:host {
|
|
9037
|
+
top: 0 !important;
|
|
9038
|
+
right: 0 !important;
|
|
9039
|
+
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
9040
|
+
left: 0 !important;
|
|
9041
|
+
align-items: stretch !important;
|
|
9042
|
+
justify-content: flex-end !important;
|
|
9043
|
+
}
|
|
8912
9044
|
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
9045
|
+
[part='overlay'] {
|
|
9046
|
+
max-height: 50vh;
|
|
9047
|
+
width: 100vw;
|
|
9048
|
+
border-radius: 0;
|
|
9049
|
+
box-shadow: var(--lumo-box-shadow-xl);
|
|
8917
9050
|
}
|
|
8918
9051
|
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
9052
|
+
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
9053
|
+
[part='content'] {
|
|
9054
|
+
padding: 30px var(--lumo-space-m);
|
|
9055
|
+
max-height: inherit;
|
|
9056
|
+
box-sizing: border-box;
|
|
9057
|
+
-webkit-overflow-scrolling: touch;
|
|
9058
|
+
overflow: auto;
|
|
9059
|
+
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
9060
|
+
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
9061
|
+
}
|
|
8922
9062
|
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
c.hostConnected();
|
|
8926
|
-
}
|
|
8927
|
-
});
|
|
9063
|
+
[part='backdrop'] {
|
|
9064
|
+
display: block;
|
|
8928
9065
|
}
|
|
8929
9066
|
|
|
8930
|
-
|
|
8931
|
-
disconnectedCallback() {
|
|
8932
|
-
super.disconnectedCallback();
|
|
9067
|
+
/* Animations */
|
|
8933
9068
|
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
c.hostDisconnected();
|
|
8937
|
-
}
|
|
8938
|
-
});
|
|
9069
|
+
:host([opening]) [part='overlay'] {
|
|
9070
|
+
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
8939
9071
|
}
|
|
8940
9072
|
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
* @param {ReactiveController} controller
|
|
8945
|
-
* @protected
|
|
8946
|
-
*/
|
|
8947
|
-
addController(controller) {
|
|
8948
|
-
this.__controllers.add(controller);
|
|
8949
|
-
// Call hostConnected if a controller is added after the element is attached.
|
|
8950
|
-
if (this.$ !== undefined && this.isConnected && controller.hostConnected) {
|
|
8951
|
-
controller.hostConnected();
|
|
8952
|
-
}
|
|
9073
|
+
:host([closing]),
|
|
9074
|
+
:host([closing]) [part='backdrop'] {
|
|
9075
|
+
animation-delay: 0.14s;
|
|
8953
9076
|
}
|
|
8954
9077
|
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
*
|
|
8958
|
-
* @param {ReactiveController} controller
|
|
8959
|
-
* @protected
|
|
8960
|
-
*/
|
|
8961
|
-
removeController(controller) {
|
|
8962
|
-
this.__controllers.delete(controller);
|
|
9078
|
+
:host([closing]) [part='overlay'] {
|
|
9079
|
+
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
8963
9080
|
}
|
|
8964
|
-
};
|
|
8965
|
-
});
|
|
8966
|
-
|
|
8967
|
-
const DEV_MODE_CODE_REGEXP =
|
|
8968
|
-
/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i;
|
|
8969
|
-
|
|
8970
|
-
const FlowClients = window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients;
|
|
8971
|
-
|
|
8972
|
-
function isMinified() {
|
|
8973
|
-
function test() {
|
|
8974
|
-
/** vaadin-dev-mode:start
|
|
8975
|
-
return false;
|
|
8976
|
-
vaadin-dev-mode:end **/
|
|
8977
|
-
return true;
|
|
8978
9081
|
}
|
|
8979
|
-
return uncommentAndRun(test);
|
|
8980
|
-
}
|
|
8981
9082
|
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
return true;
|
|
9083
|
+
@keyframes lumo-mobile-menu-overlay-enter {
|
|
9084
|
+
0% {
|
|
9085
|
+
transform: translateY(150%);
|
|
8986
9086
|
}
|
|
9087
|
+
}
|
|
8987
9088
|
|
|
8988
|
-
|
|
8989
|
-
|
|
9089
|
+
@keyframes lumo-mobile-menu-overlay-exit {
|
|
9090
|
+
100% {
|
|
9091
|
+
transform: translateY(150%);
|
|
8990
9092
|
}
|
|
9093
|
+
}
|
|
9094
|
+
`;
|
|
8991
9095
|
|
|
8992
|
-
|
|
8993
|
-
return !isFlowProductionMode();
|
|
8994
|
-
}
|
|
9096
|
+
const menuOverlay = [overlay, menuOverlayCore, menuOverlayExt];
|
|
8995
9097
|
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9098
|
+
registerStyles('', menuOverlay, { moduleId: 'lumo-menu-overlay' });
|
|
9099
|
+
|
|
9100
|
+
const datePickerOverlay = i$1`
|
|
9101
|
+
[part='overlay'] {
|
|
9102
|
+
/*
|
|
9103
|
+
Width:
|
|
9104
|
+
date cell widths
|
|
9105
|
+
+ month calendar side padding
|
|
9106
|
+
+ year scroller width
|
|
9107
|
+
*/
|
|
9108
|
+
/* prettier-ignore */
|
|
9109
|
+
width:
|
|
9110
|
+
calc(
|
|
9111
|
+
var(--lumo-size-m) * 7
|
|
9112
|
+
+ var(--lumo-space-xs) * 2
|
|
9113
|
+
+ 57px
|
|
9114
|
+
);
|
|
9115
|
+
height: 100%;
|
|
9116
|
+
max-height: calc(var(--lumo-size-m) * 14);
|
|
9117
|
+
overflow: hidden;
|
|
9118
|
+
-webkit-tap-highlight-color: transparent;
|
|
9000
9119
|
}
|
|
9001
|
-
}
|
|
9002
9120
|
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
}
|
|
9121
|
+
[part='overlay'] {
|
|
9122
|
+
flex-direction: column;
|
|
9123
|
+
}
|
|
9006
9124
|
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9125
|
+
[part='content'] {
|
|
9126
|
+
padding: 0;
|
|
9127
|
+
height: 100%;
|
|
9128
|
+
overflow: hidden;
|
|
9129
|
+
-webkit-mask-image: none;
|
|
9130
|
+
mask-image: none;
|
|
9131
|
+
}
|
|
9010
9132
|
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
const productionModeApps = Object.keys(FlowClients)
|
|
9014
|
-
.map(key => FlowClients[key])
|
|
9015
|
-
.filter(client => client.productionMode);
|
|
9016
|
-
if (productionModeApps.length > 0) {
|
|
9017
|
-
return true;
|
|
9018
|
-
}
|
|
9133
|
+
:host([top-aligned]) [part~='overlay'] {
|
|
9134
|
+
margin-top: var(--lumo-space-xs);
|
|
9019
9135
|
}
|
|
9020
|
-
return false;
|
|
9021
|
-
}
|
|
9022
9136
|
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
return;
|
|
9137
|
+
:host([bottom-aligned]) [part~='overlay'] {
|
|
9138
|
+
margin-bottom: var(--lumo-space-xs);
|
|
9026
9139
|
}
|
|
9027
9140
|
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
} catch (e) {
|
|
9034
|
-
// eat the exception
|
|
9035
|
-
console.log('vaadin-development-mode-detector: uncommentAndRun() failed', e);
|
|
9141
|
+
@media (max-width: 420px), (max-height: 420px) {
|
|
9142
|
+
[part='overlay'] {
|
|
9143
|
+
width: 100vw;
|
|
9144
|
+
height: 70vh;
|
|
9145
|
+
max-height: 70vh;
|
|
9036
9146
|
}
|
|
9037
9147
|
}
|
|
9148
|
+
`;
|
|
9149
|
+
|
|
9150
|
+
registerStyles('vaadin-date-picker-overlay', [menuOverlay, datePickerOverlay], {
|
|
9151
|
+
moduleId: 'lumo-date-picker-overlay',
|
|
9152
|
+
});
|
|
9153
|
+
|
|
9154
|
+
/**
|
|
9155
|
+
* @license
|
|
9156
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
9157
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9158
|
+
*/
|
|
9159
|
+
|
|
9160
|
+
/**
|
|
9161
|
+
* Dummy custom element used for collecting
|
|
9162
|
+
* development time usage statistics.
|
|
9163
|
+
*
|
|
9164
|
+
* @private
|
|
9165
|
+
*/
|
|
9166
|
+
class Lumo extends HTMLElement {
|
|
9167
|
+
static get is() {
|
|
9168
|
+
return 'vaadin-lumo-styles';
|
|
9169
|
+
}
|
|
9170
|
+
|
|
9171
|
+
static get version() {
|
|
9172
|
+
return '24.2.9';
|
|
9173
|
+
}
|
|
9174
|
+
}
|
|
9175
|
+
|
|
9176
|
+
defineCustomElement(Lumo);
|
|
9177
|
+
|
|
9178
|
+
const addLumoGlobalStyles = (id, ...styles) => {
|
|
9179
|
+
addGlobalThemeStyles(`lumo-${id}`, styles);
|
|
9180
|
+
};
|
|
9181
|
+
|
|
9182
|
+
/**
|
|
9183
|
+
* @license
|
|
9184
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
9185
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9186
|
+
*/
|
|
9187
|
+
|
|
9188
|
+
const colorBase = i$1`
|
|
9189
|
+
:host {
|
|
9190
|
+
/* Base (background) */
|
|
9191
|
+
--lumo-base-color: #fff;
|
|
9192
|
+
|
|
9193
|
+
/* Tint */
|
|
9194
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
9195
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
9196
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
9197
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
9198
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
9199
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
9200
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
9201
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
9202
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
9203
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
9204
|
+
--lumo-tint: #fff;
|
|
9205
|
+
|
|
9206
|
+
/* Shade */
|
|
9207
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
9208
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
9209
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
9210
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
9211
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
9212
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
9213
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
9214
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
9215
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
9216
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
9217
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
9218
|
+
|
|
9219
|
+
/* Contrast */
|
|
9220
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
9221
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
9222
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
9223
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
9224
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
9225
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
9226
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
9227
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
9228
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
9229
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
9230
|
+
--lumo-contrast: var(--lumo-shade);
|
|
9231
|
+
|
|
9232
|
+
/* Text */
|
|
9233
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
9234
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
9235
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
9236
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
9237
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
9238
|
+
|
|
9239
|
+
/* Primary */
|
|
9240
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
9241
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
9242
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
9243
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
9244
|
+
--lumo-primary-contrast-color: #fff;
|
|
9245
|
+
|
|
9246
|
+
/* Error */
|
|
9247
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
9248
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
9249
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
9250
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
9251
|
+
--lumo-error-contrast-color: #fff;
|
|
9252
|
+
|
|
9253
|
+
/* Success */
|
|
9254
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
9255
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
9256
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
9257
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
9258
|
+
--lumo-success-contrast-color: #fff;
|
|
9259
|
+
|
|
9260
|
+
/* Warning */
|
|
9261
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
9262
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
9263
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
9264
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
9265
|
+
}
|
|
9266
|
+
|
|
9267
|
+
/* forced-colors mode adjustments */
|
|
9268
|
+
@media (forced-colors: active) {
|
|
9269
|
+
html {
|
|
9270
|
+
--lumo-disabled-text-color: GrayText;
|
|
9271
|
+
}
|
|
9272
|
+
}
|
|
9273
|
+
`;
|
|
9274
|
+
|
|
9275
|
+
addLumoGlobalStyles('color-props', colorBase);
|
|
9276
|
+
|
|
9277
|
+
const color = i$1`
|
|
9278
|
+
[theme~='dark'] {
|
|
9279
|
+
/* Base (background) */
|
|
9280
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
9281
|
+
|
|
9282
|
+
/* Tint */
|
|
9283
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
9284
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
9285
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
9286
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
9287
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
9288
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
9289
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
9290
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
9291
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
9292
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
9293
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
9294
|
+
|
|
9295
|
+
/* Shade */
|
|
9296
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
9297
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
9298
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
9299
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
9300
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
9301
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
9302
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
9303
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
9304
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
9305
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
9306
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
9307
|
+
|
|
9308
|
+
/* Contrast */
|
|
9309
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
9310
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
9311
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
9312
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
9313
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
9314
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
9315
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
9316
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
9317
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
9318
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
9319
|
+
--lumo-contrast: var(--lumo-tint);
|
|
9320
|
+
|
|
9321
|
+
/* Text */
|
|
9322
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
9323
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
9324
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
9325
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
9326
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
9327
|
+
|
|
9328
|
+
/* Primary */
|
|
9329
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
9330
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
9331
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
9332
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
9333
|
+
--lumo-primary-contrast-color: #fff;
|
|
9334
|
+
|
|
9335
|
+
/* Error */
|
|
9336
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
9337
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
9338
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
9339
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
9340
|
+
|
|
9341
|
+
/* Success */
|
|
9342
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
9343
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
9344
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
9345
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
9346
|
+
|
|
9347
|
+
/* Warning */
|
|
9348
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
9349
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
9350
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
9351
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
9352
|
+
}
|
|
9353
|
+
|
|
9354
|
+
html {
|
|
9355
|
+
color: var(--lumo-body-text-color);
|
|
9356
|
+
background-color: var(--lumo-base-color);
|
|
9357
|
+
color-scheme: light;
|
|
9358
|
+
}
|
|
9359
|
+
|
|
9360
|
+
[theme~='dark'] {
|
|
9361
|
+
color: var(--lumo-body-text-color);
|
|
9362
|
+
background-color: var(--lumo-base-color);
|
|
9363
|
+
color-scheme: dark;
|
|
9364
|
+
}
|
|
9365
|
+
|
|
9366
|
+
h1,
|
|
9367
|
+
h2,
|
|
9368
|
+
h3,
|
|
9369
|
+
h4,
|
|
9370
|
+
h5,
|
|
9371
|
+
h6 {
|
|
9372
|
+
color: var(--lumo-header-text-color);
|
|
9373
|
+
}
|
|
9374
|
+
|
|
9375
|
+
a:where(:any-link) {
|
|
9376
|
+
color: var(--lumo-primary-text-color);
|
|
9377
|
+
}
|
|
9378
|
+
|
|
9379
|
+
a:not(:any-link) {
|
|
9380
|
+
color: var(--lumo-disabled-text-color);
|
|
9381
|
+
}
|
|
9382
|
+
|
|
9383
|
+
blockquote {
|
|
9384
|
+
color: var(--lumo-secondary-text-color);
|
|
9385
|
+
}
|
|
9386
|
+
|
|
9387
|
+
code,
|
|
9388
|
+
pre {
|
|
9389
|
+
background-color: var(--lumo-contrast-10pct);
|
|
9390
|
+
border-radius: var(--lumo-border-radius-m);
|
|
9391
|
+
}
|
|
9392
|
+
`;
|
|
9393
|
+
|
|
9394
|
+
registerStyles('', color, { moduleId: 'lumo-color' });
|
|
9395
|
+
|
|
9396
|
+
/**
|
|
9397
|
+
* @license
|
|
9398
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
9399
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9400
|
+
*/
|
|
9401
|
+
|
|
9402
|
+
const sizing = i$1`
|
|
9403
|
+
:host {
|
|
9404
|
+
--lumo-size-xs: 1.625rem;
|
|
9405
|
+
--lumo-size-s: 1.875rem;
|
|
9406
|
+
--lumo-size-m: 2.25rem;
|
|
9407
|
+
--lumo-size-l: 2.75rem;
|
|
9408
|
+
--lumo-size-xl: 3.5rem;
|
|
9409
|
+
|
|
9410
|
+
/* Icons */
|
|
9411
|
+
--lumo-icon-size-s: 1.25em;
|
|
9412
|
+
--lumo-icon-size-m: 1.5em;
|
|
9413
|
+
--lumo-icon-size-l: 2.25em;
|
|
9414
|
+
/* For backwards compatibility */
|
|
9415
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
9416
|
+
}
|
|
9417
|
+
`;
|
|
9418
|
+
|
|
9419
|
+
addLumoGlobalStyles('sizing-props', sizing);
|
|
9420
|
+
|
|
9421
|
+
/**
|
|
9422
|
+
* @license
|
|
9423
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
9424
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9425
|
+
*/
|
|
9426
|
+
|
|
9427
|
+
const spacing = i$1`
|
|
9428
|
+
:host {
|
|
9429
|
+
/* Square */
|
|
9430
|
+
--lumo-space-xs: 0.25rem;
|
|
9431
|
+
--lumo-space-s: 0.5rem;
|
|
9432
|
+
--lumo-space-m: 1rem;
|
|
9433
|
+
--lumo-space-l: 1.5rem;
|
|
9434
|
+
--lumo-space-xl: 2.5rem;
|
|
9435
|
+
|
|
9436
|
+
/* Wide */
|
|
9437
|
+
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
9438
|
+
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
9439
|
+
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
9440
|
+
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
9441
|
+
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
9442
|
+
|
|
9443
|
+
/* Tall */
|
|
9444
|
+
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
9445
|
+
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
9446
|
+
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
9447
|
+
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
9448
|
+
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
9449
|
+
}
|
|
9450
|
+
`;
|
|
9451
|
+
|
|
9452
|
+
addLumoGlobalStyles('spacing-props', spacing);
|
|
9453
|
+
|
|
9454
|
+
/**
|
|
9455
|
+
* @license
|
|
9456
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
9457
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9458
|
+
*/
|
|
9459
|
+
|
|
9460
|
+
const style = i$1`
|
|
9461
|
+
:host {
|
|
9462
|
+
/* Border radius */
|
|
9463
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
9464
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
9465
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
9466
|
+
|
|
9467
|
+
/* Shadow */
|
|
9468
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
9469
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
9470
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
9471
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
9472
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
9473
|
+
|
|
9474
|
+
/* Clickable element cursor */
|
|
9475
|
+
--lumo-clickable-cursor: default;
|
|
9476
|
+
}
|
|
9477
|
+
`;
|
|
9478
|
+
|
|
9479
|
+
/**
|
|
9480
|
+
* Default values for component-specific custom properties.
|
|
9481
|
+
*/
|
|
9482
|
+
i$1`
|
|
9483
|
+
html {
|
|
9484
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
9485
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
9486
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
9487
|
+
}
|
|
9488
|
+
`;
|
|
9489
|
+
|
|
9490
|
+
addLumoGlobalStyles('style-props', style);
|
|
9491
|
+
|
|
9492
|
+
/**
|
|
9493
|
+
* @license
|
|
9494
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
9495
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9496
|
+
*/
|
|
9497
|
+
|
|
9498
|
+
const font = i$1`
|
|
9499
|
+
:host {
|
|
9500
|
+
/* prettier-ignore */
|
|
9501
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
9502
|
+
|
|
9503
|
+
/* Font sizes */
|
|
9504
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
9505
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
9506
|
+
--lumo-font-size-s: 0.875rem;
|
|
9507
|
+
--lumo-font-size-m: 1rem;
|
|
9508
|
+
--lumo-font-size-l: 1.125rem;
|
|
9509
|
+
--lumo-font-size-xl: 1.375rem;
|
|
9510
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
9511
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
9512
|
+
|
|
9513
|
+
/* Line heights */
|
|
9514
|
+
--lumo-line-height-xs: 1.25;
|
|
9515
|
+
--lumo-line-height-s: 1.375;
|
|
9516
|
+
--lumo-line-height-m: 1.625;
|
|
9517
|
+
}
|
|
9518
|
+
`;
|
|
9519
|
+
|
|
9520
|
+
const typography = i$1`
|
|
9521
|
+
body,
|
|
9522
|
+
:host {
|
|
9523
|
+
font-family: var(--lumo-font-family);
|
|
9524
|
+
font-size: var(--lumo-font-size-m);
|
|
9525
|
+
line-height: var(--lumo-line-height-m);
|
|
9526
|
+
-webkit-text-size-adjust: 100%;
|
|
9527
|
+
-webkit-font-smoothing: antialiased;
|
|
9528
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9529
|
+
}
|
|
9530
|
+
|
|
9531
|
+
small,
|
|
9532
|
+
[theme~='font-size-s'] {
|
|
9533
|
+
font-size: var(--lumo-font-size-s);
|
|
9534
|
+
line-height: var(--lumo-line-height-s);
|
|
9535
|
+
}
|
|
9536
|
+
|
|
9537
|
+
[theme~='font-size-xs'] {
|
|
9538
|
+
font-size: var(--lumo-font-size-xs);
|
|
9539
|
+
line-height: var(--lumo-line-height-xs);
|
|
9540
|
+
}
|
|
9541
|
+
|
|
9542
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
9543
|
+
font-weight: 600;
|
|
9544
|
+
line-height: var(--lumo-line-height-xs);
|
|
9545
|
+
margin-block: 0;
|
|
9546
|
+
}
|
|
9547
|
+
|
|
9548
|
+
:where(h1) {
|
|
9549
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
9550
|
+
}
|
|
9551
|
+
|
|
9552
|
+
:where(h2) {
|
|
9553
|
+
font-size: var(--lumo-font-size-xxl);
|
|
9554
|
+
}
|
|
9555
|
+
|
|
9556
|
+
:where(h3) {
|
|
9557
|
+
font-size: var(--lumo-font-size-xl);
|
|
9558
|
+
}
|
|
9559
|
+
|
|
9560
|
+
:where(h4) {
|
|
9561
|
+
font-size: var(--lumo-font-size-l);
|
|
9562
|
+
}
|
|
9563
|
+
|
|
9564
|
+
:where(h5) {
|
|
9565
|
+
font-size: var(--lumo-font-size-m);
|
|
9566
|
+
}
|
|
9567
|
+
|
|
9568
|
+
:where(h6) {
|
|
9569
|
+
font-size: var(--lumo-font-size-xs);
|
|
9570
|
+
text-transform: uppercase;
|
|
9571
|
+
letter-spacing: 0.03em;
|
|
9572
|
+
}
|
|
9573
|
+
|
|
9574
|
+
p,
|
|
9575
|
+
blockquote {
|
|
9576
|
+
margin-top: 0.5em;
|
|
9577
|
+
margin-bottom: 0.75em;
|
|
9578
|
+
}
|
|
9579
|
+
|
|
9580
|
+
a {
|
|
9581
|
+
text-decoration: none;
|
|
9582
|
+
}
|
|
9583
|
+
|
|
9584
|
+
a:where(:any-link):hover {
|
|
9585
|
+
text-decoration: underline;
|
|
9586
|
+
}
|
|
9587
|
+
|
|
9588
|
+
hr {
|
|
9589
|
+
display: block;
|
|
9590
|
+
align-self: stretch;
|
|
9591
|
+
height: 1px;
|
|
9592
|
+
border: 0;
|
|
9593
|
+
padding: 0;
|
|
9594
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
9595
|
+
background-color: var(--lumo-contrast-10pct);
|
|
9596
|
+
}
|
|
9597
|
+
|
|
9598
|
+
blockquote {
|
|
9599
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
9600
|
+
}
|
|
9601
|
+
|
|
9602
|
+
b,
|
|
9603
|
+
strong {
|
|
9604
|
+
font-weight: 600;
|
|
9605
|
+
}
|
|
9606
|
+
|
|
9607
|
+
/* RTL specific styles */
|
|
9608
|
+
blockquote[dir='rtl'] {
|
|
9609
|
+
border-left: none;
|
|
9610
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
9611
|
+
}
|
|
9612
|
+
`;
|
|
9613
|
+
|
|
9614
|
+
registerStyles('', typography, { moduleId: 'lumo-typography' });
|
|
9615
|
+
addLumoGlobalStyles('typography-props', font);
|
|
9616
|
+
|
|
9617
|
+
const button = i$1`
|
|
9618
|
+
:host {
|
|
9619
|
+
/* Sizing */
|
|
9620
|
+
--lumo-button-size: var(--lumo-size-m);
|
|
9621
|
+
min-width: calc(var(--lumo-button-size) * 2);
|
|
9622
|
+
height: var(--lumo-button-size);
|
|
9623
|
+
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
|
|
9624
|
+
margin: var(--lumo-space-xs) 0;
|
|
9625
|
+
box-sizing: border-box;
|
|
9626
|
+
/* Style */
|
|
9627
|
+
font-family: var(--lumo-font-family);
|
|
9628
|
+
font-size: var(--lumo-font-size-m);
|
|
9629
|
+
font-weight: 500;
|
|
9630
|
+
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
9631
|
+
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
9632
|
+
border-radius: var(--lumo-border-radius-m);
|
|
9633
|
+
cursor: var(--lumo-clickable-cursor);
|
|
9634
|
+
-webkit-tap-highlight-color: transparent;
|
|
9635
|
+
-webkit-font-smoothing: antialiased;
|
|
9636
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9637
|
+
flex-shrink: 0;
|
|
9638
|
+
}
|
|
9639
|
+
|
|
9640
|
+
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
|
9641
|
+
[part='label'],
|
|
9642
|
+
[part='prefix'],
|
|
9643
|
+
[part='suffix'] {
|
|
9644
|
+
line-height: var(--lumo-line-height-xs);
|
|
9645
|
+
}
|
|
9646
|
+
|
|
9647
|
+
[part='label'] {
|
|
9648
|
+
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
9649
|
+
}
|
|
9650
|
+
|
|
9651
|
+
:host([theme~='small']) {
|
|
9652
|
+
font-size: var(--lumo-font-size-s);
|
|
9653
|
+
--lumo-button-size: var(--lumo-size-s);
|
|
9654
|
+
}
|
|
9655
|
+
|
|
9656
|
+
:host([theme~='large']) {
|
|
9657
|
+
font-size: var(--lumo-font-size-l);
|
|
9658
|
+
--lumo-button-size: var(--lumo-size-l);
|
|
9659
|
+
}
|
|
9660
|
+
|
|
9661
|
+
/* For interaction states */
|
|
9662
|
+
:host::before,
|
|
9663
|
+
:host::after {
|
|
9664
|
+
content: '';
|
|
9665
|
+
/* We rely on the host always being relative */
|
|
9666
|
+
position: absolute;
|
|
9667
|
+
z-index: 1;
|
|
9668
|
+
inset: 0;
|
|
9669
|
+
background-color: currentColor;
|
|
9670
|
+
border-radius: inherit;
|
|
9671
|
+
opacity: 0;
|
|
9672
|
+
pointer-events: none;
|
|
9673
|
+
}
|
|
9674
|
+
|
|
9675
|
+
/* Hover */
|
|
9676
|
+
|
|
9677
|
+
@media (any-hover: hover) {
|
|
9678
|
+
:host(:hover)::before {
|
|
9679
|
+
opacity: 0.02;
|
|
9680
|
+
}
|
|
9681
|
+
}
|
|
9682
|
+
|
|
9683
|
+
/* Active */
|
|
9684
|
+
|
|
9685
|
+
:host::after {
|
|
9686
|
+
transition: opacity 1.4s, transform 0.1s;
|
|
9687
|
+
filter: blur(8px);
|
|
9688
|
+
}
|
|
9689
|
+
|
|
9690
|
+
:host([active])::before {
|
|
9691
|
+
opacity: 0.05;
|
|
9692
|
+
transition-duration: 0s;
|
|
9693
|
+
}
|
|
9694
|
+
|
|
9695
|
+
:host([active])::after {
|
|
9696
|
+
opacity: 0.1;
|
|
9697
|
+
transition-duration: 0s, 0s;
|
|
9698
|
+
transform: scale(0);
|
|
9699
|
+
}
|
|
9700
|
+
|
|
9701
|
+
/* Keyboard focus */
|
|
9702
|
+
|
|
9703
|
+
:host([focus-ring]) {
|
|
9704
|
+
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
9705
|
+
}
|
|
9706
|
+
|
|
9707
|
+
:host([theme~='primary'][focus-ring]) {
|
|
9708
|
+
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
9709
|
+
}
|
|
9710
|
+
|
|
9711
|
+
/* Types (primary, tertiary, tertiary-inline */
|
|
9712
|
+
|
|
9713
|
+
:host([theme~='tertiary']),
|
|
9714
|
+
:host([theme~='tertiary-inline']) {
|
|
9715
|
+
background-color: transparent !important;
|
|
9716
|
+
min-width: 0;
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9719
|
+
:host([theme~='tertiary']) {
|
|
9720
|
+
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
9721
|
+
}
|
|
9722
|
+
|
|
9723
|
+
:host([theme~='tertiary-inline'])::before {
|
|
9724
|
+
display: none;
|
|
9725
|
+
}
|
|
9726
|
+
|
|
9727
|
+
:host([theme~='tertiary-inline']) {
|
|
9728
|
+
margin: 0;
|
|
9729
|
+
height: auto;
|
|
9730
|
+
padding: 0;
|
|
9731
|
+
line-height: inherit;
|
|
9732
|
+
font-size: inherit;
|
|
9733
|
+
}
|
|
9734
|
+
|
|
9735
|
+
:host([theme~='tertiary-inline']) [part='label'] {
|
|
9736
|
+
padding: 0;
|
|
9737
|
+
overflow: visible;
|
|
9738
|
+
line-height: inherit;
|
|
9739
|
+
}
|
|
9740
|
+
|
|
9741
|
+
:host([theme~='primary']) {
|
|
9742
|
+
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
9743
|
+
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
9744
|
+
font-weight: 600;
|
|
9745
|
+
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
:host([theme~='primary'])::before {
|
|
9749
|
+
background-color: black;
|
|
9750
|
+
}
|
|
9751
|
+
|
|
9752
|
+
@media (any-hover: hover) {
|
|
9753
|
+
:host([theme~='primary']:hover)::before {
|
|
9754
|
+
opacity: 0.05;
|
|
9755
|
+
}
|
|
9756
|
+
}
|
|
9757
|
+
|
|
9758
|
+
:host([theme~='primary'][active])::before {
|
|
9759
|
+
opacity: 0.1;
|
|
9760
|
+
}
|
|
9761
|
+
|
|
9762
|
+
:host([theme~='primary'][active])::after {
|
|
9763
|
+
opacity: 0.2;
|
|
9764
|
+
}
|
|
9765
|
+
|
|
9766
|
+
/* Colors (success, error, contrast) */
|
|
9767
|
+
|
|
9768
|
+
:host([theme~='success']) {
|
|
9769
|
+
color: var(--lumo-success-text-color);
|
|
9770
|
+
}
|
|
9771
|
+
|
|
9772
|
+
:host([theme~='success'][theme~='primary']) {
|
|
9773
|
+
background-color: var(--lumo-success-color);
|
|
9774
|
+
color: var(--lumo-success-contrast-color);
|
|
9775
|
+
}
|
|
9776
|
+
|
|
9777
|
+
:host([theme~='error']) {
|
|
9778
|
+
color: var(--lumo-error-text-color);
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9781
|
+
:host([theme~='error'][theme~='primary']) {
|
|
9782
|
+
background-color: var(--lumo-error-color);
|
|
9783
|
+
color: var(--lumo-error-contrast-color);
|
|
9784
|
+
}
|
|
9785
|
+
|
|
9786
|
+
:host([theme~='contrast']) {
|
|
9787
|
+
color: var(--lumo-contrast);
|
|
9788
|
+
}
|
|
9789
|
+
|
|
9790
|
+
:host([theme~='contrast'][theme~='primary']) {
|
|
9791
|
+
background-color: var(--lumo-contrast);
|
|
9792
|
+
color: var(--lumo-base-color);
|
|
9793
|
+
}
|
|
9794
|
+
|
|
9795
|
+
/* Disabled state. Keep selectors after other color variants. */
|
|
9796
|
+
|
|
9797
|
+
:host([disabled]) {
|
|
9798
|
+
pointer-events: none;
|
|
9799
|
+
color: var(--lumo-disabled-text-color);
|
|
9800
|
+
}
|
|
9801
|
+
|
|
9802
|
+
:host([theme~='primary'][disabled]) {
|
|
9803
|
+
background-color: var(--lumo-contrast-30pct);
|
|
9804
|
+
color: var(--lumo-base-color);
|
|
9805
|
+
}
|
|
9806
|
+
|
|
9807
|
+
:host([theme~='primary'][disabled]) [part] {
|
|
9808
|
+
opacity: 0.7;
|
|
9809
|
+
}
|
|
9810
|
+
|
|
9811
|
+
/* Icons */
|
|
9812
|
+
|
|
9813
|
+
[part] ::slotted(vaadin-icon) {
|
|
9814
|
+
display: inline-block;
|
|
9815
|
+
width: var(--lumo-icon-size-m);
|
|
9816
|
+
height: var(--lumo-icon-size-m);
|
|
9817
|
+
}
|
|
9818
|
+
|
|
9819
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
9820
|
+
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
9821
|
+
padding: 0.25em;
|
|
9822
|
+
box-sizing: border-box !important;
|
|
9823
|
+
}
|
|
9824
|
+
|
|
9825
|
+
[part='prefix'] {
|
|
9826
|
+
margin-left: -0.25em;
|
|
9827
|
+
margin-right: 0.25em;
|
|
9828
|
+
}
|
|
9829
|
+
|
|
9830
|
+
[part='suffix'] {
|
|
9831
|
+
margin-left: 0.25em;
|
|
9832
|
+
margin-right: -0.25em;
|
|
9833
|
+
}
|
|
9834
|
+
|
|
9835
|
+
/* Icon-only */
|
|
9836
|
+
|
|
9837
|
+
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
9838
|
+
min-width: var(--lumo-button-size);
|
|
9839
|
+
padding-left: calc(var(--lumo-button-size) / 4);
|
|
9840
|
+
padding-right: calc(var(--lumo-button-size) / 4);
|
|
9841
|
+
}
|
|
9842
|
+
|
|
9843
|
+
:host([theme~='icon']) [part='prefix'],
|
|
9844
|
+
:host([theme~='icon']) [part='suffix'] {
|
|
9845
|
+
margin-left: 0;
|
|
9846
|
+
margin-right: 0;
|
|
9847
|
+
}
|
|
9848
|
+
|
|
9849
|
+
/* RTL specific styles */
|
|
9850
|
+
|
|
9851
|
+
:host([dir='rtl']) [part='prefix'] {
|
|
9852
|
+
margin-left: 0.25em;
|
|
9853
|
+
margin-right: -0.25em;
|
|
9854
|
+
}
|
|
9855
|
+
|
|
9856
|
+
:host([dir='rtl']) [part='suffix'] {
|
|
9857
|
+
margin-left: -0.25em;
|
|
9858
|
+
margin-right: 0.25em;
|
|
9859
|
+
}
|
|
9860
|
+
|
|
9861
|
+
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
9862
|
+
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
9863
|
+
margin-left: 0;
|
|
9864
|
+
margin-right: 0;
|
|
9865
|
+
}
|
|
9866
|
+
`;
|
|
9867
|
+
|
|
9868
|
+
registerStyles('vaadin-button', button, { moduleId: 'lumo-button' });
|
|
9869
|
+
|
|
9870
|
+
/**
|
|
9871
|
+
* @license
|
|
9872
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
9873
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9874
|
+
*/
|
|
9875
|
+
|
|
9876
|
+
/**
|
|
9877
|
+
* @typedef ReactiveController
|
|
9878
|
+
* @type {import('lit').ReactiveController}
|
|
9879
|
+
*/
|
|
9880
|
+
|
|
9881
|
+
/**
|
|
9882
|
+
* A mixin for connecting controllers to the element.
|
|
9883
|
+
*
|
|
9884
|
+
* @polymerMixin
|
|
9885
|
+
*/
|
|
9886
|
+
const ControllerMixin = dedupingMixin((superClass) => {
|
|
9887
|
+
// If the superclass extends from LitElement,
|
|
9888
|
+
// use its own controllers implementation.
|
|
9889
|
+
if (typeof superClass.prototype.addController === 'function') {
|
|
9890
|
+
return superClass;
|
|
9891
|
+
}
|
|
9892
|
+
|
|
9893
|
+
return class ControllerMixinClass extends superClass {
|
|
9894
|
+
constructor() {
|
|
9895
|
+
super();
|
|
9896
|
+
|
|
9897
|
+
/**
|
|
9898
|
+
* @type {Set<ReactiveController>}
|
|
9899
|
+
*/
|
|
9900
|
+
this.__controllers = new Set();
|
|
9901
|
+
}
|
|
9902
|
+
|
|
9903
|
+
/** @protected */
|
|
9904
|
+
connectedCallback() {
|
|
9905
|
+
super.connectedCallback();
|
|
9906
|
+
|
|
9907
|
+
this.__controllers.forEach((c) => {
|
|
9908
|
+
if (c.hostConnected) {
|
|
9909
|
+
c.hostConnected();
|
|
9910
|
+
}
|
|
9911
|
+
});
|
|
9912
|
+
}
|
|
9913
|
+
|
|
9914
|
+
/** @protected */
|
|
9915
|
+
disconnectedCallback() {
|
|
9916
|
+
super.disconnectedCallback();
|
|
9917
|
+
|
|
9918
|
+
this.__controllers.forEach((c) => {
|
|
9919
|
+
if (c.hostDisconnected) {
|
|
9920
|
+
c.hostDisconnected();
|
|
9921
|
+
}
|
|
9922
|
+
});
|
|
9923
|
+
}
|
|
9924
|
+
|
|
9925
|
+
/**
|
|
9926
|
+
* Registers a controller to participate in the element update cycle.
|
|
9927
|
+
*
|
|
9928
|
+
* @param {ReactiveController} controller
|
|
9929
|
+
* @protected
|
|
9930
|
+
*/
|
|
9931
|
+
addController(controller) {
|
|
9932
|
+
this.__controllers.add(controller);
|
|
9933
|
+
// Call hostConnected if a controller is added after the element is attached.
|
|
9934
|
+
if (this.$ !== undefined && this.isConnected && controller.hostConnected) {
|
|
9935
|
+
controller.hostConnected();
|
|
9936
|
+
}
|
|
9937
|
+
}
|
|
9938
|
+
|
|
9939
|
+
/**
|
|
9940
|
+
* Removes a controller from the element.
|
|
9941
|
+
*
|
|
9942
|
+
* @param {ReactiveController} controller
|
|
9943
|
+
* @protected
|
|
9944
|
+
*/
|
|
9945
|
+
removeController(controller) {
|
|
9946
|
+
this.__controllers.delete(controller);
|
|
9947
|
+
}
|
|
9948
|
+
};
|
|
9949
|
+
});
|
|
9950
|
+
|
|
9951
|
+
const DEV_MODE_CODE_REGEXP =
|
|
9952
|
+
/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i;
|
|
9953
|
+
|
|
9954
|
+
const FlowClients = window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients;
|
|
9955
|
+
|
|
9956
|
+
function isMinified() {
|
|
9957
|
+
function test() {
|
|
9958
|
+
/** vaadin-dev-mode:start
|
|
9959
|
+
return false;
|
|
9960
|
+
vaadin-dev-mode:end **/
|
|
9961
|
+
return true;
|
|
9962
|
+
}
|
|
9963
|
+
return uncommentAndRun(test);
|
|
9964
|
+
}
|
|
9965
|
+
|
|
9966
|
+
function isDevelopmentMode() {
|
|
9967
|
+
try {
|
|
9968
|
+
if (isForcedDevelopmentMode()) {
|
|
9969
|
+
return true;
|
|
9970
|
+
}
|
|
9971
|
+
|
|
9972
|
+
if (!isLocalhost()) {
|
|
9973
|
+
return false;
|
|
9974
|
+
}
|
|
9975
|
+
|
|
9976
|
+
if (FlowClients) {
|
|
9977
|
+
return !isFlowProductionMode();
|
|
9978
|
+
}
|
|
9979
|
+
|
|
9980
|
+
return !isMinified();
|
|
9981
|
+
} catch (e) {
|
|
9982
|
+
// Some error in this code, assume production so no further actions will be taken
|
|
9983
|
+
return false;
|
|
9984
|
+
}
|
|
9985
|
+
}
|
|
9986
|
+
|
|
9987
|
+
function isForcedDevelopmentMode() {
|
|
9988
|
+
return localStorage.getItem("vaadin.developmentmode.force");
|
|
9989
|
+
}
|
|
9990
|
+
|
|
9991
|
+
function isLocalhost() {
|
|
9992
|
+
return (["localhost","127.0.0.1"].indexOf(window.location.hostname) >= 0);
|
|
9993
|
+
}
|
|
9994
|
+
|
|
9995
|
+
function isFlowProductionMode() {
|
|
9996
|
+
if (FlowClients) {
|
|
9997
|
+
const productionModeApps = Object.keys(FlowClients)
|
|
9998
|
+
.map(key => FlowClients[key])
|
|
9999
|
+
.filter(client => client.productionMode);
|
|
10000
|
+
if (productionModeApps.length > 0) {
|
|
10001
|
+
return true;
|
|
10002
|
+
}
|
|
10003
|
+
}
|
|
10004
|
+
return false;
|
|
10005
|
+
}
|
|
10006
|
+
|
|
10007
|
+
function uncommentAndRun(callback, args) {
|
|
10008
|
+
if (typeof callback !== 'function') {
|
|
10009
|
+
return;
|
|
10010
|
+
}
|
|
10011
|
+
|
|
10012
|
+
const match = DEV_MODE_CODE_REGEXP.exec(callback.toString());
|
|
10013
|
+
if (match) {
|
|
10014
|
+
try {
|
|
10015
|
+
// requires CSP: script-src 'unsafe-eval'
|
|
10016
|
+
callback = new Function(match[1]);
|
|
10017
|
+
} catch (e) {
|
|
10018
|
+
// eat the exception
|
|
10019
|
+
console.log('vaadin-development-mode-detector: uncommentAndRun() failed', e);
|
|
10020
|
+
}
|
|
10021
|
+
}
|
|
10022
|
+
|
|
10023
|
+
return callback(args);
|
|
10024
|
+
}
|
|
9038
10025
|
|
|
9039
|
-
return callback(args);
|
|
9040
|
-
}
|
|
9041
|
-
|
|
9042
10026
|
// A guard against polymer-modulizer removing the window.Vaadin
|
|
9043
10027
|
// initialization above.
|
|
9044
10028
|
window['Vaadin'] = window['Vaadin'] || {};
|
|
@@ -9910,7 +10894,7 @@ const registered = new Set();
|
|
|
9910
10894
|
const ElementMixin = (superClass) =>
|
|
9911
10895
|
class VaadinElementMixin extends DirMixin(superClass) {
|
|
9912
10896
|
static get version() {
|
|
9913
|
-
return '24.2.
|
|
10897
|
+
return '24.2.9';
|
|
9914
10898
|
}
|
|
9915
10899
|
|
|
9916
10900
|
/** @protected */
|
|
@@ -11689,6 +12673,8 @@ const KeyboardMixin = dedupingMixin(
|
|
|
11689
12673
|
* by the pointer or by releasing the activation key.
|
|
11690
12674
|
*
|
|
11691
12675
|
* @polymerMixin
|
|
12676
|
+
* @mixes DisabledMixin
|
|
12677
|
+
* @mixes KeyboardMixin
|
|
11692
12678
|
*/
|
|
11693
12679
|
const ActiveMixin = (superclass) =>
|
|
11694
12680
|
class ActiveMixinClass extends DisabledMixin(KeyboardMixin(superclass)) {
|
|
@@ -12758,7 +13744,7 @@ const fontIcons = i$1`
|
|
|
12758
13744
|
}
|
|
12759
13745
|
`;
|
|
12760
13746
|
|
|
12761
|
-
addLumoGlobalStyles('font-icons', fontIcons);
|
|
13747
|
+
addLumoGlobalStyles$1('font-icons', fontIcons);
|
|
12762
13748
|
|
|
12763
13749
|
/**
|
|
12764
13750
|
* @license
|
|
@@ -14079,6 +15065,14 @@ const OverlayMixin = (superClass) =>
|
|
|
14079
15065
|
// and <vaadin-context-menu>).
|
|
14080
15066
|
this.addEventListener('click', () => {});
|
|
14081
15067
|
this.$.backdrop.addEventListener('click', () => {});
|
|
15068
|
+
|
|
15069
|
+
this.addEventListener('mouseup', () => {
|
|
15070
|
+
// In Chrome, focus moves to body on overlay content mousedown
|
|
15071
|
+
// See https://github.com/vaadin/flow-components/issues/5507
|
|
15072
|
+
if (document.activeElement === document.body && this.$.overlay.getAttribute('tabindex') === '0') {
|
|
15073
|
+
this.$.overlay.focus();
|
|
15074
|
+
}
|
|
15075
|
+
});
|
|
14082
15076
|
}
|
|
14083
15077
|
|
|
14084
15078
|
/** @protected */
|
|
@@ -17187,7 +18181,7 @@ class DomRepeat extends domRepeatBase {
|
|
|
17187
18181
|
if (prop == this.as) {
|
|
17188
18182
|
this.items[idx] = value;
|
|
17189
18183
|
}
|
|
17190
|
-
let path = translate$
|
|
18184
|
+
let path = translate$5(this.as, `${JSCompiler_renameProperty('items', this)}.${idx}`, prop);
|
|
17191
18185
|
this.notifyPath(path, value);
|
|
17192
18186
|
}
|
|
17193
18187
|
}
|
|
@@ -23374,444 +24368,1779 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
|
|
|
23374
24368
|
if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
|
|
23375
24369
|
e.preventDefault();
|
|
23376
24370
|
}
|
|
23377
|
-
}
|
|
23378
|
-
|
|
23379
|
-
/** @private */
|
|
23380
|
-
_toggle(e) {
|
|
23381
|
-
e.stopPropagation();
|
|
23382
|
-
if (this.$.overlay.opened) {
|
|
23383
|
-
this.close();
|
|
23384
|
-
} else {
|
|
23385
|
-
this.open();
|
|
24371
|
+
}
|
|
24372
|
+
|
|
24373
|
+
/** @private */
|
|
24374
|
+
_toggle(e) {
|
|
24375
|
+
e.stopPropagation();
|
|
24376
|
+
if (this.$.overlay.opened) {
|
|
24377
|
+
this.close();
|
|
24378
|
+
} else {
|
|
24379
|
+
this.open();
|
|
24380
|
+
}
|
|
24381
|
+
}
|
|
24382
|
+
|
|
24383
|
+
// Workaround https://github.com/vaadin/web-components/issues/2855
|
|
24384
|
+
/** @protected */
|
|
24385
|
+
_openedChanged(opened) {
|
|
24386
|
+
super._openedChanged(opened);
|
|
24387
|
+
|
|
24388
|
+
this.$.overlay.positionTarget = this.shadowRoot.querySelector('[part="input-field"]');
|
|
24389
|
+
this.$.overlay.noVerticalOverlap = true;
|
|
24390
|
+
}
|
|
24391
|
+
}
|
|
24392
|
+
|
|
24393
|
+
defineCustomElement(DatePicker);
|
|
24394
|
+
|
|
24395
|
+
const helperFiltersCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}";
|
|
24396
|
+
const HelperFiltersStyle0 = helperFiltersCss;
|
|
24397
|
+
|
|
24398
|
+
const HelperFilters = class {
|
|
24399
|
+
constructor(hostRef) {
|
|
24400
|
+
index.registerInstance(this, hostRef);
|
|
24401
|
+
this.filterDraw = index.createEvent(this, "filterDraw", 7);
|
|
24402
|
+
this.filterSelection = index.createEvent(this, "filterSelection", 7);
|
|
24403
|
+
this.filterSelectionReset = index.createEvent(this, "filterSelectionReset", 7);
|
|
24404
|
+
this.setClientStyling = () => {
|
|
24405
|
+
let sheet = document.createElement('style');
|
|
24406
|
+
sheet.innerHTML = this.clientStyling;
|
|
24407
|
+
this.stylingContainer.prepend(sheet);
|
|
24408
|
+
};
|
|
24409
|
+
this.setClientStylingURL = () => {
|
|
24410
|
+
let cssFile = document.createElement('style');
|
|
24411
|
+
setTimeout(() => {
|
|
24412
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24413
|
+
this.stylingContainer.prepend(cssFile);
|
|
24414
|
+
}, 1);
|
|
24415
|
+
};
|
|
24416
|
+
this.showFilterId = true;
|
|
24417
|
+
this.activateTicketSearch = false;
|
|
24418
|
+
this.gameId = '';
|
|
24419
|
+
this.playerId = '';
|
|
24420
|
+
this.session = '';
|
|
24421
|
+
this.postMessage = false;
|
|
24422
|
+
this.language = 'en';
|
|
24423
|
+
this.quickFiltersActive = false;
|
|
24424
|
+
this.clientStyling = '';
|
|
24425
|
+
this.clientStylingUrlContent = '';
|
|
24426
|
+
this.showFilterModal = false;
|
|
24427
|
+
this.showClearButton = false;
|
|
24428
|
+
this.filterData = {};
|
|
24429
|
+
this.filterDataReset = { ticketDrawId: '', filterFromCalendar: '', filterToCalendar: '' };
|
|
24430
|
+
this.limitStylingAppends = false;
|
|
24431
|
+
}
|
|
24432
|
+
// reset field values each time the filter modal opens
|
|
24433
|
+
componentDidRender() {
|
|
24434
|
+
// @TODO: to way binding?
|
|
24435
|
+
if (document.getElementById('#FilterById'))
|
|
24436
|
+
document.getElementById('#FilterById').value = '';
|
|
24437
|
+
// start custom styling area
|
|
24438
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
24439
|
+
if (this.clientStyling)
|
|
24440
|
+
this.setClientStyling();
|
|
24441
|
+
if (this.clientStylingUrlContent)
|
|
24442
|
+
this.setClientStylingURL();
|
|
24443
|
+
this.limitStylingAppends = true;
|
|
24444
|
+
}
|
|
24445
|
+
// end custom styling area
|
|
24446
|
+
}
|
|
24447
|
+
filterSelectionHandler(event) {
|
|
24448
|
+
if (this.postMessage)
|
|
24449
|
+
window.postMessage({ type: 'filterSelection', event }, window.location.href);
|
|
24450
|
+
if (this.filterData.ticketDrawId || this.filterData.filterFromCalendar || this.filterData.filterToCalendar)
|
|
24451
|
+
this.filterSelection.emit(event);
|
|
24452
|
+
}
|
|
24453
|
+
filterSelectionResetHandler(event) {
|
|
24454
|
+
if (this.postMessage)
|
|
24455
|
+
window.postMessage({ type: 'filterSelectionReset', event }, window.location.href);
|
|
24456
|
+
this.filterSelectionReset.emit(event);
|
|
24457
|
+
}
|
|
24458
|
+
modalCloseEvent() {
|
|
24459
|
+
this.showFilterModal = false;
|
|
24460
|
+
}
|
|
24461
|
+
// Toggle filter modal
|
|
24462
|
+
toggleFilterModal() {
|
|
24463
|
+
this.showFilterModal = true;
|
|
24464
|
+
}
|
|
24465
|
+
// Filter search
|
|
24466
|
+
filterSearch() {
|
|
24467
|
+
this.modalCloseEvent();
|
|
24468
|
+
this.showClearButton = true;
|
|
24469
|
+
this.filterSelectionHandler(this.filterData);
|
|
24470
|
+
console.log(this.showClearButton);
|
|
24471
|
+
}
|
|
24472
|
+
resetSearch() {
|
|
24473
|
+
this.showClearButton = false;
|
|
24474
|
+
this.filterSelectionResetHandler(this.filterDataReset);
|
|
24475
|
+
this.filterData = {};
|
|
24476
|
+
}
|
|
24477
|
+
handleTicketDrawId(event) {
|
|
24478
|
+
this.filterData.ticketDrawId = event.target.value;
|
|
24479
|
+
}
|
|
24480
|
+
handleFilterFrom(event) {
|
|
24481
|
+
this.filterData.filterFromCalendar = new Date(event.target.value).toISOString();
|
|
24482
|
+
}
|
|
24483
|
+
handleFilterTo(event) {
|
|
24484
|
+
this.filterData.filterToCalendar = new Date(event.target.value).toISOString();
|
|
24485
|
+
}
|
|
24486
|
+
render() {
|
|
24487
|
+
return (index.h("div", { key: 'd74774bd58fa3df6b0038fd979fb4aec4262d43d', class: "HelperFilters", ref: el => this.stylingContainer = el }, index.h("div", { key: '0827128924ba350888ae81e67e0306e536b15047', class: "FilterButtonsWrapper" }, index.h("button", { key: '73ae5aff5896195cd895410caf44dccfa1ac5cfc', class: "FilterOpen", onClick: () => this.toggleFilterModal() }, translate$6('filterOpen', this.language)), console.log('in filter Open', this.showClearButton, this.quickFiltersActive), (this.showClearButton || this.quickFiltersActive) ?
|
|
24488
|
+
index.h("button", { class: "FilterClear", onClick: () => this.resetSearch() }, translate$6('filterClear', this.language))
|
|
24489
|
+
:
|
|
24490
|
+
null), index.h("helper-modal", { key: 'add83df2714fdb69e8dfa7a0f5d1eb0d526fc2b4', "title-modal": "Filter Modal", visible: this.showFilterModal, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { key: '861b04161876b557184fe49c514867788147e4b9', class: "FilterModalHeader" }, index.h("h3", { key: '7471430912f301ff995c401b08298d9006816216', class: "FilterModalTitle" }, this.activateTicketSearch ? translate$6('filterModalTicketTitle', this.language) : translate$6('filterModalDrawTitle', this.language))), index.h("div", { key: 'af6bd8e253f332c8724e1bb40100ba5e1e59838f', class: "FilterModalBody" }, index.h("input", { key: '9edc7e14b801d40d4861625264f82b2fa213a770', id: "FilterById", type: "text", value: this.filterData.ticketDrawId, onInput: (event) => this.handleTicketDrawId(event), class: "FilterModalSearch", placeholder: this.activateTicketSearch ? translate$6('filterTicketPlaceholder', this.language) : translate$6('filterDrawPlaceholder', this.language) }), index.h("p", { key: '9665b359f9d6da19f120eb9bb315c4b144c80ced' }, translate$6('filterOrDate', this.language)), index.h("div", { key: 'd155c7d73a719aaedc581f51aa97cf21ec3125df', class: "FilterCalendarWrapper" }, index.h("vaadin-date-picker", { key: '586fb38bc5c718a4afa06ebec96bec0fd46949eb', value: this.filterData.filterFromCalendar, onChange: (event) => this.handleFilterFrom(event), placeholder: translate$6('filterFromCalendar', this.language), class: "VaadinDatePicker" }), index.h("vaadin-date-picker", { key: '42e8965b2c740c19c53687c114faf6aa22f11de8', value: this.filterData.filterToCalendar, onChange: (event) => this.handleFilterTo(event), placeholder: translate$6('filterToCalendar', this.language), class: "VaadinDatePicker" }))), index.h("div", { key: '7529eef1b25d130d183a55e45862418444054d3c', class: "FilterModalFooter" }, index.h("button", { key: '7dac7dc7b01c1c66dde7c6670a352f597b3f75fc', class: "FilterModalButton", onClick: () => this.filterSearch() }, translate$6('filterModalButton', this.language))))));
|
|
24491
|
+
}
|
|
24492
|
+
};
|
|
24493
|
+
HelperFilters.style = HelperFiltersStyle0;
|
|
24494
|
+
|
|
24495
|
+
/**
|
|
24496
|
+
* @name isMobile
|
|
24497
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
24498
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
24499
|
+
* @returns {Boolean} true or false
|
|
24500
|
+
*/
|
|
24501
|
+
const isMobile$1 = (userAgent) => {
|
|
24502
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
24503
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
24504
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
24505
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
24506
|
+
};
|
|
24507
|
+
|
|
24508
|
+
const helperModalCss = ":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";
|
|
24509
|
+
const HelperModalStyle0 = helperModalCss;
|
|
24510
|
+
|
|
24511
|
+
const HelperModal = class {
|
|
24512
|
+
constructor(hostRef) {
|
|
24513
|
+
index.registerInstance(this, hostRef);
|
|
24514
|
+
this.cancel = index.createEvent(this, "modalCloseEvent", 7);
|
|
24515
|
+
this.userAgent = window.navigator.userAgent;
|
|
24516
|
+
this.setClientStyling = () => {
|
|
24517
|
+
let sheet = document.createElement('style');
|
|
24518
|
+
sheet.innerHTML = this.clientStyling;
|
|
24519
|
+
this.stylingContainer.prepend(sheet);
|
|
24520
|
+
};
|
|
24521
|
+
this.setClientStylingURL = () => {
|
|
24522
|
+
let cssFile = document.createElement('style');
|
|
24523
|
+
setTimeout(() => {
|
|
24524
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24525
|
+
this.stylingContainer.prepend(cssFile);
|
|
24526
|
+
}, 1);
|
|
24527
|
+
};
|
|
24528
|
+
this.titleModal = undefined;
|
|
24529
|
+
this.visible = true;
|
|
24530
|
+
this.clientStyling = '';
|
|
24531
|
+
this.clientStylingUrlContent = '';
|
|
24532
|
+
this.limitStylingAppends = false;
|
|
24533
|
+
}
|
|
24534
|
+
handleHelperModalClose() {
|
|
24535
|
+
this.visible = false;
|
|
24536
|
+
this.cancel.emit();
|
|
24537
|
+
}
|
|
24538
|
+
;
|
|
24539
|
+
componentDidRender() {
|
|
24540
|
+
// start custom styling area
|
|
24541
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
24542
|
+
if (this.clientStyling)
|
|
24543
|
+
this.setClientStyling();
|
|
24544
|
+
if (this.clientStylingUrlContent)
|
|
24545
|
+
this.setClientStylingURL();
|
|
24546
|
+
this.limitStylingAppends = true;
|
|
24547
|
+
}
|
|
24548
|
+
// end custom styling area
|
|
24549
|
+
}
|
|
24550
|
+
render() {
|
|
24551
|
+
return ((this.visible &&
|
|
24552
|
+
index.h("div", { key: 'ba2aed789565b37bfdbb34bdf3ccace827231653', class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper", ref: el => this.stylingContainer = el }, index.h("div", { key: '151ca4cd80d259ac955b92b10bf6f0df2698a937', class: "HelperModalWrapper HelperModalVisible" }, index.h("div", { key: '804cb1dea73321c4935e4a8ddb1136e98e89a070', class: "HelperModalContent" + (isMobile$1(this.userAgent) ? ' HelperModalMobileContent' : '') }, index.h("span", { key: '30cf7928c1e4baa53f3514fc1930823db76c874c', class: "HelperModalClose" + (isMobile$1(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), index.h("slot", { key: '5c1323a98cdcd09669020a00affe5673856e807e' }))))));
|
|
24553
|
+
}
|
|
24554
|
+
};
|
|
24555
|
+
HelperModal.style = HelperModalStyle0;
|
|
24556
|
+
|
|
24557
|
+
const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
|
|
24558
|
+
const HelperTabStyle0 = helperTabCss;
|
|
24559
|
+
|
|
24560
|
+
const HelperTab = class {
|
|
24561
|
+
constructor(hostRef) {
|
|
24562
|
+
index.registerInstance(this, hostRef);
|
|
24563
|
+
this.setClientStyling = () => {
|
|
24564
|
+
let sheet = document.createElement('style');
|
|
24565
|
+
sheet.innerHTML = this.clientStyling;
|
|
24566
|
+
this.stylingContainer.prepend(sheet);
|
|
24567
|
+
};
|
|
24568
|
+
this.setClientStylingURL = () => {
|
|
24569
|
+
let cssFile = document.createElement('style');
|
|
24570
|
+
setTimeout(() => {
|
|
24571
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24572
|
+
this.stylingContainer.prepend(cssFile);
|
|
24573
|
+
}, 1);
|
|
24574
|
+
};
|
|
24575
|
+
this.selectedIndex = 0;
|
|
24576
|
+
this.cmsEndpoint = undefined;
|
|
24577
|
+
this.clientStyling = '';
|
|
24578
|
+
this.clientStylingUrlContent = '';
|
|
24579
|
+
this.tabContent = '';
|
|
24580
|
+
this.limitStylingAppends = false;
|
|
24581
|
+
}
|
|
24582
|
+
connectedCallback() {
|
|
24583
|
+
/**
|
|
24584
|
+
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
24585
|
+
*/
|
|
24586
|
+
}
|
|
24587
|
+
componentDidRender() {
|
|
24588
|
+
// start custom styling area
|
|
24589
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
24590
|
+
if (this.clientStyling)
|
|
24591
|
+
this.setClientStyling();
|
|
24592
|
+
if (this.clientStylingUrlContent)
|
|
24593
|
+
this.setClientStylingURL();
|
|
24594
|
+
this.limitStylingAppends = true;
|
|
24595
|
+
}
|
|
24596
|
+
// end custom styling area
|
|
24597
|
+
}
|
|
24598
|
+
render() {
|
|
24599
|
+
this.tabContent = index.h("div", { key: 'd69c61827b4fb6d934c72b0b2d37d72fca307575', 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.");
|
|
24600
|
+
if (this.selectedIndex + 1 == 2) {
|
|
24601
|
+
this.tabContent = index.h("div", { key: 'ab912cbb3bc3e88ecf8fe5f8f0e7eb16460100bd', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", { key: '17bed41dffe7d5578452ee13a47b442d10366ce2' }, index.h("li", { key: 'cf0da42f07cf92f5cea9c9f504c8836e528a5708' }, "Register or Login"), index.h("li", { key: '4a0339df365c6b1a37b8a74c5022a56197e870db' }, "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", { key: '3f29a9b17c1059493648247868b83eb71241b8bd' }, "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!")));
|
|
24602
|
+
}
|
|
24603
|
+
else if (this.selectedIndex + 1 == 3) {
|
|
24604
|
+
this.tabContent = index.h("div", { key: 'ceac54698e0e5c55a049600f02e8f413a76a1c33', class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", { key: '426d89c86a1d44f6d515bc1a7902e43317127939' }, index.h("li", { key: '457a225564399001dcab48097578174a27231ca7' }, "What are my odds of winning?"), index.h("li", { key: 'd35220f2aca215eff391cab54d719f18ef906c77' }, "How can I find out if I\u2019ve won a draw game?"), index.h("li", { key: 'fcd560ee4b6740c319cf0f98a0b98da8fd9e14a4' }, "How do I claim my prize?")));
|
|
24605
|
+
}
|
|
24606
|
+
return (this.tabContent);
|
|
24607
|
+
}
|
|
24608
|
+
};
|
|
24609
|
+
HelperTab.style = HelperTabStyle0;
|
|
24610
|
+
|
|
24611
|
+
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}";
|
|
24612
|
+
const HelperTabsStyle0 = helperTabsCss;
|
|
24613
|
+
|
|
24614
|
+
const HelperTabs = class {
|
|
24615
|
+
constructor(hostRef) {
|
|
24616
|
+
index.registerInstance(this, hostRef);
|
|
24617
|
+
this.setClientStyling = () => {
|
|
24618
|
+
let sheet = document.createElement('style');
|
|
24619
|
+
sheet.innerHTML = this.clientStyling;
|
|
24620
|
+
this.stylingContainer.prepend(sheet);
|
|
24621
|
+
};
|
|
24622
|
+
this.setClientStylingURL = () => {
|
|
24623
|
+
let cssFile = document.createElement('style');
|
|
24624
|
+
setTimeout(() => {
|
|
24625
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24626
|
+
this.stylingContainer.prepend(cssFile);
|
|
24627
|
+
}, 1);
|
|
24628
|
+
};
|
|
24629
|
+
this.disabled = false;
|
|
24630
|
+
this.label = undefined;
|
|
24631
|
+
this.selected = false;
|
|
24632
|
+
this.cmsEndpoint = undefined;
|
|
24633
|
+
this.selectedIndex = 0;
|
|
24634
|
+
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
24635
|
+
this.clientStyling = '';
|
|
24636
|
+
this.clientStylingurl = '';
|
|
24637
|
+
this.clientStylingUrlContent = '';
|
|
24638
|
+
this.limitStylingAppends = false;
|
|
24639
|
+
}
|
|
24640
|
+
connectedCallback() {
|
|
24641
|
+
}
|
|
24642
|
+
componentDidRender() {
|
|
24643
|
+
// start custom styling area
|
|
24644
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
24645
|
+
this.setClientStyling();
|
|
24646
|
+
if (this.clientStylingUrlContent) {
|
|
24647
|
+
this.setClientStylingURL();
|
|
24648
|
+
}
|
|
24649
|
+
this.limitStylingAppends = true;
|
|
24650
|
+
}
|
|
24651
|
+
// end custom styling area
|
|
24652
|
+
}
|
|
24653
|
+
render() {
|
|
24654
|
+
return (index.h("div", { key: '841b2a4b84f2ecdaf692b9cab2eac4b3413186e7', ref: el => this.stylingContainer = el }, index.h("div", { key: '4c5d57e669f9f45d204bff8a85ca89a0574c4627', 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", { key: '7ba983dec3b0355f390b19191d0d823914f09037' }, index.h("helper-tab", { key: 'e6c7739d50948582d8d14d530828508b4cb90d6e', selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
|
|
24655
|
+
}
|
|
24656
|
+
get host() { return index.getElement(this); }
|
|
24657
|
+
};
|
|
24658
|
+
HelperTabs.style = HelperTabsStyle0;
|
|
24659
|
+
|
|
24660
|
+
const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(241, 241, 241) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}";
|
|
24661
|
+
const LotteryBulletStyle0 = lotteryBulletCss;
|
|
24662
|
+
|
|
24663
|
+
const LotteryBullet = class {
|
|
24664
|
+
constructor(hostRef) {
|
|
24665
|
+
index.registerInstance(this, hostRef);
|
|
24666
|
+
this.bulletEvent = index.createEvent(this, "lotteryBulletSelection", 7);
|
|
24667
|
+
this.select = () => {
|
|
24668
|
+
if (this.selectable) {
|
|
24669
|
+
this.isSelected = !this.isSelected;
|
|
24670
|
+
this.bulletEvent.emit({
|
|
24671
|
+
value: this.value,
|
|
24672
|
+
selected: this.isSelected
|
|
24673
|
+
});
|
|
24674
|
+
}
|
|
24675
|
+
};
|
|
24676
|
+
this.setClientStyling = () => {
|
|
24677
|
+
let sheet = document.createElement('style');
|
|
24678
|
+
sheet.innerHTML = this.clientStyling;
|
|
24679
|
+
this.stylingContainer.prepend(sheet);
|
|
24680
|
+
};
|
|
24681
|
+
this.setClientStylingURL = () => {
|
|
24682
|
+
let cssFile = document.createElement('style');
|
|
24683
|
+
setTimeout(() => {
|
|
24684
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24685
|
+
this.stylingContainer.prepend(cssFile);
|
|
24686
|
+
}, 1);
|
|
24687
|
+
};
|
|
24688
|
+
this.value = '0';
|
|
24689
|
+
this.selectable = true;
|
|
24690
|
+
this.isSelected = false;
|
|
24691
|
+
this.clientStyling = '';
|
|
24692
|
+
this.clientStylingUrlContent = '';
|
|
24693
|
+
this.limitStylingAppends = false;
|
|
24694
|
+
}
|
|
24695
|
+
componentDidRender() {
|
|
24696
|
+
// start custom styling area
|
|
24697
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
24698
|
+
if (this.clientStyling)
|
|
24699
|
+
this.setClientStyling();
|
|
24700
|
+
if (this.clientStylingUrlContent)
|
|
24701
|
+
this.setClientStylingURL();
|
|
24702
|
+
this.limitStylingAppends = true;
|
|
24703
|
+
}
|
|
24704
|
+
// end custom styling area
|
|
24705
|
+
}
|
|
24706
|
+
render() {
|
|
24707
|
+
return (index.h("div", { key: 'af3601684ecf1f39d65fc9461430cba96b9e4b8c', class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));
|
|
24708
|
+
}
|
|
24709
|
+
};
|
|
24710
|
+
LotteryBullet.style = LotteryBulletStyle0;
|
|
24711
|
+
|
|
24712
|
+
const DEFAULT_LANGUAGE$4 = 'en';
|
|
24713
|
+
const SUPPORTED_LANGUAGES$4 = ['ro', 'en', 'hr'];
|
|
24714
|
+
const TRANSLATIONS$4 = {
|
|
24715
|
+
en: {
|
|
24716
|
+
drawResultsHeader: 'Last draw results',
|
|
24717
|
+
drawId: 'Draw ID',
|
|
24718
|
+
drawName: 'Game name',
|
|
24719
|
+
drawDate: 'Draw Date',
|
|
24720
|
+
drawNumbersGridDraw: 'Draw numbers Grid ',
|
|
24721
|
+
drawNumbersGridTicket: 'Draw numbers Grid ',
|
|
24722
|
+
ticketResult: 'Ticket result',
|
|
24723
|
+
amountWon: 'Amount won',
|
|
24724
|
+
numberOfDraws: 'Number of draws',
|
|
24725
|
+
multiplier: 'Multiplier:',
|
|
24726
|
+
ticketPurchaseDate: 'Ticket Purchase Date',
|
|
24727
|
+
ticketStatus: 'Ticket Status',
|
|
24728
|
+
ticketId: 'Ticket ID',
|
|
24729
|
+
ticketAmount: 'Ticket Amount',
|
|
24730
|
+
winUpTo: 'Win up to',
|
|
24731
|
+
},
|
|
24732
|
+
ro: {
|
|
24733
|
+
drawResultsHeader: 'Ultimele rezultate extragere',
|
|
24734
|
+
drawId: 'Id extragere',
|
|
24735
|
+
drawName: 'Numele jocului',
|
|
24736
|
+
drawDate: 'Data extragerii',
|
|
24737
|
+
drawNumbersGridDraw: 'Numerele extrase Grid',
|
|
24738
|
+
drawNumbersGridTicket: 'Numerele extrase Grid',
|
|
24739
|
+
ticketResult: 'Rezultatul biletului',
|
|
24740
|
+
amountWon: 'Suma castigata',
|
|
24741
|
+
numberOfDraws: 'Numarul de extrageri',
|
|
24742
|
+
multiplier: 'Multiplicator:',
|
|
24743
|
+
ticketPurchaseDate: 'Data achizitionarii biletului',
|
|
24744
|
+
ticketStatus: 'Statusul biletului',
|
|
24745
|
+
ticketId: 'Id biletul',
|
|
24746
|
+
ticketAmount: 'Valoarea biletului',
|
|
24747
|
+
winUpTo: 'Poti castiga'
|
|
24748
|
+
},
|
|
24749
|
+
fr: {
|
|
24750
|
+
drawResultsHeader: 'Résultats du dernier tirage',
|
|
24751
|
+
drawId: 'ID de tirage',
|
|
24752
|
+
drawName: 'Nom du jeu',
|
|
24753
|
+
drawDate: 'Date du tirage',
|
|
24754
|
+
drawNumbersGridDraw: 'Tirage des numéros Grille',
|
|
24755
|
+
drawNumbersGridTicket: 'Tirage des numéros Grille',
|
|
24756
|
+
ticketResult: 'Résultat du ticket',
|
|
24757
|
+
amountWon: 'Montant gagné',
|
|
24758
|
+
numberOfDraws: 'Nombre de tirages',
|
|
24759
|
+
multiplier: 'Multiplicateur',
|
|
24760
|
+
ticketPurchaseDate: 'Date d\'achat du billet',
|
|
24761
|
+
ticketStatus: 'Statut du ticket',
|
|
24762
|
+
ticketId: 'ID de billets',
|
|
24763
|
+
ticketAmount: 'Montant du billet',
|
|
24764
|
+
winUpTo: 'Gagnez jusqu\'à'
|
|
24765
|
+
},
|
|
24766
|
+
ar: {
|
|
24767
|
+
drawResultsHeader: 'نتائج آخر سحب',
|
|
24768
|
+
drawId: 'معرّف السحب',
|
|
24769
|
+
drawName: 'اسم اللعبة',
|
|
24770
|
+
drawDate: 'تاريخ السحب',
|
|
24771
|
+
drawNumbersGridDraw: 'شبكة أرقام السحب',
|
|
24772
|
+
drawNumbersGridTicket: 'شبكة أرقام السحب',
|
|
24773
|
+
ticketResult: 'نتيجة التذكرة',
|
|
24774
|
+
amountWon: 'المبلغ الذي تم ربحه',
|
|
24775
|
+
numberOfDraws: 'عدد السحوبات',
|
|
24776
|
+
multiplier: 'مضاعف',
|
|
24777
|
+
ticketPurchaseDate: 'تاريخ شراء التذكرة',
|
|
24778
|
+
ticketStatus: 'حالة التذكرة',
|
|
24779
|
+
ticketId: 'معرّف التذكرة',
|
|
24780
|
+
ticketAmount: 'مبلغ التذكرة',
|
|
24781
|
+
winUpTo: 'ربح يصل إلى'
|
|
24782
|
+
},
|
|
24783
|
+
hr: {
|
|
24784
|
+
drawResultsHeader: 'Rezultati posljednjeg izvlačenja',
|
|
24785
|
+
drawId: 'ID izvlačenja',
|
|
24786
|
+
drawName: 'Naziv igre',
|
|
24787
|
+
drawDate: 'Datum izvlačenja',
|
|
24788
|
+
drawNumbersGridDraw: 'Tablica izvučenih brojeva',
|
|
24789
|
+
drawNumbersGridTicket: 'Tablica izvučenih brojeva',
|
|
24790
|
+
ticketResult: 'Rezultat listića',
|
|
24791
|
+
amountWon: 'Osvojeni iznos',
|
|
24792
|
+
numberOfDraws: 'Broj izvlačenja',
|
|
24793
|
+
multiplier: 'Multiplikator',
|
|
24794
|
+
ticketPurchaseDate: 'Datum uplate listića',
|
|
24795
|
+
ticketStatus: 'Status listića',
|
|
24796
|
+
ticketId: 'ID listića',
|
|
24797
|
+
ticketAmount: 'Iznos listića',
|
|
24798
|
+
winUpTo: 'Osvoji do'
|
|
24799
|
+
},
|
|
24800
|
+
};
|
|
24801
|
+
const translate$4 = (key, customLang) => {
|
|
24802
|
+
const lang = customLang;
|
|
24803
|
+
return TRANSLATIONS$4[lang !== undefined && SUPPORTED_LANGUAGES$4.includes(lang) ? lang : DEFAULT_LANGUAGE$4][key];
|
|
24804
|
+
};
|
|
24805
|
+
|
|
24806
|
+
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{display:flex;flex-direction:column;gap:5px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.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;border:1px solid #ccc;border-radius:5px;background-color:white}.ExpandableBox{border-bottom:1px solid #ccc;transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;text-transform:uppercase;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:#009993}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:\"\";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:#009993}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:#009993;transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:300px}";
|
|
24807
|
+
const LotteryDrawResultsStyle0 = lotteryDrawResultsCss;
|
|
24808
|
+
|
|
24809
|
+
const LotteryDrawResults = class {
|
|
24810
|
+
constructor(hostRef) {
|
|
24811
|
+
index.registerInstance(this, hostRef);
|
|
24812
|
+
this.ticketDrawDetails = [];
|
|
24813
|
+
this.ticketDrawDetailsFlag = true;
|
|
24814
|
+
this.setClientStyling = () => {
|
|
24815
|
+
let sheet = document.createElement('style');
|
|
24816
|
+
sheet.innerHTML = this.clientStyling;
|
|
24817
|
+
this.stylingContainer.prepend(sheet);
|
|
24818
|
+
};
|
|
24819
|
+
this.setClientStylingURL = () => {
|
|
24820
|
+
let cssFile = document.createElement('style');
|
|
24821
|
+
setTimeout(() => {
|
|
24822
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24823
|
+
this.stylingContainer.prepend(cssFile);
|
|
24824
|
+
}, 1);
|
|
24825
|
+
};
|
|
24826
|
+
this.endpoint = undefined;
|
|
24827
|
+
this.gameId = undefined;
|
|
24828
|
+
this.language = 'en';
|
|
24829
|
+
this.playerId = undefined;
|
|
24830
|
+
this.drawMode = false;
|
|
24831
|
+
this.drawId = '';
|
|
24832
|
+
this.gameName = '';
|
|
24833
|
+
this.ticketDate = '';
|
|
24834
|
+
this.ticketStatus = '';
|
|
24835
|
+
this.ticketId = '';
|
|
24836
|
+
this.ticketAmount = '';
|
|
24837
|
+
this.ticketMultiplier = false;
|
|
24838
|
+
this.ticketDrawCount = 0;
|
|
24839
|
+
this.ticketNumbers = '';
|
|
24840
|
+
this.sessionId = '';
|
|
24841
|
+
this.clientStyling = '';
|
|
24842
|
+
this.clientStylingUrlContent = '';
|
|
24843
|
+
this.ticketDrawData = '';
|
|
24844
|
+
this.multiplier = 3;
|
|
24845
|
+
this.isLoading = true;
|
|
24846
|
+
this.hasErrors = false;
|
|
24847
|
+
this.errorText = '';
|
|
24848
|
+
this.ticketData = [];
|
|
24849
|
+
this.ticketDataLoaded = false;
|
|
24850
|
+
this.ticketDraws = [];
|
|
24851
|
+
this.toggleDrawer = [false];
|
|
24852
|
+
this.limitStylingAppends = false;
|
|
24853
|
+
this.drawData = undefined;
|
|
24854
|
+
}
|
|
24855
|
+
connectedCallback() {
|
|
24856
|
+
let promises = [];
|
|
24857
|
+
// Split ticket numbers for each grid
|
|
24858
|
+
if (this.ticketNumbers) {
|
|
24859
|
+
this.gridNumbers = JSON.parse(this.ticketNumbers);
|
|
24860
|
+
}
|
|
24861
|
+
if (this.drawId) {
|
|
24862
|
+
promises.push(this.getDrawData());
|
|
24863
|
+
}
|
|
24864
|
+
Promise.all(promises)
|
|
24865
|
+
.then(() => {
|
|
24866
|
+
this.isLoading = false;
|
|
24867
|
+
}).catch((err) => {
|
|
24868
|
+
console.log('error ', err);
|
|
24869
|
+
this.isLoading = false;
|
|
24870
|
+
});
|
|
24871
|
+
}
|
|
24872
|
+
componentWillRender() {
|
|
24873
|
+
if (this.ticketDrawData && this.ticketDrawDetailsFlag) {
|
|
24874
|
+
this.ticketDrawDetails = JSON.parse(this.ticketDrawData);
|
|
24875
|
+
this.ticketDrawDetails.forEach((drawDetail) => {
|
|
24876
|
+
this.getDrawData(drawDetail.drawId).then((drawData) => drawDetail.drawData = drawData);
|
|
24877
|
+
});
|
|
24878
|
+
this.ticketDrawDetailsFlag = false;
|
|
24879
|
+
}
|
|
24880
|
+
}
|
|
24881
|
+
componentDidRender() {
|
|
24882
|
+
// start custom styling area
|
|
24883
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
24884
|
+
if (this.clientStyling)
|
|
24885
|
+
this.setClientStyling();
|
|
24886
|
+
if (this.clientStylingUrlContent)
|
|
24887
|
+
this.setClientStylingURL();
|
|
24888
|
+
this.limitStylingAppends = true;
|
|
24889
|
+
}
|
|
24890
|
+
// end custom styling area
|
|
24891
|
+
}
|
|
24892
|
+
getDrawData(drawId) {
|
|
24893
|
+
this.isLoading = true;
|
|
24894
|
+
return new Promise((resolve, reject) => {
|
|
24895
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawId ? drawId : this.drawId}`);
|
|
24896
|
+
fetch(url.href)
|
|
24897
|
+
.then((response) => {
|
|
24898
|
+
// @TODO EXCEPTIONS
|
|
24899
|
+
return response.json();
|
|
24900
|
+
})
|
|
24901
|
+
.then((data) => {
|
|
24902
|
+
if (drawId) {
|
|
24903
|
+
resolve(data);
|
|
24904
|
+
}
|
|
24905
|
+
else {
|
|
24906
|
+
this.drawData = data;
|
|
24907
|
+
resolve(true);
|
|
24908
|
+
}
|
|
24909
|
+
this.isLoading = false;
|
|
24910
|
+
})
|
|
24911
|
+
.catch((err) => {
|
|
24912
|
+
reject(err);
|
|
24913
|
+
this.isLoading = false;
|
|
24914
|
+
});
|
|
24915
|
+
});
|
|
24916
|
+
}
|
|
24917
|
+
drawerToggle(index) {
|
|
24918
|
+
this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
|
|
24919
|
+
if (itemIndex == index) {
|
|
24920
|
+
return !item;
|
|
24921
|
+
}
|
|
24922
|
+
return item;
|
|
24923
|
+
});
|
|
24924
|
+
if (index >= this.toggleDrawer.length) {
|
|
24925
|
+
this.toggleDrawer.push(true);
|
|
24926
|
+
}
|
|
24927
|
+
}
|
|
24928
|
+
render() {
|
|
24929
|
+
if (this.isLoading) {
|
|
24930
|
+
return (index.h("p", null, "Loading, please wait ..."));
|
|
24931
|
+
}
|
|
24932
|
+
else if (this.hasErrors) {
|
|
24933
|
+
index.h("p", null, this.errorText);
|
|
24934
|
+
}
|
|
24935
|
+
else {
|
|
24936
|
+
return (index.h("section", { class: "DrawResultsSection", ref: el => this.stylingContainer = el }, this.drawMode ?
|
|
24937
|
+
index.h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
24938
|
+
index.h("div", null, index.h("div", { class: "DrawResultsHeader" }, index.h("span", null, translate$4('drawId', this.language), ": ", this.drawData.id), index.h("span", null, translate$4('drawDate', this.language), ": ", this.drawData.date.slice(0, 10))), index.h("div", { class: "DrawResultsBody" }, index.h("div", { class: "DrawNumbersGrid" }, index.h("p", null, translate$4('drawNumbersGridDraw', this.language), "0:"), index.h("div", { class: "BulletContainer" }, index.h("lottery-grid", { "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$4('multiplier', this.language), " ", this.multiplier))))))
|
|
24939
|
+
:
|
|
24940
|
+
index.h("div", { class: "DrawResultsArea TicketDraws" }, index.h("div", { class: "DrawResultsBody" }, index.h("div", { class: "TicketIdContainer" }, index.h("label", { class: "Label" }, translate$4('ticketId', this.language), ": ", index.h("span", null, this.ticketId))), index.h("div", { class: "TicketAmountContainer" }, index.h("label", { class: "Label" }, translate$4('ticketAmount', this.language), " ", index.h("span", null, this.ticketAmount))), index.h("div", { class: "DrawNumbersGrid" }, this.gridNumbers.map((grid, index$1) => index.h("div", null, index.h("label", { class: "Label" }, translate$4('drawNumbersGridTicket', this.language), " ", String.fromCharCode(index$1 + 65), ":"), index.h("div", { class: "BulletContainer" }, index.h("lottery-grid", { "selected-numbers": grid.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$4('multiplier', this.language), " ", JSON.stringify(this.ticketMultiplier))), index.h("div", { class: "NumberOfDrawsContainer" }, index.h("label", { class: "Label" }, translate$4('numberOfDraws', this.language), ": ", this.ticketDrawCount), index.h("div", { class: "DrawTicketsContainer" }, this.ticketDrawDetails && this.ticketDrawDetails.length > 0 &&
|
|
24941
|
+
index.h("div", { class: "ExpandableBoxes" }, this.ticketDrawDetails.map((drawDetail, index$1) => {
|
|
24942
|
+
var _a, _b, _c, _d, _e;
|
|
24943
|
+
return index.h("div", { class: { 'ExpandableBox': true, 'ShowBox': this.toggleDrawer[index$1] }, onClick: () => this.drawerToggle(index$1) }, index.h("div", { class: "ExpandableBoxHeader" }, index.h("div", { class: "TicketResultContainer" }, index.h("p", null, translate$4('ticketResult', this.language), ": ", drawDetail.state)), drawDetail.state == 'won' &&
|
|
24944
|
+
index.h("div", { class: "AmountWonContainer" }, index.h("p", null, translate$4('amountWon', this.language), ": ", Number(drawDetail.amount).toLocaleString('en'), " ", drawDetail.currency)), drawDetail.state == 'lost' &&
|
|
24945
|
+
index.h("div", { class: "DrawIdContainer" }, index.h("p", null, translate$4('drawId', this.language), ": ", drawDetail.drawId))), index.h("div", { class: "ExpandableBoxBody" }, index.h("div", { class: "DrawIdContainer" }, index.h("p", null, translate$4('drawId', this.language), ": ", drawDetail.drawId)), index.h("div", { class: "DrawDateContainer" }, index.h("p", null, translate$4('drawDate', this.language), ": ", (_a = drawDetail.drawData) === null || _a === void 0 ? void 0 :
|
|
24946
|
+
_a.date.slice(0, 10), " | ", (_b = drawDetail.drawData) === null || _b === void 0 ? void 0 :
|
|
24947
|
+
_b.date.slice(11, 19))), index.h("div", { class: "DrawNumbersGrid" }, drawDetail.drawData &&
|
|
24948
|
+
index.h("div", { class: 'BulletContainer' }, index.h("label", { class: "Label" }, translate$4('drawNumbersGridDraw', this.language), " ", String.fromCharCode(index$1 + 10), ":"), index.h("lottery-grid", { "selected-numbers": (_d = (_c = drawDetail.drawData) === null || _c === void 0 ? void 0 : _c.winningNumbers) === null || _d === void 0 ? void 0 : _d.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$4('multiplier', this.language), " ", (_e = drawDetail.drawData) === null || _e === void 0 ? void 0 :
|
|
24949
|
+
_e.multiplier))));
|
|
24950
|
+
}))))))));
|
|
24951
|
+
}
|
|
24952
|
+
}
|
|
24953
|
+
};
|
|
24954
|
+
LotteryDrawResults.style = LotteryDrawResultsStyle0;
|
|
24955
|
+
|
|
24956
|
+
const DEFAULT_LANGUAGE$3 = 'en';
|
|
24957
|
+
const SUPPORTED_LANGUAGES$3 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
24958
|
+
const TRANSLATIONS$3 = {
|
|
24959
|
+
en: {
|
|
24960
|
+
drawResultsHeader: 'Draw results history',
|
|
24961
|
+
drawId: 'Draw ID',
|
|
24962
|
+
drawDate: 'Draw Date',
|
|
24963
|
+
drawNumbersGridA: 'Draw numbers Grid A',
|
|
24964
|
+
viewAllResults: 'View All',
|
|
24965
|
+
lastFiveDraws: 'Last 5 Draws',
|
|
24966
|
+
lastTenDraws: 'Last 10 Draws',
|
|
24967
|
+
lastFifteenDraws: 'Last 15 Draws',
|
|
24968
|
+
allDrawResultsHistory: 'All Draw Results History',
|
|
24969
|
+
noResults: 'No results',
|
|
24970
|
+
fetchingResults: 'Fetching results'
|
|
24971
|
+
},
|
|
24972
|
+
ro: {
|
|
24973
|
+
drawResultsHeader: 'Istoricul extragerilor',
|
|
24974
|
+
drawId: 'ID-ul extragerii',
|
|
24975
|
+
drawDate: 'Data extragerii',
|
|
24976
|
+
drawNumbersGridA: 'Numerele extrase Grid A',
|
|
24977
|
+
viewAllResults: 'Vezi toate rezultatele',
|
|
24978
|
+
lastFiveDraws: 'Ultimile 5 extrageri',
|
|
24979
|
+
lastTenDraws: 'Ultimile 10 extrageri',
|
|
24980
|
+
lastFifteenDraws: 'Ultimile 15 extrageri',
|
|
24981
|
+
allDrawResultsHistory: 'Istoricul tuturor extragerilor',
|
|
24982
|
+
noResults: 'Niciun rezultat',
|
|
24983
|
+
fetchingResults: 'Se obtin rezultatele'
|
|
24984
|
+
},
|
|
24985
|
+
fr: {
|
|
24986
|
+
drawResultsHeader: 'Dessiner l\'historique des résultats',
|
|
24987
|
+
drawId: 'ID de tirage',
|
|
24988
|
+
drawDate: 'Date du tirage',
|
|
24989
|
+
drawNumbersGridA: 'Tirage des numéros Grille',
|
|
24990
|
+
viewAllResults: 'Voir tout',
|
|
24991
|
+
lastFiveDraws: '5 derniers tirages',
|
|
24992
|
+
lastTenDraws: '10 derniers tirages',
|
|
24993
|
+
lastFifteenDraws: '15 derniers tirages',
|
|
24994
|
+
allDrawResultsHistory: 'Historique des résultats de tous les tirages',
|
|
24995
|
+
noResults: 'Aucun résultat',
|
|
24996
|
+
fetchingResults: 'Récupération des résultats'
|
|
24997
|
+
},
|
|
24998
|
+
ar: {
|
|
24999
|
+
drawResultsHeader: 'سجل نتائج السحب',
|
|
25000
|
+
drawId: 'معرّف السحب',
|
|
25001
|
+
drawDate: 'تاريخ السحب',
|
|
25002
|
+
drawNumbersGridA: 'شبكة أرقام السحب',
|
|
25003
|
+
viewAllResults: 'عرض الكل',
|
|
25004
|
+
lastFiveDraws: 'آخر 5 سحوبات',
|
|
25005
|
+
lastTenDraws: 'آخر 10 سحوبات',
|
|
25006
|
+
lastFifteenDraws: 'آخر 15 سحبًا',
|
|
25007
|
+
allDrawResultsHistory: 'سجل نتائج كل السحوبات',
|
|
25008
|
+
noResults: 'لا توجد نتائج',
|
|
25009
|
+
fetchingResults: 'جلب النتائج'
|
|
25010
|
+
},
|
|
25011
|
+
hr: {
|
|
25012
|
+
drawResultsHeader: 'Povijest rezultata izvlačenja',
|
|
25013
|
+
drawId: 'ID izvlačenja',
|
|
25014
|
+
drawDate: 'Datum izvlačenja',
|
|
25015
|
+
drawNumbersGridA: 'Izvučeni brojevi tablica A',
|
|
25016
|
+
viewAllResults: 'Pogledaj sve',
|
|
25017
|
+
lastFiveDraws: 'Zadnjih 5 izvlačenja',
|
|
25018
|
+
lastTenDraws: 'Zadnjih 10 izvlačenja',
|
|
25019
|
+
lastFifteenDraws: 'Zadnjih 15 izvlačenja',
|
|
25020
|
+
allDrawResultsHistory: 'Povijest svih rezultata izvlačenja',
|
|
25021
|
+
noResults: 'Nema rezultata',
|
|
25022
|
+
fetchingResults: 'Dohvaćanje rezultata'
|
|
25023
|
+
},
|
|
25024
|
+
};
|
|
25025
|
+
const translate$3 = (key, customLang) => {
|
|
25026
|
+
const lang = customLang;
|
|
25027
|
+
return TRANSLATIONS$3[lang !== undefined && SUPPORTED_LANGUAGES$3.includes(lang) ? lang : DEFAULT_LANGUAGE$3][key];
|
|
25028
|
+
};
|
|
25029
|
+
|
|
25030
|
+
const lotteryDrawResultsHistoryCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}";
|
|
25031
|
+
const LotteryDrawResultsHistoryStyle0 = lotteryDrawResultsHistoryCss;
|
|
25032
|
+
|
|
25033
|
+
const LotteryDrawResultsHistory = class {
|
|
25034
|
+
constructor(hostRef) {
|
|
25035
|
+
index.registerInstance(this, hostRef);
|
|
25036
|
+
this.getDrawsData = () => {
|
|
25037
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
|
|
25038
|
+
if (this.dateFiltersFrom)
|
|
25039
|
+
url.searchParams.append('from', this.dateFiltersFrom);
|
|
25040
|
+
if (this.dateFiltersTo)
|
|
25041
|
+
url.searchParams.append('to', this.dateFiltersTo);
|
|
25042
|
+
fetch(url.href)
|
|
25043
|
+
.then((res) => {
|
|
25044
|
+
if (res.status >= 300) {
|
|
25045
|
+
throw new Error('There was an error while fetching the data');
|
|
25046
|
+
}
|
|
25047
|
+
return res.json();
|
|
25048
|
+
})
|
|
25049
|
+
.then((data) => {
|
|
25050
|
+
this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);
|
|
25051
|
+
this.drawData = this.winningDataSetsData.map((item) => item);
|
|
25052
|
+
})
|
|
25053
|
+
.catch((err) => {
|
|
25054
|
+
console.log('err', err);
|
|
25055
|
+
})
|
|
25056
|
+
.finally(() => {
|
|
25057
|
+
this.isLoading = false;
|
|
25058
|
+
this.noResults = this.drawData.filter(draw => draw.winningNumbers).length == 0 ? true : false;
|
|
25059
|
+
});
|
|
25060
|
+
};
|
|
25061
|
+
this.filterResults = (resultsNumber) => {
|
|
25062
|
+
this.numberOfResults = resultsNumber;
|
|
25063
|
+
this.displayAllDrawsResults = true;
|
|
25064
|
+
};
|
|
25065
|
+
this.getDrawResults = (drawID) => {
|
|
25066
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID}`);
|
|
25067
|
+
let drawOptions = {
|
|
25068
|
+
method: "GET",
|
|
25069
|
+
headers: {
|
|
25070
|
+
'Content-Type': "application/json",
|
|
25071
|
+
'Accept': 'application/json',
|
|
25072
|
+
},
|
|
25073
|
+
};
|
|
25074
|
+
fetch(url.href, drawOptions)
|
|
25075
|
+
.then((response) => {
|
|
25076
|
+
if (response.status == 404)
|
|
25077
|
+
this.noResults = true;
|
|
25078
|
+
return response.json();
|
|
25079
|
+
})
|
|
25080
|
+
.then((data) => {
|
|
25081
|
+
this.drawData = [data].map((item) => item);
|
|
25082
|
+
})
|
|
25083
|
+
.catch((err) => {
|
|
25084
|
+
console.log('err', err);
|
|
25085
|
+
})
|
|
25086
|
+
.finally(() => {
|
|
25087
|
+
this.isLoading = false;
|
|
25088
|
+
});
|
|
25089
|
+
};
|
|
25090
|
+
this.viewAllResults = () => {
|
|
25091
|
+
this.numberOfResults = this.drawData.length;
|
|
25092
|
+
this.displayAllDrawsResults = false;
|
|
25093
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
25094
|
+
};
|
|
25095
|
+
this.setClientStyling = () => {
|
|
25096
|
+
let sheet = document.createElement('style');
|
|
25097
|
+
sheet.innerHTML = this.clientStyling;
|
|
25098
|
+
this.stylingContainer.prepend(sheet);
|
|
25099
|
+
};
|
|
25100
|
+
this.setClientStylingURL = () => {
|
|
25101
|
+
let cssFile = document.createElement('style');
|
|
25102
|
+
setTimeout(() => {
|
|
25103
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
25104
|
+
this.stylingContainer.prepend(cssFile);
|
|
25105
|
+
}, 1);
|
|
25106
|
+
};
|
|
25107
|
+
this.endpoint = undefined;
|
|
25108
|
+
this.gameId = undefined;
|
|
25109
|
+
this.numberOfResults = 3;
|
|
25110
|
+
this.language = 'en';
|
|
25111
|
+
this.clientStyling = '';
|
|
25112
|
+
this.clientStylingUrlContent = '';
|
|
25113
|
+
this.drawData = [];
|
|
25114
|
+
this.winningDataSetsData = [''];
|
|
25115
|
+
this.displayAllDrawsResults = true;
|
|
25116
|
+
this.showQuickFilters = true;
|
|
25117
|
+
this.dateFiltersFrom = '';
|
|
25118
|
+
this.dateFiltersTo = '';
|
|
25119
|
+
this.isLoading = false;
|
|
25120
|
+
this.noResults = false;
|
|
25121
|
+
this.limitStylingAppends = false;
|
|
25122
|
+
}
|
|
25123
|
+
// Filters events
|
|
25124
|
+
// @Listen('filterDraw')
|
|
25125
|
+
// filtersDrawHandler(event: CustomEvent<any>):void {
|
|
25126
|
+
// this.isLoading = true;
|
|
25127
|
+
// this.showQuickFilters = false;
|
|
25128
|
+
// }
|
|
25129
|
+
filtersHandler(event) {
|
|
25130
|
+
this.showQuickFilters = false;
|
|
25131
|
+
this.isLoading = true;
|
|
25132
|
+
if (event.detail.ticketDrawId) {
|
|
25133
|
+
this.getDrawResults(event.detail.ticketDrawId);
|
|
25134
|
+
}
|
|
25135
|
+
else {
|
|
25136
|
+
this.dateFiltersFrom = event.detail.filterFromCalendar;
|
|
25137
|
+
this.dateFiltersTo = event.detail.filterToCalendar;
|
|
25138
|
+
this.getDrawsData();
|
|
25139
|
+
}
|
|
25140
|
+
}
|
|
25141
|
+
clearFiltersHandler() {
|
|
25142
|
+
this.showQuickFilters = true;
|
|
25143
|
+
this.dateFiltersFrom = '';
|
|
25144
|
+
this.dateFiltersTo = '';
|
|
25145
|
+
this.drawData = this.winningDataSetsData;
|
|
25146
|
+
this.isLoading = true;
|
|
25147
|
+
this.getDrawsData();
|
|
25148
|
+
}
|
|
25149
|
+
connectedCallback() {
|
|
25150
|
+
if (this.showQuickFilters)
|
|
25151
|
+
this.getDrawsData();
|
|
25152
|
+
}
|
|
25153
|
+
disconnectedCallback() {
|
|
25154
|
+
clearInterval(this.interval);
|
|
25155
|
+
}
|
|
25156
|
+
componentDidRender() {
|
|
25157
|
+
// start custom styling area
|
|
25158
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
25159
|
+
if (this.clientStyling)
|
|
25160
|
+
this.setClientStyling();
|
|
25161
|
+
if (this.clientStylingUrlContent)
|
|
25162
|
+
this.setClientStylingURL();
|
|
25163
|
+
this.limitStylingAppends = true;
|
|
25164
|
+
}
|
|
25165
|
+
// end custom styling area
|
|
25166
|
+
}
|
|
25167
|
+
render() {
|
|
25168
|
+
let gridHeader = index.h("div", { key: '1583b694983132e116397e73c9552c95897c0353', class: "DrawResultsHeader" }, this.displayAllDrawsResults ? index.h("h4", null, translate$3('drawResultsHeader', this.language)) :
|
|
25169
|
+
[index.h("div", { class: "DrawResultsHeaderContent" }, index.h("h4", null, translate$3('allDrawResultsHistory', this.language)), index.h("div", { class: "FilterSection" }, this.showQuickFilters &&
|
|
25170
|
+
index.h("div", { class: "FilterResultsContainer" }, index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(5) }, translate$3('lastFiveDraws', this.language)), index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(10) }, translate$3('lastTenDraws', this.language)), index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(15) }, translate$3('lastFifteenDraws', this.language))), index.h("helper-filters", { "show-filter-id": "true", "activate-ticket-search": "false", "game-id": this.gameId, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))),
|
|
25171
|
+
]);
|
|
25172
|
+
return index.h("section", { key: '4dc417fefb4d2ce1be3eaf7853a2d564ef554c38', class: "GridWrapper", ref: el => this.stylingContainer = el }, index.h("div", { key: '18c68785d3fa790b8e7e923dd986afa2ffc60a54', class: "DrawResultsSection" }, index.h("div", { key: '639d8f0c70aee9bb7d70b5bf6e7ee183aafb3c32', class: "DrawResultsAreaHistory" }, gridHeader, index.h("div", { key: '4e43f9d5acdbfceff15a84a51bd4c26f013f6781', class: "HistoryGridWrapper" }, index.h("div", { key: '344b9d8c9bbf87dde621eadec387c484b457671a', class: "HistoryGrid" }, this.isLoading &&
|
|
25173
|
+
index.h("p", { key: '5c0950a3c07c0e868861fd53a8a919168acca345' }, translate$3('fetchingResults', this.language)), !this.isLoading && !this.noResults && this.drawData.map((item) => index.h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, "draw-id": item.id, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })).reverse().slice(0, this.numberOfResults), !this.isLoading && this.noResults && (index.h("p", { key: '9b9fccfe879e3b6f3663f1778c4f04dd8779a5c1' }, translate$3('noResults', this.language))))), this.displayAllDrawsResults && index.h("button", { key: '3af21758d6aad9c255d164c6ced7aebfc990fd0d', class: "ViewAllResults", onClick: this.viewAllResults }, translate$3('viewAllResults', this.language)))));
|
|
23386
25174
|
}
|
|
23387
|
-
|
|
23388
|
-
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
25175
|
+
};
|
|
25176
|
+
LotteryDrawResultsHistory.style = LotteryDrawResultsHistoryStyle0;
|
|
25177
|
+
|
|
25178
|
+
const lotteryGameDetailsCss = ":host{display:block}";
|
|
25179
|
+
const LotteryGameDetailsStyle0 = lotteryGameDetailsCss;
|
|
25180
|
+
|
|
25181
|
+
const LotteryGameDetails = class {
|
|
25182
|
+
constructor(hostRef) {
|
|
25183
|
+
index.registerInstance(this, hostRef);
|
|
25184
|
+
this.setClientStyling = () => {
|
|
25185
|
+
let sheet = document.createElement('style');
|
|
25186
|
+
sheet.innerHTML = this.clientStyling;
|
|
25187
|
+
this.stylingContainer.prepend(sheet);
|
|
25188
|
+
};
|
|
25189
|
+
this.setClientStylingURL = () => {
|
|
25190
|
+
let cssFile = document.createElement('style');
|
|
25191
|
+
setTimeout(() => {
|
|
25192
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
25193
|
+
this.stylingContainer.prepend(cssFile);
|
|
25194
|
+
}, 1);
|
|
25195
|
+
};
|
|
25196
|
+
this.clientStyling = '';
|
|
25197
|
+
this.clientStylingUrlContent = '';
|
|
25198
|
+
this.limitStylingAppends = false;
|
|
25199
|
+
}
|
|
25200
|
+
componentDidRender() {
|
|
25201
|
+
// start custom styling area
|
|
25202
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
25203
|
+
if (this.clientStyling)
|
|
25204
|
+
this.setClientStyling();
|
|
25205
|
+
if (this.clientStylingUrlContent)
|
|
25206
|
+
this.setClientStylingURL();
|
|
25207
|
+
this.limitStylingAppends = true;
|
|
25208
|
+
}
|
|
25209
|
+
// end custom styling area
|
|
25210
|
+
}
|
|
25211
|
+
render() {
|
|
25212
|
+
return (index.h("div", { key: 'a972ed1a25317b0cdeb82e3b007ec79e30bbb871', class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { key: '2c6f8d634241c412103cdae78909972c884b0515', "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { key: 'f5f80e173d935cb0dabb6a7ef45e54a1312b5dc8', class: "AccordionContainer", slot: "accordionContent" }, index.h("helper-tabs", { key: 'a91396e0a4aa1235cc618dfe336ae8b603bc2a6c', "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
25213
|
+
}
|
|
25214
|
+
};
|
|
25215
|
+
LotteryGameDetails.style = LotteryGameDetailsStyle0;
|
|
25216
|
+
|
|
25217
|
+
const DEFAULT_LANGUAGE$2 = 'en';
|
|
25218
|
+
const SUPPORTED_LANGUAGES$2 = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
25219
|
+
const TRANSLATIONS$2 = {
|
|
25220
|
+
en: {
|
|
25221
|
+
error: 'Error',
|
|
25222
|
+
title: 'Chrono',
|
|
25223
|
+
backButton: 'Back',
|
|
25224
|
+
lobbyButton: 'Lobby',
|
|
25225
|
+
prize: 'Prize',
|
|
25226
|
+
winUpTo: 'Win up to',
|
|
25227
|
+
nextDraw: 'Next draw in: ',
|
|
25228
|
+
buy: 'Buy tickets',
|
|
25229
|
+
viewLatest: 'View latest results',
|
|
25230
|
+
createTicket: 'Create Ticket',
|
|
25231
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
25232
|
+
deleteTicketModalTitle: 'Delete Ticket',
|
|
25233
|
+
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
25234
|
+
deleteTicketModalCancel: 'Cancel',
|
|
25235
|
+
deleteTicketModalConfirm: 'Delete',
|
|
25236
|
+
orderSummaryTitle: 'Order Summary',
|
|
25237
|
+
orderSummaryTickets: 'Ticket',
|
|
25238
|
+
orderSummaryTotal: 'Total',
|
|
25239
|
+
orderSummarySubmit: 'Submit',
|
|
25240
|
+
lastDrawResultsTitle: 'Last Draw Results',
|
|
25241
|
+
modalLogin: 'Please login to submit a ticket',
|
|
25242
|
+
},
|
|
25243
|
+
ro: {
|
|
25244
|
+
error: 'Eroare',
|
|
25245
|
+
title: 'Loto 6/49',
|
|
25246
|
+
backButton: 'Inapoi',
|
|
25247
|
+
lobbyButton: 'Lobby',
|
|
25248
|
+
prize: 'MARELE JACKPOT OMG',
|
|
25249
|
+
winUpTo: 'Castiga pana la',
|
|
25250
|
+
nextDraw: 'Urmatoarea extragere:',
|
|
25251
|
+
buy: 'Cumpara bilet',
|
|
25252
|
+
viewLatest: 'Ultimile extrageri',
|
|
25253
|
+
createTicket: 'Creeaza bilet',
|
|
25254
|
+
modalSuccess: 'Achizitie efectuata cu succes',
|
|
25255
|
+
deleteTicketModalTitle: 'Sterge biletul',
|
|
25256
|
+
deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',
|
|
25257
|
+
deleteTicketModalCancel: 'Anuleaza',
|
|
25258
|
+
deleteTicketModalConfirm: 'Sterge',
|
|
25259
|
+
orderSummaryTitle: 'Rezumat comanda',
|
|
25260
|
+
orderSummaryTickets: 'Bilet',
|
|
25261
|
+
orderSummaryTotal: 'Total',
|
|
25262
|
+
orderSummarySubmit: 'Trimite',
|
|
25263
|
+
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
25264
|
+
modalLogin: 'Please login to submit a ticket',
|
|
25265
|
+
},
|
|
25266
|
+
fr: {
|
|
25267
|
+
error: 'Error',
|
|
25268
|
+
title: 'Chrono',
|
|
25269
|
+
backButton: 'Back',
|
|
25270
|
+
lobbyButton: 'Lobby',
|
|
25271
|
+
prize: 'Prize',
|
|
25272
|
+
winUpTo: 'Win up to',
|
|
25273
|
+
nextDraw: 'Next draw in: ',
|
|
25274
|
+
buy: 'Buy tickets',
|
|
25275
|
+
viewLatest: 'View latest results',
|
|
25276
|
+
createTicket: 'Create Ticket',
|
|
25277
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
25278
|
+
deleteTicketModalTitle: 'Delete Ticket',
|
|
25279
|
+
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
25280
|
+
deleteTicketModalCancel: 'Cancel',
|
|
25281
|
+
deleteTicketModalConfirm: 'Delete',
|
|
25282
|
+
orderSummaryTitle: 'Order Summary',
|
|
25283
|
+
orderSummaryTickets: 'Ticket',
|
|
25284
|
+
orderSummaryTotal: 'Total',
|
|
25285
|
+
orderSummarySubmit: 'Submit',
|
|
25286
|
+
lastDrawResultsTitle: 'Résultats du dernier tirage',
|
|
25287
|
+
modalLogin: 'Please login to submit a ticket',
|
|
25288
|
+
},
|
|
25289
|
+
ar: {
|
|
25290
|
+
error: 'خطأ',
|
|
25291
|
+
title: 'كرونو',
|
|
25292
|
+
backButton: 'خلف',
|
|
25293
|
+
lobbyButton: 'ردهة',
|
|
25294
|
+
prize: 'جائزة',
|
|
25295
|
+
winUpTo: 'الفوز بما يصل الى',
|
|
25296
|
+
nextDraw: 'السحب التالي:',
|
|
25297
|
+
buy: 'اشتري تذاكر',
|
|
25298
|
+
viewLatest: 'عرض أحدث النتائج',
|
|
25299
|
+
createTicket: 'إنشاء تذكرة',
|
|
25300
|
+
modalSuccess: '!سيتم الشراء بنجاح قريبًا',
|
|
25301
|
+
deleteTicketModalTitle: 'حذف التذكرة',
|
|
25302
|
+
deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',
|
|
25303
|
+
deleteTicketModalCancel: 'يلغي',
|
|
25304
|
+
deleteTicketModalConfirm: 'حذف',
|
|
25305
|
+
orderSummaryTitle: 'ملخص الطلب',
|
|
25306
|
+
orderSummaryTickets: 'تذكرة',
|
|
25307
|
+
orderSummaryTotal: 'المجموع',
|
|
25308
|
+
orderSummarySubmit: 'يُقدِّم',
|
|
25309
|
+
lastDrawResultsTitle: 'نتائج آخر سحب',
|
|
25310
|
+
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
25311
|
+
},
|
|
25312
|
+
hr: {
|
|
25313
|
+
error: 'Greška',
|
|
25314
|
+
title: 'Krono',
|
|
25315
|
+
backButton: 'Nazad',
|
|
25316
|
+
lobbyButton: 'Lobby',
|
|
25317
|
+
prize: 'Nagrada',
|
|
25318
|
+
winUpTo: 'Osvoji do',
|
|
25319
|
+
nextDraw: 'Sljedeće izvlačenje za: ',
|
|
25320
|
+
buy: 'Uplati listić',
|
|
25321
|
+
viewLatest: 'Pogledajte najnovije rezultate',
|
|
25322
|
+
createTicket: 'Uplati listić',
|
|
25323
|
+
modalSuccess: 'Kupnja uspješno obavljena!',
|
|
25324
|
+
deleteTicketModalTitle: 'Izbriši listić',
|
|
25325
|
+
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
25326
|
+
deleteTicketModalCancel: 'Otkaži',
|
|
25327
|
+
deleteTicketModalConfirm: 'Izbriši',
|
|
25328
|
+
orderSummaryTitle: 'Sažetak narudžbe',
|
|
25329
|
+
orderSummaryTickets: 'Listić',
|
|
25330
|
+
orderSummaryTotal: 'Ukupno',
|
|
25331
|
+
orderSummarySubmit: 'Podnijeti',
|
|
25332
|
+
lastDrawResultsTitle: 'Rezultati posljednjeg izvlačenja',
|
|
25333
|
+
modalLogin: 'Molimo prijavite se da uplatite listić',
|
|
25334
|
+
}
|
|
25335
|
+
};
|
|
25336
|
+
const translate$2 = (key, customLang) => {
|
|
25337
|
+
const lang = customLang;
|
|
25338
|
+
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
25339
|
+
};
|
|
23393
25340
|
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
}
|
|
25341
|
+
/**
|
|
25342
|
+
* @name isMobile
|
|
25343
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
25344
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
25345
|
+
* @returns {Boolean} true or false
|
|
25346
|
+
*/
|
|
25347
|
+
const isMobile = (userAgent) => {
|
|
25348
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
25349
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
25350
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
25351
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
25352
|
+
};
|
|
23398
25353
|
|
|
23399
|
-
|
|
25354
|
+
const lotteryGamePageCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, rgb(241, 241, 241) 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double #D4D4D4;color:#D4D4D4;width:100%}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}";
|
|
25355
|
+
const LotteryGamePageStyle0 = lotteryGamePageCss;
|
|
25356
|
+
|
|
25357
|
+
const LotteryGamePage = class {
|
|
25358
|
+
constructor(hostRef) {
|
|
25359
|
+
index.registerInstance(this, hostRef);
|
|
25360
|
+
this.goBackEvent = index.createEvent(this, "goBackEvent", 7);
|
|
25361
|
+
this.goToLobbyEvent = index.createEvent(this, "goToLobbyEvent", 7);
|
|
25362
|
+
// @TODO fix any type
|
|
25363
|
+
this.userAgent = window.navigator.userAgent;
|
|
25364
|
+
this.multiplier = false;
|
|
25365
|
+
this.quickPick = false;
|
|
25366
|
+
this.isMobile = isMobile(this.userAgent);
|
|
25367
|
+
this.setClientStyling = () => {
|
|
25368
|
+
let sheet = document.createElement('style');
|
|
25369
|
+
sheet.innerHTML = this.clientStyling;
|
|
25370
|
+
this.stylingContainer.prepend(sheet);
|
|
25371
|
+
};
|
|
25372
|
+
this.setClientStylingURL = () => {
|
|
25373
|
+
let url = new URL(this.clientStylingurl);
|
|
25374
|
+
let cssFile = document.createElement('style');
|
|
25375
|
+
fetch(url.href)
|
|
25376
|
+
.then((res) => res.text())
|
|
25377
|
+
.then((data) => {
|
|
25378
|
+
this.clientStylingUrlContent = data;
|
|
25379
|
+
cssFile.innerHTML = data;
|
|
25380
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
25381
|
+
})
|
|
25382
|
+
.catch((err) => {
|
|
25383
|
+
console.log('error ', err);
|
|
25384
|
+
});
|
|
25385
|
+
};
|
|
25386
|
+
this.endpoint = undefined;
|
|
25387
|
+
this.gameId = undefined;
|
|
25388
|
+
this.playerId = undefined;
|
|
25389
|
+
this.sessionId = undefined;
|
|
25390
|
+
this.language = 'en';
|
|
25391
|
+
this.backgroundUrl = undefined;
|
|
25392
|
+
this.autoPick = false;
|
|
25393
|
+
this.resetButton = false;
|
|
25394
|
+
this.clientStyling = '';
|
|
25395
|
+
this.clientStylingurl = '';
|
|
25396
|
+
this.clientStylingUrlContent = '';
|
|
25397
|
+
this.tickets = [];
|
|
25398
|
+
this.tabIndex = 0;
|
|
25399
|
+
this.hasErrors = false;
|
|
25400
|
+
this.totalAmount = 0;
|
|
25401
|
+
this.successVisible = false;
|
|
25402
|
+
this.deleteVisible = false;
|
|
25403
|
+
this.deleteEventData = undefined;
|
|
25404
|
+
this.daysRemaining = undefined;
|
|
25405
|
+
this.hoursRemaining = undefined;
|
|
25406
|
+
this.minutesRemaining = undefined;
|
|
25407
|
+
this.secondsRemaining = undefined;
|
|
25408
|
+
this.latestDraw = {};
|
|
25409
|
+
this.totalWinningsAmount = 0;
|
|
25410
|
+
this.nextDate = undefined;
|
|
25411
|
+
this.isLoggedIn = false;
|
|
25412
|
+
this.loginModalVisible = false;
|
|
25413
|
+
this.limitStylingAppends = false;
|
|
25414
|
+
}
|
|
25415
|
+
// @TODO fix `any` type later, I'm lazy now
|
|
25416
|
+
connectedCallback() {
|
|
25417
|
+
this.getGameDetails();
|
|
25418
|
+
this.getDraws();
|
|
25419
|
+
if (this.sessionId) {
|
|
25420
|
+
this.isLoggedIn = true;
|
|
25421
|
+
}
|
|
25422
|
+
}
|
|
25423
|
+
componentDidRender() {
|
|
25424
|
+
// start custom styling area
|
|
25425
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
25426
|
+
if (this.clientStyling)
|
|
25427
|
+
this.setClientStyling();
|
|
25428
|
+
if (this.clientStylingurl)
|
|
25429
|
+
this.setClientStylingURL();
|
|
25430
|
+
this.limitStylingAppends = true;
|
|
25431
|
+
}
|
|
25432
|
+
// end custom styling area
|
|
25433
|
+
}
|
|
25434
|
+
countdownLogic(date) {
|
|
25435
|
+
this.interval = setInterval(() => {
|
|
25436
|
+
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
25437
|
+
this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
|
|
25438
|
+
this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
|
|
25439
|
+
this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
|
|
25440
|
+
}, 1000);
|
|
25441
|
+
}
|
|
25442
|
+
disconnectedCallback() {
|
|
25443
|
+
clearInterval(this.interval);
|
|
25444
|
+
}
|
|
25445
|
+
getGameDetails() {
|
|
25446
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
25447
|
+
fetch(url.href)
|
|
25448
|
+
.then((res) => {
|
|
25449
|
+
if (res.status >= 300) {
|
|
25450
|
+
this.hasErrors = true;
|
|
25451
|
+
throw new Error('There was an error while fetching the data');
|
|
25452
|
+
}
|
|
25453
|
+
return res.json();
|
|
25454
|
+
})
|
|
25455
|
+
.then((data) => {
|
|
25456
|
+
this.gameData = data;
|
|
25457
|
+
this.basicStake = this.gameData.type.stakes[0].amount;
|
|
25458
|
+
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
25459
|
+
draws.length > 0 && (this.nextDraw = draws[0].id);
|
|
25460
|
+
this.createNewTicket();
|
|
25461
|
+
})
|
|
25462
|
+
.catch((err) => {
|
|
25463
|
+
this.hasErrors = true;
|
|
25464
|
+
console.log('Error', err);
|
|
25465
|
+
});
|
|
25466
|
+
}
|
|
25467
|
+
calculateTotalAmount() {
|
|
25468
|
+
const { currency } = this.gameData.type.stakes[0];
|
|
25469
|
+
this.totalAmount = 0;
|
|
25470
|
+
this.tickets.forEach((item) => {
|
|
25471
|
+
if (item.completed) {
|
|
25472
|
+
this.totalAmount += item.amount * item.stake;
|
|
25473
|
+
}
|
|
25474
|
+
});
|
|
25475
|
+
this.currency = currency;
|
|
25476
|
+
}
|
|
25477
|
+
// @TODO CustomEvent type
|
|
25478
|
+
gridFilledHandler(event) {
|
|
25479
|
+
// @TODO item ts
|
|
25480
|
+
this.tickets = this.tickets.map((item) => {
|
|
25481
|
+
if (item.ticketId == event.detail.id) {
|
|
25482
|
+
let arr = item.selectedNumbers || [];
|
|
25483
|
+
arr[event.detail.index] = event.detail.selectedNumbers.map((item) => parseInt(item, 10));
|
|
25484
|
+
return {
|
|
25485
|
+
gameId: item.gameId,
|
|
25486
|
+
ticketId: item.ticketId,
|
|
25487
|
+
completed: true,
|
|
25488
|
+
amount: event.detail.draws,
|
|
25489
|
+
stake: item.stake,
|
|
25490
|
+
selectedNumbers: arr
|
|
25491
|
+
};
|
|
25492
|
+
}
|
|
25493
|
+
return item;
|
|
25494
|
+
});
|
|
25495
|
+
this.calculateTotalAmount();
|
|
25496
|
+
}
|
|
25497
|
+
// @TODO fix any type
|
|
25498
|
+
gridDirtyHandler(event) {
|
|
25499
|
+
// @TODO item ts
|
|
25500
|
+
this.tickets = this.tickets.map((item) => {
|
|
25501
|
+
if (item.gameId == event.detail.id) {
|
|
25502
|
+
return {
|
|
25503
|
+
gameId: item.gameId,
|
|
25504
|
+
ticketId: item.ticketId,
|
|
25505
|
+
completed: false,
|
|
25506
|
+
amount: item.amount,
|
|
25507
|
+
stake: item.stake,
|
|
25508
|
+
grids: []
|
|
25509
|
+
};
|
|
25510
|
+
}
|
|
25511
|
+
return item;
|
|
25512
|
+
});
|
|
25513
|
+
}
|
|
25514
|
+
// @TODO CustomEvent type
|
|
25515
|
+
deleteTicketHandler(event) {
|
|
25516
|
+
this.deleteVisible = true;
|
|
25517
|
+
this.deleteEventData = event;
|
|
25518
|
+
}
|
|
25519
|
+
modalCloseEvent() {
|
|
25520
|
+
this.deleteVisible = false;
|
|
25521
|
+
this.loginModalVisible = false;
|
|
25522
|
+
}
|
|
25523
|
+
stakeChangeHandler(event) {
|
|
25524
|
+
const { ticketId, stake } = event.detail;
|
|
25525
|
+
this.tickets[ticketId - 1].stake = stake;
|
|
25526
|
+
this.calculateTotalAmount();
|
|
25527
|
+
}
|
|
25528
|
+
multiplierChangeHandler(event) {
|
|
25529
|
+
this.multiplier = event.detail;
|
|
25530
|
+
}
|
|
25531
|
+
getDraws() {
|
|
25532
|
+
// append from query param with the current date value in order to get the next draw
|
|
25533
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
|
|
25534
|
+
let drawOptions = {
|
|
25535
|
+
method: "GET",
|
|
25536
|
+
headers: {
|
|
25537
|
+
'Content-Type': "application/json",
|
|
25538
|
+
'Accept': 'application/json',
|
|
25539
|
+
},
|
|
25540
|
+
};
|
|
25541
|
+
fetch(url.href, drawOptions)
|
|
25542
|
+
.then((response) => {
|
|
25543
|
+
return response.json();
|
|
25544
|
+
})
|
|
25545
|
+
.then((data) => {
|
|
25546
|
+
var _a;
|
|
25547
|
+
let upcoming = data.items.filter((item) => {
|
|
25548
|
+
if (Date.parse(item.date) > new Date().getTime()) {
|
|
25549
|
+
return !item.winningNumbers;
|
|
25550
|
+
}
|
|
25551
|
+
});
|
|
25552
|
+
let past = data.items.filter((item) => item.winningNumbers);
|
|
25553
|
+
if (!upcoming[0])
|
|
25554
|
+
return;
|
|
25555
|
+
this.latestDraw = upcoming[0];
|
|
25556
|
+
this.nextDate = this.latestDraw.date;
|
|
25557
|
+
this.countdownLogic(this.nextDate);
|
|
25558
|
+
this.lastDrawId = past[past.length - 1].id;
|
|
25559
|
+
// calculate total winnings
|
|
25560
|
+
// @TODO fix any type
|
|
25561
|
+
(_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
|
|
25562
|
+
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
25563
|
+
});
|
|
25564
|
+
})
|
|
25565
|
+
.catch((err) => {
|
|
25566
|
+
console.log('error ', err);
|
|
25567
|
+
});
|
|
25568
|
+
}
|
|
25569
|
+
;
|
|
25570
|
+
// @TODO fix any type
|
|
25571
|
+
confirmDeleteTicketHandler(event) {
|
|
25572
|
+
// @TODO fix any type
|
|
25573
|
+
this.tickets = this.tickets.filter((item) => {
|
|
25574
|
+
if (item.ticketId == event.detail.ticketId) {
|
|
25575
|
+
return false;
|
|
25576
|
+
}
|
|
25577
|
+
return true;
|
|
25578
|
+
});
|
|
25579
|
+
this.calculateTotalAmount();
|
|
25580
|
+
this.deleteVisible = false;
|
|
25581
|
+
}
|
|
25582
|
+
createNewTicket() {
|
|
25583
|
+
this.tickets = [
|
|
25584
|
+
...this.tickets,
|
|
25585
|
+
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
25586
|
+
];
|
|
25587
|
+
}
|
|
25588
|
+
showLoginModal() {
|
|
25589
|
+
this.loginModalVisible = true;
|
|
25590
|
+
}
|
|
25591
|
+
submitTickets() {
|
|
25592
|
+
let url = new URL(`${this.endpoint}/tickets`);
|
|
25593
|
+
// @TODO Body TS type
|
|
25594
|
+
let body = {
|
|
25595
|
+
gameId: this.gameId,
|
|
25596
|
+
tickets: []
|
|
25597
|
+
};
|
|
25598
|
+
this.tickets.forEach((item) => {
|
|
25599
|
+
body.tickets.push({
|
|
25600
|
+
startingDrawId: this.nextDraw,
|
|
25601
|
+
amount: item.stake,
|
|
25602
|
+
gameId: this.gameId,
|
|
25603
|
+
currency: this.currency,
|
|
25604
|
+
selection: item.selectedNumbers,
|
|
25605
|
+
multiplier: this.multiplier,
|
|
25606
|
+
drawCount: item.amount,
|
|
25607
|
+
quickPick: this.quickPick,
|
|
25608
|
+
});
|
|
25609
|
+
});
|
|
25610
|
+
// @TODO Options TS type
|
|
25611
|
+
let options = {
|
|
25612
|
+
method: 'POST',
|
|
25613
|
+
headers: {
|
|
25614
|
+
'Content-Type': 'application/json',
|
|
25615
|
+
'Accept': 'application/json',
|
|
25616
|
+
'Authorization': `Bearer ${this.sessionId}`
|
|
25617
|
+
},
|
|
25618
|
+
body: JSON.stringify(body)
|
|
25619
|
+
};
|
|
25620
|
+
fetch(url.href, options)
|
|
25621
|
+
.then((res) => {
|
|
25622
|
+
if (res.status > 300) {
|
|
25623
|
+
throw new Error('err');
|
|
25624
|
+
}
|
|
25625
|
+
return res.json();
|
|
25626
|
+
})
|
|
25627
|
+
.then((data) => {
|
|
25628
|
+
// should we treat this res?
|
|
25629
|
+
console.log('data', data);
|
|
25630
|
+
})
|
|
25631
|
+
.catch((err) => {
|
|
25632
|
+
console.log('error ', err);
|
|
25633
|
+
});
|
|
25634
|
+
this.successVisible = true;
|
|
25635
|
+
}
|
|
25636
|
+
goBack() {
|
|
25637
|
+
this.goBackEvent.emit();
|
|
25638
|
+
}
|
|
25639
|
+
goToLobby() {
|
|
25640
|
+
this.goToLobbyEvent.emit();
|
|
25641
|
+
}
|
|
25642
|
+
render() {
|
|
25643
|
+
//Get path for background image
|
|
25644
|
+
const backgroundImagePath = index.getAssetPath(this.isMobile ? '/assets/chrono_lottery_mobile.png' : '/assets/chrono_desktop.png');
|
|
25645
|
+
if (this.hasErrors) {
|
|
25646
|
+
return (index.h("div", { class: "GamePage" }, index.h("div", { class: "Title" }, translate$2('error', this.language))));
|
|
25647
|
+
}
|
|
25648
|
+
return (
|
|
25649
|
+
/* Game details */
|
|
25650
|
+
index.h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, index.h("div", { class: "GridBanner", style: { 'background': `url(${this.backgroundUrl ? this.backgroundUrl : backgroundImagePath})`, 'background-size': 'contain', 'background-repeat': 'no-repeat', 'background-position': 'center' } }, index.h("div", { class: "BannerButtonsWrapper" }, index.h("button", { class: "BannerBackButton", onClick: this.goBack.bind(this) }, index.h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate$2('backButton', this.language)), index.h("button", { class: "BannerLobbyButton", onClick: this.goToLobby.bind(this) }, translate$2('lobbyButton', this.language))), index.h("div", { class: "Tabs" }, index.h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate$2('buy', this.language)), index.h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate$2('viewLatest', this.language)))), index.h("div", { class: "NextDrawWrapper" }, index.h("div", { class: "TotalWinnings" }, translate$2('winUpTo', this.language), ": ", index.h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), index.h("div", { class: "NextDraw" }, index.h("p", { class: "BannerText" }, translate$2('nextDraw', this.language)), index.h("div", { class: "BannerCountdown" }, index.h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), index.h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), index.h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), index.h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
25651
|
+
index.h("div", { class: "GamePageContent" }, index.h("div", { class: "GameDetails" }, index.h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => index.h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton, "total-controllers": this.tickets.length, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "CreateNewTicket" }, index.h("button", { onClick: () => this.createNewTicket() }, "+"), index.h("span", null, translate$2('createTicket', this.language)))), index.h("div", { class: "OrderSummary" }, index.h("h3", { class: "OrderSummaryTitle" }, translate$2('orderSummaryTitle', this.language)), index.h("div", { class: "Ticket" }, translate$2('orderSummaryTickets', this.language), ": ", index.h("span", null, this.tickets.length)), index.h("hr", null), index.h("div", { class: "Total" }, translate$2('orderSummaryTotal', this.language), ": ", index.h("span", null, this.totalAmount, " ", this.currency)), index.h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
25652
|
+
index.h("span", { class: "Button", onClick: () => this.submitTickets() }, translate$2('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
25653
|
+
index.h("div", null, index.h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate$2('orderSummarySubmit', this.language)), index.h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("p", { class: "SubmitModalSuccess" }, translate$2('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
25654
|
+
index.h("div", null, index.h("h4", { class: "LastDrawResultsTitle" }, translate$2('lastDrawResultsTitle', this.language)), index.h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }), index.h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("helper-modal", { "title-modal": "Success", visible: this.successVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("p", { class: "SubmitModalSuccess" }, translate$2('modalSuccess', this.language))), index.h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "DeleteTicketModalWrapper" }, index.h("h3", { class: "DeleteTicketModalTitle" }, translate$2('deleteTicketModalTitle', this.language)), index.h("p", { class: "DeleteTicketModalText" }, translate$2('deleteTicketModalText', this.language)), index.h("div", { class: "DeleteTicketModalButtons" }, index.h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate$2('deleteTicketModalCancel', this.language)), index.h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate$2('deleteTicketModalConfirm', this.language)))))));
|
|
25655
|
+
}
|
|
25656
|
+
static get assetsDirs() { return ["static"]; }
|
|
25657
|
+
get element() { return index.getElement(this); }
|
|
25658
|
+
};
|
|
25659
|
+
LotteryGamePage.style = LotteryGamePageStyle0;
|
|
25660
|
+
|
|
25661
|
+
const lotteryGridCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}";
|
|
25662
|
+
const LotteryGridStyle0 = lotteryGridCss;
|
|
25663
|
+
|
|
25664
|
+
const LotteryGrid = class {
|
|
25665
|
+
constructor(hostRef) {
|
|
25666
|
+
index.registerInstance(this, hostRef);
|
|
25667
|
+
this.gridFilledEvent = index.createEvent(this, "gridFilled", 7);
|
|
25668
|
+
this.gridDirtyEvent = index.createEvent(this, "gridDirty", 7);
|
|
25669
|
+
this.selectedCounter = 0;
|
|
25670
|
+
this.setClientStyling = () => {
|
|
25671
|
+
let sheet = document.createElement('style');
|
|
25672
|
+
sheet.innerHTML = this.clientStyling;
|
|
25673
|
+
this.stylingContainer.prepend(sheet);
|
|
25674
|
+
};
|
|
25675
|
+
this.setClientStylingURL = () => {
|
|
25676
|
+
let cssFile = document.createElement('style');
|
|
25677
|
+
setTimeout(() => {
|
|
25678
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
25679
|
+
this.stylingContainer.prepend(cssFile);
|
|
25680
|
+
}, 1);
|
|
25681
|
+
};
|
|
25682
|
+
this.ticketId = undefined;
|
|
25683
|
+
this.totalNumbers = 0;
|
|
25684
|
+
this.gameId = undefined;
|
|
25685
|
+
this.maximumAllowed = 0;
|
|
25686
|
+
this.minimumAllowed = 1;
|
|
25687
|
+
this.selectable = true;
|
|
25688
|
+
this.selectedNumbers = '';
|
|
25689
|
+
this.displaySelected = false;
|
|
25690
|
+
this.language = 'en';
|
|
25691
|
+
this.gridIndex = undefined;
|
|
25692
|
+
this.gridType = '';
|
|
25693
|
+
this.clientStyling = '';
|
|
25694
|
+
this.clientStylingUrlContent = '';
|
|
25695
|
+
this.numbers = [];
|
|
25696
|
+
this.limitStylingAppends = false;
|
|
25697
|
+
}
|
|
25698
|
+
connectedCallback() {
|
|
25699
|
+
let selected = [];
|
|
25700
|
+
if (this.selectedNumbers.length > 0) {
|
|
25701
|
+
selected = this.selectedNumbers.split(',');
|
|
25702
|
+
this.selectedCounter = selected.length;
|
|
25703
|
+
}
|
|
25704
|
+
if (this.displaySelected) {
|
|
25705
|
+
selected.forEach((item) => {
|
|
25706
|
+
this.numbers.push({
|
|
25707
|
+
number: item,
|
|
25708
|
+
selected: true,
|
|
25709
|
+
selectable: this.selectable
|
|
25710
|
+
});
|
|
25711
|
+
});
|
|
25712
|
+
}
|
|
25713
|
+
else {
|
|
25714
|
+
[...Array(this.totalNumbers).keys()]
|
|
25715
|
+
.map(number => (number + 1).toString())
|
|
25716
|
+
.forEach((number) => {
|
|
25717
|
+
this.numbers.push({
|
|
25718
|
+
number,
|
|
25719
|
+
selected: selected.indexOf(number) >= 0 ? true : false,
|
|
25720
|
+
selectable: this.selectedCounter == this.maximumAllowed ? false : this.selectable
|
|
25721
|
+
});
|
|
25722
|
+
});
|
|
25723
|
+
}
|
|
25724
|
+
}
|
|
25725
|
+
componentDidRender() {
|
|
25726
|
+
// start custom styling area
|
|
25727
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
25728
|
+
if (this.clientStyling)
|
|
25729
|
+
this.setClientStyling();
|
|
25730
|
+
if (this.clientStylingUrlContent)
|
|
25731
|
+
this.setClientStylingURL();
|
|
25732
|
+
this.limitStylingAppends = true;
|
|
25733
|
+
}
|
|
25734
|
+
// end custom styling area
|
|
25735
|
+
}
|
|
25736
|
+
// wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
|
|
25737
|
+
shuffleArray(array) {
|
|
25738
|
+
const result = [];
|
|
25739
|
+
while (array.length > 0) {
|
|
25740
|
+
const randomIndex = Math.floor(Math.random() * (array.length));
|
|
25741
|
+
result.push(array.splice(randomIndex, 1)[0]);
|
|
25742
|
+
}
|
|
25743
|
+
return result;
|
|
25744
|
+
}
|
|
25745
|
+
lotteryBulletSelectionHandler(event) {
|
|
25746
|
+
this.numbers = this.numbers.map((item) => {
|
|
25747
|
+
if (item.number == event.detail.value) {
|
|
25748
|
+
return {
|
|
25749
|
+
number: item.number,
|
|
25750
|
+
selected: event.detail.selected,
|
|
25751
|
+
selectable: item.selectable
|
|
25752
|
+
};
|
|
25753
|
+
}
|
|
25754
|
+
return {
|
|
25755
|
+
number: item.number,
|
|
25756
|
+
selected: item.selected,
|
|
25757
|
+
selectable: item.selectable
|
|
25758
|
+
};
|
|
25759
|
+
});
|
|
25760
|
+
if (event.detail.selected) {
|
|
25761
|
+
this.selectedCounter += 1;
|
|
25762
|
+
if (this.selectedCounter == this.maximumAllowed) {
|
|
25763
|
+
this.numbers = this.numbers.map((item) => {
|
|
25764
|
+
return {
|
|
25765
|
+
number: item.number,
|
|
25766
|
+
selected: item.selected,
|
|
25767
|
+
selectable: item.selected ? true : false
|
|
25768
|
+
};
|
|
25769
|
+
});
|
|
25770
|
+
this.gridFilledEvent.emit({
|
|
25771
|
+
id: this.ticketId,
|
|
25772
|
+
index: this.gridIndex,
|
|
25773
|
+
selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
|
|
25774
|
+
});
|
|
25775
|
+
}
|
|
25776
|
+
}
|
|
25777
|
+
else {
|
|
25778
|
+
if (this.selectedCounter == this.maximumAllowed) {
|
|
25779
|
+
this.numbers = this.numbers.map((item) => {
|
|
25780
|
+
return {
|
|
25781
|
+
number: item.number,
|
|
25782
|
+
selected: item.selected,
|
|
25783
|
+
selectable: true
|
|
25784
|
+
};
|
|
25785
|
+
});
|
|
25786
|
+
this.gridDirtyEvent.emit({
|
|
25787
|
+
id: this.ticketId,
|
|
25788
|
+
index: this.gridIndex,
|
|
25789
|
+
selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
|
|
25790
|
+
});
|
|
25791
|
+
}
|
|
25792
|
+
this.selectedCounter -= 1;
|
|
25793
|
+
}
|
|
25794
|
+
}
|
|
25795
|
+
async resetSelectionHandler(event) {
|
|
25796
|
+
if (event.detail && event.detail == this.ticketId) {
|
|
25797
|
+
this.selectedCounter = 0;
|
|
25798
|
+
this.numbers = this.numbers.map((item) => {
|
|
25799
|
+
return {
|
|
25800
|
+
number: item.number,
|
|
25801
|
+
selected: false,
|
|
25802
|
+
selectable: this.selectable
|
|
25803
|
+
};
|
|
25804
|
+
});
|
|
25805
|
+
this.gridDirtyEvent.emit({
|
|
25806
|
+
id: this.ticketId,
|
|
25807
|
+
index: this.gridIndex,
|
|
25808
|
+
selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
|
|
25809
|
+
});
|
|
25810
|
+
}
|
|
25811
|
+
}
|
|
25812
|
+
async autoSelectionHandler(event) {
|
|
25813
|
+
if (event.detail && event.detail == this.ticketId) {
|
|
25814
|
+
this.resetSelectionHandler(event);
|
|
25815
|
+
let array = [...Array(this.totalNumbers).keys()]
|
|
25816
|
+
.map(number => number + 1);
|
|
25817
|
+
array = this.shuffleArray(array);
|
|
25818
|
+
array = array.slice(0, this.minimumAllowed);
|
|
25819
|
+
this.numbers = this.numbers.map((item) => {
|
|
25820
|
+
return {
|
|
25821
|
+
number: item.number,
|
|
25822
|
+
selected: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,
|
|
25823
|
+
selectable: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,
|
|
25824
|
+
};
|
|
25825
|
+
});
|
|
25826
|
+
this.gridFilledEvent.emit({
|
|
25827
|
+
id: this.ticketId,
|
|
25828
|
+
index: this.gridIndex,
|
|
25829
|
+
selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)
|
|
25830
|
+
});
|
|
25831
|
+
this.selectedCounter = this.maximumAllowed;
|
|
25832
|
+
}
|
|
25833
|
+
}
|
|
25834
|
+
render() {
|
|
25835
|
+
return (index.h("div", { key: '54b9187146b5d2625fd5ce7f53f38abf091cd943', class: "GridContainer", ref: el => this.stylingContainer = el }, index.h("div", { key: 'e7e8570557ebaa78edf881cdbc1ed720028cdf6e', class: this.gridType === 'ticket' ? 'Grid TicketGrid' : 'Grid' }, this.numbers.map((item) => index.h("div", null, index.h("lottery-bullet", { value: item.number, selectable: item.selectable, "is-selected": item.selected, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))))));
|
|
25836
|
+
}
|
|
25837
|
+
};
|
|
25838
|
+
LotteryGrid.style = LotteryGridStyle0;
|
|
23400
25839
|
|
|
23401
|
-
const
|
|
25840
|
+
const DEFAULT_LANGUAGE$1 = 'en';
|
|
25841
|
+
const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'hr'];
|
|
25842
|
+
const TRANSLATIONS$1 = {
|
|
25843
|
+
en: {
|
|
25844
|
+
loading: 'Loading, please wait ...',
|
|
25845
|
+
error: 'It was an error while trying to fetch the data',
|
|
25846
|
+
grid: 'Grid',
|
|
25847
|
+
multiplier: 'Multiplier',
|
|
25848
|
+
numberOfDraws: 'Number of draws',
|
|
25849
|
+
wagerPerDraw: 'Wager per draw',
|
|
25850
|
+
resetButton: 'Reset',
|
|
25851
|
+
autoButton: 'I feel lucky'
|
|
25852
|
+
},
|
|
25853
|
+
ro: {
|
|
25854
|
+
loading: 'Se incarca, va rugam asteptati ...',
|
|
25855
|
+
error: 'A fost o eroare in timp ce asteptam datele',
|
|
25856
|
+
grid: 'Grid',
|
|
25857
|
+
multiplier: 'Multiplicator',
|
|
25858
|
+
numberOfDraws: 'Numarul de extrageri',
|
|
25859
|
+
wagerPerDraw: 'Pariul per extragere',
|
|
25860
|
+
resetButton: 'Reseteaza',
|
|
25861
|
+
autoButton: 'Ma simt norocos'
|
|
25862
|
+
},
|
|
25863
|
+
fr: {
|
|
25864
|
+
loading: 'Loading, please wait ...',
|
|
25865
|
+
error: 'It was an error while trying to fetch the data',
|
|
25866
|
+
grid: 'Grid',
|
|
25867
|
+
multiplier: 'Multiplier',
|
|
25868
|
+
numberOfDraws: 'Number of draws',
|
|
25869
|
+
wagerPerDraw: 'Wager per draw',
|
|
25870
|
+
resetButton: 'Reset',
|
|
25871
|
+
autoButton: 'I feel lucky'
|
|
25872
|
+
},
|
|
25873
|
+
ar: {
|
|
25874
|
+
loading: 'Loading, please wait ...',
|
|
25875
|
+
error: 'It was an error while trying to fetch the data',
|
|
25876
|
+
grid: 'Grid',
|
|
25877
|
+
multiplier: 'Multiplier',
|
|
25878
|
+
numberOfDraws: 'Number of draws',
|
|
25879
|
+
wagerPerDraw: 'Wager per draw',
|
|
25880
|
+
resetButton: 'Reset',
|
|
25881
|
+
autoButton: 'I feel lucky'
|
|
25882
|
+
},
|
|
25883
|
+
hr: {
|
|
25884
|
+
loading: 'Učitavanje, molimo pričekajte ...',
|
|
25885
|
+
error: 'Došlo je do pogreške prilikom pokušaja dohvaćanja podataka',
|
|
25886
|
+
grid: 'Tablica',
|
|
25887
|
+
multiplier: 'Multiplikator',
|
|
25888
|
+
numberOfDraws: 'Broj izvlačenja',
|
|
25889
|
+
wagerPerDraw: 'Ulog po izvlačenju',
|
|
25890
|
+
resetButton: 'Resetiraj',
|
|
25891
|
+
autoButton: 'Osjećam se sretno'
|
|
25892
|
+
}
|
|
25893
|
+
};
|
|
25894
|
+
const translate$1 = (key, customLang) => {
|
|
25895
|
+
const lang = customLang;
|
|
25896
|
+
return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
|
|
25897
|
+
};
|
|
23402
25898
|
|
|
23403
|
-
const
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
|
|
23424
|
-
|
|
23425
|
-
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
|
|
23431
|
-
|
|
23432
|
-
|
|
23433
|
-
|
|
23434
|
-
|
|
23435
|
-
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23440
|
-
|
|
23441
|
-
|
|
23442
|
-
|
|
23443
|
-
|
|
23444
|
-
|
|
25899
|
+
const lotteryTicketCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;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%, #F1F1F1 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:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}";
|
|
25900
|
+
const LotteryTicketStyle0 = lotteryTicketCss;
|
|
25901
|
+
|
|
25902
|
+
const LotteryTicket = class {
|
|
25903
|
+
constructor(hostRef) {
|
|
25904
|
+
index.registerInstance(this, hostRef);
|
|
25905
|
+
this.ticketCompleted = index.createEvent(this, "ticketCompleted", 7);
|
|
25906
|
+
this.autoSelection = index.createEvent(this, "autoSelection", 7);
|
|
25907
|
+
this.resetSelection = index.createEvent(this, "resetSelection", 7);
|
|
25908
|
+
this.stakeChange = index.createEvent(this, "stakeChange", 7);
|
|
25909
|
+
this.multiplierChange = index.createEvent(this, "multiplierChange", 7);
|
|
25910
|
+
this.setClientStyling = () => {
|
|
25911
|
+
let sheet = document.createElement('style');
|
|
25912
|
+
sheet.innerHTML = this.clientStyling;
|
|
25913
|
+
this.stylingContainer.prepend(sheet);
|
|
25914
|
+
};
|
|
25915
|
+
this.setClientStylingURL = () => {
|
|
25916
|
+
let cssFile = document.createElement('style');
|
|
25917
|
+
setTimeout(() => {
|
|
25918
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
25919
|
+
this.stylingContainer.prepend(cssFile);
|
|
25920
|
+
}, 1);
|
|
25921
|
+
};
|
|
25922
|
+
this.endpoint = undefined;
|
|
25923
|
+
this.gameId = undefined;
|
|
25924
|
+
this.numberOfGrids = 1;
|
|
25925
|
+
this.multipleDraws = true;
|
|
25926
|
+
this.ticketId = undefined;
|
|
25927
|
+
this.resetButton = false;
|
|
25928
|
+
this.autoPick = false;
|
|
25929
|
+
this.language = 'en';
|
|
25930
|
+
this.clientStyling = '';
|
|
25931
|
+
this.clientStylingUrlContent = '';
|
|
25932
|
+
this.multiplier = false;
|
|
25933
|
+
this.numberOfDraws = 1;
|
|
25934
|
+
this.isLoading = true;
|
|
25935
|
+
this.hasErrors = false;
|
|
25936
|
+
this.ticketDone = false;
|
|
25937
|
+
this.isCustomSelect = false;
|
|
25938
|
+
this.amountInfo = {};
|
|
25939
|
+
this.limitStylingAppends = false;
|
|
25940
|
+
}
|
|
23445
25941
|
/**
|
|
23446
|
-
*
|
|
25942
|
+
* @TODO find a better way to implement click outside the custom select, so that we don't have to use the 'data-cluster' attribute on each element
|
|
23447
25943
|
*/
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
|
|
23471
|
-
|
|
23472
|
-
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23477
|
-
|
|
23478
|
-
|
|
23479
|
-
|
|
23480
|
-
|
|
23481
|
-
|
|
23482
|
-
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23489
|
-
|
|
23490
|
-
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
|
|
23494
|
-
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23502
|
-
|
|
23503
|
-
|
|
23504
|
-
|
|
23505
|
-
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
|
|
23518
|
-
|
|
23519
|
-
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
25944
|
+
checkForClickOutside(ev) {
|
|
25945
|
+
if (ev.composedPath()[0].getAttribute('data-cluster') !== 'SelectComponent') {
|
|
25946
|
+
this.isCustomSelect = false;
|
|
25947
|
+
}
|
|
25948
|
+
}
|
|
25949
|
+
connectedCallback() {
|
|
25950
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
25951
|
+
fetch(url.href)
|
|
25952
|
+
.then((response) => {
|
|
25953
|
+
if (response.ok) {
|
|
25954
|
+
return response.json();
|
|
25955
|
+
}
|
|
25956
|
+
else {
|
|
25957
|
+
// Throw error
|
|
25958
|
+
this.hasErrors = true;
|
|
25959
|
+
}
|
|
25960
|
+
})
|
|
25961
|
+
.then((data) => {
|
|
25962
|
+
this.isLoading = false;
|
|
25963
|
+
this.gameData = data;
|
|
25964
|
+
this.grids = [...Array(this.gameData.type.boards.length).keys()];
|
|
25965
|
+
this.amountInfo = this.gameData.type.stakes[0]; // initial value for select
|
|
25966
|
+
})
|
|
25967
|
+
.catch((err) => {
|
|
25968
|
+
this.isLoading = false;
|
|
25969
|
+
this.hasErrors = true;
|
|
25970
|
+
console.error('Error!', err);
|
|
25971
|
+
});
|
|
25972
|
+
}
|
|
25973
|
+
componentDidRender() {
|
|
25974
|
+
// start custom styling area
|
|
25975
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
25976
|
+
if (this.clientStyling)
|
|
25977
|
+
this.setClientStyling();
|
|
25978
|
+
if (this.clientStylingUrlContent)
|
|
25979
|
+
this.setClientStylingURL();
|
|
25980
|
+
this.limitStylingAppends = true;
|
|
25981
|
+
}
|
|
25982
|
+
// end custom styling area
|
|
25983
|
+
}
|
|
25984
|
+
multiplierChangeHandler(e) {
|
|
25985
|
+
this.multiplier = e.target ? e.target.checked : false;
|
|
25986
|
+
this.multiplierChange.emit(this.multiplier);
|
|
25987
|
+
}
|
|
25988
|
+
drawsChangeHandler(event) {
|
|
25989
|
+
this.ticket = Object.assign(Object.assign({}, this.ticket), { draws: event });
|
|
25990
|
+
this.ticketCompleted.emit(this.ticket);
|
|
25991
|
+
}
|
|
25992
|
+
gridFilledHandler(event) {
|
|
25993
|
+
this.ticket = Object.assign(Object.assign({}, event.detail), { draws: this.numberOfDraws });
|
|
25994
|
+
this.ticketDone = true;
|
|
25995
|
+
this.ticketCompleted.emit(this.ticket);
|
|
25996
|
+
}
|
|
25997
|
+
toggleAutoSelection() {
|
|
25998
|
+
this.ticketDone = true;
|
|
25999
|
+
this.autoSelection.emit(this.ticketId);
|
|
26000
|
+
}
|
|
26001
|
+
toggleResetSelection() {
|
|
26002
|
+
this.ticketDone = false;
|
|
26003
|
+
this.resetSelection.emit(this.ticketId);
|
|
26004
|
+
}
|
|
26005
|
+
changeStake(ticketid, amount) {
|
|
26006
|
+
this.stakeChange.emit({
|
|
26007
|
+
ticketId: ticketid,
|
|
26008
|
+
stake: amount
|
|
26009
|
+
});
|
|
26010
|
+
}
|
|
26011
|
+
toggleClass() {
|
|
26012
|
+
this.isCustomSelect = !this.isCustomSelect;
|
|
26013
|
+
}
|
|
26014
|
+
setDropdownItem(item) {
|
|
26015
|
+
this.amountInfo = {
|
|
26016
|
+
value: item.value,
|
|
26017
|
+
currency: item.currency
|
|
26018
|
+
};
|
|
26019
|
+
this.isCustomSelect = false;
|
|
26020
|
+
this.changeStake(this.ticketId, item.amount);
|
|
26021
|
+
}
|
|
26022
|
+
render() {
|
|
26023
|
+
if (this.isLoading) {
|
|
26024
|
+
return (index.h("div", null, index.h("p", null, translate$1('loading', this.language))));
|
|
26025
|
+
}
|
|
26026
|
+
else {
|
|
26027
|
+
if (this.hasErrors) {
|
|
26028
|
+
return (index.h("div", null, index.h("p", null, translate$1('error', this.language))));
|
|
26029
|
+
}
|
|
26030
|
+
else {
|
|
26031
|
+
const { type } = this.gameData;
|
|
26032
|
+
return (index.h("div", { class: "TicketContainer", ref: el => this.stylingContainer = el }, index.h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
26033
|
+
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate$1('resetButton', this.language))), this.autoPick && !this.ticketDone &&
|
|
26034
|
+
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate$1('autoButton', this.language))), this.grids.map((_, index$1) => index.h("div", { class: "TicketGridBullets" }, index.h("p", { class: "TicketGridTitle" }, translate$1('grid', this.language), " ", index$1 + 1), index.h("lottery-grid", { "grid-index": index$1, "maximum-allowed": type.boards[index$1].maximumAllowed, "minimum-allowed": type.boards[index$1].minimumAllowed, "total-numbers": type.boards[index$1].highNumber - type.boards[index$1].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))), type.multiplier &&
|
|
26035
|
+
index.h("div", null, index.h("label", { class: "Toggle" }, index.h("label", { class: "Label" }, translate$1('multiplier', this.language), ": "), index.h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), index.h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
26036
|
+
index.h("div", { class: "TicketDraws" }, index.h("label", { class: "Label" }, translate$1('numberOfDraws', this.language), ": "), index.h("div", { class: "NumberInput" }, index.h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), index.h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), index.h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), index.h("div", null, index.h("label", { class: "Label" }, translate$1('wagerPerDraw', this.language), ": "), index.h("div", { class: "WagerInput" }, type.stakes.length > 1 ?
|
|
26037
|
+
(index.h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, index.h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, index.h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.value, " ", this.amountInfo.currency), index.h("span", { "data-cluster": "SelectComponent", class: "SelectExpand" }, "\u25BC")), index.h("div", { "data-cluster": "SelectComponent", class: "SelectContent" }, index.h("ul", { "data-cluster": "SelectComponent", class: "SelectOptions" }, type.stakes.map((item) => index.h("li", { "data-cluster": "SelectComponent", class: this.amountInfo.value == item.value ? 'SelectedValue' : '', value: item.value, onClick: () => this.setDropdownItem(item) }, item.value, " ", item.currency)))))) : (index.h("div", null, index.h("input", { min: "1", value: type.stakes[0].amount, type: "number", disabled: true }), index.h("p", { class: "WagerInputTitle" }, type.stakes[0].currency)))))));
|
|
26038
|
+
}
|
|
26039
|
+
}
|
|
26040
|
+
}
|
|
26041
|
+
static get watchers() { return {
|
|
26042
|
+
"numberOfDraws": ["drawsChangeHandler"]
|
|
26043
|
+
}; }
|
|
23527
26044
|
};
|
|
23528
|
-
|
|
26045
|
+
LotteryTicket.style = LotteryTicketStyle0;
|
|
23529
26046
|
|
|
23530
26047
|
const DEFAULT_LANGUAGE = 'en';
|
|
23531
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];
|
|
26048
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
23532
26049
|
const TRANSLATIONS = {
|
|
23533
|
-
|
|
23534
|
-
|
|
23535
|
-
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
23546
|
-
|
|
23547
|
-
|
|
23548
|
-
winUpTo: 'Win up to',
|
|
23549
|
-
},
|
|
23550
|
-
ro: {
|
|
23551
|
-
drawResultsHeader: 'Ultimele rezultate extragere',
|
|
23552
|
-
drawId: 'Id extragere',
|
|
23553
|
-
drawName: 'Numele jocului',
|
|
23554
|
-
drawDate: 'Data extragerii',
|
|
23555
|
-
drawNumbersGridDraw: 'Numerele extrase Grid',
|
|
23556
|
-
drawNumbersGridTicket: 'Numerele extrase Grid',
|
|
23557
|
-
ticketResult: 'Rezultatul biletului',
|
|
23558
|
-
amountWon: 'Suma castigata',
|
|
23559
|
-
numberOfDraws: 'Numarul de extrageri',
|
|
23560
|
-
multiplier: 'Multiplicator:',
|
|
23561
|
-
ticketPurchaseDate: 'Data achizitionarii biletului',
|
|
23562
|
-
ticketStatus: 'Statusul biletului',
|
|
23563
|
-
ticketId: 'Id biletul',
|
|
23564
|
-
ticketAmount: 'Valoarea biletului',
|
|
23565
|
-
winUpTo: 'Poti castiga'
|
|
23566
|
-
},
|
|
23567
|
-
fr: {
|
|
23568
|
-
drawResultsHeader: 'Résultats du dernier tirage',
|
|
23569
|
-
drawId: 'ID de tirage',
|
|
23570
|
-
drawName: 'Nom du jeu',
|
|
23571
|
-
drawDate: 'Date du tirage',
|
|
23572
|
-
drawNumbersGridDraw: 'Tirage des numéros Grille',
|
|
23573
|
-
drawNumbersGridTicket: 'Tirage des numéros Grille',
|
|
23574
|
-
ticketResult: 'Résultat du ticket',
|
|
23575
|
-
amountWon: 'Montant gagné',
|
|
23576
|
-
numberOfDraws: 'Nombre de tirages',
|
|
23577
|
-
multiplier: 'Multiplicateur',
|
|
23578
|
-
ticketPurchaseDate: 'Date d\'achat du billet',
|
|
23579
|
-
ticketStatus: 'Statut du ticket',
|
|
23580
|
-
ticketId: 'ID de billets',
|
|
23581
|
-
ticketAmount: 'Montant du billet',
|
|
23582
|
-
winUpTo: 'Gagnez jusqu\'à'
|
|
23583
|
-
},
|
|
23584
|
-
ar: {
|
|
23585
|
-
drawResultsHeader: 'نتائج آخر سحب',
|
|
23586
|
-
drawId: 'معرّف السحب',
|
|
23587
|
-
drawName: 'اسم اللعبة',
|
|
23588
|
-
drawDate: 'تاريخ السحب',
|
|
23589
|
-
drawNumbersGridDraw: 'شبكة أرقام السحب',
|
|
23590
|
-
drawNumbersGridTicket: 'شبكة أرقام السحب',
|
|
23591
|
-
ticketResult: 'نتيجة التذكرة',
|
|
23592
|
-
amountWon: 'المبلغ الذي تم ربحه',
|
|
23593
|
-
numberOfDraws: 'عدد السحوبات',
|
|
23594
|
-
multiplier: 'مضاعف',
|
|
23595
|
-
ticketPurchaseDate: 'تاريخ شراء التذكرة',
|
|
23596
|
-
ticketStatus: 'حالة التذكرة',
|
|
23597
|
-
ticketId: 'معرّف التذكرة',
|
|
23598
|
-
ticketAmount: 'مبلغ التذكرة',
|
|
23599
|
-
winUpTo: 'ربح يصل إلى'
|
|
23600
|
-
},
|
|
23601
|
-
hr: {
|
|
23602
|
-
drawResultsHeader: 'Rezultati posljednjeg izvlačenja',
|
|
23603
|
-
drawId: 'ID izvlačenja',
|
|
23604
|
-
drawName: 'Naziv igre',
|
|
23605
|
-
drawDate: 'Datum izvlačenja',
|
|
23606
|
-
drawNumbersGridDraw: 'Tablica izvučenih brojeva',
|
|
23607
|
-
drawNumbersGridTicket: 'Tablica izvučenih brojeva',
|
|
23608
|
-
ticketResult: 'Rezultat listića',
|
|
23609
|
-
amountWon: 'Osvojeni iznos',
|
|
23610
|
-
numberOfDraws: 'Broj izvlačenja',
|
|
23611
|
-
multiplier: 'Multiplikator',
|
|
23612
|
-
ticketPurchaseDate: 'Datum uplate listića',
|
|
23613
|
-
ticketStatus: 'Status listića',
|
|
23614
|
-
ticketId: 'ID listića',
|
|
23615
|
-
ticketAmount: 'Iznos listića',
|
|
23616
|
-
winUpTo: 'Osvoji do'
|
|
23617
|
-
},
|
|
26050
|
+
en: {
|
|
26051
|
+
ticket: 'Ticket',
|
|
26052
|
+
},
|
|
26053
|
+
ro: {
|
|
26054
|
+
ticket: 'Bilet',
|
|
26055
|
+
},
|
|
26056
|
+
fr: {
|
|
26057
|
+
ticket: 'Billet'
|
|
26058
|
+
},
|
|
26059
|
+
ar: {
|
|
26060
|
+
ticket: 'تذكرة',
|
|
26061
|
+
},
|
|
26062
|
+
hr: {
|
|
26063
|
+
ticket: 'Listić',
|
|
26064
|
+
}
|
|
23618
26065
|
};
|
|
23619
26066
|
const translate = (key, customLang) => {
|
|
23620
|
-
|
|
23621
|
-
|
|
26067
|
+
const lang = customLang;
|
|
26068
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
23622
26069
|
};
|
|
23623
26070
|
|
|
23624
|
-
const
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
|
|
23629
|
-
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
|
|
23633
|
-
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
|
|
23638
|
-
|
|
23639
|
-
|
|
23640
|
-
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23651
|
-
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
-
|
|
23656
|
-
|
|
23657
|
-
|
|
23658
|
-
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
this.ticketMultiplier = false;
|
|
23665
|
-
/**
|
|
23666
|
-
* The ticket draw count
|
|
23667
|
-
*/
|
|
23668
|
-
this.ticketDrawCount = 0;
|
|
23669
|
-
/**
|
|
23670
|
-
* The ticket winning numbers
|
|
23671
|
-
*/
|
|
23672
|
-
this.ticketNumbers = '';
|
|
23673
|
-
/**
|
|
23674
|
-
* The session id
|
|
23675
|
-
*/
|
|
23676
|
-
this.sessionId = '';
|
|
23677
|
-
/**
|
|
23678
|
-
* Client custom styling via string
|
|
23679
|
-
*/
|
|
23680
|
-
this.clientStyling = '';
|
|
23681
|
-
/**
|
|
23682
|
-
* Client custom styling via url content
|
|
23683
|
-
*/
|
|
23684
|
-
this.clientStylingUrlContent = '';
|
|
23685
|
-
/**
|
|
23686
|
-
* Data showing the ticket's draw results details
|
|
23687
|
-
*/
|
|
23688
|
-
this.ticketDrawData = '';
|
|
23689
|
-
this.multiplier = 3;
|
|
23690
|
-
this.isLoading = true;
|
|
23691
|
-
this.hasErrors = false;
|
|
23692
|
-
this.errorText = '';
|
|
23693
|
-
this.ticketData = [];
|
|
23694
|
-
this.ticketDataLoaded = false;
|
|
23695
|
-
this.ticketDraws = [];
|
|
23696
|
-
this.toggleDrawer = [false];
|
|
23697
|
-
this.limitStylingAppends = false;
|
|
23698
|
-
this.ticketDrawDetails = [];
|
|
23699
|
-
this.ticketDrawDetailsFlag = true;
|
|
23700
|
-
this.setClientStyling = () => {
|
|
23701
|
-
let sheet = document.createElement('style');
|
|
23702
|
-
sheet.innerHTML = this.clientStyling;
|
|
23703
|
-
this.stylingContainer.prepend(sheet);
|
|
23704
|
-
};
|
|
23705
|
-
this.setClientStylingURL = () => {
|
|
23706
|
-
let cssFile = document.createElement('style');
|
|
23707
|
-
setTimeout(() => {
|
|
23708
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
23709
|
-
this.stylingContainer.prepend(cssFile);
|
|
23710
|
-
}, 1);
|
|
23711
|
-
};
|
|
23712
|
-
}
|
|
23713
|
-
connectedCallback() {
|
|
23714
|
-
let promises = [];
|
|
23715
|
-
// Split ticket numbers for each grid
|
|
23716
|
-
if (this.ticketNumbers) {
|
|
23717
|
-
this.gridNumbers = JSON.parse(this.ticketNumbers);
|
|
23718
|
-
}
|
|
23719
|
-
if (this.drawId) {
|
|
23720
|
-
promises.push(this.getDrawData());
|
|
23721
|
-
}
|
|
23722
|
-
Promise.all(promises)
|
|
23723
|
-
.then(() => {
|
|
23724
|
-
this.isLoading = false;
|
|
23725
|
-
}).catch((err) => {
|
|
23726
|
-
console.log('error ', err);
|
|
23727
|
-
this.isLoading = false;
|
|
23728
|
-
});
|
|
23729
|
-
}
|
|
23730
|
-
componentWillRender() {
|
|
23731
|
-
if (this.ticketDrawData && this.ticketDrawDetailsFlag) {
|
|
23732
|
-
this.ticketDrawDetails = JSON.parse(this.ticketDrawData);
|
|
23733
|
-
this.ticketDrawDetails.forEach((drawDetail) => {
|
|
23734
|
-
this.getDrawData(drawDetail.drawId).then((drawData) => drawDetail.drawData = drawData);
|
|
23735
|
-
});
|
|
23736
|
-
this.ticketDrawDetailsFlag = false;
|
|
23737
|
-
}
|
|
23738
|
-
}
|
|
23739
|
-
componentDidRender() {
|
|
23740
|
-
// start custom styling area
|
|
23741
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
23742
|
-
if (this.clientStyling)
|
|
23743
|
-
this.setClientStyling();
|
|
23744
|
-
if (this.clientStylingUrlContent)
|
|
23745
|
-
this.setClientStylingURL();
|
|
23746
|
-
this.limitStylingAppends = true;
|
|
23747
|
-
}
|
|
23748
|
-
// end custom styling area
|
|
23749
|
-
}
|
|
23750
|
-
getDrawData(drawId) {
|
|
23751
|
-
this.isLoading = true;
|
|
23752
|
-
return new Promise((resolve, reject) => {
|
|
23753
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawId ? drawId : this.drawId}`);
|
|
23754
|
-
fetch(url.href)
|
|
23755
|
-
.then((response) => {
|
|
23756
|
-
// @TODO EXCEPTIONS
|
|
23757
|
-
return response.json();
|
|
23758
|
-
})
|
|
23759
|
-
.then((data) => {
|
|
23760
|
-
if (drawId) {
|
|
23761
|
-
resolve(data);
|
|
26071
|
+
const lotteryTicketControllerCss = ":host{font-family:\"Roboto\", system-ui, -apple-system, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:rgb(122, 195, 23)}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}";
|
|
26072
|
+
const LotteryTicketControllerStyle0 = lotteryTicketControllerCss;
|
|
26073
|
+
|
|
26074
|
+
const LotteryTicketController = class {
|
|
26075
|
+
constructor(hostRef) {
|
|
26076
|
+
index.registerInstance(this, hostRef);
|
|
26077
|
+
this.deleteTicketEvent = index.createEvent(this, "deleteTicket", 7);
|
|
26078
|
+
this.setClientStyling = () => {
|
|
26079
|
+
let sheet = document.createElement('style');
|
|
26080
|
+
sheet.innerHTML = this.clientStyling;
|
|
26081
|
+
this.stylingContainer.prepend(sheet);
|
|
26082
|
+
};
|
|
26083
|
+
this.setClientStylingURL = () => {
|
|
26084
|
+
let cssFile = document.createElement('style');
|
|
26085
|
+
setTimeout(() => {
|
|
26086
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
26087
|
+
this.stylingContainer.prepend(cssFile);
|
|
26088
|
+
}, 1);
|
|
26089
|
+
};
|
|
26090
|
+
this.endpoint = '';
|
|
26091
|
+
this.ticketId = 1;
|
|
26092
|
+
this.ticketDescription = undefined;
|
|
26093
|
+
this.gameId = undefined;
|
|
26094
|
+
this.postMessage = false;
|
|
26095
|
+
this.eventName = 'deleteTicketAction';
|
|
26096
|
+
this.collapsed = true;
|
|
26097
|
+
this.numberOfGrids = 1;
|
|
26098
|
+
this.last = false;
|
|
26099
|
+
this.language = 'en';
|
|
26100
|
+
this.autoPick = false;
|
|
26101
|
+
this.resetButton = false;
|
|
26102
|
+
this.totalControllers = 1;
|
|
26103
|
+
this.clientStyling = '';
|
|
26104
|
+
this.clientStylingUrlContent = '';
|
|
26105
|
+
this.limitStylingAppends = false;
|
|
26106
|
+
}
|
|
26107
|
+
// @TODO fix the `any` type
|
|
26108
|
+
helperAccordionActionHandler() {
|
|
26109
|
+
if (this.postMessage) {
|
|
26110
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
23762
26111
|
}
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
26112
|
+
this.deleteTicketEvent.emit({
|
|
26113
|
+
ticketId: this.ticketId
|
|
26114
|
+
});
|
|
26115
|
+
}
|
|
26116
|
+
componentDidRender() {
|
|
26117
|
+
// start custom styling area
|
|
26118
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
26119
|
+
if (this.clientStyling)
|
|
26120
|
+
this.setClientStyling();
|
|
26121
|
+
if (this.clientStylingUrlContent)
|
|
26122
|
+
this.setClientStylingURL();
|
|
26123
|
+
this.limitStylingAppends = true;
|
|
23766
26124
|
}
|
|
23767
|
-
|
|
23768
|
-
})
|
|
23769
|
-
.catch((err) => {
|
|
23770
|
-
reject(err);
|
|
23771
|
-
this.isLoading = false;
|
|
23772
|
-
});
|
|
23773
|
-
});
|
|
23774
|
-
}
|
|
23775
|
-
drawerToggle(index) {
|
|
23776
|
-
this.toggleDrawer = this.toggleDrawer.map((item, itemIndex) => {
|
|
23777
|
-
if (itemIndex == index) {
|
|
23778
|
-
return !item;
|
|
23779
|
-
}
|
|
23780
|
-
return item;
|
|
23781
|
-
});
|
|
23782
|
-
if (index >= this.toggleDrawer.length) {
|
|
23783
|
-
this.toggleDrawer.push(true);
|
|
26125
|
+
// end custom styling area
|
|
23784
26126
|
}
|
|
23785
|
-
|
|
23786
|
-
|
|
23787
|
-
|
|
23788
|
-
return (index.h("p", null, "Loading, please wait ..."));
|
|
23789
|
-
}
|
|
23790
|
-
else if (this.hasErrors) {
|
|
23791
|
-
index.h("p", null, this.errorText);
|
|
23792
|
-
}
|
|
23793
|
-
else {
|
|
23794
|
-
return (index.h("section", { class: "DrawResultsSection", ref: el => this.stylingContainer = el }, this.drawMode ?
|
|
23795
|
-
index.h("div", { class: "DrawResultsArea" }, this.drawData &&
|
|
23796
|
-
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", { "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))))))
|
|
23797
|
-
:
|
|
23798
|
-
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" }, this.gridNumbers.map((grid, index$1) => index.h("div", null, index.h("label", { class: "Label" }, translate('drawNumbersGridTicket', this.language), " ", String.fromCharCode(index$1 + 65), ":"), index.h("div", { class: "BulletContainer" }, index.h("lottery-grid", { "selected-numbers": grid.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.ticketDrawDetails && this.ticketDrawDetails.length > 0 &&
|
|
23799
|
-
index.h("div", { class: "ExpandableBoxes" }, this.ticketDrawDetails.map((drawDetail, index$1) => {
|
|
23800
|
-
var _a, _b, _c, _d, _e;
|
|
23801
|
-
return index.h("div", { class: { 'ExpandableBox': true, 'ShowBox': this.toggleDrawer[index$1] }, onClick: () => this.drawerToggle(index$1) }, index.h("div", { class: "ExpandableBoxHeader" }, index.h("div", { class: "TicketResultContainer" }, index.h("p", null, translate('ticketResult', this.language), ": ", drawDetail.state)), drawDetail.state == 'won' &&
|
|
23802
|
-
index.h("div", { class: "AmountWonContainer" }, index.h("p", null, translate('amountWon', this.language), ": ", Number(drawDetail.amount).toLocaleString('en'), " ", drawDetail.currency)), drawDetail.state == 'lost' &&
|
|
23803
|
-
index.h("div", { class: "DrawIdContainer" }, index.h("p", null, translate('drawId', this.language), ": ", drawDetail.drawId))), index.h("div", { class: "ExpandableBoxBody" }, index.h("div", { class: "DrawIdContainer" }, index.h("p", null, translate('drawId', this.language), ": ", drawDetail.drawId)), index.h("div", { class: "DrawDateContainer" }, index.h("p", null, translate('drawDate', this.language), ": ", (_a = drawDetail.drawData) === null || _a === void 0 ? void 0 :
|
|
23804
|
-
_a.date.slice(0, 10), " | ", (_b = drawDetail.drawData) === null || _b === void 0 ? void 0 :
|
|
23805
|
-
_b.date.slice(11, 19))), index.h("div", { class: "DrawNumbersGrid" }, drawDetail.drawData &&
|
|
23806
|
-
index.h("div", { class: 'BulletContainer' }, index.h("label", { class: "Label" }, translate('drawNumbersGridDraw', this.language), " ", String.fromCharCode(index$1 + 10), ":"), index.h("lottery-grid", { "selected-numbers": (_d = (_c = drawDetail.drawData) === null || _c === void 0 ? void 0 : _c.winningNumbers) === null || _d === void 0 ? void 0 : _d.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), " ", (_e = drawDetail.drawData) === null || _e === void 0 ? void 0 :
|
|
23807
|
-
_e.multiplier))));
|
|
23808
|
-
}))))))));
|
|
26127
|
+
render() {
|
|
26128
|
+
console.log('ticket id:', this.ticketId);
|
|
26129
|
+
return (index.h("div", { key: '203c89c4b240cd7c99eb3d37fa3a4dbc17ed18e3', class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { key: 'ad9801b15a1718ff7470ab3084c4b569ad23f6e3', "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": this.totalControllers !== 1, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { key: 'b9c618987e848d4b44fee6941f8b5c9696bd44e8', slot: "accordionContent" }, index.h("lottery-ticket", { key: '8acdc3d3cce5b654e7cddd71576c2e993881786f', endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
23809
26130
|
}
|
|
23810
|
-
}
|
|
23811
26131
|
};
|
|
23812
|
-
|
|
26132
|
+
LotteryTicketController.style = LotteryTicketControllerStyle0;
|
|
23813
26133
|
|
|
26134
|
+
exports.helper_accordion = HelperAccordion;
|
|
23814
26135
|
exports.helper_filters = HelperFilters;
|
|
26136
|
+
exports.helper_modal = HelperModal;
|
|
26137
|
+
exports.helper_tab = HelperTab;
|
|
26138
|
+
exports.helper_tabs = HelperTabs;
|
|
26139
|
+
exports.lottery_bullet = LotteryBullet;
|
|
23815
26140
|
exports.lottery_draw_results = LotteryDrawResults;
|
|
23816
|
-
|
|
23817
|
-
|
|
26141
|
+
exports.lottery_draw_results_history = LotteryDrawResultsHistory;
|
|
26142
|
+
exports.lottery_game_details = LotteryGameDetails;
|
|
26143
|
+
exports.lottery_game_page = LotteryGamePage;
|
|
26144
|
+
exports.lottery_grid = LotteryGrid;
|
|
26145
|
+
exports.lottery_ticket = LotteryTicket;
|
|
26146
|
+
exports.lottery_ticket_controller = LotteryTicketController;
|