@everymatrix/lottery-game-page 0.1.5 → 0.1.6

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 (124) hide show
  1. package/dist/cjs/helper-accordion_2.cjs.entry.js +126 -0
  2. package/dist/cjs/helper-accordion_2.cjs.entry.js.map +1 -0
  3. package/dist/cjs/{lottery-draw-results.cjs.entry.js → helper-filters_2.cjs.entry.js} +133 -1
  4. package/dist/cjs/helper-filters_2.cjs.entry.js.map +1 -0
  5. package/dist/cjs/helper-modal.cjs.entry.js +3 -1
  6. package/dist/cjs/helper-modal.cjs.entry.js.map +1 -0
  7. package/dist/cjs/helper-pagination.cjs.entry.js +190 -0
  8. package/dist/cjs/helper-pagination.cjs.entry.js.map +1 -0
  9. package/dist/cjs/helper-tab.cjs.entry.js +38 -0
  10. package/dist/cjs/helper-tab.cjs.entry.js.map +1 -0
  11. package/dist/cjs/{index-614098f4.js → index-65086a23.js} +9 -0
  12. package/dist/cjs/index-65086a23.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +2 -0
  14. package/dist/cjs/index.cjs.js.map +1 -0
  15. package/dist/cjs/loader.cjs.js +4 -2
  16. package/dist/cjs/loader.cjs.js.map +1 -0
  17. package/dist/cjs/lottery-draw-results-history.cjs.entry.js +164 -0
  18. package/dist/cjs/lottery-draw-results-history.cjs.entry.js.map +1 -0
  19. package/dist/cjs/lottery-game-details.cjs.entry.js +21 -0
  20. package/dist/cjs/lottery-game-details.cjs.entry.js.map +1 -0
  21. package/dist/cjs/lottery-game-page.cjs.entry.js +3 -4
  22. package/dist/cjs/lottery-game-page.cjs.entry.js.map +1 -0
  23. package/dist/cjs/lottery-game-page.cjs.js +4 -2
  24. package/dist/cjs/lottery-game-page.cjs.js.map +1 -0
  25. package/dist/collection/collection-manifest.json +37 -0
  26. package/dist/collection/components/lottery-game-page/lottery-game-page.js +1 -1
  27. package/dist/collection/components/lottery-game-page/lottery-game-page.js.map +1 -0
  28. package/dist/collection/index.js +1 -0
  29. package/dist/collection/index.js.map +1 -0
  30. package/dist/collection/utils/locale.utils.js +1 -0
  31. package/dist/collection/utils/locale.utils.js.map +1 -0
  32. package/dist/collection/utils/utils.js +1 -0
  33. package/dist/collection/utils/utils.js.map +1 -0
  34. package/dist/components/helper-accordion.js +8 -0
  35. package/dist/components/helper-accordion.js.map +1 -0
  36. package/dist/components/helper-accordion2.js +118 -0
  37. package/dist/components/helper-accordion2.js.map +1 -0
  38. package/dist/components/helper-filters.js +8 -0
  39. package/dist/components/helper-filters.js.map +1 -0
  40. package/dist/components/helper-filters2.js +168 -0
  41. package/dist/components/helper-filters2.js.map +1 -0
  42. package/dist/components/helper-modal.js +2 -0
  43. package/dist/components/helper-modal.js.map +1 -0
  44. package/dist/components/helper-modal2.js +2 -0
  45. package/dist/components/helper-modal2.js.map +1 -0
  46. package/dist/components/helper-pagination.js +218 -0
  47. package/dist/components/helper-pagination.js.map +1 -0
  48. package/dist/components/helper-tab.js +8 -0
  49. package/dist/components/helper-tab.js.map +1 -0
  50. package/dist/components/helper-tab2.js +54 -0
  51. package/dist/components/helper-tab2.js.map +1 -0
  52. package/dist/components/helper-tabs.js +8 -0
  53. package/dist/components/helper-tabs.js.map +1 -0
  54. package/dist/components/helper-tabs2.js +65 -0
  55. package/dist/components/helper-tabs2.js.map +1 -0
  56. package/dist/components/index.js +2 -0
  57. package/dist/components/index.js.map +1 -0
  58. package/dist/components/lottery-draw-results-history.js +8 -0
  59. package/dist/components/lottery-draw-results-history.js.map +1 -0
  60. package/dist/components/lottery-draw-results-history2.js +207 -0
  61. package/dist/components/lottery-draw-results-history2.js.map +1 -0
  62. package/dist/components/lottery-draw-results.js +2 -0
  63. package/dist/components/lottery-draw-results.js.map +1 -0
  64. package/dist/components/lottery-draw-results2.js +2 -0
  65. package/dist/components/lottery-draw-results2.js.map +1 -0
  66. package/dist/components/lottery-game-details.js +8 -0
  67. package/dist/components/lottery-game-details.js.map +1 -0
  68. package/dist/components/lottery-game-details2.js +51 -0
  69. package/dist/components/lottery-game-details2.js.map +1 -0
  70. package/dist/components/lottery-game-page.js +42 -7
  71. package/dist/components/lottery-game-page.js.map +1 -0
  72. package/dist/esm/helper-accordion_2.entry.js +121 -0
  73. package/dist/esm/helper-accordion_2.entry.js.map +1 -0
  74. package/dist/esm/{lottery-draw-results.entry.js → helper-filters_2.entry.js} +133 -2
  75. package/dist/esm/helper-filters_2.entry.js.map +1 -0
  76. package/dist/esm/helper-modal.entry.js +3 -1
  77. package/dist/esm/helper-modal.entry.js.map +1 -0
  78. package/dist/esm/helper-pagination.entry.js +186 -0
  79. package/dist/esm/helper-pagination.entry.js.map +1 -0
  80. package/dist/esm/helper-tab.entry.js +34 -0
  81. package/dist/esm/helper-tab.entry.js.map +1 -0
  82. package/dist/esm/{index-0fa076cd.js → index-11dea618.js} +9 -0
  83. package/dist/esm/index-11dea618.js.map +1 -0
  84. package/dist/esm/index.js +2 -0
  85. package/dist/esm/index.js.map +1 -0
  86. package/dist/esm/loader.js +4 -2
  87. package/dist/esm/loader.js.map +1 -0
  88. package/dist/esm/lottery-draw-results-history.entry.js +160 -0
  89. package/dist/esm/lottery-draw-results-history.entry.js.map +1 -0
  90. package/dist/esm/lottery-game-details.entry.js +17 -0
  91. package/dist/esm/lottery-game-details.entry.js.map +1 -0
  92. package/dist/esm/lottery-game-page.entry.js +3 -4
  93. package/dist/esm/lottery-game-page.entry.js.map +1 -0
  94. package/dist/esm/lottery-game-page.js +4 -2
  95. package/dist/esm/lottery-game-page.js.map +1 -0
  96. package/dist/lottery-game-page/index.esm.js +2 -0
  97. package/dist/lottery-game-page/index.esm.js.map +1 -0
  98. package/dist/lottery-game-page/lottery-game-page.esm.js +2 -1
  99. package/dist/lottery-game-page/lottery-game-page.esm.js.map +1 -0
  100. package/dist/lottery-game-page/p-0ffa81cc.entry.js +2 -0
  101. package/dist/lottery-game-page/p-0ffa81cc.entry.js.map +1 -0
  102. package/dist/lottery-game-page/p-3a9ad86b.js +2 -0
  103. package/dist/lottery-game-page/p-3a9ad86b.js.map +1 -0
  104. package/dist/lottery-game-page/p-3e00e24b.entry.js +2 -0
  105. package/dist/lottery-game-page/p-3e00e24b.entry.js.map +1 -0
  106. package/dist/lottery-game-page/p-4a79f68c.entry.js +2 -0
  107. package/dist/lottery-game-page/p-4a79f68c.entry.js.map +1 -0
  108. package/dist/lottery-game-page/p-978fd922.entry.js +2 -0
  109. package/dist/lottery-game-page/p-978fd922.entry.js.map +1 -0
  110. package/dist/lottery-game-page/p-bd53d31a.entry.js +2 -0
  111. package/dist/lottery-game-page/p-bd53d31a.entry.js.map +1 -0
  112. package/dist/lottery-game-page/p-bfa5e84c.entry.js +2 -0
  113. package/dist/lottery-game-page/p-bfa5e84c.entry.js.map +1 -0
  114. package/dist/lottery-game-page/p-dedb92e5.entry.js +2 -0
  115. package/dist/lottery-game-page/p-dedb92e5.entry.js.map +1 -0
  116. package/dist/lottery-game-page/p-f4592d65.entry.js +2 -0
  117. package/dist/lottery-game-page/p-f4592d65.entry.js.map +1 -0
  118. package/dist/stencil.config.js +7 -1
  119. package/dist/stencil.config.js.map +1 -0
  120. package/package.json +2 -2
  121. package/dist/lottery-game-page/p-2d7ccc96.js +0 -1
  122. package/dist/lottery-game-page/p-6183a920.entry.js +0 -1
  123. package/dist/lottery-game-page/p-9ca649d9.entry.js +0 -1
  124. package/dist/lottery-game-page/p-e98ee83a.entry.js +0 -1
@@ -0,0 +1,190 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-65086a23.js');
6
+
7
+ /**
8
+ * @name isMobile
9
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
10
+ * @param {String} userAgent window.navigator.userAgent
11
+ * @returns {Boolean} true or false
12
+ */
13
+ const isMobile = (userAgent) => {
14
+ return !!(userAgent.toLowerCase().match(/android/i) ||
15
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
16
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
17
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
18
+ };
19
+
20
+ const DEFAULT_LANGUAGE = 'en';
21
+ const SUPPORTED_LANGUAGES = ['ro', 'en'];
22
+ const TRANSLATIONS = {
23
+ en: {
24
+ firstPage: 'First',
25
+ previousPage: 'Previous',
26
+ nextPage: 'Next',
27
+ lastPage: 'Last'
28
+ },
29
+ ro: {
30
+ firstPage: 'Prima',
31
+ previousPage: 'Anterior',
32
+ nextPage: 'Urmatoarea',
33
+ lastPage: 'Ultima'
34
+ },
35
+ };
36
+ const translate = (key, customLang) => {
37
+ const lang = customLang;
38
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
39
+ };
40
+
41
+ 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}}";
42
+
43
+ const HelperPagination = class {
44
+ constructor(hostRef) {
45
+ index.registerInstance(this, hostRef);
46
+ this.hpPageChange = index.createEvent(this, "hpPageChange", 7);
47
+ /**
48
+ * First page boolean value - determines if the page is disabled or active
49
+ */
50
+ this.firstPage = false;
51
+ /**
52
+ * Previous page boolean value - determines if the page is disabled or active
53
+ */
54
+ this.previousPage = false;
55
+ /**
56
+ * The received offset
57
+ */
58
+ this.offset = 0;
59
+ /**
60
+ * The received limit for the number of pages
61
+ */
62
+ this.limit = 1;
63
+ /**
64
+ * The received total number of pages
65
+ */
66
+ this.total = 1;
67
+ /**
68
+ * Language
69
+ */
70
+ this.language = 'en';
71
+ /**
72
+ * In component working variable for the array of pages
73
+ */
74
+ this.pagesArray = [];
75
+ /**
76
+ * In component working variable for last page
77
+ */
78
+ this.endInt = 0;
79
+ this.userAgent = window.navigator.userAgent;
80
+ this.currentPage = 1;
81
+ /**
82
+ * Navigation logic
83
+ */
84
+ this.navigateTo = (navigationPage) => {
85
+ switch (navigationPage) {
86
+ case 'firstPage':
87
+ this.offsetInt = 0;
88
+ break;
89
+ case 'lastPage':
90
+ this.offsetInt = this.endInt * this.limitInt;
91
+ break;
92
+ case 'previousPage':
93
+ this.offsetInt -= 10;
94
+ break;
95
+ case 'nextPage':
96
+ this.offsetInt += 10;
97
+ break;
98
+ case 'fivePagesBack':
99
+ this.offsetInt -= 30;
100
+ this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
101
+ break;
102
+ case 'fivePagesForward':
103
+ this.offsetInt += 30;
104
+ this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
105
+ break;
106
+ }
107
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
108
+ };
109
+ /**
110
+ * Handle navigation from here
111
+ */
112
+ this.paginationNavigation = (pageNumber, index) => {
113
+ if (!isNaN(pageNumber)) {
114
+ if (pageNumber === 1) {
115
+ this.offsetInt = pageNumber - 1;
116
+ }
117
+ else {
118
+ this.offsetInt = (pageNumber - 1) * 10;
119
+ }
120
+ }
121
+ else {
122
+ if (index === 0 && this.currentPage <= 4) {
123
+ this.navigateTo('firstPage');
124
+ }
125
+ else if (index === 0 && this.currentPage > 4) {
126
+ this.navigateTo('fivePagesBack');
127
+ }
128
+ else if (index === 4 && this.endInt - this.currentPage >= 2) {
129
+ this.navigateTo('fivePagesForward');
130
+ }
131
+ }
132
+ this.currentPage = this.offsetInt;
133
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
134
+ };
135
+ }
136
+ componentWillRender() {
137
+ this.offsetInt = this.offset;
138
+ this.currentPage = this.offsetInt / this.limitInt + 1;
139
+ this.limitInt = this.limit;
140
+ this.totalInt = this.total;
141
+ this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
142
+ this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
143
+ /**
144
+ * Construct numbered navigation area based on current page position
145
+ */
146
+ if (this.currentPage === 1 || this.currentPage === 2) {
147
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
148
+ this.pagesArray.push('...');
149
+ }
150
+ else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
151
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
152
+ this.pagesArray.push('...');
153
+ this.pagesArray.unshift('...');
154
+ }
155
+ else if ((this.endInt - this.currentPage) < 3) {
156
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
157
+ this.pagesArray.unshift('...');
158
+ }
159
+ }
160
+ render() {
161
+ /**
162
+ * Center navigation area
163
+ */
164
+ let navigationArea = index.h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index$1) => {
165
+ return (index.h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, index.h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index$1) }, index.h("span", null, item))));
166
+ }));
167
+ /**
168
+ * Left navigation area
169
+ */
170
+ let buttonsLeftSide = index.h("div", { class: "LeftItems" }, index.h("button", { disabled: !this.previousPage, onClick: this.navigateTo.bind(this, 'firstPage') }, translate('firstPage', this.language)), index.h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
171
+ if (isMobile(this.userAgent)) {
172
+ buttonsLeftSide =
173
+ index.h("div", { class: "LeftItems" }, index.h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
174
+ }
175
+ /**
176
+ * Right navigation area
177
+ */
178
+ let buttonsRightSide = index.h("div", { class: "RightItems" }, index.h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)), index.h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'lastPage') }, translate('lastPage', this.language)));
179
+ if (isMobile(this.userAgent)) {
180
+ buttonsRightSide =
181
+ index.h("div", { class: "RightItems" }, index.h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
182
+ }
183
+ return (index.h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
184
+ }
185
+ };
186
+ HelperPagination.style = helperPaginationCss;
187
+
188
+ exports.helper_pagination = HelperPagination;
189
+
190
+ //# sourceMappingURL=helper-pagination.cjs.entry.js.map
@@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E,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnJ,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;MAC5B,gBAAgB;QACdA,OAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAC9BA,OAAC,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KACtJ;IACD,QAAQA,OAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,EAC5C,eAAe,EACf,cAAc,EACd,gBAAgB,CAAC,EAAE;GACtB;;;;;;","names":["h","index"],"sources":["../helper-pagination/dist/collection/utils/utils.js","../helper-pagination/dist/collection/utils/locale.utils.js","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.css?tag=helper-pagination&encapsulation=shadow","../helper-pagination/dist/collection/components/helper-pagination/helper-pagination.js"],"sourcesContent":["export function format(first, middle, last) {\n return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));\n}\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));\n};\n","const DEFAULT_LANGUAGE = 'en';\nconst SUPPORTED_LANGUAGES = ['ro', 'en'];\nconst TRANSLATIONS = {\n en: {\n firstPage: 'First',\n previousPage: 'Previous',\n nextPage: 'Next',\n lastPage: 'Last'\n },\n ro: {\n firstPage: 'Prima',\n previousPage: 'Anterior',\n nextPage: 'Urmatoarea',\n lastPage: 'Ultima'\n },\n};\nexport const translate = (key, customLang) => {\n const lang = customLang;\n return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];\n};\n","@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n display: block;\n font-family: \"Roboto\", sans-serif;\n}\n\n#PaginationContainer {\n width: 100%;\n margin-top: 20px;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.LeftItems button:not(:first-child), .RightItems button:not(:last-child) {\n margin: 0 10px;\n}\n\n.LeftItems button, .RightItems button {\n padding: 0;\n background-color: #009993;\n border-color: #009993;\n}\n\n.PaginationArea {\n display: inline-flex;\n gap: 10px;\n list-style: none;\n}\n\n.PaginationArea li {\n margin: 0;\n padding: 0;\n}\n\n.PaginationArea li button {\n width: 24px;\n height: 24px;\n display: flex;\n border: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n color: #000;\n cursor: pointer;\n pointer-events: all;\n}\n\n.PaginationItem.ActiveItem button {\n background: #009993;\n border-color: #009993;\n color: #fff;\n}\n\n.PaginationItem.ActiveItem button:disabled {\n pointer-events: none;\n cursor: not-allowed;\n}\n\n.PaginationItem button:hover,\n.PaginationItem button:active {\n background: #009993;\n border-color: #009993;\n color: #fff;\n opacity: 0.8;\n}\n\nbutton {\n width: 100px;\n height: 32px;\n border: 1px solid #524e52;\n border-radius: 5px;\n background: #524e52;\n color: #fff;\n font-size: 14px;\n font: inherit;\n cursor: pointer;\n transition: all 0.1s linear;\n text-transform: uppercase;\n text-align: center;\n letter-spacing: 0;\n}\n\nbutton:hover,\nbutton:active {\n background: #004D4A;\n border-color: #004D4A;\n}\n\nbutton:disabled {\n background-color: #ccc;\n border-color: #ccc;\n color: #fff;\n cursor: not-allowed;\n}\n\n@media screen and (max-width: 720px) {\n button {\n width: 90px;\n font-size: 12px;\n }\n}\n@media screen and (max-width: 480px) {\n button {\n width: 70px;\n font-size: 10px;\n }\n\n .paginationArea {\n padding: 5px;\n }\n}\n@media screen and (max-width: 320px) {\n button {\n width: 58px;\n font-size: 10px;\n }\n\n .paginationArea {\n padding: 5px;\n gap: 5px;\n }\n}\n/* fix for issue on hover/visited for mobile devices */\n@media (hover: none) {\n .paginationItem button:hover {\n background: inherit;\n border-color: inherit;\n color: inherit;\n opacity: 1;\n }\n\n .paginationItem.activeItem button:hover {\n background: #009993;\n border-color: #009993;\n color: #fff;\n }\n}","import { Component, h, Event, Prop, State } from '@stencil/core';\nimport { isMobile } from \"../../utils/utils\";\nimport { translate } from '../../utils/locale.utils';\nexport class HelperPagination {\n constructor() {\n /**\n * First page boolean value - determines if the page is disabled or active\n */\n this.firstPage = false;\n /**\n * Previous page boolean value - determines if the page is disabled or active\n */\n this.previousPage = false;\n /**\n * The received offset\n */\n this.offset = 0;\n /**\n * The received limit for the number of pages\n */\n this.limit = 1;\n /**\n * The received total number of pages\n */\n this.total = 1;\n /**\n * Language\n */\n this.language = 'en';\n /**\n * In component working variable for the array of pages\n */\n this.pagesArray = [];\n /**\n * In component working variable for last page\n */\n this.endInt = 0;\n this.userAgent = window.navigator.userAgent;\n this.currentPage = 1;\n /**\n * Navigation logic\n */\n this.navigateTo = (navigationPage) => {\n switch (navigationPage) {\n case 'firstPage':\n this.offsetInt = 0;\n break;\n case 'lastPage':\n this.offsetInt = this.endInt * this.limitInt;\n break;\n case 'previousPage':\n this.offsetInt -= 10;\n break;\n case 'nextPage':\n this.offsetInt += 10;\n break;\n case 'fivePagesBack':\n this.offsetInt -= 30;\n this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;\n break;\n case 'fivePagesForward':\n this.offsetInt += 30;\n this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;\n break;\n }\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n /**\n * Handle navigation from here\n */\n this.paginationNavigation = (pageNumber, index) => {\n if (!isNaN(pageNumber)) {\n if (pageNumber === 1) {\n this.offsetInt = pageNumber - 1;\n }\n else {\n this.offsetInt = (pageNumber - 1) * 10;\n }\n }\n else {\n if (index === 0 && this.currentPage <= 4) {\n this.navigateTo('firstPage');\n }\n else if (index === 0 && this.currentPage > 4) {\n this.navigateTo('fivePagesBack');\n }\n else if (index === 4 && this.endInt - this.currentPage >= 2) {\n this.navigateTo('fivePagesForward');\n }\n }\n this.currentPage = this.offsetInt;\n this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });\n };\n }\n componentWillRender() {\n this.offsetInt = this.offset;\n this.currentPage = this.offsetInt / this.limitInt + 1;\n this.limitInt = this.limit;\n this.totalInt = this.total;\n this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);\n this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;\n /**\n * Construct numbered navigation area based on current page position\n */\n if (this.currentPage === 1 || this.currentPage === 2) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);\n this.pagesArray.push('...');\n }\n else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {\n this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);\n this.pagesArray.push('...');\n this.pagesArray.unshift('...');\n }\n else if ((this.endInt - this.currentPage) < 3) {\n this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);\n this.pagesArray.unshift('...');\n }\n }\n render() {\n /**\n * Center navigation area\n */\n let navigationArea = h(\"ul\", { class: \"PaginationArea\" }, this.pagesArray.map((item, index) => {\n return (h(\"li\", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },\n h(\"button\", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },\n h(\"span\", null, item))));\n }));\n /**\n * Left navigation area\n */\n let buttonsLeftSide = h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: !this.previousPage, onClick: this.navigateTo.bind(this, 'firstPage') }, translate('firstPage', this.language)),\n h(\"button\", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));\n if (isMobile(this.userAgent)) {\n buttonsLeftSide =\n h(\"div\", { class: \"LeftItems\" },\n h(\"button\", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));\n }\n /**\n * Right navigation area\n */\n let buttonsRightSide = h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)),\n h(\"button\", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'lastPage') }, translate('lastPage', this.language)));\n if (isMobile(this.userAgent)) {\n buttonsRightSide =\n h(\"div\", { class: \"RightItems\" },\n h(\"button\", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));\n }\n return (h(\"div\", { id: \"PaginationContainer\" },\n buttonsLeftSide,\n navigationArea,\n buttonsRightSide));\n }\n static get is() { return \"helper-pagination\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-pagination.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-pagination.css\"]\n }; }\n static get properties() { return {\n \"firstPage\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"First page boolean value - determines if the page is disabled or active\"\n },\n \"attribute\": \"first-page\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"previousPage\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Previous page boolean value - determines if the page is disabled or active\"\n },\n \"attribute\": \"previous-page\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"offset\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received offset\"\n },\n \"attribute\": \"offset\",\n \"reflect\": true,\n \"defaultValue\": \"0\"\n },\n \"limit\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received limit for the number of pages\"\n },\n \"attribute\": \"limit\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"total\": {\n \"type\": \"number\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The received total number of pages\"\n },\n \"attribute\": \"total\",\n \"reflect\": true,\n \"defaultValue\": \"1\"\n },\n \"language\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Language\"\n },\n \"attribute\": \"language\",\n \"reflect\": false,\n \"defaultValue\": \"'en'\"\n }\n }; }\n static get states() { return {\n \"offsetInt\": {},\n \"lastPage\": {},\n \"limitInt\": {},\n \"totalInt\": {},\n \"pagesArray\": {},\n \"endInt\": {}\n }; }\n static get events() { return [{\n \"method\": \"hpPageChange\",\n \"name\": \"hpPageChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Event that handles the navigation, updating the offset, limit and total values\"\n },\n \"complexType\": {\n \"original\": \"any\",\n \"resolved\": \"any\",\n \"references\": {}\n }\n }]; }\n}\n"],"version":3}
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-65086a23.js');
6
+
7
+ const helperTabCss = ":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";
8
+
9
+ const HelperTab = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * Selected index
14
+ */
15
+ this.selectedIndex = 0;
16
+ this.tabContent = '';
17
+ }
18
+ connectedCallback() {
19
+ /**
20
+ * fetch(cmsEndpoint + / + / + selectedIndex)
21
+ */
22
+ }
23
+ render() {
24
+ this.tabContent = index.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.");
25
+ if (this.selectedIndex + 1 == 2) {
26
+ this.tabContent = index.h("div", { class: "TabContent" }, 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!")));
27
+ }
28
+ else if (this.selectedIndex + 1 == 3) {
29
+ this.tabContent = index.h("div", { class: "TabContent" }, 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?")));
30
+ }
31
+ return (this.tabContent);
32
+ }
33
+ };
34
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UAAU,EAAE;GAC1B;;;;;;","names":["h"],"sources":["../helper-tabs/dist/collection/components/helper-tab/helper-tab.css?tag=helper-tab&encapsulation=shadow","../helper-tabs/dist/collection/components/helper-tab/helper-tab.js"],"sourcesContent":[":host {\n display: block;\n}\n\n.TabContent {\n font-size: 14px;\n color: #000;\n font-weight: normal;\n}","import { Component, h, Prop, State } from '@stencil/core';\nexport class HelperTab {\n constructor() {\n /**\n * Selected index\n */\n this.selectedIndex = 0;\n this.tabContent = '';\n }\n connectedCallback() {\n /**\n * fetch(cmsEndpoint + / + / + selectedIndex)\n */\n }\n render() {\n 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.\");\n if (this.selectedIndex + 1 == 2) {\n this.tabContent = h(\"div\", { class: \"TabContent\" },\n h(\"ol\", null,\n h(\"li\", null, \"Register or Login\"),\n 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.\"),\n 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!\")));\n }\n else if (this.selectedIndex + 1 == 3) {\n this.tabContent = h(\"div\", { class: \"TabContent\" },\n h(\"ul\", null,\n h(\"li\", null, \"What are my odds of winning?\"),\n h(\"li\", null, \"How can I find out if I\\u2019ve won a draw game?\"),\n h(\"li\", null, \"How do I claim my prize?\")));\n }\n return (this.tabContent);\n }\n static get is() { return \"helper-tab\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() { return {\n \"$\": [\"helper-tab.scss\"]\n }; }\n static get styleUrls() { return {\n \"$\": [\"helper-tab.css\"]\n }; }\n static get properties() { return {\n \"selectedIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Selected index\"\n },\n \"attribute\": \"selected-index\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"cmsEndpoint\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Endpoing for CMS\"\n },\n \"attribute\": \"cms-endpoint\",\n \"reflect\": false\n }\n }; }\n static get states() { return {\n \"tabContent\": {}\n }; }\n}\n"],"version":3}
@@ -619,6 +619,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
619
619
  }
620
620
  }
621
621
  }
622
+ {
623
+ promise = then(promise, () => safeCall(instance, 'componentWillRender'));
624
+ }
622
625
  endSchedule();
623
626
  return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
624
627
  };
@@ -686,7 +689,11 @@ const postUpdateComponent = (hostRef) => {
686
689
  const tagName = hostRef.$cmpMeta$.$tagName$;
687
690
  const elm = hostRef.$hostElement$;
688
691
  const endPostUpdate = createTime('postUpdate', tagName);
692
+ const instance = hostRef.$lazyInstance$ ;
689
693
  const ancestorComponent = hostRef.$ancestorComponent$;
694
+ {
695
+ safeCall(instance, 'componentDidRender');
696
+ }
690
697
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
691
698
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
692
699
  {
@@ -1233,3 +1240,5 @@ exports.getElement = getElement;
1233
1240
  exports.h = h;
1234
1241
  exports.promiseResolve = promiseResolve;
1235
1242
  exports.registerInstance = registerInstance;
1243
+
1244
+ //# sourceMappingURL=index-65086a23.js.map