@everymatrix/lottery-game-page 0.1.26 → 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-accordion.cjs.entry.js +10 -2
- package/dist/cjs/helper-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-filters_2.cjs.entry.js +1716 -1002
- package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-modal.cjs.entry.js +2 -0
- package/dist/cjs/helper-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-pagination.cjs.entry.js +14 -0
- package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-tab.cjs.entry.js +2 -0
- package/dist/cjs/helper-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/helper-tabs.cjs.entry.js +2 -0
- package/dist/cjs/helper-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/index-cd44e726.js +2 -0
- package/dist/cjs/index-cd44e726.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -1
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +13 -2
- package/dist/cjs/lottery-bullet_2.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +45 -16
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js +2 -0
- package/dist/cjs/lottery-game-details.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-page.cjs.entry.js +33 -27
- package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-game-page.cjs.js +3 -1
- package/dist/cjs/lottery-game-page.cjs.js.map +1 -0
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +15 -2
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js.map +1 -0
- package/dist/cjs/lottery-ticket.cjs.entry.js +29 -7
- package/dist/cjs/lottery-ticket.cjs.entry.js.map +1 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +10 -1
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +83 -32
- package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/locale.utils.js +1 -0
- package/dist/collection/utils/locale.utils.js.map +1 -0
- package/dist/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/helper-accordion.js +2 -0
- package/dist/components/helper-accordion.js.map +1 -0
- package/dist/components/helper-accordion2.js +10 -2
- package/dist/components/helper-accordion2.js.map +1 -0
- package/dist/components/helper-filters.js +2 -0
- package/dist/components/helper-filters.js.map +1 -0
- package/dist/components/helper-filters2.js +1696 -974
- package/dist/components/helper-filters2.js.map +1 -0
- package/dist/components/helper-modal.js +2 -0
- package/dist/components/helper-modal.js.map +1 -0
- package/dist/components/helper-modal2.js +2 -0
- package/dist/components/helper-modal2.js.map +1 -0
- package/dist/components/helper-pagination.js +14 -0
- package/dist/components/helper-pagination.js.map +1 -0
- package/dist/components/helper-tab.js +2 -0
- package/dist/components/helper-tab.js.map +1 -0
- package/dist/components/helper-tab2.js +2 -0
- package/dist/components/helper-tab2.js.map +1 -0
- package/dist/components/helper-tabs.js +2 -0
- package/dist/components/helper-tabs.js.map +1 -0
- package/dist/components/helper-tabs2.js +2 -0
- package/dist/components/helper-tabs2.js.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/lottery-bullet.js +2 -0
- package/dist/components/lottery-bullet.js.map +1 -0
- package/dist/components/lottery-bullet2.js +2 -0
- package/dist/components/lottery-bullet2.js.map +1 -0
- package/dist/components/lottery-draw-results-history.js +2 -0
- package/dist/components/lottery-draw-results-history.js.map +1 -0
- package/dist/components/lottery-draw-results-history2.js +46 -17
- package/dist/components/lottery-draw-results-history2.js.map +1 -0
- package/dist/components/lottery-draw-results.js +2 -0
- package/dist/components/lottery-draw-results.js.map +1 -0
- package/dist/components/lottery-draw-results2.js +95 -101
- package/dist/components/lottery-draw-results2.js.map +1 -0
- package/dist/components/lottery-game-details.js +2 -0
- package/dist/components/lottery-game-details.js.map +1 -0
- package/dist/components/lottery-game-details2.js +2 -0
- package/dist/components/lottery-game-details2.js.map +1 -0
- package/dist/components/lottery-game-page.js +35 -28
- package/dist/components/lottery-game-page.js.map +1 -0
- package/dist/components/lottery-grid.js +2 -0
- package/dist/components/lottery-grid.js.map +1 -0
- package/dist/components/lottery-grid2.js +13 -2
- package/dist/components/lottery-grid2.js.map +1 -0
- package/dist/components/lottery-ticket-controller.js +2 -0
- package/dist/components/lottery-ticket-controller.js.map +1 -0
- package/dist/components/lottery-ticket-controller2.js +30 -16
- package/dist/components/lottery-ticket-controller2.js.map +1 -0
- package/dist/components/lottery-ticket.js +2 -0
- package/dist/components/lottery-ticket.js.map +1 -0
- package/dist/components/lottery-ticket2.js +29 -7
- package/dist/components/lottery-ticket2.js.map +1 -0
- package/dist/esm/helper-accordion.entry.js +10 -2
- package/dist/esm/helper-accordion.entry.js.map +1 -0
- package/dist/esm/helper-filters_2.entry.js +1716 -1002
- package/dist/esm/helper-filters_2.entry.js.map +1 -0
- package/dist/esm/helper-modal.entry.js +2 -0
- package/dist/esm/helper-modal.entry.js.map +1 -0
- package/dist/esm/helper-pagination.entry.js +14 -0
- package/dist/esm/helper-pagination.entry.js.map +1 -0
- package/dist/esm/helper-tab.entry.js +2 -0
- package/dist/esm/helper-tab.entry.js.map +1 -0
- package/dist/esm/helper-tabs.entry.js +2 -0
- package/dist/esm/helper-tabs.entry.js.map +1 -0
- package/dist/esm/index-d1baacd4.js +2 -0
- package/dist/esm/index-d1baacd4.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +3 -1
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/lottery-bullet_2.entry.js +13 -2
- package/dist/esm/lottery-bullet_2.entry.js.map +1 -0
- package/dist/esm/lottery-draw-results-history.entry.js +45 -16
- package/dist/esm/lottery-draw-results-history.entry.js.map +1 -0
- package/dist/esm/lottery-game-details.entry.js +2 -0
- package/dist/esm/lottery-game-details.entry.js.map +1 -0
- package/dist/esm/lottery-game-page.entry.js +34 -28
- package/dist/esm/lottery-game-page.entry.js.map +1 -0
- package/dist/esm/lottery-game-page.js +3 -1
- package/dist/esm/lottery-game-page.js.map +1 -0
- package/dist/esm/lottery-ticket-controller.entry.js +15 -2
- package/dist/esm/lottery-ticket-controller.entry.js.map +1 -0
- package/dist/esm/lottery-ticket.entry.js +29 -7
- package/dist/esm/lottery-ticket.entry.js.map +1 -0
- package/dist/lottery-game-page/index.esm.js +2 -0
- package/dist/lottery-game-page/index.esm.js.map +1 -0
- package/dist/lottery-game-page/lottery-game-page.esm.js +2 -1
- package/dist/lottery-game-page/lottery-game-page.esm.js.map +1 -0
- package/dist/lottery-game-page/p-042065c6.entry.js +2 -0
- package/dist/lottery-game-page/p-042065c6.entry.js.map +1 -0
- package/dist/lottery-game-page/p-15309f9a.entry.js +2 -0
- package/dist/lottery-game-page/p-15309f9a.entry.js.map +1 -0
- package/dist/lottery-game-page/p-167c9dbe.entry.js +2 -0
- package/dist/lottery-game-page/p-167c9dbe.entry.js.map +1 -0
- package/dist/lottery-game-page/p-2e78ed7b.entry.js +2 -0
- package/dist/lottery-game-page/p-2e78ed7b.entry.js.map +1 -0
- package/dist/lottery-game-page/p-5b49ab69.entry.js +2 -0
- package/dist/lottery-game-page/p-5b49ab69.entry.js.map +1 -0
- package/dist/lottery-game-page/p-606c0b0f.entry.js +2 -0
- package/dist/lottery-game-page/p-606c0b0f.entry.js.map +1 -0
- package/dist/lottery-game-page/p-662d9dac.entry.js +2 -0
- package/dist/lottery-game-page/p-662d9dac.entry.js.map +1 -0
- package/dist/lottery-game-page/p-66729e9c.entry.js +2 -0
- package/dist/lottery-game-page/p-66729e9c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-76c280ec.entry.js +2 -0
- package/dist/lottery-game-page/p-76c280ec.entry.js.map +1 -0
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js +2 -0
- package/dist/lottery-game-page/p-a9ef5b8c.entry.js.map +1 -0
- package/dist/lottery-game-page/p-aa68559a.entry.js +2 -0
- package/dist/lottery-game-page/p-aa68559a.entry.js.map +1 -0
- package/dist/lottery-game-page/p-d9e7b5da.entry.js +2899 -0
- package/dist/lottery-game-page/p-d9e7b5da.entry.js.map +1 -0
- package/dist/lottery-game-page/p-e765c7d9.js +2 -1
- package/dist/lottery-game-page/p-e765c7d9.js.map +1 -0
- package/dist/stencil.config.js +10 -1
- package/dist/stencil.config.js.map +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +10 -1
- package/dist/types/components.d.ts +12 -2
- package/package.json +1 -1
- package/dist/components/assets/chrono_desktop.png +0 -0
- package/dist/components/assets/chrono_lottery_mobile.png +0 -0
- package/dist/lottery-game-page/p-023325a2.entry.js +0 -1
- package/dist/lottery-game-page/p-04fbc8fd.entry.js +0 -1
- package/dist/lottery-game-page/p-256b151c.entry.js +0 -1
- package/dist/lottery-game-page/p-381b5507.entry.js +0 -1
- package/dist/lottery-game-page/p-3f8b6ad9.entry.js +0 -1
- package/dist/lottery-game-page/p-4274053c.entry.js +0 -1
- package/dist/lottery-game-page/p-4f81cd37.entry.js +0 -1
- package/dist/lottery-game-page/p-5c389034.entry.js +0 -1
- package/dist/lottery-game-page/p-7d06371e.entry.js +0 -1
- package/dist/lottery-game-page/p-ca8430a0.entry.js +0 -2849
- package/dist/lottery-game-page/p-d6f76e8d.entry.js +0 -1
- package/dist/lottery-game-page/p-f6fcc22c.entry.js +0 -1
- package/dist/lottery-game-page/static/chrono_desktop.png +0 -0
- package/dist/lottery-game-page/static/chrono_lottery_mobile.png +0 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
- /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_desktop.png +0 -0
- /package/dist/{collection/components/lottery-game-page/static → assets}/chrono_lottery_mobile.png +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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","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,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FmE,EAAE,MAAO,CAAEC,MAAO,cAAgBhC,EAAKI,OAAOF,OAAS,EACpD6B,EAAE,MAAO,CAAE6B,eAAgB,kBAAmB5B,MAAOxE,KAAKU,eAAiB,6BAA+B,iBACzG6D,EAAE,MAAO,CAAE6B,eAAgB,kBAAmB5B,MAAO,eAAgBI,QAAS,IAAM5E,KAAKqG,eACvF9B,EAAE,OAAQ,CAAE6B,eAAgB,mBAC1BpG,KAAKW,WAAWyD,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'];\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};\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\": false\n },\n \"gameId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Game ID\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false\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\": false,\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\": false,\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\": false\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\": false,\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\": false,\n \"defaultValue\": \"false\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\": false\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\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,KAAKQ,YAAYC,KAAK,CACpBR,MAAOD,KAAKC,MACZS,SAAUV,KAAKG,eAIrBH,KAAKW,iBAAmB,KACtB,IAAIC,EAAQC,SAASC,cAAc,SACnCF,EAAMG,UAAYf,KAAKI,cACvBJ,KAAKgB,iBAAiBC,QAAQL,IAEhCZ,KAAKkB,oBAAsB,KACzB,IAAIC,EAAUN,SAASC,cAAc,SACr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LE,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\": false,\n \"defaultValue\": \"'0'\"\n },\n \"selectable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Marks if the bullet should be selectable\"\n },\n \"attribute\": \"selectable\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"isSelected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Marks if the bullet should be selected\"\n },\n \"attribute\": \"is-selected\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"bulletEvent\",\n \"name\": \"lotteryBulletSelection\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When a bullet is selected/deselected this event is emmited\"\n },\n \"complexType\": {\n \"original\": \"BulletEvent\",\n \"resolved\": \"BulletEvent\",\n \"references\": {\n \"BulletEvent\": {\n \"location\": \"import\",\n \"path\": \"./lottery-bullet.types\"\n }\n }\n }\n }]; }\n}\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.GridContainer {\n display: flex;\n flex-direction: column;\n max-width: 1200px;\n}\n\n.Grid {\n margin-top: 10px 0 10px 0;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 20px;\n}\n.Grid.TicketGrid {\n gap: 5px;\n}","import { Component, h, Prop, Listen, State, Event } from '@stencil/core';\n// import { translate } from '../../utils/locale.utils';\nimport '@everymatrix/lottery-bullet';\nexport class LotteryGrid {\n constructor() {\n /**\n * Number of bullets of grid\n */\n this.totalNumbers = 0;\n /**\n * Number of maximum bullets that can be selected\n */\n this.maximumAllowed = 0;\n /**\n * Minimum allowed of bullets\n */\n this.minimumAllowed = 1;\n /**\n * Allows the user to select numbers on the grid\n */\n this.selectable = true;\n /**\n * Numbers that should be showed as selected on the grid (as a string of those numbers e.g. '1,2,3,4,5,6')\n */\n this.selectedNumbers = '';\n /**\n * Show only selected numbers\n */\n this.displaySelected = false;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Personalize grid for ticket\n */\n this.gridType = '';\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.numbers = [];\n this.limitStylingAppends = false;\n this.selectedCounter = 0;\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n connectedCallback() {\n let selected = [];\n if (this.selectedNumbers.length > 0) {\n selected = this.selectedNumbers.split(',');\n this.selectedCounter = selected.length;\n }\n if (this.displaySelected) {\n selected.forEach((item) => {\n this.numbers.push({\n number: item,\n selected: true,\n selectable: this.selectable\n });\n });\n }\n else {\n [...Array(this.totalNumbers).keys()]\n .map(number => (number + 1).toString())\n .forEach((number) => {\n this.numbers.push({\n number,\n selected: selected.indexOf(number) >= 0 ? true : false,\n selectable: this.selectedCounter == this.maximumAllowed ? false : this.selectable\n });\n });\n }\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n // wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices\n shuffleArray(array) {\n const result = [];\n while (array.length > 0) {\n const randomIndex = Math.floor(Math.random() * (array.length));\n result.push(array.splice(randomIndex, 1)[0]);\n }\n return result;\n }\n lotteryBulletSelectionHandler(event) {\n this.numbers = this.numbers.map((item) => {\n if (item.number == event.detail.value) {\n return {\n number: item.number,\n selected: event.detail.selected,\n selectable: item.selectable\n };\n }\n return {\n number: item.number,\n selected: item.selected,\n selectable: item.selectable\n };\n });\n if (event.detail.selected) {\n this.selectedCounter += 1;\n if (this.selectedCounter == this.maximumAllowed) {\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: item.selected,\n selectable: item.selected ? true : false\n };\n });\n this.gridFilledEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n }\n }\n else {\n if (this.selectedCounter == this.maximumAllowed) {\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: item.selected,\n selectable: true\n };\n });\n this.gridDirtyEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n }\n this.selectedCounter -= 1;\n }\n }\n async resetSelectionHandler(event) {\n if (event.detail && event.detail == this.ticketId) {\n this.selectedCounter = 0;\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: false,\n selectable: this.selectable\n };\n });\n this.gridDirtyEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n }\n }\n async autoSelectionHandler(event) {\n if (event.detail && event.detail == this.ticketId) {\n this.resetSelectionHandler(event);\n let array = [...Array(this.totalNumbers).keys()]\n .map(number => number + 1);\n array = this.shuffleArray(array);\n array = array.slice(0, this.minimumAllowed);\n this.numbers = this.numbers.map((item) => {\n return {\n number: item.number,\n selected: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,\n selectable: array.indexOf(parseInt(item.number, 10)) >= 0 ? true : false,\n };\n });\n this.gridFilledEvent.emit({\n id: this.ticketId,\n index: this.gridIndex,\n selectedNumbers: this.numbers.filter((item) => item.selected).map((item) => item.number)\n });\n this.selectedCounter = this.maximumAllowed;\n }\n }\n render() {\n return (h(\"div\", { class: \"GridContainer\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: this.gridType === 'ticket' ? 'Grid TicketGrid' : 'Grid' }, this.numbers.map((item) => h(\"div\", null,\n h(\"lottery-bullet\", { value: item.number, selectable: item.selectable, \"is-selected\": item.selected, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent }))))));\n }\n static get is() { return \"lottery-grid\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-grid.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-grid.css\"]\n }; }\n static get properties() { return {\n \"ticketId\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Identifier for the ticket\"\n },\n \"attribute\": \"ticket-id\",\n \"reflect\": false\n },\n \"totalNumbers\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Number of bullets of grid\"\n },\n \"attribute\": \"total-numbers\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"gameId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Game ID\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false\n },\n \"maximumAllowed\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Number of maximum bullets that can be selected\"\n },\n \"attribute\": \"maximum-allowed\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"minimumAllowed\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Minimum allowed of bullets\"\n },\n \"attribute\": \"minimum-allowed\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\n },\n \"selectable\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Allows the user to select numbers on the grid\"\n },\n \"attribute\": \"selectable\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"selectedNumbers\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Numbers that should be showed as selected on the grid (as a string of those numbers e.g. '1,2,3,4,5,6')\"\n },\n \"attribute\": \"selected-numbers\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"displaySelected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Show only selected numbers\"\n },\n \"attribute\": \"display-selected\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n },\n \"gridIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The index of the number\"\n },\n \"attribute\": \"grid-index\",\n \"reflect\": false\n },\n \"gridType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Personalize grid for ticket\"\n },\n \"attribute\": \"grid-type\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"numbers\": {},\n \"limitStylingAppends\": {}\n }; }\n static get events() { return [{\n \"method\": \"gridFilledEvent\",\n \"name\": \"gridFilled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When the grid is completed, it emits this event with selected numbers\"\n },\n \"complexType\": {\n \"original\": \"GridEvent\",\n \"resolved\": \"GridEvent\",\n \"references\": {\n \"GridEvent\": {\n \"location\": \"import\",\n \"path\": \"./lottery-grid.types\"\n }\n }\n }\n }, {\n \"method\": \"gridDirtyEvent\",\n \"name\": \"gridDirty\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"When the grid is uncomplete after being completed once (reset or change), it emits this event\"\n },\n \"complexType\": {\n \"original\": \"GridEvent\",\n \"resolved\": \"GridEvent\",\n \"references\": {\n \"GridEvent\": {\n \"location\": \"import\",\n \"path\": \"./lottery-grid.types\"\n }\n }\n }\n }]; }\n static get listeners() { return [{\n \"name\": \"lotteryBulletSelection\",\n \"method\": \"lotteryBulletSelectionHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"resetSelection\",\n \"method\": \"resetSelectionHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"autoSelection\",\n \"method\": \"autoSelectionHandler\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-e765c7d9.js";const s="en";const h=["ro","en","fr","ar"];const n={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"}};const o=(t,i)=>{const e=i;return n[e!==undefined&&h.includes(e)?e:s][t]};const c=":host{display:block}";const l=class{constructor(e){t(this,e);this.deleteTicketEvent=i(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 e("div",{class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},e("helper-accordion",{"header-title":`${o("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},e("div",{slot:"accordionContent"},e("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}))))}};l.style=c;export{l as lottery_ticket_controller};
|
|
2
|
+
//# sourceMappingURL=p-2e78ed7b.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../lottery-ticket-controller/dist/collection/utils/locale.utils.js","../lottery-ticket-controller/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.css?tag=lottery-ticket-controller&encapsulation=shadow","../lottery-ticket-controller/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.js"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","ticket","ro","fr","ar","translate","key","customLang","lang","undefined","includes","lotteryTicketControllerCss","LotteryTicketController","[object Object]","hostRef","this","endpoint","ticketId","postMessage","eventName","collapsed","numberOfGrids","last","language","autoPick","resetButton","totalControllers","clientStyling","clientStylingUrlContent","limitStylingAppends","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","window","type","location","href","deleteTicketEvent","emit","console","log","h","class","ref","el","header-title","header-subtitle","ticketDescription","footer","delete-tab","client-styling","client-styling-url-content","slot","game-id","gameId","ticket-id","number-of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P,GAAIf,KAAKa,wBACPb,KAAKsB,sBACPtB,KAAKc,oBAAsB,MAI/BhB,SACEiC,QAAQC,IAAI,aAAchC,KAAKE,UAC/B,OAAQ+B,EAAE,MAAO,CAAEC,MAAO,mCAAoCC,IAAKC,GAAMpC,KAAKoB,iBAAmBgB,GAC/FH,EAAE,mBAAoB,CAAEI,eAAgB,GAAG/C,EAAU,SAAUU,KAAKQ,aAAaR,KAAKE,WAAYoC,kBAAmBtC,KAAKuC,kBAAmBC,OAAQ,KAAMC,aAAczC,KAAKW,mBAAqB,EAAGN,WAAYL,KAAKO,MAAQP,KAAKK,UAAWG,SAAUR,KAAKQ,SAAUkC,iBAAkB1C,KAAKY,cAAe+B,6BAA8B3C,KAAKa,yBAC/UoB,EAAE,MAAO,CAAEW,KAAM,oBACfX,EAAE,iBAAkB,CAAEhC,SAAUD,KAAKC,SAAU4C,UAAW7C,KAAK8C,OAAQC,YAAa/C,KAAKE,SAAU8C,kBAAmBhD,KAAKM,cAAeE,SAAUR,KAAKQ,SAAUyC,eAAgBjD,KAAKU,YAAawC,YAAalD,KAAKS,SAAUiC,iBAAkB1C,KAAKY,cAAe+B,6BAA8B3C,KAAKa","sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar'];\nconst TRANSLATIONS = {\n en: {\n ticket: 'Ticket',\n },\n ro: {\n ticket: 'Bilet',\n },\n fr: {\n ticket: 'Billet'\n },\n ar: {\n ticket: 'تذكرة',\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",":host {\n display: block;\n}","import { Component, h, Listen, Prop, Event, State } from '@stencil/core';\nimport '@everymatrix/helper-accordion';\nimport '@everymatrix/lottery-ticket';\nimport { translate } from '../../utils/locale.utils';\nexport class LotteryTicketController {\n constructor() {\n /**\n * Endpoint URL for the source of data (NorWAy standard)\n */\n this.endpoint = '';\n /**\n * Ticket number\n */\n this.ticketId = 1;\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 = 'deleteTicketAction';\n /**\n * Collapsed\n */\n this.collapsed = true;\n /**\n * Number of grids?\n */\n this.numberOfGrids = 1;\n /**\n * This toggles if the last ticket added should be expanded or not\n */\n this.last = false;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * Shows the auto-pick button\n */\n this.autoPick = false;\n /**\n * Shows the reset button\n */\n this.resetButton = false;\n /**\n * Number of ticket controllers\n */\n this.totalControllers = 1;\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 helperAccordionActionHandler() {\n if (this.postMessage) {\n window.postMessage({ type: this.eventName }, window.location.href);\n }\n this.deleteTicketEvent.emit({\n ticketId: this.ticketId\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 console.log('ticket id:', this.ticketId);\n return (h(\"div\", { class: \"LotteryTicketControllerContainer\", ref: el => this.stylingContainer = el },\n h(\"helper-accordion\", { \"header-title\": `${translate('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 },\n h(\"div\", { slot: \"accordionContent\" },\n h(\"lottery-ticket\", { endpoint: this.endpoint, \"game-id\": this.gameId, \"ticket-id\": this.ticketId, \"number-of-grids\": this.numberOfGrids, language: this.language, \"reset-button\": this.resetButton, \"auto-pick\": this.autoPick, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent })))));\n }\n static get is() { return \"lottery-ticket-controller\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-ticket-controller.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-ticket-controller.css\"]\n }; }\n static get properties() { return {\n \"endpoint\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Endpoint URL for the source of data (NorWAy standard)\"\n },\n \"attribute\": \"endpoint\",\n \"reflect\": true,\n \"defaultValue\": \"''\"\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 number\"\n },\n \"attribute\": \"ticket-id\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"ticketDescription\": {\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\": \"Ticket header description\"\n },\n \"attribute\": \"ticket-description\",\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\": \"ID of the lottery game\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": true\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\": \"'deleteTicketAction'\"\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 \"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?\"\n },\n \"attribute\": \"number-of-grids\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"last\": {\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\": \"This toggles if the last ticket added should be expanded or not\"\n },\n \"attribute\": \"last\",\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 \"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 \"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 \"totalControllers\": {\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 ticket controllers\"\n },\n \"attribute\": \"total-controllers\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\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\": \"deleteTicketEvent\",\n \"name\": \"deleteTicket\",\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 listeners() { return [{\n \"name\": \"helperAccordionAction\",\n \"method\": \"helperAccordionActionHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-e765c7d9.js";const s="en";const o=["ro","en"];const r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"}};const n=(t,e)=>{const i=e;return r[i!==undefined&&o.includes(i)?i:s][t]};const a='@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 c=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()},n("deleteTicket",this.language))))))}};c.style=a;export{c as helper_accordion};
|
|
2
|
+
//# sourceMappingURL=p-5b49ab69.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","SUPPORTED_LANGUAGES","TRANSLATIONS","en","deleteTicket","ro","fr","ar","translate","key","customLang","lang","undefined","includes","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,EAAsB,CAAC,KAAM,MACnC,MAAMC,EAAe,CACnBC,GAAI,CACFC,aAAc,iBAEhBC,GAAI,CACFD,aAAc,kBAEhBE,GAAI,CACFF,aAAc,uBAEhBG,GAAI,CACFH,aAAc,gBAGX,MAAMI,EAAY,CAACC,EAAKC,KAC7B,MAAMC,EAAOD,EACb,OAAOR,EAAaS,IAASC,WAAaX,EAAoBY,SAASF,GAAQA,EAAOX,GAAkBS,IClB1G,MAAMK,EAAqB,0hDCEdC,EAAS,MACpBC,YAAAC,mEAIEC,KAAKC,kBAAoB,MAIzBD,KAAKE,YAAc,GAInBF,KAAKG,eAAiB,GAItBH,KAAKI,YAAc,GAInBJ,KAAKK,OAAS,MAId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AAO,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,gBAAkBhD,EAAU,eAAgBU,KAAKU","sourcesContent":["const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', '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};\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.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\": false,\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\": false,\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\": false,\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\": false,\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\": false,\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\": false,\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\": false,\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\": false,\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\": false,\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\": false,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-e765c7d9.js";const s="en";const i=["ro","en","fr","ar"];const r={en:{drawResultsHeader:"Draw results history",drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridA:"Draw numbers Grid A",viewAllResults:"View All",lastFiveDraws:"Last 5 Draws",lastTenDraws:"Last 10 Draws",lastFifteenDraws:"Last 15 Draws",allDrawResultsHistory:"All Draw Results History",noResults:"No results",fetchingResults:"Fetching results"},ro:{drawResultsHeader:"Istoricul extragerilor",drawId:"ID-ul extragerii",drawDate:"Data extragerii",drawNumbersGridA:"Numerele extrase Grid A",viewAllResults:"Vezi toate rezultatele",lastFiveDraws:"Ultimile 5 extrageri",lastTenDraws:"Ultimile 10 extrageri",lastFifteenDraws:"Ultimile 15 extrageri",allDrawResultsHistory:"Istoricul tuturor extragerilor",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridA:"Tirage des numéros Grille",viewAllResults:"Voir tout",lastFiveDraws:"5 derniers tirages",lastTenDraws:"10 derniers tirages",lastFifteenDraws:"15 derniers tirages",allDrawResultsHistory:"Historique des résultats de tous les tirages",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridA:"شبكة أرقام السحب",viewAllResults:"عرض الكل",lastFiveDraws:"آخر 5 سحوبات",lastTenDraws:"آخر 10 سحوبات",lastFifteenDraws:"آخر 15 سحبًا",allDrawResultsHistory:"سجل نتائج كل السحوبات",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"}};const a=(t,e)=>{const a=e;return r[a!==undefined&&i.includes(a)?a:s][t]};const l='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}';const n=class{constructor(e){t(this,e);this.numberOfResults=3;this.language="en";this.clientStyling="";this.clientStylingUrlContent="";this.drawData=[];this.winningDataSetsData=[""];this.displayAllDrawsResults=true;this.showQuickFilters=true;this.dateFiltersFrom="";this.dateFiltersTo="";this.isLoading=false;this.noResults=false;this.limitStylingAppends=false;this.getDrawsData=()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);if(this.dateFiltersFrom)t.searchParams.append("from",this.dateFiltersFrom);if(this.dateFiltersTo)t.searchParams.append("to",this.dateFiltersTo);fetch(t.href).then((t=>{if(t.status>=300){throw new Error("There was an error while fetching the data")}return t.json()})).then((t=>{this.winningDataSetsData=t.items.filter((t=>t.winningNumbers));this.drawData=this.winningDataSetsData.map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=false;this.noResults=this.drawData.filter((t=>t.winningNumbers)).length==0?true:false}))};this.filterResults=t=>{this.numberOfResults=t;this.displayAllDrawsResults=true};this.getDrawResults=t=>{let e=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);let s={method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,s).then((t=>{if(t.status==404)this.noResults=true;return t.json()})).then((t=>{this.drawData=[t].map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=false}))};this.viewAllResults=()=>{this.numberOfResults=this.drawData.length;this.displayAllDrawsResults=false;window.scrollTo({top:0,behavior:"smooth"})};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)}}filtersHandler(t){this.showQuickFilters=false;this.isLoading=true;if(t.detail.ticketDrawId){this.getDrawResults(t.detail.ticketDrawId)}else{this.dateFiltersFrom=t.detail.filterFromCalendar;this.dateFiltersTo=t.detail.filterToCalendar;this.getDrawsData()}}clearFiltersHandler(){this.showQuickFilters=true;this.dateFiltersFrom="";this.dateFiltersTo="";this.drawData=this.winningDataSetsData;this.isLoading=true;this.getDrawsData()}connectedCallback(){if(this.showQuickFilters)this.getDrawsData()}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){if(!this.limitStylingAppends&&this.stylingContainer){if(this.clientStyling)this.setClientStyling();if(this.clientStylingUrlContent)this.setClientStylingURL();this.limitStylingAppends=true}}render(){let t=e("div",{class:"DrawResultsHeader"},this.displayAllDrawsResults?e("h4",null,a("drawResultsHeader",this.language)):[e("div",{class:"DrawResultsHeaderContent"},e("h4",null,a("allDrawResultsHistory",this.language)),e("div",{class:"FilterSection"},this.showQuickFilters&&e("div",{class:"FilterResultsContainer"},e("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(5)},a("lastFiveDraws",this.language)),e("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(10)},a("lastTenDraws",this.language)),e("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(15)},a("lastFifteenDraws",this.language))),e("helper-filters",{"show-filter-id":"true","activate-ticket-search":"false","game-id":this.gameId,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))]);return e("section",{class:"GridWrapper",ref:t=>this.stylingContainer=t},e("div",{class:"DrawResultsSection"},e("div",{class:"DrawResultsAreaHistory"},t,e("div",{class:"HistoryGridWrapper"},e("div",{class:"HistoryGrid"},this.isLoading&&e("p",null,a("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>e("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":true,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))).reverse().slice(0,this.numberOfResults),!this.isLoading&&this.noResults&&e("p",null,a("noResults",this.language)))),this.displayAllDrawsResults&&e("button",{class:"ViewAllResults",onClick:this.viewAllResults},a("viewAllResults",this.language)))))}};n.style=l;export{n as lottery_draw_results_history};
|
|
2
|
+
//# sourceMappingURL=p-606c0b0f.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../lottery-draw-results-history/dist/collection/utils/locale.utils.js","../lottery-draw-results-history/dist/collection/components/lottery-draw-results-history/lottery-draw-results-history.css?tag=lottery-draw-results-history&encapsulation=shadow","../lottery-draw-results-history/dist/collection/components/lottery-draw-results-history/lottery-draw-results-history.js"],"names":["DEFAULT_LANGUAGE","SUPPORTED_LANGUAGES","TRANSLATIONS","en","drawResultsHeader","drawId","drawDate","drawNumbersGridA","viewAllResults","lastFiveDraws","lastTenDraws","lastFifteenDraws","allDrawResultsHistory","noResults","fetchingResults","ro","fr","ar","translate","key","customLang","lang","undefined","includes","lotteryDrawResultsHistoryCss","LotteryDrawResultsHistory","[object Object]","hostRef","this","numberOfResults","language","clientStyling","clientStylingUrlContent","drawData","winningDataSetsData","displayAllDrawsResults","showQuickFilters","dateFiltersFrom","dateFiltersTo","isLoading","limitStylingAppends","getDrawsData","url","URL","endpoint","gameId","searchParams","append","fetch","href","then","res","status","Error","json","data","items","filter","draw","winningNumbers","map","item","catch","err","console","log","finally","length","filterResults","resultsNumber","getDrawResults","drawID","drawOptions","method","headers","Content-Type","Accept","response","window","scrollTo","top","behavior","setClientStyling","sheet","document","createElement","innerHTML","stylingContainer","prepend","setClientStylingURL","cssFile","setTimeout","event","detail","ticketDrawId","filterFromCalendar","filterToCalendar","clearInterval","interval","gridHeader","h","class","onClick","show-filter-id","activate-ticket-search","game-id","client-styling","client-styling-url-content","ref","el","draw-id","id","draw-mode","reverse","slice"],"mappings":"2CAAA,MAAMA,EAAmB,KACzB,MAAMC,EAAsB,CAAC,KAAM,KAAM,KAAM,MAC/C,MAAMC,EAAe,CACnBC,GAAI,CACFC,kBAA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w results history',\n drawId: 'Draw ID',\n drawDate: 'Draw Date',\n drawNumbersGridA: 'Draw numbers Grid A',\n viewAllResults: 'View All',\n lastFiveDraws: 'Last 5 Draws',\n lastTenDraws: 'Last 10 Draws',\n lastFifteenDraws: 'Last 15 Draws',\n allDrawResultsHistory: 'All Draw Results History',\n noResults: 'No results',\n fetchingResults: 'Fetching results'\n },\n ro: {\n drawResultsHeader: 'Istoricul extragerilor',\n drawId: 'ID-ul extragerii',\n drawDate: 'Data extragerii',\n drawNumbersGridA: 'Numerele extrase Grid A',\n viewAllResults: 'Vezi toate rezultatele',\n lastFiveDraws: 'Ultimile 5 extrageri',\n lastTenDraws: 'Ultimile 10 extrageri',\n lastFifteenDraws: 'Ultimile 15 extrageri',\n allDrawResultsHistory: 'Istoricul tuturor extragerilor',\n noResults: 'Niciun rezultat',\n fetchingResults: 'Se obtin rezultatele'\n },\n fr: {\n drawResultsHeader: 'Dessiner l\\'historique des résultats',\n drawId: 'ID de tirage',\n drawDate: 'Date du tirage',\n drawNumbersGridA: 'Tirage des numéros Grille',\n viewAllResults: 'Voir tout',\n lastFiveDraws: '5 derniers tirages',\n lastTenDraws: '10 derniers tirages',\n lastFifteenDraws: '15 derniers tirages',\n allDrawResultsHistory: 'Historique des résultats de tous les tirages',\n noResults: 'Aucun résultat',\n fetchingResults: 'Récupération des résultats'\n },\n ar: {\n drawResultsHeader: 'سجل نتائج السحب',\n drawId: 'معرّف السحب',\n drawDate: 'تاريخ السحب',\n drawNumbersGridA: 'شبكة أرقام السحب',\n viewAllResults: 'عرض الكل',\n lastFiveDraws: 'آخر 5 سحوبات',\n lastTenDraws: 'آخر 10 سحوبات',\n lastFifteenDraws: 'آخر 15 سحبًا',\n allDrawResultsHistory: 'سجل نتائج كل السحوبات',\n noResults: 'لا توجد نتائج',\n fetchingResults: 'جلب النتائج'\n }\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n.GridBanner {\n background-color: #009993;\n background-repeat: no-repeat;\n background-position: center;\n color: #111;\n padding: 0 20px 30px;\n}\n.GridBanner .BannerButtonsWrapper {\n display: flex;\n justify-content: space-between;\n padding-top: 16px;\n}\n.GridBanner .BannerButtonsWrapper .BannerBackButton, .GridBanner .BannerButtonsWrapper .BannerLobbyButton {\n background: #fff;\n border: 1px solid #009993;\n border-radius: 4px;\n padding: 7px 15px;\n font-size: 12px;\n text-transform: uppercase;\n width: 80px;\n cursor: pointer;\n}\n.GridBanner .HistoryGridBannerArea {\n padding-top: 30px;\n}\n\n.HistoryGridBannerArea {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.BannerText {\n font-size: 14px;\n font-weight: 300;\n}\n\n.BannerCountdown {\n font-size: 22px;\n display: flex;\n gap: 20px;\n}\n\n.DrawResultsSection {\n max-width: 600px;\n margin: 0px auto;\n}\n\n.HistoryGrid {\n border-radius: 5px;\n}\n\n.DrawResultsHeader {\n color: #009993;\n padding: 25px 0 10px 0;\n text-align: center;\n border-radius: 4px 4px 0 0;\n}\n.DrawResultsHeader h4 {\n text-transform: uppercase;\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n}\n\n.DrawNumbersGrid {\n padding: 10px 50px;\n}\n.DrawNumbersGrid p {\n margin: 0 0 10px 0;\n font-size: 14px;\n}\n\n.BulletContainer {\n margin-bottom: 20px;\n}\n\n.DrawResultTop {\n background-color: #009993;\n padding: 10px;\n text-align: center;\n color: #fff;\n padding: 0 50px;\n display: flex;\n justify-content: center;\n gap: 40px;\n}\n\n.ViewAllResults {\n display: block;\n padding: 10px 40px;\n margin: 40px auto;\n border: 0;\n border-radius: 5px;\n background-color: #009993;\n color: #fff;\n outline: none;\n}\n\n.FilterSection {\n display: flex;\n justify-content: space-between;\n padding: 25px 15px 10px;\n gap: 10px;\n margin: 0px 15px;\n}\n.FilterSection .FilterResultsContainer {\n display: flex;\n gap: 5px;\n overflow-x: auto;\n}\n.FilterSection .QuickFilterButton {\n cursor: pointer;\n width: max-content;\n border-radius: 4px;\n border: 1px solid #00958f;\n background: #FFF;\n color: #000;\n font-size: 12px;\n transition: all 0.2s linear;\n text-align: center;\n letter-spacing: 0;\n}\n.FilterSection .QuickFilterButton:hover {\n background: #F1F1F1;\n}\n.FilterSection helper-filters {\n margin-left: auto;\n}","import { Component, Prop, h, State, Listen } from '@stencil/core';\nimport { translate } from '../../utils/locale.utils';\nimport '@everymatrix/lottery-grid';\nimport '@everymatrix/helper-pagination';\nimport '@everymatrix/helper-modal';\nimport '@everymatrix/helper-filters';\nimport '@everymatrix/lottery-draw-results';\nexport class LotteryDrawResultsHistory {\n constructor() {\n /**\n * The number of results to be displayed\n */\n this.numberOfResults = 3;\n /**\n *Language\n */\n this.language = 'en';\n /**\n * Client custom styling via string\n */\n this.clientStyling = '';\n /**\n * Client custom styling via url content\n */\n this.clientStylingUrlContent = '';\n this.drawData = [];\n this.winningDataSetsData = [''];\n this.displayAllDrawsResults = true;\n this.showQuickFilters = true;\n this.dateFiltersFrom = '';\n this.dateFiltersTo = '';\n this.isLoading = false;\n this.noResults = false;\n this.limitStylingAppends = false;\n this.getDrawsData = () => {\n let url = new URL(`${this.endpoint}/games/${this.gameId}/draws`);\n if (this.dateFiltersFrom)\n url.searchParams.append('from', this.dateFiltersFrom);\n if (this.dateFiltersTo)\n url.searchParams.append('to', this.dateFiltersTo);\n fetch(url.href)\n .then((res) => {\n if (res.status >= 300) {\n throw new Error('There was an error while fetching the data');\n }\n return res.json();\n })\n .then((data) => {\n this.winningDataSetsData = data.items.filter(draw => draw.winningNumbers);\n this.drawData = this.winningDataSetsData.map((item) => item);\n })\n .catch((err) => {\n console.log('err', err);\n })\n .finally(() => {\n this.isLoading = false;\n this.noResults = this.drawData.filter(draw => draw.winningNumbers).length == 0 ? true : false;\n });\n };\n this.filterResults = (resultsNumber) => {\n this.numberOfResults = resultsNumber;\n this.displayAllDrawsResults = true;\n };\n this.getDrawResults = (drawID) => {\n let url = new URL(`${this.endpoint}/games/${this.gameId}/draws/${drawID}`);\n let drawOptions = {\n method: \"GET\",\n headers: {\n 'Content-Type': \"application/json\",\n 'Accept': 'application/json',\n },\n };\n fetch(url.href, drawOptions)\n .then((response) => {\n if (response.status == 404)\n this.noResults = true;\n return response.json();\n })\n .then((data) => {\n this.drawData = [data].map((item) => item);\n })\n .catch((err) => {\n console.log('err', err);\n })\n .finally(() => {\n this.isLoading = false;\n });\n };\n this.viewAllResults = () => {\n this.numberOfResults = this.drawData.length;\n this.displayAllDrawsResults = false;\n window.scrollTo({ top: 0, behavior: 'smooth' });\n };\n this.setClientStyling = () => {\n let sheet = document.createElement('style');\n sheet.innerHTML = this.clientStyling;\n this.stylingContainer.prepend(sheet);\n };\n this.setClientStylingURL = () => {\n let cssFile = document.createElement('style');\n setTimeout(() => {\n cssFile.innerHTML = this.clientStylingUrlContent;\n this.stylingContainer.prepend(cssFile);\n }, 1);\n };\n }\n // Filters events\n // @Listen('filterDraw')\n // filtersDrawHandler(event: CustomEvent<any>):void {\n // this.isLoading = true;\n // this.showQuickFilters = false;\n // }\n filtersHandler(event) {\n this.showQuickFilters = false;\n this.isLoading = true;\n if (event.detail.ticketDrawId) {\n this.getDrawResults(event.detail.ticketDrawId);\n }\n else {\n this.dateFiltersFrom = event.detail.filterFromCalendar;\n this.dateFiltersTo = event.detail.filterToCalendar;\n this.getDrawsData();\n }\n }\n clearFiltersHandler() {\n this.showQuickFilters = true;\n this.dateFiltersFrom = '';\n this.dateFiltersTo = '';\n this.drawData = this.winningDataSetsData;\n this.isLoading = true;\n this.getDrawsData();\n }\n connectedCallback() {\n if (this.showQuickFilters)\n this.getDrawsData();\n }\n disconnectedCallback() {\n clearInterval(this.interval);\n }\n componentDidRender() {\n // start custom styling area\n if (!this.limitStylingAppends && this.stylingContainer) {\n if (this.clientStyling)\n this.setClientStyling();\n if (this.clientStylingUrlContent)\n this.setClientStylingURL();\n this.limitStylingAppends = true;\n }\n // end custom styling area\n }\n render() {\n let gridHeader = h(\"div\", { class: \"DrawResultsHeader\" }, this.displayAllDrawsResults ? h(\"h4\", null, translate('drawResultsHeader', this.language)) :\n [h(\"div\", { class: \"DrawResultsHeaderContent\" },\n h(\"h4\", null, translate('allDrawResultsHistory', this.language)),\n h(\"div\", { class: \"FilterSection\" },\n this.showQuickFilters &&\n h(\"div\", { class: \"FilterResultsContainer\" },\n h(\"button\", { class: \"QuickFilterButton\", onClick: () => this.filterResults(5) }, translate('lastFiveDraws', this.language)),\n h(\"button\", { class: \"QuickFilterButton\", onClick: () => this.filterResults(10) }, translate('lastTenDraws', this.language)),\n h(\"button\", { class: \"QuickFilterButton\", onClick: () => this.filterResults(15) }, translate('lastFifteenDraws', this.language))),\n h(\"helper-filters\", { \"show-filter-id\": \"true\", \"activate-ticket-search\": \"false\", \"game-id\": this.gameId, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent }))),\n ]);\n return h(\"section\", { class: \"GridWrapper\", ref: el => this.stylingContainer = el },\n h(\"div\", { class: \"DrawResultsSection\" },\n h(\"div\", { class: \"DrawResultsAreaHistory\" },\n gridHeader,\n h(\"div\", { class: \"HistoryGridWrapper\" },\n h(\"div\", { class: \"HistoryGrid\" },\n this.isLoading &&\n h(\"p\", null, translate('fetchingResults', this.language)),\n !this.isLoading && !this.noResults && this.drawData.map((item) => h(\"lottery-draw-results\", { endpoint: this.endpoint, \"game-id\": this.gameId, \"draw-id\": item.id, \"draw-mode\": true, \"client-styling\": this.clientStyling, \"client-styling-url-content\": this.clientStylingUrlContent })).reverse().slice(0, this.numberOfResults),\n !this.isLoading && this.noResults && (h(\"p\", null, translate('noResults', this.language))))),\n this.displayAllDrawsResults && h(\"button\", { class: \"ViewAllResults\", onClick: this.viewAllResults }, translate('viewAllResults', this.language)))));\n }\n static get is() { return \"lottery-draw-results-history\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"lottery-draw-results-history.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"lottery-draw-results-history.css\"]\n }; }\n static get properties() { return {\n \"endpoint\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Endpoint URL for lottery\"\n },\n \"attribute\": \"endpoint\",\n \"reflect\": false\n },\n \"gameId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"GameID\"\n },\n \"attribute\": \"game-id\",\n \"reflect\": false\n },\n \"numberOfResults\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The number of results to be displayed\"\n },\n \"attribute\": \"number-of-results\",\n \"reflect\": false,\n \"defaultValue\": \"3\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"drawData\": {},\n \"winningDataSetsData\": {},\n \"displayAllDrawsResults\": {},\n \"showQuickFilters\": {},\n \"dateFiltersFrom\": {},\n \"dateFiltersTo\": {},\n \"isLoading\": {},\n \"noResults\": {},\n \"limitStylingAppends\": {}\n }; }\n static get listeners() { return [{\n \"name\": \"filterSelection\",\n \"method\": \"filtersHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"filterSelectionReset\",\n \"method\": \"clearFiltersHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }]; }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\": false,\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\": false\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\": false,\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\": false\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\": false,\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\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n static get elementRef() { return \"host\"; }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"limitStylingAppends\": {}\n }; }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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\": false,\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\": false\n },\n \"clientStyling\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via string\"\n },\n \"attribute\": \"client-styling\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n },\n \"clientStylingUrlContent\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Client custom styling via url content\"\n },\n \"attribute\": \"client-styling-url-content\",\n \"reflect\": false,\n \"defaultValue\": \"''\"\n }\n }; }\n static get states() { return {\n \"tabContent\": {},\n \"limitStylingAppends\": {}\n }; }\n}\n"]}
|