@everymatrix/bonus-pagination-limits 1.31.2 → 1.32.4
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/LICENSE +21 -0
- package/package.json +3 -2
- package/dist/bonus-pagination-limits/bonus-pagination-limits.esm.js +0 -1
- package/dist/bonus-pagination-limits/index.esm.js +0 -0
- package/dist/bonus-pagination-limits/p-3dce25c5.js +0 -1
- package/dist/bonus-pagination-limits/p-d1bfd361.entry.js +0 -1
- package/dist/cjs/bonus-pagination-limits.cjs.entry.js +0 -88
- package/dist/cjs/bonus-pagination-limits.cjs.js +0 -19
- package/dist/cjs/index-b47e4aa8.js +0 -1127
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/collection/collection-manifest.json +0 -12
- package/dist/collection/components/bonus-pagination-limits/bonus-pagination-limits.css +0 -42
- package/dist/collection/components/bonus-pagination-limits/bonus-pagination-limits.js +0 -160
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/locale.utils.js +0 -38
- package/dist/components/bonus-pagination-limits.d.ts +0 -11
- package/dist/components/bonus-pagination-limits.js +0 -107
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/bonus-pagination-limits.entry.js +0 -84
- package/dist/esm/bonus-pagination-limits.js +0 -17
- package/dist/esm/index-689c38fd.js +0 -1101
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/stencil.config.js +0 -22
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/bonus-pagination-limits/.stencil/packages/bonus-pagination-limits/stencil.config.d.ts +0 -2
- package/dist/types/components/bonus-pagination-limits/bonus-pagination-limits.d.ts +0 -25
- package/dist/types/components.d.ts +0 -70
- package/dist/types/index.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/dist/types/utils/locale.utils.d.ts +0 -14
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/bonus-pagination-limits",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.4",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"es2015": "./dist/esm/index.mjs",
|
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
],
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"gitHead": "69a4e0bb1b0460c07baef352d283492a6e2dc4b0"
|
|
19
20
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as i,b as t}from"./p-3dce25c5.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),i(a)})().then((i=>t([["p-d1bfd361",[[0,"bonus-pagination-limits",{language:[513],translationUrl:[513,"translation-url"],pageLimitOptions:[513,"page-limit-options"],limit:[1538],pageLimits:[32]}]]]],i)));
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=!1;const t="undefined"!=typeof window?window:{},n=t.document||{head:{}},l={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)},s=e=>Promise.resolve(e),o=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,r=e=>"sc-"+e.o,c={},u=e=>"object"==(e=typeof e)||"function"===e,a=(e,t,...n)=>{let l=null,s=!1,o=!1,i=[];const r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!u(l))&&(l+=""),s&&o?i[i.length-1].i+=l:i.push(s?f(null,l):l),o=s)};if(r(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=f(e,null);return c.u=t,i.length>0&&(c.$=i),c},f=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),$={},h=(e,n,s,o,i,r)=>{if(s!==o){let c=H(e,n),a=n.toLowerCase();if("class"===n){const t=e.classList,n=p(s),l=p(o);t.remove(...n.filter((e=>e&&!l.includes(e)))),t.add(...l.filter((e=>e&&!n.includes(e))))}else if(c||"o"!==n[0]||"n"!==n[1]){const t=u(o);if((c||t&&null!==o)&&!i)try{if(e.tagName.includes("-"))e[n]=o;else{let t=null==o?"":o;"list"===n?c=!1:null!=s&&e[n]==t||(e[n]=t)}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&r||i)&&!t&&e.setAttribute(n,o=!0===o?"":o)}else n="-"===n[2]?n.slice(3):H(t,a)?a.slice(2):a[2]+n.slice(3),s&&l.rel(e,n,s,!1),o&&l.ael(e,n,o,!1)}},m=/\s/,p=e=>e?e.split(m):[],y=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||c,i=t.u||c;for(l in o)l in i||h(s,l,o[l],void 0,n,t.t);for(l in i)h(s,l,o[l],i[l],n,t.t)},d=(e,t,l)=>{let s,o,i=t.$[l],r=0;if(null!==i.i)s=i.m=n.createTextNode(i.i);else if(s=i.m=n.createElement(i.h),y(null,i,!1),i.$)for(r=0;r<i.$.length;++r)o=d(e,i,r),o&&s.appendChild(o);return s},b=(e,t,n,l,s,o)=>{let i,r=e;for(;s<=o;++s)l[s]&&(i=d(null,n,s),i&&(l[s].m=i,r.insertBefore(i,t)))},w=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.m.remove()},S=(e,t)=>e.h===t.h,g=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?(y(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,i=0,r=t.length-1,c=t[0],u=t[r],a=l.length-1,f=l[0],$=l[a];for(;o<=r&&i<=a;)null==c?c=t[++o]:null==u?u=t[--r]:null==f?f=l[++i]:null==$?$=l[--a]:S(c,f)?(g(c,f),c=t[++o],f=l[++i]):S(u,$)?(g(u,$),u=t[--r],$=l[--a]):S(c,$)?(g(c,$),e.insertBefore(c.m,u.m.nextSibling),c=t[++o],$=l[--a]):S(u,f)?(g(u,f),e.insertBefore(u.m,c.m),u=t[--r],f=l[++i]):(s=d(t&&t[i],n,i),f=l[++i],s&&c.m.parentNode.insertBefore(s,c.m));o>r?b(e,null==l[a+1]?null:l[a+1].m,n,l,i,a):i>a&&w(t,o,r)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),b(n,null,t,s,0,s.length-1)):null!==l&&w(l,0,l.length-1)):e.i!==o&&(n.data=o)},j=(e,t,n)=>{const l=(e=>R(e).p)(e);return{emit:e=>M(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},M=(e,t,n)=>{const s=l.ce(t,n);return e.dispatchEvent(s),s},v=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},k=(e,t)=>{if(e.t|=16,!(4&e.t))return v(e,e.g),X((()=>C(e,t)));e.t|=512},C=(e,t)=>{const n=e.j;let l;return t&&(l=L(n,"componentWillLoad")),N(l,(()=>O(e,n,t)))},O=async(e,t,l)=>{const s=e.p,o=s["s-rc"];l&&(e=>{const t=e.M;((e,t)=>{let l=r(t),s=B.get(l);if(e=11===e.nodeType?e:n,s)if("string"==typeof s){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(l)||(t=n.createElement("style"),t.innerHTML=s,e.insertBefore(t,e.querySelector("link")),o&&o.add(l))}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s])})(e.p.getRootNode(),t)})(e);P(e,t),o&&(o.map((e=>e())),s["s-rc"]=void 0);{const t=s["s-p"],n=()=>x(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},P=(e,t)=>{try{t=t.render(),e.t&=-17,e.t|=2,((e,t)=>{const n=e.p,l=e.M,s=e.v||f(null,null),o=(e=>e&&e.h===$)(t)?t:a(null,null,t);l.k&&(o.u=o.u||{},l.k.map((([e,t])=>o.u[t]=n[e]))),o.h=null,o.t|=4,e.v=o,o.m=s.m=n,g(s,o)})(e,t)}catch(t){V(t,e.p)}return null},x=e=>{const t=e.p,n=e.g;64&e.t||(e.t|=64,T(t),e.C(t),n||E()),e.S&&(e.S(),e.S=void 0),512&e.t&&Q((()=>k(e,!1))),e.t&=-517},E=()=>{T(n.documentElement),Q((()=>M(t,"appload",{detail:{namespace:"bonus-pagination-limits"}})))},L=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){V(e)}},N=(e,t)=>e&&e.then?e.then(t):t(),T=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.O){const s=Object.entries(t.O),o=e.prototype;if(s.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>R(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=R(e),o=s.P.get(t),i=s.t,r=s.j;n=((e,t)=>null==e||u(e)?e:2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&i&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),r&&2==(18&i)&&k(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,s){l.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))s=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==s)return;this[t]=(null!==s||"boolean"!=typeof this[t])&&s}))},e.observedAttributes=s.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},A=(e,s={})=>{const i=[],c=s.exclude||[],u=t.customElements,a=n.head,f=a.querySelector("meta[charset]"),$=n.createElement("style"),h=[];let m,p=!0;Object.assign(l,s),l.l=new URL(s.resourcesUrl||"./",n.baseURI).href,e.map((e=>{e[1].map((t=>{const n={t:t[0],o:t[1],O:t[2],L:t[3]};n.O=t[2],n.k=[];const s=n.o,a=class extends HTMLElement{constructor(e){super(e),q(e=this,n)}connectedCallback(){m&&(clearTimeout(m),m=null),p?h.push(this):l.jmp((()=>(e=>{if(0==(1&l.t)){const t=R(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"]){v(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=z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(W(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){V(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=r(n);if(!B.has(t)){const l=()=>{};((e,t,n)=>{let l=B.get(e);o&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,B.set(e,l)})(t,e,!!(1&n.t)),l()}}}const i=t.g,c=()=>k(t,!0);i&&i["s-rc"]?i["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){l.jmp((()=>{}))}componentOnReady(){return R(this).N}};n.T=e[0],c.includes(s)||u.get(s)||(i.push(s),u.define(s,W(a,n,1)))}))})),$.innerHTML=i+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),p=!1,h.length?h.map((e=>e.connectedCallback())):l.jmp((()=>m=setTimeout(E,30)))},F=new WeakMap,R=e=>F.get(e),U=(e,t)=>F.set(t.j=e,t),q=(e,t)=>{const n={t:0,p:e,M:t,P:new Map};return n.N=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],F.set(e,n)},H=(e,t)=>t in e,V=(e,t)=>(0,console.error)(e,t),_=new Map,z=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=_.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(_.set(n,e),e[t])),V)},B=new Map,D=[],G=[],I=(t,n)=>s=>{t.push(s),e||(e=!0,n&&4&l.t?Q(K):l.raf(K))},J=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){V(e)}e.length=0},K=()=>{J(D),J(G),(e=D.length>0)&&l.raf(K)},Q=e=>s().then(e),X=I(G,!0);export{A as b,j as c,a as h,s as p,U as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as e,h as a}from"./p-3dce25c5.js";const t=["pt-br","en","es-mx","hu","hr"],r={en:{pageLimitLabel:"Show"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},o=class{constructor(a){i(this,a),this.pageLimitChanged=e(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(i){this.limit=i,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((i=>parseInt(i))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(i){console.error("Error when parse PageLimitOptions",i)}}renderStylingWrapper(){return a("general-styling-wrapper",{targetTranslations:r,translationUrl:this.translationUrl})}render(){return a("div",{class:"PaginationWrapper"},a("span",{class:"NoOfItemsToDisplayMessage"},(()=>{const i=this.language;return r[void 0!==i&&t.includes(i)?i:"en"].pageLimitLabel})()),a("ul",{class:"PaginationArea"},this.pageLimits.map((i=>a("li",{class:(this.limit==i?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(i)}},i)))),a("general-styling-wrapper",{targetTranslations:r,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};o.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";export{o as bonus_pagination_limits}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-b47e4aa8.js');
|
|
6
|
-
|
|
7
|
-
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
9
|
-
const TRANSLATIONS = {
|
|
10
|
-
en: {
|
|
11
|
-
"pageLimitLabel": 'Show',
|
|
12
|
-
},
|
|
13
|
-
hu: {
|
|
14
|
-
"pageLimitLabel": 'Show',
|
|
15
|
-
},
|
|
16
|
-
hr: {
|
|
17
|
-
"pageLimitLabel": 'Show',
|
|
18
|
-
},
|
|
19
|
-
"pt-br": {
|
|
20
|
-
"pageLimitLabel": 'Show',
|
|
21
|
-
},
|
|
22
|
-
"es-mx": {
|
|
23
|
-
"pageLimitLabel": 'Show',
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const translate = (key, customLang) => {
|
|
27
|
-
const lang = customLang;
|
|
28
|
-
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const bonusPaginationLimitsCss = ":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emfe-w-color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emfe-w-color-primary, #eaefea);background-color:var(--emfe-w-color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emfe-w-color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";
|
|
32
|
-
|
|
33
|
-
const BonusPaginationLimits = class {
|
|
34
|
-
constructor(hostRef) {
|
|
35
|
-
index.registerInstance(this, hostRef);
|
|
36
|
-
this.pageLimitChanged = index.createEvent(this, "pageLimitChanged", 7);
|
|
37
|
-
/**
|
|
38
|
-
* Language of the widget
|
|
39
|
-
*/
|
|
40
|
-
this.language = 'en';
|
|
41
|
-
/**
|
|
42
|
-
* Translation via url
|
|
43
|
-
*/
|
|
44
|
-
this.translationUrl = '';
|
|
45
|
-
/**
|
|
46
|
-
* Default limit for per page, default: 10
|
|
47
|
-
*/
|
|
48
|
-
this.limit = 10;
|
|
49
|
-
this.pageLimits = [10, 25, 50];
|
|
50
|
-
}
|
|
51
|
-
onPageLimitClicked(pageLimit) {
|
|
52
|
-
this.limit = pageLimit;
|
|
53
|
-
this.pageLimitChanged.emit({ limit: this.limit });
|
|
54
|
-
}
|
|
55
|
-
componentWillLoad() {
|
|
56
|
-
if (!this.pageLimitOptions) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
try {
|
|
60
|
-
this.pageLimits = this.pageLimitOptions.split(',').map((item) => {
|
|
61
|
-
return parseInt(item);
|
|
62
|
-
});
|
|
63
|
-
// if there is an array of custom limits provided (string to array - e.g. [5, 10, 15])
|
|
64
|
-
// and the value for the custom set limit (e.g. 8) isn't part of the provided array,
|
|
65
|
-
// then ignore the set the custom set limit and make the limit equal to the first value of the array
|
|
66
|
-
// (as part of the example so far, this would be 5)
|
|
67
|
-
if (!this.pageLimits.includes(this.limit)) {
|
|
68
|
-
this.limit = this.pageLimits[0];
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch (e) {
|
|
72
|
-
console.error('Error when parse PageLimitOptions', e);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
renderStylingWrapper() {
|
|
76
|
-
return index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl });
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
return index.h("div", { class: 'PaginationWrapper' }, index.h("span", { class: 'NoOfItemsToDisplayMessage' }, translate('pageLimitLabel', this.language)), index.h("ul", { class: 'PaginationArea' }, this.pageLimits.map((pageLimit) => {
|
|
80
|
-
return (index.h("li", { class: `${this.limit == pageLimit ? 'Active' : ''} PageSize Item`, onClick: () => {
|
|
81
|
-
this.onPageLimitClicked(pageLimit);
|
|
82
|
-
} }, pageLimit));
|
|
83
|
-
})), index.h("general-styling-wrapper", { targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), this.renderStylingWrapper());
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
BonusPaginationLimits.style = bonusPaginationLimitsCss;
|
|
87
|
-
|
|
88
|
-
exports.bonus_pagination_limits = BonusPaginationLimits;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-b47e4aa8.js');
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
7
|
-
*/
|
|
8
|
-
const patchBrowser = () => {
|
|
9
|
-
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('bonus-pagination-limits.cjs.js', document.baseURI).href));
|
|
10
|
-
const opts = {};
|
|
11
|
-
if (importMeta !== '') {
|
|
12
|
-
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
13
|
-
}
|
|
14
|
-
return index.promiseResolve(opts);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["bonus-pagination-limits.cjs",[[0,"bonus-pagination-limits",{"language":[513],"translationUrl":[513,"translation-url"],"pageLimitOptions":[513,"page-limit-options"],"limit":[1538],"pageLimits":[32]}]]]], options);
|
|
19
|
-
});
|