@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
|
@@ -31,6 +31,32 @@ const TRANSLATIONS$1 = {
|
|
|
31
31
|
filterModalButton: 'Cauta',
|
|
32
32
|
filterOrDate: 'sau cauta dupa data'
|
|
33
33
|
},
|
|
34
|
+
fr: {
|
|
35
|
+
filterOpen: 'Filter',
|
|
36
|
+
filterClear: 'Clear',
|
|
37
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
38
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
39
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
40
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
41
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
42
|
+
filterModalButton: 'Search',
|
|
43
|
+
filterFromCalendar: 'From',
|
|
44
|
+
filterToCalendar: 'To',
|
|
45
|
+
filterOrDate: 'or search by date'
|
|
46
|
+
},
|
|
47
|
+
ar: {
|
|
48
|
+
filterOpen: 'Filter',
|
|
49
|
+
filterClear: 'Clear',
|
|
50
|
+
filterModalTicketTitle: 'Ticket Results',
|
|
51
|
+
filterModalDrawTitle: 'Draws Results History',
|
|
52
|
+
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
53
|
+
filterDrawPlaceholder: 'Search for a draw ID',
|
|
54
|
+
filterDateRangePlaceholder: 'Date Range',
|
|
55
|
+
filterModalButton: 'Search',
|
|
56
|
+
filterFromCalendar: 'From',
|
|
57
|
+
filterToCalendar: 'To',
|
|
58
|
+
filterOrDate: 'or search by date'
|
|
59
|
+
}
|
|
34
60
|
};
|
|
35
61
|
const translate$2 = (key, customLang) => {
|
|
36
62
|
const lang = customLang;
|
|
@@ -22394,6 +22420,40 @@ const TRANSLATIONS = {
|
|
|
22394
22420
|
ticketAmount: 'Valoarea biletului',
|
|
22395
22421
|
winUpTo: 'Poti castiga'
|
|
22396
22422
|
},
|
|
22423
|
+
fr: {
|
|
22424
|
+
drawResultsHeader: 'Résultats du dernier tirage',
|
|
22425
|
+
drawId: 'ID de tirage',
|
|
22426
|
+
drawName: 'Nom du jeu',
|
|
22427
|
+
drawDate: 'Date du tirage',
|
|
22428
|
+
drawNumbersGridDraw: 'Tirage des numéros Grille',
|
|
22429
|
+
drawNumbersGridTicket: 'Tirage des numéros Grille',
|
|
22430
|
+
ticketResult: 'Résultat du ticket',
|
|
22431
|
+
amountWon: 'Montant gagné',
|
|
22432
|
+
numberOfDraws: 'Nombre de tirages',
|
|
22433
|
+
multiplier: 'Multiplicateur',
|
|
22434
|
+
ticketPurchaseDate: 'Date d\'achat du billet',
|
|
22435
|
+
ticketStatus: 'Statut du ticket',
|
|
22436
|
+
ticketId: 'ID de billets',
|
|
22437
|
+
ticketAmount: 'Montant du billet',
|
|
22438
|
+
winUpTo: 'Gagnez jusqu\'à'
|
|
22439
|
+
},
|
|
22440
|
+
ar: {
|
|
22441
|
+
drawResultsHeader: 'نتائج آخر سحب',
|
|
22442
|
+
drawId: 'معرّف السحب',
|
|
22443
|
+
drawName: 'اسم اللعبة',
|
|
22444
|
+
drawDate: 'تاريخ السحب',
|
|
22445
|
+
drawNumbersGridDraw: 'شبكة أرقام السحب',
|
|
22446
|
+
drawNumbersGridTicket: 'شبكة أرقام السحب',
|
|
22447
|
+
ticketResult: 'نتيجة التذكرة',
|
|
22448
|
+
amountWon: 'المبلغ الذي تم ربحه',
|
|
22449
|
+
numberOfDraws: 'عدد السحوبات',
|
|
22450
|
+
multiplier: 'مضاعف',
|
|
22451
|
+
ticketPurchaseDate: 'تاريخ شراء التذكرة',
|
|
22452
|
+
ticketStatus: 'حالة التذكرة',
|
|
22453
|
+
ticketId: 'معرّف التذكرة',
|
|
22454
|
+
ticketAmount: 'مبلغ التذكرة',
|
|
22455
|
+
winUpTo: 'ربح يصل إلى'
|
|
22456
|
+
}
|
|
22397
22457
|
};
|
|
22398
22458
|
const translate = (key, customLang) => {
|
|
22399
22459
|
const lang = customLang;
|
|
@@ -32,6 +32,18 @@ const TRANSLATIONS = {
|
|
|
32
32
|
nextPage: 'Urmatoarea',
|
|
33
33
|
lastPage: 'Ultima'
|
|
34
34
|
},
|
|
35
|
+
fr: {
|
|
36
|
+
firstPage: 'First',
|
|
37
|
+
previousPage: 'Previous',
|
|
38
|
+
nextPage: 'Next',
|
|
39
|
+
lastPage: 'Last'
|
|
40
|
+
},
|
|
41
|
+
ar: {
|
|
42
|
+
firstPage: 'First',
|
|
43
|
+
previousPage: 'Previous',
|
|
44
|
+
nextPage: 'Next',
|
|
45
|
+
lastPage: 'Last'
|
|
46
|
+
}
|
|
35
47
|
};
|
|
36
48
|
const translate = (key, customLang) => {
|
|
37
49
|
const lang = customLang;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["lottery-game-page.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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]
|
|
17
|
+
return index.bootstrapLazy([["lottery-game-page.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -105,8 +105,33 @@ const LotteryGrid = class {
|
|
|
105
105
|
* Language
|
|
106
106
|
*/
|
|
107
107
|
this.language = 'en';
|
|
108
|
+
/**
|
|
109
|
+
* Personalize grid for ticket
|
|
110
|
+
*/
|
|
111
|
+
this.gridType = '';
|
|
112
|
+
/**
|
|
113
|
+
* Client custom styling via string
|
|
114
|
+
*/
|
|
115
|
+
this.clientStyling = '';
|
|
116
|
+
/**
|
|
117
|
+
* Client custom styling via url content
|
|
118
|
+
*/
|
|
119
|
+
this.clientStylingUrlContent = '';
|
|
108
120
|
this.numbers = [];
|
|
121
|
+
this.limitStylingAppends = false;
|
|
109
122
|
this.selectedCounter = 0;
|
|
123
|
+
this.setClientStyling = () => {
|
|
124
|
+
let sheet = document.createElement('style');
|
|
125
|
+
sheet.innerHTML = this.clientStyling;
|
|
126
|
+
this.stylingContainer.prepend(sheet);
|
|
127
|
+
};
|
|
128
|
+
this.setClientStylingURL = () => {
|
|
129
|
+
let cssFile = document.createElement('style');
|
|
130
|
+
setTimeout(() => {
|
|
131
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
132
|
+
this.stylingContainer.prepend(cssFile);
|
|
133
|
+
}, 1);
|
|
134
|
+
};
|
|
110
135
|
}
|
|
111
136
|
connectedCallback() {
|
|
112
137
|
let selected = [];
|
|
@@ -135,6 +160,17 @@ const LotteryGrid = class {
|
|
|
135
160
|
});
|
|
136
161
|
}
|
|
137
162
|
}
|
|
163
|
+
componentDidRender() {
|
|
164
|
+
// start custom styling area
|
|
165
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
166
|
+
if (this.clientStyling)
|
|
167
|
+
this.setClientStyling();
|
|
168
|
+
if (this.clientStylingUrlContent)
|
|
169
|
+
this.setClientStylingURL();
|
|
170
|
+
this.limitStylingAppends = true;
|
|
171
|
+
}
|
|
172
|
+
// end custom styling area
|
|
173
|
+
}
|
|
138
174
|
lotteryBulletSelectionHandler(event) {
|
|
139
175
|
this.numbers = this.numbers.map((item) => {
|
|
140
176
|
if (item.number == event.detail.value) {
|
|
@@ -225,7 +261,7 @@ const LotteryGrid = class {
|
|
|
225
261
|
}
|
|
226
262
|
}
|
|
227
263
|
render() {
|
|
228
|
-
return (index.h("div", { class: "GridContainer" }, index.h("div", { class:
|
|
264
|
+
return (index.h("div", { class: "GridContainer", ref: el => this.stylingContainer = el }, index.h("div", { 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 }))))));
|
|
229
265
|
}
|
|
230
266
|
};
|
|
231
267
|
LotteryGrid.style = lotteryGridCss;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-7b63209d.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
drawResultsHeader: 'Draw results history',
|
|
@@ -33,6 +33,32 @@ const TRANSLATIONS = {
|
|
|
33
33
|
noResults: 'Niciun rezultat',
|
|
34
34
|
fetchingResults: 'Se obtin rezultatele'
|
|
35
35
|
},
|
|
36
|
+
fr: {
|
|
37
|
+
drawResultsHeader: 'Dessiner l\'historique des résultats',
|
|
38
|
+
drawId: 'ID de tirage',
|
|
39
|
+
drawDate: 'Date du tirage',
|
|
40
|
+
drawNumbersGridA: 'Tirage des numéros Grille',
|
|
41
|
+
viewAllResults: 'Voir tout',
|
|
42
|
+
lastFiveDraws: '5 derniers tirages',
|
|
43
|
+
lastTenDraws: '10 derniers tirages',
|
|
44
|
+
lastFifteenDraws: '15 derniers tirages',
|
|
45
|
+
allDrawResultsHistory: 'Historique des résultats de tous les tirages',
|
|
46
|
+
noResults: 'Aucun résultat',
|
|
47
|
+
fetchingResults: 'Récupération des résultats'
|
|
48
|
+
},
|
|
49
|
+
ar: {
|
|
50
|
+
drawResultsHeader: 'سجل نتائج السحب',
|
|
51
|
+
drawId: 'معرّف السحب',
|
|
52
|
+
drawDate: 'تاريخ السحب',
|
|
53
|
+
drawNumbersGridA: 'شبكة أرقام السحب',
|
|
54
|
+
viewAllResults: 'عرض الكل',
|
|
55
|
+
lastFiveDraws: 'آخر 5 سحوبات',
|
|
56
|
+
lastTenDraws: 'آخر 10 سحوبات',
|
|
57
|
+
lastFifteenDraws: 'آخر 15 سحبًا',
|
|
58
|
+
allDrawResultsHistory: 'سجل نتائج كل السحوبات',
|
|
59
|
+
noResults: 'لا توجد نتائج',
|
|
60
|
+
fetchingResults: 'جلب النتائج'
|
|
61
|
+
}
|
|
36
62
|
};
|
|
37
63
|
const translate = (key, customLang) => {
|
|
38
64
|
const lang = customLang;
|
|
@@ -52,6 +78,14 @@ const LotteryDrawResultsHistory = class {
|
|
|
52
78
|
*Language
|
|
53
79
|
*/
|
|
54
80
|
this.language = 'en';
|
|
81
|
+
/**
|
|
82
|
+
* Client custom styling via string
|
|
83
|
+
*/
|
|
84
|
+
this.clientStyling = '';
|
|
85
|
+
/**
|
|
86
|
+
* Client custom styling via url content
|
|
87
|
+
*/
|
|
88
|
+
this.clientStylingUrlContent = '';
|
|
55
89
|
this.drawData = [];
|
|
56
90
|
this.displayAllDrawsResults = true;
|
|
57
91
|
this.showQuickFilters = true;
|
|
@@ -60,6 +94,7 @@ const LotteryDrawResultsHistory = class {
|
|
|
60
94
|
this.dateFiltersTo = '';
|
|
61
95
|
this.isLoading = false;
|
|
62
96
|
this.noResults = false;
|
|
97
|
+
this.limitStylingAppends = false;
|
|
63
98
|
this.getDrawsData = (filterbydate = false) => {
|
|
64
99
|
let url = filterbydate ? new URL(`${this.endpoint}/games/${this.gameId}/draws`) : new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
65
100
|
if (this.dateFiltersFrom)
|
|
@@ -118,19 +153,36 @@ const LotteryDrawResultsHistory = class {
|
|
|
118
153
|
this.displayAllDrawsResults = false;
|
|
119
154
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
120
155
|
};
|
|
156
|
+
this.setClientStyling = () => {
|
|
157
|
+
let sheet = document.createElement('style');
|
|
158
|
+
sheet.innerHTML = this.clientStyling;
|
|
159
|
+
this.stylingContainer.prepend(sheet);
|
|
160
|
+
};
|
|
161
|
+
this.setClientStylingURL = () => {
|
|
162
|
+
let cssFile = document.createElement('style');
|
|
163
|
+
setTimeout(() => {
|
|
164
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
165
|
+
this.stylingContainer.prepend(cssFile);
|
|
166
|
+
}, 1);
|
|
167
|
+
};
|
|
121
168
|
}
|
|
122
169
|
// Filters events
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
170
|
+
// @Listen('filterDraw')
|
|
171
|
+
// filtersDrawHandler(event: CustomEvent<any>):void {
|
|
172
|
+
// this.isLoading = true;
|
|
173
|
+
// this.showQuickFilters = false;
|
|
174
|
+
// }
|
|
128
175
|
filtersHandler(event) {
|
|
129
176
|
this.showQuickFilters = false;
|
|
130
|
-
this.dateFiltersFrom = event.detail.filterFromCalendar;
|
|
131
|
-
this.dateFiltersTo = event.detail.filterToCalendar;
|
|
132
177
|
this.isLoading = true;
|
|
133
|
-
|
|
178
|
+
if (event.detail.ticketDrawId) {
|
|
179
|
+
this.getDrawResults(event.detail.ticketDrawId);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
this.dateFiltersFrom = event.detail.filterFromCalendar;
|
|
183
|
+
this.dateFiltersTo = event.detail.filterToCalendar;
|
|
184
|
+
this.getDrawsData(true);
|
|
185
|
+
}
|
|
134
186
|
}
|
|
135
187
|
clearFiltersHandler() {
|
|
136
188
|
this.drawData = this.winningDataSetsData;
|
|
@@ -147,13 +199,24 @@ const LotteryDrawResultsHistory = class {
|
|
|
147
199
|
disconnectedCallback() {
|
|
148
200
|
clearInterval(this.interval);
|
|
149
201
|
}
|
|
202
|
+
componentDidRender() {
|
|
203
|
+
// start custom styling area
|
|
204
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
205
|
+
if (this.clientStyling)
|
|
206
|
+
this.setClientStyling();
|
|
207
|
+
if (this.clientStylingUrlContent)
|
|
208
|
+
this.setClientStylingURL();
|
|
209
|
+
this.limitStylingAppends = true;
|
|
210
|
+
}
|
|
211
|
+
// end custom styling area
|
|
212
|
+
}
|
|
150
213
|
render() {
|
|
151
214
|
let gridHeader = index.h("div", { class: "DrawResultsHeader" }, this.displayAllDrawsResults ? index.h("h4", null, translate('drawResultsHeader', this.language)) :
|
|
152
215
|
[index.h("div", { class: "DrawResultsHeaderContent" }, index.h("h4", null, translate('allDrawResultsHistory', this.language)), index.h("div", { class: "FilterSection" }, this.showQuickFilters &&
|
|
153
|
-
index.h("div", { class: "FilterResultsContainer" }, index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(5) }, translate('lastFiveDraws', this.language)), index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(10) }, translate('lastTenDraws', this.language)), index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(15) }, translate('lastFifteenDraws', this.language))), index.h("helper-filters", { "show-filter-id": "true", "activate-ticket-search": "false", "game-id": this.gameId }))),
|
|
216
|
+
index.h("div", { class: "FilterResultsContainer" }, index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(5) }, translate('lastFiveDraws', this.language)), index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(10) }, translate('lastTenDraws', this.language)), index.h("button", { class: "QuickFilterButton", onClick: () => this.filterResults(15) }, translate('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 }))),
|
|
154
217
|
]);
|
|
155
|
-
return index.h("section", { class: "GridWrapper" }, index.h("div", { class: "DrawResultsSection" }, index.h("div", { class: "DrawResultsAreaHistory" }, gridHeader, index.h("div", { class: "HistoryGridWrapper" }, index.h("div", { class: "HistoryGrid" }, this.isLoading &&
|
|
156
|
-
index.h("p", null, translate('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 })).reverse().slice(0, this.numberOfResults), !this.isLoading && this.noResults && (index.h("p", null, translate('noResults', this.language))))), this.displayAllDrawsResults && index.h("button", { class: "ViewAllResults", onClick: this.viewAllResults }, translate('viewAllResults', this.language)))));
|
|
218
|
+
return index.h("section", { class: "GridWrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: "DrawResultsSection" }, index.h("div", { class: "DrawResultsAreaHistory" }, gridHeader, index.h("div", { class: "HistoryGridWrapper" }, index.h("div", { class: "HistoryGrid" }, this.isLoading &&
|
|
219
|
+
index.h("p", null, translate('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", null, translate('noResults', this.language))))), this.displayAllDrawsResults && index.h("button", { class: "ViewAllResults", onClick: this.viewAllResults }, translate('viewAllResults', this.language)))));
|
|
157
220
|
}
|
|
158
221
|
};
|
|
159
222
|
LotteryDrawResultsHistory.style = lotteryDrawResultsHistoryCss;
|
|
@@ -9,9 +9,41 @@ const lotteryGameDetailsCss = ":host{display:block}";
|
|
|
9
9
|
const LotteryGameDetails = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Client custom styling via string
|
|
14
|
+
*/
|
|
15
|
+
this.clientStyling = '';
|
|
16
|
+
/**
|
|
17
|
+
* Client custom styling via url content
|
|
18
|
+
*/
|
|
19
|
+
this.clientStylingUrlContent = '';
|
|
20
|
+
this.limitStylingAppends = false;
|
|
21
|
+
this.setClientStyling = () => {
|
|
22
|
+
let sheet = document.createElement('style');
|
|
23
|
+
sheet.innerHTML = this.clientStyling;
|
|
24
|
+
this.stylingContainer.prepend(sheet);
|
|
25
|
+
};
|
|
26
|
+
this.setClientStylingURL = () => {
|
|
27
|
+
let cssFile = document.createElement('style');
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
30
|
+
this.stylingContainer.prepend(cssFile);
|
|
31
|
+
}, 1);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
componentDidRender() {
|
|
35
|
+
// start custom styling area
|
|
36
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
37
|
+
if (this.clientStyling)
|
|
38
|
+
this.setClientStyling();
|
|
39
|
+
if (this.clientStylingUrlContent)
|
|
40
|
+
this.setClientStylingURL();
|
|
41
|
+
this.limitStylingAppends = true;
|
|
42
|
+
}
|
|
43
|
+
// end custom styling area
|
|
12
44
|
}
|
|
13
45
|
render() {
|
|
14
|
-
return (index.h("div",
|
|
46
|
+
return (index.h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "AccordionContainer", slot: "accordionContent" }, index.h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
15
47
|
}
|
|
16
48
|
};
|
|
17
49
|
LotteryGameDetails.style = lotteryGameDetailsCss;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-7b63209d.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'ar'];
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
error: 'Error',
|
|
@@ -53,6 +53,29 @@ const TRANSLATIONS = {
|
|
|
53
53
|
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
54
54
|
modalLogin: 'Please login to submit a ticket',
|
|
55
55
|
},
|
|
56
|
+
fr: {
|
|
57
|
+
error: 'Error',
|
|
58
|
+
title: 'Chrono',
|
|
59
|
+
backButton: 'Back',
|
|
60
|
+
lobbyButton: 'Lobby',
|
|
61
|
+
prize: 'Prize',
|
|
62
|
+
winUpTo: 'Win up to',
|
|
63
|
+
nextDraw: 'Next draw in: ',
|
|
64
|
+
buy: 'Buy tickets',
|
|
65
|
+
viewLatest: 'View latest results',
|
|
66
|
+
createTicket: 'Create Ticket',
|
|
67
|
+
modalSuccess: 'Purchase successfully completed!',
|
|
68
|
+
deleteTicketModalTitle: 'Delete Ticket',
|
|
69
|
+
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
70
|
+
deleteTicketModalCancel: 'Cancel',
|
|
71
|
+
deleteTicketModalConfirm: 'Delete',
|
|
72
|
+
orderSummaryTitle: 'Order Summary',
|
|
73
|
+
orderSummaryTickets: 'Ticket',
|
|
74
|
+
orderSummaryTotal: 'Total',
|
|
75
|
+
orderSummarySubmit: 'Submit',
|
|
76
|
+
lastDrawResultsTitle: 'Résultats du dernier tirage',
|
|
77
|
+
modalLogin: 'Please login to submit a ticket',
|
|
78
|
+
},
|
|
56
79
|
ar: {
|
|
57
80
|
error: 'خطأ',
|
|
58
81
|
title: 'كرونو',
|
|
@@ -73,9 +96,9 @@ const TRANSLATIONS = {
|
|
|
73
96
|
orderSummaryTickets: 'تذكرة',
|
|
74
97
|
orderSummaryTotal: 'المجموع',
|
|
75
98
|
orderSummarySubmit: 'يُقدِّم',
|
|
76
|
-
lastDrawResultsTitle: '
|
|
99
|
+
lastDrawResultsTitle: 'نتائج آخر سحب',
|
|
77
100
|
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
78
|
-
}
|
|
101
|
+
}
|
|
79
102
|
};
|
|
80
103
|
const translate = (key, customLang) => {
|
|
81
104
|
const lang = customLang;
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["lottery-game-page.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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]
|
|
18
|
+
return index.bootstrapLazy([["lottery-game-page.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]],["helper-modal.cjs",[[1,"helper-modal",{"titleModal":[1,"title-modal"],"visible":[1540],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -4,6 +4,27 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-7b63209d.js');
|
|
6
6
|
|
|
7
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
9
|
+
const TRANSLATIONS = {
|
|
10
|
+
en: {
|
|
11
|
+
ticket: 'Ticket',
|
|
12
|
+
},
|
|
13
|
+
ro: {
|
|
14
|
+
ticket: 'Bilet',
|
|
15
|
+
},
|
|
16
|
+
fr: {
|
|
17
|
+
ticket: 'Billet'
|
|
18
|
+
},
|
|
19
|
+
ar: {
|
|
20
|
+
ticket: 'تذكرة',
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const translate = (key, customLang) => {
|
|
24
|
+
const lang = customLang;
|
|
25
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
26
|
+
};
|
|
27
|
+
|
|
7
28
|
const lotteryTicketControllerCss = ":host{display:block}";
|
|
8
29
|
|
|
9
30
|
const LotteryTicketController = class {
|
|
@@ -50,6 +71,27 @@ const LotteryTicketController = class {
|
|
|
50
71
|
* Shows the reset button
|
|
51
72
|
*/
|
|
52
73
|
this.resetButton = false;
|
|
74
|
+
/**
|
|
75
|
+
* Client custom styling via string
|
|
76
|
+
*/
|
|
77
|
+
this.clientStyling = '';
|
|
78
|
+
/**
|
|
79
|
+
* Client custom styling via url content
|
|
80
|
+
*/
|
|
81
|
+
this.clientStylingUrlContent = '';
|
|
82
|
+
this.limitStylingAppends = false;
|
|
83
|
+
this.setClientStyling = () => {
|
|
84
|
+
let sheet = document.createElement('style');
|
|
85
|
+
sheet.innerHTML = this.clientStyling;
|
|
86
|
+
this.stylingContainer.prepend(sheet);
|
|
87
|
+
};
|
|
88
|
+
this.setClientStylingURL = () => {
|
|
89
|
+
let cssFile = document.createElement('style');
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
92
|
+
this.stylingContainer.prepend(cssFile);
|
|
93
|
+
}, 1);
|
|
94
|
+
};
|
|
53
95
|
}
|
|
54
96
|
// @TODO fix the `any` type
|
|
55
97
|
helperAccordionActionHandler() {
|
|
@@ -60,8 +102,19 @@ const LotteryTicketController = class {
|
|
|
60
102
|
ticketId: this.ticketId
|
|
61
103
|
});
|
|
62
104
|
}
|
|
105
|
+
componentDidRender() {
|
|
106
|
+
// start custom styling area
|
|
107
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
108
|
+
if (this.clientStyling)
|
|
109
|
+
this.setClientStyling();
|
|
110
|
+
if (this.clientStylingUrlContent)
|
|
111
|
+
this.setClientStylingURL();
|
|
112
|
+
this.limitStylingAppends = true;
|
|
113
|
+
}
|
|
114
|
+
// end custom styling area
|
|
115
|
+
}
|
|
63
116
|
render() {
|
|
64
|
-
return (index.h("div",
|
|
117
|
+
return (index.h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, index.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 }, index.h("div", { slot: "accordionContent" }, index.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 })))));
|
|
65
118
|
}
|
|
66
119
|
};
|
|
67
120
|
LotteryTicketController.style = lotteryTicketControllerCss;
|