@everymatrix/lottery-game-details 0.1.6 → 0.1.20
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_4.cjs.entry.js +299 -0
- package/dist/cjs/{index-9d95408f.js → index-0355373c.js} +17 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottery-game-details.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -7
- package/dist/collection/components/lottery-game-details/lottery-game-details.js +80 -5
- package/dist/components/helper-accordion2.js +38 -4
- package/dist/components/helper-tab2.js +39 -5
- package/dist/components/helper-tabs2.js +42 -3
- package/dist/components/lottery-game-details.js +38 -3
- package/dist/esm/helper-accordion_4.entry.js +292 -0
- package/dist/esm/{index-515a97dd.js → index-627fc49c.js} +17 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-game-details.js +2 -2
- package/dist/lottery-game-details/lottery-game-details.esm.js +1 -1
- package/dist/lottery-game-details/p-ca6b7fee.js +1 -0
- package/dist/lottery-game-details/p-ce5b6f5f.entry.js +1 -0
- package/dist/stencil.config.js +0 -2
- package/dist/types/components/lottery-game-details/lottery-game-details.d.ts +13 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +6 -2
- package/dist/cjs/helper-accordion.cjs.entry.js +0 -92
- package/dist/cjs/helper-tab.cjs.entry.js +0 -36
- package/dist/cjs/helper-tabs.cjs.entry.js +0 -38
- package/dist/cjs/lottery-game-details.cjs.entry.js +0 -19
- package/dist/esm/helper-accordion.entry.js +0 -88
- package/dist/esm/helper-tab.entry.js +0 -32
- package/dist/esm/helper-tabs.entry.js +0 -34
- package/dist/esm/lottery-game-details.entry.js +0 -15
- package/dist/lottery-game-details/p-0343b1ff.entry.js +0 -1
- package/dist/lottery-game-details/p-25d74574.entry.js +0 -1
- package/dist/lottery-game-details/p-2c662359.entry.js +0 -1
- package/dist/lottery-game-details/p-703a43dd.js +0 -1
- package/dist/lottery-game-details/p-bd2214ba.entry.js +0 -1
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-0355373c.js');
|
|
6
|
+
|
|
7
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
9
|
+
const TRANSLATIONS = {
|
|
10
|
+
en: {
|
|
11
|
+
deleteTicket: 'Delete ticket'
|
|
12
|
+
},
|
|
13
|
+
ro: {
|
|
14
|
+
deleteTicket: 'Sterge biletul'
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const translate = (key, customLang) => {
|
|
18
|
+
const lang = customLang;
|
|
19
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const helperAccordionCss = "@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}.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}.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}";
|
|
23
|
+
|
|
24
|
+
const Accordion = class {
|
|
25
|
+
constructor(hostRef) {
|
|
26
|
+
index.registerInstance(this, hostRef);
|
|
27
|
+
this.accordionEvent = index.createEvent(this, "helperAccordionAction", 7);
|
|
28
|
+
/**
|
|
29
|
+
* Flag for ticket history
|
|
30
|
+
*/
|
|
31
|
+
this.ticketHistoryFlag = false;
|
|
32
|
+
/**
|
|
33
|
+
* Title (top header)
|
|
34
|
+
*/
|
|
35
|
+
this.headerTitle = '';
|
|
36
|
+
/**
|
|
37
|
+
* SubTitle (top header)
|
|
38
|
+
*/
|
|
39
|
+
this.headerSubtitle = '';
|
|
40
|
+
/**
|
|
41
|
+
* Description
|
|
42
|
+
*/
|
|
43
|
+
this.description = '';
|
|
44
|
+
/**
|
|
45
|
+
* Enables footer content
|
|
46
|
+
*/
|
|
47
|
+
this.footer = false;
|
|
48
|
+
/**
|
|
49
|
+
* Enables footer button for tab deletion
|
|
50
|
+
*/
|
|
51
|
+
this.deleteTab = false;
|
|
52
|
+
/**
|
|
53
|
+
* Activates postMessages as events for actions from the widget
|
|
54
|
+
*/
|
|
55
|
+
this.postMessage = false;
|
|
56
|
+
/**
|
|
57
|
+
* Name of the event emitter by the action button
|
|
58
|
+
*/
|
|
59
|
+
this.eventName = 'helperAccordionAction';
|
|
60
|
+
/**
|
|
61
|
+
* Collapsed
|
|
62
|
+
*/
|
|
63
|
+
this.collapsed = true;
|
|
64
|
+
/**
|
|
65
|
+
* Language
|
|
66
|
+
*/
|
|
67
|
+
this.language = 'en';
|
|
68
|
+
/**
|
|
69
|
+
* Client custom styling via string
|
|
70
|
+
*/
|
|
71
|
+
this.clientStyling = '';
|
|
72
|
+
/**
|
|
73
|
+
* Client custom styling via url content
|
|
74
|
+
*/
|
|
75
|
+
this.clientStylingUrlContent = '';
|
|
76
|
+
this.limitStylingAppends = false;
|
|
77
|
+
this.setClientStyling = () => {
|
|
78
|
+
let sheet = document.createElement('style');
|
|
79
|
+
sheet.innerHTML = this.clientStyling;
|
|
80
|
+
this.stylingContainer.prepend(sheet);
|
|
81
|
+
};
|
|
82
|
+
this.setClientStylingURL = () => {
|
|
83
|
+
let cssFile = document.createElement('style');
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
86
|
+
this.stylingContainer.prepend(cssFile);
|
|
87
|
+
}, 1);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// @TODO fix the `any` type :)
|
|
91
|
+
connectedCallback() {
|
|
92
|
+
this.showContent = !this.collapsed;
|
|
93
|
+
}
|
|
94
|
+
componentDidRender() {
|
|
95
|
+
// start custom styling area
|
|
96
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
97
|
+
if (this.clientStyling)
|
|
98
|
+
this.setClientStyling();
|
|
99
|
+
if (this.clientStylingUrlContent)
|
|
100
|
+
this.setClientStylingURL();
|
|
101
|
+
this.limitStylingAppends = true;
|
|
102
|
+
}
|
|
103
|
+
// end custom styling area
|
|
104
|
+
}
|
|
105
|
+
toggleContent() {
|
|
106
|
+
this.showContent = !this.showContent;
|
|
107
|
+
}
|
|
108
|
+
deleteAction() {
|
|
109
|
+
if (this.postMessage) {
|
|
110
|
+
// @TODO maybe change the name type, this one sucks
|
|
111
|
+
window.postMessage({ type: this.eventName }, window.location.href);
|
|
112
|
+
}
|
|
113
|
+
this.accordionEvent.emit();
|
|
114
|
+
}
|
|
115
|
+
render() {
|
|
116
|
+
return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
117
|
+
index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
118
|
+
index.h("div", null, this.deleteTab &&
|
|
119
|
+
index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
Accordion.style = helperAccordionCss;
|
|
123
|
+
|
|
124
|
+
const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
|
|
125
|
+
|
|
126
|
+
const HelperTab = class {
|
|
127
|
+
constructor(hostRef) {
|
|
128
|
+
index.registerInstance(this, hostRef);
|
|
129
|
+
/**
|
|
130
|
+
* Selected index
|
|
131
|
+
*/
|
|
132
|
+
this.selectedIndex = 0;
|
|
133
|
+
/**
|
|
134
|
+
* Client custom styling via string
|
|
135
|
+
*/
|
|
136
|
+
this.clientStyling = '';
|
|
137
|
+
/**
|
|
138
|
+
* Client custom styling via url content
|
|
139
|
+
*/
|
|
140
|
+
this.clientStylingUrlContent = '';
|
|
141
|
+
this.tabContent = '';
|
|
142
|
+
this.limitStylingAppends = false;
|
|
143
|
+
this.setClientStyling = () => {
|
|
144
|
+
let sheet = document.createElement('style');
|
|
145
|
+
sheet.innerHTML = this.clientStyling;
|
|
146
|
+
this.stylingContainer.prepend(sheet);
|
|
147
|
+
};
|
|
148
|
+
this.setClientStylingURL = () => {
|
|
149
|
+
let cssFile = document.createElement('style');
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
152
|
+
this.stylingContainer.prepend(cssFile);
|
|
153
|
+
}, 1);
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
connectedCallback() {
|
|
157
|
+
/**
|
|
158
|
+
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
159
|
+
*/
|
|
160
|
+
}
|
|
161
|
+
componentDidRender() {
|
|
162
|
+
// start custom styling area
|
|
163
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
164
|
+
if (this.clientStyling)
|
|
165
|
+
this.setClientStyling();
|
|
166
|
+
if (this.clientStylingUrlContent)
|
|
167
|
+
this.setClientStylingURL();
|
|
168
|
+
this.limitStylingAppends = true;
|
|
169
|
+
}
|
|
170
|
+
// end custom styling area
|
|
171
|
+
}
|
|
172
|
+
render() {
|
|
173
|
+
this.tabContent = index.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.");
|
|
174
|
+
if (this.selectedIndex + 1 == 2) {
|
|
175
|
+
this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", null, index.h("li", null, "Register or Login"), index.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."), index.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!")));
|
|
176
|
+
}
|
|
177
|
+
else if (this.selectedIndex + 1 == 3) {
|
|
178
|
+
this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
|
|
179
|
+
}
|
|
180
|
+
return (this.tabContent);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
HelperTab.style = helperTabCss;
|
|
184
|
+
|
|
185
|
+
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}";
|
|
186
|
+
|
|
187
|
+
const HelperTabs = class {
|
|
188
|
+
constructor(hostRef) {
|
|
189
|
+
index.registerInstance(this, hostRef);
|
|
190
|
+
/**
|
|
191
|
+
* Tell me if it is disabled
|
|
192
|
+
*/
|
|
193
|
+
this.disabled = false;
|
|
194
|
+
/**
|
|
195
|
+
* Tell me what tab is selected
|
|
196
|
+
*/
|
|
197
|
+
this.selected = false;
|
|
198
|
+
/**
|
|
199
|
+
* Default selected index
|
|
200
|
+
*/
|
|
201
|
+
this.selectedIndex = 0;
|
|
202
|
+
/**
|
|
203
|
+
* Tabs details
|
|
204
|
+
*/
|
|
205
|
+
this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
|
|
206
|
+
/**
|
|
207
|
+
* Client custom styling via string
|
|
208
|
+
*/
|
|
209
|
+
this.clientStyling = '';
|
|
210
|
+
/**
|
|
211
|
+
* Client custom styling via url
|
|
212
|
+
*/
|
|
213
|
+
this.clientStylingurl = '';
|
|
214
|
+
/**
|
|
215
|
+
* Client custom styling via url content
|
|
216
|
+
*/
|
|
217
|
+
this.clientStylingUrlContent = '';
|
|
218
|
+
this.limitStylingAppends = false;
|
|
219
|
+
this.setClientStyling = () => {
|
|
220
|
+
let sheet = document.createElement('style');
|
|
221
|
+
sheet.innerHTML = this.clientStyling;
|
|
222
|
+
this.stylingContainer.prepend(sheet);
|
|
223
|
+
};
|
|
224
|
+
this.setClientStylingURL = () => {
|
|
225
|
+
let cssFile = document.createElement('style');
|
|
226
|
+
setTimeout(() => {
|
|
227
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
228
|
+
this.stylingContainer.prepend(cssFile);
|
|
229
|
+
}, 1);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
connectedCallback() {
|
|
233
|
+
}
|
|
234
|
+
componentDidRender() {
|
|
235
|
+
// start custom styling area
|
|
236
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
237
|
+
this.setClientStyling();
|
|
238
|
+
if (this.clientStylingUrlContent) {
|
|
239
|
+
this.setClientStylingURL();
|
|
240
|
+
}
|
|
241
|
+
this.limitStylingAppends = true;
|
|
242
|
+
}
|
|
243
|
+
// end custom styling area
|
|
244
|
+
}
|
|
245
|
+
render() {
|
|
246
|
+
return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", null, index.h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
|
|
247
|
+
}
|
|
248
|
+
get host() { return index.getElement(this); }
|
|
249
|
+
};
|
|
250
|
+
HelperTabs.style = helperTabsCss;
|
|
251
|
+
|
|
252
|
+
const lotteryGameDetailsCss = ":host{display:block}";
|
|
253
|
+
|
|
254
|
+
const LotteryGameDetails = class {
|
|
255
|
+
constructor(hostRef) {
|
|
256
|
+
index.registerInstance(this, hostRef);
|
|
257
|
+
/**
|
|
258
|
+
* Client custom styling via string
|
|
259
|
+
*/
|
|
260
|
+
this.clientStyling = '';
|
|
261
|
+
/**
|
|
262
|
+
* Client custom styling via url content
|
|
263
|
+
*/
|
|
264
|
+
this.clientStylingUrlContent = '';
|
|
265
|
+
this.limitStylingAppends = false;
|
|
266
|
+
this.setClientStyling = () => {
|
|
267
|
+
let sheet = document.createElement('style');
|
|
268
|
+
sheet.innerHTML = this.clientStyling;
|
|
269
|
+
this.stylingContainer.prepend(sheet);
|
|
270
|
+
};
|
|
271
|
+
this.setClientStylingURL = () => {
|
|
272
|
+
let cssFile = document.createElement('style');
|
|
273
|
+
setTimeout(() => {
|
|
274
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
275
|
+
this.stylingContainer.prepend(cssFile);
|
|
276
|
+
}, 1);
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
componentDidRender() {
|
|
280
|
+
// start custom styling area
|
|
281
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
282
|
+
if (this.clientStyling)
|
|
283
|
+
this.setClientStyling();
|
|
284
|
+
if (this.clientStylingUrlContent)
|
|
285
|
+
this.setClientStylingURL();
|
|
286
|
+
this.limitStylingAppends = true;
|
|
287
|
+
}
|
|
288
|
+
// end custom styling area
|
|
289
|
+
}
|
|
290
|
+
render() {
|
|
291
|
+
return (index.h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "AccordionContainer", slot: "accordionContent" }, index.h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
LotteryGameDetails.style = lotteryGameDetailsCss;
|
|
295
|
+
|
|
296
|
+
exports.helper_accordion = Accordion;
|
|
297
|
+
exports.helper_tab = HelperTab;
|
|
298
|
+
exports.helper_tabs = HelperTabs;
|
|
299
|
+
exports.lottery_game_details = LotteryGameDetails;
|
|
@@ -234,6 +234,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
234
234
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
235
235
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
236
236
|
}
|
|
237
|
+
else if (memberName === 'ref') {
|
|
238
|
+
// minifier will clean this up
|
|
239
|
+
if (newValue) {
|
|
240
|
+
newValue(elm);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
237
243
|
else if ((!isProp ) &&
|
|
238
244
|
memberName[0] === 'o' &&
|
|
239
245
|
memberName[1] === 'n') {
|
|
@@ -390,6 +396,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
390
396
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
391
397
|
if ((vnode = vnodes[startIdx])) {
|
|
392
398
|
elm = vnode.$elm$;
|
|
399
|
+
callNodeRefs(vnode);
|
|
393
400
|
// remove the vnode's element from the dom
|
|
394
401
|
elm.remove();
|
|
395
402
|
}
|
|
@@ -511,6 +518,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
511
518
|
elm.data = text;
|
|
512
519
|
}
|
|
513
520
|
};
|
|
521
|
+
const callNodeRefs = (vNode) => {
|
|
522
|
+
{
|
|
523
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
524
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
525
|
+
}
|
|
526
|
+
};
|
|
514
527
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
515
528
|
const hostElm = hostRef.$hostElement$;
|
|
516
529
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -648,7 +661,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
648
661
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
649
662
|
const elm = hostRef.$hostElement$;
|
|
650
663
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
664
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
651
665
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
666
|
+
{
|
|
667
|
+
safeCall(instance, 'componentDidRender');
|
|
668
|
+
}
|
|
652
669
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
653
670
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
654
671
|
{
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0355373c.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["helper-
|
|
17
|
+
return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-0355373c.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["helper-
|
|
18
|
+
return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -1,12 +1,46 @@
|
|
|
1
|
-
import { Component, h, } from '@stencil/core';
|
|
1
|
+
import { Component, h, Prop, State, } from '@stencil/core';
|
|
2
2
|
import '@everymatrix/helper-accordion';
|
|
3
3
|
import '@everymatrix/helper-tabs';
|
|
4
4
|
export class LotteryGameDetails {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Client custom styling via string
|
|
8
|
+
*/
|
|
9
|
+
this.clientStyling = '';
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via url content
|
|
12
|
+
*/
|
|
13
|
+
this.clientStylingUrlContent = '';
|
|
14
|
+
this.limitStylingAppends = false;
|
|
15
|
+
this.setClientStyling = () => {
|
|
16
|
+
let sheet = document.createElement('style');
|
|
17
|
+
sheet.innerHTML = this.clientStyling;
|
|
18
|
+
this.stylingContainer.prepend(sheet);
|
|
19
|
+
};
|
|
20
|
+
this.setClientStylingURL = () => {
|
|
21
|
+
let cssFile = document.createElement('style');
|
|
22
|
+
setTimeout(() => {
|
|
23
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
24
|
+
this.stylingContainer.prepend(cssFile);
|
|
25
|
+
}, 1);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
componentDidRender() {
|
|
29
|
+
// start custom styling area
|
|
30
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
31
|
+
if (this.clientStyling)
|
|
32
|
+
this.setClientStyling();
|
|
33
|
+
if (this.clientStylingUrlContent)
|
|
34
|
+
this.setClientStylingURL();
|
|
35
|
+
this.limitStylingAppends = true;
|
|
36
|
+
}
|
|
37
|
+
// end custom styling area
|
|
38
|
+
}
|
|
5
39
|
render() {
|
|
6
|
-
return (h("div",
|
|
7
|
-
h("helper-accordion", { "header-title": "Game Details", collapsed: false },
|
|
8
|
-
h("div", { slot: "accordionContent" },
|
|
9
|
-
h("helper-tabs",
|
|
40
|
+
return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el },
|
|
41
|
+
h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
|
|
42
|
+
h("div", { class: "AccordionContainer", slot: "accordionContent" },
|
|
43
|
+
h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
10
44
|
}
|
|
11
45
|
static get is() { return "lottery-game-details"; }
|
|
12
46
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,4 +50,45 @@ export class LotteryGameDetails {
|
|
|
16
50
|
static get styleUrls() { return {
|
|
17
51
|
"$": ["lottery-game-details.css"]
|
|
18
52
|
}; }
|
|
53
|
+
static get properties() { return {
|
|
54
|
+
"clientStyling": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"mutable": false,
|
|
57
|
+
"complexType": {
|
|
58
|
+
"original": "string",
|
|
59
|
+
"resolved": "string",
|
|
60
|
+
"references": {}
|
|
61
|
+
},
|
|
62
|
+
"required": false,
|
|
63
|
+
"optional": false,
|
|
64
|
+
"docs": {
|
|
65
|
+
"tags": [],
|
|
66
|
+
"text": "Client custom styling via string"
|
|
67
|
+
},
|
|
68
|
+
"attribute": "client-styling",
|
|
69
|
+
"reflect": false,
|
|
70
|
+
"defaultValue": "''"
|
|
71
|
+
},
|
|
72
|
+
"clientStylingUrlContent": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "string",
|
|
77
|
+
"resolved": "string",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": "Client custom styling via url content"
|
|
85
|
+
},
|
|
86
|
+
"attribute": "client-styling-url-content",
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"defaultValue": "''"
|
|
89
|
+
}
|
|
90
|
+
}; }
|
|
91
|
+
static get states() { return {
|
|
92
|
+
"limitStylingAppends": {}
|
|
93
|
+
}; }
|
|
19
94
|
}
|
|
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
|
|
|
15
15
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:
|
|
18
|
+
const helperAccordionCss = "@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}.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}.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}";
|
|
19
19
|
|
|
20
20
|
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
21
21
|
constructor() {
|
|
@@ -63,11 +63,43 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
63
63
|
* Language
|
|
64
64
|
*/
|
|
65
65
|
this.language = 'en';
|
|
66
|
+
/**
|
|
67
|
+
* Client custom styling via string
|
|
68
|
+
*/
|
|
69
|
+
this.clientStyling = '';
|
|
70
|
+
/**
|
|
71
|
+
* Client custom styling via url content
|
|
72
|
+
*/
|
|
73
|
+
this.clientStylingUrlContent = '';
|
|
74
|
+
this.limitStylingAppends = false;
|
|
75
|
+
this.setClientStyling = () => {
|
|
76
|
+
let sheet = document.createElement('style');
|
|
77
|
+
sheet.innerHTML = this.clientStyling;
|
|
78
|
+
this.stylingContainer.prepend(sheet);
|
|
79
|
+
};
|
|
80
|
+
this.setClientStylingURL = () => {
|
|
81
|
+
let cssFile = document.createElement('style');
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
84
|
+
this.stylingContainer.prepend(cssFile);
|
|
85
|
+
}, 1);
|
|
86
|
+
};
|
|
66
87
|
}
|
|
67
88
|
// @TODO fix the `any` type :)
|
|
68
89
|
connectedCallback() {
|
|
69
90
|
this.showContent = !this.collapsed;
|
|
70
91
|
}
|
|
92
|
+
componentDidRender() {
|
|
93
|
+
// start custom styling area
|
|
94
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
95
|
+
if (this.clientStyling)
|
|
96
|
+
this.setClientStyling();
|
|
97
|
+
if (this.clientStylingUrlContent)
|
|
98
|
+
this.setClientStylingURL();
|
|
99
|
+
this.limitStylingAppends = true;
|
|
100
|
+
}
|
|
101
|
+
// end custom styling area
|
|
102
|
+
}
|
|
71
103
|
toggleContent() {
|
|
72
104
|
this.showContent = !this.showContent;
|
|
73
105
|
}
|
|
@@ -79,7 +111,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
111
|
this.accordionEvent.emit();
|
|
80
112
|
}
|
|
81
113
|
render() {
|
|
82
|
-
return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
114
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
|
|
83
115
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
84
116
|
h("div", null, this.deleteTab &&
|
|
85
117
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -96,7 +128,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
96
128
|
"eventName": [1, "event-name"],
|
|
97
129
|
"collapsed": [4],
|
|
98
130
|
"language": [1],
|
|
99
|
-
"
|
|
131
|
+
"clientStyling": [1, "client-styling"],
|
|
132
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
133
|
+
"showContent": [32],
|
|
134
|
+
"limitStylingAppends": [32]
|
|
100
135
|
}]);
|
|
101
136
|
function defineCustomElement() {
|
|
102
137
|
if (typeof customElements === "undefined") {
|
|
@@ -111,6 +146,5 @@ function defineCustomElement() {
|
|
|
111
146
|
break;
|
|
112
147
|
} });
|
|
113
148
|
}
|
|
114
|
-
defineCustomElement();
|
|
115
149
|
|
|
116
150
|
export { Accordion as A, defineCustomElement as d };
|
|
@@ -11,20 +11,52 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
11
11
|
* Selected index
|
|
12
12
|
*/
|
|
13
13
|
this.selectedIndex = 0;
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via string
|
|
16
|
+
*/
|
|
17
|
+
this.clientStyling = '';
|
|
18
|
+
/**
|
|
19
|
+
* Client custom styling via url content
|
|
20
|
+
*/
|
|
21
|
+
this.clientStylingUrlContent = '';
|
|
14
22
|
this.tabContent = '';
|
|
23
|
+
this.limitStylingAppends = false;
|
|
24
|
+
this.setClientStyling = () => {
|
|
25
|
+
let sheet = document.createElement('style');
|
|
26
|
+
sheet.innerHTML = this.clientStyling;
|
|
27
|
+
this.stylingContainer.prepend(sheet);
|
|
28
|
+
};
|
|
29
|
+
this.setClientStylingURL = () => {
|
|
30
|
+
let cssFile = document.createElement('style');
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
33
|
+
this.stylingContainer.prepend(cssFile);
|
|
34
|
+
}, 1);
|
|
35
|
+
};
|
|
15
36
|
}
|
|
16
37
|
connectedCallback() {
|
|
17
38
|
/**
|
|
18
39
|
* fetch(cmsEndpoint + / + / + selectedIndex)
|
|
19
40
|
*/
|
|
20
41
|
}
|
|
42
|
+
componentDidRender() {
|
|
43
|
+
// start custom styling area
|
|
44
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
45
|
+
if (this.clientStyling)
|
|
46
|
+
this.setClientStyling();
|
|
47
|
+
if (this.clientStylingUrlContent)
|
|
48
|
+
this.setClientStylingURL();
|
|
49
|
+
this.limitStylingAppends = true;
|
|
50
|
+
}
|
|
51
|
+
// end custom styling area
|
|
52
|
+
}
|
|
21
53
|
render() {
|
|
22
|
-
this.tabContent = h("div", { class: "TabContent" }, "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.");
|
|
54
|
+
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.");
|
|
23
55
|
if (this.selectedIndex + 1 == 2) {
|
|
24
|
-
this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), 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."), 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!")));
|
|
56
|
+
this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", null, h("li", null, "Register or Login"), 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."), 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!")));
|
|
25
57
|
}
|
|
26
58
|
else if (this.selectedIndex + 1 == 3) {
|
|
27
|
-
this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
|
|
59
|
+
this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
|
|
28
60
|
}
|
|
29
61
|
return (this.tabContent);
|
|
30
62
|
}
|
|
@@ -32,7 +64,10 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
32
64
|
}, [1, "helper-tab", {
|
|
33
65
|
"selectedIndex": [2, "selected-index"],
|
|
34
66
|
"cmsEndpoint": [1, "cms-endpoint"],
|
|
35
|
-
"
|
|
67
|
+
"clientStyling": [1, "client-styling"],
|
|
68
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
69
|
+
"tabContent": [32],
|
|
70
|
+
"limitStylingAppends": [32]
|
|
36
71
|
}]);
|
|
37
72
|
function defineCustomElement() {
|
|
38
73
|
if (typeof customElements === "undefined") {
|
|
@@ -47,6 +82,5 @@ function defineCustomElement() {
|
|
|
47
82
|
break;
|
|
48
83
|
} });
|
|
49
84
|
}
|
|
50
|
-
defineCustomElement();
|
|
51
85
|
|
|
52
86
|
export { HelperTab as H, defineCustomElement as d };
|