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