@everymatrix/lottery-game-page 1.31.2 → 1.32.4
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/LICENSE +21 -0
- package/package.json +8 -7
- package/dist/assets/chrono_desktop.png +0 -0
- package/dist/assets/chrono_lottery_mobile.png +0 -0
- package/dist/cjs/helper-accordion.cjs.entry.js +0 -135
- package/dist/cjs/helper-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-filters_2.cjs.entry.js +0 -23817
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-modal.cjs.entry.js +0 -78
- package/dist/cjs/helper-modal.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-pagination.cjs.entry.js +0 -259
- package/dist/cjs/helper-pagination.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-tab.cjs.entry.js +0 -70
- package/dist/cjs/helper-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/helper-tabs.cjs.entry.js +0 -76
- package/dist/cjs/helper-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/index-cd44e726.js +0 -1326
- package/dist/cjs/index-cd44e726.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -4
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -281
- package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -240
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-details.cjs.entry.js +0 -53
- package/dist/cjs/lottery-game-details.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +0 -456
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-game-page.cjs.js +0 -21
- package/dist/cjs/lottery-game-page.cjs.js.map +0 -1
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -132
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +0 -1
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -233
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -92
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +0 -336
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +0 -658
- package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +0 -1
- package/dist/collection/index.js +0 -2
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/locale.utils.js +0 -124
- package/dist/collection/utils/locale.utils.js.map +0 -1
- package/dist/collection/utils/utils.js +0 -13
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/helper-accordion.js +0 -8
- package/dist/components/helper-accordion.js.map +0 -1
- package/dist/components/helper-accordion2.js +0 -162
- package/dist/components/helper-accordion2.js.map +0 -1
- package/dist/components/helper-filters.js +0 -8
- package/dist/components/helper-filters.js.map +0 -1
- package/dist/components/helper-filters2.js +0 -23566
- package/dist/components/helper-filters2.js.map +0 -1
- package/dist/components/helper-modal.js +0 -8
- package/dist/components/helper-modal.js.map +0 -1
- package/dist/components/helper-modal2.js +0 -96
- package/dist/components/helper-modal2.js.map +0 -1
- package/dist/components/helper-pagination.js +0 -294
- package/dist/components/helper-pagination.js.map +0 -1
- package/dist/components/helper-tab.js +0 -8
- package/dist/components/helper-tab.js.map +0 -1
- package/dist/components/helper-tab2.js +0 -89
- package/dist/components/helper-tab2.js.map +0 -1
- package/dist/components/helper-tabs.js +0 -8
- package/dist/components/helper-tabs.js.map +0 -1
- package/dist/components/helper-tabs2.js +0 -105
- package/dist/components/helper-tabs2.js.map +0 -1
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -3
- package/dist/components/index.js.map +0 -1
- package/dist/components/lottery-bullet.js +0 -8
- package/dist/components/lottery-bullet.js.map +0 -1
- package/dist/components/lottery-bullet2.js +0 -94
- package/dist/components/lottery-bullet2.js.map +0 -1
- package/dist/components/lottery-draw-results-history.js +0 -8
- package/dist/components/lottery-draw-results-history.js.map +0 -1
- package/dist/components/lottery-draw-results-history2.js +0 -298
- package/dist/components/lottery-draw-results-history2.js.map +0 -1
- package/dist/components/lottery-draw-results.js +0 -8
- package/dist/components/lottery-draw-results.js.map +0 -1
- package/dist/components/lottery-draw-results2.js +0 -346
- package/dist/components/lottery-draw-results2.js.map +0 -1
- package/dist/components/lottery-game-details.js +0 -8
- package/dist/components/lottery-game-details.js.map +0 -1
- package/dist/components/lottery-game-details2.js +0 -87
- package/dist/components/lottery-game-details2.js.map +0 -1
- package/dist/components/lottery-game-page.d.ts +0 -11
- package/dist/components/lottery-game-page.js +0 -572
- package/dist/components/lottery-game-page.js.map +0 -1
- package/dist/components/lottery-grid.js +0 -8
- package/dist/components/lottery-grid.js.map +0 -1
- package/dist/components/lottery-grid2.js +0 -248
- package/dist/components/lottery-grid2.js.map +0 -1
- package/dist/components/lottery-ticket-controller.js +0 -8
- package/dist/components/lottery-ticket-controller.js.map +0 -1
- package/dist/components/lottery-ticket-controller2.js +0 -185
- package/dist/components/lottery-ticket-controller2.js.map +0 -1
- package/dist/components/lottery-ticket.js +0 -8
- package/dist/components/lottery-ticket.js.map +0 -1
- package/dist/components/lottery-ticket2.js +0 -276
- package/dist/components/lottery-ticket2.js.map +0 -1
- package/dist/esm/helper-accordion.entry.js +0 -131
- package/dist/esm/helper-accordion.entry.js.map +0 -1
- package/dist/esm/helper-filters_2.entry.js +0 -23812
- package/dist/esm/helper-filters_2.entry.js.map +0 -1
- package/dist/esm/helper-modal.entry.js +0 -74
- package/dist/esm/helper-modal.entry.js.map +0 -1
- package/dist/esm/helper-pagination.entry.js +0 -255
- package/dist/esm/helper-pagination.entry.js.map +0 -1
- package/dist/esm/helper-tab.entry.js +0 -66
- package/dist/esm/helper-tab.entry.js.map +0 -1
- package/dist/esm/helper-tabs.entry.js +0 -72
- package/dist/esm/helper-tabs.entry.js.map +0 -1
- package/dist/esm/index-d1baacd4.js +0 -1298
- package/dist/esm/index-d1baacd4.js.map +0 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/lottery-bullet_2.entry.js +0 -276
- package/dist/esm/lottery-bullet_2.entry.js.map +0 -1
- package/dist/esm/lottery-draw-results-history.entry.js +0 -236
- package/dist/esm/lottery-draw-results-history.entry.js.map +0 -1
- package/dist/esm/lottery-game-details.entry.js +0 -49
- package/dist/esm/lottery-game-details.entry.js.map +0 -1
- package/dist/esm/lottery-game-page.entry.js +0 -452
- package/dist/esm/lottery-game-page.entry.js.map +0 -1
- package/dist/esm/lottery-game-page.js +0 -19
- package/dist/esm/lottery-game-page.js.map +0 -1
- package/dist/esm/lottery-ticket-controller.entry.js +0 -128
- package/dist/esm/lottery-ticket-controller.entry.js.map +0 -1
- package/dist/esm/lottery-ticket.entry.js +0 -229
- package/dist/esm/lottery-ticket.entry.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/lottery-game-page/index.esm.js +0 -2
- package/dist/lottery-game-page/index.esm.js.map +0 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js +0 -2
- package/dist/lottery-game-page/lottery-game-page.esm.js.map +0 -1
- package/dist/lottery-game-page/p-12340c50.entry.js +0 -2921
- package/dist/lottery-game-page/p-12340c50.entry.js.map +0 -1
- package/dist/lottery-game-page/p-15309f9a.entry.js +0 -2
- package/dist/lottery-game-page/p-15309f9a.entry.js.map +0 -1
- package/dist/lottery-game-page/p-167c9dbe.entry.js +0 -2
- package/dist/lottery-game-page/p-167c9dbe.entry.js.map +0 -1
- package/dist/lottery-game-page/p-20e0c81c.entry.js +0 -2
- package/dist/lottery-game-page/p-20e0c81c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-662d9dac.entry.js +0 -2
- package/dist/lottery-game-page/p-662d9dac.entry.js.map +0 -1
- package/dist/lottery-game-page/p-66729e9c.entry.js +0 -2
- package/dist/lottery-game-page/p-66729e9c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-76c280ec.entry.js +0 -2
- package/dist/lottery-game-page/p-76c280ec.entry.js.map +0 -1
- package/dist/lottery-game-page/p-b19ff22c.entry.js +0 -2
- package/dist/lottery-game-page/p-b19ff22c.entry.js.map +0 -1
- package/dist/lottery-game-page/p-cba19473.entry.js +0 -2
- package/dist/lottery-game-page/p-cba19473.entry.js.map +0 -1
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js +0 -2
- package/dist/lottery-game-page/p-cd4aa6a4.entry.js.map +0 -1
- package/dist/lottery-game-page/p-e765c7d9.js +0 -2
- package/dist/lottery-game-page/p-e765c7d9.js.map +0 -1
- package/dist/lottery-game-page/p-e86e2389.entry.js +0 -2
- package/dist/lottery-game-page/p-e86e2389.entry.js.map +0 -1
- package/dist/lottery-game-page/p-f399eef1.entry.js +0 -2
- package/dist/lottery-game-page/p-f399eef1.entry.js.map +0 -1
- package/dist/stencil.config.js +0 -50
- package/dist/stencil.config.js.map +0 -1
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +0 -102
- package/dist/types/components.d.ts +0 -119
- package/dist/types/index.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/dist/types/utils/locale.utils.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +0 -7
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -10
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"lottery-game-details2.js","mappings":";;;;;AAAA,MAAM,qBAAqB,GAAG,sBAAsB;;MCGvC,kBAAkB;EAC7B;;;;;;;IAIE,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;;;;IAIxB,IAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC;IAClC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IACjC,IAAI,CAAC,gBAAgB,GAAG;MACtB,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;MAC5C,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC;MACrC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KACtC,CAAC;IACF,IAAI,CAAC,mBAAmB,GAAG;MACzB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;MAC9C,UAAU,CAAC;QACT,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,uBAAuB,CAAC;QACjD,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;OACxC,EAAE,CAAC,CAAC,CAAC;KACP,CAAC;GACH;EACD,kBAAkB;;IAEhB,IAAI,CAAC,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC,gBAAgB,EAAE;MACtD,IAAI,IAAI,CAAC,aAAa;QACpB,IAAI,CAAC,gBAAgB,EAAE,CAAC;MAC1B,IAAI,IAAI,CAAC,uBAAuB;QAC9B,IAAI,CAAC,mBAAmB,EAAE,CAAC;MAC7B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;KACjC;;GAEF;EACD,MAAM;IACJ,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,gBAAgB,GAAG,EAAE,EAAE,EAC3F,CAAC,CAAC,kBAAkB,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,IAAI,CAAC,uBAAuB,EAAE,EAC1K,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAChE,CAAC,CAAC,aAAa,EAAE,EAAE,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;GAClI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../lottery-game-details/dist/collection/components/lottery-game-details/lottery-game-details.css?tag=lottery-game-details&encapsulation=shadow","../lottery-game-details/dist/collection/components/lottery-game-details/lottery-game-details.js"],"sourcesContent":[":host {\n display: block;\n}","import { Component, h, Prop, State, } from '@stencil/core';\nimport '@everymatrix/helper-accordion';\nimport '@everymatrix/helper-tabs';\nexport class LotteryGameDetails {\n constructor() {\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.limitStylingAppends = false;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n render() {\n return (h(\"div\", { class: \"GamePageDetailsContainer\", ref: el => this.stylingContainer = el },\n h(\"helper-accordion\", { \"header-title\": \"Game Details\", collapsed: false, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent },\n h(\"div\", { class: \"AccordionContainer\", slot: \"accordionContent\" },\n h(\"helper-tabs\", { \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent })))));\n }\n static get is() { return \"lottery-game-details\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-game-details.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-game-details.css\"]\n }; }\n static get properties() { return {\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n}\n"],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface LotteryGamePage extends Components.LotteryGamePage, HTMLElement {}
|
|
4
|
-
export const LotteryGamePage: {
|
|
5
|
-
prototype: LotteryGamePage;
|
|
6
|
-
new (): LotteryGamePage;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1,572 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, getAssetPath, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$d } from './helper-accordion2.js';
|
|
3
|
-
import { d as defineCustomElement$c } from './helper-filters2.js';
|
|
4
|
-
import { d as defineCustomElement$b } from './helper-modal2.js';
|
|
5
|
-
import { d as defineCustomElement$a } from './helper-tab2.js';
|
|
6
|
-
import { d as defineCustomElement$9 } from './helper-tabs2.js';
|
|
7
|
-
import { d as defineCustomElement$8 } from './lottery-bullet2.js';
|
|
8
|
-
import { d as defineCustomElement$7 } from './lottery-draw-results2.js';
|
|
9
|
-
import { d as defineCustomElement$6 } from './lottery-draw-results-history2.js';
|
|
10
|
-
import { d as defineCustomElement$5 } from './lottery-game-details2.js';
|
|
11
|
-
import { d as defineCustomElement$4 } from './lottery-grid2.js';
|
|
12
|
-
import { d as defineCustomElement$3 } from './lottery-ticket2.js';
|
|
13
|
-
import { d as defineCustomElement$2 } from './lottery-ticket-controller2.js';
|
|
14
|
-
|
|
15
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
16
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hr'];
|
|
17
|
-
const TRANSLATIONS = {
|
|
18
|
-
en: {
|
|
19
|
-
error: 'Error',
|
|
20
|
-
title: 'Chrono',
|
|
21
|
-
backButton: 'Back',
|
|
22
|
-
lobbyButton: 'Lobby',
|
|
23
|
-
prize: 'Prize',
|
|
24
|
-
winUpTo: 'Win up to',
|
|
25
|
-
nextDraw: 'Next draw in: ',
|
|
26
|
-
buy: 'Buy tickets',
|
|
27
|
-
viewLatest: 'View latest results',
|
|
28
|
-
createTicket: 'Create Ticket',
|
|
29
|
-
modalSuccess: 'Purchase successfully completed!',
|
|
30
|
-
deleteTicketModalTitle: 'Delete Ticket',
|
|
31
|
-
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
32
|
-
deleteTicketModalCancel: 'Cancel',
|
|
33
|
-
deleteTicketModalConfirm: 'Delete',
|
|
34
|
-
orderSummaryTitle: 'Order Summary',
|
|
35
|
-
orderSummaryTickets: 'Ticket',
|
|
36
|
-
orderSummaryTotal: 'Total',
|
|
37
|
-
orderSummarySubmit: 'Submit',
|
|
38
|
-
lastDrawResultsTitle: 'Last Draw Results',
|
|
39
|
-
modalLogin: 'Please login to submit a ticket',
|
|
40
|
-
},
|
|
41
|
-
ro: {
|
|
42
|
-
error: 'Eroare',
|
|
43
|
-
title: 'Loto 6/49',
|
|
44
|
-
backButton: 'Inapoi',
|
|
45
|
-
lobbyButton: 'Lobby',
|
|
46
|
-
prize: 'MARELE JACKPOT OMG',
|
|
47
|
-
winUpTo: 'Castiga pana la',
|
|
48
|
-
nextDraw: 'Urmatoarea extragere:',
|
|
49
|
-
buy: 'Cumpara bilet',
|
|
50
|
-
viewLatest: 'Ultimile extrageri',
|
|
51
|
-
createTicket: 'Creeaza bilet',
|
|
52
|
-
modalSuccess: 'Achizitie efectuata cu succes',
|
|
53
|
-
deleteTicketModalTitle: 'Sterge biletul',
|
|
54
|
-
deleteTicketModalText: 'Esti sigur ca vrei sa stergi acest bilet?',
|
|
55
|
-
deleteTicketModalCancel: 'Anuleaza',
|
|
56
|
-
deleteTicketModalConfirm: 'Sterge',
|
|
57
|
-
orderSummaryTitle: 'Rezumat comanda',
|
|
58
|
-
orderSummaryTickets: 'Bilet',
|
|
59
|
-
orderSummaryTotal: 'Total',
|
|
60
|
-
orderSummarySubmit: 'Trimite',
|
|
61
|
-
lastDrawResultsTitle: 'Cele mai recente extrageri',
|
|
62
|
-
modalLogin: 'Please login to submit a ticket',
|
|
63
|
-
},
|
|
64
|
-
fr: {
|
|
65
|
-
error: 'Error',
|
|
66
|
-
title: 'Chrono',
|
|
67
|
-
backButton: 'Back',
|
|
68
|
-
lobbyButton: 'Lobby',
|
|
69
|
-
prize: 'Prize',
|
|
70
|
-
winUpTo: 'Win up to',
|
|
71
|
-
nextDraw: 'Next draw in: ',
|
|
72
|
-
buy: 'Buy tickets',
|
|
73
|
-
viewLatest: 'View latest results',
|
|
74
|
-
createTicket: 'Create Ticket',
|
|
75
|
-
modalSuccess: 'Purchase successfully completed!',
|
|
76
|
-
deleteTicketModalTitle: 'Delete Ticket',
|
|
77
|
-
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
78
|
-
deleteTicketModalCancel: 'Cancel',
|
|
79
|
-
deleteTicketModalConfirm: 'Delete',
|
|
80
|
-
orderSummaryTitle: 'Order Summary',
|
|
81
|
-
orderSummaryTickets: 'Ticket',
|
|
82
|
-
orderSummaryTotal: 'Total',
|
|
83
|
-
orderSummarySubmit: 'Submit',
|
|
84
|
-
lastDrawResultsTitle: 'Résultats du dernier tirage',
|
|
85
|
-
modalLogin: 'Please login to submit a ticket',
|
|
86
|
-
},
|
|
87
|
-
ar: {
|
|
88
|
-
error: 'خطأ',
|
|
89
|
-
title: 'كرونو',
|
|
90
|
-
backButton: 'خلف',
|
|
91
|
-
lobbyButton: 'ردهة',
|
|
92
|
-
prize: 'جائزة',
|
|
93
|
-
winUpTo: 'الفوز بما يصل الى',
|
|
94
|
-
nextDraw: 'السحب التالي:',
|
|
95
|
-
buy: 'اشتري تذاكر',
|
|
96
|
-
viewLatest: 'عرض أحدث النتائج',
|
|
97
|
-
createTicket: 'إنشاء تذكرة',
|
|
98
|
-
modalSuccess: '!سيتم الشراء بنجاح قريبًا',
|
|
99
|
-
deleteTicketModalTitle: 'حذف التذكرة',
|
|
100
|
-
deleteTicketModalText: 'هل أنت متأكد أنك تريد حذف هذه التذكرة؟',
|
|
101
|
-
deleteTicketModalCancel: 'يلغي',
|
|
102
|
-
deleteTicketModalConfirm: 'حذف',
|
|
103
|
-
orderSummaryTitle: 'ملخص الطلب',
|
|
104
|
-
orderSummaryTickets: 'تذكرة',
|
|
105
|
-
orderSummaryTotal: 'المجموع',
|
|
106
|
-
orderSummarySubmit: 'يُقدِّم',
|
|
107
|
-
lastDrawResultsTitle: 'نتائج آخر سحب',
|
|
108
|
-
modalLogin: 'الرجاء تسجيل الدخول لتقديم تذكرة'
|
|
109
|
-
},
|
|
110
|
-
hr: {
|
|
111
|
-
error: 'Greška',
|
|
112
|
-
title: 'Krono',
|
|
113
|
-
backButton: 'Nazad',
|
|
114
|
-
lobbyButton: 'Lobby',
|
|
115
|
-
prize: 'Nagrada',
|
|
116
|
-
winUpTo: 'Osvoji do',
|
|
117
|
-
nextDraw: 'Sljedeće izvlačenje za: ',
|
|
118
|
-
buy: 'Uplati listić',
|
|
119
|
-
viewLatest: 'Pogledajte najnovije rezultate',
|
|
120
|
-
createTicket: 'Uplati listić',
|
|
121
|
-
modalSuccess: 'Kupnja uspješno obavljena!',
|
|
122
|
-
deleteTicketModalTitle: 'Izbriši listić',
|
|
123
|
-
deleteTicketModalText: 'Are you sure you want to delete this ticket?',
|
|
124
|
-
deleteTicketModalCancel: 'Otkaži',
|
|
125
|
-
deleteTicketModalConfirm: 'Izbriši',
|
|
126
|
-
orderSummaryTitle: 'Sažetak narudžbe',
|
|
127
|
-
orderSummaryTickets: 'Listić',
|
|
128
|
-
orderSummaryTotal: 'Ukupno',
|
|
129
|
-
orderSummarySubmit: 'Podnijeti',
|
|
130
|
-
lastDrawResultsTitle: 'Rezultati posljednjeg izvlačenja',
|
|
131
|
-
modalLogin: 'Molimo prijavite se da uplatite listić',
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
const translate = (key, customLang) => {
|
|
135
|
-
const lang = customLang;
|
|
136
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* @name isMobile
|
|
141
|
-
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
142
|
-
* @param {String} userAgent window.navigator.userAgent
|
|
143
|
-
* @returns {Boolean} true or false
|
|
144
|
-
*/
|
|
145
|
-
const isMobile = (userAgent) => {
|
|
146
|
-
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
147
|
-
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
148
|
-
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
149
|
-
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
const lotteryGamePageCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double #D4D4D4;color:#D4D4D4;width:100%}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}";
|
|
153
|
-
|
|
154
|
-
const LotteryGamePage$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
155
|
-
constructor() {
|
|
156
|
-
super();
|
|
157
|
-
this.__registerHost();
|
|
158
|
-
this.__attachShadow();
|
|
159
|
-
this.goBackEvent = createEvent(this, "goBackEvent", 7);
|
|
160
|
-
this.goToLobbyEvent = createEvent(this, "goToLobbyEvent", 7);
|
|
161
|
-
/**
|
|
162
|
-
* Language of the widget
|
|
163
|
-
*/
|
|
164
|
-
this.language = 'en';
|
|
165
|
-
/**
|
|
166
|
-
* Shows the auto-pick button
|
|
167
|
-
*/
|
|
168
|
-
this.autoPick = false;
|
|
169
|
-
/**
|
|
170
|
-
* Shows the reset button
|
|
171
|
-
*/
|
|
172
|
-
this.resetButton = false;
|
|
173
|
-
/**
|
|
174
|
-
* Client custom styling via string
|
|
175
|
-
*/
|
|
176
|
-
this.clientStyling = '';
|
|
177
|
-
/**
|
|
178
|
-
* Client custom styling via url
|
|
179
|
-
*/
|
|
180
|
-
this.clientStylingurl = '';
|
|
181
|
-
this.clientStylingUrlContent = '';
|
|
182
|
-
this.tickets = [];
|
|
183
|
-
this.tabIndex = 0;
|
|
184
|
-
this.hasErrors = false;
|
|
185
|
-
this.totalAmount = 0;
|
|
186
|
-
this.successVisible = false;
|
|
187
|
-
this.deleteVisible = false;
|
|
188
|
-
this.latestDraw = {};
|
|
189
|
-
this.totalWinningsAmount = 0;
|
|
190
|
-
this.isLoggedIn = false;
|
|
191
|
-
this.loginModalVisible = false;
|
|
192
|
-
this.limitStylingAppends = false;
|
|
193
|
-
// @TODO fix any type
|
|
194
|
-
this.userAgent = window.navigator.userAgent;
|
|
195
|
-
this.multiplier = false;
|
|
196
|
-
this.quickPick = false;
|
|
197
|
-
this.isMobile = isMobile(this.userAgent);
|
|
198
|
-
this.setClientStyling = () => {
|
|
199
|
-
let sheet = document.createElement('style');
|
|
200
|
-
sheet.innerHTML = this.clientStyling;
|
|
201
|
-
this.stylingContainer.prepend(sheet);
|
|
202
|
-
};
|
|
203
|
-
this.setClientStylingURL = () => {
|
|
204
|
-
let url = new URL(this.clientStylingurl);
|
|
205
|
-
let cssFile = document.createElement('style');
|
|
206
|
-
fetch(url.href)
|
|
207
|
-
.then((res) => res.text())
|
|
208
|
-
.then((data) => {
|
|
209
|
-
this.clientStylingUrlContent = data;
|
|
210
|
-
cssFile.innerHTML = data;
|
|
211
|
-
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
212
|
-
})
|
|
213
|
-
.catch((err) => {
|
|
214
|
-
console.log('error ', err);
|
|
215
|
-
});
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
// @TODO fix `any` type later, I'm lazy now
|
|
219
|
-
connectedCallback() {
|
|
220
|
-
this.getGameDetails();
|
|
221
|
-
this.getDraws();
|
|
222
|
-
if (this.sessionId) {
|
|
223
|
-
this.isLoggedIn = true;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
componentDidRender() {
|
|
227
|
-
// start custom styling area
|
|
228
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
229
|
-
if (this.clientStyling)
|
|
230
|
-
this.setClientStyling();
|
|
231
|
-
if (this.clientStylingurl)
|
|
232
|
-
this.setClientStylingURL();
|
|
233
|
-
this.limitStylingAppends = true;
|
|
234
|
-
}
|
|
235
|
-
// end custom styling area
|
|
236
|
-
}
|
|
237
|
-
countdownLogic(date) {
|
|
238
|
-
this.interval = setInterval(() => {
|
|
239
|
-
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
240
|
-
this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
|
|
241
|
-
this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
|
|
242
|
-
this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
|
|
243
|
-
}, 1000);
|
|
244
|
-
}
|
|
245
|
-
disconnectedCallback() {
|
|
246
|
-
clearInterval(this.interval);
|
|
247
|
-
}
|
|
248
|
-
getGameDetails() {
|
|
249
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
250
|
-
fetch(url.href)
|
|
251
|
-
.then((res) => {
|
|
252
|
-
if (res.status >= 300) {
|
|
253
|
-
this.hasErrors = true;
|
|
254
|
-
throw new Error('There was an error while fetching the data');
|
|
255
|
-
}
|
|
256
|
-
return res.json();
|
|
257
|
-
})
|
|
258
|
-
.then((data) => {
|
|
259
|
-
this.gameData = data;
|
|
260
|
-
this.basicStake = this.gameData.type.stakes[0].amount;
|
|
261
|
-
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
262
|
-
draws.length > 0 && (this.nextDraw = draws[0].id);
|
|
263
|
-
this.createNewTicket();
|
|
264
|
-
})
|
|
265
|
-
.catch((err) => {
|
|
266
|
-
this.hasErrors = true;
|
|
267
|
-
console.log('Error', err);
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
calculateTotalAmount() {
|
|
271
|
-
const { currency } = this.gameData.type.stakes[0];
|
|
272
|
-
this.totalAmount = 0;
|
|
273
|
-
this.tickets.forEach((item) => {
|
|
274
|
-
if (item.completed) {
|
|
275
|
-
this.totalAmount += item.amount * item.stake;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
this.currency = currency;
|
|
279
|
-
}
|
|
280
|
-
// @TODO CustomEvent type
|
|
281
|
-
gridFilledHandler(event) {
|
|
282
|
-
// @TODO item ts
|
|
283
|
-
this.tickets = this.tickets.map((item) => {
|
|
284
|
-
if (item.ticketId == event.detail.id) {
|
|
285
|
-
let arr = item.selectedNumbers || [];
|
|
286
|
-
arr[event.detail.index] = event.detail.selectedNumbers.map((item) => parseInt(item, 10));
|
|
287
|
-
return {
|
|
288
|
-
gameId: item.gameId,
|
|
289
|
-
ticketId: item.ticketId,
|
|
290
|
-
completed: true,
|
|
291
|
-
amount: event.detail.draws,
|
|
292
|
-
stake: item.stake,
|
|
293
|
-
selectedNumbers: arr
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
return item;
|
|
297
|
-
});
|
|
298
|
-
this.calculateTotalAmount();
|
|
299
|
-
}
|
|
300
|
-
// @TODO fix any type
|
|
301
|
-
gridDirtyHandler(event) {
|
|
302
|
-
// @TODO item ts
|
|
303
|
-
this.tickets = this.tickets.map((item) => {
|
|
304
|
-
if (item.gameId == event.detail.id) {
|
|
305
|
-
return {
|
|
306
|
-
gameId: item.gameId,
|
|
307
|
-
ticketId: item.ticketId,
|
|
308
|
-
completed: false,
|
|
309
|
-
amount: item.amount,
|
|
310
|
-
stake: item.stake,
|
|
311
|
-
grids: []
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
return item;
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
// @TODO CustomEvent type
|
|
318
|
-
deleteTicketHandler(event) {
|
|
319
|
-
this.deleteVisible = true;
|
|
320
|
-
this.deleteEventData = event;
|
|
321
|
-
}
|
|
322
|
-
modalCloseEvent() {
|
|
323
|
-
this.deleteVisible = false;
|
|
324
|
-
this.loginModalVisible = false;
|
|
325
|
-
}
|
|
326
|
-
stakeChangeHandler(event) {
|
|
327
|
-
const { ticketId, stake } = event.detail;
|
|
328
|
-
this.tickets[ticketId - 1].stake = stake;
|
|
329
|
-
this.calculateTotalAmount();
|
|
330
|
-
}
|
|
331
|
-
multiplierChangeHandler(event) {
|
|
332
|
-
this.multiplier = event.detail;
|
|
333
|
-
}
|
|
334
|
-
getDraws() {
|
|
335
|
-
// append from query param with the current date value in order to get the next draw
|
|
336
|
-
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
|
|
337
|
-
let drawOptions = {
|
|
338
|
-
method: "GET",
|
|
339
|
-
headers: {
|
|
340
|
-
'Content-Type': "application/json",
|
|
341
|
-
'Accept': 'application/json',
|
|
342
|
-
},
|
|
343
|
-
};
|
|
344
|
-
fetch(url.href, drawOptions)
|
|
345
|
-
.then((response) => {
|
|
346
|
-
return response.json();
|
|
347
|
-
})
|
|
348
|
-
.then((data) => {
|
|
349
|
-
var _a;
|
|
350
|
-
let upcoming = data.items.filter((item) => {
|
|
351
|
-
if (Date.parse(item.date) > new Date().getTime()) {
|
|
352
|
-
return !item.winningNumbers;
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
let past = data.items.filter((item) => item.winningNumbers);
|
|
356
|
-
if (!upcoming[0])
|
|
357
|
-
return;
|
|
358
|
-
this.latestDraw = upcoming[0];
|
|
359
|
-
this.nextDate = this.latestDraw.date;
|
|
360
|
-
this.countdownLogic(this.nextDate);
|
|
361
|
-
this.lastDrawId = past[past.length - 1].id;
|
|
362
|
-
// calculate total winnings
|
|
363
|
-
// @TODO fix any type
|
|
364
|
-
(_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
|
|
365
|
-
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
366
|
-
});
|
|
367
|
-
})
|
|
368
|
-
.catch((err) => {
|
|
369
|
-
console.log('error ', err);
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
;
|
|
373
|
-
// @TODO fix any type
|
|
374
|
-
confirmDeleteTicketHandler(event) {
|
|
375
|
-
// @TODO fix any type
|
|
376
|
-
this.tickets = this.tickets.filter((item) => {
|
|
377
|
-
if (item.ticketId == event.detail.ticketId) {
|
|
378
|
-
return false;
|
|
379
|
-
}
|
|
380
|
-
return true;
|
|
381
|
-
});
|
|
382
|
-
this.calculateTotalAmount();
|
|
383
|
-
this.deleteVisible = false;
|
|
384
|
-
}
|
|
385
|
-
createNewTicket() {
|
|
386
|
-
this.tickets = [
|
|
387
|
-
...this.tickets,
|
|
388
|
-
{ gameId: this.gameId, ticketId: this.tickets.length + 1, completed: false, amount: 1, stake: this.basicStake, grids: [] }
|
|
389
|
-
];
|
|
390
|
-
}
|
|
391
|
-
showLoginModal() {
|
|
392
|
-
this.loginModalVisible = true;
|
|
393
|
-
}
|
|
394
|
-
submitTickets() {
|
|
395
|
-
let url = new URL(`${this.endpoint}/tickets`);
|
|
396
|
-
// @TODO Body TS type
|
|
397
|
-
let body = {
|
|
398
|
-
gameId: this.gameId,
|
|
399
|
-
tickets: []
|
|
400
|
-
};
|
|
401
|
-
this.tickets.forEach((item) => {
|
|
402
|
-
body.tickets.push({
|
|
403
|
-
startingDrawId: this.nextDraw,
|
|
404
|
-
amount: item.stake,
|
|
405
|
-
gameId: this.gameId,
|
|
406
|
-
currency: this.currency,
|
|
407
|
-
selection: item.selectedNumbers,
|
|
408
|
-
multiplier: this.multiplier,
|
|
409
|
-
drawCount: item.amount,
|
|
410
|
-
quickPick: this.quickPick,
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
// @TODO Options TS type
|
|
414
|
-
let options = {
|
|
415
|
-
method: 'POST',
|
|
416
|
-
headers: {
|
|
417
|
-
'Content-Type': 'application/json',
|
|
418
|
-
'Accept': 'application/json',
|
|
419
|
-
'Authorization': `Bearer ${this.sessionId}`
|
|
420
|
-
},
|
|
421
|
-
body: JSON.stringify(body)
|
|
422
|
-
};
|
|
423
|
-
fetch(url.href, options)
|
|
424
|
-
.then((res) => {
|
|
425
|
-
if (res.status > 300) {
|
|
426
|
-
throw new Error('err');
|
|
427
|
-
}
|
|
428
|
-
return res.json();
|
|
429
|
-
})
|
|
430
|
-
.then((data) => {
|
|
431
|
-
// should we treat this res?
|
|
432
|
-
console.log('data', data);
|
|
433
|
-
})
|
|
434
|
-
.catch((err) => {
|
|
435
|
-
console.log('error ', err);
|
|
436
|
-
});
|
|
437
|
-
this.successVisible = true;
|
|
438
|
-
}
|
|
439
|
-
goBack() {
|
|
440
|
-
this.goBackEvent.emit();
|
|
441
|
-
}
|
|
442
|
-
goToLobby() {
|
|
443
|
-
this.goToLobbyEvent.emit();
|
|
444
|
-
}
|
|
445
|
-
render() {
|
|
446
|
-
//Get path for background image
|
|
447
|
-
const backgroundImagePath = getAssetPath(this.isMobile ? '/assets/chrono_lottery_mobile.png' : '/assets/chrono_desktop.png');
|
|
448
|
-
if (this.hasErrors) {
|
|
449
|
-
return (h("div", { class: "GamePage" }, h("div", { class: "Title" }, translate('error', this.language))));
|
|
450
|
-
}
|
|
451
|
-
return (
|
|
452
|
-
/* Game details */
|
|
453
|
-
h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, h("div", { class: "GridBanner", style: { 'background': `url(${this.backgroundUrl ? this.backgroundUrl : backgroundImagePath})`, 'background-size': 'contain', 'background-repeat': 'no-repeat', 'background-position': 'center' } }, h("div", { class: "BannerButtonsWrapper" }, h("button", { class: "BannerBackButton", onClick: this.goBack.bind(this) }, h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), h("button", { class: "BannerLobbyButton", onClick: this.goToLobby.bind(this) }, translate('lobbyButton', this.language))), h("div", { class: "Tabs" }, h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), h("div", { class: "NextDrawWrapper" }, h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), h("div", { class: "NextDraw" }, h("p", { class: "BannerText" }, translate('nextDraw', this.language)), h("div", { class: "BannerCountdown" }, h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
454
|
-
h("div", { class: "GamePageContent" }, h("div", { class: "GameDetails" }, h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton, "total-controllers": this.tickets.length, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("div", { class: "CreateNewTicket" }, h("button", { onClick: () => this.createNewTicket() }, "+"), h("span", null, translate('createTicket', this.language)))), h("div", { class: "OrderSummary" }, h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", h("span", null, this.tickets.length)), h("hr", null), h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", h("span", null, this.totalAmount, " ", this.currency)), h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
455
|
-
h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
456
|
-
h("div", null, h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)), h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
457
|
-
h("div", null, h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)), h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }), h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), h("helper-modal", { "title-modal": "Success", visible: this.successVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))), h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "DeleteTicketModalWrapper" }, h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)), h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)), h("div", { class: "DeleteTicketModalButtons" }, h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate('deleteTicketModalCancel', this.language)), h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate('deleteTicketModalConfirm', this.language)))))));
|
|
458
|
-
}
|
|
459
|
-
static get assetsDirs() { return ["static"]; }
|
|
460
|
-
get element() { return this; }
|
|
461
|
-
static get style() { return lotteryGamePageCss; }
|
|
462
|
-
}, [1, "lottery-game-page", {
|
|
463
|
-
"endpoint": [513],
|
|
464
|
-
"gameId": [513, "game-id"],
|
|
465
|
-
"playerId": [514, "player-id"],
|
|
466
|
-
"sessionId": [513, "session-id"],
|
|
467
|
-
"language": [513],
|
|
468
|
-
"backgroundUrl": [513, "background-url"],
|
|
469
|
-
"autoPick": [516, "auto-pick"],
|
|
470
|
-
"resetButton": [516, "reset-button"],
|
|
471
|
-
"clientStyling": [513, "client-styling"],
|
|
472
|
-
"clientStylingurl": [513, "client-stylingurl"],
|
|
473
|
-
"clientStylingUrlContent": [32],
|
|
474
|
-
"tickets": [32],
|
|
475
|
-
"tabIndex": [32],
|
|
476
|
-
"hasErrors": [32],
|
|
477
|
-
"totalAmount": [32],
|
|
478
|
-
"successVisible": [32],
|
|
479
|
-
"deleteVisible": [32],
|
|
480
|
-
"deleteEventData": [32],
|
|
481
|
-
"daysRemaining": [32],
|
|
482
|
-
"hoursRemaining": [32],
|
|
483
|
-
"minutesRemaining": [32],
|
|
484
|
-
"secondsRemaining": [32],
|
|
485
|
-
"latestDraw": [32],
|
|
486
|
-
"totalWinningsAmount": [32],
|
|
487
|
-
"nextDate": [32],
|
|
488
|
-
"isLoggedIn": [32],
|
|
489
|
-
"loginModalVisible": [32],
|
|
490
|
-
"limitStylingAppends": [32]
|
|
491
|
-
}, [[0, "ticketCompleted", "gridFilledHandler"], [0, "gridDirty", "gridDirtyHandler"], [0, "deleteTicket", "deleteTicketHandler"], [0, "modalCloseEvent", "modalCloseEvent"], [0, "stakeChange", "stakeChangeHandler"], [0, "multiplierChange", "multiplierChangeHandler"]]]);
|
|
492
|
-
function defineCustomElement$1() {
|
|
493
|
-
if (typeof customElements === "undefined") {
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
const components = ["lottery-game-page", "helper-accordion", "helper-filters", "helper-modal", "helper-tab", "helper-tabs", "lottery-bullet", "lottery-draw-results", "lottery-draw-results-history", "lottery-game-details", "lottery-grid", "lottery-ticket", "lottery-ticket-controller"];
|
|
497
|
-
components.forEach(tagName => { switch (tagName) {
|
|
498
|
-
case "lottery-game-page":
|
|
499
|
-
if (!customElements.get(tagName)) {
|
|
500
|
-
customElements.define(tagName, LotteryGamePage$1);
|
|
501
|
-
}
|
|
502
|
-
break;
|
|
503
|
-
case "helper-accordion":
|
|
504
|
-
if (!customElements.get(tagName)) {
|
|
505
|
-
defineCustomElement$d();
|
|
506
|
-
}
|
|
507
|
-
break;
|
|
508
|
-
case "helper-filters":
|
|
509
|
-
if (!customElements.get(tagName)) {
|
|
510
|
-
defineCustomElement$c();
|
|
511
|
-
}
|
|
512
|
-
break;
|
|
513
|
-
case "helper-modal":
|
|
514
|
-
if (!customElements.get(tagName)) {
|
|
515
|
-
defineCustomElement$b();
|
|
516
|
-
}
|
|
517
|
-
break;
|
|
518
|
-
case "helper-tab":
|
|
519
|
-
if (!customElements.get(tagName)) {
|
|
520
|
-
defineCustomElement$a();
|
|
521
|
-
}
|
|
522
|
-
break;
|
|
523
|
-
case "helper-tabs":
|
|
524
|
-
if (!customElements.get(tagName)) {
|
|
525
|
-
defineCustomElement$9();
|
|
526
|
-
}
|
|
527
|
-
break;
|
|
528
|
-
case "lottery-bullet":
|
|
529
|
-
if (!customElements.get(tagName)) {
|
|
530
|
-
defineCustomElement$8();
|
|
531
|
-
}
|
|
532
|
-
break;
|
|
533
|
-
case "lottery-draw-results":
|
|
534
|
-
if (!customElements.get(tagName)) {
|
|
535
|
-
defineCustomElement$7();
|
|
536
|
-
}
|
|
537
|
-
break;
|
|
538
|
-
case "lottery-draw-results-history":
|
|
539
|
-
if (!customElements.get(tagName)) {
|
|
540
|
-
defineCustomElement$6();
|
|
541
|
-
}
|
|
542
|
-
break;
|
|
543
|
-
case "lottery-game-details":
|
|
544
|
-
if (!customElements.get(tagName)) {
|
|
545
|
-
defineCustomElement$5();
|
|
546
|
-
}
|
|
547
|
-
break;
|
|
548
|
-
case "lottery-grid":
|
|
549
|
-
if (!customElements.get(tagName)) {
|
|
550
|
-
defineCustomElement$4();
|
|
551
|
-
}
|
|
552
|
-
break;
|
|
553
|
-
case "lottery-ticket":
|
|
554
|
-
if (!customElements.get(tagName)) {
|
|
555
|
-
defineCustomElement$3();
|
|
556
|
-
}
|
|
557
|
-
break;
|
|
558
|
-
case "lottery-ticket-controller":
|
|
559
|
-
if (!customElements.get(tagName)) {
|
|
560
|
-
defineCustomElement$2();
|
|
561
|
-
}
|
|
562
|
-
break;
|
|
563
|
-
} });
|
|
564
|
-
}
|
|
565
|
-
defineCustomElement$1();
|
|
566
|
-
|
|
567
|
-
const LotteryGamePage = LotteryGamePage$1;
|
|
568
|
-
const defineCustomElement = defineCustomElement$1;
|
|
569
|
-
|
|
570
|
-
export { LotteryGamePage, defineCustomElement };
|
|
571
|
-
|
|
572
|
-
//# sourceMappingURL=lottery-game-page.js.map
|