@everymatrix/helper-pagination 0.1.23 → 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 (50) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/helper-pagination.cjs.entry.js +197 -201
  3. package/dist/cjs/helper-pagination.cjs.js +17 -11
  4. package/dist/cjs/index-015efb63.js +1169 -0
  5. package/dist/cjs/loader.cjs.js +7 -13
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/helper-pagination/helper-pagination.css +4 -7
  8. package/dist/collection/components/helper-pagination/helper-pagination.js +386 -352
  9. package/dist/collection/components/helper-pagination/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +39 -27
  11. package/dist/collection/utils/utils.js +5 -5
  12. package/dist/esm/app-globals-0f993ce5.js +3 -0
  13. package/dist/esm/helper-pagination.entry.js +197 -201
  14. package/dist/esm/helper-pagination.js +14 -11
  15. package/dist/esm/index-3d52300b.js +1142 -0
  16. package/dist/esm/loader.js +7 -13
  17. package/dist/helper-pagination/helper-pagination.esm.js +1 -1
  18. package/dist/helper-pagination/p-083e9b0c.entry.js +1 -0
  19. package/dist/helper-pagination/p-7b10b966.js +2 -0
  20. package/dist/helper-pagination/p-e1255160.js +1 -0
  21. package/dist/stencil.config.dev.js +17 -0
  22. package/dist/stencil.config.js +14 -19
  23. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.d.ts +2 -0
  24. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.dev.d.ts +2 -0
  25. package/dist/types/components/helper-pagination/helper-pagination.d.ts +93 -77
  26. package/dist/types/components/helper-pagination/index.d.ts +1 -0
  27. package/dist/types/components.d.ts +52 -13
  28. package/dist/types/stencil-public-runtime.d.ts +142 -33
  29. package/loader/cdn.js +1 -3
  30. package/loader/index.cjs.js +1 -3
  31. package/loader/index.d.ts +13 -1
  32. package/loader/index.es2017.js +1 -3
  33. package/loader/index.js +1 -3
  34. package/loader/package.json +1 -0
  35. package/package.json +9 -2
  36. package/dist/cjs/index-4f0b2d1c.js +0 -1172
  37. package/dist/components/helper-pagination.d.ts +0 -11
  38. package/dist/components/helper-pagination.js +0 -262
  39. package/dist/components/index.d.ts +0 -26
  40. package/dist/components/index.js +0 -1
  41. package/dist/esm/index-fe031733.js +0 -1146
  42. package/dist/esm/polyfills/core-js.js +0 -11
  43. package/dist/esm/polyfills/css-shim.js +0 -1
  44. package/dist/esm/polyfills/dom.js +0 -79
  45. package/dist/esm/polyfills/es5-html-element.js +0 -1
  46. package/dist/esm/polyfills/index.js +0 -34
  47. package/dist/esm/polyfills/system.js +0 -6
  48. package/dist/helper-pagination/p-68c68be2.js +0 -1
  49. package/dist/helper-pagination/p-8258fc5c.entry.js +0 -1
  50. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/helper-pagination/.stencil/packages/helper-pagination/stencil.config.d.ts +0 -2
@@ -0,0 +1 @@
1
+ export { HelperPagination } from './helper-pagination';
@@ -1,32 +1,44 @@
1
1
  const DEFAULT_LANGUAGE = 'en';
2
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
2
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hu', 'hr'];
3
3
  const TRANSLATIONS = {
4
- en: {
5
- firstPage: 'First',
6
- previousPage: 'Previous',
7
- nextPage: 'Next',
8
- lastPage: 'Last'
9
- },
10
- ro: {
11
- firstPage: 'Prima',
12
- previousPage: 'Anterior',
13
- nextPage: 'Urmatoarea',
14
- lastPage: 'Ultima'
15
- },
16
- fr: {
17
- firstPage: 'First',
18
- previousPage: 'Previous',
19
- nextPage: 'Next',
20
- lastPage: 'Last'
21
- },
22
- ar: {
23
- firstPage: 'First',
24
- previousPage: 'Previous',
25
- nextPage: 'Next',
26
- lastPage: 'Last'
27
- }
4
+ en: {
5
+ firstPage: 'First',
6
+ previousPage: 'Previous',
7
+ nextPage: 'Next',
8
+ lastPage: 'Last'
9
+ },
10
+ ro: {
11
+ firstPage: 'Prima',
12
+ previousPage: 'Anterior',
13
+ nextPage: 'Urmatoarea',
14
+ lastPage: 'Ultima'
15
+ },
16
+ fr: {
17
+ firstPage: 'First',
18
+ previousPage: 'Previous',
19
+ nextPage: 'Next',
20
+ lastPage: 'Last'
21
+ },
22
+ ar: {
23
+ firstPage: 'First',
24
+ previousPage: 'Previous',
25
+ nextPage: 'Next',
26
+ lastPage: 'Last'
27
+ },
28
+ hu: {
29
+ firstPage: 'First',
30
+ previousPage: 'Previous',
31
+ nextPage: 'Következő',
32
+ lastPage: 'Last'
33
+ },
34
+ hr: {
35
+ firstPage: 'Prva',
36
+ previousPage: 'Prethodna',
37
+ nextPage: 'Slijedeća',
38
+ lastPage: 'Zadnja'
39
+ }
28
40
  };
29
41
  export const translate = (key, customLang) => {
30
- const lang = customLang;
31
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
42
+ const lang = customLang;
43
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
32
44
  };
@@ -1,5 +1,5 @@
1
1
  export function format(first, middle, last) {
2
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
2
+ return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
3
  }
4
4
  /**
5
5
  * @name isMobile
@@ -8,8 +8,8 @@ export function format(first, middle, last) {
8
8
  * @returns {Boolean} true or false
9
9
  */
10
10
  export const isMobile = (userAgent) => {
11
- return !!(userAgent.toLowerCase().match(/android/i) ||
12
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
13
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
14
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
11
+ return !!(userAgent.toLowerCase().match(/android/i) ||
12
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
13
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
14
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
15
15
  };
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-fe031733.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-3d52300b.js';
2
2
 
3
3
  /**
4
4
  * @name isMobile
@@ -7,222 +7,218 @@ import { r as registerInstance, c as createEvent, h } from './index-fe031733.js'
7
7
  * @returns {Boolean} true or false
8
8
  */
9
9
  const isMobile = (userAgent) => {
10
- return !!(userAgent.toLowerCase().match(/android/i) ||
11
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
12
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
13
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
10
+ return !!(userAgent.toLowerCase().match(/android/i) ||
11
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
12
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
13
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
14
14
  };
15
15
 
16
16
  const DEFAULT_LANGUAGE = 'en';
17
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
17
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hu', 'hr'];
18
18
  const TRANSLATIONS = {
19
- en: {
20
- firstPage: 'First',
21
- previousPage: 'Previous',
22
- nextPage: 'Next',
23
- lastPage: 'Last'
24
- },
25
- ro: {
26
- firstPage: 'Prima',
27
- previousPage: 'Anterior',
28
- nextPage: 'Urmatoarea',
29
- lastPage: 'Ultima'
30
- },
31
- fr: {
32
- firstPage: 'First',
33
- previousPage: 'Previous',
34
- nextPage: 'Next',
35
- lastPage: 'Last'
36
- },
37
- ar: {
38
- firstPage: 'First',
39
- previousPage: 'Previous',
40
- nextPage: 'Next',
41
- lastPage: 'Last'
42
- }
19
+ en: {
20
+ firstPage: 'First',
21
+ previousPage: 'Previous',
22
+ nextPage: 'Next',
23
+ lastPage: 'Last'
24
+ },
25
+ ro: {
26
+ firstPage: 'Prima',
27
+ previousPage: 'Anterior',
28
+ nextPage: 'Urmatoarea',
29
+ lastPage: 'Ultima'
30
+ },
31
+ fr: {
32
+ firstPage: 'First',
33
+ previousPage: 'Previous',
34
+ nextPage: 'Next',
35
+ lastPage: 'Last'
36
+ },
37
+ ar: {
38
+ firstPage: 'First',
39
+ previousPage: 'Previous',
40
+ nextPage: 'Next',
41
+ lastPage: 'Last'
42
+ },
43
+ hu: {
44
+ firstPage: 'First',
45
+ previousPage: 'Previous',
46
+ nextPage: 'Következő',
47
+ lastPage: 'Last'
48
+ },
49
+ hr: {
50
+ firstPage: 'Prva',
51
+ previousPage: 'Prethodna',
52
+ nextPage: 'Slijedeća',
53
+ lastPage: 'Zadnja'
54
+ }
43
55
  };
44
56
  const translate = (key, customLang) => {
45
- const lang = customLang;
46
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
57
+ const lang = customLang;
58
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
47
59
  };
48
60
 
49
- 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}}";
61
+ 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}}";
62
+ const HelperPaginationStyle0 = helperPaginationCss;
50
63
 
51
64
  const HelperPagination = class {
52
- constructor(hostRef) {
53
- registerInstance(this, hostRef);
54
- this.hpPageChange = createEvent(this, "hpPageChange", 7);
55
- /**
56
- * First page boolean value - determines if the page is disabled or active
57
- */
58
- this.firstPage = false;
59
- /**
60
- * Previous page boolean value - determines if the page is disabled or active
61
- */
62
- this.previousPage = false;
63
- /**
64
- * The received offset
65
- */
66
- this.offset = 0;
67
- /**
68
- * The received limit for the number of pages
69
- */
70
- this.limit = 1;
71
- /**
72
- * The received total number of pages
73
- */
74
- this.total = 1;
75
- /**
76
- * Language
77
- */
78
- this.language = 'en';
79
- /**
80
- * Client custom styling via string
81
- */
82
- this.clientStyling = '';
83
- /**
84
- * Client custom styling via url content
85
- */
86
- this.clientStylingUrlContent = '';
87
- /**
88
- * In component working variable for the array of pages
89
- */
90
- this.pagesArray = [];
91
- /**
92
- * In component working variable for last page
93
- */
94
- this.endInt = 0;
95
- this.userAgent = window.navigator.userAgent;
96
- this.currentPage = 1;
97
- this.limitStylingAppends = false;
98
- /**
99
- * Navigation logic
100
- */
101
- this.navigateTo = (navigationPage) => {
102
- switch (navigationPage) {
103
- case 'firstPage':
104
- this.offsetInt = 0;
105
- break;
106
- case 'lastPage':
107
- this.offsetInt = this.endInt * this.limitInt;
108
- break;
109
- case 'previousPage':
110
- this.offsetInt -= 10;
111
- break;
112
- case 'nextPage':
113
- this.offsetInt += 10;
114
- break;
115
- case 'fivePagesBack':
116
- this.offsetInt -= 30;
117
- this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
118
- break;
119
- case 'fivePagesForward':
120
- this.offsetInt += 30;
121
- this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
122
- break;
123
- }
124
- this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
125
- };
126
- /**
127
- * Handle navigation from here
128
- */
129
- this.paginationNavigation = (pageNumber, index) => {
130
- if (!isNaN(pageNumber)) {
131
- if (pageNumber === 1) {
132
- this.offsetInt = pageNumber - 1;
133
- }
134
- else {
135
- this.offsetInt = (pageNumber - 1) * 10;
136
- }
137
- }
138
- else {
139
- if (index === 0 && this.currentPage <= 4) {
140
- this.navigateTo('firstPage');
65
+ constructor(hostRef) {
66
+ registerInstance(this, hostRef);
67
+ this.hpPageChange = createEvent(this, "hpPageChange", 7);
68
+ this.userAgent = window.navigator.userAgent;
69
+ this.currentPage = 1;
70
+ /**
71
+ * Navigation logic
72
+ */
73
+ this.navigateTo = (navigationPage) => {
74
+ switch (navigationPage) {
75
+ case 'firstPage':
76
+ this.offsetInt = 0;
77
+ break;
78
+ case 'lastPage':
79
+ this.offsetInt = this.endInt * this.limitInt;
80
+ break;
81
+ case 'previousPage':
82
+ this.offsetInt -= this.limitInt;
83
+ break;
84
+ case 'nextPage':
85
+ this.offsetInt += this.limitInt;
86
+ break;
87
+ case 'fivePagesBack':
88
+ this.offsetInt -= this.limitInt * 5;
89
+ this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
90
+ break;
91
+ case 'fivePagesForward':
92
+ this.offsetInt += this.limitInt * 5;
93
+ this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
94
+ break;
95
+ }
96
+ this.previousPage = !this.offsetInt ? false : true;
97
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
98
+ };
99
+ /**
100
+ * Handle navigation from here
101
+ */
102
+ this.paginationNavigation = (pageNumber, index) => {
103
+ this.previousPage = true;
104
+ if (!isNaN(pageNumber)) {
105
+ if (pageNumber === 1) {
106
+ this.offsetInt = pageNumber - 1;
107
+ this.previousPage = false;
108
+ }
109
+ else {
110
+ this.offsetInt = (pageNumber - 1) * this.limitInt;
111
+ }
112
+ }
113
+ else {
114
+ if (index === 0 && this.currentPage <= 4) {
115
+ this.navigateTo('firstPage');
116
+ }
117
+ else if (index === 0 && this.currentPage > 4) {
118
+ this.navigateTo('fivePagesBack');
119
+ }
120
+ else if (index === 4 && this.endInt - this.currentPage >= 2) {
121
+ this.navigateTo('fivePagesForward');
122
+ }
123
+ }
124
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
125
+ };
126
+ this.setClientStyling = () => {
127
+ let sheet = document.createElement('style');
128
+ sheet.innerHTML = this.clientStyling;
129
+ this.stylingContainer.prepend(sheet);
130
+ };
131
+ this.setClientStylingURL = () => {
132
+ let cssFile = document.createElement('style');
133
+ setTimeout(() => {
134
+ cssFile.innerHTML = this.clientStylingUrlContent;
135
+ this.stylingContainer.prepend(cssFile);
136
+ }, 1);
137
+ };
138
+ this.nextPage = '';
139
+ this.prevPage = '';
140
+ this.offset = 0;
141
+ this.limit = 1;
142
+ this.total = 1;
143
+ this.language = 'en';
144
+ this.clientStyling = '';
145
+ this.clientStylingUrlContent = '';
146
+ this.arrowsActive = undefined;
147
+ this.secondaryArrowsActive = undefined;
148
+ this.numberedNavActive = undefined;
149
+ this.offsetInt = undefined;
150
+ this.lastPage = false;
151
+ this.previousPage = false;
152
+ this.limitInt = undefined;
153
+ this.totalInt = undefined;
154
+ this.pagesArray = [];
155
+ this.endInt = 0;
156
+ this.limitStylingAppends = false;
157
+ }
158
+ componentWillRender() {
159
+ this.offsetInt = this.offset;
160
+ this.limitInt = this.limit;
161
+ this.currentPage = (this.offsetInt / this.limitInt) + 1;
162
+ this.limitInt = this.limit;
163
+ this.totalInt = this.total;
164
+ this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
165
+ this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
166
+ /**
167
+ * Construct numbered navigation area based on current page position
168
+ */
169
+ if (this.currentPage == 1 || this.currentPage == 2) {
170
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
171
+ this.pagesArray.push('...');
141
172
  }
142
- else if (index === 0 && this.currentPage > 4) {
143
- this.navigateTo('fivePagesBack');
173
+ else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
174
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
175
+ this.pagesArray.push('...');
176
+ this.pagesArray.unshift('...');
144
177
  }
145
- else if (index === 4 && this.endInt - this.currentPage >= 2) {
146
- this.navigateTo('fivePagesForward');
178
+ else if ((this.endInt - this.currentPage) < 3) {
179
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
180
+ this.pagesArray.unshift('...');
147
181
  }
148
- }
149
- this.currentPage = this.offsetInt;
150
- this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
151
- };
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
- componentWillRender() {
166
- this.offsetInt = this.offset;
167
- this.currentPage = this.offsetInt / this.limitInt + 1;
168
- this.limitInt = this.limit;
169
- this.totalInt = this.total;
170
- this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
171
- this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
172
- /**
173
- * Construct numbered navigation area based on current page position
174
- */
175
- if (this.currentPage === 1 || this.currentPage === 2) {
176
- this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
177
- this.pagesArray.push('...');
178
- }
179
- else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
180
- this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
181
- this.pagesArray.push('...');
182
- this.pagesArray.unshift('...');
183
182
  }
184
- else if ((this.endInt - this.currentPage) < 3) {
185
- this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
186
- this.pagesArray.unshift('...');
187
- }
188
- }
189
- componentDidRender() {
190
- // start custom styling area
191
- if (!this.limitStylingAppends && this.stylingContainer) {
192
- if (this.clientStyling)
193
- this.setClientStyling();
194
- if (this.clientStylingUrlContent)
195
- this.setClientStylingURL();
196
- this.limitStylingAppends = true;
197
- }
198
- // end custom styling area
199
- }
200
- render() {
201
- /**
202
- * Center navigation area
203
- */
204
- let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
205
- return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) }, h("span", null, item))));
206
- }));
207
- /**
208
- * Left navigation area
209
- */
210
- let buttonsLeftSide = h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage, onClick: this.navigateTo.bind(this, 'firstPage') }, translate('firstPage', this.language)), h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
211
- if (isMobile(this.userAgent)) {
212
- buttonsLeftSide =
213
- h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
183
+ componentDidRender() {
184
+ // start custom styling area
185
+ if (!this.limitStylingAppends && this.stylingContainer) {
186
+ if (this.clientStyling)
187
+ this.setClientStyling();
188
+ if (this.clientStylingUrlContent)
189
+ this.setClientStylingURL();
190
+ this.limitStylingAppends = true;
191
+ }
192
+ // end custom styling area
214
193
  }
215
- /**
216
- * Right navigation area
217
- */
218
- let buttonsRightSide = h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)), h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'lastPage') }, translate('lastPage', this.language)));
219
- if (isMobile(this.userAgent)) {
220
- buttonsRightSide =
221
- h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
194
+ render() {
195
+ /**
196
+ * Center navigation area
197
+ */
198
+ let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
199
+ return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) }, h("span", null, item))));
200
+ }));
201
+ /**
202
+ * Left navigation area
203
+ */
204
+ let buttonSecondaryLeftSide = h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') }, h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), h("span", { class: "NavigationIcon" }));
205
+ let buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
206
+ if (isMobile(this.userAgent)) {
207
+ buttonsLeftSide =
208
+ h("div", { class: "LeftItems" }, h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
209
+ }
210
+ /**
211
+ * Right navigation area
212
+ */
213
+ let buttonSecondaryRightSide = h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') }, h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), h("span", { class: "NavigationIcon" }));
214
+ let buttonsRightSide = h("div", { class: "RightItems" }, h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
215
+ if (isMobile(this.userAgent)) {
216
+ buttonsRightSide =
217
+ h("div", { class: "RightItems" }, h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })));
218
+ }
219
+ return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
222
220
  }
223
- return (h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
224
- }
225
221
  };
226
- HelperPagination.style = helperPaginationCss;
222
+ HelperPagination.style = HelperPaginationStyle0;
227
223
 
228
224
  export { HelperPagination as helper_pagination };
@@ -1,17 +1,20 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-fe031733.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-3d52300b.js';
2
+ export { s as setNonce } from './index-3d52300b.js';
3
+ import { g as globalScripts } from './app-globals-0f993ce5.js';
2
4
 
3
5
  /*
4
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
5
7
  */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
13
15
  };
14
16
 
15
- patchBrowser().then(options => {
16
- return bootstrapLazy([["helper-pagination",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["helper-pagination",[[1,"helper-pagination",{"nextPage":[1537,"next-page"],"prevPage":[1537,"prev-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1537],"clientStyling":[1537,"client-styling"],"clientStylingUrlContent":[1537,"client-styling-url-content"],"arrowsActive":[1540,"arrows-active"],"secondaryArrowsActive":[1540,"secondary-arrows-active"],"numberedNavActive":[1540,"numbered-nav-active"],"offsetInt":[32],"lastPage":[32],"previousPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
17
20
  });