@everymatrix/helper-pagination 0.1.24 → 1.15.0

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.
@@ -14,7 +14,7 @@ const isMobile = (userAgent) => {
14
14
  };
15
15
 
16
16
  const DEFAULT_LANGUAGE = 'en';
17
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
17
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hu'];
18
18
  const TRANSLATIONS = {
19
19
  en: {
20
20
  firstPage: 'First',
@@ -39,6 +39,12 @@ const TRANSLATIONS = {
39
39
  previousPage: 'Previous',
40
40
  nextPage: 'Next',
41
41
  lastPage: 'Last'
42
+ },
43
+ hu: {
44
+ firstPage: 'First',
45
+ previousPage: 'Previous',
46
+ nextPage: 'Következő',
47
+ lastPage: 'Last'
42
48
  }
43
49
  };
44
50
  const translate = (key, customLang) => {
@@ -46,7 +52,7 @@ const translate = (key, customLang) => {
46
52
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
47
53
  };
48
54
 
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}}";
55
+ 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}}";
50
56
 
51
57
  const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
52
58
  constructor() {
@@ -55,13 +61,13 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
55
61
  this.__attachShadow();
56
62
  this.hpPageChange = createEvent(this, "hpPageChange", 7);
57
63
  /**
58
- * First page boolean value - determines if the page is disabled or active
64
+ * Next page string value - determines if the next page is disabled or active
59
65
  */
60
- this.firstPage = false;
66
+ this.nextPage = '';
61
67
  /**
62
- * Previous page boolean value - determines if the page is disabled or active
68
+ * Previous page string value - determines if the previous page is disabled or active
63
69
  */
64
- this.previousPage = false;
70
+ this.prevPage = '';
65
71
  /**
66
72
  * The received offset
67
73
  */
@@ -79,13 +85,21 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
79
85
  */
80
86
  this.language = 'en';
81
87
  /**
82
- * Client custom styling via string
83
- */
88
+ * Client custom styling via string
89
+ */
84
90
  this.clientStyling = '';
85
91
  /**
86
92
  * Client custom styling via url content
87
93
  */
88
94
  this.clientStylingUrlContent = '';
95
+ /**
96
+ * Component working variable for last page
97
+ */
98
+ this.lastPage = false;
99
+ /**
100
+ * Component working variable for prvious page
101
+ */
102
+ this.previousPage = false;
89
103
  /**
90
104
  * In component working variable for the array of pages
91
105
  */
@@ -109,32 +123,35 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
109
123
  this.offsetInt = this.endInt * this.limitInt;
110
124
  break;
111
125
  case 'previousPage':
112
- this.offsetInt -= 10;
126
+ this.offsetInt -= this.limitInt;
113
127
  break;
114
128
  case 'nextPage':
115
- this.offsetInt += 10;
129
+ this.offsetInt += this.limitInt;
116
130
  break;
117
131
  case 'fivePagesBack':
118
- this.offsetInt -= 30;
119
- this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
132
+ this.offsetInt -= this.limitInt * 5;
133
+ this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
120
134
  break;
121
135
  case 'fivePagesForward':
122
- this.offsetInt += 30;
123
- this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
136
+ this.offsetInt += this.limitInt * 5;
137
+ this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
124
138
  break;
125
139
  }
140
+ this.previousPage = !this.offsetInt ? false : true;
126
141
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
127
142
  };
128
143
  /**
129
144
  * Handle navigation from here
130
145
  */
131
146
  this.paginationNavigation = (pageNumber, index) => {
147
+ this.previousPage = true;
132
148
  if (!isNaN(pageNumber)) {
133
149
  if (pageNumber === 1) {
134
150
  this.offsetInt = pageNumber - 1;
151
+ this.previousPage = false;
135
152
  }
136
153
  else {
137
- this.offsetInt = (pageNumber - 1) * 10;
154
+ this.offsetInt = (pageNumber - 1) * this.limitInt;
138
155
  }
139
156
  }
140
157
  else {
@@ -148,7 +165,6 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
148
165
  this.navigateTo('fivePagesForward');
149
166
  }
150
167
  }
151
- this.currentPage = this.offsetInt;
152
168
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
153
169
  };
154
170
  this.setClientStyling = () => {
@@ -166,7 +182,8 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
166
182
  }
167
183
  componentWillRender() {
168
184
  this.offsetInt = this.offset;
169
- this.currentPage = this.offsetInt / this.limitInt + 1;
185
+ this.limitInt = this.limit;
186
+ this.currentPage = (this.offsetInt / this.limitInt) + 1;
170
187
  this.limitInt = this.limit;
171
188
  this.totalInt = this.total;
172
189
  this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
@@ -174,7 +191,7 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
174
191
  /**
175
192
  * Construct numbered navigation area based on current page position
176
193
  */
177
- if (this.currentPage === 1 || this.currentPage === 2) {
194
+ if (this.currentPage == 1 || this.currentPage == 2) {
178
195
  this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
179
196
  this.pagesArray.push('...');
180
197
  }
@@ -209,33 +226,39 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
209
226
  /**
210
227
  * Left navigation area
211
228
  */
212
- 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)));
229
+ 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" }));
230
+ 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" })));
213
231
  if (isMobile(this.userAgent)) {
214
232
  buttonsLeftSide =
215
- h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
233
+ 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" })));
216
234
  }
217
235
  /**
218
236
  * Right navigation area
219
237
  */
220
- 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)));
238
+ 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" }));
239
+ 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);
221
240
  if (isMobile(this.userAgent)) {
222
241
  buttonsRightSide =
223
- h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
242
+ 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" })));
224
243
  }
225
- return (h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
244
+ return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
226
245
  }
227
246
  static get style() { return helperPaginationCss; }
228
247
  }, [1, "helper-pagination", {
229
- "firstPage": [1540, "first-page"],
230
- "previousPage": [1540, "previous-page"],
248
+ "nextPage": [1537, "next-page"],
249
+ "prevPage": [1537, "prev-page"],
231
250
  "offset": [1538],
232
251
  "limit": [1538],
233
252
  "total": [1538],
234
- "language": [1],
235
- "clientStyling": [1, "client-styling"],
236
- "clientStylingUrlContent": [1, "client-styling-url-content"],
253
+ "language": [1537],
254
+ "clientStyling": [1537, "client-styling"],
255
+ "clientStylingUrlContent": [1537, "client-styling-url-content"],
256
+ "arrowsActive": [1540, "arrows-active"],
257
+ "secondaryArrowsActive": [1540, "secondary-arrows-active"],
258
+ "numberedNavActive": [1540, "numbered-nav-active"],
237
259
  "offsetInt": [32],
238
260
  "lastPage": [32],
261
+ "previousPage": [32],
239
262
  "limitInt": [32],
240
263
  "totalInt": [32],
241
264
  "pagesArray": [32],
@@ -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-b281577e.js';
2
2
 
3
3
  /**
4
4
  * @name isMobile
@@ -14,7 +14,7 @@ const isMobile = (userAgent) => {
14
14
  };
15
15
 
16
16
  const DEFAULT_LANGUAGE = 'en';
17
- const SUPPORTED_LANGUAGES = ['ro', 'en'];
17
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'hu'];
18
18
  const TRANSLATIONS = {
19
19
  en: {
20
20
  firstPage: 'First',
@@ -39,6 +39,12 @@ const TRANSLATIONS = {
39
39
  previousPage: 'Previous',
40
40
  nextPage: 'Next',
41
41
  lastPage: 'Last'
42
+ },
43
+ hu: {
44
+ firstPage: 'First',
45
+ previousPage: 'Previous',
46
+ nextPage: 'Következő',
47
+ lastPage: 'Last'
42
48
  }
43
49
  };
44
50
  const translate = (key, customLang) => {
@@ -46,20 +52,20 @@ const translate = (key, customLang) => {
46
52
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
47
53
  };
48
54
 
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}}";
55
+ 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}}";
50
56
 
51
57
  const HelperPagination = class {
52
58
  constructor(hostRef) {
53
59
  registerInstance(this, hostRef);
54
60
  this.hpPageChange = createEvent(this, "hpPageChange", 7);
55
61
  /**
56
- * First page boolean value - determines if the page is disabled or active
62
+ * Next page string value - determines if the next page is disabled or active
57
63
  */
58
- this.firstPage = false;
64
+ this.nextPage = '';
59
65
  /**
60
- * Previous page boolean value - determines if the page is disabled or active
66
+ * Previous page string value - determines if the previous page is disabled or active
61
67
  */
62
- this.previousPage = false;
68
+ this.prevPage = '';
63
69
  /**
64
70
  * The received offset
65
71
  */
@@ -77,13 +83,21 @@ const HelperPagination = class {
77
83
  */
78
84
  this.language = 'en';
79
85
  /**
80
- * Client custom styling via string
81
- */
86
+ * Client custom styling via string
87
+ */
82
88
  this.clientStyling = '';
83
89
  /**
84
90
  * Client custom styling via url content
85
91
  */
86
92
  this.clientStylingUrlContent = '';
93
+ /**
94
+ * Component working variable for last page
95
+ */
96
+ this.lastPage = false;
97
+ /**
98
+ * Component working variable for prvious page
99
+ */
100
+ this.previousPage = false;
87
101
  /**
88
102
  * In component working variable for the array of pages
89
103
  */
@@ -107,32 +121,35 @@ const HelperPagination = class {
107
121
  this.offsetInt = this.endInt * this.limitInt;
108
122
  break;
109
123
  case 'previousPage':
110
- this.offsetInt -= 10;
124
+ this.offsetInt -= this.limitInt;
111
125
  break;
112
126
  case 'nextPage':
113
- this.offsetInt += 10;
127
+ this.offsetInt += this.limitInt;
114
128
  break;
115
129
  case 'fivePagesBack':
116
- this.offsetInt -= 30;
117
- this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
130
+ this.offsetInt -= this.limitInt * 5;
131
+ this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
118
132
  break;
119
133
  case 'fivePagesForward':
120
- this.offsetInt += 30;
121
- this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
134
+ this.offsetInt += this.limitInt * 5;
135
+ this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
122
136
  break;
123
137
  }
138
+ this.previousPage = !this.offsetInt ? false : true;
124
139
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
125
140
  };
126
141
  /**
127
142
  * Handle navigation from here
128
143
  */
129
144
  this.paginationNavigation = (pageNumber, index) => {
145
+ this.previousPage = true;
130
146
  if (!isNaN(pageNumber)) {
131
147
  if (pageNumber === 1) {
132
148
  this.offsetInt = pageNumber - 1;
149
+ this.previousPage = false;
133
150
  }
134
151
  else {
135
- this.offsetInt = (pageNumber - 1) * 10;
152
+ this.offsetInt = (pageNumber - 1) * this.limitInt;
136
153
  }
137
154
  }
138
155
  else {
@@ -146,7 +163,6 @@ const HelperPagination = class {
146
163
  this.navigateTo('fivePagesForward');
147
164
  }
148
165
  }
149
- this.currentPage = this.offsetInt;
150
166
  this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
151
167
  };
152
168
  this.setClientStyling = () => {
@@ -164,7 +180,8 @@ const HelperPagination = class {
164
180
  }
165
181
  componentWillRender() {
166
182
  this.offsetInt = this.offset;
167
- this.currentPage = this.offsetInt / this.limitInt + 1;
183
+ this.limitInt = this.limit;
184
+ this.currentPage = (this.offsetInt / this.limitInt) + 1;
168
185
  this.limitInt = this.limit;
169
186
  this.totalInt = this.total;
170
187
  this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
@@ -172,7 +189,7 @@ const HelperPagination = class {
172
189
  /**
173
190
  * Construct numbered navigation area based on current page position
174
191
  */
175
- if (this.currentPage === 1 || this.currentPage === 2) {
192
+ if (this.currentPage == 1 || this.currentPage == 2) {
176
193
  this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
177
194
  this.pagesArray.push('...');
178
195
  }
@@ -207,20 +224,22 @@ const HelperPagination = class {
207
224
  /**
208
225
  * Left navigation area
209
226
  */
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)));
227
+ 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" }));
228
+ 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" })));
211
229
  if (isMobile(this.userAgent)) {
212
230
  buttonsLeftSide =
213
- h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
231
+ 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" })));
214
232
  }
215
233
  /**
216
234
  * Right navigation area
217
235
  */
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)));
236
+ 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" }));
237
+ 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);
219
238
  if (isMobile(this.userAgent)) {
220
239
  buttonsRightSide =
221
- h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
240
+ 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" })));
222
241
  }
223
- return (h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
242
+ return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
224
243
  }
225
244
  };
226
245
  HelperPagination.style = helperPaginationCss;
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-fe031733.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-b281577e.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
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);
16
+ 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
17
  });
@@ -212,6 +212,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
212
212
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
213
213
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
214
214
  }
215
+ else if (memberName === 'ref') {
216
+ // minifier will clean this up
217
+ if (newValue) {
218
+ newValue(elm);
219
+ }
220
+ }
215
221
  else if ((!isProp ) &&
216
222
  memberName[0] === 'o' &&
217
223
  memberName[1] === 'n') {
@@ -368,6 +374,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
368
374
  for (; startIdx <= endIdx; ++startIdx) {
369
375
  if ((vnode = vnodes[startIdx])) {
370
376
  elm = vnode.$elm$;
377
+ callNodeRefs(vnode);
371
378
  // remove the vnode's element from the dom
372
379
  elm.remove();
373
380
  }
@@ -486,6 +493,12 @@ const patch = (oldVNode, newVNode) => {
486
493
  elm.data = text;
487
494
  }
488
495
  };
496
+ const callNodeRefs = (vNode) => {
497
+ {
498
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
499
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
500
+ }
501
+ };
489
502
  const renderVdom = (hostRef, renderFnResults) => {
490
503
  const hostElm = hostRef.$hostElement$;
491
504
  const cmpMeta = hostRef.$cmpMeta$;
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-fe031733.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-b281577e.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- 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);
13
+ 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);
14
14
  });
15
15
  };
16
16
 
@@ -1 +1 @@
1
- import{p as t,b as n}from"./p-68c68be2.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),t(e)})().then((t=>n([["p-8258fc5c",[[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]}]]]],t)));
1
+ import{p as e,b as t}from"./p-eab215a1.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((e=>t([["p-c5036ea6",[[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]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s}from"./p-eab215a1.js";const e=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),a=["ro","en","hu"],o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"}},n=(t,i)=>{const s=i;return o[void 0!==s&&a.includes(s)?s:"en"][t]},h=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.lastPage=!1,this.previousPage=!1,this.pagesArray=[],this.endInt=0,this.userAgent=window.navigator.userAgent,this.currentPage=1,this.limitStylingAppends=!1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((t,i)=>i+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,i)=>this.currentPage+i-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((t,i)=>this.endInt-2+i)),this.pagesArray.unshift("..."))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(e(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,i)},s("span",null,t)))))),i=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},n("firstPage",this.language)),s("span",{class:"NavigationIcon"})),a=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&i,s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},n("previousPage",this.language)),s("span",{class:"NavigationIcon"})));e(this.userAgent)&&(a=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},n("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let o=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},n("lastPage",this.language)),s("span",{class:"NavigationIcon"})),h=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},n("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);return e(this.userAgent)&&(h=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},n("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&a,this.numberedNavActive&&t,this.arrowsActive&&h)}};h.style='@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}}';export{h as helper_pagination}
@@ -0,0 +1 @@
1
+ let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=$(e,null);return c.u=t,r.length>0&&(c.p=r),c},$=(e,t)=>({t:0,$:e,i:t,h:null,p:null,u:null}),d={},h=(e,t,n,s,r,i)=>{if(n!==s){let c=_(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=y(n),o=y(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):_(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,y=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.h.nodeType&&t.h.host?t.h.host:t.h,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||h(s,l,o[l],void 0,n,t.t);for(l in r)h(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.p[l],c=0;if(null!==i.i)o=i.h=s.createTextNode(i.i);else if(o=i.h=s.createElement(i.$),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.p)for(c=0;c<i.p.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].h=i,c.insertBefore(i,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.h,v(l),s.remove())},j=(e,t)=>e.$===t.$,M=(e,t)=>{const n=t.h=e.h,l=e.p,s=t.p,o=t.i;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],p=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==p?p=l[--a]:j(c,f)?(M(c,f),c=t[++o],f=l[++r]):j(u,p)?(M(u,p),u=t[--i],p=l[--a]):j(c,p)?(M(c,p),e.insertBefore(c.h,u.h.nextSibling),c=t[++o],p=l[--a]):j(u,f)?(M(u,f),e.insertBefore(u.h,c.h),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.h.parentNode.insertBefore(s,c.h));o>i?S(e,null==l[a+1]?null:l[a+1].h,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},v=e=>{e.u&&e.u.ref&&e.u.ref(null),e.p&&e.p.map(v)},k=(e,t,n)=>{const l=(e=>D(e).m)(e);return{emit:e=>C(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},C=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},O=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},P=(e,t)=>{if(e.t|=16,!(4&e.t))return O(e,e.g),ee((()=>R(e,t)));e.t|=512},R=(e,t)=>{const n=e.j;let l;return l=A(l,(()=>W(n,"componentWillRender"))),A(l,(()=>x(e,n,t)))},x=async(e,t,n)=>{const l=e.m,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.m,l=t.t,o=((e,t)=>{let n=u(t),l=I.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);E(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>N(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},E=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.m,o=n.M,r=n.v||$(null,null),i=(e=>e&&e.$===d)(l)?l:p(null,null,l);t=s.tagName,o.k&&(i.u=i.u||{},o.k.map((([e,t])=>i.u[t]=s[e]))),i.$=null,i.t|=4,n.v=i,i.h=r.h=s.shadowRoot||s,e=s["s-sc"],M(r,i)})(n,l)}catch(e){z(e,n.m)}return null},N=e=>{const t=e.m,n=e.g;W(e.j,"componentDidRender"),64&e.t||(e.t|=64,F(t),e.C(t),n||T()),e.S&&(e.S(),e.S=void 0),512&e.t&&Z((()=>P(e,!1))),e.t&=-517},T=()=>{F(s.documentElement),Z((()=>C(l,"appload",{detail:{namespace:"helper-pagination"}})))},W=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){z(e)}},A=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),L=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>D(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=D(e),o=s.P.get(t),r=s.t,i=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),i&&2==(18&r)&&P(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},U=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),p=s.createElement("style"),$=[];let d,h=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],R:t[3]};l.O=t[2],l.k=[];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),V(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),h?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=D(e),n=t.M,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=G(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(L(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){z(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!I.has(t)){const l=()=>{};((e,t,n)=>{let l=I.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,I.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>P(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return D(this).N}};l.T=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,L(a,l,1)))}))})),p.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",p.setAttribute("data-styles",""),a.insertBefore(p,f?f.nextSibling:a.firstChild),h=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>d=setTimeout(T,30)))},q=new WeakMap,D=e=>q.get(e),H=(e,t)=>q.set(t.j=e,t),V=(e,t)=>{const n={t:0,m:e,M:t,P:new Map};return n.N=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],q.set(e,n)},_=(e,t)=>t in e,z=(e,t)=>(0,console.error)(e,t),B=new Map,G=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=B.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(B.set(n,e),e[t])),z)},I=new Map,J=[],K=[],Q=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Z(Y):o.raf(Y))},X=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){z(e)}e.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&o.raf(Y)},Z=e=>r().then(e),ee=Q(K,!0);export{U as b,k as c,p as h,r as p,H as r}
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -1,13 +1,13 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  export declare class HelperPagination {
3
3
  /**
4
- * First page boolean value - determines if the page is disabled or active
4
+ * Next page string value - determines if the next page is disabled or active
5
5
  */
6
- firstPage: boolean;
6
+ nextPage: string;
7
7
  /**
8
- * Previous page boolean value - determines if the page is disabled or active
8
+ * Previous page string value - determines if the previous page is disabled or active
9
9
  */
10
- previousPage: boolean;
10
+ prevPage: string;
11
11
  /**
12
12
  * The received offset
13
13
  */
@@ -25,13 +25,25 @@ export declare class HelperPagination {
25
25
  */
26
26
  language: string;
27
27
  /**
28
- * Client custom styling via string
29
- */
28
+ * Client custom styling via string
29
+ */
30
30
  clientStyling: string;
31
31
  /**
32
32
  * Client custom styling via url content
33
33
  */
34
34
  clientStylingUrlContent: string;
35
+ /**
36
+ * Customize pagination: Activate pagination arrows
37
+ */
38
+ arrowsActive: boolean;
39
+ /**
40
+ * Customize pagination: Activate pagination secondary arrows
41
+ */
42
+ secondaryArrowsActive: boolean;
43
+ /**
44
+ * Customize pagination: Activate pagination numbered navigation
45
+ */
46
+ numberedNavActive: boolean;
35
47
  /**
36
48
  * Component working variable for offset
37
49
  */
@@ -39,7 +51,11 @@ export declare class HelperPagination {
39
51
  /**
40
52
  * Component working variable for last page
41
53
  */
42
- private lastPage;
54
+ lastPage: boolean;
55
+ /**
56
+ * Component working variable for prvious page
57
+ */
58
+ previousPage: boolean;
43
59
  /**
44
60
  * Component working variable for limit
45
61
  */