@everymatrix/lottery-game-page 0.1.26 → 1.13.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/dist/cjs/helper-accordion.cjs.entry.js +10 -2
- package/dist/cjs/helper-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-filters_2.cjs.entry.js +1716 -1002
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-modal.cjs.entry.js +2 -0
- package/dist/cjs/helper-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-pagination.cjs.entry.js +14 -0
- package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-tab.cjs.entry.js +2 -0
- package/dist/cjs/helper-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-tabs.cjs.entry.js +2 -0
- package/dist/cjs/helper-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/index-cd44e726.js +2 -0
- package/dist/cjs/index-cd44e726.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -1
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +13 -2
- package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +45 -16
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js +2 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-page.cjs.entry.js +33 -27
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-page.cjs.js +3 -1
- package/dist/cjs/lottery-game-page.cjs.js.map +1 -0
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +15 -2
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-ticket.cjs.entry.js +29 -7
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +1 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +10 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +83 -32
- package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/locale.utils.js +1 -0
- package/dist/collection/utils/locale.utils.js.map +1 -0
- package/dist/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/helper-accordion.js +2 -0
- package/dist/components/helper-accordion.js.map +1 -0
- package/dist/components/helper-accordion2.js +10 -2
- package/dist/components/helper-accordion2.js.map +1 -0
- package/dist/components/helper-filters.js +2 -0
- package/dist/components/helper-filters.js.map +1 -0
- package/dist/components/helper-filters2.js +1696 -974
- package/dist/components/helper-filters2.js.map +1 -0
- package/dist/components/helper-modal.js +2 -0
- package/dist/components/helper-modal.js.map +1 -0
- package/dist/components/helper-modal2.js +2 -0
- package/dist/components/helper-modal2.js.map +1 -0
- package/dist/components/helper-pagination.js +14 -0
- package/dist/components/helper-pagination.js.map +1 -0
- package/dist/components/helper-tab.js +2 -0
- package/dist/components/helper-tab.js.map +1 -0
- package/dist/components/helper-tab2.js +2 -0
- package/dist/components/helper-tab2.js.map +1 -0
- package/dist/components/helper-tabs.js +2 -0
- package/dist/components/helper-tabs.js.map +1 -0
- package/dist/components/helper-tabs2.js +2 -0
- package/dist/components/helper-tabs2.js.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/lottery-bullet.js +2 -0
- package/dist/components/lottery-bullet.js.map +1 -0
- package/dist/components/lottery-bullet2.js +2 -0
- package/dist/components/lottery-bullet2.js.map +1 -0
- package/dist/components/lottery-draw-results-history.js +2 -0
- package/dist/components/lottery-draw-results-history.js.map +1 -0
- package/dist/components/lottery-draw-results-history2.js +46 -17
- package/dist/components/lottery-draw-results-history2.js.map +1 -0
- package/dist/components/lottery-draw-results.js +2 -0
- package/dist/components/lottery-draw-results.js.map +1 -0
- package/dist/components/lottery-draw-results2.js +95 -101
- package/dist/components/lottery-draw-results2.js.map +1 -0
- package/dist/components/lottery-game-details.js +2 -0
- package/dist/components/lottery-game-details.js.map +1 -0
- package/dist/components/lottery-game-details2.js +2 -0
- package/dist/components/lottery-game-details2.js.map +1 -0
- package/dist/components/lottery-game-page.js +35 -28
- package/dist/components/lottery-game-page.js.map +1 -0
- package/dist/components/lottery-grid.js +2 -0
- package/dist/components/lottery-grid.js.map +1 -0
- package/dist/components/lottery-grid2.js +13 -2
- package/dist/components/lottery-grid2.js.map +1 -0
- package/dist/components/lottery-ticket-controller.js +2 -0
- package/dist/components/lottery-ticket-controller.js.map +1 -0
- package/dist/components/lottery-ticket-controller2.js +30 -16
- package/dist/components/lottery-ticket-controller2.js.map +1 -0
- package/dist/components/lottery-ticket.js +2 -0
- package/dist/components/lottery-ticket.js.map +1 -0
- package/dist/components/lottery-ticket2.js +29 -7
- package/dist/components/lottery-ticket2.js.map +1 -0
- package/dist/esm/helper-accordion.entry.js +10 -2
- package/dist/esm/helper-accordion.entry.js.map +1 -0
- package/dist/esm/helper-filters_2.entry.js +1716 -1002
- package/dist/esm/helper-filters_2.entry.js.map +1 -0
- package/dist/esm/helper-modal.entry.js +2 -0
- package/dist/esm/helper-modal.entry.js.map +1 -0
- package/dist/esm/helper-pagination.entry.js +14 -0
- package/dist/esm/helper-pagination.entry.js.map +1 -0
- package/dist/esm/helper-tab.entry.js +2 -0
- package/dist/esm/helper-tab.entry.js.map +1 -0
- package/dist/esm/helper-tabs.entry.js +2 -0
- package/dist/esm/helper-tabs.entry.js.map +1 -0
- package/dist/esm/index-d1baacd4.js +2 -0
- package/dist/esm/index-d1baacd4.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +3 -1
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/lottery-bullet_2.entry.js +13 -2
- package/dist/esm/lottery-bullet_2.entry.js.map +1 -0
- package/dist/esm/lottery-draw-results-history.entry.js +45 -16
- package/dist/esm/lottery-draw-results-history.entry.js.map +1 -0
- package/dist/esm/lottery-game-details.entry.js +2 -0
- package/dist/esm/lottery-game-details.entry.js.map +1 -0
- package/dist/esm/lottery-game-page.entry.js +34 -28
- package/dist/esm/lottery-game-page.entry.js.map +1 -0
- package/dist/esm/lottery-game-page.js +3 -1
- package/dist/esm/lottery-game-page.js.map +1 -0
- package/dist/esm/lottery-ticket-controller.entry.js +15 -2
- package/dist/esm/lottery-ticket-controller.entry.js.map +1 -0
- package/dist/esm/lottery-ticket.entry.js +29 -7
- package/dist/esm/lottery-ticket.entry.js.map +1 -0
- package/dist/lottery-game-page/index.esm.js +2 -0
- package/dist/lottery-game-page/index.esm.js.map +1 -0
- package/dist/lottery-game-page/lottery-game-page.esm.js +2 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js.map +1 -0
- package/dist/lottery-game-page/p-042065c6.entry.js +2 -0
- package/dist/lottery-game-page/p-042065c6.entry.js.map +1 -0
- package/dist/lottery-game-page/p-15309f9a.entry.js +2 -0
- package/dist/lottery-game-page/p-15309f9a.entry.js.map +1 -0
- package/dist/lottery-game-page/p-167c9dbe.entry.js +2 -0
- package/dist/lottery-game-page/p-167c9dbe.entry.js.map +1 -0
- package/dist/lottery-game-page/p-2e78ed7b.entry.js +2 -0
- package/dist/lottery-game-page/p-2e78ed7b.entry.js.map +1 -0
- package/dist/lottery-game-page/p-5b49ab69.entry.js +2 -0
- package/dist/lottery-game-page/p-5b49ab69.entry.js.map +1 -0
- package/dist/lottery-game-page/p-606c0b0f.entry.js +2 -0
- package/dist/lottery-game-page/p-606c0b0f.entry.js.map +1 -0
- package/dist/lottery-game-page/p-662d9dac.entry.js +2 -0
- package/dist/lottery-game-page/p-662d9dac.entry.js.map +1 -0
- package/dist/lottery-game-page/p-66729e9c.entry.js +2 -0
- package/dist/lottery-game-page/p-66729e9c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-76c280ec.entry.js +2 -0
- package/dist/lottery-game-page/p-76c280ec.entry.js.map +1 -0
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js +2 -0
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-aa68559a.entry.js +2 -0
- package/dist/lottery-game-page/p-aa68559a.entry.js.map +1 -0
- package/dist/lottery-game-page/p-d9e7b5da.entry.js +2899 -0
- package/dist/lottery-game-page/p-d9e7b5da.entry.js.map +1 -0
- package/dist/lottery-game-page/p-e765c7d9.js +2 -1
- package/dist/lottery-game-page/p-e765c7d9.js.map +1 -0
- package/dist/stencil.config.js +10 -1
- package/dist/stencil.config.js.map +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +10 -1
- package/dist/types/components.d.ts +12 -2
- package/package.json +1 -1
- package/dist/components/assets/chrono_desktop.png +0 -0
- package/dist/components/assets/chrono_lottery_mobile.png +0 -0
- package/dist/lottery-game-page/p-023325a2.entry.js +0 -1
- package/dist/lottery-game-page/p-04fbc8fd.entry.js +0 -1
- package/dist/lottery-game-page/p-256b151c.entry.js +0 -1
- package/dist/lottery-game-page/p-381b5507.entry.js +0 -1
- package/dist/lottery-game-page/p-3f8b6ad9.entry.js +0 -1
- package/dist/lottery-game-page/p-4274053c.entry.js +0 -1
- package/dist/lottery-game-page/p-4f81cd37.entry.js +0 -1
- package/dist/lottery-game-page/p-5c389034.entry.js +0 -1
- package/dist/lottery-game-page/p-7d06371e.entry.js +0 -1
- package/dist/lottery-game-page/p-ca8430a0.entry.js +0 -2849
- package/dist/lottery-game-page/p-d6f76e8d.entry.js +0 -1
- package/dist/lottery-game-page/p-f6fcc22c.entry.js +0 -1
- package/dist/lottery-game-page/static/chrono_desktop.png +0 -0
- package/dist/lottery-game-page/static/chrono_lottery_mobile.png +0 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
- /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_desktop.png +0 -0
- /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_lottery_mobile.png +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"lottery-bullet.lottery-grid.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,i8FAAi8F;;MCC78F,aAAa;EACxB;;;;;;IAIE,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;;;;IAIjB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;;;;IAIvB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;;;;IAIxB,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;;;;IAIxB,IAAI,CAAC,uBAAuB,GAAG,EAAE,CAAC;IAClC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;IACjC,IAAI,CAAC,MAAM,GAAG;MACZ,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;QACnC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;UACpB,KAAK,EAAE,IAAI,CAAC,KAAK;UACjB,QAAQ,EAAE,IAAI,CAAC,UAAU;SAC1B,CAAC,CAAC;OACJ;KACF,CAAC;IACF,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,mBA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G,IAAI,CAAC,cAAc,CAAC;KAC5C;GACF;EACD,MAAM;IACJ,QAAQA,OAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,gBAAgB,GAAG,EAAE,EAAE,EAChFA,OAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,KAAK,QAAQ,GAAG,iBAAiB,GAAG,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,KAAKA,OAAC,CAAC,KAAK,EAAE,IAAI,EACnHA,OAAC,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;GACnN;;;;;;;","names":["h"],"sources":["../lottery-bullet/dist/collection/components/lottery-bullet/lottery-bullet.css?tag=lottery-bullet&encapsulation=shadow","../lottery-bullet/dist/collection/components/lottery-bullet/lottery-bullet.js","../lottery-grid/dist/collection/components/lottery-grid/lottery-grid.css?tag=lottery-grid&encapsulation=shadow","../lottery-grid/dist/collection/components/lottery-grid/lottery-grid.js"],"sourcesContent":["@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n/*** Animation - Show */\n@-webkit-keyframes Circle {\n 0% {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n@keyframes Circle {\n 0% {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n/*** Animation - Hover */\n@-webkit-keyframes hover-rotate {\n 0% {\n -webkit-transform: scale(1) rotateZ(0);\n transform: scale(1) rotateZ(0);\n }\n 50% {\n -webkit-transform: scale(1.2) rotateZ(180deg);\n transform: scale(1.22) rotateZ(180deg);\n }\n 100% {\n -webkit-transform: scale(1) rotateZ(360deg);\n transform: scale(1) rotateZ(360deg);\n }\n}\n@keyframes hover-rotate {\n 0% {\n -webkit-transform: scale(1) rotateZ(0);\n transform: scale(1) rotateZ(0);\n }\n 50% {\n -webkit-transform: scale(1.2) rotateZ(180deg);\n transform: scale(1.2) rotateZ(180deg);\n }\n 100% {\n -webkit-transform: scale(1) rotateZ(360deg);\n transform: scale(1) rotateZ(360deg);\n }\n}\n/*** Animation - Selected */\n@-webkit-keyframes selected-scaleUp {\n 0% {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n }\n 100% {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n }\n}\n@keyframes selected-scaleUp {\n 0% {\n -webkit-transform: scale(0.5);\n transform: scale(0.5);\n }\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n}\n.Circle {\n -webkit-animation: Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n animation: Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n cursor: pointer;\n color: #000000;\n display: block;\n height: 30px;\n width: 30px;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n justify-content: center;\n align-items: center;\n border: solid 2px #ffffff;\n background: radial-gradient(circle at top, white 0%, white 100%);\n font-weight: bold;\n border-radius: 50%;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);\n user-select: none;\n font-size: 16px;\n line-height: 16px;\n font-weight: 600;\n position: relative;\n}\n.Circle:hover {\n -webkit-animation: hover-rotate 0.4s linear both;\n animation: hover-rotate 0.4s linear both;\n background: radial-gradient(circle at top, white 0%, #f1f1f1 100%);\n}\n.Circle.Selected {\n -webkit-animation: selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n animation: selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n color: #ffffff;\n background: #9EC258;\n background: -webkit-radial-gradient(top, #00958f, #004D4A);\n background: -moz-radial-gradient(top, #00958f, #004D4A);\n background: radial-gradient(to bottom, #00958f, #004D4A);\n border: solid 2px #00958f;\n}\n.Circle.Disabled {\n -webkit-animation: selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n animation: selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n color: #f1f1f1;\n background: #D4D4D4;\n border: solid 2px #D4D4D4;\n cursor: default;\n}\n.Circle.DisabledSelected {\n -webkit-animation: selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n animation: selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;\n color: #f1f1f1;\n background: #9EC258;\n background: -webkit-radial-gradient(top, #00958f, #004D4A);\n background: -moz-radial-gradient(top, #00958f, #004D4A);\n background: radial-gradient(to bottom, #00958f, #004D4A);\n border: solid 2px #D4D4D4;\n cursor: default;\n}","import { Component, h, Prop, Event, State } from '@stencil/core';\nexport class LotteryBullet {\n constructor() {\n /**\n * Value of the bullet\n */\n this.value = '0';\n /**\n * Marks if the bullet should be selectable\n */\n this.selectable = true;\n /**\n * Marks if the bullet should be selected\n */\n this.isSelected = false;\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.select = () => {\n if (this.selectable) {\n this.isSelected = !this.isSelected;\n this.bulletEvent.emit({\n value: this.value,\n selected: this.isSelected\n });\n }\n };\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: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select(), ref: el => this.stylingContainer = el }, this.value));\n }\n static get is() { return \"lottery-bullet\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-bullet.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-bullet.css\"]\n }; }\n static get properties() { return {\n \"value\": {\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\": \"Value of the bullet\"\n },\n \"attribute\": \"value\",\n \"reflect\": false,\n \"defaultValue\": \"'0'\"\n },\n \"selectable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Marks if the bullet should be selectable\"\n },\n \"attribute\": \"selectable\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"isSelected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Marks if the bullet should be selected\"\n },\n \"attribute\": \"is-selected\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\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\": false,\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\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"bulletEvent\",\n \"name\": \"lotteryBulletSelection\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When a bullet is selected/deselected this event is emmited\"\n },\n \"complexType\": {\n \"original\": \"BulletEvent\",\n \"resolved\": \"BulletEvent\",\n \"references\": {\n \"BulletEvent\": {\n \"location\": \"import\",\n \"path\": \"./lottery-bullet.types\"\n }\n }\n }\n }]; }\n}\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.GridContainer {\n display: flex;\n flex-direction: column;\n max-width: 1200px;\n}\n\n.Grid {\n margin-top: 10px 0 10px 0;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 20px;\n}\n.Grid.TicketGrid {\n gap: 5px;\n}","import { Component, h, Prop, Listen, State, Event } from '@stencil/core';\n// import { translate } from '../../utils/locale.utils';\nimport '@everymatrix/lottery-bullet';\nexport class LotteryGrid {\n constructor() {\n /**\n * Number of bullets of grid\n */\n this.totalNumbers = 0;\n /**\n * Number of maximum bullets that can be selected\n */\n this.maximumAllowed = 0;\n /**\n * Minimum allowed of bullets\n */\n this.minimumAllowed = 1;\n /**\n * Allows the user to select numbers on the grid\n */\n this.selectable = true;\n /**\n * Numbers that should be showed as selected on the grid (as a string of those numbers e.g. '1,2,3,4,5,6')\n */\n this.selectedNumbers = '';\n /**\n * Show only selected numbers\n */\n this.displaySelected = false;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Personalize grid for ticket\n */\n this.gridType = '';\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.numbers = [];\n this.limitStylingAppends = false;\n this.selectedCounter = 0;\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 connectedCallback() {\n let selected = [];\n if (this.selectedNumbers.length > 0) {\n selected = this.selectedNumbers.split(',');\n this.selectedCounter = selected.length;\n }\n if (this.displaySelected) {\n selected.forEach((item) => {\n this.numbers.push({\n number: item,\n selected: true,\n selectable: this.selectable\n });\n });\n }\n else {\n [...Array(this.totalNumbers).keys()]\n .map(number => (number + 1).toString())\n .forEach((number) => {\n this.numbers.push({\n number,\n selected: selected.indexOf(number) >= 0 ? true : false,\n selectable: this.selectedCounter == this.maximumAllowed ? false : this.selectable\n });\n });\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 // wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices\n shuffleArray(array) {\n const result = [];\n while (array.length > 0) {\n const randomIndex = Math.floor(Math.random() * (array.length));\n result.push(array.splice(randomIndex, 1)[0]);\n }\n return result;\n }\n lotteryBulletSelectionHandler(event) {\n this.numbers = this.numbers.map((item) => {\n if (item.number == event.detail.value) {\n return {\n number: item.number,\n selected: event.detail.selected,\n selectable: item.selectable\n };\n }\n return {\n number: item.number,\n selected: item.selected,\n selectable: item.selectable\n };\n });\n if (event.detail.selected) {\n this.selectedCounter += 1;\n if (this.selectedCounter == this.maximumAllowed) {\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: item.selected,\n selectable: item.selected ? true : false\n };\n });\n this.gridFilledEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n }\n }\n else {\n if (this.selectedCounter == this.maximumAllowed) {\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: item.selected,\n selectable: true\n };\n });\n this.gridDirtyEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n }\n this.selectedCounter -= 1;\n }\n }\n async resetSelectionHandler(event) {\n if (event.detail && event.detail == this.ticketId) {\n this.selectedCounter = 0;\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: false,\n selectable: this.selectable\n };\n });\n this.gridDirtyEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n }\n }\n async autoSelectionHandler(event) {\n if (event.detail && event.detail == this.ticketId) {\n this.resetSelectionHandler(event);\n let array = [...Array(this.totalNumbers).keys()]\n .map(number => number + 1);\n array = this.shuffleArray(array);\n array = array.slice(0, this.minimumAllowed);\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,\n selectable: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,\n };\n });\n this.gridFilledEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n this.selectedCounter = this.maximumAllowed;\n }\n }\n render() {\n return (h(\"div\", { class: \"GridContainer\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.gridType === 'ticket' ? 'Grid TicketGrid' : 'Grid' }, this.numbers.map((item) => h(\"div\", null,\n h(\"lottery-bullet\", { value: item.number, selectable: item.selectable, \"is-selected\": item.selected, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent }))))));\n }\n static get is() { return \"lottery-grid\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-grid.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-grid.css\"]\n }; }\n static get properties() { return {\n \"ticketId\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Identifier for the ticket\"\n },\n \"attribute\": \"ticket-id\",\n \"reflect\": false\n },\n \"totalNumbers\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Number of bullets of grid\"\n },\n \"attribute\": \"total-numbers\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"gameId\": {\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\": \"Game ID\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false\n },\n \"maximumAllowed\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Number of maximum bullets that can be selected\"\n },\n \"attribute\": \"maximum-allowed\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"minimumAllowed\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Minimum allowed of bullets\"\n },\n \"attribute\": \"minimum-allowed\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\n },\n \"selectable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Allows the user to select numbers on the grid\"\n },\n \"attribute\": \"selectable\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"selectedNumbers\": {\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\": \"Numbers that should be showed as selected on the grid (as a string of those numbers e.g. '1,2,3,4,5,6')\"\n },\n \"attribute\": \"selected-numbers\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"displaySelected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Show only selected numbers\"\n },\n \"attribute\": \"display-selected\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"language\": {\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\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n },\n \"gridIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The index of the number\"\n },\n \"attribute\": \"grid-index\",\n \"reflect\": false\n },\n \"gridType\": {\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\": \"Personalize grid for ticket\"\n },\n \"attribute\": \"grid-type\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\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\": false,\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\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"numbers\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"gridFilledEvent\",\n \"name\": \"gridFilled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When the grid is completed, it emits this event with selected numbers\"\n },\n \"complexType\": {\n \"original\": \"GridEvent\",\n \"resolved\": \"GridEvent\",\n \"references\": {\n \"GridEvent\": {\n \"location\": \"import\",\n \"path\": \"./lottery-grid.types\"\n }\n }\n }\n }, {\n \"method\": \"gridDirtyEvent\",\n \"name\": \"gridDirty\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When the grid is uncomplete after being completed once (reset or change), it emits this event\"\n },\n \"complexType\": {\n \"original\": \"GridEvent\",\n \"resolved\": \"GridEvent\",\n \"references\": {\n \"GridEvent\": {\n \"location\": \"import\",\n \"path\": \"./lottery-grid.types\"\n }\n }\n }\n }]; }\n static get listeners() { return [{\n \"name\": \"lotteryBulletSelection\",\n \"method\": \"lotteryBulletSelectionHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"resetSelection\",\n \"method\": \"resetSelectionHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"autoSelection\",\n \"method\": \"autoSelectionHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n"],"version":3}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-cd44e726.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
drawResultsHeader: 'Draw results history',
|
|
@@ -33,13 +33,39 @@ const TRANSLATIONS = {
|
|
|
33
33
|
noResults: 'Niciun rezultat',
|
|
34
34
|
fetchingResults: 'Se obtin rezultatele'
|
|
35
35
|
},
|
|
36
|
+
fr: {
|
|
37
|
+
drawResultsHeader: 'Dessiner l\'historique des résultats',
|
|
38
|
+
drawId: 'ID de tirage',
|
|
39
|
+
drawDate: 'Date du tirage',
|
|
40
|
+
drawNumbersGridA: 'Tirage des numéros Grille',
|
|
41
|
+
viewAllResults: 'Voir tout',
|
|
42
|
+
lastFiveDraws: '5 derniers tirages',
|
|
43
|
+
lastTenDraws: '10 derniers tirages',
|
|
44
|
+
lastFifteenDraws: '15 derniers tirages',
|
|
45
|
+
allDrawResultsHistory: 'Historique des résultats de tous les tirages',
|
|
46
|
+
noResults: 'Aucun résultat',
|
|
47
|
+
fetchingResults: 'Récupération des résultats'
|
|
48
|
+
},
|
|
49
|
+
ar: {
|
|
50
|
+
drawResultsHeader: 'سجل نتائج السحب',
|
|
51
|
+
drawId: 'معرّف السحب',
|
|
52
|
+
drawDate: 'تاريخ السحب',
|
|
53
|
+
drawNumbersGridA: 'شبكة أرقام السحب',
|
|
54
|
+
viewAllResults: 'عرض الكل',
|
|
55
|
+
lastFiveDraws: 'آخر 5 سحوبات',
|
|
56
|
+
lastTenDraws: 'آخر 10 سحوبات',
|
|
57
|
+
lastFifteenDraws: 'آخر 15 سحبًا',
|
|
58
|
+
allDrawResultsHistory: 'سجل نتائج كل السحوبات',
|
|
59
|
+
noResults: 'لا توجد نتائج',
|
|
60
|
+
fetchingResults: 'جلب النتائج'
|
|
61
|
+
}
|
|
36
62
|
};
|
|
37
63
|
const translate = (key, customLang) => {
|
|
38
64
|
const lang = customLang;
|
|
39
65
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
40
66
|
};
|
|
41
67
|
|
|
42
|
-
const lotteryDrawResultsHistoryCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}";
|
|
68
|
+
const lotteryDrawResultsHistoryCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}";
|
|
43
69
|
|
|
44
70
|
const LotteryDrawResultsHistory = class {
|
|
45
71
|
constructor(hostRef) {
|
|
@@ -61,16 +87,16 @@ const LotteryDrawResultsHistory = class {
|
|
|
61
87
|
*/
|
|
62
88
|
this.clientStylingUrlContent = '';
|
|
63
89
|
this.drawData = [];
|
|
90
|
+
this.winningDataSetsData = [''];
|
|
64
91
|
this.displayAllDrawsResults = true;
|
|
65
92
|
this.showQuickFilters = true;
|
|
66
|
-
this.winningDataSetsData = [''];
|
|
67
93
|
this.dateFiltersFrom = '';
|
|
68
94
|
this.dateFiltersTo = '';
|
|
69
95
|
this.isLoading = false;
|
|
70
96
|
this.noResults = false;
|
|
71
97
|
this.limitStylingAppends = false;
|
|
72
|
-
this.getDrawsData = (
|
|
73
|
-
let url =
|
|
98
|
+
this.getDrawsData = () => {
|
|
99
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
|
|
74
100
|
if (this.dateFiltersFrom)
|
|
75
101
|
url.searchParams.append('from', this.dateFiltersFrom);
|
|
76
102
|
if (this.dateFiltersTo)
|
|
@@ -83,13 +109,7 @@ const LotteryDrawResultsHistory = class {
|
|
|
83
109
|
return res.json();
|
|
84
110
|
})
|
|
85
111
|
.then((data) => {
|
|
86
|
-
this.
|
|
87
|
-
if (filterbydate) {
|
|
88
|
-
this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.winningDataSetsData = data.draws.filter(draw => draw.winningNumbers);
|
|
92
|
-
}
|
|
112
|
+
this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);
|
|
93
113
|
this.drawData = this.winningDataSetsData.map((item) => item);
|
|
94
114
|
})
|
|
95
115
|
.catch((err) => {
|
|
@@ -115,10 +135,17 @@ const LotteryDrawResultsHistory = class {
|
|
|
115
135
|
};
|
|
116
136
|
fetch(url.href, drawOptions)
|
|
117
137
|
.then((response) => {
|
|
138
|
+
if (response.status == 404)
|
|
139
|
+
this.noResults = true;
|
|
118
140
|
return response.json();
|
|
119
141
|
})
|
|
120
142
|
.then((data) => {
|
|
121
143
|
this.drawData = [data].map((item) => item);
|
|
144
|
+
})
|
|
145
|
+
.catch((err) => {
|
|
146
|
+
console.log('err', err);
|
|
147
|
+
})
|
|
148
|
+
.finally(() => {
|
|
122
149
|
this.isLoading = false;
|
|
123
150
|
});
|
|
124
151
|
};
|
|
@@ -155,20 +182,20 @@ const LotteryDrawResultsHistory = class {
|
|
|
155
182
|
else {
|
|
156
183
|
this.dateFiltersFrom = event.detail.filterFromCalendar;
|
|
157
184
|
this.dateFiltersTo = event.detail.filterToCalendar;
|
|
158
|
-
this.getDrawsData(
|
|
185
|
+
this.getDrawsData();
|
|
159
186
|
}
|
|
160
187
|
}
|
|
161
188
|
clearFiltersHandler() {
|
|
162
|
-
this.drawData = this.winningDataSetsData;
|
|
163
189
|
this.showQuickFilters = true;
|
|
164
190
|
this.dateFiltersFrom = '';
|
|
165
191
|
this.dateFiltersTo = '';
|
|
192
|
+
this.drawData = this.winningDataSetsData;
|
|
166
193
|
this.isLoading = true;
|
|
167
|
-
this.getDrawsData(
|
|
194
|
+
this.getDrawsData();
|
|
168
195
|
}
|
|
169
196
|
connectedCallback() {
|
|
170
197
|
if (this.showQuickFilters)
|
|
171
|
-
this.getDrawsData(
|
|
198
|
+
this.getDrawsData();
|
|
172
199
|
}
|
|
173
200
|
disconnectedCallback() {
|
|
174
201
|
clearInterval(this.interval);
|
|
@@ -196,3 +223,5 @@ const LotteryDrawResultsHistory = class {
|
|
|
196
223
|
LotteryDrawResultsHistory.style = lotteryDrawResultsHistoryCss;
|
|
197
224
|
|
|
198
225
|
exports.lottery_draw_results_history = LotteryDrawResultsHistory;
|
|
226
|
+
|
|
227
|
+
//# sourceMappingURL=lottery-draw-results-history.cjs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"lottery-draw-results-history.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACrD,MAAM,YAAY,GAAG;AACrB,EAAE,EAAE,EAAE;AACN,IAAI,iBAAiB,EAAE,sBAAsB;AAC7C,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,QAAQ,EAAE,WAAW;AACzB,IAAI,gBAAgB,EAAE,qBAAqB;AAC3C,IAAI,cAAc,EAAE,UAAU;AAC9B,IAAI,aAAa,EAAE,cAAc;AACjC,IAAI,YAAY,EAAE,eAAe;AACjC,IAAI,gBAAgB,EAAE,eAAe;AACrC,IAAI,qB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AAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,EACnU,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,KAAKA,OAAC,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAChG,IAAI,CAAC,sBAAsB,IAAIA,OAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,SAAS,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;GAC5J;;;;;;","names":["h"],"sources":["../lottery-draw-results-history/dist/collection/utils/locale.utils.js","../lottery-draw-results-history/dist/collection/components/lottery-draw-results-history/lottery-draw-results-history.css?tag=lottery-draw-results-history&encapsulation=shadow","../lottery-draw-results-history/dist/collection/components/lottery-draw-results-history/lottery-draw-results-history.js"],"sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];\nconst TRANSLATIONS = {\n en: {\n drawResultsHeader: 'Draw results history',\n drawId: 'Draw ID',\n drawDate: 'Draw Date',\n drawNumbersGridA: 'Draw numbers Grid A',\n viewAllResults: 'View All',\n lastFiveDraws: 'Last 5 Draws',\n lastTenDraws: 'Last 10 Draws',\n lastFifteenDraws: 'Last 15 Draws',\n allDrawResultsHistory: 'All Draw Results History',\n noResults: 'No results',\n fetchingResults: 'Fetching results'\n },\n ro: {\n drawResultsHeader: 'Istoricul extragerilor',\n drawId: 'ID-ul extragerii',\n drawDate: 'Data extragerii',\n drawNumbersGridA: 'Numerele extrase Grid A',\n viewAllResults: 'Vezi toate rezultatele',\n lastFiveDraws: 'Ultimile 5 extrageri',\n lastTenDraws: 'Ultimile 10 extrageri',\n lastFifteenDraws: 'Ultimile 15 extrageri',\n allDrawResultsHistory: 'Istoricul tuturor extragerilor',\n noResults: 'Niciun rezultat',\n fetchingResults: 'Se obtin rezultatele'\n },\n fr: {\n drawResultsHeader: 'Dessiner l\\'historique des résultats',\n drawId: 'ID de tirage',\n drawDate: 'Date du tirage',\n drawNumbersGridA: 'Tirage des numéros Grille',\n viewAllResults: 'Voir tout',\n lastFiveDraws: '5 derniers tirages',\n lastTenDraws: '10 derniers tirages',\n lastFifteenDraws: '15 derniers tirages',\n allDrawResultsHistory: 'Historique des résultats de tous les tirages',\n noResults: 'Aucun résultat',\n fetchingResults: 'Récupération des résultats'\n },\n ar: {\n drawResultsHeader: 'سجل نتائج السحب',\n drawId: 'معرّف السحب',\n drawDate: 'تاريخ السحب',\n drawNumbersGridA: 'شبكة أرقام السحب',\n viewAllResults: 'عرض الكل',\n lastFiveDraws: 'آخر 5 سحوبات',\n lastTenDraws: 'آخر 10 سحوبات',\n lastFifteenDraws: 'آخر 15 سحبًا',\n allDrawResultsHistory: 'سجل نتائج كل السحوبات',\n noResults: 'لا توجد نتائج',\n fetchingResults: 'جلب النتائج'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.GridBanner {\n background-color: #009993;\n background-repeat: no-repeat;\n background-position: center;\n color: #111;\n padding: 0 20px 30px;\n}\n.GridBanner .BannerButtonsWrapper {\n display: flex;\n justify-content: space-between;\n padding-top: 16px;\n}\n.GridBanner .BannerButtonsWrapper .BannerBackButton, .GridBanner .BannerButtonsWrapper .BannerLobbyButton {\n background: #fff;\n border: 1px solid #009993;\n border-radius: 4px;\n padding: 7px 15px;\n font-size: 12px;\n text-transform: uppercase;\n width: 80px;\n cursor: pointer;\n}\n.GridBanner .HistoryGridBannerArea {\n padding-top: 30px;\n}\n\n.HistoryGridBannerArea {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.BannerText {\n font-size: 14px;\n font-weight: 300;\n}\n\n.BannerCountdown {\n font-size: 22px;\n display: flex;\n gap: 20px;\n}\n\n.DrawResultsSection {\n max-width: 600px;\n margin: 0px auto;\n}\n\n.HistoryGrid {\n border-radius: 5px;\n}\n\n.DrawResultsHeader {\n color: #009993;\n padding: 25px 0 10px 0;\n text-align: center;\n border-radius: 4px 4px 0 0;\n}\n.DrawResultsHeader h4 {\n text-transform: uppercase;\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n}\n\n.DrawNumbersGrid {\n padding: 10px 50px;\n}\n.DrawNumbersGrid p {\n margin: 0 0 10px 0;\n font-size: 14px;\n}\n\n.BulletContainer {\n margin-bottom: 20px;\n}\n\n.DrawResultTop {\n background-color: #009993;\n padding: 10px;\n text-align: center;\n color: #fff;\n padding: 0 50px;\n display: flex;\n justify-content: center;\n gap: 40px;\n}\n\n.ViewAllResults {\n display: block;\n padding: 10px 40px;\n margin: 40px auto;\n border: 0;\n border-radius: 5px;\n background-color: #009993;\n color: #fff;\n outline: none;\n}\n\n.FilterSection {\n display: flex;\n justify-content: space-between;\n padding: 25px 15px 10px;\n gap: 10px;\n margin: 0px 15px;\n}\n.FilterSection .FilterResultsContainer {\n display: flex;\n gap: 5px;\n overflow-x: auto;\n}\n.FilterSection .QuickFilterButton {\n cursor: pointer;\n width: max-content;\n border-radius: 4px;\n border: 1px solid #00958f;\n background: #FFF;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-align: center;\n letter-spacing: 0;\n}\n.FilterSection .QuickFilterButton:hover {\n background: #F1F1F1;\n}\n.FilterSection helper-filters {\n margin-left: auto;\n}","import { Component, Prop, h, State, Listen } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nimport '@everymatrix/lottery-grid';\nimport '@everymatrix/helper-pagination';\nimport '@everymatrix/helper-modal';\nimport '@everymatrix/helper-filters';\nimport '@everymatrix/lottery-draw-results';\nexport class LotteryDrawResultsHistory {\n constructor() {\n /**\n * The number of results to be displayed\n */\n this.numberOfResults = 3;\n /**\n *Language\n */\n this.language = 'en';\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.drawData = [];\n this.winningDataSetsData = [''];\n this.displayAllDrawsResults = true;\n this.showQuickFilters = true;\n this.dateFiltersFrom = '';\n this.dateFiltersTo = '';\n this.isLoading = false;\n this.noResults = false;\n this.limitStylingAppends = false;\n this.getDrawsData = () => {\n let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);\n if (this.dateFiltersFrom)\n url.searchParams.append('from', this.dateFiltersFrom);\n if (this.dateFiltersTo)\n url.searchParams.append('to', this.dateFiltersTo);\n fetch(url.href)\n .then((res) => {\n if (res.status >= 300) {\n throw new Error('There was an error while fetching the data');\n }\n return res.json();\n })\n .then((data) => {\n this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);\n this.drawData = this.winningDataSetsData.map((item) => item);\n })\n .catch((err) => {\n console.log('err', err);\n })\n .finally(() => {\n this.isLoading = false;\n this.noResults = this.drawData.filter(draw => draw.winningNumbers).length == 0 ? true : false;\n });\n };\n this.filterResults = (resultsNumber) => {\n this.numberOfResults = resultsNumber;\n this.displayAllDrawsResults = true;\n };\n this.getDrawResults = (drawID) => {\n let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID}`);\n let drawOptions = {\n method: \"GET\",\n headers: {\n 'Content-Type': \"application/json\",\n 'Accept': 'application/json',\n },\n };\n fetch(url.href, drawOptions)\n .then((response) => {\n if (response.status == 404)\n this.noResults = true;\n return response.json();\n })\n .then((data) => {\n this.drawData = [data].map((item) => item);\n })\n .catch((err) => {\n console.log('err', err);\n })\n .finally(() => {\n this.isLoading = false;\n });\n };\n this.viewAllResults = () => {\n this.numberOfResults = this.drawData.length;\n this.displayAllDrawsResults = false;\n window.scrollTo({ top: 0, behavior: 'smooth' });\n };\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 // Filters events\n // @Listen('filterDraw')\n // filtersDrawHandler(event: CustomEvent<any>):void {\n // this.isLoading = true;\n // this.showQuickFilters = false;\n // }\n filtersHandler(event) {\n this.showQuickFilters = false;\n this.isLoading = true;\n if (event.detail.ticketDrawId) {\n this.getDrawResults(event.detail.ticketDrawId);\n }\n else {\n this.dateFiltersFrom = event.detail.filterFromCalendar;\n this.dateFiltersTo = event.detail.filterToCalendar;\n this.getDrawsData();\n }\n }\n clearFiltersHandler() {\n this.showQuickFilters = true;\n this.dateFiltersFrom = '';\n this.dateFiltersTo = '';\n this.drawData = this.winningDataSetsData;\n this.isLoading = true;\n this.getDrawsData();\n }\n connectedCallback() {\n if (this.showQuickFilters)\n this.getDrawsData();\n }\n disconnectedCallback() {\n clearInterval(this.interval);\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 let gridHeader = h(\"div\", { class: \"DrawResultsHeader\" }, this.displayAllDrawsResults ? h(\"h4\", null, translate('drawResultsHeader', this.language)) :\n [h(\"div\", { class: \"DrawResultsHeaderContent\" },\n h(\"h4\", null, translate('allDrawResultsHistory', this.language)),\n h(\"div\", { class: \"FilterSection\" },\n this.showQuickFilters &&\n h(\"div\", { class: \"FilterResultsContainer\" },\n h(\"button\", { class: \"QuickFilterButton\", onClick: () => this.filterResults(5) }, translate('lastFiveDraws', this.language)),\n h(\"button\", { class: \"QuickFilterButton\", onClick: () => this.filterResults(10) }, translate('lastTenDraws', this.language)),\n h(\"button\", { class: \"QuickFilterButton\", onClick: () => this.filterResults(15) }, translate('lastFifteenDraws', this.language))),\n 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 }))),\n ]);\n return h(\"section\", { class: \"GridWrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: \"DrawResultsSection\" },\n h(\"div\", { class: \"DrawResultsAreaHistory\" },\n gridHeader,\n h(\"div\", { class: \"HistoryGridWrapper\" },\n h(\"div\", { class: \"HistoryGrid\" },\n this.isLoading &&\n h(\"p\", null, translate('fetchingResults', this.language)),\n !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),\n !this.isLoading && this.noResults && (h(\"p\", null, translate('noResults', this.language))))),\n this.displayAllDrawsResults && h(\"button\", { class: \"ViewAllResults\", onClick: this.viewAllResults }, translate('viewAllResults', this.language)))));\n }\n static get is() { return \"lottery-draw-results-history\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-draw-results-history.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-draw-results-history.css\"]\n }; }\n static get properties() { return {\n \"endpoint\": {\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\": \"Endpoint URL for lottery\"\n },\n \"attribute\": \"endpoint\",\n \"reflect\": false\n },\n \"gameId\": {\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\": \"GameID\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false\n },\n \"numberOfResults\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The number of results to be displayed\"\n },\n \"attribute\": \"number-of-results\",\n \"reflect\": false,\n \"defaultValue\": \"3\"\n },\n \"language\": {\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\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n },\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\": false,\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\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"drawData\": {},\n \"winningDataSetsData\": {},\n \"displayAllDrawsResults\": {},\n \"showQuickFilters\": {},\n \"dateFiltersFrom\": {},\n \"dateFiltersTo\": {},\n \"isLoading\": {},\n \"noResults\": {},\n \"limitStylingAppends\": {}\n }; }\n static get listeners() { return [{\n \"name\": \"filterSelection\",\n \"method\": \"filtersHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"filterSelectionReset\",\n \"method\": \"clearFiltersHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"lottery-game-details.entry.cjs.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,QAAQA,OAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,gBAAgB,GAAG,EAAE,EAAE,EAC3FA,OAAC,CAAC,kBAAkB,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,IAAI,CAAC,uBAAuB,EAAE,EAC1KA,OAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAChEA,OAAC,CAAC,aAAa,EAAE,EAAE,gBAAgB,EAAE,IAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;GAClI;;;;;;","names":["h"],"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\": false,\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\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n}\n"],"version":3}
|
|
@@ -118,11 +118,13 @@ const isMobile = (userAgent) => {
|
|
|
118
118
|
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
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}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;
|
|
121
|
+
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%}}";
|
|
122
122
|
|
|
123
123
|
const LotteryGamePage = class {
|
|
124
124
|
constructor(hostRef) {
|
|
125
125
|
index.registerInstance(this, hostRef);
|
|
126
|
+
this.goBackEvent = index.createEvent(this, "goBackEvent", 7);
|
|
127
|
+
this.goToLobbyEvent = index.createEvent(this, "goToLobbyEvent", 7);
|
|
126
128
|
/**
|
|
127
129
|
* Language of the widget
|
|
128
130
|
*/
|
|
@@ -159,6 +161,7 @@ const LotteryGamePage = class {
|
|
|
159
161
|
this.userAgent = window.navigator.userAgent;
|
|
160
162
|
this.multiplier = false;
|
|
161
163
|
this.quickPick = false;
|
|
164
|
+
this.isMobile = isMobile(this.userAgent);
|
|
162
165
|
this.setClientStyling = () => {
|
|
163
166
|
let sheet = document.createElement('style');
|
|
164
167
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -180,9 +183,6 @@ const LotteryGamePage = class {
|
|
|
180
183
|
};
|
|
181
184
|
}
|
|
182
185
|
// @TODO fix `any` type later, I'm lazy now
|
|
183
|
-
handleSessionIdValue() {
|
|
184
|
-
this.isLoggedIn = true;
|
|
185
|
-
}
|
|
186
186
|
connectedCallback() {
|
|
187
187
|
this.getGameDetails();
|
|
188
188
|
this.getDraws();
|
|
@@ -202,14 +202,12 @@ const LotteryGamePage = class {
|
|
|
202
202
|
// end custom styling area
|
|
203
203
|
}
|
|
204
204
|
countdownLogic(date) {
|
|
205
|
-
|
|
206
|
-
this.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}, 1000);
|
|
212
|
-
}
|
|
205
|
+
this.interval = setInterval(() => {
|
|
206
|
+
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
207
|
+
this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
|
|
208
|
+
this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
|
|
209
|
+
this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
|
|
210
|
+
}, 1000);
|
|
213
211
|
}
|
|
214
212
|
disconnectedCallback() {
|
|
215
213
|
clearInterval(this.interval);
|
|
@@ -226,9 +224,9 @@ const LotteryGamePage = class {
|
|
|
226
224
|
})
|
|
227
225
|
.then((data) => {
|
|
228
226
|
this.gameData = data;
|
|
229
|
-
this.basicStake = this.gameData.
|
|
227
|
+
this.basicStake = this.gameData.type.stakes[0].amount;
|
|
230
228
|
let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
|
|
231
|
-
this.nextDraw = draws[0].id;
|
|
229
|
+
draws.length > 0 && (this.nextDraw = draws[0].id);
|
|
232
230
|
this.createNewTicket();
|
|
233
231
|
})
|
|
234
232
|
.catch((err) => {
|
|
@@ -237,7 +235,7 @@ const LotteryGamePage = class {
|
|
|
237
235
|
});
|
|
238
236
|
}
|
|
239
237
|
calculateTotalAmount() {
|
|
240
|
-
const { currency } = this.gameData.
|
|
238
|
+
const { currency } = this.gameData.type.stakes[0];
|
|
241
239
|
this.totalAmount = 0;
|
|
242
240
|
this.tickets.forEach((item) => {
|
|
243
241
|
if (item.completed) {
|
|
@@ -315,20 +313,22 @@ const LotteryGamePage = class {
|
|
|
315
313
|
return response.json();
|
|
316
314
|
})
|
|
317
315
|
.then((data) => {
|
|
318
|
-
var _a
|
|
316
|
+
var _a;
|
|
319
317
|
let upcoming = data.items.filter((item) => {
|
|
320
318
|
if (Date.parse(item.date) > new Date().getTime()) {
|
|
321
319
|
return !item.winningNumbers;
|
|
322
320
|
}
|
|
323
321
|
});
|
|
324
322
|
let past = data.items.filter((item) => item.winningNumbers);
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
this.
|
|
323
|
+
if (!upcoming[0])
|
|
324
|
+
return;
|
|
325
|
+
this.latestDraw = upcoming[0];
|
|
326
|
+
this.nextDate = this.latestDraw.date;
|
|
327
|
+
this.countdownLogic(this.nextDate);
|
|
328
328
|
this.lastDrawId = past[past.length - 1].id;
|
|
329
329
|
// calculate total winnings
|
|
330
330
|
// @TODO fix any type
|
|
331
|
-
(
|
|
331
|
+
(_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
|
|
332
332
|
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
333
333
|
});
|
|
334
334
|
})
|
|
@@ -395,6 +395,7 @@ const LotteryGamePage = class {
|
|
|
395
395
|
return res.json();
|
|
396
396
|
})
|
|
397
397
|
.then((data) => {
|
|
398
|
+
// should we treat this res?
|
|
398
399
|
console.log('data', data);
|
|
399
400
|
})
|
|
400
401
|
.catch((err) => {
|
|
@@ -402,26 +403,31 @@ const LotteryGamePage = class {
|
|
|
402
403
|
});
|
|
403
404
|
this.successVisible = true;
|
|
404
405
|
}
|
|
406
|
+
goBack() {
|
|
407
|
+
this.goBackEvent.emit();
|
|
408
|
+
}
|
|
409
|
+
goToLobby() {
|
|
410
|
+
this.goToLobbyEvent.emit();
|
|
411
|
+
}
|
|
405
412
|
render() {
|
|
406
|
-
|
|
407
|
-
const
|
|
413
|
+
//Get path for background image
|
|
414
|
+
const backgroundImagePath = index.getAssetPath(this.isMobile ? '/assets/chrono_lottery_mobile.png' : '/assets/chrono_desktop.png');
|
|
408
415
|
if (this.hasErrors) {
|
|
409
416
|
return (index.h("div", { class: "GamePage" }, index.h("div", { class: "Title" }, translate('error', this.language))));
|
|
410
417
|
}
|
|
411
418
|
return (
|
|
412
419
|
/* Game details */
|
|
413
|
-
index.h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, index.h("div", { class: "GridBanner", style: {
|
|
414
|
-
index.h("div", { class: "GamePageContent" }, index.h("div", { class: "GameDetails" }, index.h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => index.h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "CreateNewTicket" }, index.h("button", { onClick: () => this.createNewTicket() }, "+"), index.h("span", null, translate('createTicket', this.language)))), index.h("div", { class: "OrderSummary" }, index.h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), index.h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", index.h("span", null, this.tickets.length)), index.h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", index.h("span", null, this.totalAmount, " ", this.currency)), index.h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
420
|
+
index.h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, index.h("div", { class: "GridBanner", style: { 'background': `url(${this.backgroundUrl ? this.backgroundUrl : backgroundImagePath})`, 'background-size': 'contain', 'background-repeat': 'no-repeat', 'background-position': 'center' } }, index.h("div", { class: "BannerButtonsWrapper" }, index.h("button", { class: "BannerBackButton", onClick: this.goBack.bind(this) }, index.h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), index.h("button", { class: "BannerLobbyButton", onClick: this.goToLobby.bind(this) }, translate('lobbyButton', this.language))), index.h("div", { class: "Tabs" }, index.h("div", { class: 'TabButton' + (this.tabIndex == 0 ? ' Active' : ''), onClick: () => this.tabIndex = 0 }, translate('buy', this.language)), index.h("div", { class: 'TabButton' + (this.tabIndex == 1 ? ' Active' : ''), onClick: () => this.tabIndex = 1 }, translate('viewLatest', this.language)))), index.h("div", { class: "NextDrawWrapper" }, index.h("div", { class: "TotalWinnings" }, translate('winUpTo', this.language), ": ", index.h("span", null, "$", this.totalWinningsAmount.toLocaleString('en-US', { maximumFractionDigits: 2 }))), index.h("div", { class: "NextDraw" }, index.h("p", { class: "BannerText" }, translate('nextDraw', this.language)), index.h("div", { class: "BannerCountdown" }, index.h("span", { class: "CountdownDays" }, this.daysRemaining, "D"), index.h("span", { class: "CountdownHours" }, this.hoursRemaining, "H"), index.h("span", { class: "CountdownMinutes" }, this.minutesRemaining, "M"), index.h("span", { class: "CountdownSeconds" }, this.secondsRemaining, "S")))), this.tabIndex == 0 &&
|
|
421
|
+
index.h("div", { class: "GamePageContent" }, index.h("div", { class: "GameDetails" }, index.h("lottery-game-details", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "TicketsWrapper" }, this.tickets.map((item) => index.h("lottery-ticket-controller", { endpoint: this.endpoint, "ticket-id": item.ticketId, "game-id": item.gameId, collapsed: false, last: true, language: this.language, "auto-pick": this.autoPick, "reset-button": this.resetButton, "total-controllers": this.tickets.length, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("div", { class: "CreateNewTicket" }, index.h("button", { onClick: () => this.createNewTicket() }, "+"), index.h("span", null, translate('createTicket', this.language)))), index.h("div", { class: "OrderSummary" }, index.h("h3", { class: "OrderSummaryTitle" }, translate('orderSummaryTitle', this.language)), index.h("div", { class: "Ticket" }, translate('orderSummaryTickets', this.language), ": ", index.h("span", null, this.tickets.length)), index.h("hr", null), index.h("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", index.h("span", null, this.totalAmount, " ", this.currency)), index.h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
|
|
415
422
|
index.h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
|
|
416
423
|
index.h("div", null, index.h("span", { class: "Button", onClick: () => this.showLoginModal() }, translate('orderSummarySubmit', this.language)), index.h("helper-modal", { "title-modal": "Success", visible: this.loginModalVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("p", { class: "SubmitModalSuccess" }, translate('modalLogin', this.language))))))), this.tabIndex == 1 &&
|
|
417
424
|
index.h("div", null, index.h("h4", { class: "LastDrawResultsTitle" }, translate('lastDrawResultsTitle', this.language)), index.h("lottery-draw-results", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "draw-id": this.lastDrawId, "draw-mode": true, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }), index.h("lottery-draw-results-history", { endpoint: this.endpoint, "game-id": this.gameId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })), index.h("helper-modal", { "title-modal": "Success", visible: this.successVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("p", { class: "SubmitModalSuccess" }, translate('modalSuccess', this.language))), index.h("helper-modal", { "title-modal": "Delete Ticket", visible: this.deleteVisible, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "DeleteTicketModalWrapper" }, index.h("h3", { class: "DeleteTicketModalTitle" }, translate('deleteTicketModalTitle', this.language)), index.h("p", { class: "DeleteTicketModalText" }, translate('deleteTicketModalText', this.language)), index.h("div", { class: "DeleteTicketModalButtons" }, index.h("button", { class: "DeleteTicketModalCancel", onClick: () => this.modalCloseEvent() }, translate('deleteTicketModalCancel', this.language)), index.h("button", { class: "DeleteTicketModalConfirm", onClick: () => this.confirmDeleteTicketHandler(this.deleteEventData) }, translate('deleteTicketModalConfirm', this.language)))))));
|
|
418
425
|
}
|
|
419
426
|
static get assetsDirs() { return ["static"]; }
|
|
420
427
|
get element() { return index.getElement(this); }
|
|
421
|
-
static get watchers() { return {
|
|
422
|
-
"sessionId": ["handleSessionIdValue"]
|
|
423
|
-
}; }
|
|
424
428
|
};
|
|
425
429
|
LotteryGamePage.style = lotteryGamePageCss;
|
|
426
430
|
|
|
427
431
|
exports.lottery_game_page = LotteryGamePage;
|
|
432
|
+
|
|
433
|
+
//# sourceMappingURL=lottery-game-page.cjs.entry.js.map
|