@everymatrix/lottery-game-page 0.1.27 → 1.0.69

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 (113) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/{helper-filters_2.cjs.entry.js → helper-accordion_13.cjs.entry.js} +13401 -9890
  3. package/dist/cjs/helper-pagination.cjs.entry.js +197 -189
  4. package/dist/cjs/index-f3851683.js +1345 -0
  5. package/dist/cjs/loader.cjs.js +7 -13
  6. package/dist/cjs/lottery-game-page.cjs.js +17 -11
  7. package/dist/collection/collection-manifest.json +4 -10
  8. package/dist/collection/components/lottery-game-page/index.js +1 -0
  9. package/dist/collection/components/lottery-game-page/lottery-game-page.css +11 -2
  10. package/dist/collection/components/lottery-game-page/lottery-game-page.js +579 -594
  11. package/dist/collection/utils/locale.utils.js +118 -95
  12. package/dist/collection/utils/utils.js +4 -4
  13. package/dist/esm/app-globals-0f993ce5.js +3 -0
  14. package/dist/esm/{helper-filters_2.entry.js → helper-accordion_13.entry.js} +13391 -9891
  15. package/dist/esm/helper-pagination.entry.js +197 -189
  16. package/dist/esm/index-8248702b.js +1316 -0
  17. package/dist/esm/loader.js +7 -13
  18. package/dist/esm/lottery-game-page.js +14 -11
  19. package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
  20. package/dist/lottery-game-page/p-46aaa562.entry.js +1 -0
  21. package/dist/lottery-game-page/p-8f2c63c7.js +2 -0
  22. package/dist/lottery-game-page/p-bd89bbf0.entry.js +3567 -0
  23. package/dist/lottery-game-page/p-e1255160.js +1 -0
  24. package/dist/stencil.config.dev.js +17 -0
  25. package/dist/stencil.config.js +14 -42
  26. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
  27. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
  28. package/dist/types/components/lottery-game-page/index.d.ts +1 -0
  29. package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +99 -90
  30. package/dist/types/components.d.ts +28 -2
  31. package/dist/types/stencil-public-runtime.d.ts +142 -33
  32. package/loader/cdn.js +1 -3
  33. package/loader/index.cjs.js +1 -3
  34. package/loader/index.d.ts +13 -1
  35. package/loader/index.es2017.js +1 -3
  36. package/loader/index.js +1 -3
  37. package/loader/package.json +1 -0
  38. package/package.json +13 -7
  39. package/dist/cjs/helper-accordion.cjs.entry.js +0 -124
  40. package/dist/cjs/helper-modal.cjs.entry.js +0 -76
  41. package/dist/cjs/helper-tab.cjs.entry.js +0 -68
  42. package/dist/cjs/helper-tabs.cjs.entry.js +0 -74
  43. package/dist/cjs/index-cd44e726.js +0 -1324
  44. package/dist/cjs/lottery-bullet_2.cjs.entry.js +0 -270
  45. package/dist/cjs/lottery-draw-results-history.cjs.entry.js +0 -198
  46. package/dist/cjs/lottery-game-details.cjs.entry.js +0 -51
  47. package/dist/cjs/lottery-game-page.cjs.entry.js +0 -427
  48. package/dist/cjs/lottery-ticket-controller.cjs.entry.js +0 -116
  49. package/dist/cjs/lottery-ticket.cjs.entry.js +0 -201
  50. package/dist/collection/components/lottery-game-page/assets/chrono_desktop.png +0 -0
  51. package/dist/collection/components/lottery-game-page/assets/chrono_lottery_mobile.png +0 -0
  52. package/dist/components/helper-accordion.js +0 -6
  53. package/dist/components/helper-accordion2.js +0 -151
  54. package/dist/components/helper-filters.js +0 -6
  55. package/dist/components/helper-filters2.js +0 -22394
  56. package/dist/components/helper-modal.js +0 -6
  57. package/dist/components/helper-modal2.js +0 -94
  58. package/dist/components/helper-pagination.js +0 -251
  59. package/dist/components/helper-tab.js +0 -6
  60. package/dist/components/helper-tab2.js +0 -87
  61. package/dist/components/helper-tabs.js +0 -6
  62. package/dist/components/helper-tabs2.js +0 -103
  63. package/dist/components/index.d.ts +0 -26
  64. package/dist/components/index.js +0 -1
  65. package/dist/components/lottery-bullet.js +0 -6
  66. package/dist/components/lottery-bullet2.js +0 -92
  67. package/dist/components/lottery-draw-results-history.js +0 -6
  68. package/dist/components/lottery-draw-results-history2.js +0 -256
  69. package/dist/components/lottery-draw-results.js +0 -6
  70. package/dist/components/lottery-draw-results2.js +0 -335
  71. package/dist/components/lottery-game-details.js +0 -6
  72. package/dist/components/lottery-game-details2.js +0 -85
  73. package/dist/components/lottery-game-page.d.ts +0 -11
  74. package/dist/components/lottery-game-page.js +0 -542
  75. package/dist/components/lottery-grid.js +0 -6
  76. package/dist/components/lottery-grid2.js +0 -237
  77. package/dist/components/lottery-ticket-controller.js +0 -6
  78. package/dist/components/lottery-ticket-controller2.js +0 -168
  79. package/dist/components/lottery-ticket.js +0 -6
  80. package/dist/components/lottery-ticket2.js +0 -244
  81. package/dist/esm/helper-accordion.entry.js +0 -120
  82. package/dist/esm/helper-modal.entry.js +0 -72
  83. package/dist/esm/helper-tab.entry.js +0 -64
  84. package/dist/esm/helper-tabs.entry.js +0 -70
  85. package/dist/esm/index-d1baacd4.js +0 -1296
  86. package/dist/esm/lottery-bullet_2.entry.js +0 -265
  87. package/dist/esm/lottery-draw-results-history.entry.js +0 -194
  88. package/dist/esm/lottery-game-details.entry.js +0 -47
  89. package/dist/esm/lottery-game-page.entry.js +0 -423
  90. package/dist/esm/lottery-ticket-controller.entry.js +0 -112
  91. package/dist/esm/lottery-ticket.entry.js +0 -197
  92. package/dist/esm/polyfills/core-js.js +0 -11
  93. package/dist/esm/polyfills/css-shim.js +0 -1
  94. package/dist/esm/polyfills/dom.js +0 -79
  95. package/dist/esm/polyfills/es5-html-element.js +0 -1
  96. package/dist/esm/polyfills/index.js +0 -34
  97. package/dist/esm/polyfills/system.js +0 -6
  98. package/dist/lottery-game-page/assets/chrono_desktop.png +0 -0
  99. package/dist/lottery-game-page/assets/chrono_lottery_mobile.png +0 -0
  100. package/dist/lottery-game-page/p-023325a2.entry.js +0 -1
  101. package/dist/lottery-game-page/p-04fbc8fd.entry.js +0 -1
  102. package/dist/lottery-game-page/p-256b151c.entry.js +0 -1
  103. package/dist/lottery-game-page/p-381b5507.entry.js +0 -1
  104. package/dist/lottery-game-page/p-3f8b6ad9.entry.js +0 -1
  105. package/dist/lottery-game-page/p-4274053c.entry.js +0 -1
  106. package/dist/lottery-game-page/p-4f81cd37.entry.js +0 -1
  107. package/dist/lottery-game-page/p-5c389034.entry.js +0 -1
  108. package/dist/lottery-game-page/p-ca8430a0.entry.js +0 -2849
  109. package/dist/lottery-game-page/p-d6f76e8d.entry.js +0 -1
  110. package/dist/lottery-game-page/p-e765c7d9.js +0 -1
  111. package/dist/lottery-game-page/p-ea251208.entry.js +0 -1
  112. package/dist/lottery-game-page/p-f6fcc22c.entry.js +0 -1
  113. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-cd44e726.js');
5
+ const index = require('./index-f3851683.js');
6
6
 
7
7
  /**
8
8
  * @name isMobile
@@ -11,210 +11,218 @@ const index = require('./index-cd44e726.js');
11
11
  * @returns {Boolean} true or false
12
12
  */
13
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));
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
18
  };
19
19
 
20
20
  const DEFAULT_LANGUAGE = 'en';
21
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
21
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hu', 'hr'];
22
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
- },
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
+ fr: {
36
+ firstPage: 'First',
37
+ previousPage: 'Previous',
38
+ nextPage: 'Next',
39
+ lastPage: 'Last'
40
+ },
41
+ ar: {
42
+ firstPage: 'First',
43
+ previousPage: 'Previous',
44
+ nextPage: 'Next',
45
+ lastPage: 'Last'
46
+ },
47
+ hu: {
48
+ firstPage: 'First',
49
+ previousPage: 'Previous',
50
+ nextPage: 'Következő',
51
+ lastPage: 'Last'
52
+ },
53
+ hr: {
54
+ firstPage: 'Prva',
55
+ previousPage: 'Prethodna',
56
+ nextPage: 'Slijedeća',
57
+ lastPage: 'Zadnja'
58
+ }
35
59
  };
36
60
  const translate = (key, customLang) => {
37
- const lang = customLang;
38
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
61
+ const lang = customLang;
62
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
39
63
  };
40
64
 
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}}";
65
+ 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:20px 0;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:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.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}}";
66
+ const HelperPaginationStyle0 = helperPaginationCss;
42
67
 
43
68
  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
- * Client custom styling via string
73
- */
74
- this.clientStyling = '';
75
- /**
76
- * Client custom styling via url content
77
- */
78
- this.clientStylingUrlContent = '';
79
- /**
80
- * In component working variable for the array of pages
81
- */
82
- this.pagesArray = [];
83
- /**
84
- * In component working variable for last page
85
- */
86
- this.endInt = 0;
87
- this.userAgent = window.navigator.userAgent;
88
- this.currentPage = 1;
89
- this.limitStylingAppends = false;
90
- /**
91
- * Navigation logic
92
- */
93
- this.navigateTo = (navigationPage) => {
94
- switch (navigationPage) {
95
- case 'firstPage':
96
- this.offsetInt = 0;
97
- break;
98
- case 'lastPage':
99
- this.offsetInt = this.endInt * this.limitInt;
100
- break;
101
- case 'previousPage':
102
- this.offsetInt -= 10;
103
- break;
104
- case 'nextPage':
105
- this.offsetInt += 10;
106
- break;
107
- case 'fivePagesBack':
108
- this.offsetInt -= 30;
109
- this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
110
- break;
111
- case 'fivePagesForward':
112
- this.offsetInt += 30;
113
- this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
114
- break;
115
- }
116
- this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
117
- };
118
- /**
119
- * Handle navigation from here
120
- */
121
- this.paginationNavigation = (pageNumber, index) => {
122
- if (!isNaN(pageNumber)) {
123
- if (pageNumber === 1) {
124
- this.offsetInt = pageNumber - 1;
125
- }
126
- else {
127
- this.offsetInt = (pageNumber - 1) * 10;
128
- }
129
- }
130
- else {
131
- if (index === 0 && this.currentPage <= 4) {
132
- this.navigateTo('firstPage');
69
+ constructor(hostRef) {
70
+ index.registerInstance(this, hostRef);
71
+ this.hpPageChange = index.createEvent(this, "hpPageChange", 7);
72
+ this.userAgent = window.navigator.userAgent;
73
+ this.currentPage = 1;
74
+ /**
75
+ * Navigation logic
76
+ */
77
+ this.navigateTo = (navigationPage) => {
78
+ switch (navigationPage) {
79
+ case 'firstPage':
80
+ this.offsetInt = 0;
81
+ break;
82
+ case 'lastPage':
83
+ this.offsetInt = this.endInt * this.limitInt;
84
+ break;
85
+ case 'previousPage':
86
+ this.offsetInt -= this.limitInt;
87
+ break;
88
+ case 'nextPage':
89
+ this.offsetInt += this.limitInt;
90
+ break;
91
+ case 'fivePagesBack':
92
+ this.offsetInt -= this.limitInt * 5;
93
+ this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
94
+ break;
95
+ case 'fivePagesForward':
96
+ this.offsetInt += this.limitInt * 5;
97
+ this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
98
+ break;
99
+ }
100
+ this.previousPage = !this.offsetInt ? false : true;
101
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
102
+ };
103
+ /**
104
+ * Handle navigation from here
105
+ */
106
+ this.paginationNavigation = (pageNumber, index) => {
107
+ this.previousPage = true;
108
+ if (!isNaN(pageNumber)) {
109
+ if (pageNumber === 1) {
110
+ this.offsetInt = pageNumber - 1;
111
+ this.previousPage = false;
112
+ }
113
+ else {
114
+ this.offsetInt = (pageNumber - 1) * this.limitInt;
115
+ }
116
+ }
117
+ else {
118
+ if (index === 0 && this.currentPage <= 4) {
119
+ this.navigateTo('firstPage');
120
+ }
121
+ else if (index === 0 && this.currentPage > 4) {
122
+ this.navigateTo('fivePagesBack');
123
+ }
124
+ else if (index === 4 && this.endInt - this.currentPage >= 2) {
125
+ this.navigateTo('fivePagesForward');
126
+ }
127
+ }
128
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
129
+ };
130
+ this.setClientStyling = () => {
131
+ let sheet = document.createElement('style');
132
+ sheet.innerHTML = this.clientStyling;
133
+ this.stylingContainer.prepend(sheet);
134
+ };
135
+ this.setClientStylingURL = () => {
136
+ let cssFile = document.createElement('style');
137
+ setTimeout(() => {
138
+ cssFile.innerHTML = this.clientStylingUrlContent;
139
+ this.stylingContainer.prepend(cssFile);
140
+ }, 1);
141
+ };
142
+ this.nextPage = '';
143
+ this.prevPage = '';
144
+ this.offset = 0;
145
+ this.limit = 1;
146
+ this.total = 1;
147
+ this.language = 'en';
148
+ this.clientStyling = '';
149
+ this.clientStylingUrlContent = '';
150
+ this.arrowsActive = undefined;
151
+ this.secondaryArrowsActive = undefined;
152
+ this.numberedNavActive = undefined;
153
+ this.offsetInt = undefined;
154
+ this.lastPage = false;
155
+ this.previousPage = false;
156
+ this.limitInt = undefined;
157
+ this.totalInt = undefined;
158
+ this.pagesArray = [];
159
+ this.endInt = 0;
160
+ this.limitStylingAppends = false;
161
+ }
162
+ componentWillRender() {
163
+ this.offsetInt = this.offset;
164
+ this.limitInt = this.limit;
165
+ this.currentPage = (this.offsetInt / this.limitInt) + 1;
166
+ this.limitInt = this.limit;
167
+ this.totalInt = this.total;
168
+ this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
169
+ this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
170
+ /**
171
+ * Construct numbered navigation area based on current page position
172
+ */
173
+ if (this.currentPage == 1 || this.currentPage == 2) {
174
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
175
+ this.pagesArray.push('...');
133
176
  }
134
- else if (index === 0 && this.currentPage > 4) {
135
- this.navigateTo('fivePagesBack');
177
+ else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
178
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
179
+ this.pagesArray.push('...');
180
+ this.pagesArray.unshift('...');
136
181
  }
137
- else if (index === 4 && this.endInt - this.currentPage >= 2) {
138
- this.navigateTo('fivePagesForward');
182
+ else if ((this.endInt - this.currentPage) < 3) {
183
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
184
+ this.pagesArray.unshift('...');
139
185
  }
140
- }
141
- this.currentPage = this.offsetInt;
142
- this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
143
- };
144
- this.setClientStyling = () => {
145
- let sheet = document.createElement('style');
146
- sheet.innerHTML = this.clientStyling;
147
- this.stylingContainer.prepend(sheet);
148
- };
149
- this.setClientStylingURL = () => {
150
- let cssFile = document.createElement('style');
151
- setTimeout(() => {
152
- cssFile.innerHTML = this.clientStylingUrlContent;
153
- this.stylingContainer.prepend(cssFile);
154
- }, 1);
155
- };
156
- }
157
- componentWillRender() {
158
- this.offsetInt = this.offset;
159
- this.currentPage = this.offsetInt / this.limitInt + 1;
160
- this.limitInt = this.limit;
161
- this.totalInt = this.total;
162
- this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
163
- this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
164
- /**
165
- * Construct numbered navigation area based on current page position
166
- */
167
- if (this.currentPage === 1 || this.currentPage === 2) {
168
- this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
169
- this.pagesArray.push('...');
170
- }
171
- else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
172
- this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
173
- this.pagesArray.push('...');
174
- this.pagesArray.unshift('...');
175
186
  }
176
- else if ((this.endInt - this.currentPage) < 3) {
177
- this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
178
- this.pagesArray.unshift('...');
179
- }
180
- }
181
- componentDidRender() {
182
- // start custom styling area
183
- if (!this.limitStylingAppends && this.stylingContainer) {
184
- if (this.clientStyling)
185
- this.setClientStyling();
186
- if (this.clientStylingUrlContent)
187
- this.setClientStylingURL();
188
- this.limitStylingAppends = true;
189
- }
190
- // end custom styling area
191
- }
192
- render() {
193
- /**
194
- * Center navigation area
195
- */
196
- let navigationArea = index.h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index$1) => {
197
- 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))));
198
- }));
199
- /**
200
- * Left navigation area
201
- */
202
- 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)));
203
- if (isMobile(this.userAgent)) {
204
- buttonsLeftSide =
205
- index.h("div", { class: "LeftItems" }, index.h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
187
+ componentDidRender() {
188
+ // start custom styling area
189
+ if (!this.limitStylingAppends && this.stylingContainer) {
190
+ if (this.clientStyling)
191
+ this.setClientStyling();
192
+ if (this.clientStylingUrlContent)
193
+ this.setClientStylingURL();
194
+ this.limitStylingAppends = true;
195
+ }
196
+ // end custom styling area
206
197
  }
207
- /**
208
- * Right navigation area
209
- */
210
- 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)));
211
- if (isMobile(this.userAgent)) {
212
- buttonsRightSide =
213
- index.h("div", { class: "RightItems" }, index.h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
198
+ render() {
199
+ /**
200
+ * Center navigation area
201
+ */
202
+ let navigationArea = index.h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index$1) => {
203
+ 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))));
204
+ }));
205
+ /**
206
+ * Left navigation area
207
+ */
208
+ let buttonSecondaryLeftSide = index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') }, index.h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), index.h("span", { class: "NavigationIcon" }));
209
+ let buttonsLeftSide = index.h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
210
+ if (isMobile(this.userAgent)) {
211
+ buttonsLeftSide =
212
+ index.h("div", { class: "LeftItems" }, index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
213
+ }
214
+ /**
215
+ * Right navigation area
216
+ */
217
+ let buttonSecondaryRightSide = index.h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') }, index.h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), index.h("span", { class: "NavigationIcon" }));
218
+ let buttonsRightSide = index.h("div", { class: "RightItems" }, index.h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') }, index.h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), index.h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
219
+ if (isMobile(this.userAgent)) {
220
+ buttonsRightSide =
221
+ index.h("div", { class: "RightItems" }, index.h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') }, index.h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), index.h("span", { class: "NavigationIcon" })));
222
+ }
223
+ return (index.h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
214
224
  }
215
- return (index.h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
216
- }
217
225
  };
218
- HelperPagination.style = helperPaginationCss;
226
+ HelperPagination.style = HelperPaginationStyle0;
219
227
 
220
228
  exports.helper_pagination = HelperPagination;