@everymatrix/bonus-pagination-nav 1.54.12 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bonus-pagination-nav/bonus-pagination-nav.esm.js +1 -1
- package/dist/bonus-pagination-nav/p-493062dd.entry.js +1 -0
- package/dist/bonus-pagination-nav/p-8bf2c2f3.js +2 -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-10e16208.js} +63 -167
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- 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-94427c87.js} +63 -167
- 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/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-8bf2c2f3.js";export{s as setNonce}from"./p-8bf2c2f3.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-493062dd",[[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 @@
|
|
|
1
|
+
import{r as t,c as e,h as a}from"./p-8bf2c2f3.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}
|
|
@@ -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),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],y=[],v=(e,t)=>n=>{e.push(n),m||(m=!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),(m=d.length>0)&&f.raf(b)},w=e=>h().then(e),S=v(y,!0),g={},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:()=>O,map:()=>C,ok:()=>E,unwrap:()=>P,unwrapErr:()=>x});var E=e=>({isOk:!0,isErr:!1,value:e}),O=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=>E(e))):E(n)}if(e.isErr)return O(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},A=(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?R(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=R(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=o,u},R=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),H={},T=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>D(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},D=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},F=new WeakMap,N=e=>"sc-"+e.$,W=(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=U(n),s=U(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||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(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(q);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},L=/\s/,U=e=>e?e.split(L):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||g,s=t.u||g;for(const e of _(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))W(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.m),V(null,l,z),o.getRootNode().querySelector("body"),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.m===t.m&&(!!n||e.p===t.p),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],p=t[f],m=l.length-1,d=l[0],y=l[m];for(;r<=f&&c<=m;)if(null==h)h=t[++r];else if(null==p)p=t[--f];else if(null==d)d=l[++c];else if(null==y)y=l[--m];else if(K(h,d,o))Q(h,d,o),h=t[++r],d=l[++c];else if(K(p,y,o))Q(p,y,o),p=t[--f],y=l[--m];else if(K(h,y,o))Q(h,y,o),X(e,h.v,p.v.nextSibling),h=t[++r],y=l[--m];else if(K(p,d,o))Q(p,d,o),X(e,p.v,h.v),p=t[--f],d=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===d.p){u=a;break}u>=0?(i=t[u],i.m!==d.m?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[m+1]?null:l[m+1].v,n,l,c,m):c>m&&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)):!n&&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),S((()=>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=N(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=F.get(e=e.head||e);if(i||F.set(e,i=new Set),!i.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.C)?n:k(a);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(p){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}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||R(null,null),i=(e=>e&&e.m===H)(t)?t:A(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.m=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.A(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((()=>D(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.R){const r=Object.entries(null!=(o=t.R)?o:{});if(r.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).H.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.H.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.R[t][0]),8&r&&void 0!==i||l===i||Number.isNaN(i)&&Number.isNaN(l)||(s.H.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.T)?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.T)?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=[],m=l.exclude||[],d=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),$=a.createElement("style"),b=[];let w,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{const o={l:l[0],$:l[1],R:l[2],D:l[3]};4&o.l&&(g=!0),o.R=l[2],o.D=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,H:new Map};l.F=new Promise((e=>l.A=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.D)),w&&(clearTimeout(w),w=null),S?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.D),(null==t?void 0:t.t)||(null==t?void 0:t.F)&&t.F.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.R&&Object.entries(l.R).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.N){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.N;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.W}" 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=N(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);p&&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.L&&(e.L.map((e=>e())),e.L=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.F)&&e.F.then((()=>{}))}})()))}componentOnReady(){return n(this).F}};o.N=e[0],m.includes(c)||d.get(c)||(h.push(c),d.define(c,ue(u,o,1)))}))})),h.length>0&&(g&&($.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)}S=!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=pe(e,n),i=he(t,o),r=me(n);f.ael(s,l,i,r),(t.L=t.L||[]).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)}},pe=(e,t)=>8&t?u:e,me=e=>({passive:!!(1&e),capture:!!(2&e)}),de=e=>f.C=e;export{ae as b,T as c,A as h,h as p,l as r,de as s}
|
|
@@ -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-10e16208.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-10e16208.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.22.3 | 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.22.3 | 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,12 @@ 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 = {};
|
|
173
|
+
|
|
174
|
+
// src/utils/helpers.ts
|
|
175
|
+
var isDef = (v) => v != null;
|
|
181
176
|
var isComplexType = (o) => {
|
|
182
177
|
o = typeof o;
|
|
183
178
|
return o === "object" || o === "function";
|
|
@@ -381,7 +376,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
381
376
|
}
|
|
382
377
|
if (!appliedStyles.has(scopeId2)) {
|
|
383
378
|
{
|
|
384
|
-
styleElm =
|
|
379
|
+
styleElm = doc.createElement("style");
|
|
385
380
|
styleElm.innerHTML = style;
|
|
386
381
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
387
382
|
if (nonce != null) {
|
|
@@ -391,10 +386,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
391
386
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
392
387
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
393
388
|
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
|
-
);
|
|
389
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
398
390
|
} else if ("host" in styleContainerNode) {
|
|
399
391
|
if (supportsConstructableStylesheets) {
|
|
400
392
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -412,7 +404,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
412
404
|
styleContainerNode.append(styleElm);
|
|
413
405
|
}
|
|
414
406
|
}
|
|
415
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
407
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
416
408
|
styleContainerNode.insertBefore(styleElm, null);
|
|
417
409
|
}
|
|
418
410
|
}
|
|
@@ -439,18 +431,16 @@ var attachStyles = (hostRef) => {
|
|
|
439
431
|
endAttachStyles();
|
|
440
432
|
};
|
|
441
433
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
442
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
434
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
443
435
|
if (oldValue !== newValue) {
|
|
444
436
|
let isProp = isMemberInElement(elm, memberName);
|
|
445
437
|
let ln = memberName.toLowerCase();
|
|
446
438
|
if (memberName === "class") {
|
|
447
439
|
const classList = elm.classList;
|
|
448
440
|
const oldClasses = parseClassList(oldValue);
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
453
|
-
}
|
|
441
|
+
const newClasses = parseClassList(newValue);
|
|
442
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
443
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
454
444
|
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
455
445
|
if (memberName[2] === "-") {
|
|
456
446
|
memberName = memberName.slice(3);
|
|
@@ -484,7 +474,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
484
474
|
elm.setAttribute(memberName, n);
|
|
485
475
|
}
|
|
486
476
|
}
|
|
487
|
-
} else
|
|
477
|
+
} else {
|
|
488
478
|
elm[memberName] = newValue;
|
|
489
479
|
}
|
|
490
480
|
} catch (e) {
|
|
@@ -506,44 +496,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
506
496
|
}
|
|
507
497
|
};
|
|
508
498
|
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
|
-
};
|
|
499
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
518
500
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
519
501
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
520
502
|
|
|
521
503
|
// src/runtime/vdom/update-element.ts
|
|
522
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
504
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
523
505
|
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$ ||
|
|
506
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
507
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
526
508
|
{
|
|
527
509
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
528
510
|
if (!(memberName in newVnodeAttrs)) {
|
|
529
|
-
setAccessor(
|
|
530
|
-
elm,
|
|
531
|
-
memberName,
|
|
532
|
-
oldVnodeAttrs[memberName],
|
|
533
|
-
void 0,
|
|
534
|
-
isSvgMode2,
|
|
535
|
-
newVnode.$flags$);
|
|
511
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
536
512
|
}
|
|
537
513
|
}
|
|
538
514
|
}
|
|
539
515
|
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$);
|
|
516
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
547
517
|
}
|
|
548
518
|
};
|
|
549
519
|
function sortedAttrNames(attrNames) {
|
|
@@ -555,10 +525,13 @@ function sortedAttrNames(attrNames) {
|
|
|
555
525
|
attrNames
|
|
556
526
|
);
|
|
557
527
|
}
|
|
528
|
+
|
|
529
|
+
// src/runtime/vdom/vdom-render.ts
|
|
530
|
+
var scopeId;
|
|
558
531
|
var hostTagName;
|
|
559
532
|
var useNativeShadowDom = false;
|
|
560
533
|
var isSvgMode = false;
|
|
561
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
534
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
562
535
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
563
536
|
let i2 = 0;
|
|
564
537
|
let elm;
|
|
@@ -572,6 +545,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
572
545
|
{
|
|
573
546
|
updateElement(null, newVNode2, isSvgMode);
|
|
574
547
|
}
|
|
548
|
+
const rootNode = elm.getRootNode();
|
|
549
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
550
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
551
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
552
|
+
}
|
|
575
553
|
if (newVNode2.$children$) {
|
|
576
554
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
577
555
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -697,9 +675,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
697
675
|
if (!isInitialRender) {
|
|
698
676
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
699
677
|
}
|
|
700
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
701
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
702
|
-
}
|
|
703
678
|
return true;
|
|
704
679
|
}
|
|
705
680
|
return false;
|
|
@@ -733,9 +708,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
733
708
|
}
|
|
734
709
|
};
|
|
735
710
|
var insertBefore = (parent, newNode, reference) => {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
}
|
|
711
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
712
|
+
return inserted;
|
|
739
713
|
};
|
|
740
714
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
741
715
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -760,21 +734,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
760
734
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
761
735
|
hostRef.$vnode$ = rootVnode;
|
|
762
736
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
|
|
763
|
-
useNativeShadowDom = supportsShadow
|
|
737
|
+
useNativeShadowDom = supportsShadow ;
|
|
764
738
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
765
739
|
};
|
|
766
740
|
|
|
767
741
|
// src/runtime/update-component.ts
|
|
768
742
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
769
743
|
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
|
-
);
|
|
744
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
778
745
|
}
|
|
779
746
|
};
|
|
780
747
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -803,13 +770,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
803
770
|
{
|
|
804
771
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
805
772
|
if (hostRef.$queuedListeners$) {
|
|
806
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
773
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
807
774
|
hostRef.$queuedListeners$ = void 0;
|
|
808
775
|
}
|
|
809
776
|
}
|
|
810
777
|
}
|
|
811
778
|
{
|
|
812
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"
|
|
779
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
813
780
|
}
|
|
814
781
|
endSchedule();
|
|
815
782
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -902,14 +869,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
902
869
|
}
|
|
903
870
|
};
|
|
904
871
|
var appDidLoad = (who) => {
|
|
872
|
+
{
|
|
873
|
+
addHydratedFlag(doc.documentElement);
|
|
874
|
+
}
|
|
905
875
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
906
876
|
};
|
|
907
|
-
var safeCall = (instance, method, arg
|
|
877
|
+
var safeCall = (instance, method, arg) => {
|
|
908
878
|
if (instance && instance[method]) {
|
|
909
879
|
try {
|
|
910
880
|
return instance[method](arg);
|
|
911
881
|
} catch (e) {
|
|
912
|
-
consoleError(e
|
|
882
|
+
consoleError(e);
|
|
913
883
|
}
|
|
914
884
|
}
|
|
915
885
|
return void 0;
|
|
@@ -952,68 +922,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
952
922
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
953
923
|
members.map(([memberName, [memberFlags]]) => {
|
|
954
924
|
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
925
|
Object.defineProperty(prototype, memberName, {
|
|
926
|
+
get() {
|
|
927
|
+
return getValue(this, memberName);
|
|
928
|
+
},
|
|
976
929
|
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
|
-
}
|
|
930
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
931
|
+
},
|
|
932
|
+
configurable: true,
|
|
933
|
+
enumerable: true
|
|
1017
934
|
});
|
|
1018
935
|
}
|
|
1019
936
|
});
|
|
@@ -1023,7 +940,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1023
940
|
plt.jmp(() => {
|
|
1024
941
|
var _a2;
|
|
1025
942
|
const propName = attrNameToPropName.get(attrName);
|
|
1026
|
-
if (this.hasOwnProperty(propName)
|
|
943
|
+
if (this.hasOwnProperty(propName)) {
|
|
1027
944
|
newValue = this[propName];
|
|
1028
945
|
delete this[propName];
|
|
1029
946
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1043,11 +960,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1043
960
|
}
|
|
1044
961
|
return;
|
|
1045
962
|
}
|
|
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
|
-
}
|
|
963
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1051
964
|
});
|
|
1052
965
|
};
|
|
1053
966
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1076,7 +989,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1076
989
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1077
990
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1078
991
|
if (bundleId) {
|
|
1079
|
-
const CstrImport = loadModule(cmpMeta
|
|
992
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1080
993
|
if (CstrImport && "then" in CstrImport) {
|
|
1081
994
|
const endLoad = uniqueTime();
|
|
1082
995
|
Cstr = await CstrImport;
|
|
@@ -1098,7 +1011,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1098
1011
|
try {
|
|
1099
1012
|
new Cstr(hostRef);
|
|
1100
1013
|
} catch (e) {
|
|
1101
|
-
consoleError(e
|
|
1014
|
+
consoleError(e);
|
|
1102
1015
|
}
|
|
1103
1016
|
{
|
|
1104
1017
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1130,7 +1043,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1130
1043
|
schedule();
|
|
1131
1044
|
}
|
|
1132
1045
|
};
|
|
1133
|
-
var fireConnectedCallback = (instance
|
|
1046
|
+
var fireConnectedCallback = (instance) => {
|
|
1134
1047
|
};
|
|
1135
1048
|
|
|
1136
1049
|
// src/runtime/connected-callback.ts
|
|
@@ -1171,7 +1084,7 @@ var connectedCallback = (elm) => {
|
|
|
1171
1084
|
endConnected();
|
|
1172
1085
|
}
|
|
1173
1086
|
};
|
|
1174
|
-
var disconnectInstance = (instance
|
|
1087
|
+
var disconnectInstance = (instance) => {
|
|
1175
1088
|
};
|
|
1176
1089
|
var disconnectedCallback = async (elm) => {
|
|
1177
1090
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1186,12 +1099,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1186
1099
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1187
1100
|
}
|
|
1188
1101
|
}
|
|
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
1102
|
};
|
|
1196
1103
|
|
|
1197
1104
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1257,17 +1164,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1257
1164
|
}
|
|
1258
1165
|
disconnectedCallback() {
|
|
1259
1166
|
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
1167
|
}
|
|
1272
1168
|
componentOnReady() {
|
|
1273
1169
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1331,7 +1227,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1331
1227
|
}
|
|
1332
1228
|
}
|
|
1333
1229
|
} catch (e) {
|
|
1334
|
-
consoleError(e
|
|
1230
|
+
consoleError(e);
|
|
1335
1231
|
}
|
|
1336
1232
|
};
|
|
1337
1233
|
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-10e16208.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|