@everymatrix/lottery-game-details 1.31.1 → 1.32.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +5 -4
  3. package/dist/cjs/helper-accordion_4.cjs.entry.js +0 -308
  4. package/dist/cjs/index-0355373c.js +0 -1196
  5. package/dist/cjs/index.cjs.js +0 -2
  6. package/dist/cjs/loader.cjs.js +0 -21
  7. package/dist/cjs/lottery-game-details.cjs.js +0 -19
  8. package/dist/collection/collection-manifest.json +0 -26
  9. package/dist/collection/components/lottery-game-details/lottery-game-details.css +0 -3
  10. package/dist/collection/components/lottery-game-details/lottery-game-details.js +0 -94
  11. package/dist/collection/index.js +0 -1
  12. package/dist/collection/utils/utils.js +0 -3
  13. package/dist/components/helper-accordion.js +0 -6
  14. package/dist/components/helper-accordion2.js +0 -159
  15. package/dist/components/helper-tab.js +0 -6
  16. package/dist/components/helper-tab2.js +0 -86
  17. package/dist/components/helper-tabs.js +0 -6
  18. package/dist/components/helper-tabs2.js +0 -102
  19. package/dist/components/index.d.ts +0 -26
  20. package/dist/components/index.js +0 -1
  21. package/dist/components/lottery-game-details.d.ts +0 -11
  22. package/dist/components/lottery-game-details.js +0 -87
  23. package/dist/esm/helper-accordion_4.entry.js +0 -301
  24. package/dist/esm/index-627fc49c.js +0 -1169
  25. package/dist/esm/index.js +0 -1
  26. package/dist/esm/loader.js +0 -17
  27. package/dist/esm/lottery-game-details.js +0 -17
  28. package/dist/esm/polyfills/core-js.js +0 -11
  29. package/dist/esm/polyfills/css-shim.js +0 -1
  30. package/dist/esm/polyfills/dom.js +0 -79
  31. package/dist/esm/polyfills/es5-html-element.js +0 -1
  32. package/dist/esm/polyfills/index.js +0 -34
  33. package/dist/esm/polyfills/system.js +0 -6
  34. package/dist/index.cjs.js +0 -1
  35. package/dist/index.js +0 -1
  36. package/dist/lottery-game-details/index.esm.js +0 -0
  37. package/dist/lottery-game-details/lottery-game-details.esm.js +0 -1
  38. package/dist/lottery-game-details/p-2f7fadf1.entry.js +0 -1
  39. package/dist/lottery-game-details/p-ca6b7fee.js +0 -1
  40. package/dist/stencil.config.js +0 -22
  41. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/lottery-game-details/.stencil/packages/lottery-game-details/stencil.config.d.ts +0 -2
  42. package/dist/types/components/lottery-game-details/lottery-game-details.d.ts +0 -18
  43. package/dist/types/components.d.ts +0 -53
  44. package/dist/types/index.d.ts +0 -1
  45. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  46. package/dist/types/utils/utils.d.ts +0 -1
  47. package/loader/cdn.js +0 -3
  48. package/loader/index.cjs.js +0 -3
  49. package/loader/index.d.ts +0 -12
  50. package/loader/index.es2017.js +0 -3
  51. package/loader/index.js +0 -4
  52. package/loader/package.json +0 -10
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-game-details",
3
- "version": "1.31.1",
3
+ "version": "1.32.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -17,7 +17,8 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@everymatrix/helper-accordion": "*",
21
- "@everymatrix/helper-tabs": "*"
22
- }
20
+ "@everymatrix/helper-accordion": "^1.32.4",
21
+ "@everymatrix/helper-tabs": "^1.32.4"
22
+ },
23
+ "gitHead": "69a4e0bb1b0460c07baef352d283492a6e2dc4b0"
23
24
  }
@@ -1,308 +0,0 @@
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', 'hr'];
9
- const TRANSLATIONS = {
10
- en: {
11
- deleteTicket: 'Delete ticket'
12
- },
13
- ro: {
14
- deleteTicket: 'Sterge biletul'
15
- },
16
- fr: {
17
- deleteTicket: 'Supprimer le billet'
18
- },
19
- ar: {
20
- deleteTicket: 'حذف التذكرة'
21
- },
22
- hr: {
23
- deleteTicket: 'Izbriši listić'
24
- }
25
- };
26
- const translate = (key, customLang) => {
27
- const lang = customLang;
28
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
29
- };
30
-
31
- 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;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}";
32
-
33
- const Accordion = class {
34
- constructor(hostRef) {
35
- index.registerInstance(this, hostRef);
36
- this.accordionEvent = index.createEvent(this, "helperAccordionAction", 7);
37
- /**
38
- * Flag for ticket history
39
- */
40
- this.ticketHistoryFlag = false;
41
- /**
42
- * Title (top header)
43
- */
44
- this.headerTitle = '';
45
- /**
46
- * SubTitle (top header)
47
- */
48
- this.headerSubtitle = '';
49
- /**
50
- * Description
51
- */
52
- this.description = '';
53
- /**
54
- * Enables footer content
55
- */
56
- this.footer = false;
57
- /**
58
- * Enables footer button for tab deletion
59
- */
60
- this.deleteTab = false;
61
- /**
62
- * Activates postMessages as events for actions from the widget
63
- */
64
- this.postMessage = false;
65
- /**
66
- * Name of the event emitter by the action button
67
- */
68
- this.eventName = 'helperAccordionAction';
69
- /**
70
- * Collapsed
71
- */
72
- this.collapsed = true;
73
- /**
74
- * Language
75
- */
76
- this.language = 'en';
77
- /**
78
- * Client custom styling via string
79
- */
80
- this.clientStyling = '';
81
- /**
82
- * Client custom styling via url content
83
- */
84
- this.clientStylingUrlContent = '';
85
- this.limitStylingAppends = false;
86
- this.setClientStyling = () => {
87
- let sheet = document.createElement('style');
88
- sheet.innerHTML = this.clientStyling;
89
- this.stylingContainer.prepend(sheet);
90
- };
91
- this.setClientStylingURL = () => {
92
- let cssFile = document.createElement('style');
93
- setTimeout(() => {
94
- cssFile.innerHTML = this.clientStylingUrlContent;
95
- this.stylingContainer.prepend(cssFile);
96
- }, 1);
97
- };
98
- }
99
- // @TODO fix the `any` type :)
100
- connectedCallback() {
101
- this.showContent = !this.collapsed;
102
- }
103
- componentDidRender() {
104
- // start custom styling area
105
- if (!this.limitStylingAppends && this.stylingContainer) {
106
- if (this.clientStyling)
107
- this.setClientStyling();
108
- if (this.clientStylingUrlContent)
109
- this.setClientStylingURL();
110
- this.limitStylingAppends = true;
111
- }
112
- // end custom styling area
113
- }
114
- toggleContent() {
115
- this.showContent = !this.showContent;
116
- }
117
- deleteAction() {
118
- if (this.postMessage) {
119
- // @TODO maybe change the name type, this one sucks
120
- window.postMessage({ type: this.eventName }, window.location.href);
121
- }
122
- this.accordionEvent.emit();
123
- }
124
- render() {
125
- return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, 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" }, this.showContent ? '<' : '>')), this.showContent &&
126
- index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
127
- index.h("div", null, this.deleteTab &&
128
- index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
129
- }
130
- };
131
- Accordion.style = helperAccordionCss;
132
-
133
- const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
134
-
135
- const HelperTab = class {
136
- constructor(hostRef) {
137
- index.registerInstance(this, hostRef);
138
- /**
139
- * Selected index
140
- */
141
- this.selectedIndex = 0;
142
- /**
143
- * Client custom styling via string
144
- */
145
- this.clientStyling = '';
146
- /**
147
- * Client custom styling via url content
148
- */
149
- this.clientStylingUrlContent = '';
150
- this.tabContent = '';
151
- this.limitStylingAppends = false;
152
- this.setClientStyling = () => {
153
- let sheet = document.createElement('style');
154
- sheet.innerHTML = this.clientStyling;
155
- this.stylingContainer.prepend(sheet);
156
- };
157
- this.setClientStylingURL = () => {
158
- let cssFile = document.createElement('style');
159
- setTimeout(() => {
160
- cssFile.innerHTML = this.clientStylingUrlContent;
161
- this.stylingContainer.prepend(cssFile);
162
- }, 1);
163
- };
164
- }
165
- connectedCallback() {
166
- /**
167
- * fetch(cmsEndpoint + / + / + selectedIndex)
168
- */
169
- }
170
- componentDidRender() {
171
- // start custom styling area
172
- if (!this.limitStylingAppends && this.stylingContainer) {
173
- if (this.clientStyling)
174
- this.setClientStyling();
175
- if (this.clientStylingUrlContent)
176
- this.setClientStylingURL();
177
- this.limitStylingAppends = true;
178
- }
179
- // end custom styling area
180
- }
181
- render() {
182
- 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.");
183
- if (this.selectedIndex + 1 == 2) {
184
- 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!")));
185
- }
186
- else if (this.selectedIndex + 1 == 3) {
187
- 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?")));
188
- }
189
- return (this.tabContent);
190
- }
191
- };
192
- HelperTab.style = helperTabCss;
193
-
194
- 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}";
195
-
196
- const HelperTabs = class {
197
- constructor(hostRef) {
198
- index.registerInstance(this, hostRef);
199
- /**
200
- * Tell me if it is disabled
201
- */
202
- this.disabled = false;
203
- /**
204
- * Tell me what tab is selected
205
- */
206
- this.selected = false;
207
- /**
208
- * Default selected index
209
- */
210
- this.selectedIndex = 0;
211
- /**
212
- * Tabs details
213
- */
214
- this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
215
- /**
216
- * Client custom styling via string
217
- */
218
- this.clientStyling = '';
219
- /**
220
- * Client custom styling via url
221
- */
222
- this.clientStylingurl = '';
223
- /**
224
- * Client custom styling via url content
225
- */
226
- this.clientStylingUrlContent = '';
227
- this.limitStylingAppends = false;
228
- this.setClientStyling = () => {
229
- let sheet = document.createElement('style');
230
- sheet.innerHTML = this.clientStyling;
231
- this.stylingContainer.prepend(sheet);
232
- };
233
- this.setClientStylingURL = () => {
234
- let cssFile = document.createElement('style');
235
- setTimeout(() => {
236
- cssFile.innerHTML = this.clientStylingUrlContent;
237
- this.stylingContainer.prepend(cssFile);
238
- }, 1);
239
- };
240
- }
241
- connectedCallback() {
242
- }
243
- componentDidRender() {
244
- // start custom styling area
245
- if (!this.limitStylingAppends && this.stylingContainer) {
246
- this.setClientStyling();
247
- if (this.clientStylingUrlContent) {
248
- this.setClientStylingURL();
249
- }
250
- this.limitStylingAppends = true;
251
- }
252
- // end custom styling area
253
- }
254
- render() {
255
- 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 }))));
256
- }
257
- get host() { return index.getElement(this); }
258
- };
259
- HelperTabs.style = helperTabsCss;
260
-
261
- const lotteryGameDetailsCss = ":host{display:block}";
262
-
263
- const LotteryGameDetails = class {
264
- constructor(hostRef) {
265
- index.registerInstance(this, hostRef);
266
- /**
267
- * Client custom styling via string
268
- */
269
- this.clientStyling = '';
270
- /**
271
- * Client custom styling via url content
272
- */
273
- this.clientStylingUrlContent = '';
274
- this.limitStylingAppends = false;
275
- this.setClientStyling = () => {
276
- let sheet = document.createElement('style');
277
- sheet.innerHTML = this.clientStyling;
278
- this.stylingContainer.prepend(sheet);
279
- };
280
- this.setClientStylingURL = () => {
281
- let cssFile = document.createElement('style');
282
- setTimeout(() => {
283
- cssFile.innerHTML = this.clientStylingUrlContent;
284
- this.stylingContainer.prepend(cssFile);
285
- }, 1);
286
- };
287
- }
288
- componentDidRender() {
289
- // start custom styling area
290
- if (!this.limitStylingAppends && this.stylingContainer) {
291
- if (this.clientStyling)
292
- this.setClientStyling();
293
- if (this.clientStylingUrlContent)
294
- this.setClientStylingURL();
295
- this.limitStylingAppends = true;
296
- }
297
- // end custom styling area
298
- }
299
- render() {
300
- 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 })))));
301
- }
302
- };
303
- LotteryGameDetails.style = lotteryGameDetailsCss;
304
-
305
- exports.helper_accordion = Accordion;
306
- exports.helper_tab = HelperTab;
307
- exports.helper_tabs = HelperTabs;
308
- exports.lottery_game_details = LotteryGameDetails;