@everymatrix/helper-pagination 0.0.3

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 (47) hide show
  1. package/dist/cjs/helper-pagination.cjs.entry.js +188 -0
  2. package/dist/cjs/helper-pagination.cjs.js +19 -0
  3. package/dist/cjs/index-ea71a27d.js +1170 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/collection/collection-manifest.json +12 -0
  7. package/dist/collection/components/helper-pagination/helper-pagination.css +139 -0
  8. package/dist/collection/components/helper-pagination/helper-pagination.js +297 -0
  9. package/dist/collection/index.js +1 -0
  10. package/dist/collection/utils/locale.utils.js +20 -0
  11. package/dist/collection/utils/utils.js +15 -0
  12. package/dist/components/helper-pagination.d.ts +11 -0
  13. package/dist/components/helper-pagination.js +215 -0
  14. package/dist/components/index.d.ts +22 -0
  15. package/dist/components/index.js +2 -0
  16. package/dist/esm/helper-pagination.entry.js +184 -0
  17. package/dist/esm/helper-pagination.js +17 -0
  18. package/dist/esm/index-6ba22d2b.js +1144 -0
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/loader.js +17 -0
  21. package/dist/esm/polyfills/core-js.js +11 -0
  22. package/dist/esm/polyfills/css-shim.js +1 -0
  23. package/dist/esm/polyfills/dom.js +79 -0
  24. package/dist/esm/polyfills/es5-html-element.js +1 -0
  25. package/dist/esm/polyfills/index.js +34 -0
  26. package/dist/esm/polyfills/system.js +6 -0
  27. package/dist/helper-pagination/helper-pagination.esm.js +1 -0
  28. package/dist/helper-pagination/index.esm.js +0 -0
  29. package/dist/helper-pagination/p-4038ff2e.entry.js +1 -0
  30. package/dist/helper-pagination/p-a4f374fc.js +2 -0
  31. package/dist/index.cjs.js +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/stencil.config.js +22 -0
  34. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/helper-pagination/.stencil/packages/helper-pagination/stencil.config.d.ts +2 -0
  35. package/dist/types/components/helper-pagination/helper-pagination.d.ts +67 -0
  36. package/dist/types/components.d.ts +93 -0
  37. package/dist/types/index.d.ts +1 -0
  38. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  39. package/dist/types/utils/locale.utils.d.ts +1 -0
  40. package/dist/types/utils/utils.d.ts +8 -0
  41. package/loader/cdn.js +3 -0
  42. package/loader/index.cjs.js +3 -0
  43. package/loader/index.d.ts +12 -0
  44. package/loader/index.es2017.js +3 -0
  45. package/loader/index.js +4 -0
  46. package/loader/package.json +10 -0
  47. package/package.json +19 -0
@@ -0,0 +1,215 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+
3
+ /**
4
+ * @name isMobile
5
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
6
+ * @param {String} userAgent window.navigator.userAgent
7
+ * @returns {Boolean} true or false
8
+ */
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));
14
+ };
15
+
16
+ const DEFAULT_LANGUAGE = 'en';
17
+ const SUPPORTED_LANGUAGES = ['ro', 'en'];
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
+ };
32
+ const translate = (key, customLang) => {
33
+ const lang = customLang;
34
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
35
+ };
36
+
37
+ 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}}";
38
+
39
+ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
40
+ constructor() {
41
+ super();
42
+ this.__registerHost();
43
+ this.__attachShadow();
44
+ this.hpPageChange = createEvent(this, "hpPageChange", 7);
45
+ /**
46
+ * First page boolean value - determines if the page is disabled or active
47
+ */
48
+ this.firstPage = false;
49
+ /**
50
+ * Previous page boolean value - determines if the page is disabled or active
51
+ */
52
+ this.previousPage = false;
53
+ /**
54
+ * The received offset
55
+ */
56
+ this.offset = 0;
57
+ /**
58
+ * The received limit for the number of pages
59
+ */
60
+ this.limit = 1;
61
+ /**
62
+ * The received total number of pages
63
+ */
64
+ this.total = 1;
65
+ /**
66
+ * Language
67
+ */
68
+ this.language = 'en';
69
+ /**
70
+ * In component working variable for the array of pages
71
+ */
72
+ this.pagesArray = [];
73
+ /**
74
+ * In component working variable for last page
75
+ */
76
+ this.endInt = 0;
77
+ this.userAgent = window.navigator.userAgent;
78
+ this.currentPage = 1;
79
+ /**
80
+ * Navigation logic
81
+ */
82
+ this.navigateTo = (navigationPage) => {
83
+ switch (navigationPage) {
84
+ case 'firstPage':
85
+ this.offsetInt = 0;
86
+ break;
87
+ case 'lastPage':
88
+ this.offsetInt = this.endInt * this.limitInt;
89
+ break;
90
+ case 'previousPage':
91
+ this.offsetInt -= 10;
92
+ break;
93
+ case 'nextPage':
94
+ this.offsetInt += 10;
95
+ break;
96
+ case 'fivePagesBack':
97
+ this.offsetInt -= 30;
98
+ this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
99
+ break;
100
+ case 'fivePagesForward':
101
+ this.offsetInt += 30;
102
+ this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
103
+ break;
104
+ }
105
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
106
+ };
107
+ /**
108
+ * Handle navigation from here
109
+ */
110
+ this.paginationNavigation = (pageNumber, index) => {
111
+ if (!isNaN(pageNumber)) {
112
+ if (pageNumber === 1) {
113
+ this.offsetInt = pageNumber - 1;
114
+ }
115
+ else {
116
+ this.offsetInt = (pageNumber - 1) * 10;
117
+ }
118
+ }
119
+ else {
120
+ if (index === 0 && this.currentPage <= 4) {
121
+ this.navigateTo('firstPage');
122
+ }
123
+ else if (index === 0 && this.currentPage > 4) {
124
+ this.navigateTo('fivePagesBack');
125
+ }
126
+ else if (index === 4 && this.endInt - this.currentPage >= 2) {
127
+ this.navigateTo('fivePagesForward');
128
+ }
129
+ }
130
+ this.currentPage = this.offsetInt;
131
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
132
+ };
133
+ }
134
+ componentWillRender() {
135
+ this.offsetInt = this.offset;
136
+ this.currentPage = this.offsetInt / this.limitInt + 1;
137
+ this.limitInt = this.limit;
138
+ this.totalInt = this.total;
139
+ this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
140
+ this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
141
+ /**
142
+ * Construct numbered navigation area based on current page position
143
+ */
144
+ if (this.currentPage === 1 || this.currentPage === 2) {
145
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
146
+ this.pagesArray.push('...');
147
+ }
148
+ else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
149
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
150
+ this.pagesArray.push('...');
151
+ this.pagesArray.unshift('...');
152
+ }
153
+ else if ((this.endInt - this.currentPage) < 3) {
154
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
155
+ this.pagesArray.unshift('...');
156
+ }
157
+ }
158
+ render() {
159
+ /**
160
+ * Center navigation area
161
+ */
162
+ let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
163
+ 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))));
164
+ }));
165
+ /**
166
+ * Left navigation area
167
+ */
168
+ 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)));
169
+ if (isMobile(this.userAgent)) {
170
+ buttonsLeftSide =
171
+ h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
172
+ }
173
+ /**
174
+ * Right navigation area
175
+ */
176
+ 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)));
177
+ if (isMobile(this.userAgent)) {
178
+ buttonsRightSide =
179
+ h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
180
+ }
181
+ return (h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
182
+ }
183
+ static get style() { return helperPaginationCss; }
184
+ }, [1, "helper-pagination", {
185
+ "firstPage": [1540, "first-page"],
186
+ "previousPage": [1540, "previous-page"],
187
+ "offset": [1538],
188
+ "limit": [1538],
189
+ "total": [1538],
190
+ "language": [1],
191
+ "offsetInt": [32],
192
+ "lastPage": [32],
193
+ "limitInt": [32],
194
+ "totalInt": [32],
195
+ "pagesArray": [32],
196
+ "endInt": [32]
197
+ }]);
198
+ function defineCustomElement$1() {
199
+ if (typeof customElements === "undefined") {
200
+ return;
201
+ }
202
+ const components = ["helper-pagination"];
203
+ components.forEach(tagName => { switch (tagName) {
204
+ case "helper-pagination":
205
+ if (!customElements.get(tagName)) {
206
+ customElements.define(tagName, HelperPagination$1);
207
+ }
208
+ break;
209
+ } });
210
+ }
211
+
212
+ const HelperPagination = HelperPagination$1;
213
+ const defineCustomElement = defineCustomElement$1;
214
+
215
+ export { HelperPagination, defineCustomElement };
@@ -0,0 +1,22 @@
1
+ /* HelperPagination custom elements */
2
+ export { HelperPagination as HelperPagination } from '../types/components/helper-pagination/helper-pagination';
3
+
4
+ /**
5
+ * Used to manually set the base path where assets can be found.
6
+ * If the script is used as "module", it's recommended to use "import.meta.url",
7
+ * such as "setAssetPath(import.meta.url)". Other options include
8
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
9
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
10
+ * But do note that this configuration depends on how your script is bundled, or lack of
11
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
12
+ * will have to ensure the static assets are copied to its build directory.
13
+ */
14
+ export declare const setAssetPath: (path: string) => void;
15
+
16
+ export interface SetPlatformOptions {
17
+ raf?: (c: FrameRequestCallback) => number;
18
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
19
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
20
+ }
21
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
22
+ export * from '../types';
@@ -0,0 +1,2 @@
1
+ export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
2
+ export { HelperPagination, defineCustomElement as defineCustomElementHelperPagination } from './helper-pagination.js';
@@ -0,0 +1,184 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-6ba22d2b.js';
2
+
3
+ /**
4
+ * @name isMobile
5
+ * @description A method that returns if the browser used to access the app is from a mobile device or not
6
+ * @param {String} userAgent window.navigator.userAgent
7
+ * @returns {Boolean} true or false
8
+ */
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));
14
+ };
15
+
16
+ const DEFAULT_LANGUAGE = 'en';
17
+ const SUPPORTED_LANGUAGES = ['ro', 'en'];
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
+ };
32
+ const translate = (key, customLang) => {
33
+ const lang = customLang;
34
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
35
+ };
36
+
37
+ 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}}";
38
+
39
+ const HelperPagination = class {
40
+ constructor(hostRef) {
41
+ registerInstance(this, hostRef);
42
+ this.hpPageChange = createEvent(this, "hpPageChange", 7);
43
+ /**
44
+ * First page boolean value - determines if the page is disabled or active
45
+ */
46
+ this.firstPage = false;
47
+ /**
48
+ * Previous page boolean value - determines if the page is disabled or active
49
+ */
50
+ this.previousPage = false;
51
+ /**
52
+ * The received offset
53
+ */
54
+ this.offset = 0;
55
+ /**
56
+ * The received limit for the number of pages
57
+ */
58
+ this.limit = 1;
59
+ /**
60
+ * The received total number of pages
61
+ */
62
+ this.total = 1;
63
+ /**
64
+ * Language
65
+ */
66
+ this.language = 'en';
67
+ /**
68
+ * In component working variable for the array of pages
69
+ */
70
+ this.pagesArray = [];
71
+ /**
72
+ * In component working variable for last page
73
+ */
74
+ this.endInt = 0;
75
+ this.userAgent = window.navigator.userAgent;
76
+ this.currentPage = 1;
77
+ /**
78
+ * Navigation logic
79
+ */
80
+ this.navigateTo = (navigationPage) => {
81
+ switch (navigationPage) {
82
+ case 'firstPage':
83
+ this.offsetInt = 0;
84
+ break;
85
+ case 'lastPage':
86
+ this.offsetInt = this.endInt * this.limitInt;
87
+ break;
88
+ case 'previousPage':
89
+ this.offsetInt -= 10;
90
+ break;
91
+ case 'nextPage':
92
+ this.offsetInt += 10;
93
+ break;
94
+ case 'fivePagesBack':
95
+ this.offsetInt -= 30;
96
+ this.offsetInt = this.offsetInt < 0 ? 0 : this.offsetInt;
97
+ break;
98
+ case 'fivePagesForward':
99
+ this.offsetInt += 30;
100
+ this.offsetInt = this.offsetInt / 10 >= this.endInt ? this.endInt * 10 : this.offsetInt;
101
+ break;
102
+ }
103
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
104
+ };
105
+ /**
106
+ * Handle navigation from here
107
+ */
108
+ this.paginationNavigation = (pageNumber, index) => {
109
+ if (!isNaN(pageNumber)) {
110
+ if (pageNumber === 1) {
111
+ this.offsetInt = pageNumber - 1;
112
+ }
113
+ else {
114
+ this.offsetInt = (pageNumber - 1) * 10;
115
+ }
116
+ }
117
+ else {
118
+ if (index === 0 && this.currentPage <= 4) {
119
+ this.navigateTo('firstPage');
120
+ }
121
+ else if (index === 0 && this.currentPage > 4) {
122
+ this.navigateTo('fivePagesBack');
123
+ }
124
+ else if (index === 4 && this.endInt - this.currentPage >= 2) {
125
+ this.navigateTo('fivePagesForward');
126
+ }
127
+ }
128
+ this.currentPage = this.offsetInt;
129
+ this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
130
+ };
131
+ }
132
+ componentWillRender() {
133
+ this.offsetInt = this.offset;
134
+ this.currentPage = this.offsetInt / this.limitInt + 1;
135
+ this.limitInt = this.limit;
136
+ this.totalInt = this.total;
137
+ this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
138
+ this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
139
+ /**
140
+ * Construct numbered navigation area based on current page position
141
+ */
142
+ if (this.currentPage === 1 || this.currentPage === 2) {
143
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
144
+ this.pagesArray.push('...');
145
+ }
146
+ else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
147
+ this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
148
+ this.pagesArray.push('...');
149
+ this.pagesArray.unshift('...');
150
+ }
151
+ else if ((this.endInt - this.currentPage) < 3) {
152
+ this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
153
+ this.pagesArray.unshift('...');
154
+ }
155
+ }
156
+ render() {
157
+ /**
158
+ * Center navigation area
159
+ */
160
+ let navigationArea = h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index) => {
161
+ 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))));
162
+ }));
163
+ /**
164
+ * Left navigation area
165
+ */
166
+ 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)));
167
+ if (isMobile(this.userAgent)) {
168
+ buttonsLeftSide =
169
+ h("div", { class: "LeftItems" }, h("button", { disabled: !this.previousPage ? true : false, onClick: this.navigateTo.bind(this, 'previousPage') }, translate('previousPage', this.language)));
170
+ }
171
+ /**
172
+ * Right navigation area
173
+ */
174
+ 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)));
175
+ if (isMobile(this.userAgent)) {
176
+ buttonsRightSide =
177
+ h("div", { class: "RightItems" }, h("button", { disabled: !this.lastPage ? true : false, onClick: this.navigateTo.bind(this, 'nextPage') }, translate('nextPage', this.language)));
178
+ }
179
+ return (h("div", { id: "PaginationContainer" }, buttonsLeftSide, navigationArea, buttonsRightSide));
180
+ }
181
+ };
182
+ HelperPagination.style = helperPaginationCss;
183
+
184
+ export { HelperPagination as helper_pagination };
@@ -0,0 +1,17 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-6ba22d2b.js';
2
+
3
+ /*
4
+ Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
5
+ */
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);
13
+ };
14
+
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],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]}]]]], options);
17
+ });