@everymatrix/bonus-pagination-nav 1.55.0 → 1.56.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-22747bba.js +2 -0
- package/dist/bonus-pagination-nav/p-f089fb89.entry.js +1 -0
- package/dist/cjs/bonus-pagination-nav.cjs.entry.js +33 -3
- package/dist/cjs/bonus-pagination-nav.cjs.js +2 -2
- package/dist/cjs/{index-10e16208.js → index-de67c104.js} +167 -63
- 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 +54 -2
- package/dist/esm/bonus-pagination-nav.entry.js +33 -3
- package/dist/esm/bonus-pagination-nav.js +3 -3
- package/dist/esm/{index-94427c87.js → index-bbf5341c.js} +167 -63
- package/dist/esm/loader.js +2 -2
- 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 +2 -0
- 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 +2 -0
- package/package.json +1 -1
- package/dist/bonus-pagination-nav/p-493062dd.entry.js +0 -1
- package/dist/bonus-pagination-nav/p-8bf2c2f3.js +0 -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 +0 -2
- 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 +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/bonus-pagination-nav/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/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-22747bba.js";export{s as setNonce}from"./p-22747bba.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-f089fb89",[[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 t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),l=(t,n)=>{e.set(n.t=t,n)},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),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:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],y=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.l?w($):f.raf($))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(m),b(y),(p=m.length>0)&&f.raf($)},w=t=>h().then(t),S=v(y,!0),g=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,l;return null!=(l=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((e,n)=>{for(var l in n)t(e,l,{get:n[l],enumerable:!0})})({},{err:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>P});var O=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function E(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return k(t.value);throw"should never get here"}var C,M=t=>{if(t.isOk)return t.value;throw t.value},P=t=>{if(t.isErr)return t.value;throw t.value},x=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!g(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?R(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=R(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=o,u},R=(t,e)=>({l:0,m:t,i:e,v:null,h:null,u:null,p:null}),A={},N=(t,e)=>null==t||g(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t,T=(t,e,l)=>{const o=(t=>n(t).$hostElement$)(t);return{emit:t=>F(o,e,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:t})}},F=(t,e,n)=>{const l=f.ce(e,n);return t.dispatchEvent(l),l},H=new WeakMap,W=t=>"sc-"+t.$,D=(t,e,n,l,s,i)=>{if(n!==l){let r=o(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=U(n);let s=U(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(r||"o"!==e[0]||"n"!==e[1]){const o=g(l);if((r||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!o&&t.setAttribute(e,l=!0===l?"":l)}else if(e="-"===e[2]?e.slice(3):o(u,c)?c.slice(2):c[2]+e.slice(3),n||l){const o=e.endsWith(V);e=e.replace(q,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}}},L=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(L):[]),V="Capture",q=RegExp(V+"$"),G=(t,e,n)=>{const l=11===e.v.nodeType&&e.v.host?e.v.host:e.v,o=t&&t.u||{},s=e.u||{};for(const t of _(Object.keys(o)))t in s||D(l,t,o[t],void 0,n,e.l);for(const t of _(Object.keys(s)))D(l,t,o[t],s[t],n,e.l)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var z=!1,B=(t,e,n)=>{const l=e.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),G(null,l,z),l.h)for(i=0;i<l.h.length;++i)s=B(t,l,i),s&&o.appendChild(s);return o["s-hn"]=C,o},I=(t,e,n,l,o,s)=>{let i,r=t;for(;o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].v=i,X(r,i,e)))},J=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.v;t&&t.remove()}}},K=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),Q=(t,e,n=!1)=>{const l=e.v=t.v,o=t.h,s=e.h,i=e.i;null===i?(G(t,e,z),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],p=l.length-1,m=l[0],y=l[p];for(;r<=f&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(K(h,m,o))Q(h,m,o),h=e[++r],m=l[++c];else if(K(d,y,o))Q(d,y,o),d=e[--f],y=l[--p];else if(K(h,y,o))Q(h,y,o),X(t,h.v,d.v.nextSibling),h=e[++r],y=l[--p];else if(K(d,m,o))Q(d,m,o),X(t,d.v,h.v),d=e[--f],m=l[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=B(e&&e[c],n,u):(Q(i,m,o),e[u]=void 0,s=i.v),m=l[++c]):(s=B(e&&e[c],n,c),m=l[++c]),s&&X(h.v.parentNode,s,h.v)}r>f?I(t,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&J(e,r,f)})(l,o,e,s,n):null!==s?(null!==t.i&&(l.textContent=""),I(l,null,e,s,0,s.length-1)):!n&&null!==o&&J(o,0,o.length-1)):t.i!==i&&(l.data=i)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.S=()=>{e["s-p"].splice(n-1,1),l()})))}},Z=(t,e)=>{if(t.l|=16,!(4&t.l))return Y(t,t.j),S((()=>tt(t,e)));t.l|=512},tt=(t,e)=>{const n=t.$hostElement$,l=t.t;if(!l)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return e&&(t.l|=256,t.O&&(t.O.map((([t,e])=>rt(l,t,e,n))),t.O=void 0)),o=et(o,(()=>rt(l,"componentWillRender",void 0,n))),et(o,(()=>lt(t,l,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,lt=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.k;((t,e)=>{var n;const l=W(e),o=r.get(l);if(t=11===t.nodeType?t:a,o)if("string"==typeof o){let s,i=H.get(t=t.head||t);if(i||H.set(t,i=new Set),!i.has(l)){{s=document.querySelector(`[sty-id="${l}"]`)||a.createElement("style"),s.innerHTML=o;const i=null!=(n=f.C)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(o),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(s)}else t.append(s);1&e.l&&t.insertBefore(s,null)}4&e.l&&(s.innerHTML+=c),i&&i.add(l)}}else t.adoptedStyleSheets.includes(o)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,o])})(t.$hostElement$.getRootNode(),e)})(t);ot(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},ot=(t,e,n,l)=>{try{e=e.render(),t.l&=-17,t.l|=2,((t,e,n=!1)=>{const l=t.$hostElement$,o=t.k,s=t.M||R(null,null),i=(t=>t&&t.m===A)(e)?e:x(null,null,e);if(C=l.tagName,o.P&&(i.u=i.u||{},o.P.map((([t,e])=>i.u[e]=l[t]))),n&&i.u)for(const t of Object.keys(i.u))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=l[t]);i.m=null,i.l|=4,t.M=i,i.v=s.v=l,Q(s,i,n)})(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.j;64&t.l||(t.l|=64,ct(e),t.R(e),n||it()),t.S&&(t.S(),t.S=void 0),512&t.l&&w((()=>Z(t,!1))),t.l&=-517},it=()=>{w((()=>F(u,"appload",{detail:{namespace:"bonus-pagination-nav"}})))},rt=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,l,o)=>{const s=n(t);if(!s)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.A.get(e),r=s.l,c=s.t;l=N(l,o.N[e][0]),8&r&&void 0!==i||l===i||Number.isNaN(i)&&Number.isNaN(l)||(s.A.set(e,l),c&&2==(18&r)&&Z(s,!1))},at=(t,e,l)=>{var o,s;const i=t.prototype;if(e.N){const r=Object.entries(null!=(o=e.N)?o:{});if(r.map((([t,[o]])=>{if(31&o||2&l&&32&o){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.N[t][0]|=2048),r&&(e.N[t][0]|=4096),(1&l||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.N[t][0]))return((t,e)=>n(this).A.get(e))(0,t);const l=n(this),o=l?l.t:i;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&o?this[t]:i.$hostElement$[t];return void 0===n&&i.A.get(t)?s=i.A.get(t):!i.A.get(t)&&n&&i.A.set(t,n),r.call(this,N(s,o)),void ut(this,t,s=32&o?this[t]:i.$hostElement$[t],e)}{if(!(1&l&&4096&e.N[t][0]))return ut(this,t,s,e),void(1&l&&!i.t&&i.T.then((()=>{4096&e.N[t][0]&&i.t[t]!==i.A.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.A.get(t)&&n&&i.A.set(t,n),i.t[t]=N(s,o),ut(this,t,i.t[t],e)};i.t?n():i.T.then((()=>n()))}}})}})),1&l){const l=new Map;i.attributeChangedCallback=function(t,o,s){f.jmp((()=>{var r;const c=l.get(t);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=e.F)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,o,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.F)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var o;const s=n[1]||t;return l.set(s,t),512&n[0]&&(null==(o=e.P)||o.push([t,s])),s}))]))}}return t},ft=(t,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),b=a.createElement("style"),$=[];let w,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(t.map((t=>{t[1].map((l=>{const o={l:l[0],$:l[1],N:l[2],H:l[3]};4&o.l&&(g=!0),o.N=l[2],o.H=l[3],o.P=[];const c=o.$,u=class extends HTMLElement{constructor(t){super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const l={l:0,$hostElement$:t,k:n,A:new Map};l.T=new Promise((t=>l.R=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,l)})(t=this,o)}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,ht(this,t,o.H)),w&&(clearTimeout(w),w=null),S?$.push(this):f.jmp((()=>(t=>{if(!(1&f.l)){const e=n(t),l=e.k,o=()=>{};if(1&e.l)ht(t,e,l.H),(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}));else{e.l|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.j=n);break}}l.N&&Object.entries(l.N).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let l;if(!(32&e.l)){if(e.l|=32,n.W){const o=((t,e)=>{const n=t.$.replace(/-/g,"_"),l=t.W;if(!l)return;const o=i.get(l);return o?o[n]:import(`./${l}.entry.js`).then((t=>(i.set(l,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(o&&"then"in o){const t=()=>{};l=await o,t()}else l=o;if(!l)throw Error(`Constructor for "${n.$}#${e.D}" was not found`);l.isProxied||(at(l,n,2),l.isProxied=!0);const r=()=>{};e.l|=8;try{new l(e)}catch(e){s(e,t)}e.l&=-9,r()}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=W(n);if(!r.has(e)){const l=()=>{};((t,e,n)=>{let l=r.get(t);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,r.set(t,l)})(e,t,!!(1&n.l)),l()}}}const o=e.j,c=()=>Z(e,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(t,e,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.l)){const e=n(t);e.L&&(e.L.map((t=>t())),e.L=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}))}H.has(t)&&H.delete(t),t.shadowRoot&&H.has(t.shadowRoot)&&H.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),l=$.findIndex((t=>t===this));l>-1&&$.splice(l,1),(null==(t=null==e?void 0:e.M)?void 0:t.v)instanceof Node&&!e.M.v.isConnected&&delete e.M.v}))}componentOnReady(){return n(this).T}};o.W=t[0],p.includes(c)||m.get(c)||(h.push(c),m.define(c,at(u,o,1)))}))})),h.length>0&&(g&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const t=null!=(o=f.C)?o:j(a);null!=t&&b.setAttribute("nonce",t),y.insertBefore(b,v?v.nextSibling:y.firstChild)}S=!1,$.length?$.map((t=>t.connectedCallback())):f.jmp((()=>w=setTimeout(it,30)))},ht=(t,e,n)=>{n&&n.map((([n,l,o])=>{const s=pt(t,n),i=dt(e,o),r=mt(n);f.ael(s,l,i,r),(e.L=e.L||[]).push((()=>f.rel(s,l,i,r)))}))},dt=(t,e)=>n=>{var l;try{256&t.l?null==(l=t.t)||l[e](n):(t.O=t.O||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},pt=(t,e)=>8&e?u:t,mt=t=>({passive:!!(1&t),capture:!!(2&t)}),yt=t=>f.C=t;export{ft as b,T as c,x as h,h as p,l as r,yt as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as a}from"./p-22747bba.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.navItemAccount=5,this.endPageIndex=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-de67c104.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const SUPPORTED_LANGUAGES = ['pt-br', 'en', 'es-mx', 'hu', 'hr'];
|
|
@@ -62,19 +62,49 @@ 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
|
+
*/
|
|
65
68
|
this.total = 1;
|
|
69
|
+
/**
|
|
70
|
+
* The received limit for the number of pages
|
|
71
|
+
*/
|
|
66
72
|
this.limit = 10;
|
|
73
|
+
/**
|
|
74
|
+
* The offset of dataset
|
|
75
|
+
*/
|
|
67
76
|
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
|
+
*/
|
|
68
81
|
this.tableId = 'default';
|
|
82
|
+
/**
|
|
83
|
+
* Language
|
|
84
|
+
*/
|
|
69
85
|
this.language = 'en';
|
|
86
|
+
/**
|
|
87
|
+
* Translation via url
|
|
88
|
+
*/
|
|
70
89
|
this.translationUrl = '';
|
|
90
|
+
/**
|
|
91
|
+
* Customize pagination: Activate pagination arrows
|
|
92
|
+
*/
|
|
71
93
|
this.arrowsActive = true;
|
|
94
|
+
/**
|
|
95
|
+
* Customize pagination: Activate pagination secondary arrows
|
|
96
|
+
*/
|
|
72
97
|
this.secondaryArrowsActive = true;
|
|
98
|
+
/**
|
|
99
|
+
* Customize pagination: Activate pagination numbered navigation
|
|
100
|
+
*/
|
|
73
101
|
this.displayPageNumbers = true;
|
|
74
|
-
|
|
102
|
+
/**
|
|
103
|
+
* The Nav Items count for the pagination, default: 5
|
|
104
|
+
* the value should be Odd, 5, 7
|
|
105
|
+
*/
|
|
75
106
|
this.navItemAccount = 5;
|
|
76
107
|
this.endPageIndex = 0;
|
|
77
|
-
this.pagesArray = undefined;
|
|
78
108
|
this.currentPage = 1;
|
|
79
109
|
this.showAsEllipsisMid = !this.arrowsActive;
|
|
80
110
|
}
|
|
@@ -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-de67c104.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.26.0 | 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,19 +21,23 @@ 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, 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 };
|
|
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, modernPropertyDecls: 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.26.0 | 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
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
88
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
89
|
/* webpackMode: "lazy" */
|
|
85
90
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
91
|
+
)); }).then(
|
|
92
|
+
(importedModule) => {
|
|
93
|
+
{
|
|
94
|
+
cmpModules.set(bundleId, importedModule);
|
|
95
|
+
}
|
|
96
|
+
return importedModule[exportName];
|
|
97
|
+
},
|
|
98
|
+
(e) => {
|
|
99
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
101
|
+
);
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
// src/client/client-style.ts
|
|
95
105
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
107
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
108
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
109
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -167,12 +178,6 @@ var flush = () => {
|
|
|
167
178
|
};
|
|
168
179
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
169
180
|
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;
|
|
176
181
|
var isComplexType = (o) => {
|
|
177
182
|
o = typeof o;
|
|
178
183
|
return o === "object" || o === "function";
|
|
@@ -376,7 +381,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
376
381
|
}
|
|
377
382
|
if (!appliedStyles.has(scopeId2)) {
|
|
378
383
|
{
|
|
379
|
-
styleElm = doc.createElement("style");
|
|
384
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
380
385
|
styleElm.innerHTML = style;
|
|
381
386
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
382
387
|
if (nonce != null) {
|
|
@@ -386,7 +391,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
386
391
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
387
392
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
388
393
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
389
|
-
styleContainerNode.insertBefore(
|
|
394
|
+
styleContainerNode.insertBefore(
|
|
395
|
+
styleElm,
|
|
396
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
397
|
+
);
|
|
390
398
|
} else if ("host" in styleContainerNode) {
|
|
391
399
|
if (supportsConstructableStylesheets) {
|
|
392
400
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -404,7 +412,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
404
412
|
styleContainerNode.append(styleElm);
|
|
405
413
|
}
|
|
406
414
|
}
|
|
407
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
415
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
408
416
|
styleContainerNode.insertBefore(styleElm, null);
|
|
409
417
|
}
|
|
410
418
|
}
|
|
@@ -431,16 +439,18 @@ var attachStyles = (hostRef) => {
|
|
|
431
439
|
endAttachStyles();
|
|
432
440
|
};
|
|
433
441
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
434
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
442
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
435
443
|
if (oldValue !== newValue) {
|
|
436
444
|
let isProp = isMemberInElement(elm, memberName);
|
|
437
445
|
let ln = memberName.toLowerCase();
|
|
438
446
|
if (memberName === "class") {
|
|
439
447
|
const classList = elm.classList;
|
|
440
448
|
const oldClasses = parseClassList(oldValue);
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
449
|
+
let newClasses = parseClassList(newValue);
|
|
450
|
+
{
|
|
451
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
452
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
453
|
+
}
|
|
444
454
|
} else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
445
455
|
if (memberName[2] === "-") {
|
|
446
456
|
memberName = memberName.slice(3);
|
|
@@ -474,7 +484,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
474
484
|
elm.setAttribute(memberName, n);
|
|
475
485
|
}
|
|
476
486
|
}
|
|
477
|
-
} else {
|
|
487
|
+
} else if (elm[memberName] !== newValue) {
|
|
478
488
|
elm[memberName] = newValue;
|
|
479
489
|
}
|
|
480
490
|
} catch (e) {
|
|
@@ -496,24 +506,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
496
506
|
}
|
|
497
507
|
};
|
|
498
508
|
var parseClassListRegex = /\s/;
|
|
499
|
-
var parseClassList = (value) =>
|
|
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
|
+
};
|
|
500
518
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
501
519
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
502
520
|
|
|
503
521
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
522
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
505
523
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
506
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
507
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
524
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
525
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
508
526
|
{
|
|
509
527
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
528
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
529
|
+
setAccessor(
|
|
530
|
+
elm,
|
|
531
|
+
memberName,
|
|
532
|
+
oldVnodeAttrs[memberName],
|
|
533
|
+
void 0,
|
|
534
|
+
isSvgMode2,
|
|
535
|
+
newVnode.$flags$);
|
|
512
536
|
}
|
|
513
537
|
}
|
|
514
538
|
}
|
|
515
539
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
516
|
-
setAccessor(
|
|
540
|
+
setAccessor(
|
|
541
|
+
elm,
|
|
542
|
+
memberName,
|
|
543
|
+
oldVnodeAttrs[memberName],
|
|
544
|
+
newVnodeAttrs[memberName],
|
|
545
|
+
isSvgMode2,
|
|
546
|
+
newVnode.$flags$);
|
|
517
547
|
}
|
|
518
548
|
};
|
|
519
549
|
function sortedAttrNames(attrNames) {
|
|
@@ -525,13 +555,10 @@ function sortedAttrNames(attrNames) {
|
|
|
525
555
|
attrNames
|
|
526
556
|
);
|
|
527
557
|
}
|
|
528
|
-
|
|
529
|
-
// src/runtime/vdom/vdom-render.ts
|
|
530
|
-
var scopeId;
|
|
531
558
|
var hostTagName;
|
|
532
559
|
var useNativeShadowDom = false;
|
|
533
560
|
var isSvgMode = false;
|
|
534
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
561
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
535
562
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
536
563
|
let i2 = 0;
|
|
537
564
|
let elm;
|
|
@@ -545,11 +572,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
545
572
|
{
|
|
546
573
|
updateElement(null, newVNode2, isSvgMode);
|
|
547
574
|
}
|
|
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
|
-
}
|
|
553
575
|
if (newVNode2.$children$) {
|
|
554
576
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
555
577
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -675,6 +697,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
675
697
|
if (!isInitialRender) {
|
|
676
698
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
677
699
|
}
|
|
700
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
701
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
702
|
+
}
|
|
678
703
|
return true;
|
|
679
704
|
}
|
|
680
705
|
return false;
|
|
@@ -708,8 +733,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
708
733
|
}
|
|
709
734
|
};
|
|
710
735
|
var insertBefore = (parent, newNode, reference) => {
|
|
711
|
-
|
|
712
|
-
|
|
736
|
+
{
|
|
737
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
738
|
+
}
|
|
713
739
|
};
|
|
714
740
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
715
741
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -734,14 +760,21 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
734
760
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
735
761
|
hostRef.$vnode$ = rootVnode;
|
|
736
762
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
|
|
737
|
-
useNativeShadowDom = supportsShadow
|
|
763
|
+
useNativeShadowDom = supportsShadow ;
|
|
738
764
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
739
765
|
};
|
|
740
766
|
|
|
741
767
|
// src/runtime/update-component.ts
|
|
742
768
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
743
769
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
744
|
-
ancestorComponent["s-p"].push(
|
|
770
|
+
const index = ancestorComponent["s-p"].push(
|
|
771
|
+
new Promise(
|
|
772
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
773
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
774
|
+
r();
|
|
775
|
+
}
|
|
776
|
+
)
|
|
777
|
+
);
|
|
745
778
|
}
|
|
746
779
|
};
|
|
747
780
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -770,13 +803,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
770
803
|
{
|
|
771
804
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
772
805
|
if (hostRef.$queuedListeners$) {
|
|
773
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
806
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
774
807
|
hostRef.$queuedListeners$ = void 0;
|
|
775
808
|
}
|
|
776
809
|
}
|
|
777
810
|
}
|
|
778
811
|
{
|
|
779
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
812
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
780
813
|
}
|
|
781
814
|
endSchedule();
|
|
782
815
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -869,17 +902,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
869
902
|
}
|
|
870
903
|
};
|
|
871
904
|
var appDidLoad = (who) => {
|
|
872
|
-
{
|
|
873
|
-
addHydratedFlag(doc.documentElement);
|
|
874
|
-
}
|
|
875
905
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
876
906
|
};
|
|
877
|
-
var safeCall = (instance, method, arg) => {
|
|
907
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
878
908
|
if (instance && instance[method]) {
|
|
879
909
|
try {
|
|
880
910
|
return instance[method](arg);
|
|
881
911
|
} catch (e) {
|
|
882
|
-
consoleError(e);
|
|
912
|
+
consoleError(e, elm);
|
|
883
913
|
}
|
|
884
914
|
}
|
|
885
915
|
return void 0;
|
|
@@ -922,15 +952,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
922
952
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
923
953
|
members.map(([memberName, [memberFlags]]) => {
|
|
924
954
|
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
|
+
}
|
|
925
975
|
Object.defineProperty(prototype, memberName, {
|
|
926
|
-
get() {
|
|
927
|
-
return getValue(this, memberName);
|
|
928
|
-
},
|
|
929
976
|
set(newValue) {
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
977
|
+
const ref = getHostRef(this);
|
|
978
|
+
if (origSetter) {
|
|
979
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
980
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
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
|
+
}
|
|
934
1017
|
});
|
|
935
1018
|
}
|
|
936
1019
|
});
|
|
@@ -940,7 +1023,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
940
1023
|
plt.jmp(() => {
|
|
941
1024
|
var _a2;
|
|
942
1025
|
const propName = attrNameToPropName.get(attrName);
|
|
943
|
-
if (this.hasOwnProperty(propName)) {
|
|
1026
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
944
1027
|
newValue = this[propName];
|
|
945
1028
|
delete this[propName];
|
|
946
1029
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -960,7 +1043,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
960
1043
|
}
|
|
961
1044
|
return;
|
|
962
1045
|
}
|
|
963
|
-
|
|
1046
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1047
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1048
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1049
|
+
this[propName] = newValue;
|
|
1050
|
+
}
|
|
964
1051
|
});
|
|
965
1052
|
};
|
|
966
1053
|
Cstr.observedAttributes = Array.from(
|
|
@@ -989,7 +1076,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
989
1076
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
990
1077
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
991
1078
|
if (bundleId) {
|
|
992
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1079
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
993
1080
|
if (CstrImport && "then" in CstrImport) {
|
|
994
1081
|
const endLoad = uniqueTime();
|
|
995
1082
|
Cstr = await CstrImport;
|
|
@@ -1011,7 +1098,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1011
1098
|
try {
|
|
1012
1099
|
new Cstr(hostRef);
|
|
1013
1100
|
} catch (e) {
|
|
1014
|
-
consoleError(e);
|
|
1101
|
+
consoleError(e, elm);
|
|
1015
1102
|
}
|
|
1016
1103
|
{
|
|
1017
1104
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1043,7 +1130,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1043
1130
|
schedule();
|
|
1044
1131
|
}
|
|
1045
1132
|
};
|
|
1046
|
-
var fireConnectedCallback = (instance) => {
|
|
1133
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1047
1134
|
};
|
|
1048
1135
|
|
|
1049
1136
|
// src/runtime/connected-callback.ts
|
|
@@ -1084,7 +1171,7 @@ var connectedCallback = (elm) => {
|
|
|
1084
1171
|
endConnected();
|
|
1085
1172
|
}
|
|
1086
1173
|
};
|
|
1087
|
-
var disconnectInstance = (instance) => {
|
|
1174
|
+
var disconnectInstance = (instance, elm) => {
|
|
1088
1175
|
};
|
|
1089
1176
|
var disconnectedCallback = async (elm) => {
|
|
1090
1177
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1099,6 +1186,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1099
1186
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1100
1187
|
}
|
|
1101
1188
|
}
|
|
1189
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1190
|
+
rootAppliedStyles.delete(elm);
|
|
1191
|
+
}
|
|
1192
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1193
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1194
|
+
}
|
|
1102
1195
|
};
|
|
1103
1196
|
|
|
1104
1197
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1164,6 +1257,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1164
1257
|
}
|
|
1165
1258
|
disconnectedCallback() {
|
|
1166
1259
|
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
|
+
});
|
|
1167
1271
|
}
|
|
1168
1272
|
componentOnReady() {
|
|
1169
1273
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1227,7 +1331,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1227
1331
|
}
|
|
1228
1332
|
}
|
|
1229
1333
|
} catch (e) {
|
|
1230
|
-
consoleError(e);
|
|
1334
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1231
1335
|
}
|
|
1232
1336
|
};
|
|
1233
1337
|
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-de67c104.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|