@everymatrix/lottery-game-page 0.0.7 → 0.0.10
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-af6d701d.js → index-81cb3b3b.js} +70 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-game-page.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +75 -1
- 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.js +13 -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.js +73 -6
- 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-8c700c5e.js → index-be84da79.js} +70 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-game-page.js +2 -2
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- 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 +6 -0
- package/package.json +1 -1
- package/dist/cjs/lottery-game-page.cjs.entry.js +0 -304
- package/dist/esm/lottery-game-page.entry.js +0 -300
- package/dist/lottery-game-page/p-453db7fa.entry.js +0 -1
- package/dist/lottery-game-page/p-b5969eab.js +0 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name isMobile
|
|
5
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
6
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
7
|
+
* @returns {Boolean} true or false
|
|
8
|
+
*/
|
|
9
|
+
const isMobile = (userAgent) => {
|
|
10
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
11
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
12
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
13
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const helperModalCss = ":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}";
|
|
17
|
+
|
|
18
|
+
const HelperModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.__registerHost();
|
|
22
|
+
this.__attachShadow();
|
|
23
|
+
this.cancel = createEvent(this, "modalCloseEvent", 7);
|
|
24
|
+
/**
|
|
25
|
+
* Toggles if the helper is visible or not
|
|
26
|
+
*/
|
|
27
|
+
this.visible = true;
|
|
28
|
+
this.userAgent = window.navigator.userAgent;
|
|
29
|
+
}
|
|
30
|
+
handleHelperModalClose() {
|
|
31
|
+
this.visible = false;
|
|
32
|
+
this.cancel.emit();
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
render() {
|
|
36
|
+
return ((this.visible &&
|
|
37
|
+
h("div", { class: this.visible ? "HelperModalWrapper HelperModalVisible" : "HelperModalWrapper" }, h("div", { class: "HelperModalWrapper HelperModalVisible" }, h("div", { class: "HelperModalContent" + (isMobile(this.userAgent) ? ' HelperModalMobileContent' : '') }, h("span", { class: "HelperModalClose" + (isMobile(this.userAgent) ? ' HelperModalMobileClose' : ''), onClick: this.handleHelperModalClose.bind(this) }, "X"), h("slot", null))))));
|
|
38
|
+
}
|
|
39
|
+
static get style() { return helperModalCss; }
|
|
40
|
+
}, [1, "helper-modal", {
|
|
41
|
+
"titleModal": [1, "title-modal"],
|
|
42
|
+
"visible": [1540]
|
|
43
|
+
}]);
|
|
44
|
+
function defineCustomElement() {
|
|
45
|
+
if (typeof customElements === "undefined") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const components = ["helper-modal"];
|
|
49
|
+
components.forEach(tagName => { switch (tagName) {
|
|
50
|
+
case "helper-modal":
|
|
51
|
+
if (!customElements.get(tagName)) {
|
|
52
|
+
customElements.define(tagName, HelperModal);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
} });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { HelperModal as H, defineCustomElement as d };
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name isMobile
|
|
5
|
+
* @description A method that returns if the browser used to access the app is from a mobile device or not
|
|
6
|
+
* @param {String} userAgent window.navigator.userAgent
|
|
7
|
+
* @returns {Boolean} true or false
|
|
8
|
+
*/
|
|
9
|
+
const isMobile = (userAgent) => {
|
|
10
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
11
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
12
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
13
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
17
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
18
|
+
const TRANSLATIONS = {
|
|
19
|
+
en: {
|
|
20
|
+
firstPage: 'First',
|
|
21
|
+
previousPage: 'Previous',
|
|
22
|
+
nextPage: 'Next',
|
|
23
|
+
lastPage: 'Last'
|
|
24
|
+
},
|
|
25
|
+
ro: {
|
|
26
|
+
firstPage: 'Prima',
|
|
27
|
+
previousPage: 'Anterior',
|
|
28
|
+
nextPage: 'Urmatoarea',
|
|
29
|
+
lastPage: 'Ultima'
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const translate = (key, customLang) => {
|
|
33
|
+
const lang = customLang;
|
|
34
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const helperPaginationCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}#PaginationContainer{width:100%;margin-top:20px;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:#009993;border-color:#009993}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:#000;cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}button{width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:#004D4A;border-color:#004D4A}button:disabled{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:12px}}@media screen and (max-width: 480px){button{width:70px;font-size:10px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:10px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:#009993;border-color:#009993;color:#fff}}";
|
|
38
|
+
|
|
39
|
+
const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
40
|
+
constructor() {
|
|
41
|
+
super();
|
|
42
|
+
this.__registerHost();
|
|
43
|
+
this.__attachShadow();
|
|
44
|
+
this.hpPageChange = createEvent(this, "hpPageChange", 7);
|
|
45
|
+
/**
|
|
46
|
+
* First page boolean value - determines if the page is disabled or active
|
|
47
|
+
*/
|
|
48
|
+
this.firstPage = false;
|
|
49
|
+
/**
|
|
50
|
+
* Previous page boolean value - determines if the page is disabled or active
|
|
51
|
+
*/
|
|
52
|
+
this.previousPage = false;
|
|
53
|
+
/**
|
|
54
|
+
* The received offset
|
|
55
|
+
*/
|
|
56
|
+
this.offset = 0;
|
|
57
|
+
/**
|
|
58
|
+
* The received limit for the number of pages
|
|
59
|
+
*/
|
|
60
|
+
this.limit = 1;
|
|
61
|
+
/**
|
|
62
|
+
* The received total number of pages
|
|
63
|
+
*/
|
|
64
|
+
this.total = 1;
|
|
65
|
+
/**
|
|
66
|
+
* Language
|
|
67
|
+
*/
|
|
68
|
+
this.language = 'en';
|
|
69
|
+
/**
|
|
70
|
+
* In component working variable for the array of pages
|
|
71
|
+
*/
|
|
72
|
+
this.pagesArray = [];
|
|
73
|
+
/**
|
|
74
|
+
* In component working variable for last page
|
|
75
|
+
*/
|
|
76
|
+
this.endInt = 0;
|
|
77
|
+
this.userAgent = window.navigator.userAgent;
|
|
78
|
+
this.currentPage = 1;
|
|
79
|
+
/**
|
|
80
|
+
* Navigation logic
|
|
81
|
+
*/
|
|
82
|
+
this.navigateTo = (navigationPage) => {
|
|
83
|
+
switch (navigationPage) {
|
|
84
|
+
case 'firstPage':
|
|
85
|
+
this.offsetInt = 0;
|
|
86
|
+
break;
|
|
87
|
+
case 'lastPage':
|
|
88
|
+
this.offsetInt = this.endInt * this.limitInt;
|
|
89
|
+
break;
|
|
90
|
+
case 'previousPage':
|
|
91
|
+
this.offsetInt -= 10;
|
|
92
|
+
break;
|
|
93
|
+
case 'nextPage':
|
|
94
|
+
this.offsetInt += 10;
|
|
95
|
+
break;
|
|
96
|
+
case 'fivePagesBack':
|
|
97
|
+
this.offsetInt -= 30;
|
|
98
|
+
this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
|
|
99
|
+
break;
|
|
100
|
+
case 'fivePagesForward':
|
|
101
|
+
this.offsetInt += 30;
|
|
102
|
+
this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Handle navigation from here
|
|
109
|
+
*/
|
|
110
|
+
this.paginationNavigation = (pageNumber, index) => {
|
|
111
|
+
if (!isNaN(pageNumber)) {
|
|
112
|
+
if (pageNumber === 1) {
|
|
113
|
+
this.offsetInt = pageNumber - 1;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.offsetInt = (pageNumber - 1) * 10;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
if (index === 0 && this.currentPage <= 4) {
|
|
121
|
+
this.navigateTo('firstPage');
|
|
122
|
+
}
|
|
123
|
+
else if (index === 0 && this.currentPage > 4) {
|
|
124
|
+
this.navigateTo('fivePagesBack');
|
|
125
|
+
}
|
|
126
|
+
else if (index === 4 && this.endInt - this.currentPage >= 2) {
|
|
127
|
+
this.navigateTo('fivePagesForward');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
this.currentPage = this.offsetInt;
|
|
131
|
+
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
componentWillRender() {
|
|
135
|
+
this.offsetInt = this.offset;
|
|
136
|
+
this.currentPage = this.offsetInt / this.limitInt + 1;
|
|
137
|
+
this.limitInt = this.limit;
|
|
138
|
+
this.totalInt = this.total;
|
|
139
|
+
this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
|
|
140
|
+
this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
|
|
141
|
+
/**
|
|
142
|
+
* Construct numbered navigation area based on current page position
|
|
143
|
+
*/
|
|
144
|
+
if (this.currentPage === 1 || this.currentPage === 2) {
|
|
145
|
+
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
146
|
+
this.pagesArray.push('...');
|
|
147
|
+
}
|
|
148
|
+
else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
|
|
149
|
+
this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
|
|
150
|
+
this.pagesArray.push('...');
|
|
151
|
+
this.pagesArray.unshift('...');
|
|
152
|
+
}
|
|
153
|
+
else if ((this.endInt - this.currentPage) < 3) {
|
|
154
|
+
this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
|
|
155
|
+
this.pagesArray.unshift('...');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
render() {
|
|
159
|
+
/**
|
|
160
|
+
* Center navigation area
|
|
161
|
+
*/
|
|
162
|
+
let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
|
|
163
|
+
return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) }, h("span", null, item))));
|
|
164
|
+
}));
|
|
165
|
+
/**
|
|
166
|
+
* Left navigation area
|
|
167
|
+
*/
|
|
168
|
+
let buttonsLeftSide = h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage, onClick: this.navigateTo.bind(this, 'firstPage') }, translate('firstPage', this.language)), h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
|
|
169
|
+
if (isMobile(this.userAgent)) {
|
|
170
|
+
buttonsLeftSide =
|
|
171
|
+
h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Right navigation area
|
|
175
|
+
*/
|
|
176
|
+
let buttonsRightSide = h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)), h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'lastPage') }, translate('lastPage', this.language)));
|
|
177
|
+
if (isMobile(this.userAgent)) {
|
|
178
|
+
buttonsRightSide =
|
|
179
|
+
h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
|
|
180
|
+
}
|
|
181
|
+
return (h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
|
|
182
|
+
}
|
|
183
|
+
static get style() { return helperPaginationCss; }
|
|
184
|
+
}, [1, "helper-pagination", {
|
|
185
|
+
"firstPage": [1540, "first-page"],
|
|
186
|
+
"previousPage": [1540, "previous-page"],
|
|
187
|
+
"offset": [1538],
|
|
188
|
+
"limit": [1538],
|
|
189
|
+
"total": [1538],
|
|
190
|
+
"language": [1],
|
|
191
|
+
"offsetInt": [32],
|
|
192
|
+
"lastPage": [32],
|
|
193
|
+
"limitInt": [32],
|
|
194
|
+
"totalInt": [32],
|
|
195
|
+
"pagesArray": [32],
|
|
196
|
+
"endInt": [32]
|
|
197
|
+
}]);
|
|
198
|
+
function defineCustomElement$1() {
|
|
199
|
+
if (typeof customElements === "undefined") {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const components = ["helper-pagination"];
|
|
203
|
+
components.forEach(tagName => { switch (tagName) {
|
|
204
|
+
case "helper-pagination":
|
|
205
|
+
if (!customElements.get(tagName)) {
|
|
206
|
+
customElements.define(tagName, HelperPagination$1);
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
} });
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const HelperPagination = HelperPagination$1;
|
|
213
|
+
const defineCustomElement = defineCustomElement$1;
|
|
214
|
+
|
|
215
|
+
export { HelperPagination, defineCustomElement };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const helperTabCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* Selected index
|
|
12
|
+
*/
|
|
13
|
+
this.selectedIndex = 0;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Endpoing for CMS
|
|
17
|
+
*/
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
/**
|
|
20
|
+
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
21
|
+
*/
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return [
|
|
25
|
+
h("div", null, "Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.", this.selectedIndex + 1)
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
static get style() { return helperTabCss; }
|
|
29
|
+
}, [1, "helper-tab", {
|
|
30
|
+
"selectedIndex": [2, "selected-index"],
|
|
31
|
+
"cmsEndpoint": [1, "cms-endpoint"]
|
|
32
|
+
}]);
|
|
33
|
+
function defineCustomElement() {
|
|
34
|
+
if (typeof customElements === "undefined") {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const components = ["helper-tab"];
|
|
38
|
+
components.forEach(tagName => { switch (tagName) {
|
|
39
|
+
case "helper-tab":
|
|
40
|
+
if (!customElements.get(tagName)) {
|
|
41
|
+
customElements.define(tagName, HelperTab);
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
} });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { HelperTab as H, defineCustomElement as d };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$1 } from './helper-tab2.js';
|
|
3
|
+
|
|
4
|
+
const helperTabsCss = "@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}";
|
|
5
|
+
|
|
6
|
+
const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
/**
|
|
12
|
+
* Tell me if it is disabled
|
|
13
|
+
*/
|
|
14
|
+
this.disabled = false;
|
|
15
|
+
/**
|
|
16
|
+
* Tell me what tab is selected
|
|
17
|
+
*/
|
|
18
|
+
this.selected = false;
|
|
19
|
+
/**
|
|
20
|
+
* Default selected index
|
|
21
|
+
*/
|
|
22
|
+
this.selectedIndex = 0;
|
|
23
|
+
/**
|
|
24
|
+
* Tabs details
|
|
25
|
+
*/
|
|
26
|
+
this.tabs = [{ label: 'Draw Details' }, { label: 'Winnings' }, { label: 'How to Play' }, { label: 'Game Odds' }, { label: 'FAQs' }];
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
|
|
32
|
+
}
|
|
33
|
+
get host() { return this; }
|
|
34
|
+
static get style() { return helperTabsCss; }
|
|
35
|
+
}, [1, "helper-tabs", {
|
|
36
|
+
"disabled": [4],
|
|
37
|
+
"label": [1],
|
|
38
|
+
"selected": [4],
|
|
39
|
+
"cmsEndpoint": [1, "cms-endpoint"],
|
|
40
|
+
"selectedIndex": [1538, "selected-index"],
|
|
41
|
+
"tabs": [16]
|
|
42
|
+
}]);
|
|
43
|
+
function defineCustomElement() {
|
|
44
|
+
if (typeof customElements === "undefined") {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const components = ["helper-tabs", "helper-tab"];
|
|
48
|
+
components.forEach(tagName => { switch (tagName) {
|
|
49
|
+
case "helper-tabs":
|
|
50
|
+
if (!customElements.get(tagName)) {
|
|
51
|
+
customElements.define(tagName, HelperTabs);
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
case "helper-tab":
|
|
55
|
+
if (!customElements.get(tagName)) {
|
|
56
|
+
defineCustomElement$1();
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
} });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { HelperTabs as H, defineCustomElement as d };
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
+
export { HelperAccordion, defineCustomElement as defineCustomElementHelperAccordion } from './helper-accordion.js';
|
|
3
|
+
export { HelperFilters, defineCustomElement as defineCustomElementHelperFilters } from './helper-filters.js';
|
|
4
|
+
export { HelperModal, defineCustomElement as defineCustomElementHelperModal } from './helper-modal.js';
|
|
5
|
+
export { HelperPagination, defineCustomElement as defineCustomElementHelperPagination } from './helper-pagination.js';
|
|
6
|
+
export { HelperTab, defineCustomElement as defineCustomElementHelperTab } from './helper-tab.js';
|
|
7
|
+
export { HelperTabs, defineCustomElement as defineCustomElementHelperTabs } from './helper-tabs.js';
|
|
8
|
+
export { LotteryBullet, defineCustomElement as defineCustomElementLotteryBullet } from './lottery-bullet.js';
|
|
9
|
+
export { LotteryDrawResults, defineCustomElement as defineCustomElementLotteryDrawResults } from './lottery-draw-results.js';
|
|
10
|
+
export { LotteryDrawResultsHistory, defineCustomElement as defineCustomElementLotteryDrawResultsHistory } from './lottery-draw-results-history.js';
|
|
11
|
+
export { LotteryGameDetails, defineCustomElement as defineCustomElementLotteryGameDetails } from './lottery-game-details.js';
|
|
2
12
|
export { LotteryGamePage, defineCustomElement as defineCustomElementLotteryGamePage } from './lottery-game-page.js';
|
|
13
|
+
export { LotteryGrid, defineCustomElement as defineCustomElementLotteryGrid } from './lottery-grid.js';
|
|
14
|
+
export { LotteryTicket, defineCustomElement as defineCustomElementLotteryTicket } from './lottery-ticket.js';
|
|
15
|
+
export { LotteryTicketController, defineCustomElement as defineCustomElementLotteryTicketController } from './lottery-ticket-controller.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const lotteryBulletCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Circle{cursor:pointer;color:#000000;display:block;background:#FFF;border:solid 2px #00958f;height:20px;width:20px;border-radius:50%;margin:0;display:flex;align-items:center;justify-content:center;user-select:none;font-size:12px;font-weight:600;position:relative}.Circle:hover{background:#aee4e2}.Circle.Selected{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{color:#707070;background:#D4D4D4;border:solid 2px #707070;cursor:default}.Circle.DisabledSelected{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 #707070;cursor:default}";
|
|
4
|
+
|
|
5
|
+
const LotteryBullet = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.bulletEvent = createEvent(this, "lotteryBulletSelection", 7);
|
|
11
|
+
/**
|
|
12
|
+
* Value of the bullet
|
|
13
|
+
*/
|
|
14
|
+
this.value = '0';
|
|
15
|
+
/**
|
|
16
|
+
* Marks if the bullet should be selectable
|
|
17
|
+
*/
|
|
18
|
+
this.selectable = true;
|
|
19
|
+
/**
|
|
20
|
+
* Marks if the bullet should be selected
|
|
21
|
+
*/
|
|
22
|
+
this.isSelected = false;
|
|
23
|
+
this.select = () => {
|
|
24
|
+
if (this.selectable) {
|
|
25
|
+
this.isSelected = !this.isSelected;
|
|
26
|
+
this.bulletEvent.emit({
|
|
27
|
+
value: this.value,
|
|
28
|
+
selected: this.isSelected
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return (h("div", { class: 'Circle ' + (this.selectable ? '' : 'Disabled') + (this.isSelected ? 'Selected' : ''), onClick: () => this.select() }, this.value));
|
|
35
|
+
}
|
|
36
|
+
static get style() { return lotteryBulletCss; }
|
|
37
|
+
}, [1, "lottery-bullet", {
|
|
38
|
+
"value": [1],
|
|
39
|
+
"selectable": [4],
|
|
40
|
+
"isSelected": [4, "is-selected"]
|
|
41
|
+
}]);
|
|
42
|
+
function defineCustomElement() {
|
|
43
|
+
if (typeof customElements === "undefined") {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const components = ["lottery-bullet"];
|
|
47
|
+
components.forEach(tagName => { switch (tagName) {
|
|
48
|
+
case "lottery-bullet":
|
|
49
|
+
if (!customElements.get(tagName)) {
|
|
50
|
+
customElements.define(tagName, LotteryBullet);
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
} });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { LotteryBullet as L, defineCustomElement as d };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { L as LotteryDrawResultsHistory$1, d as defineCustomElement$1 } from './lottery-draw-results-history2.js';
|
|
2
|
+
|
|
3
|
+
const LotteryDrawResultsHistory = LotteryDrawResultsHistory$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { LotteryDrawResultsHistory, defineCustomElement };
|