smoothly 0.3.60 → 0.3.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Listenable-fcea5136.js → Listenable-e157f34c.js} +6 -5
- package/dist/cjs/{index-8352a4e0.js → index-48630c3c.js} +3 -0
- package/dist/cjs/{index-679a68de.js → index-5c256daf.js} +1 -1
- package/dist/cjs/index.cjs.js +11 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-country.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -2
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/model/Listenable.js +6 -5
- package/dist/collection/model/StateBase.js +7 -0
- package/dist/collection/model/index.js +1 -0
- package/dist/custom-elements/index.js +14 -6
- package/dist/esm/{Listenable-10f48463.js → Listenable-afd6cd7e.js} +6 -5
- package/dist/esm/{index-990cc22d.js → index-62de77e7.js} +1 -1
- package/dist/esm/{index-7b57a52c.js → index-e9e4cadb.js} +3 -1
- package/dist/esm/index.js +12 -5
- package/dist/esm/loader.js +2 -2
- package/dist/esm/smoothly-accordion_53.entry.js +3 -3
- package/dist/esm/smoothly-country.entry.js +1 -1
- package/dist/esm/smoothly-google-font.entry.js +1 -1
- package/dist/esm/smoothly-radio-group.entry.js +1 -1
- package/dist/esm/smoothly-reorder.entry.js +2 -2
- package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
- package/dist/esm/smoothly-trigger-source.entry.js +2 -2
- package/dist/esm/smoothly.js +2 -2
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/{p-bb57ff51.js → p-05154935.js} +1 -1
- package/dist/smoothly/{p-c5509d64.entry.js → p-46dcb025.entry.js} +1 -1
- package/dist/smoothly/p-4f3b0e6d.entry.js +1 -0
- package/dist/smoothly/{p-43eb7034.entry.js → p-6e017bc2.entry.js} +1 -1
- package/dist/smoothly/{p-675a8d09.js → p-73bcae40.js} +1 -1
- package/dist/smoothly/{p-0ed63b7b.entry.js → p-b3d699d2.entry.js} +1 -1
- package/dist/smoothly/{p-a19a824a.entry.js → p-cab954af.entry.js} +1 -1
- package/dist/smoothly/{p-ab11639c.entry.js → p-ccd08c26.entry.js} +1 -1
- package/dist/smoothly/{p-c88ae468.js → p-e5d867e5.js} +2 -2
- package/dist/smoothly/{p-5fb08944.entry.js → p-fe4520be.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model/Listenable.d.ts +10 -3
- package/dist/types/model/StateBase.d.ts +6 -0
- package/dist/types/model/index.d.ts +2 -1
- package/package.json +1 -1
- package/dist/smoothly/p-607abd83.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as i}from"./p-
|
|
1
|
+
import{r as s,h as i}from"./p-e5d867e5.js";import{T as t,M as r}from"./p-05154935.js";import"./p-bd478a53.js";const o=class{constructor(i){s(this,i),this.context=void 0,this.destination=void 0,this.filter=void 0}get filters(){return this.filtersValue||(this.filtersValue=this.filter?this.filter.split(" "):[]),this.filtersValue}TriggerListener(s){t.is(s.detail)&&this.filters.some((i=>i==s.detail.name))&&(r.send(this.destination,s.detail,this.context||window),s.preventDefault(),s.stopPropagation())}render(){return i("slot",null)}};o.style=".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";export{o as smoothly_trigger_sink}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e,t,n,l=!1,o=!1,s=!1,i=!1,r=null,c=!1;const f="http://www.w3.org/1999/xlink",u={},a=e=>"object"==(e=typeof e)||"function"===e;function d(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const $=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!a(l))&&(l+=""),i&&r?c[c.length-1].t+=l:c.push(i?h(null,l):l),r=i)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,p);const u=h(e,null);return u.l=t,c.length>0&&(u.o=c),u.i=o,u.u=s,u},h=(e,t)=>({$:0,h:e,t,m:null,o:null,l:null,i:null,u:null}),m={},p={forEach:(e,t)=>e.map(y).forEach(t),map:(e,t)=>e.map(y).map(t).map(b)},y=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.h,vtext:e.t}),b=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),$(e.vtag,t,...e.vchildren||[])}const t=h(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},v=e=>ie(e).p,w=(e,t,n)=>{const l=v(e);return{emit:e=>g(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},g=(e,t,n)=>{const l=pe.ce(t,n);return e.dispatchEvent(l),l},k=new WeakMap,j=e=>"sc-"+e.v,S=(e,t,n,l,o,s)=>{if(n!==l){let i=fe(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=M(n),s=M(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const c=a(l);if((i||c&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let u=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,u=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(f,t):e.removeAttribute(t)):(!i||4&s||o)&&!c&&(l=!0===l?"":l,u?e.setAttributeNS(f,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):fe(he,r)?r.slice(2):r[2]+t.slice(3),n&&pe.rel(e,t,n,!1),l&&pe.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],x=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||u,i=t.l||u;for(l in s)l in i||S(o,l,s[l],void 0,n,t.$);for(l in i)S(o,l,s[l],i[l],n,t.$)},C=(o,r,c,f)=>{const u=r.o[c];let a,d,$,h=0;if(l||(s=!0,"slot"===u.h&&(e&&f.classList.add(e+"-s"),u.$|=u.o?2:1)),null!==u.t)a=u.m=me.createTextNode(u.t);else if(1&u.$)a=u.m=me.createTextNode("");else{if(i||(i="svg"===u.h),a=u.m=me.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&u.$?"slot-fb":u.h),i&&"foreignObject"===u.h&&(i=!1),x(null,u,i),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),u.o)for(h=0;h<u.o.length;++h)d=C(o,u,h,a),d&&a.appendChild(d);"svg"===u.h?i=!1:"foreignObject"===a.tagName&&(i=!0)}return a["s-hn"]=n,3&u.$&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=u.u||"",$=o&&o.o&&o.o[c],$&&$.h===u.h&&o.m&&R(o.m,!1)),a},R=(e,t)=>{pe.$|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(N(o).insertBefore(o,L(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&R(o,t)}pe.$&=-2},P=(e,t,l,o,s,i)=>{let r,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=C(null,l,s,e),r&&(o[s].m=r,c.insertBefore(r,L(t))))},T=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,U(l),o=!0,s["s-ol"]?s["s-ol"].remove():R(s,!0),s.remove())},E=(e,t)=>e.h===t.h&&("slot"===e.h?e.u===t.u:e.i===t.i),L=e=>e&&e["s-ol"]||e,N=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.h,r=t.t;let c;null===r?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||x(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,u=t.length-1,a=t[0],d=t[u],$=l.length-1,h=l[0],m=l[$];for(;i<=u&&r<=$;)if(null==a)a=t[++i];else if(null==d)d=t[--u];else if(null==h)h=l[++r];else if(null==m)m=l[--$];else if(E(a,h))W(a,h),a=t[++i],h=l[++r];else if(E(d,m))W(d,m),d=t[--u],m=l[--$];else if(E(a,m))"slot"!==a.h&&"slot"!==m.h||R(a.m.parentNode,!1),W(a,m),e.insertBefore(a.m,d.m.nextSibling),a=t[++i],m=l[--$];else if(E(d,h))"slot"!==a.h&&"slot"!==m.h||R(d.m.parentNode,!1),W(d,h),e.insertBefore(d.m,a.m),d=t[--u],h=l[++r];else{for(c=-1,f=i;f<=u;++f)if(t[f]&&null!==t[f].i&&t[f].i===h.i){c=f;break}c>=0?(s=t[c],s.h!==h.h?o=C(t&&t[r],n,c,e):(W(s,h),t[c]=void 0,o=s.m),h=l[++r]):(o=C(t&&t[r],n,r,e),h=l[++r]),o&&N(a.m).insertBefore(o,L(a.m))}i>u?P(e,null==l[$+1]?null:l[$+1].m,n,l,r,$):r>$&&T(t,i,u)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),P(n,null,t,o,0,o.length-1)):null!==l&&T(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(c=n["s-cr"])?c.parentNode.textContent=r:e.t!==r&&(n.data=r)},A=e=>{const t=e.childNodes;let n,l,o,s,i,r;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(r=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===r&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===r||3===r&&""!==t[s].textContent.trim()){n.hidden=!0;break}A(n)}},D=[],F=e=>{let t,n,l,s,i,r,c=0;const f=e.childNodes,u=f.length;for(;c<u;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],r=l.length-1;r>=0;r--)n=l[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(H(n,s)?(i=D.find((e=>e.g===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:D.push({k:t,g:n}),n["s-sr"]&&D.map((e=>{H(e.g,n["s-sn"])&&(i=D.find((e=>e.g===n)),i&&!e.k&&(e.k=i.k))}))):D.some((e=>e.g===n))||D.push({g:n}));1===t.nodeType&&F(t)}},H=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,U=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(U)},q=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},V=(e,t)=>{if(e.$|=16,!(4&e.$))return q(e,e.S),Oe((()=>_(e,t)));e.$|=512},_=(e,t)=>{const n=e.O;let l;return t&&(e.$|=256,e.M&&(e.M.map((([e,t])=>Q(n,e,t))),e.M=null),l=Q(n,"componentWillLoad")),X(l,(()=>z(e,n,t)))},z=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.C,n=e.p,l=t.$,o=((e,t)=>{var n;let l=j(t);const o=$e.get(l);if(e=11===e.nodeType?e:me,o)if("string"==typeof o){let t,s=k.get(e=e.head||e);if(s||k.set(e,s=new Set),!s.has(l)){{t=me.createElement("style"),t.innerHTML=o;const l=null!==(n=pe.R)&&void 0!==n?n:d(me);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);B(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>I(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},B=(i,c)=>{try{r=c,c=c.render&&c.render(),i.$&=-17,i.$|=2,((i,r)=>{const c=i.p,f=i.C,u=i.P||h(null,null),a=(e=>e&&e.h===m)(r)?r:$(null,null,r);if(n=c.tagName,f.T&&(a.l=a.l||{},f.T.map((([e,t])=>a.l[t]=c[e]))),a.h=null,a.$|=4,i.P=a,a.m=u.m=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&f.$),o=!1,W(u,a),pe.$|=1,s){let e,t,n,l,o,s;F(a.m);let i=0;for(;i<D.length;i++)e=D[i],t=e.g,t["s-ol"]||(n=me.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<D.length;i++)if(e=D[i],t=e.g,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&A(a.m),pe.$&=-2,D.length=0})(i,c)}catch(e){ue(e,i.p)}return r=null,null},G=()=>r,I=e=>{const t=e.p,n=e.O,l=e.S;Q(n,"componentDidRender"),64&e.$||(e.$|=64,Y(t),Q(n,"componentDidLoad"),e.L(t),l||K()),e.N(t),e.j&&(e.j(),e.j=void 0),512&e.$&&Se((()=>V(e,!1))),e.$&=-517},J=e=>{{const t=ie(e),n=t.p.isConnected;return n&&2==(18&t.$)&&V(t,!1),n}},K=()=>{Y(me.documentElement),Se((()=>g(he,"appload",{detail:{namespace:"smoothly"}})))},Q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ue(e)}},X=(e,t)=>e&&e.then?e.then(t):t(),Y=e=>e.classList.add("hydrated"),Z=(e,t,n)=>{if(t.W){e.watchers&&(t.A=e.watchers);const l=Object.entries(t.W),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>ie(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ie(e),s=o.p,i=o.D.get(t),r=o.$,c=o.O;if(n=((e,t)=>null==e||a(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),c)){if(l.A&&128&r){const e=l.A[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ue(e,s)}}))}2==(18&r)&&V(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=ie(this);return n.F.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){pe.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},ee=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=he.customElements,i=me.head,r=i.querySelector("meta[charset]"),c=me.createElement("style"),f=[];let u,a=!0;Object.assign(pe,t),pe.H=new URL(t.resourcesUrl||"./",me.baseURI).href,e.map((e=>{e[1].map((t=>{const n={$:t[0],v:t[1],W:t[2],U:t[3]};n.W=t[2],n.U=t[3],n.T=[],n.A={};const i=n.v,r=class extends HTMLElement{constructor(e){super(e),ce(e=this,n),1&n.$&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?f.push(this):pe.jmp((()=>(e=>{if(0==(1&pe.$)){const t=ie(e),n=t.C,l=()=>{};if(1&t.$)te(e,t,n.U);else{t.$|=1,12&n.$&&(e=>{const t=e["s-cr"]=me.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){q(t,t.S=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.$)){{if(t.$|=32,(o=de(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.A=o.watchers,Z(o,n,2),o.isProxied=!0);const e=()=>{};t.$|=8;try{new o(t)}catch(e){ue(e)}t.$&=-9,t.$|=128,e()}if(o.style){let e=o.style;const t=j(n);if(!$e.has(t)){const l=()=>{};((e,t,n)=>{let l=$e.get(e);be&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,$e.set(e,l)})(t,e,!!(1&n.$)),l()}}}const s=t.S,i=()=>V(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){pe.jmp((()=>(()=>{if(0==(1&pe.$)){const e=ie(this),t=e.O;e.q&&(e.q.map((e=>e())),e.q=void 0),Q(t,"disconnectedCallback")}})()))}componentOnReady(){return ie(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,Z(r,n,1)))}))}));{c.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles","");const e=null!==(n=pe.R)&&void 0!==n?n:d(me);null!=e&&c.setAttribute("nonce",e),i.insertBefore(c,r?r.nextSibling:i.firstChild)}a=!1,f.length?f.map((e=>e.connectedCallback())):pe.jmp((()=>u=setTimeout(K,30)))},te=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,i=ne(t,o),r=le(n);pe.ael(s,l,i,r),(t.q=t.q||[]).push((()=>pe.rel(s,l,i,r)))}))},ne=(e,t)=>n=>{try{256&e.$?e.O[t](n):(e.M=e.M||[]).push([t,n])}catch(e){ue(e)}},le=e=>0!=(2&e),oe=e=>pe.R=e,se=new WeakMap,ie=e=>se.get(e),re=(e,t)=>se.set(t.O=e,t),ce=(e,t)=>{const n={$:0,p:e,C:t,D:new Map};return n.F=new Promise((e=>n.N=e)),n.V=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],te(e,n,t.U),se.set(e,n)},fe=(e,t)=>t in e,ue=(e,t)=>(0,console.error)(e,t),ae=new Map,de=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=ae.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ae.set(n,e),e[t])),ue)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},$e=new Map,he="undefined"!=typeof window?window:{},me=he.document||{head:{}},pe={$:0,H:"",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)},
|
|
1
|
+
let e,t,n,l=!1,o=!1,s=!1,i=!1,r=null,c=!1;const f="http://www.w3.org/1999/xlink",u={},a=e=>"object"==(e=typeof e)||"function"===e;function d(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const $=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!a(l))&&(l+=""),i&&r?c[c.length-1].t+=l:c.push(i?h(null,l):l),r=i)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,p);const u=h(e,null);return u.l=t,c.length>0&&(u.o=c),u.i=o,u.u=s,u},h=(e,t)=>({$:0,h:e,t,m:null,o:null,l:null,i:null,u:null}),m={},p={forEach:(e,t)=>e.map(y).forEach(t),map:(e,t)=>e.map(y).map(t).map(b)},y=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.h,vtext:e.t}),b=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),$(e.vtag,t,...e.vchildren||[])}const t=h(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},v=e=>ie(e).p,w=(e,t,n)=>{const l=v(e);return{emit:e=>g(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},g=(e,t,n)=>{const l=ye.ce(t,n);return e.dispatchEvent(l),l},k=new WeakMap,j=e=>"sc-"+e.v,S=(e,t,n,l,o,s)=>{if(n!==l){let i=fe(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=M(n),s=M(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const c=a(l);if((i||c&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let u=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,u=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(u?e.removeAttributeNS(f,t):e.removeAttribute(t)):(!i||4&s||o)&&!c&&(l=!0===l?"":l,u?e.setAttributeNS(f,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):fe(he,r)?r.slice(2):r[2]+t.slice(3),n&&ye.rel(e,t,n,!1),l&&ye.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],x=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||u,i=t.l||u;for(l in s)l in i||S(o,l,s[l],void 0,n,t.$);for(l in i)S(o,l,s[l],i[l],n,t.$)},C=(o,r,c,f)=>{const u=r.o[c];let a,d,$,h=0;if(l||(s=!0,"slot"===u.h&&(e&&f.classList.add(e+"-s"),u.$|=u.o?2:1)),null!==u.t)a=u.m=me.createTextNode(u.t);else if(1&u.$)a=u.m=me.createTextNode("");else{if(i||(i="svg"===u.h),a=u.m=me.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&u.$?"slot-fb":u.h),i&&"foreignObject"===u.h&&(i=!1),x(null,u,i),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),u.o)for(h=0;h<u.o.length;++h)d=C(o,u,h,a),d&&a.appendChild(d);"svg"===u.h?i=!1:"foreignObject"===a.tagName&&(i=!0)}return a["s-hn"]=n,3&u.$&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=u.u||"",$=o&&o.o&&o.o[c],$&&$.h===u.h&&o.m&&R(o.m,!1)),a},R=(e,t)=>{ye.$|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(N(o).insertBefore(o,L(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&R(o,t)}ye.$&=-2},P=(e,t,l,o,s,i)=>{let r,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=C(null,l,s,e),r&&(o[s].m=r,c.insertBefore(r,L(t))))},T=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,U(l),o=!0,s["s-ol"]?s["s-ol"].remove():R(s,!0),s.remove())},E=(e,t)=>e.h===t.h&&("slot"===e.h?e.u===t.u:e.i===t.i),L=e=>e&&e["s-ol"]||e,N=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,W=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.h,r=t.t;let c;null===r?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||x(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,u=t.length-1,a=t[0],d=t[u],$=l.length-1,h=l[0],m=l[$];for(;i<=u&&r<=$;)if(null==a)a=t[++i];else if(null==d)d=t[--u];else if(null==h)h=l[++r];else if(null==m)m=l[--$];else if(E(a,h))W(a,h),a=t[++i],h=l[++r];else if(E(d,m))W(d,m),d=t[--u],m=l[--$];else if(E(a,m))"slot"!==a.h&&"slot"!==m.h||R(a.m.parentNode,!1),W(a,m),e.insertBefore(a.m,d.m.nextSibling),a=t[++i],m=l[--$];else if(E(d,h))"slot"!==a.h&&"slot"!==m.h||R(d.m.parentNode,!1),W(d,h),e.insertBefore(d.m,a.m),d=t[--u],h=l[++r];else{for(c=-1,f=i;f<=u;++f)if(t[f]&&null!==t[f].i&&t[f].i===h.i){c=f;break}c>=0?(s=t[c],s.h!==h.h?o=C(t&&t[r],n,c,e):(W(s,h),t[c]=void 0,o=s.m),h=l[++r]):(o=C(t&&t[r],n,r,e),h=l[++r]),o&&N(a.m).insertBefore(o,L(a.m))}i>u?P(e,null==l[$+1]?null:l[$+1].m,n,l,r,$):r>$&&T(t,i,u)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),P(n,null,t,o,0,o.length-1)):null!==l&&T(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(c=n["s-cr"])?c.parentNode.textContent=r:e.t!==r&&(n.data=r)},A=e=>{const t=e.childNodes;let n,l,o,s,i,r;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(r=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===r&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===r||3===r&&""!==t[s].textContent.trim()){n.hidden=!0;break}A(n)}},D=[],F=e=>{let t,n,l,s,i,r,c=0;const f=e.childNodes,u=f.length;for(;c<u;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],r=l.length-1;r>=0;r--)n=l[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(H(n,s)?(i=D.find((e=>e.g===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:D.push({k:t,g:n}),n["s-sr"]&&D.map((e=>{H(e.g,n["s-sn"])&&(i=D.find((e=>e.g===n)),i&&!e.k&&(e.k=i.k))}))):D.some((e=>e.g===n))||D.push({g:n}));1===t.nodeType&&F(t)}},H=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,U=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(U)},q=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},V=(e,t)=>{if(e.$|=16,!(4&e.$))return q(e,e.S),Me((()=>_(e,t)));e.$|=512},_=(e,t)=>{const n=e.O;let l;return t&&(e.$|=256,e.M&&(e.M.map((([e,t])=>Q(n,e,t))),e.M=null),l=Q(n,"componentWillLoad")),X(l,(()=>z(e,n,t)))},z=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.C,n=e.p,l=t.$,o=((e,t)=>{var n;let l=j(t);const o=$e.get(l);if(e=11===e.nodeType?e:me,o)if("string"==typeof o){let t,s=k.get(e=e.head||e);if(s||k.set(e,s=new Set),!s.has(l)){{t=me.createElement("style"),t.innerHTML=o;const l=null!==(n=ye.R)&&void 0!==n?n:d(me);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);B(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>I(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},B=(i,c)=>{try{r=c,c=c.render&&c.render(),i.$&=-17,i.$|=2,((i,r)=>{const c=i.p,f=i.C,u=i.P||h(null,null),a=(e=>e&&e.h===m)(r)?r:$(null,null,r);if(n=c.tagName,f.T&&(a.l=a.l||{},f.T.map((([e,t])=>a.l[t]=c[e]))),a.h=null,a.$|=4,i.P=a,a.m=u.m=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&f.$),o=!1,W(u,a),ye.$|=1,s){let e,t,n,l,o,s;F(a.m);let i=0;for(;i<D.length;i++)e=D[i],t=e.g,t["s-ol"]||(n=me.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<D.length;i++)if(e=D[i],t=e.g,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&A(a.m),ye.$&=-2,D.length=0})(i,c)}catch(e){ue(e,i.p)}return r=null,null},G=()=>r,I=e=>{const t=e.p,n=e.O,l=e.S;Q(n,"componentDidRender"),64&e.$||(e.$|=64,Y(t),Q(n,"componentDidLoad"),e.L(t),l||K()),e.N(t),e.j&&(e.j(),e.j=void 0),512&e.$&&Oe((()=>V(e,!1))),e.$&=-517},J=e=>{{const t=ie(e),n=t.p.isConnected;return n&&2==(18&t.$)&&V(t,!1),n}},K=()=>{Y(me.documentElement),Oe((()=>g(he,"appload",{detail:{namespace:"smoothly"}})))},Q=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ue(e)}},X=(e,t)=>e&&e.then?e.then(t):t(),Y=e=>e.classList.add("hydrated"),Z=(e,t,n)=>{if(t.W){e.watchers&&(t.A=e.watchers);const l=Object.entries(t.W),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>ie(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ie(e),s=o.p,i=o.D.get(t),r=o.$,c=o.O;if(n=((e,t)=>null==e||a(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),c)){if(l.A&&128&r){const e=l.A[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ue(e,s)}}))}2==(18&r)&&V(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=ie(this);return n.F.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){ye.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},ee=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=he.customElements,i=me.head,r=i.querySelector("meta[charset]"),c=me.createElement("style"),f=[];let u,a=!0;Object.assign(ye,t),ye.H=new URL(t.resourcesUrl||"./",me.baseURI).href,e.map((e=>{e[1].map((t=>{const n={$:t[0],v:t[1],W:t[2],U:t[3]};n.W=t[2],n.U=t[3],n.T=[],n.A={};const i=n.v,r=class extends HTMLElement{constructor(e){super(e),ce(e=this,n),1&n.$&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),a?f.push(this):ye.jmp((()=>(e=>{if(0==(1&ye.$)){const t=ie(e),n=t.C,l=()=>{};if(1&t.$)te(e,t,n.U);else{t.$|=1,12&n.$&&(e=>{const t=e["s-cr"]=me.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){q(t,t.S=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.$)){{if(t.$|=32,(o=de(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.A=o.watchers,Z(o,n,2),o.isProxied=!0);const e=()=>{};t.$|=8;try{new o(t)}catch(e){ue(e)}t.$&=-9,t.$|=128,e()}if(o.style){let e=o.style;const t=j(n);if(!$e.has(t)){const l=()=>{};((e,t,n)=>{let l=$e.get(e);ve&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,$e.set(e,l)})(t,e,!!(1&n.$)),l()}}}const s=t.S,i=()=>V(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){ye.jmp((()=>(()=>{if(0==(1&ye.$)){const e=ie(this),t=e.O;e.q&&(e.q.map((e=>e())),e.q=void 0),Q(t,"disconnectedCallback")}})()))}componentOnReady(){return ie(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,Z(r,n,1)))}))}));{c.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles","");const e=null!==(n=ye.R)&&void 0!==n?n:d(me);null!=e&&c.setAttribute("nonce",e),i.insertBefore(c,r?r.nextSibling:i.firstChild)}a=!1,f.length?f.map((e=>e.connectedCallback())):ye.jmp((()=>u=setTimeout(K,30)))},te=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,i=ne(t,o),r=le(n);ye.ael(s,l,i,r),(t.q=t.q||[]).push((()=>ye.rel(s,l,i,r)))}))},ne=(e,t)=>n=>{try{256&e.$?e.O[t](n):(e.M=e.M||[]).push([t,n])}catch(e){ue(e)}},le=e=>0!=(2&e),oe=e=>ye.R=e,se=new WeakMap,ie=e=>se.get(e),re=(e,t)=>se.set(t.O=e,t),ce=(e,t)=>{const n={$:0,p:e,C:t,D:new Map};return n.F=new Promise((e=>n.N=e)),n.V=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],te(e,n,t.U),se.set(e,n)},fe=(e,t)=>t in e,ue=(e,t)=>(0,console.error)(e,t),ae=new Map,de=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=ae.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ae.set(n,e),e[t])),ue)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},$e=new Map,he="undefined"!=typeof window?window:{},me=he.document||{head:{}},pe=he.HTMLElement||class{},ye={$:0,H:"",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)},be=e=>Promise.resolve(e),ve=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),we=[],ge=[],ke=(e,t)=>n=>{e.push(n),c||(c=!0,t&&4&ye.$?Oe(Se):ye.raf(Se))},je=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ue(e)}e.length=0},Se=()=>{je(we),je(ge),(c=we.length>0)&&ye.raf(Se)},Oe=e=>be().then(e),Me=ke(ge,!0);export{m as H,v as a,ee as b,w as c,pe as d,J as f,G as g,$ as h,be as p,re as r,oe as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t}from"./p-
|
|
1
|
+
import{r as o,h as t}from"./p-e5d867e5.js";const r=class{constructor(t){o(this,t),this.orientation="horizontal"}render(){return t("slot",null)}};r.style="smoothly-radio-group{display:flex;position:relative;color:none !important;background:none !important;margin:0.5em 0}smoothly-radio-group[hidden]{display:none}smoothly-radio-group[orientation=vertical] *:not(:first-of-type)>input[type=radio]~label{border-top:none}smoothly-radio-group:not([orientation=vertical]) *:not(:first-of-type)>input[type=radio]~label{border-left:none}smoothly-radio-group[orientation=vertical]{flex-direction:column}smoothly-radio-group[orientation=vertical] :first-of-type>input[type=radio]~label{border-radius:4px 4px 0 0}smoothly-radio-group[orientation=vertical] :last-of-type>input[type=radio]~label{border-radius:0 0 4px 4px}smoothly-radio-group:not([orientation=vertical]){flex-direction:row}smoothly-radio-group:not([orientation=vertical]) :first-of-type>input[type=radio]~label{border-radius:4px 0 0 4px}smoothly-radio-group:not([orientation=vertical]) :last-of-type>input[type=radio]~label{border-radius:0 4px 4px 0}";export{r as smoothly_radio_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-e5d867e5.js";export{s as setNonce}from"./p-e5d867e5.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-cab954af",[[2,"smoothly-country",{value:[1],text:[1],language:[32]}]]],["p-b3d699d2",[[2,"smoothly-google-font",{value:[1]}]]],["p-fe4520be",[[4,"smoothly-radio-group",{orientation:[513]}]]],["p-4f3b0e6d",[[0,"smoothly-reorder"]]],["p-ccd08c26",[[6,"smoothly-trigger-sink",{context:[16],destination:[1],filter:[1]},[[0,"trigger","TriggerListener"]]]]],["p-6e017bc2",[[6,"smoothly-trigger-source",{listen:[1]}]]],["p-46dcb025",[[0,"smoothly-app-demo",{baseUrl:[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"],[0,"dateRangeClear","handleDateRangeClear"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{color:[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{color:[513],expand:[513],fill:[513],disabled:[516],type:[513],link:[1],download:[4]}],[4,"smoothly-room",{label:[1],icon:[1],path:[1],to:[1]}],[2,"smoothly-input-date-range",{value:[1025],start:[1025],end:[1025],max:[1025],min:[1025],open:[1028],disabled:[516],showLabel:[516,"show-label"],labelStart:[1,"label-start"],labelEnd:[1,"label-end"],clearable:[4]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]],[1,"smoothly-picker",{disabled:[516],readonly:[516],maxMenuHeight:[1,"max-menu-height"],maxHeight:[1,"max-height"],emptyMenuLabel:[1025,"empty-menu-label"],multiple:[516],mutable:[4],optionStyle:[8,"option-style"],options:[1040],labelSetting:[513,"label-setting"],label:[513],selections:[1040],selectNoneName:[1025,"select-none-name"],selectAllName:[1025,"select-all-name"],selectAllEnabled:[1028,"select-all-enabled"],selectionName:[1025,"selection-name"],newOptionLabel:[1025,"new-option-label"],valueValidator:[16],isOpen:[32],empty:[32]},[[0,"optionSelect","optionSelectHandler"],[0,"optionUnselect","optionSelectHandler"],[0,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-notifier",{notices:[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[6,"smoothly-dialog",{color:[513],open:[1540],closable:[516],header:[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{opacity:[1],bottom:[1],right:[1],visible:[32]}],[2,"smoothly-checkbox",{selectAll:[4,"select-all"],size:[1],intermediate:[1540],selected:[1540],disabled:[1540],t:[32]}],[6,"smoothly-radio-button-item",{value:[8],selected:[1540],color:[513],iconColor:[1,"icon-color"],disabled:[1540]}],[6,"smoothly-submit",{processing:[1540],color:[513],expand:[513],fill:[513],disabled:[516],prevent:[4],submit:[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{align:[1],open:[1540],allowSpotlight:[32],spotlight:[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[0,"smoothly-urlencoded",{data:[1]}],[6,"smoothly-accordion",{value:[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]],[6,"smoothly-accordion-item",{name:[1],brand:[1],open:[1540]}],[2,"smoothly-display",{type:[1],value:[8],currency:[1],country:[1],format:[16]}],[2,"smoothly-display-amount",{amount:[8],currency:[1],toInteger:[4,"to-integer"]}],[2,"smoothly-display-date-time",{datetime:[1]}],[2,"smoothly-frame",{url:[1],name:[1],origin:[1],send:[64]}],[6,"smoothly-popup",{visible:[1540],direction:[1537],cssVariables:[32]}],[6,"smoothly-radio",{name:[1],value:[1],checked:[1540],tabIndex:[2,"tab-index"]}],[6,"smoothly-radio-button",{name:[1],value:[1032],deselectable:[516],decoration:[513]},[[2,"radioItemSelectInternal","radioSelectHandler"]]],[6,"smoothly-select",{identifier:[1],background:[513],value:[1025]}],[2,"smoothly-skeleton",{widths:[16],width:[1025],color:[1],period:[2],distance:[1],align:[513]}],[2,"smoothly-svg",{url:[513],size:[513],color:[1]}],[6,"smoothly-table",{root:[1540]},[[0,"expandableLoad","handleExpandableLoaded"],[0,"expandableChange","handleExpandableState"],[0,"spotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-expandable-row",{align:[1],open:[1540],allowSpotlight:[32],spotlight:[32]},[[0,"click","onClick"],[0,"tableLoad","handleTableLoaded"]]],[6,"smoothly-table-header",{name:[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{name:[513],value:[1025],open:[1028],max:[1025],min:[1025],disabled:[1028],flexible:[516],color:[1025]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{toggle:[4],emptyMenuLabel:[1025,"empty-menu-label"],newOptionLabel:[1,"new-option-label"],maxMenuHeight:[1,"max-menu-height"],order:[4],optionStyle:[8,"option-style"],options:[1040],resetHighlightOnOptionsChange:[1028,"reset-highlight-on-options-change"],mutable:[4],filteredOptions:[32],highlightIndex:[32],keyword:[32],moveHighlight:[64],setHighlight:[64],getHighlighted:[64],filterOptions:[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-notification",{notice:[16],tick:[32]},[[0,"trigger","onTrigger"]]],[6,"smoothly-tab",{label:[1],open:[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{selectedElement:[32]},[[0,"expansionOpen","openChanged"]]],[0,"smoothly-tuple",{tuple:[16]}],[1,"smoothly-option",{aliases:[513],dataHighlight:[1540,"data-highlight"],name:[1537],value:[1537],divider:[1540],checkbox:[4],new:[4],toggle:[4],checked:[1028]}],[2,"smoothly-spinner",{active:[516],size:[513]}],[2,"smoothly-calendar",{month:[1025],value:[1025],start:[1025],end:[1025],max:[1025],min:[1025],doubleInput:[516,"double-input"],color:[513],firstSelected:[32]}],[6,"smoothly-input",{name:[513],value:[1032],type:[513],required:[1540],minLength:[1026,"min-length"],showLabel:[516,"show-label"],maxLength:[1026,"max-length"],autocomplete:[1028],pattern:[1040],placeholder:[1025],disabled:[1028],readonly:[1028],currency:[513],initialValue:[32],getFormData:[64],setKeepFocusOnReRender:[64],setSelectionRange:[64]}],[2,"smoothly-input-month",{value:[1025]}],[6,"smoothly-quiet",{color:[1]}],[6,"smoothly-selector",{initialPrompt:[1,"initial-prompt"],disableFilter:[4,"disable-filter"],opened:[32],selectedElement:[32],missing:[32],filter:[32],reset:[64]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{value:[8],selected:[1540],marked:[1540],filter:[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{color:[513],expand:[513],fill:[513],disabled:[516],type:[513],name:[1],value:[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{color:[513],fill:[513],name:[1],size:[513],toolTip:[1,"tool-tip"],document:[32]}]]]],e)));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Components, JSX } from "./components";
|
|
2
2
|
export { App, redirect } from "./components/App";
|
|
3
|
-
export { Autocomplete, ClientIdentifier, Color, Expand, Fill, GoogleFont, Icon, Message, Notice, Trigger, Option, Listenable, } from "./model";
|
|
3
|
+
export { Autocomplete, ClientIdentifier, Color, Expand, Fill, GoogleFont, Icon, Message, Notice, Trigger, Option, StateBase, Listenable, WithListenable, HasListenable, CanBeListenable, } from "./model";
|
|
4
4
|
export { Cosmetic } from "./utilities";
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type WithListenable<T extends Record<string, any>> = T & Listenable<T>;
|
|
2
|
+
export type CanBeListenable = Record<string, any>;
|
|
3
|
+
export interface HasListenable<T extends CanBeListenable> {
|
|
4
|
+
readonly listenable: WithListenable<T>;
|
|
5
|
+
}
|
|
6
|
+
export declare class Listenable<T extends CanBeListenable> {
|
|
2
7
|
#private;
|
|
3
|
-
listen<K extends keyof ListenableProperties<T>>(this: T & Listenable<T>, property: K, listener: Listener<T[K]
|
|
8
|
+
listen<K extends keyof ListenableProperties<T>>(this: T & Listenable<T>, property: K, listener: Listener<T[K]>, options?: {
|
|
9
|
+
lazy?: boolean;
|
|
10
|
+
}): void;
|
|
4
11
|
unlisten<K extends keyof ListenableProperties<T>>(property: K, listener: Listener<T[K]>): void;
|
|
5
|
-
static load<T extends
|
|
12
|
+
static load<T extends HasListenable<CanBeListenable>>(backend: T): WithListenable<T>;
|
|
6
13
|
}
|
|
7
14
|
type ListenableProperties<T> = {
|
|
8
15
|
[P in keyof T as T[P] extends Function ? never : P]: T[P];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HasListenable, WithListenable } from "./Listenable";
|
|
2
|
+
export declare abstract class StateBase<T extends StateBase<any, any>, C = undefined> implements HasListenable<T> {
|
|
3
|
+
readonly listenable: WithListenable<T>;
|
|
4
|
+
protected readonly client: C;
|
|
5
|
+
protected constructor(...parameters: C extends undefined ? [] : [client: C]);
|
|
6
|
+
}
|
|
@@ -9,4 +9,5 @@ export { Message } from "./Message";
|
|
|
9
9
|
export { Notice } from "./Notice";
|
|
10
10
|
export { Option } from "./Option";
|
|
11
11
|
export { Trigger } from "./Trigger";
|
|
12
|
-
export { Listenable } from "./Listenable";
|
|
12
|
+
export { Listenable, HasListenable, WithListenable, CanBeListenable } from "./Listenable";
|
|
13
|
+
export { StateBase } from "./StateBase";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,a as i}from"./p-c88ae468.js";const h=class{constructor(i){t(this,i),this.reorder=s(this,"reorder",7)}get children(){let t=[];if(this.childrenCache)t=this.childrenCache;else{for(let s=0;s<this.element.children.length;s++){const i=this.element.children[s];if(i instanceof HTMLElement){const s=i.getBoundingClientRect();t.push({top:s.top,middle:s.top+s.height/2,bottom:s.bottom,element:i})}}this.childrenCache=t}return t}onMouseDown(t){if(!this.move&&this.element.children.length>1){this.bounds=this.element.getBoundingClientRect(),this.childrenCache=void 0;const s=this.getCurrentIndex(t.clientY);this.dragged=Object.assign(Object.assign({},this.children[s]),{startY:t.clientY,offsetY:t.clientY-this.children[s].middle,index:s,height:s<this.children.length-1?this.children[s+1].top-this.children[s].top:this.children[s].bottom-this.children[s-1].bottom}),this.dragged.element.className+=" dragging"}}onMouseMove(t){if(this.dragged&&this.bounds&&t.clientY>=this.bounds.top&&t.clientY<=this.bounds.bottom){const s=this.getCurrentIndex(t.clientY-this.dragged.offsetY);this.translate(this.dragged.index,s,t.clientY-this.dragged.startY)}}onMouseUp(t){if(this.dragged){this.dragged.element.className=this.dragged.element.className.replace(" dragging","");const s=this.getCurrentIndex(t.clientY-this.dragged.offsetY);this.translate(this.dragged.index,s,this.children[s].top-this.dragged.top),this.move={from:this.dragged.index,to:s},this.dragged=void 0,window.setTimeout((()=>{if(this.move){const t=[...this.children.map((t=>t.element))],s=t.splice(this.move.from,1);t.splice(this.move.to,0,...s),t.forEach((t=>this.element.removeChild(t))),t.forEach((t=>{t.style.transform="",this.element.appendChild(t)})),this.reorder.emit([this.move.from,this.move.to]),this.move=void 0}}),500)}}translate(t,s,i){for(let h=0;h<this.children.length;h++){let o;this.dragged&&(o=t<s&&h>t&&h<=s?-this.dragged.height:t>s&&h<t&&h>=s?this.dragged.height:h==t?i:0,this.children[h].element.style.transform=`translateY(${o}px)`)}}getCurrentIndex(t){return this.children.findIndex((s=>t<s.bottom))}componentDidLoad(){this.element.childNodes.forEach((t=>{t.addEventListener("mousedown",(t=>this.onMouseDown(t))),t.addEventListener("mousemove",(t=>this.onMouseMove(t))),t.addEventListener("mouseup",(t=>this.onMouseUp(t)))}))}get element(){return i(this)}};h.style="smoothly-reorder>*{cursor:move;transition:transform 0.3s}smoothly-reorder>*.dragging{transition:none;box-shadow:0 0 10px rgba(var(--smoothly-dark-color));z-index:1;user-select:none}";export{h as smoothly_reorder}
|