@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.
Files changed (182) hide show
  1. package/dist/cjs/helper-accordion.cjs.entry.js +10 -2
  2. package/dist/cjs/helper-accordion.cjs.entry.js.map +1 -0
  3. package/dist/cjs/helper-filters_2.cjs.entry.js +1716 -1002
  4. package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -0
  5. package/dist/cjs/helper-modal.cjs.entry.js +2 -0
  6. package/dist/cjs/helper-modal.cjs.entry.js.map +1 -0
  7. package/dist/cjs/helper-pagination.cjs.entry.js +14 -0
  8. package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -0
  9. package/dist/cjs/helper-tab.cjs.entry.js +2 -0
  10. package/dist/cjs/helper-tab.cjs.entry.js.map +1 -0
  11. package/dist/cjs/helper-tabs.cjs.entry.js +2 -0
  12. package/dist/cjs/helper-tabs.cjs.entry.js.map +1 -0
  13. package/dist/cjs/index-cd44e726.js +2 -0
  14. package/dist/cjs/index-cd44e726.js.map +1 -0
  15. package/dist/cjs/index.cjs.js +2 -0
  16. package/dist/cjs/index.cjs.js.map +1 -0
  17. package/dist/cjs/loader.cjs.js +3 -1
  18. package/dist/cjs/loader.cjs.js.map +1 -0
  19. package/dist/cjs/lottery-bullet_2.cjs.entry.js +13 -2
  20. package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +1 -0
  21. package/dist/cjs/lottery-draw-results-history.cjs.entry.js +45 -16
  22. package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -0
  23. package/dist/cjs/lottery-game-details.cjs.entry.js +2 -0
  24. package/dist/cjs/lottery-game-details.cjs.entry.js.map +1 -0
  25. package/dist/cjs/lottery-game-page.cjs.entry.js +33 -27
  26. package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -0
  27. package/dist/cjs/lottery-game-page.cjs.js +3 -1
  28. package/dist/cjs/lottery-game-page.cjs.js.map +1 -0
  29. package/dist/cjs/lottery-ticket-controller.cjs.entry.js +15 -2
  30. package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +1 -0
  31. package/dist/cjs/lottery-ticket.cjs.entry.js +29 -7
  32. package/dist/cjs/lottery-ticket.cjs.entry.js.map +1 -0
  33. package/dist/collection/components/lottery-game-page/lottery-game-page.css +10 -1
  34. package/dist/collection/components/lottery-game-page/lottery-game-page.js +83 -32
  35. package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +1 -0
  36. package/dist/collection/index.js +1 -0
  37. package/dist/collection/index.js.map +1 -0
  38. package/dist/collection/utils/locale.utils.js +1 -0
  39. package/dist/collection/utils/locale.utils.js.map +1 -0
  40. package/dist/collection/utils/utils.js +1 -0
  41. package/dist/collection/utils/utils.js.map +1 -0
  42. package/dist/components/helper-accordion.js +2 -0
  43. package/dist/components/helper-accordion.js.map +1 -0
  44. package/dist/components/helper-accordion2.js +10 -2
  45. package/dist/components/helper-accordion2.js.map +1 -0
  46. package/dist/components/helper-filters.js +2 -0
  47. package/dist/components/helper-filters.js.map +1 -0
  48. package/dist/components/helper-filters2.js +1696 -974
  49. package/dist/components/helper-filters2.js.map +1 -0
  50. package/dist/components/helper-modal.js +2 -0
  51. package/dist/components/helper-modal.js.map +1 -0
  52. package/dist/components/helper-modal2.js +2 -0
  53. package/dist/components/helper-modal2.js.map +1 -0
  54. package/dist/components/helper-pagination.js +14 -0
  55. package/dist/components/helper-pagination.js.map +1 -0
  56. package/dist/components/helper-tab.js +2 -0
  57. package/dist/components/helper-tab.js.map +1 -0
  58. package/dist/components/helper-tab2.js +2 -0
  59. package/dist/components/helper-tab2.js.map +1 -0
  60. package/dist/components/helper-tabs.js +2 -0
  61. package/dist/components/helper-tabs.js.map +1 -0
  62. package/dist/components/helper-tabs2.js +2 -0
  63. package/dist/components/helper-tabs2.js.map +1 -0
  64. package/dist/components/index.js +2 -0
  65. package/dist/components/index.js.map +1 -0
  66. package/dist/components/lottery-bullet.js +2 -0
  67. package/dist/components/lottery-bullet.js.map +1 -0
  68. package/dist/components/lottery-bullet2.js +2 -0
  69. package/dist/components/lottery-bullet2.js.map +1 -0
  70. package/dist/components/lottery-draw-results-history.js +2 -0
  71. package/dist/components/lottery-draw-results-history.js.map +1 -0
  72. package/dist/components/lottery-draw-results-history2.js +46 -17
  73. package/dist/components/lottery-draw-results-history2.js.map +1 -0
  74. package/dist/components/lottery-draw-results.js +2 -0
  75. package/dist/components/lottery-draw-results.js.map +1 -0
  76. package/dist/components/lottery-draw-results2.js +95 -101
  77. package/dist/components/lottery-draw-results2.js.map +1 -0
  78. package/dist/components/lottery-game-details.js +2 -0
  79. package/dist/components/lottery-game-details.js.map +1 -0
  80. package/dist/components/lottery-game-details2.js +2 -0
  81. package/dist/components/lottery-game-details2.js.map +1 -0
  82. package/dist/components/lottery-game-page.js +35 -28
  83. package/dist/components/lottery-game-page.js.map +1 -0
  84. package/dist/components/lottery-grid.js +2 -0
  85. package/dist/components/lottery-grid.js.map +1 -0
  86. package/dist/components/lottery-grid2.js +13 -2
  87. package/dist/components/lottery-grid2.js.map +1 -0
  88. package/dist/components/lottery-ticket-controller.js +2 -0
  89. package/dist/components/lottery-ticket-controller.js.map +1 -0
  90. package/dist/components/lottery-ticket-controller2.js +30 -16
  91. package/dist/components/lottery-ticket-controller2.js.map +1 -0
  92. package/dist/components/lottery-ticket.js +2 -0
  93. package/dist/components/lottery-ticket.js.map +1 -0
  94. package/dist/components/lottery-ticket2.js +29 -7
  95. package/dist/components/lottery-ticket2.js.map +1 -0
  96. package/dist/esm/helper-accordion.entry.js +10 -2
  97. package/dist/esm/helper-accordion.entry.js.map +1 -0
  98. package/dist/esm/helper-filters_2.entry.js +1716 -1002
  99. package/dist/esm/helper-filters_2.entry.js.map +1 -0
  100. package/dist/esm/helper-modal.entry.js +2 -0
  101. package/dist/esm/helper-modal.entry.js.map +1 -0
  102. package/dist/esm/helper-pagination.entry.js +14 -0
  103. package/dist/esm/helper-pagination.entry.js.map +1 -0
  104. package/dist/esm/helper-tab.entry.js +2 -0
  105. package/dist/esm/helper-tab.entry.js.map +1 -0
  106. package/dist/esm/helper-tabs.entry.js +2 -0
  107. package/dist/esm/helper-tabs.entry.js.map +1 -0
  108. package/dist/esm/index-d1baacd4.js +2 -0
  109. package/dist/esm/index-d1baacd4.js.map +1 -0
  110. package/dist/esm/index.js +2 -0
  111. package/dist/esm/index.js.map +1 -0
  112. package/dist/esm/loader.js +3 -1
  113. package/dist/esm/loader.js.map +1 -0
  114. package/dist/esm/lottery-bullet_2.entry.js +13 -2
  115. package/dist/esm/lottery-bullet_2.entry.js.map +1 -0
  116. package/dist/esm/lottery-draw-results-history.entry.js +45 -16
  117. package/dist/esm/lottery-draw-results-history.entry.js.map +1 -0
  118. package/dist/esm/lottery-game-details.entry.js +2 -0
  119. package/dist/esm/lottery-game-details.entry.js.map +1 -0
  120. package/dist/esm/lottery-game-page.entry.js +34 -28
  121. package/dist/esm/lottery-game-page.entry.js.map +1 -0
  122. package/dist/esm/lottery-game-page.js +3 -1
  123. package/dist/esm/lottery-game-page.js.map +1 -0
  124. package/dist/esm/lottery-ticket-controller.entry.js +15 -2
  125. package/dist/esm/lottery-ticket-controller.entry.js.map +1 -0
  126. package/dist/esm/lottery-ticket.entry.js +29 -7
  127. package/dist/esm/lottery-ticket.entry.js.map +1 -0
  128. package/dist/lottery-game-page/index.esm.js +2 -0
  129. package/dist/lottery-game-page/index.esm.js.map +1 -0
  130. package/dist/lottery-game-page/lottery-game-page.esm.js +2 -1
  131. package/dist/lottery-game-page/lottery-game-page.esm.js.map +1 -0
  132. package/dist/lottery-game-page/p-042065c6.entry.js +2 -0
  133. package/dist/lottery-game-page/p-042065c6.entry.js.map +1 -0
  134. package/dist/lottery-game-page/p-15309f9a.entry.js +2 -0
  135. package/dist/lottery-game-page/p-15309f9a.entry.js.map +1 -0
  136. package/dist/lottery-game-page/p-167c9dbe.entry.js +2 -0
  137. package/dist/lottery-game-page/p-167c9dbe.entry.js.map +1 -0
  138. package/dist/lottery-game-page/p-2e78ed7b.entry.js +2 -0
  139. package/dist/lottery-game-page/p-2e78ed7b.entry.js.map +1 -0
  140. package/dist/lottery-game-page/p-5b49ab69.entry.js +2 -0
  141. package/dist/lottery-game-page/p-5b49ab69.entry.js.map +1 -0
  142. package/dist/lottery-game-page/p-606c0b0f.entry.js +2 -0
  143. package/dist/lottery-game-page/p-606c0b0f.entry.js.map +1 -0
  144. package/dist/lottery-game-page/p-662d9dac.entry.js +2 -0
  145. package/dist/lottery-game-page/p-662d9dac.entry.js.map +1 -0
  146. package/dist/lottery-game-page/p-66729e9c.entry.js +2 -0
  147. package/dist/lottery-game-page/p-66729e9c.entry.js.map +1 -0
  148. package/dist/lottery-game-page/p-76c280ec.entry.js +2 -0
  149. package/dist/lottery-game-page/p-76c280ec.entry.js.map +1 -0
  150. package/dist/lottery-game-page/p-a9ef5b8c.entry.js +2 -0
  151. package/dist/lottery-game-page/p-a9ef5b8c.entry.js.map +1 -0
  152. package/dist/lottery-game-page/p-aa68559a.entry.js +2 -0
  153. package/dist/lottery-game-page/p-aa68559a.entry.js.map +1 -0
  154. package/dist/lottery-game-page/p-d9e7b5da.entry.js +2899 -0
  155. package/dist/lottery-game-page/p-d9e7b5da.entry.js.map +1 -0
  156. package/dist/lottery-game-page/p-e765c7d9.js +2 -1
  157. package/dist/lottery-game-page/p-e765c7d9.js.map +1 -0
  158. package/dist/stencil.config.js +10 -1
  159. package/dist/stencil.config.js.map +1 -0
  160. 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
  161. package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +10 -1
  162. package/dist/types/components.d.ts +12 -2
  163. package/package.json +1 -1
  164. package/dist/components/assets/chrono_desktop.png +0 -0
  165. package/dist/components/assets/chrono_lottery_mobile.png +0 -0
  166. package/dist/lottery-game-page/p-023325a2.entry.js +0 -1
  167. package/dist/lottery-game-page/p-04fbc8fd.entry.js +0 -1
  168. package/dist/lottery-game-page/p-256b151c.entry.js +0 -1
  169. package/dist/lottery-game-page/p-381b5507.entry.js +0 -1
  170. package/dist/lottery-game-page/p-3f8b6ad9.entry.js +0 -1
  171. package/dist/lottery-game-page/p-4274053c.entry.js +0 -1
  172. package/dist/lottery-game-page/p-4f81cd37.entry.js +0 -1
  173. package/dist/lottery-game-page/p-5c389034.entry.js +0 -1
  174. package/dist/lottery-game-page/p-7d06371e.entry.js +0 -1
  175. package/dist/lottery-game-page/p-ca8430a0.entry.js +0 -2849
  176. package/dist/lottery-game-page/p-d6f76e8d.entry.js +0 -1
  177. package/dist/lottery-game-page/p-f6fcc22c.entry.js +0 -1
  178. package/dist/lottery-game-page/static/chrono_desktop.png +0 -0
  179. package/dist/lottery-game-page/static/chrono_lottery_mobile.png +0 -0
  180. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
  181. /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_desktop.png +0 -0
  182. /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.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,C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CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK;SACzE,CAAC;OACH,CAAC,CAAC;MACH,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,EAAE,EAAE,IAAI,CAAC,QAAQ;QACjB,KAAK,EAAE,IAAI,CAAC,SAAS;QACrB,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC;OACzF,CAAC,CAAC;MACH,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC;KAC5C;GACF;EACD,MAAM;IACJ,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC,gBAAgB,GAAG,EAAE,EAAE,EAChF,CAAC,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,KAAK,CAAC,CAAC,KAAK,EAAE,IAAI,EACnH,CAAC,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":[],"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}
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h } from './index-d1baacd4.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
4
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
5
5
  const TRANSLATIONS = {
6
6
  en: {
7
7
  drawResultsHeader: 'Draw results history',
@@ -29,13 +29,39 @@ const TRANSLATIONS = {
29
29
  noResults: 'Niciun rezultat',
30
30
  fetchingResults: 'Se obtin rezultatele'
31
31
  },
32
+ fr: {
33
+ drawResultsHeader: 'Dessiner l\'historique des résultats',
34
+ drawId: 'ID de tirage',
35
+ drawDate: 'Date du tirage',
36
+ drawNumbersGridA: 'Tirage des numéros Grille',
37
+ viewAllResults: 'Voir tout',
38
+ lastFiveDraws: '5 derniers tirages',
39
+ lastTenDraws: '10 derniers tirages',
40
+ lastFifteenDraws: '15 derniers tirages',
41
+ allDrawResultsHistory: 'Historique des résultats de tous les tirages',
42
+ noResults: 'Aucun résultat',
43
+ fetchingResults: 'Récupération des résultats'
44
+ },
45
+ ar: {
46
+ drawResultsHeader: 'سجل نتائج السحب',
47
+ drawId: 'معرّف السحب',
48
+ drawDate: 'تاريخ السحب',
49
+ drawNumbersGridA: 'شبكة أرقام السحب',
50
+ viewAllResults: 'عرض الكل',
51
+ lastFiveDraws: 'آخر 5 سحوبات',
52
+ lastTenDraws: 'آخر 10 سحوبات',
53
+ lastFifteenDraws: 'آخر 15 سحبًا',
54
+ allDrawResultsHistory: 'سجل نتائج كل السحوبات',
55
+ noResults: 'لا توجد نتائج',
56
+ fetchingResults: 'جلب النتائج'
57
+ }
32
58
  };
33
59
  const translate = (key, customLang) => {
34
60
  const lang = customLang;
35
61
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
36
62
  };
37
63
 
38
- 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}";
64
+ 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}";
39
65
 
40
66
  const LotteryDrawResultsHistory = class {
41
67
  constructor(hostRef) {
@@ -57,16 +83,16 @@ const LotteryDrawResultsHistory = class {
57
83
  */
58
84
  this.clientStylingUrlContent = '';
59
85
  this.drawData = [];
86
+ this.winningDataSetsData = [''];
60
87
  this.displayAllDrawsResults = true;
61
88
  this.showQuickFilters = true;
62
- this.winningDataSetsData = [''];
63
89
  this.dateFiltersFrom = '';
64
90
  this.dateFiltersTo = '';
65
91
  this.isLoading = false;
66
92
  this.noResults = false;
67
93
  this.limitStylingAppends = false;
68
- this.getDrawsData = (filterbydate = false) => {
69
- let url = filterbydate ? new URL(`${this.endpoint}/games/${this.gameId}/draws`) : new URL(`${this.endpoint}/games/${this.gameId}`);
94
+ this.getDrawsData = () => {
95
+ let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);
70
96
  if (this.dateFiltersFrom)
71
97
  url.searchParams.append('from', this.dateFiltersFrom);
72
98
  if (this.dateFiltersTo)
@@ -79,13 +105,7 @@ const LotteryDrawResultsHistory = class {
79
105
  return res.json();
80
106
  })
81
107
  .then((data) => {
82
- this.isLoading = false;
83
- if (filterbydate) {
84
- this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);
85
- }
86
- else {
87
- this.winningDataSetsData = data.draws.filter(draw => draw.winningNumbers);
88
- }
108
+ this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);
89
109
  this.drawData = this.winningDataSetsData.map((item) => item);
90
110
  })
91
111
  .catch((err) => {
@@ -111,10 +131,17 @@ const LotteryDrawResultsHistory = class {
111
131
  };
112
132
  fetch(url.href, drawOptions)
113
133
  .then((response) => {
134
+ if (response.status == 404)
135
+ this.noResults = true;
114
136
  return response.json();
115
137
  })
116
138
  .then((data) => {
117
139
  this.drawData = [data].map((item) => item);
140
+ })
141
+ .catch((err) => {
142
+ console.log('err', err);
143
+ })
144
+ .finally(() => {
118
145
  this.isLoading = false;
119
146
  });
120
147
  };
@@ -151,20 +178,20 @@ const LotteryDrawResultsHistory = class {
151
178
  else {
152
179
  this.dateFiltersFrom = event.detail.filterFromCalendar;
153
180
  this.dateFiltersTo = event.detail.filterToCalendar;
154
- this.getDrawsData(true);
181
+ this.getDrawsData();
155
182
  }
156
183
  }
157
184
  clearFiltersHandler() {
158
- this.drawData = this.winningDataSetsData;
159
185
  this.showQuickFilters = true;
160
186
  this.dateFiltersFrom = '';
161
187
  this.dateFiltersTo = '';
188
+ this.drawData = this.winningDataSetsData;
162
189
  this.isLoading = true;
163
- this.getDrawsData(false);
190
+ this.getDrawsData();
164
191
  }
165
192
  connectedCallback() {
166
193
  if (this.showQuickFilters)
167
- this.getDrawsData(false);
194
+ this.getDrawsData();
168
195
  }
169
196
  disconnectedCallback() {
170
197
  clearInterval(this.interval);
@@ -192,3 +219,5 @@ const LotteryDrawResultsHistory = class {
192
219
  LotteryDrawResultsHistory.style = lotteryDrawResultsHistoryCss;
193
220
 
194
221
  export { LotteryDrawResultsHistory as lottery_draw_results_history };
222
+
223
+ //# sourceMappingURL=lottery-draw-results-history.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"lottery-draw-results-history.entry.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,qBAAqB,EAAE,0BAA0B;AACrD,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,eAAe,EAAE,kBAAkB;AACvC,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,iBAAiB,EAAE,wBAAwB;AAC/C,IAAI,MAAM,EAAE,kBAAkB;AAC9B,IAAI,QAAQ,EAAE,iBAAiB;AAC/B,IAAI,gBAAgB,EAAE,yBAAyB;AAC/C,IAAI,cAAc,EAAE,wBAAwB;AAC5C,IAAI,aAAa,EAAE,sBAAsB;AACzC,IAAI,YAAY,EAAE,uBAAuB;AACzC,IAAI,gBAAgB,EAAE,uBAAuB;AAC7C,IAAI,qBAAqB,EAAE,gCAAgC;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C,CAAC;GAC5J;;;;;;","names":[],"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}
@@ -45,3 +45,5 @@ const LotteryGameDetails = class {
45
45
  LotteryGameDetails.style = lotteryGameDetailsCss;
46
46
 
47
47
  export { LotteryGameDetails as lottery_game_details };
48
+
49
+ //# sourceMappingURL=lottery-game-details.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"lottery-game-details.entry.js","mappings":";;AAAA,MAAM,qBAAqB,GAAG,sBAAsB;;MCGvC,kBAAkB;EAC7B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AAC,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\": 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}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, g as getAssetPath, h, a as getElement } from './index-d1baacd4.js';
1
+ import { r as registerInstance, c as createEvent, g as getAssetPath, h, a as getElement } from './index-d1baacd4.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];
@@ -114,11 +114,13 @@ const isMobile = (userAgent) => {
114
114
  userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
115
115
  };
116
116
 
117
- 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;border-bottom:solid 1px #D4D4D4;line-height:50px}.OrderSummary .Ticket span{text-align:right}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}";
117
+ 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%}}";
118
118
 
119
119
  const LotteryGamePage = class {
120
120
  constructor(hostRef) {
121
121
  registerInstance(this, hostRef);
122
+ this.goBackEvent = createEvent(this, "goBackEvent", 7);
123
+ this.goToLobbyEvent = createEvent(this, "goToLobbyEvent", 7);
122
124
  /**
123
125
  * Language of the widget
124
126
  */
@@ -155,6 +157,7 @@ const LotteryGamePage = class {
155
157
  this.userAgent = window.navigator.userAgent;
156
158
  this.multiplier = false;
157
159
  this.quickPick = false;
160
+ this.isMobile = isMobile(this.userAgent);
158
161
  this.setClientStyling = () => {
159
162
  let sheet = document.createElement('style');
160
163
  sheet.innerHTML = this.clientStyling;
@@ -176,9 +179,6 @@ const LotteryGamePage = class {
176
179
  };
177
180
  }
178
181
  // @TODO fix `any` type later, I'm lazy now
179
- handleSessionIdValue() {
180
- this.isLoggedIn = true;
181
- }
182
182
  connectedCallback() {
183
183
  this.getGameDetails();
184
184
  this.getDraws();
@@ -198,14 +198,12 @@ const LotteryGamePage = class {
198
198
  // end custom styling area
199
199
  }
200
200
  countdownLogic(date) {
201
- if (date) {
202
- this.interval = setInterval(() => {
203
- this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
204
- this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
205
- this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
206
- this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
207
- }, 1000);
208
- }
201
+ this.interval = setInterval(() => {
202
+ this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
203
+ this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
204
+ this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
205
+ this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
206
+ }, 1000);
209
207
  }
210
208
  disconnectedCallback() {
211
209
  clearInterval(this.interval);
@@ -222,9 +220,9 @@ const LotteryGamePage = class {
222
220
  })
223
221
  .then((data) => {
224
222
  this.gameData = data;
225
- this.basicStake = this.gameData.rules.stakes[0].amount;
223
+ this.basicStake = this.gameData.type.stakes[0].amount;
226
224
  let draws = this.gameData.draws.filter((item) => !item.winningNumbers);
227
- this.nextDraw = draws[0].id;
225
+ draws.length > 0 && (this.nextDraw = draws[0].id);
228
226
  this.createNewTicket();
229
227
  })
230
228
  .catch((err) => {
@@ -233,7 +231,7 @@ const LotteryGamePage = class {
233
231
  });
234
232
  }
235
233
  calculateTotalAmount() {
236
- const { currency } = this.gameData.rules.stakes[0];
234
+ const { currency } = this.gameData.type.stakes[0];
237
235
  this.totalAmount = 0;
238
236
  this.tickets.forEach((item) => {
239
237
  if (item.completed) {
@@ -311,20 +309,22 @@ const LotteryGamePage = class {
311
309
  return response.json();
312
310
  })
313
311
  .then((data) => {
314
- var _a, _b;
312
+ var _a;
315
313
  let upcoming = data.items.filter((item) => {
316
314
  if (Date.parse(item.date) > new Date().getTime()) {
317
315
  return !item.winningNumbers;
318
316
  }
319
317
  });
320
318
  let past = data.items.filter((item) => item.winningNumbers);
321
- this.latestDraw = upcoming[0] || {};
322
- this.nextDate = (_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.date;
323
- this.countdownLogic(this.nextDate || '');
319
+ if (!upcoming[0])
320
+ return;
321
+ this.latestDraw = upcoming[0];
322
+ this.nextDate = this.latestDraw.date;
323
+ this.countdownLogic(this.nextDate);
324
324
  this.lastDrawId = past[past.length - 1].id;
325
325
  // calculate total winnings
326
326
  // @TODO fix any type
327
- (_b = this.latestDraw) === null || _b === void 0 ? void 0 : _b.prizes.forEach((element) => {
327
+ (_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.prizes.forEach((element) => {
328
328
  this.totalWinningsAmount += JSON.parse(element.amount);
329
329
  });
330
330
  })
@@ -391,6 +391,7 @@ const LotteryGamePage = class {
391
391
  return res.json();
392
392
  })
393
393
  .then((data) => {
394
+ // should we treat this res?
394
395
  console.log('data', data);
395
396
  })
396
397
  .catch((err) => {
@@ -398,26 +399,31 @@ const LotteryGamePage = class {
398
399
  });
399
400
  this.successVisible = true;
400
401
  }
402
+ goBack() {
403
+ this.goBackEvent.emit();
404
+ }
405
+ goToLobby() {
406
+ this.goToLobbyEvent.emit();
407
+ }
401
408
  render() {
402
- const backgroundSrc = getAssetPath('./static/chrono_lottery_mobile.png');
403
- const backgroundDesktopSrc = getAssetPath('./static/chrono_desktop.png');
409
+ //Get path for background image
410
+ const backgroundImagePath = getAssetPath(this.isMobile ? '/assets/chrono_lottery_mobile.png' : '/assets/chrono_desktop.png');
404
411
  if (this.hasErrors) {
405
412
  return (h("div", { class: "GamePage" }, h("div", { class: "Title" }, translate('error', this.language))));
406
413
  }
407
414
  return (
408
415
  /* Game details */
409
- h("div", { class: "GamePage", dir: this.language == 'ar' ? 'rtl' : 'ltr', ref: el => this.stylingContainer = el }, h("div", { class: "GridBanner", style: { backgroundImage: isMobile(this.userAgent) ? `url(${backgroundSrc})` : `url(${backgroundDesktopSrc})` } }, h("div", { class: "BannerButtonsWrapper" }, h("button", { class: "BannerBackButton" }, h("span", { class: "BannerBackButtonArrow" }, "\u1438 "), translate('backButton', this.language)), h("button", { class: "BannerLobbyButton" }, 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 &&
410
- 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, "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("div", { class: "Total" }, translate('orderSummaryTotal', this.language), ": ", h("span", null, this.totalAmount, " ", this.currency)), h("div", { class: "ButtonWrapper" }, this.isLoggedIn &&
416
+ 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 &&
417
+ 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 &&
411
418
  h("span", { class: "Button", onClick: () => this.submitTickets() }, translate('orderSummarySubmit', this.language)), !this.isLoggedIn &&
412
419
  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 &&
413
420
  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)))))));
414
421
  }
415
422
  static get assetsDirs() { return ["static"]; }
416
423
  get element() { return getElement(this); }
417
- static get watchers() { return {
418
- "sessionId": ["handleSessionIdValue"]
419
- }; }
420
424
  };
421
425
  LotteryGamePage.style = lotteryGamePageCss;
422
426
 
423
427
  export { LotteryGamePage as lottery_game_page };
428
+
429
+ //# sourceMappingURL=lottery-game-page.entry.js.map