@everymatrix/lottery-game-page 1.44.0 → 1.45.0

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 (194) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/{helper-filters_2.cjs.entry.js → helper-accordion_13.cjs.entry.js} +3329 -1000
  3. package/dist/cjs/helper-pagination.cjs.entry.js +195 -226
  4. package/dist/cjs/index-f3851683.js +1345 -0
  5. package/dist/cjs/index.cjs.js +0 -2
  6. package/dist/cjs/loader.cjs.js +7 -15
  7. package/dist/cjs/lottery-game-page.cjs.js +16 -12
  8. package/dist/collection/collection-manifest.json +4 -10
  9. package/dist/collection/components/lottery-game-page/index.js +1 -0
  10. package/dist/collection/components/lottery-game-page/lottery-game-page.css +1 -1
  11. package/dist/collection/components/lottery-game-page/lottery-game-page.js +580 -646
  12. package/dist/collection/index.js +0 -1
  13. package/dist/collection/utils/locale.utils.js +117 -118
  14. package/dist/collection/utils/utils.js +4 -5
  15. package/dist/esm/app-globals-0f993ce5.js +3 -0
  16. package/dist/esm/{helper-filters_2.entry.js → helper-accordion_13.entry.js} +3319 -1001
  17. package/dist/esm/helper-pagination.entry.js +195 -226
  18. package/dist/esm/index-8248702b.js +1316 -0
  19. package/dist/esm/index.js +0 -2
  20. package/dist/esm/loader.js +8 -16
  21. package/dist/esm/lottery-game-page.js +14 -13
  22. package/dist/lottery-game-page/index.esm.js +0 -2
  23. package/dist/lottery-game-page/lottery-game-page.esm.js +1 -2
  24. package/dist/lottery-game-page/p-4254ae78.entry.js +3567 -0
  25. package/dist/lottery-game-page/p-89956c67.entry.js +1 -0
  26. package/dist/lottery-game-page/p-8f2c63c7.js +2 -0
  27. package/dist/lottery-game-page/p-e1255160.js +1 -0
  28. package/dist/stencil.config.dev.js +17 -0
  29. package/dist/stencil.config.js +12 -45
  30. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
  31. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
  32. package/dist/types/components/lottery-game-page/index.d.ts +1 -0
  33. package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +98 -98
  34. package/dist/types/components.d.ts +18 -2
  35. package/dist/types/stencil-public-runtime.d.ts +142 -33
  36. package/loader/cdn.js +1 -3
  37. package/loader/index.cjs.js +1 -3
  38. package/loader/index.d.ts +13 -1
  39. package/loader/index.es2017.js +1 -3
  40. package/loader/index.js +1 -3
  41. package/loader/package.json +1 -0
  42. package/package.json +13 -7
  43. package/dist/assets/chrono_desktop.png +0 -0
  44. package/dist/assets/chrono_lottery_mobile.png +0 -0
  45. package/dist/cjs/helper-accordion.cjs.entry.js +0 -134
  46. package/dist/cjs/helper-accordion.cjs.entry.js.map +0 -1
  47. package/dist/cjs/helper-filters_2.cjs.entry.js.map +0 -1
  48. package/dist/cjs/helper-modal.cjs.entry.js +0 -78
  49. package/dist/cjs/helper-modal.cjs.entry.js.map +0 -1
  50. package/dist/cjs/helper-pagination.cjs.entry.js.map +0 -1
  51. package/dist/cjs/helper-tab.cjs.entry.js +0 -70
  52. package/dist/cjs/helper-tab.cjs.entry.js.map +0 -1
  53. package/dist/cjs/helper-tabs.cjs.entry.js +0 -76
  54. package/dist/cjs/helper-tabs.cjs.entry.js.map +0 -1
  55. package/dist/cjs/index-cd44e726.js +0 -1326
  56. package/dist/cjs/index-cd44e726.js.map +0 -1
  57. package/dist/cjs/index.cjs.js.map +0 -1
  58. package/dist/cjs/loader.cjs.js.map +0 -1
  59. package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -281
  60. package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +0 -1
  61. package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -240
  62. package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +0 -1
  63. package/dist/cjs/lottery-game-details.cjs.entry.js +0 -53
  64. package/dist/cjs/lottery-game-details.cjs.entry.js.map +0 -1
  65. package/dist/cjs/lottery-game-page.cjs.entry.js +0 -456
  66. package/dist/cjs/lottery-game-page.cjs.entry.js.map +0 -1
  67. package/dist/cjs/lottery-game-page.cjs.js.map +0 -1
  68. package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -132
  69. package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +0 -1
  70. package/dist/cjs/lottery-ticket.cjs.entry.js +0 -233
  71. package/dist/cjs/lottery-ticket.cjs.entry.js.map +0 -1
  72. package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +0 -1
  73. package/dist/collection/index.js.map +0 -1
  74. package/dist/collection/utils/locale.utils.js.map +0 -1
  75. package/dist/collection/utils/utils.js.map +0 -1
  76. package/dist/components/helper-accordion.js +0 -8
  77. package/dist/components/helper-accordion.js.map +0 -1
  78. package/dist/components/helper-accordion2.js +0 -161
  79. package/dist/components/helper-accordion2.js.map +0 -1
  80. package/dist/components/helper-filters.js +0 -8
  81. package/dist/components/helper-filters.js.map +0 -1
  82. package/dist/components/helper-filters2.js +0 -23566
  83. package/dist/components/helper-filters2.js.map +0 -1
  84. package/dist/components/helper-modal.js +0 -8
  85. package/dist/components/helper-modal.js.map +0 -1
  86. package/dist/components/helper-modal2.js +0 -96
  87. package/dist/components/helper-modal2.js.map +0 -1
  88. package/dist/components/helper-pagination.js +0 -293
  89. package/dist/components/helper-pagination.js.map +0 -1
  90. package/dist/components/helper-tab.js +0 -8
  91. package/dist/components/helper-tab.js.map +0 -1
  92. package/dist/components/helper-tab2.js +0 -89
  93. package/dist/components/helper-tab2.js.map +0 -1
  94. package/dist/components/helper-tabs.js +0 -8
  95. package/dist/components/helper-tabs.js.map +0 -1
  96. package/dist/components/helper-tabs2.js +0 -105
  97. package/dist/components/helper-tabs2.js.map +0 -1
  98. package/dist/components/index.d.ts +0 -26
  99. package/dist/components/index.js +0 -3
  100. package/dist/components/index.js.map +0 -1
  101. package/dist/components/lottery-bullet.js +0 -8
  102. package/dist/components/lottery-bullet.js.map +0 -1
  103. package/dist/components/lottery-bullet2.js +0 -94
  104. package/dist/components/lottery-bullet2.js.map +0 -1
  105. package/dist/components/lottery-draw-results-history.js +0 -8
  106. package/dist/components/lottery-draw-results-history.js.map +0 -1
  107. package/dist/components/lottery-draw-results-history2.js +0 -298
  108. package/dist/components/lottery-draw-results-history2.js.map +0 -1
  109. package/dist/components/lottery-draw-results.js +0 -8
  110. package/dist/components/lottery-draw-results.js.map +0 -1
  111. package/dist/components/lottery-draw-results2.js +0 -346
  112. package/dist/components/lottery-draw-results2.js.map +0 -1
  113. package/dist/components/lottery-game-details.js +0 -8
  114. package/dist/components/lottery-game-details.js.map +0 -1
  115. package/dist/components/lottery-game-details2.js +0 -87
  116. package/dist/components/lottery-game-details2.js.map +0 -1
  117. package/dist/components/lottery-game-page.d.ts +0 -11
  118. package/dist/components/lottery-game-page.js +0 -572
  119. package/dist/components/lottery-game-page.js.map +0 -1
  120. package/dist/components/lottery-grid.js +0 -8
  121. package/dist/components/lottery-grid.js.map +0 -1
  122. package/dist/components/lottery-grid2.js +0 -248
  123. package/dist/components/lottery-grid2.js.map +0 -1
  124. package/dist/components/lottery-ticket-controller.js +0 -8
  125. package/dist/components/lottery-ticket-controller.js.map +0 -1
  126. package/dist/components/lottery-ticket-controller2.js +0 -185
  127. package/dist/components/lottery-ticket-controller2.js.map +0 -1
  128. package/dist/components/lottery-ticket.js +0 -8
  129. package/dist/components/lottery-ticket.js.map +0 -1
  130. package/dist/components/lottery-ticket2.js +0 -276
  131. package/dist/components/lottery-ticket2.js.map +0 -1
  132. package/dist/esm/helper-accordion.entry.js +0 -130
  133. package/dist/esm/helper-accordion.entry.js.map +0 -1
  134. package/dist/esm/helper-filters_2.entry.js.map +0 -1
  135. package/dist/esm/helper-modal.entry.js +0 -74
  136. package/dist/esm/helper-modal.entry.js.map +0 -1
  137. package/dist/esm/helper-pagination.entry.js.map +0 -1
  138. package/dist/esm/helper-tab.entry.js +0 -66
  139. package/dist/esm/helper-tab.entry.js.map +0 -1
  140. package/dist/esm/helper-tabs.entry.js +0 -72
  141. package/dist/esm/helper-tabs.entry.js.map +0 -1
  142. package/dist/esm/index-d1baacd4.js +0 -1298
  143. package/dist/esm/index-d1baacd4.js.map +0 -1
  144. package/dist/esm/index.js.map +0 -1
  145. package/dist/esm/loader.js.map +0 -1
  146. package/dist/esm/lottery-bullet_2.entry.js +0 -276
  147. package/dist/esm/lottery-bullet_2.entry.js.map +0 -1
  148. package/dist/esm/lottery-draw-results-history.entry.js +0 -236
  149. package/dist/esm/lottery-draw-results-history.entry.js.map +0 -1
  150. package/dist/esm/lottery-game-details.entry.js +0 -49
  151. package/dist/esm/lottery-game-details.entry.js.map +0 -1
  152. package/dist/esm/lottery-game-page.entry.js +0 -452
  153. package/dist/esm/lottery-game-page.entry.js.map +0 -1
  154. package/dist/esm/lottery-game-page.js.map +0 -1
  155. package/dist/esm/lottery-ticket-controller.entry.js +0 -128
  156. package/dist/esm/lottery-ticket-controller.entry.js.map +0 -1
  157. package/dist/esm/lottery-ticket.entry.js +0 -229
  158. package/dist/esm/lottery-ticket.entry.js.map +0 -1
  159. package/dist/esm/polyfills/core-js.js +0 -11
  160. package/dist/esm/polyfills/css-shim.js +0 -1
  161. package/dist/esm/polyfills/dom.js +0 -79
  162. package/dist/esm/polyfills/es5-html-element.js +0 -1
  163. package/dist/esm/polyfills/index.js +0 -34
  164. package/dist/esm/polyfills/system.js +0 -6
  165. package/dist/lottery-game-page/index.esm.js.map +0 -1
  166. package/dist/lottery-game-page/lottery-game-page.esm.js.map +0 -1
  167. package/dist/lottery-game-page/p-12340c50.entry.js +0 -2921
  168. package/dist/lottery-game-page/p-12340c50.entry.js.map +0 -1
  169. package/dist/lottery-game-page/p-15309f9a.entry.js +0 -2
  170. package/dist/lottery-game-page/p-15309f9a.entry.js.map +0 -1
  171. package/dist/lottery-game-page/p-167c9dbe.entry.js +0 -2
  172. package/dist/lottery-game-page/p-167c9dbe.entry.js.map +0 -1
  173. package/dist/lottery-game-page/p-20e0c81c.entry.js +0 -2
  174. package/dist/lottery-game-page/p-20e0c81c.entry.js.map +0 -1
  175. package/dist/lottery-game-page/p-59a96854.entry.js +0 -2
  176. package/dist/lottery-game-page/p-59a96854.entry.js.map +0 -1
  177. package/dist/lottery-game-page/p-662d9dac.entry.js +0 -2
  178. package/dist/lottery-game-page/p-662d9dac.entry.js.map +0 -1
  179. package/dist/lottery-game-page/p-66729e9c.entry.js +0 -2
  180. package/dist/lottery-game-page/p-66729e9c.entry.js.map +0 -1
  181. package/dist/lottery-game-page/p-721345a7.entry.js +0 -2
  182. package/dist/lottery-game-page/p-721345a7.entry.js.map +0 -1
  183. package/dist/lottery-game-page/p-76c280ec.entry.js +0 -2
  184. package/dist/lottery-game-page/p-76c280ec.entry.js.map +0 -1
  185. package/dist/lottery-game-page/p-cd4aa6a4.entry.js +0 -2
  186. package/dist/lottery-game-page/p-cd4aa6a4.entry.js.map +0 -1
  187. package/dist/lottery-game-page/p-e765c7d9.js +0 -2
  188. package/dist/lottery-game-page/p-e765c7d9.js.map +0 -1
  189. package/dist/lottery-game-page/p-e86e2389.entry.js +0 -2
  190. package/dist/lottery-game-page/p-e86e2389.entry.js.map +0 -1
  191. package/dist/lottery-game-page/p-f399eef1.entry.js +0 -2
  192. package/dist/lottery-game-page/p-f399eef1.entry.js.map +0 -1
  193. package/dist/stencil.config.js.map +0 -1
  194. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
@@ -1,2 +0,0 @@
1
- import{r as i,c as e,h as s}from"./p-e765c7d9.js";const o=i=>!!(i.toLowerCase().match(/android/i)||i.toLowerCase().match(/blackberry|bb/i)||i.toLowerCase().match(/iphone|ipad|ipod/i)||i.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));const t=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";const l=class{constructor(s){i(this,s);this.cancel=e(this,"modalCloseEvent",7);this.visible=true;this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;this.userAgent=window.navigator.userAgent;this.setClientStyling=()=>{let i=document.createElement("style");i.innerHTML=this.clientStyling;this.stylingContainer.prepend(i)};this.setClientStylingURL=()=>{let i=document.createElement("style");setTimeout((()=>{i.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(i)}),1)}}handleHelperModalClose(){this.visible=false;this.cancel.emit()}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){return this.visible&&s("div",{class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:i=>this.stylingContainer=i},s("div",{class:"HelperModalWrapper HelperModalVisible"},s("div",{class:"HelperModalContent"+(o(this.userAgent)?" HelperModalMobileContent":"")},s("span",{class:"HelperModalClose"+(o(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),s("slot",null))))}};l.style=t;export{l as helper_modal};
2
- //# sourceMappingURL=p-15309f9a.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../helper-modal/dist/collection/utils/utils.js","../helper-modal/dist/collection/components/helper-modal/helper-modal.css?tag=helper-modal&encapsulation=shadow","../helper-modal/dist/collection/components/helper-modal/helper-modal.js"],"names":["isMobile","userAgent","toLowerCase","match","helperModalCss","HelperModal","[object Object]","hostRef","this","visible","clientStyling","clientStylingUrlContent","limitStylingAppends","window","navigator","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","cancel","emit","h","class","ref","el","onClick","handleHelperModalClose","bind"],"mappings":"kDAMO,MAAMA,EAAYC,MACbA,EAAUC,cAAcC,MAAM,aACtCF,EAAUC,cAAcC,MAAM,mBAC9BF,EAAUC,cAAcC,MAAM,sBAC9BF,EAAUC,cAAcC,MAAM,qDCVlC,MAAMC,EAAiB,ggCCEVC,EAAW,MACtBC,YAAAC,qDAIEC,KAAKC,QAAU,KAIfD,KAAKE,cAAgB,GAIrBF,KAAKG,wBAA0B,GAC/BH,KAAKI,oBAAsB,MAC3BJ,KAAKP,UAAYY,OAAOC,UAAUb,UAClCO,KAAKO,iBAAmB,KACtB,IAAIC,EAAQC,SAASC,cAAc,SACnCF,EAAMG,UAAYX,KAAKE,cACvBF,KAAKY,iBAAiBC,QAAQL,IAEhCR,KAAKc,oBAAsB,KACzB,IAAIC,EAAUN,SAASC,cAAc,SACrCM,YAAW,KACTD,EAAQJ,UAAYX,KAAKG,wBACzBH,KAAKY,iBAAiBC,QAAQE,KAC7B,IAGPjB,yBACEE,KAAKC,QAAU,MACfD,KAAKiB,OAAOC,OAGdpB,qBAEE,IAAKE,KAAKI,qBAAuBJ,KAAKY,iBAAkB,CACtD,GAAIZ,KAAKE,cACPF,KAAKO,mBACP,GAAIP,KAAKG,wBACPH,KAAKc,sBACPd,KAAKI,oBAAsB,MAI/BN,SACE,OAASE,KAAKC,SACZkB,EAAE,MAAO,CAAEC,MAAOpB,KAAKC,QAAU,wCAA0C,qBAAsBoB,IAAKC,GAAMtB,KAAKY,iBAAmBU,GAClIH,EAAE,MAAO,CAAEC,MAAO,yCAChBD,EAAE,MAAO,CAAEC,MAAO,sBAAwB5B,EAASQ,KAAKP,WAAa,4BAA8B,KACjG0B,EAAE,OAAQ,CAAEC,MAAO,oBAAsB5B,EAASQ,KAAKP,WAAa,0BAA4B,IAAK8B,QAASvB,KAAKwB,uBAAuBC,KAAKzB,OAAS,KACxJmB,EAAE,OAAQ","sourcesContent":["/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n/**\n * @name getDevice\n * @description A method that returns the type of the device\n * @param {String} userAgent window.navigator.userAgent\n * @returns {String} Android/iPhone/iPad/PC\n */\nexport const getDevice = (userAgent) => {\n if (userAgent.toLowerCase().match(/android/i)) {\n return 'Android';\n }\n if (userAgent.toLowerCase().match(/iphone/i)) {\n return 'iPhone';\n }\n if (userAgent.toLowerCase().match(/ipad|ipod/i)) {\n return 'iPad';\n }\n return 'PC';\n};\n",":host {\n display: block;\n}\n\n.HelperModalWrapper {\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.7);\n opacity: 0;\n visibility: hidden;\n transform: scale(1.1);\n transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;\n z-index: 1;\n}\n\n.HelperModalVisible {\n opacity: 1;\n visibility: visible;\n transform: scale(1);\n transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;\n}\n\n.HelperModalContent {\n position: relative;\n border: solid 1px #848e97;\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.007);\n font-size: 14px;\n padding: 10px 10px 5px 10px;\n background-color: #fff;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 4px;\n width: 600px;\n max-height: 600px;\n overflow-y: scroll;\n}\n\n.HelperModalMobileContent {\n background: #FFF;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 4px;\n width: 80%;\n max-height: 350px;\n}\n\n.HelperModalClose {\n cursor: pointer;\n position: absolute;\n top: 15px;\n right: 15px;\n font-size: 20px;\n color: #000;\n}\n\n.HelperModalMobileClose {\n position: absolute;\n top: 15px;\n right: 15px;\n font-size: 20px;\n color: #000;\n}","import { Component, Event, h, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nexport class HelperModal {\n constructor() {\n /**\n * Toggles if the helper is visible or not\n */\n this.visible = true;\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.userAgent = window.navigator.userAgent;\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 handleHelperModalClose() {\n this.visible = false;\n this.cancel.emit();\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 ((this.visible &&\n h(\"div\", { class: this.visible ? \"HelperModalWrapper HelperModalVisible\" : \"HelperModalWrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: \"HelperModalWrapper HelperModalVisible\" },\n h(\"div\", { class: \"HelperModalContent\" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') },\n h(\"span\", { class: \"HelperModalClose\" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, \"X\"),\n h(\"slot\", null))))));\n }\n static get is() { return \"helper-modal\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-modal.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-modal.css\"]\n }; }\n static get properties() { return {\n \"titleModal\": {\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\": \"Modal title\"\n },\n \"attribute\": \"title-modal\",\n \"reflect\": true\n },\n \"visible\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Toggles if the helper is visible or not\"\n },\n \"attribute\": \"visible\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"cancel\",\n \"name\": \"modalCloseEvent\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The event triggered when the modal is closed\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as s}from"./p-e765c7d9.js";const i='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const r=class{constructor(s){t(this,s);this.bulletEvent=e(this,"lotteryBulletSelection",7);this.value="0";this.selectable=true;this.isSelected=false;this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;this.select=()=>{if(this.selectable){this.isSelected=!this.isSelected;this.bulletEvent.emit({value:this.value,selected:this.isSelected})}};this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){return s("div",{class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};r.style=i;const a='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const l=class{constructor(s){t(this,s);this.gridFilledEvent=e(this,"gridFilled",7);this.gridDirtyEvent=e(this,"gridDirty",7);this.totalNumbers=0;this.maximumAllowed=0;this.minimumAllowed=1;this.selectable=true;this.selectedNumbers="";this.displaySelected=false;this.language="en";this.gridType="";this.clientStyling="";this.clientStylingUrlContent="";this.numbers=[];this.limitStylingAppends=false;this.selectedCounter=0;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}connectedCallback(){let t=[];if(this.selectedNumbers.length>0){t=this.selectedNumbers.split(",");this.selectedCounter=t.length}if(this.displaySelected){t.forEach((t=>{this.numbers.push({number:t,selected:true,selectable:this.selectable})}))}else{[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0?true:false,selectable:this.selectedCounter==this.maximumAllowed?false:this.selectable})}))}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}shuffleArray(t){const e=[];while(t.length>0){const s=Math.floor(Math.random()*t.length);e.push(t.splice(s,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>{if(e.number==t.detail.value){return{number:e.number,selected:t.detail.selected,selectable:e.selectable}}return{number:e.number,selected:e.selected,selectable:e.selectable}}));if(t.detail.selected){this.selectedCounter+=1;if(this.selectedCounter==this.maximumAllowed){this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:t.selected?true:false})));this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})}}else{if(this.selectedCounter==this.maximumAllowed){this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:true})));this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})}this.selectedCounter-=1}}async resetSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.selectedCounter=0;this.numbers=this.numbers.map((t=>({number:t.number,selected:false,selectable:this.selectable})));this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})}}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1));e=this.shuffleArray(e);e=e.slice(0,this.minimumAllowed);this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0?true:false,selectable:e.indexOf(parseInt(t.number,10))>=0?true:false})));this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))});this.selectedCounter=this.maximumAllowed}}render(){return s("div",{class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{class:this.gridType==="ticket"?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};l.style=a;export{r as lottery_bullet,l as lottery_grid};
2
- //# sourceMappingURL=p-167c9dbe.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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"],"names":["lotteryBulletCss","LotteryBullet","[object Object]","hostRef","this","value","selectable","isSelected","clientStyling","clientStylingUrlContent","limitStylingAppends","select","bulletEvent","emit","selected","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","h","class","onClick","ref","el","lotteryGridCss","LotteryGrid","totalNumbers","maximumAllowed","minimumAllowed","selectedNumbers","displaySelected","language","gridType","numbers","selectedCounter","length","split","forEach","item","push","number","Array","keys","map","toString","indexOf","array","result","randomIndex","Math","floor","random","splice","event","detail","gridFilledEvent","id","ticketId","index","gridIndex","filter","gridDirtyEvent","resetSelectionHandler","shuffleArray","slice","parseInt","is-selected","client-styling","client-styling-url-content"],"mappings":"kDAAA,MAAMA,EAAmB,o8FCCZC,EAAa,MACxBC,YAAAC,iEAIEC,KAAKC,MAAQ,IAIbD,KAAKE,WAAa,KAIlBF,KAAKG,WAAa,MAIlBH,KAAKI,cAAgB,GAIrBJ,KAAKK,wBAA0B,GAC/BL,KAAKM,oBAAsB,MAC3BN,KAAKO,OAAS,KACZ,GAAIP,KAAKE,WAAY,CACnBF,KAAKG,YAAcH,KAAKG,WACxBH,KA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D3D,KAAKgE,sBAAsBT,GAC3B,IAAIP,EAAQ,IAAIL,MAAM3C,KAAK4B,cAAcgB,QACtCC,KAAIH,GAAUA,EAAS,IAC1BM,EAAQhD,KAAKiE,aAAajB,GAC1BA,EAAQA,EAAMkB,MAAM,EAAGlE,KAAK8B,gBAC5B9B,KAAKmC,QAAUnC,KAAKmC,QAAQU,KAAKL,IACxB,CACLE,OAAQF,EAAKE,OACbhC,SAAUsC,EAAMD,QAAQoB,SAAS3B,EAAKE,OAAQ,MAAQ,EAAI,KAAO,MACjExC,WAAY8C,EAAMD,QAAQoB,SAAS3B,EAAKE,OAAQ,MAAQ,EAAI,KAAO,UAGvE1C,KAAKyD,gBAAgBhD,KAAK,CACxBiD,GAAI1D,KAAK2D,SACTC,MAAO5D,KAAK6D,UACZ9B,gBAAiB/B,KAAKmC,QAAQ2B,QAAQtB,GAASA,EAAK9B,WAAUmC,KAAKL,GAASA,EAAKE,WAEnF1C,KAAKoC,gBAAkBpC,KAAK6B,gBAGhC/B,SACE,OAAQuB,EAAE,MAAO,CAAEC,MAAO,gBAAiBE,IAAKC,GAAMzB,KAAKgB,iBAAmBS,GAC5EJ,EAAE,MAAO,CAAEC,MAAOtB,KAAKkC,WAAa,SAAW,kBAAoB,QAAUlC,KAAKmC,QAAQU,KAAKL,GAASnB,EAAE,MAAO,KAC/GA,EAAE,iBAAkB,CAAEpB,MAAOuC,EAAKE,OAAQxC,WAAYsC,EAAKtC,WAAYkE,cAAe5B,EAAK9B,SAAU2D,iBAAkBrE,KAAKI,cAAekE,6BAA8BtE,KAAKK","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\": true,\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\": true,\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\": true,\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n 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\": true\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\": true,\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\": true\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\": true,\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\": true,\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\": true,\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\": true,\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\": true,\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\": true,\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\": true\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\": true,\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"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"]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-e765c7d9.js";const r="en";const s=["ro","en","hr"];const n={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"Ma simt norocos"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",grid:"Tablica",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"Osjećam se sretno"}};const a=(t,e)=>{const i=e;return n[i!==undefined&&s.includes(i)?i:r][t]};const o='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;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}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;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}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}';const l=class{constructor(i){t(this,i);this.ticketCompleted=e(this,"ticketCompleted",7);this.autoSelection=e(this,"autoSelection",7);this.resetSelection=e(this,"resetSelection",7);this.stakeChange=e(this,"stakeChange",7);this.multiplierChange=e(this,"multiplierChange",7);this.numberOfGrids=1;this.multipleDraws=true;this.resetButton=false;this.autoPick=false;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.multiplier=false;this.numberOfDraws=1;this.isLoading=true;this.hasErrors=false;this.ticketDone=false;this.isCustomSelect=false;this.amountInfo={};this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}checkForClickOutside(t){if(t.composedPath()[0].getAttribute("data-cluster")!=="SelectComponent"){this.isCustomSelect=false}}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok){return t.json()}else{this.hasErrors=true}})).then((t=>{this.isLoading=false;this.gameData=t;this.grids=[...Array(this.gameData.type.boards.length).keys()];this.amountInfo=this.gameData.type.stakes[0]})).catch((t=>{this.isLoading=false;this.hasErrors=true;console.error("Error!",t)}))}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}multiplierChangeHandler(t){this.multiplier=t.target?t.target.checked:false;this.multiplierChange.emit(this.multiplier)}drawsChangeHandler(t){this.ticket=Object.assign(Object.assign({},this.ticket),{draws:t});this.ticketCompleted.emit(this.ticket)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{draws:this.numberOfDraws});this.ticketDone=true;this.ticketCompleted.emit(this.ticket)}toggleAutoSelection(){this.ticketDone=true;this.autoSelection.emit(this.ticketId)}toggleResetSelection(){this.ticketDone=false;this.resetSelection.emit(this.ticketId)}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}setDropdownItem(t){this.amountInfo={value:t.value,currency:t.currency};this.isCustomSelect=false;this.changeStake(this.ticketId,t.amount)}render(){if(this.isLoading){return i("div",null,i("p",null,a("loading",this.language)))}else{if(this.hasErrors){return i("div",null,i("p",null,a("error",this.language)))}else{const{type:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),this.resetButton&&this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection()},a("resetButton",this.language))),this.autoPick&&!this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection()},a("autoButton",this.language))),this.grids.map(((e,r)=>i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},a("grid",this.language)," ",r+1),i("lottery-grid",{"grid-index":r,"maximum-allowed":t.boards[r].maximumAllowed,"minimum-allowed":t.boards[r].minimumAllowed,"total-numbers":t.boards[r].highNumber-t.boards[r].lowNumber+1,selectable:true,"reset-button":true,"auto-pick":true,"game-id":this.gameId,"ticket-id":this.ticketId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),t.multiplier&&i("div",null,i("label",{class:"Toggle"},i("label",{class:"Label"},a("multiplier",this.language),": "),i("input",{class:"ToggleCheckbox",type:"checkbox",onInput:t=>this.multiplierChangeHandler(t)}),i("div",{class:"ToggleSwitch"}))),this.multipleDraws&&i("div",{class:"TicketDraws"},i("label",{class:"Label"},a("numberOfDraws",this.language),": "),i("div",{class:"NumberInput"},i("button",{onClick:()=>this.numberOfDraws>1?this.numberOfDraws--:this.numberOfDraws=1,class:"Minus"},"-"),i("input",{class:"InputDefault",min:"1",value:this.numberOfDraws,type:"number"}),i("button",{onClick:()=>this.numberOfDraws++,class:"Plus"},"+"))),i("div",null,i("label",{class:"Label"},a("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{"data-cluster":"SelectComponent",class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{"data-cluster":"SelectComponent",class:"SelectButton",onClick:()=>this.toggleClass()},i("span",{"data-cluster":"SelectComponent"},this.amountInfo.value," ",this.amountInfo.currency),i("span",{"data-cluster":"SelectComponent",class:"SelectExpand"},"▼")),i("div",{"data-cluster":"SelectComponent",class:"SelectContent"},i("ul",{"data-cluster":"SelectComponent",class:"SelectOptions"},t.stakes.map((t=>i("li",{"data-cluster":"SelectComponent",class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setDropdownItem(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].amount,type:"number",disabled:true}),i("p",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}}static get watchers(){return{numberOfDraws:["drawsChangeHandler"]}}};l.style=o;export{l as lottery_ticket};
2
- //# sourceMappingURL=p-20e0c81c.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../lottery-ticket/dist/collection/utils/locale.utils.js","../lottery-ticket/dist/collection/components/lottery-ticket/lottery-ticket.css?tag=lottery-ticket&encapsulation=shadow","../lottery-ticket/dist/collection/components/lottery-ticket/lottery-ticket.js"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","loading","error","grid","multiplier","numberOfDraws","wagerPerDraw","resetButton","autoButton","ro","fr","ar","hr","translate","key","customLang","lang","undefined","includes","lotteryTicketCss","LotteryTicket","[object Object]","hostRef","this","numberOfGrids","multipleDraws","autoPick","language","clientStyling","clientStylingUrlContent","isLoading","hasErrors","ticketDone","isCustomSelect","amountInfo","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","ev","composedPath","getAttribute","url","URL","endpoint","gameId","fetch","href","then","response","ok","json","data","gameData","grids","Array","type","boards","length","keys","stakes","catch","err","console","e","target","checked","multiplierChange","emit","event","ticket","Object","assign","draws","ticketCompleted","detail","autoSelection","ticketId","resetSelection","ticketid","amount","stakeChange","stake","item","value","currency","changeStake","h","class","ref","el","name","onClick","toggleResetSelection","toggleAutoSelection","map","_","index","grid-index","maximum-allowed","maximumAllowed","minimum-allowed","minimumAllowed","total-numbers","highNumber","lowNumber","selectable","reset-button","auto-pick","game-id","ticket-id","client-styling","client-styling-url-content","onInput","multiplierChangeHandler","min","data-cluster","toggleClass","setDropdownItem","disabled"],"mappings":"kDAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAsB,CAAC,KAAM,KAAM,MACzC,MAAMC,EAAe,CACnBC,GAAI,CACFC,QAAS,2BACTC,MAAO,iDACPC,KAAM,OACNC,WAAY,aACZC,cAAe,kBACfC,aAAc,iBACdC,YAAa,QACbC,WAAY,gBAEdC,GAAI,CACFR,QAAS,qCACTC,MAAO,6CACPC,KAAM,OACNC,WAAY,gBACZC,cAAe,uBACfC,aAAc,uBACdC,YAAa,YACbC,WAAY,mBAEdE,GAAI,CACFT,QAAS,2BACTC,MAAO,iDACPC,KAAM,OACNC,WAAY,aACZC,cAAe,kBACfC,aAAc,iBACdC,YAAa,QACbC,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AWyD,MAChB,IACApE,KAAKW,WAAW0D,UAClBE,EAAE,OAAQ,CAAE6B,eAAgB,kBAAmB5B,MAAO,gBAAkB,MAC1ED,EAAE,MAAO,CAAE6B,eAAgB,kBAAmB5B,MAAO,iBACnDD,EAAE,KAAM,CAAE6B,eAAgB,kBAAmB5B,MAAO,iBAAmBhC,EAAKI,OAAOmC,KAAKZ,GAASI,EAAE,KAAM,CAAE6B,eAAgB,kBAAmB5B,MAAOxE,KAAKW,WAAWyD,OAASD,EAAKC,MAAQ,gBAAkB,GAAIA,MAAOD,EAAKC,MAAOQ,QAAS,IAAM5E,KAAKsG,gBAAgBnC,IACtQA,EAAKC,MACL,IACAD,EAAKE,eAAkBE,EAAE,MAAO,KACtCA,EAAE,QAAS,CAAE4B,IAAK,IAAK/B,MAAO5B,EAAKI,OAAO,GAAGoB,OAAQxB,KAAM,SAAU+D,SAAU,OAC/EhC,EAAE,IAAK,CAAEC,MAAO,mBAAqBhC,EAAKI,OAAO,GAAGyB","sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en', 'hr'];\nconst TRANSLATIONS = {\n en: {\n loading: 'Loading, please wait ...',\n error: 'It was an error while trying to fetch the data',\n grid: 'Grid',\n multiplier: 'Multiplier',\n numberOfDraws: 'Number of draws',\n wagerPerDraw: 'Wager per draw',\n resetButton: 'Reset',\n autoButton: 'I feel lucky'\n },\n ro: {\n loading: 'Se incarca, va rugam asteptati ...',\n error: 'A fost o eroare in timp ce asteptam datele',\n grid: 'Grid',\n multiplier: 'Multiplicator',\n numberOfDraws: 'Numarul de extrageri',\n wagerPerDraw: 'Pariul per extragere',\n resetButton: 'Reseteaza',\n autoButton: 'Ma simt norocos'\n },\n fr: {\n loading: 'Loading, please wait ...',\n error: 'It was an error while trying to fetch the data',\n grid: 'Grid',\n multiplier: 'Multiplier',\n numberOfDraws: 'Number of draws',\n wagerPerDraw: 'Wager per draw',\n resetButton: 'Reset',\n autoButton: 'I feel lucky'\n },\n ar: {\n loading: 'Loading, please wait ...',\n error: 'It was an error while trying to fetch the data',\n grid: 'Grid',\n multiplier: 'Multiplier',\n numberOfDraws: 'Number of draws',\n wagerPerDraw: 'Wager per draw',\n resetButton: 'Reset',\n autoButton: 'I feel lucky'\n },\n hr: {\n loading: 'Učitavanje, molimo pričekajte ...',\n error: 'Došlo je do pogreške prilikom pokušaja dohvaćanja podataka',\n grid: 'Tablica',\n multiplier: 'Multiplikator',\n numberOfDraws: 'Broj izvlačenja',\n wagerPerDraw: 'Ulog po izvlačenju',\n resetButton: 'Resetiraj',\n autoButton: 'Osjećam se sretno'\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.TicketTitle {\n font-size: 16px;\n font-weight: bold;\n}\n\n.ButtonContainer {\n display: flex;\n justify-content: flex-end;\n}\n\n.Toggle {\n cursor: pointer;\n margin-top: 20px;\n display: inline-block;\n}\n\n.ToggleSwitch {\n display: inline-block;\n background: #707070;\n border-radius: 16px;\n width: 58px;\n height: 24px;\n position: relative;\n vertical-align: middle;\n transition: background 0.25s;\n}\n.ToggleSwitch:before, .ToggleSwitch:after {\n content: \"\";\n}\n.ToggleSwitch:before {\n display: block;\n background: linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);\n border-radius: 50%;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);\n width: 16px;\n height: 16px;\n position: absolute;\n top: 4px;\n left: 4px;\n transition: left 0.25s;\n}\n\n.Toggle:hover .ToggleSwitch:before {\n background: linear-gradient(to bottom, #fff 0%, #fff 100%);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);\n}\n\n.ToggleCheckbox:checked + .ToggleSwitch {\n background: #00ABA4;\n}\n\n.ToggleCheckbox:checked + .ToggleSwitch:before {\n left: 38px;\n}\n\n.ToggleCheckbox {\n position: absolute;\n visibility: hidden;\n}\n\n.Label {\n margin-right: 5px;\n position: relative;\n top: 2px;\n font-size: 14px;\n font-weight: lighter;\n color: #000;\n}\n\ninput[type=number] {\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n\ninput[type=number]::-webkit-inner-spin-button,\ninput[type=number]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n}\n\n.NumberInput,\n.WagerInput {\n margin-top: 10px;\n display: inline-flex;\n align-items: center;\n}\n\n.NumberInput,\n.NumberInput * {\n box-sizing: border-box;\n}\n\n.NumberInput button {\n cursor: pointer;\n outline: none;\n -webkit-appearance: none;\n border: none;\n align-items: center;\n justify-content: center;\n height: 20px;\n position: relative;\n}\n\n.NumberInput button:after {\n display: inline-block;\n position: absolute;\n transform: translate(-50%, -50%) rotate(180deg);\n align-items: center;\n text-align: center;\n}\n\n.NumberInput button.Plus:after {\n transform: translate(-50%, -50%) rotate(0deg);\n width: 30px;\n display: inline-flex;\n align-items: center;\n text-align: center;\n}\n\n.NumberInput input[type=number],\n.WagerInput input[type=number] {\n max-width: 50px;\n display: inline-flex;\n align-items: center;\n padding: 4px 10px;\n text-align: center;\n}\n.NumberInput input[type=number] .WagerInputTitle,\n.WagerInput input[type=number] .WagerInputTitle {\n font-size: 14px;\n color: #000;\n padding: 10px;\n}\n\n.InputDefault {\n background-color: #F1F1F1;\n border-radius: 4px;\n padding: 5px;\n border: solid 1px #D4D4D4;\n color: #707070;\n}\n\n.AutoButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n padding: 8px 20px;\n width: max-content;\n margin: 5px 0;\n border: 1px solid #00958f;\n background: #FFF;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n.AutoButton:active {\n background: #00958f;\n color: #FFF;\n}\n\n.ResetButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n padding: 8px 20px;\n width: max-content;\n margin: 5px 0;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ResetButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}\n\n.TicketGridBullets {\n background: #f1f1f1;\n border-radius: 4px;\n padding: 20px;\n margin-top: 5px;\n}\n.TicketGridBullets .TicketGridTitle {\n margin-top: 0px;\n}\n\n.Minus {\n border-radius: 4px;\n width: 30px;\n height: 24px !important;\n margin-right: 10px;\n color: #FFF;\n background: #009993;\n}\n\n.Plus {\n border-radius: 4px;\n width: 30px;\n height: 24px !important;\n margin-left: 10px;\n color: #FFF;\n background: #009993;\n}\n\n.SelectWrapper {\n width: auto;\n padding: 5px;\n margin: 0 auto;\n border: 1px solid #ccc;\n border-radius: 5px;\n position: relative;\n}\n\n.SelectButton, .SelectOptions li {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n\n.SelectButton {\n display: flex;\n padding: 0 5px;\n border-radius: 7px;\n align-items: center;\n justify-content: space-between;\n font-size: 14px;\n}\n.SelectButton span:first-child {\n padding-right: 10px;\n}\n\n.SelectExpand {\n transition: transform 0.3s linear;\n font-size: 12px;\n}\n\n.SelectActive .SelectExpand {\n transform: rotate(180deg);\n}\n\n.SelectContent {\n display: none;\n padding: 5px;\n border-radius: 7px;\n}\n\n.SelectWrapper.SelectActive .SelectContent {\n width: 100%;\n display: block;\n position: absolute;\n left: 0;\n top: 32px;\n padding: 0;\n border: 1px solid #ccc;\n overflow: hidden;\n background: #fff;\n}\n\n.SelectContent .SelectOptions {\n max-height: 100px;\n margin: 0;\n overflow-y: auto;\n padding: 0;\n}\n.SelectContent .SelectOptions .SelectedValue {\n background-color: #009993;\n color: #fff;\n}\n\n.SelectOptions::-webkit-scrollbar {\n width: 7px;\n}\n\n.SelectOptions::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 25px;\n}\n\n.SelectOptions::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 25px;\n}\n\n.SelectOptions li {\n height: 20px;\n padding: 0 13px;\n font-size: 14px;\n}\n\n.SelectOptions li:hover {\n background: #f2f2f2;\n}","import { Component, h, Prop, State, Event, Listen, Watch } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nimport '@everymatrix/lottery-grid';\nexport class LotteryTicket {\n constructor() {\n /**\n * Number of grids of a ticket\n */\n this.numberOfGrids = 1;\n /**\n * Option to have the ticket registered for multiple draws\n */\n this.multipleDraws = true;\n /**\n * Shows the reset button\n */\n this.resetButton = false;\n /**\n * Shows the auto-pick button\n */\n this.autoPick = false;\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.multiplier = false;\n this.numberOfDraws = 1;\n this.isLoading = true;\n this.hasErrors = false;\n this.ticketDone = false;\n this.isCustomSelect = false;\n this.amountInfo = {};\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 /**\n * @TODO find a better way to implement click outside the custom select, so that we don't have to use the 'data-cluster' attribute on each element\n */\n checkForClickOutside(ev) {\n if (ev.composedPath()[0].getAttribute('data-cluster') !== 'SelectComponent') {\n this.isCustomSelect = false;\n }\n }\n connectedCallback() {\n let url = new URL(`${this.endpoint}/games/${this.gameId}`);\n fetch(url.href)\n .then((response) => {\n if (response.ok) {\n return response.json();\n }\n else {\n // Throw error\n this.hasErrors = true;\n }\n })\n .then((data) => {\n this.isLoading = false;\n this.gameData = data;\n this.grids = [...Array(this.gameData.type.boards.length).keys()];\n this.amountInfo = this.gameData.type.stakes[0]; // initial value for select\n })\n .catch((err) => {\n this.isLoading = false;\n this.hasErrors = true;\n console.error('Error!', err);\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 multiplierChangeHandler(e) {\n this.multiplier = e.target ? e.target.checked : false;\n this.multiplierChange.emit(this.multiplier);\n }\n drawsChangeHandler(event) {\n this.ticket = Object.assign(Object.assign({}, this.ticket), { draws: event });\n this.ticketCompleted.emit(this.ticket);\n }\n gridFilledHandler(event) {\n this.ticket = Object.assign(Object.assign({}, event.detail), { draws: this.numberOfDraws });\n this.ticketDone = true;\n this.ticketCompleted.emit(this.ticket);\n }\n toggleAutoSelection() {\n this.ticketDone = true;\n this.autoSelection.emit(this.ticketId);\n }\n toggleResetSelection() {\n this.ticketDone = false;\n this.resetSelection.emit(this.ticketId);\n }\n changeStake(ticketid, amount) {\n this.stakeChange.emit({\n ticketId: ticketid,\n stake: amount\n });\n }\n toggleClass() {\n this.isCustomSelect = !this.isCustomSelect;\n }\n setDropdownItem(item) {\n this.amountInfo = {\n value: item.value,\n currency: item.currency\n };\n this.isCustomSelect = false;\n this.changeStake(this.ticketId, item.amount);\n }\n render() {\n if (this.isLoading) {\n return (h(\"div\", null,\n h(\"p\", null, translate('loading', this.language))));\n }\n else {\n if (this.hasErrors) {\n return (h(\"div\", null,\n h(\"p\", null, translate('error', this.language))));\n }\n else {\n const { type } = this.gameData;\n return (h(\"div\", { class: \"TicketContainer\", ref: el => this.stylingContainer = el },\n h(\"p\", { class: \"TicketTitle\" }, this.gameData.name),\n this.resetButton && this.ticketDone &&\n h(\"div\", { class: \"ButtonContainer\" },\n h(\"a\", { class: \"ResetButton\", onClick: () => this.toggleResetSelection() }, translate('resetButton', this.language))),\n this.autoPick && !this.ticketDone &&\n h(\"div\", { class: \"ButtonContainer\" },\n h(\"a\", { class: \"AutoButton\", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))),\n this.grids.map((_, index) => h(\"div\", { class: \"TicketGridBullets\" },\n h(\"p\", { class: \"TicketGridTitle\" },\n translate('grid', this.language),\n \" \",\n index + 1),\n h(\"lottery-grid\", { \"grid-index\": index, \"maximum-allowed\": type.boards[index].maximumAllowed, \"minimum-allowed\": type.boards[index].minimumAllowed, \"total-numbers\": type.boards[index].highNumber - type.boards[index].lowNumber + 1, selectable: true, \"reset-button\": true, \"auto-pick\": true, \"game-id\": this.gameId, \"ticket-id\": this.ticketId, language: this.language, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent }))),\n type.multiplier &&\n h(\"div\", null,\n h(\"label\", { class: \"Toggle\" },\n h(\"label\", { class: \"Label\" },\n translate('multiplier', this.language),\n \": \"),\n h(\"input\", { class: \"ToggleCheckbox\", type: \"checkbox\", onInput: (e) => this.multiplierChangeHandler(e) }),\n h(\"div\", { class: \"ToggleSwitch\" }))),\n this.multipleDraws &&\n h(\"div\", { class: \"TicketDraws\" },\n h(\"label\", { class: \"Label\" },\n translate('numberOfDraws', this.language),\n \": \"),\n h(\"div\", { class: \"NumberInput\" },\n h(\"button\", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: \"Minus\" }, \"-\"),\n h(\"input\", { class: \"InputDefault\", min: \"1\", value: this.numberOfDraws, type: \"number\" }),\n h(\"button\", { onClick: () => this.numberOfDraws++, class: \"Plus\" }, \"+\"))),\n h(\"div\", null,\n h(\"label\", { class: \"Label\" },\n translate('wagerPerDraw', this.language),\n \": \"),\n h(\"div\", { class: \"WagerInput\" }, type.stakes.length > 1 ?\n (h(\"div\", { \"data-cluster\": \"SelectComponent\", class: this.isCustomSelect ? \"SelectWrapper SelectActive\" : \"SelectWrapper\" },\n h(\"div\", { \"data-cluster\": \"SelectComponent\", class: \"SelectButton\", onClick: () => this.toggleClass() },\n h(\"span\", { \"data-cluster\": \"SelectComponent\" },\n this.amountInfo.value,\n \" \",\n this.amountInfo.currency),\n h(\"span\", { \"data-cluster\": \"SelectComponent\", class: \"SelectExpand\" }, \"\\u25BC\")),\n h(\"div\", { \"data-cluster\": \"SelectComponent\", class: \"SelectContent\" },\n h(\"ul\", { \"data-cluster\": \"SelectComponent\", class: \"SelectOptions\" }, type.stakes.map((item) => h(\"li\", { \"data-cluster\": \"SelectComponent\", class: this.amountInfo.value == item.value ? 'SelectedValue' : '', value: item.value, onClick: () => this.setDropdownItem(item) },\n item.value,\n \" \",\n item.currency)))))) : (h(\"div\", null,\n h(\"input\", { min: \"1\", value: type.stakes[0].amount, type: \"number\", disabled: true }),\n h(\"p\", { class: \"WagerInputTitle\" }, type.stakes[0].currency)))))));\n }\n }\n }\n static get is() { return \"lottery-ticket\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-ticket.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-ticket.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\": \"NorWAy endpoint\"\n },\n \"attribute\": \"endpoint\",\n \"reflect\": true\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\": true\n },\n \"numberOfGrids\": {\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 grids of a ticket\"\n },\n \"attribute\": \"number-of-grids\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"multipleDraws\": {\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\": \"Option to have the ticket registered for multiple draws\"\n },\n \"attribute\": \"multiple-draws\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\n },\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\": \"Ticket ID\"\n },\n \"attribute\": \"ticket-id\",\n \"reflect\": true\n },\n \"resetButton\": {\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\": \"Shows the reset button\"\n },\n \"attribute\": \"reset-button\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"autoPick\": {\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\": \"Shows the auto-pick button\"\n },\n \"attribute\": \"auto-pick\",\n \"reflect\": true,\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\": true,\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"multiplier\": {},\n \"numberOfDraws\": {},\n \"isLoading\": {},\n \"hasErrors\": {},\n \"ticketDone\": {},\n \"isCustomSelect\": {},\n \"amountInfo\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"ticketCompleted\",\n \"name\": \"ticketCompleted\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"TODO\",\n \"text\": \"including ts type\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"autoSelection\",\n \"name\": \"autoSelection\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"resetSelection\",\n \"name\": \"resetSelection\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"stakeChange\",\n \"name\": \"stakeChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }, {\n \"method\": \"multiplierChange\",\n \"name\": \"multiplierChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n static get watchers() { return [{\n \"propName\": \"numberOfDraws\",\n \"methodName\": \"drawsChangeHandler\"\n }]; }\n static get listeners() { return [{\n \"name\": \"click\",\n \"method\": \"checkForClickOutside\",\n \"target\": \"window\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"gridFilled\",\n \"method\": \"gridFilledHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-e765c7d9.js";const s="en";const r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}};const o=(t,e)=>{const i=e;return r[i!==undefined&&i in r?i:s][t]};const n='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';const a=class{constructor(i){t(this,i);this.accordionEvent=e(this,"helperAccordionAction",7);this.ticketHistoryFlag=false;this.headerTitle="";this.headerSubtitle="";this.description="";this.footer=false;this.deleteTab=false;this.postMessage=false;this.eventName="helperAccordionAction";this.collapsed=true;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}toggleContent(){this.showContent=!this.showContent}deleteAction(){if(this.postMessage){window.postMessage({type:this.eventName},window.location.href)}this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:this.ticketHistoryFlag===true?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},o("deleteTicket",this.language))))))}};a.style=n;export{a as helper_accordion};
2
- //# sourceMappingURL=p-59a96854.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../helper-accordion/dist/collection/utils/locale.utils.js","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.css?tag=helper-accordion&encapsulation=shadow","../helper-accordion/dist/collection/components/helper-accordion/helper-accordion.js"],"names":["DEFAULT_LANGUAGE","TRANSLATIONS","en","deleteTicket","ro","fr","ar","hr","translate","key","customLang","lang","undefined","helperAccordionCss","Accordion","[object Object]","hostRef","this","ticketHistoryFlag","headerTitle","headerSubtitle","description","footer","deleteTab","postMessage","eventName","collapsed","language","clientStyling","clientStylingUrlContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","showContent","window","type","location","href","accordionEvent","emit","h","class","ref","el","onClick","toggleContent","name","deleteAction"],"mappings":"kDAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAe,CACnBC,GAAI,CACFC,aAAc,iBAEhBC,GAAI,CACFD,aAAc,kBAEhBE,GAAI,CACFF,aAAc,uBAEhBG,GAAI,CACFH,aAAc,eAEhBI,GAAI,CACFJ,aAAc,mBAGX,MAAMK,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOT,EAAcU,IAASC,WAAeD,KAAQV,EAAgBU,EAAOX,GAAkBS,ICpBhG,MAAMI,EAAqB,0hDCEdC,EAAS,MACpBC,YAAAC,mEAIEC,KAAKC,kBAAoB,MAIzBD,KAAKE,YAAc,GAInBF,KAAK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YhC,KAAKwB,YAAc,IAAM,MAC1DxB,KAAKwB,aACHO,EAAE,MAAO,KACPA,EAAE,MAAO,CAAEC,MAAO,WAChBD,EAAE,OAAQ,CAAEM,KAAM,qBAClBrC,KAAKK,QAAUL,KAAKwB,aAClBO,EAAE,MAAO,KAAM/B,KAAKM,WAClByB,EAAE,OAAQ,CAAEC,MAAO,eAAgBG,QAAS,IAAMnC,KAAKsC,gBAAkB/C,EAAU,eAAgBS,KAAKU","sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst TRANSLATIONS = {\n en: {\n deleteTicket: 'Delete ticket'\n },\n ro: {\n deleteTicket: 'Sterge biletul'\n },\n fr: {\n deleteTicket: 'Supprimer le billet'\n },\n ar: {\n deleteTicket: 'حذف التذكرة'\n },\n hr: {\n deleteTicket: 'Izbriši listić'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? 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.Header {\n border-radius: 5px;\n background: #009993;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 1px;\n cursor: pointer;\n}\n.Header:hover {\n background: #00ABA4;\n}\n.Header .Title,\n.Header .Subtitle,\n.Header .Description {\n margin: 0;\n font-size: 14px;\n color: #fff;\n text-transform: capitalize;\n}\n.Header .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.HeaderTicketHistory {\n border-radius: 4px;\n background: #F1F1F1;\n display: flex;\n gap: 30px;\n border: 1px solid #009993;\n padding: 8px 10px;\n user-select: none;\n margin-bottom: 5px;\n cursor: pointer;\n}\n.HeaderTicketHistory:hover {\n background: #00ABA4;\n}\n.HeaderTicketHistory .Title,\n.HeaderTicketHistory .Subtitle,\n.HeaderTicketHistory .Description {\n margin: 0;\n font-size: 14px;\n color: #000;\n}\n.HeaderTicketHistory .Expand {\n margin-left: auto;\n color: #FFF;\n width: 17px;\n height: 17px;\n cursor: pointer;\n text-align: center;\n transform: rotate(90deg);\n font-size: 20px;\n user-select: none;\n}\n\n.Content {\n border-radius: 0 0 4px 4px;\n background: #fff;\n border: 1px solid #009993;\n padding: 10px 15px;\n user-select: none;\n color: #000;\n margin-bottom: 10px;\n}\n\n.ActionButton {\n cursor: pointer;\n display: inline-block;\n border-radius: 4px;\n margin: 20px 0 10px;\n text-transform: uppercase;\n font-size: 12px;\n text-align: center;\n padding: 8px 20px;\n min-width: 80px;\n background: #FF3D00;\n border: 1px solid #FF3D00;\n color: #FFF;\n}\n.ActionButton:hover {\n background: #FF6536;\n border: 1px solid #FF3D00;\n}","import { Component, Prop, h, State, Event } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nexport class Accordion {\n constructor() {\n /**\n * Flag for ticket history\n */\n this.ticketHistoryFlag = false;\n /**\n * Title (top header)\n */\n this.headerTitle = '';\n /**\n * SubTitle (top header)\n */\n this.headerSubtitle = '';\n /**\n * Description\n */\n this.description = '';\n /**\n * Enables footer content\n */\n this.footer = false;\n /**\n * Enables footer button for tab deletion\n */\n this.deleteTab = false;\n /**\n * Activates postMessages as events for actions from the widget\n */\n this.postMessage = false;\n /**\n * Name of the event emitter by the action button\n */\n this.eventName = 'helperAccordionAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\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.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 // @TODO fix the `any` type :)\n connectedCallback() {\n this.showContent = !this.collapsed;\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 toggleContent() {\n this.showContent = !this.showContent;\n }\n deleteAction() {\n if (this.postMessage) {\n // @TODO maybe change the name type, this one sucks\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.accordionEvent.emit();\n }\n render() {\n return (h(\"div\", { class: \"Wrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() },\n h(\"p\", { class: \"Title\" }, this.headerTitle),\n h(\"p\", { class: \"Subtitle\" }, this.headerSubtitle),\n h(\"p\", { class: \"Subtitle Description\" }, this.description),\n h(\"span\", { class: \"Expand\" }, this.showContent ? '<' : '>')),\n this.showContent &&\n h(\"div\", null,\n h(\"div\", { class: \"Content\" },\n h(\"slot\", { name: 'accordionContent' }),\n this.footer && this.showContent &&\n h(\"div\", null, this.deleteTab &&\n h(\"span\", { class: \"ActionButton\", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));\n }\n static get is() { return \"helper-accordion\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-accordion.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-accordion.css\"]\n }; }\n static get properties() { return {\n \"ticketHistoryFlag\": {\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\": \"Flag for ticket history\"\n },\n \"attribute\": \"ticket-history-flag\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"headerTitle\": {\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\": \"Title (top header)\"\n },\n \"attribute\": \"header-title\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"headerSubtitle\": {\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\": \"SubTitle (top header)\"\n },\n \"attribute\": \"header-subtitle\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"description\": {\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\": \"Description\"\n },\n \"attribute\": \"description\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"footer\": {\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\": \"Enables footer content\"\n },\n \"attribute\": \"footer\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"deleteTab\": {\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\": \"Enables footer button for tab deletion\"\n },\n \"attribute\": \"delete-tab\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"postMessage\": {\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\": \"Activates postMessages as events for actions from the widget\"\n },\n \"attribute\": \"post-message\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"eventName\": {\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\": \"Name of the event emitter by the action button\"\n },\n \"attribute\": \"event-name\",\n \"reflect\": true,\n \"defaultValue\": \"'helperAccordionAction'\"\n },\n \"collapsed\": {\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\": \"Collapsed\"\n },\n \"attribute\": \"collapsed\",\n \"reflect\": true,\n \"defaultValue\": \"true\"\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\": true,\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"showContent\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"accordionEvent\",\n \"name\": \"helperAccordionAction\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Action event\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,h as s,a as i}from"./p-e765c7d9.js";const e='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}';const o=class{constructor(s){t(this,s);this.disabled=false;this.selected=false;this.selectedIndex=0;this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}];this.clientStyling="";this.clientStylingurl="";this.clientStylingUrlContent="";this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}connectedCallback(){}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){this.setClientStyling();if(this.clientStylingUrlContent){this.setClientStylingURL()}this.limitStylingAppends=true}}render(){return s("div",{ref:t=>this.stylingContainer=t},s("div",{class:"Tabs"},this.tabs.map(((t,i)=>s("button",{class:"TabButton"+(this.selectedIndex==i?" Active":""),onClick:()=>this.selectedIndex=i},t.label)))),s("div",null,s("helper-tab",{selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrlContent})))}get host(){return i(this)}};o.style=e;export{o as helper_tabs};
2
- //# sourceMappingURL=p-662d9dac.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../helper-tabs/dist/collection/components/helper-tabs/helper-tabs.css?tag=helper-tabs&encapsulation=shadow","../helper-tabs/dist/collection/components/helper-tabs/helper-tabs.js"],"names":["helperTabsCss","HelperTabs","[object Object]","hostRef","this","disabled","selected","selectedIndex","tabs","label","clientStyling","clientStylingurl","clientStylingUrlContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","h","ref","el","class","map","tab","index","onClick","client-styling","client-stylingurl","client-styling-url-content"],"mappings":"kDAAA,MAAMA,EAAgB,igBCCTC,EAAU,MACrBC,YAAAC,aAIEC,KAAKC,SAAW,MAIhBD,KAAKE,SAAW,MAIhBF,KAAKG,cAAgB,EAIrBH,KAAKI,KAAO,CAAC,CAAEC,MAAO,eAAiB,CAAEA,MAAO,SAAW,CAAEA,MAAO,SAIpEL,KAAKM,cAAgB,GAIrBN,KAAKO,iBAAmB,GAIxBP,KAAKQ,wBAA0B,GAC/BR,KAAKS,oBAAsB,MAC3BT,KAAKU,iBAAmB,KACtB,IAAIC,EAAQC,SAASC,cAAc,SACnCF,EAAMG,UAAYd,KAAKM,cACvBN,KAAKe,iBAAiBC,QAAQL,IAEhCX,KAAKiB,oBAAsB,KACzB,IAAIC,EAAUN,SAASC,cAAc,SACrCM,YAAW,KACTD,EAAQJ,UAAYd,KAAKQ,wBACzBR,KAAKe,iBAAiBC,QAAQE,KAC7B,IAGPpB,qBAKAA,qBAEE,IAAKE,KAAKS,qBAAuBT,KAAKe,iBAAkB,CACtDf,KAAKU,mBACL,GAAIV,KAAKQ,wBAAyB,CAChCR,KAAKiB,sBAEPjB,KAAKS,oBAAsB,MAI/BX,SACE,OAAQsB,EAAE,MAAO,CAAEC,IAAKC,GAAMtB,KAAKe,iBAAmBO,GACpDF,EAAE,MAAO,CAAEG,MAAO,QAAUvB,KAAKI,KAAKoB,KAAI,CAACC,EAAKC,IAAUN,EAAE,SAAU,CAAEG,MAAO,aAAevB,KAAKG,eAAiBuB,EAAQ,UAAY,IAAKC,QAAS,IAAM3B,KAAKG,cAAgBuB,GAASD,EAAIpB,UAC9Le,EAAE,MAAO,KACPA,EAAE,aAAc,CAAEjB,cAAeH,KAAKG,cAAeyB,iBAAkB5B,KAAKM,cAAeuB,oBAAqB7B,KAAKO,iBAAkBuB,6BAA8B9B,KAAKQ","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.Tabs {\n display: flex;\n gap: 10px;\n overflow-x: auto;\n}\n\n.TabButton {\n cursor: pointer;\n width: auto;\n border-radius: 4px;\n padding: 8px 15px;\n margin: 5px 0 10px;\n border: 1px solid #009993;\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 white-space: nowrap;\n}\n.TabButton:hover {\n background: #F1F1F1;\n}\n.TabButton.Active {\n background: #009993;\n color: #FFF;\n}","import { Component, Prop, Element, h, State } from '@stencil/core';\nexport class HelperTabs {\n constructor() {\n /**\n * Tell me if it is disabled\n */\n this.disabled = false;\n /**\n * Tell me what tab is selected\n */\n this.selected = false;\n /**\n * Default selected index\n */\n this.selectedIndex = 0;\n /**\n * Tabs details\n */\n this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url\n */\n this.clientStylingurl = '';\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 connectedCallback() {\n if (this.tabs.length == 0) {\n // fetch CMS data\n }\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n this.setClientStyling();\n if (this.clientStylingUrlContent) {\n this.setClientStylingURL();\n }\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n render() {\n return (h(\"div\", { ref: el => this.stylingContainer = el },\n h(\"div\", { class: \"Tabs\" }, this.tabs.map((tab, index) => h(\"button\", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))),\n h(\"div\", null,\n h(\"helper-tab\", { selectedIndex: this.selectedIndex, \"client-styling\": this.clientStyling, \"client-stylingurl\": this.clientStylingurl, \"client-styling-url-content\": this.clientStylingUrlContent }))));\n }\n static get is() { return \"helper-tabs\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-tabs.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-tabs.css\"]\n }; }\n static get properties() { return {\n \"disabled\": {\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\": \"Tell me if it is disabled\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"label\": {\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\": \"Gimme names or you die\"\n },\n \"attribute\": \"label\",\n \"reflect\": true\n },\n \"selected\": {\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\": \"Tell me what tab is selected\"\n },\n \"attribute\": \"selected\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"cmsEndpoint\": {\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\": \"Endpoing for CMS\"\n },\n \"attribute\": \"cms-endpoint\",\n \"reflect\": true\n },\n \"selectedIndex\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Default selected index\"\n },\n \"attribute\": \"selected-index\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"tabs\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"Array<Object>\",\n \"resolved\": \"Object[]\",\n \"references\": {\n \"Array\": {\n \"location\": \"global\"\n },\n \"Object\": {\n \"location\": \"global\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Tabs details\"\n },\n \"defaultValue\": \"[{label: 'How to Play'}, {label: 'About'}, {label: 'FAQs'}]\"\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingurl\": {\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\"\n },\n \"attribute\": \"client-stylingurl\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n static get elementRef() { return \"host\"; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,h as s}from"./p-e765c7d9.js";const i=":host{display:block}";const e=class{constructor(s){t(this,s);this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){return s("div",{class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{"header-title":"Game Details",collapsed:false,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};e.style=i;export{e as lottery_game_details};
2
- //# sourceMappingURL=p-66729e9c.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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"],"names":["lotteryGameDetailsCss","LotteryGameDetails","[object Object]","hostRef","this","clientStyling","clientStylingUrlContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","h","class","ref","el","header-title","collapsed","client-styling","client-styling-url-content","slot"],"mappings":"2CAAA,MAAMA,EAAwB,6BCGjBC,EAAkB,MAC7BC,YAAAC,aAIEC,KAAKC,cAAgB,GAIrBD,KAAKE,wBAA0B,GAC/BF,KAAKG,oBAAsB,MAC3BH,KAAKI,iBAAmB,KACtB,IAAIC,EAAQC,SAASC,cAAc,SACnCF,EAAMG,UAAYR,KAAKC,cACvBD,KAAKS,iBAAiBC,QAAQL,IAEhCL,KAAKW,oBAAsB,KACzB,IAAIC,EAAUN,SAASC,cAAc,SACrCM,YAAW,KACTD,EAAQJ,UAAYR,KAAKE,wBACzBF,KAAKS,iBAAiBC,QAAQE,KAC7B,IAGPd,qBAEE,IAAKE,KAAKG,qBAAuBH,KAAKS,iBAAkB,CACtD,GAAIT,KAAKC,cACPD,KAAKI,mBACP,GAAIJ,KAAKE,wBACPF,KAAKW,sBACPX,KAAKG,oBAAsB,MAI/BL,SACE,OAAQgB,EAAE,MAAO,CAAEC,MAAO,2BAA4BC,IAAKC,GAAMjB,KAAKS,iBAAmBQ,GACvFH,EAAE,mBAAoB,CAAEI,eAAgB,eAAgBC,UAAW,MAAOC,iBAAkBpB,KAAKC,cAAeoB,6BAA8BrB,KAAKE,yBACjJY,EAAE,MAAO,CAAEC,MAAO,qBAAsBO,KAAM,oBAC5CR,EAAE,cAAe,CAAEM,iBAAkBpB,KAAKC,cAAeoB,6BAA8BrB,KAAKE","sourcesContent":[":host {\n display: block;\n}","import { Component, h, Prop, State, } from '@stencil/core';\nimport '@everymatrix/helper-accordion';\nimport '@everymatrix/helper-tabs';\nexport class LotteryGameDetails {\n constructor() {\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.limitStylingAppends = false;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n render() {\n return (h(\"div\", { class: \"GamePageDetailsContainer\", ref: el => this.stylingContainer = el },\n h(\"helper-accordion\", { \"header-title\": \"Game Details\", collapsed: false, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent },\n h(\"div\", { class: \"AccordionContainer\", slot: \"accordionContent\" },\n h(\"helper-tabs\", { \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent })))));\n }\n static get is() { return \"lottery-game-details\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-game-details.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-game-details.css\"]\n }; }\n static get properties() { return {\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s}from"./p-e765c7d9.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));const a="en";const o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}};const n=(t,i)=>{const s=i;return o[s!==undefined&&s in o?s:a][t]};const h='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}';const r=class{constructor(s){t(this,s);this.hpPageChange=i(this,"hpPageChange",7);this.nextPage="";this.prevPage="";this.offset=0;this.limit=1;this.total=1;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.lastPage=false;this.previousPage=false;this.pagesArray=[];this.endInt=0;this.userAgent=window.navigator.userAgent;this.currentPage=1;this.limitStylingAppends=false;this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=this.limitInt*5;this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=this.limitInt*5;this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt;break}this.previousPage=!this.offsetInt?false:true;this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};this.paginationNavigation=(t,i)=>{this.previousPage=true;if(!isNaN(t)){if(t===1){this.offsetInt=t-1;this.previousPage=false}else{this.offsetInt=(t-1)*this.limitInt}}else{if(i===0&&this.currentPage<=4){this.navigateTo("firstPage")}else if(i===0&&this.currentPage>4){this.navigateTo("fivePagesBack")}else if(i===4&&this.endInt-this.currentPage>=2){this.navigateTo("fivePagesForward")}}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})};this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}componentWillRender(){this.offsetInt=this.offset;this.limitInt=this.limit;this.currentPage=this.offsetInt/this.limitInt+1;this.limitInt=this.limit;this.totalInt=this.total;this.endInt=Math.ceil(this.totalInt/this.limitInt)-1;this.lastPage=this.offsetInt>=this.endInt*this.limitInt?false:true;if(this.currentPage==1||this.currentPage==2){this.pagesArray=Array.from({length:4},((t,i)=>i+1));this.pagesArray.push("...")}else if(this.currentPage>=3&&this.endInt-this.currentPage>=2){this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1));this.pagesArray.push("...");this.pagesArray.unshift("...")}else if(this.endInt-this.currentPage<3){this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i));this.pagesArray.unshift("...")}}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage?true:false,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t))))));let i=s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},n("firstPage",this.language)),s("span",{class:"NavigationIcon"}));let a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},n("previousPage",this.language)),s("span",{class:"NavigationIcon"})));if(e(this.userAgent)){a=s("div",{class:"LeftItems"},s("button",{disabled:this.prevPage?false:true,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},n("previousPage",this.language)),s("span",{class:"NavigationIcon"})))}let o=s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},n("lastPage",this.language)),s("span",{class:"NavigationIcon"}));let h=s("div",{class:"RightItems"},s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},n("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);if(e(this.userAgent)){h=s("div",{class:"RightItems"},s("button",{disabled:this.nextPage?false:true,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},n("nextPage",this.language)),s("span",{class:"NavigationIcon"})))}return s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&h)}};r.style=h;export{r as helper_pagination};
2
- //# sourceMappingURL=p-721345a7.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../helper-pagination/dist/collection/utils/utils.js","../helper-pagination/dist/collection/utils/locale.utils.js","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.css?tag=helper-pagination&encapsulation=shadow","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.js"],"names":["isMobile","userAgent","toLowerCase","match","DEFAULT_LANGUAGE","TRANSLATIONS","en","firstPage","previousPage","nextPage","lastPage","ro","fr","ar","hu","hr","translate","key","customLang","lang","undefined","helperPaginationCss","HelperPagination","[object Object]","hostRef","this","prevPage","offset","limit","total","language","clientStyling","clientStylingUrlContent","pagesArray","endInt","window","navigator","currentPage","limitStylingAppends","navigateTo","navigationPage","offsetInt","limitInt","hpPageChange","emit","totalInt","paginationNavigation","pageNumber","index","isNaN","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","Math","ceil","Array","from","length","_","i","push","unshift","navigationArea","h","class","map","item","disabled","onClick","bind","buttonSecondaryLeftSide","buttonsLeftSide","secondaryArrowsActive","buttonSecondaryRightSide","buttonsRightSide","id","ref","el","arrowsActive","numberedNavActive"],"mappings":"kDASO,MAAMA,EAAYC,MACbA,EAAUC,cAAcC,MAAM,aACtCF,EAAUC,cAAcC,MAAM,mBAC9BF,EAAUC,cAAcC,MAAM,sBAC9BF,EAAUC,cAAcC,MAAM,qDCblC,MAAMC,EAAmB,KACzB,MAAMC,EAAe,CACnBC,GAAI,CACFC,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZC,GAAI,CACFJ,UAAW,QACXC,aAAc,WACdC,SAAU,aACVC,SAAU,UAEZE,GAAI,CACFL,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZG,GAAI,CACFN,UAAW,QACXC,aAAc,WACdC,SAAU,OACVC,SAAU,QAEZI,GAAI,CACFP,UAAW,QACXC,aAAc,WACdC,SAAU,YACVC,SAAU,QAEZK,GAAI,CACFR,UAAW,OACXC,aAAc,YACdC,SAAU,YACVC,SAAU,WAGP,MAAMM,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOb,EAAcc,IAASC,WAAeD,KAAQd,EAAgBc,EAAOf,GAAkBa,ICzChG,MAAMI,EAAsB,w2DCGfC,EAAgB,MAC3BC,YAAAC,wDAIEC,KAAKhB,SAAW,GAIhBgB,KAAKC,SAAW,GAIhBD,KAAKE,OAAS,EAIdF,KAAKG,MAAQ,EAIbH,KAAKI,MAAQ,EAIbJ,KAAKK,S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') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));\n}\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n","const DEFAULT_LANGUAGE = 'en';\nconst TRANSLATIONS = {\n en: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ro: {\n firstPage: 'Prima',\n previousPage: 'Anterior',\n nextPage: 'Urmatoarea',\n lastPage: 'Ultima'\n },\n fr: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ar: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n hu: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Következő',\n lastPage: 'Last'\n },\n hr: {\n firstPage: 'Prva',\n previousPage: 'Prethodna',\n nextPage: 'Slijedeća',\n lastPage: 'Zadnja'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? 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#PaginationContainer {\n width: 100%;\n margin: 20px 0;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.LeftItems button:not(:first-child), .RightItems button:not(:last-child) {\n margin: 0 10px;\n}\n\n.LeftItems button, .RightItems button {\n padding: 0;\n background-color: #009993;\n border-color: #009993;\n}\n\n.PaginationArea {\n display: inline-flex;\n gap: 10px;\n list-style: none;\n}\n\n.PaginationArea li {\n margin: 0;\n padding: 0;\n}\n\n.PaginationArea li button {\n width: 24px;\n height: 24px;\n display: flex;\n border: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n color: #000;\n cursor: pointer;\n pointer-events: all;\n}\n\n.PaginationItem.ActiveItem button {\n background: #009993;\n border-color: #009993;\n color: #fff;\n}\n\n.PaginationItem.ActiveItem button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.PaginationItem button:hover,\n.PaginationItem button:active {\n background: #009993;\n border-color: #009993;\n color: #fff;\n opacity: 0.8;\n}\n\nbutton {\n width: 100px;\n height: 32px;\n border: 1px solid #524e52;\n border-radius: 5px;\n background: #524e52;\n color: #fff;\n font-size: 14px;\n font: inherit;\n cursor: pointer;\n transition: all 0.1s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n\nbutton:hover,\nbutton:active {\n background: #004D4A;\n border-color: #004D4A;\n}\n\nbutton:disabled {\n background-color: #ccc;\n border-color: #ccc;\n color: #fff;\n cursor: not-allowed;\n}\n\n@media screen and (max-width: 720px) {\n button {\n width: 90px;\n font-size: 14px;\n }\n}\n@media screen and (max-width: 480px) {\n button {\n width: 70px;\n font-size: 14px;\n }\n\n .paginationArea {\n padding: 5px;\n }\n}\n@media screen and (max-width: 320px) {\n button {\n width: 58px;\n font-size: 12px;\n }\n\n .paginationArea {\n padding: 5px;\n gap: 5px;\n }\n}\n/* fix for issue on hover/visited for mobile devices */\n@media (hover: none) {\n .paginationItem button:hover {\n background: inherit;\n border-color: inherit;\n color: inherit;\n opacity: 1;\n }\n\n .paginationItem.activeItem button:hover {\n background: #009993;\n border-color: #009993;\n color: #fff;\n }\n}","import { Component, h, Event, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nimport { translate } from '../../utils/locale.utils';\nexport class HelperPagination {\n constructor() {\n /**\n * Next page string value - determines if the next page is disabled or active\n */\n this.nextPage = '';\n /**\n * Previous page string value - determines if the previous page is disabled or active\n */\n this.prevPage = '';\n /**\n * The received offset\n */\n this.offset = 0;\n /**\n * The received limit for the number of pages\n */\n this.limit = 1;\n /**\n * The received total number of pages\n */\n this.total = 1;\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 /**\n * Component working variable for last page\n */\n this.lastPage = false;\n /**\n * Component working variable for prvious page\n */\n this.previousPage = false;\n /**\n * In component working variable for the array of pages\n */\n this.pagesArray = [];\n /**\n * In component working variable for last page\n */\n this.endInt = 0;\n this.userAgent = window.navigator.userAgent;\n this.currentPage = 1;\n this.limitStylingAppends = false;\n /**\n * Navigation logic\n */\n this.navigateTo = (navigationPage) => {\n switch (navigationPage) {\n case 'firstPage':\n this.offsetInt = 0;\n break;\n case 'lastPage':\n this.offsetInt = this.endInt * this.limitInt;\n break;\n case 'previousPage':\n this.offsetInt -= this.limitInt;\n break;\n case 'nextPage':\n this.offsetInt += this.limitInt;\n break;\n case 'fivePagesBack':\n this.offsetInt -= this.limitInt * 5;\n this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;\n break;\n case 'fivePagesForward':\n this.offsetInt += this.limitInt * 5;\n this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;\n break;\n }\n this.previousPage = !this.offsetInt ? false : true;\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n /**\n * Handle navigation from here\n */\n this.paginationNavigation = (pageNumber, index) => {\n this.previousPage = true;\n if (!isNaN(pageNumber)) {\n if (pageNumber === 1) {\n this.offsetInt = pageNumber - 1;\n this.previousPage = false;\n }\n else {\n this.offsetInt = (pageNumber - 1) * this.limitInt;\n }\n }\n else {\n if (index === 0 && this.currentPage <= 4) {\n this.navigateTo('firstPage');\n }\n else if (index === 0 && this.currentPage > 4) {\n this.navigateTo('fivePagesBack');\n }\n else if (index === 4 && this.endInt - this.currentPage >= 2) {\n this.navigateTo('fivePagesForward');\n }\n }\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\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 componentWillRender() {\n this.offsetInt = this.offset;\n this.limitInt = this.limit;\n this.currentPage = (this.offsetInt / this.limitInt) + 1;\n this.limitInt = this.limit;\n this.totalInt = this.total;\n this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);\n this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;\n /**\n * Construct numbered navigation area based on current page position\n */\n if (this.currentPage == 1 || this.currentPage == 2) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);\n this.pagesArray.push('...');\n }\n else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {\n this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);\n this.pagesArray.push('...');\n this.pagesArray.unshift('...');\n }\n else if ((this.endInt - this.currentPage) < 3) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);\n this.pagesArray.unshift('...');\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 /**\n * Center navigation area\n */\n let navigationArea = h(\"ul\", { class: \"PaginationArea\" }, this.pagesArray.map((item, index) => {\n return (h(\"li\", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },\n h(\"button\", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },\n h(\"span\", null, item))));\n }));\n /**\n * Left navigation area\n */\n let buttonSecondaryLeftSide = h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('firstPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsLeftSide = h(\"div\", { class: \"LeftItems\" },\n this.secondaryArrowsActive && buttonSecondaryLeftSide,\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n if (isMobile(this.userAgent)) {\n buttonsLeftSide =\n h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('previousPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n /**\n * Right navigation area\n */\n let buttonSecondaryRightSide = h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('lastPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" }));\n let buttonsRightSide = h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })),\n this.secondaryArrowsActive && buttonSecondaryRightSide);\n if (isMobile(this.userAgent)) {\n buttonsRightSide =\n h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },\n h(\"span\", { class: \"NavigationButton\" }, translate('nextPage', this.language)),\n h(\"span\", { class: \"NavigationIcon\" })));\n }\n return (h(\"div\", { id: \"PaginationContainer\", ref: el => this.stylingContainer = el },\n this.arrowsActive && buttonsLeftSide,\n this.numberedNavActive && navigationArea,\n this.arrowsActive && buttonsRightSide));\n }\n static get is() { return \"helper-pagination\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-pagination.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-pagination.css\"]\n }; }\n static get properties() { return {\n \"nextPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Next page string value - determines if the next page is disabled or active\"\n },\n \"attribute\": \"next-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"prevPage\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Previous page string value - determines if the previous page is disabled or active\"\n },\n \"attribute\": \"prev-page\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"offset\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received offset\"\n },\n \"attribute\": \"offset\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"limit\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received limit for the number of pages\"\n },\n \"attribute\": \"limit\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"total\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received total number of pages\"\n },\n \"attribute\": \"total\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": true,\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\": true,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n },\n \"arrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination arrows\"\n },\n \"attribute\": \"arrows-active\",\n \"reflect\": true\n },\n \"secondaryArrowsActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination secondary arrows\"\n },\n \"attribute\": \"secondary-arrows-active\",\n \"reflect\": true\n },\n \"numberedNavActive\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Customize pagination: Activate pagination numbered navigation\"\n },\n \"attribute\": \"numbered-nav-active\",\n \"reflect\": true\n }\n }; }\n static get states() { return {\n \"offsetInt\": {},\n \"lastPage\": {},\n \"previousPage\": {},\n \"limitInt\": {},\n \"totalInt\": {},\n \"pagesArray\": {},\n \"endInt\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"hpPageChange\",\n \"name\": \"hpPageChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Event that handles the navigation, updating the offset, limit and total values\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,h as e}from"./p-e765c7d9.js";const i=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const s=class{constructor(e){t(this,e);this.selectedIndex=0;this.clientStyling="";this.clientStylingUrlContent="";this.tabContent="";this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}connectedCallback(){}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){this.tabContent=e("div",{class:"TabContent",ref:t=>this.stylingContainer=t},"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.");if(this.selectedIndex+1==2){this.tabContent=e("div",{class:"TabContent",ref:t=>this.stylingContainer=t},e("ol",null,e("li",null,"Register or Login"),e("li",null,"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),e("li",null,"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!")))}else if(this.selectedIndex+1==3){this.tabContent=e("div",{class:"TabContent",ref:t=>this.stylingContainer=t},e("ul",null,e("li",null,"What are my odds of winning?"),e("li",null,"How can I find out if I’ve won a draw game?"),e("li",null,"How do I claim my prize?")))}return this.tabContent}};s.style=i;export{s as helper_tab};
2
- //# sourceMappingURL=p-76c280ec.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../helper-tabs/dist/collection/components/helper-tab/helper-tab.css?tag=helper-tab&encapsulation=shadow","../helper-tabs/dist/collection/components/helper-tab/helper-tab.js"],"names":["helperTabCss","HelperTab","[object Object]","hostRef","this","selectedIndex","clientStyling","clientStylingUrlContent","tabContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","h","class","ref","el"],"mappings":"2CAAA,MAAMA,EAAe,sFCCRC,EAAS,MACpBC,YAAAC,aAIEC,KAAKC,cAAgB,EAIrBD,KAAKE,cAAgB,GAIrBF,KAAKG,wBAA0B,GAC/BH,KAAKI,WAAa,GAClBJ,KAAKK,oBAAsB,MAC3BL,KAAKM,iBAAmB,KACtB,IAAIC,EAAQC,SAASC,cAAc,SACnCF,EAAMG,UAAYV,KAAKE,cACvBF,KAAKW,iBAAiBC,QAAQL,IAEhCP,KAAKa,oBAAsB,KACzB,IAAIC,EAAUN,SAASC,cAAc,SACrCM,YAAW,KACTD,EAAQJ,UAAYV,KAAKG,wBACzBH,KAAKW,iBAAiBC,QAAQE,KAC7B,IAGPhB,qBAKAA,qBAEE,IAAKE,KAAKK,qBAAuBL,KAAKW,iBAAkB,CACtD,GAAIX,KAAKE,cACPF,KAAKM,mBACP,GAAIN,KAAKG,wBACPH,KAAKa,sBACPb,KAAKK,oBAAsB,MAI/BP,SACEE,KAAKI,WAAaY,EAAE,MAAO,CAAEC,MAAO,aAAcC,IAAKC,GAAMnB,KAAKW,iBAAmBQ,GAAM,qPAC3F,GAAInB,KAAKC,cAAgB,GAAK,EAAG,CAC/BD,KAAKI,WAAaY,EAAE,MAAO,CAAEC,MAAO,aAAcC,IAAKC,GAAMnB,KAAKW,iBAAmBQ,GACnFH,EAAE,KAAM,KACNA,EAAE,KAAM,KAAM,qBACdA,EAAE,KAAM,KAAM,4IACdA,EAAE,KAAM,KAAM,4LAEf,GAAIhB,KAAKC,cAAgB,GAAK,EAAG,CACpCD,KAAKI,WAAaY,EAAE,MAAO,CAAEC,MAAO,aAAcC,IAAKC,GAAMnB,KAAKW,iBAAmBQ,GACnFH,EAAE,KAAM,KACNA,EAAE,KAAM,KAAM,gCACdA,EAAE,KAAM,KAAM,+CACdA,EAAE,KAAM,KAAM,8BAEpB,OAAQhB,KAAe","sourcesContent":[":host {\n display: block;\n}\n\n.TabContent {\n font-size: 14px;\n color: #000;\n font-weight: normal;\n}","import { Component, h, Prop, State } from '@stencil/core';\nexport class HelperTab {\n constructor() {\n /**\n * Selected index\n */\n this.selectedIndex = 0;\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.tabContent = '';\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 connectedCallback() {\n /**\n * fetch(cmsEndpoint + / + / + selectedIndex)\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 this.tabContent = h(\"div\", { class: \"TabContent\", ref: el => this.stylingContainer = el }, \"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account.\");\n if (this.selectedIndex + 1 == 2) {\n this.tabContent = h(\"div\", { class: \"TabContent\", ref: el => this.stylingContainer = el },\n h(\"ol\", null,\n h(\"li\", null, \"Register or Login\"),\n h(\"li\", null, \"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \\u201CI feel lucky\\u201D.\"),\n h(\"li\", null, \"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!\")));\n }\n else if (this.selectedIndex + 1 == 3) {\n this.tabContent = h(\"div\", { class: \"TabContent\", ref: el => this.stylingContainer = el },\n h(\"ul\", null,\n h(\"li\", null, \"What are my odds of winning?\"),\n h(\"li\", null, \"How can I find out if I\\u2019ve won a draw game?\"),\n h(\"li\", null, \"How do I claim my prize?\")));\n }\n return (this.tabContent);\n }\n static get is() { return \"helper-tab\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-tab.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-tab.css\"]\n }; }\n static get properties() { return {\n \"selectedIndex\": {\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\": \"Selected index\"\n },\n \"attribute\": \"selected-index\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"cmsEndpoint\": {\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\": \"Endpoing for CMS\"\n },\n \"attribute\": \"cms-endpoint\",\n \"reflect\": true\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\": true,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"tabContent\": {},\n \"limitStylingAppends\": {}\n }; }\n}\n"]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-e765c7d9.js";const o="en";const n=["ro","en","fr","ar","hr"];const s={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}};const r=(t,e)=>{const i=e;return s[i!==undefined&&n.includes(i)?i:o][t]};const l=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:#7ac317}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}';const a=class{constructor(i){t(this,i);this.deleteTicketEvent=e(this,"deleteTicket",7);this.endpoint="";this.ticketId=1;this.postMessage=false;this.eventName="deleteTicketAction";this.collapsed=true;this.numberOfGrids=1;this.last=false;this.language="en";this.autoPick=false;this.resetButton=false;this.totalControllers=1;this.clientStyling="";this.clientStylingUrlContent="";this.limitStylingAppends=false;this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling;this.stylingContainer.prepend(t)};this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent;this.stylingContainer.prepend(t)}),1)}}helperAccordionActionHandler(){if(this.postMessage){window.postMessage({type:this.eventName},window.location.href)}this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){console.log("ticket id:",this.ticketId);return i("div",{class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{"header-title":`${r("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:true,"delete-tab":this.totalControllers!==1,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{slot:"accordionContent"},i("lottery-ticket",{endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};a.style=l;export{a as lottery_ticket_controller};
2
- //# sourceMappingURL=p-cd4aa6a4.entry.js.map