@everymatrix/lottery-game-page 0.0.6 → 0.0.9
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_13.cjs.entry.js +23492 -0
- package/dist/cjs/helper-pagination.cjs.entry.js +188 -0
- package/dist/cjs/index-81cb3b3b.js +1277 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/lottery-game-page.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +86 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.css +305 -0
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +496 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +50 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/components/assets/chrono_desktop.png +0 -0
- package/dist/components/assets/chrono_lottery_mobile.png +0 -0
- package/dist/components/helper-accordion.js +6 -0
- package/dist/components/helper-accordion2.js +110 -0
- package/dist/components/helper-filters.js +6 -0
- package/dist/components/helper-filters2.js +22347 -0
- package/dist/components/helper-modal.js +6 -0
- package/dist/components/helper-modal2.js +58 -0
- package/dist/components/helper-pagination.js +215 -0
- package/dist/components/helper-tab.js +6 -0
- package/dist/components/helper-tab2.js +47 -0
- package/dist/components/helper-tabs.js +6 -0
- package/dist/components/helper-tabs2.js +62 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.js +15 -0
- package/dist/components/lottery-bullet.js +6 -0
- package/dist/components/lottery-bullet2.js +56 -0
- package/dist/components/lottery-draw-results-history.js +6 -0
- package/dist/components/lottery-draw-results-history2.js +174 -0
- package/dist/components/lottery-draw-results.js +6 -0
- package/dist/components/lottery-draw-results2.js +217 -0
- package/dist/components/lottery-game-details.js +6 -0
- package/dist/components/lottery-game-details2.js +48 -0
- package/dist/components/lottery-game-page.d.ts +11 -0
- package/dist/components/lottery-game-page.js +407 -0
- package/dist/components/lottery-grid.js +6 -0
- package/dist/components/lottery-grid2.js +196 -0
- package/dist/components/lottery-ticket-controller.js +6 -0
- package/dist/components/lottery-ticket-controller2.js +117 -0
- package/dist/components/lottery-ticket.js +6 -0
- package/dist/components/lottery-ticket2.js +183 -0
- package/dist/esm/helper-accordion_13.entry.js +23476 -0
- package/dist/esm/helper-pagination.entry.js +184 -0
- package/dist/esm/index-be84da79.js +1250 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/lottery-game-page.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lottery-game-page/index.esm.js +0 -0
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -0
- package/dist/lottery-game-page/p-08581ede.entry.js +1 -0
- package/dist/lottery-game-page/p-49bd2864.entry.js +2849 -0
- package/dist/lottery-game-page/p-91420518.js +2 -0
- package/dist/stencil.config.js +29 -0
- package/dist/types/Users/user/workspace/everymatrix/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 +74 -0
- package/dist/types/components.d.ts +93 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/locale.utils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +7 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +1 -1
- package/LICENSE +0 -21
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$4 } from './helper-accordion2.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './lottery-bullet2.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './lottery-grid2.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './lottery-ticket2.js';
|
|
6
|
+
|
|
7
|
+
const lotteryTicketControllerCss = ":host{display:block}";
|
|
8
|
+
|
|
9
|
+
const LotteryTicketController = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.deleteTicketEvent = createEvent(this, "deleteTicket", 7);
|
|
15
|
+
/**
|
|
16
|
+
* Endpoint URL for the source of data (NorWAy standard)
|
|
17
|
+
*/
|
|
18
|
+
this.endpoint = '';
|
|
19
|
+
/**
|
|
20
|
+
* Ticket number
|
|
21
|
+
*/
|
|
22
|
+
this.ticketId = 1;
|
|
23
|
+
/**
|
|
24
|
+
* Activates postMessages as events for actions from the widget
|
|
25
|
+
*/
|
|
26
|
+
this.postMessage = false;
|
|
27
|
+
/**
|
|
28
|
+
* Name of the event emitter by the action button
|
|
29
|
+
*/
|
|
30
|
+
this.eventName = 'deleteTicketAction';
|
|
31
|
+
/**
|
|
32
|
+
* Collapsed
|
|
33
|
+
*/
|
|
34
|
+
this.collapsed = true;
|
|
35
|
+
/**
|
|
36
|
+
* Number of grids?
|
|
37
|
+
*/
|
|
38
|
+
this.numberOfGrids = 1;
|
|
39
|
+
/**
|
|
40
|
+
* This toggles if the last ticket added should be expanded or not
|
|
41
|
+
*/
|
|
42
|
+
this.last = false;
|
|
43
|
+
/**
|
|
44
|
+
* Language
|
|
45
|
+
*/
|
|
46
|
+
this.language = 'en';
|
|
47
|
+
/**
|
|
48
|
+
* Shows the auto-pick button
|
|
49
|
+
*/
|
|
50
|
+
this.autoPick = false;
|
|
51
|
+
/**
|
|
52
|
+
* Shows the reset button
|
|
53
|
+
*/
|
|
54
|
+
this.resetButton = false;
|
|
55
|
+
}
|
|
56
|
+
// @TODO fix the `any` type
|
|
57
|
+
helperAccordionActionHandler() {
|
|
58
|
+
if (this.postMessage) {
|
|
59
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
60
|
+
}
|
|
61
|
+
this.deleteTicketEvent.emit({
|
|
62
|
+
ticketId: this.ticketId
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return (h("div", null, h("helper-accordion", { "header-title": 'Ticket ' + this.ticketId, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": true, collapsed: !this.last || this.collapsed, language: this.language }, h("div", { slot: "accordionContent" }, 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 })))));
|
|
67
|
+
}
|
|
68
|
+
static get style() { return lotteryTicketControllerCss; }
|
|
69
|
+
}, [1, "lottery-ticket-controller", {
|
|
70
|
+
"endpoint": [1],
|
|
71
|
+
"ticketId": [2, "ticket-id"],
|
|
72
|
+
"ticketDescription": [1, "ticket-description"],
|
|
73
|
+
"gameId": [1, "game-id"],
|
|
74
|
+
"postMessage": [4, "post-message"],
|
|
75
|
+
"eventName": [1, "event-name"],
|
|
76
|
+
"collapsed": [4],
|
|
77
|
+
"numberOfGrids": [2, "number-of-grids"],
|
|
78
|
+
"last": [4],
|
|
79
|
+
"language": [1],
|
|
80
|
+
"autoPick": [4, "auto-pick"],
|
|
81
|
+
"resetButton": [4, "reset-button"]
|
|
82
|
+
}, [[0, "helperAccordionAction", "helperAccordionActionHandler"]]]);
|
|
83
|
+
function defineCustomElement() {
|
|
84
|
+
if (typeof customElements === "undefined") {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const components = ["lottery-ticket-controller", "helper-accordion", "lottery-bullet", "lottery-grid", "lottery-ticket"];
|
|
88
|
+
components.forEach(tagName => { switch (tagName) {
|
|
89
|
+
case "lottery-ticket-controller":
|
|
90
|
+
if (!customElements.get(tagName)) {
|
|
91
|
+
customElements.define(tagName, LotteryTicketController);
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case "helper-accordion":
|
|
95
|
+
if (!customElements.get(tagName)) {
|
|
96
|
+
defineCustomElement$4();
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case "lottery-bullet":
|
|
100
|
+
if (!customElements.get(tagName)) {
|
|
101
|
+
defineCustomElement$3();
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case "lottery-grid":
|
|
105
|
+
if (!customElements.get(tagName)) {
|
|
106
|
+
defineCustomElement$2();
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
case "lottery-ticket":
|
|
110
|
+
if (!customElements.get(tagName)) {
|
|
111
|
+
defineCustomElement$1();
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
} });
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { LotteryTicketController as L, defineCustomElement as d };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './lottery-bullet2.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './lottery-grid2.js';
|
|
4
|
+
|
|
5
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
6
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
7
|
+
const TRANSLATIONS = {
|
|
8
|
+
en: {
|
|
9
|
+
loading: 'Loading, please wait ...',
|
|
10
|
+
error: 'It was an error while trying to fetch the data',
|
|
11
|
+
grid: 'Grid',
|
|
12
|
+
multiplier: 'Multiplier',
|
|
13
|
+
numberOfDraws: 'Number of draws',
|
|
14
|
+
wagerPerDraw: 'Wager per draw',
|
|
15
|
+
resetButton: 'Reset',
|
|
16
|
+
autoButton: 'I feel lucky'
|
|
17
|
+
},
|
|
18
|
+
ro: {
|
|
19
|
+
loading: 'Se incarca, va rugam asteptati ...',
|
|
20
|
+
error: 'A fost o eroare in timp ce asteptam datele',
|
|
21
|
+
grid: 'Grid',
|
|
22
|
+
multiplier: 'Multiplicator',
|
|
23
|
+
numberOfDraws: 'Numarul de extrageri',
|
|
24
|
+
wagerPerDraw: 'Pariul per extragere',
|
|
25
|
+
resetButton: 'Reseteaza',
|
|
26
|
+
autoButton: 'Ma simt norocos'
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const translate = (key, customLang) => {
|
|
30
|
+
const lang = customLang;
|
|
31
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const lotteryTicketCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:\"\"}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;background-color:transparent;border:none;align-items:center;justify-content:center;height:20px;margin:0;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);width:30px;align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:block;border-radius:4px;padding:8px 25px;width:max-content;margin:5px 0;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:block;border-radius:4px;padding:8px 25px;width:max-content;margin:5px 0;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}";
|
|
35
|
+
|
|
36
|
+
const LotteryTicket = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
37
|
+
constructor() {
|
|
38
|
+
super();
|
|
39
|
+
this.__registerHost();
|
|
40
|
+
this.__attachShadow();
|
|
41
|
+
this.ticketCompleted = createEvent(this, "ticketCompleted", 7);
|
|
42
|
+
this.autoSelection = createEvent(this, "autoSelection", 7);
|
|
43
|
+
this.resetSelection = createEvent(this, "resetSelection", 7);
|
|
44
|
+
this.stakeChange = createEvent(this, "stakeChange", 7);
|
|
45
|
+
this.multiplierChange = createEvent(this, "multiplierChange", 7);
|
|
46
|
+
/**
|
|
47
|
+
* Number of grids of a ticket
|
|
48
|
+
*/
|
|
49
|
+
this.numberOfGrids = 1;
|
|
50
|
+
/**
|
|
51
|
+
* Option to have the ticket registered for multiple draws
|
|
52
|
+
*/
|
|
53
|
+
this.multipleDraws = true;
|
|
54
|
+
/**
|
|
55
|
+
* Shows the reset button
|
|
56
|
+
*/
|
|
57
|
+
this.resetButton = false;
|
|
58
|
+
/**
|
|
59
|
+
* Shows the auto-pick button
|
|
60
|
+
*/
|
|
61
|
+
this.autoPick = false;
|
|
62
|
+
/**
|
|
63
|
+
* Language
|
|
64
|
+
*/
|
|
65
|
+
this.language = 'en';
|
|
66
|
+
this.multiplier = false;
|
|
67
|
+
this.numberOfDraws = 1;
|
|
68
|
+
this.isLoading = true;
|
|
69
|
+
this.hasErrors = false;
|
|
70
|
+
this.ticketDone = false;
|
|
71
|
+
}
|
|
72
|
+
connectedCallback() {
|
|
73
|
+
let url = new URL(`${this.endpoint}/games/${this.gameId}`);
|
|
74
|
+
fetch(url.href)
|
|
75
|
+
.then((response) => {
|
|
76
|
+
if (response.ok) {
|
|
77
|
+
return response.json();
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
// Throw error
|
|
81
|
+
this.hasErrors = true;
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
.then((data) => {
|
|
85
|
+
this.isLoading = false;
|
|
86
|
+
this.gameData = data;
|
|
87
|
+
this.grids = [...Array(data.rules.boards.length).keys()];
|
|
88
|
+
})
|
|
89
|
+
.catch((err) => {
|
|
90
|
+
this.isLoading = false;
|
|
91
|
+
this.hasErrors = true;
|
|
92
|
+
console.error('Error!', err);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
multiplierChangeHandler(e) {
|
|
96
|
+
this.multiplier = e.target ? e.target.checked : false;
|
|
97
|
+
this.multiplierChange.emit(this.multiplier);
|
|
98
|
+
}
|
|
99
|
+
drawsChangeHandler(event) {
|
|
100
|
+
this.ticket = Object.assign(Object.assign({}, this.ticket), { draws: event });
|
|
101
|
+
this.ticketCompleted.emit(this.ticket);
|
|
102
|
+
}
|
|
103
|
+
gridFilledHandler(event) {
|
|
104
|
+
this.ticket = Object.assign(Object.assign({}, event.detail), { draws: this.numberOfDraws });
|
|
105
|
+
this.ticketDone = true;
|
|
106
|
+
this.ticketCompleted.emit(this.ticket);
|
|
107
|
+
}
|
|
108
|
+
toggleAutoSelection() {
|
|
109
|
+
this.ticketDone = true;
|
|
110
|
+
this.autoSelection.emit(this.ticketId);
|
|
111
|
+
}
|
|
112
|
+
toggleResetSelection() {
|
|
113
|
+
this.ticketDone = false;
|
|
114
|
+
this.resetSelection.emit(this.ticketId);
|
|
115
|
+
}
|
|
116
|
+
changeStake(event) {
|
|
117
|
+
this.stakeChange.emit({
|
|
118
|
+
ticketId: this.ticketId,
|
|
119
|
+
stake: event.target.value
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
if (this.isLoading) {
|
|
124
|
+
return (h("div", null, h("p", null, translate('loading', this.language))));
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
if (this.hasErrors) {
|
|
128
|
+
return (h("div", null, h("p", null, translate('error', this.language))));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const { rules } = this.gameData;
|
|
132
|
+
return (h("div", { class: "TicketContainer" }, h("p", null, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
133
|
+
h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate('resetButton', this.language)), this.autoPick && !this.ticketDone &&
|
|
134
|
+
h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language)), this.grids.map((item, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate('grid', this.language), " ", item), h("lottery-grid", { "grid-index": index, "maximum-allowed": rules.boards[index].maximumAllowed, "minimum-allowed": rules.boards[index].minimumAllowed, "total-numbers": rules.boards[index].totalNumbers, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language }))), rules.multiplier &&
|
|
135
|
+
h("div", null, h("label", { class: "Toggle" }, h("label", { class: "Label" }, translate('multiplier', this.language), ": "), h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
136
|
+
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("label", { class: "Label" }, translate('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" }, rules.stakes.length > 1 ? h("div", null, h("select", { class: "InputDefault", onChange: (event) => this.changeStake(event) }, rules.stakes.map((item) => h("option", { value: item.amount }, item.amount, " ", item.currency)))) : h("div", null, h("input", { min: "1", value: rules.stakes[0].amount, type: "number", disabled: true }), h("p", { class: "WagerInputTitle" }, rules.stakes[0].currency)))));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
static get watchers() { return {
|
|
141
|
+
"numberOfDraws": ["drawsChangeHandler"]
|
|
142
|
+
}; }
|
|
143
|
+
static get style() { return lotteryTicketCss; }
|
|
144
|
+
}, [1, "lottery-ticket", {
|
|
145
|
+
"endpoint": [1],
|
|
146
|
+
"gameId": [1, "game-id"],
|
|
147
|
+
"numberOfGrids": [2, "number-of-grids"],
|
|
148
|
+
"multipleDraws": [4, "multiple-draws"],
|
|
149
|
+
"ticketId": [2, "ticket-id"],
|
|
150
|
+
"resetButton": [4, "reset-button"],
|
|
151
|
+
"autoPick": [4, "auto-pick"],
|
|
152
|
+
"language": [1],
|
|
153
|
+
"multiplier": [32],
|
|
154
|
+
"numberOfDraws": [32],
|
|
155
|
+
"isLoading": [32],
|
|
156
|
+
"hasErrors": [32],
|
|
157
|
+
"ticketDone": [32]
|
|
158
|
+
}, [[0, "gridFilled", "gridFilledHandler"]]]);
|
|
159
|
+
function defineCustomElement() {
|
|
160
|
+
if (typeof customElements === "undefined") {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const components = ["lottery-ticket", "lottery-bullet", "lottery-grid"];
|
|
164
|
+
components.forEach(tagName => { switch (tagName) {
|
|
165
|
+
case "lottery-ticket":
|
|
166
|
+
if (!customElements.get(tagName)) {
|
|
167
|
+
customElements.define(tagName, LotteryTicket);
|
|
168
|
+
}
|
|
169
|
+
break;
|
|
170
|
+
case "lottery-bullet":
|
|
171
|
+
if (!customElements.get(tagName)) {
|
|
172
|
+
defineCustomElement$2();
|
|
173
|
+
}
|
|
174
|
+
break;
|
|
175
|
+
case "lottery-grid":
|
|
176
|
+
if (!customElements.get(tagName)) {
|
|
177
|
+
defineCustomElement$1();
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
} });
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export { LotteryTicket as L, defineCustomElement as d };
|