@everymatrix/helper-pagination 1.44.0 → 1.45.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.
Files changed (50) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/helper-pagination.cjs.entry.js +195 -224
  3. package/dist/cjs/helper-pagination.cjs.js +16 -10
  4. package/dist/cjs/index-015efb63.js +1169 -0
  5. package/dist/cjs/loader.cjs.js +6 -12
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/helper-pagination/helper-pagination.css +0 -3
  8. package/dist/collection/components/helper-pagination/helper-pagination.js +386 -429
  9. package/dist/collection/components/helper-pagination/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +38 -38
  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 +195 -224
  14. package/dist/esm/helper-pagination.js +13 -10
  15. package/dist/esm/index-3d52300b.js +1142 -0
  16. package/dist/esm/loader.js +6 -12
  17. package/dist/helper-pagination/helper-pagination.esm.js +1 -1
  18. package/dist/helper-pagination/p-7b10b966.js +2 -0
  19. package/dist/helper-pagination/p-d1a681d7.entry.js +1 -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/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/helper-pagination/.stencil/packages/stencil/helper-pagination/stencil.config.d.ts +2 -0
  24. package/dist/types/Users/adrian.pripon/Documents/Work/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 -93
  26. package/dist/types/components/helper-pagination/index.d.ts +1 -0
  27. package/dist/types/components.d.ts +16 -1
  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 +8 -1
  36. package/dist/cjs/index-7c071a78.js +0 -1185
  37. package/dist/components/helper-pagination.d.ts +0 -11
  38. package/dist/components/helper-pagination.js +0 -290
  39. package/dist/components/index.d.ts +0 -26
  40. package/dist/components/index.js +0 -1
  41. package/dist/esm/index-b281577e.js +0 -1159
  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-5fa7b152.entry.js +0 -1
  49. package/dist/helper-pagination/p-eab215a1.js +0 -1
  50. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-pagination/.stencil/packages/helper-pagination/stencil.config.d.ts +0 -2
@@ -1,443 +1,400 @@
1
- import { Component, h, Event, Prop, State } from '@stencil/core';
1
+ import { h } from "@stencil/core";
2
2
  import { isMobile } from "../../utils/utils";
3
- import { translate } from '../../utils/locale.utils';
3
+ import { translate } from "../../utils/locale.utils";
4
4
  export class HelperPagination {
5
- constructor() {
6
- /**
7
- * Next page string value - determines if the next page is disabled or active
8
- */
9
- this.nextPage = '';
10
- /**
11
- * Previous page string value - determines if the previous page is disabled or active
12
- */
13
- this.prevPage = '';
14
- /**
15
- * The received offset
16
- */
17
- this.offset = 0;
18
- /**
19
- * The received limit for the number of pages
20
- */
21
- this.limit = 1;
22
- /**
23
- * The received total number of pages
24
- */
25
- this.total = 1;
26
- /**
27
- * Language
28
- */
29
- this.language = 'en';
30
- /**
31
- * Client custom styling via string
32
- */
33
- this.clientStyling = '';
34
- /**
35
- * Client custom styling via url content
36
- */
37
- this.clientStylingUrlContent = '';
38
- /**
39
- * Component working variable for last page
40
- */
41
- this.lastPage = false;
42
- /**
43
- * Component working variable for prvious page
44
- */
45
- this.previousPage = false;
46
- /**
47
- * In component working variable for the array of pages
48
- */
49
- this.pagesArray = [];
50
- /**
51
- * In component working variable for last page
52
- */
53
- this.endInt = 0;
54
- this.userAgent = window.navigator.userAgent;
55
- this.currentPage = 1;
56
- this.limitStylingAppends = false;
57
- /**
58
- * Navigation logic
59
- */
60
- this.navigateTo = (navigationPage) => {
61
- switch (navigationPage) {
62
- case 'firstPage':
63
- this.offsetInt = 0;
64
- break;
65
- case 'lastPage':
66
- this.offsetInt = this.endInt * this.limitInt;
67
- break;
68
- case 'previousPage':
69
- this.offsetInt -= this.limitInt;
70
- break;
71
- case 'nextPage':
72
- this.offsetInt += this.limitInt;
73
- break;
74
- case 'fivePagesBack':
75
- this.offsetInt -= this.limitInt * 5;
76
- this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
77
- break;
78
- case 'fivePagesForward':
79
- this.offsetInt += this.limitInt * 5;
80
- this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
81
- break;
82
- }
83
- this.previousPage = !this.offsetInt ? false : true;
84
- this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
85
- };
86
- /**
87
- * Handle navigation from here
88
- */
89
- this.paginationNavigation = (pageNumber, index) => {
90
- this.previousPage = true;
91
- if (!isNaN(pageNumber)) {
92
- if (pageNumber === 1) {
93
- this.offsetInt = pageNumber - 1;
94
- this.previousPage = false;
95
- }
96
- else {
97
- this.offsetInt = (pageNumber - 1) * this.limitInt;
5
+ constructor() {
6
+ this.userAgent = window.navigator.userAgent;
7
+ this.currentPage = 1;
8
+ /**
9
+ * Navigation logic
10
+ */
11
+ this.navigateTo = (navigationPage) => {
12
+ switch (navigationPage) {
13
+ case 'firstPage':
14
+ this.offsetInt = 0;
15
+ break;
16
+ case 'lastPage':
17
+ this.offsetInt = this.endInt * this.limitInt;
18
+ break;
19
+ case 'previousPage':
20
+ this.offsetInt -= this.limitInt;
21
+ break;
22
+ case 'nextPage':
23
+ this.offsetInt += this.limitInt;
24
+ break;
25
+ case 'fivePagesBack':
26
+ this.offsetInt -= this.limitInt * 5;
27
+ this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
28
+ break;
29
+ case 'fivePagesForward':
30
+ this.offsetInt += this.limitInt * 5;
31
+ this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
32
+ break;
33
+ }
34
+ this.previousPage = !this.offsetInt ? false : true;
35
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
36
+ };
37
+ /**
38
+ * Handle navigation from here
39
+ */
40
+ this.paginationNavigation = (pageNumber, index) => {
41
+ this.previousPage = true;
42
+ if (!isNaN(pageNumber)) {
43
+ if (pageNumber === 1) {
44
+ this.offsetInt = pageNumber - 1;
45
+ this.previousPage = false;
46
+ }
47
+ else {
48
+ this.offsetInt = (pageNumber - 1) * this.limitInt;
49
+ }
50
+ }
51
+ else {
52
+ if (index === 0 && this.currentPage <= 4) {
53
+ this.navigateTo('firstPage');
54
+ }
55
+ else if (index === 0 && this.currentPage > 4) {
56
+ this.navigateTo('fivePagesBack');
57
+ }
58
+ else if (index === 4 && this.endInt - this.currentPage >= 2) {
59
+ this.navigateTo('fivePagesForward');
60
+ }
61
+ }
62
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
63
+ };
64
+ this.setClientStyling = () => {
65
+ let sheet = document.createElement('style');
66
+ sheet.innerHTML = this.clientStyling;
67
+ this.stylingContainer.prepend(sheet);
68
+ };
69
+ this.setClientStylingURL = () => {
70
+ let cssFile = document.createElement('style');
71
+ setTimeout(() => {
72
+ cssFile.innerHTML = this.clientStylingUrlContent;
73
+ this.stylingContainer.prepend(cssFile);
74
+ }, 1);
75
+ };
76
+ this.nextPage = '';
77
+ this.prevPage = '';
78
+ this.offset = 0;
79
+ this.limit = 1;
80
+ this.total = 1;
81
+ this.language = 'en';
82
+ this.clientStyling = '';
83
+ this.clientStylingUrlContent = '';
84
+ this.arrowsActive = undefined;
85
+ this.secondaryArrowsActive = undefined;
86
+ this.numberedNavActive = undefined;
87
+ this.offsetInt = undefined;
88
+ this.lastPage = false;
89
+ this.previousPage = false;
90
+ this.limitInt = undefined;
91
+ this.totalInt = undefined;
92
+ this.pagesArray = [];
93
+ this.endInt = 0;
94
+ this.limitStylingAppends = false;
95
+ }
96
+ componentWillRender() {
97
+ this.offsetInt = this.offset;
98
+ this.limitInt = this.limit;
99
+ this.currentPage = (this.offsetInt / this.limitInt) + 1;
100
+ this.limitInt = this.limit;
101
+ this.totalInt = this.total;
102
+ this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
103
+ this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
104
+ /**
105
+ * Construct numbered navigation area based on current page position
106
+ */
107
+ if (this.currentPage == 1 || this.currentPage == 2) {
108
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
109
+ this.pagesArray.push('...');
98
110
  }
99
- }
100
- else {
101
- if (index === 0 && this.currentPage <= 4) {
102
- this.navigateTo('firstPage');
111
+ else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
112
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
113
+ this.pagesArray.push('...');
114
+ this.pagesArray.unshift('...');
103
115
  }
104
- else if (index === 0 && this.currentPage > 4) {
105
- this.navigateTo('fivePagesBack');
116
+ else if ((this.endInt - this.currentPage) < 3) {
117
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
118
+ this.pagesArray.unshift('...');
106
119
  }
107
- else if (index === 4 && this.endInt - this.currentPage >= 2) {
108
- this.navigateTo('fivePagesForward');
120
+ }
121
+ componentDidRender() {
122
+ // start custom styling area
123
+ if (!this.limitStylingAppends && this.stylingContainer) {
124
+ if (this.clientStyling)
125
+ this.setClientStyling();
126
+ if (this.clientStylingUrlContent)
127
+ this.setClientStylingURL();
128
+ this.limitStylingAppends = true;
109
129
  }
110
- }
111
- this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
112
- };
113
- this.setClientStyling = () => {
114
- let sheet = document.createElement('style');
115
- sheet.innerHTML = this.clientStyling;
116
- this.stylingContainer.prepend(sheet);
117
- };
118
- this.setClientStylingURL = () => {
119
- let cssFile = document.createElement('style');
120
- setTimeout(() => {
121
- cssFile.innerHTML = this.clientStylingUrlContent;
122
- this.stylingContainer.prepend(cssFile);
123
- }, 1);
124
- };
125
- }
126
- componentWillRender() {
127
- this.offsetInt = this.offset;
128
- this.limitInt = this.limit;
129
- this.currentPage = (this.offsetInt / this.limitInt) + 1;
130
- this.limitInt = this.limit;
131
- this.totalInt = this.total;
132
- this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
133
- this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
134
- /**
135
- * Construct numbered navigation area based on current page position
136
- */
137
- if (this.currentPage == 1 || this.currentPage == 2) {
138
- this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
139
- this.pagesArray.push('...');
130
+ // end custom styling area
140
131
  }
141
- else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
142
- this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
143
- this.pagesArray.push('...');
144
- this.pagesArray.unshift('...');
132
+ render() {
133
+ /**
134
+ * Center navigation area
135
+ */
136
+ let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
137
+ 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))));
138
+ }));
139
+ /**
140
+ * Left navigation area
141
+ */
142
+ 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" }));
143
+ 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" })));
144
+ if (isMobile(this.userAgent)) {
145
+ buttonsLeftSide =
146
+ 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" })));
147
+ }
148
+ /**
149
+ * Right navigation area
150
+ */
151
+ 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" }));
152
+ 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);
153
+ if (isMobile(this.userAgent)) {
154
+ buttonsRightSide =
155
+ 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" })));
156
+ }
157
+ return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
145
158
  }
146
- else if ((this.endInt - this.currentPage) < 3) {
147
- this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
148
- this.pagesArray.unshift('...');
159
+ static get is() { return "helper-pagination"; }
160
+ static get encapsulation() { return "shadow"; }
161
+ static get originalStyleUrls() {
162
+ return {
163
+ "$": ["helper-pagination.scss"]
164
+ };
149
165
  }
150
- }
151
- componentDidRender() {
152
- // start custom styling area
153
- if (!this.limitStylingAppends && this.stylingContainer) {
154
- if (this.clientStyling)
155
- this.setClientStyling();
156
- if (this.clientStylingUrlContent)
157
- this.setClientStylingURL();
158
- this.limitStylingAppends = true;
166
+ static get styleUrls() {
167
+ return {
168
+ "$": ["helper-pagination.css"]
169
+ };
159
170
  }
160
- // end custom styling area
161
- }
162
- render() {
163
- /**
164
- * Center navigation area
165
- */
166
- let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
167
- return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') },
168
- h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index) },
169
- h("span", null, item))));
170
- }));
171
- /**
172
- * Left navigation area
173
- */
174
- let buttonSecondaryLeftSide = h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') },
175
- h("span", { class: "NavigationButton" }, translate('firstPage', this.language)),
176
- h("span", { class: "NavigationIcon" }));
177
- let buttonsLeftSide = h("div", { class: "LeftItems" },
178
- this.secondaryArrowsActive && buttonSecondaryLeftSide,
179
- h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },
180
- h("span", { class: "NavigationButton" }, translate('previousPage', this.language)),
181
- h("span", { class: "NavigationIcon" })));
182
- if (isMobile(this.userAgent)) {
183
- buttonsLeftSide =
184
- h("div", { class: "LeftItems" },
185
- h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') },
186
- h("span", { class: "NavigationButton" }, translate('previousPage', this.language)),
187
- h("span", { class: "NavigationIcon" })));
171
+ static get properties() {
172
+ return {
173
+ "nextPage": {
174
+ "type": "string",
175
+ "mutable": true,
176
+ "complexType": {
177
+ "original": "string",
178
+ "resolved": "string",
179
+ "references": {}
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": "Next page string value - determines if the next page is disabled or active"
186
+ },
187
+ "attribute": "next-page",
188
+ "reflect": true,
189
+ "defaultValue": "''"
190
+ },
191
+ "prevPage": {
192
+ "type": "string",
193
+ "mutable": true,
194
+ "complexType": {
195
+ "original": "string",
196
+ "resolved": "string",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": "Previous page string value - determines if the previous page is disabled or active"
204
+ },
205
+ "attribute": "prev-page",
206
+ "reflect": true,
207
+ "defaultValue": "''"
208
+ },
209
+ "offset": {
210
+ "type": "number",
211
+ "mutable": true,
212
+ "complexType": {
213
+ "original": "number",
214
+ "resolved": "number",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": false,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": "The received offset"
222
+ },
223
+ "attribute": "offset",
224
+ "reflect": true,
225
+ "defaultValue": "0"
226
+ },
227
+ "limit": {
228
+ "type": "number",
229
+ "mutable": true,
230
+ "complexType": {
231
+ "original": "number",
232
+ "resolved": "number",
233
+ "references": {}
234
+ },
235
+ "required": false,
236
+ "optional": false,
237
+ "docs": {
238
+ "tags": [],
239
+ "text": "The received limit for the number of pages"
240
+ },
241
+ "attribute": "limit",
242
+ "reflect": true,
243
+ "defaultValue": "1"
244
+ },
245
+ "total": {
246
+ "type": "number",
247
+ "mutable": true,
248
+ "complexType": {
249
+ "original": "number",
250
+ "resolved": "number",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": "The received total number of pages"
258
+ },
259
+ "attribute": "total",
260
+ "reflect": true,
261
+ "defaultValue": "1"
262
+ },
263
+ "language": {
264
+ "type": "string",
265
+ "mutable": true,
266
+ "complexType": {
267
+ "original": "string",
268
+ "resolved": "string",
269
+ "references": {}
270
+ },
271
+ "required": false,
272
+ "optional": false,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": "Language"
276
+ },
277
+ "attribute": "language",
278
+ "reflect": true,
279
+ "defaultValue": "'en'"
280
+ },
281
+ "clientStyling": {
282
+ "type": "string",
283
+ "mutable": true,
284
+ "complexType": {
285
+ "original": "string",
286
+ "resolved": "string",
287
+ "references": {}
288
+ },
289
+ "required": false,
290
+ "optional": false,
291
+ "docs": {
292
+ "tags": [],
293
+ "text": "Client custom styling via string"
294
+ },
295
+ "attribute": "client-styling",
296
+ "reflect": true,
297
+ "defaultValue": "''"
298
+ },
299
+ "clientStylingUrlContent": {
300
+ "type": "string",
301
+ "mutable": true,
302
+ "complexType": {
303
+ "original": "string",
304
+ "resolved": "string",
305
+ "references": {}
306
+ },
307
+ "required": false,
308
+ "optional": false,
309
+ "docs": {
310
+ "tags": [],
311
+ "text": "Client custom styling via url content"
312
+ },
313
+ "attribute": "client-styling-url-content",
314
+ "reflect": true,
315
+ "defaultValue": "''"
316
+ },
317
+ "arrowsActive": {
318
+ "type": "boolean",
319
+ "mutable": true,
320
+ "complexType": {
321
+ "original": "boolean",
322
+ "resolved": "boolean",
323
+ "references": {}
324
+ },
325
+ "required": false,
326
+ "optional": false,
327
+ "docs": {
328
+ "tags": [],
329
+ "text": "Customize pagination: Activate pagination arrows"
330
+ },
331
+ "attribute": "arrows-active",
332
+ "reflect": true
333
+ },
334
+ "secondaryArrowsActive": {
335
+ "type": "boolean",
336
+ "mutable": true,
337
+ "complexType": {
338
+ "original": "boolean",
339
+ "resolved": "boolean",
340
+ "references": {}
341
+ },
342
+ "required": false,
343
+ "optional": false,
344
+ "docs": {
345
+ "tags": [],
346
+ "text": "Customize pagination: Activate pagination secondary arrows"
347
+ },
348
+ "attribute": "secondary-arrows-active",
349
+ "reflect": true
350
+ },
351
+ "numberedNavActive": {
352
+ "type": "boolean",
353
+ "mutable": true,
354
+ "complexType": {
355
+ "original": "boolean",
356
+ "resolved": "boolean",
357
+ "references": {}
358
+ },
359
+ "required": false,
360
+ "optional": false,
361
+ "docs": {
362
+ "tags": [],
363
+ "text": "Customize pagination: Activate pagination numbered navigation"
364
+ },
365
+ "attribute": "numbered-nav-active",
366
+ "reflect": true
367
+ }
368
+ };
188
369
  }
189
- /**
190
- * Right navigation area
191
- */
192
- let buttonSecondaryRightSide = h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') },
193
- h("span", { class: "NavigationButton" }, translate('lastPage', this.language)),
194
- h("span", { class: "NavigationIcon" }));
195
- let buttonsRightSide = h("div", { class: "RightItems" },
196
- h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },
197
- h("span", { class: "NavigationButton" }, translate('nextPage', this.language)),
198
- h("span", { class: "NavigationIcon" })),
199
- this.secondaryArrowsActive && buttonSecondaryRightSide);
200
- if (isMobile(this.userAgent)) {
201
- buttonsRightSide =
202
- h("div", { class: "RightItems" },
203
- h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') },
204
- h("span", { class: "NavigationButton" }, translate('nextPage', this.language)),
205
- h("span", { class: "NavigationIcon" })));
370
+ static get states() {
371
+ return {
372
+ "offsetInt": {},
373
+ "lastPage": {},
374
+ "previousPage": {},
375
+ "limitInt": {},
376
+ "totalInt": {},
377
+ "pagesArray": {},
378
+ "endInt": {},
379
+ "limitStylingAppends": {}
380
+ };
206
381
  }
207
- return (h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el },
208
- this.arrowsActive && buttonsLeftSide,
209
- this.numberedNavActive && navigationArea,
210
- this.arrowsActive && buttonsRightSide));
211
- }
212
- static get is() { return "helper-pagination"; }
213
- static get encapsulation() { return "shadow"; }
214
- static get originalStyleUrls() { return {
215
- "$": ["helper-pagination.scss"]
216
- }; }
217
- static get styleUrls() { return {
218
- "$": ["helper-pagination.css"]
219
- }; }
220
- static get properties() { return {
221
- "nextPage": {
222
- "type": "string",
223
- "mutable": true,
224
- "complexType": {
225
- "original": "string",
226
- "resolved": "string",
227
- "references": {}
228
- },
229
- "required": false,
230
- "optional": false,
231
- "docs": {
232
- "tags": [],
233
- "text": "Next page string value - determines if the next page is disabled or active"
234
- },
235
- "attribute": "next-page",
236
- "reflect": true,
237
- "defaultValue": "''"
238
- },
239
- "prevPage": {
240
- "type": "string",
241
- "mutable": true,
242
- "complexType": {
243
- "original": "string",
244
- "resolved": "string",
245
- "references": {}
246
- },
247
- "required": false,
248
- "optional": false,
249
- "docs": {
250
- "tags": [],
251
- "text": "Previous page string value - determines if the previous page is disabled or active"
252
- },
253
- "attribute": "prev-page",
254
- "reflect": true,
255
- "defaultValue": "''"
256
- },
257
- "offset": {
258
- "type": "number",
259
- "mutable": true,
260
- "complexType": {
261
- "original": "number",
262
- "resolved": "number",
263
- "references": {}
264
- },
265
- "required": false,
266
- "optional": false,
267
- "docs": {
268
- "tags": [],
269
- "text": "The received offset"
270
- },
271
- "attribute": "offset",
272
- "reflect": true,
273
- "defaultValue": "0"
274
- },
275
- "limit": {
276
- "type": "number",
277
- "mutable": true,
278
- "complexType": {
279
- "original": "number",
280
- "resolved": "number",
281
- "references": {}
282
- },
283
- "required": false,
284
- "optional": false,
285
- "docs": {
286
- "tags": [],
287
- "text": "The received limit for the number of pages"
288
- },
289
- "attribute": "limit",
290
- "reflect": true,
291
- "defaultValue": "1"
292
- },
293
- "total": {
294
- "type": "number",
295
- "mutable": true,
296
- "complexType": {
297
- "original": "number",
298
- "resolved": "number",
299
- "references": {}
300
- },
301
- "required": false,
302
- "optional": false,
303
- "docs": {
304
- "tags": [],
305
- "text": "The received total number of pages"
306
- },
307
- "attribute": "total",
308
- "reflect": true,
309
- "defaultValue": "1"
310
- },
311
- "language": {
312
- "type": "string",
313
- "mutable": true,
314
- "complexType": {
315
- "original": "string",
316
- "resolved": "string",
317
- "references": {}
318
- },
319
- "required": false,
320
- "optional": false,
321
- "docs": {
322
- "tags": [],
323
- "text": "Language"
324
- },
325
- "attribute": "language",
326
- "reflect": true,
327
- "defaultValue": "'en'"
328
- },
329
- "clientStyling": {
330
- "type": "string",
331
- "mutable": true,
332
- "complexType": {
333
- "original": "string",
334
- "resolved": "string",
335
- "references": {}
336
- },
337
- "required": false,
338
- "optional": false,
339
- "docs": {
340
- "tags": [],
341
- "text": "Client custom styling via string"
342
- },
343
- "attribute": "client-styling",
344
- "reflect": true,
345
- "defaultValue": "''"
346
- },
347
- "clientStylingUrlContent": {
348
- "type": "string",
349
- "mutable": true,
350
- "complexType": {
351
- "original": "string",
352
- "resolved": "string",
353
- "references": {}
354
- },
355
- "required": false,
356
- "optional": false,
357
- "docs": {
358
- "tags": [],
359
- "text": "Client custom styling via url content"
360
- },
361
- "attribute": "client-styling-url-content",
362
- "reflect": true,
363
- "defaultValue": "''"
364
- },
365
- "arrowsActive": {
366
- "type": "boolean",
367
- "mutable": true,
368
- "complexType": {
369
- "original": "boolean",
370
- "resolved": "boolean",
371
- "references": {}
372
- },
373
- "required": false,
374
- "optional": false,
375
- "docs": {
376
- "tags": [],
377
- "text": "Customize pagination: Activate pagination arrows"
378
- },
379
- "attribute": "arrows-active",
380
- "reflect": true
381
- },
382
- "secondaryArrowsActive": {
383
- "type": "boolean",
384
- "mutable": true,
385
- "complexType": {
386
- "original": "boolean",
387
- "resolved": "boolean",
388
- "references": {}
389
- },
390
- "required": false,
391
- "optional": false,
392
- "docs": {
393
- "tags": [],
394
- "text": "Customize pagination: Activate pagination secondary arrows"
395
- },
396
- "attribute": "secondary-arrows-active",
397
- "reflect": true
398
- },
399
- "numberedNavActive": {
400
- "type": "boolean",
401
- "mutable": true,
402
- "complexType": {
403
- "original": "boolean",
404
- "resolved": "boolean",
405
- "references": {}
406
- },
407
- "required": false,
408
- "optional": false,
409
- "docs": {
410
- "tags": [],
411
- "text": "Customize pagination: Activate pagination numbered navigation"
412
- },
413
- "attribute": "numbered-nav-active",
414
- "reflect": true
382
+ static get events() {
383
+ return [{
384
+ "method": "hpPageChange",
385
+ "name": "hpPageChange",
386
+ "bubbles": true,
387
+ "cancelable": true,
388
+ "composed": true,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": "Event that handles the navigation, updating the offset, limit and total values"
392
+ },
393
+ "complexType": {
394
+ "original": "any",
395
+ "resolved": "any",
396
+ "references": {}
397
+ }
398
+ }];
415
399
  }
416
- }; }
417
- static get states() { return {
418
- "offsetInt": {},
419
- "lastPage": {},
420
- "previousPage": {},
421
- "limitInt": {},
422
- "totalInt": {},
423
- "pagesArray": {},
424
- "endInt": {},
425
- "limitStylingAppends": {}
426
- }; }
427
- static get events() { return [{
428
- "method": "hpPageChange",
429
- "name": "hpPageChange",
430
- "bubbles": true,
431
- "cancelable": true,
432
- "composed": true,
433
- "docs": {
434
- "tags": [],
435
- "text": "Event that handles the navigation, updating the offset, limit and total values"
436
- },
437
- "complexType": {
438
- "original": "any",
439
- "resolved": "any",
440
- "references": {}
441
- }
442
- }]; }
443
400
  }