smoothly 0.3.49 → 0.3.51
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/{index-de46f836.js → index-50415e95.js} +3 -0
- package/dist/cjs/{index-45c42c7c.js → index-e7dd6fd1.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_53.cjs.entry.js +10 -5
- 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 +1 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
- package/dist/cjs/smoothly.cjs.js +1 -1
- package/dist/collection/components/icon/index.js +7 -2
- package/dist/collection/components/icon/style.css +2 -0
- package/dist/custom-elements/index.js +8 -3
- package/dist/esm/{index-d3421c35.js → index-15966109.js} +3 -1
- package/dist/esm/{index-9594f9bc.js → index-d89593d4.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/smoothly-accordion_53.entry.js +10 -5
- 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 +1 -1
- package/dist/esm/smoothly-trigger-source.entry.js +1 -1
- package/dist/esm/smoothly.js +1 -1
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/{p-f446ca1a.entry.js → p-13dac490.entry.js} +1 -1
- package/dist/smoothly/{p-7db49a38.entry.js → p-22402fa5.entry.js} +1 -1
- package/dist/smoothly/p-38158601.entry.js +1 -0
- package/dist/smoothly/{p-68919b0f.entry.js → p-b3c569ae.entry.js} +1 -1
- package/dist/smoothly/{p-03c10101.js → p-b72a0f8f.js} +1 -1
- package/dist/smoothly/{p-fcaa551d.entry.js → p-b7a8f2bb.entry.js} +1 -1
- package/dist/smoothly/{p-e0f4957d.entry.js → p-bfe744c5.entry.js} +1 -1
- package/dist/smoothly/p-e67158ee.js +2 -0
- package/dist/smoothly/{p-bb508923.entry.js → p-f1114814.entry.js} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/icon/index.d.ts +1 -1
- package/package.json +4 -1
- package/dist/smoothly/p-4a0b35b7.js +0 -2
- package/dist/smoothly/p-5d41e3ca.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-e67158ee.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-f1114814",[[2,"smoothly-country",{value:[1],text:[1],language:[32]}]]],["p-bfe744c5",[[2,"smoothly-google-font",{value:[1]}]]],["p-22402fa5",[[4,"smoothly-radio-group",{orientation:[513]}]]],["p-38158601",[[0,"smoothly-reorder"]]],["p-b3c569ae",[[6,"smoothly-trigger-sink",{context:[16],destination:[1],filter:[1]},[[0,"trigger","TriggerListener"]]]]],["p-13dac490",[[6,"smoothly-trigger-source",{listen:[1]}]]],["p-b7a8f2bb",[[0,"smoothly-app-demo",{baseUrl:[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[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"]},[[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],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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smoothly",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.51",
|
|
4
4
|
"description": "Web component library written in Stencil.",
|
|
5
5
|
"author": "PayFunc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,6 +58,9 @@
|
|
|
58
58
|
"preset": "ts-jest",
|
|
59
59
|
"testMatch": null
|
|
60
60
|
},
|
|
61
|
+
"overrides": {
|
|
62
|
+
"semver": "7.5.3"
|
|
63
|
+
},
|
|
61
64
|
"scripts": {
|
|
62
65
|
"build": "stencil build",
|
|
63
66
|
"start": "stencil build --dev --watch --serve",
|
|
@@ -1,2 +0,0 @@
|
|
|
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",a={},u=e=>"object"==(e=typeof e)||"function"===e,d=(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&&!u(l))&&(l+=""),i&&r?c[c.length-1].t+=l:c.push(i?$(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,y);const a=$(e,null);return a.l=t,c.length>0&&(a.o=c),a.i=o,a.u=s,a},$=(e,t)=>({$:0,h:e,t,p:null,o:null,l:null,i:null,u:null}),h={},y={forEach:(e,t)=>e.map(p).forEach(t),map:(e,t)=>e.map(p).map(t).map(m)},p=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.h,vtext:e.t}),m=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),d(e.vtag,t,...e.vchildren||[])}const t=$(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},b=e=>oe(e).m,w=(e,t,n)=>{const l=b(e);return{emit:e=>g(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},g=(e,t,n)=>{const l=he.ce(t,n);return e.dispatchEvent(l),l},v=new WeakMap,k=e=>"sc-"+e.g,j=(e,t,n,l,o,s)=>{if(n!==l){let i=re(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=O(n),s=O(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=u(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 a=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(a?e.removeAttributeNS(f,t):e.removeAttribute(t)):(!i||4&s||o)&&!c&&(l=!0===l?"":l,a?e.setAttributeNS(f,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):re(de,r)?r.slice(2):r[2]+t.slice(3),n&&he.rel(e,t,n,!1),l&&he.ael(e,t,l,!1)}},S=/\s/,O=e=>e?e.split(S):[],M=(e,t,n,l)=>{const o=11===t.p.nodeType&&t.p.host?t.p.host:t.p,s=e&&e.l||a,i=t.l||a;for(l in s)l in i||j(o,l,s[l],void 0,n,t.$);for(l in i)j(o,l,s[l],i[l],n,t.$)},x=(o,r,c,f)=>{const a=r.o[c];let u,d,$,h=0;if(l||(s=!0,"slot"===a.h&&(e&&f.classList.add(e+"-s"),a.$|=a.o?2:1)),null!==a.t)u=a.p=$e.createTextNode(a.t);else if(1&a.$)u=a.p=$e.createTextNode("");else{if(i||(i="svg"===a.h),u=a.p=$e.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&a.$?"slot-fb":a.h),i&&"foreignObject"===a.h&&(i=!1),M(null,a,i),null!=e&&u["s-si"]!==e&&u.classList.add(u["s-si"]=e),a.o)for(h=0;h<a.o.length;++h)d=x(o,a,h,u),d&&u.appendChild(d);"svg"===a.h?i=!1:"foreignObject"===u.tagName&&(i=!0)}return u["s-hn"]=n,3&a.$&&(u["s-sr"]=!0,u["s-cr"]=t,u["s-sn"]=a.u||"",$=o&&o.o&&o.o[c],$&&$.h===a.h&&o.p&&C(o.p,!1)),u},C=(e,t)=>{he.$|=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"]&&(L(o).insertBefore(o,E(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&C(o,t)}he.$&=-2},R=(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=x(null,l,s,e),r&&(o[s].p=r,c.insertBefore(r,E(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.p,H(l),o=!0,s["s-ol"]?s["s-ol"].remove():C(s,!0),s.remove())},T=(e,t)=>e.h===t.h&&("slot"===e.h?e.u===t.u:e.i===t.i),E=e=>e&&e["s-ol"]||e,L=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,N=(e,t)=>{const n=t.p=e.p,l=e.o,o=t.o,s=t.h,r=t.t;let c;null===r?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||M(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],d=t[a],$=l.length-1,h=l[0],y=l[$];for(;i<=a&&r<=$;)if(null==u)u=t[++i];else if(null==d)d=t[--a];else if(null==h)h=l[++r];else if(null==y)y=l[--$];else if(T(u,h))N(u,h),u=t[++i],h=l[++r];else if(T(d,y))N(d,y),d=t[--a],y=l[--$];else if(T(u,y))"slot"!==u.h&&"slot"!==y.h||C(u.p.parentNode,!1),N(u,y),e.insertBefore(u.p,d.p.nextSibling),u=t[++i],y=l[--$];else if(T(d,h))"slot"!==u.h&&"slot"!==y.h||C(d.p.parentNode,!1),N(d,h),e.insertBefore(d.p,u.p),d=t[--a],h=l[++r];else{for(c=-1,f=i;f<=a;++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=x(t&&t[r],n,c,e):(N(s,h),t[c]=void 0,o=s.p),h=l[++r]):(o=x(t&&t[r],n,r,e),h=l[++r]),o&&L(u.p).insertBefore(o,E(u.p))}i>a?R(e,null==l[$+1]?null:l[$+1].p,n,l,r,$):r>$&&P(t,i,a)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),R(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(c=n["s-cr"])?c.parentNode.textContent=r:e.t!==r&&(n.data=r)},W=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}W(n)}},A=[],D=e=>{let t,n,l,s,i,r,c=0;const f=e.childNodes,a=f.length;for(;c<a;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"]||(F(n,s)?(i=A.find((e=>e.v===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:A.push({k:t,v:n}),n["s-sr"]&&A.map((e=>{F(e.v,n["s-sn"])&&(i=A.find((e=>e.v===n)),i&&!e.k&&(e.k=i.k))}))):A.some((e=>e.v===n))||A.push({v:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,H=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(H)},U=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},q=(e,t)=>{if(e.$|=16,!(4&e.$))return U(e,e.S),je((()=>V(e,t)));e.$|=512},V=(e,t)=>{const n=e.O;let l;return t&&(e.$|=256,e.M&&(e.M.map((([e,t])=>K(n,e,t))),e.M=null),l=K(n,"componentWillLoad")),Q(l,(()=>_(e,n,t)))},_=async(e,t,n)=>{const l=e.m,o=l["s-rc"];n&&(e=>{const t=e.C,n=e.m,l=t.$,o=((e,t)=>{let n=k(t);const l=ue.get(n);if(e=11===e.nodeType?e:$e,l)if("string"==typeof l){let t,o=v.get(e=e.head||e);o||v.set(e,o=new Set),o.has(n)||(t=$e.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(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);z(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>G(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},z=(i,c)=>{try{r=c,c=c.render&&c.render(),i.$&=-17,i.$|=2,((i,r)=>{const c=i.m,f=i.C,a=i.R||$(null,null),u=(e=>e&&e.h===h)(r)?r:d(null,null,r);if(n=c.tagName,f.P&&(u.l=u.l||{},f.P.map((([e,t])=>u.l[t]=c[e]))),u.h=null,u.$|=4,i.R=u,u.p=a.p=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&f.$),o=!1,N(a,u),he.$|=1,s){let e,t,n,l,o,s;D(u.p);let i=0;for(;i<A.length;i++)e=A[i],t=e.v,t["s-ol"]||(n=$e.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<A.length;i++)if(e=A[i],t=e.v,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&&W(u.p),he.$&=-2,A.length=0})(i,c)}catch(e){ce(e,i.m)}return r=null,null},B=()=>r,G=e=>{const t=e.m,n=e.O,l=e.S;K(n,"componentDidRender"),64&e.$||(e.$|=64,X(t),K(n,"componentDidLoad"),e.T(t),l||J()),e.L(t),e.j&&(e.j(),e.j=void 0),512&e.$&&ke((()=>q(e,!1))),e.$&=-517},I=e=>{{const t=oe(e),n=t.m.isConnected;return n&&2==(18&t.$)&&q(t,!1),n}},J=()=>{X($e.documentElement),ke((()=>g(de,"appload",{detail:{namespace:"smoothly"}})))},K=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ce(e)}},Q=(e,t)=>e&&e.then?e.then(t):t(),X=e=>e.classList.add("hydrated"),Y=(e,t,n)=>{if(t.N){e.watchers&&(t.W=e.watchers);const l=Object.entries(t.N),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>oe(this).A.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=oe(e),s=o.m,i=o.A.get(t),r=o.$,c=o.O;if(n=((e,t)=>null==e||u(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.N[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.A.set(t,n),c)){if(l.W&&128&r){const e=l.W[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ce(e,s)}}))}2==(18&r)&&q(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=oe(this);return n.D.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){he.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.P.push([e,o]),o}))}}return e},Z=(e,t={})=>{const n=[],l=t.exclude||[],o=de.customElements,s=$e.head,i=s.querySelector("meta[charset]"),r=$e.createElement("style"),c=[];let f,a=!0;Object.assign(he,t),he.F=new URL(t.resourcesUrl||"./",$e.baseURI).href,e.map((e=>{e[1].map((t=>{const s={$:t[0],g:t[1],N:t[2],H:t[3]};s.N=t[2],s.H=t[3],s.P=[],s.W={};const i=s.g,r=class extends HTMLElement{constructor(e){super(e),ie(e=this,s),1&s.$&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),a?c.push(this):he.jmp((()=>(e=>{if(0==(1&he.$)){const t=oe(e),n=t.C,l=()=>{};if(1&t.$)ee(e,t,n.H);else{t.$|=1,12&n.$&&(e=>{const t=e["s-cr"]=$e.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){U(t,t.S=n);break}}n.N&&Object.entries(n.N).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=ae(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.W=o.watchers,Y(o,n,2),o.isProxied=!0);const e=()=>{};t.$|=8;try{new o(t)}catch(e){ce(e)}t.$&=-9,t.$|=128,e()}if(o.style){let e=o.style;const t=k(n);if(!ue.has(t)){const l=()=>{};((e,t,n)=>{let l=ue.get(e);pe&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,ue.set(e,l)})(t,e,!!(1&n.$)),l()}}}const s=t.S,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){he.jmp((()=>(()=>{if(0==(1&he.$)){const e=oe(this),t=e.O;e.U&&(e.U.map((e=>e())),e.U=void 0),K(t,"disconnectedCallback")}})()))}componentOnReady(){return oe(this).q}};s.V=e[0],l.includes(i)||o.get(i)||(n.push(i),o.define(i,Y(r,s,1)))}))})),r.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles",""),s.insertBefore(r,i?i.nextSibling:s.firstChild),a=!1,c.length?c.map((e=>e.connectedCallback())):he.jmp((()=>f=setTimeout(J,30)))},ee=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=e,i=te(t,o),r=ne(n);he.ael(s,l,i,r),(t.U=t.U||[]).push((()=>he.rel(s,l,i,r)))}))},te=(e,t)=>n=>{try{256&e.$?e.O[t](n):(e.M=e.M||[]).push([t,n])}catch(e){ce(e)}},ne=e=>0!=(2&e),le=new WeakMap,oe=e=>le.get(e),se=(e,t)=>le.set(t.O=e,t),ie=(e,t)=>{const n={$:0,m:e,C:t,A:new Map};return n.D=new Promise((e=>n.L=e)),n.q=new Promise((e=>n.T=e)),e["s-p"]=[],e["s-rc"]=[],ee(e,n,t.H),le.set(e,n)},re=(e,t)=>t in e,ce=(e,t)=>(0,console.error)(e,t),fe=new Map,ae=e=>{const t=e.g.replace(/-/g,"_"),n=e.V,l=fe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(fe.set(n,e),e[t])),ce)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ue=new Map,de="undefined"!=typeof window?window:{},$e=de.document||{head:{}},he={$:0,F:"",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)},ye=e=>Promise.resolve(e),pe=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),me=[],be=[],we=(e,t)=>n=>{e.push(n),c||(c=!0,t&&4&he.$?ke(ve):he.raf(ve))},ge=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ce(e)}e.length=0},ve=()=>{ge(me),ge(be),(c=me.length>0)&&he.raf(ve)},ke=e=>ye().then(e),je=we(be,!0);export{h as H,b as a,Z as b,w as c,I as f,B as g,d as h,ye as p,se as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,a as i}from"./p-4a0b35b7.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}
|