@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.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/helper-pagination.cjs.entry.js +195 -224
- package/dist/cjs/helper-pagination.cjs.js +16 -10
- package/dist/cjs/index-015efb63.js +1169 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/helper-pagination/helper-pagination.css +0 -3
- package/dist/collection/components/helper-pagination/helper-pagination.js +386 -429
- package/dist/collection/components/helper-pagination/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +38 -38
- package/dist/collection/utils/utils.js +5 -5
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/helper-pagination.entry.js +195 -224
- package/dist/esm/helper-pagination.js +13 -10
- package/dist/esm/index-3d52300b.js +1142 -0
- package/dist/esm/loader.js +6 -12
- package/dist/helper-pagination/helper-pagination.esm.js +1 -1
- package/dist/helper-pagination/p-7b10b966.js +2 -0
- package/dist/helper-pagination/p-d1a681d7.entry.js +1 -0
- package/dist/helper-pagination/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- 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
- 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
- package/dist/types/components/helper-pagination/helper-pagination.d.ts +93 -93
- package/dist/types/components/helper-pagination/index.d.ts +1 -0
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/cjs/index-7c071a78.js +0 -1185
- package/dist/components/helper-pagination.d.ts +0 -11
- package/dist/components/helper-pagination.js +0 -290
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-b281577e.js +0 -1159
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/helper-pagination/p-5fa7b152.entry.js +0 -1
- package/dist/helper-pagination/p-eab215a1.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/helper-pagination/.stencil/packages/helper-pagination/stencil.config.d.ts +0 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-015efb63.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name isMobile
|
|
@@ -11,246 +11,217 @@ const index = require('./index-7c071a78.js');
|
|
|
11
11
|
* @returns {Boolean} true or false
|
|
12
12
|
*/
|
|
13
13
|
const isMobile = (userAgent) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
return !!(userAgent.toLowerCase().match(/android/i) ||
|
|
15
|
+
userAgent.toLowerCase().match(/blackberry|bb/i) ||
|
|
16
|
+
userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
|
|
17
|
+
userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const DEFAULT_LANGUAGE = 'en';
|
|
21
21
|
const TRANSLATIONS = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
22
|
+
en: {
|
|
23
|
+
firstPage: 'First',
|
|
24
|
+
previousPage: 'Previous',
|
|
25
|
+
nextPage: 'Next',
|
|
26
|
+
lastPage: 'Last'
|
|
27
|
+
},
|
|
28
|
+
ro: {
|
|
29
|
+
firstPage: 'Prima',
|
|
30
|
+
previousPage: 'Anterior',
|
|
31
|
+
nextPage: 'Urmatoarea',
|
|
32
|
+
lastPage: 'Ultima'
|
|
33
|
+
},
|
|
34
|
+
fr: {
|
|
35
|
+
firstPage: 'First',
|
|
36
|
+
previousPage: 'Previous',
|
|
37
|
+
nextPage: 'Next',
|
|
38
|
+
lastPage: 'Last'
|
|
39
|
+
},
|
|
40
|
+
ar: {
|
|
41
|
+
firstPage: 'First',
|
|
42
|
+
previousPage: 'Previous',
|
|
43
|
+
nextPage: 'Next',
|
|
44
|
+
lastPage: 'Last'
|
|
45
|
+
},
|
|
46
|
+
hu: {
|
|
47
|
+
firstPage: 'First',
|
|
48
|
+
previousPage: 'Previous',
|
|
49
|
+
nextPage: 'Következő',
|
|
50
|
+
lastPage: 'Last'
|
|
51
|
+
},
|
|
52
|
+
hr: {
|
|
53
|
+
firstPage: 'Prva',
|
|
54
|
+
previousPage: 'Prethodna',
|
|
55
|
+
nextPage: 'Slijedeća',
|
|
56
|
+
lastPage: 'Zadnja'
|
|
57
|
+
}
|
|
58
58
|
};
|
|
59
59
|
const translate = (key, customLang) => {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
const lang = customLang;
|
|
61
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
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}}";
|
|
65
|
+
const HelperPaginationStyle0 = helperPaginationCss;
|
|
65
66
|
|
|
66
67
|
const HelperPagination = class {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
68
|
+
constructor(hostRef) {
|
|
69
|
+
index.registerInstance(this, hostRef);
|
|
70
|
+
this.hpPageChange = index.createEvent(this, "hpPageChange", 7);
|
|
71
|
+
this.userAgent = window.navigator.userAgent;
|
|
72
|
+
this.currentPage = 1;
|
|
73
|
+
/**
|
|
74
|
+
* Navigation logic
|
|
75
|
+
*/
|
|
76
|
+
this.navigateTo = (navigationPage) => {
|
|
77
|
+
switch (navigationPage) {
|
|
78
|
+
case 'firstPage':
|
|
79
|
+
this.offsetInt = 0;
|
|
80
|
+
break;
|
|
81
|
+
case 'lastPage':
|
|
82
|
+
this.offsetInt = this.endInt * this.limitInt;
|
|
83
|
+
break;
|
|
84
|
+
case 'previousPage':
|
|
85
|
+
this.offsetInt -= this.limitInt;
|
|
86
|
+
break;
|
|
87
|
+
case 'nextPage':
|
|
88
|
+
this.offsetInt += this.limitInt;
|
|
89
|
+
break;
|
|
90
|
+
case 'fivePagesBack':
|
|
91
|
+
this.offsetInt -= this.limitInt * 5;
|
|
92
|
+
this.offsetInt = this.offsetInt <= 0 ? 0 : this.offsetInt;
|
|
93
|
+
break;
|
|
94
|
+
case 'fivePagesForward':
|
|
95
|
+
this.offsetInt += this.limitInt * 5;
|
|
96
|
+
this.offsetInt = this.offsetInt / this.limitInt >= this.endInt ? this.endInt * this.limitInt : this.offsetInt;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
this.previousPage = !this.offsetInt ? false : true;
|
|
100
|
+
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Handle navigation from here
|
|
104
|
+
*/
|
|
105
|
+
this.paginationNavigation = (pageNumber, index) => {
|
|
106
|
+
this.previousPage = true;
|
|
107
|
+
if (!isNaN(pageNumber)) {
|
|
108
|
+
if (pageNumber === 1) {
|
|
109
|
+
this.offsetInt = pageNumber - 1;
|
|
110
|
+
this.previousPage = false;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.offsetInt = (pageNumber - 1) * this.limitInt;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
if (index === 0 && this.currentPage <= 4) {
|
|
118
|
+
this.navigateTo('firstPage');
|
|
119
|
+
}
|
|
120
|
+
else if (index === 0 && this.currentPage > 4) {
|
|
121
|
+
this.navigateTo('fivePagesBack');
|
|
122
|
+
}
|
|
123
|
+
else if (index === 4 && this.endInt - this.currentPage >= 2) {
|
|
124
|
+
this.navigateTo('fivePagesForward');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
128
|
+
};
|
|
129
|
+
this.setClientStyling = () => {
|
|
130
|
+
let sheet = document.createElement('style');
|
|
131
|
+
sheet.innerHTML = this.clientStyling;
|
|
132
|
+
this.stylingContainer.prepend(sheet);
|
|
133
|
+
};
|
|
134
|
+
this.setClientStylingURL = () => {
|
|
135
|
+
let cssFile = document.createElement('style');
|
|
136
|
+
setTimeout(() => {
|
|
137
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
138
|
+
this.stylingContainer.prepend(cssFile);
|
|
139
|
+
}, 1);
|
|
140
|
+
};
|
|
141
|
+
this.nextPage = '';
|
|
142
|
+
this.prevPage = '';
|
|
143
|
+
this.offset = 0;
|
|
144
|
+
this.limit = 1;
|
|
145
|
+
this.total = 1;
|
|
146
|
+
this.language = 'en';
|
|
147
|
+
this.clientStyling = '';
|
|
148
|
+
this.clientStylingUrlContent = '';
|
|
149
|
+
this.arrowsActive = undefined;
|
|
150
|
+
this.secondaryArrowsActive = undefined;
|
|
151
|
+
this.numberedNavActive = undefined;
|
|
152
|
+
this.offsetInt = undefined;
|
|
153
|
+
this.lastPage = false;
|
|
154
|
+
this.previousPage = false;
|
|
155
|
+
this.limitInt = undefined;
|
|
156
|
+
this.totalInt = undefined;
|
|
157
|
+
this.pagesArray = [];
|
|
158
|
+
this.endInt = 0;
|
|
159
|
+
this.limitStylingAppends = false;
|
|
160
|
+
}
|
|
161
|
+
componentWillRender() {
|
|
162
|
+
this.offsetInt = this.offset;
|
|
163
|
+
this.limitInt = this.limit;
|
|
164
|
+
this.currentPage = (this.offsetInt / this.limitInt) + 1;
|
|
165
|
+
this.limitInt = this.limit;
|
|
166
|
+
this.totalInt = this.total;
|
|
167
|
+
this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
|
|
168
|
+
this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
|
|
169
|
+
/**
|
|
170
|
+
* Construct numbered navigation area based on current page position
|
|
171
|
+
*/
|
|
172
|
+
if (this.currentPage == 1 || this.currentPage == 2) {
|
|
173
|
+
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
174
|
+
this.pagesArray.push('...');
|
|
167
175
|
}
|
|
168
|
-
else if (
|
|
169
|
-
|
|
176
|
+
else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
|
|
177
|
+
this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
|
|
178
|
+
this.pagesArray.push('...');
|
|
179
|
+
this.pagesArray.unshift('...');
|
|
170
180
|
}
|
|
171
|
-
else if (
|
|
172
|
-
|
|
181
|
+
else if ((this.endInt - this.currentPage) < 3) {
|
|
182
|
+
this.pagesArray = Array.from({ length: 4 }, (_, i) => this.endInt - 2 + i);
|
|
183
|
+
this.pagesArray.unshift('...');
|
|
173
184
|
}
|
|
174
|
-
}
|
|
175
|
-
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
176
|
-
};
|
|
177
|
-
this.setClientStyling = () => {
|
|
178
|
-
let sheet = document.createElement('style');
|
|
179
|
-
sheet.innerHTML = this.clientStyling;
|
|
180
|
-
this.stylingContainer.prepend(sheet);
|
|
181
|
-
};
|
|
182
|
-
this.setClientStylingURL = () => {
|
|
183
|
-
let cssFile = document.createElement('style');
|
|
184
|
-
setTimeout(() => {
|
|
185
|
-
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
186
|
-
this.stylingContainer.prepend(cssFile);
|
|
187
|
-
}, 1);
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
componentWillRender() {
|
|
191
|
-
this.offsetInt = this.offset;
|
|
192
|
-
this.limitInt = this.limit;
|
|
193
|
-
this.currentPage = (this.offsetInt / this.limitInt) + 1;
|
|
194
|
-
this.limitInt = this.limit;
|
|
195
|
-
this.totalInt = this.total;
|
|
196
|
-
this.endInt = (Math.ceil(this.totalInt / this.limitInt) - 1);
|
|
197
|
-
this.lastPage = (this.offsetInt >= this.endInt * this.limitInt) ? false : true;
|
|
198
|
-
/**
|
|
199
|
-
* Construct numbered navigation area based on current page position
|
|
200
|
-
*/
|
|
201
|
-
if (this.currentPage == 1 || this.currentPage == 2) {
|
|
202
|
-
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
203
|
-
this.pagesArray.push('...');
|
|
204
|
-
}
|
|
205
|
-
else if (this.currentPage >= 3 && ((this.endInt - this.currentPage) >= 2)) {
|
|
206
|
-
this.pagesArray = Array.from({ length: 3 }, (_, i) => this.currentPage + i - 1);
|
|
207
|
-
this.pagesArray.push('...');
|
|
208
|
-
this.pagesArray.unshift('...');
|
|
209
185
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
if (this.clientStylingUrlContent)
|
|
221
|
-
this.setClientStylingURL();
|
|
222
|
-
this.limitStylingAppends = true;
|
|
223
|
-
}
|
|
224
|
-
// end custom styling area
|
|
225
|
-
}
|
|
226
|
-
render() {
|
|
227
|
-
/**
|
|
228
|
-
* Center navigation area
|
|
229
|
-
*/
|
|
230
|
-
let navigationArea = index.h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index$1) => {
|
|
231
|
-
return (index.h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, index.h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index$1) }, index.h("span", null, item))));
|
|
232
|
-
}));
|
|
233
|
-
/**
|
|
234
|
-
* Left navigation area
|
|
235
|
-
*/
|
|
236
|
-
let buttonSecondaryLeftSide = index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') }, index.h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), index.h("span", { class: "NavigationIcon" }));
|
|
237
|
-
let buttonsLeftSide = index.h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
238
|
-
if (isMobile(this.userAgent)) {
|
|
239
|
-
buttonsLeftSide =
|
|
240
|
-
index.h("div", { class: "LeftItems" }, index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
186
|
+
componentDidRender() {
|
|
187
|
+
// start custom styling area
|
|
188
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
189
|
+
if (this.clientStyling)
|
|
190
|
+
this.setClientStyling();
|
|
191
|
+
if (this.clientStylingUrlContent)
|
|
192
|
+
this.setClientStylingURL();
|
|
193
|
+
this.limitStylingAppends = true;
|
|
194
|
+
}
|
|
195
|
+
// end custom styling area
|
|
241
196
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
197
|
+
render() {
|
|
198
|
+
/**
|
|
199
|
+
* Center navigation area
|
|
200
|
+
*/
|
|
201
|
+
let navigationArea = index.h("ul", { class: "PaginationArea" }, this.pagesArray.map((item, index$1) => {
|
|
202
|
+
return (index.h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, index.h("button", { disabled: item === this.currentPage ? true : false, onClick: this.paginationNavigation.bind(this, item, index$1) }, index.h("span", null, item))));
|
|
203
|
+
}));
|
|
204
|
+
/**
|
|
205
|
+
* Left navigation area
|
|
206
|
+
*/
|
|
207
|
+
let buttonSecondaryLeftSide = index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'firstPage') }, index.h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), index.h("span", { class: "NavigationIcon" }));
|
|
208
|
+
let buttonsLeftSide = index.h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
209
|
+
if (isMobile(this.userAgent)) {
|
|
210
|
+
buttonsLeftSide =
|
|
211
|
+
index.h("div", { class: "LeftItems" }, index.h("button", { disabled: this.prevPage ? false : true, onClick: this.navigateTo.bind(this, 'previousPage') }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Right navigation area
|
|
215
|
+
*/
|
|
216
|
+
let buttonSecondaryRightSide = index.h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'lastPage') }, index.h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), index.h("span", { class: "NavigationIcon" }));
|
|
217
|
+
let buttonsRightSide = index.h("div", { class: "RightItems" }, index.h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') }, index.h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), index.h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
|
|
218
|
+
if (isMobile(this.userAgent)) {
|
|
219
|
+
buttonsRightSide =
|
|
220
|
+
index.h("div", { class: "RightItems" }, index.h("button", { disabled: this.nextPage ? false : true, onClick: this.navigateTo.bind(this, 'nextPage') }, index.h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
221
|
+
}
|
|
222
|
+
return (index.h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
|
|
250
223
|
}
|
|
251
|
-
return (index.h("div", { id: "PaginationContainer", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
|
|
252
|
-
}
|
|
253
224
|
};
|
|
254
|
-
HelperPagination.style =
|
|
225
|
+
HelperPagination.style = HelperPaginationStyle0;
|
|
255
226
|
|
|
256
227
|
exports.helper_pagination = HelperPagination;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-015efb63.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
4
7
|
|
|
5
8
|
/*
|
|
6
|
-
Stencil Client Patch Browser
|
|
9
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('helper-pagination.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
15
18
|
};
|
|
16
19
|
|
|
17
|
-
patchBrowser().then(options => {
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
18
22
|
return index.bootstrapLazy([["helper-pagination.cjs",[[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);
|
|
19
23
|
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|