@everymatrix/helper-pagination 1.99.26 → 1.99.28
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 +37 -50
- package/dist/cjs/helper-pagination.cjs.js +1 -1
- package/dist/cjs/{index-d76910e9.js → index-523d3f5b.js} +38 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/helper-pagination/helper-pagination.css +30 -8
- package/dist/collection/components/helper-pagination/helper-pagination.js +26 -39
- package/dist/collection/utils/locale.utils.js +9 -9
- package/dist/esm/helper-pagination.entry.js +37 -50
- package/dist/esm/helper-pagination.js +2 -2
- package/dist/esm/{index-0483e183.js → index-4984476a.js} +38 -1
- package/dist/esm/loader.js +2 -2
- package/dist/helper-pagination/helper-pagination.entry.js +1 -1
- package/dist/helper-pagination/helper-pagination.esm.js +1 -1
- package/dist/helper-pagination/index-4984476a.js +2 -0
- package/dist/types/components/helper-pagination/helper-pagination.d.ts +1 -0
- package/package.json +1 -1
- package/dist/helper-pagination/index-0483e183.js +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-523d3f5b.js');
|
|
6
6
|
|
|
7
7
|
const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
|
|
8
8
|
|
|
@@ -144,10 +144,10 @@ const TRANSLATIONS = {
|
|
|
144
144
|
lastPage: 'Last'
|
|
145
145
|
},
|
|
146
146
|
ro: {
|
|
147
|
-
firstPage: '
|
|
148
|
-
previousPage: '
|
|
149
|
-
nextPage: '
|
|
150
|
-
lastPage: '
|
|
147
|
+
firstPage: 'First',
|
|
148
|
+
previousPage: 'Previous',
|
|
149
|
+
nextPage: 'Next',
|
|
150
|
+
lastPage: 'Last'
|
|
151
151
|
},
|
|
152
152
|
fr: {
|
|
153
153
|
firstPage: 'First',
|
|
@@ -164,14 +164,14 @@ const TRANSLATIONS = {
|
|
|
164
164
|
hu: {
|
|
165
165
|
firstPage: 'First',
|
|
166
166
|
previousPage: 'Previous',
|
|
167
|
-
nextPage: '
|
|
167
|
+
nextPage: 'Next',
|
|
168
168
|
lastPage: 'Last'
|
|
169
169
|
},
|
|
170
170
|
hr: {
|
|
171
|
-
firstPage: '
|
|
172
|
-
previousPage: '
|
|
173
|
-
nextPage: '
|
|
174
|
-
lastPage: '
|
|
171
|
+
firstPage: 'First',
|
|
172
|
+
previousPage: 'Previous',
|
|
173
|
+
nextPage: 'Next',
|
|
174
|
+
lastPage: 'Last'
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
const translate = (key, customLang) => {
|
|
@@ -179,7 +179,7 @@ const translate = (key, customLang) => {
|
|
|
179
179
|
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
180
180
|
};
|
|
181
181
|
|
|
182
|
-
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
|
|
182
|
+
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 .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{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 a{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 a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
|
|
183
183
|
const HelperPaginationStyle0 = helperPaginationCss;
|
|
184
184
|
|
|
185
185
|
const HelperPagination = class {
|
|
@@ -290,7 +290,10 @@ const HelperPagination = class {
|
|
|
290
290
|
/**
|
|
291
291
|
* Construct numbered navigation area based on current page position
|
|
292
292
|
*/
|
|
293
|
-
if (this.
|
|
293
|
+
if (this.endInt < 4) {
|
|
294
|
+
this.pagesArray = Array.from({ length: this.endInt + 1 }, (_, i) => i + 1);
|
|
295
|
+
}
|
|
296
|
+
else if (this.currentPage == 1 || this.currentPage == 2) {
|
|
294
297
|
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
295
298
|
this.pagesArray.push('...');
|
|
296
299
|
}
|
|
@@ -324,8 +327,24 @@ const HelperPagination = class {
|
|
|
324
327
|
if (!this.pageQueryParam)
|
|
325
328
|
return '#';
|
|
326
329
|
const url = new URL(window.location.href);
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
const pageNumber = page + this.page - 1;
|
|
331
|
+
if (pageNumber === 1) {
|
|
332
|
+
url.searchParams.delete(this.pageQueryParam);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
url.searchParams.set(this.pageQueryParam, String(pageNumber));
|
|
336
|
+
}
|
|
337
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
338
|
+
}
|
|
339
|
+
renderNavigationButton(page, navigation, enabled, rel) {
|
|
340
|
+
const Tag = enabled ? 'a' : 'span';
|
|
341
|
+
const label = translate(navigation, this.language);
|
|
342
|
+
return (index.h(Tag, { class: "PaginationControl", href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
|
|
343
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
344
|
+
return;
|
|
345
|
+
event.preventDefault();
|
|
346
|
+
this.navigateTo(navigation);
|
|
347
|
+
} : undefined }, index.h("span", { class: "NavigationButton" }, label), index.h("span", { class: "NavigationIcon" })));
|
|
329
348
|
}
|
|
330
349
|
render() {
|
|
331
350
|
/**
|
|
@@ -336,6 +355,8 @@ const HelperPagination = class {
|
|
|
336
355
|
? Math.max(1, this.currentPage - 5)
|
|
337
356
|
: Math.min(this.endInt + 1, this.currentPage + 5);
|
|
338
357
|
return (index.h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, index.h("a", { href: this.pageHref(page), "aria-current": item === this.currentPage ? 'page' : undefined, "aria-disabled": item === this.currentPage ? 'true' : undefined, tabIndex: item === this.currentPage ? -1 : undefined, onClick: event => {
|
|
358
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
359
|
+
return;
|
|
339
360
|
event.preventDefault();
|
|
340
361
|
if (item !== this.currentPage)
|
|
341
362
|
this.paginationNavigation(item, index$1);
|
|
@@ -344,45 +365,11 @@ const HelperPagination = class {
|
|
|
344
365
|
/**
|
|
345
366
|
* Left navigation area
|
|
346
367
|
*/
|
|
347
|
-
|
|
348
|
-
event.preventDefault();
|
|
349
|
-
if (this.prevPage)
|
|
350
|
-
this.navigateTo('firstPage');
|
|
351
|
-
} }, index.h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), index.h("span", { class: "NavigationIcon" }));
|
|
352
|
-
let buttonsLeftSide = index.h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, index.h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
353
|
-
event.preventDefault();
|
|
354
|
-
if (this.prevPage)
|
|
355
|
-
this.navigateTo('previousPage');
|
|
356
|
-
} }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
357
|
-
if (isMobile(this.userAgent)) {
|
|
358
|
-
buttonsLeftSide =
|
|
359
|
-
index.h("div", { class: "LeftItems" }, index.h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
360
|
-
event.preventDefault();
|
|
361
|
-
if (this.prevPage)
|
|
362
|
-
this.navigateTo('previousPage');
|
|
363
|
-
} }, index.h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
364
|
-
}
|
|
368
|
+
const buttonsLeftSide = index.h("div", { class: "LeftItems" }, this.secondaryArrowsActive && this.renderNavigationButton(1, 'firstPage', Boolean(this.prevPage)), this.renderNavigationButton(this.currentPage - 1, 'previousPage', Boolean(this.prevPage), 'prev'));
|
|
365
369
|
/**
|
|
366
370
|
* Right navigation area
|
|
367
371
|
*/
|
|
368
|
-
|
|
369
|
-
event.preventDefault();
|
|
370
|
-
if (this.nextPage)
|
|
371
|
-
this.navigateTo('lastPage');
|
|
372
|
-
} }, index.h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), index.h("span", { class: "NavigationIcon" }));
|
|
373
|
-
let buttonsRightSide = index.h("div", { class: "RightItems" }, index.h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
374
|
-
event.preventDefault();
|
|
375
|
-
if (this.nextPage)
|
|
376
|
-
this.navigateTo('nextPage');
|
|
377
|
-
} }, index.h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), index.h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
|
|
378
|
-
if (isMobile(this.userAgent)) {
|
|
379
|
-
buttonsRightSide =
|
|
380
|
-
index.h("div", { class: "RightItems" }, index.h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
381
|
-
event.preventDefault();
|
|
382
|
-
if (this.nextPage)
|
|
383
|
-
this.navigateTo('nextPage');
|
|
384
|
-
} }, index.h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), index.h("span", { class: "NavigationIcon" })));
|
|
385
|
-
}
|
|
372
|
+
const buttonsRightSide = index.h("div", { class: "RightItems" }, this.renderNavigationButton(this.currentPage + 1, 'nextPage', Boolean(this.nextPage), 'next'), this.secondaryArrowsActive && this.renderNavigationButton(this.endInt + 1, 'lastPage', Boolean(this.nextPage)));
|
|
386
373
|
return (index.h("nav", { id: "PaginationContainer", class: "PaginationContainer", "aria-label": "Blog pagination", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
|
|
387
374
|
}
|
|
388
375
|
static get watchers() { return {
|
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'helper-pagination';
|
|
24
|
-
const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional:
|
|
24
|
+
const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -261,6 +261,13 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
+
if (typeof nodeName === "function") {
|
|
265
|
+
return nodeName(
|
|
266
|
+
vnodeData === null ? {} : vnodeData,
|
|
267
|
+
vNodeChildren,
|
|
268
|
+
vdomFnUtils
|
|
269
|
+
);
|
|
270
|
+
}
|
|
264
271
|
const vnode = newVNode(nodeName, null);
|
|
265
272
|
vnode.$attrs$ = vnodeData;
|
|
266
273
|
if (vNodeChildren.length > 0) {
|
|
@@ -283,6 +290,36 @@ var newVNode = (tag, text) => {
|
|
|
283
290
|
};
|
|
284
291
|
var Host = {};
|
|
285
292
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
293
|
+
var vdomFnUtils = {
|
|
294
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
295
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
296
|
+
};
|
|
297
|
+
var convertToPublic = (node) => ({
|
|
298
|
+
vattrs: node.$attrs$,
|
|
299
|
+
vchildren: node.$children$,
|
|
300
|
+
vkey: node.$key$,
|
|
301
|
+
vname: node.$name$,
|
|
302
|
+
vtag: node.$tag$,
|
|
303
|
+
vtext: node.$text$
|
|
304
|
+
});
|
|
305
|
+
var convertToPrivate = (node) => {
|
|
306
|
+
if (typeof node.vtag === "function") {
|
|
307
|
+
const vnodeData = { ...node.vattrs };
|
|
308
|
+
if (node.vkey) {
|
|
309
|
+
vnodeData.key = node.vkey;
|
|
310
|
+
}
|
|
311
|
+
if (node.vname) {
|
|
312
|
+
vnodeData.name = node.vname;
|
|
313
|
+
}
|
|
314
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
315
|
+
}
|
|
316
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
317
|
+
vnode.$attrs$ = node.vattrs;
|
|
318
|
+
vnode.$children$ = node.vchildren;
|
|
319
|
+
vnode.$key$ = node.vkey;
|
|
320
|
+
vnode.$name$ = node.vname;
|
|
321
|
+
return vnode;
|
|
322
|
+
};
|
|
286
323
|
var parsePropertyValue = (propValue, propType) => {
|
|
287
324
|
if (propValue != null && !isComplexType(propValue)) {
|
|
288
325
|
if (propType & 4 /* Boolean */) {
|
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-523d3f5b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.LeftItems
|
|
15
|
+
.LeftItems .PaginationControl:not(:first-child), .RightItems .PaginationControl:not(:last-child) {
|
|
16
16
|
margin: 0 10px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.LeftItems
|
|
19
|
+
.LeftItems .PaginationControl, .RightItems .PaginationControl {
|
|
20
20
|
padding: 0;
|
|
21
21
|
background-color: #009993;
|
|
22
22
|
border-color: #009993;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
opacity: 0.8;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
a {
|
|
69
|
+
a, .PaginationControl {
|
|
70
70
|
display: inline-flex;
|
|
71
71
|
justify-content: center;
|
|
72
72
|
align-items: center;
|
|
@@ -81,7 +81,7 @@ a {
|
|
|
81
81
|
font-size: 14px;
|
|
82
82
|
font: inherit;
|
|
83
83
|
cursor: pointer;
|
|
84
|
-
transition:
|
|
84
|
+
transition: background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;
|
|
85
85
|
text-transform: uppercase;
|
|
86
86
|
text-align: center;
|
|
87
87
|
letter-spacing: 0;
|
|
@@ -93,7 +93,7 @@ a:active {
|
|
|
93
93
|
border-color: #004D4A;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
a[aria-disabled=true] {
|
|
96
|
+
a[aria-disabled=true], .PaginationControl[aria-disabled=true] {
|
|
97
97
|
background-color: #ccc;
|
|
98
98
|
border-color: #ccc;
|
|
99
99
|
color: #fff;
|
|
@@ -101,13 +101,35 @@ a[aria-disabled=true] {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
@media screen and (max-width: 720px) {
|
|
104
|
-
|
|
104
|
+
#PaginationContainer {
|
|
105
|
+
flex-wrap: wrap;
|
|
106
|
+
row-gap: 10px;
|
|
107
|
+
}
|
|
108
|
+
#PaginationContainer .LeftItems, #PaginationContainer .RightItems {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
gap: 10px;
|
|
112
|
+
}
|
|
113
|
+
#PaginationContainer .RightItems {
|
|
114
|
+
flex-direction: column-reverse;
|
|
115
|
+
}
|
|
116
|
+
#PaginationContainer .PaginationControl {
|
|
117
|
+
margin: 0;
|
|
118
|
+
}
|
|
119
|
+
#PaginationContainer .PaginationArea {
|
|
120
|
+
order: 1;
|
|
121
|
+
flex-basis: 100%;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
margin: 0;
|
|
124
|
+
padding: 0;
|
|
125
|
+
}
|
|
126
|
+
a, .PaginationControl {
|
|
105
127
|
width: 90px;
|
|
106
128
|
font-size: 14px;
|
|
107
129
|
}
|
|
108
130
|
}
|
|
109
131
|
@media screen and (max-width: 480px) {
|
|
110
|
-
a {
|
|
132
|
+
a, .PaginationControl {
|
|
111
133
|
width: 70px;
|
|
112
134
|
font-size: 14px;
|
|
113
135
|
}
|
|
@@ -116,7 +138,7 @@ a[aria-disabled=true] {
|
|
|
116
138
|
}
|
|
117
139
|
}
|
|
118
140
|
@media screen and (max-width: 320px) {
|
|
119
|
-
a {
|
|
141
|
+
a, .PaginationControl {
|
|
120
142
|
width: 58px;
|
|
121
143
|
font-size: 12px;
|
|
122
144
|
}
|
|
@@ -108,7 +108,10 @@ export class HelperPagination {
|
|
|
108
108
|
/**
|
|
109
109
|
* Construct numbered navigation area based on current page position
|
|
110
110
|
*/
|
|
111
|
-
if (this.
|
|
111
|
+
if (this.endInt < 4) {
|
|
112
|
+
this.pagesArray = Array.from({ length: this.endInt + 1 }, (_, i) => i + 1);
|
|
113
|
+
}
|
|
114
|
+
else if (this.currentPage == 1 || this.currentPage == 2) {
|
|
112
115
|
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
113
116
|
this.pagesArray.push('...');
|
|
114
117
|
}
|
|
@@ -142,8 +145,24 @@ export class HelperPagination {
|
|
|
142
145
|
if (!this.pageQueryParam)
|
|
143
146
|
return '#';
|
|
144
147
|
const url = new URL(window.location.href);
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
const pageNumber = page + this.page - 1;
|
|
149
|
+
if (pageNumber === 1) {
|
|
150
|
+
url.searchParams.delete(this.pageQueryParam);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
url.searchParams.set(this.pageQueryParam, String(pageNumber));
|
|
154
|
+
}
|
|
155
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
156
|
+
}
|
|
157
|
+
renderNavigationButton(page, navigation, enabled, rel) {
|
|
158
|
+
const Tag = enabled ? 'a' : 'span';
|
|
159
|
+
const label = translate(navigation, this.language);
|
|
160
|
+
return (h(Tag, { class: "PaginationControl", href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
|
|
161
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
162
|
+
return;
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
this.navigateTo(navigation);
|
|
165
|
+
} : undefined }, h("span", { class: "NavigationButton" }, label), h("span", { class: "NavigationIcon" })));
|
|
147
166
|
}
|
|
148
167
|
render() {
|
|
149
168
|
/**
|
|
@@ -154,6 +173,8 @@ export class HelperPagination {
|
|
|
154
173
|
? Math.max(1, this.currentPage - 5)
|
|
155
174
|
: Math.min(this.endInt + 1, this.currentPage + 5);
|
|
156
175
|
return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, h("a", { href: this.pageHref(page), "aria-current": item === this.currentPage ? 'page' : undefined, "aria-disabled": item === this.currentPage ? 'true' : undefined, tabIndex: item === this.currentPage ? -1 : undefined, onClick: event => {
|
|
176
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
177
|
+
return;
|
|
157
178
|
event.preventDefault();
|
|
158
179
|
if (item !== this.currentPage)
|
|
159
180
|
this.paginationNavigation(item, index);
|
|
@@ -162,45 +183,11 @@ export class HelperPagination {
|
|
|
162
183
|
/**
|
|
163
184
|
* Left navigation area
|
|
164
185
|
*/
|
|
165
|
-
|
|
166
|
-
event.preventDefault();
|
|
167
|
-
if (this.prevPage)
|
|
168
|
-
this.navigateTo('firstPage');
|
|
169
|
-
} }, h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), h("span", { class: "NavigationIcon" }));
|
|
170
|
-
let buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
171
|
-
event.preventDefault();
|
|
172
|
-
if (this.prevPage)
|
|
173
|
-
this.navigateTo('previousPage');
|
|
174
|
-
} }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
175
|
-
if (isMobile(this.userAgent)) {
|
|
176
|
-
buttonsLeftSide =
|
|
177
|
-
h("div", { class: "LeftItems" }, h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
178
|
-
event.preventDefault();
|
|
179
|
-
if (this.prevPage)
|
|
180
|
-
this.navigateTo('previousPage');
|
|
181
|
-
} }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
182
|
-
}
|
|
186
|
+
const buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && this.renderNavigationButton(1, 'firstPage', Boolean(this.prevPage)), this.renderNavigationButton(this.currentPage - 1, 'previousPage', Boolean(this.prevPage), 'prev'));
|
|
183
187
|
/**
|
|
184
188
|
* Right navigation area
|
|
185
189
|
*/
|
|
186
|
-
|
|
187
|
-
event.preventDefault();
|
|
188
|
-
if (this.nextPage)
|
|
189
|
-
this.navigateTo('lastPage');
|
|
190
|
-
} }, h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), h("span", { class: "NavigationIcon" }));
|
|
191
|
-
let buttonsRightSide = h("div", { class: "RightItems" }, h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
192
|
-
event.preventDefault();
|
|
193
|
-
if (this.nextPage)
|
|
194
|
-
this.navigateTo('nextPage');
|
|
195
|
-
} }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
|
|
196
|
-
if (isMobile(this.userAgent)) {
|
|
197
|
-
buttonsRightSide =
|
|
198
|
-
h("div", { class: "RightItems" }, h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
199
|
-
event.preventDefault();
|
|
200
|
-
if (this.nextPage)
|
|
201
|
-
this.navigateTo('nextPage');
|
|
202
|
-
} }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
203
|
-
}
|
|
190
|
+
const buttonsRightSide = h("div", { class: "RightItems" }, this.renderNavigationButton(this.currentPage + 1, 'nextPage', Boolean(this.nextPage), 'next'), this.secondaryArrowsActive && this.renderNavigationButton(this.endInt + 1, 'lastPage', Boolean(this.nextPage)));
|
|
204
191
|
return (h("nav", { id: "PaginationContainer", class: "PaginationContainer", "aria-label": "Blog pagination", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
|
|
205
192
|
}
|
|
206
193
|
static get is() { return "helper-pagination"; }
|
|
@@ -7,10 +7,10 @@ const TRANSLATIONS = {
|
|
|
7
7
|
lastPage: 'Last'
|
|
8
8
|
},
|
|
9
9
|
ro: {
|
|
10
|
-
firstPage: '
|
|
11
|
-
previousPage: '
|
|
12
|
-
nextPage: '
|
|
13
|
-
lastPage: '
|
|
10
|
+
firstPage: 'First',
|
|
11
|
+
previousPage: 'Previous',
|
|
12
|
+
nextPage: 'Next',
|
|
13
|
+
lastPage: 'Last'
|
|
14
14
|
},
|
|
15
15
|
fr: {
|
|
16
16
|
firstPage: 'First',
|
|
@@ -27,14 +27,14 @@ const TRANSLATIONS = {
|
|
|
27
27
|
hu: {
|
|
28
28
|
firstPage: 'First',
|
|
29
29
|
previousPage: 'Previous',
|
|
30
|
-
nextPage: '
|
|
30
|
+
nextPage: 'Next',
|
|
31
31
|
lastPage: 'Last'
|
|
32
32
|
},
|
|
33
33
|
hr: {
|
|
34
|
-
firstPage: '
|
|
35
|
-
previousPage: '
|
|
36
|
-
nextPage: '
|
|
37
|
-
lastPage: '
|
|
34
|
+
firstPage: 'First',
|
|
35
|
+
previousPage: 'Previous',
|
|
36
|
+
nextPage: 'Next',
|
|
37
|
+
lastPage: 'Last'
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
export const translate = (key, customLang) => {
|
|
@@ -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-4984476a.js';
|
|
2
2
|
|
|
3
3
|
const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
|
|
4
4
|
|
|
@@ -140,10 +140,10 @@ const TRANSLATIONS = {
|
|
|
140
140
|
lastPage: 'Last'
|
|
141
141
|
},
|
|
142
142
|
ro: {
|
|
143
|
-
firstPage: '
|
|
144
|
-
previousPage: '
|
|
145
|
-
nextPage: '
|
|
146
|
-
lastPage: '
|
|
143
|
+
firstPage: 'First',
|
|
144
|
+
previousPage: 'Previous',
|
|
145
|
+
nextPage: 'Next',
|
|
146
|
+
lastPage: 'Last'
|
|
147
147
|
},
|
|
148
148
|
fr: {
|
|
149
149
|
firstPage: 'First',
|
|
@@ -160,14 +160,14 @@ const TRANSLATIONS = {
|
|
|
160
160
|
hu: {
|
|
161
161
|
firstPage: 'First',
|
|
162
162
|
previousPage: 'Previous',
|
|
163
|
-
nextPage: '
|
|
163
|
+
nextPage: 'Next',
|
|
164
164
|
lastPage: 'Last'
|
|
165
165
|
},
|
|
166
166
|
hr: {
|
|
167
|
-
firstPage: '
|
|
168
|
-
previousPage: '
|
|
169
|
-
nextPage: '
|
|
170
|
-
lastPage: '
|
|
167
|
+
firstPage: 'First',
|
|
168
|
+
previousPage: 'Previous',
|
|
169
|
+
nextPage: 'Next',
|
|
170
|
+
lastPage: 'Last'
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
const translate = (key, customLang) => {
|
|
@@ -175,7 +175,7 @@ const translate = (key, customLang) => {
|
|
|
175
175
|
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
-
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
|
|
178
|
+
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 .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{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 a{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 a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}";
|
|
179
179
|
const HelperPaginationStyle0 = helperPaginationCss;
|
|
180
180
|
|
|
181
181
|
const HelperPagination = class {
|
|
@@ -286,7 +286,10 @@ const HelperPagination = class {
|
|
|
286
286
|
/**
|
|
287
287
|
* Construct numbered navigation area based on current page position
|
|
288
288
|
*/
|
|
289
|
-
if (this.
|
|
289
|
+
if (this.endInt < 4) {
|
|
290
|
+
this.pagesArray = Array.from({ length: this.endInt + 1 }, (_, i) => i + 1);
|
|
291
|
+
}
|
|
292
|
+
else if (this.currentPage == 1 || this.currentPage == 2) {
|
|
290
293
|
this.pagesArray = Array.from({ length: 4 }, (_, i) => i + 1);
|
|
291
294
|
this.pagesArray.push('...');
|
|
292
295
|
}
|
|
@@ -320,8 +323,24 @@ const HelperPagination = class {
|
|
|
320
323
|
if (!this.pageQueryParam)
|
|
321
324
|
return '#';
|
|
322
325
|
const url = new URL(window.location.href);
|
|
323
|
-
|
|
324
|
-
|
|
326
|
+
const pageNumber = page + this.page - 1;
|
|
327
|
+
if (pageNumber === 1) {
|
|
328
|
+
url.searchParams.delete(this.pageQueryParam);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
url.searchParams.set(this.pageQueryParam, String(pageNumber));
|
|
332
|
+
}
|
|
333
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
334
|
+
}
|
|
335
|
+
renderNavigationButton(page, navigation, enabled, rel) {
|
|
336
|
+
const Tag = enabled ? 'a' : 'span';
|
|
337
|
+
const label = translate(navigation, this.language);
|
|
338
|
+
return (h(Tag, { class: "PaginationControl", href: enabled ? this.pageHref(page) : undefined, rel: enabled ? rel : undefined, "aria-label": label, "aria-disabled": !enabled ? 'true' : undefined, onClick: enabled ? event => {
|
|
339
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
340
|
+
return;
|
|
341
|
+
event.preventDefault();
|
|
342
|
+
this.navigateTo(navigation);
|
|
343
|
+
} : undefined }, h("span", { class: "NavigationButton" }, label), h("span", { class: "NavigationIcon" })));
|
|
325
344
|
}
|
|
326
345
|
render() {
|
|
327
346
|
/**
|
|
@@ -332,6 +351,8 @@ const HelperPagination = class {
|
|
|
332
351
|
? Math.max(1, this.currentPage - 5)
|
|
333
352
|
: Math.min(this.endInt + 1, this.currentPage + 5);
|
|
334
353
|
return (h("li", { class: 'PaginationItem' + (item === this.currentPage ? ' ActiveItem' : ' ') + ' ' + (isMobile(this.userAgent) ? 'MobileButtons' : '') }, h("a", { href: this.pageHref(page), "aria-current": item === this.currentPage ? 'page' : undefined, "aria-disabled": item === this.currentPage ? 'true' : undefined, tabIndex: item === this.currentPage ? -1 : undefined, onClick: event => {
|
|
354
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
355
|
+
return;
|
|
335
356
|
event.preventDefault();
|
|
336
357
|
if (item !== this.currentPage)
|
|
337
358
|
this.paginationNavigation(item, index);
|
|
@@ -340,45 +361,11 @@ const HelperPagination = class {
|
|
|
340
361
|
/**
|
|
341
362
|
* Left navigation area
|
|
342
363
|
*/
|
|
343
|
-
|
|
344
|
-
event.preventDefault();
|
|
345
|
-
if (this.prevPage)
|
|
346
|
-
this.navigateTo('firstPage');
|
|
347
|
-
} }, h("span", { class: "NavigationButton" }, translate('firstPage', this.language)), h("span", { class: "NavigationIcon" }));
|
|
348
|
-
let buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && buttonSecondaryLeftSide, h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
349
|
-
event.preventDefault();
|
|
350
|
-
if (this.prevPage)
|
|
351
|
-
this.navigateTo('previousPage');
|
|
352
|
-
} }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
353
|
-
if (isMobile(this.userAgent)) {
|
|
354
|
-
buttonsLeftSide =
|
|
355
|
-
h("div", { class: "LeftItems" }, h("a", { href: this.prevPage ? this.pageHref(this.currentPage - 1) : '#', rel: "prev", "aria-label": translate('previousPage', this.language), "aria-disabled": !this.prevPage ? 'true' : undefined, tabIndex: !this.prevPage ? -1 : undefined, onClick: event => {
|
|
356
|
-
event.preventDefault();
|
|
357
|
-
if (this.prevPage)
|
|
358
|
-
this.navigateTo('previousPage');
|
|
359
|
-
} }, h("span", { class: "NavigationButton" }, translate('previousPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
360
|
-
}
|
|
364
|
+
const buttonsLeftSide = h("div", { class: "LeftItems" }, this.secondaryArrowsActive && this.renderNavigationButton(1, 'firstPage', Boolean(this.prevPage)), this.renderNavigationButton(this.currentPage - 1, 'previousPage', Boolean(this.prevPage), 'prev'));
|
|
361
365
|
/**
|
|
362
366
|
* Right navigation area
|
|
363
367
|
*/
|
|
364
|
-
|
|
365
|
-
event.preventDefault();
|
|
366
|
-
if (this.nextPage)
|
|
367
|
-
this.navigateTo('lastPage');
|
|
368
|
-
} }, h("span", { class: "NavigationButton" }, translate('lastPage', this.language)), h("span", { class: "NavigationIcon" }));
|
|
369
|
-
let buttonsRightSide = h("div", { class: "RightItems" }, h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
370
|
-
event.preventDefault();
|
|
371
|
-
if (this.nextPage)
|
|
372
|
-
this.navigateTo('nextPage');
|
|
373
|
-
} }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })), this.secondaryArrowsActive && buttonSecondaryRightSide);
|
|
374
|
-
if (isMobile(this.userAgent)) {
|
|
375
|
-
buttonsRightSide =
|
|
376
|
-
h("div", { class: "RightItems" }, h("a", { href: this.nextPage ? this.pageHref(this.currentPage + 1) : '#', rel: "next", "aria-label": translate('nextPage', this.language), "aria-disabled": !this.nextPage ? 'true' : undefined, tabIndex: !this.nextPage ? -1 : undefined, onClick: event => {
|
|
377
|
-
event.preventDefault();
|
|
378
|
-
if (this.nextPage)
|
|
379
|
-
this.navigateTo('nextPage');
|
|
380
|
-
} }, h("span", { class: "NavigationButton" }, translate('nextPage', this.language)), h("span", { class: "NavigationIcon" })));
|
|
381
|
-
}
|
|
368
|
+
const buttonsRightSide = h("div", { class: "RightItems" }, this.renderNavigationButton(this.currentPage + 1, 'nextPage', Boolean(this.nextPage), 'next'), this.secondaryArrowsActive && this.renderNavigationButton(this.endInt + 1, 'lastPage', Boolean(this.nextPage)));
|
|
382
369
|
return (h("nav", { id: "PaginationContainer", class: "PaginationContainer", "aria-label": "Blog pagination", ref: el => this.stylingContainer = el }, this.arrowsActive && buttonsLeftSide, this.numberedNavActive && navigationArea, this.arrowsActive && buttonsRightSide));
|
|
383
370
|
}
|
|
384
371
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-4984476a.js';
|
|
2
|
+
export { s as setNonce } from './index-4984476a.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'helper-pagination';
|
|
2
|
-
const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional:
|
|
2
|
+
const BUILD = /* helper-pagination */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -239,6 +239,13 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
+
if (typeof nodeName === "function") {
|
|
243
|
+
return nodeName(
|
|
244
|
+
vnodeData === null ? {} : vnodeData,
|
|
245
|
+
vNodeChildren,
|
|
246
|
+
vdomFnUtils
|
|
247
|
+
);
|
|
248
|
+
}
|
|
242
249
|
const vnode = newVNode(nodeName, null);
|
|
243
250
|
vnode.$attrs$ = vnodeData;
|
|
244
251
|
if (vNodeChildren.length > 0) {
|
|
@@ -261,6 +268,36 @@ var newVNode = (tag, text) => {
|
|
|
261
268
|
};
|
|
262
269
|
var Host = {};
|
|
263
270
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
271
|
+
var vdomFnUtils = {
|
|
272
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
273
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
274
|
+
};
|
|
275
|
+
var convertToPublic = (node) => ({
|
|
276
|
+
vattrs: node.$attrs$,
|
|
277
|
+
vchildren: node.$children$,
|
|
278
|
+
vkey: node.$key$,
|
|
279
|
+
vname: node.$name$,
|
|
280
|
+
vtag: node.$tag$,
|
|
281
|
+
vtext: node.$text$
|
|
282
|
+
});
|
|
283
|
+
var convertToPrivate = (node) => {
|
|
284
|
+
if (typeof node.vtag === "function") {
|
|
285
|
+
const vnodeData = { ...node.vattrs };
|
|
286
|
+
if (node.vkey) {
|
|
287
|
+
vnodeData.key = node.vkey;
|
|
288
|
+
}
|
|
289
|
+
if (node.vname) {
|
|
290
|
+
vnodeData.name = node.vname;
|
|
291
|
+
}
|
|
292
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
293
|
+
}
|
|
294
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
295
|
+
vnode.$attrs$ = node.vattrs;
|
|
296
|
+
vnode.$children$ = node.vchildren;
|
|
297
|
+
vnode.$key$ = node.vkey;
|
|
298
|
+
vnode.$name$ = node.vname;
|
|
299
|
+
return vnode;
|
|
300
|
+
};
|
|
264
301
|
var parsePropertyValue = (propValue, propType) => {
|
|
265
302
|
if (propValue != null && !isComplexType(propValue)) {
|
|
266
303
|
if (propType & 4 /* Boolean */) {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-4984476a.js';
|
|
2
|
+
export { s as setNonce } from './index-4984476a.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s}from"./index-0483e183.js";const e="__WIDGET_GLOBAL_STYLE_CACHE__";function a(i,t){if(i){const s=document.createElement("style");s.innerHTML=t,i.appendChild(s)}}function n(i,t){if(!i||!t)return;const s=new URL(t);fetch(s.href).then((i=>i.text())).then((t=>{const s=document.createElement("style");s.innerHTML=t,i&&i.appendChild(s)})).catch((i=>{console.error("There was an error while trying to load client styling from URL",i)}))}const o=i=>!!(i.toLowerCase().match(/android/i)||i.toLowerCase().match(/blackberry|bb/i)||i.toLowerCase().match(/iphone|ipad|ipod/i)||i.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),h={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},r=(i,t)=>h[void 0!==t&&t in h?t:"en"][i],l=class{constructor(s){i(this,s),this.hpPageChange=t(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=i=>{var t;switch(i){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,null===(t=this.hpPageChange)||void 0===t||t.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(i,t)=>{var s;this.previousPage=!0,isNaN(i)?0===t&&this.currentPage<=4?this.navigateTo("firstPage"):0===t&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===t&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===i?(this.offsetInt=i-1,this.previousPage=!1):this.offsetInt=(i-1)*this.limitInt,null===(s=this.hpPageChange)||void 0===s||s.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.pageQueryParam=void 0,this.page=1,this.offsetInt=0,this.lastPage=!1,this.previousPage=!1,this.limitInt=0,this.totalInt=0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(i,t){i!==t&&a(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,t){i!==t&&this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?(this.pagesArray=Array.from({length:4},((i,t)=>t+1)),this.pagesArray.push("...")):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((i,t)=>this.currentPage+t-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.pagesArray=Array.from({length:4},((i,t)=>this.endInt-2+t)),this.pagesArray.unshift("..."))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=function(i,t,s,a=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!a)return function(i,t){const s=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{i&&(s.innerHTML=t,i.appendChild(s))}))}(i,t);window[e]||(window[e]={});const n=(s=function(i,t){return window.emMessageBus.subscribe(t,(s=>{if(!i)return;const a=i.getRootNode(),n=window[e];let o=n[t]&&n[t].sheet;o?n[t].refCount=n[t].refCount+1:(o=new CSSStyleSheet,o.replaceSync(s),n[t]={sheet:o,refCount:1});const h=a.adoptedStyleSheets||[];h.includes(o)||(a.adoptedStyleSheets=[...h,o])}))}(i,t)).unsubscribe.bind(s);return s.unsubscribe=()=>{if(window[e][t]){const i=window[e][t];i.refCount>1?i.refCount=i.refCount-1:delete window[e][t]}n()},s}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}pageHref(i){if(!this.pageQueryParam)return"#";const t=new URL(window.location.href);return t.searchParams.set(this.pageQueryParam,String(i+this.page-1)),`${t.search}${t.hash}`}render(){let i=s("ul",{class:"PaginationArea"},this.pagesArray.map(((i,t)=>{const e="number"==typeof i?i:0===t?Math.max(1,this.currentPage-5):Math.min(this.endInt+1,this.currentPage+5);return s("li",{class:"PaginationItem"+(i===this.currentPage?" ActiveItem":" ")+" "+(o(this.userAgent)?"MobileButtons":"")},s("a",{href:this.pageHref(e),"aria-current":i===this.currentPage?"page":void 0,"aria-disabled":i===this.currentPage?"true":void 0,tabIndex:i===this.currentPage?-1:void 0,onClick:s=>{s.preventDefault(),i!==this.currentPage&&this.paginationNavigation(i,t)}},s("span",null,i)))}))),t=s("a",{href:this.prevPage?this.pageHref(1):"#","aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:i=>{i.preventDefault(),this.prevPage&&this.navigateTo("firstPage")}},s("span",{class:"NavigationButton"},r("firstPage",this.language)),s("span",{class:"NavigationIcon"})),e=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&t,s("a",{href:this.prevPage?this.pageHref(this.currentPage-1):"#",rel:"prev","aria-label":r("previousPage",this.language),"aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:i=>{i.preventDefault(),this.prevPage&&this.navigateTo("previousPage")}},s("span",{class:"NavigationButton"},r("previousPage",this.language)),s("span",{class:"NavigationIcon"})));o(this.userAgent)&&(e=s("div",{class:"LeftItems"},s("a",{href:this.prevPage?this.pageHref(this.currentPage-1):"#",rel:"prev","aria-label":r("previousPage",this.language),"aria-disabled":this.prevPage?void 0:"true",tabIndex:this.prevPage?void 0:-1,onClick:i=>{i.preventDefault(),this.prevPage&&this.navigateTo("previousPage")}},s("span",{class:"NavigationButton"},r("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let a=s("a",{href:this.nextPage?this.pageHref(this.endInt+1):"#","aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:i=>{i.preventDefault(),this.nextPage&&this.navigateTo("lastPage")}},s("span",{class:"NavigationButton"},r("lastPage",this.language)),s("span",{class:"NavigationIcon"})),n=s("div",{class:"RightItems"},s("a",{href:this.nextPage?this.pageHref(this.currentPage+1):"#",rel:"next","aria-label":r("nextPage",this.language),"aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:i=>{i.preventDefault(),this.nextPage&&this.navigateTo("nextPage")}},s("span",{class:"NavigationButton"},r("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&a);return o(this.userAgent)&&(n=s("div",{class:"RightItems"},s("a",{href:this.nextPage?this.pageHref(this.currentPage+1):"#",rel:"next","aria-label":r("nextPage",this.language),"aria-disabled":this.nextPage?void 0:"true",tabIndex:this.nextPage?void 0:-1,onClick:i=>{i.preventDefault(),this.nextPage&&this.navigateTo("nextPage")}},s("span",{class:"NavigationButton"},r("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("nav",{id:"PaginationContainer",class:"PaginationContainer","aria-label":"Blog pagination",ref:i=>this.stylingContainer=i},this.arrowsActive&&e,this.numberedNavActive&&i,this.arrowsActive&&n)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};l.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems a:not(:first-child),.RightItems a:not(:last-child){margin:0 10px}.LeftItems a,.RightItems a{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 a{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 a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;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}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){a{width:90px;font-size:14px}}@media screen and (max-width: 480px){a{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}';export{l as helper_pagination}
|
|
1
|
+
import{r as t,c as i,h as e}from"./index-4984476a.js";const s="__WIDGET_GLOBAL_STYLE_CACHE__";function n(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function a(t,i){if(!t||!i)return;const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const o={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"}},r=class{constructor(e){t(this,e),this.hpPageChange=i(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{var i;switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt;break;case"nextPage":this.offsetInt+=this.limitInt;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt}this.previousPage=!!this.offsetInt,null===(i=this.hpPageChange)||void 0===i||i.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,i)=>{var e;this.previousPage=!0,isNaN(t)?0===i&&this.currentPage<=4?this.navigateTo("firstPage"):0===i&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===i&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):1===t?(this.offsetInt=t-1,this.previousPage=!1):this.offsetInt=(t-1)*this.limitInt,null===(e=this.hpPageChange)||void 0===e||e.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.nextPage="",this.prevPage="",this.offset=0,this.limit=1,this.total=1,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!1,this.numberedNavActive=!1,this.pageQueryParam=void 0,this.page=1,this.offsetInt=0,this.lastPage=!1,this.previousPage=!1,this.limitInt=0,this.totalInt=0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,i){t!==i&&n(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,i){t!==i&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),this.endInt<4?this.pagesArray=Array.from({length:this.endInt+1},((t,i)=>i+1)):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("..."))}handleClientStyling(){void 0===window.emMessageBus?(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)):this.stylingSubscription=function(t,i,e,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i);window[s]||(window[s]={});const a=(e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const n=t.getRootNode(),a=window[s];let o=a[i]&&a[i].sheet;o?a[i].refCount=a[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(e),a[i]={sheet:o,refCount:1});const r=n.adoptedStyleSheets||[];r.includes(o)||(n.adoptedStyleSheets=[...r,o])}))}(t,i)).unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[s][i]){const t=window[s][i];t.refCount>1?t.refCount=t.refCount-1:delete window[s][i]}a()},e}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription,!0)}componentDidLoad(){this.handleClientStyling()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}pageHref(t){if(!this.pageQueryParam)return"#";const i=new URL(window.location.href),e=t+this.page-1;return 1===e?i.searchParams.delete(this.pageQueryParam):i.searchParams.set(this.pageQueryParam,String(e)),`${i.pathname}${i.search}${i.hash}`}renderNavigationButton(t,i,s,n){const a=o[void 0!==(r=this.language)&&r in o?r:"en"][i];var r;return e(s?"a":"span",{class:"PaginationControl",href:s?this.pageHref(t):void 0,rel:s?n:void 0,"aria-label":a,"aria-disabled":s?void 0:"true",onClick:s?t=>{0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),this.navigateTo(i))}:void 0},e("span",{class:"NavigationButton"},a),e("span",{class:"NavigationIcon"}))}render(){let t=e("ul",{class:"PaginationArea"},this.pagesArray.map(((t,i)=>{const s="number"==typeof t?t:0===i?Math.max(1,this.currentPage-5):Math.min(this.endInt+1,this.currentPage+5);return e("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(n=this.userAgent,n.toLowerCase().match(/android/i)||n.toLowerCase().match(/blackberry|bb/i)||n.toLowerCase().match(/iphone|ipad|ipod/i)||n.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)?"MobileButtons":"")},e("a",{href:this.pageHref(s),"aria-current":t===this.currentPage?"page":void 0,"aria-disabled":t===this.currentPage?"true":void 0,tabIndex:t===this.currentPage?-1:void 0,onClick:e=>{0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),t!==this.currentPage&&this.paginationNavigation(t,i))}},e("span",null,t)));var n})));const i=e("div",{class:"LeftItems"},this.secondaryArrowsActive&&this.renderNavigationButton(1,"firstPage",Boolean(this.prevPage)),this.renderNavigationButton(this.currentPage-1,"previousPage",Boolean(this.prevPage),"prev")),s=e("div",{class:"RightItems"},this.renderNavigationButton(this.currentPage+1,"nextPage",Boolean(this.nextPage),"next"),this.secondaryArrowsActive&&this.renderNavigationButton(this.endInt+1,"lastPage",Boolean(this.nextPage)));return e("nav",{id:"PaginationContainer",class:"PaginationContainer","aria-label":"Blog pagination",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&s)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems .PaginationControl:not(:first-child),.RightItems .PaginationControl:not(:last-child){margin:0 10px}.LeftItems .PaginationControl,.RightItems .PaginationControl{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 a{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 a{background:#009993;border-color:#009993;color:#fff}.PaginationItem.ActiveItem a[aria-disabled=true]{pointer-events:none;cursor:not-allowed}.PaginationItem a:hover,.PaginationItem a:active{background:#009993;border-color:#009993;color:#fff;opacity:0.8}a,.PaginationControl{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;text-decoration:none;width:100px;height:32px;border:1px solid #524e52;border-radius:5px;background:#524e52;color:#fff;font-size:14px;font:inherit;cursor:pointer;transition:background-color 0.1s linear, border-color 0.1s linear, color 0.1s linear, opacity 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}a:hover,a:active{background:#004D4A;border-color:#004D4A}a[aria-disabled=true],.PaginationControl[aria-disabled=true]{background-color:#ccc;border-color:#ccc;color:#fff;cursor:not-allowed}@media screen and (max-width: 720px){#PaginationContainer{flex-wrap:wrap;row-gap:10px}#PaginationContainer .LeftItems,#PaginationContainer .RightItems{display:flex;flex-direction:column;gap:10px}#PaginationContainer .RightItems{flex-direction:column-reverse}#PaginationContainer .PaginationControl{margin:0}#PaginationContainer .PaginationArea{order:1;flex-basis:100%;justify-content:center;margin:0;padding:0}a,.PaginationControl{width:90px;font-size:14px}}@media screen and (max-width: 480px){a,.PaginationControl{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){a,.PaginationControl{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem a:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem a:hover{background:#009993;border-color:#009993;color:#fff}}';export{r as helper_pagination}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./index-
|
|
1
|
+
import{p as e,b as a}from"./index-4984476a.js";export{s as setNonce}from"./index-4984476a.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((async e=>(await t(),a([["helper-pagination",[[1,"helper-pagination",{nextPage:[1537,"next-page"],prevPage:[1537,"prev-page"],offset:[1538],limit:[1538],total:[1538],language:[1537],mbSource:[1,"mb-source"],clientStyling:[1537,"client-styling"],clientStylingUrl:[1537,"client-styling-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],numberedNavActive:[1540,"numbered-nav-active"],pageQueryParam:[1,"page-query-param"],page:[2],offsetInt:[32],lastPage:[32],previousPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}]]]],e))));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,d=[],y=[],v=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&f.o?w(b):f.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},b=()=>{$(d),$(y),(m=d.length>0)&&f.raf(b)},w=t=>h().then(t),g=v(y,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>E,unwrap:()=>P,unwrapErr:()=>R});var E=t=>({isOk:!0,isErr:!1,value:t}),O=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return O(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},T=(t,e,...n)=>{let o=null,l=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?i(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!j(o))&&(o+=""),l&&r?s[s.length-1].i+=o:s.push(l?A(null,o):o),r=l)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}if("function"==typeof t)return t(null===e?{}:e,s,L);const c=A(t,null);return c.u=e,s.length>0&&(c.h=s),c},A=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),F={},L={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(U)},N=t=>({vattrs:t.u,vchildren:t.h,vkey:t.v,vname:t.$,vtag:t.p,vtext:t.i}),U=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),T(t.vtag,e,...t.vchildren||[])}const e=A(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.v=t.vkey,e.$=t.vname,e},W=(t,e,o)=>{const l=(t=>n(t).$hostElement$)(t);return{emit:t=>D(l,e,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:t})}},D=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},H=new WeakMap,q=t=>"sc-"+t.S,G=(t,e,n,o,r,s)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=_(n),r=_(o);e.remove(...l.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!l.includes(t))))}else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!r)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(z);e=e.replace(B,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},V=/\s/,_=t=>t?t.split(V):[],z="Capture",B=RegExp(z+"$"),I=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||S,r=e.u||S;for(const t of J(Object.keys(l)))t in r||G(o,t,l[t],void 0,n,e.o);for(const t of J(Object.keys(r)))G(o,t,l[t],r[t],n,e.o)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=(t,e,n)=>{const o=e.h[n];let l,r,s=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else if(l=o.m=a.createElement(o.p),I(null,o,K),null!=M&&l["s-si"]!==M&&l.classList.add(l["s-si"]=M),o.h)for(s=0;s<o.h.length;++s)r=Q(t,o,s),r&&l.appendChild(r);return l["s-hn"]=x,l},X=(t,e,n,o,l,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);l<=r;++l)o[l]&&(s=Q(null,n,l),s&&(o[l].m=s,nt(i,s,e)))},Y=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;et(e),t&&t.remove()}}},Z=(t,e)=>t.p===e.p,tt=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,r=e.h,s=e.i;null===s?(I(t,e,K),null!==l&&null!==r?((t,e,n,o,l=!1)=>{let r,s=0,i=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],p=o[f];for(;s<=c&&i<=f;)null==u?u=e[++s]:null==a?a=e[--c]:null==h?h=o[++i]:null==p?p=o[--f]:Z(u,h)?(tt(u,h,l),u=e[++s],h=o[++i]):Z(a,p)?(tt(a,p,l),a=e[--c],p=o[--f]):Z(u,p)?(tt(u,p,l),nt(t,u.m,a.m.nextSibling),u=e[++s],p=o[--f]):Z(a,h)?(tt(a,h,l),nt(t,a.m,u.m),a=e[--c],h=o[++i]):(r=Q(e&&e[i],n,i),h=o[++i],r&&nt(u.m.parentNode,r,u.m));s>c?X(t,null==o[f+1]?null:o[f+1].m,n,o,i,f):i>f&&Y(e,s,c)})(o,l,e,r,n):null!==r?(null!==t.i&&(o.textContent=""),X(o,null,e,r,0,r.length-1)):null!==l&&Y(l,0,l.length-1)):t.i!==s&&(o.data=s)},et=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(et)},nt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),ot=(t,e)=>{e&&!t.j&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.j=e)))},lt=(t,e)=>{if(t.o|=16,!(4&t.o))return ot(t,t.k),g((()=>rt(t,e)));t.o|=512},rt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=st(o,(()=>ht(n,"componentWillRender"))),st(o,(()=>ct(t,n,e)))},st=(t,e)=>it(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),it=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var o;const l=t.$hostElement$,r=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=q(e),l=i.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let r,s=H.get(t=t.head||t);if(s||H.set(t,s=new Set),!s.has(o)){{r=a.createElement("style"),r.innerHTML=l;const e=null!=(n=f.C)?n:k(a);null!=e&&r.setAttribute("nonce",e),t.insertBefore(r,t.querySelector("link"))}4&e.o&&(r.innerHTML+=c),s&&s.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ut(t,e,l,n),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>at(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},ut=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,r=t.M||A(null,null),s=(t=>t&&t.p===F)(e)?e:T(null,null,e);if(x=o.tagName,l.P&&(s.u=s.u||{},l.P.map((([t,e])=>s.u[e]=o[t]))),n&&s.u)for(const t of Object.keys(s.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=o[t]);s.p=null,s.o|=4,t.M=s,s.m=r.m=o.shadowRoot||o,M=o["s-sc"],tt(r,s,n)})(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},at=t=>{const e=t.$hostElement$,n=t.t,o=t.k;64&t.o||(t.o|=64,pt(e),ht(n,"componentDidLoad"),t.R(e),o||ft()),t.j&&(t.j(),t.j=void 0),512&t.o&&w((()=>lt(t,!1))),t.o&=-517},ft=()=>{pt(a.documentElement),w((()=>D(u,"appload",{detail:{namespace:"helper-pagination"}})))},ht=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},pt=t=>t.classList.add("hydrated"),mt=(t,e,o)=>{var l,s;const i=t.prototype;if(e.T||e.A||t.watchers){t.watchers&&!e.A&&(e.A=t.watchers);const c=Object.entries(null!=(l=e.T)?l:{});if(c.map((([t,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).F.get(e))(0,t)},set(o){((t,e,o,l)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.F.get(e),u=s.o,a=s.t;if(o=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(o,l.T[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(s.F.set(e,o),a)){if(l.A&&128&u){const t=l.A[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){r(t,i)}}))}2==(18&u)&<(s,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,r){f.jmp((()=>{var s;const c=o.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&r!==l){const n=o.t,i=null==(s=e.A)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,l,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.A)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const r=n[1]||t;return o.set(r,t),512&n[0]&&(null==(l=e.P)||l.push([t,r])),r}))]))}}return t},dt=t=>{ht(t,"disconnectedCallback")},yt=(t,o={})=>{var l;const h=[],m=o.exclude||[],d=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],S:o[1],T:o[2],L:o[3]};4&c.o&&(S=!0),c.T=o[2],c.P=[],c.A=null!=(l=o[4])?l:{};const u=c.S,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,F:new Map};o.N=new Promise((t=>o.R=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),w&&(clearTimeout(w),w=null),g?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ot(e,e.k=n);break}}o.T&&Object.entries(o.T).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.U){const t=(t=>{const e=t.S.replace(/-/g,"_"),n=t.U;if(!n)return;const o=s.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};o=await t,e()}else o=t;if(!o)throw Error(`Constructor for "${n.S}#${e.W}" was not found`);o.isProxied||(n.A=o.watchers,mt(o,n,2),o.isProxied=!0);const l=()=>{};e.o|=8;try{new o(e)}catch(t){r(t)}e.o&=-9,e.o|=128,l()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=q(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.k,c=()=>lt(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.o)){const t=n(this);(null==t?void 0:t.t)?dt(t.t):(null==t?void 0:t.N)&&t.N.then((()=>dt(t.t)))}})()))}componentOnReady(){return n(this).N}};c.U=t[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,mt(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const t=null!=(l=f.C)?l:k(a);null!=t&&$.setAttribute("nonce",t),y.insertBefore($,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>w=setTimeout(ft,30)))},vt=t=>f.C=t;export{yt as b,W as c,T as h,h as p,o as r,vt as s}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),l=(t,n)=>e.set(n.t=t,n),o=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),s=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),d=!1,m=[],y=[],$=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&f.l?v(w):f.raf(w))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},w=()=>{b(m),b(y),(d=m.length>0)&&f.raf(w)},v=t=>h().then(t),g=$(y,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function k(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((e,n)=>{for(var l in n)t(e,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>R});var O=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function C(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return E(t.value);throw"should never get here"}var M,x,P=t=>{if(t.isOk)return t.value;throw t.value},R=t=>{if(t.isErr)return t.value;throw t.value},T=(t,e,...n)=>{let l=null,o=!1,r=!1;const s=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof t&&!j(l))&&(l+=""),o&&r?s[s.length-1].i+=l:s.push(o?A(null,l):l),r=o)};if(i(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=A(t,null);return c.u=e,s.length>0&&(c.h=s),c},A=(t,e)=>({l:0,p:t,i:e,m:null,h:null,u:null}),F={},L=(t,e,l)=>{const o=(t=>n(t).$hostElement$)(t);return{emit:t=>N(o,e,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:t})}},N=(t,e,n)=>{const l=f.ce(e,n);return t.dispatchEvent(l),l},U=new WeakMap,W=t=>"sc-"+t.$,D=(t,e,n,l,r,s)=>{if(n!==l){let i=o(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=q(n),r=q(l);e.remove(...o.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!o.includes(t))))}else if("ref"===e)l&&l(t);else if(i||"o"!==e[0]||"n"!==e[1]){const o=j(l);if((i||o&&null!==l)&&!r)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?i=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!i||4&s||r)&&!o&&t.setAttribute(e,l=!0===l?"":l)}else if(e="-"===e[2]?e.slice(3):o(u,c)?c.slice(2):c[2]+e.slice(3),n||l){const o=e.endsWith(G);e=e.replace(V,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}}},H=/\s/,q=t=>t?t.split(H):[],G="Capture",V=RegExp(G+"$"),_=(t,e,n)=>{const l=11===e.m.nodeType&&e.m.host?e.m.host:e.m,o=t&&t.u||S,r=e.u||S;for(const t of z(Object.keys(o)))t in r||D(l,t,o[t],void 0,n,e.l);for(const t of z(Object.keys(r)))D(l,t,o[t],r[t],n,e.l)};function z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var B=!1,I=(t,e,n)=>{const l=e.h[n];let o,r,s=0;if(null!==l.i)o=l.m=a.createTextNode(l.i);else if(o=l.m=a.createElement(l.p),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(s=0;s<l.h.length;++s)r=I(t,l,s),r&&o.appendChild(r);return o["s-hn"]=x,o},J=(t,e,n,l,o,r)=>{let s,i=t;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=r;++o)l[o]&&(s=I(null,n,o),s&&(l[o].m=s,Z(i,s,e)))},K=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.m;Y(e),t&&t.remove()}}},Q=(t,e)=>t.p===e.p,X=(t,e,n=!1)=>{const l=e.m=t.m,o=t.h,r=e.h,s=e.i;null===s?(_(t,e,B),null!==o&&null!==r?((t,e,n,l,o=!1)=>{let r,s=0,i=0,c=e.length-1,u=e[0],a=e[c],f=l.length-1,h=l[0],p=l[f];for(;s<=c&&i<=f;)null==u?u=e[++s]:null==a?a=e[--c]:null==h?h=l[++i]:null==p?p=l[--f]:Q(u,h)?(X(u,h,o),u=e[++s],h=l[++i]):Q(a,p)?(X(a,p,o),a=e[--c],p=l[--f]):Q(u,p)?(X(u,p,o),Z(t,u.m,a.m.nextSibling),u=e[++s],p=l[--f]):Q(a,h)?(X(a,h,o),Z(t,a.m,u.m),a=e[--c],h=l[++i]):(r=I(e&&e[i],n,i),h=l[++i],r&&Z(u.m.parentNode,r,u.m));s>c?J(t,null==l[f+1]?null:l[f+1].m,n,l,i,f):i>f&&K(e,s,c)})(l,o,e,r,n):null!==r?(null!==t.i&&(l.textContent=""),J(l,null,e,r,0,r.length-1)):null!==o&&K(o,0,o.length-1)):t.i!==s&&(l.data=s)},Y=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Y)},Z=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),tt=(t,e)=>{e&&!t.v&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.v=e)))},et=(t,e)=>{if(t.l|=16,!(4&t.l))return tt(t,t.S),g((()=>nt(t,e)));t.l|=512},nt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=lt(l,(()=>ut(n,"componentWillRender"))),lt(l,(()=>rt(t,n,e)))},lt=(t,e)=>ot(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ot=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.j,n=t.$hostElement$,l=e.l,o=((t,e)=>{var n;const l=W(e),o=i.get(l);if(t=11===t.nodeType?t:a,o)if("string"==typeof o){let r,s=U.get(t=t.head||t);if(s||U.set(t,s=new Set),!s.has(l)){{r=a.createElement("style"),r.innerHTML=o;const e=null!=(n=f.k)?n:k(a);null!=e&&r.setAttribute("nonce",e),t.insertBefore(r,t.querySelector("link"))}4&e.l&&(r.innerHTML+=c),s&&s.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);st(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},st=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.j,r=t.O||A(null,null),s=(t=>t&&t.p===F)(e)?e:T(null,null,e);if(x=l.tagName,o.C&&(s.u=s.u||{},o.C.map((([t,e])=>s.u[e]=l[t]))),n&&s.u)for(const t of Object.keys(s.u))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.u[t]=l[t]);s.p=null,s.l|=4,t.O=s,s.m=r.m=l.shadowRoot||l,M=l["s-sc"],X(r,s,n)})(t,e,l)}catch(e){r(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=t.t,l=t.S;64&t.l||(t.l|=64,at(e),ut(n,"componentDidLoad"),t.M(e),l||ct()),t.v&&(t.v(),t.v=void 0),512&t.l&&v((()=>et(t,!1))),t.l&=-517},ct=()=>{at(a.documentElement),v((()=>N(u,"appload",{detail:{namespace:"helper-pagination"}})))},ut=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t)}},at=t=>t.classList.add("hydrated"),ft=(t,e,l)=>{var o,s;const i=t.prototype;if(e.P||e.R||t.watchers){t.watchers&&!e.R&&(e.R=t.watchers);const c=Object.entries(null!=(o=e.P)?o:{});if(c.map((([t,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,t,{get(){return((t,e)=>n(this).T.get(e))(0,t)},set(l){((t,e,l,o)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.$hostElement$,c=s.T.get(e),u=s.l,a=s.t;if(l=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(l,o.P[e][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(s.T.set(e,l),a)){if(o.R&&128&u){const t=o.R[e];t&&t.map((t=>{try{a[t](l,c,e)}catch(t){r(t,i)}}))}2==(18&u)&&et(s,!1)}})(this,t,l,e)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,r){f.jmp((()=>{var s;const c=l.get(t);if(this.hasOwnProperty(c))r=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&r!==o){const n=l.t,i=null==(s=e.R)?void 0:s[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,r,o,t)}))}return}}this[c]=(null!==r||"boolean"!=typeof this[c])&&r}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.R)?s:{}),...c.filter((([t,e])=>15&e[0])).map((([t,n])=>{var o;const r=n[1]||t;return l.set(r,t),512&n[0]&&(null==(o=e.C)||o.push([t,r])),r}))]))}}return t},ht=t=>{ut(t,"disconnectedCallback")},pt=(t,l={})=>{var o;const h=[],d=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),b=a.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((l=>{var o;const c={l:l[0],$:l[1],P:l[2],A:l[3]};4&c.l&&(S=!0),c.P=l[2],c.C=[],c.R=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,j:n,T:new Map};l.F=new Promise((t=>l.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,c),1&c.l)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(t=>{if(!(1&f.l)){const e=n(t),l=e.j,o=()=>{};if(1&e.l)(null==e?void 0:e.t)||(null==e?void 0:e.F)&&e.F.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.S=n);break}}l.P&&Object.entries(l.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.l)){if(e.l|=32,n.L){const t=(t=>{const e=t.$.replace(/-/g,"_"),n=t.L;if(!n)return;const l=s.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(s.set(n,t),t[e])),r)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(t&&"then"in t){const e=()=>{};l=await t,e()}else l=t;if(!l)throw Error(`Constructor for "${n.$}#${e.N}" was not found`);l.isProxied||(n.R=l.watchers,ft(l,n,2),l.isProxied=!0);const o=()=>{};e.l|=8;try{new l(e)}catch(t){r(t)}e.l&=-9,e.l|=128,o()}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=W(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.l)),l()}}}const o=e.S,c=()=>et(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(t,e,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const t=n(this);(null==t?void 0:t.t)?ht(t.t):(null==t?void 0:t.F)&&t.F.then((()=>ht(t.t)))}})()))}componentOnReady(){return n(this).F}};c.L=t[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ft(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const t=null!=(o=f.k)?o:k(a);null!=t&&b.setAttribute("nonce",t),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((t=>t.connectedCallback())):f.jmp((()=>v=setTimeout(ct,30)))},dt=t=>f.k=t;export{pt as b,L as c,T as h,h as p,l as r,dt as s}
|