@everymatrix/bonus-pagination-nav 1.56.0 → 1.56.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bonus-pagination-nav/bonus-pagination-nav.esm.js +1 -1
- package/dist/bonus-pagination-nav/p-206f54f8.js +2 -0
- package/dist/bonus-pagination-nav/p-d29d4ec0.entry.js +1 -0
- package/dist/cjs/bonus-pagination-nav.cjs.entry.js +3 -33
- package/dist/cjs/bonus-pagination-nav.cjs.js +2 -2
- package/dist/cjs/{index-de67c104.js → index-aabdc668.js} +54 -201
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/bonus-pagination-nav/bonus-pagination-nav.js +2 -54
- package/dist/esm/bonus-pagination-nav.entry.js +3 -33
- package/dist/esm/bonus-pagination-nav.js +3 -3
- package/dist/esm/{index-bbf5341c.js → index-9c2a4b03.js} +54 -201
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/packages/stencil/bonus-pagination-nav/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/packages/stencil/bonus-pagination-nav/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/bonus-pagination-nav/p-22747bba.js +0 -2
- package/dist/bonus-pagination-nav/p-f089fb89.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/packages/stencil/bonus-pagination-nav/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/packages/stencil/bonus-pagination-nav/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,b as e}from"./p-
|
|
1
|
+
import{p as a,b as e}from"./p-206f54f8.js";export{s as setNonce}from"./p-206f54f8.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),a(t)})().then((async a=>(await t(),e([["p-d29d4ec0",[[0,"bonus-pagination-nav",{total:[1538],limit:[1538],offset:[1538],tableId:[1537,"table-id"],language:[1537],translationUrl:[513,"translation-url"],arrowsActive:[1540,"arrows-active"],secondaryArrowsActive:[1540,"secondary-arrows-active"],displayPageNumbers:[1540,"display-page-numbers"],displayRangeOfTotal:[1540,"display-range-of-total"],navItemAccount:[1538,"nav-item-account"],endPageIndex:[32],pagesArray:[32],currentPage:[32],showAsEllipsisMid:[32]},[[8,"paginationReset","pageLimitChangedHandler"],[8,"pageLimitChanged","pageLimitChangedHandler"]]]]]],a))));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=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: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)},h=e=>Promise.resolve(e),m=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,d=[],y=[],v=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?w(b):f.raf(b))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{$(d),$(y),(p=d.length>0)&&f.raf(b)},w=e=>h().then(e),g=v(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>x});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,P=e=>{if(e.isOk)return e.value;throw e.value},x=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?T(null,l):l),i=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,r.length>0&&(u.h=r),u.m=o,u},T=(e,t)=>({l:0,p:e,i:t,v:null,h:null,u:null,m:null}),A={},F=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>N(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},N=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},W=new WeakMap,H=e=>"sc-"+e.$,L=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(D);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},U=/\s/,q=e=>e?e.split(U):[],D="Capture",G=RegExp(D+"$"),V=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||S,s=t.u||S;for(const e of _(Object.keys(o)))e in s||L(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))L(l,e,o[e],s[e],n,t.l)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=(e,t,n)=>{const l=t.h[n];let o,s,i=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else if(o=l.v=a.createElement(l.p),V(null,l,z),l.h)for(i=0;i<l.h.length;++i)s=B(e,l,i),s&&o.appendChild(s);return o["s-hn"]=M,o},I=(e,t,n,l,o,s)=>{let i,r=e;for(;o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].v=i,X(r,i,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;e&&e.remove()}}},K=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),Q=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,i=t.i;null===i?(V(e,t,z),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],m=t[f],p=l.length-1,d=l[0],y=l[p];for(;r<=f&&c<=p;)if(null==h)h=t[++r];else if(null==m)m=t[--f];else if(null==d)d=l[++c];else if(null==y)y=l[--p];else if(K(h,d,o))Q(h,d,o),h=t[++r],d=l[++c];else if(K(m,y,o))Q(m,y,o),m=t[--f],y=l[--p];else if(K(h,y,o))Q(h,y,o),X(e,h.v,m.v.nextSibling),h=t[++r],y=l[--p];else if(K(m,d,o))Q(m,d,o),X(e,m.v,h.v),m=t[--f],d=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===d.m){u=a;break}u>=0?(i=t[u],i.p!==d.p?s=B(t&&t[c],n,u):(Q(i,d,o),t[u]=void 0,s=i.v),d=l[++c]):(s=B(t&&t[c],n,c),d=l[++c]),s&&X(h.v.parentNode,s,h.v)}r>f?I(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&J(t,r,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),I(l,null,t,s,0,s.length-1)):null!==o&&J(o,0,o.length-1)):e.i!==i&&(l.data=i)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Z=(e,t)=>{if(e.l|=16,!(4&e.l))return Y(e,e.j),g((()=>ee(e,t)));e.l|=512},ee=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$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 t&&(e.l|=256,e.k&&(e.k.map((([e,t])=>re(n,e,t))),e.k=void 0)),l=te(l,(()=>re(n,"componentWillRender"))),te(l,(()=>le(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O;((e,t)=>{var n;const l=H(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=W.get(e=e.head||e);if(i||W.set(e,i=new Set),!i.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.C)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o])})(e.$hostElement$.getRootNode(),t)})(e);oe(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},oe=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||T(null,null),i=(e=>e&&e.p===A)(t)?t:R(null,null,t);if(M=l.tagName,o.P&&(i.u=i.u||{},o.P.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.p=null,i.l|=4,e.M=i,i.v=s.v=l,Q(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.j;64&e.l||(e.l|=64,ce(t),e.R(t),n||ie()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>Z(e,!1))),e.l&=-517},ie=()=>{ce(a.documentElement),w((()=>N(u,"appload",{detail:{namespace:"bonus-pagination-nav"}})))},re=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,l)=>{var o,s;const i=e.prototype;if(t.T){const r=Object.entries(null!=(o=t.T)?o:{});if(r.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(l){((e,t,l,o)=>{const s=n(e);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.A.get(t),r=s.l,c=s.t;l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.T[t][0]),8&r&&void 0!==i||l===i||Number.isNaN(i)&&Number.isNaN(l)||(s.A.set(t,l),c&&2==(18&r)&&Z(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.F)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.F)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},ae=(e,l={})=>{var o;const h=[],p=l.exclude||[],d=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{const o={l:l[0],$:l[1],T:l[2],N:l[3]};4&o.l&&(S=!0),o.T=l[2],o.N=l[3],o.P=[];const c=o.$,u=class extends HTMLElement{constructor(e){super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,A:new Map};l.W=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,o)}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,fe(this,e,o.N)),w&&(clearTimeout(w),w=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)fe(e,t,l.N),(null==t?void 0:t.t)||(null==t?void 0:t.W)&&t.W.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.j=n);break}}l.T&&Object.entries(l.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.H){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.H;if(!n)return;const l=i.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(i.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.L}" was not found`);l.isProxied||(ue(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=H(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);m&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Z(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.U&&(e.U.map((e=>e())),e.U=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.W)&&e.W.then((()=>{}))}})()))}componentOnReady(){return n(this).W}};o.H=e[0],p.includes(c)||d.get(c)||(h.push(c),d.define(c,ue(u,o,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ie,30)))},fe=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=me(e,n),i=he(t,o),r=pe(n);f.ael(s,l,i,r),(t.U=t.U||[]).push((()=>f.rel(s,l,i,r)))}))},he=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},me=(e,t)=>8&t?u:e,pe=e=>({passive:!!(1&e),capture:!!(2&e)}),de=e=>f.C=e;export{ae as b,F as c,R as h,h as p,l as r,de as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as a}from"./p-206f54f8.js";const i=["pt-br","en","es-mx","hu","hr"],s={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},r=(t,e,a)=>{const r=e;let h=s[void 0!==r&&i.includes(r)?r:"en"][t];if(void 0!==a)for(const[t,e]of Object.entries(a.values)){const a=new RegExp(`{${t}}`,"g");h=h.replace(a,e)}return h},h=class{constructor(a){t(this,a),this.reloadPageEmitter=e(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(t){this.limit=t.detail.limit?t.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==t.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(t){"..."==t||0==t||parseInt(t.toString(),10)>this.endPageIndex+1||(this.currentPage=t,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return a("ul",{class:"PaginationArea"},this.pagesArray.map((t=>a("li",{class:"PageItem "+(this.currentPage==t?"Active":""),onClick:()=>{this.goTo(t)}},t))))}renderStylingWrapper(){return a("general-styling-wrapper",{targetTranslations:s,translationUrl:this.translationUrl})}generateNavItemsByType(t,e){if(this.endPageIndex<t)return Array.from({length:this.endPageIndex+1},((t,e)=>e+1));let a=[],i=Math.floor(t/2);const s=this.endPageIndex+1;return e?this.currentPage<i||this.currentPage>s-i+1?(a=Array.from({length:i},((t,e)=>e+1)),a.push("..."),a=a.concat(Array.from({length:i},((t,e)=>this.endPageIndex-1+e)))):this.currentPage==i?(a=Array.from({length:i+1},((t,e)=>e+1)),a.push("..."),a=a.concat(Array.from({length:i-1},((t,e)=>this.endPageIndex+e)))):this.currentPage==s-i+1?(a=Array.from({length:i-1},((t,e)=>e+1)),a.push("..."),a=a.concat(Array.from({length:i+1},((t,e)=>this.endPageIndex-2+e)))):(a=[1,"..."],a=a.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),a=a.concat(["...",s])):this.currentPage<i-1?(a=Array.from({length:t-1},((t,e)=>e+1)),a.push("...")):this.endPageIndex-this.currentPage<i+1?(a=Array.from({length:t-1},((t,e)=>this.endPageIndex-i+e)),a.unshift("...")):(a=Array.from({length:i+1},((t,e)=>this.currentPage+e-1)),a.push("..."),a.unshift("...")),a}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return a("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&a("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},r("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),a("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&a("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},r("firstPage",this.language)),this.secondaryArrowsActive&&a("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},r("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&a("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},r("nextPage",this.language)),this.arrowsActive&&a("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",r("lastPage",this.language)," "),this.renderStylingWrapper()))}};h.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";export{h as bonus_pagination_nav}
|
|
@@ -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-aabdc668.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
@@ -62,49 +62,19 @@ const BonusPaginationNav = class {
|
|
|
62
62
|
constructor(hostRef) {
|
|
63
63
|
index.registerInstance(this, hostRef);
|
|
64
64
|
this.reloadPageEmitter = index.createEvent(this, "reloadPageByType", 7);
|
|
65
|
-
/**
|
|
66
|
-
* The received length of dataset
|
|
67
|
-
*/
|
|
68
65
|
this.total = 1;
|
|
69
|
-
/**
|
|
70
|
-
* The received limit for the number of pages
|
|
71
|
-
*/
|
|
72
66
|
this.limit = 10;
|
|
73
|
-
/**
|
|
74
|
-
* The offset of dataset
|
|
75
|
-
*/
|
|
76
67
|
this.offset = 0;
|
|
77
|
-
/**
|
|
78
|
-
* The table id, use to identify which table listen the page change message
|
|
79
|
-
* when there is more than 1 table on same page
|
|
80
|
-
*/
|
|
81
68
|
this.tableId = 'default';
|
|
82
|
-
/**
|
|
83
|
-
* Language
|
|
84
|
-
*/
|
|
85
69
|
this.language = 'en';
|
|
86
|
-
/**
|
|
87
|
-
* Translation via url
|
|
88
|
-
*/
|
|
89
70
|
this.translationUrl = '';
|
|
90
|
-
/**
|
|
91
|
-
* Customize pagination: Activate pagination arrows
|
|
92
|
-
*/
|
|
93
71
|
this.arrowsActive = true;
|
|
94
|
-
/**
|
|
95
|
-
* Customize pagination: Activate pagination secondary arrows
|
|
96
|
-
*/
|
|
97
72
|
this.secondaryArrowsActive = true;
|
|
98
|
-
/**
|
|
99
|
-
* Customize pagination: Activate pagination numbered navigation
|
|
100
|
-
*/
|
|
101
73
|
this.displayPageNumbers = true;
|
|
102
|
-
|
|
103
|
-
* The Nav Items count for the pagination, default: 5
|
|
104
|
-
* the value should be Odd, 5, 7
|
|
105
|
-
*/
|
|
74
|
+
this.displayRangeOfTotal = undefined;
|
|
106
75
|
this.navItemAccount = 5;
|
|
107
76
|
this.endPageIndex = 0;
|
|
77
|
+
this.pagesArray = undefined;
|
|
108
78
|
this.currentPage = 1;
|
|
109
79
|
this.showAsEllipsisMid = !this.arrowsActive;
|
|
110
80
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-aabdc668.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('bonus-pagination-nav.cjs.js', document.baseURI).href));
|
|
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'bonus-pagination-nav';
|
|
24
|
-
const BUILD = /* bonus-pagination-nav */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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,
|
|
24
|
+
const BUILD = /* bonus-pagination-nav */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
// src/client/client-host-ref.ts
|
|
36
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
37
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
38
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
39
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
41
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
38
|
const hostRef = {
|
|
43
39
|
$flags$: 0,
|
|
@@ -50,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
46
|
hostElement["s-p"] = [];
|
|
51
47
|
hostElement["s-rc"] = [];
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
55
50
|
};
|
|
56
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
57
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -88,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
88
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
89
84
|
/* webpackMode: "lazy" */
|
|
90
85
|
`./${bundleId}.entry.js${""}`
|
|
91
|
-
)); }).then(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
cmpModules.set(bundleId, importedModule);
|
|
95
|
-
}
|
|
96
|
-
return importedModule[exportName];
|
|
97
|
-
},
|
|
98
|
-
(e) => {
|
|
99
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
100
89
|
}
|
|
101
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
102
92
|
};
|
|
103
93
|
|
|
104
94
|
// src/client/client-style.ts
|
|
105
95
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
107
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
108
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
109
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -178,6 +167,9 @@ var flush = () => {
|
|
|
178
167
|
};
|
|
179
168
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
180
169
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
170
|
+
|
|
171
|
+
// src/utils/constants.ts
|
|
172
|
+
var EMPTY_OBJ = {};
|
|
181
173
|
var isComplexType = (o) => {
|
|
182
174
|
o = typeof o;
|
|
183
175
|
return o === "object" || o === "function";
|
|
@@ -381,40 +373,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
381
373
|
}
|
|
382
374
|
if (!appliedStyles.has(scopeId2)) {
|
|
383
375
|
{
|
|
384
|
-
styleElm =
|
|
376
|
+
styleElm = doc.createElement("style");
|
|
385
377
|
styleElm.innerHTML = style;
|
|
386
378
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
387
379
|
if (nonce != null) {
|
|
388
380
|
styleElm.setAttribute("nonce", nonce);
|
|
389
381
|
}
|
|
390
|
-
|
|
391
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
392
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
393
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
394
|
-
styleContainerNode.insertBefore(
|
|
395
|
-
styleElm,
|
|
396
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
397
|
-
);
|
|
398
|
-
} else if ("host" in styleContainerNode) {
|
|
399
|
-
if (supportsConstructableStylesheets) {
|
|
400
|
-
const stylesheet = new CSSStyleSheet();
|
|
401
|
-
stylesheet.replaceSync(style);
|
|
402
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
403
|
-
} else {
|
|
404
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
405
|
-
if (existingStyleContainer) {
|
|
406
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
407
|
-
} else {
|
|
408
|
-
styleContainerNode.prepend(styleElm);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
} else {
|
|
412
|
-
styleContainerNode.append(styleElm);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
416
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
417
|
-
}
|
|
382
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
418
383
|
}
|
|
419
384
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
420
385
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -439,18 +404,16 @@ var attachStyles = (hostRef) => {
|
|
|
439
404
|
endAttachStyles();
|
|
440
405
|
};
|
|
441
406
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
442
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
407
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
443
408
|
if (oldValue !== newValue) {
|
|
444
409
|
let isProp = isMemberInElement(elm, memberName);
|
|
445
410
|
let ln = memberName.toLowerCase();
|
|
446
411
|
if (memberName === "class") {
|
|
447
412
|
const classList = elm.classList;
|
|
448
413
|
const oldClasses = parseClassList(oldValue);
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
453
|
-
}
|
|
414
|
+
const newClasses = parseClassList(newValue);
|
|
415
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
416
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
454
417
|
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
455
418
|
if (memberName[2] === "-") {
|
|
456
419
|
memberName = memberName.slice(3);
|
|
@@ -478,13 +441,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
478
441
|
if (memberName === "list") {
|
|
479
442
|
isProp = false;
|
|
480
443
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
481
|
-
|
|
482
|
-
elm[memberName] = n;
|
|
483
|
-
} else {
|
|
484
|
-
elm.setAttribute(memberName, n);
|
|
485
|
-
}
|
|
444
|
+
elm[memberName] = n;
|
|
486
445
|
}
|
|
487
|
-
} else
|
|
446
|
+
} else {
|
|
488
447
|
elm[memberName] = newValue;
|
|
489
448
|
}
|
|
490
449
|
} catch (e) {
|
|
@@ -506,44 +465,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
506
465
|
}
|
|
507
466
|
};
|
|
508
467
|
var parseClassListRegex = /\s/;
|
|
509
|
-
var parseClassList = (value) =>
|
|
510
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
511
|
-
value = value.baseVal;
|
|
512
|
-
}
|
|
513
|
-
if (!value || typeof value !== "string") {
|
|
514
|
-
return [];
|
|
515
|
-
}
|
|
516
|
-
return value.split(parseClassListRegex);
|
|
517
|
-
};
|
|
468
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
518
469
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
519
470
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
520
471
|
|
|
521
472
|
// src/runtime/vdom/update-element.ts
|
|
522
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
473
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
523
474
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
524
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
525
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
475
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
476
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
526
477
|
{
|
|
527
478
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
528
479
|
if (!(memberName in newVnodeAttrs)) {
|
|
529
|
-
setAccessor(
|
|
530
|
-
elm,
|
|
531
|
-
memberName,
|
|
532
|
-
oldVnodeAttrs[memberName],
|
|
533
|
-
void 0,
|
|
534
|
-
isSvgMode2,
|
|
535
|
-
newVnode.$flags$);
|
|
480
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
536
481
|
}
|
|
537
482
|
}
|
|
538
483
|
}
|
|
539
484
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
540
|
-
setAccessor(
|
|
541
|
-
elm,
|
|
542
|
-
memberName,
|
|
543
|
-
oldVnodeAttrs[memberName],
|
|
544
|
-
newVnodeAttrs[memberName],
|
|
545
|
-
isSvgMode2,
|
|
546
|
-
newVnode.$flags$);
|
|
485
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
547
486
|
}
|
|
548
487
|
};
|
|
549
488
|
function sortedAttrNames(attrNames) {
|
|
@@ -558,7 +497,7 @@ function sortedAttrNames(attrNames) {
|
|
|
558
497
|
var hostTagName;
|
|
559
498
|
var useNativeShadowDom = false;
|
|
560
499
|
var isSvgMode = false;
|
|
561
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
500
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
562
501
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
563
502
|
let i2 = 0;
|
|
564
503
|
let elm;
|
|
@@ -697,9 +636,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
697
636
|
if (!isInitialRender) {
|
|
698
637
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
699
638
|
}
|
|
700
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
701
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
702
|
-
}
|
|
703
639
|
return true;
|
|
704
640
|
}
|
|
705
641
|
return false;
|
|
@@ -722,10 +658,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
722
658
|
elm.textContent = "";
|
|
723
659
|
}
|
|
724
660
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
725
|
-
} else if (
|
|
726
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
727
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
728
|
-
) {
|
|
661
|
+
} else if (oldChildren !== null) {
|
|
729
662
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
730
663
|
}
|
|
731
664
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -733,9 +666,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
733
666
|
}
|
|
734
667
|
};
|
|
735
668
|
var insertBefore = (parent, newNode, reference) => {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
}
|
|
669
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
670
|
+
return inserted;
|
|
739
671
|
};
|
|
740
672
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
741
673
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -760,21 +692,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
760
692
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
761
693
|
hostRef.$vnode$ = rootVnode;
|
|
762
694
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
|
|
763
|
-
useNativeShadowDom = supportsShadow
|
|
695
|
+
useNativeShadowDom = supportsShadow ;
|
|
764
696
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
765
697
|
};
|
|
766
698
|
|
|
767
699
|
// src/runtime/update-component.ts
|
|
768
700
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
769
701
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
770
|
-
|
|
771
|
-
new Promise(
|
|
772
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
773
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
774
|
-
r();
|
|
775
|
-
}
|
|
776
|
-
)
|
|
777
|
-
);
|
|
702
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
778
703
|
}
|
|
779
704
|
};
|
|
780
705
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -803,13 +728,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
803
728
|
{
|
|
804
729
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
805
730
|
if (hostRef.$queuedListeners$) {
|
|
806
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
731
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
807
732
|
hostRef.$queuedListeners$ = void 0;
|
|
808
733
|
}
|
|
809
734
|
}
|
|
810
735
|
}
|
|
811
736
|
{
|
|
812
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"
|
|
737
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
813
738
|
}
|
|
814
739
|
endSchedule();
|
|
815
740
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -902,14 +827,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
902
827
|
}
|
|
903
828
|
};
|
|
904
829
|
var appDidLoad = (who) => {
|
|
830
|
+
{
|
|
831
|
+
addHydratedFlag(doc.documentElement);
|
|
832
|
+
}
|
|
905
833
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
906
834
|
};
|
|
907
|
-
var safeCall = (instance, method, arg
|
|
835
|
+
var safeCall = (instance, method, arg) => {
|
|
908
836
|
if (instance && instance[method]) {
|
|
909
837
|
try {
|
|
910
838
|
return instance[method](arg);
|
|
911
839
|
} catch (e) {
|
|
912
|
-
consoleError(e
|
|
840
|
+
consoleError(e);
|
|
913
841
|
}
|
|
914
842
|
}
|
|
915
843
|
return void 0;
|
|
@@ -952,68 +880,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
952
880
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
953
881
|
members.map(([memberName, [memberFlags]]) => {
|
|
954
882
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
955
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
956
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
957
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
958
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
959
|
-
Object.defineProperty(prototype, memberName, {
|
|
960
|
-
get() {
|
|
961
|
-
{
|
|
962
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
963
|
-
return getValue(this, memberName);
|
|
964
|
-
}
|
|
965
|
-
const ref = getHostRef(this);
|
|
966
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
967
|
-
if (!instance) return;
|
|
968
|
-
return instance[memberName];
|
|
969
|
-
}
|
|
970
|
-
},
|
|
971
|
-
configurable: true,
|
|
972
|
-
enumerable: true
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
883
|
Object.defineProperty(prototype, memberName, {
|
|
884
|
+
get() {
|
|
885
|
+
return getValue(this, memberName);
|
|
886
|
+
},
|
|
976
887
|
set(newValue) {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
982
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
983
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
984
|
-
}
|
|
985
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
986
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
987
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
988
|
-
return;
|
|
989
|
-
}
|
|
990
|
-
{
|
|
991
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
992
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
993
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
994
|
-
ref.$onReadyPromise$.then(() => {
|
|
995
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
996
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
997
|
-
}
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
return;
|
|
1001
|
-
}
|
|
1002
|
-
const setterSetVal = () => {
|
|
1003
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1004
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1005
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1006
|
-
}
|
|
1007
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1008
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1009
|
-
};
|
|
1010
|
-
if (ref.$lazyInstance$) {
|
|
1011
|
-
setterSetVal();
|
|
1012
|
-
} else {
|
|
1013
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
888
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
889
|
+
},
|
|
890
|
+
configurable: true,
|
|
891
|
+
enumerable: true
|
|
1017
892
|
});
|
|
1018
893
|
}
|
|
1019
894
|
});
|
|
@@ -1023,11 +898,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1023
898
|
plt.jmp(() => {
|
|
1024
899
|
var _a2;
|
|
1025
900
|
const propName = attrNameToPropName.get(attrName);
|
|
1026
|
-
if (this.hasOwnProperty(propName)
|
|
901
|
+
if (this.hasOwnProperty(propName)) {
|
|
1027
902
|
newValue = this[propName];
|
|
1028
903
|
delete this[propName];
|
|
1029
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1030
|
-
this[propName] == newValue) {
|
|
904
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1031
905
|
return;
|
|
1032
906
|
} else if (propName == null) {
|
|
1033
907
|
const hostRef = getHostRef(this);
|
|
@@ -1043,11 +917,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1043
917
|
}
|
|
1044
918
|
return;
|
|
1045
919
|
}
|
|
1046
|
-
|
|
1047
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1048
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1049
|
-
this[propName] = newValue;
|
|
1050
|
-
}
|
|
920
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1051
921
|
});
|
|
1052
922
|
};
|
|
1053
923
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1076,7 +946,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1076
946
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1077
947
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1078
948
|
if (bundleId) {
|
|
1079
|
-
const CstrImport = loadModule(cmpMeta
|
|
949
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1080
950
|
if (CstrImport && "then" in CstrImport) {
|
|
1081
951
|
const endLoad = uniqueTime();
|
|
1082
952
|
Cstr = await CstrImport;
|
|
@@ -1098,7 +968,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1098
968
|
try {
|
|
1099
969
|
new Cstr(hostRef);
|
|
1100
970
|
} catch (e) {
|
|
1101
|
-
consoleError(e
|
|
971
|
+
consoleError(e);
|
|
1102
972
|
}
|
|
1103
973
|
{
|
|
1104
974
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1130,7 +1000,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1130
1000
|
schedule();
|
|
1131
1001
|
}
|
|
1132
1002
|
};
|
|
1133
|
-
var fireConnectedCallback = (instance
|
|
1003
|
+
var fireConnectedCallback = (instance) => {
|
|
1134
1004
|
};
|
|
1135
1005
|
|
|
1136
1006
|
// src/runtime/connected-callback.ts
|
|
@@ -1171,7 +1041,7 @@ var connectedCallback = (elm) => {
|
|
|
1171
1041
|
endConnected();
|
|
1172
1042
|
}
|
|
1173
1043
|
};
|
|
1174
|
-
var disconnectInstance = (instance
|
|
1044
|
+
var disconnectInstance = (instance) => {
|
|
1175
1045
|
};
|
|
1176
1046
|
var disconnectedCallback = async (elm) => {
|
|
1177
1047
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1186,12 +1056,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1186
1056
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1187
1057
|
}
|
|
1188
1058
|
}
|
|
1189
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1190
|
-
rootAppliedStyles.delete(elm);
|
|
1191
|
-
}
|
|
1192
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1193
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1194
|
-
}
|
|
1195
1059
|
};
|
|
1196
1060
|
|
|
1197
1061
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1257,17 +1121,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1257
1121
|
}
|
|
1258
1122
|
disconnectedCallback() {
|
|
1259
1123
|
plt.jmp(() => disconnectedCallback(this));
|
|
1260
|
-
plt.raf(() => {
|
|
1261
|
-
var _a3;
|
|
1262
|
-
const hostRef = getHostRef(this);
|
|
1263
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1264
|
-
if (i2 > -1) {
|
|
1265
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1266
|
-
}
|
|
1267
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1268
|
-
delete hostRef.$vnode$.$elm$;
|
|
1269
|
-
}
|
|
1270
|
-
});
|
|
1271
1124
|
}
|
|
1272
1125
|
componentOnReady() {
|
|
1273
1126
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1331,7 +1184,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1331
1184
|
}
|
|
1332
1185
|
}
|
|
1333
1186
|
} catch (e) {
|
|
1334
|
-
consoleError(e
|
|
1187
|
+
consoleError(e);
|
|
1335
1188
|
}
|
|
1336
1189
|
};
|
|
1337
1190
|
var getHostListenerTarget = (elm, flags) => {
|
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-aabdc668.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|