@everymatrix/helper-pagination 0.1.7 → 0.1.21
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/helper-pagination.cjs.entry.js +45 -1
- package/dist/cjs/helper-pagination.cjs.js +2 -2
- package/dist/cjs/{index-02c396b0.js → index-4f0b2d1c.js} +4 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/helper-pagination/helper-pagination.js +70 -1
- package/dist/collection/utils/locale.utils.js +12 -0
- package/dist/components/helper-pagination.js +48 -1
- package/dist/esm/helper-pagination.entry.js +45 -1
- package/dist/esm/helper-pagination.js +2 -2
- package/dist/esm/{index-3528dd0c.js → index-fe031733.js} +4 -0
- package/dist/esm/loader.js +2 -2
- package/dist/helper-pagination/helper-pagination.esm.js +1 -1
- package/dist/helper-pagination/p-68c68be2.js +1 -0
- package/dist/helper-pagination/p-8258fc5c.entry.js +1 -0
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/helper-pagination/.stencil/packages/helper-pagination/stencil.config.d.ts +2 -0
- package/dist/types/components/helper-pagination/helper-pagination.d.ts +13 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/helper-pagination/p-72ab6e2d.entry.js +0 -1
- package/dist/helper-pagination/p-7ed44b06.js +0 -1
- package/dist/types/Users/user/workspace/everymatrix/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-4f0b2d1c.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @name isMobile
|
|
@@ -32,6 +32,18 @@ const TRANSLATIONS = {
|
|
|
32
32
|
nextPage: 'Urmatoarea',
|
|
33
33
|
lastPage: 'Ultima'
|
|
34
34
|
},
|
|
35
|
+
fr: {
|
|
36
|
+
firstPage: 'First',
|
|
37
|
+
previousPage: 'Previous',
|
|
38
|
+
nextPage: 'Next',
|
|
39
|
+
lastPage: 'Last'
|
|
40
|
+
},
|
|
41
|
+
ar: {
|
|
42
|
+
firstPage: 'First',
|
|
43
|
+
previousPage: 'Previous',
|
|
44
|
+
nextPage: 'Next',
|
|
45
|
+
lastPage: 'Last'
|
|
46
|
+
}
|
|
35
47
|
};
|
|
36
48
|
const translate = (key, customLang) => {
|
|
37
49
|
const lang = customLang;
|
|
@@ -68,6 +80,14 @@ const HelperPagination = class {
|
|
|
68
80
|
* Language
|
|
69
81
|
*/
|
|
70
82
|
this.language = 'en';
|
|
83
|
+
/**
|
|
84
|
+
* Client custom styling via string
|
|
85
|
+
*/
|
|
86
|
+
this.clientStyling = '';
|
|
87
|
+
/**
|
|
88
|
+
* Client custom styling via url content
|
|
89
|
+
*/
|
|
90
|
+
this.clientStylingUrlContent = '';
|
|
71
91
|
/**
|
|
72
92
|
* In component working variable for the array of pages
|
|
73
93
|
*/
|
|
@@ -78,6 +98,7 @@ const HelperPagination = class {
|
|
|
78
98
|
this.endInt = 0;
|
|
79
99
|
this.userAgent = window.navigator.userAgent;
|
|
80
100
|
this.currentPage = 1;
|
|
101
|
+
this.limitStylingAppends = false;
|
|
81
102
|
/**
|
|
82
103
|
* Navigation logic
|
|
83
104
|
*/
|
|
@@ -132,6 +153,18 @@ const HelperPagination = class {
|
|
|
132
153
|
this.currentPage = this.offsetInt;
|
|
133
154
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
134
155
|
};
|
|
156
|
+
this.setClientStyling = () => {
|
|
157
|
+
let sheet = document.createElement('style');
|
|
158
|
+
sheet.innerHTML = this.clientStyling;
|
|
159
|
+
this.stylingContainer.prepend(sheet);
|
|
160
|
+
};
|
|
161
|
+
this.setClientStylingURL = () => {
|
|
162
|
+
let cssFile = document.createElement('style');
|
|
163
|
+
setTimeout(() => {
|
|
164
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
165
|
+
this.stylingContainer.prepend(cssFile);
|
|
166
|
+
}, 1);
|
|
167
|
+
};
|
|
135
168
|
}
|
|
136
169
|
componentWillRender() {
|
|
137
170
|
this.offsetInt = this.offset;
|
|
@@ -157,6 +190,17 @@ const HelperPagination = class {
|
|
|
157
190
|
this.pagesArray.unshift('...');
|
|
158
191
|
}
|
|
159
192
|
}
|
|
193
|
+
componentDidRender() {
|
|
194
|
+
// start custom styling area
|
|
195
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
196
|
+
if (this.clientStyling)
|
|
197
|
+
this.setClientStyling();
|
|
198
|
+
if (this.clientStylingUrlContent)
|
|
199
|
+
this.setClientStylingURL();
|
|
200
|
+
this.limitStylingAppends = true;
|
|
201
|
+
}
|
|
202
|
+
// end custom styling area
|
|
203
|
+
}
|
|
160
204
|
render() {
|
|
161
205
|
/**
|
|
162
206
|
* Center navigation area
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-4f0b2d1c.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["helper-pagination.cjs",[[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);
|
|
18
|
+
return index.bootstrapLazy([["helper-pagination.cjs",[[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);
|
|
19
19
|
});
|
|
@@ -648,7 +648,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
648
648
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
649
649
|
const elm = hostRef.$hostElement$;
|
|
650
650
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
651
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
651
652
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
653
|
+
{
|
|
654
|
+
safeCall(instance, 'componentDidRender');
|
|
655
|
+
}
|
|
652
656
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
653
657
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
654
658
|
{
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-4f0b2d1c.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["helper-pagination.cjs",[[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
|
+
return index.bootstrapLazy([["helper-pagination.cjs",[[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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -27,6 +27,14 @@ export class HelperPagination {
|
|
|
27
27
|
* Language
|
|
28
28
|
*/
|
|
29
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 = '';
|
|
30
38
|
/**
|
|
31
39
|
* In component working variable for the array of pages
|
|
32
40
|
*/
|
|
@@ -37,6 +45,7 @@ export class HelperPagination {
|
|
|
37
45
|
this.endInt = 0;
|
|
38
46
|
this.userAgent = window.navigator.userAgent;
|
|
39
47
|
this.currentPage = 1;
|
|
48
|
+
this.limitStylingAppends = false;
|
|
40
49
|
/**
|
|
41
50
|
* Navigation logic
|
|
42
51
|
*/
|
|
@@ -91,6 +100,18 @@ export class HelperPagination {
|
|
|
91
100
|
this.currentPage = this.offsetInt;
|
|
92
101
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
93
102
|
};
|
|
103
|
+
this.setClientStyling = () => {
|
|
104
|
+
let sheet = document.createElement('style');
|
|
105
|
+
sheet.innerHTML = this.clientStyling;
|
|
106
|
+
this.stylingContainer.prepend(sheet);
|
|
107
|
+
};
|
|
108
|
+
this.setClientStylingURL = () => {
|
|
109
|
+
let cssFile = document.createElement('style');
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
112
|
+
this.stylingContainer.prepend(cssFile);
|
|
113
|
+
}, 1);
|
|
114
|
+
};
|
|
94
115
|
}
|
|
95
116
|
componentWillRender() {
|
|
96
117
|
this.offsetInt = this.offset;
|
|
@@ -116,6 +137,17 @@ export class HelperPagination {
|
|
|
116
137
|
this.pagesArray.unshift('...');
|
|
117
138
|
}
|
|
118
139
|
}
|
|
140
|
+
componentDidRender() {
|
|
141
|
+
// start custom styling area
|
|
142
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
143
|
+
if (this.clientStyling)
|
|
144
|
+
this.setClientStyling();
|
|
145
|
+
if (this.clientStylingUrlContent)
|
|
146
|
+
this.setClientStylingURL();
|
|
147
|
+
this.limitStylingAppends = true;
|
|
148
|
+
}
|
|
149
|
+
// end custom styling area
|
|
150
|
+
}
|
|
119
151
|
render() {
|
|
120
152
|
/**
|
|
121
153
|
* Center navigation area
|
|
@@ -268,6 +300,42 @@ export class HelperPagination {
|
|
|
268
300
|
"attribute": "language",
|
|
269
301
|
"reflect": false,
|
|
270
302
|
"defaultValue": "'en'"
|
|
303
|
+
},
|
|
304
|
+
"clientStyling": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"mutable": false,
|
|
307
|
+
"complexType": {
|
|
308
|
+
"original": "string",
|
|
309
|
+
"resolved": "string",
|
|
310
|
+
"references": {}
|
|
311
|
+
},
|
|
312
|
+
"required": false,
|
|
313
|
+
"optional": false,
|
|
314
|
+
"docs": {
|
|
315
|
+
"tags": [],
|
|
316
|
+
"text": "Client custom styling via string"
|
|
317
|
+
},
|
|
318
|
+
"attribute": "client-styling",
|
|
319
|
+
"reflect": false,
|
|
320
|
+
"defaultValue": "''"
|
|
321
|
+
},
|
|
322
|
+
"clientStylingUrlContent": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "string",
|
|
327
|
+
"resolved": "string",
|
|
328
|
+
"references": {}
|
|
329
|
+
},
|
|
330
|
+
"required": false,
|
|
331
|
+
"optional": false,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": "Client custom styling via url content"
|
|
335
|
+
},
|
|
336
|
+
"attribute": "client-styling-url-content",
|
|
337
|
+
"reflect": false,
|
|
338
|
+
"defaultValue": "''"
|
|
271
339
|
}
|
|
272
340
|
}; }
|
|
273
341
|
static get states() { return {
|
|
@@ -276,7 +344,8 @@ export class HelperPagination {
|
|
|
276
344
|
"limitInt": {},
|
|
277
345
|
"totalInt": {},
|
|
278
346
|
"pagesArray": {},
|
|
279
|
-
"endInt": {}
|
|
347
|
+
"endInt": {},
|
|
348
|
+
"limitStylingAppends": {}
|
|
280
349
|
}; }
|
|
281
350
|
static get events() { return [{
|
|
282
351
|
"method": "hpPageChange",
|
|
@@ -13,6 +13,18 @@ const TRANSLATIONS = {
|
|
|
13
13
|
nextPage: 'Urmatoarea',
|
|
14
14
|
lastPage: 'Ultima'
|
|
15
15
|
},
|
|
16
|
+
fr: {
|
|
17
|
+
firstPage: 'First',
|
|
18
|
+
previousPage: 'Previous',
|
|
19
|
+
nextPage: 'Next',
|
|
20
|
+
lastPage: 'Last'
|
|
21
|
+
},
|
|
22
|
+
ar: {
|
|
23
|
+
firstPage: 'First',
|
|
24
|
+
previousPage: 'Previous',
|
|
25
|
+
nextPage: 'Next',
|
|
26
|
+
lastPage: 'Last'
|
|
27
|
+
}
|
|
16
28
|
};
|
|
17
29
|
export const translate = (key, customLang) => {
|
|
18
30
|
const lang = customLang;
|
|
@@ -28,6 +28,18 @@ const TRANSLATIONS = {
|
|
|
28
28
|
nextPage: 'Urmatoarea',
|
|
29
29
|
lastPage: 'Ultima'
|
|
30
30
|
},
|
|
31
|
+
fr: {
|
|
32
|
+
firstPage: 'First',
|
|
33
|
+
previousPage: 'Previous',
|
|
34
|
+
nextPage: 'Next',
|
|
35
|
+
lastPage: 'Last'
|
|
36
|
+
},
|
|
37
|
+
ar: {
|
|
38
|
+
firstPage: 'First',
|
|
39
|
+
previousPage: 'Previous',
|
|
40
|
+
nextPage: 'Next',
|
|
41
|
+
lastPage: 'Last'
|
|
42
|
+
}
|
|
31
43
|
};
|
|
32
44
|
const translate = (key, customLang) => {
|
|
33
45
|
const lang = customLang;
|
|
@@ -66,6 +78,14 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
66
78
|
* Language
|
|
67
79
|
*/
|
|
68
80
|
this.language = 'en';
|
|
81
|
+
/**
|
|
82
|
+
* Client custom styling via string
|
|
83
|
+
*/
|
|
84
|
+
this.clientStyling = '';
|
|
85
|
+
/**
|
|
86
|
+
* Client custom styling via url content
|
|
87
|
+
*/
|
|
88
|
+
this.clientStylingUrlContent = '';
|
|
69
89
|
/**
|
|
70
90
|
* In component working variable for the array of pages
|
|
71
91
|
*/
|
|
@@ -76,6 +96,7 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
76
96
|
this.endInt = 0;
|
|
77
97
|
this.userAgent = window.navigator.userAgent;
|
|
78
98
|
this.currentPage = 1;
|
|
99
|
+
this.limitStylingAppends = false;
|
|
79
100
|
/**
|
|
80
101
|
* Navigation logic
|
|
81
102
|
*/
|
|
@@ -130,6 +151,18 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
130
151
|
this.currentPage = this.offsetInt;
|
|
131
152
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
132
153
|
};
|
|
154
|
+
this.setClientStyling = () => {
|
|
155
|
+
let sheet = document.createElement('style');
|
|
156
|
+
sheet.innerHTML = this.clientStyling;
|
|
157
|
+
this.stylingContainer.prepend(sheet);
|
|
158
|
+
};
|
|
159
|
+
this.setClientStylingURL = () => {
|
|
160
|
+
let cssFile = document.createElement('style');
|
|
161
|
+
setTimeout(() => {
|
|
162
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
163
|
+
this.stylingContainer.prepend(cssFile);
|
|
164
|
+
}, 1);
|
|
165
|
+
};
|
|
133
166
|
}
|
|
134
167
|
componentWillRender() {
|
|
135
168
|
this.offsetInt = this.offset;
|
|
@@ -155,6 +188,17 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
155
188
|
this.pagesArray.unshift('...');
|
|
156
189
|
}
|
|
157
190
|
}
|
|
191
|
+
componentDidRender() {
|
|
192
|
+
// start custom styling area
|
|
193
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
194
|
+
if (this.clientStyling)
|
|
195
|
+
this.setClientStyling();
|
|
196
|
+
if (this.clientStylingUrlContent)
|
|
197
|
+
this.setClientStylingURL();
|
|
198
|
+
this.limitStylingAppends = true;
|
|
199
|
+
}
|
|
200
|
+
// end custom styling area
|
|
201
|
+
}
|
|
158
202
|
render() {
|
|
159
203
|
/**
|
|
160
204
|
* Center navigation area
|
|
@@ -188,12 +232,15 @@ const HelperPagination$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
188
232
|
"limit": [1538],
|
|
189
233
|
"total": [1538],
|
|
190
234
|
"language": [1],
|
|
235
|
+
"clientStyling": [1, "client-styling"],
|
|
236
|
+
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
191
237
|
"offsetInt": [32],
|
|
192
238
|
"lastPage": [32],
|
|
193
239
|
"limitInt": [32],
|
|
194
240
|
"totalInt": [32],
|
|
195
241
|
"pagesArray": [32],
|
|
196
|
-
"endInt": [32]
|
|
242
|
+
"endInt": [32],
|
|
243
|
+
"limitStylingAppends": [32]
|
|
197
244
|
}]);
|
|
198
245
|
function defineCustomElement$1() {
|
|
199
246
|
if (typeof customElements === "undefined") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-fe031733.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name isMobile
|
|
@@ -28,6 +28,18 @@ const TRANSLATIONS = {
|
|
|
28
28
|
nextPage: 'Urmatoarea',
|
|
29
29
|
lastPage: 'Ultima'
|
|
30
30
|
},
|
|
31
|
+
fr: {
|
|
32
|
+
firstPage: 'First',
|
|
33
|
+
previousPage: 'Previous',
|
|
34
|
+
nextPage: 'Next',
|
|
35
|
+
lastPage: 'Last'
|
|
36
|
+
},
|
|
37
|
+
ar: {
|
|
38
|
+
firstPage: 'First',
|
|
39
|
+
previousPage: 'Previous',
|
|
40
|
+
nextPage: 'Next',
|
|
41
|
+
lastPage: 'Last'
|
|
42
|
+
}
|
|
31
43
|
};
|
|
32
44
|
const translate = (key, customLang) => {
|
|
33
45
|
const lang = customLang;
|
|
@@ -64,6 +76,14 @@ const HelperPagination = class {
|
|
|
64
76
|
* Language
|
|
65
77
|
*/
|
|
66
78
|
this.language = 'en';
|
|
79
|
+
/**
|
|
80
|
+
* Client custom styling via string
|
|
81
|
+
*/
|
|
82
|
+
this.clientStyling = '';
|
|
83
|
+
/**
|
|
84
|
+
* Client custom styling via url content
|
|
85
|
+
*/
|
|
86
|
+
this.clientStylingUrlContent = '';
|
|
67
87
|
/**
|
|
68
88
|
* In component working variable for the array of pages
|
|
69
89
|
*/
|
|
@@ -74,6 +94,7 @@ const HelperPagination = class {
|
|
|
74
94
|
this.endInt = 0;
|
|
75
95
|
this.userAgent = window.navigator.userAgent;
|
|
76
96
|
this.currentPage = 1;
|
|
97
|
+
this.limitStylingAppends = false;
|
|
77
98
|
/**
|
|
78
99
|
* Navigation logic
|
|
79
100
|
*/
|
|
@@ -128,6 +149,18 @@ const HelperPagination = class {
|
|
|
128
149
|
this.currentPage = this.offsetInt;
|
|
129
150
|
this.hpPageChange.emit({ offset: this.offsetInt, limit: this.limitInt, total: this.totalInt });
|
|
130
151
|
};
|
|
152
|
+
this.setClientStyling = () => {
|
|
153
|
+
let sheet = document.createElement('style');
|
|
154
|
+
sheet.innerHTML = this.clientStyling;
|
|
155
|
+
this.stylingContainer.prepend(sheet);
|
|
156
|
+
};
|
|
157
|
+
this.setClientStylingURL = () => {
|
|
158
|
+
let cssFile = document.createElement('style');
|
|
159
|
+
setTimeout(() => {
|
|
160
|
+
cssFile.innerHTML = this.clientStylingUrlContent;
|
|
161
|
+
this.stylingContainer.prepend(cssFile);
|
|
162
|
+
}, 1);
|
|
163
|
+
};
|
|
131
164
|
}
|
|
132
165
|
componentWillRender() {
|
|
133
166
|
this.offsetInt = this.offset;
|
|
@@ -153,6 +186,17 @@ const HelperPagination = class {
|
|
|
153
186
|
this.pagesArray.unshift('...');
|
|
154
187
|
}
|
|
155
188
|
}
|
|
189
|
+
componentDidRender() {
|
|
190
|
+
// start custom styling area
|
|
191
|
+
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
192
|
+
if (this.clientStyling)
|
|
193
|
+
this.setClientStyling();
|
|
194
|
+
if (this.clientStylingUrlContent)
|
|
195
|
+
this.setClientStylingURL();
|
|
196
|
+
this.limitStylingAppends = true;
|
|
197
|
+
}
|
|
198
|
+
// end custom styling area
|
|
199
|
+
}
|
|
156
200
|
render() {
|
|
157
201
|
/**
|
|
158
202
|
* Center navigation area
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fe031733.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],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["helper-pagination",[[1,"helper-pagination",{"firstPage":[1540,"first-page"],"previousPage":[1540,"previous-page"],"offset":[1538],"limit":[1538],"total":[1538],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32],"limitStylingAppends":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -626,7 +626,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
626
626
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
627
627
|
const elm = hostRef.$hostElement$;
|
|
628
628
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
629
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
629
630
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
631
|
+
{
|
|
632
|
+
safeCall(instance, 'componentDidRender');
|
|
633
|
+
}
|
|
630
634
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
631
635
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
632
636
|
{
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-fe031733.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],"offsetInt":[32],"lastPage":[32],"limitInt":[32],"totalInt":[32],"pagesArray":[32],"endInt":[32]}]]]], options);
|
|
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);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as
|
|
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)));
|
|
@@ -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=V(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(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):V(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)=>{for(;t<=n;++t)(l=e[t])&&l.h.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,t,n)=>{const l=(e=>q(e).m)(e);return{emit:e=>k(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},k=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},C=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},O=(e,t)=>{if(e.t|=16,!(4&e.t))return C(e,e.g),Z((()=>P(e,t)));e.t|=512},P=(e,t)=>{const n=e.j;let l;return l=W(l,(()=>T(n,"componentWillRender"))),W(l,(()=>R(e,n,t)))},R=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=G.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);x(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},x=(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){_(e,n.m)}return null},E=e=>{const t=e.m,n=e.g;T(e.j,"componentDidRender"),64&e.t||(e.t|=64,A(t),e.C(t),n||N()),e.S&&(e.S(),e.S=void 0),512&e.t&&Y((()=>O(e,!1))),e.t&=-517},N=()=>{A(s.documentElement),Y((()=>k(l,"appload",{detail:{namespace:"helper-pagination"}})))},T=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){_(e)}},W=(e,t)=>e&&e.then?e.then(t):t(),A=e=>e.classList.add("hydrated"),F=(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)=>q(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(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)&&O(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},L=(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),H(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=q(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"]){C(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=B(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(F(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){_(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>O(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return q(this).N}};l.T=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,F(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(N,30)))},U=new WeakMap,q=e=>U.get(e),D=(e,t)=>U.set(t.j=e,t),H=(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"]=[],U.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)},G=new Map,I=[],J=[],K=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Y(X):o.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},X=()=>{Q(I),Q(J),(n=I.length>0)&&o.raf(X)},Y=e=>r().then(e),Z=K(J,!0);export{L as b,v as c,p as h,r as p,D as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-68c68be2.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"],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"}},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.firstPage=!1,this.previousPage=!1,this.offset=0,this.limit=1,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",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-=10;break;case"nextPage":this.offsetInt+=10;break;case"fivePagesBack":this.offsetInt-=30,this.offsetInt=this.offsetInt<0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=30,this.offsetInt=this.offsetInt/10>=this.endInt?10*this.endInt:this.offsetInt}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{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"):this.offsetInt=1===t?t-1:10*(t-1),this.currentPage=this.offsetInt,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.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("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"firstPage")},n("firstPage",this.language)),s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language)));e(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language))));let a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)),s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"lastPage")},n("lastPage",this.language)));return e(this.userAgent)&&(a=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)))),s("div",{id:"PaginationContainer"},i,t,a)}};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-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}}';export{h as helper_pagination}
|
|
@@ -24,6 +24,14 @@ export declare class HelperPagination {
|
|
|
24
24
|
* Language
|
|
25
25
|
*/
|
|
26
26
|
language: string;
|
|
27
|
+
/**
|
|
28
|
+
* Client custom styling via string
|
|
29
|
+
*/
|
|
30
|
+
clientStyling: string;
|
|
31
|
+
/**
|
|
32
|
+
* Client custom styling via url content
|
|
33
|
+
*/
|
|
34
|
+
clientStylingUrlContent: string;
|
|
27
35
|
/**
|
|
28
36
|
* Component working variable for offset
|
|
29
37
|
*/
|
|
@@ -54,6 +62,8 @@ export declare class HelperPagination {
|
|
|
54
62
|
* Event that handles the navigation, updating the offset, limit and total values
|
|
55
63
|
*/
|
|
56
64
|
hpPageChange: EventEmitter<any>;
|
|
65
|
+
private limitStylingAppends;
|
|
66
|
+
private stylingContainer;
|
|
57
67
|
/**
|
|
58
68
|
* Navigation logic
|
|
59
69
|
*/
|
|
@@ -63,5 +73,8 @@ export declare class HelperPagination {
|
|
|
63
73
|
*/
|
|
64
74
|
paginationNavigation: (pageNumber: number, index: any) => void;
|
|
65
75
|
componentWillRender(): void;
|
|
76
|
+
componentDidRender(): void;
|
|
77
|
+
setClientStyling: () => void;
|
|
78
|
+
setClientStylingURL: () => void;
|
|
66
79
|
render(): any;
|
|
67
80
|
}
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
9
|
interface HelperPagination {
|
|
10
|
+
/**
|
|
11
|
+
* Client custom styling via string
|
|
12
|
+
*/
|
|
13
|
+
"clientStyling": string;
|
|
14
|
+
/**
|
|
15
|
+
* Client custom styling via url content
|
|
16
|
+
*/
|
|
17
|
+
"clientStylingUrlContent": string;
|
|
10
18
|
/**
|
|
11
19
|
* First page boolean value - determines if the page is disabled or active
|
|
12
20
|
*/
|
|
@@ -46,6 +54,14 @@ declare global {
|
|
|
46
54
|
}
|
|
47
55
|
declare namespace LocalJSX {
|
|
48
56
|
interface HelperPagination {
|
|
57
|
+
/**
|
|
58
|
+
* Client custom styling via string
|
|
59
|
+
*/
|
|
60
|
+
"clientStyling"?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Client custom styling via url content
|
|
63
|
+
*/
|
|
64
|
+
"clientStylingUrlContent"?: string;
|
|
49
65
|
/**
|
|
50
66
|
* First page boolean value - determines if the page is disabled or active
|
|
51
67
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s}from"./p-7ed44b06.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)),o=["ro","en"],a={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"}},n=(t,i)=>{const s=i;return a[void 0!==s&&o.includes(s)?s:"en"][t]},h=class{constructor(s){t(this,s),this.hpPageChange=i(this,"hpPageChange",7),this.firstPage=!1,this.previousPage=!1,this.offset=0,this.limit=1,this.total=1,this.language="en",this.pagesArray=[],this.endInt=0,this.userAgent=window.navigator.userAgent,this.currentPage=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-=10;break;case"nextPage":this.offsetInt+=10;break;case"fivePagesBack":this.offsetInt-=30,this.offsetInt=this.offsetInt<0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=30,this.offsetInt=this.offsetInt/10>=this.endInt?10*this.endInt:this.offsetInt}this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{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"):this.offsetInt=1===t?t-1:10*(t-1),this.currentPage=this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})}}componentWillRender(){this.offsetInt=this.offset,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("..."))}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("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"firstPage")},n("firstPage",this.language)),s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language)));e(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.previousPage,onClick:this.navigateTo.bind(this,"previousPage")},n("previousPage",this.language))));let o=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)),s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"lastPage")},n("lastPage",this.language)));return e(this.userAgent)&&(o=s("div",{class:"RightItems"},s("button",{disabled:!this.lastPage,onClick:this.navigateTo.bind(this,"nextPage")},n("nextPage",this.language)))),s("div",{id:"PaginationContainer"},i,t,o)}};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-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}}';export{h as helper_pagination}
|
|
@@ -1 +0,0 @@
|
|
|
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,$=(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?h(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=h(e,null);return c.u=t,r.length>0&&(c.$=r),c},h=(e,t)=>({t:0,h:e,i:t,p:null,$:null,u:null}),p={},d=(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(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.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||d(s,l,o[l],void 0,n,t.t);for(l in r)d(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.p=s.createTextNode(i.i);else if(o=i.p=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.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].p=i,c.insertBefore(i,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.p.remove()},j=(e,t)=>e.h===t.h,M=(e,t)=>{const n=t.p=e.p,l=e.$,s=t.$,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],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(M(c,f),c=t[++o],f=l[++r]):j(u,$)?(M(u,$),u=t[--i],$=l[--a]):j(c,$)?(M(c,$),e.insertBefore(c.p,u.p.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(M(u,f),e.insertBefore(u.p,c.p),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.p.parentNode.insertBefore(s,c.p));o>i?S(e,null==l[a+1]?null:l[a+1].p,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,t,n)=>{const l=(e=>q(e).m)(e);return{emit:e=>k(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},k=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},C=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},O=(e,t)=>{if(e.t|=16,!(4&e.t))return C(e,e.g),Z((()=>P(e,t)));e.t|=512},P=(e,t)=>{const n=e.j;let l;return l=W(l,(()=>T(n,"componentWillRender"))),W(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=G.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||h(null,null),i=(e=>e&&e.h===p)(l)?l:$(null,null,l);t=s.tagName,o.k&&(i.u=i.u||{},o.k.map((([e,t])=>i.u[t]=s[e]))),i.h=null,i.t|=4,n.v=i,i.p=r.p=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;64&e.t||(e.t|=64,A(t),e.C(t),n||R()),e.S&&(e.S(),e.S=void 0),512&e.t&&Y((()=>O(e,!1))),e.t&=-517},R=()=>{A(s.documentElement),Y((()=>k(l,"appload",{detail:{namespace:"helper-pagination"}})))},T=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){z(e)}},W=(e,t)=>e&&e.then?e.then(t):t(),A=e=>e.classList.add("hydrated"),F=(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)=>q(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(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)&&O(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},L=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),h=[];let p,d=!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],N: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(){p&&(clearTimeout(p),p=null),d?h.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=q(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"]){C(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=D(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(F(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(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,G.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>O(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return q(this).R}};l.T=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,F(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),d=!1,h.length?h.map((e=>e.connectedCallback())):o.jmp((()=>p=setTimeout(R,30)))},U=new WeakMap,q=e=>U.get(e),H=(e,t)=>U.set(t.j=e,t),V=(e,t)=>{const n={t:0,m:e,M:t,P:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],U.set(e,n)},_=(e,t)=>t in e,z=(e,t)=>(0,console.error)(e,t),B=new Map,D=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)},G=new Map,I=[],J=[],K=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Y(X):o.raf(X))},Q=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){z(e)}e.length=0},X=()=>{Q(I),Q(J),(n=I.length>0)&&o.raf(X)},Y=e=>r().then(e),Z=K(J,!0);export{L as b,v as c,$ as h,r as p,H as r}
|