@everymatrix/lottery-tickets-history-page 1.16.1

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 (82) hide show
  1. package/dist/cjs/helper-accordion.cjs.entry.js +130 -0
  2. package/dist/cjs/helper-filters.cjs.entry.js +23091 -0
  3. package/dist/cjs/helper-modal.cjs.entry.js +76 -0
  4. package/dist/cjs/helper-pagination.cjs.entry.js +251 -0
  5. package/dist/cjs/index-639fce2a.js +1255 -0
  6. package/dist/cjs/index.cjs.js +2 -0
  7. package/dist/cjs/loader.cjs.js +21 -0
  8. package/dist/cjs/lottery-bullet.cjs.entry.js +73 -0
  9. package/dist/cjs/lottery-draw-results.cjs.entry.js +274 -0
  10. package/dist/cjs/lottery-grid.cjs.entry.js +212 -0
  11. package/dist/cjs/lottery-tickets-history-page.cjs.entry.js +251 -0
  12. package/dist/cjs/lottery-tickets-history-page.cjs.js +19 -0
  13. package/dist/collection/collection-manifest.json +61 -0
  14. package/dist/collection/index.js +1 -0
  15. package/dist/collection/lottery-tickets-history-page/lottery-tickets-history-page.css +82 -0
  16. package/dist/collection/lottery-tickets-history-page/lottery-tickets-history-page.js +412 -0
  17. package/dist/collection/utils/locale.utils.js +36 -0
  18. package/dist/collection/utils/utils.js +3 -0
  19. package/dist/components/helper-accordion.js +6 -0
  20. package/dist/components/helper-accordion2.js +157 -0
  21. package/dist/components/helper-filters.js +6 -0
  22. package/dist/components/helper-filters2.js +23125 -0
  23. package/dist/components/helper-modal.js +6 -0
  24. package/dist/components/helper-modal2.js +94 -0
  25. package/dist/components/helper-pagination.js +6 -0
  26. package/dist/components/helper-pagination2.js +283 -0
  27. package/dist/components/index.d.ts +26 -0
  28. package/dist/components/index.js +1 -0
  29. package/dist/components/lottery-bullet.js +6 -0
  30. package/dist/components/lottery-bullet2.js +92 -0
  31. package/dist/components/lottery-draw-results.js +6 -0
  32. package/dist/components/lottery-draw-results2.js +327 -0
  33. package/dist/components/lottery-grid.js +6 -0
  34. package/dist/components/lottery-grid2.js +246 -0
  35. package/dist/components/lottery-tickets-history-page.d.ts +11 -0
  36. package/dist/components/lottery-tickets-history-page.js +335 -0
  37. package/dist/esm/helper-accordion.entry.js +126 -0
  38. package/dist/esm/helper-filters.entry.js +23087 -0
  39. package/dist/esm/helper-modal.entry.js +72 -0
  40. package/dist/esm/helper-pagination.entry.js +247 -0
  41. package/dist/esm/index-70a1ae1d.js +1229 -0
  42. package/dist/esm/index.js +1 -0
  43. package/dist/esm/loader.js +17 -0
  44. package/dist/esm/lottery-bullet.entry.js +69 -0
  45. package/dist/esm/lottery-draw-results.entry.js +270 -0
  46. package/dist/esm/lottery-grid.entry.js +208 -0
  47. package/dist/esm/lottery-tickets-history-page.entry.js +247 -0
  48. package/dist/esm/lottery-tickets-history-page.js +17 -0
  49. package/dist/esm/polyfills/core-js.js +11 -0
  50. package/dist/esm/polyfills/css-shim.js +1 -0
  51. package/dist/esm/polyfills/dom.js +79 -0
  52. package/dist/esm/polyfills/es5-html-element.js +1 -0
  53. package/dist/esm/polyfills/index.js +34 -0
  54. package/dist/esm/polyfills/system.js +6 -0
  55. package/dist/index.cjs.js +1 -0
  56. package/dist/index.js +1 -0
  57. package/dist/lottery-tickets-history-page/index.esm.js +0 -0
  58. package/dist/lottery-tickets-history-page/lottery-tickets-history-page.esm.js +1 -0
  59. package/dist/lottery-tickets-history-page/p-141ebc44.entry.js +2825 -0
  60. package/dist/lottery-tickets-history-page/p-2cc06a89.entry.js +1 -0
  61. package/dist/lottery-tickets-history-page/p-6b6ac43c.entry.js +1 -0
  62. package/dist/lottery-tickets-history-page/p-99331caf.entry.js +1 -0
  63. package/dist/lottery-tickets-history-page/p-9d11878e.entry.js +1 -0
  64. package/dist/lottery-tickets-history-page/p-b74bc3ba.entry.js +1 -0
  65. package/dist/lottery-tickets-history-page/p-c08a0267.js +1 -0
  66. package/dist/lottery-tickets-history-page/p-d07c573e.entry.js +1 -0
  67. package/dist/lottery-tickets-history-page/p-d3b1745f.entry.js +1 -0
  68. package/dist/stencil.config.js +30 -0
  69. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/lottery-tickets-history-page/.stencil/packages/lottery-tickets-history-page/stencil.config.d.ts +2 -0
  70. package/dist/types/components.d.ts +101 -0
  71. package/dist/types/index.d.ts +1 -0
  72. package/dist/types/lottery-tickets-history-page/lottery-tickets-history-page.d.ts +68 -0
  73. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  74. package/dist/types/utils/locale.utils.d.ts +1 -0
  75. package/dist/types/utils/utils.d.ts +1 -0
  76. package/loader/cdn.js +3 -0
  77. package/loader/index.cjs.js +3 -0
  78. package/loader/index.d.ts +12 -0
  79. package/loader/index.es2017.js +3 -0
  80. package/loader/index.js +4 -0
  81. package/loader/package.json +10 -0
  82. package/package.json +27 -0
@@ -0,0 +1,130 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-639fce2a.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
+ fr: {
17
+ deleteTicket: 'Supprimer le billet'
18
+ },
19
+ ar: {
20
+ deleteTicket: 'حذف التذكرة'
21
+ }
22
+ };
23
+ const translate = (key, customLang) => {
24
+ const lang = customLang;
25
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
26
+ };
27
+
28
+ 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}";
29
+
30
+ const Accordion = class {
31
+ constructor(hostRef) {
32
+ index.registerInstance(this, hostRef);
33
+ this.accordionEvent = index.createEvent(this, "helperAccordionAction", 7);
34
+ /**
35
+ * Flag for ticket history
36
+ */
37
+ this.ticketHistoryFlag = false;
38
+ /**
39
+ * Title (top header)
40
+ */
41
+ this.headerTitle = '';
42
+ /**
43
+ * SubTitle (top header)
44
+ */
45
+ this.headerSubtitle = '';
46
+ /**
47
+ * Description
48
+ */
49
+ this.description = '';
50
+ /**
51
+ * Enables footer content
52
+ */
53
+ this.footer = false;
54
+ /**
55
+ * Enables footer button for tab deletion
56
+ */
57
+ this.deleteTab = false;
58
+ /**
59
+ * Activates postMessages as events for actions from the widget
60
+ */
61
+ this.postMessage = false;
62
+ /**
63
+ * Name of the event emitter by the action button
64
+ */
65
+ this.eventName = 'helperAccordionAction';
66
+ /**
67
+ * Collapsed
68
+ */
69
+ this.collapsed = true;
70
+ /**
71
+ * Language
72
+ */
73
+ this.language = 'en';
74
+ /**
75
+ * Client custom styling via string
76
+ */
77
+ this.clientStyling = '';
78
+ /**
79
+ * Client custom styling via url content
80
+ */
81
+ this.clientStylingUrlContent = '';
82
+ this.limitStylingAppends = false;
83
+ this.setClientStyling = () => {
84
+ let sheet = document.createElement('style');
85
+ sheet.innerHTML = this.clientStyling;
86
+ this.stylingContainer.prepend(sheet);
87
+ };
88
+ this.setClientStylingURL = () => {
89
+ let cssFile = document.createElement('style');
90
+ setTimeout(() => {
91
+ cssFile.innerHTML = this.clientStylingUrlContent;
92
+ this.stylingContainer.prepend(cssFile);
93
+ }, 1);
94
+ };
95
+ }
96
+ // @TODO fix the `any` type :)
97
+ connectedCallback() {
98
+ this.showContent = !this.collapsed;
99
+ }
100
+ componentDidRender() {
101
+ // start custom styling area
102
+ if (!this.limitStylingAppends && this.stylingContainer) {
103
+ if (this.clientStyling)
104
+ this.setClientStyling();
105
+ if (this.clientStylingUrlContent)
106
+ this.setClientStylingURL();
107
+ this.limitStylingAppends = true;
108
+ }
109
+ // end custom styling area
110
+ }
111
+ toggleContent() {
112
+ this.showContent = !this.showContent;
113
+ }
114
+ deleteAction() {
115
+ if (this.postMessage) {
116
+ // @TODO maybe change the name type, this one sucks
117
+ window.postMessage({ type: this.eventName }, window.location.href);
118
+ }
119
+ this.accordionEvent.emit();
120
+ }
121
+ render() {
122
+ 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 &&
123
+ index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
124
+ index.h("div", null, this.deleteTab &&
125
+ index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
126
+ }
127
+ };
128
+ Accordion.style = helperAccordionCss;
129
+
130
+ exports.helper_accordion = Accordion;