@everymatrix/lottery-game-page 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-accordion.cjs.entry.js +6 -0
- package/dist/cjs/helper-filters_2.cjs.entry.js +60 -0
- package/dist/cjs/helper-pagination.cjs.entry.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +37 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +75 -12
- package/dist/cjs/lottery-game-details.cjs.entry.js +33 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +26 -3
- package/dist/cjs/lottery-game-page.cjs.js +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +54 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +54 -2
- package/dist/collection/utils/locale.utils.js +26 -3
- package/dist/components/helper-accordion2.js +6 -0
- package/dist/components/helper-filters2.js +26 -0
- package/dist/components/helper-pagination.js +12 -0
- package/dist/components/lottery-draw-results-history2.js +80 -14
- package/dist/components/lottery-draw-results2.js +34 -0
- package/dist/components/lottery-game-details2.js +38 -2
- package/dist/components/lottery-game-page.js +26 -3
- package/dist/components/lottery-grid2.js +42 -2
- package/dist/components/lottery-ticket-controller2.js +58 -2
- package/dist/components/lottery-ticket2.js +58 -3
- package/dist/esm/helper-accordion.entry.js +6 -0
- package/dist/esm/helper-filters_2.entry.js +60 -0
- package/dist/esm/helper-pagination.entry.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/lottery-bullet_2.entry.js +37 -1
- package/dist/esm/lottery-draw-results-history.entry.js +75 -12
- package/dist/esm/lottery-game-details.entry.js +33 -1
- package/dist/esm/lottery-game-page.entry.js +26 -3
- package/dist/esm/lottery-game-page.js +1 -1
- package/dist/esm/lottery-ticket-controller.entry.js +54 -1
- package/dist/esm/lottery-ticket.entry.js +54 -2
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-01132729.entry.js +1 -0
- package/dist/lottery-game-page/p-4098d6d4.entry.js +1 -0
- package/dist/lottery-game-page/p-75703176.entry.js +1 -0
- package/dist/lottery-game-page/p-807dda48.entry.js +1 -0
- package/dist/lottery-game-page/p-97048566.entry.js +1 -0
- package/dist/lottery-game-page/p-a21ecd5f.entry.js +1 -0
- package/dist/lottery-game-page/p-b44e49d7.entry.js +1 -0
- package/dist/lottery-game-page/{p-90003eb8.entry.js → p-d1d09322.entry.js} +50 -50
- package/dist/lottery-game-page/p-d91fc066.entry.js +1 -0
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- package/package.json +1 -1
- package/dist/lottery-game-page/p-13d0f256.entry.js +0 -1
- package/dist/lottery-game-page/p-63781a10.entry.js +0 -1
- package/dist/lottery-game-page/p-87298564.entry.js +0 -1
- package/dist/lottery-game-page/p-b49e741d.entry.js +0 -1
- package/dist/lottery-game-page/p-bb028d40.entry.js +0 -1
- package/dist/lottery-game-page/p-c0e7c864.entry.js +0 -1
- package/dist/lottery-game-page/p-d241f927.entry.js +0 -1
- package/dist/lottery-game-page/p-f9740035.entry.js +0 -1
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["lottery-game-page",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[32],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32],"limitStylingAppends":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]],["lottery-bullet_2",[[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"numbers":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-filters_2",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"ticketNumbers":[1,"ticket-numbers"],"sessionId":[1,"session-id"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"isLoading":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32],"ticketData":[32],"ticketDataLoaded":[32],"ticketDraws":[32],"hasDrawNumbers":[32],"limitStylingAppends":[32]}],[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["lottery-draw-results-history",[[1,"lottery-draw-results-history",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfResults":[2,"number-of-results"],"language":[1],"drawData":[32],"displayAllDrawsResults":[32],"showQuickFilters":[32],"winningDataSetsData":[32],"dateFiltersFrom":[32],"dateFiltersTo":[32],"isLoading":[32],"noResults":[32]
|
|
16
|
+
return bootstrapLazy([["lottery-game-page",[[1,"lottery-game-page",{"endpoint":[1],"gameId":[1,"game-id"],"playerId":[2,"player-id"],"sessionId":[1,"session-id"],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[32],"tickets":[32],"tabIndex":[32],"hasErrors":[32],"totalAmount":[32],"successVisible":[32],"deleteVisible":[32],"deleteEventData":[32],"daysRemaining":[32],"hoursRemaining":[32],"minutesRemaining":[32],"secondsRemaining":[32],"latestDraw":[32],"totalWinningsAmount":[32],"nextDate":[32],"isLoggedIn":[32],"loginModalVisible":[32],"limitStylingAppends":[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["helper-pagination",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]],["lottery-bullet_2",[[1,"lottery-grid",{"ticketId":[2,"ticket-id"],"totalNumbers":[2,"total-numbers"],"gameId":[1,"game-id"],"maximumAllowed":[2,"maximum-allowed"],"minimumAllowed":[2,"minimum-allowed"],"selectable":[4],"selectedNumbers":[1,"selected-numbers"],"displaySelected":[4,"display-selected"],"language":[1],"gridIndex":[2,"grid-index"],"gridType":[1,"grid-type"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"numbers":[32],"limitStylingAppends":[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{"value":[1],"selectable":[4],"isSelected":[4,"is-selected"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-filters_2",[[1,"lottery-draw-results",{"endpoint":[1],"gameId":[1,"game-id"],"language":[1],"playerId":[1,"player-id"],"drawMode":[4,"draw-mode"],"drawId":[1,"draw-id"],"gameName":[1,"game-name"],"ticketDate":[1,"ticket-date"],"ticketStatus":[1,"ticket-status"],"ticketId":[1,"ticket-id"],"ticketAmount":[1,"ticket-amount"],"ticketMultiplier":[4,"ticket-multiplier"],"ticketDrawCount":[2,"ticket-draw-count"],"ticketNumbers":[1,"ticket-numbers"],"sessionId":[1,"session-id"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"isLoading":[32],"rules":[32],"toggleDrawer":[32],"hasErrors":[32],"errorText":[32],"ticketData":[32],"ticketDataLoaded":[32],"ticketDraws":[32],"hasDrawNumbers":[32],"limitStylingAppends":[32]}],[1,"helper-filters",{"showFilterId":[4,"show-filter-id"],"activateTicketSearch":[4,"activate-ticket-search"],"gameId":[1,"game-id"],"playerId":[1,"player-id"],"session":[1],"postMessage":[4,"post-message"],"language":[1],"quickFiltersActive":[4,"quick-filters-active"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showFilterModal":[32],"showClearButton":[32],"filterData":[32],"filterDataReset":[32],"limitStylingAppends":[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["lottery-draw-results-history",[[1,"lottery-draw-results-history",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfResults":[2,"number-of-results"],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"drawData":[32],"displayAllDrawsResults":[32],"showQuickFilters":[32],"winningDataSetsData":[32],"dateFiltersFrom":[32],"dateFiltersTo":[32],"isLoading":[32],"noResults":[32],"limitStylingAppends":[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["lottery-ticket",[[1,"lottery-ticket",{"endpoint":[1],"gameId":[1,"game-id"],"numberOfGrids":[2,"number-of-grids"],"multipleDraws":[4,"multiple-draws"],"ticketId":[2,"ticket-id"],"resetButton":[4,"reset-button"],"autoPick":[4,"auto-pick"],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"multiplier":[32],"numberOfDraws":[32],"isLoading":[32],"hasErrors":[32],"ticketDone":[32],"isCustomSelect":[32],"amountInfo":[32],"limitStylingAppends":[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["lottery-ticket-controller",[[1,"lottery-ticket-controller",{"endpoint":[1],"ticketId":[2,"ticket-id"],"ticketDescription":[1,"ticket-description"],"gameId":[1,"game-id"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"numberOfGrids":[2,"number-of-grids"],"last":[4],"language":[1],"autoPick":[4,"auto-pick"],"resetButton":[4,"reset-button"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["helper-tabs",[[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-accordion",[[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}]]],["helper-tab",[[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]],["lottery-game-details",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-modal",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-0f8edfd2.js';
|
|
2
2
|
|
|
3
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
5
|
+
const TRANSLATIONS = {
|
|
6
|
+
en: {
|
|
7
|
+
ticket: 'Ticket',
|
|
8
|
+
},
|
|
9
|
+
ro: {
|
|
10
|
+
ticket: 'Bilet',
|
|
11
|
+
},
|
|
12
|
+
fr: {
|
|
13
|
+
ticket: 'Billet'
|
|
14
|
+
},
|
|
15
|
+
ar: {
|
|
16
|
+
ticket: 'تذكرة',
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const translate = (key, customLang) => {
|
|
20
|
+
const lang = customLang;
|
|
21
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
22
|
+
};
|
|
23
|
+
|
|
3
24
|
const lotteryTicketControllerCss = ":host{display:block}";
|
|
4
25
|
|
|
5
26
|
const LotteryTicketController = class {
|
|
@@ -46,6 +67,27 @@ const LotteryTicketController = class {
|
|
|
46
67
|
* Shows the reset button
|
|
47
68
|
*/
|
|
48
69
|
this.resetButton = false;
|
|
70
|
+
/**
|
|
71
|
+
* Client custom styling via string
|
|
72
|
+
*/
|
|
73
|
+
this.clientStyling = '';
|
|
74
|
+
/**
|
|
75
|
+
* Client custom styling via url content
|
|
76
|
+
*/
|
|
77
|
+
this.clientStylingUrlContent = '';
|
|
78
|
+
this.limitStylingAppends = false;
|
|
79
|
+
this.setClientStyling = () => {
|
|
80
|
+
let sheet = document.createElement('style');
|
|
81
|
+
sheet.innerHTML = this.clientStyling;
|
|
82
|
+
this.stylingContainer.prepend(sheet);
|
|
83
|
+
};
|
|
84
|
+
this.setClientStylingURL = () => {
|
|
85
|
+
let cssFile = document.createElement('style');
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
88
|
+
this.stylingContainer.prepend(cssFile);
|
|
89
|
+
}, 1);
|
|
90
|
+
};
|
|
49
91
|
}
|
|
50
92
|
// @TODO fix the `any` type
|
|
51
93
|
helperAccordionActionHandler() {
|
|
@@ -56,8 +98,19 @@ const LotteryTicketController = class {
|
|
|
56
98
|
ticketId: this.ticketId
|
|
57
99
|
});
|
|
58
100
|
}
|
|
101
|
+
componentDidRender() {
|
|
102
|
+
// start custom styling area
|
|
103
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
104
|
+
if (this.clientStyling)
|
|
105
|
+
this.setClientStyling();
|
|
106
|
+
if (this.clientStylingUrlContent)
|
|
107
|
+
this.setClientStylingURL();
|
|
108
|
+
this.limitStylingAppends = true;
|
|
109
|
+
}
|
|
110
|
+
// end custom styling area
|
|
111
|
+
}
|
|
59
112
|
render() {
|
|
60
|
-
return (h("div",
|
|
113
|
+
return (h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": true, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { slot: "accordionContent" }, h("lottery-ticket", { 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 })))));
|
|
61
114
|
}
|
|
62
115
|
};
|
|
63
116
|
LotteryTicketController.style = lotteryTicketControllerCss;
|
|
@@ -23,6 +23,26 @@ const TRANSLATIONS = {
|
|
|
23
23
|
resetButton: 'Reseteaza',
|
|
24
24
|
autoButton: 'Ma simt norocos'
|
|
25
25
|
},
|
|
26
|
+
fr: {
|
|
27
|
+
loading: 'Loading, please wait ...',
|
|
28
|
+
error: 'It was an error while trying to fetch the data',
|
|
29
|
+
grid: 'Grid',
|
|
30
|
+
multiplier: 'Multiplier',
|
|
31
|
+
numberOfDraws: 'Number of draws',
|
|
32
|
+
wagerPerDraw: 'Wager per draw',
|
|
33
|
+
resetButton: 'Reset',
|
|
34
|
+
autoButton: 'I feel lucky'
|
|
35
|
+
},
|
|
36
|
+
ar: {
|
|
37
|
+
loading: 'Loading, please wait ...',
|
|
38
|
+
error: 'It was an error while trying to fetch the data',
|
|
39
|
+
grid: 'Grid',
|
|
40
|
+
multiplier: 'Multiplier',
|
|
41
|
+
numberOfDraws: 'Number of draws',
|
|
42
|
+
wagerPerDraw: 'Wager per draw',
|
|
43
|
+
resetButton: 'Reset',
|
|
44
|
+
autoButton: 'I feel lucky'
|
|
45
|
+
}
|
|
26
46
|
};
|
|
27
47
|
const translate = (key, customLang) => {
|
|
28
48
|
const lang = customLang;
|
|
@@ -59,6 +79,14 @@ const LotteryTicket = class {
|
|
|
59
79
|
* Language
|
|
60
80
|
*/
|
|
61
81
|
this.language = 'en';
|
|
82
|
+
/**
|
|
83
|
+
* Client custom styling via string
|
|
84
|
+
*/
|
|
85
|
+
this.clientStyling = '';
|
|
86
|
+
/**
|
|
87
|
+
* Client custom styling via url content
|
|
88
|
+
*/
|
|
89
|
+
this.clientStylingUrlContent = '';
|
|
62
90
|
this.multiplier = false;
|
|
63
91
|
this.numberOfDraws = 1;
|
|
64
92
|
this.isLoading = true;
|
|
@@ -66,6 +94,19 @@ const LotteryTicket = class {
|
|
|
66
94
|
this.ticketDone = false;
|
|
67
95
|
this.isCustomSelect = false;
|
|
68
96
|
this.amountInfo = {};
|
|
97
|
+
this.limitStylingAppends = false;
|
|
98
|
+
this.setClientStyling = () => {
|
|
99
|
+
let sheet = document.createElement('style');
|
|
100
|
+
sheet.innerHTML = this.clientStyling;
|
|
101
|
+
this.stylingContainer.prepend(sheet);
|
|
102
|
+
};
|
|
103
|
+
this.setClientStylingURL = () => {
|
|
104
|
+
let cssFile = document.createElement('style');
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
107
|
+
this.stylingContainer.prepend(cssFile);
|
|
108
|
+
}, 1);
|
|
109
|
+
};
|
|
69
110
|
}
|
|
70
111
|
/**
|
|
71
112
|
* @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
|
|
@@ -99,6 +140,17 @@ const LotteryTicket = class {
|
|
|
99
140
|
console.error('Error!', err);
|
|
100
141
|
});
|
|
101
142
|
}
|
|
143
|
+
componentDidRender() {
|
|
144
|
+
// start custom styling area
|
|
145
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
146
|
+
if (this.clientStyling)
|
|
147
|
+
this.setClientStyling();
|
|
148
|
+
if (this.clientStylingUrlContent)
|
|
149
|
+
this.setClientStylingURL();
|
|
150
|
+
this.limitStylingAppends = true;
|
|
151
|
+
}
|
|
152
|
+
// end custom styling area
|
|
153
|
+
}
|
|
102
154
|
multiplierChangeHandler(e) {
|
|
103
155
|
this.multiplier = e.target ? e.target.checked : false;
|
|
104
156
|
this.multiplierChange.emit(this.multiplier);
|
|
@@ -147,9 +199,9 @@ const LotteryTicket = class {
|
|
|
147
199
|
}
|
|
148
200
|
else {
|
|
149
201
|
const { rules } = this.gameData;
|
|
150
|
-
return (h("div", { class: "TicketContainer" }, h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
202
|
+
return (h("div", { class: "TicketContainer", ref: el => this.stylingContainer = el }, h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
151
203
|
h("div", { class: "ButtonContainer" }, h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate('resetButton', this.language))), this.autoPick && !this.ticketDone &&
|
|
152
|
-
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))), this.grids.map((item, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate('grid', this.language), " ", item), h("lottery-grid", { "grid-index": index, "maximum-allowed": rules.boards[index].maximumAllowed, "minimum-allowed": rules.boards[index].minimumAllowed, "total-numbers": rules.boards[index].totalNumbers, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language }))), rules.multiplier &&
|
|
204
|
+
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))), this.grids.map((item, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate('grid', this.language), " ", item), h("lottery-grid", { "grid-index": index, "maximum-allowed": rules.boards[index].maximumAllowed, "minimum-allowed": rules.boards[index].minimumAllowed, "total-numbers": rules.boards[index].totalNumbers, 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 }))), rules.multiplier &&
|
|
153
205
|
h("div", null, h("label", { class: "Toggle" }, h("label", { class: "Label" }, translate('multiplier', this.language), ": "), h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
154
206
|
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("div", null, h("label", { class: "Label" }, translate('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" }, rules.stakes.length > 1 ?
|
|
155
207
|
(h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.amount, " ", this.amountInfo.currency), h("span", { "data-cluster": "SelectComponent", class: "SelectExpand" }, "\u25BC")), h("div", { "data-cluster": "SelectComponent", class: "SelectContent" }, h("ul", { "data-cluster": "SelectComponent", class: "SelectOptions" }, rules.stakes.map((item) => h("li", { "data-cluster": "SelectComponent", class: this.amountInfo.amount == item.amount ? 'SelectedValue' : '', value: item.amount, onClick: () => this.setDropdownItem(item) }, item.amount, " ", item.currency)))))) : (h("div", null, h("input", { min: "1", value: rules.stakes[0].amount, type: "number", disabled: true }), h("p", { class: "WagerInputTitle" }, rules.stakes[0].currency)))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as t,b as e}from"./p-b4e2988a.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),t(i)})().then((t=>e([["p-75703176",[[1,"lottery-game-page",{endpoint:[1],gameId:[1,"game-id"],playerId:[2,"player-id"],sessionId:[1,"session-id"],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[32],tickets:[32],tabIndex:[32],hasErrors:[32],totalAmount:[32],successVisible:[32],deleteVisible:[32],deleteEventData:[32],daysRemaining:[32],hoursRemaining:[32],minutesRemaining:[32],secondsRemaining:[32],latestDraw:[32],totalWinningsAmount:[32],nextDate:[32],isLoggedIn:[32],loginModalVisible:[32],limitStylingAppends:[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["p-a21ecd5f",[[1,"helper-pagination",{firstPage:[1540,"first-page"],previousPage:[1540,"previous-page"],offset:[1538],limit:[1538],total:[1538],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],offsetInt:[32],lastPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]],["p-97048566",[[1,"lottery-grid",{ticketId:[2,"ticket-id"],totalNumbers:[2,"total-numbers"],gameId:[1,"game-id"],maximumAllowed:[2,"maximum-allowed"],minimumAllowed:[2,"minimum-allowed"],selectable:[4],selectedNumbers:[1,"selected-numbers"],displaySelected:[4,"display-selected"],language:[1],gridIndex:[2,"grid-index"],gridType:[1,"grid-type"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[1],selectable:[4],isSelected:[4,"is-selected"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-d1d09322",[[1,"lottery-draw-results",{endpoint:[1],gameId:[1,"game-id"],language:[1],playerId:[1,"player-id"],drawMode:[4,"draw-mode"],drawId:[1,"draw-id"],gameName:[1,"game-name"],ticketDate:[1,"ticket-date"],ticketStatus:[1,"ticket-status"],ticketId:[1,"ticket-id"],ticketAmount:[1,"ticket-amount"],ticketMultiplier:[4,"ticket-multiplier"],ticketDrawCount:[2,"ticket-draw-count"],ticketNumbers:[1,"ticket-numbers"],sessionId:[1,"session-id"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],multiplier:[32],isLoading:[32],rules:[32],toggleDrawer:[32],hasErrors:[32],errorText:[32],ticketData:[32],ticketDataLoaded:[32],ticketDraws:[32],hasDrawNumbers:[32],limitStylingAppends:[32]}],[1,"helper-filters",{showFilterId:[4,"show-filter-id"],activateTicketSearch:[4,"activate-ticket-search"],gameId:[1,"game-id"],playerId:[1,"player-id"],session:[1],postMessage:[4,"post-message"],language:[1],quickFiltersActive:[4,"quick-filters-active"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showFilterModal:[32],showClearButton:[32],filterData:[32],filterDataReset:[32],limitStylingAppends:[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["p-01132729",[[1,"lottery-draw-results-history",{endpoint:[1],gameId:[1,"game-id"],numberOfResults:[2,"number-of-results"],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],drawData:[32],displayAllDrawsResults:[32],showQuickFilters:[32],winningDataSetsData:[32],dateFiltersFrom:[32],dateFiltersTo:[32],isLoading:[32],noResults:[32],limitStylingAppends:[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["p-d91fc066",[[1,"lottery-ticket",{endpoint:[1],gameId:[1,"game-id"],numberOfGrids:[2,"number-of-grids"],multipleDraws:[4,"multiple-draws"],ticketId:[2,"ticket-id"],resetButton:[4,"reset-button"],autoPick:[4,"auto-pick"],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],multiplier:[32],numberOfDraws:[32],isLoading:[32],hasErrors:[32],ticketDone:[32],isCustomSelect:[32],amountInfo:[32],limitStylingAppends:[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["p-807dda48",[[1,"lottery-ticket-controller",{endpoint:[1],ticketId:[2,"ticket-id"],ticketDescription:[1,"ticket-description"],gameId:[1,"game-id"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],numberOfGrids:[2,"number-of-grids"],last:[4],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["p-07f98587",[[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-b44e49d7",[[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showContent:[32],limitStylingAppends:[32]}]]],["p-800590f3",[[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]],["p-4098d6d4",[[1,"lottery-game-details",{clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-e816baee",[[1,"helper-modal",{titleModal:[1,"title-modal"],visible:[1540],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s}from"./p-b4e2988a.js";const e=["ro","en","fr","ar"],i={en:{drawResultsHeader:"Draw results history",drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridA:"Draw numbers Grid A",viewAllResults:"View All",lastFiveDraws:"Last 5 Draws",lastTenDraws:"Last 10 Draws",lastFifteenDraws:"Last 15 Draws",allDrawResultsHistory:"All Draw Results History",noResults:"No results",fetchingResults:"Fetching results"},ro:{drawResultsHeader:"Istoricul extragerilor",drawId:"ID-ul extragerii",drawDate:"Data extragerii",drawNumbersGridA:"Numerele extrase Grid A",viewAllResults:"Vezi toate rezultatele",lastFiveDraws:"Ultimile 5 extrageri",lastTenDraws:"Ultimile 10 extrageri",lastFifteenDraws:"Ultimile 15 extrageri",allDrawResultsHistory:"Istoricul tuturor extragerilor",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridA:"Tirage des numéros Grille",viewAllResults:"Voir tout",lastFiveDraws:"5 derniers tirages",lastTenDraws:"10 derniers tirages",lastFifteenDraws:"15 derniers tirages",allDrawResultsHistory:"Historique des résultats de tous les tirages",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridA:"شبكة أرقام السحب",viewAllResults:"عرض الكل",lastFiveDraws:"آخر 5 سحوبات",lastTenDraws:"آخر 10 سحوبات",lastFifteenDraws:"آخر 15 سحبًا",allDrawResultsHistory:"سجل نتائج كل السحوبات",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"}},r=(t,s)=>{const r=s;return i[void 0!==r&&e.includes(r)?r:"en"][t]},a=class{constructor(s){t(this,s),this.numberOfResults=3,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.drawData=[],this.displayAllDrawsResults=!0,this.showQuickFilters=!0,this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.limitStylingAppends=!1,this.getDrawsData=(t=!1)=>{let s=t?new URL(`${this.endpoint}/games/${this.gameId}/draws`):new URL(`${this.endpoint}/games/${this.gameId}`);this.dateFiltersFrom&&s.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&s.searchParams.append("to",this.dateFiltersTo),fetch(s.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((s=>{this.isLoading=!1,this.winningDataSetsData=t?s.items.filter((t=>t.winningNumbers)):s.draws.filter((t=>t.winningNumbers)),this.drawData=this.winningDataSetsData.map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.filterResults=t=>{this.numberOfResults=t,this.displayAllDrawsResults=!0},this.getDrawResults=t=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);fetch(s.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json())).then((t=>{this.drawData=[t].map((t=>t)),this.isLoading=!1}))},this.viewAllResults=()=>{this.numberOfResults=this.drawData.length,this.displayAllDrawsResults=!1,window.scrollTo({top:0,behavior:"smooth"})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}filtersHandler(t){this.showQuickFilters=!1,this.isLoading=!0,t.detail.ticketDrawId?this.getDrawResults(t.detail.ticketDrawId):(this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.getDrawsData(!0))}clearFiltersHandler(){this.drawData=this.winningDataSetsData,this.showQuickFilters=!0,this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!0,this.getDrawsData(!1)}connectedCallback(){this.showQuickFilters&&this.getDrawsData(!1)}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("div",{class:"DrawResultsHeader"},this.displayAllDrawsResults?s("h4",null,r("drawResultsHeader",this.language)):[s("div",{class:"DrawResultsHeaderContent"},s("h4",null,r("allDrawResultsHistory",this.language)),s("div",{class:"FilterSection"},this.showQuickFilters&&s("div",{class:"FilterResultsContainer"},s("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(5)},r("lastFiveDraws",this.language)),s("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(10)},r("lastTenDraws",this.language)),s("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(15)},r("lastFifteenDraws",this.language))),s("helper-filters",{"show-filter-id":"true","activate-ticket-search":"false","game-id":this.gameId,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))]);return s("section",{class:"GridWrapper",ref:t=>this.stylingContainer=t},s("div",{class:"DrawResultsSection"},s("div",{class:"DrawResultsAreaHistory"},t,s("div",{class:"HistoryGridWrapper"},s("div",{class:"HistoryGrid"},this.isLoading&&s("p",null,r("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>s("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))).reverse().slice(0,this.numberOfResults),!this.isLoading&&this.noResults&&s("p",null,r("noResults",this.language)))),this.displayAllDrawsResults&&s("button",{class:"ViewAllResults",onClick:this.viewAllResults},r("viewAllResults",this.language)))))}};a.style='@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}.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}';export{a as lottery_draw_results_history}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s}from"./p-b4e2988a.js";const i=class{constructor(s){t(this,s),this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{"header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};i.style=":host{display:block}";export{i as lottery_game_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-b4e2988a.js";const a=["ro","en","fr","ar"],r={en:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Last Draw Results",modalLogin:"Please login to submit a ticket"},ro:{error:"Eroare",title:"Loto 6/49",backButton:"Inapoi",lobbyButton:"Lobby",prize:"MARELE JACKPOT OMG",winUpTo:"Castiga pana la",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",createTicket:"Creeaza bilet",modalSuccess:"Achizitie efectuata cu succes",deleteTicketModalTitle:"Sterge biletul",deleteTicketModalText:"Esti sigur ca vrei sa stergi acest bilet?",deleteTicketModalCancel:"Anuleaza",deleteTicketModalConfirm:"Sterge",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",lastDrawResultsTitle:"Cele mai recente extrageri",modalLogin:"Please login to submit a ticket"},fr:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Résultats du dernier tirage",modalLogin:"Please login to submit a ticket"},ar:{error:"خطأ",title:"كرونو",backButton:"خلف",lobbyButton:"ردهة",prize:"جائزة",winUpTo:"الفوز بما يصل الى",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",createTicket:"إنشاء تذكرة",modalSuccess:"!سيتم الشراء بنجاح قريبًا",deleteTicketModalTitle:"حذف التذكرة",deleteTicketModalText:"هل أنت متأكد أنك تريد حذف هذه التذكرة؟",deleteTicketModalCancel:"يلغي",deleteTicketModalConfirm:"حذف",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",lastDrawResultsTitle:"نتائج آخر سحب",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة"}},s=(t,e)=>{const i=e;return r[void 0!==i&&a.includes(i)?i:"en"][t]},n=class{constructor(e){t(this,e),this.language="en",this.autoPick=!1,this.resetButton=!1,this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.tickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.deleteVisible=!1,this.latestDraw={},this.totalWinningsAmount=0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.limitStylingAppends=!1,this.multiplier=!1,this.quickPick=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingurl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStylingUrlContent=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)}))}}connectedCallback(){this.getGameDetails(),this.getDraws(),console.log(this.language),this.sessionId&&(this.isLoggedIn=!0)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingurl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}countdownLogic(t){this.interval=setInterval((()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)}),1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.gameData=t,this.basicStake=this.gameData.rules.stakes[0].amount;let e=this.gameData.draws.filter((t=>!t.winningNumbers));this.nextDraw=e[0].id,this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.tickets.forEach((t=>{t.completed&&(this.totalAmount+=t.amount*t.stake)})),this.currency=t}gridFilledHandler(t){this.tickets=this.tickets.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];return i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10))),{gameId:e.gameId,ticketId:e.ticketId,completed:!0,amount:t.detail.draws,stake:e.stake,selectedNumbers:i}}return e})),this.calculateTotalAmount()}gridDirtyHandler(t){this.tickets=this.tickets.map((e=>e.gameId==t.detail.id?{gameId:e.gameId,ticketId:e.ticketId,completed:!1,amount:e.amount,stake:e.stake,grids:[]}:e))}deleteTicketHandler(t){this.deleteVisible=!0,this.deleteEventData=t}modalCloseEvent(){this.deleteVisible=!1,this.loginModalVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.tickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){this.multiplier=t.detail}getDraws(){let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);fetch(t.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json())).then((t=>{var e;let i=t.items.filter((t=>{if(Date.parse(t.date)>(new Date).getTime())return!t.winningNumbers})),a=t.items.filter((t=>t.winningNumbers));this.latestDraw=i[0],this.nextDate=this.latestDraw.date,this.countdownLogic(this.nextDate),this.lastDrawId=a[a.length-1].id,null===(e=this.latestDraw)||void 0===e||e.prizes.forEach((t=>{this.totalWinningsAmount+=JSON.parse(t.amount)}))}))}confirmDeleteTicketHandler(t){this.tickets=this.tickets.filter((e=>e.ticketId!=t.detail.ticketId)),this.calculateTotalAmount(),this.deleteVisible=!1}createNewTicket(){this.tickets=[...this.tickets,{gameId:this.gameId,ticketId:this.tickets.length+1,completed:!1,amount:1,stake:this.basicStake,grids:[]}]}showLoginModal(){this.loginModalVisible=!0}submitTickets(){let t=new URL(`${this.endpoint}/tickets`),e={gameId:this.gameId,tickets:[]};this.tickets.forEach((t=>{e.tickets.push({startingDrawId:this.nextDraw,amount:t.stake,gameId:this.gameId,currency:this.currency,selection:t.selectedNumbers,multiplier:this.multiplier,drawCount:t.amount,quickPick:this.quickPick})}));let i={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`},body:JSON.stringify(e)};fetch(t.href,i).then((t=>{if(t.status>300)throw new Error("err");return t.json()})).then((t=>{console.log("data",t)})),this.successVisible=!0}render(){return this.hasErrors?e("div",{class:"GamePage"},e("div",{class:"Title"},s("error",this.language))):e("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},e("div",{class:"GridBanner"},e("div",{class:"BannerButtonsWrapper"},e("button",{class:"BannerBackButton"},e("span",{class:"BannerBackButtonArrow"},"ᐸ "),s("backButton",this.language)),e("button",{class:"BannerLobbyButton"},s("lobbyButton",this.language))),e("div",{class:"Tabs"},e("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},s("buy",this.language)),e("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},s("viewLatest",this.language)))),e("div",{class:"NextDrawWrapper"},e("div",{class:"TotalWinnings"},s("winUpTo",this.language),": ",e("span",null,"$",this.totalWinningsAmount.toLocaleString("en-US",{maximumFractionDigits:2}))),e("div",{class:"NextDraw"},e("p",{class:"BannerText"},s("nextDraw",this.language)),e("div",{class:"BannerCountdown"},e("span",{class:"CountdownDays"},this.daysRemaining,"D"),e("span",{class:"CountdownHours"},this.hoursRemaining,"H"),e("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),e("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&e("div",{class:"GamePageContent"},e("div",{class:"GameDetails"},e("lottery-game-details",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),e("div",{class:"TicketsWrapper"},this.tickets.map((t=>e("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":this.autoPick,"reset-button":this.resetButton,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),e("div",{class:"CreateNewTicket"},e("button",{onClick:()=>this.createNewTicket()},"+"),e("span",null,s("createTicket",this.language)))),e("div",{class:"OrderSummary"},e("h3",{class:"OrderSummaryTitle"},s("orderSummaryTitle",this.language)),e("div",{class:"Ticket"},s("orderSummaryTickets",this.language),": ",e("span",null,this.tickets.length)),e("div",{class:"Total"},s("orderSummaryTotal",this.language),": ",e("span",null,this.totalAmount," ",this.currency)),e("div",{class:"ButtonWrapper"},this.isLoggedIn&&e("span",{class:"Button",onClick:()=>this.submitTickets()},s("orderSummarySubmit",this.language)),!this.isLoggedIn&&e("div",null,e("span",{class:"Button",onClick:()=>this.showLoginModal()},s("orderSummarySubmit",this.language)),e("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("p",{class:"SubmitModalSuccess"},s("modalLogin",this.language))))))),1==this.tabIndex&&e("div",null,e("h4",{class:"LastDrawResultsTitle"},s("lastDrawResultsTitle",this.language)),e("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"draw-id":this.lastDrawId,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}),e("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),e("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("p",{class:"SubmitModalSuccess"},s("modalSuccess",this.language))),e("helper-modal",{"title-modal":"Delete Ticket",visible:this.deleteVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("div",{class:"DeleteTicketModalWrapper"},e("h3",{class:"DeleteTicketModalTitle"},s("deleteTicketModalTitle",this.language)),e("p",{class:"DeleteTicketModalText"},s("deleteTicketModalText",this.language)),e("div",{class:"DeleteTicketModalButtons"},e("button",{class:"DeleteTicketModalCancel",onClick:()=>this.modalCloseEvent()},s("deleteTicketModalCancel",this.language)),e("button",{class:"DeleteTicketModalConfirm",onClick:()=>this.confirmDeleteTicketHandler(this.deleteEventData)},s("deleteTicketModalConfirm",this.language))))))}static get assetsDirs(){return["static"]}get element(){return i(this)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;border-bottom:solid 1px #D4D4D4;line-height:50px}.OrderSummary .Ticket span{text-align:right}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';export{n as lottery_game_page}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-b4e2988a.js";const s=["ro","en","fr","ar"],h={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"}},n=(t,i)=>{const e=i;return h[void 0!==e&&s.includes(e)?e:"en"][t]},o=class{constructor(e){t(this,e),this.deleteTicketEvent=i(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return e("div",{class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},e("helper-accordion",{"header-title":`${n("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":!0,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("div",{slot:"accordionContent"},e("lottery-ticket",{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}))))}};o.style=":host{display:block}";export{o as lottery_ticket_controller}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-b4e2988a.js";const i=class{constructor(s){t(this,s),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};i.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const r=class{constructor(s){t(this,s),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.totalNumbers=0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1)).sort((()=>.5-Math.random()));e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return s("div",{class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};r.style='@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}';export{i as lottery_bullet,r as lottery_grid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-b4e2988a.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),a=["ro","en"],o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"}},n=(t,i)=>{const s=i;return o[void 0!==s&&a.includes(s)?s:"en"][t]},h=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.firstPage=!1,this.previousPage=!1,this.offset=0,this.limit=1,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.pagesArray=[],this.endInt=0,this.userAgent=window.navigator.userAgent,this.currentPage=1,this.limitStylingAppends=!1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=10;break;case"nextPage":this.offsetInt+=10;break;case"fivePagesBack":this.offsetInt-=30,this.offsetInt=this.offsetInt<0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=30,this.offsetInt=this.offsetInt/10>=this.endInt?10*this.endInt:this.offsetInt}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):this.offsetInt=1===t?t-1:10*(t-1),this.currentPage=this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentWillRender(){this.offsetInt=this.offset,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1===this.currentPage||2===this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"firstPage")},n("firstPage",this.language)),s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language)));e(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language))));let a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)),s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"lastPage")},n("lastPage",this.language)));return e(this.userAgent)&&(a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)))),s("div",{id:"PaginationContainer"},i,t,a)}};h.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin-top:20px;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:12px}}@media screen and (max-width: 480px){button{width:70px;font-size:10px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:10px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';export{h as helper_pagination}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-b4e2988a.js";const s=["ro","en"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';export{r as helper_accordion}
|